diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/CavesBossLevel.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/CavesBossLevel.java index dedd99ebe..5c041c4f0 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/CavesBossLevel.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/CavesBossLevel.java @@ -272,12 +272,13 @@ public class CavesBossLevel extends Level { set( entrance, Terrain.WALL ); Heap heap = Dungeon.level.heaps.get( entrance ); - if (heap != null) { + while (heap != null && !heap.isEmpty()) { int n; do { - n = entrance + PathFinder.NEIGHBOURS8[Random.Int( 8 )]; + n = entrance + PathFinder.NEIGHBOURS8[Random.Int(8)]; } while (!Dungeon.level.passable[n]); - Dungeon.level.drop( heap.pickUp(), n ).sprite.drop( entrance ); + Heap dropped = Dungeon.level.drop(heap.pickUp(), n); + dropped.seen = heap.seen; } Char ch = Actor.findChar( entrance );