diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-07-09 14:18:41 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-07-09 14:18:41 +0200 |
commit | b85a18d3e482e3d313c469411ad9668bdc51b683 (patch) | |
tree | 8d88548ff874c87a24b9a87fc2a50eb260468d47 | |
parent | 2a8eba95d94651b130cdf6d922514f189309c121 (diff) | |
download | time-of-crisis-b85a18d3e482e3d313c469411ad9668bdc51b683.tar.gz |
Foederati at sea.
-rw-r--r-- | rules.js | 20 |
1 files changed, 16 insertions, 4 deletions
@@ -1794,11 +1794,16 @@ function goto_take_actions() { function resume_take_actions() { game.state = "take_actions" - if (game.selected_governor && !can_select_governor(game.selected_governor)) + + // If used Foederati (or other events) at sea + if (game.selected_general && is_sea(get_general_location(game.selected_general))) + game.state = "move_army_at_sea" + + if (game.selected_governor >= 0 && !can_select_governor(game.selected_governor)) game.selected_governor = -1 - if (game.selected_general && !can_select_general(game.selected_general)) + if (game.selected_general >= 0 && !can_select_general(game.selected_general)) game.selected_general = -1 - if (game.selected_militia && !can_select_militia(game.selected_militia)) + if (game.selected_militia >= 0 && !can_select_militia(game.selected_militia)) game.selected_militia = -1 } @@ -2845,10 +2850,12 @@ function gen_move_army() { states.move_army_at_sea = { inactive: "Move Army", prompt() { - prompt("Move Army: " + game.mip + " Military.") + prompt("Move Army at Sea: " + game.mip + " Military.") view.color = MILITARY view.selected_general = game.selected_general gen_move_army() + + gen_card_event(CARD_S3) // Allow Foederati at sea. }, region(to) { push_undo() @@ -2859,6 +2866,11 @@ states.move_army_at_sea = { move_army_to(game.selected_general, to) enter_capital() }, + card(c) { + push_undo() + set_add(game.used, c) + play_card_event(c) + }, } function move_army_to(who, to) { |