diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java index 2eda0f44d..7d53ef94e 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java @@ -208,6 +208,7 @@ public abstract class Char extends Actor { return true; } else if (c instanceof Hero && alignment == Alignment.ALLY + && !hasProp(this, Property.IMMOVABLE) && Dungeon.level.distance(pos, c.pos) <= 2*Dungeon.hero.pointsInTalent(Talent.ALLY_WARP)){ return true; } else { @@ -235,6 +236,11 @@ public abstract class Char extends Actor { int oldPos = pos; int newPos = c.pos; + //can't swap or ally warp if either char is immovable + if (hasProp(this, Property.IMMOVABLE) || hasProp(c, Property.IMMOVABLE)){ + return true; + } + //warp instantly with allies in this case if (c == Dungeon.hero && Dungeon.hero.hasTalent(Talent.ALLY_WARP)){ PathFinder.buildDistanceMap(c.pos, BArray.or(Dungeon.level.passable, Dungeon.level.avoid, null));