#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]
    id=05_Linaera_the_Quick
    name= _ "Linaera the Quick"
    map_data="{campaigns/An_Orcish_Incursion/maps/05_Linaera_the_Quick.map}"
    turns=24
    next_scenario=06_A_Detour_through_the_Swamp

    {DEFAULT_SCHEDULE}

    {SCENARIO_MUSIC       knolls.ogg}
    {EXTRA_SCENARIO_MUSIC heroes_rite.ogg}
    {EXTRA_SCENARIO_MUSIC traveling_minstrels.ogg}
    {EXTRA_SCENARIO_MUSIC legends_of_the_north.ogg}

    [story]
        [part]
            music=wanderer.ogg
            background=story.jpg
            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=story.jpg
            story= _ "Two days’ travel later, the forward scouts reported another orcish warband laying siege to a tower."
        [/part]
        [part]
            background=story.jpg
            story= _ "Erlornas surveyed the siege from atop a small tree-covered hill overlooking the tower valley..."
        [/part]
    [/story]

    {AOI_TRACK {JOURNEY_05_NEW}}

    # wmllint: validate-off
    [side]
        side=1
        controller=human
        {GOLD 100 100 100}
        {INCOME 0 0 0}
        team_name=Elves
        user_team_name= _ "Elves"
        {FLAG_VARIANT wood-elvish}

        # wmllint: recognize Erlornas
        {CHARACTER_STATS_ERLORNAS}

        facing=nw
    [/side]
    # wmllint: validate-on

    [side]
        side=2
        controller=ai
        recruit="Goblin Knight,Orcish Archer,Orcish Crossbowman,Orcish Grunt,Orcish Warrior,Wolf Rider"
        {GOLD 190 220 250}
        {INCOME 0 0 0}
        team_name=Orcs
        user_team_name= _ "Orcs"
        {FLAG_VARIANT6 ragged}

        type=Orcish Warlord
        id=Krughnar
        name= _ "Krughnar"
        canrecruit=yes

        facing=se

        [ai]
            grouping=offensive
            {ATTACK_DEPTH 4 5 6}
            villages_per_scout=4
            leader_value=3
            village_value=1
        [/ai]
    [/side]

    # wmllint: validate-off
    [side]
        side=3
        controller=ai
        hidden=yes
        team_name=Mages
        user_team_name= _ "Mages"
        # Use stock flags

        # wmllint: recognize Linaera
        {CHARACTER_STATS_LINAERA}

        facing=ne
    [/side]
    # wmllint: validate-on

    {STARTING_VILLAGES 1 6}
    {STARTING_VILLAGES 2 9}

    [event]
        name=prestart

        [objectives]
            [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]

            {TURNS_RUN_OUT}

            {HINT ( _ "Linaera is a leader and can recruit mages when standing on a keep.")}

            [gold_carryover]
                bonus=yes
                carryover_percentage=40
            [/gold_carryover]

#ifdef EASY
            {HINT ( _ "Use Elven Scouts and Linaera’s power of teleportation to mount hit-and-run attacks.")}
#endif
        [/objectives]

        {RECALL_ADVISOR}

        {MODIFY_UNIT (side=1) facing nw}
    [/event]

    [event]
        name=start

        [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]
            speaker=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]
            speaker=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]
            speaker=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]
            speaker=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]
            speaker=Erlornas
            message= _ "Do it. We’ll have a guest soon."
        [/message]

        [message]
            speaker=narrator
            image=wesnoth-icon.png
            #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."
        [/message]

        [delay]
            time=500
        [/delay]

        [message]
            speaker=narrator
            image=wesnoth-icon.png
            message= _ "Some time later..."
        [/message]

        {MODIFY_UNIT (id=Linaera) facing se}
        [teleport]
            [filter]
                id=Linaera
            [/filter]

            x,y=16,17
            animate=yes
        [/teleport]

        {LOYAL_UNIT 3 Mage 17 17}
        {FACING se}

        {LOYAL_UNIT 3 Mage 16 18}
        {FACING se}

        {LOYAL_UNIT 3 Mage 15 17}
        {FACING se}

        [message]
            speaker=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]

        [modify_unit]
            [filter]
                side=3
            [/filter]
            side=1
        [/modify_unit]

        [redraw][/redraw]

        [message]
            role=advisor
            message= _ "My lord... humans cannot be trusted! They shift their allegiances with the changing of the wind!"
        [/message]

        [message]
            speaker=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=enemies defeated

        [message]
            speaker=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]
            speaker=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]

    {HERODEATH_ERLORNAS}
    {HERODEATH_LINAERA}
[/scenario]
