diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-07-06 19:57:18 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-07-07 19:05:52 +0200 |
commit | b05928ba1fd0fccf75a8d6c7e032d8365f580c72 (patch) | |
tree | 919b9477e1a47a693c63dc44dece633290df5583 | |
parent | 5036dd980d0d82fc8b69b14ab545d4717c0ae0d7 (diff) | |
download | time-of-crisis-b05928ba1fd0fccf75a8d6c7e032d8365f580c72.tar.gz |
Push undo when selecting.
-rw-r--r-- | rules.js | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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) } }, |