mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-03-11 03:27:08 +01:00
Feat: add massive and powerful feature on weapon
This commit is contained in:
parent
4defe69c21
commit
952551ac83
2 changed files with 17 additions and 27 deletions
|
|
@ -132,6 +132,16 @@ export default class DamageRoll extends DHRoll {
|
|||
criticalBonus = tmpRoll.total - this.constructor.calculateTotalModifiers(tmpRoll);
|
||||
part.roll.terms.push(...this.formatModifier(criticalBonus));
|
||||
}
|
||||
|
||||
if ( config.data.bonuses.damage.primaryWeapon?.addDiceAndDiscardLowest) {
|
||||
const index = part.roll.terms.findIndex(t => t instanceof foundry.dice.terms.Die);
|
||||
if (index !== -1) {
|
||||
const diceTerm = part.roll.terms[index];
|
||||
diceTerm.modifiers = ['k' + diceTerm.number];
|
||||
diceTerm.number += 1;
|
||||
}
|
||||
}
|
||||
|
||||
return (part.roll._formula = this.constructor.getFormula(part.roll.terms));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue