#textdomain wesnoth-low
#ifdef MULTIPLAYER
[multiplayer]
    random_start_time=no
#ifndef DEBUG_MODE
    allow_new_game=no
#endif
#else
[scenario]    
#endif
    id=14_Human_Alliance
    name= _ "Human Alliance"

    {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 villages village}
        [capture_village]
            x=$villages[$village].x
            y=$villages[$village].y
        [/capture_village]
    {NEXT village}

    {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}
        {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}

#ifdef MULTIPLAYER
    next_scenario=null
#else
    next_scenario=15_The_Treaty
#endif

    [story]
        [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 350 325 300}
#enddef

    #wmllint: validate-off
    [side]
        {KALENZ}
        fog=no
        # wmllint: recognize Kalenz
        recruit={ELVES},{DWARVES}
        {PLAYER_GOLD}
#ifndef MULTIPLAYER
        [unit]
            {LANDAR}
            # wmllint: recognize Landar
            placement=leader
        [/unit]
        [unit]
            {OLURF}
            # wmllint: recognize Olurf
            placement=leader
        [/unit]
#endif
        [unit]
            {CLEODIL}
            # wmllint: recognize Cleodil
            placement=leader
        [/unit]
    [/side]
    #wmllint: validate-on
    [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 600 550 500}
        {INCOME 30 30 30}
        recruit=Heavy Infantryman,Dragoon,Longbowman,Duelist,Halberdier,Horseman,Cavalier,Cavalryman, Royal Guard, Mage, Swordsman, Bowman
        team_name=player
        user_team_name= _ "Player"
        {FLAG_VARIANT loyalist}
        {ai/aliases/stable_singleplayer.cfg}  #note that this MUST be given OUTSIDE the 'ai' tag
        [ai]
            {AI_SIMPLE_ALWAYS_ASPECT passive_leader_shares_keep yes}
 	    [avoid]
                x=1-47
                y=1-14
            [/avoid]

            {AI_SIMPLE_ALWAYS_ASPECT village_value 0}
            {AI_SIMPLE_ALWAYS_ASPECT leader_value 0}

            {AI_SIMPLE_DAY_ASPECT grouping offensive}
            {AI_SIMPLE_DAY_ASPECT aggression 0.4}
            {AI_SIMPLE_DAY_ASPECT caution 0.5}

            {AI_SIMPLE_NIGHT_ASPECT grouping defensive}            
            {AI_SIMPLE_NIGHT_ASPECT aggression 0}
            {AI_SIMPLE_NIGHT_ASPECT caution 1}
            [goal]
                name=protect_location
                id=protect_citadel
                value=10
                protect_radius=13
                [criteria]
                     x,y=34,27
                [/criteria]
            [/goal]
            
       #     {AI_SIMPLE_ALWAYS_ASPECT villages_per_scout 5}
       #     {AI_SIMPLE_ALWAYS_ASPECT recruitment_pattern "scout,scout,scout,fighter,archer,mixed fighter"}
       #     {MODIFY_AI_ADD_CANDIDATE_ACTION 4 main_loop {AI_CA_POISONING}}
        [/ai]
    [/side]

    [side]
        side=3
        allow_player=no
        type=Orcish Warlord
        id=Pirror
        name=_ "Pirror"
        canrecruit=yes
#ifdef EASY
        recruit={ORCS1}, 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
        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
        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}
        #        {INCOME 4 8 12}
    [/side]

    [side]
        side=6
        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 4 8 12}
        {INCOME 12 20 26}
    [/side]

    [event]
        name=prestart

        [objectives]
            side=0
            [objective]
                description= _ "Last for the end of turns"
                condition=win
            [/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]
            note={NO_EARLY_FINISH_BONUS_NOTE}
        [/objectives]
    [/event]

    [event]
        name=start
        [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=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
            generate_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]
    [/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 220 300 350}
        {INCOME 12 20 26}
        team_name=orcs
        user_team_name= _ "Enemies"
        {ORCS}
    [/side]

    [side]
        side=8
        allow_player=no
        controller=ai
        no_leader=yes
        {GOLD 220 300 350}
        {INCOME 12 20 26}
        team_name=orcs
        user_team_name= _ "Enemies"
        {ORCS}
    [/side]

    [side]
        side=9
        allow_player=no
        controller=ai
        no_leader=yes
        {GOLD 220 300 350}
        {INCOME 12 20 26}
        team_name=orcs
        user_team_name= _ "Enemies"
        {ORCS}
    [/side]

    [event]
        name=side 2 turn 7
        [gold]
            side=2
            amount=250
        [/gold]
    [/event]

    [event]
        name=side 3 turn 5
        #TODO remove debug code
        #name=side 3 turn 2

        [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 220 300 350}
        {INCOME 12 20 26}
        team_name=orcs
        user_team_name= _ "Enemies"
        {ORCS}
    [/side]

    [side]
        side=11
        allow_player=no
        controller=ai
        no_leader=yes
        {GOLD 220 300 350}
        {INCOME 12 20 26}
        team_name=orcs
        user_team_name= _ "Enemies"
        {ORCS}
    [/side]

    [side]
        side=12
        allow_player=no
        controller=ai
        no_leader=yes
        {GOLD 220 300 350}
        {INCOME 12 20 26}
        team_name=orcs
        user_team_name= _ "Enemies"
        {ORCS}
    [/side]

    [event]
        name=side 3 turn 12
        #        name=side 3 turn 3

        [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 ####

#ifdef MULTIPLAYER
    #wmllint: validate-off
    [side]
        side=13
        {PLAYER_GOLD}
        fog=no
        {LANDAR}
        # wmllint: recognize Landar
        recruit={ELVES}
    [/side]
    [side]
        side=14
        {PLAYER_GOLD}
        fog=no
        {OLURF}
        team_name=player
        user_team_name= _ "Player"
        recruit={DWARVES}
    [/side]
    #wmllint: validate-on
#endif

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

    [event]
        name=turn 9
        #TODO remove debug output
        #        name=turn 2
        [unit]
            id=Olontoril
            #name= _ "Olontoril"
            type=Elvish Hero
            side=1
            x=9
            y=15
            [modifications]
                {TRAIT_STRONG}
                {TRAIT_RESILIENT}
            [/modifications]
        [/unit]
        [unit]
            id=Artolas
            #name=_ "Artolas"
            type=Elvish Marksman
            side=1
            x=9
            y=15
            [modifications]
                {TRAIT_DEXTROUS}
                {TRAIT_QUICK}
            [/modifications]
        [/unit]
        [unit]
            type=Elvish Scout
            id=Irglus
            #name=_ "Irglus"
            side=1
            x=9
            y=15
        [/unit]
        [unit]
            id=Antomeril
            #name=_ "Antomeril"
            type=Elvish Fighter
            side=1
            x=9
            y=15
            [modifications]
                {TRAIT_STRONG}
                {TRAIT_INTELLIGENT}
            [/modifications]
        [/unit]
        [unit]
            id=Lirdomer
            #name=_ "Lirdomer"
            type=Elvish Fighter
            side=1
            x=9
            y=15
            [modifications]
                {TRAIT_INTELLIGENT}
                {TRAIT_RESILIENT}
            [/modifications]
        [/unit]
        [unit]
            id=Eomil
            #name=_ "Eomil"
            type=Elvish Archer
            side=1
            x=9
            y=15
            [modifications]
                {TRAIT_QUICK}
                {TRAIT_RESILIENT}
            [/modifications]
        [/unit]
        [unit]
            id=Toltilas
            #name=_ "Toltilas"
            type=Elvish Archer
            side=1
            x=9
            y=15
            [modifications]
                {TRAIT_DEXTROUS}
                {TRAIT_RESILIENT}
            [/modifications]
        [/unit]

        {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
                    #TODO ESR it's not Kalenz that is arriving but the speaker.
                    #Something like "Kalenz is here!" or "We have found Kalenz!" fits better.
                    message= _ "Kalenz has arrived!"
                [/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]
                #TODO some speak for Landar
                #TODO some speak for Cleodil
            [/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=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
