diff --git a/android/build.gradle b/android/build.gradle index ec69b7e0d8..97c2e05dc0 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -21,8 +21,8 @@ android { applicationId "com.unciv.game" minSdkVersion 14 targetSdkVersion 26 - versionCode 96 - versionName "2.5.10" + versionCode 97 + versionName "2.6.0" } buildTypes { release { diff --git a/core/src/com/unciv/ui/TradeScreen.kt b/core/src/com/unciv/ui/TradeScreen.kt index 8c26543ae6..7c68867269 100644 --- a/core/src/com/unciv/ui/TradeScreen.kt +++ b/core/src/com/unciv/ui/TradeScreen.kt @@ -89,6 +89,21 @@ class TradeScreen(val otherCivilization: CivilizationInfo) : CameraStageBaseScre else if(offerButton.text.toString() == "Accept"){ civInfo.diplomacy[otherCivilization.civName]!!.trades.add(currentTrade) otherCivilization.diplomacy[civInfo.civName]!!.trades.add(currentTrade.reverse()) + + // instant transfers + for(offer in currentTrade.theirOffers){ + if(offer.type==TradeType.Gold){ + civInfo.gold += offer.amount + otherCivilization.gold -= offer.amount + } + } + for(offer in currentTrade.ourOffers){ + if(offer.type==TradeType.Gold){ + civInfo.gold -= offer.amount + otherCivilization.gold += offer.amount + } + } + val newTradeScreen = TradeScreen(otherCivilization) UnCivGame.Current.screen = newTradeScreen newTradeScreen.tradeText.setText("Pleasure doing business with you!") @@ -164,7 +179,7 @@ class TradeScreen(val otherCivilization: CivilizationInfo) : CameraStageBaseScre } fun evaluateOffer(offer:TradeOffer, otherCivIsRecieving:Boolean): Int { - if(offer.type==TradeType.Gold) return 1 + if(offer.type==TradeType.Gold) return offer.amount if(offer.type == TradeType.Luxury_Resource){ var value = 100*offer.amount if(!theirAvailableOffers.any { it.name==offer.name }) // We want to take away their last luxury or give them one they don't have