<?xml version="1.0" encoding="utf-8"?>
<QuestDefinitions>
	<!--
	Name: Key for quest, might be used by script when completing/changing quests
	DescriptionStringId: If specified, will be shown in banner when quest is acquired and when reloading when in quest
	TODO: Something that specifies that the quest should have fancy completion banner?
	RequirePrerequisite: If set, requires that the previous quests goal is still true for quest to be active, else steps back
	
	Conversations: Which conversation each character will have when this quest is active (if none is specified, will
	backtrack until they have one, or maybe use a default one specified in their talk node)
	Conversation.NPC: Who to talk to
	Conversation.Name: Which conersation they use
	
	Goal: What to do to complete quest
	Goal.Type: Any of the types specified below
	Goal.Value: Depends on type, see below
	Goal.Time: If set, the goal won't trigger until it's hold true for this long (time in seconds) (doesn't work for Scripted or TalkTo goals)
	Type TalkTo: Quest done when finishing conversation with the NPC specified by name in Value
	Type HaveGold: Quest done when having this much gold as specified in Value in gold
	Type BackpackValue: Quest done when having stuff in backpack worth this much as specified in Value
	Type HaveUpgrade: Quest done when have upgrade specified in Value
	Type ReachLevel: Quest done when reaching level specified in Value
	Type Scripted: Use when quest will be completed by script only
	
	Marker: What marker to show
	Marker.Level: Which level the marker is in, or if just a level the level
	Marker.NPC: The NPC to have a marker on it
	Marker.Shape: The named shape to have a marker on it
	User either NPC or Shape, not both, or neither if destination is a level
	TODO: Might be able to create auto markers for certain goal types
	-->

	<!-- FALLBACK DIALOGUE -->
	<Quest>
		<Name>conversations</Name>
		<Conversations>
			<!-- todo -->
			<Conversation NPC="char_dorothy" Name="Dorothy_fallback"/>
			<Conversation NPC="char_cranky" Name="Cranky_fallback"/>
			<Conversation NPC="char_barmaid" Name="Lola_fallback"/>
			<Conversation NPC="char_shopkeeper_1" Name="Biff_fallback"/>
			<Conversation NPC="char_shopkeeper_2" Name="Dandy_fallback"/>
		</Conversations>
		<Goal Type="Scripted"/>
	</Quest>

	<!-- RUSTY ENTERS MINE AND TALKS TO JOE’S CORPSE -->
	<Quest>
		<Name>tutorial_get_pickaxe</Name>
		<DescriptionStringId>banner_quest_pickaxe</DescriptionStringId>
		<Conversations>
			<Conversation NPC="char_dorothy" Name="Dorothy_in_mine2"/>
		</Conversations>
		<Goal Type="HaveUpgrade" Value="pickaxe" Time="2"/>
		<Marker Level="tutorial_1" Shape="UncleJoe"/>
	</Quest>
	<Quest>
		<Name>tutorial_talk_to_char_dorothy1</Name>
		<DescriptionStringId></DescriptionStringId>
		<Conversations>
			<Conversation NPC="char_dorothy" Name="Dorothy_in_mine3"/>
		</Conversations>
		<Goal Type="TalkTo" Value="char_dorothy" Time="1"/>
		<Marker Level="tutorial_1" NPC="char_dorothy"/>
	</Quest>
	<Quest>
		<Name>tutorial_pull_lever</Name>
		<DescriptionStringId>banner_quest_lever</DescriptionStringId>
		<Conversations>
		</Conversations>
		<Goal Type="Scripted"/>
		<Marker Level="tutorial_1" Shape="TutorialLever"/>
	</Quest>

	<!-- DOROTHY TELLS YOU TO OPEN UP THE MINE AGAIN  -->
	<Quest>
		<Name>archaea_talk_to_char_dorothy_pre</Name>
		<DescriptionStringId></DescriptionStringId>
		<Conversations>
			<Conversation NPC="char_dorothy" Name="Pre_Dorothy1"/>
			<Conversation NPC="char_cranky" Name="Pre_Cranky1"/>
			<Conversation NPC="char_barmaid" Name="Pre_Lola1"/>
		</Conversations>
		<Goal Type="TalkTo" Value="char_dorothy" Time="1"/>
		<Marker Level="tumbleton" NPC="char_dorothy"/>
	</Quest>
	<Quest>
		<Name>archaea_collect_minerals</Name>
		<DescriptionStringId>banner_quest_mining</DescriptionStringId>
		<Conversations>
		</Conversations>
		<Goal Type="BackpackValue" Value="8" Time="0"/>
		<Marker Level="archaea"/>
	</Quest>
    
    <!-- YOU CAN NOW UPGRADE YOUR PICKAXE. -->
	<Quest>
		<Name>archaea_sell_minerals</Name>
		<DescriptionStringId>banner_quest_sell</DescriptionStringId>
		<RequirePrerequisite>true</RequirePrerequisite>
		<Conversations>
			<Conversation NPC="char_dorothy" Name="Pre_Dorothy2"/>
		</Conversations>
		<Goal Type="HaveGold" Value="8" Time="1"/>
		<Marker Level="tumbleton" NPC="char_dorothy"/>
	</Quest>
	<Quest>
		<Name>archaea_buy_pickaxe_pre</Name>
		<DescriptionStringId></DescriptionStringId>
		<Conversations>
			<Conversation NPC="char_cranky" Name="Pre_Cranky2"/>
		</Conversations>
		<Goal Type="HaveUpgrade" Value="pickaxe_pre" Time="1"/>
		<Marker Level="tumbleton" NPC="char_cranky"/>
	</Quest>

	<!-- USE YOUR NEW PICKAXE AND EXPLORE THE FIRST CAVE -->
	<Quest>
		<Name>archaea_talk_to_char_dorothy1</Name>
		<DescriptionStringId></DescriptionStringId>
		<Conversations>
			<Conversation NPC="char_dorothy" Name="Tumbleton_Dorothy1"/>
			<Conversation NPC="char_cranky" Name="Tumbleton_Cranky1"/>
		</Conversations>
		<Goal Type="TalkTo" Value="char_dorothy" Time="1"/>
		<Marker Level="tumbleton" NPC="char_dorothy"/>
	</Quest>
	<Quest>
		<Name>archaea_find_speed_boots</Name>
		<DescriptionStringId>banner_quest_explore</DescriptionStringId>
		<Conversations>
		</Conversations>
		<Goal Type="HaveUpgrade" Value="enable_run" Time="4"/>
		<Marker Level="archaea_cave_run" Shape="UpgradeBoots"/>
	</Quest>
    
    <!-- YOU FOUND SOME SPEED BOOTS IN THE CAVE. -->
	<Quest>
		<Name>archaea_talk_to_char_cranky1</Name>
		<DescriptionStringId>banner_quest_return</DescriptionStringId>
		<Conversations>
			<Conversation NPC="char_dorothy" Name="Tumbleton_Dorothy2"/>
			<Conversation NPC="char_cranky" Name="Tumbleton_Cranky2"/>
			<Conversation NPC="char_barmaid" Name="Tumbleton_Lola2"/>
		</Conversations>
		<Goal Type="TalkTo" Value="char_cranky" Time="1"/>
		<Marker Level="tumbleton" NPC="char_cranky"/>
	</Quest>
	<Quest>
		<Name>archaea_find_charge_jump</Name>
		<DescriptionStringId>banner_quest_explore</DescriptionStringId>
		<Conversations>
		</Conversations>
		<Goal Type="HaveUpgrade" Value="enable_charge_jump" Time="4"/>
		<Marker Level="archaea_cave_chargejump" Shape="UpgradeJump"/>
	</Quest>
    
    <!-- YOU’VE FOUND THE CHARGE JUMP IN THE SECOND CAVE. -->
	<Quest>
		<Name>archaea_talk_to_char_Lola1</Name>
		<DescriptionStringId>banner_quest_return</DescriptionStringId>
		<Conversations>
			<Conversation NPC="char_dorothy" Name="Tumbleton_Dorothy3"/>
			<Conversation NPC="char_cranky" Name="Tumbleton_Cranky3"/>
			<Conversation NPC="char_barmaid" Name="Tumbleton_Lola3"/>
		</Conversations>
		<Goal Type="TalkTo" Value="char_barmaid" Time="1"/>
		<Marker Level="tumbleton" NPC="char_barmaid"/>
	</Quest>
	<Quest>
		<Name>archaea_find_drill</Name>
		<DescriptionStringId>banner_quest_explore</DescriptionStringId>
		<Conversations>
		</Conversations>
		<Goal Type="HaveUpgrade" Value="drill" Time="4"/>
		<Marker Level="archaea_cave_drill" Shape="DrillMarker"/>
	</Quest>

	<!-- YOU FOUND THE DRILL -->
    <Quest>
		<Name>Enter_Oldworld</Name>
		<DescriptionStringId>banner_quest_explore2</DescriptionStringId>
		<Conversations>
            <Conversation NPC="char_dorothy" Name="Tumbleton_Dorothy4"/>
			<Conversation NPC="char_cranky" Name="Tumbleton_Cranky4"/>
			<Conversation NPC="char_barmaid" Name="Tumbleton_Lola4"/>
		</Conversations>
		<Goal Type="ReachLevel" Value="oldworld" Time="1"/>
		<Marker Level="oldworld"/>
	</Quest>
    
    <!-- YOU’VE ENTERED THE OLD WORLD -->
	<Quest>
		<Name>oldworld_talk_to_townfolk</Name>
		<DescriptionStringId>banner_quest_return</DescriptionStringId>
		<Conversations>
            <Conversation NPC="char_cranky" Name="Tumbleton_Cranky5"/>
		</Conversations>
		<Goal Type="TalkTo" Value="char_cranky" Time="1"/>
		<Marker Level="tumbleton" NPC="char_cranky"/>
	</Quest>
	<Quest>
		<Name>Find_OW_Cave_1</Name>
		<DescriptionStringId>banner_quest_oldworld</DescriptionStringId>
		<Conversations>
		</Conversations>
		<Goal Type="Scripted"/>
		<Marker DisableInSubCaves="1" Level="oldworld"/>
	</Quest>
    
    <!-- YOU’VE FOUND THE FIRST UPGRADE IN OLDWORLD -->
	<Quest>
		<Name>Find_OW_Cave_2</Name>
		<DescriptionStringId>banner_quest_explore3</DescriptionStringId>
		<Conversations>
			<Conversation NPC="char_dorothy" Name="Tumbleton_Dorothy6"/>
			<Conversation NPC="char_cranky" Name="Tumbleton_Cranky6"/>
			<Conversation NPC="char_barmaid" Name="Tumbleton_Lola6"/>
			<Conversation NPC="char_shopkeeper_1" Name="Tumbleton_Biff6"/>
		</Conversations>
		<Goal Type="Scripted"/>
		<Marker DisableInSubCaves="1" Level="oldworld"/>
	</Quest>
    
    <!-- YOU’VE FOUND THE SECOND UPGRAGE IN OLDWORLD -->
	<Quest>
		<Name>Find_OW_Cave_3</Name>
		<DescriptionStringId>banner_quest_explore3</DescriptionStringId>
		<Conversations>
			<Conversation NPC="char_dorothy" Name="Tumbleton_Dorothy7"/>
			<Conversation NPC="char_cranky" Name="Tumbleton_Cranky7"/>
			<Conversation NPC="char_barmaid" Name="Tumbleton_Lola7"/>
			<Conversation NPC="char_shopkeeper_1" Name="Tumbleton_Biff7"/>
		</Conversations>
		<Goal Type="Scripted"/>
		<Marker DisableInSubCaves="1" Level="oldworld"/>
	</Quest>

	<!-- YOU’VE FOUND THE LAST UPGRADE IN OLDWORLD AND ENTERED VECTRON. -->
	<Quest>
		<Name>Enter_Vectron</Name>
		<DescriptionStringId>banner_quest_explore2</DescriptionStringId>
		<Conversations>
		</Conversations>
		<Goal Type="ReachLevel" Value="vectron" Time="1"/>
		<Marker Level="vectron"/>
	</Quest>
	<Quest>
		<Name>Vectron_talk_to_townfolk</Name>
		<DescriptionStringId>banner_quest_return</DescriptionStringId>
		<Conversations>
			<Conversation NPC="char_dorothy" Name="Tumbleton_Dorothy8"/>
			<Conversation NPC="char_cranky" Name="Tumbleton_Cranky8"/>
			<Conversation NPC="char_barmaid" Name="Tumbleton_Lola8"/>
			<Conversation NPC="char_shopkeeper_1" Name="Tumbleton_Biff8"/>
		</Conversations>
		<Goal Type="TalkTo" Value="char_dorothy" Time="1"/>
		<Marker Level="tumbleton" NPC="char_dorothy"/>
	</Quest>
	<Quest>
		<Name>disable_barrier1</Name>
		<DescriptionStringId>banner_quest_vectron</DescriptionStringId>
		<Conversations>
		</Conversations>
		<Goal Type="HaveUpgrade" Value="disable_barrier1" Time="1"/>
		<Marker DisableInSubCaves="1" Level="vectron"/>
	</Quest>
    
    <!-- YOU’VE FOUND THE MINIMAP; YOU’VE BROKEN THROUGH THE FIRST BARRIER. -->
    <Quest>
		<Name>Disable_barrier2</Name>
		<DescriptionStringId>banner_quest_explore3</DescriptionStringId>
		<Conversations>
            <Conversation NPC="char_dorothy" Name="Tumbleton_Dorothy9"/>
			<Conversation NPC="char_cranky" Name="Tumbleton_Cranky9"/>
			<Conversation NPC="char_barmaid" Name="Tumbleton_Lola9"/>
			<Conversation NPC="char_shopkeeper_1" Name="Tumbleton_Biff9"/>
            <Conversation NPC="char_shopkeeper_2" Name="Tumbleton_Dandy9"/>
		</Conversations>
		<Goal Type="HaveUpgrade" Value="disable_barrier2" Time="1"/>
		<Marker DisableInSubCaves="1" Level="vectron"/>
	</Quest>
    
    <!-- YOU’VE FOUND THE STATIC DASH -->
	<Quest>
		<Name>Boss_Entrance</Name>
		<DescriptionStringId>banner_quest_explore3</DescriptionStringId>
		<Conversations>
            <Conversation NPC="char_dorothy" Name="Tumbleton_Dorothy10"/>
			<Conversation NPC="char_cranky" Name="Tumbleton_Cranky10"/>
			<Conversation NPC="char_barmaid" Name="Tumbleton_Lola10"/>
			<Conversation NPC="char_shopkeeper_1" Name="Tumbleton_Biff10"/>
            <Conversation NPC="char_shopkeeper_2" Name="Tumbleton_Dandy10"/>
		</Conversations>
		<Goal Type="HaveUpgrade" Value="visited_boss_lair" Time="1"/>
		<Marker DisableInSubCaves="1" Level="vectron"/>
	</Quest>
    <Quest>
		<Name>Vectron_talk_to_townfolk2</Name>
		<DescriptionStringId>banner_quest_return</DescriptionStringId>
		<Conversations>
            <Conversation NPC="char_dorothy" Name="Tumbleton_Dorothy11"/>
			<Conversation NPC="char_cranky" Name="Tumbleton_Cranky11"/>
			<Conversation NPC="char_barmaid" Name="Tumbleton_Lola11"/>
			<Conversation NPC="char_shopkeeper_1" Name="Tumbleton_Biff11"/>
            <Conversation NPC="char_shopkeeper_2" Name="Tumbleton_Dandy11"/>
		</Conversations>
		<Goal Type="TalkTo" Value="char_dorothy" Time="1"/>
		<Marker Level="tumbleton" NPC="char_dorothy"/>
	</Quest>
    <Quest>
		<Name>Generator_Archaea</Name>
		<DescriptionStringId>banner_quest_generator</DescriptionStringId>
		<Conversations>
		</Conversations>
		<Goal Type="HaveUpgrade" Value="disable_barrier_boss3" Time="1"/>
		<Marker Level="archaea_cave_generator_1" Shape="BossGen3"/>
	</Quest>
    
    <!-- YOU'VE DESTROYED THE FIRST GENERATOR IN VECTRON. -->
	<Quest>
		<Name>Generator_OldWorld</Name>
		<DescriptionStringId>banner_quest_generator</DescriptionStringId>
		<Conversations>
		</Conversations>
		<Goal Type="HaveUpgrade" Value="disable_barrier_boss2" Time="1"/>
		<Marker Level="oldworld_cave_generator_1" Shape="BossGen2"/>
	</Quest>
	<Quest>
		<Name>Generator_Vectron</Name>
		<DescriptionStringId>banner_quest_generator</DescriptionStringId>
		<Conversations>
		</Conversations>
		<Goal Type="HaveUpgrade" Value="disable_barrier_boss1" Time="1"/>
		<Marker Level="vectron_cave_generator_1" Shape="BossGen1"/>
	</Quest>
    
    <!-- YOU DESTROYED THE OTHER GENERATORS IN OLDWORLD AND ARCHAEA; DOOR IS OPEN. -->
	<Quest>
		<Name>Boss</Name>
		<DescriptionStringId>banner_quest_bossdoor</DescriptionStringId>
		<Conversations>
            <Conversation NPC="char_dorothy" Name="Tumbleton_Dorothy12"/>
			<Conversation NPC="char_cranky" Name="Tumbleton_Cranky12"/>
		</Conversations>
		<Goal Type="Scripted"/>
		<Marker Level="vectron_boss" Shape="Boss"/>
	</Quest>

	<!-- After last quest -->
	<Quest>
		<Name>dummy_end</Name>
		<Goal Type="Scripted"/>
	</Quest>
	
</QuestDefinitions>
