Fix subplot victory titles
authorTheSaminator <TheSaminator@users.noreply.github.com>
Wed, 8 Jun 2022 15:40:23 +0000 (11:40 -0400)
committerTheSaminator <TheSaminator@users.noreply.github.com>
Wed, 8 Jun 2022 15:40:23 +0000 (11:40 -0400)
src/commonMain/kotlin/starshipfights/game/game_subplots.kt

index 8b419387b7a8ef5088de96120d5a855532c92ee9..6d68742e2227e005c849b29e55c0655e93b25033 100644 (file)
@@ -271,7 +271,7 @@ fun victoryTitle(player: GlobalSide, winner: GlobalSide?, subplotOutcomes: Map<S
        return when (winner) {
                player -> {
                        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<S
                }
                player.other -> {
                        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"