diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/SkeletonKey.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/SkeletonKey.java index bc8759ebf..9f95a86e0 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/SkeletonKey.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/SkeletonKey.java @@ -595,6 +595,13 @@ public class SkeletonKey extends Artifact { } } + //used if a level was reset, e.g. via unblessed ankh vs. boss + public void clearDepth(){ + ironKeysNeeded[Dungeon.depth] = -1; + goldenKeysNeeded[Dungeon.depth] = -1; + crystalKeysNeeded[Dungeon.depth] = -1; + } + public void processIronLockOpened(){ if (ironKeysNeeded[Dungeon.depth] == -1){ setupKeysForDepth(); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/InterlevelScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/InterlevelScene.java index 00f3126e6..e246b83dc 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/InterlevelScene.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/InterlevelScene.java @@ -769,7 +769,7 @@ public class InterlevelScene extends PixelScene { //need to reset key replacement tracking as well if (Dungeon.hero.buff(SkeletonKey.KeyReplacementTracker.class) != null){ - Dungeon.hero.buff(SkeletonKey.KeyReplacementTracker.class).setupKeysForDepth(); + Dungeon.hero.buff(SkeletonKey.KeyReplacementTracker.class).clearDepth(); } } else {