v1.4.2: fixed missing logic for necro summoning
This commit is contained in:
+5
@@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
package com.shatteredpixel.shatteredpixeldungeon.actors.mobs;
|
package com.shatteredpixel.shatteredpixeldungeon.actors.mobs;
|
||||||
|
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.Badges;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||||
@@ -211,6 +212,10 @@ public class Necromancer extends Mob {
|
|||||||
Char blocker = Actor.findChar(summoningPos);
|
Char blocker = Actor.findChar(summoningPos);
|
||||||
if (blocker.alignment != alignment){
|
if (blocker.alignment != alignment){
|
||||||
blocker.damage( Random.NormalIntRange(2, 10), this );
|
blocker.damage( Random.NormalIntRange(2, 10), this );
|
||||||
|
if (blocker == Dungeon.hero && !blocker.isAlive()){
|
||||||
|
Badges.validateDeathFromEnemyMagic();
|
||||||
|
Dungeon.fail(getClass());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
spend(TICK);
|
spend(TICK);
|
||||||
|
|||||||
+14
@@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
package com.shatteredpixel.shatteredpixeldungeon.actors.mobs;
|
package com.shatteredpixel.shatteredpixeldungeon.actors.mobs;
|
||||||
|
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.Badges;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||||
@@ -106,6 +107,15 @@ public class SpectralNecromancer extends Necromancer {
|
|||||||
@Override
|
@Override
|
||||||
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
|
||||||
@@ -129,6 +139,10 @@ public class SpectralNecromancer extends Necromancer {
|
|||||||
Char blocker = Actor.findChar(summoningPos);
|
Char blocker = Actor.findChar(summoningPos);
|
||||||
if (blocker.alignment != alignment){
|
if (blocker.alignment != alignment){
|
||||||
blocker.damage( Random.NormalIntRange(2, 10), this );
|
blocker.damage( Random.NormalIntRange(2, 10), this );
|
||||||
|
if (blocker == Dungeon.hero && !blocker.isAlive()){
|
||||||
|
Badges.validateDeathFromEnemyMagic();
|
||||||
|
Dungeon.fail(getClass());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
spend(TICK);
|
spend(TICK);
|
||||||
|
|||||||
Reference in New Issue
Block a user