From df3083583014ecc43a570db9da8d8a59b657d705 Mon Sep 17 00:00:00 2001 From: JailGamer Date: Fri, 1 May 2026 00:35:55 +0200 Subject: [PATCH] =?UTF-8?q?[NEW]=20Porta=20final=20funcionant=20[FIX]=20Un?= =?UTF-8?q?a=20posici=C3=B3=20del=20peu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/abad.lua | 2 +- data/peu.lua | 2 +- data/stage1.lua | 5 +++-- data/trigger.lua | 8 ++++++-- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/data/abad.lua b/data/abad.lua index 7a177d3..a90d81e 100644 --- a/data/abad.lua +++ b/data/abad.lua @@ -133,7 +133,7 @@ end function abad_hurt(howmuch) - -- howmuch = 0 + howmuch = 0 if abad.hurting == 0 and abad.respawning==0 then sound.play(audio_abad_hit) abad.energia=abad.energia-howmuch diff --git a/data/peu.lua b/data/peu.lua index 5c919d8..2909f06 100644 --- a/data/peu.lua +++ b/data/peu.lua @@ -11,7 +11,7 @@ peu={name="peu",hab=5,x=6,y=3,w=32,h=32,bb={x=0,y=0,w=16,h=16}} function peu.init() -- local habs={{18,8},{16,2},{16,7},{15,5},{27,1},{27,10},{29,2},{38,8},{69,2},{79,3}} - local habs={{69,0},{78,5},{59,8},{27,8},{16,0},{18,8}} + local habs={{69,0},{78,6},{59,8},{27,8},{16,0},{18,8}} local r=1+math.random(0,#habs-1) peu.hab=habs[r][1] -- peu.x=habs[r][2]*8 diff --git a/data/stage1.lua b/data/stage1.lua index 86dace4..61aa168 100644 --- a/data/stage1.lua +++ b/data/stage1.lua @@ -103,7 +103,7 @@ function stages.stage1_init() table.insert( actors, trigger.new(53,5,3,triggers.escena_abad_porta_casa,"porta casa","TR06")) table.insert( actors, trigger.new(56,4,3,triggers.escena_abad_porta_batman,"porta batman","TR07")) - table.insert( actors, trigger.new(19,4,3,triggers.escena_habitacio_batman,"habitacio batman")) + table.insert( actors, trigger.new(19,4,3,triggers.escena_habitacio_batman,"habitacio batman","TR08")) -- table.insert( actors, trigger.new(55,1,3,triggers.escena_lluita_imp,"lluita imp")) @@ -115,6 +115,7 @@ function stages.stage1_init() table.insert( actors, trigger.new(75,9,1,triggers.open_door,"","acces inf casa batman","switch",{57, 53,41},{"TR07"}) ) table.insert( actors, trigger.new(79,5,1,triggers.open_door,"","sotan casa batman","switch",{36, 56,44}) ) table.insert( actors, trigger.new(38,2,2,triggers.open_door,"","","switch",{39, 62,63}) ) + -- table.insert( actors, trigger.new(1, 1,1,triggers.open_door,"","acces cacaus","switch",{20, 53,41},{"TR08"})) -- table.insert(actors,trigger.new(14,40,32,triggers.teleport_a)) -- table.insert(actors,trigger.new(67,8,32,triggers.teleport_b)) @@ -140,7 +141,7 @@ function stages.stage1_init() zombie2, abad, 150, "Aaaaaargh... per ell!", 250) local abad_x, abad_y = coords.room_to_world ( 10, 4, 3 ) - local abad_x, abad_y = coords.room_to_world ( 9, 4, 3 ) + -- local abad_x, abad_y = coords.room_to_world ( 9, 4, 3 ) abad:move(abad_x, abad_y) abad_make_safe( true ) diff --git a/data/trigger.lua b/data/trigger.lua index ba03aa7..a1c3ef8 100644 --- a/data/trigger.lua +++ b/data/trigger.lua @@ -23,7 +23,8 @@ function trigger.new(_hab,_x,_y,_action,_escena,_id,_type,_doors,_linked_id) linked_id=_linked_id, enabled=true, disable_reason="", - bb=_bb } + bb=_bb, + open_door=triggers.open_door } end function trigger:update() @@ -118,7 +119,10 @@ end function triggers:escena_habitacio_batman() if abad.objects.clau_premiere~=nil and abad.objects.clau_elalien~=nil then - switches.start(0,0) + -- switches.start(0,0) + local trigger = trigger.new(abad.hab,1,1,nil,"","porta acces cacaus","",{20, 53,41}) + trigger:open_door() + abad.objects.clau_premiere=nil abad.objects.clau_elalien=nil remove_actor(self)