Added a macro for allowing a side to randomly recruit given unit variations...

...(usually WC variations), and made Muff Malal's Peninsula use that.
This commit is contained in:
Lari Nieminen 2008-06-14 11:17:56 +00:00
parent 0b254ecbb1
commit a180771a1b
2 changed files with 45 additions and 0 deletions

View file

@ -76,6 +76,8 @@
enemy=1
[/side]
{RECRUIT_UNIT_VARIATIONS 2 "Walking Corpse" none,none,none,none,swimmer,swimmer,mounted,bat}
{STARTING_VILLAGES 2 30}
[event]

View file

@ -479,3 +479,46 @@
{CLEAR_VARIABLE TIME_ACTIONS_time_begin}
{CLEAR_VARIABLE TIME_ACTIONS_time_end}
#enddef
#define RECRUIT_UNIT_VARIATIONS SIDE TYPE VARIATIONS
# Allows a side to seemingly recruit variations of a given unit, such as the
# the Walking Corpse.
#
# An example which makes side 2 have a 50% chance of getting a normal WC
# and a 50% chance of getting either a drake or dwarf variation:
#! {RECRUIT_UNIT_VARIATIONS 2 "Walking Corpse" none,none,drake,dwarf}
[event]
name=prerecruit
first_time_only=no
[filter]
side={SIDE}
type={TYPE}
[/filter]
{VARIABLE_OP recruited_unit_random_variation rand {VARIATIONS}}
[if]
[variable]
name=recruited_unit_random_variation
not_equals=none
[/variable]
[then]
[object]
duration=forever
silent=yes
[filter]
x,y=$x1,$y1
[/filter]
[effect]
apply_to=variation
name=$recruited_unit_random_variation
[/effect]
[/object]
[/then]
[/if]
[/event]
#enddef