Fix [animate_unit]amount=0 healing 1 hp

This commit is contained in:
Celtic Minstrel 2017-04-10 21:31:15 -04:00 committed by GitHub
parent e369e10eee
commit 3f61eda282

View file

@ -661,7 +661,7 @@ function wml_actions.heal_unit(cfg)
if heal_full then
u.hitpoints = u.max_hitpoints
else
heal_amount = math.min(math.max(1, cfg.amount), heal_amount)
heal_amount = math.min(math.max(0, cfg.amount), heal_amount)
u.hitpoints = u.hitpoints + heal_amount
end