feat: add qteSuccess and qteFailure conditions
This commit is contained in:
parent
6a37f12776
commit
72cccdcaf2
1 changed files with 9 additions and 0 deletions
|
@ -20,6 +20,7 @@ function ChoregraphySystem:new(action, choregraphy)
|
||||||
self.qte = {}
|
self.qte = {}
|
||||||
self.qte.current = nil
|
self.qte.current = nil
|
||||||
self.qte.wasSuccess = false
|
self.qte.wasSuccess = false
|
||||||
|
self.qte.list = {}
|
||||||
end
|
end
|
||||||
|
|
||||||
function ChoregraphySystem:update(dt)
|
function ChoregraphySystem:update(dt)
|
||||||
|
@ -50,9 +51,15 @@ end
|
||||||
function ChoregraphySystem:checkCondition(condition)
|
function ChoregraphySystem:checkCondition(condition)
|
||||||
local conditionArgs = utils.string.split(condition, ":")
|
local conditionArgs = utils.string.split(condition, ":")
|
||||||
local success = true
|
local success = true
|
||||||
|
|
||||||
if (conditionArgs[1] == "sentDamage" and (not self.haveSentDamage)) then
|
if (conditionArgs[1] == "sentDamage" and (not self.haveSentDamage)) then
|
||||||
success = false
|
success = false
|
||||||
|
elseif (conditionArgs[1] == "qteSuccess" and (not self.qte.list[tonumber(conditionArgs[2])])) then
|
||||||
|
success = false
|
||||||
|
elseif (conditionArgs[1] == "qteFailure" and (self.qte.list[tonumber(conditionArgs[2])])) then
|
||||||
|
success = false
|
||||||
end
|
end
|
||||||
|
|
||||||
return success
|
return success
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -69,6 +76,8 @@ end
|
||||||
function ChoregraphySystem:endQte(success)
|
function ChoregraphySystem:endQte(success)
|
||||||
self.qte.current = nil
|
self.qte.current = nil
|
||||||
self.qte.wasSuccess = success
|
self.qte.wasSuccess = success
|
||||||
|
|
||||||
|
table.insert(self.qte.list, success)
|
||||||
end
|
end
|
||||||
|
|
||||||
function ChoregraphySystem:sendDamage(power, type, element, isSpecial)
|
function ChoregraphySystem:sendDamage(power, type, element, isSpecial)
|
||||||
|
|
Loading…
Reference in a new issue