summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2022-05-09 20:26:32 +0200
committerTor Andersson <tor@ccxvii.net>2023-02-18 12:31:29 +0100
commitc2ab0eb70d1c309b716dfd69678a31d41b2257ca (patch)
tree4755c7d5b3f57b5d9d59f29afdef51b02a2c897c
parentd2c5d0655863cdfbc8082589a9fe4049172a2cd8 (diff)
downloadpax-pamir-c2ab0eb70d1c309b716dfd69678a31d41b2257ca.tar.gz
Fix bodyguards.
-rw-r--r--rules.js10
1 files 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);
+ }
}
}
},