diff --git a/data/maps/rooms_background.gif b/data/maps/rooms_background.gif index 6afc014..1864907 100644 Binary files a/data/maps/rooms_background.gif and b/data/maps/rooms_background.gif differ diff --git a/data/maps/rooms_foreground.gif b/data/maps/rooms_foreground.gif index badde0c..bbad1c8 100644 Binary files a/data/maps/rooms_foreground.gif and b/data/maps/rooms_foreground.gif differ diff --git a/data/maps/rooms_items.gif b/data/maps/rooms_items.gif index 97a2a33..a5948a6 100644 Binary files a/data/maps/rooms_items.gif and b/data/maps/rooms_items.gif differ diff --git a/data/modules/ia/gota.lua b/data/modules/ia/gota.lua index 9a41e91..03744cd 100644 --- a/data/modules/ia/gota.lua +++ b/data/modules/ia/gota.lua @@ -2,6 +2,9 @@ function ia.update_gota(spr) if spr.timer > 0 then spr.timer = spr.timer-1 + if spr.timer == 0 then + sprites.set_animation(spr, "gota_generador") + end return else spr.invisible = nil; diff --git a/data/modules/templates.lua b/data/modules/templates.lua index 5dc2da4..5e84d9f 100644 --- a/data/modules/templates.lua +++ b/data/modules/templates.lua @@ -2,6 +2,8 @@ ia = {} require "ia.*" +local gota_wait = 1 + templates = { ALIVE = 0, DYING = 1, @@ -202,13 +204,15 @@ function me.create(type, options) current_wait = 1, flipped = options.flipped, surf = surf.load("gfx/gota.gif"), - animation = "gota_generador", + animation = "gota", state = me.ALIVE, enemy = true, - timer = math.random(0,100), + timer = gota_wait, room = options.room, ia = ia.update_gota } + gota_wait = gota_wait + 10 + if gota_wait > 40 then gota_wait = 1 end elseif key == "gota_caiguent" then sprite = { type = key, diff --git a/data/stages/game.lua b/data/stages/game.lua index 4e2968b..a0d35fb 100644 --- a/data/stages/game.lua +++ b/data/stages/game.lua @@ -130,7 +130,7 @@ game = { surf.source(game.back_buf) for x=0,159 do local water_level = math.sin(game.water_counter)*2 - for y=88+water_level,103 do + for y=88+water_level,104 do local pixel = surf.pixel(x,y) surf.pixel(x,y,game.water_pal[pixel+1]) end