Author: esr
Date: Thu Sep 11 21:10:42 2008
New Revision: 29400

URL: http://svn.gna.org/viewcvs/wesnoth?rev=29400&view=rev
Log:
Re-fix bug #12278 using the new TRANSFORM_UNIT and FULL_HEAL macros.

Modified:
    trunk/data/campaigns/Northern_Rebirth/scenarios/06a_Old_Friend.cfg

Modified: trunk/data/campaigns/Northern_Rebirth/scenarios/06a_Old_Friend.cfg
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/campaigns/Northern_Rebirth/scenarios/06a_Old_Friend.cfg?rev=29400&r1=29399&r2=29400&view=diff
==============================================================================
--- trunk/data/campaigns/Northern_Rebirth/scenarios/06a_Old_Friend.cfg 
(original)
+++ trunk/data/campaigns/Northern_Rebirth/scenarios/06a_Old_Friend.cfg Thu Sep 
11 21:10:42 2008
@@ -198,66 +198,33 @@
     [event]
         name=prestart
 
-        # {SCATTER_IMAGE (terrain=Gg,Gs^Fp) 12 scenery/pine2.png}
-
-        # Store Tallin. We need to kill him, otherwise animations will get 
-        # screwed on unstoring
-        [store_unit]
-            [filter]
-                id=Tallin
-            [/filter]
-            variable=type_change
-            kill=yes
-        [/store_unit]
-
         # Check his level, and set new type to be a commander of the same 
level.
-        # Setting the advancement type seems to be required, I'm not sure why.
+        {STORE_UNIT_VAR id=Tallin level old_tallin_level}
         [if]
             [variable]
-                name=type_change.level
+                name=old_tallin_level
                 greater_than=2
             [/variable]
             [then]
-                {VARIABLE type_change.type General}
-                {VARIABLE type_change.advances_to null}
+                {TRANFORM_UNIT id=Tallin General}
             [/then]
             [else]
                 [if]
                     [variable]
-                        name=type_change.level
+                        name=old_tallin_level
                         greater_than=1
                     [/variable]
                     [then]
-                        {VARIABLE type_change.type Lieutenant}
-                        {VARIABLE type_change.advances_to General}
+                        {TRANSFORM_UNIT id=Tallin Lieutenant}
                     [/then]
                     [else]
-                        {VARIABLE type_change.type Sergeant}
-                        {VARIABLE type_change.level 1}
-                        {VARIABLE type_change.advances_to Lieutenant}
+                        {TRANSFORM_UNIT id=Tallin Sergeant}
                     [/else]
                 [/if]
             [/else]
         [/if]
-        # Unstore our new leader
-        [unstore_unit]
-            variable=type_change
-            find_vacant=yes
-        [/unstore_unit]
-        [store_unit]
-            [filter]
-                id=Tallin
-            [/filter]
-            kill=no
-            variable=type_change
-        [/store_unit]
-        # We also need to fix current hitpoints, otherwise he could 
-        # get unstored hurt
-        {VARIABLE type_change.hitpoints $type_change.max_hitpoints}
-        [unstore_unit]
-            variable=type_change
-        [/unstore_unit]
-        {CLEAR_VARIABLE type_change}
+        {CLEAR_VARIABLE old_tallin_level}
+        {FULL_HEAL id=Tallin}
     [/event]
 
     # Start event, recall heroes, place some bad guys, set objectives, 


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to