﻿{
	"counters":
	[
		{
			"sid": "starting_side",
			"value": 0,

			"comment": "0 - игрок начал за людей, 1 - игрок начал за некромантов"
		},
			
		{
			"sid": "found_antagonist",
			"value": 0,

			"comment": "Нашел ли игрок портал к крепости антагониста"
		},
		{
			"sid": "main_quest",
			"value": 0,

			"comment": "0 = квест начат и в процессе, 1 = антагонист побежден"
		},
		{
			"sid": "portal_1_counter",
			"value": 0,

			"comment": "1 = портал посещен"
		},
		{
			"sid": "portal_2_counter",
			"value": 0,

			"comment": "1 = портал посещен"
		},
		{
			"sid": "portal_3_counter",
			"value": 0,

			"comment": "1 = портал посещен"
		},
		{
			"sid": "portal_4_counter",
			"value": 0,

			"comment": "1 = портал посещен"
		},
		{
			"sid": "final_gate_opened",
			"value": 0,

			"comment": "1 = портал открыт"
		},

		{
			"sid": "thant_quest",
			"value": 0,

			"comment": "Квест Танта (только для М9а, полностью отключен в М9б); 0 - не начат; 1 - в процессе; 2 - завершен"
		},
		{
			"sid": "thant_help",
			"value": 0,

			"comment": "Есть ли у игрока в запасе помощь от танта при разрушении усилителя (одноразовая); 0 - еще нет; 1 - да; 2 - уже нет"
		},
		{
			"sid": "total_amplifiers_destroyed",
			"value": 0,

			"comment": "вспомогательный счетчик для последовательного вывода диалогов ДО интеракта с усилителем"
		},
		{
			"sid": "amplifiers_destroyed_by_hand",
			"value": 0,

			"comment": "вспомогательный счетчик для последовательного вывода диалогов ПОСЛЕ победы над охраной усилителя"
		},
		{
			"sid": "amplifier1_destroyed",
			"value": 0,

			"comment": "был ли уже уничтожен усилитель #1"
		},		
		{
			"sid": "amplifier2_destroyed",
			"value": 0,

			"comment": "был ли уже уничтожен усилитель #2"
		},
		{
			"sid": "amplifier3_destroyed",
			"value": 0,

			"comment": "был ли уже уничтожен усилитель #3"
		},

		
		{
			"sid": "angels_quest",
			"value": 0,

			"comment": "трекинг квеста 2b; 0 = не начат; 1 = в процессе; 2 = завершен"
		},
		{
			"sid": "angels_defeated",
			"value": 0,

			"comment": "счетчик побежденных ангелов = счетчик снятых барьеров; 4 = все барьеры сняты, клетка доступна для интеракта"
		},
		{
			"sid": "angel1_defeated",
			"value": 0,

			"comment": "был ли побежден ангел 1"
		},
		{
			"sid": "angel2_defeated",
			"value": 0,

			"comment": "был ли побежден ангел 2"
		},
		{
			"sid": "angel3_defeated",
			"value": 0,

			"comment": "был ли побежден ангел 3"
		},
		{
			"sid": "angel4_defeated",
			"value": 0,

			"comment": "был ли побежден ангел 4"
		},

		{
			"sid": "phoenix_quest",
			"value": 0,

			"comment": "квест с яйцом феникса; 0 - квест не начат; 1 - нужно принести яйцо; 2 - квест закончен; 3 - квест провален"
		},

		{
			"sid": "demonologist_quest",
			"value": 0,

			"comment": "Квест демонолога; 0 - не начат; 1 - поиск дома демонолога; 2 - поиск демона; 3 - квест закончен"
		},
		{
			"sid": "demon_hired",
			"value": 0,

			"comment": "нашел ли игрок способ нанимать демонов или нет"
		},
		{
			"sid": "demon_removed",
			"value": 0,

			"comment": "вспомогательный каунтер для диалога M9Q4_dial4"
		},

		{
			"sid": "forest_quest",
			"value": 0,

			"comment": "квест на защиту / зачистку рощи (Q5); 0 - не начат; 1 - начат за людей; ; 2 - начат за сильван; 3 - убил всех сильван; 4 - люди принесены в жертву, квест завершен; 5 - сдал квест людям, квест завершен"
		},
		{
			"sid": "agreed_with_humans",
			"value": 0,

			"comment": "вспомогательный каунтер, тречит, соглашался ли игрок хоть раз помочь людям"
		},
		{
			"sid": "heard_sylvans_plan",
			"value": 0,

			"comment": "вспомогательный каунтер для скипа повторного объяснения плана с алтарем"
		},
		{
			"sid": "agreed_with_sylvans",
			"value": 0,

			"comment": "вспомогательный каунтер, тречит, соглашался ли игрок хоть раз помочь сильванам"
		},
		{
			"sid": "sylvan_attacked",
			"value": 0,

			"comment": "1 - игрок напал на любого из эльфов в лесу"
		},
		{
			"sid": "sylvan_killed",
			"value": 0,

			"comment": "счетчик побежденных отрядов сильван"
		},
		{
			"sid": "sylvan_captain_seen",
			"value": 0,

			"comment": "вспомогательный флаг для M9Q5_dial11"
		}	
	],

	"interruptions":
	[
		{
			"sid": "before_galthran",
			"interruption": "BeforeIamVsHero",
			"activeOnStart": true,
			"p": [ "campaign_M9_hero_undead_main" ],

			"actions":
			[
				{ "a": "Dialog", "p": [ "M9Q1_dial6" ] }
			]
		},
		{
			"sid": "after_galthran",
			"interruption": "AfterIamWinVsHero",
			"activeOnStart": true,
			"p": [ "campaign_M9_hero_undead_main" ],

			"actions":
			[
				{ "a": "SetActiveVFX", "p": [ "qm_main_keep", "false" ] },
				{ "a": "Dialog", "p": [ "M9Q1_dial7" ] }
			]
		},

		{
			"sid": "before_valentina",
			"interruption": "BeforeIamVsHero",
			"activeOnStart": true,
			"p": [ "campaign_M9_hero_temple_main" ],

			"actions":
			[
				{ "a": "Dialog", "p": [ "M9bQ1_dial6" ] }
			]
		},
		{
			"sid": "after_valentina",
			"interruption": "AfterIamWinVsHero",
			"activeOnStart": true,
			"p": [ "campaign_M9_hero_temple_main" ],

			"actions":
			[
				{ "a": "SetActiveVFX", "p": [ "qm_main_keep", "false" ] },
				{ "a": "Dialog", "p": [ "M9bQ1_dial7" ] }
			]
		},

		{
			"sid": "before_angel1",
			"interruption": "BeforeIamVsHero",
			"activeOnStart": true,
			"p": [ "campaign_M9_hero_temple_1" ],

			"actions":
			[
				{ "a": "Dialog", "p": [ "M9bQ2_dial1a" ] },
				
				{ "a": "DisableInterruption", "p": [ "before_angel1" ] }
			]
		},
		{
			"sid": "after_angel1",
			"interruption": "AfterIamWinVsHero",
			"activeOnStart": true,
			"p": [ "campaign_M9_hero_temple_1" ],

			"actions":
			[
				{ "a": "CounterSet", "p": [ "angel1_defeated", "1" ] },
				{ "a": "CounterPlus", "p": [ "angels_defeated", "1" ] },

				{ "a": "DisableInterruption", "p": [ "after_angel1" ] }
			]
		},
		{
			"sid": "before_angel2",
			"interruption": "BeforeIamVsHero",
			"activeOnStart": true,
			"p": [ "campaign_M9_hero_temple_2" ],

			"actions":
			[
				{ "a": "Dialog", "p": [ "M9bQ2_dial2a" ] },

				{ "a": "DisableInterruption", "p": [ "before_angel2" ] }
			]
		},
		{
			"sid": "after_angel2",
			"interruption": "AfterIamWinVsHero",
			"activeOnStart": true,
			"p": [ "campaign_M9_hero_temple_2" ],

			"actions":
			[
				{ "a": "CounterSet", "p": [ "angel2_defeated", "1" ] },
				{ "a": "CounterPlus", "p": [ "angels_defeated", "1" ] },

				{ "a": "DisableInterruption", "p": [ "after_angel2" ] }
			]
		},
		{
			"sid": "before_angel3",
			"interruption": "BeforeIamVsHero",
			"activeOnStart": true,
			"p": [ "campaign_M9_hero_temple_3" ],

			"actions":
			[
				{ "a": "Dialog", "p": [ "M9bQ2_dial3a" ] },
				
				{ "a": "DisableInterruption", "p": [ "before_angel3" ] }
			]
		},
		{
			"sid": "after_angel3",
			"interruption": "AfterIamWinVsHero",
			"activeOnStart": true,
			"p": [ "campaign_M9_hero_temple_3" ],

			"actions":
			[
				{ "a": "CounterSet", "p": [ "angel3_defeated", "1" ] },
				{ "a": "CounterPlus", "p": [ "angels_defeated", "1" ] },

				{ "a": "DisableInterruption", "p": [ "after_angel3" ] }
			]
		},
		{
			"sid": "before_angel4",
			"interruption": "BeforeIamVsHero",
			"activeOnStart": true,
			"p": [ "campaign_M9_hero_temple_4" ],

			"actions":
			[
				{ "a": "Dialog", "p": [ "M9bQ2_dial4a" ] },

				{ "a": "DisableInterruption", "p": [ "before_angel4" ] }
			]
		},
		{
			"sid": "after_angel4",
			"interruption": "AfterIamWinVsHero",
			"activeOnStart": true,
			"p": [ "campaign_M9_hero_temple_4" ],

			"actions":
			[
				{ "a": "CounterSet", "p": [ "angel4_defeated", "1" ] },
				{ "a": "CounterPlus", "p": [ "angels_defeated", "1" ] },

				{ "a": "DisableInterruption", "p": [ "after_angel4" ] }
			]
		}
	],

	"quests":
	[
		{
			"sid": "intro",
			"hidden": true,

			"comment": "intro",

			"activeOnStart": true,
			"name": "1",
			"sharing": "Clone",

			"subQuests":
			[	
				{
					"sid": "1",
					"activeOnStart": true,

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "StartTurn", "p": [ "1", "1" ] } 
							],

							"actions":
							[
								{ "a": "Dialog", "p": [ "M9bQ1_dial1" ] }
							]
						},
						{
							"conditions":
							[
								{ "c": "StartTurn", "p": [ "1", "1" ] } 
							],

							"actions":
							[
								{ "a": "CounterSet", "p": [ "starting_side", "1" ] },

								{ "a": "CounterSet", "p": [ "demonologist_quest", "0" ] },
								{ "a": "CounterSet", "p": [ "sylvan_attacked", "0" ] },
								{ "a": "CounterSet", "p": [ "amplifier1_destroyed", "0" ] },
								{ "a": "CounterSet", "p": [ "amplifier2_destroyed", "0" ] },
								{ "a": "CounterSet", "p": [ "amplifier3_destroyed", "0" ] }
							]
						},
						{
							"conditions":
							[
								{ "c": "StartTurn", "p": [ "1", "1" ] } 
							],

							"actions":
							[
								{ "a": "DisableAiHero", "p": [ "campaign_M9_hero_temple_main" ] },
								{ "a": "HeroToNode", "p": [ "campaign_M9_hero_temple_main", "4848" ] },
								{ "a": "RevealFogOfWar", "p": [ "4943", "2" ] }
							]
						},
						{
							"conditions":
							[
								{ "c": "StartTurn", "p": [ "1", "1" ] } 
							],

							"actions":
							[
								{ "a": "CreateVFX", "p": [ "fx_quest_mark_gold_01", "4848", "false", "true", "qm_main_keep" ] },
								{ "a": "CreateVFX", "p": [ "fx_quest_mark_silver_01", "2433", "false", "true", "qm_phoenix" ] },
								{ "a": "SetQuestMarker", "p": [ "sylvan_grove", "effects/global_map/quest_mark_silver_01" ] },
								{ "a": "SetQuestMarker", "p": [ "human_grove", "effects/global_map/quest_mark_silver_01" ] }
							]
						},
						{
							"conditions":
							[
								{ "c": "StartTurn", "p": [ "1", "1" ] } 
							],

							"actions":
							[
								{ "a": "AiBanArea", "p": [ "7789" ] },
								{ "a": "AiBanArea", "p": [ "8524" ] },
								{ "a": "AiBanArea", "p": [ "2505" ] },
								{ "a": "AiBanArea", "p": [ "1331" ] },

								{ "a": "AiBanArea", "p": [ "4754" ] },
								{ "a": "AiBanArea", "p": [ "4771" ] },
								{ "a": "AiBanArea", "p": [ "4174" ] },
								{ "a": "AiBanArea", "p": [ "4166" ] },
								{ "a": "AiSetStartAreas", "p": [ ] }
							]
						}
					]
				},
				{
					"sid": "2",
					"activeOnStart": true,
					"comment": "difficulty settings",

					"triggers":
					[
						{
							"conditionsLogic": "And",

							"conditions":
							[
								{ "c": "StartTurn", "p": [ "1", "1" ] },
								{ "c": "Difficulty", "p": [ "0" ] }
							],

							"actions":
							[
								{ "a": "AddBuffHeroDays", "p": [ "campaign_heroStatBuff_easy_enemy_quarter", "campaign_M9_hero_temple_1", "-1" ] },
								{ "a": "AddBuffHeroDays", "p": [ "campaign_heroStatBuff_easy_enemy_quarter", "campaign_M9_hero_temple_2", "-1" ] },
								{ "a": "AddBuffHeroDays", "p": [ "campaign_heroStatBuff_easy_enemy_quarter", "campaign_M9_hero_temple_3", "-1" ] },
								{ "a": "AddBuffHeroDays", "p": [ "campaign_heroStatBuff_easy_enemy_quarter", "campaign_M9_hero_temple_4", "-1" ] },
								{ "a": "AddBuffHeroDays", "p": [ "campaign_heroStatBuff_easy_3", "campaign_hero_1", "-1" ] },
								{ "a": "AddBuffHeroDays", "p": [ "campaign_heroStatBuff_easy_3", "campaign_hero_2", "-1" ] },
								{ "a": "AddBuffHeroDays", "p": [ "campaign_heroStatBuff_easy_3", "campaign_hero_4", "-1" ] }
							]
						},
						{
							"conditionsLogic": "And",

							"conditions":
							[
								{ "c": "StartTurn", "p": [ "1", "1" ] },
								{ "c": "Difficulty", "p": [ "1" ] }
							],

							"actions":
							[
								{ "a": "GiveUnitHero", "p": [ "esquire",		"18",	"campaign_M9_hero_temple_1" ] },
								{ "a": "GiveUnitHero", "p": [ "crossbowman",	"13",	"campaign_M9_hero_temple_1" ] },
								{ "a": "GiveUnitHero", "p": [ "griffin",		"6",	"campaign_M9_hero_temple_1" ] },
								
								{ "a": "GiveUnitHero", "p": [ "esquire",		"18",	"campaign_M9_hero_temple_2" ] },
								{ "a": "GiveUnitHero", "p": [ "crossbowman",	"13",	"campaign_M9_hero_temple_2" ] },
								{ "a": "GiveUnitHero", "p": [ "griffin",		"6",	"campaign_M9_hero_temple_2" ] },
								
								{ "a": "GiveUnitHero", "p": [ "esquire",		"18",	"campaign_M9_hero_temple_3" ] },
								{ "a": "GiveUnitHero", "p": [ "crossbowman",	"13",	"campaign_M9_hero_temple_3" ] },
								{ "a": "GiveUnitHero", "p": [ "griffin",		"6",	"campaign_M9_hero_temple_3" ] },
								
								{ "a": "GiveUnitHero", "p": [ "esquire",		"18",	"campaign_M9_hero_temple_4" ] },
								{ "a": "GiveUnitHero", "p": [ "crossbowman",	"13",	"campaign_M9_hero_temple_4" ] },
								{ "a": "GiveUnitHero", "p": [ "griffin",		"6",	"campaign_M9_hero_temple_4" ] },
								
								{ "a": "GiveStatsHero", "p": [ "offence", "campaign_M9_hero_temple_1", "2" ] }, { "a": "GiveStatsHero", "p": [ "defence", "campaign_M9_hero_temple_1", "2" ] }, { "a": "GiveStatsHero", "p": [ "spellPower", "campaign_M9_hero_temple_1", "2" ] }, { "a": "GiveStatsHero", "p": [ "intelligence", "campaign_M9_hero_temple_1", "2" ] },
								{ "a": "GiveStatsHero", "p": [ "offence", "campaign_M9_hero_temple_2", "2" ] }, { "a": "GiveStatsHero", "p": [ "defence", "campaign_M9_hero_temple_2", "2" ] }, { "a": "GiveStatsHero", "p": [ "spellPower", "campaign_M9_hero_temple_2", "2" ] }, { "a": "GiveStatsHero", "p": [ "intelligence", "campaign_M9_hero_temple_2", "2" ] },
								{ "a": "GiveStatsHero", "p": [ "offence", "campaign_M9_hero_temple_3", "2" ] }, { "a": "GiveStatsHero", "p": [ "defence", "campaign_M9_hero_temple_3", "2" ] }, { "a": "GiveStatsHero", "p": [ "spellPower", "campaign_M9_hero_temple_3", "2" ] }, { "a": "GiveStatsHero", "p": [ "intelligence", "campaign_M9_hero_temple_3", "2" ] },
								{ "a": "GiveStatsHero", "p": [ "offence", "campaign_M9_hero_temple_4", "2" ] }, { "a": "GiveStatsHero", "p": [ "defence", "campaign_M9_hero_temple_4", "2" ] }, { "a": "GiveStatsHero", "p": [ "spellPower", "campaign_M9_hero_temple_4", "2" ] }, { "a": "GiveStatsHero", "p": [ "intelligence", "campaign_M9_hero_temple_4", "2" ] },
								
								{ "a": "AddBuffHeroDays", "p": [ "campaign_heroStatBuff_campaign_M9_hero_0", 	"campaign_M9_hero_temple_1", "9999" ] },
								{ "a": "AddBuffHeroDays", "p": [ "campaign_heroStatBuff_campaign_M9_hero_0", 	"campaign_M9_hero_temple_2", "9999" ] },
								{ "a": "AddBuffHeroDays", "p": [ "campaign_heroStatBuff_campaign_M9_hero_0", 	"campaign_M9_hero_temple_3", "9999" ] },
								{ "a": "AddBuffHeroDays", "p": [ "campaign_heroStatBuff_campaign_M9_hero_0", 	"campaign_M9_hero_temple_4", "9999" ] },
								
								{ "a": "GiveUnitHero", "p": [ "esquire_upg_alt",			"40",	"campaign_M9_hero_temple_main" ] },
								{ "a": "GiveUnitHero", "p": [ "crossbowman_upg",			"32",	"campaign_M9_hero_temple_main" ] },
								{ "a": "GiveUnitHero", "p": [ "wasp_upg",					"9",	"campaign_M9_hero_temple_main" ] },
								{ "a": "GiveUnitHero", "p": [ "jaw_upg",					"5",	"campaign_M9_hero_temple_main" ] },
								{ "a": "GiveUnitHero", "p": [ "sunlight_cavalry_upg_alt",	"6",	"campaign_M9_hero_temple_main" ] },
								{ "a": "GiveUnitHero", "p": [ "olgoi_upg",					"4",	"campaign_M9_hero_temple_main" ] },
								{ "a": "GiveUnitHero", "p": [ "angel",						"2",	"campaign_M9_hero_temple_main" ] },

								{ "a": "GiveStatsHero", "p": [ "offence", "campaign_M9_hero_temple_main", "4" ] }, { "a": "GiveStatsHero", "p": [ "defence", "campaign_M9_hero_temple_main", "4" ] }, { "a": "GiveStatsHero", "p": [ "spellPower", "campaign_M9_hero_temple_main", "4" ] }, { "a": "GiveStatsHero", "p": [ "intelligence", "campaign_M9_hero_temple_main", "4" ] },

								{ "a": "CreateBuildingCity", "p": [ "Build_Wall", "1", "enemy_city" ] },
								{ "a": "CreateBuildingCity", "p": [ "Build_Tier_1", "1", "enemy_city" ] },
								{ "a": "CreateBuildingCity", "p": [ "Build_Tier_2", "1", "enemy_city" ] },
								{ "a": "CreateBuildingCity", "p": [ "Build_Tier_3", "1", "enemy_city" ] }
							]
						},
						{
							"conditionsLogic": "And",

							"conditions":
							[
								{ "c": "StartTurn", "p": [ "1", "1" ] },
								{ "c": "Difficulty", "p": [ "2" ] }
							],

							"actions":
							[
								{ "a": "GiveUnitHero", "p": [ "esquire",		"36",	"campaign_M9_hero_temple_1" ] },
								{ "a": "GiveUnitHero", "p": [ "crossbowman",	"26",	"campaign_M9_hero_temple_1" ] },
								{ "a": "GiveUnitHero", "p": [ "griffin",		"12",	"campaign_M9_hero_temple_1" ] },
								{ "a": "GiveUnitHero", "p": [ "lightweaver",	"6",	"campaign_M9_hero_temple_1" ] },
								
								{ "a": "GiveUnitHero", "p": [ "esquire",		"36",	"campaign_M9_hero_temple_2" ] },
								{ "a": "GiveUnitHero", "p": [ "crossbowman",	"26",	"campaign_M9_hero_temple_2" ] },
								{ "a": "GiveUnitHero", "p": [ "griffin",		"12",	"campaign_M9_hero_temple_2" ] },
								{ "a": "GiveUnitHero", "p": [ "lightweaver",	"6",	"campaign_M9_hero_temple_2" ] },
								
								{ "a": "GiveUnitHero", "p": [ "esquire",		"36",	"campaign_M9_hero_temple_3" ] },
								{ "a": "GiveUnitHero", "p": [ "crossbowman",	"26",	"campaign_M9_hero_temple_3" ] },
								{ "a": "GiveUnitHero", "p": [ "griffin",		"12",	"campaign_M9_hero_temple_3" ] },
								{ "a": "GiveUnitHero", "p": [ "lightweaver",	"6",	"campaign_M9_hero_temple_3" ] },
								
								{ "a": "GiveUnitHero", "p": [ "esquire",		"36",	"campaign_M9_hero_temple_4" ] },
								{ "a": "GiveUnitHero", "p": [ "crossbowman",	"26",	"campaign_M9_hero_temple_4" ] },
								{ "a": "GiveUnitHero", "p": [ "griffin",		"12",	"campaign_M9_hero_temple_4" ] },
								{ "a": "GiveUnitHero", "p": [ "lightweaver",	"6",	"campaign_M9_hero_temple_4" ] },
								
								{ "a": "GiveStatsHero", "p": [ "offence", "campaign_M9_hero_temple_1", "4" ] }, { "a": "GiveStatsHero", "p": [ "defence", "campaign_M9_hero_temple_1", "4" ] }, { "a": "GiveStatsHero", "p": [ "spellPower", "campaign_M9_hero_temple_1", "4" ] }, { "a": "GiveStatsHero", "p": [ "intelligence", "campaign_M9_hero_temple_1", "4" ] },
								{ "a": "GiveStatsHero", "p": [ "offence", "campaign_M9_hero_temple_2", "4" ] }, { "a": "GiveStatsHero", "p": [ "defence", "campaign_M9_hero_temple_2", "4" ] }, { "a": "GiveStatsHero", "p": [ "spellPower", "campaign_M9_hero_temple_2", "4" ] }, { "a": "GiveStatsHero", "p": [ "intelligence", "campaign_M9_hero_temple_2", "4" ] },
								{ "a": "GiveStatsHero", "p": [ "offence", "campaign_M9_hero_temple_3", "4" ] }, { "a": "GiveStatsHero", "p": [ "defence", "campaign_M9_hero_temple_3", "4" ] }, { "a": "GiveStatsHero", "p": [ "spellPower", "campaign_M9_hero_temple_3", "4" ] }, { "a": "GiveStatsHero", "p": [ "intelligence", "campaign_M9_hero_temple_3", "4" ] },
								{ "a": "GiveStatsHero", "p": [ "offence", "campaign_M9_hero_temple_4", "4" ] }, { "a": "GiveStatsHero", "p": [ "defence", "campaign_M9_hero_temple_4", "4" ] }, { "a": "GiveStatsHero", "p": [ "spellPower", "campaign_M9_hero_temple_4", "4" ] }, { "a": "GiveStatsHero", "p": [ "intelligence", "campaign_M9_hero_temple_4", "4" ] },
								
								{ "a": "AddBuffHeroDays", "p": [ "campaign_heroStatBuff_campaign_M9_hero_1", 	"campaign_M9_hero_temple_1", "9999" ] },
								{ "a": "AddBuffHeroDays", "p": [ "campaign_heroStatBuff_campaign_M9_hero_1", 	"campaign_M9_hero_temple_2", "9999" ] },
								{ "a": "AddBuffHeroDays", "p": [ "campaign_heroStatBuff_campaign_M9_hero_1", 	"campaign_M9_hero_temple_3", "9999" ] },
								{ "a": "AddBuffHeroDays", "p": [ "campaign_heroStatBuff_campaign_M9_hero_1", 	"campaign_M9_hero_temple_4", "9999" ] },
								
								{ "a": "GiveUnitHero", "p": [ "esquire_upg_alt",			"80",	"campaign_M9_hero_temple_main" ] },
								{ "a": "GiveUnitHero", "p": [ "crossbowman_upg",			"64",	"campaign_M9_hero_temple_main" ] },
								{ "a": "GiveUnitHero", "p": [ "wasp_upg",					"18",	"campaign_M9_hero_temple_main" ] },
								{ "a": "GiveUnitHero", "p": [ "jaw_upg",					"10",	"campaign_M9_hero_temple_main" ] },
								{ "a": "GiveUnitHero", "p": [ "sunlight_cavalry_upg_alt",	"12",	"campaign_M9_hero_temple_main" ] },
								{ "a": "GiveUnitHero", "p": [ "olgoi_upg",					"8",	"campaign_M9_hero_temple_main" ] },
								{ "a": "GiveUnitHero", "p": [ "angel",						"4",	"campaign_M9_hero_temple_main" ] },

								{ "a": "GiveStatsHero", "p": [ "offence", "campaign_M9_hero_temple_main", "8" ] }, { "a": "GiveStatsHero", "p": [ "defence", "campaign_M9_hero_temple_main", "8" ] }, { "a": "GiveStatsHero", "p": [ "spellPower", "campaign_M9_hero_temple_main", "8" ] }, { "a": "GiveStatsHero", "p": [ "intelligence", "campaign_M9_hero_temple_main", "8" ] },

								{ "a": "CreateBuildingCity", "p": [ "Build_Wall", "1", "enemy_city" ] },
								{ "a": "CreateBuildingCity", "p": [ "Build_Wall", "2", "enemy_city" ] },
								{ "a": "CreateBuildingCity", "p": [ "Build_Tier_1", "2", "enemy_city" ] },
								{ "a": "CreateBuildingCity", "p": [ "Build_Tier_2", "1", "enemy_city" ] },
								{ "a": "CreateBuildingCity", "p": [ "Build_Tier_3", "1", "enemy_city" ] },
								{ "a": "CreateBuildingCity", "p": [ "Build_Tier_4", "1", "enemy_city" ] }
							]
						},
						{
							"conditionsLogic": "And",

							"conditions":
							[
								{ "c": "StartTurn", "p": [ "1", "1" ] },
								{ "c": "Difficulty", "p": [ "3" ] }
							],

							"actions":
							[
								{ "a": "GiveUnitHero", "p": [ "esquire",			"36",	"campaign_M9_hero_temple_1" ] },
								{ "a": "GiveUnitHero", "p": [ "crossbowman",		"26",	"campaign_M9_hero_temple_1" ] },
								{ "a": "GiveUnitHero", "p": [ "griffin",			"12",	"campaign_M9_hero_temple_1" ] },
								{ "a": "GiveUnitHero", "p": [ "lightweaver",		"12",	"campaign_M9_hero_temple_1" ] },
								{ "a": "GiveUnitHero", "p": [ "sunlight_cavalry",	"3",	"campaign_M9_hero_temple_1" ] },
								
								{ "a": "GiveUnitHero", "p": [ "esquire",			"36",	"campaign_M9_hero_temple_2" ] },
								{ "a": "GiveUnitHero", "p": [ "crossbowman",		"26",	"campaign_M9_hero_temple_2" ] },
								{ "a": "GiveUnitHero", "p": [ "griffin",			"12",	"campaign_M9_hero_temple_2" ] },
								{ "a": "GiveUnitHero", "p": [ "lightweaver",		"12",	"campaign_M9_hero_temple_2" ] },
								{ "a": "GiveUnitHero", "p": [ "sunlight_cavalry",	"3",	"campaign_M9_hero_temple_2" ] },
								
								{ "a": "GiveUnitHero", "p": [ "esquire",			"36",	"campaign_M9_hero_temple_3" ] },
								{ "a": "GiveUnitHero", "p": [ "crossbowman",		"26",	"campaign_M9_hero_temple_3" ] },
								{ "a": "GiveUnitHero", "p": [ "griffin",			"12",	"campaign_M9_hero_temple_3" ] },
								{ "a": "GiveUnitHero", "p": [ "lightweaver",		"12",	"campaign_M9_hero_temple_3" ] },
								{ "a": "GiveUnitHero", "p": [ "sunlight_cavalry",	"3",	"campaign_M9_hero_temple_3" ] },
								
								{ "a": "GiveUnitHero", "p": [ "esquire",			"36",	"campaign_M9_hero_temple_4" ] },
								{ "a": "GiveUnitHero", "p": [ "crossbowman",		"26",	"campaign_M9_hero_temple_4" ] },
								{ "a": "GiveUnitHero", "p": [ "griffin",			"12",	"campaign_M9_hero_temple_4" ] },
								{ "a": "GiveUnitHero", "p": [ "lightweaver",		"12",	"campaign_M9_hero_temple_4" ] },
								{ "a": "GiveUnitHero", "p": [ "sunlight_cavalry",	"3",	"campaign_M9_hero_temple_4" ] },
								
								{ "a": "GiveStatsHero", "p": [ "offence", "campaign_M9_hero_temple_1", "8" ] }, { "a": "GiveStatsHero", "p": [ "defence", "campaign_M9_hero_temple_1", "8" ] }, { "a": "GiveStatsHero", "p": [ "spellPower", "campaign_M9_hero_temple_1", "8" ] }, { "a": "GiveStatsHero", "p": [ "intelligence", "campaign_M9_hero_temple_1", "8" ] },
								{ "a": "GiveStatsHero", "p": [ "offence", "campaign_M9_hero_temple_2", "8" ] }, { "a": "GiveStatsHero", "p": [ "defence", "campaign_M9_hero_temple_2", "8" ] }, { "a": "GiveStatsHero", "p": [ "spellPower", "campaign_M9_hero_temple_2", "8" ] }, { "a": "GiveStatsHero", "p": [ "intelligence", "campaign_M9_hero_temple_2", "8" ] },
								{ "a": "GiveStatsHero", "p": [ "offence", "campaign_M9_hero_temple_3", "8" ] }, { "a": "GiveStatsHero", "p": [ "defence", "campaign_M9_hero_temple_3", "8" ] }, { "a": "GiveStatsHero", "p": [ "spellPower", "campaign_M9_hero_temple_3", "8" ] }, { "a": "GiveStatsHero", "p": [ "intelligence", "campaign_M9_hero_temple_3", "8" ] },
								{ "a": "GiveStatsHero", "p": [ "offence", "campaign_M9_hero_temple_4", "8" ] }, { "a": "GiveStatsHero", "p": [ "defence", "campaign_M9_hero_temple_4", "8" ] }, { "a": "GiveStatsHero", "p": [ "spellPower", "campaign_M9_hero_temple_4", "8" ] }, { "a": "GiveStatsHero", "p": [ "intelligence", "campaign_M9_hero_temple_4", "8" ] },
								
								{ "a": "AddBuffHeroDays", "p": [ "campaign_heroStatBuff_campaign_M9_hero_2", 	"campaign_M9_hero_temple_1", "9999" ] },
								{ "a": "AddBuffHeroDays", "p": [ "campaign_heroStatBuff_campaign_M9_hero_2", 	"campaign_M9_hero_temple_2", "9999" ] },
								{ "a": "AddBuffHeroDays", "p": [ "campaign_heroStatBuff_campaign_M9_hero_2", 	"campaign_M9_hero_temple_3", "9999" ] },
								{ "a": "AddBuffHeroDays", "p": [ "campaign_heroStatBuff_campaign_M9_hero_2", 	"campaign_M9_hero_temple_4", "9999" ] },
								
								{ "a": "GiveUnitHero", "p": [ "esquire_upg_alt",			"160",	"campaign_M9_hero_temple_main" ] },
								{ "a": "GiveUnitHero", "p": [ "crossbowman_upg",			"108",	"campaign_M9_hero_temple_main" ] },
								{ "a": "GiveUnitHero", "p": [ "wasp_upg",					"36",	"campaign_M9_hero_temple_main" ] },
								{ "a": "GiveUnitHero", "p": [ "jaw_upg",					"20",	"campaign_M9_hero_temple_main" ] },
								{ "a": "GiveUnitHero", "p": [ "sunlight_cavalry_upg_alt",	"24",	"campaign_M9_hero_temple_main" ] },
								{ "a": "GiveUnitHero", "p": [ "olgoi_upg",					"16",	"campaign_M9_hero_temple_main" ] },
								{ "a": "GiveUnitHero", "p": [ "angel",						"8",	"campaign_M9_hero_temple_main" ] },

								{ "a": "GiveStatsHero", "p": [ "offence", "campaign_M9_hero_temple_main", "12" ] }, { "a": "GiveStatsHero", "p": [ "defence", "campaign_M9_hero_temple_main", "12" ] }, { "a": "GiveStatsHero", "p": [ "spellPower", "campaign_M9_hero_temple_main", "12" ] }, { "a": "GiveStatsHero", "p": [ "intelligence", "campaign_M9_hero_temple_main", "12" ] },

								{ "a": "CreateBuildingCity", "p": [ "Build_Wall", "1", "enemy_city" ] },
								{ "a": "CreateBuildingCity", "p": [ "Build_Wall", "2", "enemy_city" ] },
								{ "a": "CreateBuildingCity", "p": [ "Build_Wall", "3", "enemy_city" ] },
								{ "a": "CreateBuildingCity", "p": [ "Build_Tier_1", "2", "enemy_city" ] },
								{ "a": "CreateBuildingCity", "p": [ "Build_Tier_2", "2", "enemy_city" ] },
								{ "a": "CreateBuildingCity", "p": [ "Build_Tier_3", "2", "enemy_city" ] },
								{ "a": "CreateBuildingCity", "p": [ "Build_Tier_4", "1", "enemy_city" ] },
								{ "a": "CreateBuildingCity", "p": [ "Build_Tier_5", "1", "enemy_city" ] }
							]
						}
					]
				},
				{
					"sid": "3",
					"activeOnStart": true,
					"comment": "difficulty settings",

					"triggers":
					[
						{
							"repeat": true,
							"conditionsLogic": "And",

							"conditions":
							[
								{ "c": "StartWeek", "p": [  ] },
								{ "c": "Difficulty", "p": [ "0" ] }
							],

							"actions":
							[
								
							]
						},
						{
							"repeat": true,
							"conditionsLogic": "And",

							"conditions":
							[
								{ "c": "StartWeek", "counter": 2, "p": [  ] },
								{ "c": "Difficulty", "p": [ "1" ] }
							],

							"actions":
							[
								{ "a": "GiveUnitHero", "p": [ "esquire_upg_alt",			"18",	"campaign_M9_hero_temple_main" ] },
								{ "a": "GiveUnitHero", "p": [ "crossbowman_upg",			"14",	"campaign_M9_hero_temple_main" ] },
								{ "a": "GiveUnitHero", "p": [ "wasp_upg",					"9",	"campaign_M9_hero_temple_main" ] },
								{ "a": "GiveUnitHero", "p": [ "jaw_upg",					"5",	"campaign_M9_hero_temple_main" ] },
								{ "a": "GiveUnitHero", "p": [ "sunlight_cavalry_upg_alt",	"3",	"campaign_M9_hero_temple_main" ] },
								{ "a": "GiveUnitHero", "p": [ "olgoi_upg",					"4",	"campaign_M9_hero_temple_main" ] },
								{ "a": "GiveUnitHero", "p": [ "angel",						"1",	"campaign_M9_hero_temple_main" ] }
							]
						},
						{
							"repeat": true,
							"conditionsLogic": "And",

							"conditions":
							[
								{ "c": "StartWeek", "p": [  ] },
								{ "c": "Difficulty", "p": [ "2" ] }
							],

							"actions":
							[
								{ "a": "GiveUnitHero", "p": [ "esquire_upg_alt",			"18",	"campaign_M9_hero_temple_main" ] },
								{ "a": "GiveUnitHero", "p": [ "crossbowman_upg",			"14",	"campaign_M9_hero_temple_main" ] },
								{ "a": "GiveUnitHero", "p": [ "wasp_upg",					"9",	"campaign_M9_hero_temple_main" ] },
								{ "a": "GiveUnitHero", "p": [ "jaw_upg",					"5",	"campaign_M9_hero_temple_main" ] },
								{ "a": "GiveUnitHero", "p": [ "sunlight_cavalry_upg_alt",	"3",	"campaign_M9_hero_temple_main" ] },
								{ "a": "GiveUnitHero", "p": [ "olgoi_upg",					"4",	"campaign_M9_hero_temple_main" ] },
								{ "a": "GiveUnitHero", "p": [ "angel",						"1",	"campaign_M9_hero_temple_main" ] }
							]
						},
						{
							"repeat": true,
							"conditionsLogic": "And",

							"conditions":
							[
								{ "c": "StartWeek", "p": [  ] },
								{ "c": "Difficulty", "p": [ "3" ] }
							],

							"actions":
							[
								{ "a": "GiveUnitHero", "p": [ "esquire_upg_alt",			"36",	"campaign_M9_hero_temple_main" ] },
								{ "a": "GiveUnitHero", "p": [ "crossbowman_upg",			"24",	"campaign_M9_hero_temple_main" ] },
								{ "a": "GiveUnitHero", "p": [ "wasp_upg",					"18",	"campaign_M9_hero_temple_main" ] },
								{ "a": "GiveUnitHero", "p": [ "jaw_upg",					"10",	"campaign_M9_hero_temple_main" ] },
								{ "a": "GiveUnitHero", "p": [ "sunlight_cavalry_upg_alt",	"6",	"campaign_M9_hero_temple_main" ] },
								{ "a": "GiveUnitHero", "p": [ "olgoi_upg",					"8",	"campaign_M9_hero_temple_main" ] },
								{ "a": "GiveUnitHero", "p": [ "angel",						"2",	"campaign_M9_hero_temple_main" ] }
							]
						}
					]
				},
				{
					"sid": "4",
					"activeOnStart": true,
					"comment": "difficulty settings",

					"triggers":
					[
						{
							"repeat": true,
							"conditionsLogic": "And",

							"conditions":
							[
								{ "c": "StartWeek", "p": [  ] },
								{ "c": "Difficulty", "p": [ "3" ] }
							],

							"actions":
							[
								{ "a": "GiveStatsHero", "p": [ "offence", "campaign_M9_hero_temple_1", "1" ] },
								{ "a": "GiveStatsHero", "p": [ "defence", "campaign_M9_hero_temple_1", "1" ] },
								{ "a": "GiveStatsHero", "p": [ "spellPower", "campaign_M9_hero_temple_1", "1" ] },
								{ "a": "GiveStatsHero", "p": [ "intelligence", "campaign_M9_hero_temple_1", "1" ] }
							]
						},
						{
							"repeat": true,
							"conditionsLogic": "And",

							"conditions":
							[
								{ "c": "StartWeek", "p": [  ] },
								{ "c": "Difficulty", "p": [ "3" ] }
							],

							"actions":
							[
								{ "a": "GiveStatsHero", "p": [ "offence", "campaign_M9_hero_temple_2", "1" ] },
								{ "a": "GiveStatsHero", "p": [ "defence", "campaign_M9_hero_temple_2", "1" ] },
								{ "a": "GiveStatsHero", "p": [ "spellPower", "campaign_M9_hero_temple_2", "1" ] },
								{ "a": "GiveStatsHero", "p": [ "intelligence", "campaign_M9_hero_temple_2", "1" ] }
							]
						},
						{
							"repeat": true,
							"conditionsLogic": "And",

							"conditions":
							[
								{ "c": "StartWeek", "p": [  ] },
								{ "c": "Difficulty", "p": [ "3" ] }
							],

							"actions":
							[
								{ "a": "GiveStatsHero", "p": [ "offence", "campaign_M9_hero_temple_3", "1" ] },
								{ "a": "GiveStatsHero", "p": [ "defence", "campaign_M9_hero_temple_3", "1" ] },
								{ "a": "GiveStatsHero", "p": [ "spellPower", "campaign_M9_hero_temple_3", "1" ] },
								{ "a": "GiveStatsHero", "p": [ "intelligence", "campaign_M9_hero_temple_3", "1" ] }
							]
						},
						{
							"repeat": true,
							"conditionsLogic": "And",

							"conditions":
							[
								{ "c": "StartWeek", "p": [  ] },
								{ "c": "Difficulty", "p": [ "3" ] }
							],

							"actions":
							[
								{ "a": "GiveStatsHero", "p": [ "offence", "campaign_M9_hero_temple_4", "1" ] },
								{ "a": "GiveStatsHero", "p": [ "defence", "campaign_M9_hero_temple_4", "1" ] },
								{ "a": "GiveStatsHero", "p": [ "spellPower", "campaign_M9_hero_temple_4", "1" ] },
								{ "a": "GiveStatsHero", "p": [ "intelligence", "campaign_M9_hero_temple_4", "1" ] }
							]
						}
					]
				}
			]
		},

		{
			"sid": "Questlog0",
			"main": true,

			"comment": "Квест 'Герои не должны умереть'",

			"activeOnStart": true,
			"sharing": "Clone",

			"name": "quest_name_genericQ0",

			"subQuests":
			[
				{
					"sid": "Questlog0_1",
					"activeOnStart": true,
					
					"name": "quest_sub_M9bQ0_1",

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "main_quest", "=", "1" ] }
							],

							"actions":
							[
								{ "a": "CurrentSubQuestDone" }
							]
						},
						{
							"conditionsLogic": "Or",
							"conditions":
							[
								{ "c": "HeroKill", "p": [ "campaign_hero_1" ] },
								{ "c": "HeroKill", "p": [ "campaign_hero_2" ] },
								{ "c": "HeroKill", "p": [ "campaign_hero_3" ] },
								{ "c": "HeroKill", "p": [ "campaign_hero_4" ] }
							],

							"actions":
							[
								{ "a": "GameLose" }
							]
						}
					]
				}
			]
		},
		{
			"sid": "bonus_movement",

			"comment": "'unlimited' movepoints once the AI is defeated",

			"activeOnStart": true,
			"hidden": true,
			"sharing": "Clone",

			"name": "1",

			"subQuests":
			[
				{
					"sid": "Questlog0_1_1",
					"activeOnStart": true,

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "PlayerDefeated", "p": [ "1" ] }
							],

							"actions":
							[
								{ "a": "AddBuffHeroDays", "p": [ "campaign_movement_buff", "campaign_hero_1" ] },
								{ "a": "AddBuffHeroDays", "p": [ "campaign_movement_buff", "campaign_hero_2" ] },
								{ "a": "AddBuffHeroDays", "p": [ "campaign_movement_buff", "campaign_hero_4" ] },
								{ "a": "SetHeroMovePoints", "p": [ "campaign_hero_1", "350" ] },
								{ "a": "SetHeroMovePoints", "p": [ "campaign_hero_2", "350" ] },
								{ "a": "SetHeroMovePoints", "p": [ "campaign_hero_4", "350" ] }
							]
						}
					]
				}
			]
		},

		{
			"sid": "Questlog1a",
			"main": true,
			"activeOnStart": true,

			"comment": "main quest - find and defeat antagonist",

			"name": "quest_name_M9bQ1a",
			"desc": "quest_desc_M9bQ1a",
			
			"sharing": "Clone",

			"subQuests":
			[	
				{
					"sid": "Questlog1a_1",
					"activeOnStart": true,

					"comment": "first time getting into the center",

					"name": "quest_sub_M9bQ1a_1",

					"triggers":
					[
						{
							"conditionsLogic": "Or",
							"conditions":
							[
								{ "c": "Counter", "p": [ "portal_1_counter", "=", "1" ] },
								{ "c": "Counter", "p": [ "portal_2_counter", "=", "1" ] },
								{ "c": "Counter", "p": [ "portal_3_counter", "=", "1" ] },
								{ "c": "Counter", "p": [ "portal_4_counter", "=", "1" ] }
							],

							"actions":
							[
								{ "a": "Dialog", "p": [ "M9Q1_dial4" ] },

								{ "a": "AutoSave" }
							]
						},
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "found_antagonist", "=", "1" ] }
							],

							"actions":
							[
								{ "a": "CurrentSubQuestDone" },
								{ "a": "NextSubQuest", "p": [ "Questlog1a_2" ] },

								{ "a": "AutoSave" }
							]
						}
					]
				},
				{
					"sid": "Questlog1a_2",

					"comment": "retaking the keep",

					"name": "quest_sub_M9bQ1a_2",

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "main_quest", "=", "1" ] }
							],

							"actions":
							[
								{ "a": "CurrentSubQuestDone" }
							]
						}
					]
				}
			]
		},

			{
				"sid": "setupQuestlog1b",
				"hidden": true,
				"activeOnStart": true,

				"comment": "setup quest, to start Questlog1b",

				
				"sharing": "Clone",

				"subQuests":
				[	
					{
						"sid": "1",
						"activeOnStart": true,

						"name": "1",

						"triggers":
						[
							{							
								"conditions":
								[
									{ "c": "Counter", "p": [ "found_antagonist", "=", "1" ] }
								],

								"actions":
								[
									{ "a": "RevealFogOfWar", "p": [ "8620", "1" ] },
									{ "a": "RevealFogOfWar", "p": [ "7886", "1" ] },
									{ "a": "RevealFogOfWar", "p": [ "2504", "1" ] },
									{ "a": "RevealFogOfWar", "p": [ "1426", "1" ] },
									{ "a": "NextQuest", "p": [ "Questlog1b" ] },

									{ "a": "CreateVFX", "p": [ "fx_quest_mark_gold_03", "8620", "false", "true", "pm_portal1" ] },
									{ "a": "CreateVFX", "p": [ "fx_quest_mark_gold_03", "1426", "false", "true", "pm_portal2" ] },
									{ "a": "CreateVFX", "p": [ "fx_quest_mark_gold_03", "2504", "false", "true", "pm_portal3" ] },
									{ "a": "CreateVFX", "p": [ "fx_quest_mark_gold_03", "7886", "false", "true", "pm_portal4" ] },
									
									{ "a": "CounterPlus", "p": [ "portal_1_counter", "0" ] },
									{ "a": "CounterPlus", "p": [ "portal_2_counter", "0" ] },
									{ "a": "CounterPlus", "p": [ "portal_3_counter", "0" ] },
									{ "a": "CounterPlus", "p": [ "portal_4_counter", "0" ] }
								]
							},
							{
								"conditions":
								[
									{ "c": "Counter", "p": [ "final_gate_opened", "=", "1" ] }
								],

								"actions":
								[
									{ "a": "NextQuest" }
								]
							}
						]
					}
				]
			},
		{
			"sid": "Questlog1b",
			"main": true,

			"comment": "main quest - open 4 portals, open portal to antagonist",

			"name": "quest_name_M9Q1b",
			"sharing": "Clone",

			"subQuests":
			[				
				{
					"sid": "Questlog1b_1",
					"activeOnStart": true,
					
					"comment": "portal 1",
					
					"name": "quest_sub_M9Q1b_1",

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "portal_1_counter", "=", "1" ] }
							],

							"actions":
							[
								{ "a": "SetActiveVFX", "p": [ "pm_portal1", "false" ] },
								{ "a": "CurrentSubQuestDone" },

								{ "a": "AutoSave" }
							]
						},
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "final_gate_opened", "=", "1" ] }
							],

							"actions":
							[
								{ "a": "Dialog", "p": [ "M9bQ1_dial5" ] },
								{ "a": "NextQuest" }
							]
						},
						{
							"repeat": true,
							
							"conditions":
							[
								{ "c": "StartTurn", "counter": 1 }
							],

							"actions":
							[
								{ "a": "RevealFogOfWar", "p": [ "8620", "1" ] },
								{ "a": "RevealFogOfWar", "p": [ "7886", "1" ] },
								{ "a": "RevealFogOfWar", "p": [ "2504", "1" ] },
								{ "a": "RevealFogOfWar", "p": [ "1426", "1" ] }
							]
						}			
					]
				},
				{
					"sid": "Questlog1b_2",
					"activeOnStart": true,

					"comment": "portal 2",
					
					"name": "quest_sub_M9Q1b_2",

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "portal_2_counter", "=", "1" ] }
							],

							"actions":
							[
								{ "a": "SetActiveVFX", "p": [ "pm_portal2", "false" ] },
								{ "a": "CurrentSubQuestDone" },

								{ "a": "AutoSave" }
							]
						}
					]
				},
				{
					"sid": "Questlog1b_3",
					"activeOnStart": true,

					"comment": "portal 3",
					
					"name": "quest_sub_M9Q1b_3",

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "portal_3_counter", "=", "1" ] }
							],

							"actions":
							[
								{ "a": "SetActiveVFX", "p": [ "pm_portal3", "false" ] },
								{ "a": "CurrentSubQuestDone" },

								{ "a": "AutoSave" }
							]
						}
					]
				},
				{
					"sid": "Questlog1b_4",
					"activeOnStart": true,
					
					"comment": "portal 4",
					
					"name": "quest_sub_M9Q1b_4",

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "portal_4_counter", "=", "1" ] }
							],

							"actions":
							[
								{ "a": "SetActiveVFX", "p": [ "pm_portal4", "false" ] },
								{ "a": "CurrentSubQuestDone" },

								{ "a": "AutoSave" }
							]
						}
					]
				}
			]
		},
			{
				"sid": "supportQuestlog1b",
				"hidden": true,
				"activeOnStart": true,

				"comment": "support quest - opening up final gate",

				
				"sharing": "Clone",

				"subQuests":
				[	
					{
						"sid": "1",
						"activeOnStart": true,

						"name": "1",

						"triggers":
						[
							{
								"conditionsLogic": "And",
								"conditions":
								[
									{ "c": "Counter", "p": [ "portal_1_counter", "=", "1" ] },
									{ "c": "Counter", "p": [ "portal_2_counter", "=", "1" ] },
									{ "c": "Counter", "p": [ "portal_3_counter", "=", "1" ] },
									{ "c": "Counter", "p": [ "portal_4_counter", "=", "1" ] }
								],

								"actions":
								[
									{ "a": "DeleteEntity", "p": [ "block_final" ] },
									{ "a": "SetActivePortal", "p": [ "final_portal", "true" ] },
									{ "a": "CounterSet", "p": [ "final_gate_opened", "1" ] }
								]
							}
						]
					}
				]
			},

				{
					"sid": "setupQuestlog2a",
					"hidden": true,
					"activeOnStart": true,
		
					"comment": "setup faction quest - help Thant destroy amplifiers",
		
					"sharing": "Clone",
		
					"subQuests":
					[	
						{
							"sid": "1",
							"activeOnStart": true,
		
							"triggers":
							[
								{
									"conditions":
									[
										{ "c": "Counter", "p": [ "thant_quest", "=", "1" ] }
									],
		
									"actions":
									[
										{ "a": "NextQuest", "p": [ "Questlog2a" ] },

										{ "a": "SetQuestMarker", "p": [ "amplifier1", "effects/global_map/quest_mark_silver_02" ] },
										{ "a": "SetQuestMarker", "p": [ "amplifier2", "effects/global_map/quest_mark_silver_02" ] },
										{ "a": "SetQuestMarker", "p": [ "amplifier3", "effects/global_map/quest_mark_silver_02" ] }
									]
								},
								{
									"conditions":
									[
										{ "c": "Counter", "p": [ "starting_side", "=", "1" ] }
									],
		
									"actions":
									[
										{ "a": "DeleteEntity", "p": [ "zone_thant1" ] },
										{ "a": "DeleteEntity", "p": [ "zone_thant2" ] },
										{ "a": "DeleteEntity", "p": [ "zone_thant3" ] },
										{ "a": "DeleteEntity", "p": [ "zone_thant4" ] },
										{ "a": "DeleteEntity", "p": [ "amplifier1" ] },
										{ "a": "DeleteEntity", "p": [ "amplifier2" ] },
										{ "a": "DeleteEntity", "p": [ "amplifier3" ] },
										{ "a": "DeleteEntity", "p": [ "foundation1" ] },
										{ "a": "DeleteEntity", "p": [ "foundation2" ] },
										{ "a": "DeleteEntity", "p": [ "foundation3" ] },
										{ "a": "SpawnObject", "p": [ "campaign_orb_observatory", "6935", "false", "amplifier1_replacement" ] },
										{ "a": "SpawnObject", "p": [ "campaign_orb_observatory", "3871", "false", "amplifier2_replacement" ] },
										{ "a": "SpawnObject", "p": [ "campaign_orb_observatory", "3182", "false", "amplifier3_replacement" ] },
										{ "a": "NextQuest" }
									]
								}
							]
						}
					]
				},
			{
				"sid": "Questlog2a",
				
				"activeOnStart": false,
	
				"comment": "faction quest - help Thant destroy amplifiers",
	
				"name": "quest_name_M9aQ2",
				"desc": "quest_desc_M9aQ2",

				"sharing": "Clone",
	
				"subQuests":
				[	
					{
						"sid": "Questlog2a_1",
						"activeOnStart": true,
	
						"comment": "destroy amplifiers + dialog for players 1st fog of war creation",
	
						"name": "quest_sub_M9aQ2_1",
	
						"triggers":
						[
							{
								"conditions":
								[
									{ "c": "StartTurn", "counter": 1 }
								],
	
								"actions":
								[
									{ "a": "Dialog", "p": [ "M9Q2_dial2" ] }
								]
							},
							
							{
								"conditions":
								[
									{ "c": "SquadKill", "p": [ "amplifier1_guard" ] }
								],
	
								"actions":
								[
									{ "a": "Dialog", "p": [ "M9Q2_dial7" ] }
								]
							},
							{
								"conditions":
								[
									{ "c": "SquadKill", "p": [ "amplifier2_guard" ] }
								],
	
								"actions":
								[
									{ "a": "Dialog", "p": [ "M9Q2_dial8" ] }
								]
							},
							{
								"conditions":
								[
									{ "c": "SquadKill", "p": [ "amplifier3_guard" ] }
								],
	
								"actions":
								[
									{ "a": "Dialog", "p": [ "M9Q2_dial9" ] }
								]
							},

							{
								"repeat": true,

								"conditions":
								[
									{ "c": "CounterEqualityInDays", "p": [ "amplifier1_destroyed", "0" ], "counter": 1 }
								],
	
								"actions":
								[
									{ "a": "RevealFogOfWar", "p": [ "6934", "1" ] },
									{ "a": "RevealFogOfWar", "p": [ "6935", "1" ] },
									{ "a": "RevealFogOfWar", "p": [ "6838", "1" ] },
									{ "a": "RevealFogOfWar", "p": [ "6839", "1" ] }
								]
							},
							{
								"repeat": true,

								"conditions":
								[
									{ "c": "CounterEqualityInDays", "p": [ "amplifier2_destroyed", "0" ], "counter": 1 }
								],
	
								"actions":
								[
									{ "a": "RevealFogOfWar", "p": [ "3870", "1" ] },
									{ "a": "RevealFogOfWar", "p": [ "3871", "1" ] },
									{ "a": "RevealFogOfWar", "p": [ "3774", "1" ] },
									{ "a": "RevealFogOfWar", "p": [ "3775", "1" ] }
								]
							},
							{
								"repeat": true,

								"conditions":
								[
									{ "c": "CounterEqualityInDays", "p": [ "amplifier3_destroyed", "0" ], "counter": 1 }
								],
	
								"actions":
								[
									{ "a": "RevealFogOfWar", "p": [ "3181", "1" ] },
									{ "a": "RevealFogOfWar", "p": [ "3182", "1" ] },
									{ "a": "RevealFogOfWar", "p": [ "3085", "1" ] },
									{ "a": "RevealFogOfWar", "p": [ "3086", "1" ] }
								]
							},

							{
								"conditions":
								[
									{ "c": "Counter", "p": [ "total_amplifiers_destroyed", "=", "3" ] }
								],
	
								"actions":
								[
									{ "a": "CurrentSubQuestDone" },
									{ "a": "CounterSet", "p": [ "thant_quest", "2" ] },
									{ "a": "Dialog", "p": [ "M9Q2_dial11" ] },
									{ "a": "GiveStatsHero", "p": [ "offence", "campaign_M9_hero_undead_main",  "-10" ] },
									{ "a": "GiveStatsHero", "p": [ "defence", "campaign_M9_hero_undead_main", "-10" ] },
									{ "a": "GiveStatsHero", "p": [ "spellPower", "campaign_M9_hero_undead_main", "-10" ] },
									{ "a": "GiveStatsHero", "p": [ "intelligence", "campaign_M9_hero_undead_main", "-10" ] },
									{ "a": "RemoveUnitHero", "p": [ "esquire_upg", "all", "campaign_M9_hero_undead_main" ] },
									{ "a": "GiveUnitHero", "p": [ "esquire_upg", "1", "campaign_M9_hero_undead_main" ] },
									{ "a": "RemoveUnitHero", "p": [ "esquire_upg_alt", "all", "campaign_M9_hero_undead_main" ] },
									{ "a": "GiveUnitHero", "p": [ "esquire_upg_alt", "1", "campaign_M9_hero_undead_main" ] },
									
									{ "a": "NextQuest" }
								]
							}
						]
					}
				]
			},
				{
					"sid": "supportQuestlog2a1",
					"hidden": true,
					"activeOnStart": true,
		
					"comment": "spawning fog of war around amplifiers + counting their destructions",
		
					"sharing": "Clone",
		
					"subQuests":
					[	
						{
							"sid": "0",
							"activeOnStart": true,
		
							"comment": "disable quest when playing for necros + counting amplifiers",
		
							"triggers":
							[
								{
									"conditions":
									[
										{ "c": "Counter", "p": [ "starting_side", "=", "1" ] }
									],
		
									"actions":
									[
										{ "a": "NextQuest", "p": [] }
									]
								},
								{
									"conditionsLogic": "And",
									"conditions":
									[
										{ "c": "Counter", "p": [ "amplifier1_destroyed", "=", "1" ] },
										{ "c": "Counter", "p": [ "amplifier2_destroyed", "=", "1" ] },
										{ "c": "Counter", "p": [ "amplifier3_destroyed", "=", "1" ] }
									],
		
									"actions":
									[
										{ "a": "CounterSet", "p": [ "thant_quest", "2" ] }
									]
								}
							]
						},
						{
							"sid": "1",
							"activeOnStart": true,
		
							"comment": "amplifier1 creating fog of war",
		
							"triggers":
							[
								{
									"repeat": true,

									"conditions":
									[
										{ "c": "CounterEqualityInDays", "p": [ "amplifier1_destroyed", "0" ], "counter": 1 }
									],
		
									"actions":
									[
										{ "a": "CreateFogOfWar", "p": [ "6838", "17" ] }
									]
								}
							]
						},
						{
							"sid": "2",
							"activeOnStart": true,
		
							"comment": "amplifier2 creating fog of war",
		
							"triggers":
							[
								{
									"repeat": true,

									"conditions":
									[
										{ "c": "CounterEqualityInDays", "p": [ "amplifier2_destroyed", "0" ], "counter": 1 }
									],
		
									"actions":
									[
										{ "a": "CreateFogOfWar", "p": [ "3774", "17" ] }
									]
								}
							]
						},
						{
							"sid": "3",
							"activeOnStart": true,
		
							"comment": "amplifier3 creating fog of war",
		
							"triggers":
							[
								{
									"repeat": true,

									"conditions":
									[
										{ "c": "CounterEqualityInDays", "p": [ "amplifier3_destroyed", "0" ], "counter": 1 }
									],
		
									"actions":
									[
										{ "a": "CreateFogOfWar", "p": [ "3085", "17" ] }
									]
								}
							]
						}
					]
				},
				{
					"sid": "supportQuestlog2a2",
					"hidden": true,
					"activeOnStart": true,
		
					"comment": "summoning dialog after an amplifier was destroyed by hand for the 1st time",
		
					"sharing": "Clone",
		
					"subQuests":
					[
						{
							"sid": "1",
							"activeOnStart": true,
		
							"triggers":
							[
								{
									"conditions":
									[
										{ "c": "Counter", "p": [ "total_amplifiers_destroyed", "=", "1" ] }
									],
		
									"actions":
									[
										{ "a": "Dialog", "p": [ "M9Q2_dial10" ] }
									]
								},
								{
									"conditions":
									[
										{ "c": "Counter", "p": [ "thant_help", "=", "2" ] }
									],
		
									"actions":
									[
										{ "a": "NextQuest" }
									]
								}
							]
						}
					]
				},

				{
					"sid": "setupQuestlog2b",
					"hidden":true,
					"activeOnStart": true,
		
					"comment": "setup faction quest - defeat 4 angels to save the 5th one",
		
					"sharing": "Clone",
		
					"subQuests":
					[	
						{
							"sid": "1",
							"activeOnStart": true,
		
							"triggers":
							[
								{
									"conditions":
									[
										{ "c": "Counter", "p": [ "angels_quest", "=", "1" ] }
									],
		
									"actions":
									[
										{ "a": "NextQuest", "p": [ "Questlog2b" ] },
										
										{ "a": "SetQuestMarker", "p": [ "cage", "effects/global_map/quest_mark_silver_02" ] }
									]
								},
								{
									"conditions":
									[
										{ "c": "Counter", "p": [ "starting_side", "=", "0" ] }
									],
		
									"actions":
									[
										{ "a": "DeleteEntity", "p": [ "block_angel1" ] },
										{ "a": "DeleteEntity", "p": [ "cage" ] },
										{ "a": "SpawnObject", "p": [ "heros_crypt", "6194", "false", "crypt" ] },
										{ "a": "NextQuest", "p": [] }
									]
								}
							]
						}
					]
				},
			{
				"sid": "Questlog2b",
				
				"activeOnStart": false,
	
				"comment": "faction quest - defeat 4 angelic heroes to open the cage",
	
				"name": "quest_name_M9bQ2",
				"desc": "quest_desc_M9bQ2",
				"sharing": "Clone",
	
				"subQuests":
				[	
					{
						"sid": "Questlog2b_1",
						"activeOnStart": true,
	
						"comment": "defeat Angel 1",
	
						"name": "quest_sub_M9bQ2_1",
	
						"triggers":
						[
							{
								"conditions":
								[
									{ "c": "Counter", "p": [ "angel1_defeated", "=", "1" ] }
								],
	
								"actions":
								[
									{ "a": "CurrentSubQuestDone" }
								]
							},

							{
								"conditions":
								[
									{ "c": "Counter", "p": [ "angels_defeated", "=", "1" ] }
								],
	
								"actions":
								[
									{ "a": "Dialog", "p": [ "M9bQ2_dial1b" ] }
								]
							},
							{
								"conditions":
								[
									{ "c": "Counter", "p": [ "angels_defeated", "=", "2" ] }
								],
	
								"actions":
								[
									{ "a": "Dialog", "p": [ "M9bQ2_dial2b" ] }
								]
							},
							{
								"conditions":
								[
									{ "c": "Counter", "p": [ "angels_defeated", "=", "3" ] }
								],
	
								"actions":
								[
									{ "a": "Dialog", "p": [ "M9bQ2_dial3b" ] }
								]
							},
							{
								"conditions":
								[
									{ "c": "Counter", "p": [ "angels_defeated", "=", "4" ] }
								],
	
								"actions":
								[
									{ "a": "DeleteEntity", "p": [ "block_angel1" ] },
									{ "a": "Dialog", "p": [ "M9bQ2_dial4b" ] },

									{ "a": "NextSubQuest", "p": [ "Questlog2b_5" ] }
								]
							}
						]
					},
					{
						"sid": "Questlog2b_2",
						"activeOnStart": true,
	
						"comment": "defeat Angel 2",
	
						"name": "quest_sub_M9bQ2_2",
	
						"triggers":
						[							
							{
								"conditions":
								[
									{ "c": "Counter", "p": [ "angel2_defeated", "=", "1" ] }
								],
	
								"actions":
								[
									{ "a": "CurrentSubQuestDone" }
								]
							}
						]
					},
					{
						"sid": "Questlog2b_3",
						"activeOnStart": true,
	
						"comment": "defeat Angel 3",
	
						"name": "quest_sub_M9bQ2_3",
	
						"triggers":
						[							
							{
								"conditions":
								[
									{ "c": "Counter", "p": [ "angel3_defeated", "=", "1" ] }
								],
	
								"actions":
								[
									{ "a": "CurrentSubQuestDone" }
								]
							}
						]
					},
					{
						"sid": "Questlog2b_4",
						"activeOnStart": true,
	
						"comment": "defeat Angel 4",
	
						"name": "quest_sub_M9bQ2_4",
	
						"triggers":
						[							
							{
								"conditions":
								[
									{ "c": "Counter", "p": [ "angel4_defeated", "=", "1" ] }
								],
	
								"actions":
								[
									{ "a": "CurrentSubQuestDone" }
								]
							}
						]
					},
					{
						"sid": "Questlog2b_5",
						"activeOnStart": false,
	
						"comment": "save Angel 5 from the cage",
	
						"name": "quest_sub_M9bQ2_5",
	
						"triggers":
						[							
							{
								"conditions":
								[
									{ "c": "Counter", "p": [ "angels_quest", "=", "2" ] }
								],
	
								"actions":
								[
									{ "a": "CurrentSubQuestDone" },
									{ "a": "NextQuest" }
								]
							}
						]
					}
				]
			},

			{
				"sid": "setupQuestlog3",
				"hidden": true,
				"activeOnStart": true,

				"comment": "setup phoenix quest",

				
				"sharing": "Clone",

				"subQuests":
				[	
					{
						"sid": "1",
						"activeOnStart": true,

						"name": "1",

						"triggers":
						[
							{
								"conditions":
								[
									{ "c": "ItemOwnSide", "p": [ "campaign_M9_phoenix_egg_item", ">", "0" ] }
								],

								"actions":
								[
									{ "a": "DeleteEntity", "p": [ "phoenix_egg_object" ] },
									{ "a": "SetActiveVFX", "p": [ "em_phoenix", "false" ] },
									{ "a": "CounterSet", "p": [ "phoenix_quest", "1" ] },
									{ "a": "RevealFogOfWar", "p": [ "4963", "3" ] },

									{ "a": "NextQuest", "p": [ "Questlog3" ] },

									{ "a": "CreateVFX", "p": [ "fx_quest_mark_silver_03", "267", "false", "true", "pm_phoenix_portal" ] },
									{ "a": "SetQuestMarker", "p": [ "phoenix_nest", "effects/global_map/quest_mark_silver_02" ] }
								]
							}
						]
					}
				]
			},
		{
			"sid": "Questlog3",
			"activeOnStart": false,

			"comment": "phoenix quest",

			"name": "quest_name_M9Q3",
			"sharing": "Clone",

			"subQuests":
			[
				{
					"sid": "Questlog3_1",
					"activeOnStart": true,
					
					"name": "quest_sub_M9Q3_1",

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "phoenix_quest", "=", "2" ] }
							],

							"actions":
							[
								{ "a": "NextQuest" }
							]
						},
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "phoenix_quest", "=", "3" ] }
							],

							"actions":
							[
								{ "a": "SetActiveQuestMarker", "p": [ "phoenix_nest", "false" ] },
								{ "a": "NextQuest" }
							]
						}		
					]
				}
			]
		},

			{
				"sid": "setupQuestlog4",
				"hidden": true,
				"activeOnStart": true,

				"comment": "setup demonologist quest",

				
				"sharing": "Clone",

				"subQuests":
				[	
					{
						"sid": "1",
						"activeOnStart": true,

						"name": "1",

						"triggers":
						[
							{
								"conditions":
								[
									{ "c": "Counter", "p": [ "demonologist_quest", "=", "1" ] }
								],

								"actions":
								[
									{ "a": "NextQuest", "p": [ "Questlog4" ] },

									{ "a": "SetQuestMarker", "p": [ "demonologist_hut", "effects/global_map/quest_mark_silver_01" ] }
								]
							}
						]
					}
				]
			},
		{
			"sid": "Questlog4",
			"activeOnStart": false,

			"comment": "demonologist quest",

			"name": "quest_name_M9Q4",
			"sharing": "Clone",

			"subQuests":
			[				
				{
					"sid": "Questlog4_1",
					"activeOnStart": true,
					
					"name": "quest_sub_M9Q4_1",

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "demonologist_quest", "=", "2" ] }
							],

							"actions":
							[
								{ "a": "CurrentSubQuestDone" },
								{ "a": "NextSubQuest", "p": [ "Questlog4_2" ] },

								{ "a": "SetQuestMarker", "p": [ "demon_dwelling", "effects/global_map/quest_mark_silver_02" ] }
							]
						},
						{
							"repeat": true,
							
							"conditions":
							[
								{ "c": "StartTurn", "counter": 1 }
							],

							"actions":
							[
								{ "a": "RevealFogOfWar", "p": [ "4071", "5" ] },
								{ "a": "RevealFogOfWar", "p": [ "3590", "2" ] }
							]
						}			
					]
				},
				{
					"sid": "Questlog4_2",
					
					"name": "quest_sub_M9Q4_2",

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "UnitHire", "p": [ "trick_demon" ], "counter": 1 }
							],

							"actions":
							[
								{ "a": "CounterSet", "p": [ "demon_hired", "1" ] },
								{ "a": "SetActiveQuestMarker", "p": [ "demon_dwelling", "false" ] }
							]
						},
						{
							"conditionsLogic": "Or",
							"conditions":
							[
								{ "c": "UnitKill", "p": [ "trick_demon" ], "counter": 1 },
								{ "c": "UnitKill", "p": [ "trick_demon_upg" ], "counter": 1 },
								{ "c": "UnitKill", "p": [ "trick_demon_upg_alt" ], "counter": 1 },
								{ "c": "UnitKill", "p": [ "locust" ], "counter": 1 },
								{ "c": "UnitKill", "p": [ "locust_upg" ], "counter": 1 },
								{ "c": "UnitKill", "p": [ "locust_upg_alt" ], "counter": 1 },
								{ "c": "UnitKill", "p": [ "wasp" ], "counter": 1 },
								{ "c": "UnitKill", "p": [ "wasp_upg" ], "counter": 1 },
								{ "c": "UnitKill", "p": [ "wasp_upg_alt" ], "counter": 1 },
								{ "c": "UnitKill", "p": [ "jaw" ], "counter": 1 },
								{ "c": "UnitKill", "p": [ "jaw_upg" ], "counter": 1 },
								{ "c": "UnitKill", "p": [ "jaw_upg_alt" ], "counter": 1 },
								{ "c": "UnitKill", "p": [ "godslayer" ], "counter": 1 },
								{ "c": "UnitKill", "p": [ "godslayer_upg" ], "counter": 1 },
								{ "c": "UnitKill", "p": [ "godslayer_upg_alt" ], "counter": 1 },
								{ "c": "UnitKill", "p": [ "olgoi" ], "counter": 1 },
								{ "c": "UnitKill", "p": [ "olgoi_upg" ], "counter": 1 },
								{ "c": "UnitKill", "p": [ "olgoi_upg_alt" ], "counter": 1 },
								{ "c": "UnitKill", "p": [ "hive_queen" ], "counter": 1 },
								{ "c": "UnitKill", "p": [ "hive_queen_upg" ], "counter": 1 },
								{ "c": "UnitKill", "p": [ "hive_queen_upg_alt" ], "counter": 1 }
							],

							"actions":
							[
								{ "a": "Dialog", "p": [ "M9Q4_dial2" ] }
							]
						},
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "demonologist_quest", "=", "3" ] }
							],

							"actions":
							[
								{ "a": "CurrentSubQuestDone" },
								{ "a": "NextQuest", "p": [ "supportQuestlog4_1" ] }
							]
						},
						{
							"repeat": true,
							
							"conditions":
							[
								{ "c": "StartTurn", "counter": 1 }
							],

							"actions":
							[
								{ "a": "RevealFogOfWar", "p": [ "4071", "5" ] },
								{ "a": "RevealFogOfWar", "p": [ "3590", "2" ] }
							]
						}			
					]
				}
			]
		},
			{
				"sid": "supportQuestlog4_1",
				"hidden": true,

				"comment": "to summon beelzebub's dialogue after finishing Q4",
				
				"sharing": "Clone",

				"subQuests":
				[	
					{
						"sid": "1",
						"activeOnStart": true,

						"triggers":
						[
							{
								"conditions":
								[
									{ "c": "StartTurn", "counter": 1 }
								],

								"actions":
								[
									{ "a": "Dialog", "p": [ "M9Q4_dial5" ] }
								]
							}
						]
					}
				]
			},
			{
				"sid": "supportQuestlog4_2",
				"hidden": true,
				"activeOnStart": true,

				"comment": "to summon other dialogues",
				
				"sharing": "Clone",

				"subQuests":
				[
					{
						"sid": "2",
						"activeOnStart": true,

						"comment": "summonning dialogue after hiring a demon for the first time",

						"triggers":
						[
							{
								"conditions":
								[
									{ "c": "UnitHire", "p": [ "trick_demon" ], "counter": 1 }
								],

								"actions":
								[
									{ "a": "Dialog", "p": [ "M9Q4_dial3" ] }
								]
							}
						]
					},
					{
						"sid": "3",
						"activeOnStart": true,

						"comment": "summonning repeatable dialogue with the skeleton",

						"triggers":
						[
							{
								"repeat": true,

								"conditions":
								[
									{ "c": "SquadInteraction", "p": [ "summoned_demon" ] }
								],

								"actions":
								[
									{ "a": "Dialog", "p": [ "M9Q4_dial6" ] }
								]
							}
						]
					}
				]
			},

			{
				"sid": "setupQuestlog5a",
				"hidden": true,
				"activeOnStart": true,

				"comment": "setup forest quest - human",
				
				"sharing": "Clone",

				"subQuests":
				[	
					{
						"sid": "1",
						"activeOnStart": true,

						"triggers":
						[
							{
								"conditions":
								[
									{ "c": "Counter", "p": [ "forest_quest", "=", "1" ] }
								],

								"actions":
								[
									{ "a": "NextQuest", "p": [ "Questlog5a" ] }
								]
							}
						]
					}
				]
			},
			{
				"sid": "setupQuestlog5b",
				"hidden": true,
				"activeOnStart": true,

				"comment": "setup forest quest - sylvan",
				
				"sharing": "Clone",

				"subQuests":
				[	
					{
						"sid": "1",
						"activeOnStart": true,

						"name": "1",

						"triggers":
						[
							{
								"conditions":
								[
									{ "c": "Counter", "p": [ "forest_quest", "=", "2" ] }
								],

								"actions":
								[
									{ "a": "NextQuest", "p": [ "Questlog5b" ] },

									{ "a": "SetQuestMarker", "p": [ "altar_grove", "effects/global_map/quest_mark_silver_02" ] }
								]
							}
						]
					}
				]
			},
		{
			"sid": "Questlog5a",
			"activeOnStart": false,

			"comment": "helping humans with the forest",

			"name": "quest_name_M9Q5a",
			"desc": "quest_desc_M9Q5a",

			"sharing": "Clone",

			"subQuests":
			[				
				{
					"sid": "Questlog5a_1",
					"activeOnStart": true,
					
					"name": "quest_sub_M9Q5a_1",

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "forest_quest", "=", "2" ] }
							],

							"actions":
							[
								{ "a": "NextQuest" }
							]
						},
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "sylvan_killed", "=", "10" ] }
							],

							"actions":
							[
								{ "a": "SetQuestMarker", "p": [ "human_grove", "effects/global_map/quest_mark_silver_02" ] },
								{ "a": "CounterSet", "p": [ "forest_quest", "3" ] },
								{ "a": "CurrentSubQuestDone" },
								{ "a": "NextSubQuest", "p": [ "Questlog5a_2" ] }
							]
						}		
					]
				},
				{
					"sid": "Questlog5a_2",
					
					"name": "quest_sub_M9Q5a_2",

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "forest_quest", "=", "5" ] }								
							],

							"actions":
							[
								{ "a": "CurrentSubQuestDone" },
								{ "a": "NextQuest" }
							]
						}			
					]
				}
			]
		},
		{
			"sid": "Questlog5b",
			"activeOnStart": false,

			"comment": "helping sylvans with the forest",

			"name": "quest_name_M9Q5b",
			"desc": "quest_desc_M9Q5b",

			"sharing": "Clone",

			"subQuests":
			[				
				{
					"sid": "Questlog5b_1",
					"activeOnStart": true,
					
					"name": "quest_sub_M9Q5b_1",

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "sylvan_attacked", "=", "1" ] }
							],

							"actions":
							[
								{ "a": "SetActiveQuestMarker", "p": [ "sylvan_grove", "false" ] },
								{ "a": "SetActiveQuestMarker", "p": [ "altar_grove", "false" ] },
								{ "a": "CounterSet", "p": [ "forest_quest", "0" ] },
								
								{ "a": "NextQuest" }
							]
						},
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "forest_quest", "=", "1" ] }
							],

							"actions":
							[
								{ "a": "NextQuest" },
								
								{ "a": "SetActiveQuestMarker", "p": [ "altar_grove", "false" ] }
							]
						},
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "forest_quest", "=", "4" ] }
							],

							"actions":
							[
								{ "a": "CurrentSubQuestDone" },
								{ "a": "Dialog", "p": [ "M9Q5_dial14" ] },
								{ "a": "NextQuest" },
								
								{ "a": "SetActiveQuestMarker", "p": [ "altar_grove", "false" ] }
							]
						}		
					]
				},
				{
					"sid": "Questlog5b_2",
					"activeOnStart": true,
					
					"name": "quest_sub_M9Q5b_2",

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "forest_quest", "=", "4" ] }
							],

							"actions":
							[
								{ "a": "CurrentSubQuestDone" }
							]
						}		
					]
				},
				{
					"sid": "Questlog5b_3",
					"activeOnStart": true,
					
					"name": "quest_sub_M9Q5b_3",

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "forest_quest", "=", "4" ] }
							],

							"actions":
							[
								{ "a": "CurrentSubQuestDone" }
							]
						}		
					]
				}
			]
		},		
			{
				"sid": "supportQuestlog5a",
				"hidden": true,
				"activeOnStart": true,

				"comment": "tracking Q5a - killing sylvans + general tracking if agreed to help (for M9Q5_dial3, M9Q5_dial8)",
				
				"sharing": "Clone",

				"subQuests":
				[	
					{
						"sid": "1",
						"activeOnStart": true,

						"comment": "counting sylvans killed",

						"triggers":
						[
							{
								"repeat": true,

								"conditionsLogic": "Or",
								"conditions":
								[
									{ "c": "SquadKill", "p": [ "sylvan_grove" ] },
									{ "c": "SquadKill", "p": [ "sylvan_guard1" ] },
									{ "c": "SquadKill", "p": [ "sylvan_guard2" ] },
									{ "c": "SquadKill", "p": [ "sylvan_guard3" ] },
									{ "c": "SquadKill", "p": [ "sylvan_guard4" ] },
									{ "c": "SquadKill", "p": [ "sylvan_guard5" ] },
									{ "c": "SquadKill", "p": [ "sylvan_guard6" ] },
									{ "c": "SquadKill", "p": [ "sylvan_guard7" ] },
									{ "c": "SquadKill", "p": [ "sylvan_guard8" ] },
									{ "c": "SquadKill", "p": [ "sylvan_guard9" ] }
								],
	
								"actions":
								[
									{ "a": "CounterPlus", "p": [ "sylvan_killed", "1" ] }
								]
							}					
						]
					},
					{
						"sid": "2",
						"activeOnStart": true,

						"comment": "tracking agreements",

						"triggers":
						[
							{
								"conditions":
								[
									{ "c": "Counter", "p": [ "forest_quest", "=", "1" ] }
								],
	
								"actions":
								[
									{ "a": "CounterSet", "p": [ "agreed_with_humans", "1" ] }
								]
							},
							{
								"conditions":
								[
									{ "c": "Counter", "p": [ "forest_quest", "=", "2" ] }
								],
	
								"actions":
								[
									{ "a": "CounterSet", "p": [ "agreed_with_sylvans", "1" ] }
								]
							}
						]
					}
				]
			},
			{
				"sid": "supportQuestlog5b",
				"hidden": true,
				"activeOnStart": true,

				"comment": "tracking Q5b - sacrificing humans",
				
				"sharing": "Clone",

				"subQuests":
				[	
					{
						"sid": "1",
						"activeOnStart": true,

						"comment": "disabling sylvan quest if any of them were attacked + dialogue after killing one of them",

						"triggers":
						[
							{
								"conditions":
								[
									{ "c": "SquadKill", "p": [ "sylvan_grove" ] }
								],

								"actions":
								[
									{ "a": "CounterSet", "p": [ "sylvan_attacked", "1" ] },
									{ "a": "Dialog", "p": [ "M9Q5_dial12" ] },
									{ "a": "NextQuest" }
								]
							},
							{
								"conditionsLogic": "Or",
								"conditions":
								[
									{ "c": "SquadKill", "p": [ "sylvan_guard1" ] },
									{ "c": "SquadKill", "p": [ "sylvan_guard2" ] },
									{ "c": "SquadKill", "p": [ "sylvan_guard3" ] },
									{ "c": "SquadKill", "p": [ "sylvan_guard4" ] },
									{ "c": "SquadKill", "p": [ "sylvan_guard5" ] },
									{ "c": "SquadKill", "p": [ "sylvan_guard6" ] },
									{ "c": "SquadKill", "p": [ "sylvan_guard7" ] },
									{ "c": "SquadKill", "p": [ "sylvan_guard8" ] },
									{ "c": "SquadKill", "p": [ "sylvan_guard9" ] }
								],

								"actions":
								[
									{ "a": "CounterSet", "p": [ "sylvan_attacked", "1" ] },
									{ "a": "Dialog", "p": [ "M9Q5_dial13" ] },
									{ "a": "NextQuest" }
								]
							},
							{
								"conditions":
								[
									{ "c": "Counter", "p": [ "sylvan_attacked", "=", "1" ] }
								],

								"actions":
								[
									{ "a": "EntityActionsOff", "p": [ "sylvan_guard1" ] },
									{ "a": "EntityActionsOff", "p": [ "sylvan_guard2" ] },
									{ "a": "EntityActionsOff", "p": [ "sylvan_guard3" ] },
									{ "a": "EntityActionsOff", "p": [ "sylvan_guard4" ] },
									{ "a": "EntityActionsOff", "p": [ "sylvan_guard5" ] },
									{ "a": "EntityActionsOff", "p": [ "sylvan_guard6" ] },
									{ "a": "EntityActionsOff", "p": [ "sylvan_guard7" ] },
									{ "a": "EntityActionsOff", "p": [ "sylvan_guard8" ] },
									{ "a": "EntityActionsOff", "p": [ "sylvan_guard9" ] },
									{ "a": "EntityActionsOff", "p": [ "sylvan_grove" ] },
									{ "a": "SetActiveQuestMarker", "p": [ "sylvan_grove", "false" ] }
								]
							},
							{
								"conditions":
								[
									{ "c": "Counter", "p": [ "forest_quest", "=", "4" ] }
								],

								"actions":
								[
									{ "a": "NextQuest" }
								]
							}
						]
					}
				]
			}
	]
}