From 72a821e08706610e24ad5b6e26963e304cd9acab Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Wed, 28 Jul 2021 17:26:38 -0400 Subject: [PATCH] v0.9.4: fixed pitfall traps not cancelling hero actions if they fell --- .../shatteredpixeldungeon/levels/traps/PitfallTrap.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 cc9430bac..338425946 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 @@ -78,6 +78,8 @@ public class PitfallTrap extends Trap { @Override public boolean act() { + + boolean herofell = false; if (depth == Dungeon.depth) { for (int i : PathFinder.NEIGHBOURS9) { @@ -109,6 +111,7 @@ public class PitfallTrap extends Trap { && !(ch.alignment == Char.Alignment.NEUTRAL && Char.hasProp(ch, Char.Property.IMMOVABLE))) { if (ch == Dungeon.hero) { Chasm.heroFall(cell); + herofell = true; } else { Chasm.mobFall((Mob) ch); } @@ -118,7 +121,7 @@ public class PitfallTrap extends Trap { } detach(); - return true; + return !herofell; } private static final String POS = "pos";