From 6321c7c508168cdd41db39e59cd16a58d185dc87 Mon Sep 17 00:00:00 2001 From: Nikhil Nagarajan Date: Tue, 27 Jan 2026 11:56:42 -0500 Subject: [PATCH 1/8] [Fix] Enricher fixes for [[fr]] and reaction argument lazy fix (#1586) * Update utils.mjs * fixed reaction situation. * Made change in enricher instead of dialog * comment clarity --- module/enrichers/DualityRollEnricher.mjs | 3 ++- module/helpers/utils.mjs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/module/enrichers/DualityRollEnricher.mjs b/module/enrichers/DualityRollEnricher.mjs index f6de8107..3e4a39ce 100644 --- a/module/enrichers/DualityRollEnricher.mjs +++ b/module/enrichers/DualityRollEnricher.mjs @@ -90,11 +90,12 @@ export const enrichedDualityRoll = async ( event: event ?? {}, title: title, headerTitle: label, + actionType: reaction ? 'reaction' : null, roll: { trait: traitValue && target ? traitValue : null, difficulty: difficulty, advantage, - type: reaction ? 'reaction' : null + // type: reaction ? 'reaction' : null //not needed really but keeping it for troubleshooting }, skips: { resources: !grantResources, diff --git a/module/helpers/utils.mjs b/module/helpers/utils.mjs index 1cce581a..c0dd45bd 100644 --- a/module/helpers/utils.mjs +++ b/module/helpers/utils.mjs @@ -12,7 +12,7 @@ export function rollCommandToJSON(text) { const flavor = flavorMatch ? flavorMatch[1] : null; // Match key="quoted string" OR key=unquotedValue - const PAIR_RE = /(\w+)=("(?:[^"\\]|\\.)*"|\S+)/g; + const PAIR_RE = /(\w+)\s*=\s*("(?:[^"\\]|\\.)*"|[^\]\}\s]+)/g; //updated regex to allow escaped quotes in quoted strings and avoid matching closing brackets/braces const result = {}; for (const [, key, raw] of text.matchAll(PAIR_RE)) { let value; From 0baed9234b2b6be7febbc1459112e712475cc446 Mon Sep 17 00:00:00 2001 From: WBHarry <89362246+WBHarry@users.noreply.github.com> Date: Wed, 28 Jan 2026 01:35:03 +0100 Subject: [PATCH 2/8] Made sure the advantage section is always shown (#1591) --- templates/dialogs/dice-roll/rollSelection.hbs | 2 -- 1 file changed, 2 deletions(-) diff --git a/templates/dialogs/dice-roll/rollSelection.hbs b/templates/dialogs/dice-roll/rollSelection.hbs index 5851a33d..f31a4fa8 100644 --- a/templates/dialogs/dice-roll/rollSelection.hbs +++ b/templates/dialogs/dice-roll/rollSelection.hbs @@ -125,7 +125,6 @@ {{/if}}
- {{#if @root.advantage}} {{localize "DAGGERHEART.GENERAL.Modifier.plural"}}