From ca1a2816c8a45ff86909b19df52f8e8526566c9f Mon Sep 17 00:00:00 2001 From: SomeTroglodyte <63000004+SomeTroglodyte@users.noreply.github.com> Date: Tue, 21 May 2024 18:38:39 +0200 Subject: [PATCH] Make stateBasedRandom depend on turn (#11603) --- core/src/com/unciv/models/ruleset/unique/Conditionals.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/com/unciv/models/ruleset/unique/Conditionals.kt b/core/src/com/unciv/models/ruleset/unique/Conditionals.kt index 674df32fa5..8d66d1d8f0 100644 --- a/core/src/com/unciv/models/ruleset/unique/Conditionals.kt +++ b/core/src/com/unciv/models/ruleset/unique/Conditionals.kt @@ -45,7 +45,7 @@ object Conditionals { val gameInfo by lazy { relevantCiv?.gameInfo } - val stateBasedRandom by lazy { Random(state.hashCode()) } + val stateBasedRandom by lazy { Random(state.hashCode() * 31 + (gameInfo?.turns?.hashCode() ?: 0)) } fun getResourceAmount(resourceName: String): Int { if (relevantCity != null) return relevantCity!!.getAvailableResourceAmount(resourceName)