forked from 2009Scape/Server
Correct accuracy calculation checks
This commit is contained in:
parent
39060ba43e
commit
c2e7358522
1 changed files with 1 additions and 1 deletions
|
|
@ -188,7 +188,7 @@ abstract class CombatSwingHandler(var type: CombatStyle?) {
|
|||
}
|
||||
val attack = calculateAccuracy(entity) * accuracyMod * mod * getSetMultiplier(entity, Skills.ATTACK)
|
||||
val defence = calculateDefence(victim, entity) * defenceMod * getSetMultiplier(victim, Skills.DEFENCE)
|
||||
val chance: Double = if (attack < defence) {
|
||||
val chance: Double = if (attack > defence) {
|
||||
1 - ((defence + 2) / ((2 * attack) + 1))
|
||||
} else {
|
||||
attack / ((2 * defence) + 1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue