summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2022-07-14 16:52:39 +0200
committerTor Andersson <tor@ccxvii.net>2022-11-17 13:11:25 +0100
commitda6628ef85ea689ee0616ff123350b6b137314b5 (patch)
treeb19ce4d81435544e5be502e5706c45f35b900fdb
parent652e53b4286bfc99466f5b13133f2c31cd877d0e (diff)
downloadrommel-in-the-desert-da6628ef85ea689ee0616ff123350b6b137314b5.tar.gz
Record fortress control.
-rw-r--r--rules.js19
1 files changed, 18 insertions, 1 deletions
diff --git a/rules.js b/rules.js
index 7808384..bc87a17 100644
--- a/rules.js
+++ b/rules.js
@@ -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,