[scenario]
	id=Undead_Border_Patrol
	#textdomain wesnoth-ei
	name= _ "The Undead Border Patrol"
	map_data="{campaigns/Eastern_Invasion/maps/The_Undead_Border_Patrol.map}"
	turns=18

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

	{DEFAULT_MUSIC_PLAYLIST}

	{campaigns/Eastern_Invasion/utils/deaths.cfg}

	[side]
	race=Humans
	type=Lieutenant
	description=Gweddry
	user_description= _ "Gweddry"
	side=1
	canrecruit=1
	controller=human
	{GOLD 200 150 100}
	[/side]

	[side]
	type=Dark Sorcerer
	description=Mal-Skraat
	user_description= _ "Mal-Skraat"
	side=2
	canrecruit=1
	recruit=Vampire Bat,Skeleton,Skeleton Archer
	{GOLD 60 120 200}
	team_name=undead
	[/side]

	[side]
	type=Lich
	description=Mal-Telnarad
	user_description= _ "Mal-Telnarad"
	side=3
	canrecruit=1

#ifdef HARD
	recruit=Blood Bat,Skeleton Archer,Skeleton,Dark Adept,Ghost
#else
	recruit=Vampire Bat,Skeleton Archer,Skeleton,Dark Adept
#endif
	{GOLD 120 200 300}
	{INCOME 4 8 12}
	team_name=undead
	[/side]

	[event]
	name=prestart
		[objectives]
		side=1
			[objective]
			description= _ "Defeat either enemy leader"
			condition=win
			[/objective]
			[objective]
			description= _ "Death of Gweddry"
			condition=lose
			[/objective]
			[objective]
			description= _ "Death of Dacyn"
			condition=lose
			[/objective]
		[/objectives]
	[/event]

	[event]
	name=start
		[recall]
		description=Dacyn
		[/recall]
		[message]
		description=Dacyn
		message= _ "We have gotten out of that mountain range now, and the path northwards is clear. Let us go north, now, and try to reach Owaec at the outpost."
		[/message]
		[message]
		description=Gweddry
		message= _ "Wait. I am not sure that is the best option. If we go east now, we may be able to find the lich Mal-Ravanal who attacked us, and destroy him before he can attack Wesnoth again. After we escaped, I suspect he went back east to find us."
		[/message]
		[message]
		description=Mal-Skraat
		message= _ "They run from me! Still, it will not help them, the border patrol will destroy them. I may even be promoted!"
		[/message]
	[/event]

	[event]
	name=die
		[filter]
		description=Mal-Skraat
		[/filter]
		[message]
		description=Mal-Skraat
		message= _ "Now I will never get promoted!"
		[/message]
		[message]
		description=Dacyn
		message= _ "Come, let us return to Wesnoth and aid the Northern Outpost."
		[/message]
		[endlevel]
		result=victory
		bonus=yes
		next_scenario=Northern_Outpost
		[/endlevel]
	[/event]

	[event]
	name=die
		[filter]
		description=Mal-Telnarad
		[/filter]
		[message]
		description=Dacyn
		message= _ "We have defeated this patrol, but we can still turn back! Do we want to go further into these lands now, or do we want to try to turn back and defeat this dark sorcerer?"
		[/message]
		[message]
		description=Gweddry
		message= _ "Hmm..."
			[option]
			message= _ "I wish to destroy the evil before it can spread. East we go!"
				[command]
					[message]
					description=Dacyn
					message= _ "I cannot say if this is a good decision, but I will follow you."
					[/message]
					[message]
					description=Mal-Skraat
					message= _ "Noo!!! I can't be promoted if they run away!"
					[/message]
					[endlevel]
					result=victory
					bonus=yes
					next_scenario=Mal-Ravanals_Capitol
					[/endlevel]
				[/command]
			[/option]
			[option]
			message= _ "You are right. It is foolish to go onward - we must defeat Mal-Skraat and turn back, going to the Northern Outpost."
				[command]
					[message]
					description=Mal-Skraat
					message= _ "Good! if I defeat them, I can become a lich!"
					[/message]
				[/command]
			[/option]
		[/message]
	[/event]

	[event]
	name=time over
		[if]
			[have_unit]
			description=Mal-Telnarad
			[/have_unit]
			[then]
				[message]
				description=Dacyn
				message= _ "We failed to defeat either enemy! Now more liches will come, and we will be overwhelmed!"
				[/message]
				[endlevel]
				result=defeat
				[/endlevel]
			[/then]
			[else]
				[message]
				description=Gweddry
				message= _ "We cannot spend any more time attempting to defeat Mal-Skraat. Like it or not, we must go further into these undead lands."
				[/message]
				[message]
				description=Mal-Skraat
				message= _ "Noo!!! He will reach Mal-Ravanal's capital, and I shall be punished for letting him escape!"
				[/message]
				[endlevel]
				result=victory
				next_scenario=Mal-Ravanals_Capital
				[/endlevel]
			[/else]
		[/if]
	[/event]
[/scenario]

