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 ); }