From cf9194f767fee4405c33922678c39d6672dc1251 Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Sat, 11 May 2019 23:39:00 +0300 Subject: [PATCH] Other civ you're at war with is always at least Enemy, if not Unforgivable --- .../civilization/diplomacy/DiplomacyManager.kt | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/core/src/com/unciv/logic/civilization/diplomacy/DiplomacyManager.kt b/core/src/com/unciv/logic/civilization/diplomacy/DiplomacyManager.kt index 6c75f14e0c..b08d132919 100644 --- a/core/src/com/unciv/logic/civilization/diplomacy/DiplomacyManager.kt +++ b/core/src/com/unciv/logic/civilization/diplomacy/DiplomacyManager.kt @@ -97,6 +97,7 @@ class DiplomacyManager() { fun opinionOfOtherCiv() = diplomaticModifiers.values.sum() fun relationshipLevel(): RelationshipLevel { + if(civInfo.isPlayerCivilization() && otherCiv().isPlayerCivilization()) return RelationshipLevel.Neutral // People make their own choices. @@ -107,12 +108,18 @@ class DiplomacyManager() { // maybe we need to average their views of each other? That makes sense to me. val opinion = opinionOfOtherCiv() + if(opinion<-80) return RelationshipLevel.Unforgivable + if(opinion<-40) return RelationshipLevel.Enemy + + // This is here because when you're at war you can either be enemy OR unforgivable, + // depending on the opinion + if(civInfo.isAtWarWith(otherCiv())) + return RelationshipLevel.Enemy + + if(opinion<-15) return RelationshipLevel.Competitor if(opinion>80) return RelationshipLevel.Ally if(opinion>40) return RelationshipLevel.Friend if(opinion>15) return RelationshipLevel.Favorable - if(opinion<-80) return RelationshipLevel.Unforgivable - if(opinion<-40) return RelationshipLevel.Enemy - if(opinion<-15) return RelationshipLevel.Competitor return RelationshipLevel.Neutral }