diff options
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -233,7 +233,9 @@ function abs(x) { function random(n) { clear_undo() - return ((game.seed = game.seed * 69621 % 0x7fffffff) / 0x7fffffff) * n | 0 + if (game.rng === 1) + return ((game.seed = game.seed * 69621 % 0x7fffffff) / 0x7fffffff) * n | 0 + return (game.seed = game.seed * 200105 % 34359738337) % n } function roll_die(reason) { @@ -9369,6 +9371,10 @@ exports.setup = function (seed, scenario, options) { log: [], }) + // Old RNG for ancient replays + if (options.rng) + game.rng = options.rng + switch (scenario) { default: // fallthrough |