import { abilities } from '../config/actorConfig.mjs'; import { rollCommandToJSON } from '../helpers/utils.mjs'; export function dualityRollEnricher(match, _options) { const roll = rollCommandToJSON(match[1]); if (!roll) return match[0]; return getDualityMessage(roll); } export function getDualityMessage(roll) { const traitLabel = roll.trait && abilities[roll.trait] ? game.i18n.format('DAGGERHEART.General.Check', { check: game.i18n.localize(abilities[roll.trait].label) }) : null; const label = traitLabel ?? game.i18n.localize('DAGGERHEART.General.Duality'); const dataLabel = traitLabel ? game.i18n.localize(abilities[roll.trait].label) : game.i18n.localize('DAGGERHEART.General.Duality'); const dualityElement = document.createElement('span'); dualityElement.innerHTML = ` `; return dualityElement; }