mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-13 09:18:43 +07:00
Civ uniques up to Arabia converted
This commit is contained in:
@ -139,7 +139,7 @@
|
||||
"outerColor": [ 114, 0, 0],
|
||||
"innerColor": [255,255,255],
|
||||
"unique": "SUN_NEVER_SETS",
|
||||
"uniques": []
|
||||
"uniques": ["+2 movement for all naval units"]
|
||||
"cities": ["London","York","Nottingham","Hastings","Canterbury","Coventry","Warwick","Newcastle","Oxford","Liverpool",
|
||||
"Dover","Brighton","Norwich","Leeds","Reading","Birmingham","Richmond","Exeter","Cambridge","Gloucester",
|
||||
"Manchester","Bristol","Leicester","Carlisle","Ipswich","Portsmouth","Berwick","Bath","Mumbles","Southampton",
|
||||
@ -163,6 +163,7 @@
|
||||
"outerColor": [ 38, 98, 255],
|
||||
"innerColor": [239,236,148],
|
||||
"unique": "ANCIEN_REGIME",
|
||||
"uniques": ["+2 Culture per turn from cities before discovering Steam Power"]
|
||||
"cities": ["Paris","Orleans","Lyon","Troyes","Tours","Marseille","Chartres","Avignon","Rouen","Grenoble",
|
||||
"Dijon","Amiens","Cherbourg","Poitiers","Toulouse","Bayonne","Strasbourg","Brest","Bordeaux","Rennes",
|
||||
"Nice","Saint Etienne","Nantes","Reims","Le Mans","Montpellier","Limoges","Nancy","Lille","Caen","Toulon",
|
||||
@ -187,6 +188,8 @@
|
||||
"outerColor": [ 236, 178, 0],
|
||||
"innerColor": [0,0,0],
|
||||
"unique": "SIBERIAN_RICHES",
|
||||
"uniques": ["[+1 Production] from [Strategic resource] tiles","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",
|
||||
"Arkhangelsk","Chelyabinsk","Tobolsk","Vologda","Omsk","Astrakhan","Kursk","Saratov","Tula","Vladimir","Perm",
|
||||
@ -211,6 +214,7 @@
|
||||
"outerColor": [ 53,0,87],
|
||||
"innerColor": [238,201,9],
|
||||
"unique": "GLORY_OF_ROME",
|
||||
"uniques": ["+25% Production towards any buildings that already exist in the Capital"]
|
||||
"cities": ["Rome","Antium","Cumae","Neapolis","Ravenna","Arretium","Mediolanum","Arpinum","Circei","Setia",
|
||||
"Satricum","Ardea","Ostia","Velitrae","Viroconium","Tarentum","Brundisium","Caesaraugusta","Caesarea","Palmyra",
|
||||
"Signia","Aquileia","Clusium","Sutrium","Cremona","Placentia","Hispalis","Artaxata","Aurelianorum","Nicopolis",
|
||||
@ -235,6 +239,7 @@
|
||||
"outerColor": [ 41,83,42],
|
||||
"innerColor": [146,221,9],
|
||||
"unique": "TRADE_CARAVANS",
|
||||
"uniques": ["[+1 Gold] from each Trade Route", "Double quantity of [Oil] produced"],
|
||||
"cities": ["Mecca","Medina","Damascus","Baghdad","Najran","Kufah","Basra","Khurasan","Anjar","Fustat",
|
||||
"Aden","Yamama","Muscat","Mansura","Bukhara","Fez","Shiraz","Merw","Balkh","Mosul",
|
||||
"Aydab","Bayt","Suhar","Taif","Hama","Tabuk","Sana'a","Shihr","Tripoli","Tunis","Kairouan","Algiers","Oran"]
|
||||
|
@ -255,7 +255,7 @@
|
||||
{
|
||||
"name": "Trade Unions",
|
||||
"effect": "Maintenance on roads & railroads reduced by 33%, +2 gold from all trade routes",
|
||||
"uniques": ["Maintenance on roads & railroads reduced by 33%", "+2 Gold from all trade routes"]
|
||||
"uniques": ["Maintenance on roads & railroads reduced by 33%", "[+2 Gold] from each Trade Route"]
|
||||
"row": 1,
|
||||
"column": 2
|
||||
},
|
||||
|
@ -194,6 +194,7 @@ Sun Never Sets =
|
||||
Ancien Régime =
|
||||
|
||||
Strategic Resources provide +1 Production, and Horses, Iron and Uranium Resources provide double quantity =
|
||||
Strategic resources =
|
||||
Siberian Riches =
|
||||
|
||||
+25% Production towards any buildings that already exist in the Capital =
|
||||
|
@ -201,11 +201,10 @@ class CityInfo {
|
||||
amountToAdd = 2
|
||||
if (civInfo.hasUnique("Quantity of strategic resources produced by the empire increased by 100%"))
|
||||
amountToAdd *= 2
|
||||
if (civInfo.nation.unique == UniqueAbility.SIBERIAN_RICHES && resource.name in listOf("Horses", "Iron", "Uranium"))
|
||||
amountToAdd *= 2
|
||||
if (resource.name == "Oil" && civInfo.nation.unique == UniqueAbility.TRADE_CARAVANS)
|
||||
amountToAdd *= 2
|
||||
}
|
||||
for(unique in civInfo.getMatchingUniques("Double quantity of [] produced"))
|
||||
if(unique.getPlaceholderParameters()[0]==resource.name)
|
||||
amountToAdd*=2
|
||||
if(resource.resourceType == ResourceType.Luxury
|
||||
&& containsBuildingUnique("Provides 1 extra copy of each improved luxury resource near this City"))
|
||||
amountToAdd*=2
|
||||
|
@ -50,11 +50,10 @@ class CityStats {
|
||||
val stats = Stats()
|
||||
if (!cityInfo.isCapital() && cityInfo.isConnectedToCapital()) {
|
||||
val civInfo = cityInfo.civInfo
|
||||
var goldFromTradeRoute = civInfo.getCapital().population.population * 0.15 + cityInfo.population.population * 1.1 - 1 // Calculated by http://civilization.wikia.com/wiki/Trade_route_(Civ5)
|
||||
if (civInfo.nation.unique == UniqueAbility.TRADE_CARAVANS) goldFromTradeRoute += 1
|
||||
if (civInfo.hasUnique("+2 Gold from all trade routes")) goldFromTradeRoute += 2
|
||||
if (civInfo.hasUnique("Gold from all trade routes +25%")) goldFromTradeRoute *= 1.25 // Machu Pichu speciality
|
||||
stats.gold += goldFromTradeRoute.toFloat()
|
||||
stats.gold = civInfo.getCapital().population.population * 0.15f + cityInfo.population.population * 1.1f - 1 // Calculated by http://civilization.wikia.com/wiki/Trade_route_(Civ5)
|
||||
for(unique in civInfo.getMatchingUniques("[] from each Trade Route"))
|
||||
stats.add(Stats.parse(unique.getPlaceholderParameters()[0]))
|
||||
if (civInfo.hasUnique("Gold from all trade routes +25%")) stats.gold *= 1.25f // Machu Pichu speciality
|
||||
}
|
||||
return stats
|
||||
}
|
||||
@ -116,8 +115,8 @@ class CityStats {
|
||||
private fun getStatsFromNationUnique(): Stats {
|
||||
val stats = Stats()
|
||||
|
||||
val civUnique = cityInfo.civInfo.nation.unique
|
||||
if (civUnique == UniqueAbility.ANCIEN_REGIME && !cityInfo.civInfo.tech.isResearched("Steam Power"))
|
||||
if (cityInfo.civInfo.hasUnique("+2 Culture per turn from cities before discovering Steam Power")
|
||||
&& !cityInfo.civInfo.tech.isResearched("Steam Power"))
|
||||
stats.culture += 2
|
||||
|
||||
return stats
|
||||
@ -145,12 +144,10 @@ class CityStats {
|
||||
|
||||
stats.add(getStatPercentBonusesFromUniques(cityInfo.civInfo.nation.uniques))
|
||||
|
||||
val civUnique = cityInfo.civInfo.nation.unique
|
||||
val currentConstruction = cityInfo.cityConstructions.getCurrentConstruction()
|
||||
if (civUnique == UniqueAbility.GLORY_OF_ROME
|
||||
&& currentConstruction is Building
|
||||
&& cityInfo.civInfo.getCapital().cityConstructions.builtBuildings
|
||||
.contains(currentConstruction.name))
|
||||
if (currentConstruction is Building
|
||||
&& cityInfo.civInfo.getCapital().cityConstructions.builtBuildings.contains(currentConstruction.name)
|
||||
&& cityInfo.civInfo.hasUnique("+25% Production towards any buildings that already exist in the Capital"))
|
||||
stats.production += 25f
|
||||
|
||||
return stats
|
||||
@ -301,11 +298,6 @@ class CityStats {
|
||||
val stats = cityInfo.cityConstructions.getStatPercentBonuses()
|
||||
val currentConstruction = cityInfo.cityConstructions.getCurrentConstruction()
|
||||
|
||||
stats.add(getStatPercentBonusesFromUniques(cityInfo.civInfo.getBuildingUniques().toHashSet()))
|
||||
|
||||
if (cityInfo.civInfo.hasUnique("Culture in all cities increased by 25%"))
|
||||
stats.culture += 25f
|
||||
|
||||
if (currentConstruction is Building && currentConstruction.uniques.contains("Spaceship part")) {
|
||||
if (cityInfo.containsBuildingUnique("Increases production of spaceship parts by 15%"))
|
||||
stats.production += 15
|
||||
@ -365,6 +357,9 @@ class CityStats {
|
||||
if (cityInfo.civInfo.getHappiness() >= 0 && uniques.contains("+15% science while empire is happy"))
|
||||
stats.science += 15f
|
||||
|
||||
if (uniques.contains("Culture in all cities increased by 25%"))
|
||||
stats.culture += 25f
|
||||
|
||||
return stats
|
||||
}
|
||||
|
||||
@ -403,6 +398,7 @@ class CityStats {
|
||||
newStatPercentBonusList["Golden Age"] = getStatPercentBonusesFromGoldenAge(cityInfo.civInfo.goldenAges.isGoldenAge())
|
||||
newStatPercentBonusList["Policies"] = getStatPercentBonusesFromUniques(cityInfo.civInfo.policies.policyEffects)
|
||||
newStatPercentBonusList["Buildings"] = getStatPercentBonusesFromBuildings()
|
||||
newStatPercentBonusList["Wonders"] = getStatPercentBonusesFromUniques(cityInfo.civInfo.getBuildingUniques().toHashSet())
|
||||
newStatPercentBonusList["Railroad"] = getStatPercentBonusesFromRailroad()
|
||||
newStatPercentBonusList["Marble"] = getStatPercentBonusesFromMarble()
|
||||
newStatPercentBonusList["Computers"] = getStatPercentBonusesFromComputers()
|
||||
|
@ -106,7 +106,7 @@ class MapUnit {
|
||||
&& civInfo.hasUnique("All military naval units receive +1 movement and +1 sight"))
|
||||
movement += 1
|
||||
|
||||
if (type.isWaterUnit() && civInfo.nation.unique == UniqueAbility.SUN_NEVER_SETS)
|
||||
if (type.isWaterUnit() && civInfo.hasUnique("+2 movement for all naval units"))
|
||||
movement += 2
|
||||
|
||||
if (type == UnitType.Mounted &&
|
||||
|
@ -185,7 +185,8 @@ open class TileInfo {
|
||||
if (unique.equalsPlaceholderText("[] from [] tiles")) {
|
||||
val placeholderParams = unique.getPlaceholderParameters()
|
||||
val tileType = placeholderParams[1]
|
||||
if (baseTerrain == tileType || terrainFeature == tileType || resource == tileType || improvement == tileType)
|
||||
if (baseTerrain == tileType || terrainFeature == tileType || resource == tileType || improvement == tileType
|
||||
|| (tileType == "Strategic resource" && hasViewableResource(observingCiv) && getTileResource().resourceType == ResourceType.Strategic))
|
||||
stats.add(Stats.parse(placeholderParams[0]))
|
||||
}
|
||||
}
|
||||
@ -207,17 +208,12 @@ open class TileInfo {
|
||||
val resourceBuilding = tileMap.gameInfo.ruleSet.buildings[resource.building!!]!!
|
||||
stats.add(resourceBuilding.resourceBonusStats!!) // resource-specific building (eg forge, stable) bonus
|
||||
}
|
||||
if (resource.resourceType == ResourceType.Strategic
|
||||
&& observingCiv.nation.unique == UniqueAbility.SIBERIAN_RICHES)
|
||||
stats.production += 1
|
||||
if (city != null) {
|
||||
if (isWater) {
|
||||
if (city.containsBuildingUnique("+1 production from all sea resources worked by the city"))
|
||||
stats.production += 1
|
||||
if (city.containsBuildingUnique("+1 production and gold from all sea resources worked by the city")) {
|
||||
stats.production += 1
|
||||
stats.gold += 1
|
||||
}
|
||||
if (city != null && isWater) {
|
||||
if (city.containsBuildingUnique("+1 production from all sea resources worked by the city"))
|
||||
stats.production += 1
|
||||
if (city.containsBuildingUnique("+1 production and gold from all sea resources worked by the city")) {
|
||||
stats.production += 1
|
||||
stats.gold += 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user