diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/Artifact.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/Artifact.java index 9e1c72e96..61591af78 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/Artifact.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/Artifact.java @@ -114,6 +114,11 @@ public class Artifact extends KindofMisc { passiveBuff.detach(); passiveBuff = null; + if (activeBuff != null){ + activeBuff.detach(); + activeBuff = null; + } + return true; } else { diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/CloakOfShadows.java b/src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/CloakOfShadows.java index 4b14b9222..0cca8c8a6 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/CloakOfShadows.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/CloakOfShadows.java @@ -86,16 +86,8 @@ public class CloakOfShadows extends Artifact { GLog.i("You return from underneath your cloak."); } - } else { - if (stealthed) { - stealthed = false; - activeBuff.detach(); - activeBuff = null; - GLog.i("You return from underneath your cloak."); - } - + } else super.execute(hero, action); - } } @Override @@ -107,6 +99,15 @@ public class CloakOfShadows extends Artifact { } } + @Override + public boolean doUnequip(Hero hero, boolean collect, boolean single) { + if (super.doUnequip(hero, collect, single)){ + stealthed = false; + return true; + } else + return false; + } + @Override protected ArtifactBuff passiveBuff() { return new cloakRecharge();