From f36b05f6c0cc9231404d05b29ad71ce81cb21191 Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Fri, 1 Dec 2023 10:23:17 +0200 Subject: [PATCH] Revert "Resolved #10630 - "[relativeAmount]% [stat] from every follower, up to [relativeAmount]%" works off of majority religion, not our religion" This reverts commit 199b3ada93a3694904d90c0058ba6ec58fab6dfd. --- core/src/com/unciv/logic/city/CityStats.kt | 2 +- core/src/com/unciv/models/ruleset/unique/IHasUniques.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/com/unciv/logic/city/CityStats.kt b/core/src/com/unciv/logic/city/CityStats.kt index 57fc02bb27..ed3b515585 100644 --- a/core/src/com/unciv/logic/city/CityStats.kt +++ b/core/src/com/unciv/logic/city/CityStats.kt @@ -295,7 +295,7 @@ class CityStats(val city: City) { for (unique in city.getMatchingUniques(UniqueType.StatPercentFromReligionFollowers)) addUniqueStats(unique, Stat.valueOf(unique.params[1]), min( - unique.params[0].toFloat() * city.religion.getFollowersOfMajorityReligion(), + unique.params[0].toFloat() * city.religion.getFollowersOfOurReligion(), unique.params[2].toFloat() )) diff --git a/core/src/com/unciv/models/ruleset/unique/IHasUniques.kt b/core/src/com/unciv/models/ruleset/unique/IHasUniques.kt index 56f37df158..1dda45abaf 100644 --- a/core/src/com/unciv/models/ruleset/unique/IHasUniques.kt +++ b/core/src/com/unciv/models/ruleset/unique/IHasUniques.kt @@ -61,6 +61,6 @@ interface IHasUniques : INamed { requiredTechs().map{ ruleset.technologies[it]!! } fun era(ruleset: Ruleset): Era? = - requiredTechnologies(ruleset).map{ ruleset.eras[it.era()]!! }.maxByOrNull{ it.eraNumber } + requiredTechnologies(ruleset).map{ it.era() }.map{ ruleset.eras[it]!! }.maxByOrNull{ it.eraNumber } // This will return null only if requiredTechnologies() is empty. }