UO Gamers:  Demise


 
 
Thread Tools Display Modes
  (#1) Old
psz Offline
UO Gamers: Demise Administrator
 
Posts: 13,508
Join Date: Oct 2002
Location: Swamp
Default [SVN] Wraith Form Mana Leech - 07-18-2009

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


Quote:
Originally Posted by osd_daedalus View Post
About the mana leech of wraith form:

Spells/Base/Spellhelper.cs at line 939 say:

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));
                }
            }
        }
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".

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
Quote:
At Gm (100 Spirit Speak) it leeches 20% of the damage you do to the target
and in HML:
Quote:
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
Also Stratics talk always as Damage converted (HML weapon = chance to leech 40% of damage in mana)

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?


psz
Creator of UOGamers: Demise(Retired)
The RunUO.com Forum Moderator Team
Quality Control Czar
   
  (#2) Old
osd_daedalus Offline
Forum Expert
 
Posts: 4,697
Join Date: Aug 2008
Location: Italia, near Britannia
Default Re: [VALIDATION NEEDED] Wraith Form Mana Leech - 08-13-2009

You should test in OSI if a hit suffered by someone with Hit Mana Leech / Wraith Form damages mana.

If yes, it's OK and this bugreport is invalid
If not, the fix is easy.

I don't get if it was coded to "steal" mana for theory or because it was tested in OSI time ago. I don't know if a fix would be expansion-dependant.


--
   
  (#3) Old
osd_daedalus Offline
Forum Expert
 
Posts: 4,697
Join Date: Aug 2008
Location: Italia, near Britannia
Default Re: [VALIDATION NEEDED] Wraith Form Mana Leech - 01-28-2010

Finally, after so much months, I tested it in OSI with a soul seeker (HML/HSL/HHL), in wraith form and both against a guy I have found there (and pwned me with a rising colossus that also purged my wraith form... ah, SA...)

I attacked him multiple times but he never lost mana. Stamina is lost but I believe it's for the melee damage rather the HSL effect. Then I went in wraith form (GM necro and SS) and tried both melee and painspike and various magery spells on him, like fireball, lightning...

In no one case he lost mana.

This let me think the HML just converts some damage in mana, but won't cause a true leech, with an associated mana damage to the target.

In this case, the part "target.Mana -= manaLeech;" is not valid.


--
   
  (#4) Old
osd_daedalus Offline
Forum Expert
 
Posts: 4,697
Join Date: Aug 2008
Location: Italia, near Britannia
Default Re: [VALIDATION NEEDED] Wraith Form Mana Leech - 01-28-2010

and this is the fix.
The whole thing is so stupid IMHO I wanted just to comment the entire thing out, instead of delete it.
Attached Files
File Type: patch leechfix.patch (738 Bytes, 10 views)


--
   
  (#5) Old
Gisela Offline
Bug Hunter
 
Posts: 1,712
Join Date: Jan 2009
Default Re: [VALIDATION NEEDED] Wraith Form Mana Leech - 01-28-2010

Why would you comment it out? That's why why have version control
   
  (#6) Old
osd_daedalus Offline
Forum Expert
 
Posts: 4,697
Join Date: Aug 2008
Location: Italia, near Britannia
Default Re: [VALIDATION NEEDED] Wraith Form Mana Leech - 01-28-2010

Quote:
Originally Posted by Gisela View Post
Why would you comment it out? That's why why have version control
it seemed so illogical a leech shouldn't work as a true "leech", I have thought many shard admins would prefer to keep the original way. Since many of them don't know either what is a version control (this thread makes me think it's really so), maybe a "uncomment here!" flag would help them...


--
   
  (#7) Old
Esqarrouth Online
Forum Expert
 
Posts: 2,519
Join Date: Dec 2005
Location: Ankara
Default Re: [VALIDATION NEEDED] Wraith Form Mana Leech - 01-28-2010

its been like this since aos, but yes illogical.

i remember the good old days when i thought having a 57 dmg ai hitting %50 mana leech hammer pick would own all the mages


There is no "good" or "evil", Only the truly powerful will survive!
   
  (#8) Old
Gisela Offline
Bug Hunter
 
Posts: 1,712
Join Date: Jan 2009
Default Re: [VALIDATION NEEDED] Wraith Form Mana Leech - 01-28-2010

Quote:
Originally Posted by osd_daedalus View Post
it seemed so illogical a leech shouldn't work as a true "leech", I have thought many shard admins would prefer to keep the original way. Since many of them don't know either what is a version control (this thread makes me think it's really so), maybe a "uncomment here!" flag would help them...
Hm, maybe it's time to start collecting options in a single config file. That way they can enable/disable stuff like that more easily.

e: by the way have I mentioned how awesome it is that you have commit access? You actually add log messages!

Last edited by Gisela; 01-28-2010 at 02:54 PM.
   
  (#9) Old
giamba80 Offline
Forum Novice
 
Posts: 110
Join Date: Jan 2009
Default Re: [TESTING-TC] Wraith Form Mana Leech - 02-12-2010

Hello!

Me and daedalus test that at demise TC and seems that attacking with an hit mana leech weapon the target don't gain in mana
--------------------------------------------------------------------------------
Legolas B@D Blue Apple Digits Proud and Glory (sometimes)
   
  (#10) Old
osd_daedalus Offline
Forum Expert
 
Posts: 4,697
Join Date: Aug 2008
Location: Italia, near Britannia
Default Re: [TESTING-TC] Wraith Form Mana Leech - 02-12-2010

Quote:
Originally Posted by giamba80 View Post
Hello!

Me and daedalus test that at demise TC and seems that attacking with an hit mana leech weapon the target don't gain in mana
--------------------------------------------------------------------------------
don't lose in mana you wanted to say :P


--
   
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com