# HG changeset patch # User Wuzzy # Date 1461169085 -7200 # Node ID 6191d88282548e85936df5b0bc590f858efcd6e4 # Parent cfc2f087dccf91c6fcd928e7c8eb3aca824c4a2f HedgeEditor: Fix health add/subtract not working for dud mines diff -r cfc2f087dccf -r 6191d8828254 share/hedgewars/Data/Scripts/Multiplayer/HedgeEditor.lua --- a/share/hedgewars/Data/Scripts/Multiplayer/HedgeEditor.lua Wed Nov 23 14:08:43 2016 +0100 +++ b/share/hedgewars/Data/Scripts/Multiplayer/HedgeEditor.lua Wed Apr 20 18:18:05 2016 +0200 @@ -1258,7 +1258,8 @@ elseif pMode[pIndex][2] == "mod" then local _, oldHealth _,_,_,_,_,_,_,_,_,_,_, oldHealth = GetGearValues(sGear) - local newHealth = math.max(1, oldHealth + tonumber(pMode[pIndex][1])) + oldHealth = 36 - oldHealth + newHealth = math.max(1, oldHealth + tonumber(pMode[pIndex][1])) end if newHealth ~= nil then SetGearValues(sGear, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 36 - newHealth)