﻿{
	"counters":
	[
		{ "sid": "outpost_quest", 			"value": 0, "comment": "0 = игрок еще не нашел замок, 1 = игрок начал квест на отстройку, 2 = игрок закончил квест" },
		{ "sid": "trogl_dwelling", 			"value": 0, "comment": "1 = игрок захватил двеллинг" },
		{ "sid": "spy_dwelling", 			"value": 0, "comment": "1 = игрок захватил двеллинг" },
		{ "sid": "dancer_dwelling", 		"value": 0, "comment": "1 = игрок захватил двеллинг" },

		{ "sid": "m2_main_quest", 			"value": 0, "comment": "1 = игрок ищет город сильван, 2 = игрок посетил разрушенный город, 3 = игрок нашел Филакуса, 4 = игрок победил филакуса" },
		{ "sid": "m2_main_quest_finished", 	"value": 0, "comment": "бинарный счетчик для трекинга квестлога" },
		{ "sid": "tethers_visited", 					"comment": "Счетчик, в т.ч. для воспроизведения диалогов вне зависимости от порядка посещения тезеров" },

		{ "sid": "hydra_quest", 						"comment": "0 = квест не начат; 1 = квест начат; 2 = гидры присоединяются, квест закончен; 3 = игрок ушел во вторую половину, квест прерван" },

		{ "sid": "kitten_quest", 						"comment": "0 = квест не начат, 1 = квест начат, 2 = завершен, 3 = провален (игрок ушел дальше, не выполнив)" },
		{ "sid": "kitten_quest_completed", 				"comment": "для взаимодействия с котиками во второй половине карты" },
		{ "sid": "kitten_talked", 						"comment": "Бинарный счетчик, был ли первый разговор с киттенхорном" },
		{ "sid": "kitten_attacked", 					"comment": "Бинарный счетчик, был ли атакован киттенхорн" },
		{ "sid": "kitten_join", 						"comment": "Cчетчик, сколько присоединили котиков" }
	],

	"interruptions":
	[
		{
			"sid": "before_fight",
			"interruption": "BeforeIamVsHero",
			"activeOnStart": true,
			"p": [ "campaign_M2_hero_sylvan" ],

			"actions":
			[
				{ "a": "CounterSet", "p": [ "m2_main_quest", "3" ] },
				{ "a": "Dialog", "p": [ "M2Q1_dial1" ] }
			]
		},
		{
			"sid": "after_fight",
			"interruption": "AfterIamWinVsHero",
			"activeOnStart": true,
			"p": [ "campaign_M2_hero_sylvan" ],

			"actions":
			[
				{ "a": "Dialog", "p": [ "M2Q1_dial2" ] }
			]
		}
	],

	"quests":
	[
		{
			"sid": "intro",
			"hidden": true,

			"comment": "starting dialogue",

			"activeOnStart": true,
			"sharing": "Clone",

			"name": "1",

			"subQuests":
			[	
				{
					"sid": "1",
					"activeOnStart": true,

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "StartTurn", "p": [ "1", "1" ] }
							],

							"actions":
							[								
								{ "a": "SetQuestMarker", "p": [ "ichor", "effects/global_map/quest_mark_silver_01" ] },
								{ "a": "SetQuestMarker", "p": [ "watcher1", "effects/global_map/quest_mark_silver_01" ] },
								{ "a": "SetQuestMarker", "p": [ "ent", "effects/global_map/quest_mark_silver_01" ] },
								{ "a": "SetQuestMarker", "p": [ "faun", "effects/global_map/quest_mark_silver_01" ] },
								{ "a": "SetQuestMarker", "p": [ "druid", "effects/global_map/quest_mark_silver_01" ] },
								{ "a": "SetQuestMarker", "p": [ "spy", "effects/global_map/quest_mark_silver_01" ] },
								{ "a": "SetQuestMarker", "p": [ "kitten1", "effects/global_map/quest_mark_silver_01" ] },
								{ "a": "SetQuestMarker", "p": [ "kitten2", "effects/global_map/quest_mark_silver_01" ] },
								{ "a": "SetQuestMarker", "p": [ "kitten3", "effects/global_map/quest_mark_silver_01" ] },
								{ "a": "SetQuestMarker", "p": [ "canyon_guard", "effects/global_map/quest_mark_silver_01" ] },
								{ "a": "SetQuestMarker", "p": [ "locust", "effects/global_map/quest_mark_silver_01" ] },
								{ "a": "SetQuestMarker", "p": [ "hydra1", "effects/global_map/quest_mark_silver_01" ] },
								{ "a": "SetQuestMarker", "p": [ "hydra2", "effects/global_map/quest_mark_silver_01" ] },

								{ "a": "DisableAiHero", "p": [ "campaign_M2_hero_sylvan" ] },

								{ "a": "Dialog", "p": [ "M2_intro_dial1" ] }
							]
						}
					]
				},
				{
					"sid": "2",
					"activeOnStart": true,
					"comment": "difficulty settings",

					"triggers":
					[
						{
							"conditionsLogic": "And",

							"conditions":
							[
								{ "c": "StartTurn", "p": [ "1", "1" ] },
								{ "c": "Difficulty", "p": [ "0" ] }
							],

							"actions":
							[
								{ "a": "ChangeManaHero", "p": [ "campaign_M2_hero_sylvan", "0" ] },
								{ "a": "AddBuffHeroDays", "p": [ "campaign_no_manaRegen_buff", "campaign_M2_hero_sylvan", "999" ] },
								{ "a": "AddBuffHeroDays", "p": [ "campaign_heroStatBuff_easy_2", "campaign_hero_1", "-1" ] }
							]
						},
						{
							"conditionsLogic": "And",

							"conditions":
							[
								{ "c": "StartTurn", "p": [ "1", "1" ] },
								{ "c": "Difficulty", "p": [ "1" ] }
							],

							"actions":
							[
								{ "a": "GiveUnitHero", "p": [ "aqualotl_upg",		"3",	"campaign_M2_hero_sylvan" ] },
								{ "a": "GiveUnitHero", "p": [ "ent_upg_alt",		"4",	"campaign_M2_hero_sylvan" ] },
								{ "a": "GiveUnitHero", "p": [ "twinkle_upg",		"7",	"campaign_M2_hero_sylvan" ] },
								{ "a": "GiveUnitHero", "p": [ "ent_upg",			"5",	"campaign_M2_hero_sylvan" ] },
								{ "a": "GiveUnitHero", "p": [ "twinkle_upg_alt",	"8",	"campaign_M2_hero_sylvan" ] },
								{ "a": "GiveUnitHero", "p": [ "aqualotl_upg_alt",	"2",	"campaign_M2_hero_sylvan" ] },
								{ "a": "ChangeManaHero", "p": [ "campaign_M2_hero_sylvan", "48" ] },
								{ "a": "AddBuffHeroDays", "p": [ "campaign_heroStatBuff_magic_day_1", "campaign_M2_hero_sylvan", "9999" ] },
								{ "a": "AddBuffHeroDays", "p": [ "campaign_heroStatBuff_magic_night_1", "campaign_M2_hero_sylvan", "9999" ] },
								{ "a": "AddBuffHeroDays", "p": [ "campaign_heroStatBuff_magic_space_1", "campaign_M2_hero_sylvan", "9999" ] },
								{ "a": "AddBuffHeroDays", "p": [ "campaign_heroStatBuff_magic_primal_1", "campaign_M2_hero_sylvan", "9999" ] },
								{ "a": "AddBuffHeroDays", "p": [ "campaign_no_manaRegen_buff", "campaign_M2_hero_sylvan", "9999" ] },
								
								{ "a": "GiveStatsHero", "p": [ "offence", "campaign_M2_hero_sylvan", "2" ] },
								{ "a": "GiveStatsHero", "p": [ "defence", "campaign_M2_hero_sylvan", "2" ] },
								{ "a": "GiveStatsHero", "p": [ "spellPower", "campaign_M2_hero_sylvan", "2" ] },
								{ "a": "GiveStatsHero", "p": [ "intelligence", "campaign_M2_hero_sylvan", "2" ] }
							]
						},
						{
							"conditionsLogic": "And",

							"conditions":
							[
								{ "c": "StartTurn", "p": [ "1", "1" ] },
								{ "c": "Difficulty", "p": [ "2" ] }
							],

							"actions":
							[
								{ "a": "GiveUnitHero", "p": [ "aqualotl_upg",		"5",	"campaign_M2_hero_sylvan" ] },
								{ "a": "GiveUnitHero", "p": [ "ent_upg_alt",		"6",	"campaign_M2_hero_sylvan" ] },
								{ "a": "GiveUnitHero", "p": [ "twinkle_upg",		"9",	"campaign_M2_hero_sylvan" ] },
								{ "a": "GiveUnitHero", "p": [ "ent_upg",			"7",	"campaign_M2_hero_sylvan" ] },
								{ "a": "GiveUnitHero", "p": [ "twinkle_upg_alt",	"10",	"campaign_M2_hero_sylvan" ] },
								{ "a": "GiveUnitHero", "p": [ "aqualotl_upg_alt",	"4",	"campaign_M2_hero_sylvan" ] },
								{ "a": "ChangeManaHero", "p": [ "campaign_M2_hero_sylvan", "96" ] },
								{ "a": "AddBuffHeroDays", "p": [ "campaign_heroStatBuff_magic_day_1", "campaign_M2_hero_sylvan", "9999" ] },
								{ "a": "AddBuffHeroDays", "p": [ "campaign_heroStatBuff_magic_night_1", "campaign_M2_hero_sylvan", "9999" ] },
								{ "a": "AddBuffHeroDays", "p": [ "campaign_heroStatBuff_magic_space_1", "campaign_M2_hero_sylvan", "9999" ] },
								{ "a": "AddBuffHeroDays", "p": [ "campaign_heroStatBuff_magic_primal_1", "campaign_M2_hero_sylvan", "9999" ] },
								{ "a": "AddBuffHeroDays", "p": [ "campaign_no_manaRegen_buff", "campaign_M2_hero_sylvan", "9999" ] },
								
								{ "a": "GiveStatsHero", "p": [ "offence", "campaign_M2_hero_sylvan", "4" ] },
								{ "a": "GiveStatsHero", "p": [ "defence", "campaign_M2_hero_sylvan", "4" ] },
								{ "a": "GiveStatsHero", "p": [ "spellPower", "campaign_M2_hero_sylvan", "4" ] },
								{ "a": "GiveStatsHero", "p": [ "intelligence", "campaign_M2_hero_sylvan", "4" ] }
							]
						},
						{
							"conditionsLogic": "And",

							"conditions":
							[
								{ "c": "StartTurn", "p": [ "1", "1" ] },
								{ "c": "Difficulty", "p": [ "3" ] }
							],

							"actions":
							[
								{ "a": "GiveUnitHero", "p": [ "aqualotl_upg",		"7",	"campaign_M2_hero_sylvan" ] },
								{ "a": "GiveUnitHero", "p": [ "ent_upg_alt",		"8",	"campaign_M2_hero_sylvan" ] },
								{ "a": "GiveUnitHero", "p": [ "twinkle_upg",		"11",	"campaign_M2_hero_sylvan" ] },
								{ "a": "GiveUnitHero", "p": [ "ent_upg",			"9",	"campaign_M2_hero_sylvan" ] },
								{ "a": "GiveUnitHero", "p": [ "twinkle_upg_alt",	"12",	"campaign_M2_hero_sylvan" ] },
								{ "a": "GiveUnitHero", "p": [ "aqualotl_upg_alt",	"6",	"campaign_M2_hero_sylvan" ] },
								{ "a": "ChangeManaHero", "p": [ "campaign_M2_hero_sylvan", "192" ] },
								{ "a": "AddBuffHeroDays", "p": [ "campaign_heroStatBuff_magic_day_3", "campaign_M2_hero_sylvan", "9999" ] },
								{ "a": "AddBuffHeroDays", "p": [ "campaign_heroStatBuff_magic_night_3", "campaign_M2_hero_sylvan", "9999" ] },
								{ "a": "AddBuffHeroDays", "p": [ "campaign_heroStatBuff_magic_space_3", "campaign_M2_hero_sylvan", "9999" ] },
								{ "a": "AddBuffHeroDays", "p": [ "campaign_heroStatBuff_magic_primal_3", "campaign_M2_hero_sylvan", "9999" ] },
								{ "a": "AddBuffHeroDays", "p": [ "campaign_no_manaRegen_buff", "campaign_M2_hero_sylvan", "9999" ] },
								
								{ "a": "GiveStatsHero", "p": [ "offence", "campaign_M2_hero_sylvan", "8" ] },
								{ "a": "GiveStatsHero", "p": [ "defence", "campaign_M2_hero_sylvan", "8" ] },
								{ "a": "GiveStatsHero", "p": [ "spellPower", "campaign_M2_hero_sylvan", "8" ] },
								{ "a": "GiveStatsHero", "p": [ "intelligence", "campaign_M2_hero_sylvan", "8" ] }
							]
						}
					]
				},
				{
					"sid": "3",
					"activeOnStart": true,
					"comment": "difficulty settings",

					"triggers":
					[
						{
							"repeat": true,
							"conditionsLogic": "And",

							"conditions":
							[
								{ "c": "StartWeek", "p": [  ] },
								{ "c": "Difficulty", "p": [ "1" ] }
							],

							"actions":
							[
								{ "a": "GiveUnitHero", "p": [ "aqualotl_upg",		"1",	"campaign_M2_hero_sylvan" ] },
								{ "a": "GiveUnitHero", "p": [ "ent_upg_alt",		"1",	"campaign_M2_hero_sylvan" ] },
								{ "a": "GiveUnitHero", "p": [ "twinkle_upg",		"1",	"campaign_M2_hero_sylvan" ] },
								{ "a": "GiveUnitHero", "p": [ "ent_upg",			"1",	"campaign_M2_hero_sylvan" ] },
								{ "a": "GiveUnitHero", "p": [ "twinkle_upg_alt",	"1",	"campaign_M2_hero_sylvan" ] },
								{ "a": "GiveUnitHero", "p": [ "aqualotl_upg_alt",	"1",	"campaign_M2_hero_sylvan" ] }
							]
						},
						{
							"repeat": true,
							"conditionsLogic": "And",

							"conditions":
							[
								{ "c": "StartWeek", "p": [  ] },
								{ "c": "Difficulty", "p": [ "2" ] }
							],

							"actions":
							[
								{ "a": "GiveUnitHero", "p": [ "aqualotl_upg",		"2",	"campaign_M2_hero_sylvan" ] },
								{ "a": "GiveUnitHero", "p": [ "ent_upg_alt",		"2",	"campaign_M2_hero_sylvan" ] },
								{ "a": "GiveUnitHero", "p": [ "twinkle_upg",		"2",	"campaign_M2_hero_sylvan" ] },
								{ "a": "GiveUnitHero", "p": [ "ent_upg",			"2",	"campaign_M2_hero_sylvan" ] },
								{ "a": "GiveUnitHero", "p": [ "twinkle_upg_alt",	"2",	"campaign_M2_hero_sylvan" ] },
								{ "a": "GiveUnitHero", "p": [ "aqualotl_upg_alt",	"2",	"campaign_M2_hero_sylvan" ] }
							]
						},
						{
							"repeat": true,
							"conditionsLogic": "And",

							"conditions":
							[
								{ "c": "StartWeek", "p": [  ] },
								{ "c": "Difficulty", "p": [ "3" ] }
							],

							"actions":
							[
								{ "a": "GiveStatsHero", "p": [ "offence", "campaign_M2_hero_sylvan", "1" ] },
								{ "a": "GiveStatsHero", "p": [ "defence", "campaign_M2_hero_sylvan", "1" ] },
								{ "a": "GiveStatsHero", "p": [ "spellPower", "campaign_M2_hero_sylvan", "1" ] },
								{ "a": "GiveStatsHero", "p": [ "intelligence", "campaign_M2_hero_sylvan", "1" ] },
								
								{ "a": "GiveUnitHero", "p": [ "aqualotl_upg",		"4",	"campaign_M2_hero_sylvan" ] },
								{ "a": "GiveUnitHero", "p": [ "ent_upg_alt",		"4",	"campaign_M2_hero_sylvan" ] },
								{ "a": "GiveUnitHero", "p": [ "twinkle_upg",		"4",	"campaign_M2_hero_sylvan" ] },
								{ "a": "GiveUnitHero", "p": [ "ent_upg",			"4",	"campaign_M2_hero_sylvan" ] },
								{ "a": "GiveUnitHero", "p": [ "twinkle_upg_alt",	"4",	"campaign_M2_hero_sylvan" ] },
								{ "a": "GiveUnitHero", "p": [ "aqualotl_upg_alt",	"4",	"campaign_M2_hero_sylvan" ] }
							]
						}
					]
				}
			]
		},

		{
			"sid": "M2_hero_move_1", 
			"hidden": true, 
			
			"comment": "sylvan hero movement", 
			
			"activeOnStart": true, 
			"sharing": "Ai",

			"subQuests":
			[	
				{ 	
					"sid": "0", 
					"activeOnStart": true,
					"triggers": 
					[ 
						{
							"conditions": 
							[ 
								{ "c": "HeroKill", "p": [ "campaign_M2_hero_sylvan" ] } 
							], 

							"actions": 
							[ 
								{ "a": "NextQuest" }
							] 
						} 
					]
				},
				{
					"sid": "1",
					"activeOnStart": true,

					"triggers": 
					[ 
						{
							"repeat": true, 

							"conditions": 
							[ 
								{ "c": "AnyStartTurn", "p": [ "-1", "-1", "1" ] }
							], 

							"actions": 
							[ 
								{ "a": "HeroToNode", "p": [ "campaign_M2_hero_sylvan", "2855" ] } 
							] 
						},
						{
							"repeat": true, 

							"conditions": 
							[ 
								{ "c": "AnyStartTurn", "p": [ "-1", "-1", "2" ] }
							], 

							"actions": 
							[ 
								{ "a": "HeroToNode", "p": [ "campaign_M2_hero_sylvan", "2731" ] } 
							] 
						},
						{
							"repeat": true, 

							"conditions": 
							[ 
								{ "c": "AnyStartTurn", "p": [ "-1", "-1", "3" ] }
							], 

							"actions": 
							[ 
								{ "a": "HeroToNode", "p": [ "campaign_M2_hero_sylvan", "3373" ] } 
							] 
						},
						{
							"repeat": true, 

							"conditions": 
							[ 
								{ "c": "AnyStartTurn", "p": [ "-1", "-1", "4" ] }
							], 

							"actions": 
							[ 
								{ "a": "HeroToNode", "p": [ "campaign_M2_hero_sylvan", "3114" ] } 
							] 
						},
						{
							"repeat": true, 

							"conditions": 
							[ 
								{ "c": "AnyStartTurn", "p": [ "-1", "-1", "5" ] }
							], 

							"actions": 
							[ 
								{ "a": "HeroToNode", "p": [ "campaign_M2_hero_sylvan", "3056" ] } 
							] 
						},
						{
							"repeat": true, 

							"conditions": 
							[ 
								{ "c": "AnyStartTurn", "p": [ "-1", "-1", "6" ] }
							], 

							"actions": 
							[ 
								{ "a": "HeroToNode", "p": [ "campaign_M2_hero_sylvan", "2604" ] } 
							] 
						},
						{
							"repeat": true, 

							"conditions": 
							[ 
								{ "c": "AnyStartTurn", "p": [ "-1", "-1", "7" ] }
							], 

							"actions": 
							[ 
								{ "a": "HeroToNode", "p": [ "campaign_M2_hero_sylvan", "2798" ] } 
							] 
						} 
					]
				}
			]
		},

		{
			"sid": "Questlog0",
			"main": true,

			"comment": "Квест 'Герои не должны умереть'",

			"activeOnStart": true,
			"sharing": "Clone",

			"name": "quest_name_genericQ0",

			"subQuests":
			[
				{
					"sid": "Questlog0_1",
					"activeOnStart": true,
					
					"name": "quest_sub_M1Q0_1",

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "m2_main_quest_finished", "=", "1" ] }
							],

							"actions":
							[
								{ "a": "CurrentSubQuestDone" }
							]
						},
						{
							"conditions":
							[
								{ "c": "HeroKill", "p": [ "campaign_hero_1" ] }
							],

							"actions":
							[
								{ "a": "GameLose" }
							]
						}
					]
				}
			]
		},
			{
				"sid": "setupQuestlog1",
				"hidden": true,
				"activeOnStart": true,

				"comment": "setup for main quest",

				"sharing": "Clone",

				"subQuests":
				[	
					{
						"sid": "1",
						"activeOnStart": true,
						
						"name": "1",

						"triggers":
						[
							{
								"conditions":
								[
									{ "c": "Counter", "p": [ "m2_main_quest", "=", "1" ] }
								],

								"actions":
								[
									{ "a": "NextQuest", "p": [ "Questlog1" ] }
								]
							}
						]
					}
				]
			},
		{
			"sid": "Questlog1",
			"main": true,

			"comment": "основной квест - 1) найти город сильван, 2) найти лафьюра, 3) посетить 3 тезера",

			"activeOnStart": false,
			"sharing": "Clone",

			"name": "quest_name_M2Q1",
			"desc": "quest_desc_M2Q1",

			"subQuests":
			[	
				{
					"sid": "Questlog1_1",
					"activeOnStart": true,
					
					"comment": "find sylvan city",

					"name": "quest_sub_M2Q1_1",

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "m2_main_quest", "=", "2" ] }
							],

							"actions":
							[
								{ "a": "CurrentSubQuestDone" },
								{ "a": "NextSubQuest", "p": [ "Questlog1_2" ] }
							]
						},
						{
							"conditions":
							[
								{ "c": "NodeRevealed", "p": [ "3624" ] }
							],

							"actions":
							[
								{ "a": "Dialog", "p": [ "M2Q1_dial3" ] }
							]
						}
					]
				},
				{
					"sid": "Questlog1_2",
					
					"comment": "find filacus",
					
					"name": "quest_sub_M2Q1_2",

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "m2_main_quest", "=", "3" ] }
							],

							"actions":
							[
								{ "a": "CurrentSubQuestDone" }
							]
						},
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "m2_main_quest", "=", "4" ] }
							],

							"actions":
							[
								{ "a": "NextSubQuest", "p": [ "Questlog1_3" ] },
								{ "a": "SetActiveVFX", "p": [ "em_tether1", "true" ] },
								{ "a": "SetActiveVFX", "p": [ "em_tether2", "true" ] },
								{ "a": "SetActiveVFX", "p": [ "em_tether3", "true" ] },
								{ "a": "RevealFogOfWar", "p": [ "3894", "1" ] },
								{ "a": "RevealFogOfWar", "p": [ "1967", "1" ] },
								{ "a": "RevealFogOfWar", "p": [ "240", "1" ] }
							]
						}
					]
				},
				{
					"sid": "Questlog1_3",
					
					"comment": "clear 3 tethers",
					
					"name": "quest_sub_M2Q1_3",

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "tethers_visited", "=", "3" ] }
							],

							"actions":
							[
								{ "a": "CurrentSubQuestDone" }
							]
						}
					]
				}
			]
		},
			{
				"sid": "supportQuestlog1_1",	
				"hidden": true,
				"activeOnStart": true,

				"comment": "сабквест по вызову диалогов при контакте с тезерами",

				"sharing": "Clone",

				"subQuests":
				[
					{
						"sid": "1",
						"activeOnStart": true,
						
						"name": "1",

						"triggers":
						[
							{
								"conditions":
								[
									{ "c": "Counter", "p": [ "tethers_visited", "=", "1" ] }
								],

								"actions":
								[
									{ "a": "Dialog", "p": [ "M2Q1_dial4" ] }
								]
							}
						]
					},
					{
						"sid": "2",
						"activeOnStart": true,
						
						"name": "2",

						"triggers":
						[
							{
								"conditions":
								[
									{ "c": "Counter", "p": [ "tethers_visited", "=", "2" ] }
								],

								"actions":
								[
									{ "a": "Dialog", "p": [ "M2Q1_dial5" ] }
								]
							}
						]
					},
					{
						"sid": "3",
						"activeOnStart": true,
						
						"name": "3",

						"triggers":
						[
							{
								"conditions":
								[
									{ "c": "Counter", "p": [ "tethers_visited", "=", "3" ] }
								],

								"actions":
								[
									{ "a": "Dialog", "p": [ "M2Q1_dial6" ] }
								]
							}
						]
					}
				]
			},
			{
				"sid": "supportQuestlog1_2",	
				"hidden": true,
				"activeOnStart": true,

				"comment": "сабквест, отсекающий предыдущую половину карты после появления обвала",

				"sharing": "Clone",

				"subQuests":
				[
					{
						"sid": "1",
						"activeOnStart": true,

						"triggers":
						[
							{
								"conditions": 
								[ 
									{ "c": "Counter", "p": [ "m2_main_quest", "=", "4" ] } 
								],

								"actions": 
								[
									{ "a": "MoveCameraToSelectHero" },
									{ "a": "LoseObject", "p": [ "crystal_mine1" ] },
									{ "a": "LoseObject", "p": [ "crystal_mine2" ] },
									{ "a": "LoseObject", "p": [ "crystal_mine3" ] },
									{ "a": "LoseObject", "p": [ "gold_mine" ] },
									{ "a": "LoseObject", "p": [ "dwelling1" ] },
									{ "a": "LoseObject", "p": [ "dwelling2" ] },
									{ "a": "LoseObject", "p": [ "dwelling3" ] },
									{ "a": "LoseObject", "p": [ "outpost" ] },
									{ "a": "RemoveRes", "p": [ "wood","999" ] },
									{ "a": "RemoveRes", "p": [ "ore","999" ] },
									{ "a": "RemoveRes", "p": [ "crystals","999" ] },
									{ "a": "RemoveRes", "p": [ "mercury","999" ] },
									{ "a": "RemoveRes", "p": [ "gemstones","999" ] },
									{ "a": "RemoveRes", "p": [ "dust","999" ] },
									{ "a": "RemoveRes", "p": [ "gold","9999999" ] },
									{ "a": "CounterSet", "p": [ "outpost_quest", "2" ] },
									{ "a": "CounterSet", "p": [ "kitten_quest", "3" ] },
									{ "a": "CounterSet", "p": [ "hydra_quest", "3" ] },
									{ "a": "SetActiveQuestMarker", "p": [ "spy", "false" ] },
									{ "a": "SetActiveQuestMarker", "p": [ "locust", "false" ] },
									{ "a": "SetActiveQuestMarker", "p": [ "canyon_guard", "false" ] },
									{ "a": "SetActiveQuestMarker", "p": [ "ichor", "false" ] },
									{ "a": "SetActiveQuestMarker", "p": [ "hydra1", "false" ] },
									{ "a": "SetActiveQuestMarker", "p": [ "hydra2", "false" ] },
									{ "a": "SetActiveQuestMarker", "p": [ "watcher1", "false" ] },
									{ "a": "SetActiveQuestMarker", "p": [ "faun", "false" ] }
								]
							}
						]
					}
				]
			},
			{
				"sid": "supportQuestlog1_3",	
				"hidden": true,
				"activeOnStart": true,

				"comment": "дополнительные диалоги",

				"sharing": "Clone",

				"subQuests":
				[
					{
						"sid": "1",
						"activeOnStart": true,

						"triggers":
						[
							{
								"conditions": 
								[ 
									{ "c": "SquadKill", "p": [ "forest_guard" ] } 
								],

								"actions": 
								[
									{ "a": "Dialog", "p": [ "M2_forest_dial1" ] }
								]
							}
						]
					}
				]
			},

			{
				"sid": "setupQuestlog3",
				"hidden": true,
				"activeOnStart": true,
	
				"comment": "setup kittenhorn - crystals quest",
	
				"sharing": "Clone",
	
				"subQuests":
				[	
					{
						"sid": "1",
						"activeOnStart": true,
	
						"triggers":
						[
							{
								"conditions":
								[
									{ "c": "Counter", "p": [ "kitten_attacked", ">", "0" ] }
								],
	
								"actions":
								[
									{ "a": "EntityActionsOff", "p": [ "kitten1" ] },
									{ "a": "EntityActionsOff", "p": [ "kitten2" ] },
									{ "a": "EntityActionsOff", "p": [ "kitten3" ] },
									{ "a": "EntityActionsOff", "p": [ "kitten4" ] },
									{ "a": "EntityActionsOff", "p": [ "kitten5" ] },
									{ "a": "EntityActionsOff", "p": [ "kitten6" ] },
									{ "a": "EntityActionsOff", "p": [ "kitten11" ] },
									{ "a": "EntityActionsOff", "p": [ "kitten12" ] },
									{ "a": "EntityActionsOff", "p": [ "kitten13" ] },
									{ "a": "EntityActionsOff", "p": [ "kitten14" ] },

									{ "a": "SetActiveQuestMarker", "p": [ "kitten1", "false" ] },
									{ "a": "SetActiveQuestMarker", "p": [ "kitten2", "false" ] },
									{ "a": "SetActiveQuestMarker", "p": [ "kitten3", "false" ] },
									{ "a": "NextQuest" }
								]
							},
							{
								"conditions":
								[
									{ "c": "Counter", "p": [ "kitten_quest", "=", "2" ] }
								],

								"actions":
								[
									{ "a": "CounterSet", "p": [ "kitten_quest_completed", "1" ] },
									
									{ "a": "SetQuestMarker", "p": [ "kitten11", "effects/global_map/quest_mark_silver_01" ] },
									{ "a": "SetQuestMarker", "p": [ "kitten12", "effects/global_map/quest_mark_silver_01" ] },
									{ "a": "SetQuestMarker", "p": [ "kitten13", "effects/global_map/quest_mark_silver_01" ] },
									{ "a": "SetQuestMarker", "p": [ "kitten14", "effects/global_map/quest_mark_silver_01" ] },
									{ "a": "NextQuest" }
								]
							},
							{
								"conditions":
								[
									{ "c": "Counter", "p": [ "kitten_quest", "=", "1" ] }
								],
	
								"actions":
								[
									{ "a": "NextQuest", "p": [ "Questlog3" ] }
								]
							}
						]
					}
				]
			},
		{
			"sid": "Questlog3",
			"activeOnStart": false,

			"comment": "Kittenhorn Quest - bring them 15 crystals",

			"name": "quest_name_M2Q3",
			"desc": "quest_desc_M2Q3",

			"sharing": "Clone",

			"subQuests":
			[	
				{
					"sid": "Questlog3_1",
					"activeOnStart": true,
					
					"name": "quest_sub_M2Q3_1",

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "kitten_attacked", ">", "0" ] }
							],

							"actions":
							[
								{ "a": "EntityActionsOff", "p": [ "kitten1" ] },
								{ "a": "EntityActionsOff", "p": [ "kitten2" ] },
								{ "a": "EntityActionsOff", "p": [ "kitten3" ] },
								{ "a": "EntityActionsOff", "p": [ "kitten4" ] },
								{ "a": "EntityActionsOff", "p": [ "kitten5" ] },
								{ "a": "EntityActionsOff", "p": [ "kitten6" ] },
								{ "a": "EntityActionsOff", "p": [ "kitten11" ] },
								{ "a": "EntityActionsOff", "p": [ "kitten12" ] },
								{ "a": "EntityActionsOff", "p": [ "kitten13" ] },
								{ "a": "EntityActionsOff", "p": [ "kitten14" ] },

								{ "a": "SetActiveQuestMarker", "p": [ "kitten1", "false" ] },
								{ "a": "SetActiveQuestMarker", "p": [ "kitten2", "false" ] },
								{ "a": "SetActiveQuestMarker", "p": [ "kitten3", "false" ] },
								{ "a": "NextQuest" }
							]
						},
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "kitten_quest", "=", "2" ] }
							],

							"actions":
							[
								{ "a": "CounterSet", "p": [ "kitten_quest_completed", "1" ] },

								{ "a": "SetActiveQuestMarker", "p": [ "kitten1", "false" ] },
								{ "a": "SetActiveQuestMarker", "p": [ "kitten2", "false" ] },
								{ "a": "SetActiveQuestMarker", "p": [ "kitten3", "false" ] },
								
								{ "a": "SetQuestMarker", "p": [ "kitten11", "effects/global_map/quest_mark_silver_01" ] },
								{ "a": "SetQuestMarker", "p": [ "kitten12", "effects/global_map/quest_mark_silver_01" ] },
								{ "a": "SetQuestMarker", "p": [ "kitten13", "effects/global_map/quest_mark_silver_01" ] },
								{ "a": "SetQuestMarker", "p": [ "kitten14", "effects/global_map/quest_mark_silver_01" ] },
								{ "a": "NextQuest" }
							]
						},
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "kitten_quest", "=", "3" ] }
							],

							"actions":
							[
								{ "a": "SetActiveQuestMarker", "p": [ "kitten1", "false" ] },
								{ "a": "SetActiveQuestMarker", "p": [ "kitten2", "false" ] },
								{ "a": "SetActiveQuestMarker", "p": [ "kitten3", "false" ] },
								{ "a": "NextQuest" }
							]
						}
					]
				}
			]
		},

		{
			"sid": "Q4",
			"hidden": true,
			"activeOnStart": true,

			"comment": "Квест с вотчерами",

			"name": "Watcher Quest",
			"sharing": "Clone",

			"subQuests":
			[	
				{
					"sid": "Q4_1",
					"activeOnStart": true,
					
					"name": "1",

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "SquadInteraction", "p": [ "watcher2" ] }
							],

							"actions":
							[
								{ "a": "Dialog", "p": [ "M2Q4_dial2" ] }
							]
						},
						{
							"conditions":
							[
								{ "c": "SquadInteraction", "p": [ "watcher3" ] }
							],

							"actions":
							[
								{ "a": "Dialog", "p": [ "M2Q4_dial3" ] }
							]
						}
					]
				}
			]
		},

			{
				"sid": "setupQuestlog5",
				"hidden": true,
				"activeOnStart": true,

				"comment": "setup for outpost rebuilding quest",

				"sharing": "Clone",

				"subQuests":
				[	
					{
						"sid": "1",
						"activeOnStart": true,
						
						"name": "1",

						"triggers":
						[
							{
								"conditions":
								[
									{ "c": "Counter", "p": [ "outpost_quest", "=", "1" ] }
								],

								"actions":
								[
									{ "a": "SetQuestMarker", "p": [ "dwelling1", "effects/global_map/quest_mark_silver_02" ] },
									{ "a": "SetQuestMarker", "p": [ "dwelling2", "effects/global_map/quest_mark_silver_02" ] },
									{ "a": "SetQuestMarker", "p": [ "dwelling3", "effects/global_map/quest_mark_silver_02" ] },
									{ "a": "NextQuest", "p": [ "Questlog5" ] }
								]
							}
						]
					}
				]
			},
		{
			"sid": "Questlog5",

			"comment": "outpost rebuilding",

			"name": "quest_name_M2Q5",
			"desc": "quest_desc_M2Q5",
			
			"sharing": "Clone",

			"subQuests":
			[	
				{
					"sid": "Questlog5_1",
					"activeOnStart": true,
					
					"name": "quest_sub_M2Q5_1",

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "trogl_dwelling", "=", "1" ] }
							],

							"actions":
							[
								{ "a": "CurrentSubQuestDone" }
							]
						},
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "outpost_quest", "=", "2" ] }
							],

							"actions":
							[
								{ "a": "SetActiveQuestMarker", "p": [ "dwelling1", "false" ] },
								{ "a": "SetActiveQuestMarker", "p": [ "dwelling2", "false" ] },
								{ "a": "SetActiveQuestMarker", "p": [ "dwelling3", "false" ] },
								{ "a": "NextQuest" }
							]
						}
					]
				},
				{
					"sid": "Questlog5_2",
					"activeOnStart": true,
					
					"name": "quest_sub_M2Q5_2",

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "spy_dwelling", "=", "1" ] }
							],

							"actions":
							[
								{ "a": "CurrentSubQuestDone" }
							]
						}
					]
				},
				{
					"sid": "Questlog5_3",
					"activeOnStart": true,
					
					"name": "quest_sub_M2Q5_3",

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "dancer_dwelling", "=", "1" ] }
							],

							"actions":
							[
								{ "a": "CurrentSubQuestDone" }
							]
						}
					]
				}
			]
		},

			{
				"sid": "setupQuestlog6",
				"hidden": true,
				"activeOnStart": true,

				"comment": "setup hydras - crystals quest",

				"sharing": "Clone",

				"subQuests":
				[	
					{
						"sid": "1",
						"activeOnStart": true,

						"triggers":
						[
							{
								"conditions":
								[
									{ "c": "Counter", "p": [ "hydra_quest", "=", "1" ] }
								],

								"actions":
								[
									{ "a": "NextQuest", "p": [ "Questlog6" ] },

									{ "a": "SetQuestMarker", "p": [ "hydra1", "effects/global_map/quest_mark_silver_02" ] },
									{ "a": "SetQuestMarker", "p": [ "hydra2", "effects/global_map/quest_mark_silver_02" ] }
								]
							}
						]
					}
				]
			},
		{
			"sid": "Questlog6",
			"activeOnStart": false,

			"comment": "hydra Quest - bring them 30 crystals",

			"name": "quest_name_M2Q6",

			"sharing": "Clone",

			"subQuests":
			[	
				{
					"sid": "Questlog6_1",
					"activeOnStart": true,
					
					"name": "quest_sub_M2Q6_1",

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "hydra_quest", ">=", "2" ] }
							],

							"actions":
							[
								{ "a": "SetActiveQuestMarker", "p": [ "hydra1", "false" ] },
								{ "a": "SetActiveQuestMarker", "p": [ "hydra2", "false" ] },

								{ "a": "NextQuest" }
							]
						}
					]
				}
			]
		},
		{
			"sid": "achievement_quest",
			"activeOnStart": true,
			"hidden": true,

			"comment": "tracking steam achievements",

			"sharing": "Clone",

			"subQuests":
			[	
				{
					"sid": "1",
					"activeOnStart": true,
					
					"comment": "recruit every kittenhorn squad",

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "kitten_join", "=", "5" ] }
							],

							"actions":
							[
								{ "a": "SetAchievement", "p": [ "achievement_11" ] }
							]
						}
					]
				},
				{
					"sid": "2",
					"activeOnStart": true,
					
					"comment": "recruit infernal hydras",

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "hydra_quest", "=", "2" ] }
							],

							"actions":
							[
								{ "a": "SetAchievement", "p": [ "achievement_25" ] }
							]
						}
					]
				}
			]
		}
	]
}