v2.0.0: fixed rare cases where a hero out of enemy FOV couldn't surprise
This commit is contained in:
@@ -678,8 +678,8 @@ public abstract class Mob extends Char {
|
||||
|
||||
public boolean surprisedBy( Char enemy, boolean attacking ){
|
||||
return enemy == Dungeon.hero
|
||||
&& (enemy.invisible > 0 || !enemySeen)
|
||||
&& (!attacking || ((Hero)enemy).canSurpriseAttack());
|
||||
&& (enemy.invisible > 0 || !enemySeen || (fieldOfView != null && !fieldOfView[enemy.pos]))
|
||||
&& (!attacking || enemy.canSurpriseAttack());
|
||||
}
|
||||
|
||||
public void aggro( Char ch ) {
|
||||
|
||||
Reference in New Issue
Block a user