From 2a6c34f1e1c1db55538bc32e7662048eb58bd2d1 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Tue, 24 Oct 2017 19:25:16 -0400 Subject: [PATCH] v0.6.2: removed pitfall traps breaking into chasms --- .../levels/traps/PitfallTrap.java | 24 ++----------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/PitfallTrap.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/PitfallTrap.java index bceea379b..6a558666f 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/PitfallTrap.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/traps/PitfallTrap.java @@ -27,11 +27,8 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob; import com.shatteredpixel.shatteredpixeldungeon.items.Heap; import com.shatteredpixel.shatteredpixeldungeon.items.Item; -import com.shatteredpixel.shatteredpixeldungeon.levels.Level; -import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain; import com.shatteredpixel.shatteredpixeldungeon.levels.features.Chasm; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; -import com.watabou.utils.PathFinder; public class PitfallTrap extends Trap { @@ -62,23 +59,6 @@ public class PitfallTrap extends Trap { } } - @Override - protected void disarm() { - super.disarm(); - - int stateChanges = 0; - boolean curWall = Dungeon.level.map[pos + PathFinder.CIRCLE8[PathFinder.CIRCLE8.length-1]] == Terrain.WALL; - for (int i : PathFinder.CIRCLE8){ - if (curWall != (Dungeon.level.map[pos + i] == Terrain.WALL)){ - stateChanges++; - curWall = Dungeon.level.map[pos + i] == Terrain.WALL; - } - } - - //if making a pit here wouldn't block any paths, make a pit tile instead of a disarmed trap tile. - if (stateChanges <= 2){ - Level.set(pos, Terrain.CHASM); - GameScene.updateMap( pos ); - } - } + //TODO these used to become chasms when disarmed, but the functionality was problematic + //because it could block routes, perhaps some way to make this work elegantly? }