[WIP] Treballant en el jefe. La que s'està liant...
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
function imp:choose_action() -- antic imp:move
|
||||
if self.mood==self.moods.stop then return self.mood end
|
||||
if DEBUG_FN_NAME then print("choose_action "..self.mood) end
|
||||
|
||||
local next_action = self.actions.no_action
|
||||
|
||||
-- Si no te ganes de fer res, no moure
|
||||
@@ -49,7 +50,7 @@ print("next_action= "..next_action.." == "..self.actions.no_action)
|
||||
elseif self.move_type==self.move_types.pattern then
|
||||
-- msg_print(10,20,"PATTERN "..self.action_event,true)
|
||||
print("imp_action.lua -> next_action -> pattern")
|
||||
next_action=self:pattern_next_action()
|
||||
next_action=self.pattern:next_action()
|
||||
print("imp_action.lua -> next_action -> pattern => "..next_action)
|
||||
elseif self.move_type==self.move_types.super then
|
||||
-- msg_print(10,20,"SUPER "..self.action_event,true)
|
||||
@@ -144,7 +145,12 @@ print("imp_action.lua -> pattern_next_action -> "..self.action_event.."~="..self
|
||||
action = self.pattern:action()
|
||||
else
|
||||
-- Següent acció
|
||||
local target0 = self.pattern:target()
|
||||
action = self.pattern:next_action()
|
||||
-- Comprovar si ha canviat el target al avançar d'acció
|
||||
if target0~=self.pattern:target() then
|
||||
self:reset_target_timer()
|
||||
end
|
||||
end
|
||||
self.action_event = ""; -- Action_event processat
|
||||
return self.actions[action]
|
||||
@@ -165,6 +171,7 @@ end
|
||||
function imp:_moure( foo, name )
|
||||
name = name or "anonymous"
|
||||
print("_moure= "..name)
|
||||
if not foo then print(name.." not found") end
|
||||
self.moure = foo
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user