Resolved #6184 - don't display turns to relationship change for non-decreasing city-state relationships

This commit is contained in:
Yair Morgenstern 2022-02-20 12:45:48 +02:00
parent 5b50f32505
commit 64b8d805c3
2 changed files with 4 additions and 2 deletions

View File

@ -200,6 +200,7 @@ class DiplomacyManager() {
if (civInfo.isCityState() && !otherCiv().isCityState()) {
val dropPerTurn = getCityStateInfluenceDegrade()
return when {
dropPerTurn == 0f -> 0
relationshipLevel() >= RelationshipLevel.Ally -> ceil((influence - 60f) / dropPerTurn).toInt() + 1
relationshipLevel() >= RelationshipLevel.Friend -> ceil((influence - 30f) / dropPerTurn).toInt() + 1
else -> 0

View File

@ -210,8 +210,9 @@ class DiplomacyScreen(val viewingCiv:CivilizationInfo): BaseScreen() {
if (relationLevel >= RelationshipLevel.Friend) {
// RelationshipChange = Ally -> Friend or Friend -> Favorable
val turnsToRelationshipChange = otherCivDiplomacyManager.getTurnsToRelationshipChange()
diplomacyTable.add("Relationship changes in another [$turnsToRelationshipChange] turns".toLabel())
.row()
if (turnsToRelationshipChange != 0)
diplomacyTable.add("Relationship changes in another [$turnsToRelationshipChange] turns".toLabel())
.row()
}
val friendBonusLabelColor = if (relationLevel >= RelationshipLevel.Friend) Color.GREEN else Color.GRAY