Fixed so that Rally dice works as a single active effect for bard (#1708)

This commit is contained in:
WBHarry 2026-03-07 00:08:03 +01:00 committed by GitHub
parent 92d8c2ca18
commit 83c3da0130
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 12 additions and 107 deletions

View file

@ -558,6 +558,13 @@ export function calculateExpectedValue(formulaOrTerms) {
return terms.reduce((r, t) => r + (t.bonus ?? 0) + (t.diceQuantity ? (t.diceQuantity * (t.faces + 1)) / 2 : 0), 0);
}
export function parseRallyDice(value, effect) {
const legacyStartsWithPrefix = value.toLowerCase().startsWith('d');
const workingValue = legacyStartsWithPrefix ? value.slice(1) : value;
const dataParsedValue = itemAbleRollParse(workingValue, effect.parent);
return `d${game.system.api.documents.DhActiveEffect.effectSafeEval(dataParsedValue)}`;
}
/**
* Refreshes character and/or adversary resources.
* @param { string[] } refreshTypes Which type of features to refresh using IDs from CONFIG.DH.GENERAL.refreshTypes