@@ -133,7 +133,7 @@ end
|
|||||||
|
|
||||||
|
|
||||||
function abad_hurt(howmuch)
|
function abad_hurt(howmuch)
|
||||||
howmuch = 0
|
-- howmuch = 0
|
||||||
if abad.hurting == 0 and abad.respawning==0 then
|
if abad.hurting == 0 and abad.respawning==0 then
|
||||||
sound.play(audio_abad_hit)
|
sound.play(audio_abad_hit)
|
||||||
abad.energia=abad.energia-howmuch
|
abad.energia=abad.energia-howmuch
|
||||||
@@ -324,9 +324,10 @@ function abad_state_normal()
|
|||||||
end
|
end
|
||||||
|
|
||||||
if abad.falling>0 then
|
if abad.falling>0 then
|
||||||
if abad.falling>(abad.max_jump_height<<1) then
|
local altura_piso = (mapa_room_rows*arcade_config.tiles_height)
|
||||||
-- numero de pisos caiguts * 2
|
local pisos_caiguts = math.floor(abad.falling/altura_piso)
|
||||||
local damage = math.floor(abad.falling/(mapa_room_rows*arcade_config.tiles_height))*2
|
local damage = pisos_caiguts*2
|
||||||
|
if damage>0 then
|
||||||
if damage>abad.energia then damage=abad.energia end
|
if damage>abad.energia then damage=abad.energia end
|
||||||
abad_hurt(damage)
|
abad_hurt(damage)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -461,6 +461,7 @@ function special_keys()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function debug_info()
|
function debug_info()
|
||||||
|
fps_print()
|
||||||
-- if true then return end
|
-- if true then return end
|
||||||
font.current(font_default)
|
font.current(font_default)
|
||||||
-- viewp:print()
|
-- viewp:print()
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ require "opcions"
|
|||||||
require "opcions_input"
|
require "opcions_input"
|
||||||
require "point"
|
require "point"
|
||||||
|
|
||||||
--require "fps"
|
require "fps"
|
||||||
--require "menu"
|
--require "menu"
|
||||||
|
|
||||||
|
|
||||||
@@ -88,7 +88,7 @@ function mini.init()
|
|||||||
logo_config(font_sf)
|
logo_config(font_sf)
|
||||||
surf.target(0)
|
surf.target(0)
|
||||||
surf.cls(16)
|
surf.cls(16)
|
||||||
flow:executar("logo")
|
flow:executar("game")
|
||||||
end
|
end
|
||||||
|
|
||||||
function mini.update()
|
function mini.update()
|
||||||
@@ -104,6 +104,10 @@ function mini.update()
|
|||||||
|
|
||||||
if (game_update) then game_update() end
|
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
|
end
|
||||||
|
|
||||||
function mini.close()
|
function mini.close()
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ function stages.stage1_init()
|
|||||||
zombie2, abad, 150, "Aaaaaargh... per ell!", 250)
|
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 ( 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:move(abad_x, abad_y)
|
||||||
abad_make_safe( true )
|
abad_make_safe( true )
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ function trigger:draw()
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- debug rect
|
-- 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
|
end
|
||||||
|
|
||||||
--function trigger:do_touched()
|
--function trigger:do_touched()
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ function zombie.new(_hab,_x,_y,_flip)
|
|||||||
draw=zombie.draw,
|
draw=zombie.draw,
|
||||||
jumpfwd=false,
|
jumpfwd=false,
|
||||||
anim={16,17,16,18},
|
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,
|
can_warp=true,
|
||||||
warping=false,
|
warping=false,
|
||||||
shrink=1,
|
shrink=1,
|
||||||
|
|||||||
Reference in New Issue
Block a user