SotBE 7: refactor to use [random_placement]
[ci skip]
This commit is contained in:
parent
0ebdf75fdc
commit
e3a4b4d498
1 changed files with 20 additions and 16 deletions
|
@ -245,24 +245,28 @@
|
|||
less_than=$scorp_prob
|
||||
[/variable]
|
||||
[then]
|
||||
[store_locations]
|
||||
x,y=1-38,1-30
|
||||
terrain=D*
|
||||
[not]
|
||||
[filter]
|
||||
[/filter]
|
||||
radius=8
|
||||
[/not]
|
||||
variable=scorpion_locs
|
||||
[/store_locations]
|
||||
|
||||
{RANDOM "1..$scorpion_locs.length"}
|
||||
{VARIABLE_OP random sub 1}
|
||||
#{MESSAGE narrator "" "" "New scorpion at: $scorpion_locs[$random].x $scorpion_locs[$random].y"}
|
||||
{UNIT 3 "Giant Scorpion" $scorpion_locs[$random].x $scorpion_locs[$random].y variation=scuttler}
|
||||
[random_placement]
|
||||
num_items=1
|
||||
variable=scorpion_loc
|
||||
min_distance=0
|
||||
allow_less=yes
|
||||
[filter_location]
|
||||
x,y=1-38,1-30
|
||||
terrain=D*
|
||||
[not]
|
||||
[filter]
|
||||
[/filter]
|
||||
radius=8
|
||||
[/not]
|
||||
include_borders=no
|
||||
[/filter_location]
|
||||
[command]
|
||||
{UNIT 3 "Giant Scorpion" $scorpion_loc.x $scorpion_loc.y variation=scuttler}
|
||||
[/command]
|
||||
[/random_placement]
|
||||
[/then]
|
||||
[/if]
|
||||
{CLEAR_VARIABLE random,scorp_prob,scorpion_locs}
|
||||
{CLEAR_VARIABLE random,scorp_prob}
|
||||
[/event]
|
||||
|
||||
[event]
|
||||
|
|
Loading…
Add table
Reference in a new issue