diff options
author | Tor Andersson <tor@ccxvii.net> | 2025-03-08 16:53:03 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2025-03-08 17:00:19 +0100 |
commit | b42c19db211dfb9dce41afd39be576f0a8d80222 (patch) | |
tree | 5db212892a222239149ca859c58ed421f3ff9c5b | |
parent | 9b0c7ffda8f4bf0f2e791a0821861ad14697d177 (diff) | |
download | land-and-freedom-b42c19db211dfb9dce41afd39be576f0a8d80222.tar.gz |
Remove no-op "Move a Track" and "Turn on Bonus" buttons.
-rw-r--r-- | play.js | 2 | ||||
-rw-r--r-- | rules.js | 54 | ||||
-rw-r--r-- | rules.ts | 60 |
3 files changed, 26 insertions, 90 deletions
@@ -538,8 +538,6 @@ function on_update() { // eslint-disable-line no-unused-vars action_button("play_for_event", "Play card for Event") action_button("use_ap", "Use Action Points") action_button("use_morale_bonus", "Use Morale Bonus") - action_button("move_track", "Move a Track") - action_button("turn_on_bonus", "Turn on a Bonus") action_button("add_glory", "Add to Bag of Glory") action_button("draw_glory", "Draw from Bag of Glory") action_button("next", "Next") @@ -1655,49 +1655,27 @@ states.spend_hero_points = { return false; }, prompt() { - view.prompt = 'Spend your Hero points'; - const faction = get_active_faction(); - const { move_track, turn_on_bonus } = get_active_node_args(); - if (move_track) { - view.prompt = 'Spend Hero points: move a Track'; - } - else if (turn_on_bonus) { - view.prompt = 'Spend Hero points: turn on a Bonus'; - } - if (!(move_track || turn_on_bonus)) { - gen_action('done'); - } const hero_points = game.hero_points[get_active_faction()]; + view.prompt = `Spend up to ${hero_points} Hero Points.`; + const faction = get_active_faction(); + gen_action('done'); if (hero_points === 0) { return; } - if (!(move_track || turn_on_bonus)) { - gen_action('draw_card'); - if (can_use_medallion(data_1.ARCHIVES_MEDALLION_ID, faction)) { - gen_action('remove_blank_marker'); - } - if (can_use_medallion(data_1.VOLUNTEERS_MEDALLION_ID, faction)) { - gen_action('add_to_front'); - } + gen_action('draw_card'); + if (can_use_medallion(data_1.ARCHIVES_MEDALLION_ID, faction)) { + gen_action('remove_blank_marker'); + } + if (can_use_medallion(data_1.VOLUNTEERS_MEDALLION_ID, faction)) { + gen_action('add_to_front'); } if (hero_points < 2) { return; } - if (!(move_track || turn_on_bonus)) { - gen_action('move_track'); - } for (const bonus of bonuses) { - let bonus_off = false; - if (!move_track && game.bonuses[bonus] === data_1.OFF) { + if (game.bonuses[bonus] === data_1.OFF) { gen_action_bonus(bonus); - bonus_off = true; } - if (bonus_off && !turn_on_bonus) { - gen_action('turn_on_bonus'); - } - } - if (turn_on_bonus) { - return; } gen_action_standee(data_1.FOREIGN_AID); gen_action_standee(data_1.SOVIET_SUPPORT); @@ -1740,12 +1718,6 @@ states.spend_hero_points = { draw_hand_cards(faction, 1); next(); }, - move_track() { - update_active_node_args({ - move_track: true, - }); - next(); - }, remove_blank_marker() { const faction = get_active_faction(); if (game.used_medallions) { @@ -1782,12 +1754,6 @@ states.spend_hero_points = { ])); resolve_active_and_proceed(); }, - turn_on_bonus() { - update_active_node_args({ - turn_on_bonus: true, - }); - next(); - }, }; states.swap_card_tableau_hand = { inactive: 'swap cards', @@ -2043,66 +2043,50 @@ states.spend_hero_points = { return false; }, prompt() { - view.prompt = 'Spend your Hero points'; + const hero_points = game.hero_points[get_active_faction()]; - const faction = get_active_faction(); - const { move_track, turn_on_bonus } = get_active_node_args(); + view.prompt = `Spend up to ${hero_points} Hero Points.`; - if (move_track) { - view.prompt = 'Spend Hero points: move a Track'; - } else if (turn_on_bonus) { - view.prompt = 'Spend Hero points: turn on a Bonus'; - } + const faction = get_active_faction(); - if (!(move_track || turn_on_bonus)) { - gen_action('done'); - } + gen_action('done'); - const hero_points = game.hero_points[get_active_faction()]; if (hero_points === 0) { return; } - if (!(move_track || turn_on_bonus)) { - gen_action('draw_card'); - if (can_use_medallion(ARCHIVES_MEDALLION_ID, faction)) { - gen_action('remove_blank_marker'); - } - if (can_use_medallion(VOLUNTEERS_MEDALLION_ID, faction)) { - gen_action('add_to_front'); - } + + gen_action('draw_card'); + if (can_use_medallion(ARCHIVES_MEDALLION_ID, faction)) { + gen_action('remove_blank_marker'); + } + if (can_use_medallion(VOLUNTEERS_MEDALLION_ID, faction)) { + gen_action('add_to_front'); } + if (hero_points < 2) { return; } - if (!(move_track || turn_on_bonus)) { - gen_action('move_track'); - } for (const bonus of bonuses) { - let bonus_off = false; - if (!move_track && game.bonuses[bonus] === OFF) { + if (game.bonuses[bonus] === OFF) { gen_action_bonus(bonus); - bonus_off = true; } - if (bonus_off && !turn_on_bonus) { - gen_action('turn_on_bonus'); - } - } - if (turn_on_bonus) { - return; } gen_action_standee(FOREIGN_AID); gen_action_standee(SOVIET_SUPPORT); + if (hero_points < 3) { return; } + gen_action_standee(COLLECTIVIZATION); gen_action_standee(LIBERTY); if (hero_points < 4) { return; } + gen_action_standee(GOVERNMENT); }, add_to_front() { @@ -2136,12 +2120,6 @@ states.spend_hero_points = { draw_hand_cards(faction, 1); next(); }, - move_track() { - update_active_node_args({ - move_track: true, - }); - next(); - }, remove_blank_marker() { const faction = get_active_faction(); if (game.used_medallions) { @@ -2180,12 +2158,6 @@ states.spend_hero_points = { ); resolve_active_and_proceed(); }, - turn_on_bonus() { - update_active_node_args({ - turn_on_bonus: true, - }); - next(); - }, }; states.swap_card_tableau_hand = { |