From ba679191f84d4b06de10f59b0729e2a93b3a1006 Mon Sep 17 00:00:00 2001 From: Xander Lenstra <71121390+xlenstra@users.noreply.github.com> Date: Sat, 18 Sep 2021 22:42:10 +0200 Subject: [PATCH] Fixed intercept chance being invertes (#5259) Edit made on mobile and as such untested --- core/src/com/unciv/logic/battle/Battle.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/com/unciv/logic/battle/Battle.kt b/core/src/com/unciv/logic/battle/Battle.kt index 42a589c735..fa9cd00dd4 100644 --- a/core/src/com/unciv/logic/battle/Battle.kt +++ b/core/src/com/unciv/logic/battle/Battle.kt @@ -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 } -} \ No newline at end of file +}