-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Description
The current tohit formula is not good enough:
server/src/server/gameserver/skill/HitRoll.cpp
Lines 146 to 178 in 3c2054f
| if (ToHit >= Defense) | |
| { | |
| // 투힛이 디펜스보다 높은 경우에는 맞출 확률이 꽤...높다. | |
| #ifdef __CHINA_SERVER__ | |
| Result = min(90, (int)(((ToHit - Defense) / 1.5) + 60) + ToHitBonus); | |
| #else | |
| if ( isMonster ) | |
| { | |
| Result = min(95, (int)(((ToHit - Defense) / 3) + 50) + ToHitBonus/2); | |
| } | |
| else | |
| { | |
| Result = min(90, (int)(((ToHit - Defense) / 3) + 50) + ToHitBonus/2); | |
| } | |
| #endif | |
| } | |
| else | |
| { | |
| // 투힛이 디펜스보다 낮은 경우에는 맞출 확률이 많이 떨어진다. | |
| #ifdef __CHINA_SERVER__ | |
| if( isMonster ) { | |
| Result = max(10, (int)(60 - ((Defense - ToHit) / 1.5) + ToHitBonus)); | |
| } else { | |
| Result = max(20, (int)(60 - ((Defense - ToHit) / 1.5) + ToHitBonus)); | |
| } | |
| #else | |
| if( isMonster ) { | |
| Result = max(5, (int)(50 - ((Defense - ToHit) / 3) + ToHitBonus/2)); | |
| } else { | |
| Result = max(10, (int)(50 - ((Defense - ToHit) / 3) + ToHitBonus/2)); | |
| } | |
| #endif | |
| } |
I think this one is better:
tohit ratio = 0.5 + (tohit - defense) / [(tohit + defense) * k + C]
k=0.1
C=120
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels