sonic-bluestreak/sonic-bluestreak.love/scenes/battlesystem/fighters/ennemy/action.lua

23 lines
587 B
Lua
Raw Normal View History

2021-11-25 10:57:13 +01:00
local ActionParent = require "scenes.battlesystem.fighters.character.actions.parent"
local EnnemyAction = ActionParent:extend()
function EnnemyAction:new(fighter, skill)
self.data = core.datas:get("badskills", skill)
EnnemyAction.super.new(self, fighter)
end
function EnnemyAction:needTarget()
return (self.data.targetNumber == 1), self.data.targetEnnemies
end
function EnnemyAction:startAction()
core.debug:print("cbs/action", "Starting flee action")
self:loadChoregraphyFromSkill(self.data)
end
function EnnemyAction:getData()
return self.data
end
return EnnemyAction