Skip to content

Commit

Permalink
[heal_unit]: ensure that heal amount is an integer
Browse files Browse the repository at this point in the history
(cherry-picked from commit 76ed49a)
  • Loading branch information
jyrkive committed Oct 7, 2018
1 parent 167ee61 commit d75a752
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion data/lua/wml/heal_unit.lua
Expand Up @@ -31,7 +31,7 @@ function wesnoth.wml_actions.heal_unit(cfg)
new_hitpoints = u.max_hitpoints
else
heal_amount = tonumber(cfg.amount) or heal_amount
new_hitpoints = math.max(1, math.min(u.max_hitpoints, u.hitpoints + heal_amount))
new_hitpoints = math.floor(math.max(1, math.min(u.max_hitpoints, u.hitpoints + heal_amount)))
heal_amount = new_hitpoints - u.hitpoints
end

Expand Down

0 comments on commit d75a752

Please sign in to comment.