Go Back   EQEmulator Home > EQEmulator Forums > Support > Spell Support

Spell Support Broken Spells? Want them Fixed? Request it here.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 10-14-2008, 08:04 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Before I go through and do this, I want to see if people agree that I am correct in assuming the following:

itembonuses.ProcChance = The total of +Combat Effects from all equiped items
(So, 3 items each with 5 Combat effect on them would total 15, so that means this is getting 15 as the total, or is there some other math going on somewhere?)

spellbonuses.ProcChance = Supposed to be a percentage increase to base ProcChance that is added to the total.
(So, 100% spellbonus would effectively double your base ProcChance, which means a 10% proc chance is now 20% +other bonuses)

Base ProcChance = .05 + (Dex / 9000)
(So, 380 dex (cap at level 75 with all AAs) would be 0.092 base ProcChance)

AABonus = Number of points * 5
(So, 1 point is 5, 2 is 10, 3 is 15, 4 is 20 and 5 is 25 - Defined in the AA for WeaponAffinity)

If that is all correct, then the way I think it should work is to do"(itembonuses.ProcChance + (spellbonuses.ProcChance / 10) + AABonus) / 100" to equal the total percentage increase.

So, if we have 25 from the AA (+25%), 35 from Combat Effects on items (+35%), and maybe 50 from spellbonuses (50%), our total is 110%. So, we would increase the base ProcChance by another 110%. To do that, we should only need to do ProcChance * ProcBonus and then add that to ProcChance.

The weird part is that sounds correct to me, but that is what I submitted here and it definitely wasn't right:

Code:
	ProcBonus += float(itembonuses.ProcChance + (spellbonuses.ProcChance / 10) + AABonus) / 100.0f;
	
	ProcChance = 0.05f + float(mydex) / 9000.0f;
	ProcBonus += (ProcChance * ProcBonus);
	ProcChance += ProcBonus;
	mlog(COMBAT__PROCS, "Proc chance %.2f (%.2f from bonuses)", ProcChance, ProcBonus);
	return ProcChance;
Using the examples I gave above, 380 Dex with 5 points in Weapon Affinity AA, 35 Combat effects from Items and a buff that adds 50% to Proc Chance, our base will be 0.092 and with the 110% (really more like 210%) increase, it would be 0.193. That is like going from procing 1 out of 10 swings (10% of the time) to 1 out of 5 swings (20% of the time).

I think that sounds close to right even though the base ProcChance calculation may be higher than it should be to work properly with this.

Now, I just need to go through the rest of the proc code for augs and items :P
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
 

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

   

All times are GMT -4. The time now is 10:51 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3