From e95a62126dc1ed1dd83d324bc3dbc2800672bdde Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Fri, 21 May 2021 13:46:44 +0300 Subject: [PATCH] Better peace agreement evaluations, for when there is no great power imbalance between nations --- core/src/com/unciv/logic/trade/TradeEvaluation.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/com/unciv/logic/trade/TradeEvaluation.kt b/core/src/com/unciv/logic/trade/TradeEvaluation.kt index 9d21ec08eb..74bf973a54 100644 --- a/core/src/com/unciv/logic/trade/TradeEvaluation.kt +++ b/core/src/com/unciv/logic/trade/TradeEvaluation.kt @@ -239,7 +239,8 @@ class TradeEvaluation { fun evaluatePeaceCostForThem(ourCivilization: CivilizationInfo, otherCivilization: CivilizationInfo): Int { val ourCombatStrength = Automation.evaluteCombatStrength(ourCivilization) val theirCombatStrength = Automation.evaluteCombatStrength(otherCivilization) - if (ourCombatStrength == theirCombatStrength) return 0 + if (ourCombatStrength*1.5f > theirCombatStrength && theirCombatStrength * 1.5f > ourCombatStrength) + return 0 // we're roughly equal, there's no huge power imbalance if (ourCombatStrength == 0) return -1000 if (theirCombatStrength == 0) return 1000 // Chumps got no cities or units if (ourCombatStrength > theirCombatStrength) {