mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-04 15:27:50 +07:00
Ranged units don't get damaged when attacking
This commit is contained in:
@ -53,6 +53,7 @@ class Battle(val gameInfo:GameInfo) {
|
||||
}
|
||||
|
||||
fun calculateDamageToAttacker(attacker: ICombatant, defender: ICombatant): Int {
|
||||
if(attacker.getCombatantType() == CombatantType.Ranged) return 0
|
||||
return (getDefendingStrength(attacker,defender) * 50 / getAttackingStrength(attacker,defender)).toInt()
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user