sonic-bluestreak/sonic-bluestreak.love/scenes/battlesystem/fighters/character/actions/defend.lua

21 lines
534 B
Lua
Raw Permalink Normal View History

2021-11-25 10:57:13 +01:00
local ActionParent = require "scenes.battlesystem.fighters.character.actions.parent"
local DefendAction = ActionParent:extend()
function DefendAction:new(fighter)
DefendAction.super.new(self, fighter)
end
function DefendAction:needTarget()
return false, false
end
function DefendAction:startAction()
core.debug:print("cbs/action", "Starting defend action")
self.fighter.isDefending = true
self.fighter.actor:changeAnimation("defend")
self.fighter.actor.isDefending = true
self:finishAction()
end
return DefendAction