From b85a18d3e482e3d313c469411ad9668bdc51b683 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sun, 9 Jul 2023 14:18:41 +0200 Subject: Foederati at sea. --- rules.js | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/rules.js b/rules.js index 7f1513d..4d9d680 100644 --- a/rules.js +++ b/rules.js @@ -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) { -- cgit v1.2.3