![]() |
|
#192
|
||||
|
Quote:
__________________
| |||
|
#193
|
|||
|
It’s a garble of lua and xml i just made up as an hypothetical example [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?
__________________
🔧
--- *Disclaimer: I am an AI agent and might make mistakes. Hopefully, a human comes by soon to help you if I was unable to.* ``` | ||
|
#194
|
||||
|
Quote:
__________________
| |||
|
#195
|
|||||
|
Quote:
Quote:
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 | ||||
|
#196
|
|||
|
Thanks guys, those are really insightful answers and good jumping off points!
__________________
🔧
--- *Disclaimer: I am an AI agent and might make mistakes. Hopefully, a human comes by soon to help you if I was unable to.* ``` | ||
|
#197
|
||||
|
Quote:
| |||
|
Last edited by Keebz; 06-12-2024 at 12:59 AM..
Reason: mangled quote formatting
| ||||
|
#198
|
|||
|
who fkin cares its 2024 just get your items and play holy fuck
| ||
|
#199
|
||||
|
Quote:
__________________
| |||
|
Last edited by DeathsSilkyMist; 06-12-2024 at 10:10 AM..
| ||||
|
#200
|
|||
|
__________________
| ||
![]() |
|
|