v3.3.5: necros now move their summon pos if on top of an immovable enemy
This commit is contained in:
@@ -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
|
//push enemy, or wait a turn if there is no valid pushing position
|
||||||
if (pushPos != pos) {
|
if (pushPos != pos) {
|
||||||
Char ch = Actor.findChar(summoningPos);
|
|
||||||
Actor.add( new Pushing( ch, ch.pos, pushPos ) );
|
|
||||||
|
|
||||||
ch.pos = pushPos;
|
//no push if char is immovable, move our skeleton instead
|
||||||
Dungeon.level.occupyCell(ch );
|
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 {
|
} else {
|
||||||
|
|
||||||
|
//attempt to damage the blocker in addition to waiting
|
||||||
Char blocker = Actor.findChar(summoningPos);
|
Char blocker = Actor.findChar(summoningPos);
|
||||||
if (blocker.alignment != alignment){
|
if (blocker.alignment != alignment){
|
||||||
blocker.damage( Random.NormalIntRange(2, 10), new SummoningBlockDamage() );
|
blocker.damage( Random.NormalIntRange(2, 10), new SummoningBlockDamage() );
|
||||||
|
|||||||
Reference in New Issue
Block a user