#textdomain wesnoth-low
#ifdef MULTIPLAYER
[multiplayer]
#ifdef HARD
    name= _ "4p MC — LoW, Hard Mode, Chapter four"
    description= _ "<i>The Legend of Wesmere</i>\nMultiplayer Campaign\nChapter four\n Hard difficulty"
    id=14_Human_Alliance_HARD
#endif
#ifdef EASY
    name= _ "4p MC — LoW, Easy Mode, Chapter four"
    description= _ "<i>The Legend of Wesmere</i>\nMultiplayer Campaign\nChapter four\n Easy difficulty"
    id=14_Human_Alliance_EASY
#endif
#ifdef NORMAL
    name= _ "4p MC — LoW, Normal Mode, Chapter four"
    description= _ "<i>The Legend of Wesmere</i>\nMultiplayer Campaign\nChapter four\n Normal difficulty"
    id=14_Human_Alliance_NORMAL
#endif
    random_start_time=no
    allow_new_game=yes

#else
    [scenario]
        name= _ "Human Alliance"
        id=14_Human_Alliance
#endif

        experience_modifier=100
        next_scenario=15_The_Treaty

        {LOW_MAP 14_Human_Alliance.map}
        #shortens the map on the left border for the later reenforcements

        #        {LOW_PRESTART}

#define LOAD_SUBMAP X_SPAN Y_SPAN OFFSET_X OFFSET_Y
    [store_unit]
        [filter]
        [/filter]
        variable=MOVE_UNIT_store
        kill=yes
    [/store_unit]
    [store_villages]
        variable=villages
    [/store_villages]

    {FOREACH MOVE_UNIT_store unit}
        {VARIABLE_OP MOVE_UNIT_store[$unit].x add {OFFSET_X}}
        {VARIABLE_OP MOVE_UNIT_store[$unit].y add {OFFSET_Y}}
        {VARIABLE_OP MOVE_UNIT_store[$unit].goto_x add {OFFSET_X}}
        {VARIABLE_OP MOVE_UNIT_store[$unit].goto_y add {OFFSET_Y}}
    {NEXT unit}

    {FOREACH villages village}
        #Make the villages on the old map neutral
        [capture_village]
            x=$villages[$village].x
            y=$villages[$village].y
        [/capture_village]
        {VARIABLE_OP villages[$village].x add {OFFSET_X}}
        {VARIABLE_OP villages[$village].y add {OFFSET_Y}}
    {NEXT village}

    [replace_map]
        x={X_SPAN}
        y={Y_SPAN}
        {LOW_MAP 14_Human_Alliance.map}
    [/replace_map]

    {FOREACH MOVE_UNIT_store unit}
        [unstore_unit]
            variable=MOVE_UNIT_store[$unit]
            find_vacant=no
        [/unstore_unit]
    {NEXT unit}
    {CLEAR_VARIABLE unit}
    {CLEAR_VARIABLE MOVE_UNIT_store}

    {FOREACH villages village}
        [capture_village]
            x=$villages[$village].x
            y=$villages[$village].y
            side=$villages[$village].owner_side
        [/capture_village]
    {NEXT village}

    {CLEAR_VARIABLE village}
    {CLEAR_VARIABLE villages}
#enddef

        [event]
            name=prestart
            {LOAD_SUBMAP 9-99 1-99 -8 0}
        [/event]

        #out of turns leads to victory
        {TURNS 18 20 22}
        victory_when_enemies_defeated=no

        #TODO at what time does the battle begin?
        {DEFAULT_SCHEDULE}

        #TODO split the villages instead of leaving them unassigned in MP?
#ifndef MULTIPLAYER
        {STARTING_VILLAGES_ELF   1}
#endif
        {STARTING_VILLAGES_HUMAN 2}
        {STARTING_VILLAGES_TROLL 5}

        {INTRO_AND_SCENARIO_MUSIC revelation.ogg loyalists.ogg}
        {EXTRA_SCENARIO_MUSIC the_city_falls.ogg}
        {EXTRA_SCENARIO_MUSIC knolls.ogg}
        {EXTRA_SCENARIO_MUSIC heroes_rite.ogg}
        {EXTRA_SCENARIO_MUSIC breaking_the_chains.ogg}
        {EXTRA_SCENARIO_MUSIC northerners.ogg}
        {EXTRA_SCENARIO_MUSIC siege_of_laurelmor.ogg}
        {EXTRA_SCENARIO_MUSIC elvish-theme.ogg}
        {EXTRA_SCENARIO_MUSIC casualties_of_war.ogg}

        [story]
#ifdef MULTIPLAYER
            [part]
                delay=4000
                title= _ "<i>The Legend of Wesmere</i>,
Chapter Four"
            [/part]
#endif
            [part]
                title= _ "Chapter Four,
<i>The Alliance</i>"
                #delay=4000
                #show_title=yes
            [/part]
            [part]
                story= _ "With the human-elf alliance revived, our heroes hurried to the battlefield..."
                delay=4000
                {TO_HUMAN_ALLIANCE}
            [/part]
            [part]
                show_title=yes
                {TO_HUMAN_ALLIANCE_BATTLE}
            [/part]
        [/story]

#define PLAYER_GOLD
    {GOLD 250 200 150}
#enddef
#define MULTIPLAYER_GOLD
    {GOLD 65 50 40}
#enddef

        [side]
            side=1
            {PLAYABLE}
            no_leader=yes
            save_id=Kalenz
            extra_recruit=Elvish Fighter, Elvish Archer, Elvish Scout
            #TODO clean up
            #            [unit]
            #                # wmllint: recognize Kalenz
            #                {KALENZ}
            #                x=25
            #                y=11
            #            [/unit]

            fog=no
            shroud=no

#ifndef MULTIPLAYER
            {PLAYER_GOLD}
            [unit]
                {LANDAR}
                extra_recruit=Elvish Fighter, Elvish Archer, Elvish Scout
                # wmllint: recognize Landar
                x=25
                y=13
            [/unit]
            [unit]
                {CLEODIL}
                extra_recruit=Elvish Shaman, Elvish Scout, Wose
                # wmllint: recognize Cleodil
                x=27
                y=12
            [/unit]
            [unit]
                {OLURF}
                extra_recruit=Dwarvish Fighter, Dwarvish Thunderer, Dwarvish Scout, Dwarvish Guardsman
                # wmllint: recognize Olurf
                x=36
                y=10
            [/unit]
#else
            {MULTIPLAYER_GOLD}
#endif
        [/side]
        [event]
            name=prestart
            {RECALL_LOYALS}
        [/event]

        [side]
            side=2
            allow_player=no
            type=General
            id=Aldar
            name= _ "Aldar"
            profile="portraits/aldar.png"
            controller=ai
            canrecruit=yes
            {GOLD 550 500 450}
            recruit=Heavy Infantryman,Dragoon,Longbowman,Duelist,Halberdier,Horseman,Cavalier,Cavalryman, Royal Guard, Mage, Swordsman, Bowman
            team_name=player
            user_team_name= _ "Player"

            {LOYALIST_SETUP}
            #{FLAG_VARIANT loyalist}
            [ai]
                passive_leader=yes
                [avoid]
                    x=1-47
                    y=1-14
                [/avoid]
            [/ai]
        [/side]

        [side]
            side=3
            allow_player=no
            type=Orcish Warlord
            id=Pirror
            name=_ "Pirror"
            canrecruit=yes
#ifdef EASY
            recruit=Orcish Grunt, Orcish Assassin, Orcish Crossbowman, Goblin Pillager, Goblin Knight
#endif

#ifdef NORMAL
            recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Goblin Pillager, Goblin Knight, Orcish Slayer, Orcish Warrior, 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, Goblin Impaler, Goblin Rouser, Direwolf Rider
#endif
            {GOLD 320 400 430}
            team_name=orcs
            user_team_name= _ "Enemies"
            [ai]
                {NO_SCOUTS}
                recruitment_ignore_bad_movement=yes
                recruitment_pattern=scout,fighter,fighter,archer,mixed fighter
                {ATTACK_DEPTH 4 5 6}
            [/ai]
            [ai]
                time_of_day=dusk,first_watch,second_watch
                aggression=0.75
                caution=0.0
                grouping=no
            [/ai]
            {INCOME 12 20 26}
        [/side]

        [side]
            side=4
            {ORC_SETUP}
            allow_player=no
            type=Orcish Warlord
            id=Tan-Grub
            name=_ "Tan-Grub"
            profile="portraits/orcs/transparent/warlord.png"
            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 Pillager, Goblin Knight, Goblin Spearman, Orcish Slayer, Orcish Warrior
#endif
#ifdef HARD
            recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Goblin Pillager, Goblin Knight, Goblin Spearman, Orcish Slayer, Orcish Warrior, Goblin Impaler
#endif
            {GOLD 220 300 360}
            team_name=orcs
            user_team_name= _ "Enemies"
            [ai]
                {NO_SCOUTS}
                recruitment_ignore_bad_movement=yes
                recruitment_pattern=scout,fighter,fighter,archer,mixed fighter
                {ATTACK_DEPTH 4 5 6}
            [/ai]
            [ai]
                time_of_day=dusk,first_watch,second_watch
                aggression=0.75
                caution=0.0
                grouping=no
            [/ai]
            {INCOME 12 20 26}
            #        {INCOME 4 8 12}
        [/side]

        [side]
            side=5
            {TROLL_SETUP}
            allow_player=no
            controller=ai
            type=Great Troll
            id=Grol
            name=_ "Grol"
            canrecruit=yes
            #TODO think about adding troll shamans
#ifdef EASY
            recruit=Troll Whelp, Troll
#endif
#ifdef NORMAL
            recruit=Troll Whelp, Troll, Troll Rocklobber
#endif
#ifdef HARD
            recruit=Troll Whelp, Troll, Troll Rocklobber, Troll Warrior
#endif
            {GOLD 220 260 300}
            team_name=orcs
            user_team_name= _ "Enemies"
            [ai]
                {NO_SCOUTS}
                recruitment_ignore_bad_movement=yes
#ifdef EASY
                recruitment_pattern=fighter
#else
                recruitment_pattern=fighter,fighter,mixed fighter
#endif
                grouping=no
                {ATTACK_DEPTH 4 5 6}
            [/ai]
            {INCOME 12 20 26}
        [/side]

        [side]
            side=6
            {ORC_SETUP}
            allow_player=no
            controller=ai
            type=Orcish Warlord
            id=Khafa-Urg
            name=_ "Khafa-Urg"
            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 Pillager, Goblin Knight, Goblin Spearman, Orcish Slayer, Orcish Warrior
#endif
#ifdef HARD
            recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Goblin Pillager, Goblin Knight, Goblin Spearman, Orcish Slayer, Orcish Warrior, Goblin Impaler
#endif
            {GOLD 320 400 450}
            team_name=orcs
            user_team_name= _ "Enemies"
            [ai]
                {NO_SCOUTS}
                recruitment_ignore_bad_movement=yes
                recruitment_pattern=scout,fighter,fighter,archer,mixed fighter
                {ATTACK_DEPTH 4 5 6}
            [/ai]
            [ai]
                time_of_day=dusk,first_watch,second_watch
                aggression=0.75
                caution=0.0
                grouping=no
            [/ai]
            {INCOME 12 20 26}
        [/side]

        [event]
            name=side 1 turn 1

            # wmllint: recognize Arkildur
            # wmllint: recognize Tameril-Isimeril
            # wmllint: recognize Laril
            # wmllint: recognize Anduilas

#ifdef MULTIPLAYER
            {GET_PERSISTENT_RECALLS_FROM4 1 5 6 7 LoW_Chapter_Three kalenz}
            {GET_PERSISTENT_RECALLS_FROM4 5 1 6 7 LoW_Chapter_Three landar}
            {GET_PERSISTENT_RECALLS_FROM4 6 1 5 7 LoW_Chapter_Three olurf}
            {GET_PERSISTENT_RECALLS_FROM4 7 1 5 6 LoW_Chapter_Three cleodil}
#endif

            [recall]
                side=1
                id=Kalenz
                x=17
                y=11
            [/recall]

            [recall]
                side=
                id=Landar
                x=21
                y=13
            [/recall]

            [recall]
                side=
                id=Cleodil
                x=23
                y=12
            [/recall]

            [recall]
                side=
                id=Olurf
                x=32
                y=10
            [/recall]
        [/event]

        [event]
            name=prestart

            [objectives]
                side=0
                [objective]
                    description= _ "Last for the end of turns"
                    condition=win
                    show_turn_counter=yes
                [/objective]
                [objective]
                    description= _ "Death of Kalenz"
                    condition=lose
                [/objective]
                [objective]
                    description= _ "Death of Landar"
                    condition=lose
                [/objective]
                [objective]
                    description= _ "Death of Olurf"
                    condition=lose
                [/objective]
                [objective]
                    description= _ "Death of Cleodil"
                    condition=lose
                [/objective]
                [objective]
                    description= _ "Death of Aldar"
                    condition=lose
                [/objective]

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

        [event]
            name=side 1 turn 1
            [message]
                id=Kalenz
                message= _ "Tremble, orcs! The vengeance of the Elves is upon you!!"
            [/message]
            [message]
                id=Aldar
                message= _ "So it is true! The elves have come to our aid!"
            [/message]
            [message]
                id=Olurf
                message= _ "Hey! Do I look like an elf?"
            [/message]
            [message]
                id=Landar
                message= _ "I can scarce believe I am fighting besides these betrayers."
            [/message]
            [message]
                id=Cleodil
                message= _ "We cannot be choosy about our allies when our need is dire."
            [/message]
            [message]
                id=Kalenz
                message= _ "Indeed not. Save your anger for our enemies, Landar."
            [/message]
            [message]
                id=Landar
                message= _ "I shall. But when our need is not so dire, there must be a reckoning..."
            [/message]
            [message]
                id=Tan-Grub
                #canrecruit=yes
                #race=orc
                message= _ "An elven army to the north? And they have dwarves with them? We must defeat them in detail before they combine, which means attacking before our reinforcements arrive. Maybe we can beat the humans before the elves can intervene. Overrun city and castle!"
            [/message]

            [message]
                speaker=narrator
                message= _ "The brazen cry of a war-horn is heard in the distance."
                sound=horn-signals/horn-2.ogg
                image="portraits/goblins/transparent/rouser-2.png"
            [/message]

            [unit]
                id=Aldun
                name= _ "Aldun"
                type=Horseman
                random_traits=yes
                side=2
                x=33
                y=24
                facing=sw
            [/unit]
            {MOVE_UNIT id=Aldun 21 16}

            [message]
                id=Aldun
                message= _ "General Aldar has received your message. He asks that you engage the orcish reinforcements from the north, preventing them from joining with their fellows here. Those fresh troops must not be allowed to enter the battle! Our reinforcements should arrive in a few days."
            [/message]
            [message]
                id=Kalenz
                message= _ "Very well... But have you any word of the elvish troops marching to join us? We are too few to defeat the enemy without them."
            [/message]
            [message]
                id=Aldun
                message=_"We have no news from the Ka’lian."
            [/message]
        [/event]

        #### reenforcements for the orcs ####

#define ORCS
#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 Pillager, Goblin Knight, Goblin Spearman, Orcish Slayer, Orcish Warrior
#endif
#ifdef HARD
    recruit=Orcish Archer, Orcish Assassin, Orcish Grunt, Wolf Rider, Orcish Crossbowman, Goblin Pillager, Goblin Knight, Goblin Spearman, Orcish Slayer, Orcish Warrior, Goblin Impaler
#endif
#enddef

        [side]
            side=7
            allow_player=no
            controller=ai
            no_leader=yes
            {GOLD 320 400 450}
            {INCOME 12 20 26}
            team_name=orcs
            user_team_name= _ "Enemies"
            {ORCS}
            {ORC_SETUP}
        [/side]

        [side]
            side=8
            allow_player=no
            controller=ai
            no_leader=yes
            {GOLD 320 400 450}
            {INCOME 12 20 26}
            team_name=orcs
            user_team_name= _ "Enemies"
            {ORCS}
            {ORC_SETUP}
        [/side]

        [side]
            side=9
            allow_player=no
            controller=ai
            no_leader=yes
            {GOLD 320 400 450}
            {INCOME 12 20 26}
            team_name=orcs
            user_team_name= _ "Enemies"
            {ORCS}
            {ORC_SETUP}
        [/side]

        [event]
#ifndef DEBUG_MODE
            name=side 3 turn 5
#else
            name=side 3 turn 2
#endif

            [message]
                speaker=narrator
                message= _ "The brazen cry of a war-horn is heard in the distance."
                sound=horn-signals/horn-2.ogg
                image="portraits/goblins/transparent/rouser-2.png"
            [/message]

            {LOAD_SUBMAP 5-99 1-99 4 0}

            [unit]
                role=reenforce1
                type=Orcish Warlord
                generate_name=yes
                random_traits=yes
                profile="portraits/orcs/transparent/warlord.png"
                side=7
                x=1
                y=5
                canrecruit=yes
            [/unit]

            [unit]
                role=reenforce2
                type=Orcish Warlord
                generate_name=yes
                random_traits=yes
                profile="portraits/orcs/transparent/warlord.png"
                side=8
                x=1
                y=28
                canrecruit=yes
            [/unit]

            [unit]
                role=reenforce3
                type=Orcish Warlord
                generate_name=yes
                random_traits=yes
                profile="portraits/orcs/transparent/grunt-2.png"
                side=9
                x=1
                y=32
                canrecruit=yes
            [/unit]

            [redraw]
            [/redraw]

            [message]
                id=Aldar
                message= _ "More of them arrive."
            [/message]

            [message]
                role=reenforce1
                message= _ "Our wolves’ teeth will crack their bones! Attack!"
            [/message]

            [scroll_to_unit]
                role=reenforce3
            [/scroll_to_unit]

            [delay]
                time=2000
            [/delay]

            [message]
                role=reenforce2
                message= _ "Blood and steel! Hunt the worms down and crush them!"
            [/message]
        [/event]

        [side]
            side=10
            allow_player=no
            controller=ai
            no_leader=yes
            {GOLD 320 400 450}
            {INCOME 12 20 26}
            team_name=orcs
            user_team_name= _ "Enemies"
            {ORCS}
            {ORC_SETUP}
        [/side]

        [side]
            side=11
            allow_player=no
            controller=ai
            no_leader=yes
            {GOLD 320 400 450}
            {INCOME 12 20 26}
            team_name=orcs
            user_team_name= _ "Enemies"
            {ORCS}
            {ORC_SETUP}
        [/side]

        [side]
            side=12
            allow_player=no
            controller=ai
            no_leader=yes
            {GOLD 320 400 450}
            {INCOME 12 20 26}
            team_name=orcs
            user_team_name= _ "Enemies"
            {ORCS}
            {ORC_SETUP}
        [/side]

#ifdef MULTIPLAYER
        [side]
            #Landar's side
            side=13
            team_name=player
            user_team_name= _ "Player"
            fog=no
            shroud=no
            {PLAYABLE}
            {LANDAR}
            {MULTIPLAYER_GOLD}
            x=28
            y=11
            # wmllint: recognize Landar
            recruit=Elvish Fighter, Elvish Archer, Elvish Scout
        [/side]
        [side]
            #Olurf's side
            side=14
            fog=no
            shroud=no
            {PLAYABLE}
            {OLURF}
            {MULTIPLAYER_GOLD}
            x=36
            y=10
            # wmllint: recognize Olurf
            team_name=player
            user_team_name= _ "Player"
            extra_recruit=Dwarvish Fighter, Dwarvish Scout, Dwarvish Guardsman, Dwarvish Thunderer
        [/side]
        [side]
            #Cleodil's side
            side=15
            fog=no
            shroud=no
            {PLAYABLE}
            {CLEODIL}
            {MULTIPLAYER_GOLD}
            x=36
            y=10
            # wmllint: recognize Olurf
            team_name=player
            user_team_name= _ "Player"
            extra_recruit=Elvish Shaman, Wose, Elvish Scout
        [/side]
#endif

        [event]
#ifndef DEBUG_MODE
            name=side 3 turn 12
#else
            name=side 3 turn 3
#endif

            [message]
                speaker=narrator
                message= _ "The brazen cry of a war-horn is heard in the distance."
                sound=horn-signals/horn-2.ogg
                image="portraits/goblins/transparent/rouser-2.png"
            [/message]

            {LOAD_SUBMAP 1-99 1-99 4 0}

            [unit]
                role=reenforce4
                type=Orcish Warlord
                generate_name=yes
                random_traits=yes
                profile="portraits/orcs/transparent/grunt-2.png"
                side=10
                x=2
                y=7
                canrecruit=yes
            [/unit]

            [unit]
                role=reenforce5
                type=Orcish Warlord
                generate_name=yes
                random_traits=yes
                profile="portraits/orcs/transparent/grunt-2.png"
                side=11
                x=1
                y=40
                canrecruit=yes
            [/unit]

            [unit]
                role=reenforce6
                type=Orcish Warlord
                generate_name=yes
                random_traits=yes
                profile="portraits/orcs/transparent/grunt-3.png"
                side=12
                x=1
                y=45
                canrecruit=yes
            [/unit]

            [redraw]
            [/redraw]

            [message]
                role=reenforce5
                message=_ "Har har har!"
            [/message]
        [/event]

        #### /reenforcements for the orcs ####

        #### reenforcements for the player ####

        [event]
#ifndef DEBUG_MODE
            name=turn 9
#else
            name=turn 2
#endif

            {FOREACH l3_store_kalenz i}
                [unstore_unit]
                    find_vacant=yes
                    variable=l3_store_kalenz[$i]
                    x=9
                    y=15
                [/unstore_unit]
                [role]
                    role=l3_store
                    id=$l3_store_kalenz[$i].id
                [/role]
                {MODIFY_UNIT (id=$l3_store_kalenz[$i].id) facing ne}
            {NEXT i}
            {CLEAR_VARIABLE i}

#ifdef MULTIPLAYER
            {FOREACH l3_store_landar i}
                [unstore_unit]
                    find_vacant=yes
                    variable=l3_store_landar[$i]
                    x=9
                    y=15
                [/unstore_unit]
                [role]
                    role=l3_store
                    id=$l3_store_landar[$i].id
                [/role]
                {MODIFY_UNIT (id=$l3_store_landar[$i].id) facing ne}
                {MODIFY_UNIT (id=$l3_store_landar[$i].id) side 13}
            {NEXT i}
            {CLEAR_VARIABLE i}
#endif

            [if]
                [not]
                    [variable]
                        name=l3_store_kalenz.length
                        numerical_equals=0
                    [/variable]
                [/not]
#ifdef MULTIPLAYER
                [or]
                    [not]
                        [variable]
                            name=l3_store_landar.length
                            numerical_equals=0
                        [/variable]
                    [/not]
                [/or]
#endif
                [then]
                    [message]
                        role=l3_store
                        message= _ "Kalenz! We come to fight beside you!"
                    [/message]
                    [message]
                        id=Kalenz
                        message= _ "Where is the rest of the elvish army? They were promised and should be here!"
                    [/message]
                    [message]
                        role=l3_store
                        message= _ "The Great Council has decided it was too risky to send troops here. But some of us dissented and have come to fight beside you."
                    [/message]
                    [message]
                        id=Landar
                        message= _ "That is well! If the Ka’lian is too fearful or blind to see what is needed, we must do it ourselves."
                    [/message]
                    [message]
                        id=Cleodil
                        message= _ "It is not well that we have become so divided as this."
                    [/message]
                    [message]
                        id=Kalenz
                        message= _ "No, it is not. But if we do not defeat these orcs here and now our divisions will all be moot. I will take every sword-arm I can get and be glad of them."
                    [/message]
                [/then]
            [/if]
            #TODO else -- the player has to know that the kalian refused help.
            {CLEAR_VARIABLE l3_store_kalenz}
#ifdef MULTIPLAYER
            {CLEAR_VARIABLE l3_store_landar}
#endif
        [/event]

        [event]
            name=time over

            [unit]
                type=Paladin
                id=Kulrad
                name=_ "Kulrad"
                side=2
                x=38
                y=30
            [/unit]

            {GENERIC_UNIT 2 Knight 43 33}
            {GENERIC_UNIT 2 Knight 43 36}

            {GENERIC_UNIT 2 Horseman 38 34}
            {GENERIC_UNIT 2 Horseman 42 35}
            {GENERIC_UNIT 2 Horseman 39 34}
            {GENERIC_UNIT 2 Horseman 43 37}
            {GENERIC_UNIT 2 Horseman 41 37}
            {GENERIC_UNIT 2 Horseman 41 39}

            [message]
                id=Kulrad
                message= _ "I see foul orcs to be ridden down! Charge!"
            [/message]
            [message]
                race=orc
                canrecruit=yes
                message= _ "More of the cursed horse-pokers!! Run, let’s get out of here!"
            [/message]

            #TODO move the message in a macro
            [message]
                speaker=narrator
                message= _ "The not-at-all-brazen cry of a war-horn is heard in the distance."
                #TODO rethink about which signal to use here
                sound=horn-signals/horn-8.ogg
                image="portraits/goblins/transparent/rouser-2.png"
            [/message]

            [endlevel]
                result=victory
                bonus=no
                save=no
            [/endlevel]
        [/event]

        [event]
            name=enemies defeated
            [message]
                id=Aldar
                message= _ "This is only a pause in their onslaught. Reform, men, and bind your wounds as you may. They’ll be back."
            [/message]
            #TODO CRAB
            #[modify_ai]
            #
            #[/modify_ai]
        [/event]

        #wmllint: recognize Cleodil
        [event]
            name=victory
            [message]
                id=Kalenz
                message= _ "We have thwarted the Orcs once again!"
            [/message]
            [message]
                id=Cleodil
                message= _ "And we revived the alliance with the Humans, which is no small thing."
            [/message]
            [message]
                id=Kalenz
                message= _ "Indeed it is not. As always, Cleodil, you speak with the wisdom and care that befits a healer. That is a good reminder for those who must walk the path of steel and warfare, and touches my heart."
            [/message]
            [message]
                id=Olurf
                message= _ "A good fight against foul enemies. These orcs make a dwarf’s hackles rise; I might even fight them for free, next time."
            [/message]
            [message]
                id=Aldar
                message= _ "The King is here! Hail Haldric II, King of Wesnoth!"
            [/message]
            #TODO Landar is quiet?
            [kill]
                id=Aldun
            [/kill]
        [/event]

        [event]
            name=last breath
            [filter]
                id=Aldar
            [/filter]
            [message]
                speaker=unit
                message= _ "Tath will fall! We have failed!"
            [/message]
            [endlevel]
                result=defeat
            [/endlevel]
        [/event]

        [event]
            name=last breath
            [filter]
                id=Grol
            [/filter]
            [message]
                speaker=unit
                message= _ "I die? Great Chief never said anything about fighting elves and dwarves!"
            [/message]
        [/event]

        {campaigns/Legend_of_Wesmere/utils/deaths.cfg}
#ifndef MULTIPLAYER
    [/scenario]
#else
[/multiplayer]
#endif

#undef PLAYER_GOLD
#undef MULTIPLAYER_GOLD
