diff --git a/android/assets/jsons/Translations/Other.json b/android/assets/jsons/Translations/Other.json index 432083b95f..ce86df2c00 100644 --- a/android/assets/jsons/Translations/Other.json +++ b/android/assets/jsons/Translations/Other.json @@ -2645,7 +2645,8 @@ "Provides [amountOfCulture] culture at 30 Influence":{} "Provides 3 food in capital and 1 food in other cities at 30 Influence":{} "Provides 3 happiness at 30 Influence":{} - "Gift [goldAmount] gold":{} + "Gift [goldAmount] gold (+[influenceAmount] influence)":{} + "Relationship changes in another [turnsToRelationshipChange] turns":{} ////// Diplomatic modifiers diff --git a/core/src/com/unciv/logic/civilization/CivilizationInfo.kt b/core/src/com/unciv/logic/civilization/CivilizationInfo.kt index 04c2e69d7e..2b42a1f869 100644 --- a/core/src/com/unciv/logic/civilization/CivilizationInfo.kt +++ b/core/src/com/unciv/logic/civilization/CivilizationInfo.kt @@ -156,7 +156,7 @@ class CivilizationInfo { if (otherCiv.isCityState() && otherCiv.getCityStateType() == CityStateType.Cultured && otherCiv.getDiplomacyManager(civName).relationshipLevel() >= RelationshipLevel.Friend) { val cultureBonus = Stats() - cultureBonus.add(Stat.Culture, 5.0f * getEra().ordinal) + cultureBonus.add(Stat.Culture, 3f * (getEra().ordinal+1)) if (statMap.containsKey("City States")) statMap["City States"] = statMap["City States"]!! + cultureBonus else diff --git a/core/src/com/unciv/logic/civilization/diplomacy/DiplomacyManager.kt b/core/src/com/unciv/logic/civilization/diplomacy/DiplomacyManager.kt index 7a88f3763f..2e66701461 100644 --- a/core/src/com/unciv/logic/civilization/diplomacy/DiplomacyManager.kt +++ b/core/src/com/unciv/logic/civilization/diplomacy/DiplomacyManager.kt @@ -113,6 +113,7 @@ class DiplomacyManager() { if(influence>=60) return RelationshipLevel.Ally if(influence>=30) return RelationshipLevel.Friend + return RelationshipLevel.Neutral } // not entirely sure what to do between AI civs, because they probably have different views of each other, diff --git a/core/src/com/unciv/ui/trade/DiplomacyScreen.kt b/core/src/com/unciv/ui/trade/DiplomacyScreen.kt index 5afa86fc05..19bd5838f7 100644 --- a/core/src/com/unciv/ui/trade/DiplomacyScreen.kt +++ b/core/src/com/unciv/ui/trade/DiplomacyScreen.kt @@ -98,33 +98,39 @@ class DiplomacyScreen:CameraStageBaseScreen() { private fun getCityStateDiplomacyTable(otherCiv: CivilizationInfo): Table { val currentPlayerCiv = UnCivGame.Current.gameInfo.getCurrentPlayerCivilization() + val otherCivDiplomacyManager = otherCiv.getDiplomacyManager(currentPlayerCiv) + val diplomacyTable = Table() diplomacyTable.defaults().pad(10f) if (otherCiv.isCityState()) { diplomacyTable.add(otherCiv.getNation().getLeaderDisplayName().toLabel()).row() diplomacyTable.add(("Type: " + otherCiv.getCityStateType().toString()).toLabel()).row() - diplomacyTable.add(("Influence: " + otherCiv.getDiplomacyManager(currentPlayerCiv).influence.toInt()+"/30").toLabel()).row() + diplomacyTable.add(("Influence: " + otherCivDiplomacyManager.influence.toInt()+"/30").toLabel()).row() - diplomacyTable.add(getRelationshipTable(otherCiv.getDiplomacyManager(currentPlayerCiv))).row() + diplomacyTable.add(getRelationshipTable(otherCivDiplomacyManager)).row() val friendBonusText = when(otherCiv.getCityStateType()) { - CityStateType.Cultured -> "Provides [" + (5.0f * currentPlayerCiv.getEra().ordinal).toString() + "] culture at 30 Influence" - CityStateType.Maritime -> "Provides 3 food in capital and 1 food in other cities at 30 Influence" - CityStateType.Mercantile -> "Provides 3 happiness at 30 Influence" + CityStateType.Cultured -> "Provides [" + (3 * (currentPlayerCiv.getEra().ordinal+1)).toString() + "] culture at [30] Influence" + CityStateType.Maritime -> "Provides 3 food in capital and 1 food in other cities at [30] Influence" + CityStateType.Mercantile -> "Provides 3 happiness at [30] Influence" } + val friendBonusLabel = friendBonusText.toLabel() - if (otherCiv.getDiplomacyManager(currentPlayerCiv).relationshipLevel() >= RelationshipLevel.Friend) + diplomacyTable.add(friendBonusLabel).row() + if (otherCivDiplomacyManager.relationshipLevel() >= RelationshipLevel.Friend) { friendBonusLabel.setFontColor(Color.GREEN) + val turnsToRelationshipChange = otherCivDiplomacyManager.influence.toInt() - 30 + 1 + diplomacyTable.add("Relationship changes in another [$turnsToRelationshipChange] turns".toLabel()).row() + } else friendBonusLabel.setFontColor(Color.GRAY) - diplomacyTable.add(friendBonusLabel).row() } else { diplomacyTable.add(otherCiv.getNation().getLeaderDisplayName().toLabel()) } diplomacyTable.addSeparator() - val giftAmount = 100 + val giftAmount = 250 val influenceAmount = giftAmount/10 val giftButton = TextButton("Gift [$giftAmount] gold (+[$influenceAmount] influence)".tr(), skin) giftButton.onClick{ giveGoldGift(otherCiv,giftAmount ) }