From a4facdf950db39766b9cb94cdbc5101817a8ac3e Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Sun, 24 May 2015 04:31:47 -0400 Subject: [PATCH] v0.3.0: adjusted some logic for pressing tiles, fixing issues where mobs press tiles and reveal traps (e.g. in wand of blast wave) --- .../shatteredpixeldungeon/levels/Level.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/levels/Level.java b/src/com/shatteredpixel/shatteredpixeldungeon/levels/Level.java index f647332ee..c6dd3dd11 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/levels/Level.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/levels/Level.java @@ -707,8 +707,12 @@ public abstract class Level implements Bundlable { public void press( int cell, Char ch ) { - if (pit[cell] && ch == Dungeon.hero) { - Chasm.heroFall( cell ); + if (ch != null && pit[cell] && !ch.flying) { + if (ch == Dungeon.hero) { + Chasm.heroFall(cell); + } else if (ch instanceof Mob) { + Chasm.mobFall( (Mob)ch ); + } return; }