v0.8.2c: passive mobs now properly check FOV for surprise attacks

This commit is contained in:
Evan Debenham 2020-08-26 16:47:18 -04:00
parent 5b7ef9dacf
commit 269d12d7e2

View File

@ -594,7 +594,7 @@ public abstract class Mob extends Char {
}
public boolean surprisedBy( Char enemy ){
return enemy == Dungeon.hero && (enemy.invisible > 0 || (!enemySeen && state != PASSIVE));
return enemy == Dungeon.hero && (enemy.invisible > 0 || !enemySeen);
}
public void aggro( Char ch ) {
@ -944,7 +944,7 @@ public abstract class Mob extends Char {
@Override
public boolean act( boolean enemyInFOV, boolean justAlerted ) {
enemySeen = false;
enemySeen = enemyInFOV;
spend( TICK );
return true;
}