summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2021-06-25 17:48:10 +0200
committerTor Andersson <tor@ccxvii.net>2022-11-17 12:53:17 +0100
commite7209785dae10f912434881ee75ee433b8b1f98b (patch)
tree1f1336335a6b5dc60622d6848c57acfba2c5bc30
parent983044ccaf8b179f499ca600fddca518be393fa8 (diff)
downloadhammer-of-the-scots-e7209785dae10f912434881ee75ee433b8b1f98b.tar.gz
hammer: Add missing clear_undo calls.
-rw-r--r--rules.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/rules.js b/rules.js
index 7931757..6039fb6 100644
--- a/rules.js
+++ b/rules.js
@@ -1227,6 +1227,7 @@ states.pillage_builds = {
// if (game.pillage == 0) end_pillage(game.from);
},
end_pillage: function () {
+ clear_undo();
while (game.pillage > 0) {
--game.pillage;
game.turn_log.push([game.from]);
@@ -1799,6 +1800,7 @@ states.retreat = {
gen_action(view, 'end_retreat');
},
end_retreat: function () {
+ clear_undo();
for (let b in BLOCKS)
if (game.location[b] == game.where && block_owner(b) == game.active)
eliminate_block(b, 'retreat');
@@ -2711,6 +2713,7 @@ states.english_builds = {
++game.steps[who];
},
end_builds: function () {
+ clear_undo();
print_turn_log("builds");
game.rp = null;
goto_english_feudal_levy();