mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-07-22 02:19:54 +02:00
Added overrides to modifierTotal and total getters in DamageRoll to addin critical damage when applicable
This commit is contained in:
parent
14edc7f4ca
commit
c0fe127df4
3 changed files with 13 additions and 3 deletions
|
|
@ -8,7 +8,7 @@ export default class DamageRoll extends DHRoll {
|
|||
}
|
||||
|
||||
get isCritical() {
|
||||
return true;
|
||||
return this.options.isCritical;
|
||||
}
|
||||
|
||||
get modifierTotal() {
|
||||
|
|
@ -16,6 +16,11 @@ export default class DamageRoll extends DHRoll {
|
|||
return super.modifierTotal + criticalDamageBonus;
|
||||
}
|
||||
|
||||
get total() {
|
||||
const criticalDamageBonus = this.isCritical ? getCritDamageBonus(this.terms) : 0;
|
||||
return super.total + criticalDamageBonus;
|
||||
}
|
||||
|
||||
static DefaultDialog = DamageDialog;
|
||||
|
||||
static createRollInstance(config) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue