summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-12-13 16:57:47 +0100
committerTor Andersson <tor@ccxvii.net>2024-01-08 16:36:48 +0100
commita99e356ecc08b0718b7870a348b7c57ac16098b1 (patch)
treea1ff809ddee2c3331a08e1e75d91377c3a266c01 /rules.js
parent9297418c7f9e955fd22d1d91c350d0638e124af3 (diff)
downloadtable-battles-a99e356ecc08b0718b7870a348b7c57ac16098b1.tar.gz
Edgehill.
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js42
1 files changed, 41 insertions, 1 deletions
diff --git a/rules.js b/rules.js
index dd34543..f1f229d 100644
--- a/rules.js
+++ b/rules.js
@@ -258,6 +258,23 @@ const S29_JOHNSON = find_card(29, "Johnson")
const S29_MEADE = find_card(29, "Meade")
const S29_LITTLE_ROUND_TOP = find_card(29, "Little Round Top")
+const S30_EDGEHILL = find_scenario(30)
+const S30_BALFOUR = find_card(30, "Balfour")
+const S30_STAPLETON = find_card(30, "Stapleton")
+const S30_RUPERT = find_card(30, "Rupert of the Rhine")
+const S30_WILMOT = find_card(30, "Wilmot")
+const S30_ESSEX = find_card(30, "Charles Essex")
+const S30_GERARD = find_card(30, "Gerard")
+
+const S31_NEWBURY_1ST = find_scenario(31)
+const S31_BYRON = find_card(31, "Byron")
+const S31_SKIPPON = find_card(31, "Skippon")
+const S31_WENTWORTH = find_card(31, "Wentworth")
+const S31_ROYALIST_GUNS = find_card(31, "Royalist Guns")
+const S31_GERARD = find_card(31, "Gerard")
+const S31_STAPLETON = find_card(31, "Stapleton")
+const S31_LONDON_TRAINED_BANDS = find_card(31, "London Trained Bands")
+
// === SETUP ===
exports.setup = function (seed, scenario, options) {
@@ -1822,6 +1839,11 @@ function update_attack1() {
}
}
+ if (game.scenario === S30_EDGEHILL) {
+ if (game.selected === S30_GERARD && game.target === S30_ESSEX)
+ game.hits += 1
+ }
+
if (card_has_rule(game.target, "suffer_1_less_1_max"))
game.hits = Math.max(0, Math.min(1, game.hits - 1))
if (card_has_rule(game.target, "suffer_1_less"))
@@ -2231,6 +2253,7 @@ states.s29_meade = {
}
},
card(c) {
+ remove_dice(S29_MEADE)
game.target = c
update_attack1()
update_attack2()
@@ -2328,6 +2351,8 @@ function get_attack_hits(c, a) {
case "1 hit per die. 1 self per action. (But see Semmes.)":
case "1 hit per die (also take dice from 141st Pennsylvania). 1 self per action.":
case "1 hit per die (also take dice from 68th Pennsylvania). 1 self per action.":
+ case "1 hit per die. 1 self per action. (But see William Fielding.)":
+ case "1 hit per die (1 extra vs Essex). 1 self per action. (See W. Fielding.)":
return count_dice_on_card(c)
case "1 hit per pair.":
case "1 hit per pair. 1 self per action.":
@@ -2335,6 +2360,10 @@ function get_attack_hits(c, a) {
case "1 hit, PLUS 1 hit per die. 1 self per action.":
case "1 hit, PLUS 1 hit per die. 1 self per action. Fightin' Irish!":
return 1 + count_dice_on_card(c)
+ case "2 hits, PLUS 1 hit per die. 1 self per action.":
+ return 2 + count_dice_on_card(c)
+ case "2 hits.":
+ return 2
case "5 hits.":
return 5
}
@@ -2351,6 +2380,7 @@ function get_attack_self(c, a) {
case "1 hit per die. Ignore first target until it comes out of Reserve.":
case "1 hit per die (plus dice from E. Phalanx).":
case "1 hit per pair.":
+ case "2 hits.":
case "5 hits.":
return 0
case "1 hit. 1 self per action.":
@@ -2362,9 +2392,12 @@ function get_attack_self(c, a) {
case "1 hit per die. 1 self per action. (But see Semmes.)":
case "1 hit per die (also take dice from 141st Pennsylvania). 1 self per action.":
case "1 hit per die (also take dice from 68th Pennsylvania). 1 self per action.":
+ case "1 hit per die. 1 self per action. (But see William Fielding.)":
+ case "1 hit per die (1 extra vs Essex). 1 self per action. (See W. Fielding.)":
case "1 hit per pair. 1 self per action.":
case "1 hit, PLUS 1 hit per die. 1 self per action.":
case "1 hit, PLUS 1 hit per die. 1 self per action. Fightin' Irish!":
+ case "2 hits, PLUS 1 hit per die. 1 self per action.":
return 1
}
}
@@ -2561,8 +2594,15 @@ function should_enter_reserve(c) {
}
for (let t of reserve)
- if (!is_card_in_play(t))
+ if (is_routed(t))
return true
+
+ if (game.scenario === S30_EDGEHILL) {
+ if (c === S30_BALFOUR || c === S30_STAPLETON) {
+ return is_routed(S30_RUPERT) && is_routed(S30_WILMOT)
+ }
+ }
+
return false
}