diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-07-04 01:06:32 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-07-07 19:05:52 +0200 |
commit | 823c5ef0776c95ec4a8daf70d5c57ee74e457abe (patch) | |
tree | 182effb19feb4d64b7782db507023635626b1ad6 /rules.js | |
parent | 008efdce469b803f3eb63ec2c17e1eeda56b37fc (diff) | |
download | time-of-crisis-823c5ef0776c95ec4a8daf70d5c57ee74e457abe.tar.gz |
Subtract Ambitus and Populace Emperor disadvantage from votes needed.
Let it go to 0 or negative if needed.
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 45 |
1 files changed, 17 insertions, 28 deletions
@@ -2258,18 +2258,16 @@ function calc_needed_votes(where, pg) { if (has_militia(where)) n += 1 } - return Math.max(1, n) -} -function calc_extra_votes(where) { - let n = 0 + // ... to a minimum of one + n = Math.max(1, n) - // Ambitus adds guaranteed votes. - n += game.ambitus + // Ambitus votes + n -= game.ambitus - // Populace Emperor - Special Disadvantage - if (where === ITALIA && is_populace_emperor()) - n += 2 + // Populace Emperor disadvantage votes + if (game.where === ITALIA && is_populace_emperor()) + n -= 2 return n } @@ -2285,10 +2283,6 @@ states.place_governor = { view.selected_region = game.where view.selected_governor = game.selected_governor prompt(`Place Governor: ${game.sip} senate. Rolling ${dice} dice. ${need} votes needed.`) - if (game.where === ITALIA && is_populace_emperor()) - view.prompt += ` +2 vs Populace Emperor.` - if (game.ambitus > 0) - view.prompt += ` +${game.ambitus} from Ambitus.` if (game.ambitus < game.count && has_card_event(CARD_P2X)) { view.prompt += " Ambitus?" gen_card_event(CARD_P2X) @@ -2326,10 +2320,6 @@ states.praetorian_guard = { view.selected_region = game.where view.selected_governor = game.selected_governor prompt(`Praetorian Guard: ${game.mip} military. Rolling ${dice} dice. ${need} votes needed.`) - if (is_populace_emperor()) - view.prompt += ` +2 vs Populace Emperor.` - if (game.ambitus > 0) - view.prompt += ` +${game.ambitus} from Ambitus.` if (game.ambitus < game.count && has_card_event(CARD_P2X)) { view.prompt += " Ambitus?" gen_card_event(CARD_P2X) @@ -2371,6 +2361,16 @@ function roll_to_place_governor(pg) { else log("Place Governor in %" + game.where) + if (game.where === ITALIA && is_populace_emperor()) + log("Populace Emperor B0 B0") + + if (game.ambitus > 0) { + let str = "Ambitus" + for (let i = 0; i < game.ambitus; ++i) + str += " B0" + log(str) + } + if (is_neutral_province(game.where)) have = roll_dice(game.count, 1) else if (!pg && has_quaestor(game.where)) @@ -2378,17 +2378,6 @@ function roll_to_place_governor(pg) { else have = roll_dice(game.count, 2) - if (game.where === ITALIA && is_populace_emperor()) { - log("Populace Emperor B0 B0") - have += 2 - } - - if (game.ambitus > 0) { - for (let i = 0; i < game.ambitus; ++i) - log("Ambitus B0") - have += game.ambitus - } - if (have >= need) { log("Success!") log_br() |