summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js27
1 files changed, 23 insertions, 4 deletions
diff --git a/rules.js b/rules.js
index 7316a03..7862704 100644
--- a/rules.js
+++ b/rules.js
@@ -204,6 +204,12 @@ const S37_FRENCH_TROOPS = find_card(37, "French Troops")
const S37_SOIMONOFF = find_card(37, "Soimonoff")
const S37_THE_FOG = find_card(37, "The Fog")
+const S3201_GAINES_MILL = find_scenario(3201)
+const S3201_JACKSON = find_card(3201, "Jackson")
+const S3201_DH_HILL = find_card(3201, "D.H. Hill")
+const S3201_AP_HILL = find_card(3201, "A.P. Hill")
+const S3201_LONGSTREET = find_card(3201, "Longstreet")
+
// === SETUP ===
exports.setup = function (seed, scenario, options) {
@@ -668,7 +674,12 @@ function can_place_dice(c) {
}
}
- // TODO: 91A Jackson - may only place dice if D.H. Hill has dice
+ if (game.scenario === S3201_GAINES_MILL) {
+ if (c === S3201_JACKSON) {
+ if (!has_any_dice_on_card(S3201_DH_HILL))
+ return false
+ }
+ }
return pred(c)
}
@@ -1140,13 +1151,21 @@ function can_take_action(c, a) {
if (game.scenario === S8_BROOKLYN_HEIGHTS) {
if (c === S8_CLINTON) {
- // Clinton can only attack if both Grant and Hessians have dice on them.
- if (!(has_any_dice_on_card(S8_GRANT) && has_any_dice_on_card(S8_HESSIANS)))
+ // Clinton - may only attack if both Grant and Hessians have dice on them.
+ if (!has_any_dice_on_card(S8_GRANT) || !has_any_dice_on_card(S8_HESSIANS))
return false
}
}
- // TODO: 91A Jackson - may only attack if D.H. Hill and one other formation have dice
+ if (game.scenario === S3201_GAINES_MILL) {
+ if (c === S3201_JACKSON) {
+ // Jackson - may only attack if D.H. Hill and one other formation have dice
+ if (!has_any_dice_on_card(S3201_DH_HILL))
+ return false
+ if (!has_any_dice_on_card(S3201_AP_HILL) && !has_any_dice_on_card(S3201_LONGSTREET))
+ return false
+ }
+ }
if (a.type === "Bombard" || a.type === "Attack" || a.type === "Command") {
if (data.cards[c].special)