diff --git a/core/src/com/unciv/logic/automation/NextTurnAutomation.kt b/core/src/com/unciv/logic/automation/NextTurnAutomation.kt index df349e1f44..227b385365 100644 --- a/core/src/com/unciv/logic/automation/NextTurnAutomation.kt +++ b/core/src/com/unciv/logic/automation/NextTurnAutomation.kt @@ -319,7 +319,8 @@ class NextTurnAutomation{ val canSignResearchAgreementCiv = civInfo.getKnownCivs() .asSequence() - .filter { civInfo.canSignResearchAgreementsWith(it) } + .filter { civInfo.canSignResearchAgreementsWith(it) + && !civInfo.getDiplomacyManager(it).hasFlag(DiplomacyFlags.DeclinedResearchAgreement) } .sortedByDescending { it.statsForNextTurn.science } val duration = when(civInfo.gameInfo.gameParameters.gameSpeed) { diff --git a/core/src/com/unciv/logic/civilization/diplomacy/DiplomacyManager.kt b/core/src/com/unciv/logic/civilization/diplomacy/DiplomacyManager.kt index bb4f8166de..75aae119c8 100644 --- a/core/src/com/unciv/logic/civilization/diplomacy/DiplomacyManager.kt +++ b/core/src/com/unciv/logic/civilization/diplomacy/DiplomacyManager.kt @@ -23,6 +23,7 @@ enum class RelationshipLevel{ enum class DiplomacyFlags{ DeclinedLuxExchange, DeclinedPeace, + DeclinedResearchAgreement, DeclaredWar, DeclarationOfFriendship, ResearchAgreement, diff --git a/core/src/com/unciv/ui/worldscreen/TradePopup.kt b/core/src/com/unciv/ui/worldscreen/TradePopup.kt index 0513263b9e..8fc2f500b4 100644 --- a/core/src/com/unciv/ui/worldscreen/TradePopup.kt +++ b/core/src/com/unciv/ui/worldscreen/TradePopup.kt @@ -69,6 +69,8 @@ class TradePopup(worldScreen: WorldScreen): Popup(worldScreen){ val diplomacyManager = requestingCiv.getDiplomacyManager(viewingCiv) if(trade.ourOffers.all { it.type==TradeType.Luxury_Resource } && trade.theirOffers.all { it.type==TradeType.Luxury_Resource }) diplomacyManager.setFlag(DiplomacyFlags.DeclinedLuxExchange,20) // offer again in 20 turns + if(trade.ourOffers.any { it.type==TradeType.Agreement && it.name==Constants.researchAgreement }) + diplomacyManager.setFlag(DiplomacyFlags.DeclinedResearchAgreement,20) // offer again in 20 turns if(trade.ourOffers.any{ it.type==TradeType.Treaty && it.name== Constants.peaceTreaty }) diplomacyManager.setFlag(DiplomacyFlags.DeclinedPeace,5)