mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-18 19:59:47 +07:00
Resolved #950 - AI now construct Harbors and Seaports
This commit is contained in:
@ -216,7 +216,12 @@ class ConstructionAutomation(val cityConstructions: CityConstructions){
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun addProductionBuildingChoice() {
|
private fun addProductionBuildingChoice() {
|
||||||
val productionBuilding = buildableNotWonders.filter { it.isStatRelated(Stat.Production) }
|
val hasWaterResource = cityInfo.getTilesInRange().any { it.isWater && it.resource!=null }
|
||||||
|
val productionBuilding = buildableNotWonders
|
||||||
|
.filter { it.isStatRelated(Stat.Production)
|
||||||
|
|| (hasWaterResource && (it.uniques.contains("+1 production and gold from all sea resources worked by the city")
|
||||||
|
|| it.uniques.contains("+1 production from all sea resources worked by the city")) )
|
||||||
|
}
|
||||||
.minBy { it.cost }
|
.minBy { it.cost }
|
||||||
if (productionBuilding != null) {
|
if (productionBuilding != null) {
|
||||||
addChoice(relativeCostEffectiveness, productionBuilding.name, 1.5f)
|
addChoice(relativeCostEffectiveness, productionBuilding.name, 1.5f)
|
||||||
|
Reference in New Issue
Block a user