diff --git a/core/src/com/unciv/logic/city/CityStats.kt b/core/src/com/unciv/logic/city/CityStats.kt index efa1e60db0..8bd3fa3c59 100644 --- a/core/src/com/unciv/logic/city/CityStats.kt +++ b/core/src/com/unciv/logic/city/CityStats.kt @@ -633,11 +633,6 @@ class CityStats(val cityInfo: CityInfo) { foodEaten = cityInfo.population.population.toFloat() * 2 var foodEatenBySpecialists = 2f * cityInfo.population.getNumberOfSpecialists() - // Deprecated since 3.16.11 - for (unique in cityInfo.civInfo.getMatchingUniques(UniqueType.FoodConsumptionBySpecialistsDeprecated)) - foodEatenBySpecialists *= 1f - unique.params[0].toFloat() / 100f - // - for (unique in cityInfo.getMatchingUniques(UniqueType.FoodConsumptionBySpecialists)) if (cityInfo.matchesFilter(unique.params[1])) foodEatenBySpecialists *= unique.params[0].toPercent() diff --git a/core/src/com/unciv/logic/civilization/CivInfoStats.kt b/core/src/com/unciv/logic/civilization/CivInfoStats.kt index 4ac3522004..7813d54dc0 100644 --- a/core/src/com/unciv/logic/civilization/CivInfoStats.kt +++ b/core/src/com/unciv/logic/civilization/CivInfoStats.kt @@ -193,13 +193,6 @@ class CivInfoStats(val civInfo: CivilizationInfo) { ) } - // Deprecated since 3.16.15 - if (civInfo.hasUnique(UniqueType.ExcessHappinessToCultureDeprecated)) { - val happiness = civInfo.getHappiness() - if (happiness > 0) statMap.add("Policies", Stats(culture = happiness / 2f)) - } - // - if (civInfo.getHappiness() > 0) { val excessHappinessConversion = Stats() for (unique in civInfo.getMatchingUniques(UniqueType.ExcessHappinessToGlobalStat)) { diff --git a/core/src/com/unciv/logic/map/MapUnit.kt b/core/src/com/unciv/logic/map/MapUnit.kt index ce59a4a7f6..81d3211153 100644 --- a/core/src/com/unciv/logic/map/MapUnit.kt +++ b/core/src/com/unciv/logic/map/MapUnit.kt @@ -105,9 +105,6 @@ class MapUnit { @Transient var cannotEnterOceanTiles = false - @Transient - var cannotEnterOceanTilesUntilAstronomy = false - @Transient var canEnterForeignTerrain: Boolean = false @@ -333,9 +330,6 @@ class MapUnit { //todo: consider parameterizing [terrainFilter] in some of the following: canEnterIceTiles = hasUnique(UniqueType.CanEnterIceTiles) cannotEnterOceanTiles = hasUnique(UniqueType.CannotEnterOcean, StateForConditionals(civInfo=civInfo, unit=this)) - // Deprecated as of 3.18.6 - cannotEnterOceanTilesUntilAstronomy = hasUnique(UniqueType.CannotEnterOceanUntilAstronomy) - // hasUniqueToBuildImprovements = hasUnique(UniqueType.BuildImprovements) canEnterForeignTerrain = hasUnique(UniqueType.CanEnterForeignTiles) diff --git a/core/src/com/unciv/logic/map/TileInfo.kt b/core/src/com/unciv/logic/map/TileInfo.kt index 0d6df69081..36e38200d5 100644 --- a/core/src/com/unciv/logic/map/TileInfo.kt +++ b/core/src/com/unciv/logic/map/TileInfo.kt @@ -457,11 +457,6 @@ open class TileInfo { improvement.uniqueObjects.any { it.placeholderText == "Obsolete with []" && civInfo.tech.isResearched(it.params[0]) } -> return false - // Deprecated since 3.18.5 - improvement.getMatchingUniques(UniqueType.RequiresTechToBuildOnTile).any { - matchesTerrainFilter(it.params[0], civInfo) && !civInfo.tech.isResearched(it.params[1]) - } -> false - // improvement.getMatchingUniques(UniqueType.CannotBuildOnTile, StateForConditionals(civInfo=civInfo)).any { matchesTerrainFilter(it.params[0], civInfo) } -> false diff --git a/core/src/com/unciv/logic/map/UnitMovementAlgorithms.kt b/core/src/com/unciv/logic/map/UnitMovementAlgorithms.kt index 14ec0b5083..6630d359dd 100644 --- a/core/src/com/unciv/logic/map/UnitMovementAlgorithms.kt +++ b/core/src/com/unciv/logic/map/UnitMovementAlgorithms.kt @@ -610,9 +610,6 @@ class UnitMovementAlgorithms(val unit:MapUnit) { } if (tile.isOcean && !unit.civInfo.tech.wayfinding) { // Apparently all Polynesian naval units can enter oceans if (unit.cannotEnterOceanTiles) return false - if (unit.cannotEnterOceanTilesUntilAstronomy - && !unit.civInfo.tech.isResearched("Astronomy")) - return false } if (tile.naturalWonder != null) return false diff --git a/core/src/com/unciv/models/ruleset/Building.kt b/core/src/com/unciv/models/ruleset/Building.kt index 522a2c2635..f684db48bf 100644 --- a/core/src/com/unciv/models/ruleset/Building.kt +++ b/core/src/com/unciv/models/ruleset/Building.kt @@ -475,12 +475,6 @@ class Building : RulesetStatsObject(), INonPerpetualConstruction { for (unique in uniqueObjects) { when (unique.placeholderText) { // TODO: Lots of typification… - // Deprecated since 3.16.11, replace with "Not displayed [...] construction without []" - UniqueType.NotDisplayedUnlessOtherBuildingBuilt.placeholderText -> - if (!cityConstructions.containsBuildingOrEquivalent(unique.params[0])) - rejectionReasons.add(RejectionReason.ShouldNotBeDisplayed) - // - UniqueType.NotDisplayedWithout.placeholderText -> if (unique.params[0] in ruleSet.tileResources && !civInfo.hasResource(unique.params[0]) || unique.params[0] in ruleSet.buildings && !cityConstructions.containsBuildingOrEquivalent(unique.params[0]) diff --git a/core/src/com/unciv/models/ruleset/tech/Technology.kt b/core/src/com/unciv/models/ruleset/tech/Technology.kt index 7b8ec92861..34e5039538 100644 --- a/core/src/com/unciv/models/ruleset/tech/Technology.kt +++ b/core/src/com/unciv/models/ruleset/tech/Technology.kt @@ -150,11 +150,6 @@ class Technology: RulesetObject() { ruleset.tileImprovements.values .asSequence() .filter { improvement -> - // Deprecated since 3.18.6 - improvement.getMatchingUniques(UniqueType.RequiresTechToBuildOnTile).any { - it.params[1] == name - } || - // improvement.uniqueObjects.any { unique -> unique.conditionals.any { (it.isOfType(UniqueType.ConditionalTech) || it.isOfType(UniqueType.ConditionalNoTech)) diff --git a/core/src/com/unciv/models/ruleset/unique/UniqueType.kt b/core/src/com/unciv/models/ruleset/unique/UniqueType.kt index b8bc0b0e09..ac61563ae1 100644 --- a/core/src/com/unciv/models/ruleset/unique/UniqueType.kt +++ b/core/src/com/unciv/models/ruleset/unique/UniqueType.kt @@ -172,12 +172,8 @@ enum class UniqueType(val text: String, vararg targets: UniqueTarget, val flags: UnhappinessFromPopulationPercentageChange("[amount]% unhappiness from population [cityFilter]", UniqueTarget.Global, UniqueTarget.FollowerBelief), UnhappinessFromSpecialistsPercentageChange("[amount]% unhappiness from specialists [cityFilter]", UniqueTarget.Global, UniqueTarget.FollowerBelief), FoodConsumptionBySpecialists("[amount]% Food consumption by specialists [cityFilter]", UniqueTarget.Global, UniqueTarget.FollowerBelief), - @Deprecated("As of 3.18.2", ReplaceWith("[-amount]% Food consumption by specialists [cityFilter]"), DeprecationLevel.WARNING) - FoodConsumptionBySpecialistsDeprecated("-[amount]% food consumption by specialists [cityFilter]", UniqueTarget.Global), ExcessHappinessToGlobalStat("[amount]% of excess happiness converted to [stat]", UniqueTarget.Global), - @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.2", ReplaceWith("[amount]% Culture cost of natural border growth [cityFilter]")) @@ -309,10 +305,6 @@ enum class UniqueType(val text: String, vararg targets: UniqueTarget, val flags: MaxNumberBuildable("Limited to [amount] per Civilization", UniqueTarget.Building, UniqueTarget.Unit), HiddenBeforeAmountPolicies("Hidden until [amount] social policy branches have been completed", UniqueTarget.Building, UniqueTarget.Unit), NotDisplayedWithout("Not displayed as an available construction without [buildingName/tech/resource/policy]", UniqueTarget.Building, UniqueTarget.Unit), - //UniqueType added in 3.18.4 - @Deprecated("As of 3.16.11", ReplaceWith("Not displayed as an available construction without [buildingName]"), DeprecationLevel.WARNING) - NotDisplayedUnlessOtherBuildingBuilt("Not displayed as an available construction unless [buildingName] is built", UniqueTarget.Building), - ConvertFoodToProductionWhenConstructed("Excess Food converted to Production when under construction", UniqueTarget.Building, UniqueTarget.Unit), RequiresPopulation("Requires at least [amount] population", UniqueTarget.Building, UniqueTarget.Unit), @@ -429,8 +421,6 @@ enum class UniqueType(val text: String, vararg targets: UniqueTarget, val flags: RoughTerrainPenalty("Rough terrain penalty", UniqueTarget.Unit), CanEnterIceTiles("Can enter ice tiles", UniqueTarget.Unit), CannotEnterOcean("Cannot enter ocean tiles", UniqueTarget.Unit), - @Deprecated("As of 3.18.6", ReplaceWith("Cannot enter ocean tiles ")) - CannotEnterOceanUntilAstronomy("Cannot enter ocean tiles until Astronomy", UniqueTarget.Unit), CanEnterForeignTiles("May enter foreign tiles without open borders", UniqueTarget.Unit), CanEnterForeignTilesButLosesReligiousStrength("May enter foreign tiles without open borders, but loses [amount] religious strength each turn it ends there", UniqueTarget.Unit), @@ -525,8 +515,6 @@ enum class UniqueType(val text: String, vararg targets: UniqueTarget, val flags: CanBuildOutsideBorders("Can be built outside your borders", UniqueTarget.Improvement), CanBuildJustOutsideBorders("Can be built just outside your borders", UniqueTarget.Improvement), - @Deprecated("As of 3.18.5", ReplaceWith("Cannot be built on [tileFilter] tiles ")) - RequiresTechToBuildOnTile("Cannot be built on [tileFilter] tiles until [tech] is discovered", UniqueTarget.Improvement), CannotBuildOnTile("Cannot be built on [tileFilter] tiles", UniqueTarget.Improvement), NoFeatureRemovalNeeded("Does not need removal of [tileFilter]", UniqueTarget.Improvement), @@ -652,6 +640,16 @@ enum class UniqueType(val text: String, vararg targets: UniqueTarget, val flags: // endregion // region DEPRECATED AND REMOVED + @Deprecated("As of 3.18.2", ReplaceWith("[50]% of excess happiness converted to [Culture]"), DeprecationLevel.ERROR) + ExcessHappinessToCultureDeprecated("50% of excess happiness added to culture towards policies", UniqueTarget.Global), + @Deprecated("As of 3.16.11", ReplaceWith("Not displayed as an available construction without [buildingName]"), DeprecationLevel.ERROR) + NotDisplayedUnlessOtherBuildingBuilt("Not displayed as an available construction unless [buildingName] is built", UniqueTarget.Building), + @Deprecated("As of 3.18.2", ReplaceWith("[-amount]% Food consumption by specialists [cityFilter]"), DeprecationLevel.ERROR) + FoodConsumptionBySpecialistsDeprecated("-[amount]% food consumption by specialists [cityFilter]", UniqueTarget.Global), + @Deprecated("As of 3.18.6", ReplaceWith("Cannot enter ocean tiles "), DeprecationLevel.ERROR) + CannotEnterOceanUntilAstronomy("Cannot enter ocean tiles until Astronomy", UniqueTarget.Unit), + @Deprecated("As of 3.18.5", ReplaceWith("Cannot be built on [tileFilter] tiles "), DeprecationLevel.ERROR) + RequiresTechToBuildOnTile("Cannot be built on [tileFilter] tiles until [tech] is discovered", UniqueTarget.Improvement), @Deprecated("As of 3.17.9, removed as of 3.19.3", ReplaceWith ("May buy [baseUnitFilter] units for [amount] [stat] [cityFilter] at an increasing price ([amount]) "), DeprecationLevel.ERROR) BuyUnitsIncreasingCostEra("May buy [baseUnitFilter] units for [amount] [stat] [cityFilter] starting from the [era] at an increasing price ([amount])", UniqueTarget.Global), diff --git a/docs/uniques.md b/docs/uniques.md index 735fe9e598..4b586d9059 100644 --- a/docs/uniques.md +++ b/docs/uniques.md @@ -347,8 +347,8 @@ Example: "Retain [20]% of the happiness from a luxury after the last copy has be Applicable to: Global -#### [+amount] Happiness from each type of luxury resource -Example: "[+amount] Happiness from each type of luxury resource" +#### [amount] Happiness from each type of luxury resource +Example: "[20] Happiness from each type of luxury resource" Applicable to: Global @@ -1441,8 +1441,6 @@ Applicable to: Conditional - "Happiness from Luxury Resources gifted by City-States increased by [amount]%" - Deprecated As of 3.18.17, replace with "[+amount]% Happiness from luxury resources gifted by City-States" - "[amount]% of food is carried over after population increases" - Deprecated As of 3.19.2, replace with "[amount]% Food is carried over after population increases [cityFilter]" - "[amount]% of food is carried over [cityFilter] after population increases" - Deprecated As of 3.19.2, replace with "[amount]% Food is carried over after population increases [cityFilter]" - - "-[amount]% food consumption by specialists [cityFilter]" - Deprecated As of 3.18.2, replace with "[-amount]% Food consumption by specialists [cityFilter]" - - "50% of excess happiness added to culture towards policies" - Deprecated As of 3.18.2, replace with "[50]% of excess happiness converted to [Culture]" - "[amount]% Culture cost of natural border growth [cityFilter]" - Deprecated As of 3.19.2, replace with "[amount]% Culture cost of natural border growth [cityFilter]" - "-[amount]% Culture cost of acquiring tiles [cityFilter]" - Deprecated As of 3.19.1, replace with "[-amount]% Culture cost of natural border growth [cityFilter]" - "[amount]% cost of natural border growth" - Deprecated As of 3.19.1, replace with "[amount]% Culture cost of natural border growth [cityFilter]" @@ -1465,8 +1463,11 @@ Applicable to: Conditional - "[amount]% Natural religion spread [cityFilter] with [tech/policy]" - Deprecated As of 3.19.3, replace with "[amount]% Natural religion spread [cityFilter] OR [amount]% natural religion spread [cityFilter] " - "[amount] HP when healing in [tileFilter] tiles" - Deprecated As of 3.19.4, replace with "[amount] HP when healing " - "Melee units pay no movement cost to pillage" - Deprecated As of 3.18.17, replace with "No movement cost to pillage " + - "Heal adjacent units for an additional 15 HP per turn" - Deprecated As of 3.19.3, replace with "All adjacent units heal [+15] HP when healing" - "[mapUnitFilter] units gain [amount]% more Experience from combat" - Deprecated As of 3.18.12, replace with "[amount]% XP gained from combat " - "[amount]% maintenance costs for [mapUnitFilter] units" - Deprecated As of 3.18.14, replace with "[amount]% maintenance costs " + - "50% of excess happiness added to culture towards policies" - Deprecated As of 3.18.2, replace with "[50]% of excess happiness converted to [Culture]" + - "-[amount]% food consumption by specialists [cityFilter]" - Deprecated As of 3.18.2, replace with "[-amount]% Food consumption by specialists [cityFilter]" - "May buy [baseUnitFilter] units for [amount] [stat] [cityFilter] starting from the [era] at an increasing price ([amount])" - Deprecated As of 3.17.9, removed as of 3.19.3, replace with "May buy [baseUnitFilter] units for [amount] [stat] [cityFilter] at an increasing price ([amount]) " - "Provides a free [buildingName] [cityFilter]" - Deprecated As of 3.17.7 - removed 3.18.19, replace with "Gain a free [buildingName] [cityFilter]" - "+[amount]% [stat] [cityFilter]" - Deprecated As of 3.17.10 - removed 3.18.18, replace with "[+amount]% [stat] [cityFilter]" @@ -1489,8 +1490,8 @@ Applicable to: Conditional - "+[amount]% Production when constructing [constructionFilter] [cityFilter]" - Deprecated As of 3.17.10 - removed 3.18.5, replace with "[amount]% Production when constructing [buildingFilter] buildings [cityFilter]" - "Not displayed as an available construction unless [buildingName] is built" - Deprecated As of 3.16.11, replace with "Not displayed as an available construction without [buildingName]" - "[stats] once [tech] is discovered" - Deprecated As of 3.17.10 - removed 3.18.19, replace with "[stats] " - - "Cannot enter ocean tiles until Astronomy" - Deprecated As of 3.18.6, replace with "Cannot enter ocean tiles " - "[amount]% Bonus XP gain" - Deprecated As of 3.18.12, replace with "[amount]% XP gained from combat" + - "Cannot enter ocean tiles until Astronomy" - Deprecated As of 3.18.6, replace with "Cannot enter ocean tiles " - "+[amount]% Strength when attacking" - Deprecated As of 3.17.5 - removed 3.18.5, replace with "[+amount]% Strength " - "+[amount]% Strength when defending" - Deprecated As of 3.17.5 - removed 3.18.5, replace with "[+amount]% Strength " - "[amount]% Strength when defending vs [mapUnitFilter] units" - Deprecated As of 3.17.5 - removed 3.18.5, replace with "[amount]% Strength " @@ -1498,7 +1499,7 @@ Applicable to: Conditional - "+[amount]% Strength in [tileFilter]" - Deprecated As of 3.17.5 - removed 3.18.5, replace with "[amount]% Strength " - "[amount] Visibility Range" - Deprecated As of 3.17.5 - removed 3.18.5, replace with "[amount] Sight" - "Limited Visibility" - Deprecated As of 3.17.5 - removed 3.18.5, replace with "[-1] Sight" - - "Cannot be built on [tileFilter] tiles until [tech] is discovered" - Deprecated As of 3.18.5, replace with "Cannot be built on [tileFilter] tiles " - "Deal [amount] damage to adjacent enemy units" - Deprecated As of 3.18.17, replace with "Adjacent enemy units ending their turn take [amount] damage" + - "Cannot be built on [tileFilter] tiles until [tech] is discovered" - Deprecated As of 3.18.5, replace with "Cannot be built on [tileFilter] tiles " - "[stats] on [tileFilter] tiles once [tech] is discovered" - Deprecated As of 3.17.10 - removed 3.18.19, replace with "[stats] from [tileFilter] tiles " - "Deal 30 damage to adjacent enemy units" - Deprecated As of 3.17.10 - removed 3.18.19, replace with "Adjacent enemy units ending their turn take [30] damage" \ No newline at end of file