[scenario]
	id=Peoples_in_Decline
	#textdomain wesnoth-trow
	name= _ "Peoples in Decline"
	map_data="{campaigns/The_Rise_Of_Wesnoth/maps/Peoples_in_Decline.map}"
	{TURNS 39 36 33}

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

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

	next_scenario=Rough_Landing
	bonus=yes

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

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

	[story]
		[part]
			background=story/the_green_isle.png
			show_title=yes
			{DOT 196 411}
			{DOT 181 416}
			{DOT 166 426}
			{DOT 166 436}
			{DOT 176 446}
			{DOT 476 446}
			{DOT 491 436}
			{DOT 506 426}
			{DOT 521 426}
			{DOT 541 426}
			{DOT 556 426}
			{DOT 571 426}
			{DOT 586 426}
			{DOT 601 426}
		[/part]
	[/story]

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

	[side]
		type=Drake Flameheart
		description=Kegrid
		user_description= _ "Kegrid"
		side=2
		canrecruit=1
		{GOLD 110 150 190}
		{INCOME 2 4 8}
		team_name=Drake
#ifdef EASY
		recruit=Drake Burner,Drake Clasher,Drake Glider,Drake Fighter
#else
		recruit=Drake Burner,Drake Clasher,Drake Glider,Fire Drake,Drake Slasher,Drake Fighter,Drake Warrior
#endif
		[ai]
			{NO_SCOUTS}
			recruitment_ignore_bad_movement=yes
			recruitment_pattern=scout,fighter,fighter,archer,fighter
			aggression=0.75
			{ATTACK_DEPTH 4 5 5}
		[/ai]
	[/side]

	[side]
		type=Drake Flameheart
		description=Gerrick
		user_description= _ "Gerrick"
		side=3
		canrecruit=1
		{GOLD 110 150 190}
		{INCOME 2 4 8}
		team_name=Drake

#ifdef EASY
		recruit=Drake Burner,Drake Clasher,Drake Glider,Drake Fighter
#else
		recruit=Drake Burner,Drake Clasher,Drake Glider,Fire Drake,Drake Flare,Drake Fighter,Drake Warrior
#endif

		[ai]
			{NO_SCOUTS}
			recruitment_ignore_bad_movement=yes
			recruitment_pattern=scout,fighter,fighter,archer,fighter
			aggression=0.75
			{ATTACK_DEPTH 4 5 5}
		[/ai]
	[/side]

	[side]
		type=Drake Flameheart
		description=Merkush
		user_description= _ "Merkush"
		side=4
		canrecruit=1
		{GOLD 110 150 190}
		{INCOME 2 4 8}
		team_name=Drake

#ifdef EASY
		recruit=Drake Burner,Drake Clasher,Drake Glider,Drake Fighter
#else
		recruit=Drake Burner,Drake Clasher,Drake Glider,Fire Drake,Drake Gladiator,Drake Fighter,Drake Warrior
#endif

		[ai]
			{NO_SCOUTS}
			recruitment_ignore_bad_movement=yes
			recruitment_pattern=scout,fighter,fighter,archer,fighter
			aggression=0.75
			{ATTACK_DEPTH 4 5 5}
		[/ai]
	[/side]

	[event]
	name=prestart
		{OBJ_TRIDENT_STORM 17 18 (trident)}

		[recall]
			description=Lady Jessica
			x=10
			y=8
		[/recall]
		[recall]
			description=Burin the Lost
			x=11
			y=9
		[/recall]
		[recall]
			description=Sir Ruddry
			x=9
			y=10
		[/recall]

		[recall]
			description=Sir Ladoc
			x=9
			y=10
		[/recall]

		[recall]
			description=Minister Edmond
			x=10
			y=10
		[/recall]

		[recall]
			description=Lord Typhon
			x=9
			y=9
		[/recall]

		{PLACE_IMAGE units/transport/galleon.png) 10 9}

		[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 Lady Jessica"
				condition=lose
			[/objective]
			[objective]
				description= _ "Death of Lord Typhon"
				condition=lose
			[/objective]
			[objective]
				description= _ "Turns run out"
				condition=lose
			[/objective]
		[/objectives]
	[/event]

#	[event]
#		name=moveto
#		[filter]
#			side=1
#			x=17
#			y=18
#		[/filter]
#
#		[removeitem]
#		[/removeitem]
#	[/event]

	[event]
		name=start
		[message]
			speaker=narrator
			message= _ "After some time at sea an island is spotted. The Eldaric docks at a crude port that appears to be deserted."
		[/message]
		[message]
			description=Burin the Lost
			message= _ "Land! Land! Bless the Lords of Light!"
		[/message]
		[message]
			description=Lady Jessica
			message= _ "This is the Elder Prince's island all right. We had a heck of a time pacifying the Drakes who live here. Oh my, it looks like they've rearmed!"
		[/message]
		[message]
			description=Prince Haldric
			message= _ "We come in peace. We only seek to re-provision our ships."
		[/message]
		[message]
			description=Lady Jessica
			message= _ "(whispered) I don't think diplomacy is going to work."
		[/message]
		[message]
			description=Gerrick
			message= _ "Ssso humansss, you've come to trouble usss again. Prepare to die! For the glory of the Lords of Morogor!"
		[/message]
		[message]
			description=Lady Jessica
			message= _ "(whispered) Do I need to say, 'I told you so'?"
		[/message]
	[/event]

	[event]
		name=moveto
		[filter]
			side=1
			x=17
			y=18
		[/filter]

		{VARIABLE_OP xx1 random 14..19}
		{VARIABLE_OP yy1 random 16..19}

		{UNIT (Sea Serpent) (Bitey the Serpent) ( _ "Bitey the Serpent") 4 $xx1 $yy1}

		[message]
			speaker=unit
			message= _ "Look out, a serpent has emerged from the deep."
		[/message]

		[scroll_to_unit]
			description=Bitey the Serpent
			x=$xx1
			y=$yy1
		[/scroll_to_unit]

		{CLEAR_VARIABLE xx1}
		{CLEAR_VARIABLE yy1}
	[/event]

	[event]
		name=victory
		[message]
			description=Prince Haldric
			message= _ "Well, it looks like their warriors have given up the fight. We should be able to re-provision the ships now."
		[/message]
		[message]
			description=Lady Jessica
			message= _ "The nice thing is, they'll go back to guarding this island after we're gone for a while. It'll make a good way of preventing others from following us."
		[/message]
		[message]
			description=Prince Haldric
			message= _ "This island is slowly sinking. Hmm, I wonder what they'll do when it gets too small for them?"
		[/message]
		[message]
			description=Lady Jessica
			message= _ "They seem rather intelligent. They're certainly belligerent and numerous. I'm sure they'll eventually evacuate. Just like us right now."
		[/message]
		[message]
			description=Prince Haldric
			message= _ "I don't find that thought very comforting."
		[/message]
		[move_unit_fake]
			type=Blood Bat
			x=3,3,4
			y=1,2,2
		[/move_unit_fake]

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

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

		[kill]
			description=Familiar
		[/kill]

		[move_unit_fake]
			type=Blood Bat
			x=4,3,2,1
			y=2,3,2,2
		[/move_unit_fake]
	[/event]

	[event]
		name=time over
		[message]
			description=Lady Jessica
			message= _ "The fleet is starving, we'll never pacify this island before we all die!"
		[/message]
	[/event]

[/scenario]
