#textdomain wesnoth-l
[scenario]
    id=06_The_Hunters
    name= _ "The Hunters"
    victory_when_enemies_defeated=no
    next_scenario=07_Glory
    map_file=06_The_Hunters.map
    turns=27
    {FIRST_WATCH}
    {FIRST_WATCH}
    {FIRST_WATCH}
    {MIDNIGHT}
    {MIDNIGHT}
    {MIDNIGHT}
    {SECOND_WATCH}
    {SECOND_WATCH}
    {SECOND_WATCH}
    {DAWN}
    {MORNING}
    {MORNING}
    {MORNING}
    {AFTERNOON}
    {AFTERNOON}
    {AFTERNOON}
    {DUSK}
    {FIRST_WATCH}
    {FIRST_WATCH}
    {FIRST_WATCH}
    {MIDNIGHT}
    {MIDNIGHT}
    {MIDNIGHT}
    {SECOND_WATCH}
    {SECOND_WATCH}
    {SECOND_WATCH}
    {DAWN}
    {MORNING}

    {INTRO_AND_SCENARIO_MUSIC "transience.ogg" "the_king_is_dead.ogg"}
    {EXTRA_SCENARIO_MUSIC siege_of_laurelmor.ogg}
    {EXTRA_SCENARIO_MUSIC "casualties_of_war.ogg"}
    {EXTRA_SCENARIO_MUSIC underground.ogg}

    [story]
        [part]
            story= _ "24 Deeproot, 501 YW

The sun don’t really shine at all in these Grey Woods, but truth be told, I has been getting used to it more and more. Lounging out in the warm daylight, talkin’ with Erwen while watching them kids play out in the fields... those times were so long ago. Our lives weren’t never real peaceful, but back then, we had our homes and our friends and our family... now we be creatures of the dark."
            background=story/frontier.webp
        [/part]
        [part]
            story= _ "It be real lonesome like this. I still has me Harper, and I be grateful for the lass, but she don’t really understand an old man like me. I know the past be the past, but I just can’t help but think of sis in times like these. How she used to be dragging me out on some silly little romp, a little job here and there for some gold or lil trinket, or sometimes just for fun... I never wanted to go, of course. I were always real lazy. Still am, even now."
            background=story/frontier.webp
        [/part]
        [part]
            story= _ "Then, Harper tells me, “Come on Uncle, we’re on an adventure! Don’t be so mopey, live a little!” I know she be trying to be cheery, but she really don’t know how much she be reminding me of Erwen sometimes..."
            background=story/frontier.webp
        [/part]
        [part]
            story= _ "I must be strong. That’s what I tells myself. I should be strong, but... I don’t know what be keeping me going, if it be this misguided sense of pride, or my duties to the village, or Harper, or even just remembering the past, making some futile attempts to go back to better times."
            background=story/frontier.webp
        [/part]
        [part]
            story= _ "Either way, I be here now, on this adventure."
            background=story/frontier.webp
        [/part]
    [/story]

    {LIBERTY_BIGMAP {JOURNEY_06_NEW} }

    [side]
        side=1
        color=black
        type=Highwayman
        id=Baldras
        canrecruit=yes
        controller=human
        fog=yes
        recruit=Thug,Footpad,Poacher
        {GOLD 150 125 100}
        village_gold=1
        team_name=good_guys
        user_team_name=_"Rebels"
    [/side]

    {STARTING_VILLAGES 1 10}

    [side]
        type=Shadow Lord
        id=Helicrom
        name= _ "Helicrom"
        profile=portraits/helicrom.webp
        facing=sw
        side=2
        color=purple
        canrecruit=yes
        recruit=Rogue Mage,Shadow Mage,Thief,Rogue
        {GOLD 120 90 60}
        village_gold=1
        controller=human
        fog=yes
        share_vision=all
        team_name=good_guys
        user_team_name=_"Rebels"
    [/side]

    [side]
        side=3
        color=red
        type=Shock Trooper
        id=Linneus
        name= _ "Linneus"
        facing=sw
        canrecruit=yes
        recruit=
        gold=100
        controller=ai
        shroud=yes
        fog=yes
        share_vision=none
        team_name=bad_guys
        user_team_name=_"Weldyn"
        {FLAG_VARIANT loyalist}
    [/side]

    [side]
        side=4
        color=red
        type=Lieutenant
        id=Archarel
        name= _ "Archarel"
        canrecruit=yes
        recruit=
        gold=0
        income=-2
        controller=ai
        shroud=yes
        fog=yes
        share_vision=none
        team_name=bad_guys
        user_team_name=_"Weldyn"
        {FLAG_VARIANT loyalist}
    [/side]

    [side]
        side=5
        controller=ai
        no_leader=yes
        hidden=yes
        team_name=monsters
        color=brown
    [/side]

    {STARTING_VILLAGES 4 10}

    [event]
        name=prestart

        [micro_ai]
            side=3
            ai_type=messenger_escort
            action=add

            [filter]
                side=3
                canrecruit=yes
            [/filter]
            waypoint_x,waypoint_y=7,4
        [/micro_ai]

        {PLACE_IMAGE scenery/signpost.png 11 7}
        {PLACE_IMAGE scenery/leanto.png 23 3}
        {PLACE_IMAGE scenery/whirlpool.png 3 26}
        {PLACE_IMAGE items/sword.png 38 2}
        {PLACE_IMAGE items/coffin-closed.png 23 26}
        {PLACE_IMAGE items/key.png 10 12}

        {VARIABLE has_key 0}

        [objectives]
            side=1,2
            [objective]
                description= _ "Kill all enemy patrols before they reach the outpost"
                condition=win
            [/objective]
            [objective]
                description= _ "Death of Baldras"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Harper"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Helicrom"
                condition=lose
            [/objective]
            [objective]
                description= _ "Any patrol units survive when turns run out"
                condition=lose
            [/objective]
            [objective]
                description= _ "Any allied unit is sighted by the outpost guards"
                condition=lose
            [/objective]

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

        [store_unit]
            variable=stored_Linneus
            kill=yes
            [filter]
                id=Linneus
            [/filter]
        [/store_unit]
        #set up units

        {GENERIC_UNIT 2 (Rogue Mage) 18 21}
        {GENERIC_UNIT 2 (Shadow Mage) 18 22}
        {GENERIC_UNIT 4 (Heavy Infantryman) 7 2} {GUARDIAN}
        {GENERIC_UNIT 4 (Heavy Infantryman) 7 6} {GUARDIAN}

        {VARIABLE losses false}
    [/event]

    #
    # Starting conversation and actions
    #

#define TROOPER TYPE TO_X TO_Y
    [move_unit_fake]
        type={TYPE}
        side=3
        x=39,{TO_X}
        y=23,{TO_Y}
    [/move_unit_fake]
    {GENERIC_UNIT 3 {TYPE} {TO_X} {TO_Y}}
    [+unit]
        facing=sw
    [/unit]
#enddef

    [event]
        name=start

        [recall]
            id=Harper
        [/recall]

        [message]
            speaker=Baldras
            message= _ "The leader, I presumes."
        [/message]
        [message]
            speaker=Helicrom
            message= _ "Indeed, I am Lord Helicrom, the Crow of the Grey Woods. We are acquaintances of Lord Maddock, who sent word to us of your predicament. I believe we can work something out for your situation."
        [/message]
        [message]
            speaker=Baldras
            message= _ "What be your pursuits?"
        [/message]
        [message]
            speaker=Helicrom
            message= _ "The former king’s magic ministry kept a tight control on the training and employment of mages in Wesnoth. Those of us who dared to... depart from the curriculum were dealt with harshly. Many of us were forced to escape here to continue our study of our brand of magic. Our security and secrecy are not cheap."
        [/message]
        [message]
            speaker=Baldras
            message= _ "Then you be fellow outlaws. But why do you wants to help us?"
        [/message]
        [message]
            speaker=Helicrom
            message= _ "<i>Quid pro quo.</i> Our aid is never given freely. You have something that may be useful to us."
        [/message]
        [message]
            speaker=Baldras
            message= _ "Manpower. Mages be no good at fighting, I knows. But what for?"
        [/message]
        [message]
            speaker=Helicrom
            message= _ "Understand this. Any weakening of the Throne of Wesnoth, whether it be occupied by king or queen, aids us. To accomplish that, we must destabilize their forces in this region. The key is Halstead."
        [/message]
        [message]
            speaker=Harper
            message= _ "That big ol’ fort between Aldril and Elensefar?"
        [/message]
        [message]
            speaker=Baldras
            message= _ "Aye, Harper. What the mage says be no surprise. It be a bastion of central importance, rivalin’ Elensefar even. Maddock said the Queen’s troops were gathering there. But we gots no way to fight a war with them, not since Maddock won’t send his soldiers to battle."
        [/message]
        [message]
            speaker=Helicrom
            message= _ "Know this, Baldras. During the past week, several patrols have again ventured across the Great River into Annuvin. A woman named Relana opposed them with a small militia and was victorious, but with heavy losses. The Crown, however, has begun to take notice of this rebellion and is massing forces within Halstead. When its armies are raised, none of your little villages will be able to resist them. Your only choice would be to flee farther north into orcish territory."
        [/message]
        [message]
            speaker=Harper
            message= _ "We’d never survive there. But would it be so bad if we just swore fealty to the Queen?"
        [/message]
        [message]
            speaker=Baldras
            message= _ "Only if we gots no other choice. Let’s hear the mage’s plan first."
        [/message]
        [message]
            speaker=Helicrom
            message= _ "I’m not asking you to fight a war. A direct fight against Weldyn’s armies would be undoubtedly foolish. However, we have other means within our grasp. From Dan’Tonk to Halstead, the fastest path lies through the pass between the Brown Hills and the Gryphon Mountains followed by the trek through these Grey Woods. We are in prime position to gnaw away at their troops, crippling their forces before they ever arrive at their destination."
        [/message]
        [message]
            speaker=Baldras
            message= _ "Then what?"
        [/message]
        [message]
            speaker=Helicrom
            message= _ "I am sure you can guess, magistrate."
        [/message]
        [message]
            speaker=Baldras
            message= _ "You means to sack Halstead itself."
        [/message]
        [message]
            speaker=Harper
            message= _ "There’s no way we can fight them all... can we?"
        [/message]
        [message]
            speaker=Baldras
            message= _ "I don’t know. But, for now, ambushing them patrols be easy enough. That’ll slow them Wesnothians down enough for us to figure out the next step."
        [/message]
        [message]
            speaker=Helicrom
            message= _ "In the last day, my scouts have counted five platoons of troops marching towards the garrison. We must eliminate them all before they reach the outpost at the end of the woods. The outpost also must not be alerted to our presence, or we will have the bulk of their forces upon us."
        [/message]

        {SCROLL_TO 7 4}

        [delay]
            time=1500
        [/delay]

        [message]
            speaker=Harper
            message= _ "The first platoon approaches..."
        [/message]

        {SCROLL_TO 39 23}
        [lift_fog]
            [filter_side]
                side=1
            [/filter_side]
            x,y=37,22
            radius=3
        [/lift_fog]

        {TROOPER "Heavy Infantryman" 38 22}
        {TROOPER "Heavy Infantryman" 38 21}

#ifdef EASY
        {TROOPER "Heavy Infantryman" 37 23}
#else
        {TROOPER "Shock Trooper"     37 23}
#endif

#ifdef HARD
        {TROOPER "Shock Trooper"     38 23}
#else
        {TROOPER "Heavy Infantryman" 38 23}
#endif

        [move_unit_fake]
            type=$stored_Linneus.type
            side=$stored_Linneus.side
            x=39,37
            y=23,22
        [/move_unit_fake]
        [unstore_unit]
            variable=stored_Linneus
        [/unstore_unit]
        {CLEAR_VARIABLE stored_Linneus}

        [delay]
            time=750
        [/delay]

        [message]
            speaker=Helicrom
            message= _ "We shall pincer them from the other side of this path. When we are done, no one shall fear the open roads and night sky more than the armies of Weldyn. Strike quickly, strike silently... and leave no one alive."
        [/message]

        [store_unit]
            [filter]
                id=Helicrom
            [/filter]
            variable=Helicrom
            kill=yes
        [/store_unit]
        [move_unit_fake]
            type=Shadow Lord
            side=2
            x=17,20
            y=22,18
        [/move_unit_fake]
        [kill]
            x,y=18,21
        [/kill]
        [move_unit_fake]
            type=Rogue Mage
            side=2
            x=18,20
            y=21,18
        [/move_unit_fake]
        [kill]
            x,y=18,22
        [/kill]
        [move_unit_fake]
            type=Shadow Mage
            side=2
            x=18,20
            y=22,18
        [/move_unit_fake]

        [terrain]
            x=16
            y=21
            terrain=Rb
        [/terrain]
        [terrain]
            x=17,18
            y=22,22
            terrain=Gll^Em
        [/terrain]
        [terrain]
            x=18
            y=21
            terrain=Re
        [/terrain]
        [redraw][/redraw]

        {SCROLL_TO 32 8}

        [lift_fog]
            [filter_side]
                side=1
            [/filter_side]
            x,y=32,8
            radius=4
        [/lift_fog]

        [move_unit_fake]
            type=Shadow Lord
            side=2
            x=28,32
            y=11,8
        [/move_unit_fake]
        [unstore_unit]
            variable=Helicrom
            x,y=32,8
        [/unstore_unit]
        [move_unit_fake]
            type=Rogue Mage
            side=2
            x=28,31
            y=11,9
        [/move_unit_fake]
        {GENERIC_UNIT 2 (Rogue Mage) 31 9}
        [move_unit_fake]
            type=Shadow Mage
            side=2
            x=28,32
            y=11,9
        [/move_unit_fake]
        {GENERIC_UNIT 2 (Shadow Mage) 32 9}

        [capture_village]
            [filter_side]
                side=2
            [/filter_side]
            x=26-39
            y=4-12
        [/capture_village]

        [redraw]
            side=2
            clear_shroud=yes
        [/redraw]
        {CLEAR_VARIABLE Helicrom}
    [/event]

    # track if the player lost a unit
    [event]
        name=die
        [filter]
            side=1,2
        [/filter]

        {VARIABLE losses true}
    [/event]

    #
    # Special Event - when you attack the bad guys for the first time they react
    #
    [event]
        name=attack
        [filter_second]
            side=3
        [/filter_second]
        [message]
            speaker=Linneus
            message= _ "It’s an ambush! Run!"
        [/message]
    [/event]

    # more special events

    [event]
        name=moveto
        [filter]
            id=Helicrom
            x,y=38,2
        [/filter]

        [message]
            speaker=Helicrom
            message= _ "Ah, here it is. I was wondering where I had misplaced my favorite blade."
        [/message]

        [sound]
            name=sword-1.ogg
        [/sound]

        [object]
            id=helicrom_buff
            take_only_once=yes
            silent=yes
            duration=forever
            [filter]
                x,y=38,2
            [/filter]
            [effect]
                apply_to=attack
                range=melee
                increase_damage=1
            [/effect]
        [/object]

        {REMOVE_IMAGE 38 2}
    [/event]

    [event]
        name=moveto
        [filter]
            side=1,2
            x,y=23,3
        [/filter]

        [message]
            speaker=unit
            message= _ "Hey, I found some old coins in this shack."
        [/message]

        [sound]
            name=gold.ogg
        [/sound]

        [gold]
            side=1,2
            amount=16
        [/gold]
    [/event]

    [event]
        name=moveto
        [filter]
            side=1
            x,y=3,26
        [/filter]

        [sound]
            name=water-blast.wav
        [/sound]

        [unit]
            type=Tentacle of the Deep
            side=5
            x,y=2,26
            max_hitpoints=60
            hitpoints=60
            level=3
            animate=yes
        [/unit]

        [message]
            speaker=unit
            message= _ "Bleagh, a slimy tentacle. Why’s it so big?"
        [/message]
    [/event]

    [event]
        name=moveto
        [filter]
            side=1,2
            x,y=10,12
        [/filter]

        [message]
            speaker=unit
            message= _ "There’s a rusty key here. I wonder if it could be useful?"
        [/message]

        {VARIABLE has_key 1}

        {REMOVE_IMAGE 10 12}
    [/event]

    [event]
        name=moveto
        first_time_only=no
        [filter]
            side=1,2
            x,y=23,26
            [not]
                id=Baldras,Helicrom
            [/not]
        [/filter]

        [if]
            [variable]
                name=has_key
                numerical_equals=0
            [/variable]
            [then]
                [message]
                    speaker=unit
                    message= _ "There is a waterlogged coffin here."
                [/message]
            [/then]
        [/if]

        [if]
            [variable]
                name=has_key
                numerical_equals=1
            [/variable]
            [then]
                [message]
                    speaker=unit
                    message= _ "Hey, that key fits in this coffin. Should I open it?"
                [/message]
                [message]
                    speaker=Baldras
                    [option]
                        label= _ "No, that be a terrible idea."
                        [command]
                            [allow_undo]
                            [/allow_undo]
                        [/command]
                    [/option]
                    [option]
                        label= _ "Fine, do it."
                        [command]
                            [sound]
                                name=zombie-hit-4.ogg
                            [/sound]

                            [unit]
                                type=Ghoul
                                side=5
                                x,y=23,26
                                animate=yes
                            [/unit]

                            [message]
                                speaker=unit
                                message= _ "What is this disgusting monster?"
                            [/message]

                            [message]
                                speaker=Helicrom
                                message= _ "A ghoul, a creature of disease and pestilence. Kill the putrid thing. Its stench is making me sick."
                            [/message]

                            {REMOVE_IMAGE 23 26}

                            {PLACE_IMAGE items/coffin-open.png 23 26}

                            {VARIABLE has_key 2}
                        [/command]
                    [/option]
                [/message]
            [/then]
        [/if]
    [/event]

    [event]
        name=die
        [filter]
            type=Ghoul
        [/filter]

        {PLACE_IMAGE items/potion-poison.png $x1 $y1}

        [message]
            speaker=Helicrom
            message= _ "Disgusting though it may be, perhaps that creature’s corpse could be useful."
        [/message]

        [event]
            name=moveto
            id=take_potion
            delayed_variable_substitution=no
            first_time_only=no
            [filter]
                x=$x1
                y=$y1
                side=1,2
            [/filter]
            [message]
                speaker=unit
                message= _ "Should I use this potion?"
                [option]
                    label= _ "Yes, I’ll use it."
                    [command]
                        [sound]
                            name=poison.ogg
                        [/sound]

                        [object]
                            id=poison_weapon
                            name= _ "Vile Concoction"
                            image=items/potion-poison.png
                            description= _ "This unit’s melee weapons gain the poison special and this unit gains a small number of hitpoints."
                            [filter]
                                x=$x1
                                y=$y1
                            [/filter]

                            [effect]
                                apply_to=hitpoints
                                increase_total=5
                                increase=5
                            [/effect]

                            [effect]
                                apply_to=attack
                                range=melee
                                [set_specials]
                                    {WEAPON_SPECIAL_POISON}
                                    mode=append
                                [/set_specials]
                            [/effect]
                        [/object]

                        [remove_item]
                            x=$x1
                            y=$y1
                        [/remove_item]

                        [remove_event]
                            id=take_potion
                        [/remove_event]
                    [/command]
                [/option]

                [option]
                    label= _ "No, I’ll leave it for someone else."
                    [command]
                        [allow_undo]
                        [/allow_undo]
                    [/command]
                [/option]
            [/message]
        [/event]
    [/event]

    #
    # Special Event - after 5 turns, send the second patrol
    #
    [event]
        name=turn 5

        {SCROLL_TO 39 23}
        [lift_fog]
            [filter_side]
                side=1
            [/filter_side]
            x,y=37,22
            radius=3
        [/lift_fog]

        {TROOPER "Spearman" 38 22}
        {TROOPER "Heavy Infantryman" 38 21}

#ifdef EASY
        {TROOPER "Spearman" 37 23}
#else
        {TROOPER "Javelineer"     37 23}
#endif

#ifdef EASY
        {TROOPER "Bowman" 39 23}
#else
        {TROOPER "Longbowman"     39 23}
#endif

#ifdef HARD
        {TROOPER "Shock Trooper"     38 23}
#else
        {TROOPER "Heavy Infantryman" 38 23}
#endif

        [move_unit_fake]
            type=Swordsman
            side=3
            x=39,37
            y=23,22
        [/move_unit_fake]
        [unit]
            side=3
            type=Swordsman
            facing=sw
            canrecruit=yes
            x,y=37,22
        [/unit]
    [/event]

    #
    # Special Event - after 11 turns, send the third patrol
    #
    [event]
        name=turn 11

        {SCROLL_TO 39 23}
        [lift_fog]
            [filter_side]
                side=1
            [/filter_side]
            x,y=37,22
            radius=3
        [/lift_fog]

        {TROOPER "Spearman" 38 22}
        {TROOPER "Heavy Infantryman" 38 21}

#ifdef EASY
        {TROOPER "Spearman" 37 23}
#else
        {TROOPER "Javelineer"     37 23}
#endif

#ifdef EASY
        {TROOPER "Heavy Infantryman" 39 23}
#else
        {TROOPER "Shock Trooper"     39 23}
#endif

#ifdef HARD
        {TROOPER "Longbowman"     38 23}
#else
        {TROOPER "Bowman" 38 23}
#endif

        [move_unit_fake]
            type=Pikeman
            side=3
            x=39,37
            y=23,22
        [/move_unit_fake]
        [unit]
            side=3
            type=Pikeman
            facing=sw
            canrecruit=yes
            x,y=37,22
        [/unit]

        [message]
            type=Spearman
            message= _ "Doesn’t something about these woods feel weird to you, sir?"
        [/message]
        [message]
            type=Pikeman
            message= _ "Afraid of ghosts, soldier?"
        [/message]
        [message]
            type=Spearman
            message= _ "..."
        [/message]
    [/event]

    #
    # Special Event - after 17 turns, send the fourth patrol
    #
    [event]
        name=turn 17

        {SCROLL_TO 39 23}
        [lift_fog]
            [filter_side]
                side=1
            [/filter_side]
            x,y=37,22
            radius=3
        [/lift_fog]

        {TROOPER "Shock Trooper" 38 22}
        {TROOPER "Heavy Infantryman" 38 21}
        {TROOPER "Swordsman" 37 23}

#ifdef EASY
        {TROOPER "Bowman" 39 23}
#else
        {TROOPER "Longbowman"     39 23}
#endif

#ifdef HARD
        {TROOPER "Shock Trooper"     38 23}
#else
        {TROOPER "Heavy Infantryman" 38 23}
#endif
        {TROOPER "Spearman" 39 22}

        [move_unit_fake]
            type=Lieutenant
            side=3
            x=39,37
            y=23,22
        [/move_unit_fake]
        [unit]
            side=3
            type=Lieutenant
            facing=sw
            canrecruit=yes
            x,y=37,22
        [/unit]
    [/event]

    #
    # Special Event - after 21 turns, send the fifth patrol
    # this one is a bit faster than the other patrols, so it'll be a bit more challenging
    #
    [event]
        name=turn 21

        {SCROLL_TO 39 23}
        [lift_fog]
            [filter_side]
                side=1
            [/filter_side]
            x,y=37,22
            radius=3
        [/lift_fog]

        {TROOPER "Duelist" 38 22}
        {TROOPER "Swordsman" 38 21}

#ifdef EASY
        {TROOPER "Fencer" 37 23}
#else
        {TROOPER "Duelist"     37 23}
#endif

#ifdef EASY
        {TROOPER "Spearman" 39 23}
#else
        {TROOPER "Javelineer"     39 23}
#endif

#ifdef HARD
        {TROOPER "Longbowman"     38 23}
#else
        {TROOPER "Bowman" 38 23}
#endif

        {TROOPER "Duelist" 39 22}

        [move_unit_fake]
            type=Master at Arms
            side=3
            x=39,37
            y=23,22
        [/move_unit_fake]
        [unit]
            side=3
            type=Master at Arms
            facing=sw
            canrecruit=yes
            x,y=37,22
        [/unit]

        [message]
            type=Master at Arms
            message= _ "Woods, woods, woods and more woods! Bah, that general had better have a good reason for dragging me out to Halstead with all these oafs."
        [/message]
        [message]
            type=Duelist
            message= _ "But cap’n, we’re your loyal troops..."
        [/message]
        [message]
            type=Master at Arms
            message= _ "Shut it and keep moving."
        [/message]
    [/event]

    #
    # Special Event - Archarel says some stuff
    #
    [event]
        name=turn 10

        {SCROLL_TO 7 4}
        [lift_fog]
            [filter_side]
                side=1,2
            [/filter_side]
            x,y=7,4
            radius=5
        [/lift_fog]

        [message]
            speaker=Archarel
            message= _ "Several platoons of troops were supposed to arrive today. I wonder if something happened to them."
        [/message]
    [/event]
    [event]
        name=turn 18

        {SCROLL_TO 7 4}
        [lift_fog]
            [filter_side]
                side=1,2
            [/filter_side]
            x,y=7,4
            radius=5
        [/lift_fog]

        [message]
            speaker=Archarel
            message= _ "Something about these woods seems quite unnatural. Perhaps we should stop sending our soldiers this way."
        [/message]
    [/event]

#define DEFEAT_TEXT
    {SCROLL_TO 7 4}
    [lift_fog]
        [filter_side]
            side=1,2
        [/filter_side]
        x,y=7,4
        radius=5
    [/lift_fog]

    [message]
        speaker=Archarel
        message= _ "Troops, to arms! Show these fugitive scum the meaning of the Queen’s law!"
    [/message]
    [message]
        speaker=Helicrom
        message= _ "With the outpost aware of our presence, we can no longer harry their reinforcements. Their forces will soon grow too powerful for us to resist."
    [/message]
#enddef

    #
    # End condition: turns run out
    #
    [event]
        name=time over
        [if]
            [have_unit]
                side=3
            [/have_unit]
            [then]
                [message]
                    speaker=narrator
                    message= _ "The next morning, the local night patrol returned to the nearby outpost. They were surprised to see their fellow soldiers engaged in combat with the band of thugs of which they had heard so much."
                    image="wesnoth-icon.png"
                [/message]

                {DEFEAT_TEXT}

                [endlevel]
                    result=defeat
                [/endlevel]
            [/then]
            [else]
                [fire_event]
                    name=win event
                [/fire_event]
            [/else]
        [/if]
    [/event]

    #
    # End condition: last patrol defeated
    #
    [event]
        name=die

        [filter_condition]
            [have_unit]
                side=3
                count=0
            [/have_unit]
            [and]
                [variable]
                    name=turn_number
                    greater_than=20
                [/variable]
            [/and]
        [/filter_condition]

        [fire_event]
            name=win event
        [/fire_event]
    [/event]

    #
    # Victory event
    #
    [event]
        name=win event

        [if]
            {VARIABLE_CONDITIONAL losses boolean_equals false}
            [then]
                [set_achievement]
                    content_for=liberty
                    id="liberty_hunter"
                [/set_achievement]
            [/then]
        [/if]

        [message]
            speaker=Baldras
            message= _ "It be done. Their patrols be shattered and broken."
        [/message]

        [message]
            speaker=Helicrom
            message= _ "Well done, but the fight is far from over. We will not be able to employ these tactics when more platoons arrive. You must make your choice. Will you fight? Or will you return to your village and beg for amnesty?"
        [/message]

        [message]
            speaker=Baldras
            message= _ "Amnesty? Knowing these Wesnothians, they’ll have my head. Then again, if I could gives my life to save my whole village, I would."
        [/message]

        [message]
            speaker=Harper
            message= _ "We need you! Uncle..."
        [/message]

        [message]
            speaker=Baldras
            message= _ "I know what you is going to say, Harper. That we should be fighting for our homes, just like we do against them orcs. But we be risking everything on this, lass."
        [/message]

        [message]
            speaker=Harper
            message= _ "If we go back like this, that means we’ll surrender to them Wesnothians and live our whole lives in oppression. You saw how they were sending so many soldiers and even orcs against us."
        [/message]

        [message]
            speaker=Helicrom
            message= _ "The girl is naive, but her spirit is in the right place. You risk your homes and the lives of your people, yes, but what good will they be if you live in tyranny? Believe me, I have been there. I would rather die than go back."
        [/message]

        [message]
            speaker=Baldras
            message= _ "Yes... Erwen would’ve said the same. If we march on Halstead, we gots to burn it to the ground before the Queen’s forces rally. If we does that, Weldyn won’t have no foothold in Annuvin no more."
        [/message]

        [message]
            speaker=Helicrom
            message= _ "It would be months before they could reassemble their forces here. Enough time for you to secure your homes, or relocate."
        [/message]

        [message]
            speaker=Baldras
            message= _ "Then it be decided. We’ll attack the fort together. Luck be with us."
        [/message]

        [modify_unit]
            [filter]
                side=2
            [/filter]
            side=1
        [/modify_unit]

        {CLEAR_VARIABLE has_key}
        {CLEAR_VARIABLE losses}

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

    #
    # Loss conditions
    #
    [event]
        name=moveto
        [filter]
            side=3
            x=1-10
            y=1-6
        [/filter]

        [lift_fog]
            [filter_side]
                side=1,2
            [/filter_side]
            x,y=7,4
            radius=5
        [/lift_fog]

        [message]
            speaker=unit
            message= _ "Lieutenant, we were assaulted by a band of outlaws en route to the outpost. We were barely able to evade them and make it here!"
        [/message]

        {DEFEAT_TEXT}

        [endlevel]
            result=defeat
        [/endlevel]
    [/event]
    [event]
        name=sighted
        [filter]
            side=1,2
        [/filter]
        [filter_second]
            side=4
        [/filter_second]

        [message]
            speaker=second_unit
            message= _ "Look there! Outlaws and bandits roam these woods, harrying our patrols!"
        [/message]

        {DEFEAT_TEXT}

        [endlevel]
            result=defeat
        [/endlevel]
    [/event]

    [event]
        name=last breath
        [filter]
            id=Helicrom
        [/filter]
        [message]
            speaker=Helicrom
            message= _ "This is the end for me..."
        [/message]
        [endlevel]
            result=defeat
        [/endlevel]
    [/event]

    {LIBERTY_DEATHS}
[/scenario]

#undef TROOPER
#undef DEFEAT_TEXT
