diff options
author | Mischa Untaga <99098079+MischaU8@users.noreply.github.com> | 2023-11-30 15:49:59 +0100 |
---|---|---|
committer | Mischa Untaga <99098079+MischaU8@users.noreply.github.com> | 2023-11-30 15:51:10 +0100 |
commit | 705c52e7310736e17c152081fa9640dea4ddcc78 (patch) | |
tree | df88bb94599573fc4f64f33116fc13c623e14ea8 | |
parent | 5b47952204a127b47d4ca502cdb8b943a929a3f9 (diff) | |
download | votes-for-women-705c52e7310736e17c152081fa9640dea4ddcc78.tar.gz |
campaigning prompt improvement
-rw-r--r-- | rules.js | 33 |
1 files changed, 16 insertions, 17 deletions
@@ -1482,7 +1482,7 @@ states.campaigning_assign = { inactive: "do Campaigning.", prompt() { let die = game.roll[game.campaigning.dice_idx] - view.prompt = `Campaigning: Assign ${die} to a Campaigner.` + view.prompt = `Campaigning: Assign ${pluralize(die, 'cube')} to a Campaigner.` for_each_player_campaigner(c => { if (!set_has(game.campaigning.assigned, c)) @@ -1535,7 +1535,7 @@ function filter_us_states(us_states) { states.campaigning_add_cubes = { inactive: "do Campaigning.", prompt() { - let has_opponent_cubes = false + // let has_opponent_cubes = false let can_move = false if (!game.campaigning.added && player_buttons() > 0 && !game.campaigning.moved) { gen_action("move") @@ -1547,7 +1547,7 @@ states.campaigning_add_cubes = { for (let s of us_states) { if (opponent_cubes(s)) { - has_opponent_cubes = true + // has_opponent_cubes = true if (game.active === SUF) { gen_action_red_cube(s) } else { @@ -1563,13 +1563,14 @@ states.campaigning_add_cubes = { if (us_states.length) { - view.prompt = `Campaigning: Add a ${COLOR_NAMES[campaigner_color(game.selected_campaigner)]} cube.` - if (has_opponent_cubes) - view.prompt += " or remove an Opponent's cube" + view.prompt = `Campaigning: Add a ${COLOR_NAMES[campaigner_color(game.selected_campaigner)]} cube` + // if (has_opponent_cubes) + // view.prompt += " or remove an Opponent's cube" if (can_move) { view.prompt += " or Move to another Region" } - view.prompt += "." + let remaining = game.campaigning.count - game.campaigning.added + view.prompt += `. ${pluralize(remaining, 'cube')} remaining.` } else { view.prompt = `Campaigning: No available States to add a ${COLOR_NAMES[campaigner_color(game.selected_campaigner)]} cube.` gen_action("done") @@ -2418,10 +2419,10 @@ states.vm_add_cubes = { }) } - let has_opponent_cubes = false + // let has_opponent_cubes = false for (let s of game.vm.us_states) { if (opponent_cubes(s)) { - has_opponent_cubes = true + // has_opponent_cubes = true if (game.active === SUF) { gen_action_red_cube(s) } else { @@ -2436,15 +2437,13 @@ states.vm_add_cubes = { } if (!game.vm.cube_color) { - if (!has_opponent_cubes) - event_prompt("Choose a cube color to add.") - else - event_prompt("Choose a cube color to add or remove an Opponent's cube.") + event_prompt("Choose a cube color to add.") + // if (has_opponent_cubes) + // event_prompt("Choose a cube color to add or remove an Opponent's cube.") } else { - if (!has_opponent_cubes) - event_prompt(`Add a ${COLOR_NAMES[game.vm.cube_color]} cube.`) - else - event_prompt(`Add a ${COLOR_NAMES[game.vm.cube_color]} cube or remove an Opponent's cube.`) + event_prompt(`Add a ${COLOR_NAMES[game.vm.cube_color]} cube.`) + // if (has_opponent_cubes) + // event_prompt(`Add a ${COLOR_NAMES[game.vm.cube_color]} cube or remove an Opponent's cube.`) } }, purple() { |