diff options
-rw-r--r-- | rules.js | 42 | ||||
-rw-r--r-- | tools/gendata.js | 3 |
2 files changed, 43 insertions, 2 deletions
@@ -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 } diff --git a/tools/gendata.js b/tools/gendata.js index 1b451c4..36b42cf 100644 --- a/tools/gendata.js +++ b/tools/gendata.js @@ -298,7 +298,8 @@ function process_card(c) { if (c.pursuit) { if (c.actions[0].type !== "Attack" && c.actions[0].type !== "Counterattack") throw new Error("PURSUIT without Attack or Counterattack as first action") - if (c.actions[0].target_list.length !== 1) throw new Error("PURSUIT with more than one target!") + if (c.actions[0].target_list.length !== 1) + throw new Error("PURSUIT with more than one target!") c.pursuit = c.actions[0].target_list[0] } if (c.reserve) |