[scenario]
	id=Duel
	#textdomain wesnoth-ei
	name= _ "The Duel"
	map_data="{campaigns/Eastern_Invasion/maps/The_Arena}"
	turns=-1
	next_scenario=null

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

	{DEFAULT_MUSIC_PLAYLIST}

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

	[side]
	type=Ancient Lich
	description=Mal-Ravanal
	user_description= _ "Mal-Ravanal"
	side=2
	canrecruit=1
	recruit=
	controller=ai
	gold=0
	team_name=bad
	profile=portraits/mal-ravanal.png
	[/side]

	[event]
	name=prestart
		[objectives]
		side=1
			[objective]
			description= _ "Defeat Mal-Ravanal"
			condition=win
			[/objective]
			[objective]
			description= _ "Death of Gweddry"
			condition=lose
			[/objective]
		[/objectives]
	[/event]


	[event]
	name=start
		[message]
		description=Mal-Ravanal
		profile=portraits/mal-ravanal.png
		message= _ "I have waited a long time for this day to come. Prepare to die, Gweddry of Wesnoth!"
		[/message]
		[scroll_to]
		description=Gweddry
		[/scroll_to]
		[message]
		speaker=narrator
		message= _ "The rules of the duel are these:
You may recruit or recall up to 6 units.
At the end of your first turn, your keep will disappear, and you must battle with whatever troops you have at that time.
The first leader to fall loses the duel."
		[/message]
	[/event]

#define DUEL_UNIT TYPE X Y
[unit]
type={TYPE}
side=2
x={X}
y={Y}
[/unit]
#enddef
#define DK
{DUEL_UNIT (Death Knight) 19 6}
#enddef
#define SS
{DUEL_UNIT (Soul Shooter) 19 6}
#enddef
#define SP
{DUEL_UNIT Spectre 19 6}
#enddef
#define NG
{DUEL_UNIT Nightgaunt 19 6}
#enddef
#define NP
{DUEL_UNIT Necrophage 19 6}
#enddef


#define GRASS X Y
[terrain]
x={X}
y={Y}
letter=g
[/terrain]
#enddef

	[event]
	name=turn 2
		{DUEL_UNIT (Necromancer) 28 2}
		{DUEL_UNIT (Lich) 28 2}
		{DUEL_UNIT (Necromancer) 28 2}
		{DUEL_UNIT (Lich) 28 2}
		{DUEL_UNIT (Necromancer) 28 2}
		{DUEL_UNIT (Lich) 28 2}
		{GRASS 3 19}
		{GRASS 28 2}
	[/event]

	[event]
	name=turn 5
		{DK}
		{SS}
		{NP}
		[message]
		description=Gweddry
		message= _ "Wait - What just happened? He called more warriors out of the ground! That's not allowed!"
		[/message]
		[message]
		description=Mal-Ravanal
		profile=portraits/mal-ravanal.png
		message= _ "Stop talking and fight! The rules do not stop me from bringing up warriors that were already here."
		[/message]
	[/event]


	[event]
	name=die
		[filter]
		description=Mal-Ravanal
		[/filter]
		[message]
		description=Mal-Ravanal
		profile=portraits/mal-ravanal.png
		message= _ "I... lose?..."
		[/message]
		[endlevel]
		result=victory
		[/endlevel]
	[/event]

#define TURNX5 T
[event]
name=turn {T}
	[message]
	description=Mal-Ravanal
	profile=portraits/mal-ravanal.png
	message= _ "And more!"
	[/message]
	{DK}
	{SS}
	{NP}
[/event]
#enddef

	{TURNX5 11}
	{TURNX5 17}
	{TURNX5 23}
	{TURNX5 30}
	{TURNX5 38}
	{TURNX5 47}
	{TURNX5 57}
	{TURNX5 68}
	{TURNX5 80}


[/scenario]
