diff options
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 32 |
1 files changed, 31 insertions, 1 deletions
@@ -1195,11 +1195,13 @@ states.take_actions = { gen_action_card(c) if (game.selected_governor >= 0) { + view.color = SENATE view.selected_governor = game.selected_governor where = get_governor_location(game.selected_governor) } if (game.selected_general >= 0) { + view.color = MILITARY view.selected_general = game.selected_general where = get_general_location(game.selected_general) } @@ -1642,7 +1644,7 @@ states.place_governor = { let votes = game.misc.spend if (game.misc.where === ITALIA) votes += count_own_basilicas() - view.selected_governor = game.selected_governor + view.color = SENATE view.selected_region = game.misc.where prompt(`Place Governor: ${sip} Senate. Rolling ${votes} dice. ${need} votes needed.`) @@ -1890,6 +1892,34 @@ states.foederati = { }, } +// CARD: MOB + +function can_play_mob() { + for (let where = 0; where < 12; ++where) + if (!has_mob(where) && is_enemy_province(where)) + return true + return false +} + +function play_mob() { + game.state = "mob" +} + +states.mob = { + prompt() { + prompt("Mob: Place a Mob in a province.") + view.color = POPULACE + for (let where = 0; where < 12; ++where) + if (!has_mob(where) && is_enemy_province(where)) + gen_action_region(where) + }, + region(where) { + log("Mob in S" + where) + add_one_mob(where) + game.state = "take_actions" + }, +} + // === COMBAT === function goto_battle_vs_general(where, attacker, target) { |