From b5176de721dc8c133b750b52bed2537ef8e411b3 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Fri, 6 Nov 2015 17:13:15 -0500 Subject: [PATCH] v0.3.2a: weak floor rooms now guarantee a pit below them --- .../shatteredpixeldungeon/levels/RegularLevel.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java b/src/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java index dfea24585..668c09fc1 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java @@ -200,6 +200,7 @@ public abstract class RegularLevel extends Level { protected boolean assignRoomType() { int specialRooms = 0; + boolean pitMade = false; for (Room r : rooms) { if (r.type == Type.NULL && @@ -212,7 +213,7 @@ public abstract class RegularLevel extends Level { if (pitRoomNeeded) { r.type = Type.PIT; - pitRoomNeeded = false; + pitMade = true; specials.remove( Type.ARMORY ); specials.remove( Type.CRYPT ); @@ -262,6 +263,8 @@ public abstract class RegularLevel extends Level { } } } + + if (pitRoomNeeded && !pitMade) return false; int count = 0; for (Room r : rooms) {