From 69db6861016f3f4af94de1ed437ec60b15754cda Mon Sep 17 00:00:00 2001 From: yairm210 Date: Fri, 3 Dec 2021 11:01:55 +0200 Subject: [PATCH] Moved all fully deprecated uniques to their own region down below Slight steps towards stat percent bonus calculation efficiency in CityStats --- core/src/com/unciv/logic/city/CityStats.kt | 35 ++-- .../unciv/models/ruleset/unique/UniqueType.kt | 184 ++++++++++-------- docs/uniques.md | 5 + 3 files changed, 121 insertions(+), 103 deletions(-) diff --git a/core/src/com/unciv/logic/city/CityStats.kt b/core/src/com/unciv/logic/city/CityStats.kt index d53c5f13e3..b7a6ae24ef 100644 --- a/core/src/com/unciv/logic/city/CityStats.kt +++ b/core/src/com/unciv/logic/city/CityStats.kt @@ -215,26 +215,23 @@ class CityStats(val cityInfo: CityInfo) { if (!cityInfo.civInfo.hasTechOrPolicy(unique.params[1])) addUniqueStats(unique) - - fun rename(source: String, displayedSource: String) { - if (!sourceToStats.containsKey(source)) return - sourceToStats.add(displayedSource, sourceToStats[source]!!) - sourceToStats.remove(source) - } - rename("Wonder", "Wonders") - rename("Building", "Buildings") - rename("Policy", "Policies") + renameStatmapKeys(sourceToStats) return sourceToStats } - private fun getStatsFromUniques(uniques: Sequence): Stats { - val stats = Stats() - - - return stats + private fun renameStatmapKeys(statMap: StatMap){ + fun rename(source: String, displayedSource: String) { + if (!statMap.containsKey(source)) return + statMap.add(displayedSource, statMap[source]!!) + statMap.remove(source) + } + rename("Wonder", "Wonders") + rename("Building", "Buildings") + rename("Policy", "Policies") } + private fun getStatPercentBonusesFromGoldenAge(isGoldenAge: Boolean): Stats { val stats = Stats() if (isGoldenAge) { @@ -245,10 +242,10 @@ class CityStats(val cityInfo: CityInfo) { } private fun getStatPercentBonusesFromUniques(currentConstruction: IConstruction, uniqueSequence: Sequence): Stats { + val stats = Stats() - val uniques = uniqueSequence.toList().asSequence() val uniqueMap = UniqueMapTyped() - for (unique in uniques) uniqueMap.addUnique(unique) + for (unique in uniqueSequence) uniqueMap.addUnique(unique) // Since this is sometimes run from a different thread (getConstructionButtonDTOs), // this helps mitigate concurrency problems. @@ -259,7 +256,7 @@ class CityStats(val cityInfo: CityInfo) { // Deprecated since 3.17.0 // For instance "+[50]% [Production] - for (unique in uniques.filter { it.type == UniqueType.StatPercentBonusCitiesDeprecated2}) + for (unique in uniqueMap.getUniques(UniqueType.StatPercentBonusCitiesDeprecated2)) stats.add(Stat.valueOf(unique.params[1]), unique.params[0].toFloat()) // @@ -296,12 +293,12 @@ class CityStats(val cityInfo: CityInfo) { // Deprecated since 3.17.1 if (cityInfo.civInfo.getHappiness() >= 0) { - for (unique in uniques.filter { it.type == UniqueType.StatPercentBonusCitiesDeprecatedWhileEmpireHappy}) + for (unique in uniqueMap.getUniques(UniqueType.StatPercentBonusCitiesDeprecatedWhileEmpireHappy)) stats.add(Stat.valueOf(unique.params[1]), unique.params[0].toFloat()) } // - for (unique in uniques.filter { it.type == UniqueType.StatPercentFromReligionFollowers }) + for (unique in uniqueMap.getUniques(UniqueType.StatPercentFromReligionFollowers)) stats.add( Stat.valueOf(unique.params[1]), min( diff --git a/core/src/com/unciv/models/ruleset/unique/UniqueType.kt b/core/src/com/unciv/models/ruleset/unique/UniqueType.kt index f44e390d0a..9087cdfccb 100644 --- a/core/src/com/unciv/models/ruleset/unique/UniqueType.kt +++ b/core/src/com/unciv/models/ruleset/unique/UniqueType.kt @@ -67,12 +67,8 @@ enum class UniqueType(val text:String, vararg targets: UniqueTarget, val flags: Stats("[stats]", UniqueTarget.Global, UniqueTarget.FollowerBelief, UniqueTarget.Improvement), StatsPerCity("[stats] [cityFilter]", UniqueTarget.Global), - @Deprecated("As of 3.16.16 - removed 3.17.11", ReplaceWith("[stats] "), DeprecationLevel.ERROR) - StatBonusForNumberOfSpecialists("[stats] if this city has at least [amount] specialists", UniqueTarget.Global), StatsFromSpecialist("[stats] from every specialist [cityFilter]", UniqueTarget.Global), - @Deprecated("As of 3.16.16 - removed 3.17.11", ReplaceWith("[stats] from every specialist [in all cities]"), DeprecationLevel.ERROR) - StatsFromSpecialistDeprecated("[stats] from every specialist", UniqueTarget.Global), StatsPerPopulation("[stats] per [amount] population [cityFilter]", UniqueTarget.Global), StatsFromXPopulation("[stats] in cities with [amount] or more population", UniqueTarget.Global, UniqueTarget.FollowerBelief), @@ -106,24 +102,10 @@ enum class UniqueType(val text:String, vararg targets: UniqueTarget, val flags: PercentProductionBuildings("[amount]% Production when constructing [buildingFilter] buildings [cityFilter]", UniqueTarget.Global), PercentProductionUnits("[amount]% Production when constructing [baseUnitFilter] units [cityFilter]", UniqueTarget.Global), - @Deprecated("As of 3.17.10 - removed 3.18.5", ReplaceWith("[amount]% Production when constructing [buildingFilter] buildings [cityFilter]"), DeprecationLevel.ERROR) - PercentProductionStatBuildings("+[amount]% Production when constructing [stat] buildings", UniqueTarget.Global), - @Deprecated("As of 3.17.10 - removed 3.18.5", ReplaceWith("[amount]% Production when constructing [buildingFilter] buildings [cityFilter]"), DeprecationLevel.ERROR) - PercentProductionConstructions("+[amount]% Production when constructing [constructionFilter]", UniqueTarget.Global), - @Deprecated("As of 3.17.10 - removed 3.18.5", ReplaceWith("[amount]% Production when constructing [buildingFilter] buildings [cityFilter]"), DeprecationLevel.ERROR) - PercentProductionBuildingName("+[amount]% Production when constructing a [buildingName]", UniqueTarget.Global), - @Deprecated("As of 3.17.10 - removed 3.18.5", ReplaceWith("[amount]% Production when constructing [buildingFilter] buildings [cityFilter]"), DeprecationLevel.ERROR) - PercentProductionConstructionsCities("+[amount]% Production when constructing [constructionFilter] [cityFilter]", UniqueTarget.Global), - @Deprecated("As of 3.17.10 - removed 3.18.5", ReplaceWith("[+amount]% Production when constructing [baseUnitFilter] units [cityFilter]"), DeprecationLevel.ERROR) - PercentProductionUnitsDeprecated("+[amount]% Production when constructing [baseUnitFilter] units [cityFilter]", 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 - removed 3.17.11", ReplaceWith("[amount]% unhappiness from population [cityFilter]"), DeprecationLevel.ERROR) - UnhappinessFromPopulationPercentageChangeOld1("Unhappiness from population decreased by [amount]%", UniqueTarget.Global), - @Deprecated("As of 3.16.11 - removed 3.17.11", ReplaceWith("[amount]% unhappiness from population [cityFilter]"), DeprecationLevel.ERROR) - UnhappinessFromPopulationPercentageChangeOld2("Unhappiness from population decreased by [amount]% [cityFilter]", UniqueTarget.Global), // region City-State related uniques @@ -149,19 +131,12 @@ enum class UniqueType(val text:String, vararg targets: UniqueTarget, val flags: FreeUnits("[amount] units cost no maintenance", UniqueTarget.Global), UnitMaintenanceDiscountGlobal("[amount]% maintenance costs for [mapUnitFilter] units", UniqueTarget.Global), - @Deprecated("As of 3.16.16 - removed as of 3.17.11", ReplaceWith("[amount]% maintenance costs for [mapUnitFilter] units"), DeprecationLevel.ERROR) - DecreasedUnitMaintenanceCostsByFilter("-[amount]% [mapUnitFilter] unit maintenance costs", UniqueTarget.Global), - @Deprecated("As of 3.16.16 - removed 3.17.11", ReplaceWith("[amount]% maintenance costs for [mapUnitFilter] units"), DeprecationLevel.ERROR) - DecreasedUnitMaintenanceCostsGlobally("-[amount]% unit upkeep costs", UniqueTarget.Global), ConsumesResources("Consumes [amount] [resource]", UniqueTarget.Improvement, UniqueTarget.Building, UniqueTarget.Unit), ProvidesResources("Provides [amount] [resource]", UniqueTarget.Improvement, UniqueTarget.Building), GrowthPercentBonus("[amount]% growth [cityFilter]", UniqueTarget.Global, UniqueTarget.FollowerBelief), - @Deprecated("As of 3.16.14 - removed 3.17.11", ReplaceWith("[amount]% growth [cityFilter]"), DeprecationLevel.ERROR) - GrowthPercentBonusPositive("+[amount]% growth [cityFilter]", UniqueTarget.Global), - @Deprecated("As of 3.16.14 - removed 3.17.11", ReplaceWith("[amount]% growth [cityFilter] "), DeprecationLevel.ERROR) - GrowthPercentBonusWhenNotAtWar("+[amount]% growth [cityFilter] when not at war", UniqueTarget.Global), + GainFreeBuildings("Gain a free [buildingName] [cityFilter]", UniqueTarget.Global), @Deprecated("As of 3.17.7", ReplaceWith("Gain a free [buildingName] [cityFilter]"), DeprecationLevel.WARNING) @@ -245,35 +220,6 @@ enum class UniqueType(val text:String, vararg targets: UniqueTarget, val flags: Strength("[amount]% Strength", UniqueTarget.Unit, UniqueTarget.Global), StrengthNearCapital("[amount]% Strength decreasing with distance from the capital", UniqueTarget.Unit), - @Deprecated("As of 3.17.3 - removed 3.17.13", ReplaceWith("[amount]% Strength"), DeprecationLevel.ERROR) - StrengthPlus("+[amount]% Strength", UniqueTarget.Unit), - @Deprecated("As of 3.17.3 - removed 3.17.13", ReplaceWith("[amount]% Strength"), DeprecationLevel.ERROR) - StrengthMin("-[amount]% Strength", UniqueTarget.Unit), - @Deprecated("As of 3.17.3 - removed 3.17.13", ReplaceWith("[amount]% Strength /"), DeprecationLevel.ERROR) - StrengthPlusVs("+[amount]% Strength vs [combatantFilter]", UniqueTarget.Unit), - @Deprecated("As of 3.17.3 - removed 3.17.13", ReplaceWith("[amount]% Strength /"), DeprecationLevel.ERROR) - StrengthMinVs("-[amount]% Strength vs [combatantFilter]", UniqueTarget.Unit), - @Deprecated("As of 3.17.3 - removed 3.17.13", ReplaceWith("[amount]% Strength"), DeprecationLevel.ERROR) - CombatBonus("+[amount]% Combat Strength", UniqueTarget.Unit), - @Deprecated("As of 3.17.5 - removed 3.18.5", ReplaceWith("[amount]% Strength "), DeprecationLevel.ERROR) - StrengthAttacking("+[amount]% Strength when attacking", UniqueTarget.Unit), - @Deprecated("As of 3.17.5 - removed 3.18.5", ReplaceWith("[amount]% Strength "), DeprecationLevel.ERROR) - StrengthDefending("+[amount]% Strength when defending", UniqueTarget.Unit), - @Deprecated("As of 3.17.5 - removed 3.18.5", ReplaceWith("[amount]% Strength "), DeprecationLevel.ERROR) - StrengthDefendingUnitFilter("[amount]% Strength when defending vs [mapUnitFilter] units", UniqueTarget.Unit), - @Deprecated("As of 3.17.5 - removed 3.18.5", ReplaceWith("[amount]% Strength "), DeprecationLevel.ERROR) - DamageForUnits("[mapUnitFilter] units deal +[amount]% damage", UniqueTarget.Global), - @Deprecated("As of 3.17.5 - removed 3.18.5", ReplaceWith("[+10]% Strength "), DeprecationLevel.ERROR) - StrengthGoldenAge("+10% Strength for all units during Golden Age", UniqueTarget.Global), - @Deprecated("As of 3.17.5 - removed 3.18.5", ReplaceWith("[amount]% Strength "), DeprecationLevel.ERROR) - StrengthDefenseTiles("+[amount]% defence in [tileFilter] tiles", UniqueTarget.Unit), - @Deprecated("As of 3.17.5 - removed 3.18.5", ReplaceWith("[amount]% Strength "), DeprecationLevel.ERROR) - StrengthIn("+[amount]% Strength in [tileFilter]", UniqueTarget.Unit), - @Deprecated("As of 3.17.5 - removed 3.18.5", ReplaceWith("[amount]% Strength "), DeprecationLevel.ERROR) - StrengthUnitsTiles("[amount]% Strength for [mapUnitFilter] units in [tileFilter]", UniqueTarget.Global), - @Deprecated("As of 3.17.5 - removed 3.18.5", ReplaceWith("[+15]% Strength "), DeprecationLevel.ERROR) - StrengthVsCities("+15% Combat Strength for all units when attacking Cities", UniqueTarget.Global), - Movement("[amount] Movement", UniqueTarget.Unit, UniqueTarget.Global), Sight("[amount] Sight", UniqueTarget.Unit, UniqueTarget.Global), @@ -284,26 +230,8 @@ enum class UniqueType(val text:String, vararg targets: UniqueTarget, val flags: CannotAttack("Cannot attack", UniqueTarget.Unit), MustSetUp("Must set up to ranged attack", UniqueTarget.Unit), - @Deprecated("As of 3.16.11 - removed 3.17.11", ReplaceWith("[+1] Movement "), DeprecationLevel.ERROR) - EmbarkedUnitMovement1("Increases embarked movement +1", UniqueTarget.Global), - @Deprecated("As of 3.16.11 - removed 3.17.11", ReplaceWith("[+1] Movement "), DeprecationLevel.ERROR) - EmbarkedUnitMovement2("+1 Movement for all embarked units", UniqueTarget.Global), - @Deprecated("As of 3.17.5 - removed 3.18.5", ReplaceWith("[amount] Movement "), DeprecationLevel.ERROR) - MovementUnits("+[amount] Movement for all [mapUnitFilter] units", UniqueTarget.Global), - @Deprecated("As of 3.17.5 - removed 3.18.5", ReplaceWith("[amount] Movement "), DeprecationLevel.ERROR) - MovementGoldenAge("+1 Movement for all units during Golden Age", UniqueTarget.Global), - - @Deprecated("As of 3.17.5 - removed 3.18.5", ReplaceWith("[amount] Sight "), DeprecationLevel.ERROR) - SightUnits("[amount] Sight for all [mapUnitFilter] units", UniqueTarget.Global), - @Deprecated("As of 3.17.5 - removed 3.18.5", ReplaceWith("[amount] Sight"), DeprecationLevel.ERROR) - VisibilityRange("[amount] Visibility Range", UniqueTarget.Unit), - @Deprecated("As of 3.17.5 - removed 3.18.5", ReplaceWith("[-1] Sight"), DeprecationLevel.ERROR) - LimitedVisibility("Limited Visibility", UniqueTarget.Unit), - SixTilesAlwaysVisible("6 tiles in every direction always visible", UniqueTarget.Unit), - @Deprecated("As of 3.17.5 - removed 3.18.5", ReplaceWith("[amount]% Spread Religion Strength "), DeprecationLevel.ERROR) - SpreadReligionStrengthUnits("[amount]% Spread Religion Strength for [mapUnitFilter] units", UniqueTarget.Global), BlastRadius("Blast radius [amount]", UniqueTarget.Unit), @@ -315,12 +243,6 @@ enum class UniqueType(val text:String, vararg targets: UniqueTarget, val flags: // The following block gets cached in MapUnit for faster getMovementCostBetweenAdjacentTiles DoubleMovementOnTerrain("Double movement in [terrainFilter]", UniqueTarget.Unit), - @Deprecated("As of 3.17.1 - removed 3.17.13", ReplaceWith("Double movement in [terrainFilter]"), DeprecationLevel.ERROR) - DoubleMovementCoast("Double movement in coast", UniqueTarget.Unit), - @Deprecated("As of 3.17.1 - removed 3.17.13", ReplaceWith("Double movement in [terrainFilter]"), DeprecationLevel.ERROR) - DoubleMovementForestJungle("Double movement rate through Forest and Jungle", UniqueTarget.Unit), - @Deprecated("As of 3.17.1 - removed 3.17.13", ReplaceWith("Double movement in [terrainFilter]"), DeprecationLevel.ERROR) - DoubleMovementSnowTundraHill("Double movement in Snow, Tundra and Hills", UniqueTarget.Unit), AllTilesCost1Move("All tiles cost 1 movement", UniqueTarget.Unit), CanPassImpassable("Can pass through impassable tiles", UniqueTarget.Unit), IgnoresTerrainCost("Ignores terrain cost", UniqueTarget.Unit), @@ -511,11 +433,6 @@ enum class UniqueType(val text:String, vararg targets: UniqueTarget, val flags: TimedAttackStrength("+[amount]% attack strength to all [mapUnitFilter] Units for [amount] turns", UniqueTarget.Global), // used in Policy FreeStatBuildings("Provides the cheapest [stat] building in your first [amount] cities for free", UniqueTarget.Global), // used in Policy FreeSpecificBuildings("Provides a [buildingName] in your first [amount] cities for free", UniqueTarget.Global), // used in Policy - - @Deprecated("As of 3.16.15 - removed 3.18.4", ReplaceWith("Provides the cheapest [stat] building in your first [amount] cities for free"), DeprecationLevel.ERROR) - FreeStatBuildingsDeprecated("Immediately creates the cheapest available cultural building in each of your first [amount] cities for free", UniqueTarget.Global), - @Deprecated("As of 3.16.15 - removed 3.18.4", ReplaceWith("Provides a [buildingName] in your first [amount] cities for free"), DeprecationLevel.ERROR) - FreeSpecificBuildingsDeprecated("Immediately creates a [buildingName] in each of your first [amount] cities for free", UniqueTarget.Global), //endregion @@ -527,6 +444,105 @@ enum class UniqueType(val text:String, vararg targets: UniqueTarget, val flags: HiddenAfterPantheon("Hidden after founding a Pantheon", UniqueTarget.Ruins), HiddenAfterGreatProphet("Hidden after generating a Great Prophet", UniqueTarget.Ruins), AvailableAfterCertainTurns("Only available after [amount] turns", UniqueTarget.Ruins), + + + // region DEPRECATED AND REMOVED + + @Deprecated("As of 3.16.15 - removed 3.18.4", ReplaceWith("Provides the cheapest [stat] building in your first [amount] cities for free"), DeprecationLevel.ERROR) + FreeStatBuildingsDeprecated("Immediately creates the cheapest available cultural building in each of your first [amount] cities for free", UniqueTarget.Global), + @Deprecated("As of 3.16.15 - removed 3.18.4", ReplaceWith("Provides a [buildingName] in your first [amount] cities for free"), DeprecationLevel.ERROR) + FreeSpecificBuildingsDeprecated("Immediately creates a [buildingName] in each of your first [amount] cities for free", UniqueTarget.Global), + + @Deprecated("As of 3.17.1 - removed 3.17.13", ReplaceWith("Double movement in [terrainFilter]"), DeprecationLevel.ERROR) + DoubleMovementCoast("Double movement in coast", UniqueTarget.Unit), + @Deprecated("As of 3.17.1 - removed 3.17.13", ReplaceWith("Double movement in [terrainFilter]"), DeprecationLevel.ERROR) + DoubleMovementForestJungle("Double movement rate through Forest and Jungle", UniqueTarget.Unit), + @Deprecated("As of 3.17.1 - removed 3.17.13", ReplaceWith("Double movement in [terrainFilter]"), DeprecationLevel.ERROR) + DoubleMovementSnowTundraHill("Double movement in Snow, Tundra and Hills", UniqueTarget.Unit), + + + @Deprecated("As of 3.17.3 - removed 3.17.13", ReplaceWith("[amount]% Strength"), DeprecationLevel.ERROR) + StrengthPlus("+[amount]% Strength", UniqueTarget.Unit), + @Deprecated("As of 3.17.3 - removed 3.17.13", ReplaceWith("[amount]% Strength"), DeprecationLevel.ERROR) + StrengthMin("-[amount]% Strength", UniqueTarget.Unit), + @Deprecated("As of 3.17.3 - removed 3.17.13", ReplaceWith("[amount]% Strength /"), DeprecationLevel.ERROR) + StrengthPlusVs("+[amount]% Strength vs [combatantFilter]", UniqueTarget.Unit), + @Deprecated("As of 3.17.3 - removed 3.17.13", ReplaceWith("[amount]% Strength /"), DeprecationLevel.ERROR) + StrengthMinVs("-[amount]% Strength vs [combatantFilter]", UniqueTarget.Unit), + @Deprecated("As of 3.17.3 - removed 3.17.13", ReplaceWith("[amount]% Strength"), DeprecationLevel.ERROR) + CombatBonus("+[amount]% Combat Strength", UniqueTarget.Unit), + @Deprecated("As of 3.17.5 - removed 3.18.5", ReplaceWith("[amount]% Strength "), DeprecationLevel.ERROR) + StrengthAttacking("+[amount]% Strength when attacking", UniqueTarget.Unit), + @Deprecated("As of 3.17.5 - removed 3.18.5", ReplaceWith("[amount]% Strength "), DeprecationLevel.ERROR) + StrengthDefending("+[amount]% Strength when defending", UniqueTarget.Unit), + @Deprecated("As of 3.17.5 - removed 3.18.5", ReplaceWith("[amount]% Strength "), DeprecationLevel.ERROR) + StrengthDefendingUnitFilter("[amount]% Strength when defending vs [mapUnitFilter] units", UniqueTarget.Unit), + @Deprecated("As of 3.17.5 - removed 3.18.5", ReplaceWith("[amount]% Strength "), DeprecationLevel.ERROR) + DamageForUnits("[mapUnitFilter] units deal +[amount]% damage", UniqueTarget.Global), + @Deprecated("As of 3.17.5 - removed 3.18.5", ReplaceWith("[+10]% Strength "), DeprecationLevel.ERROR) + StrengthGoldenAge("+10% Strength for all units during Golden Age", UniqueTarget.Global), + @Deprecated("As of 3.17.5 - removed 3.18.5", ReplaceWith("[amount]% Strength "), DeprecationLevel.ERROR) + StrengthDefenseTiles("+[amount]% defence in [tileFilter] tiles", UniqueTarget.Unit), + @Deprecated("As of 3.17.5 - removed 3.18.5", ReplaceWith("[amount]% Strength "), DeprecationLevel.ERROR) + StrengthIn("+[amount]% Strength in [tileFilter]", UniqueTarget.Unit), + @Deprecated("As of 3.17.5 - removed 3.18.5", ReplaceWith("[amount]% Strength "), DeprecationLevel.ERROR) + StrengthUnitsTiles("[amount]% Strength for [mapUnitFilter] units in [tileFilter]", UniqueTarget.Global), + @Deprecated("As of 3.17.5 - removed 3.18.5", ReplaceWith("[+15]% Strength "), DeprecationLevel.ERROR) + StrengthVsCities("+15% Combat Strength for all units when attacking Cities", UniqueTarget.Global), + + + @Deprecated("As of 3.16.11 - removed 3.17.11", ReplaceWith("[+1] Movement "), DeprecationLevel.ERROR) + EmbarkedUnitMovement1("Increases embarked movement +1", UniqueTarget.Global), + @Deprecated("As of 3.16.11 - removed 3.17.11", ReplaceWith("[+1] Movement "), DeprecationLevel.ERROR) + EmbarkedUnitMovement2("+1 Movement for all embarked units", UniqueTarget.Global), + @Deprecated("As of 3.17.5 - removed 3.18.5", ReplaceWith("[amount] Movement "), DeprecationLevel.ERROR) + MovementUnits("+[amount] Movement for all [mapUnitFilter] units", UniqueTarget.Global), + @Deprecated("As of 3.17.5 - removed 3.18.5", ReplaceWith("[amount] Movement "), DeprecationLevel.ERROR) + MovementGoldenAge("+1 Movement for all units during Golden Age", UniqueTarget.Global), + + @Deprecated("As of 3.17.5 - removed 3.18.5", ReplaceWith("[amount] Sight "), DeprecationLevel.ERROR) + SightUnits("[amount] Sight for all [mapUnitFilter] units", UniqueTarget.Global), + @Deprecated("As of 3.17.5 - removed 3.18.5", ReplaceWith("[amount] Sight"), DeprecationLevel.ERROR) + VisibilityRange("[amount] Visibility Range", UniqueTarget.Unit), + @Deprecated("As of 3.17.5 - removed 3.18.5", ReplaceWith("[-1] Sight"), DeprecationLevel.ERROR) + LimitedVisibility("Limited Visibility", UniqueTarget.Unit), + + @Deprecated("As of 3.17.5 - removed 3.18.5", ReplaceWith("[amount]% Spread Religion Strength "), DeprecationLevel.ERROR) + SpreadReligionStrengthUnits("[amount]% Spread Religion Strength for [mapUnitFilter] units", UniqueTarget.Global), + + @Deprecated("As of 3.16.11 - removed 3.17.11", ReplaceWith("[amount]% unhappiness from population [cityFilter]"), DeprecationLevel.ERROR) + UnhappinessFromPopulationPercentageChangeOld1("Unhappiness from population decreased by [amount]%", UniqueTarget.Global), + @Deprecated("As of 3.16.11 - removed 3.17.11", ReplaceWith("[amount]% unhappiness from population [cityFilter]"), DeprecationLevel.ERROR) + UnhappinessFromPopulationPercentageChangeOld2("Unhappiness from population decreased by [amount]% [cityFilter]", UniqueTarget.Global), + @Deprecated("As of 3.17.10 - removed 3.18.5", ReplaceWith("[+amount]% Production when constructing [baseUnitFilter] units [cityFilter]"), DeprecationLevel.ERROR) + PercentProductionUnitsDeprecated("+[amount]% Production when constructing [baseUnitFilter] units [cityFilter]", UniqueTarget.Global), + + @Deprecated("As of 3.16.14 - removed 3.17.11", ReplaceWith("[amount]% growth [cityFilter]"), DeprecationLevel.ERROR) + GrowthPercentBonusPositive("+[amount]% growth [cityFilter]", UniqueTarget.Global), + @Deprecated("As of 3.16.14 - removed 3.17.11", ReplaceWith("[amount]% growth [cityFilter] "), DeprecationLevel.ERROR) + GrowthPercentBonusWhenNotAtWar("+[amount]% growth [cityFilter] when not at war", UniqueTarget.Global), + @Deprecated("As of 3.16.16 - removed as of 3.17.11", ReplaceWith("[amount]% maintenance costs for [mapUnitFilter] units"), DeprecationLevel.ERROR) + DecreasedUnitMaintenanceCostsByFilter("-[amount]% [mapUnitFilter] unit maintenance costs", UniqueTarget.Global), + @Deprecated("As of 3.16.16 - removed 3.17.11", ReplaceWith("[amount]% maintenance costs for [mapUnitFilter] units"), DeprecationLevel.ERROR) + DecreasedUnitMaintenanceCostsGlobally("-[amount]% unit upkeep costs", UniqueTarget.Global), + + @Deprecated("As of 3.17.10 - removed 3.18.5", ReplaceWith("[amount]% Production when constructing [buildingFilter] buildings [cityFilter]"), DeprecationLevel.ERROR) + PercentProductionStatBuildings("+[amount]% Production when constructing [stat] buildings", UniqueTarget.Global), + @Deprecated("As of 3.17.10 - removed 3.18.5", ReplaceWith("[amount]% Production when constructing [buildingFilter] buildings [cityFilter]"), DeprecationLevel.ERROR) + PercentProductionConstructions("+[amount]% Production when constructing [constructionFilter]", UniqueTarget.Global), + @Deprecated("As of 3.17.10 - removed 3.18.5", ReplaceWith("[amount]% Production when constructing [buildingFilter] buildings [cityFilter]"), DeprecationLevel.ERROR) + PercentProductionBuildingName("+[amount]% Production when constructing a [buildingName]", UniqueTarget.Global), + @Deprecated("As of 3.17.10 - removed 3.18.5", ReplaceWith("[amount]% Production when constructing [buildingFilter] buildings [cityFilter]"), DeprecationLevel.ERROR) + PercentProductionConstructionsCities("+[amount]% Production when constructing [constructionFilter] [cityFilter]", UniqueTarget.Global), + + @Deprecated("As of 3.16.16 - removed 3.17.11", ReplaceWith("[stats] from every specialist [in all cities]"), DeprecationLevel.ERROR) + StatsFromSpecialistDeprecated("[stats] from every specialist", UniqueTarget.Global), + @Deprecated("As of 3.16.16 - removed 3.17.11", ReplaceWith("[stats] "), DeprecationLevel.ERROR) + StatBonusForNumberOfSpecialists("[stats] if this city has at least [amount] specialists", UniqueTarget.Global), + + + // endregion + ; /** For uniques that have "special" parameters that can accept multiple types, we can override them manually diff --git a/docs/uniques.md b/docs/uniques.md index e8973d73f0..4b9c325a30 100644 --- a/docs/uniques.md +++ b/docs/uniques.md @@ -348,6 +348,11 @@ Example: "Can be purchased for [20] [Culture] [in all cities]" Applicable to: Building, Unit +#### Limited to [amount] per Civilization +Example: "Limited to [20] per Civilization" + +Applicable to: Building, Unit + #### Cost increases by [amount] per owned city Example: "Cost increases by [20] per owned city"