v0.9.0: fixed crystal mimics escaping when they are still visible

This commit is contained in:
Evan Debenham 2020-09-04 19:57:07 -04:00
parent 07a64ba2d3
commit 77249e84ea

View File

@ -188,11 +188,13 @@ public class CrystalMimic extends Mimic {
if (enemySeen) {
sprite.showStatus(CharSprite.NEGATIVE, Messages.get(Mob.class, "rage"));
state = HUNTING;
} else {
} else if (!Dungeon.level.heroFOV[pos] && Dungeon.level.distance(Dungeon.hero.pos, pos) >= 6) {
GLog.n( Messages.get(CrystalMimic.class, "escaped"));
if (Dungeon.level.heroFOV[pos]) CellEmitter.get(pos).burst(Speck.factory(Speck.WOOL), 6);
destroy();
sprite.killAndErase();
} else {
state = WANDERING;
}
} else {
super.nowhereToRun();