[WIP] Treballant en el jefe. Organitzant codi (Ha deixat de funcionar quasi tot)

[FIX] Els warps reutilitzats mantenien l'estat anterior
[NEW] Funcio distancia(a, b)
This commit is contained in:
2026-04-12 23:02:35 +02:00
parent f26d43a97d
commit a43173a940
15 changed files with 1293 additions and 22 deletions

14
data/imp_mood.lua Normal file
View File

@@ -0,0 +1,14 @@
function imp:choose_mood()
if self.mood==self.moods.stop then return end
if self.timers.mood<=0 then
self.mood=self.moods[math.random(2)+1] -- chase o avoid
self:reset_mood_timer()
end
end
function imp:reset_mood_timer( value ) -- OK
if DEBUG_FN_NAME then print("reset_mood_timer") end
value = value or 150
self.timers.mood = value
return value
end