v0.3.2: mobs now always respawn a little bit away from the player.

This commit is contained in:
Evan Debenham
2015-10-30 17:50:25 -04:00
parent e05077c1ca
commit c1356e0752
@@ -523,7 +523,7 @@ public abstract class Level implements Bundlable {
Mob mob = Bestiary.mutable( Dungeon.depth );
mob.state = mob.WANDERING;
mob.pos = randomRespawnCell();
if (Dungeon.hero.isAlive() && mob.pos != -1) {
if (Dungeon.hero.isAlive() && mob.pos != -1 && distance(Dungeon.hero.pos, mob.pos) >= 4) {
GameScene.add( mob );
if (Statistics.amuletObtained) {
mob.beckon( Dungeon.hero.pos );