From 5554abd27971c59da22c395bac697b71182d7f49 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Tue, 5 Apr 2022 15:28:45 -0400 Subject: [PATCH] v1.2.2: fixed some sources of arti charging working on cursed artifacts --- .../shatteredpixeldungeon/items/spells/WildEnergy.java | 4 +++- .../shatteredpixeldungeon/items/weapon/melee/MagesStaff.java | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/spells/WildEnergy.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/spells/WildEnergy.java index 679bcd3b5..75116977e 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/spells/WildEnergy.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/spells/WildEnergy.java @@ -57,7 +57,9 @@ public class WildEnergy extends TargetedSpell { hero.belongings.charge(1f); for (Buff b : hero.buffs()){ - if (b instanceof Artifact.ArtifactBuff) ((Artifact.ArtifactBuff) b).charge(hero, 4); + if (b instanceof Artifact.ArtifactBuff){ + if (!((Artifact.ArtifactBuff) b).isCursed()) ((Artifact.ArtifactBuff) b).charge(hero, 4); + } } Buff.affect(hero, Recharging.class, 8f); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/MagesStaff.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/MagesStaff.java index 5b4d38d63..15908ce96 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/MagesStaff.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/MagesStaff.java @@ -163,7 +163,9 @@ public class MagesStaff extends MeleeWeapon { if (attacker instanceof Hero && ((Hero) attacker).hasTalent(Talent.MYSTICAL_CHARGE)){ Hero hero = (Hero) attacker; for (Buff b : hero.buffs()){ - if (b instanceof Artifact.ArtifactBuff) ((Artifact.ArtifactBuff) b).charge(hero, hero.pointsInTalent(Talent.MYSTICAL_CHARGE)/2f); + if (b instanceof Artifact.ArtifactBuff) { + if (!((Artifact.ArtifactBuff) b).isCursed()) ((Artifact.ArtifactBuff) b).charge(hero, 4); + } } }