Add file death_logic.lua

This commit is contained in:
jordan4ibanez 2021-04-22 20:30:50 -04:00
parent b73ab976a1
commit 3fe8d2d3c5
3 changed files with 4 additions and 1 deletions

View File

@ -159,6 +159,7 @@ dofile(api_path .. "movement.lua")
dofile(api_path .. "set_up.lua")
dofile(api_path .. "attack_type_instructions.lua")
dofile(api_path .. "sound_handling.lua")
dofile(api_path .. "death_logic.lua")
mobs.spawning_mobs = {}

View File

@ -611,7 +611,7 @@ mobs.mob_step = function(self, dtime)
end
if self.health <= 0 then
print("I'm DEAD :(")
return
end
@ -668,6 +668,8 @@ mobs.mob_step = function(self, dtime)
if self.pause_timer < 0 then
self.pause_timer = 0
end
return -- don't allow collision detection
--do normal ai
else
--jump only (like slimes)