summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTenPlus1 <kinsellaja@yahoo.com>2017-02-24 09:38:11 +0000
committerTenPlus1 <kinsellaja@yahoo.com>2017-02-24 09:38:11 +0000
commit440d9874b5ecba2c674426d0b737c5c4e815bee5 (patch)
tree3a3505e869ecea65a9dd464f6481542a52c70f29
parent59e8ba64f28b293b716854eeee9550cd9f97cfb9 (diff)
added quick health check when punched
-rw-r--r--api.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/api.lua b/api.lua
index bf81e93..d8e3624 100644
--- a/api.lua
+++ b/api.lua
@@ -1,5 +1,5 @@
--- Mobs Api (22nd February 2017)
+-- Mobs Api (24th February 2017)
mobs = {}
mobs.mod = "redo"
@@ -1992,6 +1992,11 @@ end
local mob_punch = function(self, hitter, tflp, tool_capabilities, dir)
+ -- mob health check
+ if self.health <= 0 then
+ return
+ end
+
-- error checking when mod profiling is enabled
if not tool_capabilities then
print (S("[MOBS] mod profiling enabled, damage not enabled"))