Author: espreon
Date: Tue Oct 25 17:31:01 2011
New Revision: 51631

URL: http://svn.gna.org/viewcvs/wesnoth?rev=51631&view=rev
Log:
Redid Tallin transformation code in the start of the evil branch.

Modified:
    trunk/data/campaigns/Northern_Rebirth/scenarios/05b_Compelled.cfg

Modified: trunk/data/campaigns/Northern_Rebirth/scenarios/05b_Compelled.cfg
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/campaigns/Northern_Rebirth/scenarios/05b_Compelled.cfg?rev=51631&r1=51630&r2=51631&view=diff
==============================================================================
--- trunk/data/campaigns/Northern_Rebirth/scenarios/05b_Compelled.cfg (original)
+++ trunk/data/campaigns/Northern_Rebirth/scenarios/05b_Compelled.cfg Tue Oct 
25 17:31:01 2011
@@ -96,100 +96,29 @@
             [/gold_carryover]
         [/objectives]
 
-        [store_unit]
-            [filter]
-                id=Tallin
-            [/filter]
-            variable=typechange
-            kill=yes
-        [/store_unit]
+        {STORE_UNIT_VAR id=Tallin level old_tallin_level}
 
-        [if]
-            [variable]
-                name=typechange.type
-                equals=Peasant
-            [/variable]
-            [or]
-                [variable]
-                    name=typechange.type
-                    equals=Spearman
-                [/variable]
-            [/or]
-            [or]
-                [variable]
-                    name=typechange.type
-                    equals=Bowman
-                [/variable]
-            [/or]
-            [then]
-                [set_variable]
-                    name=typechange.type
-                    value=Dark Adept
-                [/set_variable]
-            [/then]
-        [/if]
+        [switch]
+            variable=old_tallin_level
 
-        [if]
-            [variable]
-                name=typechange.type
-                equals=Longbowman
-            [/variable]
-            [or]
-                [variable]
-                    name=typechange.type
-                    equals=Swordsman
-                [/variable]
-            [/or]
-            [or]
-                [variable]
-                    name=typechange.type
-                    equals=Pikeman
-                [/variable]
-            [/or]
-            [or]
-                [variable]
-                    name=typechange.type
-                    equals=Javelineer
-                [/variable]
-            [/or]
-            [then]
-                [set_variable]
-                    name=typechange.type
-                    value=Dark Sorcerer
-                [/set_variable]
-            [/then]
-        [/if]
+            [case]
+                value=0,1
+                {VARIABLE new_tallin_type "Dark Adept"}
+            [/case]
 
-        [if]
-            [variable]
-                name=typechange.type
-                equals=Master Bowman
-            [/variable]
-            [or]
-                [variable]
-                    name=typechange.type
-                    equals=Royal Guard
-                [/variable]
-            [/or]
-            [or]
-                [variable]
-                    name=typechange.type
-                    equals=Halberdier
-                [/variable]
-            [/or]
-            [then]
-                [set_variable]
-                    name=typechange.type
-                    value=Lich
-                [/set_variable]
-            [/then]
-        [/if]
+            [case]
+                value=2
+                {VARIABLE new_tallin_type "Dark Sorcerer"}
+            [/case]
 
-        [unstore_unit]
-            variable=typechange
-            find_vacant=yes
-        [/unstore_unit]
-        {CLEAR_VARIABLE typechange}
+            [else]
+                {VARIABLE new_tallin_type Lich}
+            [/else]
+        [/switch]
+
+        {ADVANCE_UNIT id=Tallin $new_tallin_type}
+
+        {CLEAR_VARIABLE old_tallin_level,new_tallin_type}
 
         [store_gold]
             side=1


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

Reply via email to