Skip to content

Commit

Permalink
Stone of Goodluck corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
MrPrimate committed Nov 8, 2023
1 parent 927b6f3 commit e6e9576
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# NEXT UP

- Sleep Spell Effect improvements for elfs and half-elfs
-
- Stone of Good Luck no longer needs a initiative boosting effect separately to checks.

# 3.5.8

Expand Down
27 changes: 27 additions & 0 deletions src/effects/items/stoneOfGoodLuck.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { baseItemEffect } from "../effects.js";

export function stoneOfGoodLuckEffect(document) {
document.effects = [];

const effect = baseItemEffect(document, document.name);

effect.changes.push(
{
key: "system.bonuses.abilities.save",
value: "+1",
mode: CONST.ACTIVE_EFFECT_MODES.ADD,
priority: 1,
},
{
key: "system.bonuses.abilities.check",
value: "+1",
mode: CONST.ACTIVE_EFFECT_MODES.ADD,
priority: 1,
},
);

document.effects.push(effect);


return document;
}
7 changes: 7 additions & 0 deletions src/effects/specialEquipment.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { cloakOfDisplacementEffect } from "./items/cloakOfDisplacement.js";
import { javelinOfLightningEffect } from "./items/javelinOfLightning.js";
import { moonSickleEffect } from "./items/moonSickle.js";
import { pearlOfPowerEffect } from "./items/pearlOfPower.js";
import { stoneOfGoodLuckEffect } from "./items/stoneOfGoodLuck.js";
import { hasteEffect } from "./spells/haste.js";


Expand Down Expand Up @@ -142,6 +143,12 @@ export function equipmentEffectAdjustment(document) {
);
break;
}
case "Stone of Good Luck (Luckstone)":
case "Luckstone":
case "Stone of Good Luck": {
document = stoneOfGoodLuckEffect(document);
break;
}
// no default
}

Expand Down

0 comments on commit e6e9576

Please sign in to comment.