diff --git a/android/assets/jsons/translations/template.properties b/android/assets/jsons/translations/template.properties index 8052a549a8..4d82a3b8a2 100644 --- a/android/assets/jsons/translations/template.properties +++ b/android/assets/jsons/translations/template.properties @@ -812,7 +812,6 @@ AI wonder cost modifier = AI building maintenance modifier = AI unit maintenance modifier = AI unhappiness modifier = -AIs exchange techs = Turns until barbarians enter player tiles = Gold reward for clearing barbarian camps = diff --git a/core/src/com/unciv/logic/automation/NextTurnAutomation.kt b/core/src/com/unciv/logic/automation/NextTurnAutomation.kt index b126ebcd56..aad49c2289 100644 --- a/core/src/com/unciv/logic/automation/NextTurnAutomation.kt +++ b/core/src/com/unciv/logic/automation/NextTurnAutomation.kt @@ -31,7 +31,6 @@ object NextTurnAutomation{ // offerDeclarationOfFriendship(civInfo) offerPeaceTreaty(civInfo) offerResearchAgreement(civInfo) - exchangeTechs(civInfo) exchangeLuxuries(civInfo) issueRequests(civInfo) adoptPolicy(civInfo) @@ -133,44 +132,6 @@ object NextTurnAutomation{ } } - private fun exchangeTechs(civInfo: CivilizationInfo) { - if (!civInfo.gameInfo.getDifficulty().aisExchangeTechs) return - val otherCivList = civInfo.getKnownCivs() - .filter { it.playerType == PlayerType.AI && it.isMajorCiv() && !civInfo.isAtWarWith(it) } - .sortedBy { it.tech.techsResearched.size } - - for (otherCiv in otherCivList) { - val tradeLogic = TradeLogic(civInfo, otherCiv) - var ourGold = tradeLogic.ourAvailableOffers.first { it.type == TradeType.Gold }.amount - val ourTradableTechs = tradeLogic.ourAvailableOffers - .filter { it.type == TradeType.Technology } - val theirTradableTechs = tradeLogic.theirAvailableOffers - .filter { it.type == TradeType.Technology } - - for (theirOffer in theirTradableTechs) { - val theirValue = TradeEvaluation().evaluateBuyCost(theirOffer, civInfo, otherCiv) - val ourOfferList = ourTradableTechs.filter { - TradeEvaluation().evaluateBuyCost(it, otherCiv, civInfo) == theirValue - && !tradeLogic.currentTrade.ourOffers.contains(it) } - - if (ourOfferList.isNotEmpty()) { - tradeLogic.currentTrade.ourOffers.add(ourOfferList.random()) - tradeLogic.currentTrade.theirOffers.add(theirOffer) - } else if (ourGold / 2 >= theirValue) { - //try to buy tech with money, not spending more than 1/3 of treasury - tradeLogic.currentTrade.ourOffers.add(TradeOffer("Gold".tr(), TradeType.Gold, theirValue)) - tradeLogic.currentTrade.theirOffers.add(theirOffer) - ourGold -= theirValue - } - } - - if (tradeLogic.currentTrade.theirOffers.isNotEmpty()) { - val tradeRequest = TradeRequest(civInfo.civName, tradeLogic.currentTrade.reverse()) - otherCiv.tradeRequests.add(tradeRequest) - } - } - } - private fun getFreeTechForCityStates(civInfo: CivilizationInfo) { //City-States automatically get all invented techs for (otherCiv in civInfo.getKnownCivs().filterNot { it.isCityState() }) { diff --git a/core/src/com/unciv/logic/trade/TradeLogic.kt b/core/src/com/unciv/logic/trade/TradeLogic.kt index 5aa7d7622f..93b09c197e 100644 --- a/core/src/com/unciv/logic/trade/TradeLogic.kt +++ b/core/src/com/unciv/logic/trade/TradeLogic.kt @@ -35,13 +35,6 @@ class TradeLogic(val ourCivilization:CivilizationInfo, val otherCivilization: Ci else TradeType.Strategic_Resource offers.add(TradeOffer(entry.resource.name, resourceTradeType, entry.amount)) } - if (!civInfo.isCityState() && !otherCivilization.isCityState()) { - for (entry in civInfo.tech.techsResearched - .filterNot { otherCivilization.tech.isResearched(it) } - .filter { otherCivilization.tech.canBeResearched(it) }) { - offers.add(TradeOffer(entry, TradeType.Technology)) - } - } offers.add(TradeOffer("Gold".tr(), TradeType.Gold, civInfo.gold)) offers.add(TradeOffer("Gold per turn".tr(), TradeType.Gold_Per_Turn, civInfo.statsForNextTurn.gold.toInt())) diff --git a/core/src/com/unciv/models/ruleset/Difficulty.kt b/core/src/com/unciv/models/ruleset/Difficulty.kt index 7ed965aeea..eb592e570c 100644 --- a/core/src/com/unciv/models/ruleset/Difficulty.kt +++ b/core/src/com/unciv/models/ruleset/Difficulty.kt @@ -25,7 +25,6 @@ class Difficulty: INamed { var aiFreeTechs = ArrayList() var aiFreeUnits = ArrayList() var aiUnhappinessModifier = 1f - var aisExchangeTechs = false var turnBarbariansCanEnterPlayerTiles = 0 var clearBarbarianCampReward = 25 @@ -52,7 +51,6 @@ class Difficulty: INamed { // lines += " - {AI free techs}: $aiFreeTechs" // lines += " - {AI free units}: $aiFreeUnits" lines += " - {AI unhappiness modifier}: $aiUnhappinessModifier" - lines += " - {AIs exchange techs}: $aisExchangeTechs" lines += "" lines += "{Turns until barbarians enter player tiles}: $turnBarbariansCanEnterPlayerTiles" lines += "{Gold reward for clearing barbarian camps}: $clearBarbarianCampReward"