From fc99ba31e37531fb309e4673312b4d1c51292281 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Tue, 25 Aug 2020 14:13:39 -0400 Subject: [PATCH] v0.8.2c: fixed visual errors caused by terror, and made eyes not immune --- .../shatteredpixeldungeon/actors/mobs/Eye.java | 4 ++-- .../actors/mobs/Necromancer.java | 16 ++++++++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Eye.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Eye.java index 0d8d3ff81..e2cc1a613 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Eye.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Eye.java @@ -25,7 +25,6 @@ import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.actors.Actor; import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Light; -import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Terror; import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter; import com.shatteredpixel.shatteredpixeldungeon.effects.particles.PurpleParticle; import com.shatteredpixel.shatteredpixeldungeon.items.Dewdrop; @@ -104,6 +103,7 @@ public class Eye extends Mob { protected boolean act() { if (beamCharged && state != HUNTING){ beamCharged = false; + sprite.idle(); } if (beam == null && beamTarget != -1) { beam = new Ballistica(pos, beamTarget, Ballistica.STOP_TERRAIN); @@ -243,7 +243,7 @@ public class Eye extends Mob { } { - immunities.add( Terror.class ); + //immunities.add( Terror.class ); } private class Hunting extends Mob.Hunting{ diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Necromancer.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Necromancer.java index a3ed4aa8b..db4b90fd5 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Necromancer.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Necromancer.java @@ -71,7 +71,16 @@ public class Necromancer extends Mob { private NecroSkeleton mySkeleton; private int storedSkeletonID = -1; - + + @Override + protected boolean act() { + if (summoning && state != HUNTING){ + summoning = false; + updateSpriteState(); + } + return super.act(); + } + @Override public void updateSpriteState() { super.updateSpriteState(); @@ -80,6 +89,9 @@ public class Necromancer extends Mob { summoningEmitter = CellEmitter.get( summoningPos ); summoningEmitter.pour(Speck.factory(Speck.RATTLE), 0.2f); sprite.zap( summoningPos ); + } else if (!summoning && summoningEmitter != null){ + summoningEmitter.on = false; + summoningEmitter = null; } } @@ -115,7 +127,7 @@ public class Necromancer extends Mob { } if (summoningEmitter != null){ - summoningEmitter.killAndErase(); + summoningEmitter.on = false; summoningEmitter = null; }