mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-18 16:09:03 +01:00
Change the critical damage max calculation to avoid setting the rolled portion to maximum all the time.
This commit is contained in:
parent
18f3c47635
commit
ae0650d3d4
1 changed files with 9 additions and 3 deletions
|
|
@ -137,9 +137,15 @@ export default class DamageRoll extends DHRoll {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config.isCritical && part.applyTo === CONFIG.DH.GENERAL.healingTypes.hitPoints.id) {
|
if (config.isCritical && part.applyTo === CONFIG.DH.GENERAL.healingTypes.hitPoints.id) {
|
||||||
const tmpRoll = Roll.fromTerms(part.roll.terms)._evaluateSync({ maximize: true }),
|
let total = 0;
|
||||||
criticalBonus = tmpRoll.total - this.constructor.calculateTotalModifiers(tmpRoll);
|
part.roll.terms.forEach(term => {
|
||||||
part.roll.terms.push(...this.formatModifier(criticalBonus));
|
if (term._faces) {
|
||||||
|
total += term._faces * term._number;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (total > 0) {
|
||||||
|
part.roll.terms.push(...this.formatModifier(total));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* To Remove When Reaction System */
|
/* To Remove When Reaction System */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue