Skip to content

adjust the tohit formula #135

@tiancaiamao

Description

@tiancaiamao

The current tohit formula is not good enough:

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions