From 4defe69c2148a8dd65b746c3caf6ed75a9d59d84 Mon Sep 17 00:00:00 2001 From: Cyril ALFARO Date: Mon, 28 Jul 2025 23:32:25 +0200 Subject: [PATCH] Update dhRoll.mjs (#449) --- module/dice/dhRoll.mjs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/module/dice/dhRoll.mjs b/module/dice/dhRoll.mjs index 4bc1a5bd..aa1ebb68 100644 --- a/module/dice/dhRoll.mjs +++ b/module/dice/dhRoll.mjs @@ -193,11 +193,12 @@ export const registerRollDiceHooks = () => { if (config.roll.isCritical) updates.push({ key: 'stress', value: -1 }); if (config.roll.result.duality === -1) updates.push({ key: 'fear', value: 1 }); - if (config.rerolledRoll.isCritical || config.rerolledRoll.result.duality === 1) - updates.push({ key: 'hope', value: -1 }); - if (config.rerolledRoll.isCritical) updates.push({ key: 'stress', value: 1 }); - if (config.rerolledRoll.result.duality === -1) updates.push({ key: 'fear', value: -1 }); - + if (config.rerolledRoll) { + if (config.rerolledRoll.isCritical || config.rerolledRoll.result.duality === 1) updates.push({ key: 'hope', value: -1 }); + if (config.rerolledRoll.isCritical) updates.push({ key: 'stress', value: 1 }); + if (config.rerolledRoll.result.duality === -1) updates.push({ key: 'fear', value: -1 }); + } + if (updates.length) { const target = actor.system.partner ?? actor; if (!['dead', 'unconcious'].some(x => actor.statuses.has(x))) {