[WIP] S1 Ending. Sisena 'escena'

This commit is contained in:
2026-05-10 10:55:18 +02:00
parent 71cadf86cf
commit 8657dfd918
7 changed files with 130 additions and 7 deletions
+1
View File
@@ -5,6 +5,7 @@ audio_song_elalien="mus_alie.ogg"
audio_life_lost="mus_life.ogg"
audio_game_over="mus_over.ogg"
audio_song_imp="mus_imp.ogg"
audio_song_copter="mus_copter.ogg"
audio_final=audio_main_song
audio_abad_jump="snd_ajmp.wav"
+71
View File
@@ -0,0 +1,71 @@
copter={
name="copter",
hab=7,
x=9,
y=2,
w=96,
h=80,
flip=false,
frame=0,
wait=0,
step=0,
energy=_energy,
max_energy = _energy,
hit=zombie.hit,
update=zombie.update_normal,
draw=zombie.draw,
jumpfwd=false,
anim={},
bb={x=16,y=3,w=80,h=29},
can_warp=false,
warping=false,
shrink=1,
d_shrink=1,
angle=0,
d_angle=15,
dying=false,
death_time=40,
enabled=true,
disable_reason="",
enabled=true,
gir = {}
}
function copter.init()
local world_x, world_y = coords.room_to_world(copter.hab,copter.x,copter.y)
copter.x=world_x
copter.y=world_y
end
function copter.draw()
local curr_sf = surf.source()
surf.source(tiles2)
local scr_x, scr_y = viewp:screen_coords( copter.x, copter.y )
draw.surf(0,0,copter.w,copter.h,scr_x,scr_y,copter.w,copter.h,copter.flip)
if copter.wait==0 or copter.wait==32 then
copter.gir[1] = math.random(8)-1
copter.gir[2] = math.random(4)-1
copter.gir[3] = math.random(8)-1
copter.gir[4] = math.random(6)-1
copter.gir[5] = math.random(8)-1
copter.gir[6] = math.random(4)-1
end
if copter.wait>=0 and copter.wait<8 then
draw.line(scr_x+47,scr_y+16,scr_x+14,scr_y+17+copter.gir[6],16)
draw.line(scr_x+49,scr_y+23,scr_x+49+copter.gir[1],scr_y+40,16)
draw.line(scr_x+51,scr_y+22,scr_x+93,scr_y+27+copter.gir[2],16)
elseif copter.wait>=8 then
draw.line(scr_x+49,scr_y+23,scr_x+19+copter.gir[3],scr_y+41,16)
draw.line(scr_x+51,scr_y+23,scr_x+64+copter.gir[4],scr_y+38,16)
draw.line(scr_x+47,scr_y+16,scr_x+43+copter.gir[5],scr_y+8,16)
end
surf.source(curr_sf)
end
function copter.update()
copter.step = copter.step +1
copter.wait = copter.wait +1
if copter.wait==16 then
copter.wait = 0
end
end
+1
View File
@@ -28,6 +28,7 @@ require "health_potion"
require "tiles_layer2"
require "batvio"
-- require "live_scene"
require "copter"
local DEBUG = false
Binary file not shown.
+30
View File
@@ -349,4 +349,34 @@ function premiere.stage1_ending_update2()
premiere.frame=premiere.anim[premiere.step+1]
end
end
end
function premiere.stage1_ending_init3()
-- if premiere.update==premiere_update_healer then return true end
premiere.backup()
-- Moure a premiere al ending
premiere.hab = 7
premiere.x = 6
premiere.y = 2
local world_x, world_y = coords.room_to_world(premiere.hab,premiere.x,premiere.y)
premiere.x=world_x
premiere.y=world_y
premiere.update = premiere.stage1_ending_update3
end
function premiere.stage1_ending_update3()
premiere.wait=premiere.wait+1
-- avançar a 8,1,3
local hab, tx, ty = coords.world_to_tile(premiere.x, premiere.y)
if hab == 7 and tx==5 and ty==3 then
-- premiere.health_wait = premiere.health_wait - 1
premiere.flip=false
else
if premiere.wait>=3 then
premiere.x = premiere.x+1
premiere.wait = 0
premiere.frame=premiere.anim[1]
end
end
end
+7 -2
View File
@@ -167,10 +167,15 @@ scenes={
stage1_ending_2={
{x=avatar_abad_x,y=avatar_abad_y,flip=false,audio="abad",text={"elalien!","Premiere!","Que feu ací!?"},die=20},
{x=avatar_elalien_x,y=avatar_elalien_y,flip=true,audio="elalien",text={"HAVEM VIST COM","FUGIA BATMAN", "EN ELS CACAUS!!"},die=20},
{x=avatar_premiere_x,y=avatar_premiere_y,flip=true,audio="premiere",text={"Porca miseria!!","Il batmano e molto duri", "...Un momenti"},die=20},
{x=avatar_premiere_x,y=avatar_premiere_y,flip=true,audio="premiere",text={"Io tingo un artiluggio","per volare d'un gran", "mio amichi"},die=20},
{x=avatar_premiere_x,y=avatar_premiere_y,flip=true,audio="premiere",text={"Porca miseria!!","Il batmano e molto", "cabroni"},die=20},
{x=avatar_premiere_x,y=avatar_premiere_y,flip=true,audio="premiere",text={"Io tingo un artiluggio","per volare d'un gran", "amichi mio"},die=20},
{x=avatar_abad_x,y=avatar_abad_y,flip=false,audio="abad",text={"OH! MOLTES GRACIES","PREMIERE!!!",""},die=20},
},
stage1_ending_3={
{x=avatar_premiere_x,y=avatar_premiere_y,flip=true,audio="premiere",text={"TUTTO TUO!","IL BATMANO NO TENNE", "NI UNA POSSIBILITÁ"},die=20},
{x=avatar_premiere_x,y=avatar_premiere_y,flip=true,audio="premiere",text={"CONTRA ESTE MANIFICO","ARTILUGGIO",""},die=20},
{x=avatar_abad_x,y=avatar_abad_y,flip=false,audio="abad",text={"...","",""},die=20, mood="sorpresa"},
},
final= {
{x=avatar_batman_x,y=avatar_batman_y,flip=true,audio="batman",musica=audio_song_batman,text={"AI!", "M'has fet mal!!!",""},die=20},
{x=avatar_abad_x,y=avatar_abad_y,flip=false,audio="abad",text={"Aixó per furtar-me","el bol de cacaus,","imbèsil"},die=20},
+20 -5
View File
@@ -29,6 +29,7 @@ function stage1_ending.update_scene(self)
premiere.update()
elalien.update()
elseif self.time==200 then
music.stop()
-- quarta escena - dialeg entre els 3
start_scene(scenes.stage1_ending_2, nil, false)
elseif self.time==201 then
@@ -36,8 +37,22 @@ function stage1_ending.update_scene(self)
elseif self.time<400 then
-- quinta escena - premiere se'n va (vore dialegs draw)
premiere.update()
elseif self.time==350 then
elseif self.time==400 then
premiere.stage1_ending_init3()
copter.hab=premiere.hab
copter.x=premiere.x
copter.y=premiere.y
-- copter.init()
copter.y=copter.y-16
table.insert( actors, copter)
music.play(audio_song_copter)
elseif self.time<720 then
premiere.update()
copter.x = premiere.x-32
copter.y = premiere.y-48
copter.update()
elseif self.time==720 then
start_scene(scenes.stage1_ending_3, nil, false)
end
surf.target(0)
@@ -48,19 +63,19 @@ function stage1_ending.update_scene(self)
-- bocadillo quinta escena (1)
dialeg.run(premiere.x, premiere.y,
premiere.w, false,
"La donnaaa e mobileee...", true)
"Volare uoh oh...", true)
elseif self.time>=300 and self.time<400 then
-- bocadillo quinta escena (2)
dialeg.run(premiere.x, premiere.y,
premiere.w, false,
"qual piuma al vento...", true)
"Cantare uoh oh oh oh...", true)
end
score.draw()
self.time = self.time + 1
-- Acabar ending
if self.time>=400 then
if self.time>=800 then
flow:next()
end
end