v0.9.4: fixed giant succubi teleporting into enclosed spaces

This commit is contained in:
Evan Debenham 2021-07-21 11:53:58 -04:00
parent bded71adaf
commit 3dab4ba6ac

View File

@ -125,11 +125,13 @@ public class Succubus extends Mob {
if (Actor.findChar( cell ) != null && cell != this.pos)
cell = route.path.get(route.dist-1);
if (Dungeon.level.avoid[ cell ]){
if (Dungeon.level.avoid[ cell ] && (!properties().contains(Property.LARGE) || Dungeon.level.openSpace[cell])){
ArrayList<Integer> candidates = new ArrayList<>();
for (int n : PathFinder.NEIGHBOURS8) {
cell = route.collisionPos + n;
if (Dungeon.level.passable[cell] && Actor.findChar( cell ) == null) {
if (Dungeon.level.passable[cell]
&& Actor.findChar( cell ) == null
&& (!properties().contains(Property.LARGE) || Dungeon.level.openSpace[n])) {
candidates.add( cell );
}
}