SoF utils: add macro to clear rune variables after scenarios

This commit is contained in:
Lukas Jox 2020-05-01 20:40:30 +02:00
parent 81b3290085
commit 05c30fb936
8 changed files with 39 additions and 2 deletions

View file

@ -982,6 +982,8 @@
[event]
name=scenario_end
{SOF_CLEAR_RUNE_VARS 1}
{CLEAR_VARIABLE incominggold,havestone}
[/event]

View file

@ -769,6 +769,8 @@
[event]
name=scenario_end
{SOF_CLEAR_RUNE_VARS 1}
{CLEAR_VARIABLE glyphs,glyph_i,locations_outside,gate_closed}
[/event]

View file

@ -612,6 +612,7 @@
[/message]
{MAKE_LOYAL_NORMAL Baglur}
{CLEAR_VARIABLE thur_x,thur_y}
{SOF_CLEAR_RUNE_VARS 1}
[endlevel]
result=victory
bonus=yes

View file

@ -1182,6 +1182,8 @@
variable=krawg
[/unstore_unit]
{SOF_CLEAR_RUNE_VARS 1}
{CLEAR_VARIABLE alanin}
{CLEAR_VARIABLE krawg}

View file

@ -898,6 +898,8 @@
[event]
name=victory
{SOF_CLEAR_RUNE_VARS 1}
{CLEAR_VARIABLE elves_come}
[/event]

View file

@ -632,6 +632,8 @@
[event]
name=victory
{SOF_CLEAR_RUNE_VARS 1}
# This [if] is used only in the case the player happened to defeat all
# the enemy leaders and didn't move Alanin to the signpost
[if]

View file

@ -472,6 +472,8 @@
[/unstore_unit]
{CLEAR_VARIABLE thur}
{SOF_CLEAR_RUNE_VARS 1}
[object]
id=sceptre of fire
silent=yes

View file

@ -98,6 +98,21 @@
id=sof_rune_shop
[/fire_event]
[/event]
[event]
name=moveto
id=sof_rune_shop_flavor_text
first_time_only=yes
[filter]
id=Thursagan
[filter_location]
terrain=K*
[/filter_location]
[/filter]
[message]
speaker=Thursagan
message= _ "My tools are ready. Step closer, if you want to witness my rune-work."
[/message]
[/event]
[event]
name=side 1 turn
id=sof_sfe_side1turn
@ -382,7 +397,7 @@
#define SOF_RUNIC_CHEST_SWIFTNESS X Y
{SOF_RUNIC_CHEST_GENERIC (
[option]
{SOF_RUNIC_OPTION swiftness (_ "Swiftness") (_ "Adds 1 MP") ("misc/rune_icon.png~BLIT(scenery/summoning-circle4.png~CROP(6,6,60,60),0,0)") 8 (
{SOF_RUNIC_OPTION "swiftness" (_ "Swiftness") (_ "Adds 1 MP") ("misc/rune_icon.png~BLIT(scenery/summoning-circle4.png~CROP(6,6,60,60),0,0)") 8 (
[effect]
apply_to=movement
increase=1
@ -420,7 +435,7 @@
#define SOF_RUNIC_CHEST_ACCURACY X Y
{SOF_RUNIC_CHEST_GENERIC (
[option]
{SOF_RUNIC_OPTION accuracy (_ "Accuracy") (_ "Increases ranged weapon accuracy 10%") ("misc/rune_icon.png~BLIT(scenery/summoning-circle5.png~CROP(6,6,60,60),0,0)") 10 (
{SOF_RUNIC_OPTION "accuracy" (_ "Accuracy") (_ "Increases ranged weapon accuracy 10%") ("misc/rune_icon.png~BLIT(scenery/summoning-circle5.png~CROP(6,6,60,60),0,0)") 10 (
[effect]
apply_to=attack
range=ranged
@ -494,3 +509,12 @@
[/option]
) {X} {Y}}
#enddef
#define SOF_CLEAR_RUNE_VARS SIDE
[modify_unit]
[filter]
side={SIDE}
[/filter]
{CLEAR_VARIABLE swiftness_rune,accuracy_rune,force_rune}
[/modify_unit]
#enddef