[scenario]
	id=The_Oldwood
	#textdomain wesnoth-trow
	name= _ "The Oldwood"
	map_data="{campaigns/The_Rise_Of_Wesnoth/maps/The_Oldwood}"
	{TURNS 35 32 29}

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

	next_scenario=Temple_in_the_Deep
	bonus=yes

	[music]
	name="underground.ogg"
	[/music]

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

	[story]
		[if]
			[variable]
			name=last_done
			equals=Midlands
			[/variable]
			[then]
				[part]
					background=story/the_green_isle.png
					show_title=yes
					{DOT 246 361}
					{DOT 251 366}
					{DOT 261 371}
					{DOT 271 371}
					{DOT 286 371}
					{CROSS 296 367}
				[/part]
			[/then]
			[else]
				[part]
					background=story/the_green_isle.png
					show_title=yes
					{DOT 296 326}
					{DOT 301 336}
					{DOT 306 346}
					{DOT 306 356}
					{DOT 306 366}
					{CROSS 296 367}
				[/part]
			[/else]
		[/if]
	[/story]

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

	[side]
		type=Orcish Warlord
		description=Tan-Gralg
		user_description= _ "Tan-Gralg"
		side=2
		canrecruit=1
		{GOLD 160 220 280}
		[ai]
			{NO_SCOUTS}
			recruitment_ignore_bad_movement=yes
			recruitment_ignore_bad_combat=yes
			recruitment_pattern=scout,fighter,fighter,archer
			{ATTACK_DEPTH 4 5 5}
		[/ai]
#ifdef EASY
		recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Goblin Pillager
#endif

#ifdef NORMAL
		recruit=Orcish Archer, Orcish Assassin, Orcish Crossbowman, Goblin Pillager
#endif

#ifdef HARD
		recruit=Orcish Archer, Orcish Assassin, Orcish Crossbowman, Orcish Slayer, Goblin Pillager
#endif
		team_name=orcs
	[/side]

	[side]
		type=Orcish Warlord
		description=Tan-Rugar
		user_description= _ "Tan-Rugar"
		side=3
		canrecruit=1
		{GOLD 160 220 280}
		[ai]
			{NO_SCOUTS}
			recruitment_pattern=scout,fighter,fighter,archer
			recruitment_ignore_bad_movement=yes
			recruitment_ignore_bad_combat=yes
			{ATTACK_DEPTH 4 5 5}
		[/ai]
#ifdef EASY
		recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Goblin Pillager
#endif

#ifdef NORMAL
		recruit=Orcish Archer, Orcish Assassin, Orcish Crossbowman, Goblin Pillager
#endif

#ifdef HARD
		recruit=Orcish Archer, Orcish Assassin, Orcish Crossbowman, Orcish Slayer, Goblin Pillager
#endif
		team_name=orcs
	[/side]

	[side]
		side=4
		type=Ancient Wose
		description=Elilmaldur-Rithrandil
		user_description= _ "Elilmaldur-Rithrandil"
		profile="portraits/rithrandil.png"
		canrecruit=1
		recruit=Wose Sapling
		{GOLD 160 100 60}
		{INCOME 10 5 3}
		team_name=Haldric
	[/side]

	[event]
	name=prestart
		{CLEAR_VARIABLE last_done}

		{PLACE_IMAGE (misc/temple.png) 23 22}
		{PLACE_IMAGE (items/castle-ruins.png) 5 5}
		{PLACE_IMAGE (items/castle-ruins.png) 6 5}
		{PLACE_IMAGE (items/castle-ruins.png) 6 6}
		{PLACE_IMAGE (items/castle-ruins.png) 5 7}
		{PLACE_IMAGE (items/castle-ruins.png) 4 6}
		{PLACE_IMAGE (items/castle-ruins.png) 4 5}
		{PLACE_IMAGE (items/castle-ruins.png) 29 2}
		{PLACE_IMAGE (items/castle-ruins.png) 29 3}
		{PLACE_IMAGE (items/castle-ruins.png) 27 3}
		{PLACE_IMAGE (items/castle-ruins.png) 27 2}
		{PLACE_IMAGE (items/castle-ruins.png) 15 29}
		{PLACE_IMAGE (items/castle-ruins.png) 15 30}
		{PLACE_IMAGE (items/castle-ruins.png) 13 30}
		{PLACE_IMAGE (items/castle-ruins.png) 13 29}
		{PLACE_IMAGE (items/castle-ruins.png) 17 16}
		{PLACE_IMAGE (items/castle-ruins.png) 17 17}
		{PLACE_IMAGE (items/castle-ruins.png) 15 17}
		{PLACE_IMAGE (items/castle-ruins.png) 15 16}

		[recall]
			description=Lady Outlaw
		[/recall]

		[recall]
			description=Burin the Lost
		[/recall]
		[recall]
			description=Sir Ruddry
		[/recall]

		[recall]
			description=Sir Ladoc
		[/recall]

		[recall]
			description=Minister Edmond
		[/recall]

#ifdef EASY
		{GUARD_UNIT (Elder Wose) (Muldondindal) ( _ "Muldondindal") 4 10 18}
		{GUARD_UNIT (Elder Wose) (Landunwonbam) ( _ "Landunwonbam") 4 16 13}
		{GUARD_UNIT (Elder Wose) (Bolwuldelman) ( _ "Bolwuldelman") 4 7 18}
		{GUARD_UNIT (Elder Wose) (Laffalialomdium) ( _ "Laffalialomdium") 4 24 7}
		{GUARD_UNIT (Elder Wose) (Wonrunmaldin) ( _ "Wonrunmaldin") 4 16 22}
		{GUARD_UNIT (Elder Wose) (Lassemista) ( _ "Lassemista") 4 23 6}
#endif
#ifdef NORMAL
		{GUARD_UNIT (Elder Wose) (Muldondindal) ( _ "Muldondindal") 4 10 18}
		{GUARD_UNIT (Elder Wose) (Landunwonbam) ( _ "Landunwonbam") 4 16 13}
		{GUARD_UNIT (Elder Wose) (Bolwuldelman) ( _ "Bolwuldelman") 4 7 18}
		{GUARD_UNIT (Elder Wose) (Laffalialomdium) ( _ "Laffalialomdium") 4 24 7}
#endif
#ifdef HARD
		{GUARD_UNIT (Elder Wose) (Muldondindal) ( _ "Muldondindal") 4 10 18}
		{GUARD_UNIT (Elder Wose) (Landunwonbam) ( _ "Landunwonbam") 4 16 13}
#endif

		[objectives]
		side=1
			[objective]
				description= _ "Defeat all enemy leaders"
				condition=win
			[/objective]
			[objective]
				description= _ "Death of Prince Haldric"
				condition=lose
			[/objective]
			[objective]
				description= _ "Death of Elilmaldur-Rithrandil"
				condition=lose
			[/objective]
			[objective]
				description= _ "Turns run out"
				condition=lose
			[/objective]
		[/objectives]

	[/event]

	[event]
	name=start
		[message]
			speaker=narrator
			message= _ "Haldric's band finds itself at the heart of the Oldwood Forest. The road quickly narrows and becomes little more than a path. Branches reach high overhead, blocking almost all of the light... The ominous noises of the deep woods echo all around."
		[/message]
		[message]
			description=Burin the Lost
			message= _ "Will this evil forest ever end! There are mosquitoes as big as my fist in here, and these nasty old trees are giving me the creeps."
		[/message]
		[message]
			description=Lady Outlaw
			message= _ "This isn't so bad. Haldric's kind are such a suspicious lot when it comes to these sorts of things."
		[/message]
		[message]
			description=Prince Haldric
			message= _ "Quiet. Listen, I think I hear something."
		[/message]
		[message]
			description=Elilmaldur-Rithrandil
			message= _ "All I hear are more tree-foes!"
		[/message]
		[message]
			description=Prince Haldric
			message= _ "That tree, it speaks! No- No- We are tree-friends, really!"
		[/message]
		[message]
			description=Elilmaldur-Rithrandil
			message= _ "You kind has long come with your axes, some tree-friends you are. Still, you seem less of a menace than these new monsters that have come to plague us. They cut the trees, and burn the trees for no reason at all!"
		[/message]
		[message]
			description=Elilmaldur-Rithrandil
			message= _ "You claim to be a tree-friend, so be a tree-friend now. For we are in dire need, or you may meet your fate with the rest of these monsters."
		[/message]
		[message]
			description=Prince Haldric
			message= _ "We will help. (Quietly) Be careful with the trees."
		[/message]
		[message]
			description=Burin the Lost
			message= _ "What! What are you looking at me for?"
		[/message]
	[/event]

	[event]
		name=moveto
		[filter]
			side=1
			x=23
			y=22
		[/filter]
		[message]
			speaker=unit
			message= _ "The temple has already been looted, but the entrance to its catacombs seems to be blocked by a wall of magical energy."
		[/message]

		[allow_undo]
		[/allow_undo]
	[/event]

	[event]
	name=turn 4
		[message]
			description=Tan-Rugar
			message= _ "Stupid stinking trees, we'll show you!"
		[/message]
	[/event]

	[event]
	name=turn 6
		[message]
			description=Tan-Gralg
			message= _ "Chop 'em down. It's cool in these woods, I think we need a fire!"
		[/message]
	[/event]

	[event]
	name=die
		[filter]
		description=Elilmaldur-Rithrandil
		[/filter]
		[message]
			description=Prince Haldric
			message= _ "Without the help of these tree-folk we'll be trapped in these woods till we die! There will be nothing to hold the orcs back!"
		[/message]
		[message]
			description=Burin the Lost
			message= _ "Stupid tree-folk."
		[/message]

		[endlevel]
			result=defeat
		[/endlevel]
	[/event]

	[event]
		name=victory
		[message]
			description=Prince Haldric
			message= _ "We've defeated the orcs!"
		[/message]
		[message]
			description=Elilmaldur-Rithrandil
			message= _ "On this day you have proved yourself to be a tree-friend. For so long your kind has only come with sharp blades to harm my kind. You come to build these buildings of stone. Our roots may be slow, but they are strong. We will eventually claim all of the stones back for the earth."
		[/message]
		[message]
			description=Prince Haldric
			message= _ "Well, I suspect you won't have to worry about my kind for much longer. The orcs have come, and they are taking this Isle!"
		[/message]
		[message]
			description=Elilmaldur-Rithrandil
			message= _ "Hmmmm- my kind were here before your kind, and we will be here after the orcs are gone as well. We were here before all others, and I suspect that we will be here in the end."
		[/message]
		[message]
			description=Prince Haldric
			message= _ "Can you help us fight the orcs?"
		[/message]
		[message]
			description=Elilmaldur-Rithrandil
			message= _ "My kind are bound to the forest, we would be of little help to you beyond our borders. Maybe we could still be of some aid to you. In a war of your people some time ago one of your kings trapped an evil Lich in the catacombs of the temple at the heart of the wood. We were there, we were watching."
		[/message]
		[message]
			description=Elilmaldur-Rithrandil
			message= _ "After we drove your kind off we figured out how to break the spell that holds the Evil in the catacombs, and keeps others from entering them."
		[/message]
		[message]
			description=Prince Haldric
			message= _ "This helps us how?"
		[/message]
		[message]
			description=Elilmaldur-Rithrandil
			message= _ "The Lich was carrying a powerful artifact. We know, we can feel it. This artifact may aid you in your quest."
		[/message]
		[message]
			description=Lady Outlaw
			message= _ "He must mean the Ruby of Fire. It was our most powerful artifact. We brought it with us from the east. We thought it was lost in the war with your people, when Lich-Lord Lenvan fell!"
		[/message]
		[message]
			description=Prince Haldric
			message= _ "At this point we need all of the help we can get!"
		[/message]
		[message]
			description=Elilmaldur-Rithrandil
			message= _ "Then I will open the catacombs for you..."
		[/message]
		[if]
			[variable]
				name=have_lady
				numerical_equals=1
			[/variable]
			[then]
				[message]
					description=Lady Outlaw
							message= _ "Young Prince, while the Lich-lords have betrayed us by allying themselves with that orcish scum, I can't bring myself to fight against one of the greatest leaders of my people."
				[/message]
				[message]
					description=Prince Haldric
					message= _ "Lady, why would you let those monsters lead your people?"
				[/message]
				[message]
					description=Lady Outlaw
							message= _ "Haldric, we are an ancient people who lived in a land filled with all manner of man and beast. We needed vision that extended beyond the meager span of human years. The art of Necromancy allowed our best and brightest to live forever, and our worst got to serve as mindless slaves."
				[/message]
				[message]
					description=Lady Outlaw
							message= _ "Other than losing our war back west, then our refugee war to your people, and this orc thing, it wasn't such a bad deal. Lich-Lord Lenvan was one of our greatest leaders. He led our escape to the west. Albeit, after being down in that hole for so long I don't imagine he's too happy."
				[/message]
				[message]
					description=Prince Haldric
					message= _ "Uh-huh. Have you considered that the unholy act of turning your best and brightest into undead is what causes them to fall into darkness?"
				[/message]
				[message]
					description=Lady Outlaw
							message= _ "We should save the debate for later. I can still be of use to you. I shall scout the road ahead. We need to know if we can make it to Southbay. I'll return in a few days."
				[/message]
				[kill]
					description=Lady Outlaw
				[/kill]
			[/then]
		[/if]
	[/event]

	[event]
	name=time over
		[message]
			description=Prince Haldric
			message= _ "We have run out of time... We'll be trapped in these woods until we die!"
		[/message]
	[/event]

[/scenario]
