From 9473250f0c80a3b410021b69002ceec60ffcf5d3 Mon Sep 17 00:00:00 2001 From: WBHarry Date: Tue, 13 Jan 2026 20:47:43 +0100 Subject: [PATCH] Fixed critical threshold applying to reactions --- module/data/fields/action/rollField.mjs | 2 +- module/dice/d20Roll.mjs | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/module/data/fields/action/rollField.mjs b/module/data/fields/action/rollField.mjs index e2196c1c..63d48990 100644 --- a/module/data/fields/action/rollField.mjs +++ b/module/data/fields/action/rollField.mjs @@ -87,7 +87,7 @@ export class DHActionRollData extends foundry.abstract.DataModel { if (this.type === CONFIG.DH.GENERAL.rollTypes.attack.id) modifiers.push({ label: 'Bonus to Hit', - value: this.bonus ?? this.parent.actor.system.attack.roll.bonus + value: this.bonus ?? this.parent.actor.system.attack.roll.bonus ?? 0 }); break; default: diff --git a/module/dice/d20Roll.mjs b/module/dice/d20Roll.mjs index f679d725..3ddd8027 100644 --- a/module/dice/d20Roll.mjs +++ b/module/dice/d20Roll.mjs @@ -35,7 +35,9 @@ export default class D20Roll extends DHRoll { get isCritical() { if (!this.d20._evaluated) return; - return this.d20.total >= this.data.system.criticalThreshold; + + const criticalThreshold = this.options.actionType === 'reaction' ? 20 : this.data.system.criticalThreshold; + return this.d20.total >= criticalThreshold; } get hasAdvantage() {