From 32f5303ab9d5309d97b0a84bbd3e379bcf05a0a5 Mon Sep 17 00:00:00 2001 From: TheSaminator Date: Wed, 8 Jun 2022 11:40:23 -0400 Subject: [PATCH] Fix subplot victory titles --- src/commonMain/kotlin/starshipfights/game/game_subplots.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commonMain/kotlin/starshipfights/game/game_subplots.kt b/src/commonMain/kotlin/starshipfights/game/game_subplots.kt index 8b41938..6d68742 100644 --- a/src/commonMain/kotlin/starshipfights/game/game_subplots.kt +++ b/src/commonMain/kotlin/starshipfights/game/game_subplots.kt @@ -271,7 +271,7 @@ fun victoryTitle(player: GlobalSide, winner: GlobalSide?, subplotOutcomes: Map { val isGlorious = myOutcomes.all { (_, outcome) -> outcome == SubplotOutcome.WON } - val isPyrrhic = myOutcomes.size >= 2 && myOutcomes.any { (_, outcome) -> outcome != SubplotOutcome.WON } + val isPyrrhic = myOutcomes.size >= 2 && myOutcomes.none { (_, outcome) -> outcome == SubplotOutcome.WON } if (isGlorious) "Glorious Victory" @@ -282,7 +282,7 @@ fun victoryTitle(player: GlobalSide, winner: GlobalSide?, subplotOutcomes: Map { val isHeroic = myOutcomes.all { (_, outcome) -> outcome == SubplotOutcome.WON } - val isHumiliating = myOutcomes.size >= 2 && myOutcomes.any { (_, outcome) -> outcome != SubplotOutcome.WON } + val isHumiliating = myOutcomes.size >= 2 && myOutcomes.none { (_, outcome) -> outcome == SubplotOutcome.WON } if (isHeroic) "Heroic Defeat" -- 2.25.1