diff --git a/module/hooks/chat-reaction.mjs b/module/hooks/chat-reaction.mjs index ff10df5..1fc7c8d 100644 --- a/module/hooks/chat-reaction.mjs +++ b/module/hooks/chat-reaction.mjs @@ -466,6 +466,7 @@ Hooks.on("createChatMessage", async (message) => { let d30AttackPrecomputedStale = false do { + try { mulliganRestart = false defenderHandledBonus = false attackerHandledBonus = false @@ -829,6 +830,10 @@ Hooks.on("createChatMessage", async (message) => { mulliganRestart = true } } + } catch(e) { + console.error("Defense handler loop error (non-fatal):", e) + mulliganRestart = false + } } while (mulliganRestart) const shieldDamageReduction = shieldBlocked ? shieldReaction?.damageReduction ?? 0 : 0