#textdomain wesnoth-thot
[scenario]
    name=_"Fear"
    id="08_Fear"
    next_scenario="09_Forbidden_Forest"
    victory_when_enemies_defeated=yes

    map_data="{@campaigns/The_Hammer_of_Thursagan/maps/fear.map}"

    {DEFAULT_SCHEDULE}
    {DEFAULT_MUSIC_PLAYLIST}

    {TURNS 30 24 18}	# BALANCE

    [side]
        type="Dwarvish Fighter"
        description="Aiglondur"
        user_description=_"Aiglondur"
        canrecruit="1"
        side="1"
        controller="human"
        team_name="northern_alliance"
        fog=yes
        shroud=no
        recruit="Dwarvish Fighter,Dwarvish Thunderer,Dwarvish Guardsman,Mage"
        {GOLD 120 100 80}	# BALANCE
    [/side]

    [side]
        type=Dwarvish Steelclad
        description=Masked Dwarf
        user_description= _ "Masked Dwarf"
        profile=portraits/maskeddwarf.png
        side=2
        canrecruit=yes
        team_name=evil
        recruit=Dwarvish Masked Fighter, Dwarvish Masked Thunderer
        {GOLD 280 240 200}	# BALANCE
        [ai]
            {NO_SCOUTS}
            recruitment_ignore_bad_movement=yes
            recruitment_pattern=fighter,fighter,mixed fighter
        [/ai]
    [/side]

    [side]
        # The local peasantry
        side=3
        no_leader=yes
        team_name=northern_alliance
    [/side]

    {@campaigns/The_Hammer_of_Thursagan/utils/herodeaths.cfg}
    {@campaigns/The_Hammer_of_Thursagan/utils/macros.cfg}

    [event]
        name="start"

        # The recruitment algorithm in the AI doesn't want to create Ulfserkers.
        # We only want a limited number of these anyway, for flavor; they are
        # way too dangerous in swarms.  So we'll create them explicitly here.
#define MASKED_ULFSERKER X Y DESCRIPTION
    [unit]
        type=Dwarvish Ulfserker
        side=2
        x,y={X},{Y}
        description={DESCRIPTION}
        user_description=_ "Masked Dwarf"
    [/unit]
#enddef
        {MASKED_ULFSERKER 38 12 Ulfserker1}
        {MASKED_ULFSERKER 39 14 Ulfserker2}
#ifdef NORMAL
        {MASKED_ULFSERKER 40 12 Ulfserker3}
#endif
#ifdef HARD
        {MASKED_ULFSERKER 40 12 Ulfserker3}
        {MASKED_ULFSERKER 39 12 Ulfserker4}
        [unit]
            type=Dwarvish Steelclad
            side=2
            x,y=40,13
            description=Steelclad1
            user_description=_ "Masked Dwarf"
        [/unit]
#endif

        [recall]
            description="Angarthing"
        [/recall]

        [recall]
            description="Ratheln"
        [/recall]

        [recall]
            description="Darchas"
        [/recall]

        [recall]
            description="Lorinne"
        [/recall]

        [if]
            [have_unit]
                description=Darchas
                [or]
                    description=Lorinne
                [/or]
            [/have_unit]
            [then]
                [message]
                    speaker=narrator
                    message=_"The presence of Master Perrin's journeymen gives you the ability to recruit mages."
                    image=wesnoth-icon.png
                [/message]
            [/then]
        [/if]

        {CONDITIONAL_MAGE_RECRUITING}

        [message]
            speaker="Angarthing"
            message=_"We should be on the outskirts of the settled country around Kal Kartha, but something doesn't feel right here."
        [/message]
        [message]
            speaker="Aiglondur"
            message=_"It's too quiet...and I think I smell traces of smoke on the wind."
        [/message]
        [message]
            speaker="Ratheln"
            message=_"I do not sense hostile magic in the vicinity.  But there has been fire near here recently, and not a clean one."
        [/message]
        [message]
            speaker="Aiglondur"
            message=_"Look sharp for the inhabitants here.  They might have something to tell us."
        [/message]

        [objectives]
            side="1"
            silent="no"
            [objective]
                description=_"Find the inhabitants"
                condition="win"
            [/objective]
            [objective]
                description=_"Death of Aiglondur"
                condition="lose"
            [/objective]
            [objective]
                description=_"Death of Angarthing"
                condition="lose"
            [/objective]
            [objective]
                description=_"Time runs out"
                condition="lose"
            [/objective]
        [/objectives]
    [/event]

    # The Masked Dwarves are nameless, it's a part of their charm...
    [event]
        name=recruit
        first_time_only=no
        [filter]
            side=2
        [/filter]

        {MODIFY_UNIT x,y=$x1,$y1 user_description _"Masked Dwarf"}
    [/event]

    [event]
        name=capture
        first_time_only=yes
        [filter]
            side=1
        [/filter]

        [unit]
            type=Peasant
            description="Ollin"
            user_description=_ "Ollin"
            side=3
            x=$x1
            y=$y1
        [/unit]

        [message]
            speaker="Ollin"
            message=_"Don't kill me, masters!  Please don't kill me!"
        [/message]
        [message]
            speaker="Aiglondur"
            message=_"You're in no danger from us.  What lies to the east of here?"
        [/message]
        [message]
            speaker="Ollin"
            message=_"You wear no mask.  You...you're not with them?"
        [/message]
        [message]
            speaker="Aiglondur"
            message=_"What are you talking about?"
        [/message]
        [message]
            speaker="Ollin"
            message=_"The masked dwarves.  Killing, burning, kidnapping.  Look..."
        [/message]

#define PLACE_BURNED_VILLAGE X Y
    {VARIABLE_OP random_string format "scenery/village-human-burned1.png,scenery/village-human-burned2.png,scenery/village-human-burned3.png,scenery/village-human-burned4.png"}
    {RANDOM $random_string}
    {PLACE_IMAGE $random {X} {Y}}
#enddef

        {PLACE_BURNED_VILLAGE 36 8}
        {PLACE_BURNED_VILLAGE 33 13}
        {PLACE_BURNED_VILLAGE 33 32}
        {PLACE_BURNED_VILLAGE 26 13}
        {PLACE_BURNED_VILLAGE 30 16}

        [modify_side]
            side=1
            fog=no
        [/modify_side]
        [message]
            speaker="Masked Dwarf"
            message=_"Fellow dwarves, hail!  We're looking for a human refugee, one named Ollin.  Have you seen him?  Our master demands his life."
        [/message]
        [message]
            speaker="Aiglondur"
            message=_"He is here.  How has he wronged your master, that you seek
his death?"
        [/message]
        [message]
            speaker="Masked Dwarf"
            message=_"Does it matter?  He is only a dirtgrubbing human, not fit to polish the boots of the true people."
        [/message]
        [message]
            speaker="Angarthing"
            message=_"What is your name, masked one?  Will you stand behind your
deed?  I am a witness."
        [/message]
        [message]
            speaker="Masked Dwarf"
            message=_"A witness?  My name is...my name is not important. My deed will speak its own truth."
        [/message]
        [message]
            speaker="Angarthing"
            message=_"You speak without honor. Mine is the power of our ancient Law; speak your name and give up your murder, or the Law will cast you forth.  I am a witness!"
        [/message]
        [message]
            speaker="Masked Dwarf"
            message=_"If you were a witness of the true people, you would not let a dirtgrubber hide behind your robes.  I deny you!"
        [/message]
        [message]
            speaker="Aiglondur"
            message=_"Up axes!"
        [/message]
        [message]
            speaker="Angarthing"
            message=_"The Law speaks: you are cast out.  You are un-dwarf.  I AM A WITNESS!"
        [/message]

        [objectives]
            side="1"
            silent="no"
            [objective]
                description=_"Defeat the Masked Dwarf"
                condition="win"
            [/objective]
            [objective]
                description=_"Death of Aiglondur"
                condition="lose"
            [/objective]
            [objective]
                description=_"Death of Angarthing"
                condition="lose"
            [/objective]
            [objective]
                description=_"Time runs out"
                condition="lose"
            [/objective]
        [/objectives]
    [/event]

    [event]
        name=attack
        first_time_only=yes
        [filter]
            description=Ollin
        [/filter]
        [message]
            description=Ollin
            message= _ "Take that for my family's memory, you murderer!"
        [/message]
    [/event]

    [event]
        name=victory
        [message]
            speaker="Aiglondur"
            message=_"They are defeated"
        [/message]
        [message]
            speaker="Angarthing"
            message=_"You have acted in honor.  I am a witness."
        [/message]
        [message]
            speaker="Aiglondur"
            message=_"I have never seen the formal banishment before.  One reads of it in the old tales, of course, but to hear it with one's own ears? It was...unsettling."
        [/message]
        [message]
            speaker="Angarthing"
            message=_"It is not something we do often.  The last such was in my grandsire's time.  But look at what these filth were carrying if you have any doubt it was merited."
        [/message]
        [message]
            speaker="Aiglondur"
            message=_"Whips.  Shackles.  No, Angarthing, I would not doubt you, even if it were my place to doubt a loremaster."
        [/message]
        [message]
            speaker="Angarthing"
            message=_"They were seeking captives.  To what purpose, I cannot say.  But I doubt it was any good one."
        [/message]
        [kill]
            description=Ollin
        [/kill]
    [/event]
[/scenario]
