diff options
author | Tor Andersson <tor@ccxvii.net> | 2025-03-23 12:20:08 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2025-03-23 12:20:08 +0100 |
commit | 132d8e5f7a39247aaa64cea18947a38d932b77b8 (patch) | |
tree | 31e8b73b620911b803745b31b13d93fcad7b853a | |
parent | f4009f4b7ce0ba26ad4ff224b4f285fb43e166a0 (diff) | |
download | land-and-freedom-132d8e5f7a39247aaa64cea18947a38d932b77b8.tar.gz |
Fix check for available card in hand to claim momentum medallion.
-rw-r--r-- | rules.js | 6 | ||||
-rw-r--r-- | rules.ts | 6 |
2 files changed, 6 insertions, 6 deletions
@@ -1121,7 +1121,7 @@ states.choose_medallion = { for (let m of game.medallions[POOL_ID]) { if (m !== null) { if (m === data_1.MOMENTUM_MEDALLION_ID) { - if (game.hands[faction].length > game.selected_cards[faction].length) { + if (game.hands[faction].some(c => !game.selected_cards[faction].includes(c))) { gen_action_medallion(m); skip = false; } @@ -1582,14 +1582,14 @@ function resolve_spend_hp() { function set_player_turn_prompt({ can_play_card, use_ap, use_momentum, use_morale_bonus, }) { if (can_play_card) view.prompt = "Play card for Action Points or for the Event."; - else if (use_momentum) - view.prompt = "Play a second card."; else if (use_ap && use_morale_bonus) view.prompt = "Use Action Points and Morale Bonus."; else if (use_morale_bonus) view.prompt = "Use Morale Bonus."; else if (use_ap) view.prompt = "Use Action Points."; + else if (use_momentum) + view.prompt = "Play a second card."; else view.prompt = "Player Turn: Done."; } @@ -1410,7 +1410,7 @@ states.choose_medallion = { for (let m of game.medallions[POOL_ID]) { if (m !== null) { if (m === MOMENTUM_MEDALLION_ID) { - if (game.hands[faction].length > game.selected_cards[faction].length) { + if (game.hands[faction].some(c => !game.selected_cards[faction].includes(c))) { gen_action_medallion(m); skip = false; } @@ -1933,14 +1933,14 @@ function set_player_turn_prompt({ }: { can_spend_hp: boolean; can_play_card: boolean; use_ap: boolean; use_momentum: boolean; use_morale_bonus: boolean }) { if (can_play_card) view.prompt = "Play card for Action Points or for the Event." - else if (use_momentum) - view.prompt = "Play a second card." else if (use_ap && use_morale_bonus) view.prompt = "Use Action Points and Morale Bonus." else if (use_morale_bonus) view.prompt = "Use Morale Bonus." else if (use_ap) view.prompt = "Use Action Points." + else if (use_momentum) + view.prompt = "Play a second card." else view.prompt = "Player Turn: Done." } |