[scenario]
	id=The_Outpost
	#textdomain wesnoth-ei
	name= _ "The Outpost"
	map_data="{campaigns/Eastern_Invasion/maps/The_Outpost.map}"
	turns=16
	{campaigns/Eastern_Invasion/utils/intro.cfg}


	{DAWN}
	{MORNING}
	{AFTERNOON}
	{DUSK}
	{FIRST_WATCH}
	{SECOND_WATCH}

	next_scenario=Escape_Tunnel

	{DEFAULT_MUSIC_PLAYLIST}

	{campaigns/Eastern_Invasion/utils/deaths.cfg}

	[side]
	type=Sergeant
	description=Gweddry
	user_description= _ "Gweddry"
	side=1
	canrecruit=1
	recruit=Spearman,Cavalryman,Mage,Heavy Infantryman
	controller=human
	profile=portraits/gweddry.png
	{GOLD 200 150 100}
		[unit]
		type=White Mage
		description=Dacyn
		user_description= _ "Dacyn"
		{IS_HERO}
		side=1
		x=9
		y=16
		profile=portraits/dacyn.png
		[/unit]
	[/side]

#define OUTPOST_AI_STUFF
[ai]
passive_leader=yes
grouping=no
aggression=0.6
[/ai]
#enddef

	[side]
	type=Dark Sorcerer
	description=Mal-Sakkat
	user_description= _ "Mal-Sakkat"
	side=2
	canrecruit=1
#ifdef EASY
	recruit=Walking Corpse,Skeleton Archer
#else
	recruit=Walking Corpse,Skeleton,Skeleton Archer
#endif
		[ai]
		recruitment_pattern=fighter, fighter, archer, fighter
		[/ai]
	team_name=undead
	{GOLD 40 60 120}
	{OUTPOST_AI_STUFF}
	[/side]

	[side]
	race=undead
	type=Dark Sorcerer
	description=Mal-Talar
	user_description= _ "Mal-Talar"
#ifdef EASY
	recruit=Vampire Bat,Skeleton Archer
#else
	recruit=Vampire Bat,Skeleton,Skeleton Archer
#endif
	side=3
	canrecruit=1
	team_name=undead
	{GOLD 50 70 140}
	{OUTPOST_AI_STUFF}
	[/side]

	[side]
	race=undead
	type=Lich
	description=Mal-Uldhar
	user_description= _ "Mal-Uldhar"
#ifdef EASY
	recruit=Vampire Bat,Revenant
#else
	recruit=Vampire Bat,Revenant,Bone Shooter
#endif
	side=4
	canrecruit=1
	team_name=undead
	{GOLD 80 110 180}
	{OUTPOST_AI_STUFF}
	[/side]

	{STARTING_VILLAGES 2 5}
	{STARTING_VILLAGES 3 5}
	{STARTING_VILLAGES 4 8}


	[event]
	name=prestart
		[objectives]
		side=1
			[objective]
#ifdef EASY
			description= _ "Resist until Dacyn's return tomorrow night"
#else
			description= _ "Resist until Dacyn's return in two days"
#endif
			condition=win
			[/objective]
			[objective]
			description= _ "Death of Gweddry"
			condition=lose
			[/objective]
		[/objectives]
#ifdef EASY
		[terrain]
		x,y=4,13
		letter=Gg
		[/terrain]
		[terrain]
		x,y=5,14
		letter=Gg^Ve
		[/terrain]
#endif
	[/event]

	#start event
	[event]
	name=start
		[message]
		description=Gweddry
		message= _ "What? What is going on?"
		[/message]
		[message]
		description=Dacyn
		message= _ "Look. To the east. Undead approach! But wait... I sense something... They cannot see me..."
		[/message]
		[kill]
		description=Dacyn
		[/kill]
		[move_unit_fake]
		type=Ancient Lich
		x=39,34
		y=16,14
		[/move_unit_fake]
		[unit]
		type=Ancient Lich
		description=Mal-Ravanal
		user_description= _ "Mal-Ravanal"
		x,y=34,14
		side=1
		profile=portraits/mal-ravanal.png
		[/unit]
		[message]
		description=Mal-Ravanal
		profile=portraits/mal-ravanal.png
		message= _ "Hm. I do not sense anything out of the ordinary here. My scouts must have deceived me. Very well; destroy them."
		[/message]
		[message]
		description=Mal-Sakkat
		message= _ "Very well, Dark Archon. They will die. And then?"
		[/message]
		[message]
		description=Mal-Ravanal
		profile=portraits/mal-ravanal.png
		message= _ "On with the search. I trust you can defeat these men yourself? I have no time to waste here."
		[/message]
		[kill]
		description=Mal-Ravanal
		[/kill]
		[move_unit_fake]
		type=Ancient Lich
		x=34,39
		y=14,16
		[/move_unit_fake]
		[message]
		description=Gweddry
		message= _ "What?! Men, to arms! And where did Dacyn go?!"
		[/message]
		[message]
		description=Gweddry
		message= _ "There are too many undead, I cannot defeat them... but my orders are to hold this outpost. It appears we will die this day."
		[/message]
		[message]
		description=Gweddry
		message= _ "But... somehow, I do not think Dacyn has abandoned us. He must have had a reason for leaving."
		[/message]
	[/event]

	#Dacyn pops out on keep and gives message about trapdoor.
	[event]
#ifdef EASY
	name=turn 10
#else
	name=turn 12
#endif
		[unit]
		type=White Mage
		description=Dacyn
		user_description= _ "Dacyn"
		{IS_HERO}
		side=1
		x=9
		y=16
		profile=portraits/dacyn.png
		[/unit]
		[message]
		description=Dacyn
		message= _ "Gweddry? Good! You are still alive. Quickly, we must leave this place!"
		[/message]
		[message]
		description=Gweddry
		message= _ "Where did you go?! And where did you come from?"
		[/message]
		[message]
		description=Dacyn
		message= _ "There is no time to explain. If you wish to survive, you will escape through this trapdoor."
		[/message]
		[message]
		description=Gweddry
		message= _ "But what about the outpost?"
		[/message]
		[message]
		description=Dacyn
		message= _ "It is pointless to try to defend it. Now come on, we do not have much time to spare!"
		[/message]
		[objectives]
		side=1
			[objective]
			description= _ "Move Gweddry to the trapdoor"
			condition=win
			[/objective]
			[objective]
			description= _ "Death of Gweddry"
			condition=lose
			[/objective]
			[objective]
			description= _ "Death of Dacyn"
			condition=lose
			[/objective]
			[objective]
			description= _ "Turns run out"
			condition=lose
			[/objective]
		[/objectives]
		#you win when you move to the trapdoor
		[item]
		x=9
		y=16
		image=scenery/trapdoor-open.png
		[/item]
		[event]
		name=moveto
			[filter]
			x=9
			y=16
			description=Gweddry
			[/filter]
			[message]
			description=Gweddry
			message= _ "Follow me, men! Through the trapdoor!"
			[/message]
			[endlevel]
			result=victory
			bonus=yes
			[/endlevel]
		[/event]
	[/event]

	#you are urged to hurry
	[event]
	name=turn 14
		[message]
		description=Dacyn
		message= _ "Hurry! Before long enemy reinforcements will arrive, and we will all die! Go to the trapdoor!"
		[/message]
	[/event]
[/scenario]
