diff options
author | Tor Andersson <tor@ccxvii.net> | 2022-05-09 20:26:32 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-02-18 12:31:29 +0100 |
commit | c2ab0eb70d1c309b716dfd69678a31d41b2257ca (patch) | |
tree | 4755c7d5b3f57b5d9d59f29afdef51b02a2c897c | |
parent | d2c5d0655863cdfbc8082589a9fe4049172a2cd8 (diff) | |
download | pax-pamir-c2ab0eb70d1c309b716dfd69678a31d41b2257ca.tar.gz |
Fix bodyguards.
-rw-r--r-- | rules.js | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -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); + } } } }, |