mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-18 07:59:03 +01:00
.
This commit is contained in:
parent
0108e3d222
commit
902a9f5612
18 changed files with 58 additions and 165 deletions
|
|
@ -313,8 +313,10 @@ export const itemAbleRollParse = (value, actor, item) => {
|
|||
|
||||
const isItemTarget = value.toLowerCase().includes('item.@');
|
||||
const slicedValue = isItemTarget ? value.replaceAll(/item\.@/gi, '@') : value;
|
||||
const model = isItemTarget ? item : actor;
|
||||
|
||||
try {
|
||||
return Roll.replaceFormulaData(slicedValue, isItemTarget ? item : actor);
|
||||
return Roll.replaceFormulaData(slicedValue, model?.getRollData?.() ?? model);
|
||||
} catch (_) {
|
||||
return '';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue