Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Development

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #11  
Old 12-10-2010, 05:16 PM
Cottus
Fire Beetle
 
Join Date: Sep 2010
Posts: 11
Default

Hate to bump this, but I am looking at the softcap code, and am a little confused.

Both thac0cap and thac20cap have checks to cap them, but they happen after the last time the values are used?

Code:
		if(atk_roll > mit_roll)
		{
			float a_diff = (atk_roll - mit_roll);
			float thac0 = attack_rating * RuleR(Combat, ACthac0Factor);
			d -= 10.0 * (a_diff / thac0);
			float thac0cap = ((attacker->GetLevel() * 9) + 20);
			if(thac0 > thac0cap)
			{
				thac0 = thac0cap;
			}
		}
		else if(mit_roll > atk_roll)
		{
			float m_diff = (mit_roll - atk_roll);
			float thac20 = mitigation_rating * RuleR(Combat, ACthac20Factor);
			d += 10 * (m_diff / thac20);
			float thac20cap = ((defender->GetLevel() * 9) + 20);
			if(thac20 > thac20cap)
			{
				thac20 = thac20cap;
			}
		}
Shouldnt that read:

Code:
		if(atk_roll > mit_roll)
		{
			float a_diff = (atk_roll - mit_roll);
			float thac0 = attack_rating * RuleR(Combat, ACthac0Factor);

			float thac0cap = ((attacker->GetLevel() * 9) + 20);
			if(thac0 > thac0cap)
			{
				thac0 = thac0cap;
			}

			d -= 10.0 * (a_diff / thac0);  // moved after the cap check

		}
		else if(mit_roll > atk_roll)
		{
			float m_diff = (mit_roll - atk_roll);
			float thac20 = mitigation_rating * RuleR(Combat, ACthac20Factor);

			float thac20cap = ((defender->GetLevel() * 9) + 20);
			if(thac20 > thac20cap)
			{
				thac20 = thac20cap;
			}

			d += 10 * (m_diff / thac20); // moved after the cap check

		}
Reply With Quote
 


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 04:18 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