summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js29
1 files changed, 15 insertions, 14 deletions
diff --git a/rules.js b/rules.js
index 910c46f..4545802 100644
--- a/rules.js
+++ b/rules.js
@@ -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)
{