From 40cd2ba24bb37c1b2e18dca16ee361a4a193f5e6 Mon Sep 17 00:00:00 2001 From: Xander Lenstra <71121390+xlenstra@users.noreply.github.com> Date: Mon, 24 Jan 2022 16:11:39 +0100 Subject: [PATCH] Fixed a missing percentage sign in uniques (#6036) * Fixed a missing percentage sign in uniques * Oh, it needs a city filter of course --- core/src/com/unciv/logic/city/CityExpansionManager.kt | 4 ++-- core/src/com/unciv/models/ruleset/unique/UniqueType.kt | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/core/src/com/unciv/logic/city/CityExpansionManager.kt b/core/src/com/unciv/logic/city/CityExpansionManager.kt index 8cd0202e97..1d5c95a095 100644 --- a/core/src/com/unciv/logic/city/CityExpansionManager.kt +++ b/core/src/com/unciv/logic/city/CityExpansionManager.kt @@ -43,7 +43,7 @@ class CityExpansionManager { cultureToNextTile *= 1.5f // City states grow slower, perhaps 150% cost? // Deprecated since 3.19.1 - for (unique in cityInfo.getMatchingUniques(UniqueType.DecreasedAcquiringTilesCost)) { + for (unique in cityInfo.getMatchingUniques(UniqueType.DecreasedAcquiringTilesCost) + cityInfo.getMatchingUniques(UniqueType.BorderGrowthPercentageWithoutPercentageSign)) { if (cityInfo.matchesFilter(unique.params[1])) cultureToNextTile /= unique.params[0].toPercent() } @@ -52,7 +52,7 @@ class CityExpansionManager { cultureToNextTile *= unique.params[0].toPercent() // - for (unique in cityInfo.getMatchingUniquesWithNonLocalEffects(UniqueType.BorderGrowthPercentage)) + for (unique in cityInfo.getMatchingUniques(UniqueType.BorderGrowthPercentage)) if (cityInfo.matchesFilter(unique.params[1])) cultureToNextTile *= unique.params[0].toPercent() diff --git a/core/src/com/unciv/models/ruleset/unique/UniqueType.kt b/core/src/com/unciv/models/ruleset/unique/UniqueType.kt index ac3de2abe0..ad2eda3ed2 100644 --- a/core/src/com/unciv/models/ruleset/unique/UniqueType.kt +++ b/core/src/com/unciv/models/ruleset/unique/UniqueType.kt @@ -162,10 +162,12 @@ enum class UniqueType(val text: String, vararg targets: UniqueTarget, val flags: @Deprecated("As of 3.18.2", ReplaceWith("[50]% of excess happiness converted to [Culture]"), DeprecationLevel.WARNING) ExcessHappinessToCultureDeprecated("50% of excess happiness added to culture towards policies", UniqueTarget.Global), - BorderGrowthPercentage("[amount] Culture cost of natural border growth [cityFilter]", UniqueTarget.Global, UniqueTarget.FollowerBelief), - @Deprecated("As of 3.19.1", ReplaceWith("[-amount] Culture cost of natural border growth [cityFilter]")) + BorderGrowthPercentage("[amount]% Culture cost of natural border growth [cityFilter]", UniqueTarget.Global, UniqueTarget.FollowerBelief), + @Deprecated("As of 3.19.2", ReplaceWith("[amount]% Culture cost of natural border growth [cityFilter]")) + BorderGrowthPercentageWithoutPercentageSign("[amount]% Culture cost of natural border growth [cityFilter]", UniqueTarget.Global, UniqueTarget.FollowerBelief), + @Deprecated("As of 3.19.1", ReplaceWith("[-amount]% Culture cost of natural border growth [cityFilter]")) DecreasedAcquiringTilesCost("-[amount]% Culture cost of acquiring tiles [cityFilter]", UniqueTarget.Global, UniqueTarget.FollowerBelief), - @Deprecated("As of 3.19.1", ReplaceWith("[amount] Culture cost of natural border growth [cityFilter]")) + @Deprecated("As of 3.19.1", ReplaceWith("[amount]% Culture cost of natural border growth [cityFilter]")) CostOfNaturalBorderGrowth("[amount]% cost of natural border growth", UniqueTarget.Global, UniqueTarget.FollowerBelief), TileCostPercentage("[amount]% Gold cost of acquiring tiles [cityFilter]", UniqueTarget.FollowerBelief, UniqueTarget.Global), @Deprecated("As of 3.19.1", ReplaceWith("[-amount]% Gold cost of acquiring tiles [cityFilter]"))