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
This commit is contained in:
metablaster 2025-07-21 22:29:24 +02:00 committed by GitHub
parent d0b4250011
commit e5fdcde836
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 37 additions and 43 deletions

View File

@ -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",

View File

@ -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",

View File

@ -146,7 +146,7 @@
"Scientific": 0
},
"uniques": [
"[+33]% Strength <vs [Barbarian] units>",
"[+25]% Strength <vs [Barbarian] units>",
"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 <for [{Military} {Water}] units>",
"[+1] Sight <for [{Military} {Water}] units>",
"Free [Great General] appears"
// "[+2] Movement <for [Great Admiral] units>"
// ToDo: Should be "Free [Great Admiral] appears"
"[+1] Sight <for [{Military} {Water}] units>"
],
"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 <when attacking> <for [Military] units> <for [30] turns>"
"[+20]% Strength <when attacking> <for [Military] units> <for [30] turns>"
]
}
]
@ -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

View File

@ -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<String>? = null
var cityStrength = 0
var cityStrength = 0.0
var cityHealth = 0
var replaces: String? = null
var uniqueTo: String? = null

View File

@ -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}")