From 01fde6c4a46c84d13ac28ae59b007810e0a11342 Mon Sep 17 00:00:00 2001 From: Rob Loach Date: Tue, 16 Sep 2025 21:14:41 -0400 Subject: [PATCH] update VictoryScreenIllustrations --- .../victoryscreen/VictoryScreenIllustrations.kt | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/core/src/com/unciv/ui/screens/victoryscreen/VictoryScreenIllustrations.kt b/core/src/com/unciv/ui/screens/victoryscreen/VictoryScreenIllustrations.kt index 013fbbdbec..2a63d92be0 100644 --- a/core/src/com/unciv/ui/screens/victoryscreen/VictoryScreenIllustrations.kt +++ b/core/src/com/unciv/ui/screens/victoryscreen/VictoryScreenIllustrations.kt @@ -246,14 +246,9 @@ class VictoryScreenIllustrations( civ.policies.completedBranches.size } MilestoneType.MoreCountableThanEachPlayer -> { - var amountDone = 0; var amountToDo = 0; - for (otherCiv in civ.gameInfo.civilizations) { - if (!milestone.getMoreCountableThanOtherCivRelevant(civ, otherCiv)) continue - amountToDo++ - if (milestone.getMoreCountableThanOtherCivPercent(civ, otherCiv) > 100f) amountDone++ - } - total += if (selectedCiv.shouldHideCivCount()) game.gameParameters.maxNumberOfPlayers - 1 else amountToDo - amountDone + val relevantCivs = civ.gameInfo.civilizations.filter { milestone.getMoreCountableThanOtherCivRelevant(civ, it) } + total += if (selectedCiv.shouldHideCivCount()) game.gameParameters.maxNumberOfPlayers - 1 else relevantCivs.size + relevantCivs.count { milestone.getMoreCountableThanOtherCivPercent(civ, it) > 100f } } MilestoneType.WorldReligion -> { total += game.civilizations.count { it.isMajorCiv() && it.isAlive() }