Eos wrote: ↑March 5th, 2022, 12:56 am
[*] Hit Life Leech and Hit Mana Leech now leech on every successful hit, but the leeched value is randomized according to a formula based on the mod intensity.
[/list]
Obviously I need to do more testing and as I write this I see that I need to do it in non med armour
Anyway I have 0 MR items and LMC along with no focus and no meditation skill and I am an elf. So I regen 1 mana every 8-9 seconds right?
I do not think I am leeching mana on every successful hit
The weapon has 34% mana leech
No SSI
My skills are weapon and chivalry
Here is a starting point
I hit for 10 but I don't leech any mana
I hit for 10 and I also get hit I leech 1 mana.
I hit and I get hit though no mana leech
I hit and this time I gain 2 mana. I think 1 was leeched for the hit and the other was mana regen as 8+ seconds elapsed
As I stated I need to do more testing and will when I have more time
if ( context.Type == typeof( WraithFormSpell ) )
{
int wraithLeech = ( 5 + (int)( ( 15 * from.Skills.SpiritSpeak.Value ) / 100 ) ); // Wraith form gives 5-20% mana leech
int manaLeech = AOS.Scale( damageGiven, wraithLeech );
if ( target.Mana < manaLeech )
{
target.Mana -= target.Mana;
from.Mana += target.Mana;
}
else if ( manaLeech != 0 )
{
from.Mana += manaLeech;
from.PlaySound( 0x44D );
target.Mana -= manaLeech;
}
}
==============================================================================================================
{
wraithLeech = (5 + (int)((15 * attacker.Skills.SpiritSpeak.Value) / 100)); // Wraith form gives an additional 5-20% mana leech
// Mana leeched by the Wraith Form spell is actually stolen, not just leeched.
if (defender.Mana < AOS.Scale(damageGiven, wraithLeech))
{
defender.Mana -= defender.Mana;
attacker.Mana += defender.Mana;
}
else
{
defender.Mana -= AOS.Scale(damageGiven, wraithLeech);
manaLeech += wraithLeech;
}
}