Skip to content

Commit

Permalink
Prevent damage alterations from disabling override dice (#15565)
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlosFdez authored Jul 25, 2024
1 parent 1c1e1d3 commit 455757a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/module/rules/rule-element/damage-alteration/alteration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,11 @@ class DamageAlteration {
const rule = this.#rule;
if (rule.ignored) return damage;

if ("value" in damage && ["dice-faces", "dice-number"].includes(this.property)) {
// `damage` is a `ModifierPF2e`
// If this is a modifier or purely an override dice, skip
const isModifier = "value" in damage && ["dice-faces", "dice-number"].includes(this.property);
const isOverrideDice =
!("value" in damage) && !damage.damageType && !damage.diceNumber && !damage.dieSize && damage.override;
if (isModifier || isOverrideDice) {
return damage;
}

Expand Down

0 comments on commit 455757a

Please sign in to comment.