diff --git a/src/main/java/com/minelittlepony/unicopia/ability/magic/spell/effect/MindSwapSpell.java b/src/main/java/com/minelittlepony/unicopia/ability/magic/spell/effect/MindSwapSpell.java index 8f1441d6..073db3b9 100644 --- a/src/main/java/com/minelittlepony/unicopia/ability/magic/spell/effect/MindSwapSpell.java +++ b/src/main/java/com/minelittlepony/unicopia/ability/magic/spell/effect/MindSwapSpell.java @@ -48,6 +48,7 @@ public class MindSwapSpell extends MimicSpell { other.playSound(USounds.SPELL_MINDSWAP_UNSWAP, 1); caster.playSound(USounds.SPELL_MINDSWAP_UNSWAP, 1); }); + counterpart.set(null); } } @@ -81,6 +82,15 @@ public class MindSwapSpell extends MimicSpell { setDead(); return false; } + + if (!caster.getEntity().isAlive()) { + counterpart.ifPresent(caster.getReferenceWorld(), e -> { + e.damage(DamageSource.MAGIC, Float.MAX_VALUE); + }); + onDestroyed(caster); + setDead(); + return false; + } } return super.tick(caster, situation);