Skip to content

Commit

Permalink
Update bugs-main.mjs
Browse files Browse the repository at this point in the history
  • Loading branch information
thatlonelybugbear authored Jul 16, 2024
1 parent b68ccfa commit 258ade6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/bugs-main.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ function shouldProceed(check, hook) {
);
}
if (hook == 'create') {
return !check.flags?.dnd5e?.exhaustionLevel || [staticID('silenced'), staticID('surprised')].includes(check._id) || !check.origin;
return !check.flags?.bugs?.hasInterfered || !check.flags?.dnd5e?.exhaustionLevel || [staticID('silenced'), staticID('surprised')].includes(check._id) || !check.origin;
}
}

Expand Down Expand Up @@ -441,8 +441,9 @@ Hooks.on('midi-qol.ready', () => {
updateSource._id = staticID(aedata.name.toLowerCase())
shouldContinue = false;
}
if (!shouldContinue) foundry.utils.setProperty(updateSource.flags, 'bugs.hasInterfered', true);
ae.updateSource(updateSource);
if (abort) ActiveEffect.implementation.create(aedata, { parent: actor, keepId: true });
if (!shouldContinue) ActiveEffect.implementation.create(ae, { parent: actor, keepId: true });
return shouldContinue;
});

Expand Down

0 comments on commit 258ade6

Please sign in to comment.