Added a new utility macro for transferring control of all villages...
...from one side to another.
This commit is contained in:
parent
7ffdd45d16
commit
e93de2236d
1 changed files with 20 additions and 0 deletions
|
@ -475,6 +475,26 @@
|
||||||
[/event]
|
[/event]
|
||||||
#enddef
|
#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 i}
|
||||||
|
|
||||||
|
{CLEAR_VARIABLE TRANSFER_VILLAGE_OWNERSHIP_villages}
|
||||||
|
{CLEAR_VARIABLE TRANSFER_VILLAGE_OWNERSHIP_i}
|
||||||
|
#enddef
|
||||||
|
|
||||||
#define NOTRAIT_UNIT TYPE DESCRIPTION USER_DESCRIPTION SIDE X Y
|
#define NOTRAIT_UNIT TYPE DESCRIPTION USER_DESCRIPTION SIDE X Y
|
||||||
# Creates a unit with no traits.
|
# Creates a unit with no traits.
|
||||||
#
|
#
|
||||||
|
|
Loading…
Add table
Reference in a new issue