Better peace agreement evaluations, for when there is no great power imbalance between nations

This commit is contained in:
Yair Morgenstern 2021-05-21 13:46:44 +03:00
parent b4f588e70f
commit e95a62126d

View File

@ -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) {