v3.3.5: necros now move their summon pos if on top of an immovable enemy

This commit is contained in:
Evan Debenham
2026-02-02 17:00:39 -05:00
parent ac8d542fe5
commit c26a177332

View File

@@ -204,21 +204,23 @@ 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);
Actor.add( new Pushing( ch, ch.pos, pushPos ) );
ch.pos = pushPos;
Dungeon.level.occupyCell(ch );
//no push if char is immovable, move our skeleton instead
if (Char.hasProp(Actor.findChar(summoningPos), Property.IMMOVABLE)){
summoningPos = pushPos;
} else {
Char ch = Actor.findChar(summoningPos);
Actor.add(new Pushing(ch, ch.pos, pushPos));
ch.pos = pushPos;
Dungeon.level.occupyCell(ch);
}
} else {
//attempt to damage the blocker in addition to waiting
Char blocker = Actor.findChar(summoningPos);
if (blocker.alignment != alignment){
blocker.damage( Random.NormalIntRange(2, 10), new SummoningBlockDamage() );