v1.4.0: fixed necromancers potentially moving immovable chars
This commit is contained in:
+9
@@ -178,6 +178,15 @@ public class Necromancer extends Mob {
|
|||||||
|
|
||||||
public void summonMinion(){
|
public void summonMinion(){
|
||||||
if (Actor.findChar(summoningPos) != null) {
|
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;
|
int pushPos = pos;
|
||||||
for (int c : PathFinder.NEIGHBOURS8) {
|
for (int c : PathFinder.NEIGHBOURS8) {
|
||||||
if (Actor.findChar(summoningPos + c) == null
|
if (Actor.findChar(summoningPos + c) == null
|
||||||
|
|||||||
Reference in New Issue
Block a user