#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}
    {TURNS 30 24 18}	# BALANCE

    {SCENARIO_MUSIC "breaking_the_chains.ogg"}	# No story part
    {EXTRA_SCENARIO_MUSIC "knalgan_theme.ogg"}
    {EXTRA_SCENARIO_MUSIC "battle.ogg"}

    [story]
        [part]
            show_title=yes
            {TO_FEAR}
        [/part]
    [/story]

    [side]
        type="Dwarvish Fighter"
        id="Aiglondur"
        name=_"Aiglondur"
        canrecruit="1"
        side="1"
        controller="human"
        team_name="northern_alliance"
        user_team_name=_"Alliance"
        {FLAG_VARIANT knalgan}
        fog=yes
        shroud=no
        recruit="Dwarvish Fighter,Dwarvish Thunderer,Dwarvish Guardsman, Dwarvish Scout"
        {GOLD 120 100 80}	# BALANCE
    [/side]

    [side]
        type=Dwarvish Masked Steelclad
        id=Masked Dwarf Leader
        name= _ "Masked Dwarf"
        profile=portraits/maskeddwarf.png
        side=2
        canrecruit=yes
        team_name=evil
        user_team_name=_"Evil"
        recruit=Dwarvish Masked Fighter, Dwarvish Masked Thunderer, Dwarvish Masked Guardsman
        {GOLD 200 240 280}	# BALANCE
        {INCOME 10 20 30}
        [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
        user_team_name=_"Alliance"
    [/side]

    {campaigns/The_Hammer_of_Thursagan/utils/herodeaths.cfg}

    [event]
        name="prestart"

        # 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 ID_STRING
    [unit]
        type=Dwarvish Ulfserker
        side=2
        x,y={X},{Y}
        id={ID_STRING}
        name=_ "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 Masked Steelclad
            profile=portraits/maskeddwarf2.png
            side=2
            x,y=40,13
            name=_ "Masked Dwarf"
        [/unit]
#endif

        [recall]
            id="Angarthing"
        [/recall]

        [recall]
            id="Ratheln"
        [/recall]

        [recall]
            id="Darchas"
        [/recall]

        [recall]
            id="Lorinne"
        [/recall]

        [objectives]
            side="1"
            [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]

            note={EARLY_FINISH_BONUS_NOTE}+{NEW_GOLD_CARRYOVER_NOTE_40}
        [/objectives]
    [/event]

    [event]
        name="start"
        [if]
            [have_unit]
                id=Darchas
                [or]
                    id=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]

        # Try to enable mage recruitment. If it isn't appropriate,
        # the code in CONDITIONAL_MAGE_RECRUITING will undo this step.

        [allow_recruit]
            side=1
            type=Mage
        [/allow_recruit]

        {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]
    [/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 name _"Masked Dwarf"}
    [/event]

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

        [unit]
            type=Peasant
            id="Ollin"
            name=_ "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 Leader"
            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 Leader"
            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 Leader"
            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 Leader"
            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="Angarthing"
            # wmllint: local spelling un-dwarf
            message=_"The Law speaks: you are cast out. You are un-dwarf. I AM A WITNESS!"
        [/message]
        [message]
            speaker="Aiglondur"
            message=_"Up axes!"
        [/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]

            note={EARLY_FINISH_BONUS_NOTE}+{NEW_GOLD_CARRYOVER_NOTE_40}
        [/objectives]
    [/event]

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

    [event]
        name=enemies defeated
        [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]
            id=Ollin
        [/kill]
        [endlevel]
            result=victory
            bonus=yes
            {NEW_GOLD_CARRYOVER 40}
        [/endlevel]
    [/event]
[/scenario]
