From a27a28df67d7c07ea2c53dc00c222fe6c9723f6f Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Fri, 5 Feb 2021 10:34:42 +0200 Subject: [PATCH] Fixed tests --- .../com/unciv/logic/civilization/diplomacy/DiplomacyManager.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/com/unciv/logic/civilization/diplomacy/DiplomacyManager.kt b/core/src/com/unciv/logic/civilization/diplomacy/DiplomacyManager.kt index 8faa2618ab..436bcc7170 100644 --- a/core/src/com/unciv/logic/civilization/diplomacy/DiplomacyManager.kt +++ b/core/src/com/unciv/logic/civilization/diplomacy/DiplomacyManager.kt @@ -308,7 +308,8 @@ class DiplomacyManager() { // for performance reasons we don't want to call this every time we want to see if a unit can move through a tile fun updateHasOpenBorders() { - val newHasOpenBorders = civInfo.getAllyCiv() == otherCivName || otherCiv().getAllyCiv() == civInfo.civName + // City-states can enter ally's territory (the opposite is true anyway even without open borders) + val newHasOpenBorders = civInfo.getAllyCiv() == otherCivName || trades.flatMap { it.theirOffers }.any { it.name == Constants.openBorders && it.duration > 0 } val bordersWereClosed = hasOpenBorders && !newHasOpenBorders