sonic-radiance/sonic-radiance.love/scenes/battlesystem/fighters/character/actions/skill.lua

20 lines
570 B
Lua
Raw Normal View History

local ActionParent = require "scenes.battlesystem.fighters.character.actions.parent"
2020-07-20 12:24:26 +02:00
local SkillAction = ActionParent:extend()
function SkillAction:new(fighter, skill)
2021-05-16 08:48:05 +02:00
self.data = core.datas:get("skills", skill)
2020-07-20 12:24:26 +02:00
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)
2021-03-12 20:03:00 +01:00
self.fighter:setPP(self.data.cost * -1, true)
2020-07-20 12:24:26 +02:00
end
return SkillAction