Author: rhuvaen
Date: Fri Apr  3 00:25:55 2009
New Revision: 34414

URL: http://svn.gna.org/viewcvs/wesnoth?rev=34414&view=rev
Log:
fixed bug where spawns would recover all hp lost in initial attacks in their 
spawning turn while transferring between AI sides.

Modified:
    branches/1.6/data/multiplayer/scenarios/2p_Dark_Forecast.cfg

Modified: branches/1.6/data/multiplayer/scenarios/2p_Dark_Forecast.cfg
URL: 
http://svn.gna.org/viewcvs/wesnoth/branches/1.6/data/multiplayer/scenarios/2p_Dark_Forecast.cfg?rev=34414&r1=34413&r2=34414&view=diff
==============================================================================
--- branches/1.6/data/multiplayer/scenarios/2p_Dark_Forecast.cfg (original)
+++ branches/1.6/data/multiplayer/scenarios/2p_Dark_Forecast.cfg Fri Apr  3 
00:25:55 2009
@@ -170,8 +170,8 @@
             {FOREACH ai_unit id}
                 {VARIABLE name $ai_unit[$id].name}
                 {VARIABLE type $ai_unit[$id].type}
-                {VARIABLE hitpoints $ai_unit[$id].hitpoints}
-                {VARIABLE max_hp $ai_unit[$i].max_hitpoints}
+                {VARIABLE damage $ai_unit[$id].hitpoints}
+                {VARIABLE_OP damage add -$ai_unit[$i].max_hitpoints}
                 {VARIABLE facing $ai_unit[$id].facing}
                 {VARIABLE gender $ai_unit[$id].gender}
                 {VARIABLE experience $ai_unit[$id].experience}
@@ -205,18 +205,8 @@
                         poisoned=$poisoned
                     [/status]
                 [/unit]
-                # set hp now to adjust for trait bonuses
-                [store_unit]
-                    variable=last_spawn
-                    kill=no
-                    [filter]
-                        side={SIDE2}
-                        x,y = $x,$y
-                    [/filter]
-                [/store_unit]
-                {VARIABLE hp_add $last_spawn.max_hitpoints}
-                {VARIABLE_OP hp_add add -$max_hp}
-                {VARIABLE_OP $last_spawn.hitpoints add $hp_add}
+                # add the damage the unit had
+                {VARIABLE_OP $last_spawn.hitpoints add -$damage}
                 [unstore_unit]
                     variable=last_spawn
                 [/unstore_unit]


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

Reply via email to