feat: add conditions for finished actions

This commit is contained in:
Kazhnuz 2021-07-17 21:53:10 +02:00
parent deda8a7a76
commit d7a15d4d91
2 changed files with 11 additions and 2 deletions

View file

@ -11,8 +11,17 @@ end
function Conditions.qteFailure(cond, predicate, asker)
return (Conditions.isQteSuccess(cond, predicate, asker) == false)
end
function Conditions.none(cond, predicate, asker)
return true
end
function Conditions.actionFinished(cond, predicate, asker)
return asker:testTagAction(cond[2], 2)
end
function Conditions.actionStarted(cond, predicate, asker)
return asker:testTagAction(cond[2], 1)
end
return Conditions

View file

@ -103,12 +103,12 @@ function ChoregraphySystem:testTagAction(tag, statut)
end
function ChoregraphySystem:startTagAction(tag)
self.finishedTagActions[tag] = ACTION_FINISHED
self.finishedTagActions[tag] = ACTION_STARTED
end
function ChoregraphySystem:finishTagAction(tag)
core.debug:print("choregraphy/step", "Tag action " .. tag .. " finished.")
self.finishedTagActions[tag] = ACTION_STARTED
self.finishedTagActions[tag] = ACTION_FINISHED
end
function ChoregraphySystem:sendDamage(power, type, element, isSpecial)