mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-23 21:38:00 +01:00
Fixed mind swap not properly being reverted when the caster dies
This commit is contained in:
parent
a8e1c66e0f
commit
8e12c683b8
1 changed files with 10 additions and 0 deletions
|
@ -48,6 +48,7 @@ public class MindSwapSpell extends MimicSpell {
|
||||||
other.playSound(USounds.SPELL_MINDSWAP_UNSWAP, 1);
|
other.playSound(USounds.SPELL_MINDSWAP_UNSWAP, 1);
|
||||||
caster.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();
|
setDead();
|
||||||
return false;
|
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);
|
return super.tick(caster, situation);
|
||||||
|
|
Loading…
Reference in a new issue