v1.4.0: fixed necromancers potentially moving immovable chars

This commit is contained in:
Evan Debenham
2022-08-20 23:50:49 -04:00
parent e8aff9652f
commit 46f33637a0

View File

@@ -178,6 +178,15 @@ 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