From 9b9e17289771dfa8b7e5c530d0bd4e977a00f667 Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Thu, 21 May 2020 22:16:12 +0300 Subject: [PATCH] Gold deficit only affects science when the civ has negative gold --- core/src/com/unciv/logic/civilization/CivInfoStats.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/com/unciv/logic/civilization/CivInfoStats.kt b/core/src/com/unciv/logic/civilization/CivInfoStats.kt index c4629e00..cbe6f6c7 100644 --- a/core/src/com/unciv/logic/civilization/CivInfoStats.kt +++ b/core/src/com/unciv/logic/civilization/CivInfoStats.kt @@ -100,7 +100,7 @@ class CivInfoStats(val civInfo: CivilizationInfo){ // negative gold hurts science // if we have - or 0, then the techs will never be complete and the tech button // will show a negative number of turns and int.max, respectively - if (statMap.values.map { it.gold }.sum() < 0) { + if (statMap.values.map { it.gold }.sum() < 0 && civInfo.gold < 0) { val scienceDeficit = max(statMap.values.map { it.gold }.sum(), 1 - statMap.values.map { it.science }.sum())// Leave at least 1 statMap["Treasury deficit"] = Stats().apply { science = scienceDeficit }