2021-07-17 21:31:42 +02:00
|
|
|
local Conditions = {}
|
|
|
|
|
|
|
|
function Conditions.sentDamage(cond, predicate, asker)
|
|
|
|
return asker.haveSentDamage
|
|
|
|
end
|
|
|
|
|
|
|
|
function Conditions.qteSuccess(cond, predicate, asker)
|
|
|
|
return asker:isQteSuccess(tonumber(cond[2]))
|
|
|
|
end
|
|
|
|
|
|
|
|
function Conditions.qteFailure(cond, predicate, asker)
|
|
|
|
return (Conditions.isQteSuccess(cond, predicate, asker) == false)
|
|
|
|
end
|
2021-07-17 21:53:10 +02:00
|
|
|
|
2021-07-17 21:31:42 +02:00
|
|
|
function Conditions.none(cond, predicate, asker)
|
|
|
|
return true
|
|
|
|
end
|
|
|
|
|
2021-07-17 21:53:10 +02:00
|
|
|
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
|
|
|
|
|
2021-07-18 08:59:01 +02:00
|
|
|
function Conditions.counter(cond, predicate, asker)
|
|
|
|
return predicate.utils.testVariables(asker:getCounter(cond[2]), cond[3], cond[4])
|
|
|
|
end
|
|
|
|
|
2021-07-17 21:31:42 +02:00
|
|
|
return Conditions
|