diff options
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 23 |
1 files changed, 13 insertions, 10 deletions
@@ -2220,7 +2220,7 @@ states.take_actions = { if (get_general_location(game.selected_general) === AVAILABLE) create_army(where, false) else - move_army_to(game.selected_general, where) + move_army_to(game.selected_general, where, false) } }, @@ -2229,8 +2229,9 @@ states.take_actions = { if (get_general_location(game.selected_general) === AVAILABLE) create_army(where, true) else if (get_general_location(game.selected_general) !== where) - move_army_to(game.selected_general, where) - enter_capital() + move_army_to(game.selected_general, where, true) + else + enter_capital() }, } @@ -2883,12 +2884,11 @@ states.move_army_at_sea = { }, region(to) { push_undo() - move_army_to(game.selected_general, to) + move_army_to(game.selected_general, to, false) }, capital(to) { push_undo() - move_army_to(game.selected_general, to) - enter_capital() + move_army_to(game.selected_general, to, true) }, card(c) { push_undo() @@ -2897,7 +2897,7 @@ states.move_army_at_sea = { }, } -function move_army_to(who, to) { +function move_army_to(who, to, to_capital) { let from = get_general_location(who) log("Move Army from %" + from + " to %" + to + ".") @@ -2909,6 +2909,8 @@ function move_army_to(who, to) { if (is_sea(to)) game.state = "move_army_at_sea" + else if (to_capital) + enter_capital() else resume_take_actions() } @@ -3542,14 +3544,15 @@ states.force_march = { region(where) { push_undo() - move_army_to(game.selected_general, where) + move_army_to(game.selected_general, where, false) }, capital(where) { push_undo() if (get_general_location(game.selected_general) !== where) - move_army_to(game.selected_general, where) - enter_capital() + move_army_to(game.selected_general, where, true) + else + enter_capital() }, enter() { |