[WIP] Treballant en el jefe. Preparant l'achuda
This commit is contained in:
@@ -278,8 +278,8 @@ function update_game()
|
||||
score.draw()
|
||||
|
||||
special_keys()
|
||||
if DEBUG then
|
||||
debug_info()
|
||||
if DEBUG then
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -344,7 +344,7 @@ function msg_print(x, y, msg, direct_print )
|
||||
else
|
||||
scr_x, scr_y = viewp:screen_coords(x, y)
|
||||
end
|
||||
draw.rectf(scr_x,scr_y,256,20,16)
|
||||
draw.rectf(scr_x,scr_y,64,8,16)
|
||||
draw.text(msg,scr_x+1,scr_y+1,2)
|
||||
end
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ function premiere.init()
|
||||
premiere.scene_object=false
|
||||
-- local habs={75,44,20,0}
|
||||
local habs={75,44,20,0}
|
||||
premiere.hab=habs[1+math.random(0,3)]
|
||||
-- premiere.hab=habs[1+math.random(0,3)]
|
||||
|
||||
premiere.hab=0
|
||||
|
||||
@@ -222,3 +222,41 @@ function premiere.update_falling()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function premiere.healer_init()
|
||||
if premiere.update==premiere.update_healer then return true end
|
||||
premiere.hab = 54
|
||||
premiere.x = 2
|
||||
premiere.y = 3
|
||||
local world_x, world_y = coords.room_to_world(premiere.hab,premiere.x,premiere.y)
|
||||
premiere.x=world_x
|
||||
premiere.y=world_y
|
||||
premiere.health_wait = 100
|
||||
premiere.update = premiere.update_healer
|
||||
end
|
||||
|
||||
function premiere.update_healer()
|
||||
-- Esperar mentres dona la vida
|
||||
if premiere.health_wait>0 and premiere.health_wait<100 then
|
||||
premiere.health_wait = premiere.health_wait - 1
|
||||
else
|
||||
premiere.x = premiere.x+1
|
||||
end
|
||||
|
||||
-- Lloc de pausa
|
||||
local hab, tx, ty = coords.world_to_tile(premiere.x, premiere.y)
|
||||
if hab == 55 and tx==0 and ty==3 and premiere.health_wait==100 then
|
||||
-- 55 (0,3)
|
||||
table.insert(
|
||||
dialegs,
|
||||
{ actor1=premiere,
|
||||
actor2=abad,
|
||||
distancia=500,
|
||||
direccio = "",
|
||||
enabled=true,
|
||||
text="Tenne! Io t'achudo. Figo!"
|
||||
}
|
||||
)
|
||||
premiere.health_wait = premiere.health_wait - 1
|
||||
end
|
||||
end
|
||||
@@ -156,7 +156,7 @@ function stages.stage1_init()
|
||||
|
||||
|
||||
local abad_x, abad_y = coords.room_to_world ( 10, 4, 3 )
|
||||
-- local abad_x, abad_y = coords.room_to_world ( 54, 8, 3 )
|
||||
local abad_x, abad_y = coords.room_to_world ( 54, 8, 3 )
|
||||
abad:move(abad_x, abad_y)
|
||||
abad_make_safe( true )
|
||||
|
||||
@@ -173,6 +173,10 @@ end
|
||||
function stages.stage1_update()
|
||||
-- print("stage1_update")
|
||||
fireball.update()
|
||||
if (abad.energia<=abad.max_energia/2) then
|
||||
-- Requeriment: tindre mitja clau
|
||||
premiere.healer_init()
|
||||
end
|
||||
end
|
||||
|
||||
function stages.stage1_draw_back()
|
||||
|
||||
Reference in New Issue
Block a user