v0.6.2: fixed enemies being able to spawn ontop of the exit stairs

This commit is contained in:
Evan Debenham 2017-10-13 20:01:27 -04:00
parent 40a92bf3a4
commit bf30704891

View File

@ -215,7 +215,7 @@ public abstract class RegularLevel extends Level {
Mob mob = createMob();
mob.pos = pointToCell(roomToSpawn.random());
if (findMob(mob.pos) == null && passable[mob.pos]) {
if (findMob(mob.pos) == null && passable[mob.pos] && mob.pos != exit) {
mobsToSpawn--;
mobs.add(mob);
@ -224,7 +224,7 @@ public abstract class RegularLevel extends Level {
mob = createMob();
mob.pos = pointToCell(roomToSpawn.random());
if (findMob(mob.pos) == null && passable[mob.pos]) {
if (findMob(mob.pos) == null && passable[mob.pos] && mob.pos != exit) {
mobsToSpawn--;
mobs.add(mob);
}