This commit is contained in:
WBHarry 2026-07-19 16:33:07 +02:00
parent 8d68166e4c
commit 863b5116f7
5 changed files with 26 additions and 19 deletions

View file

@ -495,9 +495,8 @@ export function expireActiveEffects(actor, allowedTypes = null) {
actor.deleteEmbeddedDocuments('ActiveEffect', effectsToExpire);
}
export async function getCritDamageBonus(formula) {
const critRoll = new Roll(formula);
await critRoll.evaluate();
export function getCritDamageBonus(terms) {
const critRoll = Roll.fromTerms(terms);
return critRoll.dice.reduce((acc, dice) => acc + dice.faces * dice.results.filter(r => r.active).length, 0);
}