mirror of
https://github.com/yairm210/Unciv.git
synced 2025-03-12 19:10:12 +07:00
Gold deficit only affects science when the civ has negative gold
This commit is contained in:
parent
98a4c8bf00
commit
9b9e172897
@ -100,7 +100,7 @@ class CivInfoStats(val civInfo: CivilizationInfo){
|
|||||||
// negative gold hurts science
|
// negative gold hurts science
|
||||||
// if we have - or 0, then the techs will never be complete and the tech button
|
// 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
|
// 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(),
|
val scienceDeficit = max(statMap.values.map { it.gold }.sum(),
|
||||||
1 - statMap.values.map { it.science }.sum())// Leave at least 1
|
1 - statMap.values.map { it.science }.sum())// Leave at least 1
|
||||||
statMap["Treasury deficit"] = Stats().apply { science = scienceDeficit }
|
statMap["Treasury deficit"] = Stats().apply { science = scienceDeficit }
|
||||||
|
Loading…
Reference in New Issue
Block a user