From e7209785dae10f912434881ee75ee433b8b1f98b Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 25 Jun 2021 17:48:10 +0200 Subject: hammer: Add missing clear_undo calls. --- rules.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'rules.js') 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(); -- cgit v1.2.3