Author: elvish_hunter
Date: Wed Oct 19 10:33:33 2011
New Revision: 51543

URL: http://svn.gna.org/viewcvs/wesnoth?rev=51543&view=rev
Log:
[harm_unit]: added Lua workaround for bug #18795

Modified:
    trunk/data/lua/wml-tags.lua

Modified: trunk/data/lua/wml-tags.lua
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/lua/wml-tags.lua?rev=51543&r1=51542&r2=51543&view=diff
==============================================================================
--- trunk/data/lua/wml-tags.lua (original)
+++ trunk/data/lua/wml-tags.lua Wed Oct 19 10:33:33 2011
@@ -750,6 +750,9 @@
                        private_unit.x, private_unit.y = unit_to_harm.x, 
unit_to_harm.y
                        local att_stats, def_stats = 
wesnoth.simulate_combat(private_unit, 1, unit_to_harm)
                        local temp_new_hitpoints = def_stats.average_hp
+
+                       --FIXME: the line below needs to be removed when bug 
#18795 is fixed; this is just a workaround
+                       if tostring( temp_new_hitpoints ) == "-nan" then 
temp_new_hitpoints = 0 end
 
                        if kill == false and temp_new_hitpoints <= 0 then
                                temp_new_hitpoints = 1


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

Reply via email to