#textdomain wesnoth-tsg
# Heroes and Allies

#ifdef SG_DEATHS_LAST_LEVEL

#define SG_DEATHS_HYLAS_LATE
#enddef
#define SG_DEATHS_JAREK_ALTERNATIVE
#enddef

#endif

[event]
    name=last breath
    [filter]
        id=Deoran
    [/filter]
    [message]
        speaker=unit
        image=portraits/deoran-sad.png
        message= _ "I have failed my kingdom and duty..."
    [/message]
    [endlevel]
        result=defeat
    [/endlevel]
[/event]

[event]
    name=attack
    [filter]
        id=Deoran
    [/filter]

    [if]
        [variable]
            name=cold_steel_tasted
            boolean_not_equals=yes
        [/variable]

        [then]
            [message]
                speaker=Deoran
                image=portraits/deoran-mad.png
                message= _ "Taste cold steel!"
            [/message]

            {VARIABLE cold_steel_tasted yes}
        [/then]
    [/if]
[/event]

[event]
    name=last breath
    [filter]
        id=Ethiliel
    [/filter]
    [message]
        speaker=unit
        message= _ "I have lost everything helping the humans... Now they will surely perish!"
    [/message]
    [endlevel]
        result=defeat
    [/endlevel]
[/event]

[event]
    name=last breath
    [filter]
        id=Sir Gerrick
    [/filter]
    [message]
        speaker=unit
        message= _ "I have given all for my kingdom! Avenge me, Deoran!"
    [/message]
#ifndef SG_DEATHS_LAST_LEVEL
    [endlevel]
        result=defeat
    [/endlevel]
#endif
[/event]

[event]
    name=last breath
    [filter]
        id=Minister Hylas
    [/filter]
    [message]
        speaker=unit
        image=portraits/hylas.png
        message= _ "May the Light guide you where I have failed..."
    [/message]
#ifndef SG_DEATHS_HYLAS_LATE
    [endlevel]
        result=defeat
    [/endlevel]
#endif
[/event]

[event]
    name=last breath
    [filter]
        id=Jarek
    [/filter]
#ifndef SG_DEATHS_JAREK_ALTERNATIVE
    [message]
        speaker=unit
        message= _ "Far from home I fall — but not in vain! Defend our people, Deoran!"
    [/message]
#else
    [message]
        speaker=unit
        message= _ "Far from home I fall — but not in vain!"
    [/message]
#endif
[/event]

# If an macro is used withhin another macro, it cannot be undefined as long as
# the other macro is still used. If the death events would be included in via a
# macro they would have to be undefined in the scenario files, but as they are
# included by reading this file they can be undefined here.

#ifdef SG_DEATHS_LAST_LEVEL
#undef SG_DEATHS_LAST_LEVEL
#undef SG_DEATHS_HYLAS_LATE
#undef SG_DEATHS_JAREK_ALTERNATIVE
#endif

#ifdef SG_DEATHS_HYLAS_LATE
#undef SG_DEATHS_HYLAS_LATE
#endif

#ifdef SG_DEATHS_JAREK_ALTERNATIVE
#undef SG_DEATHS_JAREK_ALTERNATIVE
#endif
