mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-11 19:25:21 +01:00
Fixed rollData for actions and fallback for lookup enricher (#1472)
This commit is contained in:
parent
50a307b271
commit
fa21baf8bf
2 changed files with 15 additions and 12 deletions
|
|
@ -3,6 +3,11 @@ import { parseInlineParams } from './parser.mjs';
|
|||
export default function DhLookupEnricher(match, { rollData }) {
|
||||
const results = parseInlineParams(match[1], { first: 'formula' });
|
||||
const element = document.createElement('span');
|
||||
element.textContent = Roll.replaceFormulaData(String(results.formula), rollData);
|
||||
|
||||
const lookupCommand = match[0];
|
||||
const lookupParam = match[1];
|
||||
const lookupText = Roll.replaceFormulaData(String(results.formula), rollData);
|
||||
element.textContent = lookupText === lookupParam ? lookupCommand : lookupText;
|
||||
|
||||
return element;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue