v0.7.4: corrected new logic causing piranhas to get surprise attacked

This commit is contained in:
Evan Debenham 2019-06-11 17:38:22 -04:00
parent 68764f802e
commit 6b816e8324

View File

@ -87,6 +87,15 @@ public class Piranha extends Mob {
return Random.NormalIntRange(0, Dungeon.depth); return Random.NormalIntRange(0, Dungeon.depth);
} }
@Override
public int defenseSkill( Char enemy ) {
enemySeen = state != SLEEPING
&& this.enemy != null
&& fieldOfView[this.enemy.pos]
&& this.enemy.invisible == 0;
return super.defenseSkill( enemy );
}
@Override @Override
public void die( Object cause ) { public void die( Object cause ) {
super.die( cause ); super.die( cause );