mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-18 07:59:03 +01:00
Fixed Feature spellcasting modifier
This commit is contained in:
parent
637918d686
commit
8fc26495c1
12 changed files with 57 additions and 34 deletions
|
|
@ -299,3 +299,15 @@ export const updateActorTokens = async (actor, update) => {
|
|||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const itemAbleRollParse = (value, actor, item) => {
|
||||
if (!value) return value;
|
||||
|
||||
const isItemTarget = value.toLowerCase().startsWith('item.');
|
||||
const slicedValue = isItemTarget ? value.slice(5) : value;
|
||||
try {
|
||||
return Roll.safeEval(Roll.replaceFormulaData(slicedValue, isItemTarget ? item : actor));
|
||||
} catch (_) {
|
||||
return '';
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue