MajorMUD Dodge Formula
Posted: Mon Jan 13, 2025 12:09 am
There are a few posts on here about this on here and bunch of speculation on charm, encumbrance, etc. This post was pretty close, but I believe I have deciphered the actual dodge formula:
From these snippets in the dll...
Note that dodge is checked only after the AC check and determined a hit. Therefore, sometimes the perceived dodge percentage fluctuates depending on the mob.
Code: Select all
nDodge = RoundDown(nCharLevel / 5)
nDodge = nDodge + RoundDown((nCharm - 50) / 5)
nDodge = nDodge + RoundDown((nAgility - 50) / 3)
nDodge = nDodge + nPlusDodge '[cumulative dodge from: abilities + auras + race + class + items]
If nCurrentEncum > 0 And nMaxEncum > 0 Then
nEncumPct = RoundDown((nCurrentEncum / nMaxEncum) * 100)
End If
If nEncumPct < 33 Then
nDodge = nDodge + 10 - RoundDown(nEncumPct / 10)
End If
Code: Select all
function _move_player_to_fighter
arg2[8] = _get_user_ability_value(0x22, 0xffffffff, USER_RECORD, 0, nullptr);
arg2[8] += ((USER_RECORD + 0xac) - 50) / 5 + (USER_RECORD + 0x94) / 5 + ((USER_RECORD + 0xaa) - 50) / 3;
[... later in code]
if ((USER_RECORD + 0x708) < 33 && (USER_RECORD + 0xb0) > 0) {
arg2[8] += 10 - (USER_RECORD + 0x708) / 10;
}