import { abilities } from '../config/actorConfig.mjs'; import { getCommandTarget, rollCommandToJSON } from '../helpers/utils.mjs'; export default function DhFateRollEnricher(match, _options) { const roll = rollCommandToJSON(match[1], match[0]); if (!roll) return match[0]; return getFateMessage(roll.result, roll.flavor ?? 'FLAVOR'); } function getFateMessage(roll, flavor) { const label = flavor ?? 'fate'; const dataLabel = game.i18n.localize('DAGGERHEART.GENERAL.fate'); const fateElement = document.createElement('span'); fateElement.innerHTML = `