diff --git a/core/src/com/unciv/models/ruleset/Building.kt b/core/src/com/unciv/models/ruleset/Building.kt index 43a560a713..175cd3cd0c 100644 --- a/core/src/com/unciv/models/ruleset/Building.kt +++ b/core/src/com/unciv/models/ruleset/Building.kt @@ -219,7 +219,7 @@ class Building : RulesetStatsObject(), INonPerpetualConstruction { val stats = mutableListOf("$cost${Fonts.production}") if (canBePurchasedWithStat(null, Stat.Gold)) { // We need what INonPerpetualConstruction.getBaseGoldCost calculates but without any game- or civ-specific modifiers - val buyCost = 30.0 * cost.toFloat().pow(0.75f) * hurryCostModifier.toPercent() / 10 * 10 + val buyCost = (30.0 * cost.toFloat().pow(0.75f) * hurryCostModifier.toPercent()).toInt() / 10 * 10 stats += "$buyCost${Fonts.gold}" } textList += FormattedLine(stats.joinToString(", ", "{Cost}: ")) diff --git a/core/src/com/unciv/models/ruleset/unit/BaseUnit.kt b/core/src/com/unciv/models/ruleset/unit/BaseUnit.kt index 83ff8d51ed..957ab01aa6 100644 --- a/core/src/com/unciv/models/ruleset/unit/BaseUnit.kt +++ b/core/src/com/unciv/models/ruleset/unit/BaseUnit.kt @@ -124,7 +124,7 @@ class BaseUnit : RulesetObject(), INonPerpetualConstruction { stats += "$cost${Fonts.production}" if (canBePurchasedWithStat(null, Stat.Gold)) { // We need what INonPerpetualConstruction.getBaseGoldCost calculates but without any game- or civ-specific modifiers - val buyCost = 30.0 * cost.toFloat().pow(0.75f) * hurryCostModifier.toPercent() / 10 * 10 + val buyCost = (30.0 * cost.toFloat().pow(0.75f) * hurryCostModifier.toPercent()).toInt() / 10 * 10 stats += "$buyCost${Fonts.gold}" } textList += FormattedLine(stats.joinToString(", ", "{Cost}: "))