summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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,