From 6c3314c155cfd6814c3e17ab1375a342a6d84ef9 Mon Sep 17 00:00:00 2001 From: TheSaminator Date: Sat, 11 Jun 2022 09:39:30 -0400 Subject: [PATCH] Subplot fix --- .../kotlin/net/starshipfights/game/game_subplots.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/commonMain/kotlin/net/starshipfights/game/game_subplots.kt b/src/commonMain/kotlin/net/starshipfights/game/game_subplots.kt index cc662dd..a407335 100644 --- a/src/commonMain/kotlin/net/starshipfights/game/game_subplots.kt +++ b/src/commonMain/kotlin/net/starshipfights/game/game_subplots.kt @@ -181,10 +181,10 @@ sealed class Subplot { if (gameState.ships[againstShip] != null) return gameState val myShips = gameState.ships.values.filter { it.owner == forPlayer } - val lowestShipTier = myShips.minOf { it.ship.shipType.weightClass } - val shipsNotOfLowestTier = myShips.filter { it.ship.shipType.weightClass != lowestShipTier }.ifEmpty { myShips } + val highestShipTier = myShips.maxOf { it.ship.shipType.weightClass } + val shipsNotOfHighestTier = myShips.filter { it.ship.shipType.weightClass != highestShipTier }.ifEmpty { myShips } - val arkancideShip = shipsNotOfLowestTier.random().id + val arkancideShip = shipsNotOfHighestTier.random().id return gameState.modifySubplotData(PlausibleDeniability(forPlayer, arkancideShip, SubplotOutcome.UNDECIDED)) } -- 2.25.1