sonic-radiance/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/actions/item.lua
2020-08-22 23:10:22 +02:00

20 lines
585 B
Lua

local ActionParent = require "scenes.battlesystem.controllers.fighters.systems.actions.parent"
local ItemAction = ActionParent:extend()
function ItemAction:new(fighter, category, item)
ItemAction.super.new(self, fighter)
print(item)
self.category = category
self.itemdata = game.loot:getItemData(category, item)
end
function ItemAction:needTarget()
return (not self.itemdata.affectEverybody), (self.category == "wisps")
end
function ItemAction:startAction()
core.debug:print("cbs/action", "Starting item action")
self:loadChoregraphy("useitem")
end
return ItemAction