Added more village ownership macros to side-utils.cfg.

ESR_ please review the language.

zookeeper please review the code.
This commit is contained in:
Fabian Müller 2008-12-02 20:48:46 +00:00
parent cbd3eeb15e
commit e409785705

View file

@ -152,25 +152,37 @@
[/event]
#enddef
#define CAPTURE_FILTERED_VILLAGES SIDE FILTER
# Change ownership of villages matching the location filter.
[store_locations]
{FILTER}
variable=temp_target_villages
[/store_locations]
{FOREACH temp_target_villages i}
[capture_village]
side={SIDE}
x,y=$temp_target_villages[$i].x,$temp_target_villages[$i].y
[/capture_village]
{NEXT i}
{CLEAR_VARIABLE temp_target_villages}
#enddef
#define CAPTURE_VILLAGES_OF_TYPE TYPE SIDE X Y RADIUS
# Change ownership of the villages from a terrain type near a specified location.
{CAPTURE_FILTERED_VILLAGES {SIDE}
(
terrain={TYPE}
[and]
x,y={X},{Y}
radius={RADIUS}
[/and] ) }
#enddef
#define CAPTURE_VILLAGES SIDE X Y RADIUS
# Change ownership of all villages near a specified location.
[store_locations]
terrain=*^V*
[and]
x,y={X},{Y}
radius={RADIUS}
[/and]
variable=temp_target_villages
[/store_locations]
{FOREACH temp_target_villages i}
[capture_village]
side={SIDE}
x,y=$temp_target_villages[$i].x,$temp_target_villages[$i].y
[/capture_village]
{NEXT i}
{CLEAR_VARIABLE temp_target_villages}
# Change ownership of all villages near a specified location.
{CAPTURE_VILLAGES_OF_TYPE (*^V*) {SIDE} {X} {Y} {RADIUS}}
#enddef
#define STARTING_VILLAGES SIDE RADIUS