From 8eedc0d215cf67e48364339cb546cf774dded64c Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Wed, 12 May 2021 22:22:03 -0400 Subject: [PATCH] v0.9.3: Fixed magical infusion not cleansing degrade debuff --- .../shatteredpixeldungeon/items/spells/MagicalInfusion.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/spells/MagicalInfusion.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/spells/MagicalInfusion.java index db7f94a9b..585b74d31 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/spells/MagicalInfusion.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/spells/MagicalInfusion.java @@ -24,6 +24,7 @@ package com.shatteredpixel.shatteredpixeldungeon.items.spells; import com.shatteredpixel.shatteredpixeldungeon.Badges; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.Statistics; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Degrade; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent; import com.shatteredpixel.shatteredpixeldungeon.effects.Speck; import com.shatteredpixel.shatteredpixeldungeon.items.Item; @@ -47,6 +48,10 @@ public class MagicalInfusion extends InventorySpell { @Override protected void onItemSelected( Item item ) { + ScrollOfUpgrade.upgrade(curUser); + + Degrade.detach( curUser, Degrade.class ); + if (item instanceof Weapon && ((Weapon) item).enchantment != null && !((Weapon) item).hasCurseEnchant()) { ((Weapon) item).upgrade(true); } else if (item instanceof Armor && ((Armor) item).glyph != null && !((Armor) item).hasCurseGlyph()) { @@ -59,7 +64,6 @@ public class MagicalInfusion extends InventorySpell { Talent.onUpgradeScrollUsed( Dungeon.hero ); Badges.validateItemLevelAquired(item); - curUser.sprite.emitter().start(Speck.factory(Speck.UP), 0.2f, 3); Statistics.upgradesUsed++; }