v0.3.1d: prevented traps from spawning in tunnels on floor 1

This commit is contained in:
Evan Debenham
2015-09-10 16:23:03 -04:00
parent 6a5bc61417
commit 2dfb01f258
@@ -339,7 +339,15 @@ public abstract class RegularLevel extends Level {
for (int i = 0; i < LENGTH; i ++) {
if (map[i] == Terrain.EMPTY){
validCells.add(i);
if(Dungeon.depth == 1){
//extra check to prevent annoying inactive traps in hallways on floor 1
Room r = room(i);
if (r != null && r.type != Type.TUNNEL){
validCells.add(i);
}
} else
validCells.add(i);
}
}