fix: Fixes PainSpike, ManaVampire, Evil Omen, and Curse (#1622)
Co-authored-by: Kamron Batman <3953314+kamronbatman@users.noreply.github.com>
This commit is contained in:
parent
fec78040bc
commit
4ebdc75bdf
9 changed files with 119 additions and 73 deletions
|
|
@ -45,26 +45,20 @@ namespace Server.Spells.Seventh
|
|||
toDrain /= 2;
|
||||
}
|
||||
}
|
||||
else if (CheckResisted(m))
|
||||
{
|
||||
m.SendLocalizedMessage(501783); // You feel yourself resisting magical energy.
|
||||
}
|
||||
else
|
||||
{
|
||||
if (CheckResisted(m))
|
||||
{
|
||||
m.SendLocalizedMessage(501783); // You feel yourself resisting magical energy.
|
||||
}
|
||||
else
|
||||
{
|
||||
toDrain = m.Mana;
|
||||
}
|
||||
toDrain = m.Mana;
|
||||
}
|
||||
|
||||
// Will not drain more than the target has currently and will not put the caster over his maximum mana
|
||||
toDrain = Math.Clamp(toDrain, 0, Math.Min(m.Mana, Caster.ManaMax - Caster.Mana));
|
||||
// Will not drain more than the target has currently
|
||||
toDrain = Math.Min(m.Mana, toDrain);
|
||||
m.Mana -= toDrain;
|
||||
|
||||
if (toDrain > 0)
|
||||
{
|
||||
m.Mana -= toDrain;
|
||||
Caster.Mana += toDrain;
|
||||
}
|
||||
Caster.Mana += toDrain;
|
||||
|
||||
if (Core.AOS)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue