diff --git a/module/dice/damageRoll.mjs b/module/dice/damageRoll.mjs index 15da4c49..0d64329e 100644 --- a/module/dice/damageRoll.mjs +++ b/module/dice/damageRoll.mjs @@ -137,12 +137,7 @@ export default class DamageRoll extends DHRoll { } if (config.isCritical && part.applyTo === CONFIG.DH.GENERAL.healingTypes.hitPoints.id) { - let total = 0; - part.roll.terms.forEach(term => { - if (term._faces) { - total += term._faces * term._number; - } - }); + const total = part.roll.dice.reduce((acc, term) => acc + term._faces*term._number, 0); if (total > 0) { part.roll.terms.push(...this.formatModifier(total)); } diff --git a/package.json b/package.json index 023ccff2..50572fba 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "rollup": "^4.40.0" }, "scripts": { - "start": "concurrently \"rollup -c --watch\" \"node ../../../../FoundryDev/main.js --dataPath=../../../ --noupnp\" \"gulp\"", + "start": "concurrently \"rollup -c --watch\" \"node /home/foundry/foundryvtt/resources/app/main.js --dataPath=/home/foundry/foundrydata/ --noupnp\" \"gulp\"", "start-test": "node ./resources/app/main.js --dataPath=./ && rollup -c --watch && gulp", "build": "npm run rollup && npm run gulp", "rollup": "rollup -c",