﻿{
	"counters":
	[
		{
			"sid": "Tutorial_M2_Win_Counter",
			"comment": "win_condition_counter"
		},

		{
			"sid": "Tutorial_M2_t1_counter",
			"comment": "Tutorial_M2_t1_counter"
		},

		{
			"sid": "Tutorial_M2_t2_counter",
			"comment": "Tutorial_M2_t1_counter"
		},

		{
			"sid": "Tutorial_M2_walls_counter",
			"comment": "Tutorial_M2_walls_counter"
		},

		{
			"sid": "Tutorial_M2_treasure_counter",
			"comment": "Tutorial_M2_treasure_counter"
		},

		{
			"sid": "Tutorial_M2_Step_by_Step_Counter_1",
			"comment": "Step_by_Step_activator"
		},

		{
			"sid": "Tutorial_M2_Step_by_Step_Counter_1_mines",
			"comment": "Tutorial_M2_t1_counter"
		},

		{
			"sid": "Tutorial_M2_Step_by_Step_Counter_1_res",
			"comment": "Tutorial_M2_t1_counter"
		},

		{
			"sid": "Tutorial_M2_Step_by_Step_Counter_2",
			"comment": "Step_by_Step_activator"
		},

		{
			"sid": "Tutorial_M2_Step_by_Step_Counter_3",
			"comment": "Step_by_Step_activator"
		},

		{
			"sid": "Tutorial_M2_Step_by_Step_Counter_4",
			"comment": "Step_by_Step_activator"
		},

		{
			"sid": "Tutorial_M2_Step_by_Step_Counter_5",
			"comment": "Step_by_Step_activator"
		},

		{
			"sid": "Tutorial_M2_Step_by_Step_Counter_6",
			"comment": "Step_by_Step_activator"
		},

		{
			"sid": "Tutorial_M2_Step_by_Step_Counter_7",
			"comment": "Step_by_Step_activator"
		},

		{
			"sid": "Tutorial_M2_Step_by_Step_Counter_8",
			"comment": "Step_by_Step_activator"
		},

		{
			"sid": "Tutorial_M2_Step_by_Step_Counter_9",
			"comment": "Step_by_Step_activator"
		},

		{
			"sid": "Tutorial_M2_Step_by_Step_Counter_10",
			"comment": "Step_by_Step_activator"
		}
	],

	"quests":
	[
		{
			"sid": "intro",

			"hidden": true,

			"comment": "intro",

			"activeOnStart": true,
			"sharing": "Clone",

			"name": "1",

			"subQuests":
			[	
				{
					"sid": "1",
					"activeOnStart": true,

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "StartTurn", "p": [ "1", "1" ] }
							],

							"actions":
							[				
								{ "a": "RevealFogOfWar", "p": [ "551", "2" ] },	
								{ "a": "RevealFogOfWar", "p": [ "431", "2" ] },	
								{ "a": "Guide", "p": [ "tutorial_M2_start" ] },
								{ "a": "RemoveRes", "p": [ "wood", "50" ] },
								{ "a": "RemoveRes", "p": [ "ore", "50" ] },
								{ "a": "RemoveRes", "p": [ "crystals", "50" ] },
								{ "a": "RemoveRes", "p": [ "gemstones", "50" ] },
								{ "a": "RemoveRes", "p": [ "mercury", "50" ] },
								{ "a": "RemoveRes", "p": [ "dust", "500" ] }
							]
						}
					]
				}
			]
		},

		{
			"sid": "win_lose_conditions",
			"hidden": true,

			"comment": "conditions for losing, sometimes winning",

			"activeOnStart": true,
			"name": "1",
			"sharing": "Clone",

			"subQuests":
			[	
				{
					"sid": "lose_condition",
					"activeOnStart": true,

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "HeroKill", "p": [ "tutorial_hero_2" ] }
							],

							"actions":
							[
								{ "a": "GameLose" }
							]
						}
					]
				},
				{
					"sid": "win_condition",
					"activeOnStart": true,

					"triggers":
					[
						{
							"conditionsLogic": "And",

							"conditions":
							[
								{ "c": "Counter", "p": [ "Tutorial_M2_t1_counter", "=", "1" ] },
								{ "c": "Counter", "p": [ "Tutorial_M2_t2_counter", "=", "1" ] },
								{ "c": "Counter", "p": [ "Tutorial_M2_walls_counter", "=", "1" ] },
								{ "c": "Counter", "p": [ "Tutorial_M2_treasure_counter", "=", "1" ] }
							],

							"actions":
							[
								{ "a": "GameVictory" }
							]
						}
					]
				}
			]
		},

		{
			"sid": "step_by_step_activator_quest",
			"hidden": true,

			"comment": "step by step activator",

			"activeOnStart": true,
			"name": "step_by_step_activetor",
			"sharing": "Clone",

			"subQuests":
			[	
				{
					"sid": "step_by_step_activator",
					"activeOnStart": true,

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "Tutorial_M2_Step_by_Step_Counter_1", "=", "1" ] }
							],

							"actions":
							[
								{ "a": "NextQuest", "p": [ "Questlog" ] }
							]
						}
					]
				}
			]
		},

		{
			"sid": "step_by_step_1_quest",
			"hidden": true,

			"comment": "step by step activator",

			"activeOnStart": true,
			"name": "step_by_step_activetor",
			"sharing": "Clone",

			"subQuests":
			[	
				{
					"sid": "step_by_step_activator",
					"activeOnStart": true,

					"triggers":
					[
						{
							"conditionsLogic": "And",

							"conditions":
							[
								{ "c": "Counter", "p": [ "Tutorial_M2_Step_by_Step_Counter_1_mines", "=", "1" ] },
								{ "c": "Counter", "p": [ "Tutorial_M2_Step_by_Step_Counter_1_res", "=", "1" ] }
							],

							"actions":
							[
								{ "a": "Guide", "p": [ "tutorial_M2_1" ] }
							]
						}
					]
				}
			]
		},

		{
			"sid": "step_by_step_2_quest",
			"hidden": true,

			"comment": "step by step activator",

			"activeOnStart": true,
			"name": "step_by_step_activetor",
			"sharing": "Clone",

			"subQuests":
			[	
				{
					"sid": "step_by_step_activator",
					"activeOnStart": true,

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "Tutorial_M2_Step_by_Step_Counter_5", "=", "1" ] }
							],

							"actions":
							[
								{ "a": "NextQuest", "p": [ "Questlog_Main" ] }
							]
						}
					]
				}
			]
		},

		{
			"sid": "step_by_step_3_quest",
			"hidden": true,

			"comment": "step by step activator",

			"activeOnStart": true,
			"name": "step_by_step_activetor",
			"sharing": "Clone",

			"subQuests":
			[	
				{
					"sid": "step_by_step_activator",
					"activeOnStart": true,

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "NodeRevealed", "p": [ "668" ] }
							],

							"actions":
							[
								{ "a": "RevealFogOfWar", "p": [ "668", "1" ] },	
								{ "a": "MoveCamera", "p": [ "668" ] },
								{ "a": "Guide", "p": [ "tutorial_M2_5" ] }
							]
						}
					]
				}
			]
		},

		{
			"sid": "step_by_step_4_quest",
			"hidden": true,

			"comment": "step by step activator",

			"activeOnStart": true,
			"name": "step_by_step_activetor",
			"sharing": "Clone",

			"subQuests":
			[	
				{
					"sid": "step_by_step_activator",
					"activeOnStart": true,

					"triggers":
					[
						{
							"conditionsLogic": "Or",

							"conditions":
							[
								{ "c": "BuildingOwn", "p": [ "Build_Tier_1", "2", "startCity" ] },
								{ "c": "BuildingOwn", "p": [ "Build_Tier_2", "2", "startCity" ] }
							],

							"actions":
							[
								{ "a": "Guide", "p": [ "tutorial_M2_11" ] },
								{ "a": "NextQuest", "p": [ ] }
							]
						}
					]
				}
			]
		},

		{
			"sid": "Questlog_Main",
			"main": true,

			"comment": "Main Goal",

			"activeOnStart": false,
			"sharing": "Clone",

			"name": "Основная задача",

			"subQuests":
			[	
				{
					"sid": "win_condition_m_1",
					"activeOnStart": true,
					
					"name": "Постройки улучшенный барак мечников",

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "BuildingOwn", "p": [ "Build_Tier_1", "2", "startCity" ] }
							],

							"actions":
							[
								{ "a": "CurrentSubQuestDone" },
								{ "a": "CounterPlus", "p": [ "Tutorial_M2_t1_counter", "1" ] }
							]
						}
					]
				},
				{
					"sid": "win_condition_m_2",
					"activeOnStart": true,
					
					"name": "Постройки улучшенный барак арбалетчиков",

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "BuildingOwn", "p": [ "Build_Tier_2", "2", "startCity" ] }
							],

							"actions":
							[
								{ "a": "CurrentSubQuestDone" },
								{ "a": "CounterPlus", "p": [ "Tutorial_M2_t2_counter", "1" ] }
							]
						}
					]
				},
				{
					"sid": "win_condition_m_3",
					"activeOnStart": true,
					
					"name": "Постройки защитные стены",

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "BuildingOwn", "p": [ "Build_Wall", "1", "startCity" ] }
							],

							"actions":
							[
								{ "a": "CurrentSubQuestDone" },
								{ "a": "CounterPlus", "p": [ "Tutorial_M2_walls_counter", "1" ] }
							]
						}
					]
				},
				{
					"sid": "win_condition_m_4",
					"activeOnStart": true,
					
					"name": "Постройки сокровищницу",

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "BuildingOwn", "p": [ "Build_Treasury", "1", "startCity" ] }
							],

							"actions":
							[
								{ "a": "CurrentSubQuestDone" },
								{ "a": "CounterPlus", "p": [ "Tutorial_M2_treasure_counter", "1" ] }
							]
						}
					]
				}
			]
		},

		{
			"sid": "Questlog",
			"main": true,

			"comment": "Step by Step",

			"activeOnStart": false,
			"sharing": "Clone",

			"name": "Обучение",

			"subQuests":
			[	
				{
					"sid": "step_1_1",
					"activeOnStart": true,
					
					"name": "Захватите шахту дерева и руды",

					"triggers":
					[
						{
							"conditionsLogic": "And",

							"conditions":
							[
								{ "c": "ObjectCaptureSid", "p": [ "mine_wood", "1" ] },
								{ "c": "ObjectCaptureSid", "p": [ "mine_ore", "1" ] }
							],

							"actions":
							[
								{ "a": "CurrentSubQuestDone" },
								{ "a": "CounterPlus", "p": [ "Tutorial_M2_Step_by_Step_Counter_1_mines", "1" ] }
							]
						}
					]
				},
				{
					"sid": "step_1_2",
					"activeOnStart": true,
					
					"name": "Соберите 5 ед. дерева и руды",

					"triggers":
					[
						{
							"conditionsLogic": "And",

							"conditions":
							[
								{ "c": "ResCounter", "p": [ "wood", ">", "4" ] },
								{ "c": "ResCounter", "p": [ "ore", ">", "4" ] }
							],

							"actions":
							[
								{ "a": "CurrentSubQuestDone" },
								{ "a": "CounterPlus", "p": [ "Tutorial_M2_Step_by_Step_Counter_1_res", "1" ] }
							]
						}
					]
				},
				{
					"sid": "step_2",
					"activeOnStart": false,
					
					"name": "Перейдите на экран города",

					"triggers":
					[
						{
							"conditions":
							[

							],

							"actions":
							[
								{ "a": "CurrentSubQuestDone" },	
								{ "a": "Guide", "p": [ "tutorial_M2_2" ] }
							]
						}
					]
				},
				{
					"sid": "step_2_5",
					"activeOnStart": false,
					
					"name": "Постройте грифонницу",

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "BuildingOwn", "p": [ "Build_Tier_3", "1", "startCity" ] }
							],

							"actions":
							[
								{ "a": "CurrentSubQuestDone" },	
								{ "a": "Guide", "p": [ "tutorial_M2_3" ] }
							]
						}
					]
				},
				{
					"sid": "step_3",
					"activeOnStart": false,
					
					"name": "Наймите грифонов и остальную армию",

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "UnitHire", "p": [ "griffin", "7" ] }
							],

							"actions":
							[
								{ "a": "CurrentSubQuestDone" },	
								{ "a": "Guide", "p": [ "tutorial_M2_4" ] }
							]
						}
					]
				},
				{
					"sid": "step_4",
					"activeOnStart": false,
					
					"name": "Зайдите в портал",

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "Tutorial_M2_Step_by_Step_Counter_6", "=", "1" ] }
							],

							"actions":
							[
								{ "a": "RevealFogOfWar", "p": [ "172", "1" ] },	
								{ "a": "CurrentSubQuestDone" },	
								{ "a": "Guide", "p": [ "tutorial_M2_6" ] }
							]
						}
					]
				},
				{
					"sid": "step_5",
					"activeOnStart": false,
					
					"name": "Зайдите во второй портал портал",

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "Tutorial_M2_Step_by_Step_Counter_7", "=", "1" ] }
							],

							"actions":
							[
								{ "a": "RevealFogOfWar", "p": [ "871", "2" ] },	
								{ "a": "CurrentSubQuestDone" },	
								{ "a": "Guide", "p": [ "tutorial_M2_7" ] }
							]
						}
					]
				},
				{
					"sid": "step_6",
					"activeOnStart": false,
					
					"name": "Уничтожте отряд охраняющий артефакты и заберите их",

					"triggers":
					[
						{
							"conditionsLogic": "And",

							"conditions":
							[
								{ "c": "ItemOwnHero", "p": [ "paupers_glory_straw_hat_artifact", "human_hero_3" ] },
								{ "c": "ItemOwnHero", "p": [ "paupers_glory_dumb_club_artifact", "human_hero_3" ] }
							],

							"actions":
							[
								{ "a": "CurrentSubQuestDone" },	
								{ "a": "Guide", "p": [ "tutorial_M2_8" ] }
							]
						}
					]
				},
				{
					"sid": "step_7",
					"activeOnStart": false,
					
					"name": "Вернитесь назад через портал",

					"triggers":
					[
						{
							"conditionsLogic": "And",

							"conditions":
							[
								
							],

							"actions":
							[
								{ "a": "CurrentSubQuestDone" }
							]
						}
					]
				},
				{
					"sid": "step_8",
					"activeOnStart": false,
					
					"name": "Вернитесь назад через портал и соберите алхимическую пыль для завершения миссии",

					"triggers":
					[
						{
							"conditionsLogic": "And",

							"conditions":
							[
								{ "c": "ResCounter", "p": [ "dust", ">", "30" ] }
							],

							"actions":
							[
								{ "a": "CurrentSubQuestDone" },	
								{ "a": "Guide", "p": [ "tutorial_M2_8" ] }
							]
						}
					]
				}
			]
		}
	]
}