#textdomain wesnoth-sof
[scenario]
    name= _ "Reaching the Runecrafter"
    id=2p5_Reaching_the_Runecrafter
    turns=16
    map_file=2p5_Reaching_the_Runecrafter.map
    next_scenario=3_Searching_for_the_Runecrafter
    victory_when_enemies_defeated=no

    {SCENARIO_MUSIC underground.ogg}
    {EXTRA_SCENARIO_MUSIC the_deep_path.ogg}

    {UNDERGROUND}

    [side]
        type=Dwarvish Fighter
        id=Rugnur
        side=1
        canrecruit=yes
        shroud=no
        controller=human
        recruit=Dwarvish Fighter,Dwarvish Thunderer,Dwarvish Guardsman,Dwarvish Scout
        team_name=dwarves
        user_team_name= _ "Dwarves"
        {FLAG_VARIANT knalgan}
        {GOLD 140 120 100}
    [/side]

    [side]
        type=Orcish Warrior
        id=Bragdash
        name= _ "Bragdash Gar"
        side=2
        canrecruit=yes
        {RECRUIT (Orcish Grunt) (Orcish Grunt, Orcish Archer) (Orcish Grunt, Orcish Archer, Orcish Assassin)}
        {GOLD 160 200 240}
        {INCOME 6 8 10}
        team_name=orcs
        user_team_name= _ "Orcs"
        {FLAG_VARIANT6 ragged}
        #        [ai]
        #            aggression=1.0
        #            caution=0.0
        #        [/ai]
    [/side]

    [side]
        type=Goblin Rouser
        id=Pidmer
        name= _ "Pidmer Gar"
        side=3
        canrecruit=yes
        recruit=Goblin Spearman
        {GOLD 90 120 150}
        {INCOME 4 6 8}
        team_name=orcs
        user_team_name= _ "Goblins"
        {FLAG_VARIANT6 ragged}
        #        [ai]
        #            aggression=1.0
        #            caution=0.0
        #        [/ai]
    [/side]

    [story]
        [part]
            story= _ "The journey to the far northern wastelands was long and perilous. The tunnels were narrow, but by following the old mining rails, Rugnur and his group could make good time. After a few days journey, they saw a dim red glow in the tunnel ahead and could feel sporadic vibrations in the rails."
        [/part]
        [part]
            story= _ "As the group got near the source of the glow, they heard metallic banging and guttural shouting, and their noses were assaulted by a fetid smell..."
        [/part]
    [/story]

    #    {SOF_TRACK {JOURNEY_02_NEW} }

    {SOF_DEATHS}

    [event]
        name=prestart

        [objectives]
            side=1
            [objective]
                description= _ "Reach the top of the map with Rugnur, Baglur, and Alanin"
                condition=win
            [/objective]
            [objective]
                description= _ "Death of Rugnur"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Alanin"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Baglur"
                condition=lose
            [/objective]

            {TURNS_RUN_OUT}

            [gold_carryover]
                bonus=yes
                carryover_percentage=40
            [/gold_carryover]
        [/objectives]

        {GENERIC_UNIT 3 "Goblin Impaler" 9 15} {GUARDIAN}
#ifdef HARD
        {GENERIC_UNIT 2 "Orcish Slayer" 18 15} {GUARDIAN}
#else
        {GENERIC_UNIT 2 "Orcish Crossbowman" 18 15} {GUARDIAN}
#endif
        {SOF_MINECART_MENU cart1 10 25}
        {SOF_MINECART_MENU cart2 13 9}

        [item]
            image=items/gohere.png
            x,y=18,1
        [/item]
        [capture_village]
            side=2
            x,y=25,17
        [/capture_village]
        [capture_village]
            side=3
            x,y=9,10
        [/capture_village]
    [/event]

    [event]
        name=start
        [recall]
            id=Alanin
        [/recall]
        [recall]
            id=Baglur
        [/recall]
        [redraw]
            side=1
        [/redraw]
        # need to check if this makes sense, has Rugnur seen an orc before?
        [message]
            speaker=Rugnur
            message= _ "Those are orcs, aren’t they?"
        [/message]
        [message]
            speaker=Baglur
            message= _ "Aye, in all their destructive glory. Looks like they’re trying to strip the metal from the rails."
        [/message]
        [message]
            speaker=Alanin
            message= _ "That’s terrible, someone should stop them!"
        [/message]
        [message]
            speaker=Rugnur
            message= _ "Do orcs always stink so bad? I’ve heard that they are stupid and messy, but this is almost unbearable!"
        [/message]
        [message]
            speaker=Bragdash
            message= _ "We see you, we hear you, sneaky little moles! Pidmer, go skewer them!"
        [/message]
        [message]
            speaker=Pidmer
            message= _ "Um... aren’t we needed for the salvage?"
        [/message]
        [message]
            speaker=Bragdash
            message= _ "No! You’ve been straining and struggling, but those metal tracks defeat you! It takes a strong orc to break that steel, you go deal with those little cave rats. You can keep their shiny helmets, they might fit you!"
        [/message]
        [message]
            speaker=Rugnur
            message= _ "Uh, well, we’re not getting through without a fight..."
        [/message]
        {MOVE_UNIT id=Rugnur 13 27}
        [message]
            speaker=Rugnur
            # po: second part of "Uh, well, we’re not getting through without a fight..."
            message= _ "... let’s set up a base here."
        [/message]
        [terrain]
            terrain=Ce
            x,y=12-14,26
        [/terrain]
        [terrain]
            terrain=Ke
            x,y=13,27
        [/terrain]
        [terrain]
            terrain=Ur^Vct
            x,y=11,28
        [/terrain]
        [capture_village]
            side=1
            x,y=11,28
        [/capture_village]
        [redraw]
            side=1
        [/redraw]
    [/event]

    [event]
        name=moveto
        [filter]
            side=1
            race=dwarf
            x,y=10,25
        [/filter]
        [message]
            speaker=unit
            message= _ "This old cart still rolls smoothly on the track... it’s forged by us dwarves, I shouldn’t be surprised!"
        [/message]
        [message]
            speaker=narrator
            image=wesnoth-icon.png
            message= _ "A dwarf can ride the carts along the tracks. Use the context menu (usually right-click menu) to board or exit the cart. If a cart rider is involved in combat, the rider exits the cart."
        [/message]
    [/event]

    [event]
        name=moveto
        [filter]
            side=1
            x,y=1-5,9-13
        [/filter]
        [message]
            speaker=unit
            message= _ "(*gasp*) I think I’ve found the source of the terrible smell, it wasn’t the orcs..."
        [/message]
        [message]
            speaker=Bragdash
            message= _ "Of course it wasn’t us, you worm!"
        [/message]
        [message]
            speaker=unit
            message= _ "This underground river is choked off with a rotting mess, it’s overgrown with fungus. I can try to see what’s underneath... whoops!"
        [/message]
        {QUAKE "rumble.ogg"}
        [terrain]
            terrain=Wwg # so it isn't an impossible trap for the player
            [and]
                x=1-26
                y=9-16
                terrain=!,*^Br*,*^Tf*,Xu*,Ko,Wog,Wwf
            [/and]
        [/terrain]
        [terrain]
            terrain=Wwg
            [and]
                x=1-26
                y=9-16
                terrain=*^Br*,*^Tf*
            [/and]
            layer=base
        [/terrain]
        [terrain]
            terrain=Wog
            [and]
                x=1-26
                y=9-16
                terrain=Wwf
            [/and]
        [/terrain]
        [redraw]
            side=1
        [/redraw]
        [message]
            speaker=Pidmer
            message= _ "Help! We can’t swim!"
        [/message]
        [kill]
            [and]
                side=3
                [filter_location]
                    terrain=Wwg,Wog
                [/filter_location]
            [/and]
            animate=no
        [/kill]
        [message]
            speaker=Bragdash
            message= _ "You’ve flooded your own tunnel, you stupid little gophers!"
        [/message]
        [message]
            speaker=Baglur
            # po: "Yes, we have flooded our own tunnel ..."
            message= _ "Och, we ’ave... but our rails are as strong and stout as we are!"
        [/message]
        [message]
            speaker=Rugnur
            message= _ "We can continue along the rails!"
        [/message]
        [message]
            speaker=Alanin
            message= _ "That’s good, because that water looks so cold!"
        [/message]
        [kill]
            [and]
                side=2
                [filter_location]
                    terrain=Wo*
                [/filter_location]
            [/and]
            animate=no
            fire_event=yes
        [/kill]
    [/event]

    [event]
        name=die
        [filter]
            id=Baglur
        [/filter]
        [endlevel]
            result=defeat
        [/endlevel]
    [/event]

    [event]
        name=last_breath
        [filter]
            id=Bragdash
        [/filter]
        [message]
            speaker=Bragdash
            message= _ "Argh, I never should’a come to this stinkin’ cathole!"
        [/message]
    [/event]

    [event]
        name=moveto
        [filter_condition]
            [have_unit]
                id=Baglur
                y=1-3
            [/have_unit]
            [and]
                [have_unit]
                    id=Alanin
                    y=1-3
                [/have_unit]
            [/and]
            [and]
                [have_unit]
                    id=Rugnur
                    y=1-3
                [/have_unit]
            [/and]
        [/filter_condition]
        [filter]
            side=1
            y=1-3
        [/filter]
        [message]
            speaker=Rugnur
            message= _ "The air smells much better up ahead, let’s leave this place behind us. Too bad the rails are damaged here, the carts could have been handy."
        [/message]
        [message]
            speaker=Baglur
            message= _ "Aye, but the carts are common enough, the real beauty is the rail track! Let’s follow the straight steel path as far north as it will take us."
        [/message]
        [endlevel]
            result=victory
            bonus=yes
            {NEW_GOLD_CARRYOVER 40}
        [/endlevel]
    [/event]
[/scenario]
