chore: hook up the damage system to the choregraphy system

This commit is contained in:
Kazhnuz 2020-07-25 08:44:59 +02:00
parent d69255ead0
commit 75914d694d

View file

@ -9,6 +9,7 @@ function ChoregraphySystem:new(action, choregraphy)
self.actor = self.fighter.actor
self.assets = self.fighter.actor.assets
self.world = self.actor.world
self.target = action.target
self.currentStepId = 0
self.currentStep = nil
@ -36,12 +37,24 @@ function ChoregraphySystem:switchStep()
end
end
function ChoregraphySystem:sendDamage(power, accuracy, isSpecial, isAerial)
if (self.target ~= nil) then
if (self.fighter.isAlive) then
self.fighter:sendDamage(self.target, power, accuracy, isSpecial, isAerial)
return true
else
return false
end
end
end
function ChoregraphySystem:endStep()
self.currentStep = nil
end
function ChoregraphySystem:endChoregraphy()
self.action:choregraphyEnded()
self.fighter.turnSystem:applyDeath()
end
function ChoregraphySystem:haveNextStep()