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
  #12  
Old 04-17-2010, 08:30 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Ok, this should be the final formula we needed, which is for calculating HP per Stamina point.

Code:
float Client::HPPerStamina(int8 level, int8 class) {

	float hpunder40;
	float hpover40;
	float hpover80;

	// Note: hpunder40 is equal to hpover80 / 120, and hpover40 is just hpunder40 * 2
	
	switch(class){
		case DRUID:
		case ENCHANTER:
		case NECROMANCER:
		case MAGICIAN:
		case WIZARD:
			hpunder40 = 0.06666666;
			hpover40 = 0.13333333;
			hpover80 = 8;
			break;
		case BEASTLORD:
		case BERSERKER:
		case MONK:
		case ROGUE:
		case SHAMAN:
			hpunder40 = 0.07083333;
			hpover40 = 0.14166666;
			hpover80 = 8.5;
			break;
		case BARD:
		case CLERIC:
			hpunder40 = 0.07333333;
			hpover40 = 0.14666666;
			hpover80 = 8.8;
			break;
		case SHADOWKNIGHT:
		case PALADIN:
			hpunder40 = 0.08;
			hpover40 = 0.16;
			hpover80 = 9.6;
			break;
		case RANGER:
			hpunder40 = 0.07666666;
			hpover40 = 0.15333333;
			hpover80 = 9.2;
			break;
		case WARRIOR:
			hpunder40 = 0.08333333;
			hpover40 = 0.16666666;
			hpover80 = 10;
			break;
		default:
			hpunder40 = 0.06666666;
			hpover40 = 0.13333333;
			hpover80 = 8;
			break;
	}

	float hp_per_sta = 0.0;
	
	// Do calculations for HP Per Stamina point
	if (level < 40) { 
		hp_per_sta = level * hpunder40;
	}
	else if (level < 80) {
		hp_per_sta = ((40 * hpunder40) + ((level - 40) * hpover40));
	}
	else {
		hp_per_sta = hpover80;	// ((40 * hpunder40) + (40 * hpover40))
	}

	return hp_per_sta;
}
Now, I just need to look through the source and figure out where to add these in and how best to format them and junk, so they work like the current ones for Titanium.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
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 10:00 AM.


 

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