Skip to content

Commit

Permalink
Remove Cantrip Scaling, push parts separately for scaling.
Browse files Browse the repository at this point in the history
  • Loading branch information
tpendragon committed Feb 18, 2020
1 parent d8018d9 commit 4328c17
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 0 additions & 1 deletion scripts/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -848,6 +848,5 @@ CONFIG.languages = {

CONFIG.spellScalingModes = {
"none": "None",
"cantrip": "Cantrip",
"level": "Heightened +1"
}
6 changes: 4 additions & 2 deletions scripts/item/item.js
Original file line number Diff line number Diff line change
Expand Up @@ -628,8 +628,10 @@ class ItemPF2e extends Item {
rollData.item = itemData;

if (itemData.damage.applyMod) parts.push(rollData.abilities[abl].mod);
if (itemData.scaling.mode === "level" && itemData.scaling.formula !== "" && itemData.level.value < spellLvl) {
parts.push(`(${spellLvl - itemData.level.value})*(${itemData.scaling.formula})`)
let scaling = itemData.scaling || {}
if (scaling.mode === "level" && scaling.formula !== "" && itemData.level.value < spellLvl) {
let scaling_parts = Array(spellLvl - itemData.level.value).fill(scaling.formula)
parts.push(...scaling_parts)
}

// Call the roll helper utility
Expand Down

0 comments on commit 4328c17

Please sign in to comment.