summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-01-05 01:30:53 +0100
committerTor Andersson <tor@ccxvii.net>2024-01-08 16:36:48 +0100
commitbadf9b5b84863c64018336f6ca2361de5e35a79a (patch)
treed57c0ff609a03577f2bacf50d85c6ab8e97cace6
parent3953c85dc7d7eb4d4cc0d29cb7c0e7355ed8f56f (diff)
downloadtable-battles-badf9b5b84863c64018336f6ca2361de5e35a79a.tar.gz
fix lifeguard
-rw-r--r--rules.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/rules.js b/rules.js
index a5ab23f..9fbe89e 100644
--- a/rules.js
+++ b/rules.js
@@ -17,6 +17,7 @@ function find_card(s, n) {
}
// for (let c of data.cards) for (let a of c.actions) console.log(a.type + ":", a.effect)
+// for (let c of data.cards) { if (c.rule_text_1) console.log(c.rule_text_1); if (c.rule_text_2) console.log(c.rule_text_2) }
// for (let c of data.cards) console.log(c.dice)
// for (let c of data.cards) for (let a of c.actions) { if (a.type === "Counterattack") console.log(c.number, a.type, a.sequence, a.target) }
@@ -3659,12 +3660,12 @@ function goto_routing() {
if (game.scenario === S2_MARSTON_MOOR) {
// TODO: pause with separate state?
if (is_card_in_play(S2_RUPERTS_LIFEGUARD)) {
- if (should_rout_card(S2_NORTHERN_HORSE)) {
+ if (is_card_in_play(S2_NORTHERN_HORSE) && should_rout_card(S2_NORTHERN_HORSE)) {
log("Rupert's Lifeguard added to Northern Horse.")
move_all_sticks(S2_RUPERTS_LIFEGUARD, S2_NORTHERN_HORSE)
remove_card(S2_RUPERTS_LIFEGUARD)
}
- if (should_rout_card(S2_BYRON)) {
+ if (is_card_in_play(S2_BYRON) && should_rout_card(S2_BYRON)) {
log("Rupert's Lifeguard added to Byron.")
move_all_sticks(S2_RUPERTS_LIFEGUARD, S2_BYRON)
remove_card(S2_RUPERTS_LIFEGUARD)