use [modify_unit] over store+unstore
This commit is contained in:
parent
ef06634485
commit
8610cc0a15
8 changed files with 26 additions and 115 deletions
|
@ -603,28 +603,12 @@
|
|||
[/variable]
|
||||
|
||||
[then]
|
||||
[store_unit]
|
||||
[modify_unit]
|
||||
[filter]
|
||||
side=2
|
||||
[/filter]
|
||||
kill=yes
|
||||
variable=orcs
|
||||
[/store_unit]
|
||||
[foreach]
|
||||
array=orcs
|
||||
[do]
|
||||
[set_variable]
|
||||
name=this_item.moves
|
||||
value=0
|
||||
[/set_variable]
|
||||
[unstore_unit]
|
||||
variable=this_item
|
||||
[/unstore_unit]
|
||||
[/do]
|
||||
[/foreach]
|
||||
[clear_variable]
|
||||
name=orcs
|
||||
[/clear_variable]
|
||||
moves=0
|
||||
[/modify_unit]
|
||||
[/then]
|
||||
[/if]
|
||||
[/event]
|
||||
|
|
|
@ -218,24 +218,12 @@
|
|||
id=Growloff
|
||||
[/filter]
|
||||
|
||||
[store_unit]
|
||||
variable=Growloff_stored
|
||||
[modify_unit]
|
||||
[filter]
|
||||
id=Growloff
|
||||
[/filter]
|
||||
kill=yes
|
||||
[/store_unit]
|
||||
|
||||
[set_variable]
|
||||
name=Growloff_stored.hitpoints
|
||||
value=1
|
||||
[/set_variable]
|
||||
|
||||
[unstore_unit]
|
||||
variable=Growloff_stored
|
||||
[/unstore_unit]
|
||||
|
||||
{CLEAR_VARIABLE Growloff_stored}
|
||||
hitpoints=1
|
||||
[/modify_unit]
|
||||
|
||||
[message]
|
||||
speaker=Growloff
|
||||
|
|
|
@ -112,33 +112,19 @@
|
|||
message= _ "No matter. He was a fool. Now, you have done as I asked, grandson, so I will travel with you to your home and help you rid it of restless spirits. My priestesses will come as well, and will be at your disposal."
|
||||
[/message]
|
||||
# Switch Tyegea to side 1:
|
||||
[store_unit]
|
||||
[modify_unit]
|
||||
[filter]
|
||||
id=Tyegea
|
||||
[/filter]
|
||||
variable=Tyegea_stored
|
||||
kill=yes
|
||||
[/store_unit]
|
||||
[set_variable]
|
||||
name=Tyegea_stored.canrecruit
|
||||
value=no
|
||||
[/set_variable]
|
||||
[set_variable]
|
||||
name=Tyegea_stored.side
|
||||
value=1
|
||||
[/set_variable]
|
||||
[unstore_unit]
|
||||
variable=Tyegea_stored
|
||||
[/unstore_unit]
|
||||
side=1
|
||||
canrecruit=no
|
||||
[/modify_unit]
|
||||
## TODO: im not sure what happens here, why is he getting the loyal overlay but not the real trait?
|
||||
[unit_overlay]
|
||||
x=$Tyegea_stored.x
|
||||
y=$Tyegea_stored.y
|
||||
image=misc/loyal-icon.png
|
||||
[/unit_overlay]
|
||||
[clear_variable]
|
||||
name=Tyegea_stored
|
||||
[/clear_variable]
|
||||
|
||||
[allow_recruit]
|
||||
type=Mermaid Priestess
|
||||
|
|
|
@ -291,20 +291,12 @@
|
|||
[/variable]
|
||||
|
||||
[then]
|
||||
[store_unit]
|
||||
[modify_unit]
|
||||
[filter]
|
||||
id=Mal-Kevek
|
||||
[/filter]
|
||||
variable=bad_guy_stored
|
||||
kill=yes
|
||||
[/store_unit]
|
||||
[set_variable]
|
||||
name=bad_guy_stored.name
|
||||
value=Mal-Necross
|
||||
[/set_variable]
|
||||
[unstore_unit]
|
||||
variable=bad_guy_stored
|
||||
[/unstore_unit]
|
||||
name="Mal-Necross"
|
||||
[/modify_unit]
|
||||
[/then]
|
||||
[/if]
|
||||
|
||||
|
@ -315,26 +307,14 @@
|
|||
[/variable]
|
||||
|
||||
[then]
|
||||
[store_unit]
|
||||
[modify_unit]
|
||||
[filter]
|
||||
id=Mel Daveth
|
||||
[/filter]
|
||||
variable=bad_guy_stored
|
||||
kill=yes
|
||||
[/store_unit]
|
||||
[set_variable]
|
||||
name=bad_guy_stored.name
|
||||
value=Mal-Verloth
|
||||
[/set_variable]
|
||||
[unstore_unit]
|
||||
variable=bad_guy_stored
|
||||
[/unstore_unit]
|
||||
name="Mal-Verloth"
|
||||
[/modify_unit]
|
||||
[/then]
|
||||
[/if]
|
||||
|
||||
[clear_variable]
|
||||
name=bad_guy_stored
|
||||
[/clear_variable]
|
||||
[/event]
|
||||
|
||||
# This event shows KK on the edge of the map for a second, moves
|
||||
|
|
|
@ -168,25 +168,14 @@
|
|||
name=side turn end
|
||||
first_time_only=no
|
||||
|
||||
[store_unit]
|
||||
[modify_unit]
|
||||
[filter]
|
||||
side=$side_number
|
||||
status=stunned
|
||||
[/filter]
|
||||
variable=stunned
|
||||
[/store_unit]
|
||||
|
||||
[foreach]
|
||||
array=stunned
|
||||
[do]
|
||||
{CLEAR_VARIABLE this_item.status.stunned}
|
||||
|
||||
[unstore_unit]
|
||||
variable=this_item
|
||||
[/unstore_unit]
|
||||
[/do]
|
||||
[/foreach]
|
||||
|
||||
{CLEAR_VARIABLE stunned}
|
||||
[status]
|
||||
stunned=no
|
||||
[/status]
|
||||
[/modify_unit]
|
||||
[/event]
|
||||
[/unit_type]
|
||||
|
|
|
@ -374,6 +374,7 @@
|
|||
[foreach]
|
||||
array=units_inside_manor
|
||||
[do]
|
||||
# TODO: whats the point of killing it and then unstoring it here without changes?
|
||||
[unstore_unit]
|
||||
variable=this_item
|
||||
find_vacant=no
|
||||
|
|
|
@ -375,24 +375,13 @@
|
|||
x,y=26,16
|
||||
[/recall]
|
||||
|
||||
[store_unit]
|
||||
[modify_unit]
|
||||
[filter]
|
||||
id=Darken Volk
|
||||
[/filter]
|
||||
kill=yes
|
||||
variable=stored_Darken
|
||||
[/store_unit]
|
||||
|
||||
{VARIABLE stored_Darken.side 3}
|
||||
{VARIABLE stored_Darken.canrecruit yes}
|
||||
|
||||
{CLEAR_VARIABLE stored_Darken.ellipse}
|
||||
|
||||
[unstore_unit]
|
||||
variable=stored_Darken
|
||||
[/unstore_unit]
|
||||
|
||||
{CLEAR_VARIABLE stored_Darken}
|
||||
side=3
|
||||
canrecruit=yes
|
||||
[/modify_unit]
|
||||
|
||||
[lock_view][/lock_view]
|
||||
[/event]
|
||||
|
|
|
@ -195,12 +195,6 @@
|
|||
canrecruit=yes
|
||||
role=book_carrier
|
||||
[/modify_unit]
|
||||
|
||||
[unstore_unit]
|
||||
variable=stored_Darken
|
||||
[/unstore_unit]
|
||||
|
||||
{CLEAR_VARIABLE stored_Darken}
|
||||
[/event]
|
||||
|
||||
[event]
|
||||
|
|
Loading…
Add table
Reference in a new issue