v0.3.2a: weak floor rooms now guarantee a pit below them
This commit is contained in:
parent
3a5f724000
commit
b5176de721
|
@ -200,6 +200,7 @@ public abstract class RegularLevel extends Level {
|
||||||
protected boolean assignRoomType() {
|
protected boolean assignRoomType() {
|
||||||
|
|
||||||
int specialRooms = 0;
|
int specialRooms = 0;
|
||||||
|
boolean pitMade = false;
|
||||||
|
|
||||||
for (Room r : rooms) {
|
for (Room r : rooms) {
|
||||||
if (r.type == Type.NULL &&
|
if (r.type == Type.NULL &&
|
||||||
|
@ -212,7 +213,7 @@ public abstract class RegularLevel extends Level {
|
||||||
if (pitRoomNeeded) {
|
if (pitRoomNeeded) {
|
||||||
|
|
||||||
r.type = Type.PIT;
|
r.type = Type.PIT;
|
||||||
pitRoomNeeded = false;
|
pitMade = true;
|
||||||
|
|
||||||
specials.remove( Type.ARMORY );
|
specials.remove( Type.ARMORY );
|
||||||
specials.remove( Type.CRYPT );
|
specials.remove( Type.CRYPT );
|
||||||
|
@ -263,6 +264,8 @@ public abstract class RegularLevel extends Level {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (pitRoomNeeded && !pitMade) return false;
|
||||||
|
|
||||||
int count = 0;
|
int count = 0;
|
||||||
for (Room r : rooms) {
|
for (Room r : rooms) {
|
||||||
if (r.type == Type.NULL) {
|
if (r.type == Type.NULL) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user