AI doesn't declare war so quickly anymore
This commit is contained in:
parent
4bc598dcd4
commit
a73ba90c38
1 changed files with 3 additions and 2 deletions
|
@ -76,7 +76,8 @@ class Automation {
|
|||
|
||||
// Declare war?
|
||||
if(civInfo.cities.isNotEmpty() && civInfo.diplomacy.isNotEmpty()
|
||||
&& !civInfo.isAtWar()) {
|
||||
&& !civInfo.isAtWar()
|
||||
&& civInfo.getCivUnits().filter { it.baseUnit.unitType != UnitType.Civilian }.size > civInfo.cities.size*2) {
|
||||
|
||||
val enemyCivsByDistanceToOurs = civInfo.diplomacy.values.map { it.otherCiv() }
|
||||
.filterNot { it == civInfo || it.cities.isEmpty() || !civInfo.diplomacy[it.civName]!!.canDeclareWar() }
|
||||
|
@ -86,7 +87,7 @@ class Automation {
|
|||
for (group in enemyCivsByDistanceToOurs){
|
||||
if(group.key>7) break
|
||||
for(otherCiv in group.value){
|
||||
if(evaluteCombatStrength(otherCiv)*1.5<ourCombatStrength){
|
||||
if(evaluteCombatStrength(otherCiv)*2<ourCombatStrength){
|
||||
civInfo.diplomacy[otherCiv.civName]!!.declareWar()
|
||||
break
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue