Corrected melee and ranged damage formulas

This commit is contained in:
ceikry
2021-07-22 13:57:18 -05:00
parent 05238636c7
commit c00998bace
2 changed files with 5 additions and 3 deletions
@@ -193,8 +193,9 @@ open class MeleeSwingHandler
cumulativeStr += 1.0 cumulativeStr += 1.0
} }
cumulativeStr *= getSetMultiplier(entity, Skills.STRENGTH) cumulativeStr *= getSetMultiplier(entity, Skills.STRENGTH)
val hit = (16 + cumulativeStr + bonus / 8 + cumulativeStr * bonus * 0.016865) * modifier /*val hit = (16 + cumulativeStr + bonus / 8 + cumulativeStr * bonus * 0.016865) * modifier
return (hit / 10).toInt() + 1 return (hit / 10).toInt() + 1*/
return (1.3 + (cumulativeStr / 10) + (bonus / 80) + ((cumulativeStr * bonus) / 640)).toInt()
} }
override fun calculateDefence(entity: Entity?, attacker: Entity?): Int { override fun calculateDefence(entity: Entity?, attacker: Entity?): Int {
@@ -281,7 +281,8 @@ open class RangeSwingHandler
cumulativeStr += 1.0 cumulativeStr += 1.0
} }
cumulativeStr *= getSetMultiplier(entity, Skills.RANGE) 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 { override fun calculateDefence(entity: Entity?, attacker: Entity?): Int {