#textdomain wesnoth-sota

# A loyal saurian healer is added at the end of this scenario--very useful.

# This is slightly hackish since the closer contains VAR_NAME...
# wmlindent: opener "{NEAREST_HEX "
# wmlindent: closer "location}"

[scenario]
    name= _ "Battleground"
    map_data="{campaigns/Secrets_of_the_Ancients/maps/11_Battleground.map}"

    id=11_Battleground
    next_scenario=12_Walking_Trees

    [story]
        [part]
            [background_layer]
                image=story/book.png
                scale=no
            [/background_layer]
            story= _ "11 IV, 23 YW

Rastaban seems like an acceptable ally. He is quite different from the stodgy teachers at the academy who were so full of themselves and loved to hear themselves talk. He also never once disparaged me for being a girl or even mentioned my hair. As long as he continues to respect me, everything will go fine. If not, well, I am surrounded by the remnants of those who assumed I was weak."
        [/part]
        [part]
            [background_layer]
                image=story/book.png
                scale=no
            [/background_layer]
            story= _ "The question remains whether or not it is wise to trust him. As he said, I don't need to at this time, but if we are to travel together it will become necessary. He has shown me something marvelous in the ghosts, so that is a large mark in his favor. On consideration, I have decided to trust him, but only provisionally. For now, we are both vulnerable, and he must know that attacking me would be unwise. However, if he were to become indestructible first, I would do well to stay alert."
        [/part]
        [part]
            [background_layer]
                image=story/battle.jpg
                scale=no
            [/background_layer]
            story= _ "The site of the battle was immediately obvious when I came upon it. Multiple fortresses stared at each other across a basin that was now mostly flooded. Sluggish water pooled near the road, and the slime of decay was on every surface. Weapons, armor and less-easily identifiable bits of detritus rose from the swamp. I could easily imagine great siege engines heaving stones at walls that were now crumbled ruins, and the clash of combatants who were now bleached white bones jutting from the wreckage."
        [/part]
        [part]
            [background_layer]
                image=portraits/undead/ghost.png
                scale=no
            [/background_layer]
            story= _ "Well, these combatants were going to get a second chance for glory when they fought for me. The more strong willed among them may even remember desiring it."
        [/part]
        {JOURNEY_PART 11}
    [/story]

    {DEFAULT_SCHEDULE}
    {DEFAULT_MUSIC_PLAYLIST}
    {TURNS 30 31 32}

    [side]
        {SIDE_1_ARDONNA}
        gold=0
        # Gold is not set here because if Ardonna's gold is higher, it will replace
        # this value anyway (because of the original bonus rules). If we use zero,
        # Ardonna's previous carryover gold will always be higher and will be what
        # side one starts with. We'll add more in the prestart event.
    [/side]

    [side]
        side=2
        controller=ai
        user_team_name= _ "Saurians"
        team_name=bad
        type=Saurian Soothsayer
        name= _ "Krissaz"
        id=Krissaz
        facing=se
        recruit=Saurian Augur,Saurian Soothsayer,Saurian Oracle
        {GOLD 100 150 200}
    [/side]

    [side]
        side=3
        controller=ai
        user_team_name= _ "Nagas"
        team_name=bad
        type=Naga Myrmidon
        name= _ "Blianxkep"
        id=Blianxkep
        facing=sw
        recruit=Naga Fighter,Naga Warrior
        {GOLD 180 230 300}
    [/side]

    # *************************** PRESTART ***************************

    {SIDE_1_ARDONNA:TRANSFROM_BATS_TO_NORMAL_EVENT}

    [event]
        name=prestart

        [gold]
            # This is actually the default starting gold.
            side=1
            amount=100
        [/gold]

        [objectives]
            side=1
            [objective]
                description= _ "Defeat all enemy leaders"
                condition=win
            [/objective]

            {HOW_TO_LOSE_WITH_ARDONNA}

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

        # wmllint: who RECALL_LOYAL_UNITS is Bone Captain
        {RECALL_LOYAL_UNITS}
    [/event]

    # *************************** ENDING / OPENING ***************************
    [event]
        name=start

        [message]
            speaker=Blianxkep
            message= _ "The fish people gave good value for the last load. More metal of that type is desired."
        [/message]
        [message]
            speaker=Krissaz
            message= _ "Firssst, pay us our ssshare."  # no spellcheck
        [/message]
        [message]
            speaker=Blianxkep
            message= _ "Wait, who approaches?"
        [/message]
        [message]
            speaker=Ardonna
            message= _ "I am a mage and not a threat to you gentle... reptiles. I wish only to animate some spirits, so I won’t disturb your salvage operation."
        [/message]
        [message]
            speaker=Krissaz
            message= _ "No! You can’t make thisss place more haunted than it isss! The femalesss already won’t come here, and we are forced to rely on these ssserpents for protection."  # no spellcheck
        [/message]
        [message]
            speaker=Ardonna
            message= _ "I was only informing you out of courtesy. In truth, I don’t require your permission."
        [/message]
        [message]
            speaker=Blianxkep
            message= _ "We will help you drive off this foe if you will consider your share paid in full."
        [/message]
        [message]
            speaker=Krissaz
            message= _ "When the mage isss dead and her dead horde put to ressst, we agree. We will have been compensssated adequately."  # no spellcheck
        [/message]
        [message]
            speaker=Ardonna
            message= _ "Every time..."
        [/message]
    [/event]

    [event]
        name=victory

        [message]
            speaker=Ardonna
            message= _ "Good. Now I can practice recruiting ghosts."
        [/message]

        [message]
            speaker=narrator
            image=portraits/undead/ghost.png~SCALE(93, 93)
            message= _ "You can now recruit ghosts!"
        [/message]

        [allow_recruit]
            side=1
            type=Ghost
        [/allow_recruit]

        # Find the nearest hex to (16,4) that doesn't have unit on it:
        {NEAREST_HEX 16 4 20 (
            [not]
                [filter]
                [/filter]
            [/not] )
        location}

        [move_unit_fake]
            type=Saurian Soothsayer
            x=8, $location.x
            y=4, $location.y
            side=1
        [/move_unit_fake]

        [unit]
            # wmllint: who RECALL_LOYAL_UNITS is Vendraxis
            name= _ "Vendraxis"
            id=Vendraxis
            type=Saurian Soothsayer
            x=$location.x
            y=$location.y
            side=1
            {IS_LOYAL}
            [modifications]
                {TRAIT_LOYAL}
                {TRAIT_RESILIENT}
            [/modifications]
        [/unit]

        [clear_variable]
            name=location
        [/clear_variable]

        [message]
            speaker=Vendraxis
            message= _ "Human, take me with you!"
        [/message]
        [message]
            speaker=Ardonna
            message= _ "Why should I allow that? Your people attacked me!"
        [/message]
        [message]
            speaker=Vendraxis
            message= _ "I tried to ssstop them! For myself, I wissshed not to attack. I wissshed to learn. My race livesss but a short time compared to yoursss. I would learn to exssstend my ssspan, and the planetsss told me you know this sssecret." # no spellcheck
        [/message]
        [message]
            speaker=Ardonna
            message= _ "Actually, I am searching for that secret now. But could you follow the orders of a woman?"
        [/message]
        [message]
            speaker=Vendraxis
            message= _ "I have ssstared into the darknesss between the starsss and not been intimidated by the void, but your mind holds a darknesss of another kind, frightening and forbidden by my clan. I sssubmit to your power. Now that I know you are female, I will find it easier as it isss the way of my kind." # no spellcheck
        [/message]
        [message]
            speaker=Ardonna
            message= _ "Very well, come along. I am Ardonna."
        [/message]
        [message]
            speaker=Vendraxis
            message= _ "Yesss, but the planetsss tell me your name isss now untrue. I do not underssstand thisss." # no spellcheck
        [/message]
        [message]
            speaker=Ardonna
            message= _ "Nor do I. Your planets are quite cryptic."
        [/message]
        [message]
            speaker=Vendraxis
            message= _ "They reveal what they will."
        [/message]
    [/event]

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

    {HERO_DEATHS}
    {MANAGE_PROFILE}
[/scenario]
