Final changes
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user