From b05928ba1fd0fccf75a8d6c7e032d8365f580c72 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Thu, 6 Jul 2023 19:57:18 +0200 Subject: Push undo when selecting. --- rules.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'rules.js') diff --git a/rules.js b/rules.js index b17026a..928a041 100644 --- a/rules.js +++ b/rules.js @@ -2026,29 +2026,30 @@ states.take_actions = { }, governor(id) { + push_undo() game.selected_governor = id game.selected_general = -1 game.selected_militia = -1 }, general(id) { + push_undo() if (is_own_general(id)) { game.selected_governor = -1 game.selected_general = id game.selected_militia = -1 } else { - push_undo() goto_battle_vs_general(get_selected_region(), game.selected_general, id, false) } }, militia(where) { + push_undo() if (is_own_province(where)) { game.selected_governor = -1 game.selected_general = -1 game.selected_militia = where } else { - push_undo() goto_battle_vs_militia(where, game.selected_general, false) } }, -- cgit v1.2.3