From e5fdcde836c7c5b4fa87d618ae34331290a76107 Mon Sep 17 00:00:00 2001 From: metablaster <44481081+metablaster@users.noreply.github.com> Date: Mon, 21 Jul 2025 22:29:24 +0200 Subject: [PATCH] Update incorrect stats for policies and buildings (#13656) * fix automated ranged units not heading to enemy city * fix distance from city typo * Address points made in PR * priotirize tiles without retaliation * remove dangerous tiles logic * resolve review with alternative approach * faster exit if no sight * automated units auto upgrade if enabled * simplified condition * fix incorrect building stats * update stats for policies and buildings * update wonder stats * palace cost is 0 --- .../jsons/Civ V - Gods & Kings/Buildings.json | 19 ++++++------ .../jsons/Civ V - Vanilla/Buildings.json | 31 ++++++++++--------- .../jsons/Civ V - Vanilla/Policies.json | 20 ++++-------- core/src/com/unciv/models/ruleset/Building.kt | 2 +- .../BuildingDescriptions.kt | 8 ++--- 5 files changed, 37 insertions(+), 43 deletions(-) diff --git a/android/assets/jsons/Civ V - Gods & Kings/Buildings.json b/android/assets/jsons/Civ V - Gods & Kings/Buildings.json index b3ed1a211d..0143ceb3a6 100644 --- a/android/assets/jsons/Civ V - Gods & Kings/Buildings.json +++ b/android/assets/jsons/Civ V - Gods & Kings/Buildings.json @@ -9,8 +9,8 @@ "science": 3, "gold": 3, "culture": 1, - "cityStrength": 2, - "cost": 1, + "cityStrength": 2.5, + "cost": 0, "uniques": ["Indicates the capital city"] }, { @@ -530,15 +530,14 @@ "hurryCostModifier": 25, "requiredNearbyImprovedResources": ["Iron"], "requiredTech": "Metal Casting", - "uniques": ["[+15]% Production when constructing [Spaceship part] units [in this city]", - "[+15]% Production when constructing [Land] units [in this city]", + "uniques": ["[+15]% Production when constructing [Land] units [in this city]", "[+1 Production] from [Iron] tiles [in this city]"] }, // Column 6 { "name": "Harbor", "cost": 120, - "maintenance": 2, + "maintenance": 3, "hurryCostModifier": 25, "uniques": ["[+1 Production] from [Water resource] tiles [in this city]", "Connects trade routes over water","Must be next to [Coast]"], @@ -736,7 +735,7 @@ "culture": 1, "isWonder": true, "greatPersonPoints": {"Great Artist": 1}, - "uniques": ["[-10]% Unhappiness from [Population] [in all cities]"], + "uniques": ["[-10]% Unhappiness from [Population] [in all non-occupied cities]"], "requiredTech": "Banking", "quote": "'Most of us can, as we choose, make of this world either a palace or a prison' - John Lubbock" }, @@ -771,7 +770,7 @@ { "name": "Seaport", "hurryCostModifier": 25, - "maintenance": 3, + "maintenance": 2, "requiredBuilding": "Harbor", "uniques": ["[+1 Production, +1 Gold] from [Water resource] tiles [in this city]", "Must be next to [Coast]", "[+15]% Production when constructing [Water] units [in this city]"], @@ -819,7 +818,7 @@ "replaces": "Windmill", "uniqueTo": "Austria", "production": 2, - "percentStatBonus": {"production": 10}, + "percentStatBonus": {"production": 5}, "specialistSlots": {"Engineer": 1}, "hurryCostModifier": 25, "maintenance": 2, @@ -929,7 +928,7 @@ { "name": "Stock Exchange", "gold": 3, - "percentStatBonus": {"gold": 25}, + "percentStatBonus": {"gold": 33}, "specialistSlots": {"Merchant": 2}, "hurryCostModifier": 15, "requiredBuilding": "Bank", @@ -1130,7 +1129,6 @@ { "name": "CN Tower", "isWonder": true, - "culture": 1, "greatPersonPoints": {"Great Merchant": 1}, "uniques": ["[+1] population [in all cities]", "[+1 Happiness] [in all cities]", "Gain a free [Broadcast Tower] [in all cities]"], "requiredTech": "Telecommunications", @@ -1158,6 +1156,7 @@ { "name": "Spaceship Factory", "production": 3, + "maintenance": 3, "requiredResource": "Aluminum", "cost": 360, "requiredBuilding": "Factory", diff --git a/android/assets/jsons/Civ V - Vanilla/Buildings.json b/android/assets/jsons/Civ V - Vanilla/Buildings.json index 0668aeabf6..b29f96c107 100644 --- a/android/assets/jsons/Civ V - Vanilla/Buildings.json +++ b/android/assets/jsons/Civ V - Vanilla/Buildings.json @@ -9,8 +9,8 @@ "science": 3, "gold": 3, "culture": 1, - "cityStrength": 2, - "cost": 1, + "cityStrength": 2.5, + "cost": 0, "uniques": ["Indicates the capital city"] }, { @@ -130,7 +130,7 @@ }, { "name": "Walls", - "cityStrength": 5, + "cityStrength": 4, "cityHealth": 50, "hurryCostModifier": 25, "requiredTech": "Masonry", @@ -390,7 +390,9 @@ "name": "Monastery", "cost": 120, "culture": 2, - "uniques": ["[+2 Culture] from [Wine] tiles [in this city]", "Destroyed when the city is captured"], + "uniques": ["[+2 Culture] from [Wine] tiles [in this city]", + "[+2 Culture] from [Incense] tiles [in this city]", + "Destroyed when the city is captured"], "requiredNearbyImprovedResources": ["Incense", "Wine"], "requiredTech": "Theology" }, @@ -468,15 +470,14 @@ "hurryCostModifier": 25, "requiredNearbyImprovedResources": ["Iron"], "requiredTech": "Metal Casting", - "uniques": ["[+15]% Production when constructing [Spaceship part] units [in this city]", - "[+15]% Production when constructing [Land] units [in this city]", + "uniques": ["[+15]% Production when constructing [Land] units [in this city]", "[+1 Production] from [Iron] tiles [in this city]"] }, // Column 6 { "name": "Harbor", "cost": 120, - "maintenance": 2, + "maintenance": 3, "hurryCostModifier": 25, "uniques": ["[+1 Production] from [Water resource] tiles [in this city]", "Connects trade routes over water","Must be next to [Coast]"], @@ -525,7 +526,7 @@ }, { "name": "Castle", - "cityStrength": 7, + "cityStrength": 4, "cityHealth": 25, "hurryCostModifier": 25, "requiredBuilding": "Walls", @@ -537,7 +538,7 @@ "cost": 150, "replaces": "Castle", "uniqueTo": "India", - "cityStrength": 7, + "cityStrength": 6, "cityHealth": 25, "culture": 2, "hurryCostModifier": 25, @@ -630,7 +631,7 @@ "culture": 1, "isWonder": true, "greatPersonPoints": {"Great Artist": 1}, - "uniques": ["[-10]% Unhappiness from [Population] [in all cities]"], + "uniques": ["[-10]% Unhappiness from [Population] [in all non-occupied cities]"], "requiredTech": "Banking", "quote": "'Most of us can, as we choose, make of this world either a palace or a prison' - John Lubbock" }, @@ -646,7 +647,7 @@ { "name": "Seaport", "hurryCostModifier": 25, - "maintenance": 3, + "maintenance": 2, "requiredBuilding": "Harbor", "uniques": ["[+1 Production, +1 Gold] from [Water resource] tiles [in this city]", "Must be next to [Coast]", "[+15]% Production when constructing [Water] units [in this city]"], @@ -774,7 +775,7 @@ { "name": "Arsenal", "cost": 300, - "cityStrength": 9, + "cityStrength": 6, "cityHealth": 25, "hurryCostModifier": 25, "requiredBuilding": "Castle", @@ -793,7 +794,7 @@ { "name": "Stock Exchange", "gold": 3, - "percentStatBonus": {"gold": 25}, + "percentStatBonus": {"gold": 33}, "specialistSlots": {"Merchant": 2}, "hurryCostModifier": 15, "requiredBuilding": "Bank", @@ -843,7 +844,7 @@ }, { "name": "Cristo Redentor", - "culture": 5, + "culture": 4, "isWonder": true, "greatPersonPoints": {"Great Artist": 2}, "uniques": ["[-10]% Culture cost of adopting new Policies"], @@ -888,6 +889,7 @@ { "name": "Sydney Opera House", "isWonder": true, + "culture": 4, "greatPersonPoints": {"Great Artist": 2}, "percentStatBonus": {"culture": 50}, "uniques": ["Free Social Policy","Must be next to [Coast]"], @@ -945,6 +947,7 @@ { "name": "Spaceship Factory", "production": 3, + "maintenance": 3, "requiredResource": "Aluminum", "cost": 360, "requiredBuilding": "Factory", diff --git a/android/assets/jsons/Civ V - Vanilla/Policies.json b/android/assets/jsons/Civ V - Vanilla/Policies.json index b613441617..06299e12e7 100644 --- a/android/assets/jsons/Civ V - Vanilla/Policies.json +++ b/android/assets/jsons/Civ V - Vanilla/Policies.json @@ -146,7 +146,7 @@ "Scientific": 0 }, "uniques": [ - "[+33]% Strength ", + "[+25]% Strength ", "Earn [100]% of killed [Barbarian] unit's [Strength] as [Culture]", "Notified of new Barbarian encampments" ], @@ -359,10 +359,7 @@ "name": "Naval Tradition", "uniques": [ "[+1] Movement ", - "[+1] Sight ", - "Free [Great General] appears" - // "[+2] Movement " - // ToDo: Should be "Free [Great Admiral] appears" + "[+1] Sight " ], "row": 1, "column": 2 @@ -387,11 +384,7 @@ { "name": "Mercantilism", "uniques": [ - "[Gold] cost of purchasing items in cities [-25]%", - "[+1 Science] from every [Mint]", - "[+1 Science] from every [Market]", - "[+1 Science] from every [Bank]", - "[+1 Science] from every [Stock Exchange]" + "[Gold] cost of purchasing items in cities [-25]%" ], "requires": ["Trade Unions"], "row": 2, @@ -598,7 +591,7 @@ { "name": "Autocracy Complete", "uniques": [ - "[+25]% Strength " + "[+20]% Strength " ] } ] @@ -656,9 +649,8 @@ "name": "Communism", "requires": ["Socialism"], "uniques": [ - "[+1 Production] [in all cities]", - "[+10]% Production when constructing [All] buildings [in all cities]", - "[+1 Production] from every [Quarry]" + "[+2 Production] [in all cities]", + "[+10]% Production when constructing [All] buildings [in all cities]" ], "row": 3, "column": 3 diff --git a/core/src/com/unciv/models/ruleset/Building.kt b/core/src/com/unciv/models/ruleset/Building.kt index 8d7be7a942..452bd3c702 100644 --- a/core/src/com/unciv/models/ruleset/Building.kt +++ b/core/src/com/unciv/models/ruleset/Building.kt @@ -40,7 +40,7 @@ class Building : RulesetStatsObject(), INonPerpetualConstruction { /** This Building can only be built if one of these resources is nearby - it must be improved! */ var requiredNearbyImprovedResources: List? = null - var cityStrength = 0 + var cityStrength = 0.0 var cityHealth = 0 var replaces: String? = null var uniqueTo: String? = null diff --git a/core/src/com/unciv/ui/objectdescriptions/BuildingDescriptions.kt b/core/src/com/unciv/ui/objectdescriptions/BuildingDescriptions.kt index 1590e8359d..515319ac7b 100644 --- a/core/src/com/unciv/ui/objectdescriptions/BuildingDescriptions.kt +++ b/core/src/com/unciv/ui/objectdescriptions/BuildingDescriptions.kt @@ -32,7 +32,7 @@ object BuildingDescriptions { if (replacementTextForUniques.isNotEmpty()) infoList += replacementTextForUniques else infoList += getUniquesStringsWithoutDisablers(uniqueInclusionFilter) } - if (cityStrength != 0) infoList += "{City strength} +$cityStrength" + if (cityStrength != 0.0) infoList += "{City strength} +$cityStrength" if (cityHealth != 0) infoList += "{City health} +$cityHealth" val separator = if (multiline) "\n" else "; " return infoList.joinToString(separator) { it.tr() } @@ -77,7 +77,7 @@ object BuildingDescriptions { if (requiredNearbyImprovedResources != null) translatedLines += "Requires improved [${requiredNearbyImprovedResources!!.joinToString("/") { it.tr() }}] near city".tr() - if (cityStrength != 0) translatedLines += "{City strength} +$cityStrength".tr() + if (cityStrength != 0.0) translatedLines += "{City strength} +$cityStrength".tr() if (cityHealth != 0) translatedLines += "{City health} +$cityHealth".tr() if (maintenance != 0 && !isFree) translatedLines += "{Maintenance cost}: $maintenance {Gold}".tr() if (showAdditionalInfo) additionalDescription(building, city, translatedLines) @@ -241,8 +241,8 @@ object BuildingDescriptions { } } - if (cityStrength != 0 || cityHealth != 0 || maintenance != 0) textList += FormattedLine() - if (cityStrength != 0) textList += FormattedLine("{City strength} +$cityStrength") + if (cityStrength != 0.0 || cityHealth != 0 || maintenance != 0) textList += FormattedLine() + if (cityStrength != 0.0) textList += FormattedLine("{City strength} +$cityStrength") if (cityHealth != 0) textList += FormattedLine("{City health} +$cityHealth") if (maintenance != 0) textList += FormattedLine("{Maintenance cost}: $maintenance {Gold}")