jalu14 / oath-rocalc

Copy and adaptation of rocalc.com to Oath
MIT License
0 stars 4 forks source link

Critical rate calculation is mistaken #3

Open n-txy opened 1 year ago

n-txy commented 1 year ago

rocalc and subsequently this project currently uses the following formula for critical rate calculation https://github.com/jalu14/oath-rocalc/blob/ba498e2fe8da9740a8f48c1879c0e4fc7acee44b/src/foot.js#L957 While the intended formula is ~0.33% crit chance per LUK, and decimals are discarded. This causes the rocalc to miss ~1% critical chance every 30 LUK. image (30.7 CRIT at 99 LUK as opposed to 34 CRIT)

Formula verified via rAthena and HerculesWS's status.c/cpp respectively. https://github.com/rathena/rathena/blob/3024d08a392ff65bf749b208681d85f0eb090368/src/map/status.cpp#L2545 https://github.com/HerculesWS/Hercules/blob/f663f63cd546538505fae1aa83b893fa7bbd1d39/src/map/status.c#L3822

jalu14 commented 9 months ago

I need to double check this fix in-game once I can play again