From 2dfb01f258f40fe4a5965f1294547394d2b8c088 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Thu, 10 Sep 2015 16:23:03 -0400 Subject: [PATCH] v0.3.1d: prevented traps from spawning in tunnels on floor 1 --- .../shatteredpixeldungeon/levels/RegularLevel.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java b/src/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java index 5d9af0ff0..9e1efc2a2 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java @@ -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); } }