chore: hook up the damage system to the choregraphy system
This commit is contained in:
parent
d69255ead0
commit
75914d694d
1 changed files with 13 additions and 0 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue