From badf9b5b84863c64018336f6ca2361de5e35a79a Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 5 Jan 2024 01:30:53 +0100 Subject: fix lifeguard --- rules.js | 5 +++-- 1 file 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) -- cgit v1.2.3