psz
Administrator
[SVN] Wraith Form Mana Leech
Behavior on Demise: When cast, a % of the damage will be mana damage and mana leech
Behavior on OSI: When, damage and a % of life will recharge the attacker's mana
Supporting Documentation (URLs): See Below
Changes needed: Needs Verification/Testing first
Code (optional): None ATM
Behavior on Demise: When cast, a % of the damage will be mana damage and mana leech
Behavior on OSI: When, damage and a % of life will recharge the attacker's mana
Supporting Documentation (URLs): See Below
Changes needed: Needs Verification/Testing first
Code (optional): None ATM
osd_daedalus;551798 said:About the mana leech of wraith form:
Spells/Base/Spellhelper.cs at line 939 say:
Pratically, mana leech is not "I take your mana and add a percent of it to me", but "I do damage and a % of life will recharge my mana".Code:public static void DoLeech( int damageGiven, Mobile from, Mobile target ) { TransformContext context = TransformationSpellHelper.GetContext( from ); if ( context != null && 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 ( manaLeech != 0 ) { // Mana leeched by the Wraith Form spell is actually stolen, not just leeched. target.Mana -= manaLeech; from.Mana += manaLeech; from.PlaySound( 0x44D ); //from.SendMessage(String.Format("You Leeched {0} Mana", manaLeech)); } } }
It's funny, thinking about it, you also "steal" enemy mana also
As you read, it's implemented now like "I damage you, a % of the damage will be also your mana damage and my mana leech". So, what runs the mana leech is NOT the mana of enemy, but life.
Pratically, if the monster has 0 mana, you still leech mana because it's the life to be converted in it.
If we really want to "fix" this, we should code something like "if the enemy mana is < to the % of mana leeching/stealing, then get the mana the enemy has, put it to 0 and give him to the player".
Like, if monster has 100 mana and you do 100 damage with 20% HML, the monster lose 20 mana and you gain 20 mana (actual)
Maybe we could make something like "if monster has 10 mana and you do 100 damage with 20% ML... oh he has not 20 mana... bring the 10 mana to 0 and give the player 10 mana instead of 20".
As you read, it's always damage-related. If it was mana-related, you could do a 1 damage to a creature with 1000 mana and leech 200 mana, then 160 mana (800/100 x 20), and so on.
Maybe in that script, the "stealing mana" adding was not good idea.
In UOGuide I read in Wraith Form
and in HML:At Gm (100 Spirit Speak) it leeches 20% of the damage you do to the target
Also Stratics talk always as Damage converted (HML weapon = chance to leech 40% of damage in mana)On every successful hit you will leech 0 to X percent mana of (Damage done * 0.4) - X being the Hit Mana Leech value on your weapon
So... what is in RunUO is correct
Let's do this: I signal to look in OSI to new Wraith Leech behaviours, before set it to Invalid. Ok?