diff --git a/core/src/com/unciv/logic/city/CityStats.kt b/core/src/com/unciv/logic/city/CityStats.kt index 59d6bcf9e5..1e6b262552 100644 --- a/core/src/com/unciv/logic/city/CityStats.kt +++ b/core/src/com/unciv/logic/city/CityStats.kt @@ -176,6 +176,7 @@ class CityStats(val city: City) { fun hasExtraAnnexUnhappiness(): Boolean { if (city.civ.civName == city.foundingCiv || city.isPuppet) return false return !city.containsBuildingUnique(UniqueType.RemoveAnnexUnhappiness) + && !city.containsBuildingUnique(UniqueType.RemovesAnnexUnhappiness) } fun getStatsOfSpecialist(specialistName: String, localUniqueCache: LocalUniqueCache = LocalUniqueCache(false)): Stats { diff --git a/core/src/com/unciv/models/ruleset/Building.kt b/core/src/com/unciv/models/ruleset/Building.kt index 4febfd63e0..4b52a4e3ce 100644 --- a/core/src/com/unciv/models/ruleset/Building.kt +++ b/core/src/com/unciv/models/ruleset/Building.kt @@ -516,7 +516,9 @@ class Building : RulesetStatsObject(), INonPerpetualConstruction { } if (getMatchingUniques(UniqueType.StatsFromTiles).any { it.stats[stat] > 0 }) return true if (getMatchingUniques(UniqueType.StatsPerPopulation).any { it.stats[stat] > 0 }) return true - if (stat == Stat.Happiness && hasUnique(UniqueType.RemoveAnnexUnhappiness)) return true + if (stat == Stat.Happiness && + (hasUnique(UniqueType.RemoveAnnexUnhappiness) || hasUnique(UniqueType.RemovesAnnexUnhappiness)) + ) return true return false } diff --git a/core/src/com/unciv/models/ruleset/unique/UniqueType.kt b/core/src/com/unciv/models/ruleset/unique/UniqueType.kt index 230f2a21fc..9e44f6e473 100644 --- a/core/src/com/unciv/models/ruleset/unique/UniqueType.kt +++ b/core/src/com/unciv/models/ruleset/unique/UniqueType.kt @@ -142,7 +142,7 @@ enum class UniqueType( GainFreeBuildings("Gain a free [buildingName] [cityFilter]", UniqueTarget.Global, UniqueTarget.Triggerable, docDescription = "Free buildings CANNOT be self-removing - this leads to an endless loop of trying to add the building"), BuildingMaintenance("[relativeAmount]% maintenance cost for [buildingFilter] buildings [cityFilter]", UniqueTarget.Global, UniqueTarget.FollowerBelief), - @Deprecated(message = "as of 4.6.13", ReplaceWith("[relativeAmount]% maintenance cost for [all] buildings [cityFilter]"), level = DeprecationLevel.WARNING) + @Deprecated(message = "as of 4.16.13", ReplaceWith("[relativeAmount]% maintenance cost for [all] buildings [cityFilter]"), level = DeprecationLevel.WARNING) BuildingMaintenanceOld("[relativeAmount]% maintenance cost for buildings [cityFilter]", UniqueTarget.Global, UniqueTarget.FollowerBelief), RemoveBuilding("Remove [buildingFilter] [cityFilter]", UniqueTarget.Global, UniqueTarget.Triggerable), OneTimeSellBuilding("Sell [buildingFilter] buildings [cityFilter]", UniqueTarget.Global, UniqueTarget.Triggerable), @@ -345,7 +345,10 @@ enum class UniqueType( NotDestroyedWhenCityCaptured("Never destroyed when the city is captured", UniqueTarget.Building), DoublesGoldFromCapturingCity("Doubles Gold given to enemy if city is captured", UniqueTarget.Building), + + @Deprecated("As of 4.16.14", ReplaceWith("Removes extra unhappiness from annexed cities")) RemoveAnnexUnhappiness("Remove extra unhappiness from annexed cities", UniqueTarget.Building), + RemovesAnnexUnhappiness("Removes extra unhappiness from annexed cities", UniqueTarget.Building), ConnectTradeRoutes("Connects trade routes over water", UniqueTarget.Building), GainBuildingWhereBuildable("Automatically built in all cities where it is buildable", UniqueTarget.Building),