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

23 lines
587 B
Lua
Raw Normal View History

local ActionParent = require "scenes.battlesystem.fighters.character.actions.parent"
local EnnemyAction = ActionParent:extend()
function EnnemyAction:new(fighter, skill)
2021-05-16 08:48:05 +02:00
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