From 6054b32f9211b486c06342c3edcd5501924d9e22 Mon Sep 17 00:00:00 2001 From: oynqr <71629732+oynqr@users.noreply.github.com> Date: Mon, 1 Aug 2022 14:57:58 +0000 Subject: [PATCH] Fix erroneous relationship decay notification (#7564) Whenever your relationship resting point as well as the relationship score for city states is at the exact value of 30 or 60, a notification is shown that the relationship is about to degrade, even though it can and will not. This fixes said issue by changing the comparison operators of the current influence and the resting point in getCityStateInfluenceDegrade() and getCityStateInfluenceRecovery() to the correct ones, respectively <= and >=. --- .../unciv/logic/civilization/diplomacy/DiplomacyManager.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/com/unciv/logic/civilization/diplomacy/DiplomacyManager.kt b/core/src/com/unciv/logic/civilization/diplomacy/DiplomacyManager.kt index b9abd6182c..d5e7770b97 100644 --- a/core/src/com/unciv/logic/civilization/diplomacy/DiplomacyManager.kt +++ b/core/src/com/unciv/logic/civilization/diplomacy/DiplomacyManager.kt @@ -260,7 +260,7 @@ class DiplomacyManager() : IsPartOfGameInfoSerialization { } private fun getCityStateInfluenceDegrade(): Float { - if (getInfluence() < getCityStateInfluenceRestingPoint()) + if (getInfluence() <= getCityStateInfluenceRestingPoint()) return 0f val decrement = when { @@ -288,7 +288,7 @@ class DiplomacyManager() : IsPartOfGameInfoSerialization { } private fun getCityStateInfluenceRecovery(): Float { - if (getInfluence() > getCityStateInfluenceRestingPoint()) + if (getInfluence() >= getCityStateInfluenceRestingPoint()) return 0f val increment = 1f // sic: personality does not matter here