2008-10-30 13:54:38 +00:00

200 lines
4.8 KiB
INI

#textdomain wesnoth-did
# New Macros
# Define starting villages
#define SET_VILLAGE SIDE X Y
[capture_village]
x={X}
y={Y}
side={SIDE}
[/capture_village]
#enddef
# Shorthand for messages, useful for lots of short messages
#define SPEAK SPEAKER MESSAGE
[message]
speaker={SPEAKER}
message={MESSAGE}
[/message]
#enddef
# MODIFY_ONE_UNIT alters a unit variable for a single unit
# Warning: moving the unit will create a copy, since kill is set to no by necessity
#define MODIFY_ONE_UNIT FILTER NAME VALUE
[store_unit]
[filter]
{FILTER}
[/filter]
variable=MODIFY_UNIT_store
kill=no
[/store_unit]
[set_variable]
name=MODIFY_UNIT_store[0].{NAME}
value={VALUE}
[/set_variable]
[unstore_unit]
variable=MODIFY_UNIT_store[0]
find_vacant=no
[/unstore_unit]
{CLEAR_VARIABLE MODIFY_UNIT_store}
#enddef
# Just like UNIT except use guardian ai special
#define GEN_GUARDIAN TYPE NAME_STRING SIDE X Y
[unit]
type={TYPE}
name={NAME_STRING}
side={SIDE}
x,y={X},{Y}
[modifications]
{TRAIT_LOYAL}
[/modifications]
ai_special=guardian
[/unit]
#enddef
# Generates a normal unit except with the guardian attribute
#define GEN_GUARD TYPE SIDE X Y
[unit]
type={TYPE}
side={SIDE}
x={X}
y={Y}
generate_name=yes
random_traits=yes
upkeep=loyal
animate=no
ai_special=guardian
[/unit]
#enddef
# Generate a unit with random name and random traits
#define GEN_UNIT TYPE SIDE X Y
[unit]
type={TYPE}
side={SIDE}
x={X}
y={Y}
generate_name=yes
random_traits=yes
upkeep=loyal
animate=no
[/unit]
#enddef
# Create a new ghost-type "advisor" if Malin doesn't already have one
#define CREATE_ADVISOR
[recall]
# recall an advisor if one already exists
role=advisor
[/recall]
[if]
# check if that worked, if not make another unit the advisor
[have_unit]
role=advisor
[/have_unit]
[then]
# do nothing
[/then]
[else]
[role]
role=advisor
type=Spectre,Nightgaunt,Wraith,Shadow,Ghost
[/role]
[recall]
role=advisor
[/recall]
[if]
# If player has no such units on the recall list, make a new ghost
[have_unit]
role=advisor
[/have_unit]
[then]
# do nothing
[/then]
[else]
[store_unit]
# store to get location
[filter]
id=Malin Keshar
[/filter]
kill=no
variable=tempStore
[/store_unit]
[unit]
type=Ghost
side=1
x=$tempStore.x
y=$tempStore.y
role=advisor
[/unit]
{CLEAR_VARIABLE tempStore}
[/else]
[/if]
[/else]
[/if]
#enddef
# Place a door at DOOR_X, DOOR_Y, which is opened by moving a unit of side 1
# next to it. FACING should be one of two values: "sw" OR "se", depending on
# which direction the door should face. This last selects which graphic to use.
# This macro must be used inside an [event]
#define PLACE_DOOR DOOR_X DOOR_Y FACING
[terrain]
x={DOOR_X}
y={DOOR_Y}
terrain=xx # wmllint: ignore
[/terrain]
{PLACE_IMAGE (scenery/gate-rusty-{FACING}.png) {DOOR_X} {DOOR_Y}}
#enddef
# This allows the doors to be opened by moving next to them.
#define DOOR_OPENING_EVENT SIDES
[event]
name=moveto
first_time_only=no
[filter]
side={SIDES}
[filter_location]
[filter_adjacent_location]
terrain=xx
[/filter_adjacent_location]
[/filter_location]
[/filter]
[store_locations]
terrain=xx
[filter_adjacent_location]
x,y=$x1,$y1
[/filter_adjacent_location]
variable=door_to_open
[/store_locations]
[terrain]
x,y=$door_to_open.x,$door_to_open.y
terrain=Rr
[/terrain]
[removeitem]
x,y=$door_to_open.x,$door_to_open.y
[/removeitem]
[/event]
#enddef
#define DELAY NUMBER
[delay]
time={NUMBER}
[/delay]
#enddef
#define ALLOW_RECRUIT LIST_VALUE
[allow_recruit]
side=2
type={LIST_VALUE}
[/allow_recruit]
#enddef