From d0429e95bfa52b25d293683c43eefdb32239c4c1 Mon Sep 17 00:00:00 2001 From: TheSaminator Date: Tue, 12 Jul 2022 15:58:09 -0400 Subject: [PATCH] Fixes 4 --- src/commonMain/kotlin/net/starshipfights/game/ship_weapons.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/commonMain/kotlin/net/starshipfights/game/ship_weapons.kt b/src/commonMain/kotlin/net/starshipfights/game/ship_weapons.kt index 3ca65d8..1d1e528 100644 --- a/src/commonMain/kotlin/net/starshipfights/game/ship_weapons.kt +++ b/src/commonMain/kotlin/net/starshipfights/game/ship_weapons.kt @@ -488,6 +488,9 @@ fun ShipInstance.calculateBombing(otherShips: Map, ShipInstance } fun ShipInstance.afterBombed(otherShips: Map, ShipInstance>, strikeWingDamage: MutableMap): ImpactResult { + if (bomberWings.isEmpty()) + return ImpactResult.Intact(this) + val calculatedBombing = calculateBombing(otherShips) val maxBomberWingOutput = exp(calculatedBombing) -- 2.25.1