Converted civ uniques up to India

This commit is contained in:
Yair Morgenstern 2020-08-06 19:53:29 +03:00
parent 1fb566ec30
commit 9f5b8d157a
7 changed files with 26 additions and 13 deletions

View file

@ -596,7 +596,7 @@
"culture": 1, "culture": 1,
"isWonder": true, "isWonder": true,
"greatPersonPoints": {"culture": 1}, "greatPersonPoints": {"culture": 1},
"uniques": ["Unhappiness from population decreased by 10%"], "uniques": ["Unhappiness from population decreased by [10]%"],
"requiredTech": "Banking", "requiredTech": "Banking",
"quote": "'Most of us can, as we choose, make of this world either a palace or a prison' - John Lubbock" "quote": "'Most of us can, as we choose, make of this world either a palace or a prison' - John Lubbock"
}, },

View file

@ -30,6 +30,7 @@
"outerColor": [27,53,63], "outerColor": [27,53,63],
"innerColor": [213,249,255], "innerColor": [213,249,255],
"unique": "INGENUITY", "unique": "INGENUITY",
"uniqueName": "Ingenuity",
"uniques": ["Receive free [Great Scientist] when you discover [Writing]", "[Great Scientist] is earned [50]% faster"] "uniques": ["Receive free [Great Scientist] when you discover [Writing]", "[Great Scientist] is earned [50]% faster"]
"cities": ["Babylon","Akkad","Dur-Kurigalzu","Nippur","Borsippa","Sippar","Opis","Mari","Shushan","Eshnunna", "cities": ["Babylon","Akkad","Dur-Kurigalzu","Nippur","Borsippa","Sippar","Opis","Mari","Shushan","Eshnunna",
"Ellasar","Erech","Kutha","Sirpurla","Neribtum","Ashur","Ninveh","Nimrud","Arbela","Nuzi", "Ellasar","Erech","Kutha","Sirpurla","Neribtum","Ashur","Ninveh","Nimrud","Arbela","Nuzi",
@ -59,6 +60,7 @@
"outerColor": [181, 232, 232], "outerColor": [181, 232, 232],
"innerColor": [68,142,249], "innerColor": [68,142,249],
"unique": "HELLENIC_LEAGUE", "unique": "HELLENIC_LEAGUE",
"uniqueName": "Hellenic League",
"uniques": ["City-State Influence degrades at half rate", "City-State Influence recovers at twice the normal rate"] "uniques": ["City-State Influence degrades at half rate", "City-State Influence recovers at twice the normal rate"]
"cities": ["Athens","Sparta","Corinth","Argos","Knossos","Mycenae","Pharsalos","Ephesus","Halicarnassus","Rhodes", "cities": ["Athens","Sparta","Corinth","Argos","Knossos","Mycenae","Pharsalos","Ephesus","Halicarnassus","Rhodes",
"Eretria","Pergamon","Miletos","Megara","Phocaea","Sicyon","Tiryns","Samos","Mytilene","Chios", "Eretria","Pergamon","Miletos","Megara","Phocaea","Sicyon","Tiryns","Samos","Mytilene","Chios",
@ -84,6 +86,7 @@
"outerColor": [9, 112, 84], "outerColor": [9, 112, 84],
"innerColor": [255,255,255], "innerColor": [255,255,255],
"unique": "ART_OF_WAR", "unique": "ART_OF_WAR",
"uniqueName": "Art of War",
"uniques": ["Great General provides double combat bonus", "[Great General] is earned [50]% faster"] "uniques": ["Great General provides double combat bonus", "[Great General] is earned [50]% faster"]
"cities": ["Beijing","Shanghai","Guangzhou","Nanjing","Xian","Chengdu","Hangzhou","Tianjin","Macau","Shandong", "cities": ["Beijing","Shanghai","Guangzhou","Nanjing","Xian","Chengdu","Hangzhou","Tianjin","Macau","Shandong",
"Kaifeng","Ningbo","Baoding","Yangzhou","Harbin","Chongqing","Luoyang","Kunming","Taipei","Shenyang", "Kaifeng","Ningbo","Baoding","Yangzhou","Harbin","Chongqing","Luoyang","Kunming","Taipei","Shenyang",
@ -113,6 +116,7 @@
"outerColor": [ 231, 213, 0], "outerColor": [ 231, 213, 0],
"innerColor": [98,10,210], "innerColor": [98,10,210],
"unique": "MONUMENT_BUILDERS", "unique": "MONUMENT_BUILDERS",
"uniqueName": "Monument Builders",
"uniques": ["+[20]% Production when constructing [Wonders]"] "uniques": ["+[20]% Production when constructing [Wonders]"]
"cities": ["Thebes","Memphis","Heliopolis","Elephantine","Alexandria","Pi-Ramesses","Giza","Byblos","Akhetaten", "cities": ["Thebes","Memphis","Heliopolis","Elephantine","Alexandria","Pi-Ramesses","Giza","Byblos","Akhetaten",
"Hieraconpolis","Abydos","Asyut","Avaris","Lisht","Buto","Edfu","Pithom","Busiris","Kahun","Athribis", "Hieraconpolis","Abydos","Asyut","Avaris","Lisht","Buto","Edfu","Pithom","Busiris","Kahun","Athribis",
@ -139,6 +143,7 @@
"outerColor": [ 114, 0, 0], "outerColor": [ 114, 0, 0],
"innerColor": [255,255,255], "innerColor": [255,255,255],
"unique": "SUN_NEVER_SETS", "unique": "SUN_NEVER_SETS",
"uniqueName": "Sun Never Sets",
"uniques": ["+2 movement for all naval units"] "uniques": ["+2 movement for all naval units"]
"cities": ["London","York","Nottingham","Hastings","Canterbury","Coventry","Warwick","Newcastle","Oxford","Liverpool", "cities": ["London","York","Nottingham","Hastings","Canterbury","Coventry","Warwick","Newcastle","Oxford","Liverpool",
"Dover","Brighton","Norwich","Leeds","Reading","Birmingham","Richmond","Exeter","Cambridge","Gloucester", "Dover","Brighton","Norwich","Leeds","Reading","Birmingham","Richmond","Exeter","Cambridge","Gloucester",
@ -163,6 +168,7 @@
"outerColor": [ 38, 98, 255], "outerColor": [ 38, 98, 255],
"innerColor": [239,236,148], "innerColor": [239,236,148],
"unique": "ANCIEN_REGIME", "unique": "ANCIEN_REGIME",
"uniqueName": "Ancien Régime",
"uniques": ["+2 Culture per turn from cities before discovering Steam Power"] "uniques": ["+2 Culture per turn from cities before discovering Steam Power"]
"cities": ["Paris","Orleans","Lyon","Troyes","Tours","Marseille","Chartres","Avignon","Rouen","Grenoble", "cities": ["Paris","Orleans","Lyon","Troyes","Tours","Marseille","Chartres","Avignon","Rouen","Grenoble",
"Dijon","Amiens","Cherbourg","Poitiers","Toulouse","Bayonne","Strasbourg","Brest","Bordeaux","Rennes", "Dijon","Amiens","Cherbourg","Poitiers","Toulouse","Bayonne","Strasbourg","Brest","Bordeaux","Rennes",
@ -188,6 +194,7 @@
"outerColor": [ 236, 178, 0], "outerColor": [ 236, 178, 0],
"innerColor": [0,0,0], "innerColor": [0,0,0],
"unique": "SIBERIAN_RICHES", "unique": "SIBERIAN_RICHES",
"uniqueName": "Siberian Riches",
"uniques": ["[+1 Production] from [Strategic resource] tiles","Double quantity of [Horses] produced", "uniques": ["[+1 Production] from [Strategic resource] tiles","Double quantity of [Horses] produced",
"Double quantity of [Iron] produced","Double quantity of [Uranium] produced"] "Double quantity of [Iron] produced","Double quantity of [Uranium] produced"]
"cities": ["Moscow","St. Petersburg","Novgorod","Rostov","Yaroslavl","Yekaterinburg","Yakutsk","Vladivostok","Smolensk","Orenburg", "cities": ["Moscow","St. Petersburg","Novgorod","Rostov","Yaroslavl","Yekaterinburg","Yakutsk","Vladivostok","Smolensk","Orenburg",
@ -214,6 +221,7 @@
"outerColor": [ 53,0,87], "outerColor": [ 53,0,87],
"innerColor": [238,201,9], "innerColor": [238,201,9],
"unique": "GLORY_OF_ROME", "unique": "GLORY_OF_ROME",
"uniqueName": "The Glory of Rome",
"uniques": ["+25% Production towards any buildings that already exist in the Capital"] "uniques": ["+25% Production towards any buildings that already exist in the Capital"]
"cities": ["Rome","Antium","Cumae","Neapolis","Ravenna","Arretium","Mediolanum","Arpinum","Circei","Setia", "cities": ["Rome","Antium","Cumae","Neapolis","Ravenna","Arretium","Mediolanum","Arpinum","Circei","Setia",
"Satricum","Ardea","Ostia","Velitrae","Viroconium","Tarentum","Brundisium","Caesaraugusta","Caesarea","Palmyra", "Satricum","Ardea","Ostia","Velitrae","Viroconium","Tarentum","Brundisium","Caesaraugusta","Caesarea","Palmyra",
@ -239,6 +247,7 @@
"outerColor": [ 41,83,42], "outerColor": [ 41,83,42],
"innerColor": [146,221,9], "innerColor": [146,221,9],
"unique": "TRADE_CARAVANS", "unique": "TRADE_CARAVANS",
"uniqueName": "Trade Caravans",
"uniques": ["[+1 Gold] from each Trade Route", "Double quantity of [Oil] produced"], "uniques": ["[+1 Gold] from each Trade Route", "Double quantity of [Oil] produced"],
"cities": ["Mecca","Medina","Damascus","Baghdad","Najran","Kufah","Basra","Khurasan","Anjar","Fustat", "cities": ["Mecca","Medina","Damascus","Baghdad","Najran","Kufah","Basra","Khurasan","Anjar","Fustat",
"Aden","Yamama","Muscat","Mansura","Bukhara","Fez","Shiraz","Merw","Balkh","Mosul", "Aden","Yamama","Muscat","Mansura","Bukhara","Fez","Shiraz","Merw","Balkh","Mosul",
@ -262,6 +271,8 @@
"outerColor": [ 28,51,119], "outerColor": [ 28,51,119],
"innerColor": [255,255,255], "innerColor": [255,255,255],
"unique": "MANIFEST_DESTINY", "unique": "MANIFEST_DESTINY",
"uniqueName": "Manifest Destiny",
"uniques": ["+1 Sight for all land military units", "-50% cost when purchasing tiles"]
"cities": ["Washington","New York","Boston","Philadelphia","Atlanta","Chicago","Seattle","San Francisco","Los Angeles","Houston", "cities": ["Washington","New York","Boston","Philadelphia","Atlanta","Chicago","Seattle","San Francisco","Los Angeles","Houston",
"Portland","St. Louis","Miami","Buffalo","Detroit","New Orleans","Baltimore","Denver","Cincinnati","Dallas","Memphis", "Portland","St. Louis","Miami","Buffalo","Detroit","New Orleans","Baltimore","Denver","Cincinnati","Dallas","Memphis",
"Cleveland","Kansas City","San Diego","Richmond","Las Vegas","Phoenix","Albuquerque","Minneapolis","Pittsburgh", "Cleveland","Kansas City","San Diego","Richmond","Las Vegas","Phoenix","Albuquerque","Minneapolis","Pittsburgh",
@ -288,6 +299,8 @@
"outerColor": [215,225,225], "outerColor": [215,225,225],
"innerColor": [185,0,0], "innerColor": [185,0,0],
"unique": "BUSHIDO", "unique": "BUSHIDO",
"uniqueName": "Bushido",
"uniques": ["Units fight as though they were at full strength even when damaged"]
"cities": ["Kyoto","Osaka","Tokyo","Satsuma","Kagoshima","Nara","Nagoya","Izumo","Nagasaki","Yokohama", "cities": ["Kyoto","Osaka","Tokyo","Satsuma","Kagoshima","Nara","Nagoya","Izumo","Nagasaki","Yokohama",
"Shimonoseki","Matsuyama","Sapporo","Hakodate","Ise","Toyama","Fukushima","Suo","Bizen","Echizen", "Shimonoseki","Matsuyama","Sapporo","Hakodate","Ise","Toyama","Fukushima","Suo","Bizen","Echizen",
"Izumi","Omi","Echigo","Kozuke","Sado","Kobe","Nagano","Hiroshima","Takayama","Akita","Fukuoka","Aomori", "Izumi","Omi","Echigo","Kozuke","Sado","Kobe","Nagano","Hiroshima","Takayama","Akita","Fukuoka","Aomori",
@ -312,6 +325,8 @@
"outerColor": [16,126,5], "outerColor": [16,126,5],
"innerColor": [255,153,51], "innerColor": [255,153,51],
"unique": "POPULATION_GROWTH", "unique": "POPULATION_GROWTH",
"unique": "Population Growth",
"uniques": ["Unhappiness from number of Cities doubled", "Unhappiness from population decreased by [50]%"]
"cities": ["Delhi","Mumbai","Vijayanagara","Pataliputra","Varanasi","Agra","Calcutta","Lahore","Bangalore","Hyderabad","Madurai","Ahmedabad", "cities": ["Delhi","Mumbai","Vijayanagara","Pataliputra","Varanasi","Agra","Calcutta","Lahore","Bangalore","Hyderabad","Madurai","Ahmedabad",
"Kolhapur","Prayaga","Ayodhya","Indraprastha","Mathura","Ujjain","Gulbarga","Jaunpur","Rajagriha","Sravasti","Tiruchirapalli","Thanjavur", "Kolhapur","Prayaga","Ayodhya","Indraprastha","Mathura","Ujjain","Gulbarga","Jaunpur","Rajagriha","Sravasti","Tiruchirapalli","Thanjavur",
"Bodhgaya","Kushinagar","Amaravati","Gaur","Gwalior","Jaipur","Karachi"] "Bodhgaya","Kushinagar","Amaravati","Gaur","Gwalior","Jaipur","Karachi"]

View file

@ -88,7 +88,7 @@
{ {
"name": "Meritocracy", "name": "Meritocracy",
"effect": "+1 happiness for every city connected to capital, -5% unhappiness from citizens", "effect": "+1 happiness for every city connected to capital, -5% unhappiness from citizens",
"uniques": ["+1 happiness for every city connected to capital", "-5% unhappiness from citizens"], "uniques": ["+1 happiness for every city connected to capital", "Unhappiness from population decreased by [5]%"],
"requires": ["Citizenship"], "requires": ["Citizenship"],
"row": 2, "row": 2,
"column": 5 "column": 5

View file

@ -259,8 +259,9 @@ object BattleDamage {
} }
private fun getHealthDependantDamageRatio(combatant: ICombatant): Float { private fun getHealthDependantDamageRatio(combatant: ICombatant): Float {
return if(combatant.getUnitType() == UnitType.City return if (combatant.getUnitType() == UnitType.City
|| combatant.getCivInfo().nation.unique == UniqueAbility.BUSHIDO && !combatant.getUnitType().isAirUnit()) || combatant.getCivInfo().hasUnique("Units fight as though they were at full strength even when damaged")
&& !combatant.getUnitType().isAirUnit())
1f 1f
else 1 - (100 - combatant.getHealth()) / 300f// Each 3 points of health reduces damage dealt by 1% like original game else 1 - (100 - combatant.getHealth()) / 300f// Each 3 points of health reduces damage dealt by 1% like original game
} }

View file

@ -61,7 +61,7 @@ class CityExpansionManager {
if (cityInfo.containsBuildingUnique("Culture and Gold costs of acquiring new tiles reduced by 25% in this city")) if (cityInfo.containsBuildingUnique("Culture and Gold costs of acquiring new tiles reduced by 25% in this city"))
cost *= 0.75 // Specialty of Krepost cost *= 0.75 // Specialty of Krepost
if (cityInfo.civInfo.nation.unique == UniqueAbility.MANIFEST_DESTINY) if (cityInfo.civInfo.hasUnique("-50% cost when purchasing tiles"))
cost /= 2 cost /= 2
return cost.toInt() return cost.toInt()
} }

View file

@ -183,7 +183,7 @@ class CityStats {
unhappinessModifier *= civInfo.gameInfo.getDifficulty().aiUnhappinessModifier unhappinessModifier *= civInfo.gameInfo.getDifficulty().aiUnhappinessModifier
var unhappinessFromCity = -3f // -3 happiness per city var unhappinessFromCity = -3f // -3 happiness per city
if (civInfo.nation.unique == UniqueAbility.POPULATION_GROWTH) if (civInfo.hasUnique("Unhappiness from number of Cities doubled"))
unhappinessFromCity *= 2f//doubled for the Indian unhappinessFromCity *= 2f//doubled for the Indian
newHappinessList["Cities"] = unhappinessFromCity * unhappinessModifier newHappinessList["Cities"] = unhappinessFromCity * unhappinessModifier
@ -196,12 +196,9 @@ class CityStats {
unhappinessFromCitizens *= 1.5f unhappinessFromCitizens *= 1.5f
else if (hasExtraAnnexUnhappiness()) else if (hasExtraAnnexUnhappiness())
unhappinessFromCitizens *= 2f unhappinessFromCitizens *= 2f
if (civInfo.hasUnique("Unhappiness from population decreased by 10%"))
unhappinessFromCitizens *= 0.9f for(unique in civInfo.getMatchingUniques("Unhappiness from population decreased by []%"))
if (civInfo.hasUnique("-5% unhappiness from citizens")) unhappinessFromCitizens *= (1-unique.params[0].toFloat()/100)
unhappinessFromCitizens *= 0.95f
if (civInfo.nation.unique == UniqueAbility.POPULATION_GROWTH)
unhappinessFromCitizens *= 0.5f //halved for the Indian
newHappinessList["Population"] = -unhappinessFromCitizens * unhappinessModifier newHappinessList["Population"] = -unhappinessFromCitizens * unhappinessModifier

View file

@ -160,7 +160,7 @@ class MapUnit {
visibilityRange += getUniques().count { it == "+1 Visibility Range" } visibilityRange += getUniques().count { it == "+1 Visibility Range" }
if (hasUnique("+2 Visibility Range")) visibilityRange += 2 // This shouldn't be stackable if (hasUnique("+2 Visibility Range")) visibilityRange += 2 // This shouldn't be stackable
if (hasUnique("Limited Visibility")) visibilityRange -= 1 if (hasUnique("Limited Visibility")) visibilityRange -= 1
if (civInfo.nation.unique == UniqueAbility.MANIFEST_DESTINY) if (civInfo.hasUnique("+1 Sight for all land military units"))
visibilityRange += 1 visibilityRange += 1
if (type.isWaterUnit() && !type.isCivilian() if (type.isWaterUnit() && !type.isCivilian()
&& civInfo.hasUnique("All military naval units receive +1 movement and +1 sight")) && civInfo.hasUnique("All military naval units receive +1 movement and +1 sight"))