From f4ad4f11c711e551e439d9fc060d2ad8c720808d Mon Sep 17 00:00:00 2001 From: gfgtdf Date: Fri, 16 Aug 2019 11:48:53 +0200 Subject: [PATCH] use [remove_trait] to remove loyal --- .../scenarios/10_The_Flaming_Sword.cfg | 38 ++++++------------- .../Dead_Water/scenarios/11_Getting_Help.cfg | 24 ++++-------- 2 files changed, 19 insertions(+), 43 deletions(-) diff --git a/data/campaigns/Dead_Water/scenarios/10_The_Flaming_Sword.cfg b/data/campaigns/Dead_Water/scenarios/10_The_Flaming_Sword.cfg index b55f16990bf3..e8e619dd0805 100644 --- a/data/campaigns/Dead_Water/scenarios/10_The_Flaming_Sword.cfg +++ b/data/campaigns/Dead_Water/scenarios/10_The_Flaming_Sword.cfg @@ -616,37 +616,21 @@ message= _ "Correction. Now I have the sword!" [/message] - [store_unit] - [filter] - id=Caladon - [/filter] - variable=Caladon_stored - [/store_unit] - - [remove_unit_overlay] - x=$Caladon_stored.x - y=$Caladon_stored.y - image=misc/hero-icon.png - [/remove_unit_overlay] - - [store_unit] - [filter] - id=Caladon - [/filter] - kill=yes - variable=Caladon_stored - [/store_unit] + [remove_trait] + id=Caladon + trait_id=loyal + [/remove_trait] - {VARIABLE Caladon_stored.side 4} - {VARIABLE Caladon_stored.canrecruit yes} - {VARIABLE Caladon_stored.ellipse ""} # He is not going to recruit, but summon guardians each # turn. Still, he needs this variable set to get a crown icon, # and to show up in the status table. - - [unstore_unit] - variable=Caladon_stored - [/unstore_unit] + [modify_unit] + [filter] + id=Caladon + [/filter] + side=4 + canrecruit=yes + [/modify_unit] [animate_unit] flag=pre_teleport diff --git a/data/campaigns/Dead_Water/scenarios/11_Getting_Help.cfg b/data/campaigns/Dead_Water/scenarios/11_Getting_Help.cfg index 85985c67dfb2..adbeba144afa 100644 --- a/data/campaigns/Dead_Water/scenarios/11_Getting_Help.cfg +++ b/data/campaigns/Dead_Water/scenarios/11_Getting_Help.cfg @@ -130,6 +130,7 @@ [unstore_unit] variable=Tyegea_stored [/unstore_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 @@ -151,25 +152,16 @@ # Change icon on Cylanna to indicate that you can lose her # without losing the game. (Though it would still be sad.) - [store_unit] + [remove_trait] + id=Cylanna + trait_id="loyal" + [/remove_trait] + [modify_unit] [filter] id=Cylanna [/filter] - variable=Cylanna_stored - [/store_unit] - [remove_unit_overlay] - x=$Cylanna_stored.x - y=$Cylanna_stored.y - image=misc/hero-icon.png - [/remove_unit_overlay] - [unit_overlay] - x=$Cylanna_stored.x - y=$Cylanna_stored.y - image=misc/loyal-icon.png - [/unit_overlay] - [clear_variable] - name=Cylanna_stored - [/clear_variable] + {TRAIT_LOYAL} + [/modify_unit] #ifdef HARD [message]