#textdomain wesnoth-dm
[scenario]
    id=13_The_Return_of_Trouble
    name= _ "The Return of Trouble"
    {MEMOIRS_MAP 13_The_Return_of_Trouble.map}
    {TURNS 24 27 30}
    {DEFAULT_SCHEDULE}

    {INTRO_AND_SCENARIO_MUSIC northerners.ogg elvish-theme.ogg}
    {EXTRA_SCENARIO_MUSIC wanderer.ogg}
    {EXTRA_SCENARIO_MUSIC elf-land.ogg}
    {EXTRA_SCENARIO_MUSIC nunc_dimittis.ogg}

    next_scenario=14_Shadows_in_the_Dark
    disallow_recall=yes
    [story]
        [part]
            story=_"While Delfador was still at the Academy, major events were taking place throughout Wesnoth. After centuries of squabbling, a warlord emerged to unite the Orcs. This was ill tidings for men and Elves alike."
        [/part]
        [part]
            #po: "errantry" is an archaic English word associated with medieval
            #po: knights. It means he wandered around looking for monsters to
            #po: slay and wrongs to right.
            story=_"There was an elf named Kalenz who had already in Delfador’s time been a legend among his people for centuries; his tale, <i>The Legend of Wesmere</i>, is known throughout the Elven lands. Prolonged in life by a necromantic potion, he put aside the High Lordship of the Elves after the death of his beloved wife, and wandered the Great Continent in errantry."
        [/part]
        [part]
            story=_"But Kalenz half-knew and half-feared he would be needed again, and the day he had long foreseen finally arrived. Report came to him of large orcish forces attacking the outskirts of elvish forests, including Lintanir itself. Kalenz quickly gathered a small troop of picked guards. War had returned to the land of the Elves."
        [/part]
    [/story]
    {DM_TRACK {KALENZ_STAGE1}}

    #### Kalenz's side ####
    # wmllint: recognize Kalenz
    # wmllint: validate-off
    [side]
        side=1
        no_leader=yes
        controller=human
        team_name=allies
        user_team_name= _ "Elves"
        save_id=Player
        persistent=yes
        [unit]
            {KALENZ}
            facing=sw
            x=26
            y=2
            canrecruit=yes
        [/unit]
        {GOLD 320 310 380}
        {FLAG_VARIANT wood-elvish}
    [/side]
    #wmllint: validate-on

    # wmllint: recognize Chantal
    # wmllint: recognize Delfador

    ### Protagonist switching ###
    [event]
        name=prestart
        {KALENZ_TAKES_CONTROL}
    [/event]
    #### /Kalenz's side ####

    [side]
        type=Orcish Warlord
        id=Knafa-ord
        name=_ "Knafa-ord"
        facing=ne
        side=2
        canrecruit=yes
#ifdef EASY
        recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Goblin Pillager, Goblin Knight, Goblin Spearman
#endif

#ifdef NORMAL
        recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Goblin Knight, Orcish Slayer, Goblin Pillager, Goblin Spearman
#endif

#ifdef HARD
        recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Orcish Warrior, Goblin Knight, Goblin Pillager, Orcish Slayer, Goblin Spearman
#endif
        {GOLD 150 230 300}
        team_name=enemies
        user_team_name= _ "Pillagers"
        [ai]
            {NO_SCOUTS}
            recruitment_pattern=scout,fighter,fighter,archer,mixed fighter
        [/ai]
        [ai]
            time_of_day=dusk,first_watch,second_watch
            aggression=0.75
            caution=0.0
            grouping=no
        [/ai]
        {INCOME 4 8 12}
        {FLAG_VARIANT6 ragged}
    [/side]

    [side]
        type=Orcish Warlord
        id=Tan-drul
        name=_ "Tan-drul"
        facing=se
        side=3
        canrecruit=yes

#ifdef EASY
        recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Goblin Pillager, Goblin Knight, Goblin Spearman
#endif

#ifdef NORMAL
        recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Goblin Knight, Orcish Slayer, Goblin Pillager, Goblin Spearman
#endif

#ifdef HARD
        recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Orcish Warrior, Goblin Knight, Goblin Pillager, Orcish Slayer, Goblin Spearman
#endif
        {GOLD 250 300 380}
        team_name=enemies
        user_team_name= _ "Pillagers"
        [ai]
            {NO_SCOUTS}
            recruitment_pattern=scout,fighter,fighter,archer,mixed fighter
        [/ai]
        [ai]
            time_of_day=dusk,first_watch,second_watch
            aggression=0.75
            caution=0.0
            grouping=no
        [/ai]
        {INCOME 4 8 12}
        {FLAG_VARIANT6 ragged}
    [/side]

    [side]
        type=Orcish Warlord
        id=Krardul
        name=_ "Krardul"
        facing=sw
        side=4
        canrecruit=yes

#ifdef EASY
        recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Goblin Pillager, Goblin Knight, Goblin Spearman
#endif

#ifdef NORMAL
        recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Goblin Knight, Orcish Slayer, Goblin Pillager, Goblin Spearman
#endif

#ifdef HARD
        recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Orcish Warrior, Goblin Knight, Goblin Pillager, Orcish Slayer, Goblin Spearman
#endif
        {GOLD 250 300 380}
        team_name=enemies
        user_team_name= _ "Pillagers"
        [ai]
            {NO_SCOUTS}
            recruitment_pattern=scout,fighter,fighter,archer,mixed fighter
        [/ai]
        [ai]
            time_of_day=dusk,first_watch,second_watch
            aggression=0.75
            caution=0.0
            grouping=no
        [/ai]
        {INCOME 4 8 12}
        {FLAG_VARIANT6 ragged}
    [/side]

    [side]
        type=Elvish Captain
        id=Clartakis
        name=_ "Clartakis"
        facing=nw
        side=5
        canrecruit=yes
        recruit={ELVES}
        team_name=allies
        user_team_name= _ "Elves"
        {GOLD 250 250 290}
        {FLAG_VARIANT long}
    [/side]

    [event]
        name=prestart
        [objectives]
            side=1
            [objective]
                description= _ "Defeat all enemy leaders"
                condition=win
            [/objective]
            [objective]
                description= _ "Death of Kalenz"
                condition=lose
            [/objective]

            {TURNS_RUN_OUT}

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

    [event]
        name=start
        [message]
            id=Tan-drul
            message= _ "Kill these filthy elves! All warlords will then accept our leader, Zorlan, as king and he will reward you all!"
        [/message]
        [message]
            id=Kalenz
            message= _ "This is what we have been training for! Now we drive these beasts back!"
        [/message]
    [/event]

    [event]
        name=victory
        [switch]
            variable=chantal_store.type
            [case]
                value="Elvish Shyde"
                [message]
                    id=Kalenz
                    message= _ "The orcs are retreating! And... what is this? A shyde flying towards us as if hell were on her heels..."
                [/message]
            [/case]
            [else]
                [message]
                    id=Kalenz
                    message= _ "The orcs are retreating! And... what is this? A druid running to meet us as though hell were on her heels..."
                [/message]
            [/else]
        [/switch]

        {CHANTAL_RETURNS 1 14}
        {MAKE_HERO Chantal}
        [store_unit]
            variable=kalenz
            [filter]
                id=Kalenz
            [/filter]
        [/store_unit]
        {MOVE_UNIT (id=Chantal) "$kalenz.x" "$kalenz.y"}
        {CLEAR_VARIABLE kalenz}

        {INCIDENTAL_MUSIC love_theme.ogg}
        [message]
            id=Chantal
            message= _ "My lord Kalenz, at last I have found you!"
        [/message]
        [message]
            id=Kalenz
            message= _ "Chantal! Granddaughter! What are you doing here? You were not attacked, I hope."
        [/message]
        [message]
            id=Chantal
            message= _ "We were, but the enemy was vanquished. There are much more serious matters that require your attention."
        [/message]
        [message]
            id=Chantal
            message= _ "A paramount chief of all the Orcs has arisen, and he is setting a trap for the humans at the Ford of Abez. I think we must aid the humans, lest we be defeated separately once they are crushed."
        [/message]
        [message]
            id=Chantal
            message= _ "There is more ill news. Evil has been unleashed. A portal has been opened from the Land of the Dead. An army of undead is being raised as we speak."
        [/message]
        [message]
            id=Kalenz
            message= _ "This is very serious. Have you informed the elvish settlements?"
        [/message]
        [message]
            id=Chantal
            message= _ "Yes. And I have prepared holy water for our warriors. They should be able to hold against the undead in our forests, at least for now."
        [/message]
        [message]
            id=Kalenz
            message= _ "Holy water? What is this? Have you been dabbling where you should not, in the Book of Crelanu?"
        [/message]
        [message]
            id=Chantal
            message= _ "No. But Cleodil gave some of the Book’s least dangerous secrets to her daughters, and so I had them from my mother. And I think I have found the one we have been awaiting since Cleodil accepted the guardianship of the Book. You know of what I speak."
        [/message]
        [message]
            id=Kalenz
            message= _ "I never thought to see such a human, not even in all the years I have lived. Who is this person?"
        [/message]
        [message]
            id=Chantal
            message= _ "Delfador, a mage trusted of their King. He has survived a passage through the Land of the Dead not merely alive but uncorrupted. He helped us defeat the orcs when they threatened Lintanir, and I fought undead with him at Parthyn Ford. I have come north partly because I am thinking to fetch the Book of Crelanu so I can take it to him."
        [/message]
        [message]
            id=Kalenz
            message= _ "He is uncorrupted? You are sure of this?"
        [/message]
        [message]
            id=Chantal
            message= _ "I have bent my healing senses upon him. I am as sure as I can be."
        [/message]
        {INCIDENTAL_MUSIC loyalists.ogg}
        [message]
            id=Kalenz
            message= _ "Then we must aid him, and I must meet him. The King of Wesnoth is just a king; it is inner strength such as you describe that will turn back the darkness, if anything can. West, to the Ford of Abez!"
        [/message]
    [/event]

    {MEMOIRS_DEATHS}
[/scenario]
