Project 1999

Go Back   Project 1999 > Class Discussions > Melee

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #14  
Old 06-11-2024, 05:53 PM
bcbrown bcbrown is offline
Fire Giant


Join Date: Jul 2022
Location: Kedge Keep
Posts: 737
Default

Quote:
Originally Posted by Naethyn [You must be logged in to view images. Log in or Register.]
Attack absolutely does not increase your max damage. Attack increases your average damage in a similar way that mob AC reduces your average damage.
I'm very curious what you believe impacts your max damage. Weapon, strength, level, anything else? Does offensive skill matter?


Quote:
Originally Posted by Jimjam [You must be logged in to view images. Log in or Register.]
Are you suggesting the first few di with a low dmg weapon like dagger* would hit for zero damage?
I would love for someone to fully explain the Damage Interval mechanic, because how I've heard it described does not match either my understanding of the emulator code, nor the logs I've looked at.

That said, here's the emulator code that I think is applying the DI mechanic:

There's a method, RollD20(int offense, int mitigation), that returns a number between 0.1 and 2.0. I think this is where attack and defense values are compared to determine if hits will skew higher or lower.

This number [roll] is used inside MeleeMitigation to adjust the damage done:

hit.damage_done = std::max(static_cast<int>(roll * static_cast<double>(hit.base_damage) + 0.5), 1);

So it takes the "base_damage", multiplies it by a number between 0.1 and 2.0, adds 0.5, converts to int (which rounds down iirc, so 3.9 becomes 3), then if it's below 1, sets it to 1.

So, to start, none of the DI intervals will have zero damage, there's always a minimum of 1. Secondly, if the damage of a weapon is low enough, more of the damage intervals will end up at the minimum value of 1.

E.g., if "base_damage" is 10, the 20 intervals will be 1, 2, 3, ..., 19, 20. If the "base_damage" is 3, 0.4 * 3 + 0.5 is 1.7, truncated to 1, so the intervals will be 1, 1, 1, 1, 2, 2, .., 6.

So low-damage weapons end up with multiple intervals clamped at the minimum value.

References:
https://github.com/EQEmu/Server/blob...tack.cpp#L1050

https://github.com/EQEmu/Server/blob...ttack.cpp#L999
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 08:38 PM.


Everquest is a registered trademark of Daybreak Game Company LLC.
Project 1999 is not associated or affiliated in any way with Daybreak Game Company LLC.
Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.