v1.2.0: fixed giant ghouls spawning or reviving into enclosed spaces
This commit is contained in:
parent
09f4644599
commit
2939ca7dea
|
@ -108,7 +108,9 @@ public class Ghoul extends Mob {
|
||||||
|
|
||||||
int[] neighbours = {pos + 1, pos - 1, pos + Dungeon.level.width(), pos - Dungeon.level.width()};
|
int[] neighbours = {pos + 1, pos - 1, pos + Dungeon.level.width(), pos - Dungeon.level.width()};
|
||||||
for (int n : neighbours) {
|
for (int n : neighbours) {
|
||||||
if (Dungeon.level.passable[n] && Actor.findChar( n ) == null) {
|
if (Dungeon.level.passable[n]
|
||||||
|
&& Actor.findChar( n ) == null
|
||||||
|
&& (!Char.hasProp(this, Property.LARGE) || Dungeon.level.openSpace[n])) {
|
||||||
candidates.add( n );
|
candidates.add( n );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -250,7 +252,9 @@ public class Ghoul extends Mob {
|
||||||
ArrayList<Integer> candidates = new ArrayList<>();
|
ArrayList<Integer> candidates = new ArrayList<>();
|
||||||
for (int n : PathFinder.NEIGHBOURS8) {
|
for (int n : PathFinder.NEIGHBOURS8) {
|
||||||
int cell = ghoul.pos + n;
|
int cell = ghoul.pos + n;
|
||||||
if (Dungeon.level.passable[cell] && Actor.findChar( cell ) == null) {
|
if (Dungeon.level.passable[cell]
|
||||||
|
&& Actor.findChar( cell ) == null
|
||||||
|
&& (!Char.hasProp(ghoul, Property.LARGE) || Dungeon.level.openSpace[cell])) {
|
||||||
candidates.add( cell );
|
candidates.add( cell );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user