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

	{AFTERNOON}

	next_scenario=Rise_of_Wesnoth

	[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
			{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]

		[if]
			[have_unit]
			description=Lady Jessica
			[/have_unit]
			[then]
				#This is a safety thing, in case you managed to beat the prior scenario before Jessica got back (impossible).
			[/then]
			[else]
				[set_variable]
					name=jessica_store.x
					value=8
				[/set_variable]
				[set_variable]
					name=jessica_store.y
					value=5
				[/set_variable]

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

				{CLEAR_VARIABLE jessica_store}

			[/else]
		[/if]

		[recall]
			description=Commander Aethyr
		[/recall]

		[teleport]
			[filter]
				description=Prince Haldric
			[/filter]
			x=11
			y=7
		[/teleport]

		[teleport]
			[filter]
				description=Lady Jessica
			[/filter]
			x=8
			y=5
		[/teleport]

		[teleport]
			[filter]
				description=Commander Aethyr
			[/filter]
			x=14
			y=10
		[/teleport]

		[hide_unit]
			x=14
			y=10
		[/hide_unit]
	[/event]

	[event]
	name=start
		[scroll_to_unit]
				description=Prince Haldric
				x=11
				y=7
		[/scroll_to_unit]

		[delay]
			time=1250
		[/delay]

		[message]
			description=Lady Jessica
			message= _ "So what is your plan?"
		[/message]
		[message]
			description=Prince Haldric
			message= _ "We're going to convince Jevyan that we gave the elves the Ruby of Fire to secure our place in this new land. Then if the orcs return, hopefully they'll go looking for our not-so-loyal elven allies first."
		[/message]
		[message]
			description=Lady Jessica
			message= _ "Haldric, that's devious. I kind of like this plan. But you spoke a pact with the elves. You'll be expected to come to their aid."
		[/message]
		[message]
			description=Prince Haldric
			message= _ "Yes, and we may come to their aid. We'll have to weigh our options when and if the time comes. If the orcs return in great numbers, the brunt of their assault must fall on somebody else or we will not survive it. Who knows, maybe I won't even come to their aid at all -"
		[/message]
		[message]
			description=Lady Jessica
			message= _ "Many people would call you a coward if you did not. They would say that you turned your back on your pact with the elves. It's not like you can tell people what I overheard."
		[/message]
		[message]
			description=Prince Haldric
			message= _ "Recent events have taught me one thing: that survival trumps honor. Besides, they won't be screaming at me - I'll be dead."
		[/message]
		[message]
			description=Lady Jessica
			message= _ "WHAT!"
		[/message]
		[message]
			description=Prince Haldric
			message= _ "I'll be dead. I mean we can't just say that we gave away the Ruby of Fire, or send Jevyan a letter. Well, we are going to say it - but that's not the point. Jessica, you're going to forge a very official looking treaty, in which we give the elves the Ruby of Fire, in return for our place here."
		[/message]
		[message]
			description=Prince Haldric
			message= _ "I'm going to face Jevyan, and if rumors of his power are true he's going to pick that treaty off my mangled corpse. Then, you're going to destroy Jevyan after word of the treaty has spread to the orcs, but before he has a chance to read my undead mind..."
		[/message]
		[message]
			description=Lady Jessica
			message= _ "Haldric! I won't do it... I won't help. What is it with your kind, always rushing to a fool's death? Who'll lead these people?"
		[/message]
		[message]
			description=Prince Haldric
			message= _ "You will. I wouldn't have made it this far without you. We really have to convince Jevyan -"
		[/message]
		[message]
			description=Lady Jessica
			message= _ "Haldric, this is ridiculous! I -"
		[/message]

		[store_unit]
			variable=aethyr_store
			[filter]
			description=Commander Aethyr
			[/filter]
		[/store_unit]

		[move_unit_fake]
			type=$aethyr_store.type
			x=14,14,14,13
			y=10,9,8,8
		[/move_unit_fake]

		{CLEAR_VARIABLE aethyr_store}

		[teleport]
			[filter]
				description=Commander Aethyr
			[/filter]
			x=13
			y=8
		[/teleport]

		[unhide_unit]
			description=Commander Aethyr
		[/unhide_unit]

		[message]
			description=Commander Aethyr
			message= _ "There is no way I'm letting you go through with this, sir! Over our dead bodies, right Jessica?"
		[/message]
		[message]
			description=Lady Jessica
			message= _ "Right!"
		[/message]
		[message]
			description=Commander Aethyr
			message= _ "I'll do it, sir.  I'll sacrifice myself to plant the false treaty."
		[/message]
		[message]
			description=Prince Haldric
			message= _ "No. I can't ask you to do this."
		[/message]
		[message]
			description=Commander Aethyr
			message= _ "You've denied me honorable death twice already. Once when you arrived at Clearwater Port, and once again when your ships rescued me. I'll not be denied in this a third time!"
		[/message]
		[message]
			description=Prince Haldric
			message= _ "No, this is my sacrifice to make!"
		[/message]

		[message]
			description=Commander Aethyr
			message= _ "Sir, my family has been slaughtered, and my home lost. All I long for is to join them. Give me this honorable death... Please, Sir! I beg you!"
		[/message]
		[message]
			description=Commander Aethyr
			message= _ "After this conflict is over I'll have to suffer through the long years alone, with no honorable way of joining them. I want to look that monster Jevyan in the eye before I go! I won't be denied!"
		[/message]
		[message]
			description=Prince Haldric
			message= _ "Very well, if you can't be deterred. Remember, you MUST be slain by the hand of Jevyan himself. We can't have an illiterate orc or mindless skeleton getting the treaty. We will honor your sacrifice."
		[/message]
		[message]
			description=Commander Aethyr
			message= _ "Honor me by destroying Jevyan! Preferably before he can do unnatural things to me. I want to rest in the ground, not be some mindless undead slave for all eternity!"
		[/message]
		[message]
			description=Prince Haldric
			message= _ "We'll make sure. I promise."
		[/message]
		[message]
			description=Lady Jessica
			message= _ "We'll have to be careful to let one of the orcish leaders escape back to the Green Isle with the knowledge that the elves 'have' the Ruby of Fire. Sheesh... What is your kind's infatuation with rushing to an 'honorable death'?"
		[/message]

		[endlevel]
			result=continue
			next_scenario=Rise_of_Wesnoth
		[/endlevel]
	[/event]

[/scenario]
