NR S7a: revert 182efc0
, add alternative fix
This commit is contained in:
parent
9fa9c014df
commit
79745921ba
1 changed files with 60 additions and 20 deletions
|
@ -753,7 +753,6 @@
|
|||
|
||||
amount=1
|
||||
[/heal_unit]
|
||||
{CLEAR_VARIABLE heal_amount}
|
||||
|
||||
[message]
|
||||
speaker=Tallin
|
||||
|
@ -938,30 +937,71 @@
|
|||
[event]
|
||||
name=victory
|
||||
|
||||
[modify_unit]
|
||||
# This complex code is used instead of [modify_unit] because it
|
||||
# - allows to add the loyal trait at first place in the trait list
|
||||
# - leaves the units on the field as is, the changes are only visible in the next scenario
|
||||
|
||||
[store_unit]
|
||||
# Get references to the new companions joining us next scenario.
|
||||
[filter]
|
||||
id=Stalrag
|
||||
id="Stalrag,Ro'Arthian,Ro'Sothian"
|
||||
[/filter]
|
||||
variable=new_companions
|
||||
kill=no # Leave them visible on the field during linger mode.
|
||||
[/store_unit]
|
||||
|
||||
side=1
|
||||
canrecruit=no
|
||||
overlays="misc/loyal-icon.png"
|
||||
{TRAIT_LOYAL}
|
||||
[/modify_unit]
|
||||
[foreach]
|
||||
array=new_companions
|
||||
[do]
|
||||
{VARIABLE this_item.side 1}
|
||||
{VARIABLE this_item.canrecruit no}
|
||||
# We'll be unstoring these units onto the recall list, which won't heal them automatically, so we do it here.
|
||||
{CLEAR_VARIABLE this_item.attacks_left}
|
||||
{CLEAR_VARIABLE this_item.moves}
|
||||
{CLEAR_VARIABLE this_item.hitpoints}
|
||||
{CLEAR_VARIABLE this_item.status}
|
||||
# Must be cleared too, otherwise the loyal trait won't change it
|
||||
{CLEAR_VARIABLE this_item.upkeep}
|
||||
# Stalrag gains the loyal and healthy traits, while Ro'Arthian and Ro'Sothian get loyal and undead.
|
||||
[if]
|
||||
[variable]
|
||||
name=this_item.id
|
||||
equals=Stalrag
|
||||
[/variable]
|
||||
[then]
|
||||
{VARIABLE this_item.overlays misc/loyal-icon.png}
|
||||
[set_variables]
|
||||
name=this_item.modifications
|
||||
mode=replace
|
||||
[literal]
|
||||
{TRAIT_LOYAL}
|
||||
{TRAIT_HEALTHY}
|
||||
[/literal]
|
||||
[/set_variables]
|
||||
[/then]
|
||||
[else]
|
||||
{VARIABLE this_item.overlays misc/hero-icon.png}
|
||||
{VARIABLE this_item.ellipse misc/ellipse-hero}
|
||||
[set_variables]
|
||||
name=this_item.modifications
|
||||
mode=replace
|
||||
[literal]
|
||||
{TRAIT_LOYAL}
|
||||
{TRAIT_UNDEAD}
|
||||
[/literal]
|
||||
[/set_variables]
|
||||
[/else]
|
||||
[/if]
|
||||
|
||||
[modify_unit]
|
||||
[filter]
|
||||
id=Ro'Arthian,Ro'Sothian
|
||||
[/filter]
|
||||
[unstore_unit]
|
||||
# Put our referenced units onto the recall list so we have them in the next scenario.
|
||||
variable=this_item
|
||||
x,y=recall,recall
|
||||
[/unstore_unit]
|
||||
[/do]
|
||||
[/foreach]
|
||||
|
||||
side=1
|
||||
canrecruit=no
|
||||
overlays="misc/hero-icon.png"
|
||||
ellipse="misc/ellipse-hero"
|
||||
{TRAIT_LOYAL}
|
||||
[/modify_unit]
|
||||
|
||||
{CLEAR_VARIABLE defeat_arthian}
|
||||
{CLEAR_VARIABLE new_companions,defeat_arthian}
|
||||
[/event]
|
||||
|
||||
# And if the allied AI dies player loses
|
||||
|
|
Loading…
Add table
Reference in a new issue