[WIP] Lluita contra jefes. Eliminats actors de la zona de combat

This commit is contained in:
2026-04-05 17:32:08 +02:00
parent 4c2c8dc84f
commit 5aa9dd5051
6 changed files with 66 additions and 7 deletions

View File

@@ -29,10 +29,13 @@ function caco.new(_hab,_x,_y,_flip)
dying=false,
death_time=40,
anim={19,19,20,21},
bb={x=4,y=4,w=24,h=16} }
bb={x=4,y=4,w=24,h=16},
enabled= true,
disable_reason="" }
end
function caco:draw()
if not self.enabled then return end
-- if self.frame>0 then draw.surf((self.frame&7)*16,(self.frame>>3)*16,16,16,self.x,self.y,16,16,self.flip) end
if self.warping then
@@ -62,6 +65,7 @@ function caco:draw()
end
function caco:update_normal()
if not self.enabled then return end
self.wait=self.wait+1
if self.wait==6 then
@@ -116,6 +120,7 @@ function caco:update_normal()
end
function caco:update_hit()
if not self.enabled then return end
local step_time = self.death_time
if self.can_warp then
step_time = self.death_time/3; -- warp, wait, appear
@@ -181,6 +186,7 @@ function caco:update_hit()
end
function caco:hit()
if not self.enabled then return end
self.update=caco.update_hit
if self.can_warp then self.warping=true end