mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-27 22:06:05 -04:00
Resolved #2787 - AIs MUCH more likely to build the Apollo Program and win a scientific victory
This commit is contained in:
parent
e1aaa88e3d
commit
4357d2513a
@ -162,9 +162,9 @@ class ConstructionAutomation(val cityConstructions: CityConstructions){
|
||||
}
|
||||
}
|
||||
|
||||
private fun addWondersChoice() {
|
||||
if (buildableWonders.any()) {
|
||||
fun getWonderPriority(wonder: Building): Float {
|
||||
private fun getWonderPriority(wonder: Building): Float {
|
||||
if(wonder.uniques.contains("Enables construction of Spaceship parts"))
|
||||
return 2f
|
||||
if (preferredVictoryType == VictoryType.Cultural
|
||||
&& wonder.name in listOf("Sistine Chapel", "Eiffel Tower", "Cristo Redentor", "Neuschwanstein", "Sydney Opera House"))
|
||||
return 3f
|
||||
@ -181,6 +181,9 @@ class ConstructionAutomation(val cityConstructions: CityConstructions){
|
||||
return 1f
|
||||
}
|
||||
|
||||
private fun addWondersChoice() {
|
||||
if (!buildableWonders.any()) return
|
||||
|
||||
val highestPriorityWonder = buildableWonders
|
||||
.maxBy { getWonderPriority(it) }!!
|
||||
val citiesBuildingWonders = civInfo.cities
|
||||
@ -190,7 +193,6 @@ class ConstructionAutomation(val cityConstructions: CityConstructions){
|
||||
if (!cityIsOverAverageProduction) modifier /= 5 // higher production cities will deal with this
|
||||
addChoice(relativeCostEffectiveness, highestPriorityWonder.name, modifier)
|
||||
}
|
||||
}
|
||||
|
||||
private fun addUnitTrainingBuildingChoice() {
|
||||
val unitTrainingBuilding = buildableNotWonders.asSequence()
|
||||
|
Loading…
x
Reference in New Issue
Block a user