#textdomain wesnoth-nr
[scenario]
    id=07b_Protecting_the_Master
    name= _ "Protecting the Master"
    {UNDERGROUND}
    turns=21
    next_scenario=08b_Ray_of_Hope

    {PLACE_IMAGE scenery/dwarven-doors-closed.png 13 4}
    {PLACE_IMAGE scenery/dwarven-doors-closed.png 13 5}
    {PLACE_IMAGE scenery/dwarven-doors-closed.png 14 3}
    {PLACE_IMAGE scenery/dwarven-doors-closed.png 14 4}
    {PLACE_IMAGE scenery/dwarven-doors-closed.png 20 4}

    [story]
        [part]
            story= _ "As Tallin sat staring blankly at the body of his former friend — loathing and hating what he had become — he received an urgent summons from his master."
        [/part]

        [part]
            story= _ "The attack Tallin had been sent to thwart had been a decoy. While Tallin was away, Tallin’s former friends had attacked Malifor’s study with overwhelming force."
        [/part]

        [part]
            # wmllint: local spelling sorcerous geas
            story= _ "Although Tallin was glad in his heart to see Malifor in such distress, the sorcerous geas on his mind compelled him to go to his master’s aid. When he got there, he found that all the outer defenses had been smashed and Malifor had bolted himself up in his study. Bound by the will of their master, Tallin and his minions took up positions outside Malifor’s study door."
        [/part]
    [/story]

    map_data="{campaigns/Northern_Rebirth/maps/07b_Protecting_the_Master.map}"

    [event]
        name=prestart
        [objectives]
            side=1
            [objective]
                condition=win
                description=_ "Resist till the end of turns"
                show_turn_counter=yes
            [/objective]
            [objective]
                condition=lose
                description=_ "Death of Tallin"
            [/objective]

            [gold_carryover]
                bonus=yes
                carryover_percentage=80
            [/gold_carryover]
        [/objectives]
    [/event]

    [side]
        type=Peasant
        id=Tallin
        canrecruit=yes
        side=1
        controller=human
        gold=100
        recruit=Walking Corpse,Skeleton,Skeleton Archer
        team_name=mob
        user_team_name=_"Minions"
        [village]
            x=15
            y=2
        [/village]
        [village]
            x=17
            y=2
        [/village]
        [village]
            x=19
            y=2
        [/village]
        [village]
            x=15
            y=7
        [/village]
        [village]
            x=17
            y=8
        [/village]
        [village]
            x=19
            y=9
        [/village]
        [village]
            x=4
            y=2
        [/village]
        [village]
            x=5
            y=2
        [/village]
        [village]
            x=11
            y=2
        [/village]
        [village]
            x=12
            y=2
        [/village]
    [/side]

    [side]
        type=Ancient Lich
        id=Malifor
        name= _ "Malifor"
        profile=portraits/Malifor.png
        canrecruit=yes
        side=2
        team_name=mob
        user_team_name=_"Minions"
        gold=0
        income=-2
        {FLAG_VARIANT undead}
    [/side]

    [side]
        type=Great Mage
        id=Camerin
        name= _ "Camerin"
        canrecruit=yes
        profile=portraits/Camerin.png
        side=3
        team_name=knalgans
        user_team_name=_"Knalgans"
        {GOLD4 700 800 900 1000}
        recruit=Thug,Trapper,Peasant,Dwarvish Steelclad,Dwarvish Fighter,Dwarvish Thunderer,Dwarvish Thunderguard,Dwarvish Guardsman,Dwarvish Stalwart,Dwarvish Scout,Dwarvish Pathfinder,Poacher,Footpad,Outlaw
        [village]
            x=5
            y=33
        [/village]

        [village]
            x=8
            y=31
        [/village]

        [village]
            x=6
            y=35
        [/village]

        [village]
            x=7
            y=35
        [/village]

        [village]
            x=9
            y=34
        [/village]

        [village]
            x=13
            y=32
        [/village]

        [village]
            x=11
            y=35
        [/village]

        [village]
            x=14
            y=33
        [/village]

        [village]
            x=15
            y=35
        [/village]

        [village]
            x=16
            y=35
        [/village]

        [village]
            x=18
            y=34
        [/village]
    [/side]

    [side]
        type=Dark Adept
        id=Deory
        canrecruit=yes
        side=4
        team_name=mob
        user_team_name=_"Minions"
        gold=100
        recruit=Walking Corpse
    [/side]

    [event]
        name=start

        [unit]
            type=Revenant
            x=10
            y=13
            side=2
            ai_special=guardian
        [/unit]

        [unit]
            type=Revenant
            x=12
            y=13
            side=2
            ai_special=guardian
        [/unit]

        [unit]
            type=Revenant
            x=4
            y=13
            side=2
            ai_special=guardian
        [/unit]

        [unit]
            type=Revenant
            x=18
            y=13
            side=2
            ai_special=guardian
        [/unit]

        [unit]
            type=Skeleton Archer
            x=6
            y=12
            side=2
            ai_special=guardian
        [/unit]

        [unit]
            type=Skeleton Archer
            x=8
            y=12
            side=2
            ai_special=guardian
        [/unit]

        [unit]
            type=Skeleton Archer
            x=14
            y=12
            side=2
            ai_special=guardian
        [/unit]

        [unit]
            type=Skeleton Archer
            x=16
            y=12
            side=2
            ai_special=guardian
        [/unit]

        [unit]
            type=Bandit
            x=7
            y=16
            side=3
        [/unit]

        [unit]
            type=Bandit
            x=10
            y=18
            side=3
        [/unit]

        [unit]
            type=Bandit
            x=15
            y=18
            side=3
        [/unit]

        [unit]
            type=Dwarvish Fighter
            x=13
            y=18
            side=3
        [/unit]

        [unit]
            type=Dwarvish Fighter
            x=9
            y=19
            side=3
        [/unit]

        [unit]
            type=Dwarvish Fighter
            x=7
            y=18
            side=3
        [/unit]

        [unit]
            type=Dwarvish Thunderguard
            x=11
            y=17
            side=3
        [/unit]

        [unit]
            type=Trapper
            x=10
            y=17
            side=3
        [/unit]

        [unit]
            type=Trapper
            x=13
            y=19
            side=3
        [/unit]

        [unit]
            type=Dwarvish Guardsman
            x=11
            y=21
            side=3
        [/unit]

        [unit]
            type=Dwarvish Guardsman
            x=13
            y=17
            side=3
        [/unit]

        [unit]
            type=Dwarvish Guardsman
            x=11
            y=19
            side=3
        [/unit]

        [message]
            speaker=Camerin
            message= _ "Look, the traitor Tallin has come to protect his master."
        [/message]

        [message]
            speaker=Tallin
            image=portraits/Tallin-Evil.png
            message= _ "Camerin! Please get out of here. Don’t make me kill you too."
        [/message]

        [message]
            speaker=Camerin
            message= _ "Fat chance, buddy. I can handle the likes of you in my sleep. Fall on them, boys!"
        [/message]
    [/event]

    [event]
        name=last breath
        [filter]
            id=Tallin
        [/filter]

        [message]
            speaker=Tallin
            image=portraits/Tallin-Evil.png
            message= _ "At last, I am free..."
        [/message]

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

    [event]
        name=time over

        [message]
            speaker=narrator
            message= _ "<i>Boom</i>!"
            image=projectiles/fire-burst-small-4.png
        [/message]

        [terrain]
            x=20
            y=4
            terrain=Uu
        [/terrain]

        [move_unit_fake]
            type=White Mage
            side=3
            x=20,19,18
            y=4,5,4
        [/move_unit_fake]

        [unit]
            type=White Mage
            side=3
            name= _ "Father Morvin"
            id=Father Morvin
            x=18
            y=4
        [/unit]

        [move_unit_fake]
            type=White Mage
            gender=female
            side=3
            x=20,19
            y=4,5
        [/move_unit_fake]

        [unit]
            type=White Mage
            gender=female
            id=Sister Thera
            name= _ "Sister Thera"
            x=19
            y=5
            side=3
        [/unit]

        [message]
            speaker=Malifor
            message= _ "What the...? <i>No!</i>"
        [/message]

        [message]
            speaker=Sister Thera
            message= _ "HEEEEE-YAAAAA!!" # wmllint: no spellcheck
        [/message]

        [sound]
            name=lightning.ogg
        [/sound]

        [color_adjust]
            red=100
            green=100
            blue=100
        [/color_adjust]

        [delay]
            time=10
        [/delay]

        [color_adjust]
            red=0
            green=0
            blue=0
        [/color_adjust]

        [message]
            speaker=Malifor
            message= _ "CURSES ON YOU YOU BLASTED MAGES, CURSES ON YOU YOU BLASTED HUMANS, CURSES ON YOU YOU BLASTED DWARVES! MAY YOUR MISERABLE LIVES BE FULL OF TORTURE! MAY YOUR PEOPLE NEVER BE FREE! MAY ALL YOUR NEAR AND DEAR DESERT YOU! MAY A THUNDERBOLT HIT YOUR HEAD! MAY–"
        [/message]

        [message]
            speaker=Sister Thera
            message= _ "May you shut your ugly mouth and hurry up and die."
        [/message]

        [message]
            speaker=Malifor
            message= _ "MAY THE EARTH OPEN UP AND SWALLOW YOU! MAY ALL YOUR TEETH FALL OUT! MAY YOU BECOME A WEAK SKINNY OLD MAN! MAY–"
        [/message]

        [kill]
            id=Malifor
            animate=yes
        [/kill]

        [message]
            speaker=Father Morvin
            message= _ "Finally! He has been reduced to dust."
        [/message]

        [message]
            speaker=Tallin
            image=portraits/Tallin-Evil.png
            message= _ "Malifor is dead... what have I done? What am I going to do? I must flee this place!"
        [/message]

        [message]
            speaker=Camerin
            message= _ "Hey, there goes the traitor Tallin!"
        [/message]

        [message]
            speaker=Father Morvin
            message= _ "Let him go. He was not acting under his free will and thus there is no blame attached to him. I have known of many such poor souls. If he does trouble us in the future, however, we should not spare him."
        [/message]

        [message]
            speaker=Sister Thera
            message= _ "Besides, he will probably just go and drown himself in the nearest river anyway, so why bother killing him?"
        [/message]

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

    [event]
        name=last breath
        [filter]
            id=Deory
        [/filter]

        [message]
            speaker=Deory
            message= _ "Ahhh! Master, help me!"
        [/message]

        [message]
            speaker=Malifor
            message= _ "Serves you right, you useless excuse for a slave."
        [/message]
    [/event]

    [event]
        name=moveto
        [filter]
            side=1
            x=7
            y=10
        [/filter]

        [message]
            speaker=Deory
            message= _ "Master! Tallin is taking my villages!"
        [/message]

        [message]
            speaker=Tallin
            image=portraits/Tallin-Evil.png
            message= _ "Shut up, you idiot. I know what I am doing."
        [/message]

        [message]
            speaker=Malifor
            message= _ "Agreed. And if you don’t keep your mouth shut, I will personally shut it for you!"
        [/message]

        [message]
            speaker=Deory
            message= _ "(<i>Gulp</i>)"
        [/message]
    [/event]

    [event]
        name=moveto

        [filter]
            side=1
            x=1-20
            y=29-35
        [/filter]

        [message]
            speaker=Camerin
            message= _ "Hmmm, you aren’t as bad as I thought, Tallin. Unfortunately for you, we aren’t ready to give up just yet."
        [/message]

        [gold]
            side=3
            amount=1000
        [/gold]

        [allow_recruit]
            side=3
            type=Bandit
        [/allow_recruit]
    [/event]
[/scenario]

[event]
    name=last breath

    [filter]
        id=Camerin
    [/filter]

    [message]
        speaker=narrator
        message= _ "<i>Boom!</i>"
        image=projectiles/fire-burst-small-5.png
    [/message]

    [terrain]
        x=20
        y=4
        terrain=Uu
    [/terrain]

    [move_unit_fake]
        type=White Mage
        side=3
        x=20,19,18
        y=4,5,4
    [/move_unit_fake]

    [unit]
        type=White Mage
        side=3
        id=Father Morvin
        name= _ "Father Morvin"
        profile=portraits/Father_Morvin.png
        x=18
        y=4
    [/unit]

    [move_unit_fake]
        type=White Mage
        gender=female
        side=3
        x=20,19
        y=4,5
    [/move_unit_fake]

    [unit]
        type=White Mage
        gender=female
        id=Sister Thera
        name= _ "Sister Thera"
        profile=portraits/Sister_Thera.png
        x=19
        y=5
        side=3
    [/unit]

    [message]
        speaker=Malifor
        message= _ "What the...? <i>No!</i>"
    [/message]

    [message]
        speaker=Sister Thera
        message= _ "HEEEEE-YAAAAA!!" # wmllint: no spellcheck
    [/message]

    [sound]
        name=lightning.ogg
    [/sound]

    [color_adjust]
        red=100
        green=100
        blue=100
    [/color_adjust]

    [delay]
        time=10
    [/delay]

    [color_adjust]
        red=0
        green=0
        blue=0
    [/color_adjust]

    [message]
        speaker=Malifor
        message= _ "CURSES ON YOU YOU BLASTED MAGES, CURSES ON YOU YOU BLASTED HUMANS, CURSES ON YOU YOU BLASTED DWARVES! MAY YOUR MISERABLE LIVES BE FULL OF TORTURE! MAY YOUR PEOPLE NEVER BE FREE! MAY ALL YOUR NEAR AND DEAR DESERT YOU! MAY A THUNDERBOLT HIT YOUR HEAD! MAY–"
    [/message]

    [message]
        speaker=Sister Thera
        message= _ "May you shut your ugly mouth and hurry up and die."
    [/message]

    [message]
        speaker=Malifor
        message= _ "MAY THE EARTH OPEN UP AND SWALLOW YOU! MAY ALL YOUR TEETH FALL OUT! MAY YOU BECOME A WEAK SKINNY OLD MAN! MAY–"
    [/message]

    [kill]
        id=Malifor
        animate=yes
    [/kill]

    [message]
        speaker=Father Morvin
        message= _ "Finally! He has been reduced to dust."
    [/message]

    [message]
        speaker=Camerin
        message= _ "Phew! Nick of time too — I almost bought it there!"
    [/message]

    [message]
        speaker=Tallin
        image=portraits/Tallin-Evil.png
        message= _ "Malifor is dead... What have I done? What am I going to do? I must flee this place!"
    [/message]

    [message]
        speaker=Camerin
        message= _ "Hey, there goes the traitor Tallin!"
    [/message]

    [message]
        speaker=Father Morvin
        message= _ "Let him go. He was not acting under his free will and thus there is no blame attached to him. I have known of many such poor souls. If he does trouble us in the future, however, we should not spare him."
    [/message]

    [message]
        speaker=Sister Thera
        message= _ "Besides, he will probably just go and drown himself in the nearest river anyway, so why bother?"
    [/message]

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