Fixed Feature spellcasting modifier

This commit is contained in:
WBHarry 2025-07-14 00:14:32 +02:00
parent 637918d686
commit 8fc26495c1
12 changed files with 57 additions and 34 deletions

View file

@ -1,3 +1,5 @@
import { itemAbleRollParse } from './utils.mjs';
export default class RegisterHandlebarsHelpers {
static registerHelpers() {
Handlebars.registerHelper({
@ -42,7 +44,9 @@ export default class RegisterHandlebarsHelpers {
return new Handlebars.SafeString(Array.from(symbols).map(symbol => `<i class="fa-solid ${symbol}"></i>`));
}
static rollParsed(value, actor) {
return Roll.replaceFormulaData(value, actor);
static rollParsed(value, actor, item, numerical) {
const isNumerical = typeof numerical === 'boolean' ? numerical : false;
const result = itemAbleRollParse(value, actor, item);
return isNumerical && !result ? 0 : result;
}
}