From a73ba90c3867798deaffc04f68b5299c66afb652 Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Mon, 17 Sep 2018 18:34:51 +0300 Subject: [PATCH] AI doesn't declare war so quickly anymore --- core/src/com/unciv/logic/automation/Automation.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/com/unciv/logic/automation/Automation.kt b/core/src/com/unciv/logic/automation/Automation.kt index 514da495..11a19383 100644 --- a/core/src/com/unciv/logic/automation/Automation.kt +++ b/core/src/com/unciv/logic/automation/Automation.kt @@ -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