mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-26 13:27:22 -04:00
Added nations of Russia, Rome and Arabia!
This commit is contained in:
parent
525a26e972
commit
1227a47ea2
@ -24,7 +24,7 @@ All the following are from [the Noun Project](https://thenounproject.com) licenc
|
||||
* [Spear](https://thenounproject.com/search/?q=Spear&i=11432) By Stephen Copinger
|
||||
* [Spear](https://thenounproject.com/search/?q=Spear&i=1233840) By Alvaro Cabrera
|
||||
* [Catapult](https://thenounproject.com/search/?q=Spear&i=1233840) By Jakub Ukrop
|
||||
* [Crossbow](https://thenounproject.com/search/?q=Crossbow&i=964657) By Creaticca Creative Agency
|
||||
* [Crossbow](https://thenounproject.com/term/crossbow/965389/) By Creaticca Creative Agency
|
||||
* [Trebuchet](https://thenounproject.com/search/?q=Trebuchet&i=827987) By Ben Davis
|
||||
* [Knight](https://thenounproject.com/search/?q=Knight&i=30912) By Tyler Glaude
|
||||
* [Lance](https://thenounproject.com/search/?q=Lance&i=440122) By parkjisun
|
||||
@ -37,6 +37,7 @@ All the following are from [the Noun Project](https://thenounproject.com) licenc
|
||||
* [Horse](https://thenounproject.com/search/?q=Horse&i=1023745) By Bakunetso Kaito
|
||||
* [Artillery](https://thenounproject.com/search/?q=Artillery&i=1165261) By Creative Mania
|
||||
* [Rapier](https://thenounproject.com/search/?q=musketeer&i=819822) By Hamish
|
||||
* [Unloaded Crossbow](https://thenounproject.com/term/unloaded-crossbow/815992/) By Hamish
|
||||
|
||||
## Resources
|
||||
|
||||
@ -143,6 +144,7 @@ All the following are from [the Noun Project](https://thenounproject.com) licenc
|
||||
* [Chemistry](https://thenounproject.com/term/chemistry/175847/) By Creative Stall
|
||||
* [Solar panel](https://thenounproject.com/term/solar-panel/154447/) By Andrew J. Young
|
||||
* [Cathedral](https://thenounproject.com/term/cathedral/1325415/) By Dairy Free Design
|
||||
* [Bazaar](https://thenounproject.com/term/bazaar/902288/) By Tokka Elkholy
|
||||
|
||||
|
||||
## Others
|
||||
|
BIN
android/Images/BuildingIcons/Bazaar.png
Normal file
BIN
android/Images/BuildingIcons/Bazaar.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.0 KiB |
BIN
android/Images/UnitIcons/Ballista.png
Normal file
BIN
android/Images/UnitIcons/Ballista.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.3 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.1 KiB |
@ -58,7 +58,7 @@
|
||||
name:"Library",
|
||||
hurryCostModifier:25,
|
||||
maintenance:1,
|
||||
unique:"+1 Science Per 2 Population",
|
||||
uniques:["+1 Science Per 2 Population"],
|
||||
requiredTech:"Writing"
|
||||
},
|
||||
{
|
||||
@ -67,7 +67,7 @@
|
||||
uniqueTo:"China",
|
||||
hurryCostModifier:25,
|
||||
gold:2,
|
||||
unique:"+1 Science Per 2 Population",
|
||||
uniques:["+1 Science Per 2 Population"],
|
||||
requiredTech:"Writing"
|
||||
},
|
||||
{
|
||||
@ -90,7 +90,7 @@
|
||||
culture:1,
|
||||
greatPersonPoints:{production:1},
|
||||
isWonder:true,
|
||||
unique:"Worker construction increased 25%, provides 2 free workers",
|
||||
uniques:["Worker construction increased 25%","Provides 2 free workers"],
|
||||
requiredTech:"Mathematics"
|
||||
},
|
||||
{
|
||||
@ -126,7 +126,7 @@
|
||||
culture:3,
|
||||
greatPersonPoints:{science:1},
|
||||
isWonder:true,
|
||||
unique:"Free Social Policy",
|
||||
uniques:["Free Social Policy"],
|
||||
requiredTech:"Philosophy"
|
||||
},
|
||||
{
|
||||
@ -143,7 +143,7 @@
|
||||
culture:1,
|
||||
greatPersonPoints:{production:1},
|
||||
isWonder:true,
|
||||
unique:"Golden Age length increases +50%",
|
||||
uniques:["Golden Age length increases +50%"],
|
||||
requiredTech:"Civil Service"
|
||||
},
|
||||
{
|
||||
@ -185,6 +185,17 @@
|
||||
percentStatBonus:{gold:25},
|
||||
requiredTech:"Currency"
|
||||
},
|
||||
{
|
||||
name:"Bazaar",
|
||||
replaces:"Market",
|
||||
uniqueTo:"Arabia",
|
||||
gold:2,
|
||||
specialistSlots:{gold:1},
|
||||
hurryCostModifier:25,
|
||||
percentStatBonus:{gold:25},
|
||||
uniques:["Provides 1 extra copy of each improved luxury resource near this City","+2 Gold for each source of Oil and oasis"],
|
||||
requiredTech:"Currency"
|
||||
},
|
||||
{
|
||||
name:"Monastery",
|
||||
maintenance:0,
|
||||
@ -203,11 +214,10 @@
|
||||
},
|
||||
{
|
||||
name:"Hagia Sophia",
|
||||
baseDescription: "+33% great person generation in all cities",
|
||||
culture:1,
|
||||
greatPersonPoints:{culture:1},
|
||||
isWonder:true,
|
||||
unique:"+33% great person generation in all cities",
|
||||
uniques:["+33% great person generation in all cities"],
|
||||
requiredTech:"Theology"
|
||||
},
|
||||
{
|
||||
@ -220,20 +230,18 @@
|
||||
},
|
||||
{
|
||||
name:"Machu Pichu",
|
||||
baseDescription: "Gold from all trade routes +25%",
|
||||
gold:5,
|
||||
greatPersonPoints:{gold:1},
|
||||
culture:1,
|
||||
isWonder:true,
|
||||
unique:"Gold from all trade routes +25%",
|
||||
uniques:["Gold from all trade routes +25%"],
|
||||
requiredTech:"Guilds"
|
||||
},
|
||||
{
|
||||
name:"Aqueduct",
|
||||
baseDescription: "40% of food is carried over after a new citizen is born",
|
||||
maintenance:1,
|
||||
hurryCostModifier:25,
|
||||
unique:"40% of food is carried over after a new citizen is born"
|
||||
uniques:["40% of food is carried over after a new citizen is born"]
|
||||
requiredTech:"Engineering"
|
||||
},
|
||||
{
|
||||
@ -255,18 +263,16 @@
|
||||
},
|
||||
{
|
||||
name:"University",
|
||||
baseDescription: "Jungles provide +2 science",
|
||||
maintenance:2,
|
||||
hurryCostModifier:15,
|
||||
percentStatBonus:{science:33},
|
||||
specialistSlots:{science:2},
|
||||
requiredBuilding:"Library",
|
||||
unique:"Jungles provide +2 science",
|
||||
uniques:["Jungles provide +2 science"],
|
||||
requiredTech:"Education"
|
||||
},
|
||||
{
|
||||
name:"Oxford University",
|
||||
baseDescription: "+50% science from this city",
|
||||
science:3,
|
||||
culture:1,
|
||||
freeTechs:1,
|
||||
@ -288,16 +294,15 @@
|
||||
culture:1,
|
||||
greatPersonPoints:{production:1},
|
||||
isWonder:true,
|
||||
unique:"Cost of acquiring new tiles reduced by 25%",
|
||||
uniques:["Cost of acquiring new tiles reduced by 25%"],
|
||||
requiredTech:"Chivalry"
|
||||
},
|
||||
{
|
||||
name:"Porcelain Tower",
|
||||
baseDescription: "A free great scientist appears, production to science conversion in cities increased by 33%",
|
||||
culture:1,
|
||||
greatPersonPoints:{science:2},
|
||||
isWonder:true,
|
||||
unique:"ScienceConversionIncrease",
|
||||
uniques:["Free great scientist appears","Production to science conversion in cities increased by 33%"],
|
||||
requiredTech:"Architecture"
|
||||
},
|
||||
{
|
||||
@ -338,7 +343,7 @@
|
||||
name:"Sistine Chapel",
|
||||
culture:1,
|
||||
isWonder:true,
|
||||
unique:"Culture in all cities increased by 25%",
|
||||
uniques:["Culture in all cities increased by 25%"],
|
||||
requiredTech:"Acoustics"
|
||||
},
|
||||
{
|
||||
@ -354,7 +359,7 @@
|
||||
name:"Forbidden Palace",
|
||||
culture:1,
|
||||
isWonder:true,
|
||||
unique:"Unhappiness from population decreased by 10%",
|
||||
uniques:["Unhappiness from population decreased by 10%"],
|
||||
requiredTech:"Banking"
|
||||
},
|
||||
{
|
||||
@ -371,7 +376,7 @@
|
||||
culture:1,
|
||||
happiness:4,
|
||||
isWonder:true,
|
||||
unique:"Empire enters golden age",
|
||||
uniques:["Empire enters golden age"],
|
||||
requiredTech:"Architecture"
|
||||
},
|
||||
{
|
||||
@ -406,18 +411,17 @@
|
||||
culture:1,
|
||||
happiness:4,
|
||||
isWonder:true,
|
||||
unique:"Free Great Artist Appears",
|
||||
uniques:["Free Great Artist Appears"],
|
||||
requiredTech:"Archaeology"
|
||||
},
|
||||
{
|
||||
name:"Public School",
|
||||
baseDescription: "+1 science per 2 population",
|
||||
science:3,
|
||||
specialistSlots:{science:1},
|
||||
requiredBuilding:"University",
|
||||
maintenance:3,
|
||||
hurryCostModifier:0,
|
||||
unique:"+1 Science Per 2 Population",
|
||||
uniques:["+1 Science Per 2 Population"],
|
||||
requiredTech:"Scientific Theory"
|
||||
},
|
||||
{
|
||||
@ -450,10 +454,9 @@
|
||||
},
|
||||
{
|
||||
name:"Cristo Redentor",
|
||||
baseDescription: "Culture cost of adopting new Policies reduced by 10%",
|
||||
culture:5,
|
||||
isWonder:true,
|
||||
unique:"Culture cost of adopting new Policies reduced by 10%",
|
||||
uniques:["Culture cost of adopting new Policies reduced by 10%"],
|
||||
requiredTech:"Flight"
|
||||
},
|
||||
{
|
||||
@ -478,7 +481,7 @@
|
||||
culture:1,
|
||||
happiness:5
|
||||
isWonder:true,
|
||||
unique:"Provides 1 happiness per social policy",
|
||||
uniques:["Provides 1 happiness per social policy"],
|
||||
requiredTech:"Radio"
|
||||
},
|
||||
{
|
||||
@ -520,13 +523,13 @@
|
||||
maintenance:3,
|
||||
cannotBeBuiltWith:"Nuclear Plant",
|
||||
requiredTech:"Ecology",
|
||||
unique:"Must be next to desert"
|
||||
uniques:["Must be next to desert"]
|
||||
},
|
||||
{
|
||||
name:"Apollo Program",
|
||||
cost:1500,
|
||||
isWonder:true,
|
||||
unique:"Enables construction of Spaceship parts",
|
||||
uniques:["Enables construction of Spaceship parts"],
|
||||
requiredTech:"Rocketry"
|
||||
},
|
||||
{
|
||||
@ -544,31 +547,31 @@
|
||||
production:3,
|
||||
requiredResource:"Aluminum",
|
||||
cost:360,
|
||||
unique:"Increases production of spaceship parts by 50%"
|
||||
uniques:["Increases production of spaceship parts by 50%"]
|
||||
requiredTech:"Robotics"
|
||||
},
|
||||
{
|
||||
name:"SS Booster",
|
||||
requiredResource:"Aluminum",
|
||||
requiredTech:"Robotics",
|
||||
unique:"Spaceship part"
|
||||
uniques:["Spaceship part"]
|
||||
},
|
||||
{
|
||||
name:"SS Cockpit",
|
||||
requiredResource:"Aluminum",
|
||||
requiredTech:"Satellites",
|
||||
unique:"Spaceship part"
|
||||
uniques:["Spaceship part"]
|
||||
},
|
||||
{
|
||||
name:"SS Engine",
|
||||
requiredResource:"Aluminum",
|
||||
requiredTech:"Particle Physics",
|
||||
unique:"Spaceship part"
|
||||
uniques:["Spaceship part"]
|
||||
},
|
||||
{
|
||||
name:"SS Statis Chamber",
|
||||
requiredResource:"Aluminum",
|
||||
requiredTech:"Nanotechnology",
|
||||
unique:"Spaceship part"
|
||||
uniques:["Spaceship part"]
|
||||
}
|
||||
]
|
@ -41,6 +41,28 @@
|
||||
"Dijon","Amiens","Cherbourg","Poitiers","Toulouse","Bayonne","Strasbourg","Brest","Bordeaux","Rennes",
|
||||
"Nice","Saint Etienne","Nantes","Reims","Le Mans","Montpellier","Limoges","Nancy","Lille","Caen"]
|
||||
},
|
||||
{
|
||||
name:"Russia",
|
||||
mainColor:[ 255, 215, 0],
|
||||
unique:"Strategic Resources provide +1 Production, and Horses, Iron and Uranium Resources provide double quantity",
|
||||
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"]
|
||||
},
|
||||
{
|
||||
name:"Rome",
|
||||
mainColor:[ 75,0,130],
|
||||
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"]
|
||||
},
|
||||
{
|
||||
name:"Arabia",
|
||||
mainColor:[ 0,100,0],
|
||||
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"]
|
||||
},
|
||||
{
|
||||
name:"Barbarians",
|
||||
mainColor:[200,200,200]
|
||||
|
@ -2072,13 +2072,21 @@
|
||||
German:"+1 Erforschung pro 2 Bewohner"
|
||||
Dutch:"+1 Wetenschap per 2 Populatie"
|
||||
}
|
||||
"Worker construction increased 25%, provides 2 free workers":{
|
||||
Italian:"+25% velocità costruzione lavoratori, offre 2 lavoratori liberi"
|
||||
Russian:"Увеличивает на 25% скорость создания улучшений на клетках , предоставляет 2 бесплатных рабочих"
|
||||
French:"La construction des travailleurs a augmenté de 25%, fournit 2 travailleurs libres"
|
||||
Romanian:"Lucrările de construcție a crescut cu 25%, oferă 2 lucrători liberi"
|
||||
German:"Arbeiterproduktion um 25% erhöht, gibt 2 freie Arbeiter"
|
||||
Dutch:"Werkerproducktie met 25% vehoogt, geeft 2 gratis werkers"
|
||||
"Worker construction increased 25%":{
|
||||
Italian:"+25% velocità costruzione lavoratori"
|
||||
Russian:"Увеличивает на 25% скорость создания улучшений на клетках"
|
||||
French:"La construction des travailleurs a augmenté de 25%"
|
||||
Romanian:"Lucrările de construcție a crescut cu 25%"
|
||||
German:"Arbeiterproduktion um 25% erhöht"
|
||||
Dutch:"Werkerproducktie met 25% vehoogt"
|
||||
}
|
||||
"Provides 2 free workers":{
|
||||
Italian:"Offre 2 lavoratori liberi"
|
||||
Russian:"предоставляет 2 бесплатных рабочих"
|
||||
French:"Fournit 2 travailleurs libres"
|
||||
Romanian:"Oferă 2 lucrători liberi"
|
||||
German:"Gibt 2 freie Arbeiter"
|
||||
Dutch:"Geeft 2 gratis werkers"
|
||||
}
|
||||
"Free Social Policy":{
|
||||
Italian:"Politica sociale gratuita"
|
||||
|
@ -104,6 +104,21 @@
|
||||
uniques:["Bonus vs City 200%","No defensive terrain bonus","Must set up to ranged attack"],
|
||||
hurryCostModifier:20
|
||||
},
|
||||
{
|
||||
name:"Ballista",
|
||||
unitType:"Siege",
|
||||
uniqueTo:"Rome",
|
||||
replaces:"Horseman",
|
||||
movement:2,
|
||||
strength:8,
|
||||
rangedStrength:10,
|
||||
cost: 75,
|
||||
requiredTech:"Mathematics",
|
||||
obsoleteTech:"Physics",
|
||||
upgradesTo: "Trebuchet",
|
||||
uniques:["Bonus vs City 200%","No defensive terrain bonus","Must set up to ranged attack"],
|
||||
hurryCostModifier:20
|
||||
},
|
||||
{
|
||||
name:"Swordsman",
|
||||
unitType:"Melee",
|
||||
@ -130,11 +145,11 @@
|
||||
{
|
||||
name:"Companion Cavalry",
|
||||
unitType:"Mounted",
|
||||
uniqueTo:"Greece",
|
||||
replaces:"Horseman",
|
||||
movement:5,
|
||||
strength:14,
|
||||
cost: 75,
|
||||
uniqueTo:"Greece",
|
||||
replaces:"Horseman",
|
||||
requiredTech:"Horseback Riding",
|
||||
requiredResource:"Horses",
|
||||
uniques:["Can move after attacking","No defensive terrain bonus","Penalty vs City 33%" ],
|
||||
|
@ -95,11 +95,18 @@ class CityInfo {
|
||||
val resource = tileInfo.getTileResource()
|
||||
if(resource.revealedBy!=null && !civInfo.tech.isResearched(resource.revealedBy!!)) continue
|
||||
if (resource.improvement == tileInfo.improvement || tileInfo.isCityCenter()){
|
||||
var amountToAdd = 1
|
||||
if(resource.resourceType == ResourceType.Strategic){
|
||||
if(civInfo.policies.isAdopted("Facism")) cityResources.add(resource, 4)
|
||||
else cityResources.add(resource, 2)
|
||||
amountToAdd = 2
|
||||
if(civInfo.policies.isAdopted("Facism")) amountToAdd*=2
|
||||
if(civInfo.getNation().unique=="Strategic Resources provide +1 Production, and Horses, Iron and Uranium Resources provide double quantity"
|
||||
&& resource.name in listOf("Horses","Iron","Uranium"))
|
||||
amountToAdd*=2
|
||||
}
|
||||
else cityResources.add(resource, 1)
|
||||
if(resource.resourceType == ResourceType.Luxury
|
||||
&& getBuildingUniques().contains("Provides 1 extra copy of each improved luxury resource near this City"))
|
||||
amountToAdd*=2
|
||||
cityResources.add(resource, amountToAdd)
|
||||
}
|
||||
|
||||
}
|
||||
@ -112,7 +119,7 @@ class CityInfo {
|
||||
return cityResources
|
||||
}
|
||||
|
||||
fun getBuildingUniques(): List<String?> = cityConstructions.getBuiltBuildings().filter { it.unique != null }.map { it.unique }
|
||||
fun getBuildingUniques(): List<String> = cityConstructions.getBuiltBuildings().flatMap { it.uniques }
|
||||
|
||||
fun getGreatPersonPoints(): Stats {
|
||||
var greatPersonPoints = population.getSpecialists().times(3f)
|
||||
|
@ -48,7 +48,8 @@ class CityStats {
|
||||
"Gold" -> stats.gold += production / 4
|
||||
"Science" -> {
|
||||
var scienceProduced = production / 4
|
||||
if (cityInfo.civInfo.getBuildingUniques().contains("ScienceConversionIncrease")) scienceProduced *= 1.33f
|
||||
if (cityInfo.civInfo.getBuildingUniques().contains("Production to science conversion in cities increased by 33%"))
|
||||
scienceProduced *= 1.33f
|
||||
if (cityInfo.civInfo.policies.isAdopted("Rationalism")) scienceProduced *= 1.33f
|
||||
stats.science += scienceProduced
|
||||
}
|
||||
|
@ -174,7 +174,7 @@ class CivilizationInfo {
|
||||
return civResources
|
||||
}
|
||||
|
||||
fun getBuildingUniques(): List<String> = cities.flatMap { it.cityConstructions.getBuiltBuildings().map { it.unique }.filterNotNull() }.distinct()
|
||||
fun getBuildingUniques(): List<String> = cities.flatMap { it.getBuildingUniques()}.distinct()
|
||||
|
||||
fun getCivUnits(): List<MapUnit> {
|
||||
return units
|
||||
|
@ -5,6 +5,7 @@ import com.unciv.UnCivGame
|
||||
import com.unciv.logic.city.CityInfo
|
||||
import com.unciv.logic.civilization.CivilizationInfo
|
||||
import com.unciv.models.gamebasics.GameBasics
|
||||
import com.unciv.models.gamebasics.tile.ResourceType
|
||||
import com.unciv.models.gamebasics.tile.Terrain
|
||||
import com.unciv.models.gamebasics.tile.TileImprovement
|
||||
import com.unciv.models.gamebasics.tile.TileResource
|
||||
@ -107,11 +108,15 @@ open class TileInfo {
|
||||
var stats = getBaseTerrain().clone()
|
||||
|
||||
if (terrainFeature != null) {
|
||||
val terrainFeature = getTerrainFeature()
|
||||
if (terrainFeature!!.overrideStats)
|
||||
stats = terrainFeature.clone()
|
||||
val terrainFeatureBase = getTerrainFeature()
|
||||
if (terrainFeatureBase!!.overrideStats)
|
||||
stats = terrainFeatureBase.clone()
|
||||
else
|
||||
stats.add(terrainFeature)
|
||||
stats.add(terrainFeatureBase)
|
||||
|
||||
if(terrainFeature=="Oasis" && city!=null
|
||||
&& city.getBuildingUniques().contains("+2 Gold for each source of Oil and oasis"))
|
||||
stats.gold += 2
|
||||
}
|
||||
|
||||
if (hasViewableResource(observingCiv)) {
|
||||
@ -120,6 +125,12 @@ open class TileInfo {
|
||||
if (resource.building != null && city != null && city.cityConstructions.isBuilt(resource.building!!)) {
|
||||
stats.add(resource.getBuilding()!!.resourceBonusStats!!) // resource-specific building (eg forge, stable) bonus
|
||||
}
|
||||
if(resource.resourceType==ResourceType.Strategic
|
||||
&& observingCiv.getNation().unique=="Strategic Resources provide +1 Production, and Horses, Iron and Uranium Resources provide double quantity")
|
||||
stats.production+=1
|
||||
if(resource.name=="Oil" && city!=null
|
||||
&& city.getBuildingUniques().contains("+2 Gold for each source of Oil and oasis"))
|
||||
stats.gold += 2
|
||||
}
|
||||
|
||||
val improvement = getTileImprovement()
|
||||
|
@ -38,7 +38,7 @@ class Building : NamedStats(), IConstruction{
|
||||
// Uniques
|
||||
var providesFreeBuilding: String? = null
|
||||
var freeTechs: Int = 0
|
||||
var unique: String? = null // for wonders which have individual functions that are totally unique
|
||||
var uniques = ArrayList<String>()
|
||||
|
||||
|
||||
/**
|
||||
@ -57,7 +57,7 @@ class Building : NamedStats(), IConstruction{
|
||||
// buildings that improve resources
|
||||
infoList += improvedResources.joinToString()+ " {provide} ".tr()+ resourceBonusStats.toString()
|
||||
}
|
||||
if(unique!=null) infoList += unique!!.tr()
|
||||
infoList += uniques.map { it.tr() }.joinToString { "\n" }
|
||||
if(cityStrength!=0) infoList+="{City strength} +".tr()+cityStrength
|
||||
if(cityHealth!=0) infoList+="{City health} +".tr()+cityHealth
|
||||
if(xpForNewUnits!=0) infoList+= "+$xpForNewUnits {XP for new units}".tr()
|
||||
@ -112,7 +112,7 @@ class Building : NamedStats(), IConstruction{
|
||||
stringBuilder.appendln("Requires a $requiredBuildingInAllCities to be built in all cities")
|
||||
if (providesFreeBuilding != null)
|
||||
stringBuilder.appendln("Provides a free $providesFreeBuilding in this city")
|
||||
if(unique!=null) stringBuilder.appendln(unique!!.tr())
|
||||
if(uniques.isNotEmpty()) stringBuilder.appendln(uniques.map { it.tr() }.joinToString { "\n" })
|
||||
if (stats.toString() != "")
|
||||
stringBuilder.appendln(stats)
|
||||
if (this.percentStatBonus != null) {
|
||||
@ -174,7 +174,8 @@ class Building : NamedStats(), IConstruction{
|
||||
return false
|
||||
|
||||
if (cannotBeBuiltWith != null && construction.isBuilt(cannotBeBuiltWith!!)) return false
|
||||
if ("Must be next to desert" == unique && !construction.cityInfo.getCenterTile().getTilesInDistance(1).any { it.baseTerrain == "Desert" })
|
||||
if ("Must be next to desert" in uniques
|
||||
&& !construction.cityInfo.getCenterTile().getTilesInDistance(1).any { it.baseTerrain == "Desert" })
|
||||
return false
|
||||
if (requiredResource != null && !civInfo.getCivResources().containsKey(GameBasics.TileResources[requiredResource!!]))
|
||||
return false
|
||||
@ -191,7 +192,7 @@ class Building : NamedStats(), IConstruction{
|
||||
if (!containsResourceWithImprovement) return false
|
||||
}
|
||||
|
||||
if ("Spaceship part" == unique) {
|
||||
if ("Spaceship part" in uniques) {
|
||||
if (!civInfo.getBuildingUniques().contains("Enables construction of Spaceship parts")) return false
|
||||
if (civInfo.scienceVictory.unconstructedParts()[name] == 0) return false // Don't need to build any more of these!
|
||||
}
|
||||
@ -201,7 +202,7 @@ class Building : NamedStats(), IConstruction{
|
||||
override fun postBuildEvent(construction: CityConstructions) {
|
||||
val civInfo = construction.cityInfo.civInfo
|
||||
|
||||
if (unique == "Spaceship part") {
|
||||
if ("Spaceship part" in uniques) {
|
||||
civInfo.scienceVictory.currentParts.add(name, 1)
|
||||
return
|
||||
}
|
||||
@ -209,14 +210,15 @@ class Building : NamedStats(), IConstruction{
|
||||
|
||||
if (providesFreeBuilding != null && !construction.builtBuildings.contains(providesFreeBuilding!!))
|
||||
construction.builtBuildings.add(providesFreeBuilding!!)
|
||||
when (unique) {
|
||||
"Empire enters golden age" -> civInfo.goldenAges.enterGoldenAge()
|
||||
"Free Great Artist Appears" -> civInfo.addGreatPerson("Great Artist")
|
||||
"Worker construction increased 25%, provides 2 free workers" -> {
|
||||
when {
|
||||
"Empire enters golden age" in uniques-> civInfo.goldenAges.enterGoldenAge()
|
||||
"Free Great Artist Appears" in uniques-> civInfo.addGreatPerson("Great Artist")
|
||||
"Free great scientist appears" in uniques -> civInfo.addGreatPerson("Great Scientist")
|
||||
"Provides 2 free workers" in uniques -> {
|
||||
civInfo.placeUnitNearTile(construction.cityInfo.location, "Worker")
|
||||
civInfo.placeUnitNearTile(construction.cityInfo.location, "Worker")
|
||||
}
|
||||
"Free Social Policy" -> {
|
||||
"Free Social Policy" in uniques -> {
|
||||
civInfo.policies.freePolicies++
|
||||
}
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ import com.unciv.ui.utils.colorFromRGB
|
||||
class Nation : INamed {
|
||||
override lateinit var name: String
|
||||
lateinit var mainColor: List<Int>
|
||||
var unique:String?=null
|
||||
var secondaryColor: List<Int>?=null
|
||||
fun getColor(): Color {
|
||||
return colorFromRGB(mainColor[0], mainColor[1], mainColor[2])
|
||||
|
@ -18,7 +18,7 @@ class TileImprovement : NamedStats(), ICivilopedia {
|
||||
private val turnsToBuild: Int = 0 // This is the base cost.
|
||||
fun getTurnsToBuild(civInfo: CivilizationInfo): Int {
|
||||
var realTurnsToBuild = turnsToBuild.toFloat()
|
||||
if (civInfo.getBuildingUniques().contains("Worker construction increased 25%, provides 2 free workers"))
|
||||
if (civInfo.getBuildingUniques().contains("Worker construction increased 25%"))
|
||||
realTurnsToBuild *= 0.75f
|
||||
if (civInfo.policies.isAdopted("Citizenship"))
|
||||
realTurnsToBuild *= 0.75f
|
||||
|
@ -27,12 +27,12 @@ class NewGameScreen: PickerScreen(){
|
||||
|
||||
val newGameParameters=NewGameParameters()
|
||||
|
||||
class NationTable(val nation:Nation,val newGameParameters: NewGameParameters, skin:Skin, onClick:()->Unit):Table(skin){
|
||||
class NationTable(val nation:Nation,val newGameParameters: NewGameParameters, skin:Skin, width:Float, onClick:()->Unit):Table(skin){
|
||||
init {
|
||||
pad(10f)
|
||||
background=ImageGetter.getBackground(nation.getColor().apply { a=0.5f })
|
||||
add(Label(nation.name, skin).apply { setFontColor(Color.WHITE)}).row()
|
||||
add(Label(getUniqueLabel(nation), skin).apply { setFontColor(Color.WHITE)})
|
||||
add(Label(getUniqueLabel(nation), skin).apply { setWrap(true);setFontColor(Color.WHITE)}).width(width)
|
||||
addClickListener { newGameParameters.nation=nation.name; onClick() }
|
||||
touchable=Touchable.enabled
|
||||
update()
|
||||
@ -47,6 +47,8 @@ class NewGameScreen: PickerScreen(){
|
||||
for (stat in building.toHashMap())
|
||||
if (stat.value != originalBuildingStatMap[stat.key])
|
||||
text += stat.value.toInt().toString() + " " + stat.key + " vs " + originalBuildingStatMap[stat.key]!!.toInt() + "\n"
|
||||
for(unique in building.uniques.filter { it !in originalBuilding.uniques })
|
||||
text += unique.tr()+"\n"
|
||||
if (building.maintenance != originalBuilding.maintenance)
|
||||
text += "{Maintainance} " + building.maintenance + " vs " + originalBuilding.maintenance + "\n"
|
||||
return text.tr()
|
||||
@ -67,6 +69,8 @@ class NewGameScreen: PickerScreen(){
|
||||
return text.tr()
|
||||
}
|
||||
|
||||
if(nation.unique!=null) return nation.unique
|
||||
|
||||
return ""
|
||||
}
|
||||
|
||||
@ -85,9 +89,9 @@ class NewGameScreen: PickerScreen(){
|
||||
mainTable.add(getOptionsTable())
|
||||
val civPickerTable = Table().apply { defaults().pad(5f) }
|
||||
for(nation in GameBasics.Nations.values.filterNot { it.name == "Barbarians" }){
|
||||
val nationTable = NationTable(nation,newGameParameters,skin){updateNationTables()}
|
||||
val nationTable = NationTable(nation,newGameParameters,skin,stage.width/3 ){updateNationTables()}
|
||||
nationTables.add(nationTable)
|
||||
civPickerTable.add(nationTable).width(stage.width/3).row()
|
||||
civPickerTable.add(nationTable).row()
|
||||
}
|
||||
mainTable.setFillParent(true)
|
||||
mainTable.add(ScrollPane(civPickerTable))
|
||||
|
Loading…
x
Reference in New Issue
Block a user