Estat wrote: ↑Mon 15 Jul 2019 6:21 AM
Kohi wrote: ↑Mon 15 Jul 2019 2:57 AM
ExcretusMaximus wrote: ↑Mon 15 Jul 2019 2:29 AM
Roll 100:
1-40 = Body
41-65 = Legs
66-80 = Arms
81-90 = Head
91-95 = Hands
96-100 = Feet
If i understand correctly the conditional statements, the chance to hit the given armor part has to be inferior or equal to the given amount (determined by the random 100 within those limits), so
if (chancehit <= 65){return eArmorSlot.LEGS;} = 35% (1% to 35%)
if (chancehit <= 80){return eArmorSlot.ARMS;} = 20% (1% to 20%)
which means it is not equal to the 25% (legs) & 15% (arms) from official live source/chewchew.
Same goes for torso which has 20% more chance to be hit (60% vs 40%).
Is that correct ?
No, you got it wrong.
Torso got 40% because the value in the code snippet is 40.
Legs got 25% because the value in the code snippet is 65 and 65 - 40 = 25.
And so on.
I don't wanna play smartass here, just trying to understand as i'm not a coder, but how do u link 40 (65-40) to legs ? oO
I only see if (chancehit <= 65){return eArmorSlot.LEGS;} so for me the conditional is 65, with same random 100 as all parts, so 35%.
Don't follow ur logic (sincerely), so where does the 40 come from ?
And if torso is 40% because code snippet is 40, following this logic, hands and feet should be 95% because code snippet is 95... oO Not sure u're right here ?