20 lines
585 B
Lua
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
|