v0.8.2c: passive mobs now properly check FOV for surprise attacks
This commit is contained in:
parent
5b7ef9dacf
commit
269d12d7e2
|
@ -594,7 +594,7 @@ public abstract class Mob extends Char {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean surprisedBy( Char enemy ){
|
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 ) {
|
public void aggro( Char ch ) {
|
||||||
|
@ -944,7 +944,7 @@ public abstract class Mob extends Char {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean act( boolean enemyInFOV, boolean justAlerted ) {
|
public boolean act( boolean enemyInFOV, boolean justAlerted ) {
|
||||||
enemySeen = false;
|
enemySeen = enemyInFOV;
|
||||||
spend( TICK );
|
spend( TICK );
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user