Skip to content

Commit

Permalink
[#4403] Fix damage scaling being lost on scaled spell scrolls
Browse files Browse the repository at this point in the history
Now allows the damage scaling field to appear for activities on
scaled spell scrolls, based on whether the `dnd5e.spellLevel` flag
is present.

Closes #4403
  • Loading branch information
arbron committed Sep 23, 2024
1 parent 035a56a commit b19e76b
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion module/data/activity/base-activity.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,17 @@ export default class BaseActivityData extends foundry.abstract.DataModel {
* @type {boolean}
*/
get canScaleDamage() {
return this.consumption.scaling.allowed || this.isSpell;
return this.consumption.scaling.allowed || this.isScaledScroll || this.isSpell;
}

/* -------------------------------------------- */

/**
* Is this activity on a spell scroll that is scaled.
* @type {boolean}
*/
get isScaledScroll() {
return !!this.item.getFlag("dnd5e", "spellLevel");
}

/* -------------------------------------------- */
Expand Down

0 comments on commit b19e76b

Please sign in to comment.