diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/RockfallTrap.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/RockfallTrap.java index ec6375631..201a5c9cb 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/RockfallTrap.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/RockfallTrap.java @@ -83,6 +83,15 @@ public class RockfallTrap extends Trap { PathFinder.buildDistanceMap( pos, BArray.not( Dungeon.level.solid, null ), 2 ); for (int i = 0; i < PathFinder.distance.length; i++) { if (PathFinder.distance[i] < Integer.MAX_VALUE) { + if (Dungeon.level instanceof MiningLevel){ + boolean barricade = false; + for (int j : PathFinder.NEIGHBOURS9){ + if (Dungeon.level.map[i+j] == Terrain.BARRICADE){ + barricade = true; + } + } + if (barricade) continue; + } rockCells.add(i); } }