AI now considers war on multiple civs, starting with the closest

This commit is contained in:
Yair Morgenstern 2018-08-08 08:23:20 +03:00
parent c35f7d68f2
commit 9d0035a8a6
2 changed files with 3 additions and 0 deletions

View file

@ -824,6 +824,8 @@
}
"We have encountered [civName]!":{}
"Cannot provide upkeep for [unitName] - unit has been disbanded!":{}
// Save and load game

View file

@ -81,6 +81,7 @@ class Automation {
val enemyCivsByDistanceToOurs = civInfo.diplomacy.values.map { it.otherCiv() }
.filterNot { it == civInfo || it.cities.isEmpty() || !civInfo.diplomacy[it.civName]!!.canDeclareWar() }
.groupBy { getMinDistanceBetweenCities(civInfo,it) }
.toSortedMap()
val ourCombatStrength = evaluteCombatStrength(civInfo)
for (group in enemyCivsByDistanceToOurs){
if(group.key>7) break