#textdomain wesnoth-anl

#define ANL_CAPTURE_VILLAGE
    [capture_village]
        x=$x1
        y=$y1
        side=$side_number
    [/capture_village]
#enddef

#define OPEN_CHEST X Y TREASURE_VALUE
    [sound]
        name=open-chest.wav
    [/sound]

    [remove_item]
        x={X}
        y={Y}
        image=items/chest-plain-closed.png
    [/remove_item]
    [item]
        x={X}
        y={Y}
        image=items/chest-plain-open.png
    [/item]

    [set_variable]
        name=oc_treasure
        value={TREASURE_VALUE}
    [/set_variable]
    [message]
        speaker=narrator
        image=items/chest-plain-open.png
        message= _ "The chest contains $oc_treasure gold."
    [/message]

    [clear_variable]
        name=oc_treasure
    [/clear_variable]

    [gold]
        side=$side_number
        amount={TREASURE_VALUE}
    [/gold]
#enddef

#define MOVEMENT_RESTRICTION TERR1_NAME TERR2_NAME
    [object]
        silent=yes
        duration=forever
        [effect]
            apply_to=movement_costs
            replace=true
            [movement_costs]
                {TERR1_NAME}={UNREACHABLE}
                {TERR2_NAME}={UNREACHABLE}
            [/movement_costs]
        [/effect]
    [/object]
#enddef
