From 0a1a6834fcf2121d73bf286b938f8e550327100c Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Mon, 22 Dec 2014 10:10:13 -0500 Subject: [PATCH] v0.2.3: correction to sewer boss levelgen logic, fixes a bug and levels should be bigger on average now. --- .../shatteredpixeldungeon/levels/SewerBossLevel.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/SewerBossLevel.java b/src/com/shatteredpixel/shatteredpixeldungeon/levels/SewerBossLevel.java index 3bfed7bb6..6f86a30b4 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/levels/SewerBossLevel.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/levels/SewerBossLevel.java @@ -83,7 +83,7 @@ public class SewerBossLevel extends RegularLevel { for(int i = 0; i <= 4; i++){ retry = 0; //find a suitable room the first four times - //sutiable room should be empty and have a distance of 2 from the current room + //suitable room should be empty, have a distance of 2 from the current room, and not be adjacent to the entrance. if (i < 4) { do { if (retry++ > 20) { @@ -92,7 +92,7 @@ public class SewerBossLevel extends RegularLevel { curRoom = Random.element(rooms); Graph.buildDistanceMap(rooms, curRoom); distance = lastRoom.distance(); - } while (curRoom.type != Type.NULL || distance != 2); + } while (curRoom.type != Type.NULL || distance != 2 || curRoom.neigbours.contains(roomEntrance)); curRoom.type = Type.STANDARD;