[scenario]
	id=Rise_of_Wesnoth
	#textdomain wesnoth-trow
	name= _ "The Rise of Wesnoth"
	map_data="{campaigns/The_Rise_Of_Wesnoth/maps/Rise_of_Wesnoth}"
	{TURNS 45 42 39}

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

	next_scenario=Epilogue
	victory_when_enemies_defeated=no

	{DEFAULT_MUSIC_PLAYLIST}

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

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

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

	#2 is Jevyan
	#3 is the Sea Castle
	#4 is the Coast Orc
	#5 is the Island Orc
	#6 is the North Orc

	[side]
		type=Ancient Lich
		description=Lich-Lord Jevyan
		user_description= _ "Lich-Lord Jevyan"
		profile="portraits/jevyan.png"
		side=2
		canrecruit=1
		recruit=Revenant,Deathblade,Bone Shooter,Skeleton,Skeleton Archer,Vampire Bat, Walking Corpse,Soulless,Vampire Bat,Ghoul,Necrophage
		{GOLD 160 180 210}
		team_name=orcs
		[ai]
			{NO_SCOUTS}
			recruitment_ignore_bad_movement=yes
			recruitment_pattern=scout,fighter,fighter,archer,scout,fighter,fighter,archer
			passive_leader=yes
			{ATTACK_DEPTH 5 6 6}
		[/ai]
		[ai]
			time_of_day=dusk,first_watch,second_watch
			aggression=0.65
		[/ai]
		[ai]
			[protect_location]
				x=42
				y=40
				radius=8
				value=10
			[/protect_location]
		[/ai]
		{INCOME 4 6 8}
	[/side]

	[side]
		type=Orcish Warlord
		description=Tan-Vragish
		user_description= _ "Tan-Vragish"
		side=3
		canrecruit=1
		recruit=Naga Fighter,Vampire Bat
		{GOLD 130 150 180}
		team_name=orcs
		[ai]
			{NO_SCOUTS}
			recruitment_ignore_bad_movement=yes
			recruitment_pattern=fighter,fighter,scout
			{ATTACK_DEPTH 5 5 6}
		[/ai]
		[ai]
			time_of_day=dusk,first_watch,second_watch
			aggression=0.75
			caution=0.0
			grouping=no
		[/ai]
		{INCOME 1 2 4}
	[/side]

	[side]
		type=Orcish Warlord
		description=Ut'Tan-Grorag
		user_description= _ "Ut'Tan-Grorag"
		side=4
		canrecruit=1
#ifdef EASY
		recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Goblin Pillager, Goblin Knight, Troll Whelp, Goblin Spearman
#endif

#ifdef NORMAL
		recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Goblin Pillager, Goblin Knight, Orcish Slayer, Orcish Warrior, Troll Whelp, Troll, Troll Rocklobber, Goblin Spearman
#endif

#ifdef HARD
		recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Orcish Warrior, Goblin Knight, Goblin Pillager, Orcish Slayer, Troll Whelp, Troll, Troll Warrior, Troll Rocklobber, Goblin Spearman, Goblin Impaler
#endif
		{GOLD 170 190 220}
		team_name=orcs
		[ai]
			#{NO_SCOUTS}
			recruitment_ignore_bad_movement=yes
			recruitment_pattern=scout,fighter,fighter,archer,scout,fighter,fighter,archer
			grouping=defensive
			{ATTACK_DEPTH 5 5 6}
		[/ai]
		[ai]
			time_of_day=dusk,first_watch,second_watch
			aggression=0.65
			grouping=offensive
		[/ai]
		{INCOME 2 4 8}
	[/side]

	[side]
		type=Orcish Warlord
		description=Tan-Erinak
		user_description= _ "Tan-Erinak"
		side=5
		canrecruit=1
#ifdef EASY
		recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Goblin Pillager, Goblin Knight, Troll Whelp, Goblin Spearman
#endif

#ifdef NORMAL
		recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Goblin Pillager, Goblin Knight, Orcish Slayer, Orcish Warrior, Troll Whelp, Troll, Troll Rocklobber, Goblin Spearman
#endif

#ifdef HARD
		recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Orcish Warrior, Goblin Knight, Goblin Pillager, Orcish Slayer, Troll Whelp, Troll, Troll Warrior, Troll Rocklobber, Goblin Spearman, Goblin Impaler
#endif
		{GOLD 150 170 200}
		team_name=orcs
		[ai]
			#{NO_SCOUTS}
			recruitment_ignore_bad_movement=yes
			recruitment_pattern=scout,fighter,fighter,archer,scout,fighter,fighter,archer
			grouping=defensive
			{ATTACK_DEPTH 5 5 6}
		[/ai]
		[ai]
			time_of_day=dusk,first_watch,second_watch
			aggression=0.65
			grouping=offensive
		[/ai]

		{INCOME 1 2 4}
	[/side]

	[side]
		type=Orcish Warlord
		description=Tan-Prodash
		user_description= _ "Tan-Prodash"
		side=6
		canrecruit=1
#ifdef EASY
		recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Goblin Pillager, Goblin Knight, Troll Whelp, Goblin Spearman
#endif

#ifdef NORMAL
		recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Goblin Pillager, Goblin Knight, Orcish Slayer, Orcish Warrior, Troll Whelp, Troll, Troll Rocklobber, Goblin Spearman
#endif

#ifdef HARD
		recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Orcish Warrior, Goblin Knight, Goblin Pillager, Orcish Slayer, Troll Whelp, Troll, Troll Warrior, Troll Rocklobber, Goblin Spearman, Goblin Impaler
#endif
		{GOLD 150 170 200}
		team_name=orcs
		[ai]
			{NO_SCOUTS}
			recruitment_ignore_bad_movement=yes
			recruitment_pattern=scout,fighter,fighter,archer,scout,fighter,fighter,archer
			{ATTACK_DEPTH 5 5 6}
		[/ai]
		[ai]
			time_of_day=dusk,first_watch,second_watch
			aggression=0.75
			caution=0.0
			grouping=no
		[/ai]
		{INCOME 1 2 4}
	[/side]

	[event]
		name=prestart
		{STARTING_VILLAGES 6 10}
		{STARTING_VILLAGES 5 10}
		{STARTING_VILLAGES 4 10}
		{STARTING_VILLAGES 3 10}
		{STARTING_VILLAGES 2 10}

		{PLACE_IMAGE (units/transport/pirate-galleon.png) 21 35}
		{PLACE_IMAGE (units/transport/pirate-galleon.png) 21 37}
		{PLACE_IMAGE (units/transport/pirate-galleon.png) 22 39}
		{PLACE_IMAGE (units/transport/pirate-galleon.png) 23 44}

		{PLACE_IMAGE (items/fire.png) 7 5}
		{PLACE_IMAGE (items/fire.png) 15 21}
		{PLACE_IMAGE (items/fire.png) 21 17}
		{PLACE_IMAGE (items/fire.png) 24 29}
		{PLACE_IMAGE (items/fire.png) 32 34}
		{PLACE_IMAGE (items/fire.png) 41 24}
		{PLACE_IMAGE (items/fire.png) 46 23}
		{PLACE_IMAGE (items/fire.png) 45 29}

		[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]
		[recall]
			description=Lt. Aethyr
		[/recall]

		#If I can scrounge up a decent scroll \/
		#[unit_overlay]
		#		description=Lt. Aethyr
		#		image=items/book3.png
		#[/unit_overlay]

		#[remove_shroud]
		#	side=1
		#	x=1-50
		#	y=1-45
		#[/remove_shroud]

		{UNDEAD_INTEL (Blood Bat) (Familiar) ( _ "Familiar") "portraits/familiar.png" 2 40 39}

		[set_variable]
			name=num_orcs_alive
			value=4
		[/set_variable]

		[objectives]
		side=1
			[objective]
				description= _ "Lt. Aethyr sacrifices himself to Lich-Lord Jevyan and"
				condition=win
			[/objective]
			[objective]
				description= _ "Destroy Lich-Lord Jevyan and"
				condition=win
			[/objective]
			[objective]
				description= _ "Defeat all enemy leaders except for one"
				condition=win
			[/objective]
			[objective]
				description= _ "Death of Prince Haldric"
				condition=lose
			[/objective]
			[objective]
				description= _ "Death of Lady Jessica"
				condition=lose
			[/objective]
			[objective]
				description= _ "Death of Lt. Aethyr by somebody other than Jevyan"
				condition=lose
			[/objective]
			[objective]
				description= _ "Fail to leave one enemy leader behind"
				condition=lose
			[/objective]
			[objective]
				description= _ "Turns run out"
				condition=lose
			[/objective]
		[/objectives]
	[/event]

	[event]
		name=start
		[message]
			speaker=narrator
			message= _ "Haldric rapidly approaches the site where Lich-Lord Jevyan has made landfall. The final confrontation looms before him."
		[/message]
		[message]
			description=Lich-Lord Jevyan
			message= _ "You can not win. Give me the Ruby of Fire and I will go in peace."
		[/message]
		[message]
			description=Prince Haldric
			message= _ "This ends here, Jevyan. Even if I believed your words I couldn't give you the Ruby of Fire."
		[/message]
		[message]
			description=Lich-Lord Jevyan
			message= _ "Bah! Even if you have learned to conceal the power of the Ruby of Fire you will deliver it unto me in death!"
		[/message]
		[message]
			description=Lady Jessica
			message= _ "You're a fool, Jevyan. How do you think we secured our place here? We had to give the elves the Ruby of Fire. We just signed a treaty with the elves ensuring our place here."
		[/message]
		[message]
			description=Lich-Lord Jevyan
			message= _ "No! I don't believe it. Only a fool would give away an artifact of such power."
		[/message]
		[message]
			description=Prince Haldric
			message= _ "A fool, or a desperate band of refugees!"
		[/message]
		[message]
			description=Lich-Lord Jevyan
			message= _ "No. It can't be!"
		[/message]
		[message]
			description=Burin the Lost
			message= _ "Fool human, you shouldn't give such toys to elves! Bah! It matters little to me. I'm no wizard. All I got is my axe. He, he. It's all I need -- Prepare to die, orcish scum!"
		[/message]
		[message]
			description=Minister Edmond
			message= _ "Ha. Let all of the footsoldiers of darkness be cast down!"
		[/message]
		[message]
			description=Prince Haldric
			message= _ "It matters little, because here you fall!"
		[/message]
		[message]
			description=Sir Ruddry
			message= _ "For all of the good people of Clearwater Port!"
		[/message]
		[message]
			description=Sir Ladoc
			message= _ "For the honor of Southbay!"
		[/message]
		[message]
			description=Lt. Aethyr
			message= _ "We don't need some magic trinket to beat you! Prepare to meet your fate you decrepit sack of bones! For the honor of all of the people of the west-north!"
		[/message]
		[message]
			description=Prince Haldric
			message= _ "Charge!"
		[/message]
		[message]
			description=Ut'Tan-Grorag
			message= _ "I hate it when my prey gets chatty! Get them, it's a long boat ride back home!"
		[/message]
		[message]
			description=Lich-Lord Jevyan
			message= _ "We shall soon see if you have the Ruby of Fire!"
		[/message]
		[message]
			description=Familiar
			image="portraits/familiar.png"
			message= _ "Neep! Neep!"
		[/message]
		[message]
			description=Prince Haldric
			message= _ "<Whispering> Lieutenant, you remember the plan right?"
		[/message]
		[message]
			description=Lt. Aethyr
			message= _ "<Whispering> Yes Sir. I am ready."
		[/message]
	[/event]

	[event]
		name=die
		[filter]
			side=1
		[/filter]
		[message]
			description=Lady Jessica
			message= _ "He's raising our dead! Be careful!"
		[/message]
	[/event]

	[event]
		name=die
		first_time_only=no
		[filter]
			[not]
			description=Lt. Aethyr
			[/not]
		[/filter]

		{RISE_UP_RISE_UP $x1 $y1}
	[/event]

	[event]
	name=attack
		[filter]
		description=Lt. Aethyr
		[/filter]
		[message]
			description=Lt. Aethyr
			message= _ "Feel my wrath, Jevyan, I'm coming for you! No piece of paper in my pocket is going to stop me from destroying you. For my family! For the people of Clearwater Port!"
		[/message]
		[message]
			description=Lich-Lord Jevyan
			message= _ "All life is finite; you will be made to serve along with the rest."
		[/message]
	[/event]

	[event]
	name=attack
		[filter]
		description=Burin the Lost
		[/filter]
		[message]
			description=Burin the Lost
			message= _ "Come on, stay still, just for a second..."
		[/message]
	[/event]

	[event]
	name=attack
		[filter]
		description=Lady Jessica
		[/filter]
		[message]
			description=Lady Jessica
			message= _ "For the Wesfolk!"
		[/message]
	[/event]

	[event]
	name=attack
		[filter]
		side=2,3,4,5,6
		[/filter]
		[filter_second]
		description=Lt. Aethyr
		[/filter_second]
		[message]
			description=Lady Jessica
			message= _ "Be careful, Lieutenant!"
		[/message]
	[/event]

	[event]
	name=attack
		[filter]
		description=Familiar
		[/filter]
		[message]
			description=Familiar
			image="portraits/familiar.png"
			message= _ "Neep! Neep!"
		[/message]
	[/event]

#define JEVGOLD
#ifdef EASY
	[gold]
		side=2
		amount=40
	[/gold]
#endif

#ifdef NORMAL
	[gold]
		side=2
		amount=80
	[/gold]
#endif

#ifdef HARD
	[gold]
		side=2
		amount=120
	[/gold]
#endif
#enddef

#define ORC_SURVIVORS
	[if]

		[variable]
			name=num_orcs_alive
			numerical_equals=1
		[/variable]

		[then]
			[if]
				[have_unit]
					description=Lich-Lord Jevyan
					side=2
				[/have_unit]

				[then]
					[message]
						description=Tan-Vragish
						message= _ "The battle is going against us!"
					[/message]
					[message]
						description=Ut'Tan-Grorag
						message= _ "Our forces are being routed! We should flee back to the Green Isle!"
					[/message]
					[message]
						description=Tan-Erinak
						message= _ "It goes poorly for us!"
					[/message]
					[message]
						description=Tan-Prodash
						message= _ "Defeated, by humans?"
					[/message]
					[message]
						description=Lich-Lord Jevyan
						message= _ "Fight on, you cowardly orcish worms!"
					[/message]
				[/then]

				[else]
					[message]
						description=Tan-Vragish
						message= _ "Da old bag of bones has been crushed, and our cause is lost. We know da elfses have da fire ruby. Retreat!"
					[/message]
					[kill]
						description=Tan-Vragish
					[/kill]
					[message]
						description=Ut'Tan-Grorag
						message= _ "Da elfses have the fire ruby, we must flee. To da ships!"
					[/message]
					[kill]
						description=Ut'Tan-Grorag
					[/kill]
					[message]
						description=Tan-Erinak
						message= _ "We have many kinsmen on the Green Isle- we will return for the Ruby of Fire!"
					[/message]
					[kill]
						description=Tan-Erinak
					[/kill]
					[message]
						description=Tan-Prodash
						message= _ "We must get back to the Green Isle. The elfses have the Ruby of Fire and our assault has been stopped."
					[/message]
					[kill]
						description=Tan-Prodash
					[/kill]
					[endlevel]
						bonus=yes
						result=victory
					[/endlevel]
				[/else]
			[/if]
		[/then]
	[/if]

	[if]
		[variable]
			name=num_orcs_alive
			numerical_equals=0
		[/variable]
		[then]
			[message]
				description=Prince Haldric
				message= _ "The plan revolved around some orcs making it back to the Green Isle to tell their kin that the elves have the Ruby of Fire so we wouldn't have to bear the brunt of the next invasion."
			[/message]
			[message]
				description=Prince Haldric
				message= _ "What have we done?"
			[/message]
			[endlevel]
				result=defeat
			[/endlevel]
		[/then]
	[/if]
#enddef

	[event]
	name=die
		[filter]
		description=Tan-Vragish
		[/filter]

		{VARIABLE_OP num_orcs_alive add -1}

		{ORC_SURVIVORS}

		{JEVGOLD}
	[/event]

	[event]
	name=die
		[filter]
		description=Ut'Tan-Grorag
		[/filter]

		{VARIABLE_OP num_orcs_alive add -1}

		{ORC_SURVIVORS}

		{JEVGOLD}
	[/event]

	[event]
	name=die
		[filter]
		description=Tan-Erinak
		[/filter]

		{VARIABLE_OP num_orcs_alive add -1}

		{ORC_SURVIVORS}

		{JEVGOLD}
	[/event]

	[event]
	name=die
		[filter]
		description=Tan-Prodash
		[/filter]

		{VARIABLE_OP num_orcs_alive add -1}

		{ORC_SURVIVORS}

		{JEVGOLD}
	[/event]

	[event]
	name=die
		[filter]
		description=Lt. Aethyr
		[/filter]

		[filter_second]
			[not]
				description=Lich-Lord Jevyan
			[/not]
		[/filter_second]

		[message]
			description=Lt. Aethyr
			message= _ "My love, my family, I'll be there soo-"
		[/message]

		[message]
			description=Prince Haldric
			message= _ "Lieutenant Aethyr! No! He was critical for convincing Jevyan that the elves have the Ruby of Fire."
		[/message]

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

	[event]
	name=die
		[filter]
			description=Lt. Aethyr
		[/filter]

		[filter_second]
			description=Lich-Lord Jevyan
		[/filter_second]

		[message]
			description=Lt. Aethyr
			message= _ "Jevyan- I spit upon thee. Your end awaits. My love, my family, I'll be there soo-"
		[/message]

		[message]
			description=Lich-Lord Jevyan
			message= _ "Fool. You are no match for my power. What! What's this? A treaty. That's elf script."
		[/message]

		[message]
			description=Lich-Lord Jevyan
			message= _ "No. Why? You fools, you gave the Ruby of Fire to the elves. But that won't save you from me. I will destroy you, then I will deal with the elves."
		[/message]

		[message]
			description=Prince Haldric
			message= _ "We'll see about that. For the honor of Lieutenant Aethyr, forward!"
		[/message]
	[/event]

	[event]
	name=die
		[filter]
			description=Lich-Lord Jevyan
		[/filter]
		[message]
			description=Lich-Lord Jevyan
			message= _ "I am fallen before my plans have reached fruition. A curse upon you Haldric, may you and your descendants know nothing but strife!"
		[/message]

		[if]
			[have_unit]
				description=Lt. Aethyr
				side=1
			[/have_unit]
			[then]
				[message]
					description=Lt. Aethyr
							message= _ "You deny me my honorable death? Our foes are not yet convinced that the elves have the ruby."
				[/message]

				[endlevel]
					result=defeat
				[/endlevel]
			[/then]
			[else]
				[if]
					[variable]
						name=num_orcs_alive
						numerical_equals=1
					[/variable]
					[then]
						[message]
							description=Tan-Vragish
							message= _ "Da old bag of bones has been crushed, and our cause is lost. We know da elfses have da fire ruby. Retreat!"
						[/message]
						[kill]
							description=Tan-Vragish
						[/kill]
						[message]
							description=Ut'Tan-Grorag
							message= _ "Da old bag of bones has been crushed, and our cause is lost. We know da elfses have da fire ruby. Retreat!"
						[/message]
						[kill]
							description=Ut'Tan-Grorag
						[/kill]
						[message]
							description=Tan-Erinak
							message= _ "Da old bag of bones has been crushed, and our cause is lost. We know da elfses have da fire ruby. Retreat!"
						[/message]
						[kill]
							description=Tan-Erinak
						[/kill]
						[message]
							description=Tan-Prodash
							message= _ "Da old bag of bones has been crushed, and our cause is lost. We know da elfses have da fire ruby. Retreat!"
						[/message]
						[kill]
							description=Tan-Prodash
						[/kill]
						[endlevel]
							bonus=yes
							result=victory
						[/endlevel]
					[/then]
					[else]
						[message]
							description=Tan-Vragish
							message= _ "Da old bag 'o bones is gone, but you haven't beat us yet!"
						[/message]
						[message]
							description=Ut'Tan-Grorag
							message= _ "We took yer home now we'll take yer lives!"
						[/message]
						[message]
							description=Tan-Erinak
							message= _ "The elfses have da fire ruby, and you have nothing!"
						[/message]
						[message]
							description=Tan-Prodash
							message= _ "We will suck the marrow from your bones human!"
						[/message]
					[/else]
				[/if]
			[/else]
		[/if]

	[/event]

	[event]
		name=moveto
		[filter]
			side=1
			x=20-26
			y=22-28
		[/filter]

		[move_unit_fake]
			type=Cuttle Fish
			x=20,21,22
			y=23,23,23
		[/move_unit_fake]

		[unit]
			description=Squidy
			user_description= _ "Squidy"
			type=Cuttle Fish
			side=2
			x=22
			y=23
			moves=0
			[modifications]
				{TRAIT_LOYAL}
			[/modifications]
		[/unit]

		[message]
			speaker=unit
			message= _ "Ack. One of those monsters is destroying the bridge."
		[/message]

		[scroll_to_unit]
			description=Squidy
			x=22
			y=23
		[/scroll_to_unit]

		[sound]
			name=gunshot.wav
		[/sound]
		[delay]
			time=200
		[/delay]
		[sound]
			name=gunshot.wav
		[/sound]
		[delay]
			time=500
		[/delay]
		[sound]
			name=fire.wav
		[/sound]

		[terrain]
			x=23
			y=22
			letter=c
		[/terrain]
		[terrain]
			x=23
			y=23
			letter=c
		[/terrain]
	[/event]

	[event]
		name=moveto
		[filter]
			side=1
			x=40-46
			y=17-23
		[/filter]

		[move_unit_fake]
			type=Cuttle Fish
			x=41,42,43
			y=17,17,17
		[/move_unit_fake]

		[unit]
			description=Inky
			user_description= _ "Inky"
			type=Cuttle Fish
			side=2
			x=43
			y=17
			moves=0
			[modifications]
				{TRAIT_LOYAL}
			[/modifications]
		[/unit]

		[message]
			speaker=unit
			message= _ "The bridge!"
		[/message]

		[scroll_to_unit]
			description=Inky
			x=43
			y=17
		[/scroll_to_unit]

		[sound]
			name=gunshot.wav
		[/sound]
		[delay]
			time=200
		[/delay]
		[sound]
			name=gunshot.wav
		[/sound]
		[delay]
			time=500
		[/delay]
		[sound]
			name=fire.wav
		[/sound]

		[terrain]
			x=43
			y=17
			letter=c
		[/terrain]
		[terrain]
			x=43
			y=18
			letter=c
		[/terrain]
	[/event]

	[event]
		name=moveto
		[filter]
			side=1
			x=37-43
			y=29-35
		[/filter]

		[move_unit_fake]
			type=Cuttle Fish
			x=39,40,41,42
			y=30,29,30,30
		[/move_unit_fake]

		[unit]
			description=Beaky
			user_description= _ "Beaky"
			type=Cuttle Fish
			side=2
			x=42
			y=30
			moves=0
			[modifications]
				{TRAIT_LOYAL}
			[/modifications]
		[/unit]

		[message]
			speaker=unit
			message= _ "Our advance is thwarted, that monster has destroyed the bridge!"
		[/message]

		[scroll_to_unit]
			description=Beaky
			x=41
			y=31
		[/scroll_to_unit]

		[sound]
			name=gunshot.wav
		[/sound]
		[delay]
			time=200
		[/delay]
		[sound]
			name=gunshot.wav
		[/sound]
		[delay]
			time=500
		[/delay]
		[sound]
			name=fire.wav
		[/sound]

		[terrain]
			x=42
			y=30
			letter=c
		[/terrain]
		[terrain]
			x=41
			y=31
			letter=c
		[/terrain]
	[/event]

	[event]
		name=turn 10
		[move_unit_fake]
			type=Naga Warrior
			x=1,2,3,4,5,6
			y=32,31,32,32,33,32
		[/move_unit_fake]

		{UNIT (Naga Warrior) (Abraxas) ( _ "Abraxas") 2 6 32}

		[scroll_to_unit]
			description=Abraxas
		[/scroll_to_unit]

		[message]
			description=Abraxas
			message= _ "It's the Haldric! Jevyan, you never said you came to destroy this monster. We will help you."
		[/message]

		{UNIT (Naga Fighter) (Xamalia) ( _ "Xamalia") 3 5 32}
		{UNIT (Naga Fighter) (Brissal) ( _ "Brissal") 2 5 33}

#ifdef MEDIUM
		{UNIT (Naga Fighter) (Saxiala) ( _ "Saxiala") 3 4 31}
		{UNIT (Naga Fighter) (Liabra) ( _ "Liabra") 2 4 34}
#endif
#ifdef HARD

		{UNIT (Naga Fighter) (Saxiala) ( _ "Saxiala") 3 4 31}
		{UNIT (Naga Fighter) (Liabra) ( _ "Liabra") 2 4 34}
		{UNIT (Naga Fighter) (Riaa) ( _ "Riaa") 3 3 31}
		{UNIT (Naga Fighter) (Griama) ( _ "Griama") 2 3 35}
#endif

		[allow_recruit]
			type=Naga Fighter
			side=3
		[/allow_recruit]
	[/event]

#define DEEP_WALKERS
	{VARIABLE_OP yy1 random 25..40}
	[message]
		description=Lich-Lord Jevyan
		message= _ "Come in from the deep my loyal soldiers!"
	[/message]

#ifdef EASY
	{UNDEAD_UNIT (Skeleton) 2 1 $yy1}
#endif
#ifdef NORMAL
	{UNDEAD_UNIT (Skeleton Archer) 2 1 $yy1}
	{UNDEAD_UNIT (Skeleton) 2 1 $yy1}
#endif
#ifdef HARD
	{UNDEAD_UNIT (Revenant) 2 1 $yy1}
	{UNDEAD_UNIT (Skeleton Archer) 2 1 $yy1}
#endif
	[scroll_to_unit]
		x=1
		y=$yy1
	[/scroll_to_unit]

	{CLEAR_VARIABLE yy1}
#enddef

#define FROM_THE_EARTH
	{VARIABLE_OP xx1 random 23..50}
	{VARIABLE_OP yy1 random 24..45}

	[message]
		description=Lich-Lord Jevyan
		message= _ "Rise, rise from the ground!"
	[/message]

#ifdef EASY
	{UNDEAD_UNIT (Walking Corpse) 2 $xx1 $yy1}
#endif
#ifdef NORMAL
	{UNDEAD_UNIT (Walking Corpse) 2 $xx1 $yy1}
	{UNDEAD_UNIT (Walking Corpse) 2 $xx1 $yy1}
#endif
#ifdef HARD
	{UNDEAD_UNIT (Walking Corpse) 2 $xx1 $yy1}
	{UNDEAD_UNIT (Walking Corpse) 2 $xx1 $yy1}
	{UNDEAD_UNIT (Walking Corpse) 2 $xx1 $yy1}
#endif
	[scroll_to_unit]
		x=$xx1
		y=$yy1
	[/scroll_to_unit]

	{CLEAR_VARIABLE xx1}
	{CLEAR_VARIABLE yy1}

#enddef

	[event]
	name=die
		[filter]
		description=Familiar
		[/filter]
		[message]
			description=Familiar
			image="portraits/familiar.png"
			message= _ "Neep! SPLAT!"
		[/message]
		[message]
			speaker=second_unit
			message= _ "Ahh... That almost makes it all worth while!"
		[/message]
		[message]
			description=Lich-Lord Jevyan
			message= _ "You'll pay for that!"
		[/message]
		{JEVGOLD}
		{DEEP_WALKERS}
		{FROM_THE_EARTH}
		[message]
			description=Lich-Lord Jevyan
			message= _ "Strike down these fools."
		[/message]
	[/event]

	[event]
	name=new turn
	first_time_only=no

		[if]
			[have_unit]
				description=Lich-Lord Jevyan
				side=2
			[/have_unit]

			[then]
#ifdef EASY
	{VARIABLE_OP opt random 1..24}
#endif
#ifdef NORMAL
	{VARIABLE_OP opt random 1..18}
#endif
#ifdef HARD
	{VARIABLE_OP opt random 1..12}
#endif

				[if]
					[variable]
						name=opt
						numerical_equals=1
					[/variable]

					[then]
						{DEEP_WALKERS}
					[/then]
				[/if]
				[if]
					[variable]
						name=opt
						numerical_equals=2
					[/variable]
					[then]
						{FROM_THE_EARTH}
					[/then]
				[/if]
				[if]
					[variable]
						name=opt
						numerical_equals=3
					[/variable]
					[then]
						{FROM_THE_EARTH}
					[/then]
				[/if]

				{CLEAR_VARIABLE opt}
			[/then]
		[/if]
	[/event]

	[event]
		name=victory

		{PLACE_IMAGE (terrain/coast.png) 22 39}

		[move_unit_fake]
			type=Transport Galleon
			x=22,21,20,19,18,18,18,18,18,17,16,15,14
			y=39,39,38,39,39,40,41,42,43,44,44,45,45
		[/move_unit_fake]
		[message]
			description=Lady Jessica
			message= _ "We did it! We won!"
		[/message]
		[message]
			description=Prince Haldric
			message= _ "Jevyan is destroyed, but at a terrible price. Let's put Lieutenant Aethyr to rest and discuss what is to come in the following days."
		[/message]
	[/event]

	[event]
	name=time over
		[message]
			description=Prince Haldric
			message= _ "Our strength is waning, and our foes grow stronger by the hour. The battle is lost!"
		[/message]
	[/event]
[/scenario]
