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

    {DEFAULT_SCHEDULE}

    next_scenario=06_The_Siege_of_Elensefar

    # wmllint: local spelling Malal
    [event]
        name=prestart
        [objectives]
            side=1
            [objective]
                description= _ "Escape down the road to Elensefar"
                condition=win
            [/objective]
            [objective]
                description= _ "<255,255,255>Alternative objective:
@Defeat Muff Malal
`(early finish bonus)"
                condition=win
            [/objective]
            [objective]
                description= _ "Death of Konrad"
                condition=lose
            [/objective]
            [objective]
                description= _ "Turns run out"
                condition=lose
            [/objective]

            note={NEW_GOLD_CARRYOVER_NOTE_40}	# wmllint: ignore
        [/objectives]
    [/event]

    {BIGMAP_MUFF_MALAL_PENINSULA}

    [side]
        type=Commander
        id=Konrad
        name= _ "Konrad"
        unrenamable=yes
        side=1
        canrecruit=yes
        team_name=elves
        user_team_name=_"Rebels"
        controller=human
        gold=140
    [/side]

    [side]
        type=Dark Sorcerer
        id=Muff Malal
        name= _ "Muff Malal"
        side=2
        canrecruit=yes
#ifdef HARD
        recruit=Blood Bat,Walking Corpse,Dark Adept
#else
        recruit=Vampire Bat,Walking Corpse,Dark Adept
#endif
        [ai]
            recruitment_pattern=scout,fighter,fighter,fighter,fighter,fighter,fighter,fighter,archer
            grouping=no
            aggression=1.0
            caution=-1.0
            simple_targeting=yes
            {ATTACK_DEPTH 1 4 5}
        [/ai]
        {GOLD 20 50 100}
        {INCOME 20 25 40}
        team_name=undead
        user_team_name=_"Undead"
    [/side]

    {RECRUIT_UNIT_VARIATIONS 2 "Walking Corpse" none,none,none,none,swimmer,swimmer,mounted,bat}

    {STARTING_VILLAGES 2 30}

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

    [event]
        name=prestart

        # {SCATTER_IMAGE (terrain=Gg)  5 scenery/oak-leaning.png}
        {PLACE_IMAGE scenery/signpost.png 8 2}
        {PLACE_IMAGE scenery/rock2.png 17 20}

        [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 a strong band of undead."
        [/message]
        [message]
            speaker=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]
            speaker=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 to defeat such a foe, or the time to spare."
        [/message]
        [message]
            role=Advisor
            message= _ "Cleansing this land of undead does not appear overly difficult. It could be good training for those yet untested in battle."
        [/message]
        [message]
            speaker=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="scenery/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]
                id=Konrad
                x=5
                y=1
            [/have_unit]
            [then]
                [message]
                    speaker=Konrad
                    message= _ "We do not have time to tarry here! On to Elensefar!"
                [/message]

                [endlevel]
                    bonus=no
                    result=victory
                    {NEW_GOLD_CARRYOVER 40}
                [/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]
            speaker=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
            {NEW_GOLD_CARRYOVER 40}
        [/endlevel]
    [/event]

    {campaigns/Heir_To_The_Throne/utils/deaths.cfg}
[/scenario]
