Stopped triggers from firing if they are inactive

This commit is contained in:
Stefan Zermatten
2022-08-12 19:19:58 +02:00
parent 8d34cc1369
commit b324fb1f03
2 changed files with 8 additions and 1 deletions

View File

@@ -51,6 +51,11 @@ function triggerMatchTags(trigger, prop) {
}
export function applyTrigger(trigger, { creature, targets, scope, log }) {
// Prevent trigger from firing if it's inactive
if (trigger.inactive) {
return;
}
// Prevent triggers from firing if their condition is false
if (trigger.condition?.parseNode) {
recalculateCalculation(trigger.condition, scope, log);