[WIP] Treballant en el jefe. Preparant l'achuda

This commit is contained in:
2026-04-23 21:33:39 +02:00
parent ea19c43865
commit 311e5ff6f8
4 changed files with 46 additions and 4 deletions

View File

@@ -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