mirror of
https://github.com/yairm210/Unciv.git
synced 2025-02-10 19:09:06 +07:00
AI now considers war on multiple civs, starting with the closest
This commit is contained in:
parent
c35f7d68f2
commit
9d0035a8a6
@ -824,6 +824,8 @@
|
||||
}
|
||||
|
||||
"We have encountered [civName]!":{}
|
||||
|
||||
"Cannot provide upkeep for [unitName] - unit has been disbanded!":{}
|
||||
|
||||
|
||||
// Save and load game
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user