﻿{
	"counters":
	[	
		{ "sid": "waiting_for_enemy", 				"value": 0, "comment": "counter to initalize early enemy arrival" },
		{ "sid": "enemy_arrival", 					"value": 0, "comment": "summoning enemy" },
		{ "sid": "prepare_final_fight", 			"value": 0 },

		{ "sid": "talked_with_cavalryman", 			"value": 0, "comment": "counter to change dialogue with the cavalryman after the first interaction" },

		{ "sid": "pixie_killed", 					"value": 0 },

		{ "sid": "squad_river_killed", 				"value": 0, "comment": "counter not to resurrect squad at the river if it was already killed" },
		{ "sid": "found_herald_a", 					"value": 0 },
		{ "sid": "found_herald_b", 					"value": 0 },
		{ "sid": "arenas_quest", 					"value": 0, "comment": "1=started quest" },
		{ "sid": "river_source_found", 				"value": 0, "comment": "if player found river source for arena quest" },
		{ "sid": "monster_head_found", 				"value": 0, "comment": "if player found moster head for arena quest" },
		{ "sid": "ritual_started", 					"value": 0, "comment": "if player used Monster head at the river source " },
		{ "sid": "ritual_performed", 				"value": 0, "comment": "if player finished the corruption" },

		{ "sid": "mews_quest", 						"value": 0, "comment": "1=started quest, 2=finished" },
		{ "sid": "mews_destroyed", 					"value": 0, "comment": "counting destroyed mews" },

		{ "sid": "father_lost", 					"value": 0, "comment": "if 1 = all lich were killed at some point" },

		{ "sid": "dragonslayer_quest", 				"value": 0, "comment": "to track utopia clearing with dragonslayers" },
		{ "sid": "dragonslayer_quest_done", 		"value": 0, "comment": "to track utopia questmark" },
		{ "sid": "dragon_slayers_with_Funerella", 	"value": 0, "comment": "tracking dragonslayers" },
		{ "sid": "dragon_slayers_with_Marl", 		"value": 0, "comment": "tracking dragonslayers" },
		
		{ "sid": "talked_with_trogl", 				"value": 0, "comment": "1=already talked once" },
		{ "sid": "bought_item1", 					"value": 0, "comment": "auxilary counter for the trogl shopkeeper" },
		{ "sid": "bought_item2", 					"value": 0, "comment": "auxilary counter for the trogl shopkeeper" },
		{ "sid": "bought_item3", 					"value": 0, "comment": "auxilary counter for the trogl shopkeeper" },
		{ "sid": "bought_item4", 					"value": 0, "comment": "auxilary counter for the trogl shopkeeper" },
		{ "sid": "bought_item5", 					"value": 0, "comment": "auxilary counter for the trogl shopkeeper" },
		{ "sid": "bought_item6", 					"value": 0, "comment": "auxilary counter for the trogl shopkeeper" },

		{ "sid": "talked_with_lich", 				"value": 0, "comment": "1=already talked once" },
		{ "sid": "talked_with_vampire", 			"value": 0, "comment": "1=already talked once" },
		{ "sid": "talked_with_graverobber", 		"value": 0, "comment": "1=already talked once" },
		{ "sid": "graverobber_quest", 				"value": 0, "comment": "to track pet raising" },
		
		{ "sid": "talked_with_gorillas", 			"value": 0, "comment": "1=already talked once" },
		{ "sid": "asked_about_one_skeleton", 		"value": 0 },

		{ "sid": "gems_tossed", 					"value": 0, "comment": "counting the gems tossed in the pond" },
		{ "sid": "pond_cooldown", 					"value": 0, "comment": "refreshing pond reward based on amount of gems tossed" },
		
		{ "sid": "visited_construction_site", 		"value": 0, "comment": "1=already visited construction site" },
		{ "sid": "construction_site_quest", 		"value": 0, "comment": "1=started, 2=finished" },

		{ "sid": "marl_quest", 						"value": 0, "comment": "1=started, 2=all sylvans are killed, return to the tomb, 3=finished" },
		{ "sid": "weakening_mycelium_progress", 	"value": 0, "comment": "counting types of sylvans killed" },
		{ "sid": "marl_resurrected", 				"value": 0, "comment": "1=marl is alive, the tomb is empty" },
		{ "sid": "killed_tier1", 					"value": 0 },
		{ "sid": "killed_tier2", 					"value": 0 },
		{ "sid": "killed_tier3", 					"value": 0 },
		{ "sid": "killed_tier4", 					"value": 0 },
		{ "sid": "killed_tier5", 					"value": 0 },
		{ "sid": "killed_tier6", 					"value": 0 },
		{ "sid": "killed_tier7", 					"value": 0 }
	],

	"interruptions":
	[
		{
			"sid": "before_bossfight1",
			"interruption": "BeforeHeroVsHero",
			"activeOnStart": true,
			"p": [ "cm_fun_hero_1", "cm_fun_hero_human_1" ],

			"actions":
			[
				{ "a": "Dialog", "p": [ "fun_enemy_fight" ] }
			]
		},
		{
			"sid": "before_bossfight2",
			"interruption": "BeforeHeroVsHero",
			"activeOnStart": true,
			"p": [ "necro_hero_7", "cm_fun_hero_human_1" ],

			"actions":
			[
				{ "a": "Dialog", "p": [ "fun_enemy_fight_marl" ] }
			]
		},
		{
			"sid": "after_bossfight_win",
			"interruption": "AfterIamWinVsHero",
			"activeOnStart": true,
			"p": [ "cm_fun_hero_human_1" ],

			"actions":
			[
				{ "a": "Dialog", "p": [ "fun_enemy_win" ] }
			]
		},
		{
			"sid": "after_bossfight_lose",
			"interruption": "AfterHeroWinVsHero",
			"activeOnStart": true,
			"p": [ "cm_fun_hero_human_1", "cm_fun_hero_1" ],

			"actions":
			[
				{ "a": "Dialog", "p": [ "fun_enemy_lose" ] }
			]
		}
	],

	"quests":
	[	
		{
			"sid": "intro_custom_map_3",
			"hidden": true,

			"comment": "intro",

			"activeOnStart": true,
			"sharing": "Clone",

			"name": "1",

			"subQuests":
			[	
				{
					"sid": "1", "activeOnStart": true,
					"triggers":
					[
						{
							"conditions": [ { "c": "StartTurn", "p": [ "1", "1" ] } ],
							"actions":
							[
								{ "a": "RemoveRes", "p": [ "gold", "999999" ] },
								{ "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" ] }
							]
						}
					]
				},
				{
					"sid": "2", "activeOnStart": true,
					"triggers":
					[
						{
							"conditions": [ { "c": "StartTurn", "p": [ "1", "1" ] } ],
							"actions":
							[
								{ "a": "AddBuffHeroDays", "p": [ "cm_fun_necromancy_reserve_bonus_1", "cm_fun_hero_1" ] },
								
								{ "a": "CounterPlus", "p": [ "dragonslayer_quest", "0" ] },
								{ "a": "CounterPlus", "p": [ "arenas_quest", "0" ] }
							]
						}
					]
				},
				{
					"sid": "3", "activeOnStart": true,
					"triggers":
					[
						{
							"conditions": [ { "c": "StartTurn", "p": [ "1", "1" ] } ],
							"actions":
							[
								{ "a": "SetQuestMarker", "p": [ "cavalryman", "effects/global_map/quest_mark_silver_01" ] },
								{ "a": "SetQuestMarker", "p": [ "gorilla", "effects/global_map/quest_mark_silver_01" ] },
								{ "a": "SetQuestMarker", "p": [ "trogl", "effects/global_map/quest_mark_silver_01" ] },
								{ "a": "SetQuestMarker", "p": [ "dragonslayers", "effects/global_map/quest_mark_silver_01" ] },
								{ "a": "CreateVFX", "p": [ "fx_2x2_quest_mark_silver_01", "2398", "false", "true", "qm_construction_site" ] },
								{ "a": "CreateVFX", "p": [ "fx_quest_mark_gold_03", "1345", "false", "true", "pm_west_road" ] },
								{ "a": "SetQuestMarker", "p": [ "tomb", "effects/global_map/quest_mark_silver_01" ] },
								{ "a": "SetQuestMarker", "p": [ "herald_a", "effects/global_map/quest_mark_silver_01" ] },
								{ "a": "SetQuestMarker", "p": [ "herald_b", "effects/global_map/quest_mark_silver_01" ] },
								{ "a": "SetQuestMarker", "p": [ "lich", "effects/global_map/quest_mark_silver_01" ] },
								{ "a": "SetQuestMarker", "p": [ "graverobber", "effects/global_map/quest_mark_silver_01" ] },
								{ "a": "SetQuestMarker", "p": [ "vampire", "effects/global_map/quest_mark_silver_01" ] },

								{ "a": "Dialog", "p": [ "fun_intro" ] }
							]
						}
					]
				}
			]
		},
		{
			"sid": "MainQuest",
			"main": true,
			"hidden": false,

			"activeOnStart": true,

			"sharing": "Clone",

			"comment": "main quest = defeat enemy hero that spawns in the end",
			
			"name": "fun_quest_name_q1",
			"desc": "fun_quest_desc_q1",

			"subQuests":
			[	
				{
					"sid": "MainQuest_1",
					"activeOnStart": true,

					"name": "fun_sub_name_q1_1",

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "AnyStartTurn", "p":[ "2", "2", "1" ] }
							],

							"actions":
							[
								{ "a": "CurrentSubQuestDone" },
								{ "a": "SetActiveVFX", "p": [ "pm_west_road", "false" ] },
								{ "a": "SpawnHero", "p": [ "cm_fun_hero_human_1", "1344", "1" ] },
								{ "a": "DisableAiHero", "p": [ "cm_fun_hero_human_1" ] },
								{ "a": "HeroToNode", "p": [ "cm_fun_hero_human_1", "1345" ] },

								{ "a": "CounterSet", "p": [ "enemy_arrival", "1" ] },

								{ "a": "Dialog", "p": [ "fun_enemy_appears" ] }
							]
						},
						{
							"conditions":
							[	
								{ "c": "Counter", "p":[ "waiting_for_enemy", "=", "1" ] }
							],

							"actions":
							[
								{ "a": "CurrentSubQuestDone" },
								{ "a": "SetActiveVFX", "p": [ "pm_west_road", "false" ] },

								{ "a": "Dialog", "p": [ "fun_enemy_to_arrive" ] },
								{ "a": "SpawnHero", "p": [ "cm_fun_hero_human_1", "1344", "1" ] },
								{ "a": "DisableAiHero", "p": [ "cm_fun_hero_human_1" ] },
								{ "a": "HeroToNode", "p": [ "cm_fun_hero_human_1", "1345" ] },

								{ "a": "CounterSet", "p": [ "enemy_arrival", "1" ] },
								
								{ "a": "DisableInterruption", "p": [ "before_bossfight1" ] },
								{ "a": "Dialog", "p": [ "fun_enemy_fight" ] },
								{ "a": "HeroToHero", "p": [ "cm_fun_hero_human_1", "cm_fun_hero_1" ] }
							]
						}
					]
				},
				{
					"sid": "MainQuest_2",
					"activeOnStart": true,

					"name": "fun_sub_name_q1_2",

					"triggers":
					[
						{
							"conditions":
							[	
								{ "c": "HeroKill", "p":[ "cm_fun_hero_1" ] }
							],

							"actions":
							[
								{ "a": "GameLose" }
							]
						},
						{
							"conditions":
							[	
								{ "c": "HeroKill", "p":[ "cm_fun_hero_human_1" ] }
							],

							"actions":
							[
								{ "a": "CurrentSubQuestDone" }
							]
						}
					]
				},
				{
					"sid": "MainQuest_3",
					"activeOnStart": false,

					"name": "fun_sub_name_q1_3",

					"triggers":
					[
						{
							"conditions":
							[	
								{ "c": "HeroKill", "p":[ "cm_fun_hero_human_1" ] }
							],

							"actions":
							[
								{ "a": "CurrentSubQuestDone" }
							]
						}
					]
				}
			]
		},
			{
				"sid": "support_MainQuest",
				"main": false,
				"hidden": true,

				"activeOnStart": true,

				"sharing": "Clone",

				"subQuests":
				[	
					{
						"sid": "1",
						"activeOnStart": true,

						"comment": "summoning the enemy and setting its strength",

						"triggers":
						[
							{
								"conditions":
								[	
									{ "c": "Counter", "p":[ "enemy_arrival", "=", "1" ] }
								],

								"actions":
								[
									{ "a": "SubQuestActivate", "p":[ "MainQuest", "MainQuest_3" ]}
								]
							}
						]
					},
					{
						"sid": "2",
						"activeOnStart": true,

						"comment": "removing obstacles and ending side quests + preventing new from starting when enemy spawns",

						"triggers":
						[
							{
								"conditions":
								[
									{ "c": "Counter", "p":[ "prepare_final_fight", "=", "1" ] }
								],

								"actions":
								[
									{ "a": "DeleteEntity", "p": [ "herald_a" ] },
									{ "a": "DeleteEntity", "p": [ "herald_b" ] },
									{ "a": "DeleteSquad", "p": [ "blocking_squad1", "1" ] },
									{ "a": "DeleteSquad", "p": [ "blocking_squad2", "1" ] },
									{ "a": "DeleteSquad", "p": [ "blocking_squad3", "1" ] },
									{ "a": "DeleteSquad", "p": [ "blocking_squad4", "1" ] },
									{ "a": "DeleteSquad", "p": [ "blocking_squad5", "1" ] },
									{ "a": "DeleteSquad", "p": [ "blocking_squad6", "1" ] },
									{ "a": "DeleteSquad", "p": [ "blocking_squad7", "1" ] },
									{ "a": "DeleteSquad", "p": [ "blocking_squad8", "1" ] },
									{ "a": "DeleteSquad", "p": [ "blocking_squad9", "1" ] },
									{ "a": "DeleteSquad", "p": [ "blocking_squad10", "1" ] },
									{ "a": "DeleteSquad", "p": [ "blocking_squad11", "1" ] },
									{ "a": "DeleteSquad", "p": [ "blocking_squad12", "1" ] },
									{ "a": "DeleteSquad", "p": [ "blocking_squad13", "1" ] },
									{ "a": "DeleteSquad", "p": [ "blocking_squad14", "1" ] },
									{ "a": "DeleteSquad", "p": [ "blocking_squad15", "1" ] },
									{ "a": "DeleteSquad", "p": [ "blocking_squad16", "1" ] },
									{ "a": "DeleteSquad", "p": [ "blocking_squad17", "1" ] },
									{ "a": "DeleteSquad", "p": [ "blocking_squad18", "1" ] },
									{ "a": "DeleteSquad", "p": [ "blocking_squad19", "1" ] },
									{ "a": "DeleteSquad", "p": [ "blocking_squad20", "1" ] },
									{ "a": "DeleteSquad", "p": [ "blocking_squad21", "1" ] },

									{ "a": "DeleteEntity", "p": [ "blocking_res1" ] },

									{ "a": "DeleteEntity", "p": [ "zone_found_herald_a" ] },
									{ "a": "DeleteEntity", "p": [ "zone_found_herald_b" ] },
									{ "a": "DeleteEntity", "p": [ "zone_enemy" ] }
								]
							}
						]
					},
					{
						"sid": "3",
						"activeOnStart": true,

						"comment": "infinitely resurrecting Marl",

						"triggers":
						[
							{
								"repeat": true,
								"conditions":
								[	
									{ "c": "HeroKill", "p":[ "necro_hero_7" ] }
								],

								"actions":
								[
									{ "a": "SpawnHero", "p": [ "necro_hero_7", "2860", "0" ] },
									{ "a": "ChangeManaHero", "p": [ "necro_hero_7", "100" ] },
									{ "a": "RemoveUnitHero", "p": [ "skeleton", "all", "necro_hero_7" ] },
									{ "a": "GiveUnitHero", "p": [ "skeleton", "1", "necro_hero_7" ] },
									{ "a": "RemoveUnitHero", "p": [ "flicker", "all", "necro_hero_7" ] },
									{ "a": "RemoveUnitHero", "p": [ "pet", "all", "necro_hero_7" ] },
									{ "a": "GiveStatsHero", "p": [ "offence", "necro_hero_7", "-999" ] },
									{ "a": "GiveStatsHero", "p": [ "offence", "necro_hero_7", "-999" ] },
									{ "a": "GiveStatsHero", "p": [ "defence", "necro_hero_7", "-999" ] },
									{ "a": "GiveStatsHero", "p": [ "spellPower", "necro_hero_7", "-999" ] },
									{ "a": "GiveStatsHero", "p": [ "intelligence", "necro_hero_7", "-999" ] },
									{ "a": "Dialog", "p": [ "fun_resurrection_marl_reborn" ] }
								]
							}
						]
					}
				]
			},
			{
				"sid": "support_MainQuest_AI",
				"main": false,
				"hidden": true,

				"activeOnStart": true,

				"sharing": "Ai",

				"comment": "moving the enemy",

				"subQuests":
				[
					{
						"sid": "1",
						"activeOnStart": true,

						"triggers":
						[
							{
								"conditions":
								[
									{ "c": "AnyStartTurn", "p":[ "2", "2", "1" ] }
								],

								"actions":
								[
									{ "a": "NextSubQuest", "p": [ "2" ] }
								]
							}
						]
					},
					{
						"sid": "2",
						"activeOnStart": false,

						"triggers":
						[
							{
								"repeat": true,
								"conditions":
								[	
									{ "c": "StartTurn", "counter": 1 }
								],

								"actions":
								[
									{ "a": "HeroToHero", "p": [ "cm_fun_hero_human_1", "cm_fun_hero_1" ] },
									{ "a": "HeroToHero", "p": [ "cm_fun_hero_human_1", "necro_hero_7" ] },
									
									{ "a": "SetHeroMovePoints", "p": [ "cm_fun_hero_human_1", "9999" ] },
									{ "a": "HeroToHero", "p": [ "cm_fun_hero_human_1", "cm_fun_hero_1" ] }
								]
							}
						]
					}
				]
			},
			{
				"sid": "tracking_dragon_utopia_questmark",
				"main": false,
				"hidden": true,

				"activeOnStart": true,

				"sharing": "Clone",

				"subQuests":
				[
					{
						"sid": "1",
						"activeOnStart": true,

						"triggers":
						[
							{
								"conditionsLogic": "And",
								"conditions":
								[
									{ "c": "Counter", "p": [ "monster_head_found", "=", "1" ] },
									{ "c": "Counter", "p": [ "dragonslayer_quest_done", "=", "1" ] }
								],

								"actions":
								[
									{ "a": "SetActiveQuestMarker", "p": [ "dragon_utopia", "false" ] }
								]
							},
							{
								"conditionsLogic": "And",
								"conditions":
								[
									{ "c": "Counter", "p": [ "arenas_quest", "<", "1" ] },
									{ "c": "Counter", "p": [ "dragonslayer_quest_done", "=", "1" ] }
								],

								"actions":
								[
									{ "a": "SetActiveQuestMarker", "p": [ "dragon_utopia", "false" ] }
								]
							},
							{
								"conditionsLogic": "And",
								"conditions":
								[
									{ "c": "Counter", "p": [ "monster_head_found", "=", "1" ] },
									{ "c": "Counter", "p": [ "dragonslayer_quest", "<", "1" ] }
								],

								"actions":
								[
									{ "a": "SetActiveQuestMarker", "p": [ "dragon_utopia", "false" ] }
								]
							}
						]
					}
				]
			},


			{
				"sid": "setup_SideQuest1",
				"main": false,

				"hidden": true,
				"activeOnStart": true,
				"sharing": "Clone",
				"subQuests":
				[	
					{
						"sid": "1",
						"activeOnStart": true,

						"triggers":
						[
							{
								"conditions":
								[
									{ "c": "Counter", "p": [ "arenas_quest", "=", "1" ] }
								],

								"actions":
								[
									{ "a": "TriggerClearCustom", "p": [ "tracking_dragon_utopia_questmark", "1", "1", "0" ] },
									
									{ "a": "NextQuest", "p": [ "SideQuest1" ] },
									{ "a": "SubQuestActivate", "p": [ "setup_SideQuest1", "2" ] },

									{ "a": "CounterPlus", "p": [ "river_source_found", "0" ] },
									{ "a": "CounterPlus", "p": [ "monster_head_found", "0" ] },

									{ "a": "SetActiveMarker", "p": [ "zone_found_river_source", "true" ] },
									{ "a": "SetActiveMarker", "p": [ "zone_river_source", "true" ] },
									{ "a": "CreateVFX", "p": [ "fx_quest_mark_silver_03", "1014", "false", "true", "pm_river_source" ] }
								]
							}
						]
					},
					{
						"sid": "2",
						"activeOnStart": false,

						"triggers":
						[
							{
								"conditions":
								[
									{ "c": "Counter", "p": [ "monster_head_found", "=", "0" ] }
								],

								"actions":
								[
									{ "a": "SetQuestMarker", "p": [ "dragon_utopia", "effects/global_map/quest_mark_silver_02" ] },
									{ "a": "SetActiveQuestMarker", "p": [ "dragon_utopia", "true" ] }
								]
							}
						]
					}
				]
			},
		{
			"sid": "SideQuest1",
			"main": false,

			"comment": "corrupt the pond to hire deathknights",
			"hidden": false,
			"activeOnStart": false,
			"sharing": "Clone",

			"subQuestGroups":
			[
				{
					"sid": "SideQuest1_group1",
					"subQuests": [ "SideQuest1_1", "SideQuest1_2" ]
				}
			],

			"name": "fun_quest_name_q2",
			"subQuests":
			[	
				{
					"sid": "SideQuest1_1",
					"activeOnStart": true,
					"name": "fun_sub_name_q2_1",

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "river_source_found", "=", "1" ] }
							],

							"actions":
							[
								{ "a": "CreateVFX", "p": [ "fx_map_object_blocked", "1078", "false", "true", "interactable_river_source" ] },
								{ "a": "CurrentSubQuestDone" },
								{ "a": "NextAfterGroup", "p": [ "SideQuest1_group1", "SideQuest1_3" ] }						
							]
						}
					]
				},
				{
					"sid": "SideQuest1_2",
					"activeOnStart": true,
					"name": "fun_sub_name_q2_2",

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "monster_head_found", "=", "1" ] }
							],

							"actions":
							[
								{ "a": "CurrentSubQuestDone" },
								{ "a": "NextAfterGroup", "p": [ "SideQuest1_group1", "SideQuest1_3" ] }						
							]
						}
					]
				},
				{
					"sid": "SideQuest1_3",
					"activeOnStart": false,
					"name": "fun_sub_name_q2_3",

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "ritual_started", "=", "1" ] }
							],

							"actions":
							[
								{ "a": "SetActiveVFX", "p": [ "interactable_river_source", "false" ] },
								{ "a": "SetActiveVFX", "p": [ "pm_river_source", "false" ] },
								{ "a": "CurrentSubQuestDone" }					
							]
						},
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "ritual_performed", "=", "1" ] }
							],

							"actions":
							[
								{ "a": "NextQuest" }					
							]
						}
					]
				}
			]
		},
			{
				"sid": "support_SideQuest1",
				"main": false,

				"hidden": true,
				"activeOnStart": true,
				"sharing": "Clone",
				"subQuests":
				[	
					{
						"sid": "1",
						"activeOnStart": true,
						"comment": "dialog when seiing any of 2 heralds near the arenas",

						"triggers":
						[
							{
								"conditions":
								[
									{ "c": "Counter", "p": [ "found_herald_a", "=", "1" ] }
								],

								"actions":
								[
									{ "a": "DeleteSquad", "p": [ "herald_b", "1" ] },
									{ "a": "DeleteEntity", "p": [ "zone_found_herald_b" ] },
									{ "a": "NextSubQuest", "p": [ "2" ] },
									{ "a": "Dialog", "p": [ "fun_arenas_found_herald_a" ] }
								]
							},
							{
								"conditions":
								[
									{ "c": "Counter", "p": [ "found_herald_b", "=", "1" ] }
								],

								"actions":
								[
									{ "a": "DeleteSquad", "p": [ "herald_a", "1" ] },
									{ "a": "DeleteEntity", "p": [ "zone_found_herald_a" ] },
									{ "a": "NextSubQuest", "p": [ "2" ] },
									{ "a": "Dialog", "p": [ "fun_arenas_found_herald_b" ] }
								]
							}
						]
					},
					{
						"sid": "2",
						"activeOnStart": false,
						"comment": "dialog after killing herald",

						"triggers":
						[
							{
								"conditionsLogic": "Or",

								"conditions":
								[
									{ "c": "SquadKill", "p": [ "herald_a" ] },
									{ "c": "SquadKill", "p": [ "herald_b" ] }
								],

								"actions":
								[
									{ "a": "Dialog", "p": [ "fun_arenas_defeated_herald" ] }
								]
							}
						]
					}
				]
			},

		{
			"sid": "SideQuest2",
			"main": false,

			"comment": "killing pixies",
			"hidden": true,
			"activeOnStart": true,
			"sharing": "Clone",
			"subQuests":
			[	
				{
					"sid": "SideQuest2_1",
					"activeOnStart": true,

					"triggers":
					[
						{
							"repeat": true,
							"conditionsLogic": "Or",

							"conditions":
							[
								{ "c": "SquadInteraction", "p": [ "pixie1" ] },
								{ "c": "SquadInteraction", "p": [ "pixie2" ] },
								{ "c": "SquadInteraction", "p": [ "pixie3" ] },
								{ "c": "SquadInteraction", "p": [ "pixie4" ] },
								{ "c": "SquadInteraction", "p": [ "pixie5" ] },
								{ "c": "SquadInteraction", "p": [ "pixie6" ] }
							],

							"actions":
							[
								{ "a": "AddBuffHeroDays", "p": [ "cm_fun_necromancy_power_disabled", "", "1" ] }
							]
						},
						{
							"repeat": true,
							"conditionsLogic": "Or",

							"conditions":
							[
								{ "c": "SquadKill", "p": [ "pixie1" ] },
								{ "c": "SquadKill", "p": [ "pixie2" ] },
								{ "c": "SquadKill", "p": [ "pixie3" ] },
								{ "c": "SquadKill", "p": [ "pixie4" ] },
								{ "c": "SquadKill", "p": [ "pixie5" ] },
								{ "c": "SquadKill", "p": [ "pixie6" ] }
							],

							"actions":
							[
								{ "a": "RemoveBuffHero", "p": [ "cm_fun_necromancy_power_disabled", "" ] },
								{ "a": "Dialog", "p": [ "fun_pixies_raising_flickers" ] }
							]
						}
					]
				}
			]
		},

			{
				"sid": "setup_SideQuest3",
				"main": false,

				"hidden": true,
				"activeOnStart": true,
				"sharing": "Clone",
				"subQuests":
				[	
					{
						"sid": "1",
						"activeOnStart": true,

						"triggers":
						[
							{
								"conditionsLogic": "Or",
								"conditions":
								[
									{ "c": "SquadKill", "p": [ "mews_guard1" ] },
									{ "c": "SquadKill", "p": [ "mews_guard2" ] },
									{ "c": "SquadKill", "p": [ "mews_guard3" ] },
									{ "c": "SquadKill", "p": [ "mews_guard4" ] },
									{ "c": "SquadKill", "p": [ "mews_guard5" ] },
									{ "c": "SquadKill", "p": [ "mews_guard6" ] },
									{ "c": "SquadKill", "p": [ "mews_guard7" ] },
									{ "c": "SquadKill", "p": [ "mews_guard8" ] }
								],

								"actions":
								[
									{ "a": "Dialog", "p": [ "fun_mews_first_destroyed" ] }
								]
							},
							{
								"conditions":
								[
									{ "c": "Counter", "p": [ "mews_quest", "=", "1" ] }
								],

								"actions":
								[
									{ "a": "NextQuest", "p": [ "SideQuest3" ] },

									{ "a": "SetQuestMarker", "p": [ "mews1", "effects/global_map/quest_mark_silver_02" ] },
									{ "a": "SetQuestMarker", "p": [ "mews2", "effects/global_map/quest_mark_silver_02" ] },
									{ "a": "SetQuestMarker", "p": [ "mews3", "effects/global_map/quest_mark_silver_02" ] },
									{ "a": "SetQuestMarker", "p": [ "mews4", "effects/global_map/quest_mark_silver_02" ] },
									{ "a": "SetQuestMarker", "p": [ "mews5", "effects/global_map/quest_mark_silver_02" ] },
									{ "a": "SetQuestMarker", "p": [ "mews6", "effects/global_map/quest_mark_silver_02" ] },
									{ "a": "SetQuestMarker", "p": [ "mews7", "effects/global_map/quest_mark_silver_02" ] },
									{ "a": "SetQuestMarker", "p": [ "mews8", "effects/global_map/quest_mark_silver_02" ] },

									{ "a": "CounterPlus", "p": [ "mews_destroyed", "0" ] }
								]
							}
						]
					}
				]
			},
		{
			"sid": "SideQuest3",
			"main": false,

			"hidden": false,
			"activeOnStart": false,
			"sharing": "Clone",

			"name": "fun_quest_name_q3",
			"desc": "fun_quest_desc_q3",
			"subQuests":
			[	
				{
					"sid": "SideQuest3_1",
					"activeOnStart": true,

					"name": "fun_sub_name_q3_1",

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "mews_destroyed", "=", "2" ] }
							],

							"actions":
							[
								{ "a": "Dialog", "p": [ "fun_mews_several_destroyed" ] }
							]
						},
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "mews_destroyed", "=", "5" ] }
							],

							"actions":
							[
								{ "a": "Dialog", "p": [ "fun_mews_a_lot_destroyed" ] }
							]
						},
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "mews_destroyed", "=", "8" ] }
							],

							"actions":
							[
								{ "a": "CurrentSubQuestDone" },
								{ "a": "Dialog", "p": [ "fun_mews_all_destroyed" ] },
								{ "a": "CounterSet", "p": [ "mews_quest", "2" ] }
							]
						},
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "mews_quest", "=", "2" ] }
							],

							"actions":
							[
								{ "a": "NextQuest" }
							]
						}
					]
				}
			]
		},
			{
				"sid": "support_SideQuest3",
				"main": false,

				"comment": "destroying mews",
				"hidden": true,
				"activeOnStart": true,
				"sharing": "Clone",
				"subQuests":
				[	
					{
						"sid": "1",
						"activeOnStart": true,

						"triggers":
						[
							{
								"conditions": [ { "c": "SquadKill", "p": [ "mews_guard1" ] } ],

								"actions":
								[
									{ "a": "RemoveBuffHero", "p": [ "cm_fun_necromancy_power_disabled", "" ] },
									{ "a": "DeleteEntity", "p": [ "mews1" ] },
									{ "a": "SpawnMapObject", "p": [ "hill_dead_big", "1986", "0" ] },
									{ "a": "Dialog", "p": [ "fun_mews_raising_archers" ] },
									{ "a": "CounterPlus", "p": [ "mews_destroyed", "1" ] }
								]
							},
							{
								"conditions": [ { "c": "SquadKill", "p": [ "mews_guard2" ] } ],

								"actions":
								[
									{ "a": "RemoveBuffHero", "p": [ "cm_fun_necromancy_power_disabled", "" ] },
									{ "a": "DeleteEntity", "p": [ "mews2" ] },
									{ "a": "SpawnMapObject", "p": [ "hill_dead_big", "2217", "0" ] },
									{ "a": "Dialog", "p": [ "fun_mews_raising_archers" ] },
									{ "a": "CounterPlus", "p": [ "mews_destroyed", "1" ] }
								]
							},
							{
								"conditions": [ { "c": "SquadKill", "p": [ "mews_guard3" ] } ],

								"actions":
								[
									{ "a": "RemoveBuffHero", "p": [ "cm_fun_necromancy_power_disabled", "" ] },
									{ "a": "DeleteEntity", "p": [ "mews3" ] },
									{ "a": "SpawnMapObject", "p": [ "hill_dead_big", "1936", "0" ] },
									{ "a": "Dialog", "p": [ "fun_mews_raising_archers" ] },
									{ "a": "CounterPlus", "p": [ "mews_destroyed", "1" ] }
								]
							},
							{
								"conditions": [ { "c": "SquadKill", "p": [ "mews_guard4" ] } ],

								"actions":
								[
									{ "a": "RemoveBuffHero", "p": [ "cm_fun_necromancy_power_disabled", "" ] },
									{ "a": "DeleteEntity", "p": [ "mews4" ] },
									{ "a": "SpawnMapObject", "p": [ "hill_dead_big", "257", "0" ] },
									{ "a": "Dialog", "p": [ "fun_mews_raising_archers" ] },
									{ "a": "CounterPlus", "p": [ "mews_destroyed", "1" ] }
								]
							},
							{
								"conditions": [ { "c": "SquadKill", "p": [ "mews_guard5" ] } ],

								"actions":
								[
									{ "a": "RemoveBuffHero", "p": [ "cm_fun_necromancy_power_disabled", "" ] },
									{ "a": "DeleteEntity", "p": [ "mews5" ] },
									{ "a": "SpawnMapObject", "p": [ "hill_dead_big", "278", "0" ] },
									{ "a": "Dialog", "p": [ "fun_mews_raising_archers" ] },
									{ "a": "CounterPlus", "p": [ "mews_destroyed", "1" ] }
								]
							},
							{
								"conditions": [ { "c": "SquadKill", "p": [ "mews_guard6" ] } ],

								"actions":
								[
									{ "a": "RemoveBuffHero", "p": [ "cm_fun_necromancy_power_disabled", "" ] },
									{ "a": "DeleteEntity", "p": [ "mews6" ] },
									{ "a": "SpawnMapObject", "p": [ "hill_dead_big", "417", "0" ] },
									{ "a": "Dialog", "p": [ "fun_mews_raising_archers" ] },
									{ "a": "CounterPlus", "p": [ "mews_destroyed", "1" ] }
								]
							},
							{
								"conditions": [ { "c": "SquadKill", "p": [ "mews_guard7" ] } ],

								"actions":
								[
									{ "a": "RemoveBuffHero", "p": [ "cm_fun_necromancy_power_disabled", "" ] },
									{ "a": "DeleteEntity", "p": [ "mews7" ] },
									{ "a": "SpawnMapObject", "p": [ "hill_dead_big", "2842", "0" ] },
									{ "a": "Dialog", "p": [ "fun_mews_raising_archers" ] },
									{ "a": "CounterPlus", "p": [ "mews_destroyed", "1" ] }
								]
							},
							{
								"conditions": [ { "c": "SquadKill", "p": [ "mews_guard8" ] } ],

								"actions":
								[
									{ "a": "RemoveBuffHero", "p": [ "cm_fun_necromancy_power_disabled", "" ] },
									{ "a": "DeleteEntity", "p": [ "mews8" ] },
									{ "a": "SpawnMapObject", "p": [ "hill_dead_big", "507", "0" ] },
									{ "a": "Dialog", "p": [ "fun_mews_raising_archers" ] },
									{ "a": "CounterPlus", "p": [ "mews_destroyed", "1" ] }
								]
							}
						]
					}
				]
			},

		{
			"sid": "SideQuest4",
			"main": false,

			"comment": "events with lich as Funerella's father //TEMPORARILY DISABLED",
			"hidden": true,
			"activeOnStart": true,
			"sharing": "Clone",
			"subQuests":
			[
				{
					"sid": "SideQuest4_1_1",
					"activeOnStart": true,

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "UnitOwnSide", "p": [ "lich_upg_alt", "=", "0" ] }
							],

							"actions":
							[
								{ "a": "Dialog", "p": [ "fun_father_lost_first_time" ] },
								{ "a": "SubQuestDeactivate", "p": [ "SideQuest4", "SideQuest4_2_1" ] },
								{ "a": "SubQuestActivate", "p": [ "SideQuest4", "SideQuest4_2_2" ] }
							]
						}
					]
				},
				{
					"sid": "SideQuest4_2_1",
					"activeOnStart": true,

					"comment": "adding new liches if father is still alive",

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "UnitOwnSide", "p": [ "lich_upg_alt", ">", "1" ] }
							],

							"actions":
							[
								{ "a": "Dialog", "p": [ "fun_father_more_liches_added" ] }
							]
						}
					]
				},
				{
					"sid": "SideQuest4_2_2",
					"activeOnStart": false,
					
					"comment": "adding new liches after father died",

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "UnitOwnSide", "p": [ "lich_upg_alt", ">", "0" ] }
							],

							"actions":
							[
								{ "a": "Dialog", "p": [ "fun_father_more_liches_added" ] }
							]
						}
					]
				}
			]
		},

			{
				"sid": "setup_SideQuest5",
				"main": false,

				"hidden": true,
				"activeOnStart": true,
				"sharing": "Clone",
				"subQuests":
				[	
					{
						"sid": "1",
						"activeOnStart": true,

						"triggers":
						[
							{
								"conditions":
								[
									{ "c": "Counter", "p": [ "dragonslayer_quest", "=", "1" ] }
								],

								"actions":
								[
									{ "a": "TriggerClearCustom", "p": [ "tracking_dragon_utopia_questmark", "1", "2", "1" ] },

									{ "a": "SubQuestActivate", "p":[ "support_SideQuest5_2", "1" ]},
									{ "a": "NextQuest", "p": [ "SideQuest5" ] },

									{ "a": "SetQuestMarker", "p": [ "dragon_utopia", "effects/global_map/quest_mark_silver_02" ] },
									{ "a": "SetActiveQuestMarker", "p": [ "dragon_utopia", "true" ] }
								]
							}
						]
					}
				]
			},
		{
			"sid": "SideQuest5",
			"main": false,

			"comment": "dragonslayers quest",
			"hidden": false,
			"activeOnStart": false,
			"sharing": "Clone",

			"name": "fun_quest_name_q5",
			"desc": "fun_quest_desc_q5",
			"subQuests":
			[	
				{
					"sid": "SideQuest5_1",
					"activeOnStart": true,

					"name":"fun_sub_name_q5_1",

					"triggers":
					[
						{
							"conditions": [ { "c": "StartTurn", "counter": 5 } ],

							"actions": [ { "a": "Dialog", "p": [ "fun_dragonslayers_slow" ] } ]
						},
						{
							"conditions": [ { "c": "StartTurn", "counter": 11 } ],

							"actions": [ { "a": "CounterSet", "p": [ "dragonslayer_quest_done", "1" ] }, { "a": "Dialog", "p": [ "fun_dragonslayers_too_slow" ] }, { "a": "NextQuest" } ]
						},
						{
							"conditions": [ { "c": "UnitLose", "p": [ "dragon_hunter" ], "counter": 4 } ],

							"actions": [ { "a": "NextQuest" } ]
						},
						{
							"conditions": [ { "c": "ObjectInteractionAfter", "p": [ "dragon_utopia" ] } ],

							"actions": [ { "a": "CounterSet", "p": [ "dragonslayer_quest_done", "1" ] }, { "a": "Dialog", "p":["fun_dragonslayers_completed"] }, { "a": "NextQuest" } ]
						}
					]
				}
			]
		},
			{
				"sid": "support_SideQuest5_1",
				"main": false,

				"comment": "resurrecting killed dragon slayers",

				"hidden": true,
				"activeOnStart": true,
				"sharing": "Clone",
				"subQuests":
				[	
					{
						"sid": "1",
						"activeOnStart": true,

						"triggers":
						[
							{
								"conditions": [ { "c": "SquadKill", "p": [ "dragonslayers" ] } ],

								"actions": [ { "a": "RemoveBuffHero", "p": [ "cm_fun_necromancy_power_disabled", "" ] }, { "a": "Dialog", "p": [ "fun_dragonslayers_raising_death_knights" ] } ]
							},
							{
								"conditions": [ { "c": "Counter", "p": [ "dragonslayer_quest", "=", "1" ] } ],

								"actions": [ { "a": "NextSubQuest", "p": [ "2" ] } ]
							},
							{
								"conditions": [ { "c": "Counter", "p": [ "monster_head_found", ">", "0" ] } ],

								"actions": [ { "a": "NextQuest" } ]
							}
						]
					},
					{
						"sid": "2",
						"activeOnStart": false,

						"triggers":
						[
							{
								"conditions": [ { "c": "SquadKill", "p": [ "dragonslayers_leaving" ] } ],

								"actions": [ { "a": "RemoveBuffHero", "p": [ "cm_fun_necromancy_power_disabled", "" ] }, { "a": "Dialog", "p": [ "fun_dragonslayers_raising_death_knights" ] } ]
							}
						]
					}
				]
			},
			{
				"sid": "support_SideQuest5_2",
				"main": false,

				"comment": "tracking dragon slayers location",

				"hidden": true,
				"activeOnStart": true,
				"sharing": "Clone",
				"subQuests":
				[	
					{
						"sid": "1",
						"activeOnStart": false,

						"triggers":
						[
							{
								"repeat": true,
								"conditions": [ { "c": "UnitOwnHero", "p": [ "cm_fun_hero_1", "dragon_hunter", "=", "0" ] } ],

								"actions": [ { "a": "CounterSet", "p": [ "dragon_slayers_with_Funerella", "0" ] } ]
							},
							{
								"repeat": true,
								"conditions": [ { "c": "UnitOwnHero", "p": [ "cm_fun_hero_1", "dragon_hunter", ">", "0" ] } ],

								"actions": [ { "a": "CounterSet", "p": [ "dragon_slayers_with_Funerella", "1" ] } ]
							},
							{
								"repeat": true,
								"conditions": [ { "c": "UnitOwnHero", "p": [ "necro_hero_7", "dragon_hunter", "=", "0" ] } ],

								"actions": [ { "a": "CounterSet", "p": [ "dragon_slayers_with_Marl", "0" ] } ]
							},
							{
								"repeat": true,
								"conditions": [ { "c": "UnitOwnHero", "p": [ "necro_hero_7", "dragon_hunter", ">", "0" ] } ],

								"actions": [ { "a": "CounterSet", "p": [ "dragon_slayers_with_Marl", "1" ] } ]
							},

							{
								"conditions": [ { "c": "UnitOwnSide", "p": [ "dragon_hunter", "=", "0" ] } ],

								"actions": [ { "a": "NextQuest" } ]
							}
						]
					}
				]
			},

			{
				"sid": "setup_SideQuest6",
				"main": false,

				"hidden": true,
				"activeOnStart": true,
				"sharing": "Clone",
				"subQuests":
				[	
					{
						"sid": "1",
						"activeOnStart": true,

						"triggers":
						[
							{
								"conditions":
								[
									{ "c": "Counter", "p": [ "graverobber_quest", "=", "1" ] }
								],

								"actions":
								[
									{ "a": "NextQuest", "p": [ "SideQuest6" ] },

									{ "a": "SetActiveMarker", "p": [ "zone_pet_raising", "true" ] },
									{ "a": "CreateVFX", "p": [ "fx_quest_mark_silver_03", "1326", "false", "true", "pm_pet_raising" ] },
									{ "a": "CreateVFX", "p": [ "fx_map_object_blocked", "1326", "false", "true", "interactable_pet_raising" ] }
								]
							}
						]
					}
				]
			},
		{
			"sid": "SideQuest6",
			"main": false,

			"comment": "graverobbers raising pets quest",
			"hidden": false,
			"activeOnStart": false,
			"sharing": "Clone",

			"name": "fun_quest_name_q6",

			"subQuests":
			[	
				{
					"sid": "SideQuest6_1",
					"activeOnStart": true,

					"name": "fun_sub_name_q6_1",

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "UnitOwnSide", "p": [ "graverobber_upg_alt", "=", "0" ] }
							],

							"actions":
							[
								{ "a": "NextQuest" },

								{ "a": "SetActiveVFX", "p": [ "pm_pet_raising", "false" ] },
								{ "a": "SetActiveMarker", "p": [ "interactable_pet_raising", "false" ] },

								{ "a": "Dialog", "p":[ "fun_undead_village_graverobber_lost" ] }

							]
						},
						{
							"conditions":
							[
								{ "c": "ObjectInteractionAfter", "p": [ "zone_pet_raising" ] }
							],

							"actions":
							[
								{ "a": "CurrentSubQuestDone" }
							]
						},
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "graverobber_quest", "=", "2" ] }
							],

							"actions":
							[
								{ "a": "NextQuest" }
							]
						}
					]
				}
			]
		},

		{
			"sid": "SideQuest7",
			"main": false,

			"comment": "",
			"hidden": true,
			"activeOnStart": false,
			"sharing": "Clone",
			"subQuests":
			[	
				{
					"sid": "SideQuest7_1",
					"activeOnStart": true,

					"triggers":
					[
						{
							"conditions":
							[
							],

							"actions":
							[
							]
						}
					]
				}
			]
		},

		{
			"sid": "SideQuest8",
			"main": false,

			"comment": "dialog when funerella hires neutrals for the first time",
			"hidden": true,
			"activeOnStart": true,
			"sharing": "Clone",
			"subQuests":
			[	
				{
					"sid": "SideQuest8_1",
					"activeOnStart": true,

					"triggers":
					[
						{
							"conditionsLogic": "Or",
							"conditions":
							[
								{ "c": "UnitHire", "p": [ "dragon_hunter" ], "counter": 1 },
								{ "c": "UnitHire", "p": [ "halfling" ], "counter": 1 },
								{ "c": "UnitHire", "p": [ "unicorn" ], "counter": 1 },
								{ "c": "UnitHire", "p": [ "kittenhorn" ], "counter": 1 }
							],

							"actions":
							[
								{ "a": "Dialog", "p":[ "fun_neutrals_hired" ] }
							]
						}
					]
				},
				{
					"sid": "SideQuest8_2",
					"activeOnStart": true,

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "UnitHire", "p": [ "peasant" ], "counter": 1 }
							],

							"actions":
							[
								{ "a": "Dialog", "p":[ "fun_neutrals_hired_peasants" ] }
							]
						}
					]
				}
			]
		},
		
			{
				"sid": "setup_SideQuest9",
				"main": false,
				"comment": "to start construction_site quest",

				"hidden": true,
				"activeOnStart": true,
				"sharing": "Clone",
				"subQuests":
				[	
					{
						"sid": "1",
						"activeOnStart": true,

						"triggers":
						[
							{
								"conditions":
								[
									{ "c": "Counter", "p": [ "construction_site_quest", "=", "1" ] }
								],

								"actions":
								[
									{ "a": "NextQuest", "p": [ "SideQuest9" ] },
									{ "a": "DeleteEntity", "p": [ "qm_construction_site" ] },
									{ "a": "CreateVFX", "p": [ "fx_2x2_quest_mark_silver_02", "2398", "false", "true", "em_construction_site" ] }
								]
							}
						]
					}
				]
			},
		{
			"sid": "SideQuest9",
			"main": false,

			"comment": "building necromancy amplifier",
			"hidden": false,
			"activeOnStart": false,
			"sharing": "Clone",

			"name": "fun_quest_name_q9",
			"desc": "fun_quest_desc_q9",
			"subQuests":
			[	
				{
					"sid": "SideQuest9_1",
					"activeOnStart": true,

					"name": "fun_sub_name_q9_1",

					"triggers":
					[
						{
							"conditionsLogic": "And",
							"conditions":
							[
								{ "c": "ResCounter", "p": [ "wood", ">=", "20" ] },
								{ "c": "ResCounter", "p": [ "ore", ">=", "20" ] }
							],

							"actions":
							[
								{ "a": "CurrentSubQuestDone" },
								{ "a": "NextSubQuest", "p": [ "SideQuest9_2" ] },
								{ "a": "CreateVFX", "p": [ "fx_2x2_quest_mark_silver_02", "2398", "false", "true", "em_construction_site" ] }
							]
						}
					]
				},
				{
					"sid": "SideQuest9_2",
					"activeOnStart": false,

					"name": "fun_sub_name_q9_2",

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "construction_site_quest", "=", "2" ] }
							],

							"actions":
							[
								{ "a": "NextQuest" },
								{ "a": "DeleteEntity", "p": [ "em_construction_site" ] }
							]
						}
					]
				}
			]
		},
			{
				"sid": "support_SideQuest9",
				"main": false,
				"comment": "dialog with new amplifier",

				"hidden": true,
				"activeOnStart": true,
				"sharing": "Clone",
				"subQuests":
				[	
					{
						"sid": "1",
						"activeOnStart": true,

						"triggers":
						[
							{
								"repeat": true,
								"conditions":
								[
									{ "c": "ObjectInteractionBefore", "p": [ "amplifier" ] }
								],

								"actions":
								[
									{ "a": "Dialog", "p": [ "fun_amplifier_visited" ] }
								]
							}
						]
					}
				]
			},

			{
				"sid": "setup_SideQuest10",
				"main": false,
				"comment": "to start Marl's resurrection quest",

				"hidden": true,
				"activeOnStart": true,
				"sharing": "Clone",
				"subQuests":
				[	
					{
						"sid": "1",
						"activeOnStart": true,

						"triggers":
						[
							{
								"conditions":
								[
									{ "c": "Counter", "p": [ "marl_quest", "=", "1" ] }
								],

								"actions":
								[
									{ "a": "NextQuest", "p": [ "SideQuest10" ] },
									{ "a": "CounterPlus", "p": [ "killed_tier1", "0" ] },
									{ "a": "CounterPlus", "p": [ "killed_tier2", "0" ] },
									{ "a": "CounterPlus", "p": [ "killed_tier3", "0" ] },
									{ "a": "CounterPlus", "p": [ "killed_tier4", "0" ] },
									{ "a": "CounterPlus", "p": [ "killed_tier5", "0" ] },
									{ "a": "CounterPlus", "p": [ "killed_tier6", "0" ] },
									{ "a": "CounterPlus", "p": [ "killed_tier7", "0" ] }
								]
							}
						]
					}
				]
			},
		{
			"sid": "SideQuest10",
			"main": false,

			"comment": "resurrecting Marl",
			"hidden": false,
			"activeOnStart": false,
			"sharing": "Clone",

			"name": "fun_quest_name_q10",
			"desc": "fun_quest_desc_q10",

			"subQuests":
			[	
				{
					"sid": "SideQuest10_1_1",
					"activeOnStart": true,
					"name": "fun_sub_name_q10_1_1",

					"triggers":
					[
						{
							"conditions": [ { "c": "Counter", "p": [ "killed_tier1", "=", "1" ] } ],

							"actions": [ { "a": "CurrentSubQuestDone" } ]
						},
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "weakening_mycelium_progress", "=", "7" ] }
							],

							"actions":
							[
								{ "a": "CounterSet", "p": [ "marl_quest", "2" ] },
								{ "a": "Dialog", "p": [ "fun_resurrection_killed_all" ] },
								{ "a": "SetQuestMarker", "p": [ "tomb", "effects/global_map/quest_mark_silver_02" ] },
								{ "a": "SetActiveQuestMarker", "p": [ "tomb", "true" ] },
								{ "a": "NextSubQuest", "p": [ "SideQuest10_2" ] }
							]
						}
					]
				},
				{
					"sid": "SideQuest10_1_2",
					"activeOnStart": true,
					"name": "fun_sub_name_q10_1_2",

					"triggers":
					[
						{
							"conditions": [ { "c": "Counter", "p": [ "killed_tier2", "=", "1" ] } ],

							"actions": [ { "a": "CurrentSubQuestDone" } ]
						}
					]
				},
				{
					"sid": "SideQuest10_1_3",
					"activeOnStart": true,
					"name": "fun_sub_name_q10_1_3",

					"triggers":
					[
						{
							"conditions": [ { "c": "Counter", "p": [ "killed_tier3", "=", "1" ] } ],

							"actions": [ { "a": "CurrentSubQuestDone" } ]
						}
					]
				},
				{
					"sid": "SideQuest10_1_4",
					"activeOnStart": true,
					"name": "fun_sub_name_q10_1_4",

					"triggers":
					[
						{
							"conditions": [ { "c": "Counter", "p": [ "killed_tier4", "=", "1" ] } ],

							"actions": [ { "a": "CurrentSubQuestDone" } ]
						}
					]
				},
				{
					"sid": "SideQuest10_1_5",
					"activeOnStart": true,
					"name": "fun_sub_name_q10_1_5",

					"triggers":
					[
						{
							"conditions": [ { "c": "Counter", "p": [ "killed_tier5", "=", "1" ] } ],

							"actions": [ { "a": "CurrentSubQuestDone" } ]
						}
					]
				},
				{
					"sid": "SideQuest10_1_6",
					"activeOnStart": true,
					"name": "fun_sub_name_q10_1_6",

					"triggers":
					[
						{
							"conditions": [ { "c": "Counter", "p": [ "killed_tier6", "=", "1" ] } ],

							"actions": [ { "a": "CurrentSubQuestDone" } ]
						}
					]
				},
				{
					"sid": "SideQuest10_1_7",
					"activeOnStart": true,
					"name": "fun_sub_name_q10_1_7",

					"triggers":
					[
						{
							"conditions": [ { "c": "Counter", "p": [ "killed_tier7", "=", "1" ] } ],

							"actions": [ { "a": "CurrentSubQuestDone" } ]
						}
					]
				},
				{
					"sid": "SideQuest10_2",
					"activeOnStart": false,
					"name": "fun_sub_name_q10_2",

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "marl_resurrected", "=", "1" ] }
							],

							"actions":
							[
								{ "a": "CurrentSubQuestDone" }
							]
						},
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "marl_quest", "=", "3" ] }
							],

							"actions":
							[
								{ "a": "NextQuest" }
							]
						}
					]
				}
			]
		},
			{
				"sid": "support_SideQuest10",
				"main": false,

				"comment": "tracking killing sylvans",
				"hidden": true,
				"activeOnStart": true,
				"sharing": "Clone",

				"subQuests":
				[	
					{
						"sid": "1", "activeOnStart": true,

						"triggers": [ { "conditionsLogic": "Or", "conditions": [ { "c": "UnitKill", "p": [ "elf_tracker" ], "counter": 1 }, { "c": "UnitKill", "p": [ "elf_tracker_upg" ], "counter": 1 }, { "c": "UnitKill", "p": [ "elf_tracker_upg_alt" ], "counter": 1 }, { "c": "UnitLose", "p": [ "elf_tracker" ], "counter": 1 }, { "c": "UnitLose", "p": [ "elf_tracker_upg" ], "counter": 1 }, { "c": "UnitLose", "p": [ "elf_tracker_upg_alt" ], "counter": 1 } ], "actions": [ { "a": "CounterSet", "p": [ "killed_tier1", "1" ] }, { "a": "CounterPlus", "p": [ "weakening_mycelium_progress", "1" ] } ] } ]
					},
					{
						"sid": "2", "activeOnStart": true,

						"triggers": [ { "conditionsLogic": "Or", "conditions": [ { "c": "UnitKill", "p": [ "twinkle" ], "counter": 1 }, { "c": "UnitKill", "p": [ "twinkle_upg" ], "counter": 1 }, { "c": "UnitKill", "p": [ "twinkle_upg_alt" ], "counter": 1 }, { "c": "UnitLose", "p": [ "twinkle" ], "counter": 1 }, { "c": "UnitLose", "p": [ "twinkle_upg" ], "counter": 1 }, { "c": "UnitLose", "p": [ "twinkle_upg_alt" ], "counter": 1 } ], "actions": [ { "a": "CounterSet", "p": [ "killed_tier2", "1" ] }, { "a": "CounterPlus", "p": [ "weakening_mycelium_progress", "1" ] } ] } ]
					},
					{
						"sid": "3", "activeOnStart": true,

						"triggers": [ { "conditionsLogic": "Or", "conditions": [ { "c": "UnitKill", "p": [ "ent" ], "counter": 1 }, { "c": "UnitKill", "p": [ "ent_upg" ], "counter": 1 }, { "c": "UnitKill", "p": [ "ent_upg_alt" ], "counter": 1 }, { "c": "UnitLose", "p": [ "ent" ], "counter": 1 }, { "c": "UnitLose", "p": [ "ent_upg" ], "counter": 1 }, { "c": "UnitLose", "p": [ "ent_upg_alt" ], "counter": 1 } ], "actions": [ { "a": "CounterSet", "p": [ "killed_tier3", "1" ] }, { "a": "CounterPlus", "p": [ "weakening_mycelium_progress", "1" ] } ] } ]
					},
					{
						"sid": "4", "activeOnStart": true,

						"triggers": [ { "conditionsLogic": "Or", "conditions": [ { "c": "UnitKill", "p": [ "aqualotl" ], "counter": 1 }, { "c": "UnitKill", "p": [ "aqualotl_upg" ], "counter": 1 }, { "c": "UnitKill", "p": [ "aqualotl_upg_alt" ], "counter": 1 }, { "c": "UnitLose", "p": [ "aqualotl" ], "counter": 1 }, { "c": "UnitLose", "p": [ "aqualotl_upg" ], "counter": 1 }, { "c": "UnitLose", "p": [ "aqualotl_upg_alt" ], "counter": 1 } ], "actions": [ { "a": "CounterSet", "p": [ "killed_tier4", "1" ] }, { "a": "CounterPlus", "p": [ "weakening_mycelium_progress", "1" ] } ] } ]
					},
					{
						"sid": "5", "activeOnStart": true,

						"triggers": [ { "conditionsLogic": "Or", "conditions": [ { "c": "UnitKill", "p": [ "druid" ], "counter": 1 }, { "c": "UnitKill", "p": [ "druid_upg" ], "counter": 1 }, { "c": "UnitKill", "p": [ "druid_upg_alt" ], "counter": 1 }, { "c": "UnitLose", "p": [ "druid" ], "counter": 1 }, { "c": "UnitLose", "p": [ "druid_upg" ], "counter": 1 }, { "c": "UnitLose", "p": [ "druid_upg_alt" ], "counter": 1 } ], "actions": [ { "a": "CounterSet", "p": [ "killed_tier5", "1" ] }, { "a": "CounterPlus", "p": [ "weakening_mycelium_progress", "1" ] } ] } ]
					},
					{
						"sid": "6", "activeOnStart": true,

						"triggers": [ { "conditionsLogic": "Or", "conditions": [ { "c": "UnitKill", "p": [ "qilin" ], "counter": 1 }, { "c": "UnitKill", "p": [ "qilin_upg" ], "counter": 1 }, { "c": "UnitKill", "p": [ "qilin_upg_alt" ], "counter": 1 }, { "c": "UnitLose", "p": [ "qilin" ], "counter": 1 }, { "c": "UnitLose", "p": [ "qilin_upg" ], "counter": 1 }, { "c": "UnitLose", "p": [ "qilin_upg_alt" ], "counter": 1 } ], "actions": [ { "a": "CounterSet", "p": [ "killed_tier6", "1" ] }, { "a": "CounterPlus", "p": [ "weakening_mycelium_progress", "1" ] } ] } ]
					},
					{
						"sid": "7", "activeOnStart": true,

						"triggers": [ { "conditionsLogic": "Or", "conditions": [ { "c": "UnitKill", "p": [ "phoenix" ], "counter": 1 }, { "c": "UnitKill", "p": [ "phoenix_upg" ], "counter": 1 }, { "c": "UnitKill", "p": [ "phoenix_upg_alt" ], "counter": 1 }, { "c": "UnitLose", "p": [ "phoenix" ], "counter": 1 }, { "c": "UnitLose", "p": [ "phoenix_upg" ], "counter": 1 }, { "c": "UnitLose", "p": [ "phoenix_upg_alt" ], "counter": 1 } ], "actions": [ { "a": "CounterSet", "p": [ "killed_tier7", "1" ] }, { "a": "CounterPlus", "p": [ "weakening_mycelium_progress", "1" ] } ] } ]
					}
				]
			}
	]
}