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;