#textdomain wesnoth-nr

[scenario]
    id=03_To_the_Mines
    name= _ "To the Mines"
    map_file=03_To_the_Mines.map
    {TURNS 36 30 24}
    next_scenario=04_Clearing_the_Mines

    {DEFAULT_SCHEDULE}

    {SCENARIO_MUSIC       wanderer.ogg}
    {EXTRA_SCENARIO_MUSIC nunc_dimittis.ogg}
    {EXTRA_SCENARIO_MUSIC loyalists.ogg}

    [story]
        [part]
            music=traveling_minstrels.ogg
            story= _ "Hoping to bypass the monsters which seemed to lurk at every corner in the caves, the humans and the dwarves returned to the surface hoping to speedily reach the mines. However, once they left the caves they found that they faced a new threat."
        [/part]
    [/story]

    {NR_TRACK {REVOLT_STAGE3}}

    # wmllint: validate-off
    [side]
        side=1
        controller=human
        recruit=Peasant,Woodsman,Thug,Poacher,Dwarvish Fighter,Dwarvish Thunderer,Dwarvish Scout,Footpad
        {GOLD 200 150 100}
        team_name=rebels
        user_team_name= _ "Rebels"
        # Use stock flags, Tallin’s troops are ceasing to be ragged

        # wmllint: recognize Tallin
        {CHARACTER_STATS_TALLIN}

        # Since in last scenario Hamel was AI controlled we need to place him again to have him in this and future scenarios
        [unit]
            type=Dwarvish Lord
            id=Hamel
            name= _ "Hamel"
            profile=portraits/Hamel.webp
            # This nice macro gives the unit silver crown.
            x,y=6,23
            [modifications]
                {TRAIT_LOYAL_HERO}
                {TRAIT_STRONG}
                [object]
                    silent=yes
                    [effect]
                        apply_to=new_ability
                        [abilities]
                            {ABILITY_LEADERSHIP}
                        [/abilities]
                    [/effect]
                [/object]
            [/modifications]
        [/unit]
    [/side]
    # wmllint: validate-on

    [side]
        side=2
        controller=ai
        recruit=Wolf Rider,Goblin Knight,Goblin Pillager
        {GOLD 350 400 500}
        team_name=goblins
        user_team_name= _ "Goblins"
        {FLAG_VARIANT6 ragged}

        type=Direwolf Rider
        id=Pruol
        name= _ "Pruol"
        canrecruit=yes
    [/side]

    {PLACE_IMAGE scenery/dwarven-doors-closed.png 18 3}

    [event]
        name=prestart

        [time_area]
            x=0-4,0-2,5
            y=24-26,23,26
            {UNDERGROUND}
        [/time_area]

        {RECALL_SUPPORTER}

        {RECALL_OR_REPLACE id=Camerin}

        [objectives]
            side=1
            [objective]
                description= _ "Enter the mines"
                condition=win
            [/objective]
            {ALTERNATIVE_OBJECTIVE_BONUS ( _ "Eliminate the wolf riders")}
            [objective]
                description= _ "Death of Tallin"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Hamel"
                condition=lose
            [/objective]

            {TURNS_RUN_OUT}

            [gold_carryover]
                bonus=no
                carryover_percentage=40
            [/gold_carryover]
        [/objectives]
    [/event]

    [event]
        name=start

        [message]
            speaker=Pruol
            message= _ "Hey look, there is our meat! Come on, boys, lunchtime!"
        [/message]

        [message]
            role=Supporter
            message= _ "I don’t think so, buddy."
        [/message]
    [/event]

    # Two events ending the scenario, there is no chance of both of them occurring in the same game.
    # You can either kill the opponent...
    [event]
        name=last breath
        [filter]
            id=Pruol
        [/filter]

        [message]
            speaker=Pruol
            message= _ "Argh! They are stronger than we thought. Someone go tell the Master..."
        [/message]

        [message]
            role=Supporter
            message= _ "What’s with this ‘Master’ business? It’s starting to make me nervous."
        [/message]
    [/event]

    [event]
        name=die
        [filter]
            id=Pruol
        [/filter]

        [endlevel]
            result=victory
            bonus=yes
            {NEW_GOLD_CARRYOVER 40}
        [/endlevel]
    [/event]

    # ...or get to the mines with him still alive. But without bonus in that case.
    [event]
        name=moveto
        [filter]
            x,y=18,3
            id=Tallin
        [/filter]

        [message]
            speaker=Tallin
            message= _ "Here is the entrance to the dwarven mines. In we go!"
        [/message]

        [message]
            speaker=Pruol
            message= _ "Hey, there goes our lunch! Hmmm, they are stronger than we thought, let’s go tell Master."
        [/message]

        [message]
            role=Supporter
            message= _ "What’s with this whole ‘Master’ business? It’s starting to make me nervous."
        [/message]

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

    # And include some death events.
    {HERODEATH_TALLIN}
    {HERODEATH_CAMERIN}
    {HERODEATH_HAMEL}

    {SUPPORTER_DEATH_HANDLER}
[/scenario]
