Follow-up Comment #1, bug #12666 (project wesnoth):

The following should fix this, but most of it can't be applied at this time
due to the stringfreeze.


Index: 09_Bounty_hunters.cfg
===================================================================
--- 09_Bounty_hunters.cfg       (revision 31242)
+++ 09_Bounty_hunters.cfg       (working copy)
@@ -188,11 +188,48 @@
             [/filter]
         [/store_unit]

+        {VARIABLE l3_length l3_selector_store.length}
+        # 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_OP l3_length add -1}
         {FOREACH l3_selector_store unit}
-            [set_variable]
-                name=left_behind
-                format=$left_behind + ", " + $l3_selector_store[$unit].name
-            [/set_variable]
+            # for-case, what a great anti-pattern
+            [switch]
+                variable=unit
+                [case]
+                    value=0
+                    [set_variable]
+                        name=left_behind
+                        format=$l3_selectorstore[$unit].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[$unit].name
+                #    [/set_variable]
+                #[/case]
+                [else]
+                    [set_variable]
+                        name=left_behind
+                        format=$left_behind + ", " +
$l3_selector_store[$unit].name
+                    [/set_variable]
+                [/else]
+            [/switch]
         {NEXT unit}
         {CLEAR_VARIABLE unit}
     [/event]


    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?12666>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


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

Reply via email to