summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2025-03-23 00:25:47 +0100
committerTor Andersson <tor@ccxvii.net>2025-03-23 00:25:47 +0100
commitf4a51cda82508504662992ec8530b847482f94bf (patch)
tree3a19238a9dcdece631130b0122f34c288bc09a37 /rules.js
parent954c9c0690a64a8ed172a5b10cb8a4b5a32293fe (diff)
downloadland-and-freedom-f4a51cda82508504662992ec8530b847482f94bf.tar.gz
only claim momentum if you have enough cards in hand to use it.
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js18
1 files changed, 15 insertions, 3 deletions
diff --git a/rules.js b/rules.js
index fd1297f..a1ec804 100644
--- a/rules.js
+++ b/rules.js
@@ -1112,11 +1112,23 @@ states.choose_medallion = {
prompt() {
gen_spend_hero_points();
view.prompt = 'Claim a Medallion.';
+ const faction = get_active_faction();
+ var skip = true;
for (let m of game.medallions[POOL_ID]) {
- if (m !== null)
- gen_action_medallion(m);
+ if (m !== null) {
+ if (m === data_1.MOMENTUM_MEDALLION_ID) {
+ if (game.hands[faction].length > game.selected_cards[faction].length) {
+ gen_action_medallion(m);
+ skip = false;
+ }
+ }
+ else {
+ gen_action_medallion(m);
+ skip = false;
+ }
+ }
}
- if (!game.medallions[POOL_ID].some((m) => m !== null)) {
+ if (skip) {
gen_action('skip');
}
},