[scenario]
	id=11_The_Ford_of_Abez
	#textdomain wesnoth-httt
	name= _ "The Ford of Abez"
	map_data="{campaigns/Heir_To_The_Throne/maps/11_The_Ford_of_Abez.map}"
	{SCENARIO_MUSIC "loyalists.ogg"}
	{TURNS 27 24 21}

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

	next_scenario=12_Northern_Winter

	{BIGMAP_FORD_OF_ABEZ}

	[event]
	name=prestart
		[objectives]
		side=1
			[objective]
				description= _ "Move Konrad to the north side of the river"
				condition=win
			[/objective]
			[objective]
				description= _ "Death of Konrad"
				condition=lose
			[/objective]
			[objective]
				description= _ "Death of Delfador"
				condition=lose
			[/objective]
			[objective]
				description= _ "Death of Kalenz"
				condition=lose
			[/objective]
		[/objectives]
	[/event]

	[side]
	type=Commander
	description=Konrad
	user_description= _ "Konrad"
	unrenamable=yes
	side=1
	canrecruit=1
	controller=human
	team_name=good
	[/side]

	[side]
	type=Princess
	description=Li'sar
	user_description= _ "Li'sar"
	side=2
	canrecruit=1
	recruit=Cavalryman,Swordsman,Spearman,Red Mage,Ogre,Duelist
		[ai]
		{ATTACK_DEPTH 4 5 5}
		recruitment_pattern=scout,fighter,fighter,fighter,mixed fighter
		aggression=1.0
		caution=-5.0
		grouping=no
		leader_value=100
		[/ai]
	gold=200
	income=50
	team_name=bad
	[/side]

	[side]
	type=Orcish Warlord
	description=Gaga-Breuk
	user_description= _ "Gaga-Breuk"
	side=3
	canrecruit=1
	team_name=orcs
#ifdef EASY
	recruit=Orcish Warrior,Orcish Crossbowman,Wolf Rider
#endif

#ifdef NORMAL
	recruit=Orcish Warrior,Orcish Crossbowman,Goblin Knight
#endif

#ifdef HARD
	recruit=Orcish Warrior,Orcish Crossbowman,Blood Bat
#endif

	{GOLD 140 200 260}
		[ai]
		{ATTACK_DEPTH 4 5 5}
		aggression=1.0
		caution=-4.0
		grouping=no
		recruitment_pattern=scout,fighter,fighter

		leader_value=100

			#target Konrad especially heavily
			[target]
			description=Konrad
			value=100
			[/target]
		[/ai]
	[/side]

	[side]
	side=4
	no_leader=yes
	team_name=creature
		[ai]
			aggression=1.0
			caution=-4.0
			grouping=no
			[avoid]
			x=1-100
			y=21-100
			[/avoid]
			[avoid]
			x=1-100
			y=1-12
			[/avoid]
			#target Konrad especially heavily
			[target]
			description=Konrad
			value=100
			[/target]
			village_value=0
		[/ai]
	[/side]

	{OBJ_TRIDENT_STORM 16 17 ford_trident}

#define FORD_GUARD X Y
	[unit]
		type=Royal Guard
		generate_description=yes
		ai_special=guardian
		x={X}
		y={Y}
		side=2
		[modifications]
			{TRAIT_LOYAL}
		[/modifications]
	[/unit]
#enddef

	[event]
	name=prestart

		{FORD_GUARD 7 27}
		{FORD_GUARD 6 28}
		{FORD_GUARD 6 25}
		{FORD_GUARD 4 25}
		{FORD_GUARD 3 27}
		{FORD_GUARD 4 28}

		[recall]
		description=Delfador
		[/recall]
		[recall]
		description=Kalenz
		[/recall]
	[/event]

	[event]
	name=start
		[message]
		description=Delfador
		message= _ "This is the Ford of Abez. When we ford this river, we will be leaving Wesnoth, and entering the lands of the North. The dwarves once ruled these lands, but they are now filled only with chaos. This is where your father and uncle were betrayed, almost nineteen years ago now, Konrad."
		[/message]
		[message]
		description=Konrad
		message= _ "Really? So what happened, Delfador?"
		[/message]
		[message]
		description=Delfador
		message= _ "The forces of the king were encamped here, and the forces of the north were on the north side of the river. For three days and three nights the armies faced each other, neither willing to ford the river. On the fourth day, the northern armies crossed and attacked us."
		[/message]
		[message]
		description=Konrad
		message= _ "And then... we were defeated?"
		[/message]
		[message]
		description=Delfador
		message= _ "We were winning the battle. We were repelling them..."
		[/message]
		[message]
		description=Kalenz
		message= _ "And then the king's son, in the heat of battle, turned upon the king!"
		[/message]
		[message]
		description=Konrad
		message= _ "But you avenged the murder. You killed the prince. Right, Delfador?"
		[/message]
		[message]
		description=Delfador
		message= _ "When I saw the king betrayed and his banner fallen, I fled the battle. I know not now whether it was wisdom or cowardice, but I did flee, seeing no further hope on that day."
		[/message]
		[message]
		description=Konrad
		message= _ "Oh, but the elves always told me that you killed the prince, Delfador, even though you never talked about it."
		[/message]
		[message]
		description=Delfador
		message= _ "That foolish boy killed himself."
		[/message]
		[message]
		description=Konrad
		message= _ "What do you mean?"
		[/message]
		[message]
		description=Delfador
		message= _ "I mustered men to fight against the traitor-king, and of course Asheviere too, for she was behind it all. We were outnumbered, perhaps four to one. In the heat of battle, that boy, fool that he was, came charging at me, slashing wildly. I had little choice but to end his life."
		[/message]
		[message]
		description=Konrad
		message= _ "So it is true, you did kill him?"
		[/message]
		[message]
		description=Delfador
		message= _ "He did die in battle at my hand. It is sad that your brothers did not have the opportunity to experience such an honorable death, Konrad."
		[/message]
		[message]
		description=Kalenz
		message= _ "With all respect, my lords, we must make haste. We have to ford the river immediately. And, look! It seems that the guard-towers on the river banks are manned!"
		[/message]
		[message]
		description=Gaga-Breuk
		image=portraits/James_Woo/orc-warlord2.png
		message= _ "Look! Some of the southerners, men of Wesnoth, are trying to cross into our lands! We will slaughter them by the river's edge!"
		[/message]
		[message]
		description=Konrad
		message= _ "Isn't there somewhere else we can cross? Maybe upstream?"
		[/message]
		[message]
		description=Delfador
		message= _ "Winter quickly bears down upon us. We have only a few days to make the crossing, and the nearest bridge is far upstream. To be trapped south of the river when winter arrives would be suicide. Asheviere would have us trapped like rats! Look to the west! Asheviere has a border fort, and it seems to be full of soldiers! We must cross here, and quickly!"
		[/message]
		[message]
		description=Li'sar
		message= _ "There they are! So it is true, they foiled the undead. Now they are trying to leave Wesnoth. We can't let them cross the river. After them, men!"
		[/message]

		[if]
		[variable]
		name=get_gryphons
		numerical_equals=1
		[/variable]
			[then]
				[message]
				description=Konrad
				message= _ "Not her again! We must hurry! Do not forget to bring the gryphon eggs. They must be allowed more time to hatch. Quickly!"
				[/message]
			[/then]
			[else]
				[message]
				description=Konrad
				message= _ "Not her again! Quickly! We must hurry!"
				[/message]
			[/else]
		[/if]
	[/event]

	#if the players marches over to lisar, reinforcements appear
	[event]
		name=moveto
		[filter_second]
			side=1
			x=0-16
			y=23,34
		[/filter_second]
		{FORD_GUARD 1 29}
		{FORD_GUARD 1 29}
		{FORD_GUARD 1 29}
		{FORD_GUARD 1 29}
		{FORD_GUARD 1 29}
		{FORD_GUARD 1 29}
		{FORD_GUARD 1 29}
		{FORD_GUARD 1 29}
		{FORD_GUARD 1 29}
		{FORD_GUARD 1 29}
	[/event]

	#getting closer --> more reinforcements
	[event]
		name=moveto
		[filter_second]
			side=1
			x=2-9
			y=24,30
		[/filter_second]
		[message]
			speaker=second_unit
			message= _ "Stop! You shall not pass! Quick, reinforcements, protect the Princess!"
		[/message]
		{FORD_GUARD 1 27}
		{FORD_GUARD 1 27}
		{FORD_GUARD 1 27}
		{FORD_GUARD 1 27}
		{FORD_GUARD 1 27}
		{FORD_GUARD 1 27}
	[/event]

	#if the player dares attack Li'sar's escort, they are pounced on by
	#many Royal Guards
	[event]
	name=attack
		[filter_second]
		type=Royal Guard
		[/filter_second]
		[message]
		speaker=second_unit
		message= _ "Stop! You shall not pass! Quick, reinforcements, protect the Princess!"
		[/message]
		{FORD_GUARD 5 27}
		{FORD_GUARD 5 27}
		{FORD_GUARD 5 27}
		{FORD_GUARD 5 27}
		{FORD_GUARD 5 27}
		{FORD_GUARD 5 27}
	[/event]

	[event]
	name=turn 5

		{UNIT (Sea Serpent) (Sea Serpent) ( _ "Sea Serpent") 4 1 15}

#define SEA_CREATURE
		{UNIT (Cuttle Fish) (Cuttle Fish) ( _ "Cuttle Fish") 4 1 15}
#enddef

		{SEA_CREATURE}
		{SEA_CREATURE}
		{SEA_CREATURE}

#ifdef NORMAL
		{SEA_CREATURE}
		{SEA_CREATURE}
#endif

#ifdef HARD
		{SEA_CREATURE}
		{SEA_CREATURE}
		{SEA_CREATURE}
		{SEA_CREATURE}
#endif
		[message]
			type=Sea Serpent
			message= _ "Ruaarrrrrrrr!"
		[/message]
		[message]
			description=Konrad
			message= _ "What is that?"
		[/message]
		[message]
			description=Kalenz
			message= _ "Creatures of the deep are upon us! This may be very dangerous. Be quick! We must get to the other side with all haste!"
		[/message]
	[/event]

	#moving Konrad to the other shore
	[event]
		name=moveto
		[filter]
			description=Konrad
			x=1-44
			y=1-8
		[/filter]

		[message]
			description=Konrad
			message= _ "We made it across the river safely! Where to now?"
		[/message]

		[message]
			description=Delfador
			message= _ "If we are to have any hope of penetrating into Knalga, we must continue north to seek help from the Dwarves of the Deep Mountains in the north."
		[/message]

		[message]
			description=Li'sar
			message= _ "I cannot believe it. They have made it away! We must make chase. After them, men! Let us cross the river too! We will meet again, foul impostor."
		[/message]

		[message]
			description=Konrad
			message= _ "Do you think she's really going to chase us, Delfador?"
		[/message]

		[message]
			description=Delfador
			message= _ "It surely looks like she will try, but the sea creatures will make it difficult for her. We must continue onward. If she makes it across before winter, then so be it!"
		[/message]

		[endlevel]
		result=victory
		bonus=yes
		[/endlevel]
	[/event]

	{campaigns/Heir_To_The_Throne/utils/deaths.cfg}
[/scenario]
