#textdomain wesnoth-ei

#define HERODEATH_GWEDDRY
    [event]
        name=last breath

        [filter]
            id=Gweddry
        [/filter]

        [message]
            speaker=Gweddry
            message= _ "No! I... die..."
        [/message]
        [endlevel]
            result=defeat
        [/endlevel]
    [/event]
#enddef
#define HERODEATH_OWAEC
    [event]
        name=last breath

        [filter]
            id=Owaec
        [/filter]

        [message]
            speaker=Owaec
            message= _ "I... must— Argh...!" # wmllint: no spellcheck
        [/message]
        [endlevel]
            result=defeat
        [/endlevel]
    [/event]
#enddef
#define HERODEATH_DACYN
    [event]
        name=last breath

        [filter]
            id=Dacyn
        [/filter]

        [message]
            speaker=Dacyn
            message= _ "The light fades... We are doomed..."
        [/message]
        [endlevel]
            result=defeat
        [/endlevel]
    [/event]
#enddef

#define HERODEATH_GWEDDRY_EXPENDABLE
    [event]
        name=last breath

        [filter]
            id=Gweddry
        [/filter]

        [message]
            speaker=Gweddry
            message= _ "So much death... so much senseless destruction..."
        [/message]
        [message]
            speaker=Dacyn
            message= _ "Unfortunate. Gweddry has fought with me since the very beginning, only to fall so close to the end."
        [/message]
        {VARIABLE gweddry_dead yes} # needed for epilogue, since he's side 1's leader
    [/event]
#enddef
#define HERODEATH_OWAEC_EXPENDABLE
    [event]
        name=last breath

        [filter]
            id=Owaec
        [/filter]

        [message]
            speaker=Owaec
            message= _ "Alas, I fall! The clans will never truly be avenged..." # wmllint: no spellcheck
        [/message]
        [message]
            speaker=Gweddry
            message= _ "Owaec! We’ve been through so much together! You can’t die now..."
        [/message]
    [/event]
#enddef
#define HERODEATH_DACYN_FINALBATTLE
    [event]
        name=last breath

        [filter]
            id=Dacyn
        [/filter]

        [message]
            speaker=Dacyn
            message= _ "The light fades... Wesnoth, I have failed you..."
        [/message]
        [endlevel]
            result=defeat
        [/endlevel]
    [/event]
#enddef

#define HERODEATH_DOLBURRAS
    [event]
        name=last breath

        [filter]
            id=Dolburras
            side=1
        [/filter]

        [message]
            speaker=Dolburras
            message= _ "Watch out behind ye- ach!" # wmllint: no spellcheck
        [/message]
        [message]
            speaker=Gweddry
            message= _ "Though he was not one of us, he served bravely alongside Wesnoth’s best. We must carry on the good fight."
        [/message]
    [/event]
#enddef
#define HERODEATH_GRUG
    [event]
        name=last breath

        [filter]
            id=Grug
        [/filter]

        [message]
            speaker=Grug
            message= _ "Hurt... grarrgghh..." # wmllint: no spellcheck
        [/message]
        [message]
            speaker=Gweddry
            message= _ "Though he was not one of us, he served bravely alongside Wesnoth’s best. We must carry on the good fight."
        [/message]
    [/event]
#enddef
#define HERODEATH_ADDOGIN
    [event]
        name=last breath

        [filter]
            id=Addogin
        [/filter]

        [message]
            speaker=Addogin
            message= _ "How did I get dragged into this mess..."
        [/message]
    [/event]
#enddef
#define HERODEATH_HAHID
    [event]
        name=last breath

        [filter]
            id=Hahid al-Ali
        [/filter]

        [message]
            speaker=Hahid al-Ali
            message= _ "Alas, my long, storied, and exceedingly profitable career has at last come to an end, so far from home! I only... wish I could have died on the soft sands... instead of among these primitive barbarians..."
        [/message]
        [message]
            speaker=Grug
            message= _ "Bar... ber... bears? Die why?"
        [/message]
        [message]
            speaker=Dolburras
            message= _ "Aye, ‘tis a sad place for one o’ us foreigners to fall. We’ll miss ye, that’s for sure."
        [/message]
    [/event]
#enddef
#define HERODEATH_HAHID_FINALBATTLE
    [event]
        name=last breath

        [filter]
            id=Hahid al-Ali
        [/filter]

        [message]
            speaker=Hahid al-Ali
            message= _ "Oh, I knew drinking all those elixirs was a bad idea..."
        [/message]
    [/event]
#enddef
#define HERODEATH_TERRAENT
    [event]
        name=last breath

        [filter]
            id=Terraent
        [/filter]

        [message]
            speaker=Terraent
            message= _ "And so, I give... the last thing I have to give... in service of the Light..."
        [/message]
        [message]
            speaker=Owaec
            message= _ "You shall be gravely missed, paladin of the Light! May you long live on in song and tale."
        [/message]
    [/event]
#enddef
#define HERODEATH_GAENNELL
    [event]
        name=last breath
        [filter]
            id=Gaennell
            side=1 # if she gets executed while a prisoner, don't trigger her death line
        [/filter]
        [message]
            speaker=Gaennell
            message= _ "Death is coming for me..."
        [/message]
        [message]
            speaker=Terraent
            message= _ "Truly, you have proven that there is goodness within all of us. I pledge that your sacrifice will not be in vain!"
        [/message]
    [/event]
#enddef

#define HERODEATH_YANNIC
    [event]
        name=last breath

        [filter]
            id=Yannic
        [/filter]

        [message]
            speaker=Yannic
            message= _ "Alas, I fall..."
        [/message]
        [if] {VARIABLE_CONDITIONAL saved_yannic equals yes}
            [or]
                [have_unit]
                    id=Yannic
                    side=1
                [/have_unit]
            [/or]
            [then]
                [message]
                    speaker=Owaec
                    message= _ "Yannic! The Clans have lost another brave soul this day..."
                [/message]
            [/then]
        [/if]
    [/event]
#enddef
#define HERODEATH_HALRAD
    [event]
        name=last breath

        [filter]
            id=Halrad
        [/filter]

        [message]
            speaker=Halrad
            message= _ "I may die, but Wesnoth will never fall!"
        [/message]
    [/event]
#enddef
#define HERODEATH_HALRIC
    [event]
        name=last breath

        [filter]
            id=Halric
        [/filter]

        [message]
            speaker=Halric
            message= _ "There’s too many! Must... keep fighting..."
        [/message]
    [/event]
#enddef
#define HERODEATH_HALROD
    [event]
        name=last breath

        [filter]
            id=Halrod
        [/filter]

        [message]
            speaker=Halrod
            message= _ "Ack! Curse these undead! I should have listened to my mother and been a dentist..."
        [/message]
    [/event]
#enddef
#define HERODEATH_KONRAD
    [event]
        name=last breath

        [filter]
            id=Konrad
        [/filter]

        [message]
            speaker=Konrad
            message= _ "Alas, I perish! The kingdom is lost without its king."
        [/message]
        [endlevel]
            result=defeat
        [/endlevel]
    [/event]
#enddef

#define EARLY_DEFEAT
    [event]
        name=defeat
        [message]
            speaker=narrator
            image=wesnoth-icon.png
            message=_ "It was perhaps as well for the men of Gweddry’s troop that they did not live to witness the fullness of the grim tide of undead sweeping westward into Wesnoth, laying waste to all in its path."
        [/message]
    [/event]
#enddef
#define FOREIGN_DEFEAT
    [event]
        name=defeat
        [message]
            speaker=narrator
            image=wesnoth-icon.png
            message=_ "Wesnoth never learned the fate of Gweddry’s band, but they would soon learn the full measure of the power of Mal-Ravanal in a war that would end only in misery and death."
        [/message]
    [/event]
#enddef
#define WESNOTH_DEFEAT
    [event]
        name=defeat
        [message]
            speaker=narrator
            image=wesnoth-icon.png
            message=_ "Their home country had proved to be no refuge for Gweddry’s weary men, and no more would it for the inhabitants of Wesnoth as foes pressed them on all sides to a final defense of the doomed kingdom."
        [/message]
    [/event]
#enddef
#define LATE_DEFEAT
    [event]
        name=defeat
        [message]
            speaker=narrator
            image=wesnoth-icon.png
            message=_ "With the staunchest defenders of Wesnoth bested on their home ground, the once-great kingdom was plunged into final darkness under the hand of Mal-Ravanal."
        [/message]
    [/event]
#enddef

#define ENEMYDEATHS_SORADOC
    [event]
        name=last breath

        [filter]
            id=Mal-Mana
        [/filter]

        [message]
            speaker=Mal-Mana
            message= _ "My beautiful bats, why didn’t you protect me..."
        [/message]
        {VARIABLE mana_dead yes} # used in S13
    [/event]

    [event]
        name=last breath

        [filter]
            id=Mal-Talar
        [/filter]

        [if] {VARIABLE_CONDITIONAL talar_dead not_equals yes}
            [then]
                [message]
                    speaker="Mal-Talar"
                    #po: death of a male Necromancer. Mal-Talar survived in S01 but the player has now killed him.
                    message= _ "No! Once again you escape me..."
                [/message]
            [/then]

            [else]
                [message]
                    speaker="Mal-Talar"
                    #po: death of a male Necromancer. Mal-Talar died in S01 and the player has now killed his renamed clone too.
                    message= _ "No! How am I defeated so easily..."
                [/message]
            [/else]
        [/if]
    [/event]

    [event]
        name=last breath

        [filter]
            id=ghast_leader
        [/filter]

        [message]
            speaker=ghast_leader
            message= _ "..."
        [/message]
    [/event]

    [event]
        name=last breath

        [filter]
            id=Naken-alvak
        [/filter]

        [message]
            speaker=Naken-alvak
            message= _ "You... waste... your effort..."
        [/message]
    [/event]
#enddef
