Display correct heal attribute level, fixes #137

This commit is contained in:
stujones11 2018-05-13 16:52:29 +01:00
parent cc6fff2b04
commit 21716ffd31
2 changed files with 2 additions and 2 deletions

@ -270,7 +270,8 @@ armor.set_player_armor = function(self, player)
change[group] = groups[group] / base
end
for _, attr in pairs(self.attributes) do
self.def[name][attr] = attributes[attr]
local mult = attr == "heal" and self.config.heal_multiplier or 1
self.def[name][attr] = attributes[attr] * mult
end
for _, phys in pairs(self.physics) do
self.def[name][phys] = physics[phys]

@ -323,7 +323,6 @@ minetest.register_on_player_hpchange(function(player, hp_change)
local name = player:get_player_name()
if name then
local heal = armor.def[name].heal
heal = heal * armor.config.heal_multiplier
if heal >= math.random(100) then
hp_change = 0
end