mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-20 17:32:57 +07:00
Added priority to wonders by type
This commit is contained in:
parent
b7be0e7934
commit
e1884768fd
@ -156,9 +156,18 @@ class Automation {
|
||||
|
||||
//Wonders
|
||||
if (buildableWonders.isNotEmpty()) {
|
||||
val wondersByPriority = buildableWonders.sortedByDescending {
|
||||
if(it.isStatRelated(Stat.Science)){
|
||||
if(preferredVictoryType==VictoryType.Scientific) return@sortedByDescending 1.5f
|
||||
else return@sortedByDescending 1.3f
|
||||
}
|
||||
if(it.isStatRelated(Stat.Happiness)) return@sortedByDescending 1.2f
|
||||
if(it.isStatRelated(Stat.Production)) return@sortedByDescending 1.1f
|
||||
1f
|
||||
}
|
||||
val wonder = wondersByPriority.first()
|
||||
val citiesBuildingWonders = cityInfo.civInfo.cities
|
||||
.count { it.cityConstructions.isBuildingWonder() }
|
||||
val wonder = buildableWonders.random()
|
||||
relativeCostEffectiveness.add(ConstructionChoice(wonder.name,3.5f / (citiesBuildingWonders + 1)))
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user