summaryrefslogtreecommitdiff
path: root/rules.ts
diff options
context:
space:
mode:
Diffstat (limited to 'rules.ts')
-rw-r--r--rules.ts60
1 files changed, 16 insertions, 44 deletions
diff --git a/rules.ts b/rules.ts
index 6330d3e..852eb6f 100644
--- a/rules.ts
+++ b/rules.ts
@@ -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 = {