From 5f47536d5458603d6866fdb5e347dc39be79978d Mon Sep 17 00:00:00 2001 From: Duck McSouls Date: Fri, 23 Sep 2022 21:38:27 +1000 Subject: [PATCH] CCT: inconsistent probability for generation between online and offline Fixes #4110. While online, there is 25% chance for a Coding Contract to appear. The same should apply when a player loads the game after being offline for a period of time. Currently, loading the game after being offline would give a generation probability of less than 25%. The mismatch between offline and online gives an unfair advantage to having the game running for an extended period of time. --- src/engine.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine.tsx b/src/engine.tsx index db143f9aa..f7037ee06 100644 --- a/src/engine.tsx +++ b/src/engine.tsx @@ -262,7 +262,7 @@ const Engine: { if (numCyclesOffline < 3000 * 100) { // if we have less than 100 rolls, just roll them exactly. for (let i = 0; i < numCyclesOffline / 3000; i++) { - if (Math.random() < 0.25) numContracts++; + if (Math.random() <= 0.25) numContracts++; } } else { // just average it.