mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-18 07:59:03 +01:00
Change to the more neater code
This commit is contained in:
parent
ae0650d3d4
commit
19e64d872a
2 changed files with 2 additions and 7 deletions
|
|
@ -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));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue