Author: rhuvaen
Date: Fri Apr 3 01:14:20 2009
New Revision: 34416
URL: http://svn.gna.org/viewcvs/wesnoth?rev=34416&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:
trunk/data/multiplayer/scenarios/2p_Dark_Forecast.cfg
Modified: trunk/data/multiplayer/scenarios/2p_Dark_Forecast.cfg
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/data/multiplayer/scenarios/2p_Dark_Forecast.cfg?rev=34416&r1=34415&r2=34416&view=diff
==============================================================================
--- trunk/data/multiplayer/scenarios/2p_Dark_Forecast.cfg (original)
+++ trunk/data/multiplayer/scenarios/2p_Dark_Forecast.cfg Fri Apr 3 01:14:20
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,18 @@
poisoned=$poisoned
[/status]
[/unit]
- # set hp now to adjust for trait bonuses
- [store_unit]
+ # add the damage the unit had
+ [store_unit]
variable=last_spawn
- kill=no
+ kill=yes
[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}
+ {VARIABLE hitpoints $last_spawn.hitpoints}
+ {VARIABLE_OP hitpoints add $damage}
+ {VARIABLE last_spawn.hitpoints $hitpoints}
[unstore_unit]
variable=last_spawn
[/unstore_unit]
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits