From c2ab0eb70d1c309b716dfd69678a31d41b2257ca Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 9 May 2022 20:26:32 +0200 Subject: Fix bodyguards. --- rules.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/rules.js b/rules.js index 3f837be..56026b3 100644 --- a/rules.js +++ b/rules.js @@ -416,6 +416,8 @@ function active_can_betray() { for (let i = x; i < x + 10; ++i) { if (game.pieces[i] >= 1 && game.pieces[i] <= 100) { let c = game.pieces[i]; + if (cards[c].suit !== Political) + return true; let p = find_card_in_court(c); if (!player_has_bodyguards(p)) return true; @@ -1686,9 +1688,13 @@ states.betray = { for (let i = x; i < x + 10; ++i) { if (game.pieces[i] > 0 && game.pieces[i] <= 100) { let c = game.pieces[i]; - let p = find_card_in_court(c); - if (!player_has_bodyguards(p)) + if (cards[c].suit !== Political) { gen_action('card', c); + } else { + let p = find_card_in_court(c); + if (!player_has_bodyguards(p)) + gen_action('card', c); + } } } }, -- cgit v1.2.3