2021-08-15 16:50:53 +02:00
|
|
|
local ActionParent = require "scenes.battlesystem.fighters.character.actions.parent"
|
2020-07-19 22:38:59 +02:00
|
|
|
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")
|
2021-03-13 15:49:21 +01:00
|
|
|
self.fighter.isDefending = true
|
|
|
|
self.fighter.actor:changeAnimation("defend")
|
|
|
|
self.fighter.actor.isDefending = true
|
2020-07-19 22:38:59 +02:00
|
|
|
self:finishAction()
|
|
|
|
end
|
|
|
|
|
|
|
|
return DefendAction
|