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)

This commit is contained in:
Evan Debenham 2015-05-24 04:31:47 -04:00
parent f1f68163ad
commit a4facdf950

View File

@ -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;
}