mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-23 14:19:15 +07:00
Prevent AI from sending a second peace treaty (#7150)
This commit is contained in:

committed by
GitHub

parent
46b1516159
commit
9ac019caea
@ -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)
|
||||
|
Reference in New Issue
Block a user