#textdomain wesnoth-nr

#define PLACE_PRISONER_IMAGE IMAGE X Y
    {PLACE_IMAGE "{IMAGE}~RC(magenta>red)~BLIT(items/cage.png)" {X} {Y}}
#enddef

#define RECALL_SUPPORTER
    # Recall a walk-on to say lines. Prefer whoever was tagged with
    # role=Supporter previously; if that unit is dead, pick anyone from side 1.
    [if]
        [have_unit]
            side=1
            role=Supporter
            search_recall_list=yes
        [/have_unit]
        [then]
            # Recall a supporter if we have one to do so
            [recall]
                role=Supporter
            [/recall]
        [/then]
        [else]
            # Else, make a new supporter
            [role]
                role=Supporter
                side=1
                [not]
                    id=Tallin
                [/not]
                search_recall_list=yes
                [auto_recall][/auto_recall]
                [else]
                    # If that fails too, make a brand new supporter
                    [unit]
                        type=Peasant
                        side=1
                        role=Supporter
                        animate=yes
                        placement=leader
                    [/unit]
                [/else]
            [/role]
        [/else]
    [/if]
#enddef

#define RECALL_KRASH SIDE
    # In S11a-13a Krash starts as the leader of a side if he is alive. He is not
    # defined in the corresponding side tags for these scenarios, since if he is,
    # that would cause Krash to be reborn if he was dead. Since [recall] requires
    # a leader on the map, do this to get him off of his recall list without one.
    # Side is specified and leader status given here again, in case Krash is alive
    # but on the wrong side at scenario start, which can happen if scenarios are skipped
    # when using debug commands.
    [store_unit]
        [filter]
            id=Krash
        [/filter]
        variable=krash
        kill=yes
    [/store_unit]
    [if]
        {VARIABLE_CONDITIONAL krash.id equals Krash}
        [then]
            {VARIABLE krash.side {SIDE}}
            [store_starting_location]
                side={SIDE}
                variable=start_loc
            [/store_starting_location]
            [unstore_unit]
                variable=krash
                find_vacant=yes
                x,y=$start_loc.x,$start_loc.y
            [/unstore_unit]
        [/then]
    [/if]
    [if]
        [have_unit]
            id=Krash
            canrecruit=no
        [/have_unit]
        [then]
            # Ensure he is a leader
            [modify_unit]
                [filter]
                    id=Krash
                [/filter]
                canrecruit=yes
            [/modify_unit]
            # Remove loyalty overlay
            [remove_unit_overlay]
                id=Krash
                image=misc/loyal-icon.png
            [/remove_unit_overlay]
            # Give expendable overlay
            [unit_overlay]
                id=Krash
                image=misc/leader-expendable.png
            [/unit_overlay]
        [/then]
    [/if]
    {CLEAR_VARIABLE krash,start_loc}
#enddef

#define STORY_PART_HAMEL SPEECH_STRING
    {STORY_PART_SPEECH portraits/Hamel.png (_ "Hamel") {SPEECH_STRING} }
#enddef

#define STORY_PART_TALLIN SPEECH_STRING
    {STORY_PART_SPEECH portraits/Tallin.png (_ "Tallin") {SPEECH_STRING} }
#enddef

#define STORY_PART_ARTHIAN SPEECH_STRING
    {STORY_PART_SPEECH portraits/Arthian.png (_ "Arthian") {SPEECH_STRING} }
#enddef

#define STORY_PART_FATHER_MORVIN SPEECH_STRING
    {STORY_PART_SPEECH portraits/Father_Morvin.png (_ "Father Morvin") {SPEECH_STRING} }
#enddef

#define STORY_PART_SISTER_THERA SPEECH_STRING
    {STORY_PART_SPEECH portraits/Sister_Thera.png (_ "Sister Thera") {SPEECH_STRING} }
#enddef

#define STORY_PART_STALRAG SPEECH_STRING
    {STORY_PART_SPEECH portraits/Stalrag.png (_ "Stalrag") {SPEECH_STRING} }
#enddef

#define STORY_PART_ERYSSA SPEECH_STRING
    {STORY_PART_SPEECH portraits/Eryssa.png (_ "Eryssa") {SPEECH_STRING} }
#enddef

#define STORY_PART_HIDEL SPEECH_STRING
    {STORY_PART_SPEECH portraits/Hidel.png (_ "Hidel") {SPEECH_STRING} }
#enddef
