From a78e48612fca2f13e9cb2ccb51eb62df443986ce Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Sun, 26 Mar 2023 21:37:17 +0300 Subject: [PATCH] GPT calculation fixed 2 --- core/src/com/unciv/logic/trade/TradeEvaluation.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/com/unciv/logic/trade/TradeEvaluation.kt b/core/src/com/unciv/logic/trade/TradeEvaluation.kt index ad7bd9e259..2a2ccb0799 100644 --- a/core/src/com/unciv/logic/trade/TradeEvaluation.kt +++ b/core/src/com/unciv/logic/trade/TradeEvaluation.kt @@ -82,7 +82,7 @@ class TradeEvaluation { when (offer.type) { TradeType.Gold -> return offer.amount // GPT loses 1% of value for each 'future' turn, meaning: gold now is more valuable than gold in the future - TradeType.Gold_Per_Turn -> return (1..offer.duration).sumOf { (offer.amount * 0.99f.pow(it)).toInt() } + TradeType.Gold_Per_Turn -> return (1..offer.duration).sumOf { (offer.amount * 0.99.pow(it)) }.toInt() TradeType.Treaty -> { return when (offer.name) { // Since it will be evaluated twice, once when they evaluate our offer and once when they evaluate theirs