From 524dfa53648a6333ddda126dbfe1ef6bdebb8480 Mon Sep 17 00:00:00 2001 From: Xander Lenstra <71121390+xlenstra@users.noreply.github.com> Date: Mon, 18 Oct 2021 15:37:18 +0200 Subject: [PATCH] Band-aided a bug with building unique application (#5512) Building uniques applying to all cities, such as Temple of Artemis and Sistene Chapel would apply their bonus twice to the city they were build in. This was a result of it both being found as a non-local unique due to it having an effect outside the city and thus being classified as wonder, and as a building, as it was built in the city and had an effect on it. This patch is _untested_ and only a band-aid. The real solution would be to start using the sources of uniques saved in the uniques themselves to classify were uniques are received from. Implementing this is somewhere on my todo-list, but due to uni won't happen anytime soon. --- core/src/com/unciv/logic/civilization/CivilizationInfo.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/com/unciv/logic/civilization/CivilizationInfo.kt b/core/src/com/unciv/logic/civilization/CivilizationInfo.kt index d42fca4fb7..f8bcfae8ce 100644 --- a/core/src/com/unciv/logic/civilization/CivilizationInfo.kt +++ b/core/src/com/unciv/logic/civilization/CivilizationInfo.kt @@ -343,7 +343,7 @@ class CivilizationInfo { cities.asSequence().flatMap { city -> if (cityItIsFor != null && city == cityItIsFor) - city.getAllUniquesWithNonLocalEffects().filter { it.params.none { param -> param == "in other cities" } } + city.getAllUniquesWithNonLocalEffects().filter { it.params.none { param -> param == "in other cities" || param == "in all cities" } } else city.getAllUniquesWithNonLocalEffects() }