From 401411d16f5be7b87a9de37f75b1be8b6211ebc7 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Fri, 29 Jul 2022 15:33:29 -0400 Subject: [PATCH] v1.4.0: fixed warp beacon and swarms not respecting eternal fire --- .../actors/hero/abilities/mage/WarpBeacon.java | 1 + .../shatteredpixeldungeon/actors/mobs/Swarm.java | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/mage/WarpBeacon.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/mage/WarpBeacon.java index f81556694..e0241f760 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/mage/WarpBeacon.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/abilities/mage/WarpBeacon.java @@ -196,6 +196,7 @@ public class WarpBeacon extends ArmorAbility { PathFinder.buildDistanceMap(target, BArray.or(Dungeon.level.passable, Dungeon.level.avoid, null)); if (Dungeon.level.pit[target] || (Dungeon.level.solid[target] && !Dungeon.level.passable[target]) || + !(Dungeon.level.passable[target] || Dungeon.level.avoid[target]) || PathFinder.distance[hero.pos] == Integer.MAX_VALUE){ GLog.w( Messages.get(WarpBeacon.class, "invalid_beacon") ); return; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Swarm.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Swarm.java index 5fe460157..48cb00008 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Swarm.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Swarm.java @@ -88,7 +88,9 @@ public class Swarm extends Mob { int[] neighbours = {pos + 1, pos - 1, pos + Dungeon.level.width(), pos - Dungeon.level.width()}; for (int n : neighbours) { - if (!Dungeon.level.solid[n] && Actor.findChar( n ) == null + if (!Dungeon.level.solid[n] + && Actor.findChar( n ) == null + && (Dungeon.level.passable[target] || Dungeon.level.avoid[target]) && (!properties().contains(Property.LARGE) || Dungeon.level.openSpace[n])) { candidates.add( n ); }