summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2022-03-23 19:18:10 +0100
committerTor Andersson <tor@ccxvii.net>2023-02-18 11:54:52 +0100
commitba8e77b1a3c8b40e53c3ec2b05bce25c83071ebe (patch)
treefabc28ae53c10b991eafd6088bd39a0575b7605f
parent86ab7f24be74b4c289924f5039a4fb5b46002c3f (diff)
downloadwilderness-war-ba8e77b1a3c8b40e53c3ec2b05bce25c83071ebe.tar.gz
Add checkpoint function
-rw-r--r--rules.js7
1 files changed, 7 insertions, 0 deletions
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);