From ba8e77b1a3c8b40e53c3ec2b05bce25c83071ebe Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 23 Mar 2022 19:18:10 +0100 Subject: Add checkpoint function --- rules.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/rules.js b/rules.js index 9b396fe..ee5d6bc 100644 --- a/rules.js +++ b/rules.js @@ -9026,6 +9026,13 @@ exports.query = function (state, current, q) { return null; } +exports.is_checkpoint = function (a, b) { + let x = b.log[b.log.length-2]; + if (x === ".h2 Britain") return true; + if (x === ".h2 France") return true; + return false; +} + exports.view = function(state, current) { load_game_state(state); -- cgit v1.2.3