v0.9.1: fixed hunting mobs taking a second turn when enemy is null

This commit is contained in:
Evan Debenham 2020-11-25 21:07:07 -05:00
parent 2b6de19995
commit 52388f2d23

View File

@ -906,8 +906,10 @@ public abstract class Mob extends Char {
if (enemyInFOV) { if (enemyInFOV) {
target = enemy.pos; target = enemy.pos;
} else if (enemy == null) { } else if (enemy == null) {
sprite.showLost();
state = WANDERING; state = WANDERING;
target = Dungeon.level.randomDestination( Mob.this ); target = Dungeon.level.randomDestination( Mob.this );
spend( TICK );
return true; return true;
} }