diff options
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 18 |
1 files changed, 14 insertions, 4 deletions
@@ -2368,17 +2368,26 @@ function calc_extra_votes(where) { return n } +function format_votes(need, extra, dice) { + let s = "Need " + need + (need === 1 ? " vote." : " votes.") + if (extra > 0) + s += " Have " + extra + (extra === 1 ? " vote." : " votes.") + s += " Rolling " + dice + (dice === 1 ? " die." : " dice.") + return s +} + states.place_governor = { inactive: "Place Governor", prompt() { - let need = Math.max(0, calc_needed_votes(game.where, false) - calc_extra_votes(game.where)) + let need = calc_needed_votes(game.where, false) + let extra = calc_extra_votes(game.where) let dice = game.count if (game.where === ITALIA) dice += count_own_basilicas() view.color = SENATE view.selected_region = game.where view.selected_governor = game.selected_governor - prompt(`Place Governor: ${game.sip} senate. Rolling ${dice} dice. ${need} votes needed.`) + prompt("Place Governor: " + game.sip + " senate. " + format_votes(need, extra, dice)) if (game.ambitus < game.count && has_card_event(CARD_P2X)) { view.prompt += " Ambitus?" gen_card_event(CARD_P2X) @@ -2408,14 +2417,15 @@ states.place_governor = { states.praetorian_guard = { inactive: "Praetorian Guard", prompt() { - let need = Math.max(0, calc_needed_votes(game.where, true) - calc_extra_votes(game.where)) + let need = calc_needed_votes(game.where, true) + let extra = calc_extra_votes(game.where) let dice = game.count if (game.where === ITALIA) dice += count_own_basilicas() view.color = MILITARY view.selected_region = game.where view.selected_governor = game.selected_governor - prompt(`Praetorian Guard: ${game.mip} military. Rolling ${dice} dice. ${need} votes needed.`) + prompt("Praetorian Guard: " + game.mip + " military. " + format_votes(need, extra, dice)) if (game.ambitus < game.count && has_card_event(CARD_P2X)) { view.prompt += " Ambitus?" gen_card_event(CARD_P2X) |