diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-12-15 00:16:15 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-01-08 16:36:48 +0100 |
commit | 880660b69fbd90b39d5d35b56fa80a12543b704e (patch) | |
tree | 56844b3f9944285769ee2ccb841aaf3894d999bb /rules.js | |
parent | d0ba4e8521279c815368a6a1bf3ecbe6bf6fcd7f (diff) | |
download | table-battles-880660b69fbd90b39d5d35b56fa80a12543b704e.tar.gz |
Hohenfriedberg - fix card order. Blenheim only 2x on direct attack.
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 29 |
1 files changed, 15 insertions, 14 deletions
@@ -2176,12 +2176,12 @@ function goto_attack(target) { game.state = "attack" game.target = target - update_attack1() + update_attack1(false) update_attack2() } // Update hits and self hits. -function update_attack1() { +function update_attack1(reaction) { let a = current_action() game.hits = get_attack_hits(game.selected, a) @@ -2257,14 +2257,15 @@ function update_attack1() { } if (game.scenario === S41_BLENHEIM_SCENARIO) { - // TODO: Original attack only, or also when Blenheim absorbs from Clerambault? - if (game.selected === S41_CUTTS_COLUMN && game.target === S41_BLENHEIM_CARD) - game.hits *= 2 + if (!reaction) + if (game.selected === S41_CUTTS_COLUMN && game.target === S41_BLENHEIM_CARD) + game.hits *= 2 } if (game.scenario === S43_DENAIN) { - if (game.selected === S43_DUTCH_HORSE && game.target === S43_VILLARS_LEFT) - game.hits *= 2 + if (!reaction) + if (game.selected === S43_DUTCH_HORSE && game.target === S43_VILLARS_LEFT) + game.hits *= 2 } if (game.scenario === S44_HOTHENFRIEDBERG) { @@ -2369,7 +2370,7 @@ states.attack = { let may_take_from = card_has_rule(game.selected, "may_take_from") if (may_take_from) { take_all_dice(from, game.selected) - update_attack1() + update_attack1(false) update_attack2() return } @@ -2378,7 +2379,7 @@ states.attack = { if (may_take_from_extra) { take_all_dice(from, game.selected) game.self2 = 1 - update_attack1() + update_attack1(false) update_attack2() return } @@ -2387,7 +2388,7 @@ states.attack = { if (game.selected === S39_CATINAT && from === S39_BAYONETS) { take_all_dice(from, game.selected) game.target2 = S39_BAYONETS - update_attack1() + update_attack1(false) update_attack2() return } @@ -2665,7 +2666,7 @@ function goto_screen(c, a) { game.target = c - update_attack1() + update_attack1(true) switch (a.effect) { @@ -2719,7 +2720,7 @@ function goto_absorb(c, a) { game.target = c - update_attack1() + update_attack1(true) switch (a.effect) { @@ -2758,7 +2759,7 @@ states.s29_meade = { card(c) { remove_dice(S29_MEADE) game.target = c - update_attack1() + update_attack1(true) update_attack2() game.state = "absorb" } @@ -2781,7 +2782,7 @@ states.absorb = { function goto_counterattack(c, a) { game.reacted = player_index() - update_attack1() + update_attack1(true) switch (a.effect) { |