From 123bb441217349ff57c3924ee2ebce2e7a108c61 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Fri, 7 Mar 2025 13:52:23 -0500 Subject: [PATCH] v3.0.1: necros now damage immovable chars that are on their summon pos --- .../actors/mobs/Necromancer.java | 13 +++++-------- .../actors/mobs/SpectralNecromancer.java | 13 +++++-------- 2 files changed, 10 insertions(+), 16 deletions(-) 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);