Fixed crit damage

This commit is contained in:
WBHarry 2026-03-15 22:11:41 +01:00
parent 42144acfe4
commit 98a28ac7b9
8 changed files with 46 additions and 35 deletions

View file

@ -528,7 +528,8 @@ export function expireActiveEffects(actor, allowedTypes = null) {
export async function getCritDamageBonus(formula) {
const critRoll = new Roll(formula);
return critRoll.dice.reduce((acc, dice) => acc + dice.faces * dice.number, 0);
await critRoll.evaluate();
return critRoll.dice.reduce((acc, dice) => acc + dice.faces * dice.results.filter(r => r.active).length, 0);
}
export function htmlToText(html) {