v0.6.2b: improved the error-resistance of mimic spawning logic

This commit is contained in:
Evan Debenham 2017-11-09 02:51:49 -05:00 committed by Evan Debenham
parent aa6baa035f
commit be198f1907

View File

@ -113,7 +113,7 @@ public class Mimic extends Mob {
public static Mimic spawnAt( int pos, List<Item> items ) {
Char ch = Actor.findChar( pos );
if (ch != null) {
if (ch != null || !Dungeon.level.passable[pos]) {
ArrayList<Integer> candidates = new ArrayList<>();
for (int n : PathFinder.NEIGHBOURS8) {
int cell = pos + n;