mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-07-22 02:19:54 +02:00
Initial
This commit is contained in:
parent
8d68166e4c
commit
863b5116f7
5 changed files with 26 additions and 19 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue