summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-11-24 12:54:52 +0100
committerTor Andersson <tor@ccxvii.net>2024-11-24 12:54:52 +0100
commitd1b2688513bf616dbbf98924a10fb0c08913ea14 (patch)
treee9df163342782c94f81a3c4d0ed07c10f710ef6f
parentc8a4d0daa43e26b492b3d1e1bae47da1bf6655b4 (diff)
downloadjulius-caesar-d1b2688513bf616dbbf98924a10fb0c08913ea14.tar.gz
Add dont_snap callback to prevent extra snapshots during card selection.
-rw-r--r--rules.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/rules.js b/rules.js
index 8eebf44..2dee9bc 100644
--- a/rules.js
+++ b/rules.js
@@ -2802,6 +2802,14 @@ function observer_hand() {
return hand
}
+exports.dont_snap = function(state) {
+ if (state.state === "play_card" && state.active !== BOTH)
+ return true
+ if (state.state === "discard_and_play_card" && state.active !== BOTH)
+ return true
+ return false
+}
+
exports.view = function(state, current) {
game = state