diff --git a/android/assets/jsons/Civ V - Gods & Kings/Units.json b/android/assets/jsons/Civ V - Gods & Kings/Units.json index 0149d1e84b..19b75ccee8 100644 --- a/android/assets/jsons/Civ V - Gods & Kings/Units.json +++ b/android/assets/jsons/Civ V - Gods & Kings/Units.json @@ -1435,7 +1435,7 @@ "requiredTech": "Nuclear Fission", "requiredResource": "Uranium", "promotions" : ["Evasion"], - "uniques": ["Nuclear weapon of Strength [1]", "Requires [Manhattan Project]", "Self-destructs when attacking", + "uniques": ["Nuclear weapon of Strength [1]", "Only available ", "Self-destructs when attacking", "Blast radius [2]"], "attackSound": "nuke" // Plane rather than a missile - can be based in city or Carrier only. @@ -1489,7 +1489,7 @@ "range": 12, "cost": 1000, "requiredTech": "Advanced Ballistics", - "uniques": ["Nuclear weapon of Strength [2]", "Requires [Manhattan Project]", + "uniques": ["Nuclear weapon of Strength [2]", "Only available ", "Blast radius [2]", "Consumes [2] [Uranium]"], "attackSound": "nuke" }, @@ -1685,7 +1685,7 @@ "cost": 750, "requiredTech": "Advanced Ballistics", "requiredResource": "Aluminum", - "uniques": ["Spaceship part", "Cannot be purchased", "Requires [Apollo Program]", "Uncapturable", "Can be added to [The Spaceship] in the Capital", "Limited to [3] per Civilization"] + "uniques": ["Spaceship part", "Cannot be purchased", "Only available ", "Uncapturable", "Can be added to [The Spaceship] in the Capital", "Limited to [3] per Civilization"] // costs 1500 in BNW }, { @@ -1695,7 +1695,7 @@ "cost": 750, "requiredTech": "Satellites", "requiredResource": "Aluminum", - "uniques": ["Spaceship part", "Cannot be purchased", "Requires [Apollo Program]", "Uncapturable", "Can be added to [The Spaceship] in the Capital", "Limited to [1] per Civilization"] + "uniques": ["Spaceship part", "Cannot be purchased", "Only available ", "Uncapturable", "Can be added to [The Spaceship] in the Capital", "Limited to [1] per Civilization"] // costs 1500 in BNW }, { @@ -1705,7 +1705,7 @@ "cost": 750, "requiredTech": "Particle Physics", "requiredResource": "Aluminum", - "uniques": ["Spaceship part", "Cannot be purchased", "Requires [Apollo Program]", "Uncapturable", "Can be added to [The Spaceship] in the Capital", "Limited to [1] per Civilization"] + "uniques": ["Spaceship part", "Cannot be purchased", "Only available ", "Uncapturable", "Can be added to [The Spaceship] in the Capital", "Limited to [1] per Civilization"] // costs 1500 in BNW }, { @@ -1715,7 +1715,7 @@ "cost": 750, "requiredTech": "Nanotechnology", "requiredResource": "Aluminum", - "uniques": ["Spaceship part", "Cannot be purchased", "Requires [Apollo Program]", "Uncapturable", "Can be added to [The Spaceship] in the Capital", "Limited to [1] per Civilization"] + "uniques": ["Spaceship part", "Cannot be purchased", "Only available ", "Uncapturable", "Can be added to [The Spaceship] in the Capital", "Limited to [1] per Civilization"] // costs 1500 in BNW } ] diff --git a/android/assets/jsons/Civ V - Vanilla/Units.json b/android/assets/jsons/Civ V - Vanilla/Units.json index ac32286d1c..c9b6f64429 100644 --- a/android/assets/jsons/Civ V - Vanilla/Units.json +++ b/android/assets/jsons/Civ V - Vanilla/Units.json @@ -1111,7 +1111,7 @@ "requiredTech": "Nuclear Fission", "requiredResource": "Uranium", "promotions" : ["Evasion"], - "uniques": ["Nuclear weapon of Strength [1]", "Requires [Manhattan Project]", "Self-destructs when attacking", + "uniques": ["Nuclear weapon of Strength [1]", "Only available ", "Self-destructs when attacking", "Blast radius [2]"], "attackSound": "nuke" // Plane rather than a missile - can be based in city or Carrier only. @@ -1165,7 +1165,7 @@ "range": 12, "cost": 1000, "requiredTech": "Advanced Ballistics", - "uniques": ["Nuclear weapon of Strength [2]", "Requires [Manhattan Project]", + "uniques": ["Nuclear weapon of Strength [2]", "Only available ", "Blast radius [2]", "Consumes [2] [Uranium]"], "attackSound": "nuke" }, @@ -1360,7 +1360,7 @@ "cost": 500, "requiredTech": "Robotics", "requiredResource": "Aluminum", - "uniques": ["Spaceship part", "Cannot be purchased", "Requires [Apollo Program]", "Uncapturable", "Can be added to [The Spaceship] in the Capital"] + "uniques": ["Spaceship part", "Cannot be purchased", "Only available ", "Uncapturable", "Can be added to [The Spaceship] in the Capital"] // costs 1500 in BNW }, { @@ -1370,7 +1370,7 @@ "cost": 750, "requiredTech": "Satellites", "requiredResource": "Aluminum", - "uniques": ["Spaceship part", "Cannot be purchased", "Requires [Apollo Program]", "Uncapturable", "Can be added to [The Spaceship] in the Capital"] + "uniques": ["Spaceship part", "Cannot be purchased", "Only available ", "Uncapturable", "Can be added to [The Spaceship] in the Capital"] // costs 1500 in BNW }, { @@ -1380,7 +1380,7 @@ "cost": 750, "requiredTech": "Particle Physics", "requiredResource": "Aluminum", - "uniques": ["Spaceship part", "Cannot be purchased", "Requires [Apollo Program]", "Uncapturable", "Can be added to [The Spaceship] in the Capital"] + "uniques": ["Spaceship part", "Cannot be purchased", "Only available ", "Uncapturable", "Can be added to [The Spaceship] in the Capital"] // costs 1500 in BNW }, { @@ -1390,7 +1390,7 @@ "cost": 750, "requiredTech": "Nanotechnology", "requiredResource": "Aluminum", - "uniques": ["Spaceship part", "Cannot be purchased", "Requires [Apollo Program]", "Uncapturable", "Can be added to [The Spaceship] in the Capital"] + "uniques": ["Spaceship part", "Cannot be purchased", "Only available ", "Uncapturable", "Can be added to [The Spaceship] in the Capital"] // costs 1500 in BNW } ] diff --git a/core/src/com/unciv/models/ruleset/Building.kt b/core/src/com/unciv/models/ruleset/Building.kt index b262839e01..d1a59d2684 100644 --- a/core/src/com/unciv/models/ruleset/Building.kt +++ b/core/src/com/unciv/models/ruleset/Building.kt @@ -538,7 +538,7 @@ class Building : RulesetStatsObject(), INonPerpetualConstruction { rejectionReasons.add(RejectionReason.RequiresTech.apply { "$requiredTech not researched!"}) for (unique in uniqueObjects) { - if (unique.placeholderText != "Unlocked with []" && unique.placeholderText != "Requires []") continue + if (unique.type != UniqueType.UnlockedWith && unique.type != UniqueType.Requires) continue val filter = unique.params[0] when { ruleSet.technologies.contains(filter) -> diff --git a/core/src/com/unciv/models/ruleset/unique/UniqueType.kt b/core/src/com/unciv/models/ruleset/unique/UniqueType.kt index 326f3718a9..1e34c85e0c 100644 --- a/core/src/com/unciv/models/ruleset/unique/UniqueType.kt +++ b/core/src/com/unciv/models/ruleset/unique/UniqueType.kt @@ -317,6 +317,20 @@ enum class UniqueType(val text: String, vararg targets: UniqueTarget, val flags: " OR \"Only available \"" + " OR \"Only available ")) NotDisplayedWithout("Not displayed as an available construction without [buildingName/tech/resource/policy]", UniqueTarget.Building, UniqueTarget.Unit), + + @Deprecated("as of 3.19.12", ReplaceWith("Only available \"" + + " OR \"Only available \"" + + " OR \"Only available \"" + + " OR \"Only available ")) + UnlockedWith("Unlocked with [buildingName/tech/era/policy]", UniqueTarget.Building, UniqueTarget.Unit), + + + @Deprecated("as of 3.19.12", ReplaceWith("Only available \"" + + " OR \"Only available \"" + + " OR \"Only available \"" + + " OR \"Only available ")) + Requires("Requires [buildingName/tech/era/policy]", UniqueTarget.Building, UniqueTarget.Unit), + ConvertFoodToProductionWhenConstructed("Excess Food converted to Production when under construction", UniqueTarget.Building, UniqueTarget.Unit), RequiresPopulation("Requires at least [amount] population", UniqueTarget.Building, UniqueTarget.Unit), diff --git a/core/src/com/unciv/models/ruleset/unit/BaseUnit.kt b/core/src/com/unciv/models/ruleset/unit/BaseUnit.kt index e3b2f78f49..22c2f4447e 100644 --- a/core/src/com/unciv/models/ruleset/unit/BaseUnit.kt +++ b/core/src/com/unciv/models/ruleset/unit/BaseUnit.kt @@ -393,7 +393,8 @@ class BaseUnit : RulesetObject(), INonPerpetualConstruction { if (!civInfo.gameInfo.gameParameters.nuclearWeaponsEnabled && isNuclearWeapon()) rejectionReasons.add(RejectionReason.DisabledBySetting) - for (unique in getMatchingUniques("Unlocked with []") + getMatchingUniques("Requires []")) { + // This should be deprecated and replaced with the already-existing "only available when" unique, see above + for (unique in getMatchingUniques(UniqueType.UnlockedWith) + getMatchingUniques(UniqueType.Requires)) { val filter = unique.params[0] when { ruleSet.technologies.contains(filter) -> diff --git a/docs/uniques.md b/docs/uniques.md index 8c5c720862..8b31a8faec 100644 --- a/docs/uniques.md +++ b/docs/uniques.md @@ -837,6 +837,21 @@ Example: "Obsolete with [Agriculture]" Applicable to: Building, Improvement, Resource +#### Indicates the capital city +Applicable to: Building + +#### Provides 1 extra copy of each improved luxury resource near this City +Applicable to: Building + +#### Destroyed when the city is captured +Applicable to: Building + +#### Never destroyed when the city is captured +Applicable to: Building + +#### Doubles Gold given to enemy if city is captured +Applicable to: Building + #### Remove extra unhappiness from annexed cities Applicable to: Building @@ -1237,6 +1252,9 @@ Applicable to: Improvement #### Indestructible Applicable to: Improvement +#### Irremovable +Applicable to: Improvement + ## Resource uniques #### Generated with weight [amount] Example: "Generated with weight [20]" @@ -1634,6 +1652,8 @@ Applicable to: Conditional - "+50% attacking strength for cities with garrisoned units" - Deprecated Extremely old - used for auto-updates only, replace with "[+50]% Strength for cities " - "Incompatible with [policy/tech/promotion]" - Deprecated as of 3.19.8, replace with "Only available " OR "Only available " OR "Only available " - "Not displayed as an available construction without [buildingName/tech/resource/policy]" - Deprecated as of 3.19.8, replace with "Only available " OR "Only available " OR "Only available " OR "Only available " + - "Unlocked with [buildingName/tech/era/policy]" - Deprecated as of 3.19.12, replace with "Only available " OR "Only available " OR "Only available " OR "Only available " + - "Requires [buildingName/tech/era/policy]" - Deprecated as of 3.19.12, replace with "Only available " OR "Only available " OR "Only available " OR "Only available " - "Cannot be built with [buildingName]" - Deprecated as of 3.19.9, replace with "Only available " - "Requires a [buildingName] in this city" - Deprecated as of 3.19.9, replace with "Only available " - "[stats] with [resource]" - Deprecated as of 3.19.7, replace with "[stats] "