#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=06_A_Detour_through_the_Swamp
    name= _ "A Detour through the Swamp"
    map_data="{campaigns/An_Orcish_Incursion/maps/06_A_Detour_through_the_Swamp.map}"
    turns=24
    next_scenario=07_Showdown

    {DEFAULT_SCHEDULE}

    {INTRO_AND_SCENARIO_MUSIC the_deep_path.ogg underground.ogg}
    {EXTRA_SCENARIO_MUSIC vengeful.ogg}
    {EXTRA_SCENARIO_MUSIC revelation.ogg}

    {AOI_TRACK {JOURNEY_06_NEW}}

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

        # wmllint: recognize Erlornas
        {CHARACTER_STATS_ERLORNAS}

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

    [side]
        side=2
        controller=ai
        recruit="Ghost,Ghoul,Revenant,Skeleton,Skeleton Archer,Walking Corpse"
        {GOLD 150 200 250}
        income=0
        team_name=Undead
        user_team_name= _ "Undead"
        {FLAG_VARIANT undead}

        type=Lich
        id=Keremal
        name= _ "Keremal"
        canrecruit=yes

        facing=nw

        [ai]
            villages_per_scout=4
            leader_value=3
            village_value=1
            grouping=offensive
            attack_depth=5
        [/ai]
    [/side]

    [event]
        name=prestart

        [objectives]
            side=1
            [objective]
                description= _ "Defeat Keremal"
                condition=win
            [/objective]
            [objective]
                description= _ "Death of Erlornas"
                condition=lose
            [/objective]
            [objective]
                description= _ "Death of Linaera"
                condition=lose
            [/objective]

            {TURNS_RUN_OUT}

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

            {HINT ( _ "Linaera is a leader and can recruit mages when standing on a keep.")}
            {HINT ( _ "Undead are resistant to physical attack. Use mages to attack the undead, and elves to protect and support the mages.")}
        [/objectives]

        [recall]
            id=Linaera
        [/recall]

        {RECALL_MAGE}

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

    [event]
        name=start

        [message]
            speaker=Linaera
            message= _ "The evil spirits who have settled in this wetland have turned it into a vile bog. My apprentices and I have the power to dispel them, but you must protect us from their weapons."
        [/message]
    [/event]

    [event]
        name=enemies defeated

        {RECALL_MAGE}

        [message]
            speaker=Linaera
            message= _ "Thank you, Erlornas... now I can return to my tower in peace. But I think some of my apprentices wish to follow you north in pursuit of the orcs."
        [/message]

        [message]
            role=mage
            message= _ "I have always wished to see elves, and now I have fought alongside them! May I please travel with you?"
        [/message]

        [message]
            speaker=Erlornas
            message= _ "Certainly... I shall be glad of your help."
        [/message]

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

    {HERODEATH_ERLORNAS}
    {HERODEATH_LINAERA}
[/scenario]
