#textdomain wesnoth-trow
[scenario]
    id=A_Harrowing_Escape
    name= _ "A Harrowing Escape"
    map_data="{campaigns/The_Rise_Of_Wesnoth/maps/A_Harrowing_Escape.map}"
    next_scenario=The_River_Road
    {TURNS 48 45 42}
    {DEFAULT_SCHEDULE}

    {SCENARIO_MUSIC the_king_is_dead.ogg}
    {EXTRA_SCENARIO_MUSIC breaking_the_chains.ogg}

    # No story part
    {A_HARROWING_ESCAPE_BIGMAP}

    {TROW_DEATHS}

    [side]
        type=Noble Commander
        id=Prince Haldric
        name= _ "Prince Haldric"
        unrenamable=yes
        side=1
        canrecruit=yes
        gold=100
        controller=human
        team_name=Haldric
        user_team_name=_"Refugees"
        {FLAG_VARIANT loyalist}
    [/side]

    [side]
        type=Orcish Warlord
        id=Tan-Schmog
        name= _ "Tan-Schmog"
        profile=portraits/orcs/transparent/grunt.png
        side=2
        canrecruit=yes
        {GOLD 80 140 200}
        team_name=orcs
        user_team_name=_"Orcs"
        recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Goblin Spearman
        [ai]
            #{NO_SCOUTS}
            recruitment_pattern=scout,scout,fighter,fighter,mixed fighter,archer
            recruitment_ignore_bad_movement=yes
            passive_leader=yes
            {ATTACK_DEPTH 3 4 5}
        [/ai]
        [ai]
            time_of_day=first_watch,second_watch
            aggression=0.75
            caution=0.15
            grouping=no
        [/ai]
    [/side]

    [side]
        type=Orcish Warlord
        id=Tan-NauVong
        name= _ "Tan-NauVong"
        profile=portraits/orcs/transparent/grunt-2.png
        side=3
        canrecruit=yes
        {GOLD 80 140 200}
        team_name=orcs
        user_team_name=_"Orcs"
        recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Goblin Spearman
        [ai]
            #{NO_SCOUTS}
            recruitment_pattern=scout,scout,fighter,fighter,mixed fighter,archer
            recruitment_ignore_bad_movement=yes
            passive_leader=yes
            {ATTACK_DEPTH 3 4 5}
        [/ai]
        [ai]
            time_of_day=first_watch,second_watch
            aggression=0.75
            caution=0.15
            grouping=no
        [/ai]
    [/side]

    [event]
        name=prestart

        {PLACE_IMAGE (scenery/signpost.png) 23 38}
        {PLACE_IMAGE (scenery/signpost.png) 13 7}
#ifdef EASY
        {GUARD_UNIT (Orcish Grunt) (Snagakhan) ( _ "Snagakhan") 2 17 37}
        {GUARD_UNIT (Orcish Grunt) (Knafakhan) ( _ "Knafakhan") 3 19 36}
#endif
#ifdef NORMAL
        {GUARD_UNIT (Orcish Warrior) (Snagakhan) ( _ "Snagakhan") 2 17 37}
        {GUARD_UNIT (Orcish Warrior) (Knafakhan) ( _ "Knafakhan") 3 19 36}
#endif

#ifdef HARD
        {GUARD_UNIT (Orcish Warrior) (Snagakhan) ( _ "Snagakhan") 2 17 37}
        {GUARD_UNIT (Orcish Warrior) (Knafakhan) ( _ "Knafakhan") 3 19 36}
        {GUARD_UNIT (Orcish Warrior) (Hoshnak) ( _ "Hoshnak") 2 6 23}
        {GUARD_UNIT (Orcish Warrior) (Gruumogth) ( _ "Gruumogth") 3 8 22}
#endif
        [recall]
            id=Lady Outlaw
        [/recall]

        [objectives]
            side=1
            [objective]
                description= _ "Defeat all enemy leaders"
                condition=win
            [/objective]
            [objective]
                description= _ "Death of Prince Haldric"
                condition=lose
            [/objective]
            [objective]
                description= _ "Turns run out"
                condition=lose
            [/objective]

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

    [event]
        name=start
        [message]
            speaker=Prince Haldric
            message= _ "Argh, the orcish vanguard must have flanked us even further to the east! They're already holding the mouth of the pass. We have to get out of the mountain pass before winter comes or we're all dead meat!"
            image=portraits/haldric-mad.png
        [/message]

        [message]
            speaker=Prince Haldric
            message= _ "Father, I wish you were here..."
        [/message]

        [message]
            speaker=Lady Outlaw
            message= _ "I'd drop the sentiment and pick up your sword. There's plenty of fighting ahead of us!"
        [/message]

        [message]
            speaker=Tan-Schmog
            # wmllint: local spelling Grrrr
            message= _ "You won't get much further boy. Grrrr!"
        [/message]
    [/event]

    [event]
        name=moveto
        [filter]
            side=1
            x=8
            y=5
        [/filter]

        [message]
            speaker=unit
            message= _ "Who goes there?"
        [/message]

        [unit]
            id=Burin the Lost
            name= _ "Burin the Lost"
            profile="portraits/burin.png"
            side=1
            type=Dwarvish Steelclad
            unrenamable=yes
            x=8
            y=5
            [modifications]
                {TRAIT_LOYAL}
                {TRAIT_STRONG}
            [/modifications]
            {IS_LOYAL}
        [/unit]

        [message]
            speaker=Burin the Lost
            message= _ "Burin, Burin the Lost. Who be ye?"
        [/message]

        [message]
            speaker=Prince Haldric
            message= _ "I'm Prince Haldric, we have little time to talk. We must make haste through the pass... What are you?"
        [/message]

        [message]
            speaker=Burin the Lost
            message= _ "I'm a dwarf, you fool of a boy! I got lost while exploring deep underground, almost a century ago. I've never found my way home. But it seems nice enough here."
        [/message]

        [message]
            speaker=Prince Haldric
            message= _ "Nice? The orcs have come, and we must flee!"
        [/message]

        [message]
            speaker=Burin the Lost
            message= _ "Orcs! It's been a long time since I felt the satisfying crunch of one of those under my axe. Time for a fight!"
        [/message]

        [message]
            speaker=Prince Haldric
            message= _ "You've fought orcs before?"
        [/message]

        [message]
            speaker=Burin the Lost
            message= _ "Fool boy! Where did you grow up? Enough of this, let's go get some orcs!"
        [/message]
    [/event]

    [event]
        name=time over
        [message]
            speaker=Prince Haldric
            message= _ "We're trapped in the pass! I can see their reinforcements! All is lost! Is that... Is that snow?... We're doomed!"
            image=portraits/haldric-mad.png
        [/message]
    [/event]

    [event]
        name=moveto
        [filter]
            side=1
            x=23
            y=38
        [/filter]

        [redraw]
        [/redraw]

        [message]
            speaker=narrator
            image=scenery/signpost.png
            # wmllint: local spelling SE SW
            #wmllint: display on
            message= _ "SE - The River Road.
SW - The Midlands."
            #wmllint: display off
            image=wesnoth-icon.png
        [/message]
        [allow_undo]
        [/allow_undo]
    [/event]

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

        [redraw]
        [/redraw]

        [message]
            speaker=narrator
            # wmllint: local spelling NUTTIN HEER
            message= _ "GO HOME! AIN'T NUTTIN TO SEE HEER!"
            image=scenery/signpost.png
        [/message]
        [allow_undo]
        [/allow_undo]
    [/event]

#define ESCAPE_VICTORY
    [message]
        speaker=Prince Haldric
        message= _ "Now, should I go southeast on the River Road, or southwest through the midlands? The River Road crosses the Swamp of Esten, so I doubt that even orcs would go there. The Midlands were nice, but who knows what's going on there now."

        [option]
            message= _ "I think I'll take the River Road..."
            [command]
                [message]
                    speaker=Lady Outlaw
                    message= _ "Good. The Midlands are probably an orc-infested ruin by now."
                [/message]

                [message]
                    speaker=Burin the Lost
                    message= _ "SWAMP! I'm under 5 feet tall, and I don't float! Argh, have it your way."
                [/message]
                {VARIABLE escape_choice 1}
                [endlevel]
                    result=victory
                    bonus=yes
                    {NEW_GOLD_CARRYOVER 40}
                    next_scenario=The_River_Road
                [/endlevel]
            [/command]
        [/option]
        [option]
            message= _ "We'll go through the Midlands..."
            [command]
                [message]
                    speaker=Lady Outlaw
                    message= _ "I suspect that the Midlands might be in ruins by now."
                [/message]

                [message]
                    speaker=Burin the Lost
                    message= _ "It's better than the swamp. I'm under 5 feet tall, and I don't float! Besides, I'd rather enjoy meeting more orcs."
                [/message]
                {VARIABLE escape_choice 2}
                [endlevel]
                    result=victory
                    bonus=yes
                    {NEW_GOLD_CARRYOVER 40}
                    next_scenario=The_Midlands
                [/endlevel]
            [/command]
        [/option]
    [/message]
#enddef

    [event]
        name=die
        [filter]
            id=Tan-Schmog
        [/filter]

        [filter_second]
            side=1
        [/filter_second]

        {LOOT 50 1}

        [if]
            [variable]
                name=second_orc_dead
                equals=yes
            [/variable]
            [then]
                {ESCAPE_VICTORY}
            [/then]
            [else]
                [set_variable]
                    name=first_orc_dead
                    value=yes
                [/set_variable]
                #Give them a nasty surprise
#ifdef EASY
                [gold]
                    side=3
                    amount=60
                [/gold]
                {LOYAL_UNIT 3 (Orcish Slayer) 25 40}
#else
                [gold]
                    side=3
                    amount=90
                [/gold]

                {LOYAL_UNIT 3 (Orcish Slayer) 25 40}
                {LOYAL_UNIT 3 (Orcish Assassin) 24 40}
                {LOYAL_UNIT 3 (Orcish Assassin) 26 40}

#endif
                [message]
                    speaker=Tan-NauVong
                    message= _ "Come and get it!"
                [/message]
                [message]
                    side=2
                    type=Orcish Slayer
                    message= _ "Die, human."
                [/message]
                [message]
                    speaker=Prince Haldric
                    message= _ "Uh-oh!"
                [/message]
            [/else]
        [/if]
    [/event]

    [event]
        name=die
        [filter]
            id=Tan-NauVong
        [/filter]

        [filter_second]
            side=1
        [/filter_second]

        {LOOT 50 1}

        [if]
            [variable]
                name=first_orc_dead
                equals=yes
            [/variable]
            [then]
                {ESCAPE_VICTORY}
            [/then]
            [else]
                [set_variable]
                    name=second_orc_dead
                    value=yes
                [/set_variable]
                #Give them a nasty surprise

#ifdef EASY
                [gold]
                    side=2
                    amount=60
                [/gold]

                {LOYAL_UNIT 2 (Orcish Slayer) 25 40}
#else
                [gold]
                    side=2
                    amount=90
                [/gold]

                {LOYAL_UNIT 2 (Orcish Slayer) 25 40}
                {LOYAL_UNIT 2 (Orcish Assassin) 24 40}
                {LOYAL_UNIT 2 (Orcish Assassin) 26 40}
#endif
                [message]
                    speaker=Tan-Schmog
                    message= _ "I'll not go so easily!"
                [/message]
                [message]
                    side=2
                    type=Orcish Slayer
                    message= _ "Die, human."
                [/message]
                [message]
                    speaker=Prince Haldric
                    message= _ "Uh-oh!"
                [/message]
            [/else]
        [/if]
    [/event]

    [event]
        name=victory
        [message]
            speaker=Prince Haldric
            message= _ "We've escaped the pass. Well, at least I know that the orcs can be beaten. Hmm, I guess that this is the last I'll see of my home... and my father. (Sigh)"
        [/message]
        [message]
            speaker=Prince Haldric
            message= _ "We should make our way to Southbay. It is the largest city on the Isle. We should be able to make a stand there. Failing that, there's always Clearwater Port."
        [/message]
        {CLEAR_VARIABLE first_orc_dead}
        {CLEAR_VARIABLE second_orc_dead}
    [/event]
[/scenario]
