summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--play.js2
-rw-r--r--rules.js54
-rw-r--r--rules.ts60
3 files changed, 26 insertions, 90 deletions
diff --git a/play.js b/play.js
index 92f6d13..4f93687 100644
--- a/play.js
+++ b/play.js
@@ -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")
diff --git a/rules.js b/rules.js
index 2400c09..abe0d7c 100644
--- a/rules.js
+++ b/rules.js
@@ -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',
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 = {