#textdomain wesnoth-l
[scenario]
    id=the_hunters
    name= _ "The Hunters"
    next_scenario=glory
    map_data="{campaigns/Liberty/maps/the_hunters.map}"
    victory_when_enemies_defeated=no
    {TURNS 36 31 26}
    {DUSK}
    {FIRST_WATCH}
    {SECOND_WATCH}
    {DAWN}
    {MORNING}
    {AFTERNOON}

    {INTRO_AND_SCENARIO_MUSIC breaking_the_chains.ogg vengeful.ogg}
    {EXTRA_SCENARIO_MUSIC battle.ogg}
    {EXTRA_SCENARIO_MUSIC siege_of_laurelmor.ogg}
    {EXTRA_SCENARIO_MUSIC wanderer.ogg}
    {EXTRA_SCENARIO_MUSIC knalgan_theme.ogg}

    [story]
        [part]
            story= _ "Baldras and his men quickly left the Grey Woods, not entirely convinced of their safety even after eradicating the lich."
        [/part]
        [part]
            story= _ "As they marched, many men and women from the small hamlets peppering the area around Carcyn and the Grey Woods approached the group, asking to join them. The ascent of the Queen had cast an uneasy pall over the citizens of Wesnoth, and some of them were willing to resist it."
        [/part]
        [part]
            story= _ "Knowing they too would be labeled criminals, he reluctantly accepted their help. (Baldras is now able to recruit outlaws.)"
        [/part]
        [part]
            story= _ "Camped at the edge of the forest, they quietly observed substantial troop movements coming from the direction of Aldril, a nearby city, and marching to the northwest. Unsure what to make of it, they debated their next course of action..."
        [/part]
        [part]
            show_title=yes
            {TO_THE_HUNTERS}
        [/part]
    [/story]

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

    [side]
        side=2
        type=Royal Guard
        id=Archarel
        name= _ "Archarel"
        canrecruit=yes
        recruit=Swordsman,Red Mage,Horseman,Bowman,Cavalryman
        {GOLD 100 150 200}
        controller=ai
        [ai]
            recruitment_pattern=mixed fighter,fighter,fighter,archer,scout
            village_value=0
        [/ai]
        team_name=bad_guys
        user_team_name=_"Asheviere"
    [/side]

    [side]
        side=3
        type=Iron Mauler
        id=Linneus
        name= _ "Linneus"
        facing=sw
        canrecruit=yes
        recruit=Heavy Infantryman,Mage,Spearman
        gold=100
        controller=ai
        team_name=bad_guys
        user_team_name=_"Asheviere"
    [/side]

    [event]
        name=prestart

        # {SCATTER_IMAGE (terrain=Gg) 14 scenery/oak-leaning.png}
        {PLACE_IMAGE scenery/rock1.png 12 22}

        [objectives]
            side=1
            [objective]
                description= _ "Kill all enemy forces"
                condition=win
            [/objective]
            [objective]
                description= _ "Death of Baldras"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Harper"
                condition=lose
            [/objective]
            [objective]
                description= _ "Turns run out"
                condition=lose
            [/objective]

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

        #Hide both leaders initially
        [store_unit]
            variable=stored_Archarel
            kill=yes
            [filter]
                id=Archarel
            [/filter]
        [/store_unit]
        [store_unit]
            variable=stored_Linneus
            kill=yes
            [filter]
                id=Linneus
            [/filter]
        [/store_unit]
        #set up units
        [recall]
            id=Harper
        [/recall]
        {NAMED_LOYAL_UNIT 1 Outlaw 30 17 Jingo ( _ "Jingo")}
        {NAMED_LOYAL_UNIT 1 Outlaw 32 17 Majel ( _ "Majel")}
        # wmllint: recognize Jingo
        # wmllint: recognize Majel
    [/event]

    #
    # Starting conversation and actions
    #
    [event]
        name=start

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

        [message]
            speaker=Baldras
            message= _ "The words of Lord Maddock have weighed heavy on me these past few days. It has dawned on me that we can never win. We will never defeat the entire army of Wesnoth. Idiocy! If the noble lord of Elensefar is unwilling to resist the Queen, how should I ever expect to?"
        [/message]
        [message]
            speaker=Harper
            message= _ "What's worse is that she appears to have taken notice. We have counted five platoons of heavy infantry marching towards the garrison in just the last 2 hours."
        [/message]
        [message]
            speaker=Baldras
            message= _ "The garrison. The towers of Halstead are more than a garrison, nephew, they are a fortress. They used to protect this area from the enemies of Wesnoth; I never imagined they would house its enemies."
        [/message]

        {NAMED_LOYAL_UNIT 1 Dragoon 11 1 (Pitcher) ( _ "Pitcher")}
        # wmllint: recognize Pitcher

        {MOVE_UNIT id=Pitcher 20 14}

        [message]
            speaker=Pitcher
            message= _ "(Baldras!)"
        [/message]
        [message]
            speaker=Harper
            message= _ "Uncle, he wears the crest of the Elense. We should answer."
        [/message]
        [message]
            speaker=Baldras
            message= _ "Rider, hush before we are discovered! Come to us, but quietly!"
        [/message]

        {MOVE_UNIT id=Pitcher 28 18}

        [message]
            speaker=Pitcher
            message= _ "Master Baldras, I bring news from the north. During the past week, several patrols have again ventured across the Great River into Annuvin. A man named Relnan opposed them with a small militia. He was victorious."
        [/message]
        [message]
            speaker=Majel
            message= _ "This is surely good news!"
        [/message]
        [message]
            speaker=Pitcher
            message= _ "I am afraid it is not. The Queen is sending a branch of her main field army directly from Weldyn. As soon as they arrive, they will burn every village to the ground. No one will live."
        [/message]
        [message]
            speaker=Baldras
            message= _ "The troop movements all make sense now. We must stop this army from reaching the garrison. We cannot swallow them whole, but we can gnaw away at them. They mustn't take one step without us being there to harass and delay them. When they reach Halstead they must be exhausted or dying."
        [/message]
        [message]
            speaker=Harper
            message= _ "You just said we can't beat their entire army!"
        [/message]
        [message]
            speaker=Baldras
            message= _ "Do you propose surrender? It's this or nothing. All we can do is see it through to the end."
        [/message]
        [message]
            speaker=Pitcher
            message= _ "May you prevail in peace and war. I must depart before I am seen so far from my Lord's borders."
        [/message]

        {MOVE_UNIT id=Pitcher 20 14}

        [kill]
            id=Pitcher
        [/kill]

        [message]
            speaker=Jingo
            message= _ "Another platoon approaches..."
        [/message]

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

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

        {TROOPER "Heavy Infantryman" 35 23}
        {TROOPER "Heavy Infantryman" 35 24}

#ifdef EASY
        {TROOPER "Heavy Infantryman" 34 22}
#else
        {TROOPER "Shock Trooper"     34 22}
#endif

        {TROOPER "Heavy Infantryman" 36 24}

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

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

        [message]
            speaker=Baldras
            message= _ "When we are done, no one will fear the open roads and night sky more than the army of the usurper. Strike fast, strike silently... and leave no one alive."
        [/message]
    [/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! Hold your ground!"
        [/message]
    [/event]

    #
    # Special Event - after 4 turns, the outpost detachment returns to fight you
    #
    [event]
        name=turn 4
        [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]
        [unstore_unit]
            variable=stored_Archarel
        [/unstore_unit]
        [message]
            speaker=Archarel
            message= _ "Troops, to arms! These peasant scum think they are above the law. We will show them the law!"
        [/message]
        {CLEAR_VARIABLE stored_Archarel}
    [/event]

    #
    # Special Event - don't step on the fire
    #
    [event]
        name=moveto
        [allow_undo]
        [/allow_undo]
        [filter]
            x,y=31,18
        [/filter]
        [message]
            speaker=unit
            message= _ "Ow! Fire hot! No step in fire!"
        [/message]
    [/event]

    #
    # Victory
    #
    [event]
        name=die
        first_time_only=no
        [filter]
            side=2,3
        [/filter]
        [if]
            [have_unit]
                side=2,3
            [/have_unit]
            [else]
                [message]
                    speaker=Baldras
                    message= _ "What a bloody mess. We must attack Halstead next. If we wait, they will become invincible. If we can burn it to the ground before that happens, our people may have a chance. Rest well tonight, because tomorrow's battle will decide the fate of our homes, our families, and our freedom."
                [/message]

                [if]
                    [variable]
                        name=Helicrom_status
                        numerical_equals=3
                    [/variable]
                    [then]
                        [message]
                            speaker=Baldras
                            message= _ "Send word to Helicrom that we are ready. It is time for him to repay his debt."
                        [/message]
                    [/then]
                [/if]

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

    #
    # Loss conditions - turns run out
    #
    [event]
        name=time over
        [message]
            speaker=Baldras
            message= _ "We have spent too much time here. Surely the entire Wesnoth army marches on our position. We are done for!"
        [/message]
        [endlevel]
            result=defeat
        [/endlevel]
    [/event]

    {ANIMATED_CAMPFIRE 31 18}

    {LIBERTY_DEATHS}

    {VILLAGE_BURNED}
[/scenario]
