#textdomain wesnoth-nr

# Note – for prose & events there are three states:
# eryssa_hostile is yes
# eryssa_hostile is no (as string, not as boolean!)
# eryssa_hostile is unset, checked using [have_unit]id=Eryssa

[scenario]
    id=10a_Stolen_Gold
    name= _ "Stolen Gold"
    map_file=10a_Stolen_Gold.map
    turns=36
    next_scenario=11a_The_Eastern_Flank
    victory_when_enemies_defeated=yes

    {DEFAULT_SCHEDULE}

    {INTRO_AND_SCENARIO_MUSIC "the_king_is_dead.ogg" "northerners.ogg"}
    {EXTRA_SCENARIO_MUSIC     "frantic.ogg"}
    {EXTRA_SCENARIO_MUSIC     "casualties_of_war.ogg"}
    {EXTRA_SCENARIO_MUSIC     "knolls.ogg"}

    # Story with few branches depending on whether Eryssa is alive and hostile
    # towards the Alliance.
    # wmllint: recognize Eryssa
    # wmllint: local spelling priss
    [story]
        [part]
            story= _ "Puzzled by the presence of trolls so close to the dwarvish defenses, the party quickly made their way back to Knalga."
            {NR_BIGMAP}
            {RECOVERY_STAGE3}
            music=sad.ogg
        [/part]
        [part]
            story= _ "Upon arriving there something seemed to be wrong. Instead of being boisterously hailed by the dwarves as before, they were met by silent guards with downcast eyes."
        [/part]
        [part]
            story= _ "Fearing the worst, Tallin rushed to find Hamel."
        [/part]

        {STORY_PART_TALLIN (_ "Hamel, what is wrong?! Why is everyone acting so strangely?")}

        {STORY_PART_HAMEL (_ "We are deeply ashamed of ourselves, Tallin. We ha’ failed the trust that ye gave us.")}

        {STORY_PART_TALLIN (_ "What do you mean?")}

        {STORY_PART_HAMEL (_ "Yer gold, Tallin, we failed to protect it.")}

        {STORY_PART_TALLIN (_ "My gold!? Why, what happened? Start from the beginning.")}

        {STORY_PART_HAMEL (_ "No sooner had ye left then the orcs once again launched a massive assault.")}

        {STORY_PART_HAMEL (_ "Such a massive and fierce assault it was that we had to call upon all our reserves. When that proved insufficient, we had nae other choice then to call some dwarves off the other defenses.")}

        {STORY_PART_HAMEL (_ "It was a ploy. Nae sooner than we ha’ thinned the ranks of the northern defenders, a small force of trolls smashed through the defenses and made their way straight for your gold.")}

        {STORY_PART_HAMEL (_ "We beat them back, but not before they made off with your entire stock of gold.")}

        {STORY_PART_HAMEL (_ "I am sorry, Tallin, we did all that we could. I would we could ha’ done more.")}

        {STORY_PART_TALLIN (_ "Oh no! Rakshas will raise many troops with that gold!")}

        {STORY_PART_HAMEL (_ "Aye. Well I ken it, Tallin.")}

        [switch]
            variable=eryssa_hostile
            [case]
                value=yes

                {STORY_PART_ERYSSA (_ "See, you wretched human! At least now you will appreciate the generosity of the elves.")}

                {STORY_PART_ARTHIAN (_ "Shut up, you little snot! If it wasn’t for you we wouldn’t have lost our gold in the first place!")}

                {STORY_PART_ERYSSA (_ "I wasn’t talking to you, lich! Learn to keep your mouth shut.")}

                {STORY_PART_HAMEL (_ "Who is this annoying chit?")}

                {STORY_PART_TALLIN (_ "This is the famous and benevolent Princess Eryssa, in whose rescue we sacrificed many lives and <i>much</i> gold.")}

                {STORY_PART_ERYSSA (_ "That’s it! I have had enough from you worthless rabble. I will soon send a rider with the promised gold, and in the meantime, I’m leaving!")}

                {STORY_PART_ARTHIAN (_ "Begone and good riddance, brat!")}

                {STORY_PART_TALLIN (_ "Back to the issue of the stolen gold, were you able to pursue the trolls?")}
            [/case]
            [case]
                value=no

                {STORY_PART_TALLIN (_ "Were you able to pursue them?")}
            [/case]
            [else]
                # Eryssa dead

                {STORY_PART_TALLIN (_ "This isn’t looking good. Not only do we fail to get the Princess but now we lost all of our gold! Seriously Hamel, I don’t know if we’re gonna make it.")}

                {STORY_PART_HAMEL (_ "Don’t give in to despair, Tallin. At least you prevented the orcs from getting the ransom money.")}

                {STORY_PART_TALLIN (_ "Yeah, they ran off with all the rest of our gold instead.")}

                {STORY_PART_HAMEL (_ "Snap out of it Tallin! We are not in control of fate. We will do all we can to the best of our ability and leave the results to the gods.")}

                {STORY_PART_TALLIN (_ "You’re right, Hamel, sorry. Were you able to pursue the trolls?")}
            [/else]
        [/switch]

        {STORY_PART_HAMEL (_ "Och, we tried, Tallin, but with the orcs still pressing our southern defenses and trolls trying to break through everywhere, we simply ha’ not the power.")}

        {STORY_PART_TALLIN (_ "How long ago did the trolls make off with the gold?")}

        {STORY_PART_HAMEL (_ "It couldna’ ha’ been more than a day now.")}

        {STORY_PART_TALLIN (_ "Then we shall pursue them. Even if we don’t catch them then we might be able to hit Rakshas before he has had a chance to put that gold to good use.")}

        {STORY_PART_TALLIN (_ "Hamel, rally the dwarves and prepare to make an all-out offensive against the orcs. It’s time to give them some of their own.")}

        {STORY_PART_TALLIN (_ "We will follow the trail of the trolls; it should lead us back to Rakshas.")}

        [if]
            [variable]
                name=eryssa_hostile
                equals=no
            [/variable]
            [then]
                {STORY_PART_TALLIN (_ "Eryssa, what news of the elves?")}

                {STORY_PART_ERYSSA (_ "Our gryphons have reached them. They are no more than a few days march from us.")}

                {STORY_PART_ERYSSA (_ "I will send another message to them asking them to send out scouts to locate the trolls who took your gold. Mayhap the elves will be able to get between the trolls and their allies.")}
            [/then]
            [else]
                {STORY_PART_HAMEL (_ "It is well thought. May the Bright Gods be with you.")}
            [/else]
        [/if]

        {STORY_PART_TALLIN (_ "So it shall be. Hamel, when I make contact with the orcs I’ll send you a message. When you get it, come at all speed. It is near time for the battle that will decide all.")}

        {STORY_PART_HAMEL (_ "The axes and hammers o’ every dwarf thirst for the blood of the orcs!")}

        {STORY_PART_TALLIN (_ "All right, let’s move out, people!")}

        [part]
            story= _ "Thus the party set off to the northern tunnels to pursue the trolls."
        [/part]
        [part]
            story= _ "They met but light resistance all along the trail of the trolls, which they quickly overcame."
        [/part]
        [part]
            story= _ "Soon, the trail began to lead east, and then south. A few hours later the party emerged from the tunnels into dawn’s early light."
        [/part]
    [/story]

    {NR_TRACK {RECOVERY_STAGE4}}

    # Players side
    # wmllint: validate-off
    [side]
        side=1
        controller=human
        recruit=Thug,Poacher,Spearman,Bowman,Gryphon,Dwarvish Fighter,Dwarvish Thunderer,Dwarvish Ulfserker,Dwarvish Scout,Footpad
        gold=200
        team_name=alliance
        user_team_name= _ "Alliance"

        # wmllint: recognize Tallin
        {CHARACTER_STATS_TALLIN}
    [/side]
    # wmllint: validate-on

    # Opposing AIs, pretty developed [ai] tag causes them to act stupid,
    # aggressive, ignore villages, and target Tallin
#define SG_STUPID_TROLL_AI
    [ai]
        simple_targeting=yes
        aggression=1.0
        caution=-5.0
        village_value=0.0
        leader_value=50.0
        villages_per_scout=0
        recruitment_pattern=fighter,fighter,mixed fighter

        [goal]
            name=target
            [criteria]
                id=Tallin
            [/criteria]
            value=500
        [/goal]
    [/ai]
#enddef

    # Troll sides
    [side]
        side=2
        controller=ai
        recruit=Troll Whelp,Troll,Troll Rocklobber
        {GOLD 500 600 700}
        {INCOME 10 20 25}
        team_name=trolls
        user_team_name= _ "Trolls"

        type=Troll Warrior
        id=Tor
        name= _ "Tor"
        canrecruit=yes

        {SG_STUPID_TROLL_AI}
    [/side]

    [side]
        side=3
        controller=ai
        recruit=Troll Whelp,Troll,Troll Rocklobber
        {GOLD 500 600 700}
        {INCOME 10 20 25}

        team_name=trolls
        user_team_name= _ "Trolls"

        type=Troll Hero
        id=Bor
        name= _ "Bor"
        canrecruit=yes

        {SG_STUPID_TROLL_AI}
    [/side]

    [side]
        side=4
        controller=ai
        recruit=Troll Whelp,Troll,Troll Rocklobber
        {GOLD 500 600 700}
        {INCOME 10 20 25}
        team_name=trolls
        user_team_name= _ "Trolls"

        type=Troll Rocklobber
        id=Oof
        name= _ "Oof"
        canrecruit=yes

        {SG_STUPID_TROLL_AI}
    [/side]

    [side]
        side=5
        controller=ai
        recruit=Troll Whelp,Troll,Troll Rocklobber
        {GOLD 500 600 700}
        {INCOME 10 20 25}
        team_name=trolls
        user_team_name= _ "Trolls"

        type=Troll Hero
        profile=portraits/trolls/troll-hero-alt.webp
        id=Glu
        name= _ "Glu"
        canrecruit=yes

        {SG_STUPID_TROLL_AI}
    [/side]

    # Side for arriving elves, no leader, but gold and recruit list since Hindel can recruit
    [side]
        side=6
        controller=ai
        recruit=Elvish Fighter,Elvish Archer,Elvish Shaman,Elvish Scout
        {GOLD 250 200 150}
        team_name=alliance
        user_team_name= _ "Alliance"
        no_leader=yes
        hidden=yes
        {FLAG_VARIANT wood-elvish}
    [/side]

    # Side for Krash, no leader but gold and recruit lits since Krash will be able to recruit
    [side]
        side=7
        controller=human
        save_id=Krash
        side_name= _ "Krash"
        recruit=Drake Fighter,Drake Glider,Drake Burner,Drake Clasher
        {GOLD 250 200 150}
        team_name=alliance
        user_team_name= _ "Alliance"
        no_leader=yes
        hidden=yes
        # Krash's color
        color=orange
        {FLAG_VARIANT long}
    [/side]

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

    [event]
        name=prestart

        [if]
            [variable]
                name=eryssa_hostile
                equals=yes
            [/variable]

            [then]
                [kill]
                    id=Eryssa
                    fire_event=no
                [/kill]
            [/then]
        [/if]

        {RECALL_SUPPORTER}

        {RECALL_OR_REPLACE id=Abhai}

        {RECALL_OR_REPLACE id=Camerin}

        [recall]
            id=Father Morvin
        [/recall]

        [recall]
            id=Sister Thera
        [/recall]

        {RECALL_OR_REPLACE id=Krash}

        {RECALL_OR_REPLACE id=Elenia}

        {RECALL_OR_REPLACE id=Eryssa}

        {RECALL_OR_REPLACE id=Stalrag}

        [recall]
            id="Ro'Arthian"
        [/recall]

        [recall]
            id="Ro'Sothian"
        [/recall]

        # give player extra gold if they do not have krash
        [if]
            [not]
                [have_unit]
                    #wmllint: recognize Krash
                    id=Krash
                [/have_unit]
            [/not]
            [then]
                [gold]
                    side=1
                    amount={ON_DIFFICULTY 150 125 100}
                [/gold]
                [gold]
                    side=2,3,4,5
                    amount={ON_DIFFICULTY -125 -100 -75}
                [/gold]
            [/then]
        [/if]

        [objectives]
            side=1,6,7
            [objective]
                description= _ "Resist for as long as you can"
                condition=win
                show_turn_counter=yes
                [show_if]
                    {VARIABLE_CONDITIONAL must_kill_enemies boolean_equals no}
                [/show_if]
            [/objective]
            [objective]
                {ALTERNATIVE_OBJECTIVE_CAPTION}
                description= _ "Defeat the enemy leaders"
                condition=win
                [show_if]
                    {VARIABLE_CONDITIONAL must_kill_enemies boolean_equals no}
                [/show_if]
            [/objective]
            [objective]
                description= _ "Defeat the enemy leaders"
                condition=win
                [show_if]
                    {VARIABLE_CONDITIONAL must_kill_enemies boolean_equals yes}
                [/show_if]
            [/objective]
            [objective]
                description= _ "Death of Tallin"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Ro’Arthian"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Ro’Sothian"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Eryssa"
                condition=lose
                [show_if]
                    [have_unit]
                        id=Eryssa
                    [/have_unit]
                [/show_if]
            [/objective]
            [objective]
                description= _ "Turns run out"
                condition=lose
                show_turn_counter=yes
                [show_if]
                    {VARIABLE_CONDITIONAL must_kill_enemies boolean_equals yes}
                [/show_if]
            [/objective]

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

    [event]
        name=start

        [message]
            speaker=narrator
            image=wesnoth-icon.png
            message= _ "Upon emerging from the tunnels, the party found themselves surrounded."
        [/message]

        [message]
            speaker=Tor
            message= _ "Haha, suckers! We got you now!"
        [/message]

        [message]
            speaker=Bor
            message= _ "Hahaha! They walked right into our trap."
        [/message]

        [message]
            speaker=Glu
            message= _ "And we have already sent the gold ahead to the Master!"
        [/message]

        [message]
            speaker=Oof
            message= _ "Now let’s make mush out of these puny creatures!"
        [/message]

        [message]
            role=Supporter
            message= _ "Oh no, we are surrounded!"
        [/message]

        [message]
            speaker=Tallin
            # po: This is an approximate quote from an Anglo-Saxon heroic poem
            # po: the Lay of Beorthnoth. Translate appropriately.
            message= _ "Courage shall be the harder, heart the keener, and our spirit greater as our strength lessens. Kill them all!"
        [/message]

        [message]
            #wmllint: recognize Camerin
            speaker=Camerin
            # wmllint: local spelling Yeeahhh
            message= _ "Yeeahhh! I like it!"
        [/message]
    [/event]

    # Turn 2 - Krash smells other drakes and leaves. If he's alive at this point.
    [event]
        name=turn 2
        [filter_condition]
            [have_unit]
                id=Krash
            [/have_unit]
        [/filter_condition]

        [message]
            speaker=Krash
            message= _ "(<i>Sniff sniff</i>)"
        [/message]

        [message]
            speaker=Camerin
            message= _ "What’s up big guy?"
        [/message]

        [message]
            speaker=Krash
            message= _ "(<i>Flap flap flap</i>)"
        [/message]

        [store_unit]
            [filter]
                id=Krash
            [/filter]
            variable=krash_flies_away
            kill=yes
        [/store_unit]

        {VARIABLE krash_flies_away.side 7}
        {VARIABLE krash_flies_away.x    3}
        {VARIABLE krash_flies_away.y    15}
        {VARIABLE krash_flies_away.canrecruit yes}

        [move_unit_fake]
            type=$krash_flies_away.type
            side=7
            x=13,12,11,10,9,8,7,6,5,4,3,2,1
            y=15,15,15,15,15,15,15,15,15,15,15,15,15
        [/move_unit_fake]

        [message]
            role=Supporter
            message= _ "Hey! Where is he going?"
        [/message]

        [message]
            speaker=Camerin
            message= _ "Krash man, you’re gonna miss all the fun!"
        [/message]

        [message]
            speaker=Father Morvin
            message= _ "I think he has decided that it is time to part ways with us."
        [/message]

        [message]
            speaker=Tallin
            message= _ "Such a fierce yet gentle creature. He will be sorely missed."
        [/message]

        [message]
            speaker=Sister Thera
            message= _ "Farewell, Krash, may the Lords of Light guide your path."
        [/message]
    [/event]

    # Turn 7 - Krash gets back. With friends. If he was alive earlier that is.
    [event]
        name=turn 7
        [filter_condition]
            [variable]
                name=krash_flies_away.length
                equals=1
            [/variable]
        [/filter_condition]

        [modify_side]
            side=7
            hidden=no
        [/modify_side]

        [move_unit_fake]
            type=$krash_flies_away.type
            side=7
            x=1,2
            y=15,14
        [/move_unit_fake]

        [unstore_unit]
            variable=krash_flies_away
            find_vacant=yes
        [/unstore_unit]

        {CLEAR_VARIABLE krash_flies_away}

        # Remove loyalty overlay
        [remove_unit_overlay]
            id=Krash
            image=misc/loyal-icon.png
        [/remove_unit_overlay]

        # Give expendable overlay
        [unit_overlay]
            id=Krash
            image=misc/leader-expendable.png
        [/unit_overlay]

        [move_unit_fake]
            type=Drake Burner
            side=7
            x=1,2
            y=14,13
        [/move_unit_fake]

        [unit]
            type=Drake Burner
            side=7
            id=Singe
            name= _ "Singe"
            x,y=3,14
            [modifications]
                {TRAIT_LOYAL}
                {TRAIT_RESILIENT}
            [/modifications]
        [/unit]

        [move_unit_fake]
            type=Drake Fighter
            side=7
            x=1,2
            y=16,15
        [/move_unit_fake]

        [unit]
            type=Drake Fighter
            id="Bak'man"
            name= _ "Bak’man"
            side=7
            x,y=3,15
            [modifications]
                {TRAIT_LOYAL}
                {TRAIT_STRONG}
            [/modifications]
        [/unit]

        [message]
            speaker=Sister Thera
            message= _ "Hey! Look who’s back!"
        [/message]

        [message]
            role=Supporter
            message= _ "And look, he brought his friends too!"
        [/message]

        [message]
            speaker="Bak'man"
            message= _ "GRRRR!" # wmllint: no spellcheck
        [/message]

        [message]
            speaker=Singe
            message= _ "ROOAARRR!!" # wmllint: no spellcheck
        [/message]

        [message]
            speaker=Krash
            message= _ "Hurry, friends, let’s set up camp!"
        [/message]

        [message]
            speaker=Camerin
            message= _ "Yeah, man! I knew we could count on you!"
        [/message]

        [message]
            speaker=Father Morvin
            message= _ "Hmmm, he must have smelled the scent of other drakes and gone to them to convince them to help us."
        [/message]

        [message]
            speaker=Sister Thera
            message= _ "Awww, what a darling!"
        [/message]

        [message]
            role=Supporter
            message= _ "Tell that to the trolls."
        [/message]

        [message]
            id=Oof,Tor
            message= _ "What?! Drakes?! Fire! Aagghh!"
        [/message]

        [message]
            id=Glu,Bor
            message= _ "Shut your mouth, you coward!"
        [/message]

        [terrain]
            x,y=3,15
            terrain=Ke
        [/terrain]

        [terrain]
            x=3,3,2,4,4
            y=14,16,15,15,14
            terrain=Ce
        [/terrain]

        [objectives]
            side=6,7
            [objective]
                description= _ "Resist for as long as you can"
                condition=win
                show_turn_counter=yes
                [show_if]
                    {VARIABLE_CONDITIONAL must_kill_enemies boolean_equals no}
                [/show_if]
            [/objective]
            [objective]
                {ALTERNATIVE_OBJECTIVE_CAPTION}
                description= _ "Help Tallin defeat the enemy leaders"
                condition=win
                [show_if]
                    {VARIABLE_CONDITIONAL must_kill_enemies boolean_equals no}
                [/show_if]
            [/objective]
            [objective]
                description= _ "Help Tallin defeat the enemy leaders"
                condition=win
                [show_if]
                    {VARIABLE_CONDITIONAL must_kill_enemies boolean_equals yes}
                [/show_if]
            [/objective]
            [objective]
                description= _ "Death of Tallin"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Ro’Arthian"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Ro’Sothian"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Eryssa"
                condition=lose
                [show_if]
                    [have_unit]
                        id=Eryssa
                    [/have_unit]
                [/show_if]
            [/objective]
            [objective]
                description= _ "Turns run out"
                condition=lose
                show_turn_counter=yes
                [show_if]
                    {VARIABLE_CONDITIONAL must_kill_enemies boolean_equals yes}
                [/show_if]
            [/objective]

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

    # Elven reinforcements or gold arrive.
    [event]
        name=turn 18
        [filter_condition]
            [have_unit]
                id=Eryssa
            [/have_unit]
        [/filter_condition]

        [modify_side]
            side=6
            hidden=no
        [/modify_side]

        [unit]
            id=Hidel
            type=Elvish Marshal
            name= _ "Hidel"
            profile=portraits/Hidel.webp
            canrecruit=yes
            x,y=30,15
            side=6
        [/unit]
        {MOVE_UNIT id=Hidel 28 15}

        {GENERIC_UNIT 6 "Elvish Fighter" 30 14}
        {MOVE_UNIT x,y=30,14 28 14}

        {GENERIC_UNIT 6 "Elvish Fighter" 30 13}
        {MOVE_UNIT x,y=30,13 28 13}

        {GENERIC_UNIT 6 "Elvish Archer" 30 16}
        {MOVE_UNIT x,y=30,16 28 16}

        {GENERIC_UNIT 6 "Elvish Shaman" 30 15}
        {MOVE_UNIT x,y=30,15 29 16}

        [message]
            speaker=Hidel
            message= _ "Your Highness! We have finally found you!"
        [/message]

        [message]
            speaker=Eryssa
            message= _ "Good work, Hidel! How do your forces march?"
        [/message]

        [message]
            speaker=Hidel
            message= _ "They are all here, my lady! Hand picked by your father — the finest and bravest elvish troops in the entire Northlands. We will follow you to the end of the world if need be."
        [/message]

        [message]
            speaker=Eryssa
            message= _ "Very good. Our first task is to give brave Tallin here full support."
        [/message]

        [message]
            speaker=Hidel
            message= _ "With pleasure! Quickly, set up a base!"
        [/message]

        [terrain]
            x,y=28,15
            terrain=Ke
        [/terrain]

        [terrain]
            x=28,28,29,27,27
            y=14,16,16,16,15
            terrain=Ce
        [/terrain]

        [message]
            id=Oof,Glu,Tor
            message= _ "Oh no! Those blasted elves have joined forces with the humans! This is hopeless! Flee! Flee!"
        [/message]

        [message]
            speaker=Tallin
            message= _ "Hmmm, should we let the trolls run away or should we finish them now?"
            [option]
                label= _ "Hey! Stand your ground, you cowards!"
                [command]
                    [message]
                        speaker=Bor
                        message= _ "You are a fool, human! We shall crush and destroy you!"
                    [/message]

                    {VARIABLE must_kill_enemies yes}
                    [show_objectives]
                    [/show_objectives]
                [/command]
            [/option]
            [option]
                label= _ "Haha! Look at them run!"
                [command]
                    [endlevel]
                        result=victory
                        bonus=yes
                        {NEW_GOLD_CARRYOVER 40}
                    [/endlevel]
                [/command]
            [/option]
        [/message]
    [/event]

    [event]
        name=turn 18
        [filter_condition]
            [variable]
                name=eryssa_hostile
                equals=yes
            [/variable]
        [/filter_condition]

        [fire_event]
            name=elvish money
        [/fire_event]

        [message]
            id=Oof,Glu,Tor
            message= _ "Oh no! The elves have given the humans a hoard of gold! This is hopeless! Flee! Flee!"
        [/message]

        [message]
            speaker=Tallin
            message= _ "Hmmm, should we let the trolls run away or should we finish them now?"
            [option]
                label= _ "Hey! Stand your ground, you cowards!"
                [command]
                    [message]
                        speaker=Bor
                        message= _ "You are a fool, human! We will crush and destroy you!"
                    [/message]

                    {VARIABLE must_kill_enemies yes}
                    [show_objectives]
                    [/show_objectives]
                [/command]
            [/option]
            [option]
                label= _ "Haha! Look at them run!"
                [command]
                    [endlevel]
                        result=victory
                        bonus=yes
                        {NEW_GOLD_CARRYOVER 40}
                    [/endlevel]
                [/command]
            [/option]
        [/message]
    [/event]

    [event]
        name=elvish money

        [move_unit_fake]
            type=Elvish Outrider
            side=6
            x=30,29,28
            y=15,15,15
        [/move_unit_fake]

        [unit]
            id=Himadrin
            type=Elvish Outrider
            name= _ "Himadrin"
            x,y=28,15
            side=6
        [/unit]

        [message]
            speaker=Himadrin
            message= _ "Which one of you rabble is Tallin?"
        [/message]

        [message]
            speaker=Tallin
            message= _ "I am."
        [/message]

        [message]
            speaker=Himadrin
            message= _ "Princess Eryssa sends you this gold along with the order to stay clear of any Northern Elf if you know what’s good for you."
        [/message]

        [message]
            speaker=Tallin
            message= _ "Why? What did I ever do to the Northern Elves?"
        [/message]

        [message]
            speaker=Himadrin
            message= _ "The ill treatment that she received while in your care is an insult to every Northern Elf. Consequently if you, or any of your henchmen show your face around us ever again, you will be shot on sight."
        [/message]

        [gold]
            amount=1500
            side=1
        [/gold]

        [message]
            speaker=Tallin
            message= _ "Tell the Princess to get off her high horse and stop acting like such a priss!"
        [/message]

        [message]
            speaker=Himadrin
            message= _ "You dare insult our princess!"
        [/message]

        [message]
            speaker="Ro'Arthian"
            message= _ "You better get lost, elf, before we kill you."
        [/message]

        [message]
            speaker=Himadrin
            message= _ "This insult will forever be remembered by the Northern Elves! The day will soon come when your race shall regret your folly!"
        [/message]

        [kill]
            id=Himadrin
        [/kill]

        [move_unit_fake]
            type=Elvish Outrider
            side=6
            x=28,29,30
            y=15,15,15
        [/move_unit_fake]

        [message]
            speaker=Camerin
            # wmllint: local spelling Pff,
            message= _ "Pff, elves. What a bunch of stuck-up snots!"
        [/message]
    [/event]

    # Ensure correct carryover if all enemy leaders are defeated
    [event]
        name=enemies defeated

        {CLEAR_VARIABLE must_kill_enemies}

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

    # Victory, Eryssa is allied
    [event]
        name=victory
        [filter_condition]
            [have_unit]
                id=Eryssa
            [/have_unit]
        [/filter_condition]

        [if]
            [variable]
                name=turn_number
                greater_than_equal_to=18
            [/variable]
            [then]
                [message]
                    speaker=Tallin
                    message= _ "Phew, they are defeated at last."
                [/message]

                [message]
                    speaker=Eryssa
                    message= _ "Hidel, let me introduce to you my savior: Tallin."
                [/message]

                [message]
                    speaker=Hidel
                    message= _ "It is an honor to meet you, Tallin."
                [/message]

                [message]
                    speaker=Tallin
                    message= _ "The honor is mine, sir."
                [/message]

                [message]
                    speaker=Hidel
                    message= _ "We have heard much of your intelligence and courage. The number of humans over the centuries who have earned the respect and admiration of the Northern Elves are extremely few, but let it be known that you are one of them."
                [/message]

                [message]
                    speaker=Tallin
                    message= _ "I am honored, sir, and I hope that I will live up to the trust that the Northern Elves have bestowed upon me."
                [/message]

                [message]
                    speaker=Hidel
                    message= _ "I am sure you will, Tallin. The trust of the elves is seldom misplaced."
                [/message]

                [message]
                    speaker="Ro'Arthian"
                    message= _ "If you lot are quite finished exchanging pleasantries..."
                [/message]

                [message]
                    speaker="Ro'Sothian"
                    message= _ "(<i>Snicker</i>)"
                [/message]

                [message]
                    speaker="Ro'Arthian"
                    message= _ "... the road ahead is clear and I am eager to blast some more orcs. Shall we proceed?"
                [/message]

                [message]
                    speaker="Camerin"
                    message= _ "Yeah, let’s get on with it!"
                [/message]

                [message]
                    speaker=Tallin
                    message= _ "Right. Onward, men!"
                [/message]
            [/then]
            [else]
                [unit]
                    id=Hidel
                    type=Elvish Marshal
                    profile=portraits/Hidel.webp
                    name= _ "Hidel"
                    x,y=30,15
                    side=6
                [/unit]

                {MOVE_UNIT id=Hidel 28 15}

                [unit]
                    type=Elvish Avenger
                    x,y=30,14
                    side=6
                    id=Sisal
                    name= _ "Sisal"
                    gender=female
                [/unit]

                {MOVE_UNIT id=Sisal 28 14}

                {GENERIC_UNIT 6 "Elvish Fighter" 30 13}
                {MOVE_UNIT x,y=30,13 28 13}

                {GENERIC_UNIT 6 "Elvish Archer" 30 16}
                {MOVE_UNIT x,y=30,16 28 16}

                {GENERIC_UNIT 6 "Elvish Shaman" 30 15}
                {MOVE_UNIT x,y=30,15 29 16}

                [message]
                    speaker=Hidel
                    message= _ "Your Highness! We have finally found you! Thank the Bright Gods you are free! Your father had originally sent us to rescue you."
                [/message]

                [message]
                    speaker=Eryssa
                    message= _ "Yes, or so I have heard. You honor me, but this brave man reached the mark before you."
                [/message]

                [message]
                    speaker=Hidel
                    message= _ "You must be the famous Tallin."
                [/message]

                [message]
                    speaker=Tallin
                    message= _ "At your service."
                [/message]

                [message]
                    speaker=Hidel
                    message= _ "We have heard much of your intelligence and courage. The number of humans over the centuries who have earned the respect and admiration of the Northern Elves are extremely few, but you are one of them."
                [/message]

                [message]
                    speaker=Tallin
                    message= _ "I am honored, sir, and I hope that I will live up to the trust that the Northern Elves have bestowed upon me."
                [/message]

                [message]
                    speaker=Hidel
                    message= _ "I am sure you will, Tallin. The trust of the elves is seldom misplaced. Also know that the Northern Enclaves will always be open to you."
                [/message]

                [message]
                    speaker=Tallin
                    message= _ "Thank you, sir."
                [/message]

                [message]
                    speaker=Eryssa
                    message= _ "What is the status of our troops, Hidel?"
                [/message]

                [message]
                    speaker=Hidel
                    message= _ "They are all here, my lady! Hand picked by your father — the finest and bravest elvish troops in the entire Northlands."
                [/message]

                [message]
                    speaker=Eryssa
                    message= _ "Excellent! We shall assist Tallin to the fullest in crushing the orcish host. Not only are we in debt to him but by doing so we will be serving our cause as well as we serve his."
                [/message]

                [message]
                    speaker=Hidel
                    message= _ "As you wish, my lady."
                [/message]

                [message]
                    speaker=Tallin
                    message= _ "Very well, people. The road ahead is clear, onward to victory!"
                [/message]
            [/else]
        [/if]
    [/event]

    # Victory, Eryssa is hostile
    [event]
        name=victory
        [filter_condition]
            [variable]
                name=eryssa_hostile
                equals=yes
            [/variable]
        [/filter_condition]

        # Fire event if it didn't happen in turn 18
        [fire_event]
            name=elvish money
        [/fire_event]
    [/event]

    # Load death events
    {HERODEATH_EVERYONE}
[/scenario]
