﻿{
	"counters":
	[
		{
			"sid": "tutorial_M_BASIC_Win_Counter",
			"comment": "win_condition_counter"
		},

		{
			"sid": "tutorial_M_BASIC_Win_Counter_Sub",
			"comment": "win_condition_counter"
		},

		{
			"sid": "tutorial_M_BASIC_Win_Condition_Counter",
			"comment": "Step_by_Step_activator"
		},

		{
			"sid": "tutorial_M_BASIC_Step_by_Step_Counter",
			"comment": "Step_by_Step_activator"
		},

		{
			"sid": "tutorial_M_BASIC_Step_1_Counter",
			"comment": "tutorial_M_BASIC_Step_1"
		},

		{
			"sid": "tutorial_M_BASIC_Step_2_Counter",
			"comment": "tutorial_M_BASIC_Step_2"
		},

		{
			"sid": "tutorial_M_BASIC_Step_3_Counter",
			"comment": "tutorial_M_BASIC_Step_3"
		},

		{
			"sid": "tutorial_M_BASIC_Step_4_Counter",
			"comment": "tutorial_M_BASIC_Step_4"
		},

		{
			"sid": "tutorial_M_BASIC_New_Day_Counter",
			"comment": "tutorial_M_BASIC_Step_5"
		}
	],

	"quests":
	[
		{
			"sid": "intro",

			"hidden": true,

			"comment": "intro",

			"activeOnStart": true,
			"sharing": "Clone",

			"name": "1",

			"subQuests":
			[	
				{
					"sid": "1",
					"activeOnStart": true,

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "StartTurn", "p": [ "1", "1" ] }
							],

							"actions":
							[				
								{ "a": "Dialog", "p": [ "t_M_BASIC_dial_start" ] },
								{ "a": "RemoveRes", "p": [ "gold", "50000" ] },
								{ "a": "RemoveRes", "p": [ "wood", "50" ] },
								{ "a": "RemoveRes", "p": [ "ore", "50" ] },
								{ "a": "RemoveRes", "p": [ "crystals", "50" ] },
								{ "a": "RemoveRes", "p": [ "gemstones", "50" ] },
								{ "a": "RemoveRes", "p": [ "mercury", "50" ] },
								{ "a": "RemoveRes", "p": [ "dust", "500" ] },
								{ "a": "GiveExpHero", "p": [ "900", "tutorial_hero_1_basic" ] }
							]
						}
					]
				}
			]
		},

		{
			"sid": "win_lose_conditions",
			"hidden": true,

			"comment": "conditions for losing, sometimes winning",

			"activeOnStart": true,
			"name": "1",
			"sharing": "Clone",

			"subQuests":
			[	
				{
					"sid": "lose_condition",
					"activeOnStart": true,

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "HeroKill", "p": [ "tutorial_hero_1_basic" ] }
							],

							"actions":
							[
								{ "a": "GameLose" }
							]
						}
					]
				}
			]
		},

		{
			"sid": "win_condition_activator_quest",
			"hidden": true,

			"comment": "step by step activator",

			"activeOnStart": true,
			"name": "win_condition_activetor",
			"sharing": "Clone",

			"subQuests":
			[	
				{
					"sid": "win_condition_activator",
					"activeOnStart": true,

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "tutorial_M_BASIC_Win_Condition_Counter", "=", "1" ] }
							],

							"actions":
							[
								{ "a": "NextQuest", "p": [ "Questlog_Main" ] }
							]
						}
					]
				}
			]
		},

		{
			"sid": "step_by_step_activator_quest",
			"hidden": true,

			"comment": "step by step activator",

			"activeOnStart": true,
			"name": "step_by_step_activetor",
			"sharing": "Clone",

			"subQuests":
			[	
				{
					"sid": "step_by_step_activator",
					"activeOnStart": true,

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "tutorial_M_BASIC_Step_by_Step_Counter", "=", "1" ] }
							],

							"actions":
							[
								{ "a": "NextQuest", "p": [ "Questlog" ] }
							]
						}
					]
				}
			]
		},

		{
			"sid": "no_move_activator_quest",
			"hidden": true, 
			
			"comment": "no_move activator", 
			
			"activeOnStart": true, 
			"name": "no_move_activator", 
			"sharing": "Clone",
			
			"subQuests": 
			[ 
				{ 
					"sid": "step_by_step_activator", 
					"activeOnStart": true, 

					"triggers": 
					[ 
						{ 
							"conditions": 
							[ 
								{ "c": "TutorialMovePoints", "p": [ "20", "<", "" ] } 
							], 
							
							"actions": 
							[ 
								{ "a": "Dialog", "p": [ "t_M_BASIC_dial_3" ] }, 
								{ "a": "CounterPlus", "p": [ "tutorial_M_BASIC_New_Day_Counter", "1" ] },
								{ "a": "NextQuest", "p": [ ] } 
							] 
						} 
					] 
				} 
			]
		},

		{
			"sid": "node_reveal_activator_quest",
			"hidden": true, 
			
			"comment": "no_move activator", 
			
			"activeOnStart": true, 
			"name": "node_reveal_activator", 
			"sharing": "Clone",
			
			"subQuests": 
			[ 
				{ 
					"sid": "step_by_step_activator", 
					"activeOnStart": true, 

					"triggers": 
					[ 
						{ 
							"conditions": 
							[ 
								{ "c": "NodeRevealed", "p": [ "430" ] } 
							], 
							
							"actions": 
							[ 
								{ "a": "Dialog", "p": [ "t_M_BASIC_dial_5" ] }, 
								{ "a": "NextQuest", "p": [ ] } 
							] 
						} 
					] 
				} 
			]
		},

		{
			"sid": "kill_guard_activator_quest_1",
			"hidden": true,

			"comment": "kill guard activator",

			"activeOnStart": true,
			"name": "step_by_step_activetor",
			"sharing": "Clone",

			"subQuests":
			[	
				{
					"sid": "step_by_step_activator",
					"activeOnStart": true,

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "SquadKill", "p": [ "guard_1" ] }
							],

							"actions":
							[
								{ "a": "CounterPlus", "p": [ "tutorial_M_BASIC_Step_4_Counter", "1" ] },
								{ "a": "Dialog", "p": [ "t_M_BASIC_dial_8" ] },
								{ "a": "NextQuest", "p": [ ] } 
							]
						}
					]
				}
			]
		},		

		{
			"sid": "Guide_Activator_13",
			"hidden": true, "comment": "guide activator", "activeOnStart": true, "name": "guide_activator", "sharing": "Clone",
			"subQuests": [ { "sid": "step_by_step_activator", "activeOnStart": true, 
			"triggers": [ { "conditions": [ { "c": "TutorialLevelUp", "p": [ "" ] } ], "actions": [ { "a": "Guide", "p": [ "tutorial_M_13" ] }, { "a": "NextQuest", "p": [ ] } ] } ] } ]
		},

		{
			"sid": "Guide_Activator_23",
			"hidden": true, "comment": "guide activator", "activeOnStart": true, "name": "guide_activator", "sharing": "Clone",
			"subQuests": [ { "sid": "step_by_step_activator", "activeOnStart": true, 
			"triggers": [ { "conditions": [ { "c": "TutorialStartBattleForMap", "p": [  ] } ], "actions": [ { "a": "Guide", "p": [ "tutorial_M_23" ] }, { "a": "NextQuest", "p": [ ] } ] } ] } ]
		},

		{
			"sid": "Guide_Activator_24",
			"hidden": true, "comment": "guide activator", "activeOnStart": true, "name": "guide_activator", "sharing": "Clone",
			"subQuests": [ { "sid": "step_by_step_activator", "activeOnStart": true, 
			"triggers": [ { "conditions": [ { "c": "TutorialStartTurnUnit", "p": [  ] } ], "actions": [ { "a": "Guide", "p": [ "tutorial_M_24" ] }, { "a": "NextQuest", "p": [ ] } ] } ] } ]
		},

		{
			"sid": "Questlog_Main",
			"main": true,

			"comment": "Main Goal",

			"activeOnStart": false,
			"sharing": "Clone",

			"name": "t_M_BASE_Questlog_Main_name",

			"subQuests":
			[	
				{
					"sid": "win_condition",
					"activeOnStart": true,
					
					"name": "t_M_BASE_Questlog_Main_description",

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "tutorial_M_BASIC_Win_Counter_Sub", "=", "1" ] }
							],

							"actions":
							[
								{ "a": "CounterPlus", "p": [ "tutorial_M_BASIC_Win_Counter", "1" ] }
							]
						},
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "tutorial_M_BASIC_Win_Counter", "=", "1" ] }
							],

							"actions":
							[
								{ "a": "SubQuestDone", "p": [ "Questlog", "step_9" ] },
								{ "a": "GameVictory" }
							]
						}
					]
				}
			]
		},

		{
			"sid": "Questlog",
			"main": true,

			"comment": "Step by Step",

			"activeOnStart": false,
			"sharing": "Clone",

			"name": "t_M_BASE_Questlog_name",

			"subQuests":
			[	
				{
					"sid": "step_1",
					"activeOnStart": true,
					
					"name": "t_M_BASE_Questlog_1_description",

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "tutorial_M_BASIC_Step_1_Counter", "=", "1" ] }
							],

							"actions":
							[
								{ "a": "CurrentSubQuestDone" },
								{ "a": "NextSubQuest", "p": [ "step_2" ] }
							]
						}
					]
				},
				{
					"sid": "step_3",
					"activeOnStart": false,
					
					"name": "t_M_BASE_Questlog_3_description",

					"triggers":
					[
						{
							"conditionsLogic": "And",

							"conditions":
							[
								{ "c": "Counter", "p": [ "tutorial_M_BASIC_New_Day_Counter", "=", "1" ] },
								{ "c": "StartTurn", "p": [ ] }
							],

							"actions":
							[
								{ "a": "CurrentSubQuestDone" },
								{ "a": "Dialog", "p": [ "t_M_BASIC_dial_4" ] }
							]
						}
					]
				},
				{
					"sid": "step_2",
					"activeOnStart": false,
					
					"name": "t_M_BASE_Questlog_2_description",

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "tutorial_M_BASIC_Step_2_Counter", "=", "1" ] }
							],

							"actions":
							[
								{ "a": "CurrentSubQuestDone" }
							]
						}
					]
				},
				{
					"sid": "step_4",
					"activeOnStart": false,
					
					"name": "t_M_BASE_Questlog_4_description",

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "tutorial_M_BASIC_Step_3_Counter", "=", "1" ] }
							],

							"actions":
							[
								{ "a": "CurrentSubQuestDone" }
							]
						}
					]
				},
				{
					"sid": "step_5",
					"activeOnStart": false,
					
					"name": "t_M_BASE_Questlog_5_description",

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "ResCounter", "p": [ "gold", ">", "4999" ] }
							],

							"actions":
							[
								{ "a": "CurrentSubQuestDone" },
								{ "a": "Dialog", "p": [ "t_M_BASIC_dial_7" ] }
							]
						}
					]
				},
				{
					"sid": "step_6",
					"activeOnStart": false,
					
					"name": "t_M_BASE_Questlog_6_description",

					"triggers":
					[
						{
							"conditions":
							[
								{ "c": "Counter", "p": [ "tutorial_M_BASIC_Step_4_Counter", "=", "1" ] }
							],

							"actions":
							[
								{ "a": "CurrentSubQuestDone" }
							]
						}
					]
				},
				{
					"sid": "step_7",
					"activeOnStart": false,
					
					"name": "t_M_BASE_Questlog_7_description",

					"triggers":
					[
						{
							"conditionsLogic": "And",

							"conditions":
							[
								{ "c": "UnitHire", "p": [ "esquire" ,"20" ] }
							],

							"actions":
							[
								{ "a": "CurrentSubQuestDone" },
								{ "a": "Dialog", "p": [ "t_M_BASIC_dial_9" ] }
							]
						}
					]
				},
				{
					"sid": "step_8",
					"activeOnStart": false,
					
					"name": "t_M_BASE_Questlog_8_description",

					"triggers":
					[
						{
							"conditionsLogic": "And",

							"conditions":
							[

							],

							"actions":
							[

							]
						}
					]
				}
			]
		}
	]
}