diff --git a/src/game/src/battle.cpp b/src/game/src/battle.cpp index b7ca89f..d30fd28 100644 --- a/src/game/src/battle.cpp +++ b/src/game/src/battle.cpp @@ -205,15 +205,15 @@ int CalcMagicDamage(LPCHARACTER pkAttacker, LPCHARACTER pkVictim) float CalcAttackRating(LPCHARACTER pkAttacker, LPCHARACTER pkVictim, bool bIgnoreTargetRating) { - int iARSrc = std::min(90, (attacker_dx * 4 + attacker_lv * 2) / 6); - int iERSrc = std::min(90, (victim_dx * 4 + victim_lv * 2) / 6); - int attacker_dx = pkAttacker->GetPolymorphPoint(POINT_DX); int attacker_lv = pkAttacker->GetLevel(); int victim_dx = pkVictim->GetPolymorphPoint(POINT_DX); int victim_lv = pkAttacker->GetLevel(); + int iARSrc = std::min(90, (attacker_dx * 4 + attacker_lv * 2) / 6); + int iERSrc = std::min(90, (victim_dx * 4 + victim_lv * 2) / 6); + float fAR = ((float) iARSrc + 210.0f) / 300.0f; // fAR = 0.7 ~ 1.0 if (bIgnoreTargetRating)