[scenario]
	id=02_Blackwater_Port
	#textdomain wesnoth-httt
	name= _ "Blackwater Port"
	map_data="{campaigns/Heir_To_The_Throne/maps/02_Blackwater_Port.map}"
	{SCENARIO_MUSIC "loyalists.ogg"}
	{TURNS 12 12 9}

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

	next_scenario=03_The_Isle_of_Anduin

	[event]
	name=prestart
		[objectives]
		side=1
			[objective]
				description= _ "Resist until the end of the turns"
				condition=win
			[/objective]
			[objective]
				description= _ "Defeat the enemy leader (Bonus)"
				condition=win
			[/objective]
			[objective]
				description= _ "Death of Konrad"
				condition=lose
			[/objective]
			[objective]
				description= _ "Death of Delfador"
				condition=lose
			[/objective]
			[objective]
				description= _ "Death of Sir Kaylan"
				condition=lose
			[/objective]
		[/objectives]
	[/event]

	{BIGMAP_BLACKWATER_PORT}

	[label]
	x,y=27,8
	text= _ "Blackwater Port"
	[/label]

	[side]
	type=Commander
	description=Konrad
	user_description= _ "Konrad"
	unrenamable=yes
	hitpoints=45
	experience=0
	side=1
	canrecruit=1
	recruit=Elvish Scout,Elvish Fighter,Elvish Archer,Horseman,Elvish Shaman
	gold=100
	team_name=elves
	controller=human
	[/side]

	[side]
	type=Grand Knight
	description=Sir Kaylan
	user_description= _ "Sir Kaylan"

	side=2
	canrecruit=1
	team_name=elves
	recruit=Horseman,Knight
		[ai]
		recruitment_pattern=fighter
		villages_per_scout=0
		[/ai]
		[ai]
			time_of_day=dusk,first_watch,second_watch
			aggression=0.45
			grouping=defensive
		[/ai]
		{GOLD 185 125 100}
	[/side]

	[side]
	type=Orcish Warrior
	description=Mokolo Qimur
	user_description= _ "Mokolo Qimur"
	experience=0
	side=3
	canrecruit=1
	team_name=orcs
	recruit=Orcish Grunt,Wolf Rider,Orcish Archer,Troll Whelp
	{GOLD 100 160 220}
	{INCOME 8 16 20}
		[ai]
		{ATTACK_DEPTH 1 3 5}
		[/ai]
	[/side]

	[event]
	name=prestart
		{STARTING_VILLAGES 2 5}

		[unit]
		type=Swordsman
		x=23
		y=10
		description=Veocyn
		user_description= _ "Veocyn"
		ai_special=guardian
		side=2
		[modifications]
			{TRAIT_LOYAL}
		[/modifications]
		[/unit]
		[unit]
		type=Swordsman
		x=25
		y=11
		description=Yran
		user_description= _ "Yran"
		ai_special=guardian
		side=2
		[modifications]
			{TRAIT_LOYAL}
		[/modifications]
		[/unit]

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

	[event]
	name=start
		[message]
		description=Delfador
		message= _ "We should be able to board a ship at Blackwater Port, but it seems the orcs are heading there too. Rebels who hate Asheviere and are loyal to the memory of the king desperately hold the port, as it is one of the only places where they can ship supplies and weapons."
		[/message]
		[message]
		description=Konrad
		message= _ "Delfador, some orcs are following us! We must make haste!"
		[/message]
		[message]
		description=Sir Kaylan
		message= _ "Delfador, my old friend! We had heard of your coming, and of the attacks on the elves. It is good to see you again, although I would prefer it were not in such sad times."
		[/message]
		[message]
		description=Delfador
		message= _ "Konrad, this is Kaylan, one of the mightiest of the horse lords, and one of the few who is willing to oppose the dark crown. Rumor has it that his lance has slain fifty men and a hundred orcs."
		[/message]
		[message]
		description=Sir Kaylan
		message= _ "It seems the orcs have come here too, to try to wrest this port from our hands. Our defenses are still weak, but reinforcements will arrive soon!"
		[/message]
		[message]
		description=Konrad
		message= _ "We will help you fight them off until the reinforcements arrive."
		[/message]
		[message]
		description=Sir Kaylan
		message= _ "With your help, we have hope we can fend them off. But you must not tarry here long, for your survival is even more important to our cause than the strength of the port. A ship is due here in two days, surely it will be able to take you to safety."
		[/message]
		[message]
		description=Konrad
		message= _ "And the ship will take us to Anduin?"
		[/message]
		[message]
		description=Delfador
		message= _ "Yes, we will sail to the Isle of Anduin, my home Konrad, and the home of many magi."
		[/message]
		[message]
		description=Sir Kaylan
		message= _ "I will send one of my horsemen to serve under you. I offer you my support, Konrad, and the support of my men - from now on you will be able to recruit horsemen."
		[/message]
	#	[message]
	#	speaker=narrator
	#	image="wesnoth-icon.png"
	#	message= _ "You may now recruit horsemen!"
	#	[/message]
		[message]
		description=Konrad
		message= _ "Thank you, sir. But how shall I best use these horsemen? How do they differ from elves?"
		[/message]
#ifdef EASY
		[message]
		description=Sir Kaylan
		message= _ "Elves are a powerful race, Konrad, more powerful than my own people usually acknowledge. But horsemen are powerful in a different way. They have no long range attack, but can charge into combat, inflicting double normal damage, though taking double damage in return. They are also lawful, meaning they fight better by day, and worse at night. Horsemen are unmatched on open land, though elves will serve you better in forests or rugged terrain."
		[/message]
#else
		[message]
		description=Sir Kaylan
		message= _ "Elves may be the lords of the forest, but horsemen are powerful as well. On the plains under the midday sun they can fell the toughest foes with sharp spears and under heavy hoofs!"
		[/message]
#endif
		[message]
		description=Delfador
		message= _ "Recruit troops wisely, Konrad, and remember that you can recall experienced units from past battles to help you fight again."
		[/message]
		[unit]
		description=Haldiel
		user_description= _ "Haldiel"
		type=Horseman
		x=23
		y=24
		side=1
		[modifications]
			{TRAIT_LOYAL}
			{TRAIT_STRONG}
		[/modifications]
		[/unit]
		[message]
		description=Haldiel
		message= _ "Greetings, young master. I pledge myself to your service."
		[/message]
		[message]
		description=Delfador
		message= _ "Konrad, note that Haldiel does not seek gold upkeep; as a loyal unit he fights for us solely out of loyalty to our cause. Such units are extremely valuable. Take care to use them cautiously in battle, lest they fall."
		[/message]
	[/event]

	[event]
	name=time over
		[unit]
		type=Horseman
		description=Yredd
		user_description= _ "Yredd"
		x=35
		y=6
		ai_special=guardian
		side=2
		[modifications]
			{TRAIT_LOYAL}
		[/modifications]
		[/unit]
		[unit]
		type=Horseman
		description=Tarcyn
		user_description= _ "Tarcyn"
		x=35
		y=6
		ai_special=guardian
		side=2
		[modifications]
			{TRAIT_LOYAL}
		[/modifications]
		[/unit]
		[unit]
		type=Horseman
		description=Syryn
		user_description= _ "Syryn"
		x=35
		y=6
		ai_special=guardian
		side=2
		[modifications]
			{TRAIT_LOYAL}
		[/modifications]
		[/unit]
		[unit]
		type=Knight
		description=Cicyn
		user_description= _ "Cicyn"
		x=35
		y=6
		ai_special=guardian
		side=2
		[modifications]
			{TRAIT_LOYAL}
		[/modifications]
		[/unit]
		[unit]
		type=Knight
		description=Ginvan
		user_description= _ "Ginvan"
		x=35
		y=6
		ai_special=guardian
		side=2
		[modifications]
			{TRAIT_LOYAL}
		[/modifications]
		[/unit]
		[unit]
		type=Knight
		description=Simyr
		user_description= _ "Simyr"
		x=35
		y=6
		ai_special=guardian
		side=2
		[modifications]
			{TRAIT_LOYAL}
		[/modifications]
		[/unit]
		[message]
		description=Sir Kaylan
		message= _ "Reinforcements have arrived! Forward, men! I expect each of you to bring me back the head of an orc!"
		[/message]
		[message]
		description=Mokolo Qimur
		image=portraits/James_Woo/orc-warlord3.png
		message= _ "So many foul humans riding on horses! There is no way we can defeat them. Quick, we must make our escape!"
		[/message]
		[endlevel]
		result=victory
		[/endlevel]
	[/event]

	[event]
	name=victory
		[message]
		description=Sir Kaylan
		message= _ "Thank you for the help, friends. The ship should arrive soon, it will take you to Anduin."
		[/message]
		[move_unit_fake]
		type=Galleon
		x=1,2,3,4,5,6,7,8,9,9,9,10,11,12,13,14,15,16,17,18,19,20,21
		y=2,2,3,3,4,4,5,5,6,7,8, 8, 9, 9,10,10,10, 9, 9, 8, 8, 7, 7
		[/move_unit_fake]

		{PLACE_IMAGE units/transport/galleon.png 21 7}

		[message]
		description=Delfador
		message= _ "We should embark now."
		[/message]
		[message]
		description=Sir Kaylan
		message= _ "Safe voyage to you, friends. Rest assured that we will never surrender to the forces of the Dark Queen."
		[/message]
	[/event]

#
# A bonus for anyone who can beat the leader on the HARD level
#

#ifdef HARD
	[event]
	name=die
		[filter]
		description=Mokolo Qimur
		[/filter]
		[unit]
		type=Horseman
		description=Yredd
		user_description= _ "Yredd"
		x=35
		y=6
		ai_special=guardian
		side=2
		[modifications]
			{TRAIT_LOYAL}
		[/modifications]
		[/unit]
		[unit]
		type=Horseman
		description=Tarcyn
		user_description= _ "Tarcyn"
		x=35
		y=6
		ai_special=guardian
		side=2
		[modifications]
			{TRAIT_LOYAL}
		[/modifications]
		[/unit]
		[unit]
		type=Horseman
		description=Syryn
		user_description= _ "Syryn"
		x=35
		y=6
		ai_special=guardian
		side=2
		[modifications]
			{TRAIT_LOYAL}
		[/modifications]
		[/unit]
		[unit]
		type=Knight
		description=Cicyn
		user_description= _ "Cicyn"
		x=35
		y=6
		ai_special=guardian
		side=2
		[modifications]
			{TRAIT_LOYAL}
		[/modifications]
		[/unit]
		[unit]
		type=Knight
		description=Ginvan
		user_description= _ "Ginvan"
		x=35
		y=6
		ai_special=guardian
		side=2
		[modifications]
			{TRAIT_LOYAL}
		[/modifications]
		[/unit]
		[unit]
		type=Knight
		description=Simyr
		user_description= _ "Simyr"
		x=35
		y=6
		side=1
		[modifications]
			{TRAIT_LOYAL}
			{TRAIT_INTELLIGENT}
		[/modifications]
		[/unit]
		[redraw]
		[/redraw]
		[message]
		description=Sir Kaylan
		message= _ "Reinforcements have arrived, but lo! Our allies have already destroyed the orcish army menacing our fair port. In honor, I must reward your valor."
		[/message]
		[message]
		description=Sir Kaylan
		message= _ "You have risked your life to defend our city. In return, I place one of my city's finest defenders in your service. Simyr, step forward. I place your lance in the service of young prince Konrad here. May you help him restore order to the country."
		[/message]
		[message]
		description=Simyr
		message= _ "It is my pleasure and honor to serve, my liege."
		[/message]
	[/event]
#endif

#
# Death event for Sir Kaylan
#
	[event]
	name=die
		[filter]
		description=Sir Kaylan
		[/filter]
		[message]
		speaker=unit
		message= _ "I have failed in my duty to protect the Rightful Heir and the port."
		[/message]
		[message]
		description=Delfador
		message= _ "Without his help, we will be unable to use the ships. There is no hope..."
		[/message]
		[endlevel]
		result=defeat
		[/endlevel]
	[/event]

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