#textdomain wesnoth-low

#TODO give the player a reward for saving Eradion
#TODO Add the ogre cage idea.
#TODO give a reward for saving some of the Kalian gold.
#TODO add the water sound effects.
#TODO try to tune the troll ai to not start a suicide run against the wood border.

{./07_Elves_Last_Stand_utils.cfg}

#ifdef MULTIPLAYER
[multiplayer]
    random_start_time=no
#ifndef DEBUG_MODE
    allow_new_game=no
#endif

#ifdef HARD
    id=07_Elves_Last_Stand_HARD
#endif
#ifdef EASY
    id=07_Elves_Last_Stand_EASY
#endif
#ifdef NORMAL
    id=07_Elves_Last_Stand_NORMAL
#endif

#else
    [scenario]
        id=07_Elves_Last_Stand
#endif

        experience_modifier=100
        next_scenario=08_Council_of_Hard_Choices
        name= _ "Elves’ Last Stand"

        ### Story ###
        [story]
            [part]
                story= _ "The journey back to Wesmere was surprisingly uneventful, the orcs having apparently withdrawn to regroup after their defeats. Kalenz and his band returned just in time..."
                delay=4000
            [/part]
            [part]
                show_title=yes
                delay=4000
                {TO_ELVES_LAST_STAND}
            [/part]
        [/story]
        ### /Story ###

        ### Music playlist ###
        {INTRO_AND_SCENARIO_MUSIC elf-land.ogg elvish-theme.ogg}
        {EXTRA_SCENARIO_MUSIC the_city_falls.ogg}
        {EXTRA_SCENARIO_MUSIC silvan_sanctuary.ogg}
        {EXTRA_SCENARIO_MUSIC wanderer.ogg}
        {EXTRA_SCENARIO_MUSIC siege_of_laurelmor.ogg}
        {EXTRA_SCENARIO_MUSIC heroes_rite.ogg}
        {EXTRA_SCENARIO_MUSIC casualties_of_war.ogg}
        ### /Music playlist ###

        ### Map setup ###
        {TURNS 35 30 25}

        {DEFAULT_SCHEDULE_AFTERNOON}

        {LOW_MAP  Kalian.map}
        {LOW_MASK 07_Elves_Last_Stand.mask 1 1}
        {campaigns/Legend_of_Wesmere/maps/Kalian_map.cfg}

        #        {LOW_PRESTART}

        ### /Map Setup ###

#define PLAYER_GOLD
    {GOLD 600 500 400}
#enddef
#define MULTIPLAYER_GOLD
    {GOLD 200 166 133}
#enddef

        #### Kalenz ###
        [side]
            # wmllint: recognize Kalenz
            {KALENZ}
            extra_recruit=Elvish Fighter, Elvish Archer, Elvish Scout
            fog=no
            shroud=no
            x=42
            y=14
#ifndef MULTIPLAYER
            {PLAYER_GOLD}
            [unit]
                # wmllint: recognize Landar
                {LANDAR}
                extra_recruit=Elvish Fighter, Elvish Archer, Elvish Scout
                x=42
                y=10
            [/unit]
            [unit]
                # wmllint: recognize Cleodil
                {CLEODIL}
                extra_recruit=Elvish Shaman, Elvish Scout, Wose
                x=41
                y=16
            [/unit]
#else
            {MULTIPLAYER_GOLD}
#endif
        [/side]

        #TODO enable the extended recruit list and give a hint to the player about it
        #        [event]
        #            name=prestart
        #            [allow_recruit]
        #                side=1
        #                type={ELVES}
        #            [/allow_recruit]
        #        [/event]

        [event]
            name=prestart
            # the usual suspects
            {RECALL_LOYALS}
        [/event]

        ### Allies ####
        [side]
            side=2
            {GALTRID}
            allow_player=no
            controller=ai
            recruit=Elvish Fighter, Elvish Archer, Elvish Scout, Elvish Shaman, Elvish Captain, Elvish Hero, Elvish Sorceress, Elvish Marksman, Elvish Ranger, Elvish Druid, Elvish Lord

            # wmllint: recognize Galtrid
            x=33
            y=26
            {GOLD 250 300 400}

            {ai/aliases/stable_singleplayer.cfg}
            [ai]
                {AI_SIMPLE_ALWAYS_ASPECT passive_leader_shares_keep yes}
                {AI_SIMPLE_ALWAYS_ASPECT villages_per_scout 20}
                {AI_SIMPLE_ALWAYS_ASPECT aggression 0.0}
                {AI_SIMPLE_ALWAYS_ASPECT caution 0.75}
                {AI_SIMPLE_ALWAYS_ASPECT grouping defensive}
            [/ai]
        [/side]
        [event]
            name=prestart
            [allow_recruit]
                side=2
                type=Elvish Fighter, Elvish Archer, Elvish Scout, Elvish Captain, Elvish Hero, Elvish Sorceress, Elvish Marksman, Elvish Ranger, Elvish Druid, Elvish Lord
            [/allow_recruit]
        [/event]

        {STARTING_VILLAGES_ALL 2}

        [side]
            #TODO use the macro from characters
            side=3
            allow_player=no
            controller=ai
            team_name=player
            user_team_name= _ "Player"
            type=Elvish Marshal
            id="Eradion"
            name= _ "Eradion"
            canrecruit=yes
            #TODO Maybe define some fitting traits for him
            random_traits=yes
            x=13
            y=35
            controller=ai
            {ai/aliases/stable_singleplayer.cfg}
            [ai]
                {AI_SIMPLE_ALWAYS_ASPECT villages_per_scout 20}
                {AI_SIMPLE_ALWAYS_ASPECT aggression 0.0}
                {AI_SIMPLE_ALWAYS_ASPECT caution 0.75}
                {AI_SIMPLE_ALWAYS_ASPECT grouping defensive}
            [/ai]
            {GOLD 280 320 400}
            recruit=Elvish Fighter, Elvish Archer, Elvish Scout, Elvish Captain, Elvish Hero, Elvish Sorceress, Elvish Marksman, Elvish Ranger, Elvish Druid
        [/side]
        {STARTING_VILLAGES_AREA 3 13 35 15}
        ### /ALLIES ###

        ### ENEMIES ###
        [side]
            side=4
            allow_player=no
            controller=ai
            team_name=orcs
            user_team_name= _ "Enemies"
            {ORC_SETUP}
            type=Orcish Warlord
            id=Mordrum
            name= _ "Mordrum"
            profile=portraits/orcs/transparent/grunt-2.png
            canrecruit=yes
            x=4
            y=12
#ifdef HARD
            recruit=Orcish Archer, Orcish Crossbowman, Orcish Slurbow, Orcish Assassin, Orcish Slayer, Orcish Grunt, Orcish Warrior, Orcish Warlord, Goblin Spearman, Goblin Impaler, Goblin Rouser, Wolf Rider, Goblin Knight, Goblin Pillager, Direwolf Rider
#endif
#ifdef NORMAL
            recruit=Orcish Archer, Orcish Crossbowman, Orcish Assassin, Orcish Slayer, Orcish Grunt, Orcish Warrior, Goblin Spearman, Goblin Impaler, Goblin Rouser, Wolf Rider, Goblin Knight, Goblin Pillager, Direwolf Rider
#endif
#ifdef EASY
            recruit=Orcish Archer, Orcish Crossbowman, Orcish Assassin, Orcish Grunt, Orcish Warrior, Goblin Spearman, Wolf Rider, Goblin Knight, Goblin Pillager
#endif
            {GOLD 550 700 900}
            {ai/aliases/stable_singleplayer.cfg}
            [ai]
                {AI_NO_SCOUTS}

                {AI_SIMPLE_ALWAYS_ASPECT recruitment_ignore_bad_movement yes}
                {AI_SIMPLE_ALWAYS_ASPECT recruitment_pattern "scout,fighter,fighter,archer,mixed fighter"}
                {AI_SIMPLE_ALWAYS_ASPECT aggression 0.75}
                {AI_SIMPLE_ALWAYS_ASPECT caution 0.0}
                {AI_SIMPLE_ALWAYS_ASPECT attack_depth 5}
                {AI_SIMPLE_ALWAYS_ASPECT grouping offensive}

                {AI_SIMPLE_NIGHT_ASPECT aggression 0.75}
                {AI_SIMPLE_NIGHT_ASPECT caution 0.0}
                {AI_SIMPLE_NIGHT_ASPECT attack_depth 5}
                {AI_SIMPLE_NIGHT_ASPECT grouping offensive}
            [/ai]
            {INCOME 4 8 12}
        [/side]
        [side]
            side=5
            allow_player=no
            controller=ai
            team_name=orcs
            user_team_name= _ "Enemies"
            {ORC_SETUP}
            type=Orcish Warlord
            id=Urug-Pir
            name=_ "Urug-Pir"
            profile=portraits/orcs/transparent/grunt-2.png
            canrecruit=yes
            x=6
            y=21
#ifdef HARD
            recruit=Orcish Archer, Orcish Crossbowman, Orcish Slurbow, Orcish Assassin, Orcish Slayer, Orcish Grunt, Orcish Warrior, Orcish Warlord, Goblin Spearman, Goblin Impaler, Goblin Rouser, Wolf Rider, Goblin Knight, Goblin Pillager, Direwolf Rider
#endif
#ifdef NORMAL
            recruit=Orcish Archer, Orcish Crossbowman, Orcish Assassin, Orcish Slayer, Orcish Grunt, Orcish Warrior, Goblin Spearman, Goblin Impaler, Goblin Rouser, Wolf Rider, Goblin Knight, Goblin Pillager, Direwolf Rider
#endif
#ifdef EASY
            recruit=Orcish Archer, Orcish Crossbowman, Orcish Assassin, Orcish Grunt, Orcish Warrior, Goblin Spearman, Wolf Rider, Goblin Knight, Goblin Pillager
#endif
            {GOLD 300 500 730}
            {INCOME 4 8 12}
            {ai/aliases/stable_singleplayer.cfg}
            [ai]
                {AI_NO_SCOUTS}
                {AI_SIMPLE_ALWAYS_ASPECT recruitment_ignore_bad_movement yes}
                {AI_SIMPLE_ALWAYS_ASPECT recruitment_pattern "scout,fighter,fighter,archer,mixed fighter"}
                {AI_SIMPLE_NIGHT_ASPECT aggression 0.75}
                {AI_SIMPLE_NIGHT_ASPECT caution 0.0}
                {AI_SIMPLE_NIGHT_ASPECT grouping no}
                {AI_SIMPLE_NIGHT_ASPECT attack_depth 5}
            [/ai]
        [/side]
        [side]
            side=6
            allow_player=no
            controller=ai
            team_name=orcs
            user_team_name= _ "Enemies"
            {TROLL_SETUP}
            type=Great Troll
            id=Truugl
            name= _ "Truugl"
            canrecruit=yes
            x=26
            y=7
#ifdef EASY
            recruit=Troll Whelp
#endif
#ifdef NORMAL
            recruit=Troll Whelp, Troll, Troll Rocklobber, Troll Shaman
#endif
#ifdef HARD
            recruit=Troll Whelp, Troll, Troll Rocklobber, Troll Shaman, Troll Warrior
#endif
            {GOLD 350 520 630}
            {INCOME 4 8 12}
            {ai/aliases/stable_singleplayer.cfg}
            [ai]
                {AI_NO_SCOUTS}
                {AI_SIMPLE_ALWAYS_ASPECT recruitment_ignore_bad_movement yes}
                {AI_SIMPLE_ALWAYS_ASPECT recruitment_ignore_bad_combat yes}
#ifdef EASY
                {AI_SIMPLE_ALWAYS_ASPECT recruitment_pattern "fighter"}
#else
                {AI_SIMPLE_ALWAYS_ASPECT recruitment_pattern "fighter, mixed fighter, fighter, mixed fighter, fighter"}
#endif
                {AI_SIMPLE_NIGHT_ASPECT aggression 0.75}
                {AI_SIMPLE_NIGHT_ASPECT caution 0.0}
                {AI_SIMPLE_NIGHT_ASPECT attack_depth 5}
                {AI_SIMPLE_NIGHT_ASPECT grouping offensive}
            [/ai]
        [/side]

        #TODO try to tune the troll ai to not start a suicide run against the wood border.
        #         [event]
        #             name=turn 2
        #             first_time_only=no
        #             [message]
        #                 id=Truugl
        #                 message= _ "Stay in the hills."
        #             [/message]
        #             {MODIFY_AI_ADD_SIMPLE_ALWAYS_ASPECT 6 aggression 0.3}
        #          #   {MODIFY_AI_ADD_SIMPLE_ALWAYS_ASPECT 5 aggression 0.3}
        #             {MODIFY_AI_ADD_SIMPLE_ALWAYS_ASPECT 6 caution 0.4}
        #          #   {MODIFY_AI_ADD_SIMPLE_ALWAYS_ASPECT 5 caution 0.4}
        #             {MODIFY_AI_ADD_GOAL 6 (
        #             [goal]
        #                 name=protect_location
        #                     [criteria]
        #                         terrain=H*,H*^*
        #                     [/criteria]
        #                     value=200
        #                 [/goal]
        #             )}
        # #            {MODIFY_AI_ADD_GOAL 5 (
        # #                [goal]
        # #                    [criteria]
        # #                        id=Mutaf-uru
        # #                    [/criteria]
        # #                    value=200
        # #                [/goal]
        # #            )}
        #         [/event]

        [side]
            side=7
            allow_player=no
            controller=ai
            team_name=orcs
            user_team_name= _ "Enemies"
            {ORC_SETUP}
            type=Orcish Warlord
            id=Grubr
            name= _ "Grubr"
            profile=portraits/orcs/transparent/grunt-3.png
            canrecruit=yes
            x=25
            y=42
#ifdef HARD
            recruit=Orcish Archer, Orcish Crossbowman, Orcish Slurbow, Orcish Assassin, Orcish Slayer, Orcish Grunt, Orcish Warrior, Orcish Warlord, Goblin Spearman, Goblin Impaler, Goblin Rouser, Wolf Rider, Goblin Knight, Goblin Pillager, Direwolf Rider
#endif
#ifdef NORMAL
            recruit=Orcish Archer, Orcish Crossbowman, Orcish Assassin, Orcish Slayer, Orcish Grunt, Orcish Warrior, Goblin Spearman, Goblin Impaler, Goblin Rouser, Wolf Rider, Goblin Knight, Goblin Pillager
#endif
#ifdef EASY
            recruit=Orcish Archer, Orcish Crossbowman, Orcish Assassin, Orcish Grunt, Orcish Warrior, Goblin Spearman, Wolf Rider, Goblin Knight, Goblin Pillager
#endif
            {GOLD 400 550 650}
            {INCOME 4 8 12}
            {ai/aliases/stable_singleplayer.cfg}
            [ai]
                {AI_NO_SCOUTS}
                {AI_SIMPLE_ALWAYS_ASPECT recruitment_ignore_bad_movement yes}
                {AI_SIMPLE_ALWAYS_ASPECT recruitment_pattern "scout,fighter,fighter,archer,mixed fighter"}
                {AI_SIMPLE_NIGHT_ASPECT aggression 0.75}
                {AI_SIMPLE_NIGHT_ASPECT caution 0.0}
                {AI_SIMPLE_NIGHT_ASPECT attack_depth 5}
                {AI_SIMPLE_NIGHT_ASPECT grouping offensive}
            [/ai]
        [/side]
        ### /ENEMIES ####

        #### Side for Olurf ####
        [side]
            side=8
            {DWARF_SETUP}
            allow_player=no
            controller=null
            persistent=yes
            save_id=Olurf
            no_leader=yes
            hidden=yes
        [/side]
        #### /Side for Olurf ####

#ifdef MULTIPLAYER
        [side]
            side=9
            fog=no
            shroud=no
            {MULTIPLAYER_GOLD}
            {LANDAR}
            recruit=Elvish Fighter, Elvish Archer, Elvish Scout
            x=42
            y=10
        [/side]
        [side]
            side=10
            fog=no
            shroud=no
            {MULTIPLAYER_GOLD}
            {CLEODIL}
            recruit=Elvish Shaman, Wose, Elvish Scout
            x=41
            y=16
        [/side]
        # [event]
        #     name=prestart
        #     [allow_recruit]
        #         side=9
        #         type={ELVES}, Elvish Captain, Elvish Hero, Elvish Sorceress, Elvish Marksman, Elvish Ranger, Elvish Druid
        #     [/allow_recruit]
        # [/event]
#endif

        #### Objectives and corresponding events ####
#define OBJECTIVES
    side=0
    [objective]
        #TODO reconsider the formulation
        #TODO format?
        description= _ "You must own the field and be capable of overwhelming your opponents. (Player(s) own more than 25 units while the foes’ numbers fell below 15)"
        condition=win
    [/objective]
    [objective]
        description= _ "Defeat all enemy leaders."
        condition=win
    [/objective]
    [objective]
        description= _ "Death of Kalenz"
        condition=lose
    [/objective]
    [objective]
        description= _ "Death of Landar"
        condition=lose
    [/objective]
    [objective]
        description= _ "Death of Cleodil"
        condition=lose
    [/objective]
    [objective]
        description= _ "Death of Galtrid"
        condition=lose
    [/objective]

    {TURNS_RUN_OUT}

    note={NO_GOLD_CARRYOVER_NOTE}
#enddef

        [event]
            name=prestart
            [objectives]
                {OBJECTIVES}
            [/objectives]
        [/event]

        [event]
            name=enemies defeated
            [endlevel]
                save=no
                result=victory
                bonus=no
                carryover_percentage=0
            [/endlevel]
        [/event]

        #Let the orcs flee if their numbers go low and the elves go high
        [event]
            name=side 4 turn
            first_time_only=no

            [filter_condition]
                [variable]
                    name=turn_number
                    greater_than=1
                [/variable]
            [/filter_condition]

            [if]
                [have_unit]
                    side=4,5,6,7
                    count=1-15
                [/have_unit]
                [have_unit]
                    side=1,2,3,8
                    count=25-999
                [/have_unit]
                [then]
                    [message]
                        canrecruit=yes
                        [and]
                            race=orc
                            [or]
                                race=troll
                            [/or]
                        [/and]
                        message= _ "Flee! They have broken us!"
                    [/message]
                    [message]
                        id=Landar
                        message= _ "Hunt them down and kill every single one of them!"
                    [/message]
                    [message]
                        id=Cleodil
                        message= _ "It is not wise to put a wounded foe in a desperate situation; they will but fight harder for it. Break their will and let them flee, so they will spread fear of us among their kind."
                    [/message]
                    [message]
                        id=Galtrid
                        message= _ "She is right. Don’t let them lure you away from the Ka’lian, preparations for when more of them arrive return must be made."
                    [/message]
                    [fire_event]
                        name=enemies defeated
                    [/fire_event]
                [/then]
            [/if]
        [/event]

        [event]
            name=time over
            [message]
                id=Kalenz
                message= _ "The orcs are not defeated, and our troops and supplies are exhausted. This is the end!"
            [/message]
        [/event]
        #### /Objectives and corresponding events ####

        #### INTRO ####
        [event]
            name=start

            [message]
                id=Kalenz
                message= _ "The orcs have pushed us back to the Ka’lian. There is no way out. We must win here!"
            [/message]
            [message]
                id=Galtrid
                message= _ "This is our final stand. If they take the Ka’lian, all is lost!"
            [/message]
            [message]
                id=Landar
                # wmllint: local spelling Elvenkind
                message= _ "Galtrid, speak not of defeat. Elvenkind shall rise! Our enemies shall perish in blood and fire!"
            [/message]
            [message]
                id=Cleodil
                message= _ "It is a dark day indeed when elves must steel themselves with dreams of slaughter."
            [/message]
            [message]
                id=Grubr
                # wmllint: local spelling da
                message= _ "We’ll crush those weak elves and I’ll get da stone!"
            [/message]
            [message]
                id=Kalenz
                message= _ "These are hardened orc and troll veterans. Men, prepare for a long, difficult fight..."
            [/message]
        [/event]
        ### INTRO ####

        ### AI_CONTROLLER ###

#ifdef MULTIPLAYER
        {AI_CONTROLLER (kalenz) 1 2 ()}
        {AI_CONTROLLER (landar) 9 3 ()}
#else
        {AI_CONTROLLER (kalenz) 1 2,3 ()}
#endif
        [event]
            name=start
            [message]
                speaker=narrator
                message= _ "In this scenario, you may change the behavior of an allied side’s AI using a context menu brought up by clicking on the allied side’s leader."
                image=wesnoth-icon.png
            [/message]

            {AI_CONTROLLER_ALLOW_LEADER_CONTROL 1 2}
#ifdef MULTIPLAYER
            {AI_CONTROLLER_ALLOW_LEADER_CONTROL 9 3}
#else
            {AI_CONTROLLER_ALLOW_LEADER_CONTROL 1 3}
#endif
        [/event]
        [event]
            name=victory
            {AI_CONTROLLER (kalenz) () () ()}
#ifdef MULTIPLAYER
            {AI_CONTROLLER (landar) () () ()}
#endif
            #disable the ai controller
        [/event]

        ### /AI_CONTROLLER ###

        ### OLURF ###
#define PLACE_A
        10,10#enddef
#define PLACE_B
        20,20#enddef

        [event]
            name=olurf

            [unit]
                side=8
                {OLURF}
                #wmllint: recognize Olurf
                x=$olurf_entry.x
                y=$olurf_entry.y
            [/unit]

            {OLURF_PARTY}
#ifndef MULTIPLAYER
            {MODIFY_UNIT (side=8) side 1}
            {TRANSFER_VILLAGE_OWNERSHIP 8 1}
#endif
            {OLURF_SPEAK}

            #TODO clean up
            ##ifndef MULTIPLAYER
            #            [allow_recruit]
            #                side=1
            #                type={DWARVES}
            #            [/allow_recruit]
            #            [message]
            #                speaker=narrator
            #                image=wesnoth-icon.png
            #                message= _ "Now that Olurf and his tribe joined you, you are ab#le to recruit Dwarves."
            #            [/message]
            ##endif

            [objectives]
                {OBJECTIVES}
#undef OBJECTIVES
                [objective]
                    description= _ "Death of Olurf"
                    condition=lose
                [/objective]
            [/objectives]
        [/event]

#ifndef MULTIPLAYER
        #Olurf arrives at turn 12.
        [event]
#ifndef DEBUG_MODE
            name=turn 12
#else
            name=turn 2
#endif

            [message]
                id=Kalenz
                message= _ "It’s Olurf! He made it!"
            [/message]

            [message]
                speaker=narrator
                image=wesnoth-icon.png
                message= _ "Where do you want Olurf to deploy?"
            [/message]

            # wmllint: local spelling Telfar
            [message]
                speaker=narrator
                image=wesnoth-icon.png
                message= _ "In the forested hills on the west bank of the river Telfar?"
            [/message]

            {HIGHLIGHT_IMAGE 2 2 scenery/signpost.png ()}

            # wmllint: local spelling Karmarth
            [message]
                speaker=narrator
                image=wesnoth-icon.png
                message= _ "Or on the east bank of the river in the Karmarth Hills?"
            [/message]

            {HIGHLIGHT_IMAGE 40 5 scenery/signpost.png ()}

            [message]
                speaker=narrator
                image=wesnoth-icon.png
                message= _ "Choose the deployment of Olurf and his forces!"
                [option]
                    message= _"Forested hills on the west bank of the river Telfar"
                    [command]
                        {VARIABLE olurf_entry.x 2}
                        {VARIABLE olurf_entry.y 2}
                    [/command]
                [/option]
                [option]
                    message= _ "The Karmarth Hills"
                    [command]
                        {VARIABLE olurf_entry.x 40}
                        {VARIABLE olurf_entry.y 5}
                    [/command]
                [/option]
            [/message]

            [fire_event]
                name=olurf
            [/fire_event]
        [/event]
#endif

        [event]
            name=victory
            [if]
                [not]
                    [have_unit]
                        id=Olurf
                    [/have_unit]
                [/not]
                [then]
                    {VARIABLE olurf_entry.x 40}
                    {VARIABLE olurf_entry.y 5}
                    [fire_event]
                        name=olurf
                    [/fire_event]
                [/then]
            [/if]
        [/event]
        ### /OLURF ###

        [event]
            name=victory
            [message]
                id=Galtrid
                message= _ "At last! The orcs are defeated."
            [/message]

            [unit]
                type=Orcish Warrior
                id=Pirorr
                name= _ "Pirorr"
                side=7
                x=1
                y=43
                facing=ne
                profile=portraits/orcs/transparent/grunt-2.png
            [/unit]
            {MOVE_UNIT id=Pirorr 1 41}

            [message]
                id=Pirorr
                message= _ "The elves have beaten us and they did not use da stone. Maybe they don’t have it? Great Chief will not like bad news!"
            [/message]
            [kill]
                id=Pirorr
                animate=no
            [/kill]

            [message]
                id=Galtrid
                message= _ "Kalenz, we are again in your debt. You returned just in time."
            [/message]
            [message]
                id=Kalenz
                message= _ "And we have what’s left of the elvish treasury with us!"
            [/message]
            [message]
                id=Landar
                message= _ "Perhaps the gold will our word weight with the council."
            [/message]
            [message]
                speaker=narrator
                image=wesnoth-icon.png
                side_for=1
                message= _ "Kalenz" + _ " has left the recovered gold into the elvish treasury. You will start the next scenario with a preset amount."
            [/message]
            [message]
                speaker=narrator
                image=wesnoth-icon.png
                side_for=9
                message= _ "Landar" + _ " has left the recovered gold into the elvish treasury. You will start the next scenario with a preset amount."
            [/message]
        [/event]

        ###DEATH EVENTS###
        [event]
            name=last breath
            [filter]
                id=Truugl
            [/filter]
            [message]
                id=Truugl
                message= _ "Aargh! I should have stayed in the mountains instead of joining the orcs!"
            [/message]
        [/event]

        [event]
            name=last breath
            [filter]
                id=Mordrum
            [/filter]
            [message]
                id=Kalenz
                message= _ "Orcs, death is all you will find in this forest!"
            [/message]
        [/event]

        [event]
            name=last breath
            [filter]
                id=Grubr
            [/filter]
            [message]
                speaker=unit
                message= _ "I die without getting da stone?"
            [/message]
        [/event]

        #Eradion death is split in two events.
        #The first part is spoken after deadly wounded but still speaking
        [event]
            name=last breath
            [filter]
                id="Eradion"
            [/filter]
            {INCIDENTAL_MUSIC sad.ogg}
            [message]
                speaker=second_unit
                message= _ "Be grateful, tree-shagger, for I have spared you the pain of seeing your precious citadel burned and razed."
            [/message]
            [message]
                speaker=unit
                message= _ "Galtrid, my friend. Do not let my death be in vain. Destroy these foul orcs, and sing for me in the green woods when we have won."
            [/message]
            [message]
                id=Galtrid
                message= _ "We shall avenge you tenfold!"
            [/message]
            [scroll_to_unit]
                id="Eradion"
            [/scroll_to_unit]
        [/event]
        [event]
            name=die
            [filter]
                id="Eradion"
            [/filter]
            [message]
                speaker=second_unit
                message= _ "Dead he is. Too quick. His screams were sweet."
            [/message]
            [message]
                side=2,3
                [not]
                    id=Galtrid
                [/not]
                [not]
                    id="Eradion"
                [/not]
                message= _ "Let us pursue the orc who murdered $unit.name|!"
            [/message]
            [message]
                id=Galtrid
                message= _ "No, don’t leave your formation. An elf was slain by beast. What does it matter which beast it was? We must kill them all."
            [/message]
        [/event]

        {campaigns/Legend_of_Wesmere/utils/deaths.cfg}
        ###/DEATH EVENTS###

#ifndef MULTIPLAYER
    [/scenario]
#else
[/multiplayer]
#endif

#undef PLAYER_GOLD
#undef MULTIPLAYER_GOLD
