#textdomain wesnoth-tutorial

#define PRINT STRING
    [print]
        text={STRING}
        size=18
        duration=10000
        red,green,blue=255,255,255
    [/print]
#enddef

#define CLEAR_PRINT
    [print]
        text=""	# wmllint: ignore
    [/print]
#enddef

#define GENDER MALE_WML FEMALE_WML
    [if]
        [have_unit]
            id=student
            gender=male
        [/have_unit]
        [then]
            {MALE_WML}
        [/then]
        [else]
            {FEMALE_WML}
        [/else]
    [/if]
#enddef

#define ALLOW_END_TURN_AFTER_ATTACK
    # for the case the player disobeys delfador's order and attacks
    [event]
        name=attack_end
        id=prevent deadlock
        [filter]
            id=student
        [/filter]

        [allow_end_turn][/allow_end_turn]
    [/event]

    [event]
        name=turn end

        [remove_event]
            id=prevent deadlock
        [/remove_event]
    [/event]
#enddef

#define UNDO_REMINDER
    [if]
        [variable]
            name=undo_option
            equals=yes
        [/variable]
        [then]
            [message]
                speaker=narrator
                caption= _"Undo"
                image=wesnoth-icon.png
                message= _"Don’t forget, you can press <b>u</b> to undo most things if you make a mistake."
            [/message]

            [cancel_action] [/cancel_action]

            {CLEAR_VARIABLE undo_option}
        [/then]
    [/if]

    [allow_undo][/allow_undo]
#enddef

#define TALK_ABOUT ID_STRING MESSAGE_TEXT
    [scroll_to_unit]
        id={ID_STRING}
        highlight=yes
    [/scroll_to_unit]

    [message]
        speaker=Galdrad
        scroll=no
        highlight=no
        message={MESSAGE_TEXT}
    [/message]
#enddef

#define TALK_ABOUT_LOC POSITION MESSAGE_TEXT
    [scroll_to]
        x,y={POSITION}
        highlight=yes
    [/scroll_to]

    [message]
        speaker=Galdrad
        scroll=no
        highlight=no
        message={MESSAGE_TEXT}
    [/message]
#enddef

#define TALK_ABOUT_LOCS POSITION1 POSITION2 MESSAGE_TEXT
    [scroll_to]
        x,y={POSITION1}
        highlight=yes
    [/scroll_to]

    [scroll_to]
        x,y={POSITION2}
        highlight=yes
    [/scroll_to]

    [message]
        speaker=Galdrad
        scroll=no
        highlight=no
        message={MESSAGE_TEXT}
    [/message]
#enddef

# Note: we would not like the user to "press any key" (for example, Esc)
#define CONTINUE_MSG
    _"
<big>Click a mouse button or press the spacebar to continue...</big>"
#enddef
