[WIP] S1 Ending. Segon troçet fet

This commit is contained in:
2026-05-09 23:24:43 +02:00
parent 30ab23758e
commit ad4ab20d90
4 changed files with 166 additions and 10 deletions
+46
View File
@@ -356,4 +356,50 @@ function elalien.update_stairs()
end
end
end
end
function elalien.backup()
-- Guardar l'estat de elalien
elalien.from_hab = elalien.hab
elalien.from_x = elalien.x
elalien.from_y = elalien.y
elalien.from_update = elalien.update
end
function elalien.restore()
-- Restaurar a elalien
elalien.hab = elalien.from_hab
elalien.x = elalien.from_x
elalien.y = elalien.from_y
elalien.update = elalien.from_update
end
function elalien.stage1_ending_init()
-- if elalien.update==premiere_update_healer then return true end
elalien.backup()
-- Moure a elalien al ending
elalien.hab = 9
elalien.x = 0
elalien.y = 3
local world_x, world_y = coords.room_to_world(elalien.hab,elalien.x,elalien.y)
elalien.x=world_x
elalien.y=world_y
elalien.update = elalien.stage1_ending_update
end
function elalien.stage1_ending_update()
elalien.wait=elalien.wait+1
-- avançar a 8,1,3
local hab, tx, ty = coords.world_to_tile(elalien.x, elalien.y)
if hab == 8 and tx==6 and ty==3 then
-- premiere.health_wait = premiere.health_wait - 1
else
elalien.x = elalien.x-1
if elalien.wait>=6 then
elalien.wait = 0
elalien.step=(elalien.step+1)%4
elalien.frame=elalien.anim[elalien.step+1]
end
end
end