From 3d93dafb138d1f3a0e09da7e6bffad7fb7ba5ee2 Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Mon, 18 Apr 2022 11:46:37 +0300 Subject: [PATCH] AIs don't add double agreements to counteroffers --- core/src/com/unciv/logic/automation/NextTurnAutomation.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/src/com/unciv/logic/automation/NextTurnAutomation.kt b/core/src/com/unciv/logic/automation/NextTurnAutomation.kt index 407150e981..e47f6a0044 100644 --- a/core/src/com/unciv/logic/automation/NextTurnAutomation.kt +++ b/core/src/com/unciv/logic/automation/NextTurnAutomation.kt @@ -139,6 +139,8 @@ object NextTurnAutomation { continue // For example resources gained by trade or CS if (offer.type == TradeType.City) continue // Players generally don't want to give up their cities, and they might misclick + if (offer.type == TradeType.Agreement && tradeLogic.currentTrade.theirOffers.contains(offer)) + continue // So you don't get double offers of open borders etc. val value = evaluation.evaluateBuyCost(offer, civInfo, otherCiv) if (value > 0) potentialAsks[offer] = value