diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Wandmaker.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Wandmaker.java index 4a4cf0a33..3a4386d68 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Wandmaker.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Wandmaker.java @@ -278,7 +278,7 @@ public class Wandmaker extends NPC { Wandmaker npc = new Wandmaker(); boolean validPos; - //Do not spawn wandmaker on the entrance, or next to a door. + //Do not spawn wandmaker on the entrance, or in front of a door. do { validPos = true; npc.pos = level.pointToCell(room.random()); @@ -286,7 +286,7 @@ public class Wandmaker extends NPC { validPos = false; } for (Point door : room.connected.values()){ - if (level.adjacent( npc.pos, level.pointToCell( door ) )){ + if (level.trueDistance( npc.pos, level.pointToCell( door ) ) <= 1){ validPos = false; } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/Level.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/Level.java index 3da34cd12..cc03fc160 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/Level.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/Level.java @@ -863,8 +863,7 @@ public abstract class Level implements Bundlable { do { result = randomRespawnCell( null ); } while (traps.get(result) != null - || findMob(result) != null - || heaps.get(result) != null); + || findMob(result) != null); return result; }