From c89041e2d437586b63b367374c87bc0b1e7c30b6 Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Sat, 15 Aug 2020 21:58:26 +0300 Subject: [PATCH] Changed all "[] from [] tiles" to "[] from every []" --- android/assets/jsons/Civ V - Vanilla/Buildings.json | 12 ++++++------ android/assets/jsons/Civ V - Vanilla/Nations.json | 2 +- core/src/com/unciv/logic/map/TileInfo.kt | 4 +++- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/android/assets/jsons/Civ V - Vanilla/Buildings.json b/android/assets/jsons/Civ V - Vanilla/Buildings.json index 2e9217a9..dd50052b 100644 --- a/android/assets/jsons/Civ V - Vanilla/Buildings.json +++ b/android/assets/jsons/Civ V - Vanilla/Buildings.json @@ -167,7 +167,7 @@ "greatPersonPoints": {"gold": 1}, "isWonder": true, "uniques": ["Provides a sum of gold each time you spend a Great Person", - "[+2 Gold] from [Marble] tiles", "[+2 Gold] from [Stone] tiles"] + "[+2 Gold] from every [Marble]", "[+2 Gold] from every [Stone]"] "requiredTech": "Masonry" "quote": "'The whole earth is the tomb of heroic men and their story is not given only on stone over their clay but abides everywhere without visible symbol woven into the stuff of other men's lives.' - Pericles" }, @@ -179,7 +179,7 @@ "hurryCostModifier": 25, "maintenance": 1, "resourceBonusStats": {"food": 1}, - "uniques": ["Can only be built in coastal cities", "[+1 Food] from [Ocean] tiles", "[+1 Food] from [Coast] tiles"] + "uniques": ["Can only be built in coastal cities", "[+1 Food] from every [Ocean]", "[+1 Food] from every [Coast]"] "requiredTech": "Optics" }, { @@ -298,7 +298,7 @@ "hurryCostModifier": 25, "percentStatBonus": {"gold": 25}, "uniques": ["Provides 1 extra copy of each improved luxury resource near this City", - "[+2 Gold] from [Oil] tiles", "[+2 Gold] from [Oasis] tiles"], + "[+2 Gold] from every [Oil]", "[+2 Gold] from every [Oasis]"], "requiredTech": "Currency" }, { @@ -411,7 +411,7 @@ "production": 2, "specialistSlots": {"production": 1}, "hurryCostModifier": 25, - "uniques": ["[+1 Production] from [Forest] tiles"], + "uniques": ["[+1 Production] from every [Forest]"], "requiredTech": "Metal Casting" }, { @@ -438,7 +438,7 @@ "percentStatBonus": {"science": 33}, "specialistSlots": {"science": 2}, "requiredBuilding": "Library", - "uniques": ["[+2 Science] from [Jungle] tiles"], + "uniques": ["[+2 Science] from every [Jungle]"], "requiredTech": "Education" }, { @@ -451,7 +451,7 @@ "specialistSlots": {"science": 2}, "culture": 3, "requiredBuilding": "Library", - "uniques": ["[+2 Science] from [Jungle] tiles"], + "uniques": ["[+2 Science] from every [Jungle]"], "requiredTech": "Education" }, { diff --git a/android/assets/jsons/Civ V - Vanilla/Nations.json b/android/assets/jsons/Civ V - Vanilla/Nations.json index 3f02ead9..4c1de8e2 100644 --- a/android/assets/jsons/Civ V - Vanilla/Nations.json +++ b/android/assets/jsons/Civ V - Vanilla/Nations.json @@ -195,7 +195,7 @@ "innerColor": [0,0,0], "unique": "SIBERIAN_RICHES", "uniqueName": "Siberian Riches", - "uniques": ["[+1 Production] from [Strategic resource] tiles","Double quantity of [Horses] produced", + "uniques": ["[+1 Production] from every [Strategic resource]","Double quantity of [Horses] produced", "Double quantity of [Iron] produced","Double quantity of [Uranium] produced"] "cities": ["Moscow","St. Petersburg","Novgorod","Rostov","Yaroslavl","Yekaterinburg","Yakutsk","Vladivostok","Smolensk","Orenburg", "Krasnoyarsk","Khabarovsk","Bryansk","Tver","Novosibirsk","Magadan","Murmansk","Irkutsk","Chita","Samara", diff --git a/core/src/com/unciv/logic/map/TileInfo.kt b/core/src/com/unciv/logic/map/TileInfo.kt index 9733121a..831bb33e 100644 --- a/core/src/com/unciv/logic/map/TileInfo.kt +++ b/core/src/com/unciv/logic/map/TileInfo.kt @@ -177,6 +177,7 @@ open class TileInfo { stats.add(terrainFeatureBase) } + // This is to be deprecated and converted to [] from every [] - keeping it here to that mods with this can still work for now if(city!=null) for(unique in city.cityConstructions.builtBuildingUniqueMap.getUniques("[] from [] tiles")) { val tileType = unique.params[1] if (baseTerrain == tileType || terrainFeature == tileType || resource == tileType || improvement == tileType @@ -186,7 +187,8 @@ open class TileInfo { if(city!=null) for(unique in city.civInfo.getMatchingUniques("[] from every []")) { val tileType = unique.params[1] - if (baseTerrain == tileType || terrainFeature == tileType) + if (baseTerrain == tileType || terrainFeature == tileType || resource == tileType || improvement == tileType + || (tileType == "Strategic resource" && hasViewableResource(observingCiv) && getTileResource().resourceType == ResourceType.Strategic)) stats.add(Stats.parse(unique.params[0])) }