From 269d12d7e26c7c08e34bd07ffa4621767e2cda26 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Wed, 26 Aug 2020 16:47:18 -0400 Subject: [PATCH] v0.8.2c: passive mobs now properly check FOV for surprise attacks --- .../shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java index ae8e8db7e..99ed9e5e1 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java @@ -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; }