diff options
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 56 |
1 files changed, 14 insertions, 42 deletions
@@ -61,8 +61,6 @@ const RESERVE_MARK = "" let game = null function random(n) { - if (game.rng === 1) - return Math.floor(((game.seed = game.seed * 48271 % 0x7fffffff) / 0x7fffffff) * n) return (game.seed = game.seed * 200105 % 34359738337) % n } @@ -1297,23 +1295,13 @@ states.vulcan = { }, space: function (city) { log("Vulcan struck #" + city + "!") - if (game.automatic_disruption) { - for (let b = 0; b < block_count; ++b) - if (game.location[b] === city) - reduce_block(b) - // uh-oh! cleopatra switched sides! - if (is_contested_city(city)) - set_attacker(city, game.active) - end_player_turn() - } else { - game.where = city - game.vulcan = [] - for (let b = 0; b < block_count; ++b) - if (game.location[b] === city) - game.vulcan.push(b) - game.active = enemy(game.active) - game.state = 'apply_vulcan' - } + game.where = city + game.vulcan = [] + for (let b = 0; b < block_count; ++b) + if (game.location[b] === city) + game.vulcan.push(b) + game.active = enemy(game.active) + game.state = 'apply_vulcan' }, } @@ -1844,21 +1832,13 @@ function bring_on_reserves() { function goto_disrupt_reserves() { game.flash = "Reserves were disrupted." - if (game.automatic_disruption) { - for (let b = 0; b < block_count; ++b) - if (game.location[b] === game.where && block_owner(b) === get_attacker(game.where)) - if (game.reserves.includes(b)) - reduce_block(b) - end_disrupt_reserves() - } else { - game.disrupted = [] - for (let b = 0; b < block_count; ++b) - if (game.location[b] === game.where && block_owner(b) === get_attacker(game.where)) - if (game.reserves.includes(b)) - game.disrupted.push(b) - game.active = get_attacker(game.where) - game.state = 'disrupt_reserves' - } + game.disrupted = [] + for (let b = 0; b < block_count; ++b) + if (game.location[b] === game.where && block_owner(b) === get_attacker(game.where)) + if (game.reserves.includes(b)) + game.disrupted.push(b) + game.active = get_attacker(game.where) + game.state = 'disrupt_reserves' } function disrupt_block(who) { @@ -2656,10 +2636,6 @@ exports.setup = function (seed, scenario, options) { reserves: [], } - // Old RNG for ancient replays - if (options.rng) - game.rng = options.rng - if (scenario === "Historical") log(".h1 Historical Deployment") else @@ -2719,12 +2695,8 @@ exports.setup = function (seed, scenario, options) { logbr() // Option for backwards compatible replays. - if (options.automatic_disruption) - game.automatic_disruption = 1 - if (options.autohit) game.autohit = 1 - if (options.delay_hits) game.delay_hits = 1 |