Change the macros for limiting recruits so they can match on other things...
...besides type, or wildcard the type. This will break some uses in 1.2 UMC, but they will break noisily with a syntax error on load and be trivially correctable, so that's OK.
This commit is contained in:
parent
d43bcf648f
commit
7fab97f197
2 changed files with 13 additions and 13 deletions
|
@ -46,7 +46,7 @@
|
|||
[/ai]
|
||||
[/side]
|
||||
|
||||
{LIMIT_CONTEMPORANEOUS_RECRUITS 2 "Direwolf Rider" 3}
|
||||
{LIMIT_CONTEMPORANEOUS_RECRUITS 2 type="Direwolf Rider" 3}
|
||||
|
||||
{STARTING_VILLAGES 2 8}
|
||||
|
||||
|
@ -67,7 +67,7 @@
|
|||
[/ai]
|
||||
[/side]
|
||||
|
||||
{LIMIT_CONTEMPORANEOUS_RECRUITS 4 "Troll Warrior" 3}
|
||||
{LIMIT_CONTEMPORANEOUS_RECRUITS 4 type="Troll Warrior" 3}
|
||||
|
||||
{STARTING_VILLAGES 3 8}
|
||||
|
||||
|
|
|
@ -4,15 +4,15 @@
|
|||
# to be placed directly under your [scenario] tag, and not within an event
|
||||
# such as start or prestart.
|
||||
|
||||
#define LIMIT_CONTEMPORANEOUS_RECRUITS SIDE TYPE LIMIT
|
||||
# Limit the number of units of a certain type a side can have
|
||||
# simultaneously. When the number of units of type TYPE the side
|
||||
# has reaches or exceeds LIMIT, that side is prevented from
|
||||
#define LIMIT_CONTEMPORANEOUS_RECRUITS SIDE FILTER LIMIT
|
||||
# Limit the number of units passing a specified filter that a side
|
||||
# can have simultaneously. When the number of matching units
|
||||
# side has reaches or exceeds LIMIT, that side is prevented from
|
||||
# recruiting more until the number of units of that type drops
|
||||
# below LIMIT again.
|
||||
#
|
||||
# Allow side 2 no more than 2 Troll Rocklobbers at a time
|
||||
#! {LIMIT_CONTEMPORANEOUS_RECRUITS 2 (Troll Rocklobber) 2}
|
||||
#! {LIMIT_CONTEMPORANEOUS_RECRUITS 2 type="Troll Rocklobber" 2}
|
||||
[event]
|
||||
name=side turn
|
||||
first_time_only=no
|
||||
|
@ -27,7 +27,7 @@
|
|||
[store_unit]
|
||||
[filter]
|
||||
side={SIDE}
|
||||
type={TYPE}
|
||||
{FILTER}
|
||||
[/filter]
|
||||
|
||||
kill=no
|
||||
|
@ -97,12 +97,12 @@
|
|||
[/event]
|
||||
#enddef
|
||||
|
||||
#define LIMIT_RECRUITS SIDE TYPE LIMIT
|
||||
# Limit the total number of units of a given type a given side
|
||||
# can recruit in the scenario.
|
||||
#define LIMIT_RECRUITS SIDE FILTER LIMIT
|
||||
# Limit the total number of units passing a specified filter that a given
|
||||
# side can recruit in the scenario.
|
||||
#
|
||||
# Allow side 2 no more than 1 Draug in the entire scenario
|
||||
#! {LIMIT_RECRUITS 2 (Draug) 1}
|
||||
#! {LIMIT_RECRUITS 2 type=Draug 1}
|
||||
[+variables]
|
||||
side_{SIDE}_limited_recruits_length=-1
|
||||
[/variables]
|
||||
|
@ -113,7 +113,7 @@
|
|||
|
||||
[filter]
|
||||
side={SIDE}
|
||||
type={TYPE}
|
||||
{FILTER}
|
||||
[/filter]
|
||||
|
||||
{VARIABLE_OP side_{SIDE}_limited_recruits_length add 1}
|
||||
|
|
Loading…
Add table
Reference in a new issue