v0.9.3: Fixed magical infusion not cleansing degrade debuff
This commit is contained in:
parent
1559aab6d9
commit
8eedc0d215
|
@ -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++;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user