Author: fendrin
Date: Fri Dec  5 15:45:30 2008
New Revision: 31287

URL: http://svn.gna.org/viewcvs/wesnoth?rev=31287&view=rev
Log:
fixed bugs in ai's fix for bug #12666

Modified:
    trunk/data/campaigns/Legend_of_Wesmere/scenarios/09_Bounty_hunters.cfg

Modified: trunk/data/campaigns/Legend_of_Wesmere/scenarios/09_Bounty_hunters.cfg
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/campaigns/Legend_of_Wesmere/scenarios/09_Bounty_hunters.cfg?rev=31287&r1=31286&r2=31287&view=diff
==============================================================================
--- trunk/data/campaigns/Legend_of_Wesmere/scenarios/09_Bounty_hunters.cfg 
(original)
+++ trunk/data/campaigns/Legend_of_Wesmere/scenarios/09_Bounty_hunters.cfg Fri 
Dec  5 15:45:30 2008
@@ -188,41 +188,39 @@
             [/filter]
         [/store_unit]
 
-        # Postponed due to stringfreeze. Wait for 1.7.0
-        #[if]
-        #    [variable]
-        #        name=l3_selector_store.length
-        #        numerical_equals=0
-        #    [/variable]
-        #    [then]
-        #        [set_variable]
-        #            name=left_behind
-        #            value= _ "some experienced warriors"
-        #        [/set_variable]
-        #    [/then]
-        #[/if]
-
-        {VARIABLE l3_length l3_selector_store.length}
+        [if]
+            [variable]
+                name=l3_selector_store.length
+                numerical_equals=0
+            [/variable]
+            [then]
+                [set_variable]
+                    name=left_behind
+                    value= _ "some experienced warriors"
+                [/set_variable]
+            [/then]
+        [/if]
+
+        {VARIABLE l3_length $l3_selector_store.length}
         {VARIABLE_OP l3_length add -1}
         {FOREACH l3_selector_store i}
             # for-case, what a great anti-pattern
             [switch]
-                variable=unit
+                variable=i
                 [case]
                     value=0
                     [set_variable]
                         name=left_behind
-                        format=$l3_selectorstore[$i].name
+                        format=$l3_selector_store[$i].name
                     [/set_variable]
                 [/case]
-                # Also postponed, wait for 1.7.0
-                #[case]
-                #    value=$l3_length
-                #    [set_variable]
-                #        name=left_behind
-                #        format=$left_behind + _ " and " + 
$l3_selector_store[$i].name
-                #    [/set_variable]
-                #[/case]
+                [case]
+                    value=$l3_length
+                    [set_variable]
+                        name=left_behind
+                        format=$left_behind + _ " and " + 
$l3_selector_store[$i].name
+                    [/set_variable]
+                [/case]
                 [else]
                     [set_variable]
                         name=left_behind
@@ -231,7 +229,7 @@
                 [/else]
             [/switch]
         {NEXT i}
-        {CLEAR_VARIABLE unit}
+        {CLEAR_VARIABLE l3_length}
     [/event]
 
     [event]


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

Reply via email to