Final changes

This commit is contained in:
2022-11-21 22:32:31 -05:00
parent 889b9f0b59
commit fd6e8ed98a
4 changed files with 27 additions and 39 deletions

View File

@@ -2794,6 +2794,8 @@ local tr = minetest.get_modpath("toolranks")
-- deal damage and effects when mob punched
function mob_class:on_punch(hitter, tflp, tool_capabilities, dir, damage)
self.health = self.health - 3
-- mob health check
if self.health <= 0 then
return true
@@ -2898,8 +2900,8 @@ function mob_class:on_punch(hitter, tflp, tool_capabilities, dir, damage)
-- healing
if damage <= -1 then
self.health = self.health - floor(damage)
self.health = self.health - 3
return true
end