sonic-radiance/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/actions/item.lua

21 lines
585 B
Lua
Raw Normal View History

2020-07-20 12:24:26 +02:00
local ActionParent = require "scenes.battlesystem.controllers.fighters.systems.actions.parent"
local ItemAction = ActionParent:extend()
2020-08-22 23:10:22 +02:00
function ItemAction:new(fighter, category, item)
2020-07-20 12:24:26 +02:00
ItemAction.super.new(self, fighter)
2020-08-22 23:10:22 +02:00
print(item)
self.category = category
self.itemdata = game.loot:getItemData(category, item)
2020-07-20 12:24:26 +02:00
end
function ItemAction:needTarget()
2020-08-22 23:10:22 +02:00
return (not self.itemdata.affectEverybody), (self.category == "wisps")
2020-07-20 12:24:26 +02:00
end
function ItemAction:startAction()
2020-08-22 23:10:22 +02:00
core.debug:print("cbs/action", "Starting item action")
self:loadChoregraphy("useitem")
2020-07-20 12:24:26 +02:00
end
return ItemAction