moved all village ownership related macros from utils.cfg to side-utils.cfg
This commit is contained in:
parent
db7de5f49a
commit
9c23db6184
2 changed files with 67 additions and 66 deletions
|
@ -1,6 +1,6 @@
|
|||
#textdomain wesnoth
|
||||
# Side-limit macros for balancing AI behaviour. You can, for example
|
||||
# give an AI side the possibility to recruit high level units but not to have
|
||||
# Side-utils macros for balancing AI behaviour and setting village ownership.
|
||||
# You can, for example give an AI side the possibility to recruit high level units but not to have
|
||||
# too many of them at the same time. Note: These generate events, so they need
|
||||
# to be placed directly under your [scenario] tag, and not within an event
|
||||
# such as start or prestart.
|
||||
|
@ -151,3 +151,68 @@
|
|||
{NEXT i}
|
||||
[/event]
|
||||
#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}
|
||||
#enddef
|
||||
|
||||
#define STARTING_VILLAGES SIDE RADIUS
|
||||
# Macro to make a side start a scenario with villages
|
||||
[event]
|
||||
name=prestart
|
||||
|
||||
[store_starting_location]
|
||||
side={SIDE}
|
||||
variable=temp_starting_location
|
||||
[/store_starting_location]
|
||||
|
||||
{CAPTURE_VILLAGES {SIDE} $temp_starting_location.x $temp_starting_location.y {RADIUS}}
|
||||
{CLEAR_VARIABLE temp_starting_location}
|
||||
[/event]
|
||||
#enddef
|
||||
|
||||
#define STARTING_VILLAGES_AREA SIDE X Y RADIUS
|
||||
# Make a side start with ownership of villages in a given area.
|
||||
[event]
|
||||
name=prestart
|
||||
|
||||
{CAPTURE_VILLAGES {SIDE} {X} {Y} {RADIUS}}
|
||||
[/event]
|
||||
#enddef
|
||||
|
||||
#define TRANSFER_VILLAGE_OWNERSHIP FROM_SIDE TO_SIDE
|
||||
# Transfers ownership of all villages of one side to another side. Useful
|
||||
# when you're for example moving all units of some side to another, and want
|
||||
# to transfer the village ownership as well.
|
||||
[store_villages]
|
||||
owner_side={FROM_SIDE}
|
||||
variable=TRANSFER_VILLAGE_OWNERSHIP_villages
|
||||
[/store_villages]
|
||||
|
||||
{FOREACH TRANSFER_VILLAGE_OWNERSHIP_villages TRANSFER_VILLAGE_OWNERSHIP_i}
|
||||
[capture_village]
|
||||
x,y=$TRANSFER_VILLAGE_OWNERSHIP_villages[$TRANSFER_VILLAGE_OWNERSHIP_i].x,$TRANSFER_VILLAGE_OWNERSHIP_villages[$TRANSFER_VILLAGE_OWNERSHIP_i].y
|
||||
side={TO_SIDE}
|
||||
[/capture_village]
|
||||
{NEXT TRANSFER_VILLAGE_OWNERSHIP_i}
|
||||
|
||||
{CLEAR_VARIABLE TRANSFER_VILLAGE_OWNERSHIP_villages}
|
||||
#enddef
|
||||
|
||||
|
|
|
@ -366,70 +366,6 @@
|
|||
{CLEAR_VARIABLE PUT_TO_RECALL_LIST_temp}
|
||||
#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}
|
||||
#enddef
|
||||
|
||||
#define STARTING_VILLAGES SIDE RADIUS
|
||||
# Macro to make a side start a scenario with villages
|
||||
[event]
|
||||
name=prestart
|
||||
|
||||
[store_starting_location]
|
||||
side={SIDE}
|
||||
variable=temp_starting_location
|
||||
[/store_starting_location]
|
||||
|
||||
{CAPTURE_VILLAGES {SIDE} $temp_starting_location.x $temp_starting_location.y {RADIUS}}
|
||||
{CLEAR_VARIABLE temp_starting_location}
|
||||
[/event]
|
||||
#enddef
|
||||
|
||||
#define STARTING_VILLAGES_AREA SIDE X Y RADIUS
|
||||
# Make a side start with ownership of villages in a given area.
|
||||
[event]
|
||||
name=prestart
|
||||
|
||||
{CAPTURE_VILLAGES {SIDE} {X} {Y} {RADIUS}}
|
||||
[/event]
|
||||
#enddef
|
||||
|
||||
#define TRANSFER_VILLAGE_OWNERSHIP FROM_SIDE TO_SIDE
|
||||
# Transfers ownership of all villages of one side to another side. Useful
|
||||
# when you're for example moving all units of some side to another, and want
|
||||
# to transfer the village ownership as well.
|
||||
[store_villages]
|
||||
owner_side={FROM_SIDE}
|
||||
variable=TRANSFER_VILLAGE_OWNERSHIP_villages
|
||||
[/store_villages]
|
||||
|
||||
{FOREACH TRANSFER_VILLAGE_OWNERSHIP_villages TRANSFER_VILLAGE_OWNERSHIP_i}
|
||||
[capture_village]
|
||||
x,y=$TRANSFER_VILLAGE_OWNERSHIP_villages[$TRANSFER_VILLAGE_OWNERSHIP_i].x,$TRANSFER_VILLAGE_OWNERSHIP_villages[$TRANSFER_VILLAGE_OWNERSHIP_i].y
|
||||
side={TO_SIDE}
|
||||
[/capture_village]
|
||||
{NEXT TRANSFER_VILLAGE_OWNERSHIP_i}
|
||||
|
||||
{CLEAR_VARIABLE TRANSFER_VILLAGE_OWNERSHIP_villages}
|
||||
#enddef
|
||||
|
||||
# FIXME: Documentation for these is needed.
|
||||
|
||||
#define MENU_IMG_TXT IMG TXT
|
||||
|
|
Loading…
Add table
Reference in a new issue