#textdomain wesnoth-nr
[scenario]
    # Basic scenario data, music, default time schedule, length
    id=get_gold
    name= _ "Get the Gold"
    map_data="{campaigns/Northern_Rebirth/maps/get_the_gold.map}"
    {DEFAULT_SCHEDULE}
    {TURNS4 40 35 30 25}
    next_scenario=Showdown

    {INTRO_AND_SCENARIO_MUSIC "revelation.ogg" "breaking_the_chains.ogg"}
    {EXTRA_SCENARIO_MUSIC "elvish-theme.ogg"}
    {EXTRA_SCENARIO_MUSIC "the_king_is_dead.ogg"}

    # Story
    # wmllint: local spelling Angthurim

    [story]
        [part]
            story= _ "After reducing Castle Angthurim, the party set off after Rakshas, hoping that Hidel's elves had been able to hold him."
            music=sad.ogg
        [/part]
        [part]
            story= _ "Orcs are heavy-footed creatures; Rakshas's trail was readily followed. But an ominous silence, broken only by the cawing of ravens, brooded over the road he had taken."
        [/part]
        [part]
            story= _ "Soon they encountered the wrack of a great battle. Bodies of elves and orcs lay everywhere. Broken weapons and smashed armor were strewn about in profusion. Elvish arrows and orcish crossbow bolts bristled from the nearby trees. The ground was splotched red with blood."
        [/part]
        [part]
            story= _ "They paused for scant minutes to bind the wounds of a few surviving elves and leave them a small guard. Then they pressed onward to rescue Hidel - and they found him."
        [/part]
        [part]
            story= _ "Scattered around Hidel were the bodies of at least three orcish warlords, and nearly a score of grunts, warriors and crossbowmen. His weapons were notched and broken; his armor dented and smashed. It was clear to all that his fall had been an epic of valor and glory, worthy to be remembered in the songs of all the kindred races until the end of days."
            music=heroes_rite.ogg
        [/part]
        [part]
            story= _ "With tears streaming down her face, Eryssa approached the fallen hero and cradled his head in her lap. As she stroked his face, his eyes fluttered open."
        [/part]
        [part]
            story= _ "I am sorry, princess... We held him for... as long as we could... but his bodyguards... were... just too many and powerful... And then... the orcish... reinforcements arrived...."
            background=portraits/Hidel.png
        [/part]
        [part]
            story= _ "Her face streaked with tears, Eryssa gazed imploringly at Father Morvin and Sister Thera. They simply sighed and shook their heads. It was too late to save Hidel. In a broken voice Eryssa addressed him:"
        [/part]
        [part]
            story= _ "Hidel, I am sorry. I have sent you to your death, and I grieve."
            background=portraits/Eryssa.png
        [/part]
        [part]
            story= _ "...Don't tax yourself... princess.... I have died.... a warrior's death.... you should be proud...."
            background=portraits/Hidel.png
        [/part]
        [part]
            story= _ "...But.... there is.... one thing.... we.... could do. We .... managed to.... recover the gold...Sisal... took it and.... retreated south...."
            background=portraits/Hidel.png
        [/part]
        [part]
            story= _ "I held out as.... long as.... I could.... but they..... defeated us.... Rakshas went.... east and the.... rest.... went.... after.... Sisal..."
            background=portraits/Hidel.png
        [/part]
        [part]
            story= _ "Now... uphold the honor... of the Northern... Elves.... recover.... the gold.... slay this monster.... and bring peace and... prosperity.... back to the... Northlands... Tallin?"
            background=portraits/Hidel.png
        [/part]
        [part]
            story= _ "At Hidel's call Tallin approached and knelt beside Hidel, bowing his head in respect."
        [/part]
        [part]
            story= _ "At your service, sir."
            background=portraits/Tallin.png
        [/part]
        [part]
            story= _ "Eryssa has been... my charge ever... since she was born.... I now return... to the earth... from which.... I sprang... Please take care... of her."
            background=portraits/Hidel.png
        [/part]
        [part]
            story= _ "Rest assured, sir, I will place myself between Eryssa and any ill that strength or love may counter."
            background=portraits/Tallin.png
            music=love_theme.ogg
        [/part]
        [part]
            story= _ "Thank you... Tallin.... Now I may rest... in... peace.... May you.... be victorious..."
            background=portraits/Hidel.png
        [/part]
        [part]
            story= _ "With these words Hidel closed his eyes and breathed his last. As Eryssa wept with Hidel's head in her lap, Tallin approached her, hesitating, and then wrapped her gently in his arms."
        [/part]
        [part]
            story= _ "Sobbing against Tallin's chest, Eryssa told him of the many ways Hidel had cherished and warded her since the hour of her birth. How he had comforted her childhood hurts; how in later years, he had guided her in the green paths of the forest, and taught her the deep mysteries of Elven-kind."
        [/part]
        [part]
            story= _ "A torrent of childhood memories and the depth of her grief left her unable to speak. She and Tallin sat together silently holding each-other for some time."
        [/part]
        [part]
            story= _ "As Tallin comforted Eryssa, the rest of the party spread out and rallied the scattered elves, and tending to the wounded. This being done, they once again came before Tallin and Eryssa."
        [/part]
        [part]
            story= _ "Princess...it is a hard thing, I know, but you must put your grief behind you. Or at least, put it aside for a little while. We must go quickly to the aid of Sisal and recover our gold."
            background=portraits/Father_Morvin.png
        [/part]
        [part]
            story= _ "Forge your sorrow into rage, girl, and visit it on the slayers of your kinsmen. Teach them what happens to those who make an enemy of an elf."
            background=portraits/Arthian.png
        [/part]
        [part]
            story= _ "At these words, Eryssa arose and wiped away her tears. She took command of the surviving elvish forces, for all knew she was a princess of high rank and looked to Hidel's ward as their leader by right. Scarcely a face among them was less grim than her own as they took arms and started down Rakshas's back-trail."
            music=vengeful.ogg
        [/part]
        [part]
            story= _ "Moments later a gryphon swooped down from overhead and reported battle in a forest just a few leagues south of their position. The remainder of the elvish forces had been espied fighting a desperate battle with the orcs."
        [/part]
        [part]
            story= _ "It seemed to the gryphon that the elves were sore beset. The party quickly turned south and plunged into the forest."
            show_title=yes
            {TO_GET_THE_GOLD}
        [/part]
    [/story]

    # Players side - Tallin
    [side]
        type=Lieutenant
        id=Tallin
        name=_ "Tallin"
        canrecruit=yes
        side=1
        controller=human
        recruit=Peasant,Woodsman,Thug,Poacher,Spearman,Bowman,Dwarvish Fighter,Dwarvish Thunderer,Dwarvish Ulfserker,Dwarvish Scout,Gryphon,Footpad
        team_name=knalgans
        user_team_name=_"Alliance"
    [/side]
    # Allied AI - Sisal, set to play cautiously
    [side]
        type=Elvish Avenger
        gender=female
        id=Sisal
        name= _ "Sisal"
        profile=portraits/Sisal.png
        canrecruit=yes
        side=2
        [ai]
            aggression=0.3
            caution=0.7
            leader_value=10
        [/ai]
        recruit=Elvish Fighter,Elvish Archer,Elvish Shaman,Elvish Captain,Elvish Hero,Elvish Ranger,Elvish Marksman
        {GOLD4 400 300 250 200}
        team_name=knalgans
        user_team_name=_"Alliance"
        save_id=Elves
    [/side]
    # Enemy AI - set to be agressive
    [side]
        type=Orcish Warlord
        id="Ha'Tuil"
        name= _ "Ha'Tuil"
        canrecruit=yes
        side=3
        recruit=Orcish Warrior,Orcish Slayer,Troll,Troll Rocklobber,Orcish Crossbowman
        [ai]
            aggression=1.0
            caution=-1.0
            leader_value=50
        [/ai]
        {GOLD4 1000 1500 2000 2500}
        team_name=orcs
        user_team_name=_"Alliance"
    [/side]

    # Empty sides - to ensure proper recall lists carryover
    [side]
        side=4
        no_leader=yes
    [/side]
    [side]
        side=5
        no_leader=yes
    [/side]
    [side]
        side=6
        no_leader=yes
    [/side]

    # Krash may not actually still be alive at this point, but setting up
    # his side this way is the only way to reliably pick up his recall
    # list if he is.
    [side]
        side=7
        type=Drake Burner
        id=Krash
        name= _ "Krash"
        canrecruit=yes
        save_id=Krash
        {GOLD4 300 250 200 150}
        recruit=Drake Fighter,Drake Glider,Drake Burner,Drake Clasher
        team_name=knalgans
        user_team_name=_"Alliance"
        controller=human
    [/side]

    # Empty side - to ensure proper recall list carryover
    [side]
        side=8
        no_leader=yes
    [/side]

    # Empty side - player will assume control of it if Eryssa is alive
    [side]
        side=9
        {GOLD4 500 400 350 300}
        recruit=Elvish Fighter,Elvish Archer,Elvish Shaman,Elvish Scout,Elvish Captain,Elvish Hero,Elvish Ranger,Elvish Marksman,Elvish Rider,Elvish Druid,Elvish Sorceress
        team_name=knalgans
        user_team_name=_"Alliance"
        controller=human
        no_leader=yes
    [/side]

    [event]
        name=prestart

        # Here's where we edit out Krash's side if he's dead.
        [if]
            [variable]
                name=Krash_alive
                equals=no
            [/variable]
            [then]
                [kill]
                    side=7
                [/kill]
                [terrain]
                    x=4,4,4,5,5,5,6,6,6
                    y=3,4,5,3,4,5,3,4,5
                    terrain=Gs^Fp
                [/terrain]
            [/then]
        [/if]

        # If Eryssa is alive change her to recruiting leader of side 9 and
        # place on that keep.  This method works because, unlike Krash, she
        # has no recall list of followers to preserve.
        [recall]
            id=Eryssa
        [/recall]
        [if]
            [have_unit]
                id=Eryssa
            [/have_unit]
            [then]
                [store_starting_location]
                    side=9
                    variable=eryssa_starts_at
                [/store_starting_location]
                [store_unit]
                    [filter]
                        id=Eryssa
                    [/filter]
                    variable=place_eryssa_at
                    kill=yes
                    fire_event=no
                [/store_unit]
                {VARIABLE place_eryssa_at.side 9}
                {VARIABLE place_eryssa_at.x $eryssa_starts_at.x}
                {VARIABLE place_eryssa_at.y $eryssa_starts_at.y}
                {VARIABLE place_eryssa_at.canrecruit yes}
                [unstore_unit]
                    variable=place_eryssa_at
                [/unstore_unit]
                {CLEAR_VARIABLE place_eryssa_at}
                {CLEAR_VARIABLE eryssa_starts_at}
            [/then]
        [/if]
    [/event]

    [event]
        name=start
        # Recall heroes
        #TODO what does this?
        [role]
            [filter_wml]
                [variables]
                    role=Supporter
                [/variables]
            [/filter_wml]
            role=Supporter
        [/role]
        [recall]
            role=Supporter
        [/recall]
        [recall]
            id=Camerin
        [/recall]
        [recall]
            id=Father Morvin
        [/recall]
        [recall]
            id=Sister Thera
        [/recall]
        [recall]
            id=Elenia
        [/recall]
        [recall]
            id=Stalrag
        [/recall]
        [recall]
            id="Ro'Sothian"
        [/recall]
        [recall]
            id="Ro'Arthian"
        [/recall]
        [recall]
            id=Abhai
        [/recall]
        # Place Sisal troops
        {GENERIC_UNIT 2 "Elvish Archer" 9 20}
        [+unit]
            hitpoints=18
        [/unit]
        {GENERIC_UNIT 2 "Elvish Fighter" 10 20}
        [+unit]
            hitpoints=24
        [/unit]
        {GENERIC_UNIT 2 "Elvish Shaman" 9 21}
        {GENERIC_UNIT 2 "Elvish Captain" 11 21}
        [+unit]
            hitpoints=39
        [/unit]
        {GENERIC_UNIT 2 "Elvish Shaman" 20 21}
        {GENERIC_UNIT 2 "Elvish Fighter" 21 21}
        # Place enemy troops
        {GENERIC_UNIT 3 "Orcish Crossbowman" 10 19}
        [+unit]
            hitpoints=30
        [/unit]
        {GENERIC_UNIT 3 "Orcish Slayer" 11 20}
        [+unit]
            hitpoints=25
        [/unit]
        {GENERIC_UNIT 3 "Orcish Crossbowman" 14 17}
        [+unit]
            hitpoints=3
        [/unit]
        {GENERIC_UNIT 3 "Orcish Crossbowman" 23 19}
        [+unit]
            hitpoints=30
        [/unit]
        {GENERIC_UNIT 3 "Orcish Warrior" 17 17}
        {GENERIC_UNIT 3 "Orcish Warrior" 15 15}
        {GENERIC_UNIT 3 "Orcish Warrior" 14 14}
        {GENERIC_UNIT 3 "Orcish Warrior" 17 15}
        {GENERIC_UNIT 3 "Orcish Warrior" 18 14}
        {GENERIC_UNIT 3 "Orcish Warrior" 18 14}
        {GENERIC_UNIT 3 "Orcish Warrior" 16 14}
        {GENERIC_UNIT 3 "Orcish Warrior" 18 13}
        {GENERIC_UNIT 3 "Orcish Warrior" 18 13}
        {GENERIC_UNIT 3 "Orcish Warrior" 18 13}
        {GENERIC_UNIT 3 "Orcish Warrior" 18 13}
        {GENERIC_UNIT 3 "Orcish Warrior" 15 17}
        {GENERIC_UNIT 3 "Orcish Warrior" 20 18}
        {GENERIC_UNIT 3 "Orcish Warrior" 19 18}
        {GENERIC_UNIT 3 "Orcish Slayer" 17 17}
        {GENERIC_UNIT 3 "Orcish Slayer" 17 17}
        {GENERIC_UNIT 3 "Orcish Slayer" 15 15}
        {GENERIC_UNIT 3 "Orcish Slayer" 15 14}
        {GENERIC_UNIT 3 "Orcish Slayer" 17 15}
        {GENERIC_UNIT 3 "Orcish Slayer" 18 14}
        {GENERIC_UNIT 3 "Orcish Slayer" 16 14}
        {GENERIC_UNIT 3 "Orcish Slayer" 18 13}
        {GENERIC_UNIT 3 "Orcish Slayer" 18 13}
        {GENERIC_UNIT 3 "Orcish Slayer" 21 17}
        {GENERIC_UNIT 3 "Orcish Crossbowman" 18 13}
        {GENERIC_UNIT 3 "Orcish Crossbowman" 18 13}
        {GENERIC_UNIT 3 "Orcish Crossbowman" 18 13}
        {GENERIC_UNIT 3 "Orcish Crossbowman" 17 17}
        {GENERIC_UNIT 3 "Orcish Crossbowman" 15 15}
        {GENERIC_UNIT 3 "Orcish Crossbowman" 15 14}
        {GENERIC_UNIT 3 "Orcish Crossbowman" 17 15}
        {GENERIC_UNIT 3 "Orcish Crossbowman" 18 14}
        {GENERIC_UNIT 3 "Orcish Crossbowman" 16 14}
        # Initial dialogue
        [message]
            speaker=narrator
            message= _ "After making haste through the forest for most of a watch, the party arrived at the battle scene."
            image=wesnoth-icon.png
        [/message]
        [message]
            id=Eryssa
            message= _ "Sisal, how do you fare?"
        [/message]
        [message]
            id=Sisal
            message= _ "Princess! You are here! How fares Hidel?"
        [/message]
        [message]
            id=Eryssa
            message= _ " *sheds a tear*"
        [/message]
        [message]
            id=Tallin
            message= _ "Hidel...died a hero's death, one worthy to be sung forever."
        [/message]
        [message]
            id=Sisal
            message= _ "The dung-spawned bastards! Verily, Tallin, had it not been for Hidel we would all be dead and Rakshas would be gleefully counting his gold."
        [/message]
        [message]
            id=Sisal
            message= _ "Hidel and a handful of elves held off the orcs for more than an hour. That was enough time for us to make off with the gold and rally here at these ruins."
        [/message]
        [message]
            id=Tallin
            message= _ "So you have the gold?"
        [/message]
        [message]
            id=Sisal
            message= _ "We have the gold, and now we shall have the blood of these orcs! IN HIDEL'S NAME!"
        [/message]
        [message]
            id="Ha'Tuil"
            # wmllint: local spelling Grrr
            message= _ "Grrr, Ha'Tuil has never failed in his mission. I will soon lay your severed heads at the feet of the Master!"
        [/message]
        [message]
            id=Sisal
            message= _ "You will eat cold steel and whimper your way to hell, foul wretch of an orc!"
        [/message]
        [objectives]
            side=0
            [objective]
                description= _ "Defeat the orcs"
                condition=win
            [/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= _ "Turns Run Out"
                condition=lose
            [/objective]
            note={EARLY_FINISH_BONUS_NOTE}
        [/objectives]
    [/event]

    # Bad guy die event
    [event]
        name=last breath
        [filter]
            id="Ha'Tuil"
        [/filter]

        [message]
            id="Ha'Tuil"
            message= _ "Argh! I have failed!"
        [/message]
        [message]
            id=Sisal
            message= _ "Cheer up -- you won't have to live with your failure for long...*snicker*"
        [/message]
    [/event]

    # Sisal die event
    [event]
        name=last breath
        [filter]
            id=Sisal
        [/filter]

        {INCIDENTAL_MUSIC "sad.ogg"}
        [message]
            id=Sisal
            message= _ "Ahhhh! Farewell, friends. I now go to join Hidel."
        [/message]
        [message]
            id=Eryssa
            message= _ "Sisal! Noooo!"
        [/message]
        [message]
            speaker=second_unit
            message= _ "Haha! We got the gold now!"
        [/message]
        [message]
            id="Ha'Tuil"
            message= _ "Hahaha! Mission accomplished, men! Now let's crush the rest of this scum and report back to the Master."
        [/message]
        [message]
            id=Eryssa
            message= _ "I don't think so, you bastard orcs! That gold belongs to us. Besides, we now have a few scores to settle with you. Take them, troops - I want no orc left alive!"
        [/message]
    [/event]

    # Victory
    [event]
        name=victory

        [if]
            [have_unit]
                id=Sisal
            [/have_unit]
            [then]
                {MODIFY_UNIT id=Sisal canrecruit no}
                [message]
                    id=Tallin
                    message= _ "Thanks to Hidel and the elves, we have recovered our gold. Now let's run down Rakshas and settle up with him once and for all."
                [/message]
            [/then]
            [else]
                [message]
                    id=Tallin
                    message= _ "Hidel's death was a grievous loss; our thirst for vengeance must do what the stolen gold cannot. Now let's run down Rakshas and settle up with him once and for all."
                [/message]
            [/else]
        [/if]
        # Make veteran elves available for
        # the Elf side in Showdown.
        {MODIFY_UNIT (side=2) side 9}
        # Sisal and Eryssa need to be recallable.
        {MODIFY_UNIT id=Sisal side 1}
        {MODIFY_UNIT id=Eryssa side 1}
    [/event]
    # Load death events
    {campaigns/Northern_Rebirth/utils/herodeaths.cfg}
[/scenario]
