diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-12-09 23:23:50 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-01-08 16:36:47 +0100 |
commit | 295d729f92179fd2f402c63451292cdb5e3705e1 (patch) | |
tree | deaeaf647540d2dda9ddf1afab85dcc77a6dffa3 | |
parent | 3d4909f946f724562d354a55a721ded43a12c268 (diff) | |
download | table-battles-295d729f92179fd2f402c63451292cdb5e3705e1.tar.gz |
Tewkesbury.
-rw-r--r-- | rules.js | 29 |
1 files changed, 26 insertions, 3 deletions
@@ -213,6 +213,11 @@ const S3201_LONGSTREET = find_card(3201, "Longstreet") const S12_TOWTON = find_scenario(12) const S13_EDGECOTE_MOOR = find_scenario(13) +const S15_TEWKESBURY = find_scenario(15) +const S15_A_PLUMP_OF_SPEARS = find_card(15, "A Plump of Spears") +const S15_SOMERSET = find_card(15, "Somerset") +const S15_WENLOCK = find_card(15, "Wenlock") + // === SETUP === exports.setup = function (seed, scenario, options) { @@ -443,6 +448,10 @@ function is_card_in_play(c) { ) } +function is_routed(c) { + return !is_card_in_play(c) +} + function is_card_attack_with_target_in_play(c) { for (let a of data.cards[c].actions) { if (a.type === "Attack") { @@ -697,9 +706,9 @@ function can_place_dice(c) { if (game.scenario === S8_BROOKLYN_HEIGHTS) { if (c === S8_CLINTON) { - if (!is_card_in_play(S8_GRANT)) + if (is_routed(S8_GRANT)) return false - if (!is_card_in_play(S8_HESSIANS)) + if (is_routed(S8_HESSIANS)) return false } } @@ -1298,7 +1307,7 @@ states.action = { goto_fizzle(c) }, roll() { - push_undo() + clear_undo() goto_roll_phase() roll_dice_in_pool() }, @@ -1412,6 +1421,13 @@ function goto_attack() { } } + if (game.scenario === S15_TEWKESBURY) { + if (game.target === S15_SOMERSET) { + if (has_any_dice_on_card(S15_A_PLUMP_OF_SPEARS)) + 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")) @@ -1570,6 +1586,13 @@ function can_take_reaction(c, a) { } } + if (game.scenario === S15_TEWKESBURY) { + if (c === S15_WENLOCK) { + if (is_routed(S15_SOMERSET)) + return false + } + } + if (data.cards[c].special) return check_cube_requirement(c, a.requirement) else |