Prevent AI from sending a second peace treaty (#7150)

This commit is contained in:
OptimizedForDensity
2022-06-13 19:06:29 -04:00
committed by GitHub
parent 46b1516159
commit 9ac019caea

View File

@ -790,6 +790,8 @@ object NextTurnAutomation {
.filter { !civInfo.getDiplomacyManager(it).hasFlag(DiplomacyFlags.DeclinedPeace) }
// Don't allow AIs to offer peace to city states allied with their enemies
.filterNot { it.isCityState() && it.getAllyCiv() != null && civInfo.isAtWarWith(civInfo.gameInfo.getCivilization(it.getAllyCiv()!!)) }
// ignore civs that we have already offered peace this turn as a counteroffer to another civ's peace offer
.filter { it.tradeRequests.none { tradeRequest -> tradeRequest.requestingCiv == civInfo.civName && tradeRequest.trade.isPeaceTreaty() } }
for (enemy in enemiesCiv) {
val motivationToAttack = motivationToAttack(civInfo, enemy)