[FIX] Incidencies #4 y #6 resoltes

This commit is contained in:
2026-05-01 17:32:04 +02:00
parent 17ad156896
commit bbcb6cc667
6 changed files with 16 additions and 10 deletions

View File

@@ -133,7 +133,7 @@ end
function abad_hurt(howmuch)
howmuch = 0
-- howmuch = 0
if abad.hurting == 0 and abad.respawning==0 then
sound.play(audio_abad_hit)
abad.energia=abad.energia-howmuch
@@ -324,9 +324,10 @@ function abad_state_normal()
end
if abad.falling>0 then
if abad.falling>(abad.max_jump_height<<1) then
-- numero de pisos caiguts * 2
local damage = math.floor(abad.falling/(mapa_room_rows*arcade_config.tiles_height))*2
local altura_piso = (mapa_room_rows*arcade_config.tiles_height)
local pisos_caiguts = math.floor(abad.falling/altura_piso)
local damage = pisos_caiguts*2
if damage>0 then
if damage>abad.energia then damage=abad.energia end
abad_hurt(damage)
end

View File

@@ -461,6 +461,7 @@ function special_keys()
end
function debug_info()
fps_print()
-- if true then return end
font.current(font_default)
-- viewp:print()

View File

@@ -18,7 +18,7 @@ require "opcions"
require "opcions_input"
require "point"
--require "fps"
require "fps"
--require "menu"
@@ -88,7 +88,7 @@ function mini.init()
logo_config(font_sf)
surf.target(0)
surf.cls(16)
flow:executar("logo")
flow:executar("game")
end
function mini.update()
@@ -104,6 +104,10 @@ function mini.update()
if (game_update) then game_update() end
-- Pausa per a que vaja be en mini 1.5.1
local t0 = os.clock()
while os.clock()-t0<0.01 do end
draw.text(sys.fps(),0,15,2)
end
function mini.close()

View File

@@ -141,7 +141,7 @@ function stages.stage1_init()
zombie2, abad, 150, "Aaaaaargh... per ell!", 250)
local abad_x, abad_y = coords.room_to_world ( 10, 4, 3 )
-- local abad_x, abad_y = coords.room_to_world ( 19, 1, 3 )
-- local abad_x, abad_y = coords.room_to_world ( 54, 8, 3 )
abad:move(abad_x, abad_y)
abad_make_safe( true )

View File

@@ -58,7 +58,7 @@ function trigger:draw()
end
-- debug rect
draw.rect(scr_x,scr_y,self.bb.w,self.bb.h,3)
-- draw.rect(scr_x,scr_y,self.bb.w,self.bb.h,3)
end
--function trigger:do_touched()

View File

@@ -21,7 +21,7 @@ function zombie.new(_hab,_x,_y,_flip)
draw=zombie.draw,
jumpfwd=false,
anim={16,17,16,18},
bb={x=4,y=0,w=26,h=32},
bb={x=4,y=1,w=26,h=30},
can_warp=true,
warping=false,
shrink=1,