diff --git a/core/src/com/unciv/logic/civilization/diplomacy/DiplomacyManager.kt b/core/src/com/unciv/logic/civilization/diplomacy/DiplomacyManager.kt index e7aa017da3..f9306d4190 100644 --- a/core/src/com/unciv/logic/civilization/diplomacy/DiplomacyManager.kt +++ b/core/src/com/unciv/logic/civilization/diplomacy/DiplomacyManager.kt @@ -505,13 +505,15 @@ class DiplomacyManager() { revertToZero(DiplomaticModifiers.DeclarationOfFriendship, 1 / 2f) //decreases slowly and will revert to full if it is declared later if (otherCiv().isCityState()) { - val eraInfo = civInfo.getEraObject() - if (relationshipLevel() < RelationshipLevel.Friend) { if (hasFlag(DiplomacyFlags.ProvideMilitaryUnit)) removeFlag(DiplomacyFlags.ProvideMilitaryUnit) } else { - val relevantBonuses = if (relationshipLevel() == RelationshipLevel.Friend) eraInfo.friendBonus[otherCiv().cityStateType.name] - else eraInfo.allyBonus[otherCiv().cityStateType.name] + val relevantBonuses = if (civInfo.gameInfo.ruleSet.eras.isEmpty()) null + else { + val eraInfo = civInfo.getEraObject() + if (relationshipLevel() == RelationshipLevel.Friend) eraInfo.friendBonus[otherCiv().cityStateType.name] + else eraInfo.allyBonus[otherCiv().cityStateType.name] + } if (relevantBonuses == null && otherCiv().cityStateType == CityStateType.Militaristic) { // Deprecated, assume Civ V values for compatibility if (!hasFlag(DiplomacyFlags.ProvideMilitaryUnit) && relationshipLevel() == RelationshipLevel.Friend)