mirror of
https://github.com/yairm210/Unciv.git
synced 2025-03-09 20:29:50 +07:00
Fixed intercept chance being invertes (#5259)
Edit made on mobile and as such untested
This commit is contained in:
parent
ec0801ccef
commit
ba679191f8
@ -717,7 +717,7 @@ object Battle {
|
||||
if (attacker.unit.hasUnique("Cannot be intercepted")) return
|
||||
for (interceptor in interceptingCiv.getCivUnits()
|
||||
.filter { it.canIntercept(attackedTile) }) {
|
||||
if (Random().nextFloat() > 100f / interceptor.interceptChance()) continue
|
||||
if (Random().nextFloat() > interceptor.interceptChance() / 100f) continue
|
||||
|
||||
var damage = BattleDamage.calculateDamageToDefender(
|
||||
MapUnitCombatant(interceptor),
|
||||
@ -828,4 +828,4 @@ object Battle {
|
||||
return true
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user