summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-08-27 20:59:07 +0200
committerTor Andersson <tor@ccxvii.net>2024-08-27 20:59:07 +0200
commit896a7ae3e029172cb77d95989d21883206fca79d (patch)
treef97c789d5a0de8bfd60cb025920f3030285b4c92 /rules.js
parent93627e344818b7896d032e8cca3d02b3f18c933d (diff)
downloadtable-battles-896a7ae3e029172cb77d95989d21883206fca79d.tar.gz
Absorbing hits ignores any and all Link effects.
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/rules.js b/rules.js
index eabb51d..a23148d 100644
--- a/rules.js
+++ b/rules.js
@@ -2710,7 +2710,7 @@ function goto_attack(target) {
}
// Update hits and self hits.
-function update_attack1() {
+function update_attack1(is_absorb = false) {
let a = current_action()
let n = count_dice_on_card(game.selected)
@@ -2932,8 +2932,11 @@ function update_attack1() {
game.hits += 1
// Linked Formations (TGA and CAL expansion rule)
- if (card_has_active_link(target))
- game.hits = Math.max(0, game.hits - 1)
+ // If a card Absorbs Hits, the presence of a Link does not reduce the number of hits.
+ if (!is_absorb) {
+ if (card_has_active_link(target))
+ game.hits = Math.max(0, game.hits - 1)
+ }
if (card_has_rule(target, "suffer_1_less"))
game.hits = Math.max(0, game.hits - 1)
@@ -3494,7 +3497,7 @@ function goto_absorb(c, a) {
game.target = c
- update_attack1()
+ update_attack1(true)
switch (a.effect)
{