feat: add pp cost

This commit is contained in:
Kazhnuz 2021-03-12 20:03:00 +01:00
parent e862766fea
commit db9319fc90
2 changed files with 2 additions and 1 deletions

View file

@ -13,6 +13,7 @@ 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

View file

@ -110,7 +110,7 @@ end
function widgets.SkillWidget:sendCharacterData()
if self.skilldata ~= nil then
if (self.skilldata ~= nil and self.skilldata.cost <= self.character.abstract.pp) then
self.assets.sfx["mSelect"]:play()
self.character:useSkill(self.skillname)
else