mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-17 15:39:02 +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));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue