fix: Blood Oath, Wraith form, & Strangle (#1153)

Fixes blood oath mechanic, and wraith form not properly leeching.
This commit is contained in:
mark1145 2022-09-02 02:19:40 +10:00 • committed by GitHub
parent c5d2a58917
commit 1e50ff9966
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 52 additions and 78 deletions

View file

@ -1924,24 +1924,6 @@ namespace Server.Items
lifeLeech += 50; // Additional 50% life leech for cursed weapons (necro spell)
}
context = TransformationSpellHelper.GetContext(attacker);
if (context?.Type == typeof(VampiricEmbraceSpell))
{
lifeLeech += 20; // Vampiric embrace gives an additional 20% life leech
}
if (context?.Type == typeof(WraithFormSpell))
{
// Wraith form gives an additional 5-20% mana leech
var wraithLeech = 5 + (int)(15 * attacker.Skills.SpiritSpeak.Value / 100);
// Mana leeched by the Wraith Form spell is actually stolen, not just leeched.
defender.Mana -= AOS.Scale(damageGiven, wraithLeech);
manaLeech += wraithLeech;
}
if (lifeLeech != 0)
{
attacker.Hits += AOS.Scale(damageGiven, lifeLeech);