Author: esr
Date: Sat Aug 16 00:04:06 2008
New Revision: 28617

URL: http://svn.gna.org/viewcvs/wesnoth?rev=28617&view=rev
Log:
Address bug #11234: prefer leveled-up fighters, if any.

Modified:
    trunk/data/campaigns/tutorial/scenarios/2_Tutorial.cfg

Modified: trunk/data/campaigns/tutorial/scenarios/2_Tutorial.cfg
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/campaigns/tutorial/scenarios/2_Tutorial.cfg?rev=28617&r1=28616&r2=28617&view=diff
==============================================================================
--- trunk/data/campaigns/tutorial/scenarios/2_Tutorial.cfg (original)
+++ trunk/data/campaigns/tutorial/scenarios/2_Tutorial.cfg Sat Aug 16 00:04:06 
2008
@@ -462,14 +462,24 @@
             variable=recall
             [filter]
                 type=Elvish Fighter
+                [or]
+                    type=Elvish Hero
+                [/or]
+                [or]
+                    type=Elvish Captain
+                [/or]
             [/filter]
         [/store_unit]
 
-        # FIXME: Level 2 units should come first.
+        # Level 2 units should come first.
+        # This kluge may not work if L3s ever become a possibility here.
         {VARIABLE recall_xp1 0}
         {VARIABLE recall_xp2 0}
         {FOREACH recall i}
         {VARIABLE_OP temp_xp format $recall[$i].experience}
+        {VARIABLE_OP temp_level format $recall[$i].level}
+        {VARIABLE_OP temp_level multiply 8}
+        {VARIABLE_OP temp_xp add $temp_level}
         [if]
             [variable]
                 name=temp_xp


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

Reply via email to