[WIP] Treballant en el jefe. Pareix que se va aclarint, pareix

This commit is contained in:
2026-04-16 22:27:13 +02:00
parent 1b812127e2
commit 956603b99c
4 changed files with 74 additions and 33 deletions

View File

@@ -9,7 +9,7 @@ require "pattern"
imp = {}
DEBUG_FN_NAME = true
DEBUG_FN_NAME = false
function imp.new(_hab,_x,_y)
local world_x, world_y = coords.room_to_world(_hab,_x,_y)
@@ -29,7 +29,7 @@ function imp.new(_hab,_x,_y)
timers={mood=150,target=250, shot=2500, super=20000, flip_wait=50}, --anterior *_cooldown
move_types={free=0, pattern=1, super=2},
move_type=1, -- anterior movement_type
actions={no_action=0, up=1, down=2, left=4, right=8, jump=16, shot=32, super=64},
actions={no_action=0, up=1, down=2, left=4, right=8, jump=16, shot=32, super=64, jumpfwd=128},
pattern= pattern.new(),
analisis = {}, -- memoria per a guardar el resultat de l'analisis
step_length=1,
@@ -39,6 +39,7 @@ function imp.new(_hab,_x,_y)
max_jump_height=24,
vmove_space = 1,
falling = 0,
action_event = {},
--
moure = noop,
draw=imp.draw,
@@ -63,6 +64,7 @@ function imp.new(_hab,_x,_y)
end
function imp:draw() --OK
self.pattern:draw()
local scr_x, scr_y = viewp:screen_coords( self.x, self.y )
-- Modo super
@@ -126,17 +128,13 @@ function imp:update_hit()
if not self.enabled then return end
-- Que pasa quan "mor"
end
cpu_wait = 10
function imp:update_normal()
cpu_wait = cpu_wait -1
if cpu_wait<=0 then
print("-------------------------------------------------")
print("")
-- if self.mood~=self.moods.stop then print("TARGET= "..self.pattern:target()) end
-- if self.mood~=self.moods.stop then print("ACTIONS= "..#self.pattern:actions()) end
-- print("TARGET TIMER= "..self.timers.target)
cpu_wait = 1
self:reduce_timers()
-- Ajustar mood (emocions)
@@ -159,7 +157,6 @@ print("")
-- colisions en personatges
-- self:colisions()
end
end
require "imp3-functions"