sonic-bluestreak/sonic-bluestreak.love/scenes/battlesystem/fighters/character/actions/skill.lua
2021-11-25 10:57:13 +01:00

19 lines
570 B
Lua

local ActionParent = require "scenes.battlesystem.fighters.character.actions.parent"
local SkillAction = ActionParent:extend()
function SkillAction:new(fighter, skill)
self.data = core.datas:get("skills", skill)
SkillAction.super.new(self, fighter)
end
function SkillAction:needTarget()
return (self.data.targetNumber == 1), self.data.targetEnnemies
end
function SkillAction:startAction()
core.debug:print("cbs/action", "Starting flee action")
self:loadChoregraphyFromSkill(self.data)
self.fighter:setPP(self.data.cost * -1, true)
end
return SkillAction