From 1b54fb06b630dee302accfc2a7029bfb53efddd1 Mon Sep 17 00:00:00 2001 From: Mischa Untaga <99098079+MischaU8@users.noreply.github.com> Date: Mon, 4 Dec 2023 13:48:31 +0100 Subject: show how many cubes remaining --- rules.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/rules.js b/rules.js index 050a36a..007c935 100644 --- a/rules.js +++ b/rules.js @@ -1617,13 +1617,12 @@ states.campaigning_add_cubes = { if (us_states.length) { - view.prompt = `Campaigning: Add ${pluralize(game.campaigning.count, COLOR_NAMES[campaigner_color(game.selected_campaigner)] + ' cube')}, remove opponent's cubes` + let remaining = game.campaigning.count - game.campaigning.added + view.prompt = `Campaigning: Add ${pluralize(remaining, COLOR_NAMES[campaigner_color(game.selected_campaigner)] + ' cube')}, remove opponent's cubes` if (can_move) { view.prompt += ", and optionally Move Campaigner" } 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 or Remove cubes.` gen_action("done") @@ -2624,9 +2623,9 @@ states.vm_remove_cubes = { inactive: "remove a cube.", prompt() { if (game.vm.all) { - event_prompt(`Remove all ${COLOR_NAMES[game.vm.cubes]} cube.`) + event_prompt(`Remove all ${COLOR_NAMES[game.vm.cubes]} cubes.`) } else { - event_prompt(`Remove ${game.vm.count} ${COLOR_NAMES[game.vm.cubes]} cube`) + event_prompt(`Remove ${pluralize(game.vm.count, COLOR_NAMES[game.vm.cubes] + ' cube')}`) if (game.vm.limit) view.prompt += `, no more than ${game.vm.limit} per state` view.prompt += '.' -- cgit v1.2.3