[scenario]
	id=24_Battle_for_Wesnoth
	#textdomain wesnoth-httt
	name= _ "The Battle for Wesnoth"
	map_data="{campaigns/Heir_To_The_Throne/maps/24_Battle_for_Wesnoth.map}"
	# Music is defined in prestart due to a story music key
	turns=60

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

	next_scenario=25_HttT_Epilogue

	[event]
	name=prestart
		[objectives]
		side=1
			[objective]
				description= _ "Defeat Asheviere"
				condition=win
			[/objective]
			[objective]
				description= _ "Death of Konrad"
				condition=lose
			[/objective]
			[objective]
				description= _ "Death of Delfador"
				condition=lose
			[/objective]
			[objective]
				description= _ "Death of Li'sar"
				condition=lose
			[/objective]
			[objective]
				description= _ "Death of Kalenz"
				condition=lose
			[/objective]
			[objective]
				description= _ "Turns run out"
				condition=lose
			[/objective]
		[/objectives]
	[/event]

	[story]
		[part]
		music   =main_menu.ogg
		story= _ "Here we overlook the city of Weldyn. The great city. The ancient city. The city of evil. The city of good. The city of men."
		background=story/arrival_of_the_heir.png
		[/part]
		[part]
		story= _ "I have not looked upon this city for seventeen years. Seventeen years ago, when I should have been at the height of my power. But my strength failed me. I failed, and I cannot atone for it."
		background=story/arrival_of_the_heir.png
		[/part]
		[part]
		story= _ "The battle had been long and hard. We had been defeated. Eldred was slain, but I knew that Asheviere's wrath would be great. That many innocents would be slain. I had to save the monarchy. I had to save the princes. I made haste to Weldyn, before the guards of Asheviere could get there, to carry out their evil orders."
		background=story/arrival_of_the_heir.png
		[/part]
		[part]
		story= _ "But I failed. I was too late. I entered the chambers of the youngest prince, prince Konrad, just as one of the evil ones ran him through. All was lost. The heirs were slain. Only Asheviere and her daughter had any claim to the throne."
		background=story/arrival_of_the_heir.png
		[/part]
		[part]
		story= _ "Of course, you are surprised by this, but it is the truth. In haste, I vanquished the evil ones who had committed this foul deed. Then I took the little prince's broken body, and away I rode. Far away, to the land of the elves."
		background=story/arrival_of_the_heir.png
		[/part]
		[part]
		story= _ "By strange and mysterious fortune, the Elf Lady Parandra had come across a human child. She knew not where he had come from, only that the orcs would have eaten him if it weren't for her intervention. The elves felt that great fortune smiled upon this man-child. Perhaps that is why this most truthful of peoples agreed to my plan."
		background=story/arrival_of_the_heir.png
		[/part]
		[part]
		story= _ "After burying the little prince, we agreed never to speak of him again. Instead, this orphan child we would call Konrad, and he would be brought up to be king. I would say that I had slain the guards before they had carried out their evil deed, instead of after. No one would ever have to know. And no one did know for certain, until now."
		background=story/arrival_of_the_heir.png
		[/part]
		[part]
		story= _ "I had thought that we could one day make you king, Konrad. But now I see that fate has made a different choice. That despite all of Asheviere's evil, this Li'sar is fit for the throne. She is the rightful queen. From a long line of kings, stretching all the way back to the seafarers of old from the west."
		background=story/arrival_of_the_heir.png
		[/part]
		[part]
		story= _ "Now, let us not tarry here any longer! The dawn breaks! The time has come for the heir to the throne to claim it!"
		background=story/arrival_of_the_heir.png
		[/part]
	[/story]

	{BIGMAP_BATTLE_FOR_WESNOTH}

	{STARTING_VILLAGES 5 40}

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

	[side]
	type=Orcish Warlord
	description=Haliel-Maga
	user_description= _ "Haliel-Maga"
	side=2
	canrecruit=1
	recruit=Orcish Warrior,Goblin Knight,Goblin Pillager,Orcish Crossbowman,Orcish Assassin,Troll
	gold=300
		[ai]
		{ATTACK_DEPTH 5 5 6}
		recruitment_pattern=scout,fighter,archer
		[/ai]
	team_name=evil
	[/side]

	[side]
	type=General
	description=Heford
	user_description= _ "Heford"
	side=3
	canrecruit=1
	recruit=Horseman,Dragoon,Royal Guard,Longbowman,Heavy Infantryman
		[ai]
		{ATTACK_DEPTH 5 5 6}
		[/ai]
	team_name=evil
	{GOLD 175 300 400}
	[/side]

	[side]
	type=Cavalier
	description=Sir Kalm
	user_description= _ "Sir Kalm"
	side=4
	canrecruit=1
	recruit=Horseman,Dragoon,Cavalier,Cavalryman
		[ai]
		recruitment_pattern=scout
		{ATTACK_DEPTH 5 5 6}
		[/ai]
	team_name=evil
	{GOLD 175 300 400}
	[/side]

	[side]
	type=Dark Queen
	description=Asheviere
	user_description= _ "Asheviere"
	side=5
	canrecruit=1
	recruit=Royal Guard,Heavy Infantryman,Dragoon,Longbowman,Duelist,Halberdier
	{GOLD 300 400 500}
		[ai]
		{ATTACK_DEPTH 5 6 6}
		[/ai]
	team_name=evil
	[/side]

	[event]
	name=prestart
		[music]
		name="revelation.ogg"
		[/music]
		[if]
			[variable]
			name=clan_bayar
			numerical_equals=1
			[/variable]
			[then]
				{UNIT (Grand Knight) (Lord Bayar) (_ "Lord Bayar") 1 39 4}
			[/then]
		[/if]
		[if]
			[variable]
			name=clan_daryn
			numerical_equals=1
			[/variable]
			[then]
				{UNIT (Grand Knight) (Sir Daryn) (_ "Sir Daryn") 1 39 3}
			[/then]
		[/if]
		[if]
			[variable]
			name=clan_ruga
			numerical_equals=1
			[/variable]
			[then]
				{UNIT (Grand Knight) (Sir Ruga) (_ "Sir Ruga") 1 39 9}
			[/then]
		[/if]
		[if]
			[variable]
			name=clan_alric
			numerical_equals=1
			[/variable]
			[then]
				{UNIT (Grand Knight) (Sir Alric) (_ "Sir Alric") 1 39 8}
			[/then]
		[/if]
	[/event]

	[event]
	name=start
		[recall]
		description=Delfador
		[/recall]
		[recall]
		description=Kalenz
		[/recall]
		[recall]
		description=Li'sar
		[/recall]
		[role]
		type=Grand Knight
		side=1
		role=clanboss
		[/role]
		[message]
		description=Asheviere
		message= _ "So, these rebels come at last to face me, while most of my army is off fighting the fickle clans."
		[/message]
		[message]
		speaker=clanboss
		message= _ "Wretched wench. Your army is tasting death as we speak. The clans have arrived to unseat you, pretender!"
		[/message]
		[message]
		description=Li'sar
		message= _ "Surrender, mother. The land's blood is spent. I have come to take my rightful place."
		[/message]
		[message]
		description=Asheviere
		message= _ "Ahh. My own daughter, a turncoat. So it is true. Such treason my reign must endure! But endure it will."
		[/message]
		[message]
		description=Delfador
		message= _ "How long must the people endure your rule? Give the throne to your daughter. She is the rightful heir. We even hold the scepter to prove it!"
		[/message]
		[message]
		description=Asheviere
		message= _ "Delfador! My old tormentor! Treason! Men! Seize them! Kill them! Kill them all!"
		[/message]
	[/event]

	[event]
	name=attacker_hits
		[filter_second]
		description=Asheviere
		[/filter_second]
		[message]
		speaker=unit
		message= _ "Take this, witch!"
		[/message]
	[/event]

	[event]
	name=die

		[object]
		name= _ "The Queen is Dead"
		duration=forever
		silent=yes
			[filter]
			type=Dark Queen
			[/filter]
			[effect]
			apply_to=variation
			name=dead_queen
			[/effect]
		[/object]

		[redraw]
		[/redraw]
		[filter]
		description=Asheviere
		[/filter]
		[filter_second]
		description=Li'sar
		[/filter_second]
		[message]
		description=Li'sar
		message= _ "Mother, I swore to end your reign of evil, and now I shall."
		[/message]
		[message]
		description=Asheviere
		message= _ "Daughter, I built this kingdom for you. It has all been for you!"
		[/message]
		[message]
		description=Li'sar
		message= _ "Even now, can you not tell the truth? Your greed has corrupted your soul. You are a monster! A murderess! It pains me to kill you, mother, but you have chosen your own fate. For Wesnoth!"
		[/message]
		[message]
		speaker=narrator
		image="wesnoth-icon.png"
		message= _ "Li'sar strikes a killing blow!"
		[/message]
		[kill]
			description=Asheviere
			animate=yes
			fire_event=no
		[/kill]
	[/event]
	[event]
	name=die
		[filter]
		description=Asheviere
		[/filter]
		[filter_second]
		description=Konrad
		[/filter_second]

		[object]
		name= _ "The Queen is Dead"
		duration=forever
		silent=yes
			[filter]
			type=Dark Queen
			[/filter]
			[effect]
			apply_to=variation
			name=dead_queen
			[/effect]
		[/object]

		[redraw]
		[/redraw]
		[message]
		description=Konrad
		message= _ "You have hunted me across the countryside, indeed across the years. Here I am, Dark Queen."
		[/message]
		[message]
		description=Asheviere
		message= _ "I was sure I had killed you, yet you haunt me still. Be gone, demon! I banish you, ghost!"
		[/message]
		[message]
		description=Konrad
		message= _ "Oh, wretched lady, I am very real. The land has suffered from your greed and ambition. You will now be held to account for your misdeeds. For the young prince Konrad! For WESNOTH!"
		image=portraits/konrad-angry.png
		[/message]
		[message]
		speaker=narrator
		image="wesnoth-icon.png"
		message= _ "Konrad strikes a killing blow!"
		[/message]
		[kill]
			description=Asheviere
			animate=yes
			fire_event=no
		[/kill]
		[endlevel]
		result=continue
		[/endlevel]
	[/event]
	[event]
	name=die
		[filter]
		description=Asheviere
		[/filter]
		[filter_second]
		description=Delfador
		[/filter_second]

		[object]
		name= _ "The Queen is Dead"
		duration=forever
		silent=yes
			[filter]
			type=Dark Queen
			[/filter]
			[effect]
			apply_to=variation
			name=dead_queen
			[/effect]
		[/object]

		[redraw]
		[/redraw]
		[message]
		description=Delfador
		message= _ "As I destroyed your son, I now destroy you."
		[/message]
		[message]
		description=Asheviere
		message= _ "You were always defiant, wizard, and no one has thwarted my plans as much as you."
		[/message]
		[message]
		description=Delfador
		message= _ "I have always been the humble servant of the crown, even now."
		[/message]
		[message]
		description=Asheviere
		message= _ "Delfador! You utterly disgust me, you sniveling worm. How dare you confront me, your queen."
		[/message]
		[message]
		description=Delfador
		message= _ "How dare I? I am Delfador, High Provost of the Council of Archmagi..."
		[/message]
		[message]
		description=Delfador
		message= _ "... bearer of the staff of Emeric, guardian of the book of Crelanu ..."
		[/message]
		[message]
		description=Delfador
		message= _ "... Mage Protector of The Kingdom Of The Peoples From The West-North, Chief Advisor to the CROWN..."
		[/message]
		[message]
		description=Delfador
		message= _ "... AND PERSONAL COUNSELOR TO MY FRIEND AND KING, GARARD THE SECOND! TODAY YOU MEET YOUR ATONEMENT!"
		[/message]
		[message]
		speaker=narrator
		image="wesnoth-icon.png"
		message= _ "In a horrific inferno of magical rage, Asheviere is completely annihilated!"
		[/message]

		[scroll_to_unit]
		description=Delfador
		[/scroll_to_unit]
		[colour_adjust]
		red=-100
		green=-100
		blue=-100
		[/colour_adjust]
		[sound]
		name=fire.wav
		[/sound]
		[colour_adjust]
		red=200
		green=0
		blue=0
		[/colour_adjust]
		[sound]
		name=lightning.ogg
		[/sound]
		[kill]
			description=Asheviere
			animate=yes
			fire_event=no
		[/kill]
		[colour_adjust]
		red=100
		green=100
		blue=150
		[/colour_adjust]
		[colour_adjust]
		red=0
		green=0
		blue=0
		[/colour_adjust]
		[endlevel]
		result=continue
		[/endlevel]
	[/event]

	[event]
	name=die
		[filter]
		description=Asheviere
		[/filter]
		[message]
		description=Asheviere
		message= _ "Treason! The evil ones have slain me!"
		[/message]
		[object]
		name= _ "The Queen is Dead"
		duration=forever
		silent=yes
			[filter]
			type=Dark Queen
			[/filter]
			[effect]
			apply_to=variation
			name=dead_queen
			[/effect]
		[/object]
		[music]
		name="main_menu_new.ogg"
		immediate=yes
		[/music]
		[kill]
			description=Asheviere
			animate=yes
			fire_event=no
		[/kill]
		[message]
		description=Delfador
		message= _ "And so passes Asheviere, the dark queen of Wesnoth."
		[/message]
		[message]
		description=Konrad
		message= _ "We have won at last! Li'sar! You will be queen!"
		[/message]
		[message]
		description=Li'sar
		message= _ "Yes, but I won't ever forget what you have done for me, Konrad, Delfador, and Kalenz."
		[/message]
		[message]
		description=Kalenz
		message= _ "So much blood. So much death. For what? A title?"
		[/message]
		[message]
		description=Li'sar
		message= _ "For justice, Elf Lord. We fight because if we do not, evil would prevail. But, I implore you to let the dead have their rest. We have taken victory. Tomorrow is a new day, friends... let us build this kingdom anew."
		[/message]
		[endlevel]
		result=continue
		[/endlevel]
	[/event]

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