From abb3e5e048d3a76aa568449d379d8f88a96687b1 Mon Sep 17 00:00:00 2001 From: Raimon Zamora Date: Mon, 23 Mar 2026 11:51:56 +0100 Subject: [PATCH] =?UTF-8?q?-[NEW]=20Retras=20aleatori=20per=20a=20les=20go?= =?UTF-8?q?tes=20-[FIX]=20Arreglada=20representaci=C3=B3=20gr=C3=A0fica=20?= =?UTF-8?q?de=20les=20gotes=20en=20l'editor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/maps/rooms_foreground.gif | Bin 2066 -> 2068 bytes data/maps/rooms_items.gif | Bin 1061 -> 1055 bytes data/modules/animations.lua | 6 +++--- data/modules/ia/gota.lua | 15 +++++---------- data/modules/templates.lua | 2 +- 5 files changed, 9 insertions(+), 14 deletions(-) diff --git a/data/maps/rooms_foreground.gif b/data/maps/rooms_foreground.gif index dc5ea188fd5da7a0a3d03a6a3f98c35dd8ab7bcd..b54e58b32d268b349c6b535ca2db185e3251a212 100644 GIT binary patch delta 934 zcmV;X16ll%5R?$GeFT3+QGhlz7$X2Ge#hdCG)XXlLm(6hLPImzMxYEzwg}NoB8=b= zjyV=MLyrt0c;7`u7KkN7R8I7zbv0fDBZ-qi;N^}V?Kft1Z$5OBmQzMhA%PO+siU4V z1)yVrVD2d>pE~;KAPR&sC}g67`i5mqh_ZQBjwlF;QIwWmlqr91VLrL#M4Ry#L6jVk zdXcHPeF`K5n|iuns}{lkI+3if^$5dFP)b=RlJ}unk&wPp6zptFM%5`qAyhi#sUy%D zk+ZDLAcIm_(YmOl5#2hhM8N85(YCL}FvCOJMp>q){>7;frpw0K?rq1`8G@2Isypih z;6jw|YO0D!lXrhTLQ8J5?@}Z%YE7xvXI1C!N-YHYI@Il@-rfeoT!U=~nWb?u%3zcp z|Eb%TkdYcG1XvMz=YS;Fdtb^2hAi`-G*bmLp^Sk*uSB7;x@@Q#9(Zs=LJrMP(L(~w zZNYyH{jsh}dm3>=QBKWJ)lx>SZ^eK`jI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ql15f~Nxq|4sa&Z=9Ql s7hlf2`PD!Pk2{}EJ+5-<&=Y0{EnVRC>fpnR3YWcLy!rF!p9TZ~JBiLixc~qF diff --git a/data/modules/animations.lua b/data/modules/animations.lua index 8afe30c..02b29ca 100644 --- a/data/modules/animations.lua +++ b/data/modules/animations.lua @@ -206,16 +206,16 @@ animations = { }, ["gota_generador"] = { cycle = {1,2,3,4,5,6,7,8}, - loop = false, + loop = true, frames = { + { frame={x=48,y=0,w=8,h=8}, wait=50 }, + { frame={x=48,y=0,w=8,h=8}, wait=1 }, { frame={x=0,y=0,w=8,h=8}, wait=2 }, { frame={x=8,y=0,w=8,h=8}, wait=2 }, { frame={x=16,y=0,w=8,h=8}, wait=2 }, { frame={x=24,y=0,w=8,h=8}, wait=2 }, { frame={x=32,y=0,w=8,h=8}, wait=2 }, { frame={x=40,y=0,w=8,h=8}, wait=2 }, - { frame={x=48,y=0,w=8,h=8}, wait=50 }, - { frame={x=48,y=0,w=8,h=8}, wait=1 } } }, ["gota"] = { diff --git a/data/modules/ia/gota.lua b/data/modules/ia/gota.lua index 21c2753..9a41e91 100644 --- a/data/modules/ia/gota.lua +++ b/data/modules/ia/gota.lua @@ -1,21 +1,16 @@ function ia.update_gota(spr) if spr.timer > 0 then - spr.invisible = true spr.timer = spr.timer-1 - if spr.timer == 1 then - spr.animation_finished = nil - spr.current_frame = 1 - spr.current_wait = 1 - end + return else spr.invisible = nil; - if spr.animation_finished then + if spr.current_frame==2 then local gota = templates.create("gota_caiguent", {pos={x=spr.pos.x, y=spr.pos.y}, flipped=spr.flipped}) table.insert(sprites.list, gota) - spr.animation_finished = nil - spr.current_frame = 1 - spr.current_wait = 1 + --spr.animation_finished = nil + --spr.current_frame = 1 + --spr.current_wait = 1 end end end diff --git a/data/modules/templates.lua b/data/modules/templates.lua index aa7a977..5dc2da4 100644 --- a/data/modules/templates.lua +++ b/data/modules/templates.lua @@ -205,7 +205,7 @@ function me.create(type, options) animation = "gota_generador", state = me.ALIVE, enemy = true, - timer = 0, + timer = math.random(0,100), room = options.room, ia = ia.update_gota }