mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-27 13:55:54 -04:00
AI much less motivated to attack city-states
This commit is contained in:
parent
e95a62126d
commit
3801a81bf4
@ -410,6 +410,8 @@ object NextTurnAutomation {
|
|||||||
if (theirCity.getTiles().none { it.neighbors.any { it.getOwner() == theirCity.civInfo && it.getCity() != theirCity } })
|
if (theirCity.getTiles().none { it.neighbors.any { it.getOwner() == theirCity.civInfo && it.getCity() != theirCity } })
|
||||||
modifierMap["Isolated city"] = 15
|
modifierMap["Isolated city"] = 15
|
||||||
|
|
||||||
|
if (otherCiv.isCityState()) modifierMap["City-state"] = -20
|
||||||
|
|
||||||
return modifierMap.values.sum()
|
return modifierMap.values.sum()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -239,7 +239,7 @@ class TradeEvaluation {
|
|||||||
fun evaluatePeaceCostForThem(ourCivilization: CivilizationInfo, otherCivilization: CivilizationInfo): Int {
|
fun evaluatePeaceCostForThem(ourCivilization: CivilizationInfo, otherCivilization: CivilizationInfo): Int {
|
||||||
val ourCombatStrength = Automation.evaluteCombatStrength(ourCivilization)
|
val ourCombatStrength = Automation.evaluteCombatStrength(ourCivilization)
|
||||||
val theirCombatStrength = Automation.evaluteCombatStrength(otherCivilization)
|
val theirCombatStrength = Automation.evaluteCombatStrength(otherCivilization)
|
||||||
if (ourCombatStrength*1.5f > theirCombatStrength && theirCombatStrength * 1.5f > ourCombatStrength)
|
if (ourCombatStrength*1.5f >= theirCombatStrength && theirCombatStrength * 1.5f >= ourCombatStrength)
|
||||||
return 0 // we're roughly equal, there's no huge power imbalance
|
return 0 // we're roughly equal, there's no huge power imbalance
|
||||||
if (ourCombatStrength == 0) return -1000
|
if (ourCombatStrength == 0) return -1000
|
||||||
if (theirCombatStrength == 0) return 1000 // Chumps got no cities or units
|
if (theirCombatStrength == 0) return 1000 // Chumps got no cities or units
|
||||||
|
Loading…
x
Reference in New Issue
Block a user