From cb16e0ea639ade583fd42706962924d7ece80467 Mon Sep 17 00:00:00 2001 From: JailGamer Date: Mon, 4 May 2026 21:54:43 +0200 Subject: [PATCH] =?UTF-8?q?[NEW]=20Batvi=C3=B3=20[NEW]=20tiles2.gif?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/batvio.lua | 53 +++++++++++++++++++++++++++++++++++++++++++++++ data/bol.lua | 2 ++ data/game.lua | 3 ++- data/main.lua | 2 +- data/pattern.lua | 2 +- data/stage1.lua | 5 ++++- data/tiles2.gif | Bin 0 -> 2490 bytes data/trigger.lua | 9 ++++++-- 8 files changed, 70 insertions(+), 6 deletions(-) create mode 100644 data/batvio.lua create mode 100644 data/tiles2.gif diff --git a/data/batvio.lua b/data/batvio.lua new file mode 100644 index 0000000..a859059 --- /dev/null +++ b/data/batvio.lua @@ -0,0 +1,53 @@ +-- 0,80 -> 112,112 +batvio={ + name="batvio", + hab=7, + x=7, + y=2, + w=112, + h=32, + flip=true, + 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, +} + +function batvio.init() + local world_x, world_y = coords.room_to_world(batvio.hab,batvio.x,batvio.y) + batvio.x=world_x + batvio.y=world_y +end + +function batvio.draw() + local curr_sf = surf.source() + surf.source(tiles2) + local scr_x, scr_y = viewp:screen_coords( batvio.x, batvio.y ) + draw.surf(0,80,batvio.w,batvio.h,scr_x,scr_y,batvio.w,batvio.h,batvio.flip) + surf.source(curr_sf) +end + +function batvio.hit() +end + +function batvio.update() + +end \ No newline at end of file diff --git a/data/bol.lua b/data/bol.lua index 1580c3e..fb04bb8 100644 --- a/data/bol.lua +++ b/data/bol.lua @@ -65,6 +65,8 @@ function bol.update() start_scene(scenes.bol_trobat) bol.scene_trobat = true -- remove_actor(bol) + -- crear el trigger per a disparar el final de fase + table.insert( actors, trigger.new(8,4,3,triggers.escena_stage1_ending,"stage1 ending","TR09") ) end end end diff --git a/data/game.lua b/data/game.lua index 7fefcef..7868967 100644 --- a/data/game.lua +++ b/data/game.lua @@ -26,6 +26,7 @@ require "trigger_event" require "batman" require "health_potion" require "tiles_layer2" +require "batvio" local DEBUG = false @@ -287,9 +288,9 @@ function update_game() score.draw() - if DEBUG then special_keys() debug_info() + if DEBUG then end end diff --git a/data/main.lua b/data/main.lua index 16d9819..d3f6a6b 100644 --- a/data/main.lua +++ b/data/main.lua @@ -37,7 +37,7 @@ function images_init() surf.source(tiles) local paleta=pal.load("tiles.gif") pal.set(paleta) - + tiles2=surf.load("tiles2.gif") -- Crear el warp warp.init(tiles) end diff --git a/data/pattern.lua b/data/pattern.lua index afc60b3..94b33be 100644 --- a/data/pattern.lua +++ b/data/pattern.lua @@ -49,7 +49,7 @@ function pattern:noop() end function pattern:draw() - if true then return end + -- if true then return end local scr_x = 0 local scr_y = 0 local target = self:target() diff --git a/data/stage1.lua b/data/stage1.lua index b1197ee..0713fb4 100644 --- a/data/stage1.lua +++ b/data/stage1.lua @@ -27,6 +27,9 @@ function stages.stage1_init() elalien.init() table.insert(actors,elalien) + batvio.init() + table.insert(actors,batvio) + boss = imp.new(55,4,3) table.insert( actors, boss ) boss_meter = bar_meter.new(20,12,128,10,1,1,boss,5) @@ -164,7 +167,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 ( 18, 9, 3 ) + local abad_x, abad_y = coords.room_to_world ( 18, 9, 3 ) abad:move(abad_x, abad_y) abad_make_safe( true ) diff --git a/data/tiles2.gif b/data/tiles2.gif new file mode 100644 index 0000000000000000000000000000000000000000..03a342e36ff66bc0addd6cd129a37e7c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 HcmV?d00001 diff --git a/data/trigger.lua b/data/trigger.lua index 54f6b43..7902e6e 100644 --- a/data/trigger.lua +++ b/data/trigger.lua @@ -124,8 +124,8 @@ function triggers:escena_abad_porta_batman() end function triggers:escena_habitacio_batman() - if abad.objects.clau_premiere~=nil and - abad.objects.clau_elalien~=nil + if abad.objects.clau_premiere==nil and + abad.objects.clau_elalien==nil then -- switches.start(0,0) local trigger_porta = trigger.new(abad.hab,1,1,triggers.open_door,"switch","porta acces cacaus","",{20, 53,41}) @@ -142,6 +142,11 @@ function triggers:escena_habitacio_batman() end end +function triggers:escena_stage1_ending() + print("STAGE 1 ENDING") + remove_actor(self) +end + function triggers:escena_lluita_imp() set_actors_enabled_by_room(false, "boss", stage1_boss_mapa.r0.r, stage1_boss_mapa.r1.r) viewp:fixed({l=8,r=44,u=0,d=0}, viewp.x, viewp.y-48)