[WIP] Score

This commit is contained in:
2026-03-29 00:23:18 +01:00
parent 398fcda66a
commit 40ea0786c2
4 changed files with 117 additions and 3 deletions

View File

@@ -56,7 +56,8 @@ function abad_init()
respawning=0,
hab=10,
vides=3,
energia=40,
energia=6,
max_energia=6,
falling=0,
step=0,
mustep=1,
@@ -135,7 +136,7 @@ function abad_hurt(howmuch)
music.play(audio_game_over,0)
else
music.play(audio_life_lost,0)
abad.energia=40
abad.energia=abad.max_energia
-- abad.hab=abad.safe.hab
-- abad.x=abad.safe.x
-- abad.y=abad.safe.y
@@ -310,7 +311,10 @@ function abad_state_normal()
if abad.falling>0 then
if abad.falling>(abad.max_jump_height<<1) then
abad_hurt(abad.falling-(abad.max_jump_height<<1))
-- numero de pisos caiguts * 2
local damage = math.floor(abad.falling/(mapa_room_rows*arcade_config.tiles_height))*2
if damage>abad.energia then damage=abad.energia end
abad_hurt(damage)
end
abad.falling=0
end