v0.9.4: fixed pitfall traps not cancelling hero actions if they fell
This commit is contained in:
parent
1ae3e4fcbd
commit
72a821e087
|
@ -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";
|
||||
|
|
Loading…
Reference in New Issue
Block a user