[scenario]
	id=05a_Muff_Malals_Peninsula
	#textdomain wesnoth-httt
	name= _ "Muff Malal's Peninsula"
	map_data="{campaigns/Heir_To_The_Throne/maps/Muff_Malal_Peninsula}"
	{SCENARIO_MUSIC "wesnoth-1.ogg"}
	{TURNS 27 24 21}

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

	next_scenario=06_The_Siege_of_Elensefar

	[event]
	name=prestart
		[objectives]
		side=1
			[objective]
				description= _ "Escape down the road to Elensefar"
				condition=win
			[/objective]
			[objective]
				description= _ "Defeat Muff Malal (Bonus)"
				condition=win
			[/objective]
			[objective]
				description= _ "Death of Konrad"
				condition=lose
			[/objective]
			[objective]
				description= _ "Turns run out"
				condition=lose
			[/objective]
		[/objectives]
	[/event]

	{BIGMAP_MUFF_MALAL_PENINSULA}

	[side]
	type=Commander
	description=Konrad
	user_description= _ "Konrad"
	unrenamable=yes
	side=1
	canrecruit=1
	controller=human
	recruit=Elvish Scout,Elvish Fighter,Elvish Archer,Horseman,Mage,Elvish Shaman,Merman Fighter
	gold=140
	enemy=2
	[/side]

	[side]
	type=Dark Sorcerer
	description=Muff Malal
	user_description= _ "Muff Malal"
	side=2
	canrecruit=1
	#ifdef HARD
	recruit=Blood Bat,Walking Corpse,Dark Adept
	#else
	recruit=Vampire Bat,Walking Corpse,Dark Adept
	#endif
		[ai]
		recruitment_pattern=fighter,fighter,fighter,fighter,fighter,fighter,fighter,archer
		grouping=no
		aggression=1.0
		caution=-1.0
		simple_targetting=yes
		{ATTACK_DEPTH 1 4 5}
		[/ai]
	{GOLD 75 100 190}
	{INCOME 20 25 40}
	enemy=1
	[/side]

	[event]
	name=start
		#For Elensefar: where do we come from?
		[set_variable]
		name=path_muff_malal
		value=yes
		[/set_variable]
	[/event]

	[event]
	name=prestart

		{PLACE_IMAGE items/signpost.png 8 2}
		{PLACE_IMAGE misc/foot-left-n.png 5 1}

		[role]
		type=Elvish Champion,Elvish Marshal,Elvish Captain,Elvish Hero,Knight,Elvish Rider,Elvish Outrider,Paladin,Mage,White Mage,Red Mage
		role=Advisor
		[/role]
		[recall]
		role=Advisor
		[/recall]
	[/event]

	[event]
	name=start
		[message]
		speaker=narrator
		image="wesnoth-icon.png"
		message= _ "But the road to Elensefar was a treacherous one. Konrad and his men were set upon by the fiends of the undead."
		[/message]
		[message]
		description=Muff Malal
		message= _ "Ahh, a party of elves approaches. Soon we shall have elven zombies serving us!"
		[/message]
		[message]
		role=Advisor
		message= _ "My lord! On yonder peninsula there seems to be some movement!"
		[/message]
		[message]
		description=Konrad
		message= _ "It looks like an undead outpost! If we could defeat them, the locals would probably be grateful. But I do not know if we have the strength or time to persevere against such a foe."
		[/message]
		[message]
		role=Advisor
		message= _ "Cleansing this land of undead does not appear like it would be a difficult task. It could be good training for those yet untested in battle."
		[/message]
		[message]
		description=Konrad
		message= _ "I see. If we are to break the siege of Elensefar, we will need every veteran soldier we can get."
		[/message]
		[message]
		role=Advisor
		message= _ "The decision is yours, sir. If we are to leave, I advise we hurry past before they are upon us. If we are to fight, then... To Arms!"
		[/message]

	[/event]


	[event]
		name=moveto
		[filter]
			side=1
			x=8
			y=2
		[/filter]

		[redraw]
		[/redraw]

		[message]
			speaker=narrator
			image="items/signpost.png"
			message= _ "To Elensefar"
		[/message]

		[allow_undo]
		[/allow_undo]
	[/event]

	[event]
		name=moveto
		first_time_only=no
		[filter]
			side=1
			x=5
			y=1
		[/filter]
		[if]
			[have_unit]
				description=Konrad
				x=5
				y=1
			[/have_unit]
			[then]
				[message]
				description=Konrad
				message= _ "We do not have time to tarry here! On to Elensefar!"
				[/message]

				[endlevel]
				bonus=no
				result=victory
				[/endlevel]
			[/then]
			[else]
				[message]
				speaker=Konrad
				message= _ "Shirk not your duty! I will decide when it is time to leave for Elensefar."
				[/message]

				[allow_undo]
				[/allow_undo]
			[/else]
		[/if]
	[/event]

	[event]
	name=enemies defeated
		[message]
		description=Konrad
		message= _ "Victory is ours! Let us hope that this delay will not hamper our quest to save Elensefar, but at least we have freed these good people. We must move onward with haste!"
		[/message]

		[endlevel]
		bonus=yes
		result=victory
		[/endlevel]
	[/event]

	{campaigns/Heir_To_The_Throne/utils/deaths.cfg}

[/scenario]
