mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-04-22 07:23:37 +02:00
Fixed crit damage
This commit is contained in:
parent
42144acfe4
commit
98a28ac7b9
8 changed files with 46 additions and 35 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue