diff --git a/core/src/com/unciv/models/ruleset/Building.kt b/core/src/com/unciv/models/ruleset/Building.kt index e7f0481c29..89e6705321 100644 --- a/core/src/com/unciv/models/ruleset/Building.kt +++ b/core/src/com/unciv/models/ruleset/Building.kt @@ -456,6 +456,11 @@ class Building : RulesetStatsObject(), INonPerpetualConstruction { } val rejectionReasons = getRejectionReasons(cityConstructions) + + if (rejectionReasons.any { it.type == RejectionReasonType.RequiresBuildingInSomeCities } + && cityConstructions.city.civ.gameInfo.gameParameters.oneCityChallenge) + return false // You will never be able to get more cities, this building is effectively disabled + return rejectionReasons.none { !it.shouldShow } || ( canBePurchasedWithAnyStat(cityConstructions.city) @@ -539,7 +544,7 @@ class Building : RulesetStatsObject(), INonPerpetualConstruction { val equivalentBuildingName = civ.getEquivalentBuilding(buildingName).name yield( // replace with civ-specific building for user - RejectionReasonType.RequiresBuildingInAllCities.toInstance( + RejectionReasonType.RequiresBuildingInSomeCities.toInstance( unique.text.fillPlaceholders(equivalentBuildingName, numberOfCitiesRequired.toString()) + " ($numberOfCitiesWithBuilding/$numberOfCitiesRequired)" ) ) diff --git a/core/src/com/unciv/models/ruleset/IConstruction.kt b/core/src/com/unciv/models/ruleset/IConstruction.kt index 94fae917c5..d26187470d 100644 --- a/core/src/com/unciv/models/ruleset/IConstruction.kt +++ b/core/src/com/unciv/models/ruleset/IConstruction.kt @@ -174,6 +174,7 @@ enum class RejectionReasonType(val shouldShow: Boolean, val errorMessage: String RequiresBuildingInThisCity(true, "Requires a specific building in this city!"), RequiresBuildingInAllCities(true, "Requires a specific building in all cities!"), + RequiresBuildingInSomeCities(true, "Requires a specific building in more cities!"), RequiresBuildingInSomeCity(true, "Requires a specific building anywhere in your empire!"), WonderAlreadyBuilt(false, "Wonder already built"),