v3.3.3: fixed NPE caused by resurrection level reset + skeleton key

This commit is contained in:
Evan Debenham
2026-01-05 10:30:38 -05:00
parent 6bba0ba310
commit f21da8925b
2 changed files with 8 additions and 1 deletions

View File

@@ -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();

View File

@@ -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 {