[scenario]
	id=Approaching_Weldyn
	#textdomain wesnoth-ei
	name= _ "Approaching Weldyn"
	map_data="{campaigns/Eastern_Invasion/maps/Approaching_Weldyn}"
	turns=24
	next_scenario=Throne

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

	{DEFAULT_MUSIC_PLAYLIST}

	{campaigns/Eastern_Invasion/utils/deaths.cfg}

	[side]
	type=Lieutenant
	description=Gweddry
	user_description= _ "Gweddry"
	side=1
	canrecruit=1
	controller=human
	team_name=good
	[/side]

#define AI_STUFF
[ai]
	[target]
	side=1
	value=100
	[/target]
	[target]
	side=5
	value=.01
	[/target]
[/ai]
#enddef

	[side]
	type=Necromancer
	description=Mal-un-Darak
	user_description= _ "Mal-un-Darak"
	side=2
	canrecruit=1
	controller=ai
	recruit=Skeleton,Skeleton Archer,Ghost
	{GOLD 250 300 350}
	recruitment_pattern=fighter,archer,scout
	team_name=bad
		{AI_STUFF}
	[/side]

	[side]
	type=Necromancer
	description=Mal-un-Zanrad
	user_description= _ "Mal-un-Zanrad"
	side=3
	canrecruit=1
	controller=ai
	recruit=Walking Corpse,Vampire Bat,Skeleton,
	{GOLD 250 300 350}
	recruitment_pattern=fighter,fighter,scout
	team_name=bad
		{AI_STUFF}
	[/side]

	[side]
	type=Necromancer
	description=Mal-un-Xadrux
	user_description= _ "Mal-un-Xadrux"
	side=4
	canrecruit=1
	controller=ai
	recruit=Revenant,Bone Shooter,Wraith
	{GOLD 325 375 425}
	recruitment_pattern=fighter,archer,scout
	team_name=bad
		{AI_STUFF}
	[/side]

	[side]
	type=General
	description=Konrad II
	user_description= _ "Konrad II"
	profile=portraits/konrad_II.png
	side=5
	canrecruit=1
	controller=ai
	recruit=Swordsman,Pikeman,Longbowman
	{GOLD 260 180 120}
	team_name=good
		[ai]
		passive_leader=yes
		[/ai]
	[/side]

	[event]
	name=prestart
		[objectives]
		side=1
			[objective]
			description= _ "Get Gweddry to Weldyn"
			condition=win
			[/objective]
			[objective]
			description= _ "Death of Gweddry"
			condition=lose
			[/objective]
			[objective]
			description= _ "Death of Dacyn"
			condition=lose
			[/objective]
			[objective]
			description= _ "Death of Owaec"
			condition=lose
			[/objective]
			[objective]
			description= _ "Death of Konrad II"
			condition=lose
			[/objective]
		[/objectives]
		[unit]
		side=5
		type=Swordsman
		x,y=16,31
		ai_special=guardian
		[/unit]
		[unit]
		side=5
		type=Swordsman
		x,y=15,28
		ai_special=guardian
		[/unit]
		[unit]
		side=5
		type=Swordsman
		x,y=16,24
		ai_special=guardian
		[/unit]
		[unit]
		side=5
		type=Swordsman
		x,y=21,22
		ai_special=guardian
		[/unit]
		[unit]
		side=5
		type=Swordsman
		x,y=25,23
		ai_special=guardian
		[/unit]
		[unit]
		side=5
		type=Swordsman
		x,y=28,26
		ai_special=guardian
		[/unit]
	[/event]

	[event]
	name=start
		[recall]
		description=Dacyn
		[/recall]
		[recall]
		description=Owaec
		[/recall]
		[recall]
		description=Grug
		[/recall]
		[recall]
		description=Engineer
		[/recall]
		[message]
		description=Gweddry
		message= _ "We have finally reached Weldyn, but it seems the undead have surrounded it. We must break through to reach the king!"
		[/message]
		[message]
		description=Dacyn
		message= _ "It would be best not to try to defeat these undead, there are too many of them. Go straight to the city."
		[/message]
	[/event]

	[event]
	name=moveto
		[filter]
		x=20-24
		y=26-29
		description=Gweddry
		[/filter]
		[message]
		description=Dacyn
		message= _ "We have reached Weldyn. Now we must have a council to decide what to do next."
		[/message]
		[message]
		description=Konrad II
		message= _ "Come, into the castle."
		[/message]
		[endlevel]
		result=victory
		bonus=yes
		[/endlevel]
	[/event]

	[event]
	name=die
		[filter]
		description=Konrad II
		[/filter]
		[message]
		description=Konrad II
		message= _ "Weldyn has been captured, and Wesnoth is no more..."
		[/message]
		[endlevel]
		result=defeat
		[/endlevel]
	[/event]
[/scenario]
