@@ -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
|
||||
|
||||
Reference in New Issue
Block a user