#textdomain wesnoth-aoi

# Warning: If you are not a native and literate English speaker, do
# not try to modify the storyline text.  It is deliberately written
# in a somewhat archaic and poetic form of English, and some previous
# attempts to "fix" it inflicted damage that was difficult to undo.

[scenario]
    name=_ "Linaera the Quick"
    id=5_Linaera_the_Quick
    map_data="{campaigns/An_Orcish_Incursion/maps/5_Linaera_the_quick.map}"
    turns=24
    next_scenario=6_A_Detour_through_the_Swamp
    {DEFAULT_SCHEDULE}

    {INTRO_AND_SCENARIO_MUSIC wanderer.ogg knolls.ogg}
    {EXTRA_SCENARIO_MUSIC heroes_rite.ogg}
    {EXTRA_SCENARIO_MUSIC traveling_minstrels.ogg}
    {EXTRA_SCENARIO_MUSIC legends_of_the_north.ogg}

    [story]
        [part]
            background=an-orcish-incursion-map.png
            story=_ "After a day of hard-earned rest the elves marched north again. This was unknown country, not frequented even by Wesmere's furthermost-faring scouts."
        [/part]
        [part]
            background=an-orcish-incursion-map.png
            story=_ "Two days' travel later, the forward scouts reported another orcish warband laying siege to a tower."
        [/part]
        [part]
            background=an-orcish-incursion-map.png
            story=_ "Erlornas surveyed the siege from atop a small tree-covered hill overlooking the tower valley..."
        [/part]
        [part]
            show_title="yes"
            {TO_LINAERA_THE_QUICK}
        [/part]
    [/story]

    [side]
        type=Elvish Lord
        id=Erlornas
        canrecruit=yes
        name=_ "Erlornas"

        side=1
        controller=human
        team_name=Elves
        user_team_name=_ "Elves"
        {GOLD 100 100 100}
        {INCOME 0 0 0}
        recruit=Elvish Archer, Elvish Fighter, Elvish Scout, Elvish Shaman
        fog=no
        shroud=no
    [/side]

    {STARTING_VILLAGES 1 6}

    [side]
        type=Orcish Warlord
        id=Krughnar
        canrecruit=yes
        name=_ "Krughnar"

        side=2
        {GOLD 190 220 250}
        {INCOME 0 0 0}
        team_name=Orcs
        user_team_name=_ "Orcs"
        controller=ai
        fog=no
        shroud=no
        recruit=Goblin Knight, Orcish Archer, Orcish Crossbowman, Orcish Grunt, Orcish Warrior, Wolf Rider
        [ai]
            grouping=offensive
            {ATTACK_DEPTH 4 5 6}
            villages_per_scout=4
            leader_value=3
            village_value=1
        [/ai]
    [/side]

    {STARTING_VILLAGES 2 9}

    [side]
        type=Silver Mage
        id=Linaera
        canrecruit=yes
        gender=female
        name=_ "Linaera"

        side=3
        team_name=Wizards
        user_team_name=_ "Wizards"
        controller=ai
        fog=no
        shroud=no
    [/side]

    [event]
        name=prestart

        [objectives]
#ifdef EASY
            note=_ "Hint:
Use Elven Scouts and Linaera's power of teleportation to mount hit-and-run attacks."+"
"+{EARLY_FINISH_BONUS_NOTE}+{NEW_GOLD_CARRYOVER_NOTE_40}
#else
            note={EARLY_FINISH_BONUS_NOTE}+{NEW_GOLD_CARRYOVER_NOTE_40}
#endif
            [objective]
                description=_ "Defeat Krughnar and break the siege"
                condition=win
            [/objective]
            [objective]
                description=_ "Death of Erlornas"
                condition=lose
            [/objective]
            [objective]
                description=_ "Death of Linaera"
                condition=lose
            [/objective]
            [objective]
                description=_ "Time runs out"
                condition=lose
            [/objective]
        [/objectives]
    [/event]

    [event]
        name=start

        # {SCATTER_IMAGE (terrain=Gg) 4 scenery/oak-leaning.png}
        # {SCATTER_IMAGE (terrain=Gg) 10 scenery/pine2.png}
        [role]
            race=elf
            [not]
                canrecruit=yes
            [/not]
            role=Advisor
        [/role]
        [recall]
            role=Advisor
        [/recall]
        [message]
            id=Erlornas
            message=_ "Report."
        [/message]
        [message]
            role=Advisor
            message=_ "A warband of orcs, no women or children among them, besieges a tower. It's of human design...but we are far from the lands granted to humans by treaty, my lord Erlornas."
        [/message]
        [message]
            id=Erlornas
            message=_ "Under the letter of the treaty, it is so. But this country is too cold and barren for us. I wonder, what manner of human would choose to live here, far from its kind? Hmmm..."
        [/message]
        [message]
            role="Advisor"
            message=_"It trespasses, and should be driven out!"
        [/message]
        [message]
            id="Erlornas"
            message=_"Hold. It is only one human, or a few of them at most. Time enough to speak of driving it out when we have no enemies in common."
        [/message]
        [message]
            id=Erlornas
            message=_ "Tell me: I see no bridge over the chasm around that keep. Is there any sign that one has been withdrawn by the defenders?"
        [/message]
        [message]
            role=Advisor
            message=_ "No, lord. No traces of any construction. It looks like no bridge has ever existed there. There must be other, hidden means of access to the tower."
        [/message]
        [message]
            id=Erlornas
            message=_ "Interesting...Go to my personal stores and bring me a bottle of wine. And a couple of glasses."
        [/message]
        [message]
            role=Advisor
            message=_ "...glasses?"
        [/message]
        [message]
            id=Erlornas
            message=_ "Do it. We'll have a guest soon."
        [/message]
        [message]
            speaker=narrator
            #po: "Faerie" in this paragraph is a rare, poetic word in
            #po: English. It is the proper name of a magical otherworld
            #po: associated with elves - actually, originally with
            #po: fairies, but before Tolkien the boundary between elves
            #po: and fairies was extremely blurry. In Wesnoth it is
            #po: deliberately unclear whether Faerie is a place that is
            #po: the source of magical power or a label for the inner
            #po: nonhuman/magical nature of the Elves.  Translate freely.
            message=_ "Erlornas closed his eyes and brought his hands forward, joined palms forming a cup open to the sky. Soon they began to glow, then to flare like a brazier with the fire of Faerie, casting a cold, blue light all around the elf-lord. A wisp of light emerged from the eerie flames, and at a few murmured words from the elf-lord flew away towards the tower below. Then the light around Erlornas faded and all was seemingly as before."
            image=wesnoth-icon.png
        [/message]
        [delay]
            time=500
        [/delay]
        [message]
            speaker=narrator
            message=_ "Some time later..."
            image=wesnoth-icon.png
        [/message]
        [item]
            x,y=16,17
            image=projectiles/whitemissile-impact-2.png
        [/item]
        [delay]
            time=100
        [/delay]
        [removeitem]
            x,y=16,17
        [/removeitem]
        [item]
            x,y=16,17
            image=projectiles/whitemissile-impact-3.png
        [/item]
        [delay]
            time=100
        [/delay]
        [removeitem]
            x,y=16,17
        [/removeitem]
        [item]
            x,y=16,17
            image=projectiles/whitemissile-impact-4.png
        [/item]
        [delay]
            time=100
        [/delay]
        [removeitem]
            x,y=16,17
        [/removeitem]
        [store_unit]
            variable=linaera_jump
            [filter]
                id=Linaera
            [/filter]
            kill=yes
            fire_event=no
        [/store_unit]
        {VARIABLE linaera_jump.x 16}
        {VARIABLE linaera_jump.y 17}
        [unstore_unit]
            variable=linaera_jump
            find_vacant=yes
        [/unstore_unit]
        [redraw][/redraw]
        {GENERIC_UNIT 3 Mage 17 17} {NO_UPKEEP}
        {GENERIC_UNIT 3 Mage 16 18} {NO_UPKEEP}
        {GENERIC_UNIT 3 Mage 15 17} {NO_UPKEEP}
        [message]
            id=Erlornas
            message=_ "So you decided to accept the invitation. Good. Welcome, I am lord Erlornas of Wesmere. I find your presence here...surprising."
        [/message]
        [message]
            speaker="Linaera"
            message=_"Scarcely less than I find yours, my lord elf, but I would welcome your aid against these orcs. They have been besieging my tower for weeks."
        [/message]
        [message]
            id=Erlornas
            message=_ "I wish their foul kind driven as far as possible from my borders, not to return. It would be no bad thing if an ally of the elves kept watch over this country."
        [/message]
        [message]
            speaker="Linaera"
            message=_"Count me an ally, then, lord Erlornas. We can defeat them together."
        [/message]
        [store_unit]
            variable=linaeras_side
            [filter]
                side=3
            [/filter]
            kill=yes
        [/store_unit]
        {FOREACH linaeras_side i}
            {VARIABLE linaeras_side[$i].side 1}
            [if]
                [variable]
                    name=linaeras_side[$i].id
                    equals=Linaera
                [/variable]
                [then]
                    {VARIABLE linaeras_side[$i].canrecruit 0}
                    {VARIABLE linaeras_side[$i].upkeep loyal}
                    {VARIABLE linaeras_side[$i].overlays "misc/hero-icon.png"}
                [/then]
            [/if]
            [unstore_unit]
                variable=linaeras_side[$i]
            [/unstore_unit]
        {NEXT i}
        [message]
            role="Advisor"
            message=_"My lord... humans cannot be trusted! They shift their allegiances with the changing of the wind!"
        [/message]
        [message]
            id="Erlornas"
            message=_"That may be, but I do not think this one will betray us to the orcs. And we may need her assistance, too: that is a powerful force of orcs ahead."
        [/message]
    [/event]

    [event]
        name=die
        [filter]
            id=Linaera
        [/filter]
        [endlevel]
            result=defeat
        [/endlevel]
    [/event]

    [event]
        name=enemies defeated
        [message]
            id="Erlornas"
            message=_"And that is well ended. But, Linaera, there is somewhat else that concerns me. You are a mage; do you not feel something...wrong...to the east of here?"
        [/message]
        [message]
            speaker="Linaera"
            message=_"I do indeed. Something evil has recently made a nest in the next valley over; its servants have been sniffing at the edges of my domain. I had meant to deal with it myself, but if you elves revere the green earth I think you will want it abolished as much as do I."
        [/message]
        [message]
            id="Erlornas"
            message=_"We are of one mind, then. Let us go to it."
        [/message]

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