AI peace evaluation no longer hardocded - resolves first point of #5490

This commit is contained in:
yairm210 2021-12-28 22:43:23 +02:00
parent 66fa8db51c
commit f3b4c2fa6f
2 changed files with 1 additions and 3 deletions

View File

@ -663,7 +663,7 @@ class CivilizationInfo {
}
private fun calculateMilitaryMight(): Int {
var sum = 0
var sum = 1 // minimum value, so we never end up with 0
for (unit in units) {
sum += if (unit.baseUnit.isWaterUnit())
unit.getForceEvaluation() / 2 // Really don't value water units highly

View File

@ -266,8 +266,6 @@ class TradeEvaluation {
val theirCombatStrength = otherCivilization.getStatForRanking(RankingType.Force)
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 combat units
if (ourCombatStrength > theirCombatStrength) {
val absoluteAdvantage = ourCombatStrength - theirCombatStrength
val percentageAdvantage = absoluteAdvantage / theirCombatStrength.toFloat()