[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:
14
data/imp_mood.lua
Normal file
14
data/imp_mood.lua
Normal 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
|
||||
Reference in New Issue
Block a user