diff --git a/core/src/com/unciv/logic/city/CityStats.kt b/core/src/com/unciv/logic/city/CityStats.kt index 2a13e53693..cd5e294dc5 100644 --- a/core/src/com/unciv/logic/city/CityStats.kt +++ b/core/src/com/unciv/logic/city/CityStats.kt @@ -420,15 +420,15 @@ class CityStats(val cityInfo: CityInfo) { unhappinessFromCitizens *= 2f // Deprecated since 3.16.11 - for (unique in civInfo.getMatchingUniques("Unhappiness from population decreased by []%")) + for (unique in civInfo.getMatchingUniques(UniqueType.UnhappinessFromPopulationPercentageChangeOld1)) unhappinessFromCitizens *= (1 - unique.params[0].toFloat() / 100) - for (unique in civInfo.getMatchingUniques("Unhappiness from population decreased by []% []")) + for (unique in civInfo.getMatchingUniques(UniqueType.UnhappinessFromPopulationPercentageChangeOld2)) if (cityInfo.matchesFilter(unique.params[1])) unhappinessFromCitizens *= (1 - unique.params[0].toFloat() / 100) // - for (unique in cityInfo.getMatchingUniques("[]% unhappiness from population []")) + for (unique in cityInfo.getMatchingUniques(UniqueType.UnhappinessFromPopulationPercentageChange)) if (cityInfo.matchesFilter(unique.params[1])) unhappinessFromCitizens *= unique.params[0].toPercent() diff --git a/core/src/com/unciv/logic/map/MapUnit.kt b/core/src/com/unciv/logic/map/MapUnit.kt index ce330d8b47..c1289c5568 100644 --- a/core/src/com/unciv/logic/map/MapUnit.kt +++ b/core/src/com/unciv/logic/map/MapUnit.kt @@ -328,8 +328,8 @@ class MapUnit { // Deprecated since 3.16.11 if (isEmbarked()) { - movement += civInfo.getMatchingUniques("Increases embarked movement +1").count() - if (civInfo.hasUnique("+1 Movement for all embarked units")) movement += 1 + movement += civInfo.getMatchingUniques(UniqueType.EmbarkedUnitMovement1).count() + if (civInfo.hasUnique(UniqueType.EmbarkedUnitMovement2)) movement += 1 } // diff --git a/core/src/com/unciv/models/ruleset/unique/UniqueType.kt b/core/src/com/unciv/models/ruleset/unique/UniqueType.kt index 5b90abb8a9..328c904255 100644 --- a/core/src/com/unciv/models/ruleset/unique/UniqueType.kt +++ b/core/src/com/unciv/models/ruleset/unique/UniqueType.kt @@ -71,6 +71,14 @@ enum class UniqueType(val text:String, vararg targets: UniqueTarget) { BonusStatsFromCityStates("[amount]% [stat] from City-States", UniqueTarget.Global), RemoveAnnexUnhappiness("Remove extra unhappiness from annexed cities", UniqueTarget.Building), + UnhappinessFromPopulationPercentageChange("[amount]% unhappiness from population [cityFilter]", UniqueTarget.Global), + + @Deprecated("As of 3.16.11", ReplaceWith("[amount]% unhappiness from population [cityFilter]"), DeprecationLevel.WARNING) + UnhappinessFromPopulationPercentageChangeOld1("Unhappiness from population decreased by [amount]%", UniqueTarget.Global), + @Deprecated("As of 3.16.11", ReplaceWith("[amount]% unhappiness from population [cityFilter]"), DeprecationLevel.WARNING) + UnhappinessFromPopulationPercentageChangeOld2("Unhappiness from population decreased by [amount]% [cityFilter]", UniqueTarget.Global), + + StatsFromSpecialist("[stats] from every specialist [cityFilter]", UniqueTarget.Global), @Deprecated("As of 3.16.16", ReplaceWith("[stats] from every specialist [in all cities]"), DeprecationLevel.WARNING) @@ -178,6 +186,10 @@ enum class UniqueType(val text:String, vararg targets: UniqueTarget) { NormalVisionWhenEmbarked("Normal vision when embarked", UniqueTarget.Unit, UniqueTarget.Global), CannotAttack("Cannot attack", UniqueTarget.Unit), + @Deprecated("As of 3.16.11", ReplaceWith("[+1] Movement <for [Embarked] units>"), DeprecationLevel.WARNING) + EmbarkedUnitMovement1("Increases embarked movement +1", UniqueTarget.Global), + @Deprecated("As of 3.16.11", ReplaceWith("[+1] Movement <for [Embarked] units>"), DeprecationLevel.WARNING) + EmbarkedUnitMovement2("+1 Movement for all embarked units", UniqueTarget.Global), @Deprecated("As of 3.17.5", ReplaceWith("[amount] Movement <for [mapUnitFilter] units>"), DeprecationLevel.WARNING) MovementUnits("+[amount] Movement for all [mapUnitFilter] units", UniqueTarget.Global), @Deprecated("As of 3.17.5", ReplaceWith("[amount] Movement <for [All] units> <during a Golden Age>"), DeprecationLevel.WARNING)