diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Necromancer.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Necromancer.java index f0f562ffb..5421ee7d2 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Necromancer.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Necromancer.java @@ -194,14 +194,6 @@ public class Necromancer extends Mob { public void summonMinion(){ if (Actor.findChar(summoningPos) != null) { - //cancel if character cannot be moved - if (Char.hasProp(Actor.findChar(summoningPos), Property.IMMOVABLE)){ - summoning = false; - ((NecromancerSprite)sprite).finishSummoning(); - spend(TICK); - return; - } - int pushPos = pos; for (int c : PathFinder.NEIGHBOURS8) { if (Actor.findChar(summoningPos + c) == null @@ -212,6 +204,11 @@ public class Necromancer extends Mob { } } + //no push if char is immovable + if (Char.hasProp(Actor.findChar(summoningPos), Property.IMMOVABLE)){ + pushPos = pos; + } + //push enemy, or wait a turn if there is no valid pushing position if (pushPos != pos) { Char ch = Actor.findChar(summoningPos); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/SpectralNecromancer.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/SpectralNecromancer.java index 1aabce4f2..21ab3b487 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/SpectralNecromancer.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/SpectralNecromancer.java @@ -104,14 +104,6 @@ public class SpectralNecromancer extends Necromancer { public void summonMinion() { if (Actor.findChar(summoningPos) != null) { - //cancel if character cannot be moved - if (Char.hasProp(Actor.findChar(summoningPos), Property.IMMOVABLE)){ - summoning = false; - ((SpectralNecromancerSprite)sprite).finishSummoning(); - spend(TICK); - return; - } - int pushPos = pos; for (int c : PathFinder.NEIGHBOURS8) { if (Actor.findChar(summoningPos + c) == null @@ -122,6 +114,11 @@ public class SpectralNecromancer extends Necromancer { } } + //no push if char is immovable + if (Char.hasProp(Actor.findChar(summoningPos), Property.IMMOVABLE)){ + pushPos = pos; + } + //push enemy, or wait a turn if there is no valid pushing position if (pushPos != pos) { Char ch = Actor.findChar(summoningPos);