From 9ae3f199e7c33bb1e71ddf208bade3d99b4740eb Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Sun, 3 Jan 2021 13:24:52 -0500 Subject: [PATCH] v0.9.1b: fixed cached rations appearing in shop rooms --- .../shatteredpixeldungeon/levels/RegularLevel.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java index dfd7bd6bb..05b7d09f2 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java @@ -423,8 +423,8 @@ public abstract class RegularLevel extends Level { int tries = 100; do { cell = randomDropCell(SpecialRoom.class); - } while (tries-- > 0 && room(cell) instanceof SecretRoom); - if (!(room(cell) instanceof SecretRoom) && cell != -1) { + } while (tries-- > 0 && (room(cell) instanceof SecretRoom || room(cell) instanceof ShopRoom)); + if (!(room(cell) instanceof SecretRoom || room(cell) instanceof ShopRoom) && cell != -1) { if (map[cell] == Terrain.HIGH_GRASS || map[cell] == Terrain.FURROWED_GRASS) { map[cell] = Terrain.GRASS; losBlocking[cell] = false;