From 80a1bbe8655c36370e3879fd0560c51170e699d8 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Fri, 9 Sep 2022 14:27:31 -0400 Subject: [PATCH] v1.4.0: fixed errors in new logic in randomRespawnCell for boss levels --- .../shatteredpixeldungeon/levels/CavesBossLevel.java | 2 +- .../shatteredpixeldungeon/levels/CityBossLevel.java | 2 +- .../shatteredpixeldungeon/levels/HallsBossLevel.java | 2 +- .../shatteredpixel/shatteredpixeldungeon/levels/LastLevel.java | 2 +- .../shatteredpixeldungeon/levels/PrisonBossLevel.java | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/CavesBossLevel.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/CavesBossLevel.java index 810e98a00..dedd99ebe 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/CavesBossLevel.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/CavesBossLevel.java @@ -223,7 +223,7 @@ public class CavesBossLevel extends Level { for (int i : PathFinder.NEIGHBOURS8){ int cell = entrance() + i; if (passable[cell] - && Actor.findChar(cell) != null + && Actor.findChar(cell) == null && (!Char.hasProp(ch, Char.Property.LARGE) || openSpace[cell])){ candidates.add(cell); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/CityBossLevel.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/CityBossLevel.java index 336f2b182..66a0a8119 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/CityBossLevel.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/CityBossLevel.java @@ -279,7 +279,7 @@ public class CityBossLevel extends Level { for (int i : PathFinder.NEIGHBOURS8){ int cell = entrance() + i; if (passable[cell] - && Actor.findChar(cell) != null + && Actor.findChar(cell) == null && (!Char.hasProp(ch, Char.Property.LARGE) || openSpace[cell])){ candidates.add(cell); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/HallsBossLevel.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/HallsBossLevel.java index fcd6d6bdf..9c272d952 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/HallsBossLevel.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/HallsBossLevel.java @@ -205,7 +205,7 @@ public class HallsBossLevel extends Level { for (int i : PathFinder.NEIGHBOURS8){ int cell = entrance() + i; if (passable[cell] - && Actor.findChar(cell) != null + && Actor.findChar(cell) == null && (!Char.hasProp(ch, Char.Property.LARGE) || openSpace[cell])){ candidates.add(cell); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/LastLevel.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/LastLevel.java index 372b1445d..3b8c24be4 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/LastLevel.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/LastLevel.java @@ -171,7 +171,7 @@ public class LastLevel extends Level { for (int i : PathFinder.NEIGHBOURS8){ int cell = entrance() + i; if (passable[cell] - && Actor.findChar(cell) != null + && Actor.findChar(cell) == null && (!Char.hasProp(ch, Char.Property.LARGE) || openSpace[cell])){ candidates.add(cell); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/PrisonBossLevel.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/PrisonBossLevel.java index b336de635..bfe5e680e 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/PrisonBossLevel.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/PrisonBossLevel.java @@ -692,7 +692,7 @@ public class PrisonBossLevel extends Level { for (int i : PathFinder.NEIGHBOURS8){ int cell = ENTRANCE_POS + i; if (passable[cell] - && Actor.findChar(cell) != null + && Actor.findChar(cell) == null && (!Char.hasProp(ch, Char.Property.LARGE) || openSpace[cell])){ candidates.add(cell); }