#textdomain wesnoth-nr

# This scenario takes only place if the rescue in the previous one did work out.
# It's only for the talk, and gives some XP.

[scenario]
    id=09a_Introductions
    name= _ "Introductions"
    map_file=09a_Introductions.map
    {TURNS 21 18 15}
    next_scenario=10a_Stolen_Gold
    victory_when_enemies_defeated=no

    {UNDERGROUND}

    {SCENARIO_MUSIC       "revelation.ogg"}
    {EXTRA_SCENARIO_MUSIC "the_dangerous_symphony.ogg"}
    {EXTRA_SCENARIO_MUSIC "underground.ogg"}

    {NR_TRACK {RECOVERY_STAGE2}}

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

        # wmllint: recognize Tallin
        {CHARACTER_STATS_TALLIN}

        shroud=yes
    [/side]
    # wmllint: validate-on

    # Empty side for enemy trolls
    [side]
        side=2
        no_leader=yes
        hidden=yes
        color=brown
        team_name=trolls
        user_team_name=_ "Trolls"

        {GENERIC_UNIT 2 "Troll" 1 3}
        {GENERIC_UNIT 2 "Troll" 2 1}
        {GENERIC_UNIT 2 "Troll" 5 5}
        {GENERIC_UNIT 2 "Troll" 10 6}
        {GENERIC_UNIT 2 "Troll" 11 4}
        {GENERIC_UNIT 2 "Troll" 16 6}
        {GENERIC_UNIT 2 "Troll" 18 11}

        {GENERIC_UNIT 2 "Troll Whelp" 3 9}
        {GENERIC_UNIT 2 "Troll Whelp" 6 3}
        {GENERIC_UNIT 2 "Troll Whelp" 8 4}
        {GENERIC_UNIT 2 "Troll Whelp" 8 6}
        {GENERIC_UNIT 2 "Troll Whelp" 10 8}
        {GENERIC_UNIT 2 "Troll Whelp" 12 6}
        {GENERIC_UNIT 2 "Troll Whelp" 13 5}

        {GENERIC_UNIT 2 "Troll Rocklobber" 1 5}
        {GENERIC_UNIT 2 "Troll Rocklobber" 4 3}
        {GENERIC_UNIT 2 "Troll Rocklobber" 9 3}
        {GENERIC_UNIT 2 "Troll Rocklobber" 10 5}
        {GENERIC_UNIT 2 "Troll Rocklobber" 14 3}
    [/side]

    {PLACE_IMAGE scenery/signpost.png 1 1}

    [event]
        name=prestart

        {SCATTER_IMAGE (terrain=Uu) 4 scenery/rubble.png}

        {RECALL_SUPPORTER}

        [recall]
            id=Abhai
        [/recall]

        [recall]
            id=Camerin
        [/recall]

        [recall]
            id=Father Morvin
        [/recall]

        [recall]
            id=Sister Thera
        [/recall]

        [recall]
            id=Krash
        [/recall]

        [recall]
            id=Elenia
        [/recall]

        [if]
            [have_unit]
                #wmllint: recognize Eryssa
                id=Eryssa
                search_recall_list=yes
            [/have_unit]
            [then]
                [recall]
                    id=Eryssa
                [/recall]
            [/then]
            [else]
                # You arrived here using debug mode,
                # the scenario would have been skipped otherwise.
                [unit]
                    side=1
                    type=Elvish Sorceress
                    id=Eryssa
                    name= _ "Eryssa"
                    unrenamable=yes
                    profile=portraits/Eryssa.webp
                    placement=leader
                    passable=yes
                    [modifications]
                        {TRAIT_LOYAL_HERO}
                        {TRAIT_DEXTROUS}
                    [/modifications]
                [/unit]
            [/else]
        [/if]

        [recall]
            id=Stalrag
        [/recall]

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

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

        # Set objectives
        [objectives]
            side=1
            [objective]
                description= _ "Move Tallin to the Signpost in the north"
                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= _ "Death of Eryssa"
                condition=lose
            [/objective]

            {TURNS_RUN_OUT}

            [gold_carryover]
                bonus=yes
                carryover_percentage=80
            [/gold_carryover]
        [/objectives]
    [/event]

    [event]
        name=start

        [message]
            speaker=narrator
            image=wesnoth-icon.png
            message= _ "After rescuing the Princess, Tallin and his allies quickly withdrew into the caves."
        [/message]

        [message]
            speaker=Eryssa
            message= _ "Now that we are well shot of that dungeon, do you mind telling me who you are?"
        [/message]

        [if]
            [have_unit]
                id=Elenia
            [/have_unit]
            [then]
                [message]
                    speaker=Elenia
                    message= _ "Sister! Don’t you recognize me?"
                [/message]

                [message]
                    speaker=Eryssa
                    message= _ "Gods of Light! Elenia! It’s you! It has been years! What in the world happened to you? We all had thought you dead!"
                [/message]

                [message]
                    speaker=Elenia
                    message= _ "Yes, I was afraid that would be your conclusion. What actually happened was that I was captured by an old bonebag of a lich."
                [/message]

                [message]
                    speaker=Eryssa
                    message= _ "You mean Malifor?"
                [/message]

                [message]
                    speaker=Elenia
                    message= _ "None other. I was his prisoner for many years until these brave people rescued me. With all these orcs about it was far too dangerous to travel back to the elvish forests by myself. And in consideration of the debt I owe to these brave people, I have been with them ever since."
                [/message]

                [message]
                    speaker=Eryssa
                    message= _ "Really, and who are these people?"
                [/message]

                [message]
                    speaker=Elenia
                    message= _ "Here we have our leader and hero, Lord Tallin."
                [/message]

                [message]
                    speaker=Tallin
                    message= _ "(<i>Rolls eyes</i>)"
                [/message]

                [message]
                    speaker=Elenia
                    message= _ "He is the one who led his people in revolt against the orcs armed with nothing but pitchforks."
                [/message]

                [message]
                    speaker=Eryssa
                    message= _ "Wow!"
                [/message]

                [message]
                    speaker=Elenia
                    message= _ "Then they scrounged up bows and cudgels from the dead orcs, and marched into the caves and broke the dwarves out from their encirclement by the undead and trolls."
                [/message]

                [message]
                    speaker=Elenia
                    message= _ "Then Tallin and his band hunted down Malifor and destroyed him. Now Lord Tallin is building an alliance of humans, dwarves, dead mages and whatever critters he can find to crush the orcs."
                [/message]

                [message]
                    speaker=Eryssa
                    message= _ "You’re right, Elenia, Tallin is truly a hero."
                [/message]

                [message]
                    speaker=Tallin
                    message= _ "Not at all, Your Highness. I am no more than a humble peasant trying to free my people from enslavement."
                [/message]

                [message]
                    speaker=Eryssa
                    message= _ "And a modest one too!"
                [/message]

                [message]
                    speaker=Sister Thera
                    message= _ "(<i>Giggle</i>)"
                [/message]

                [message]
                    speaker=Eryssa
                    message= _ "Tallin, not only have you freed me and my sister from captivity, but you have defeated Malifor, who has long been a scourge to my people. By defeating him, you have aided the Northern Elves more than you can imagine."
                [/message]

                [message]
                    speaker=Tallin
                    message= _ "Ahh, it was nothing, my lady."
                [/message]

                [message]
                    speaker=Eryssa
                    message= _ "No, it was far from nothing, Tallin. The Northern Elves will always be in your debt. Tell me, what can we do to repay you?"
                [/message]

                [message]
                    speaker=Tallin
                    message= _ "As Elenia has said, we are currently locked in a death-struggle with the orcs led by a warlord named Rakshas. You could help us most by joining us in our quest to crush this menace once and for all."
                [/message]

                [message]
                    speaker=Eryssa
                    message= _ "That could hardly count as repayment of our debt to you, Tallin. This Rakshas is an enemy to every Northern Elf as well. Why, it can’t have been more than a few months ago that the orcs attacked our forests and took me prisoner. Helping you defeat them would be serving our own interests as much as yours."
                [/message]

                [message]
                    speaker=Tallin
                    message= _ "My lady, we are not seeking to do business here: <i>“I do this for you, and you do this for me.”</i> No, we seek to build everlasting friendships which will forever ensure the peace and prosperity of these Northlands. Therefore, let there be no talk of debts and repayments between us."
                [/message]

                [message]
                    speaker=Eryssa
                    message= _ "Well and nobly spoken, Tallin. Very well, I shall join you in your quest to crush this orcish menace. Let gryphons immediately be sent to our people; I shall use all the influence I have, to raise elvish troops for the battles ahead."
                [/message]

                [message]
                    speaker=Elenia
                    # wmllint: local spelling Er
                    message= _ "Er, Eryssa... there is a large elvish force moving this direction. By now they cannot be more than two days’ march from here. It seems that our father sent them to either free you or bargain for your release."
                [/message]

                [message]
                    speaker=Eryssa
                    message= _ "Why did you not speak of this before? Let us immediately send out the gryphons with my personal seal telling them that I shall be taking command of the force. Tell them to come straight to Knalga and meet me there."
                [/message]

                [message]
                    speaker=Tallin
                    message= _ "Sounds good— I mean, let it be so."
                [/message]

                {VARIABLE eryssa_hostile no}
            [/then]
            [else]
                [message]
                    speaker=Tallin
                    message= _ "Not at all. I am Tallin, from the human town of Dwarven Doors. Together with the Dwarvish Lord Hamel and the mage Ro’Arthian and his brother, we are attempting to restore peace and freedom to Knalga."
                [/message]

                [message]
                    speaker=Eryssa
                    message= _ "Uh huh. Good for you."
                [/message]

                [message]
                    speaker=Tallin
                    message= _ "The only problem — or the major one, anyway — is these blasted orcs. They all have united under the leadership of this guy called Rakshas and are determined to make Knalga into an orcish stronghold — enslaving or killing any humans, dwarves or anything else along the way."
                [/message]

                [message]
                    speaker=Eryssa
                    message= _ "So what does this have to do with me?"
                [/message]

                [message]
                    speaker=Tallin
                    message= _ "There is a large elvish force not far from here who — we believe anyway — has been sent to free you. We were hoping if we could secure your release you would help us crush the orcish host."
                [/message]

                [message]
                    speaker=Eryssa
                    # wmllint: local spelling Pff
                    message= _ "Pff, foolish human. What in the world gave you that idea?"
                [/message]

                [message]
                    speaker="Ro'Arthian"
                    message= _ "Ungrateful minx! I’m sorely tempted to break your neck!"
                [/message]

                [message]
                    speaker=Eryssa
                    message= _ "Make one move towards me, lich, and you’ll find yourself dangling off the end of a vine."
                [/message]

                [message]
                    speaker=Stalrag
                    message= _ "Leave her alone, lich! Rescuing her was a fool’s quest to begin with and attacking her won’t make the situation better. Especially an attack from an incompetent like you!"
                [/message]

                [message]
                    speaker=Father Morvin
                    message= _ "Peace! Peace!"
                [/message]

                [message]
                    speaker=Tallin
                    message= _ "Well, what about the orcs then, <i>Princess</i>? Don’t you wish to be rid of them?"
                [/message]

                [message]
                    speaker=Eryssa
                    message= _ "How we deal with the orcs is none of your concern!"
                [/message]

                # wmllint: local spelling priss
                [if]
                    [have_unit]
                        id=Camerin
                    [/have_unit]
                    [then]
                        [message]
                            speaker=Camerin
                            message= _ "What a little priss. She makes me want to fry her!"
                        [/message]

                        [message]
                            speaker=Eryssa
                            message= _ "Mind your betters, mage!"
                        [/message]

                        [message]
                            speaker=Camerin
                            message= _ "Mind your tongue, elf!"
                        [/message]
                    [/then]
                [/if]

                [message]
                    speaker=Father Morvin
                    message= _ "Frankly, my lady, I am disappointed. I was always under the impression that elves were an honorable lot who took their debts seriously."
                [/message]

                [message]
                    speaker=Eryssa
                    message= _ "Who said that I wasn’t going to repay you? When I get back to the elves, we will give you five thousand gold for your trouble."
                [/message]

                [message]
                    role=Supporter
                    message= _ "We already have a hoard of gold! We don’t need more!"
                [/message]

                [message]
                    speaker=Eryssa
                    message= _ "That is your concern, not mine, human."
                [/message]

                [message]
                    speaker=Tallin
                    message= _ "(<i>Sigh</i>) Oh well. It isn’t as if we weren’t expecting this."
                [/message]

                [message]
                    speaker="Ro'Arthian"
                    message= _ "See, I told you so!"
                [/message]

                [message]
                    speaker=Tallin
                    message= _ "I know, you were right. I am sorry, Ro’Arthian. I should have listened to you."
                [/message]

                [message]
                    speaker=Tallin
                    message= _ "Well, it’s pointless to linger here. Let’s get back to Knalga."
                [/message]

                {VARIABLE eryssa_hostile yes}
            [/else]
        [/if]
    [/event]

    # On sighting the trolls
    [event]
        name=sighted
        [filter]
            race=troll
        [/filter]
        [filter_second]
            side=1
        [/filter_second]

        [message]
            role=Supporter
            message= _ "Hey look, it’s a troll!"
        [/message]

        [message]
            speaker=Tallin
            message= _ "A troll? What in the world are trolls doing this close to Knalga? Something’s wrong, let’s hurry back."
        [/message]

        [modify_side]
            side=2
            hidden=no
        [/modify_side]
    [/event]

    # Reaching the target signpost, player won
    [event]
        name=moveto
        [filter]
            x,y=1,1
            id=Tallin
        [/filter]

        [message]
            speaker=Tallin
            message= _ "I can see the dwarvish defenses just ahead. Let’s go!"
        [/message]

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

    # Load death events
    {HERODEATH_EVERYONE}
[/scenario]
