diff options
author | Tor Andersson <tor@ccxvii.net> | 2022-03-23 19:18:10 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-02-18 11:54:52 +0100 |
commit | ba8e77b1a3c8b40e53c3ec2b05bce25c83071ebe (patch) | |
tree | fabc28ae53c10b991eafd6088bd39a0575b7605f | |
parent | 86ab7f24be74b4c289924f5039a4fb5b46002c3f (diff) | |
download | wilderness-war-ba8e77b1a3c8b40e53c3ec2b05bce25c83071ebe.tar.gz |
Add checkpoint function
-rw-r--r-- | rules.js | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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); |