[scenario]
	id=Epilogue
	#textdomain wesnoth-trow
	name= _ "Epilogue"
	map_data="{campaigns/The_Rise_Of_Wesnoth/maps/The_Plan.map}"

	{AFTERNOON}

	next_scenario=null

	[music]
	name="elf-land.ogg"
	[/music]

	{campaigns/The_Rise_Of_Wesnoth/utils/trow-deaths.cfg}

	[story]
		[part]
			background=story/the_great_continent.png
			show_title=yes
			{DOT 180 180}
			{DOT 195 170}
			{DOT 210 170}
			{DOT 225 173}
			{DOT 240 180}
			{DOT 250 190}
			{DOT 250 205}
			{CROSS 236 218}
		[/part]
	[/story]

	[side]
		type=Noble Commander
		description=Prince Haldric
		user_description= _ "Prince Haldric"
		unrenamable=yes
		canrecruit=1
		controller=human
		team_name=Haldric
	[/side]

	[event]
	name=prestart

		{PLACE_IMAGE (scenery/slab1.png) 8 4}

		[recall]
			description=Lady Jessica
		[/recall]
		[recall]
			description=Burin the Lost
		[/recall]
		[recall]
			description=Sir Ruddry
		[/recall]
		[recall]
			description=Sir Ladoc
		[/recall]
		[recall]
			description=Minister Edmond
		[/recall]

		[store_unit]
			variable=haldric_s
			kill=yes
			[filter]
			description=Prince Haldric
			[/filter]
		[/store_unit]

		[teleport]
			[filter]
				description=Lady Jessica
			[/filter]
			x=8
			y=5
		[/teleport]
		[teleport]
			[filter]
				description=Burin the Lost
			[/filter]
			x=14
			y=7
		[/teleport]
		[teleport]
			[filter]
				description=Sir Ruddry
			[/filter]
			x=14
			y=8
		[/teleport]
		[teleport]
			[filter]
				description=Sir Ladoc
			[/filter]
			x=14
			y=8
		[/teleport]
		[teleport]
			[filter]
				description=Minister Edmond
			[/filter]
			x=11
			y=3
		[/teleport]

		[terrain]
			x=10
			y=5
			letter=Re
		[/terrain]

		{PLACE_IMAGE (items/flower2.png) 10 5}
	[/event]

	[event]
	name=start
		[scroll_to_unit]
			description=Lady Jessica
			x=8
			y=5
		[/scroll_to_unit]

		[move_unit_fake]
			type=$haldric_s.type
			x=12,13,13,13,13,12,11,11
			y=10,10,9,8,7,6,6,7
		[/move_unit_fake]

		[set_variable]
			name=haldric_s.facing
			value=reverse
		[/set_variable]
		[set_variable]
			name=haldric_s.x
			value=11
		[/set_variable]
		[set_variable]
			name=haldric_s.y
			value=7
		[/set_variable]

		[unstore_unit]
			variable=haldric_s
			find_vacant=yes
		[/unstore_unit]

		{CLEAR_VARIABLE haldric_s}

		[delay]
			time=1250
		[/delay]

		[message]
			description=Minister Edmond
			message= _ "May Commander Aethyr have a peaceful journey into the next world, where he has been preceded by his wife and loving daughters. For his heroism in the face of adversity a place of glory is assured to him in the Halls of Light..."
		[/message]
		[message]
			description=Prince Haldric
			message= _ "Without the Commander's noble sacrifice we would have never carried the day. We have won a great victory here today but much has been lost. My father Eldaric and King Addroran have fallen, and with them many other good people. However, there is hope, and a new land is open before us!"
		[/message]

		[if]
			[have_unit]
				[or]
				description=Minister Edmond
				[/or]
				[or]
				description=Burin the Lost
				[/or]
				[or]
				description=Sir Ruddry
				[/or]
				[or]
				description=Sir Ladoc
				[/or]
			[/have_unit]
			[then]
				[message]
					description=Prince Haldric
					message= _ "But dark deeds have been done on all sides. There is now a secret that only Jessica and I share. I must have your word that what I say will never be uttered again."
				[/message]
				[message]
					description=Burin the Lost
					message= _ "I have followed you this far, I will keep your secret. I pledge."
				[/message]
				[message]
					description=Sir Ruddry
							message= _ "Lord, I shall guard your secret until the day of my death."
				[/message]
				[message]
					description=Sir Ladoc
							message= _ "I will take it with me to my grave."
				[/message]
				[message]
					description=Minister Edmond
							message= _ "I agree, but misfortune may follow you depending on the nature of your misdeed."
				[/message]
				[message]
					description=Prince Haldric
					message= _ "The elves don't have the Ruby of Fire. We perpetrated a ruse on the orcs. If they return they will come looking for the elves."
				[/message]
				[message]
					description=Lady Jessica
					message= _ "To be fair to you, Haldric, the elves were considering betraying their pact with us."
				[/message]
				[message]
					description=Burin the Lost
					message= _ "Humph. I suspected as much -- from both the elves and you. Humans and elves always think they're so clever!"
				[/message]
				[message]
					description=Minister Edmond
					message= _ "May the Lords of Light have Mercy on you. But, I am bound by my word."
				[/message]
			[/then]
		[/if]

		[message]
			description=Prince Haldric
			message= _ "Jessica, you hid the ruby away in that vile Troll Hole? Didn't you?"
		[/message]
		[message]
			description=Lady Jessica
			message= _ "What? Why would you doubt me?"
		[/message]
		[message]
			description=Prince Haldric
			message= _ "The orcs that didn't escape in the ships have regrouped. They are preparing to march on the elves. We should come to the aid of our new friends."
		[/message]
		[message]
			description=Prince Haldric
			message= _ "These orcs are few, but the elves aren't accustomed to war. Besides we will have to rely on elven charity if we are to survive this first winter."
		[/message]
		[message]
			description=Prince Haldric
			message= _ "After that, we should build towns in all of the regions that the elves have given us. We should move our capital inland, away from the coast. I hope the children of the good people of the west-north, of the Green Isle, find prosperity in this new land."
		[/message]
		[if]
			[have_unit]
				[or]
				description=Minister Edmond
				[/or]
				[or]
				description=Burin the Lost
				[/or]
				[or]
				description=Sir Ruddry
				[/or]
				[or]
				description=Sir Ladoc
				[/or]
			[/have_unit]
			[then]
				[message]
					description=Prince Haldric
					message= _ "So what of the rest of you?"
				[/message]
				[message]
					description=Burin the Lost
					message= _ "I shall go back to my people. It seems we have grown many and strong in the time I was gone. I will try to convince them of the wisdom of using the underways to settle new lands."
				[/message]
				[message]
					description=Burin the Lost
					message= _ "I know the way to many places, I think. I want to find out if there are dwarves in other lands. It's a big world with lots of good mountains. Of that much I am sure."
				[/message]
				[message]
					description=Minister Edmond
					message= _ "We have lost much in the last few months, but we should not lose all of our knowledge. I will go forth amongst the people and spread wisdom, and see about establishing a new order of Magi in this new land."
				[/message]
				[message]
					description=Sir Ruddry
					message= _ "I am but a humble servant of the Crown. I will establish a new order of knights for a new land. For a new King, if you will allow me to serve under your banner."
				[/message]
				[message]
					description=Sir Ladoc
					message= _ "I am but a humble servant of the Crown. I will establish a new order of knights for a new land. For a new King, if you will allow me to serve under your banner."
				[/message]
				[message]
					description=Prince Haldric
					message= _ "Excellent."
				[/message]
			[/then]
		[/if]
		[message]
			description=Prince Haldric
			message= _ "I suppose I am King Haldric now. Hmm... but what to call this new kingdom?"
		[/message]
		[message]
			description=Lady Jessica
			message= _ "May I make a suggestion?"
		[/message]
		[message]
			description=Prince Haldric
			message= _ "Sure."
		[/message]
		[message]
			description=Lady Jessica
			message= _ "The word Wesfolk is from your old tongue. It means 'People of the West'. The elves call us the people of the west-north. Under the same old tongue that would be 'Wes Noth'. So I suggest that the new kingdom be called 'Wesnoth', in honor of our old home."
		[/message]
		[message]
			description=Prince Haldric
			message= _ "Hmm. 'Wesnoth'. I like it. Yes, 'Wesnoth' would be fine. So I am the first King of Wesnoth!"
		[/message]
		[message]
			description=Lady Jessica
			message= _ "So, what is to become of me?"
		[/message]
		[message]
			description=Prince Haldric
			message= _ "There are many Wesfolk amongst the remains of my people. We must stay united under one banner. I will need you by my side if there is any hope of building a true 'Kingdom of Wesnoth'. Come, we have much work to do."
		[/message]
		[message]
			description=Lady Jessica
			message= _ "We!?"
		[/message]
		[message]
			speaker=narrator
			message= _ "In later ages the bards would sing the 'The Breaking of the Pact', an epic tale of Haldric's betrayal of the elves. They would whisper of the price he and his descendants would pay for that betrayal without knowing the whole truth."
		[/message]
		[message]
			speaker=narrator
			message= _ "But some of us have remembered the true story of our arrival on this great continent. The true story of the Rise of Wesnoth."
		[/message]

		[endlevel]
			result=continue_no_save
			next_scenario=null
		[/endlevel]
	[/event]

[/scenario]
