summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-07-06 19:57:18 +0200
committerTor Andersson <tor@ccxvii.net>2023-07-07 19:05:52 +0200
commitb05928ba1fd0fccf75a8d6c7e032d8365f580c72 (patch)
tree919b9477e1a47a693c63dc44dece633290df5583 /rules.js
parent5036dd980d0d82fc8b69b14ab545d4717c0ae0d7 (diff)
downloadtime-of-crisis-b05928ba1fd0fccf75a8d6c7e032d8365f580c72.tar.gz
Push undo when selecting.
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js5
1 files changed, 3 insertions, 2 deletions
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)
}
},