[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