mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-10 23:37:31 +07:00
requiredBuilding parameter migrated to "Requires a [] in this city" unique
This commit is contained in:
parent
c84e20f38b
commit
f40584b1ec
@ -259,9 +259,9 @@
|
||||
"name": "Temple",
|
||||
"culture": 3,
|
||||
"specialistSlots": {"Artist": 1},
|
||||
"requiredBuilding": "Monument",
|
||||
"maintenance": 2,
|
||||
"hurryCostModifier": 25,
|
||||
"uniques": ["Requires a [Monument] in this city"]
|
||||
"requiredTech": "Philosophy"
|
||||
},
|
||||
{
|
||||
@ -272,8 +272,8 @@
|
||||
"culture": 2,
|
||||
"happiness": 2,
|
||||
"specialistSlots": {"Artist": 1},
|
||||
"requiredBuilding": "Monument",
|
||||
"hurryCostModifier": 25,
|
||||
"uniques": ["Requires a [Monument] in this city"]
|
||||
"requiredTech": "Philosophy"
|
||||
},
|
||||
{
|
||||
@ -284,7 +284,7 @@
|
||||
"specialistSlots": {"Artist": 1},
|
||||
"hurryCostModifier": 25,
|
||||
"culture": 4,
|
||||
"requiredBuilding": "Monument",
|
||||
"uniques": ["Requires a [Monument] in this city"]
|
||||
"requiredTech": "Philosophy"
|
||||
},
|
||||
{
|
||||
@ -483,8 +483,8 @@
|
||||
"hurryCostModifier": 15,
|
||||
"percentStatBonus": {"science": 33},
|
||||
"specialistSlots": {"Scientist": 2},
|
||||
"requiredBuilding": "Library",
|
||||
"uniques": ["[+2 Science] from [Jungle] tiles in this city"],
|
||||
"uniques": ["[+2 Science] from [Jungle] tiles in this city", "Requires a [Library] in this city"],
|
||||
"uniques": []
|
||||
"requiredTech": "Education"
|
||||
},
|
||||
{
|
||||
@ -496,8 +496,7 @@
|
||||
"percentStatBonus": {"science": 33},
|
||||
"specialistSlots": {"Scientist": 2},
|
||||
"culture": 3,
|
||||
"requiredBuilding": "Library",
|
||||
"uniques": ["[+2 Science] from [Jungle] tiles in this city"],
|
||||
"uniques": ["[+2 Science] from [Jungle] tiles in this city", "Requires a [Library] in this city"],
|
||||
"requiredTech": "Education"
|
||||
},
|
||||
{
|
||||
@ -515,7 +514,7 @@
|
||||
"cityStrength": 7,
|
||||
"cityHealth": 25,
|
||||
"hurryCostModifier": 25,
|
||||
"requiredBuilding": "Walls",
|
||||
"uniques": ["Requires a [Walls] in this city"],
|
||||
"requiredTech": "Chivalry"
|
||||
// 4 cityStrength in vanilla, no ExtraCityHitPoints in vanilla
|
||||
},
|
||||
@ -527,8 +526,7 @@
|
||||
"cityHealth": 25,
|
||||
"culture": 2,
|
||||
"hurryCostModifier": 25,
|
||||
"requiredBuilding": "Walls",
|
||||
"uniques": ["[+1 Gold] once [Flight] is discovered"],
|
||||
"uniques": ["[+1 Gold] once [Flight] is discovered", "Requires a [Walls] in this city"],
|
||||
"requiredTech": "Chivalry"
|
||||
},
|
||||
{
|
||||
@ -576,7 +574,7 @@
|
||||
"xpForNewUnits": 15,
|
||||
"hurryCostModifier": 25,
|
||||
"maintenance": 1,
|
||||
"requiredBuilding": "Barracks",
|
||||
"uniques": ["Requires a [Barracks] in this city"],
|
||||
"requiredTech": "Steel"
|
||||
},
|
||||
|
||||
@ -587,8 +585,7 @@
|
||||
"maintenance": 0,
|
||||
"hurryCostModifier": 15,
|
||||
"percentStatBonus": {"science": 50},
|
||||
"requiredBuilding": "Library",
|
||||
"uniques": ["Must be next to [Mountain]"],
|
||||
"uniques": ["Must be next to [Mountain]", "Requires a [Library] in this city"],
|
||||
"requiredTech": "Astronomy"
|
||||
},
|
||||
{
|
||||
@ -596,8 +593,8 @@
|
||||
"culture": 4,
|
||||
"specialistSlots": {"Artist": 1},
|
||||
"hurryCostModifier": 10,
|
||||
"requiredBuilding": "Temple",
|
||||
"maintenance": 2,
|
||||
"uniques": ["Requires a [Temple] in this city"],
|
||||
"requiredTech": "Acoustics"
|
||||
},
|
||||
{
|
||||
@ -615,7 +612,7 @@
|
||||
"specialistSlots": {"Merchant": 1},
|
||||
"hurryCostModifier": 15,
|
||||
"percentStatBonus": {"gold": 25},
|
||||
"requiredBuilding": "Market",
|
||||
"uniques": ["Requires a [Market] in this city"],
|
||||
"requiredTech": "Banking"
|
||||
},
|
||||
{
|
||||
@ -627,7 +624,7 @@
|
||||
"happiness": 2,
|
||||
"hurryCostModifier": 15,
|
||||
"percentStatBonus": {"gold": 25},
|
||||
"requiredBuilding": "Market",
|
||||
"uniques": ["Requires a [Market] in this city"],
|
||||
"requiredTech": "Banking"
|
||||
},
|
||||
{
|
||||
@ -638,8 +635,7 @@
|
||||
"specialistSlots": {"Merchant": 1},
|
||||
"hurryCostModifier": 15,
|
||||
"percentStatBonus": {"gold": 25},
|
||||
"uniques": ["+5% Production for every Trade Route with a City-State in the empire"],
|
||||
"requiredBuilding": "Market",
|
||||
"uniques": ["+5% Production for every Trade Route with a City-State in the empire", "Requires a [Market] in this city"],
|
||||
"requiredTech": "Banking"
|
||||
// will be introduced in BNW expansion pack
|
||||
},
|
||||
@ -657,7 +653,7 @@
|
||||
"happiness": 3,
|
||||
"hurryCostModifier": 10,
|
||||
"maintenance": 2,
|
||||
"requiredBuilding": "Colosseum",
|
||||
"uniques": ["Requires a [Colosseum] in this city"],
|
||||
"requiredTech": "Printing Press"
|
||||
},
|
||||
{
|
||||
@ -684,9 +680,9 @@
|
||||
"name": "Museum",
|
||||
"culture": 5,
|
||||
"specialistSlots": {"Artist": 2},
|
||||
"requiredBuilding": "Opera House",
|
||||
"maintenance": 3,
|
||||
"hurryCostModifier": 0,
|
||||
"uniques": ["Requires a [Opera House] in this city"],
|
||||
"requiredTech": "Archaeology"
|
||||
},
|
||||
{
|
||||
@ -712,8 +708,7 @@
|
||||
"name": "Seaport",
|
||||
"hurryCostModifier": 25,
|
||||
"maintenance": 3,
|
||||
"requiredBuilding": "Harbor",
|
||||
"uniques": ["[+1 Production, +1 Gold] from [Water resource] tiles in this city",
|
||||
"uniques": ["Requires a [Harbor] in this city", "[+1 Production, +1 Gold] from [Water resource] tiles in this city",
|
||||
"Must be next to [Coast]", "+[15]% production when building [naval units] in this city"],
|
||||
"requiredTech": "Navigation"
|
||||
},
|
||||
@ -752,10 +747,9 @@
|
||||
"name": "Public School",
|
||||
"science": 3,
|
||||
"specialistSlots": {"Scientist": 1},
|
||||
"requiredBuilding": "University",
|
||||
"maintenance": 3,
|
||||
"hurryCostModifier": 0,
|
||||
"uniques": ["[+1 Science] Per [2] Population in this city"],
|
||||
"uniques": ["Requires a [University] in this city", "[+1 Science] Per [2] Population in this city"],
|
||||
"requiredTech": "Scientific Theory"
|
||||
},
|
||||
{
|
||||
@ -763,10 +757,10 @@
|
||||
"production": 4,
|
||||
"percentStatBonus": {"production": 10},
|
||||
"specialistSlots": {"Engineer": 2},
|
||||
"requiredBuilding": "Workshop",
|
||||
"maintenance": 3,
|
||||
"hurryCostModifier": 0,
|
||||
"requiredResource": "Coal",
|
||||
"uniques": ["Requires a [Workshop] in this city"],
|
||||
"requiredTech": "Industrialization"
|
||||
},
|
||||
/*
|
||||
@ -774,7 +768,7 @@
|
||||
"name": "Arsenal",
|
||||
"cityStrength": 6,
|
||||
"hurryCostModifier": 25,
|
||||
"requiredBuilding": "Castle",
|
||||
"uniques": ["Requires a [Castle] in this city"],
|
||||
"requiredTech": "Rifling"
|
||||
//+9 City Defense Strength, +25 City Hit Points, requiredTech "Metallurgy" in expansions
|
||||
},
|
||||
@ -784,7 +778,7 @@
|
||||
"xpForNewUnits": 15,
|
||||
"hurryCostModifier": 0,
|
||||
"maintenance": 1,
|
||||
"requiredBuilding": "Armory",
|
||||
"uniques": ["Requires a [Armory] in this city"],
|
||||
"requiredTech": "Military Science"
|
||||
},
|
||||
{
|
||||
@ -800,9 +794,9 @@
|
||||
{
|
||||
"name": "Hospital",
|
||||
"food": 5,
|
||||
"requiredBuilding": "Aqueduct",
|
||||
"maintenance": 2,
|
||||
"hurryCostModifier": 0,
|
||||
"uniques": ["Requires a [Aqueduct] in this city"],
|
||||
"requiredTech": "Biology"
|
||||
},
|
||||
{
|
||||
@ -811,7 +805,7 @@
|
||||
"percentStatBonus": {"gold": 25},
|
||||
"specialistSlots": {"Merchant": 2},
|
||||
"hurryCostModifier": 15,
|
||||
"requiredBuilding": "Bank",
|
||||
"uniques": ["Requires a [Bank] in this city"],
|
||||
"requiredTech": "Electricity"
|
||||
},
|
||||
{
|
||||
@ -842,8 +836,8 @@
|
||||
"name": "Broadcast Tower",
|
||||
"culture": 3,
|
||||
"percentStatBonus": {"culture": 33},
|
||||
"requiredBuilding": "Museum",
|
||||
"maintenance": 3,
|
||||
"uniques": ["Requires a [Museum] in this city"],
|
||||
"requiredTech": "Radio"
|
||||
},
|
||||
{
|
||||
@ -870,15 +864,15 @@
|
||||
"science": 4,
|
||||
"percentStatBonus": {"science": 50},
|
||||
"specialistSlots": {"Scientist": 1},
|
||||
"requiredBuilding": "Public School",
|
||||
"maintenance": 3,
|
||||
"uniques": ["Requires a [Public School] in this city"],
|
||||
"requiredTech": "Plastics"
|
||||
},
|
||||
{
|
||||
"name": "Stadium",
|
||||
"happiness": 4,
|
||||
"requiredBuilding": "Theatre",
|
||||
"maintenance": 2,
|
||||
"uniques": ["Requires a [Theatre] in this city"],
|
||||
"requiredTech": "Refrigeration"
|
||||
},
|
||||
/*
|
||||
@ -886,7 +880,7 @@
|
||||
"name": "Military Base",
|
||||
"cityStrength": 12,
|
||||
"hurryCostModifier": 25,
|
||||
"requiredBuilding": "Arsenal",
|
||||
"uniques": ["Requires a [Arsenal] in this city"],
|
||||
"requiredTech": "Telegraph"
|
||||
//+25 City Hit Points, requiredTech "Replaceable parts" in expansions
|
||||
},
|
||||
@ -927,10 +921,9 @@
|
||||
|
||||
{
|
||||
"name": "Medical Lab",
|
||||
"requiredBuilding": "Hospital",
|
||||
"maintenance": 3,
|
||||
"requiredTech": "Pharmaceuticals",
|
||||
"uniques": ["[25]% of food is carried over after population increases"]
|
||||
"uniques": ["Requires a [Hospital] in this city", "[25]% of food is carried over after population increases"]
|
||||
},
|
||||
{
|
||||
"name": "Manhattan Project",
|
||||
@ -942,21 +935,21 @@
|
||||
"name": "Nuclear Plant",
|
||||
"production": 5,
|
||||
"percentStatBonus": {"production": 15},
|
||||
"requiredBuilding": "Factory",
|
||||
"maintenance": 3,
|
||||
"cannotBeBuiltWith": "Solar Plant",
|
||||
"requiredResource": "Uranium",
|
||||
"uniques": ["Requires a [Factory] in this city"],
|
||||
"requiredTech": "Nuclear Fission"
|
||||
},
|
||||
{
|
||||
"name": "Solar Plant",
|
||||
"production": 5,
|
||||
"percentStatBonus": {"production": 15},
|
||||
"requiredBuilding": "Factory",
|
||||
"maintenance": 3,
|
||||
"cannotBeBuiltWith": "Nuclear Plant",
|
||||
"requiredTech": "Ecology",
|
||||
"uniques": ["Must be next to [Desert]"]
|
||||
"uniques": ["Must be next to [Desert]", "Requires a [Factory] in this city"],
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Sydney Opera House",
|
||||
@ -1003,7 +996,7 @@
|
||||
"requiredResource": "Aluminum",
|
||||
"cost": 360,
|
||||
"uniques": ["+[50]% production when building [Spaceship part] in this city"],
|
||||
"requiredBuilding": "Factory",
|
||||
"uniques": ["Requires a [Factory] in this city"],
|
||||
"requiredTech": "Robotics"
|
||||
},
|
||||
{
|
||||
|
@ -249,8 +249,8 @@ class Building : NamedStats(), IConstruction {
|
||||
|
||||
for (unique in uniqueObjects.filter { it.placeholderText == "Not displayed as an available construction without []"}) {
|
||||
val filter = unique.params[0]
|
||||
if ((filter in civInfo.gameInfo.ruleSet.tileResources && !construction.cityInfo.civInfo.hasResource(filter))
|
||||
|| (filter in civInfo.gameInfo.ruleSet.buildings && !construction.containsBuildingOrEquivalent(filter)))
|
||||
if (filter in civInfo.gameInfo.ruleSet.tileResources && !construction.cityInfo.civInfo.hasResource(filter)
|
||||
|| filter in civInfo.gameInfo.ruleSet.buildings && !construction.containsBuildingOrEquivalent(filter))
|
||||
return "Should not be displayed"
|
||||
}
|
||||
|
||||
@ -264,11 +264,15 @@ class Building : NamedStats(), IConstruction {
|
||||
it.matchesUniqueFilter(unique.params[0]) && it.getOwner() == construction.cityInfo.civInfo }) return unique.text
|
||||
"Can only be built in annexed cities" -> if (construction.cityInfo.isPuppet || construction.cityInfo.foundingCiv == ""
|
||||
|| construction.cityInfo.civInfo.civName == construction.cityInfo.foundingCiv) return unique.text
|
||||
"Requires []" -> { val filter = unique.params[0]
|
||||
|
||||
"Requires []" -> { val filter = unique.params[0] // This is for wonders and policies
|
||||
if (filter in civInfo.gameInfo.ruleSet.buildings) {
|
||||
if (civInfo.cities.none { it.cityConstructions.containsBuildingOrEquivalent(filter) }) return unique.text // Wonder is not built
|
||||
} else if (!civInfo.policies.adoptedPolicies.contains(filter)) return "Policy is not adopted" // this reason should not be displayed
|
||||
}
|
||||
"Requires a [] in this city" -> if (!construction.containsBuildingOrEquivalent(unique.params[0]))
|
||||
return "Requires a [${civInfo.getEquivalentBuilding(unique.params[0])}] in this city" // replace with civ-specific building for user
|
||||
|
||||
"Obsolete with []" -> if (civInfo.tech.isResearched(unique.params[0])) return unique.text
|
||||
|
||||
"Must have an owned mountain within 2 tiles" -> // Deprecated as of 3.10.8 . Use "Must have an owned [Mountain] within [2] tiles" instead
|
||||
@ -322,8 +326,11 @@ class Building : NamedStats(), IConstruction {
|
||||
if (civInfo.victoryManager.unconstructedSpaceshipParts()[name] == 0) return "Don't need to build any more of these!"
|
||||
}
|
||||
|
||||
// Deprecated as of 3.12.2 - changed to "Requires a [] in this city" unique
|
||||
if (requiredBuilding != null && !construction.containsBuildingOrEquivalent(requiredBuilding!!))
|
||||
return "Requires a [${civInfo.getEquivalentBuilding(requiredBuilding!!)}] in this city"
|
||||
|
||||
|
||||
if (cannotBeBuiltWith != null && construction.isBuilt(cannotBeBuiltWith!!))
|
||||
return "Cannot be built with $cannotBeBuiltWith"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user