diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-12-14 14:19:07 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-01-08 16:36:48 +0100 |
commit | 55eae227cb5eb04d03814137ebe6f6a13a93c92c (patch) | |
tree | d4d55865c2cda85dbfafe290342f7e1691c10734 | |
parent | e60469e361a3ea034f12aa495a364aa7af4c192e (diff) | |
download | table-battles-55eae227cb5eb04d03814137ebe6f6a13a93c92c.tar.gz |
Denain.
-rw-r--r-- | rules.js | 36 |
1 files changed, 32 insertions, 4 deletions
@@ -310,6 +310,12 @@ const S42_RAMILLIES = find_scenario(42) const S42_MARLBOROUGH = find_card(42, "Marlborough") const S42_DUTCH_GUARDS = find_card(42, "Dutch Guards") +const S43_DENAIN = find_scenario(43) +const S43_DUTCH_HORSE = find_card(43, "Dutch Horse") +const S43_VILLARS_LEFT = find_card(43, "Villars's Left") +const S43_BROGLIE = find_card(43, "Broglie") +const S43_PRINCE_DE_TINGRY = find_card(43, "Prince de Tingry") + // === SETUP === exports.setup = function (seed, scenario, options) { @@ -673,12 +679,16 @@ function check_impossible_to_attack_victory() { function check_victory() { let info = data.scenarios[game.scenario] - // Scenario specific victory conditions. if (game.scenario === S39_MARSAGLIA) { if (is_removed_from_play(S39_HOGUETTE) && is_removed_from_play(S39_CATINAT)) - goto_game_over(P1, P2 + " lost both linked formations.") + return goto_game_over(P1, P2 + " lost both linked formations.") if (is_removed_from_play(S39_DUKE_OF_SAVOY) && is_removed_from_play(S39_EUGENE)) - goto_game_over(P2, P1 + " lost both linked formations.") + return goto_game_over(P2, P1 + " lost both linked formations.") + } + + if (game.scenario === S43_DENAIN) { + if (is_removed_from_play(S43_PRINCE_DE_TINGRY)) + return goto_game_over(P1, "Eugene is able to cross.") } if (game.morale[0] === 0) @@ -2189,6 +2199,11 @@ function update_attack1() { game.hits *= 2 } + if (game.scenario === S43_DENAIN) { + if (game.selected === S43_DUTCH_HORSE && game.target === S43_VILLARS_LEFT) + game.hits *= 2 + } + let extra = card_has_rule(game.selected, "extra_hit_if_dice_on") if (extra && has_any_dice_on_card(extra[0])) game.hits += 1 @@ -2454,12 +2469,20 @@ function can_take_reaction(c, a, wild) { if (game.scenario === S31_NEWBURY_1ST) { if (c === S31_GERARD) { - // TODO: or is it while London New Bands is in play? if (is_removed_from_play(S31_SKIPPON)) return false } } + if (game.scenario === S43_DENAIN) { + if (c === S43_DUTCH_HORSE) { + // May only screen Villars's Left if Broglie has routed + if (game.target === S43_VILLARS_LEFT) + if (is_card_in_play(S43_BROGLIE)) + return false + } + } + if (data.cards[c].special) return check_cube_requirement(c, a.requirement) else @@ -2749,6 +2772,8 @@ function get_attack_hits(c, a) { case "1 hit per die. 1 self per action (but see Cannons).": case "1 hit per die. 1 self per action (but see Bayonets!).": case "1 hit per die (2 hits per die vs. Blenheim). 1 self per action.": + case "1 hit per die (two per die vs. Villars's Left). 1 self per action.": + case "1 hit per die. 1 self per action. If reduced to one stick, no self hits.": case "1 hit per die. 1 self per action. You CHOOSE the target.": return count_dice_on_card(c) case "1 hit per pair.": @@ -2794,12 +2819,15 @@ function get_attack_self(c, a) { case "1 hit per die. 1 self per action (but see Cannons).": case "1 hit per die. 1 self per action (but see Bayonets!).": case "1 hit per die (2 hits per die vs. Blenheim). 1 self per action.": + case "1 hit per die (two per die vs. Villars's Left). 1 self per action.": case "1 hit per die. 1 self per action. You CHOOSE the target.": 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 + case "1 hit per die. 1 self per action. If reduced to one stick, no self hits.": + return (get_sticks(c) > 1) ? 1 : 0 } } |