Corrected melee and ranged damage formulas

This commit is contained in:
ceikry 2021-07-22 13:57:18 -05:00
parent 571383757d
commit 7a2d799dc3
2 changed files with 5 additions and 3 deletions

View file

@ -193,8 +193,9 @@ open class MeleeSwingHandler
cumulativeStr += 1.0
}
cumulativeStr *= getSetMultiplier(entity, Skills.STRENGTH)
val hit = (16 + cumulativeStr + bonus / 8 + cumulativeStr * bonus * 0.016865) * modifier
return (hit / 10).toInt() + 1
/*val hit = (16 + cumulativeStr + bonus / 8 + cumulativeStr * bonus * 0.016865) * modifier
return (hit / 10).toInt() + 1*/
return (1.3 + (cumulativeStr / 10) + (bonus / 80) + ((cumulativeStr * bonus) / 640)).toInt()
}
override fun calculateDefence(entity: Entity?, attacker: Entity?): Int {

View file

@ -281,7 +281,8 @@ open class RangeSwingHandler
cumulativeStr += 1.0
}
cumulativeStr *= getSetMultiplier(entity, Skills.RANGE)
return ((14 + cumulativeStr + bonus / 8 + cumulativeStr * bonus * 0.016865) * modifier).toInt() / 10 + 1
return (1.3 + (cumulativeStr / 10) + (bonus / 80) + ((cumulativeStr * bonus) / 640)).toInt()
//return ((14 + cumulativeStr + bonus / 8 + cumulativeStr * bonus * 0.016865) * modifier).toInt() / 10 + 1
}
override fun calculateDefence(entity: Entity?, attacker: Entity?): Int {