#textdomain wesnoth-utbs
# This file contains message to display when heroes die
# Some of these are conditional on in_final_fight, which
# will be set to true for the final battle.

[event]
    name=last breath
    [filter]
        id=Kaleh
    [/filter]

    [if]
        [variable]
            name=in_final_fight
            equals=true
        [/variable]
        [then]
            [message]
                speaker=unit
                message= _ "To die on the cusp of victory. Oh, the irony!"
            [/message]
        [/then]
        [else]
            [message]
                speaker=unit
                message= _ "I’m too young to die. What will happen to my people?"
            [/message]
        [/else]
    [/if]
    [endlevel]
        result=defeat
    [/endlevel]
[/event]

[event]
    name=last breath

    [filter]
        id=Nym
    [/filter]

    [message]
        speaker=unit
        message= _ "Save me, Kaleh, I’m dying..."
    [/message]

    [if]
        [variable]
            name=in_final_fight
            equals=true
        [/variable]
        [then]
            {VARIABLE nym_dead true}
            {VARIABLE_OP allies_killed add 1}
        [/then]
        [else]
            [endlevel]
                result=defeat
            [/endlevel]
        [/else]
    [/if]
[/event]

[event]
    name=last breath
    [filter]
        id=Zhul
    [/filter]

    [message]
        speaker=unit
        message= _ "Eloh protect us, I have fallen."
    [/message]

    [if]
        [variable]
            name=in_final_fight
            equals=true
        [/variable]
        [then]
            {VARIABLE zhul_dead true}
            {VARIABLE_OP allies_killed add 1}
        [/then]
        [else]
            [endlevel]
                result=defeat
            [/endlevel]
        [/else]
    [/if]
[/event]

[event]
    name=last breath

    [filter]
        id=Garak
    [/filter]

    [message]
        speaker=unit
        message= _ "Aaargh! Curse you!"
    [/message]

    [endlevel]
        result=defeat
    [/endlevel]
[/event]

[event]
    name=die

    [filter]
        id=Grog

        [or]
            id=Nog
        [/or]

        [or]
            id=Rogrimir
        [/or]

        [or]
            id=Jarl
        [/or]
    [/filter]

    [if]
        [variable]
            name=ally_race
            equals=dwarf
        [/variable]

        [then]
            [message]
                speaker=$ally_name
                message= _ "I go now to join my forefathers..."
            [/message]
        [/then]

        [else]
            [message]
                speaker=$ally_name
                message= _ "No, $unit.name can’t die now!"
            [/message]
        [/else]
    [/if]

    [if]
        [variable]
            name=in_final_fight
            equals=true
        [/variable]
        [then]
            {VARIABLE ally_died_in_final_fight yes}
            {VARIABLE_OP allies_killed add 1}
        [/then]
        [else]
            [if]
                [variable]
                    name=ally_must_live
                    numerical_equals=1
                [/variable]

                [then]
                    [message]
                        speaker=Kaleh
                        message= _ "Without his guidance, how can we escape from these infernal caves? We are lost without him!"
                    [/message]

                    [endlevel]
                        result=defeat
                    [/endlevel]
                [/then]
                [else]
                    [message]
                        speaker=Kaleh
                        message= _ "He was a brave warrior and a true ally. He will be missed."
                    [/message]
                [/else]
            [/if]
        [/else]
    [/if]

    {VARIABLE ally_dead yes}
[/event]

[event]
    name=last breath
    [filter]
        id=Esanoo
    [/filter]

    [message]
        speaker=unit
        message= _ "Farewell Nym, I go to the sea god. You elves must go on without me."
    [/message]

    [message]
        speaker=Nym
        message= _ "Farewell Esanoo. You were my favorite of the merfolk."
    [/message]
[/event]

[event]
    name=last breath
    [filter]
        id=Kromph
    [/filter]

    [message]
        speaker=unit
        message= _ "Aaurrgghh!!"
    [/message]
[/event]

[event]
    name=last breath

    [filter]
        id=Elyssa
    [/filter]

    [message]
        speaker=unit
        message= _ "This can’t be the end, I have too much left to see."
    [/message]

    [message]
        speaker=Kaleh
        message= _ "How could we have let her die? I’ve never seen fire magic like that before. She will be sorely missed."
    [/message]
[/event]
