diff options
-rw-r--r-- | rules.js | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -49,7 +49,9 @@ const RESERVE_MARK = "" let game = null function random(n) { - return Math.floor(((game.seed = game.seed * 48271 % 0x7fffffff) / 0x7fffffff) * n) + if (game.rng === 1) + return Math.floor(((game.seed = game.seed * 48271 % 0x7fffffff) / 0x7fffffff) * n) + return (game.seed = game.seed * 200105 % 34359738337) % n } function logbr() { @@ -2564,6 +2566,10 @@ exports.setup = function (seed, scenario, options) { reserves: [], } + // Old RNG for ancient replays + if (options.rng) + game.rng = options.rng + if (options.tournament) { log("Tournament rule:\nCaesar is the first player on the very first turn of the game.") game.tournament = 1 |