diff options
author | Tor Andersson <tor@ccxvii.net> | 2022-07-14 16:52:39 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2022-11-17 13:11:25 +0100 |
commit | da6628ef85ea689ee0616ff123350b6b137314b5 (patch) | |
tree | b19ce4d81435544e5be502e5706c45f35b900fdb /rules.js | |
parent | 652e53b4286bfc99466f5b13133f2c31cd877d0e (diff) | |
download | rommel-in-the-desert-da6628ef85ea689ee0616ff123350b6b137314b5.tar.gz |
Record fortress control.
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 19 |
1 files changed, 18 insertions, 1 deletions
@@ -2167,7 +2167,7 @@ const SETUP = { setup_units(ALEXANDRIA, 0, [ "10IN/161m", "8IN/18", - "B", + "/B", "FF/2", "5IN/9+10", "10IN/21+25", @@ -2266,12 +2266,24 @@ const SETUP = { } +function setup_fortress(scenario, fortress) { + if (scenario.allied_deployment.includes(fortress)) + return ALLIED + if (scenario.axis_deployment.includes(fortress)) + return AXIS + throw new Error("invalid setup") +} + function setup(name) { let scenario = SCENARIOS[name] game.month = scenario.start SETUP[name](-scenario.start) + game.bardia = setup_fortress(scenario, BARDIA) + game.benghazi = setup_fortress(scenario, BENGHAZI) + game.tobruk = setup_fortress(scenario, TOBRUK) + game.active = 'Axis' game.state = 'free_deployment' game.selected = [] @@ -2307,6 +2319,11 @@ exports.setup = function (seed, scenario, options) { axis_minefields: [], allied_minefields: [], + // fortress control + bardia: ALLIED, + benghazi: ALLIED, + tobruk: ALLIED, + // supply networks axis_supply: null, axis_supply_line: null, |