summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-08-02 15:44:42 +0200
committerTor Andersson <tor@ccxvii.net>2024-08-05 20:46:48 +0200
commit94986a6b0c821650f580a9731e35cb929eccf0b0 (patch)
tree3e477e22bf87d58ef3961a966241aa992703e34f
parent264cab9c76e61711168340d649c5876f756537d5 (diff)
downloadtime-of-crisis-94986a6b0c821650f580a9731e35cb929eccf0b0.tar.gz
v2: playtest option
-rw-r--r--create.html5
-rw-r--r--rules.js16
2 files changed, 21 insertions, 0 deletions
diff --git a/create.html b/create.html
index f1cc31b..b534c8e 100644
--- a/create.html
+++ b/create.html
@@ -12,6 +12,11 @@ Player count:
<p>
<label>
+<input type="checkbox" value="true" name="deluxe">Deluxe Edition Playtest
+</label>
+
+<p>
+<label>
<input type="checkbox" value="true" name="emperor">Optional Emperor Rules
</label>
diff --git a/rules.js b/rules.js
index 0a2f27d..31a364d 100644
--- a/rules.js
+++ b/rules.js
@@ -6,6 +6,8 @@ const states = {}
const AUTO_PLAY_EVENTS = true
+const DELUXE = 2
+
const P1 = "Red"
const P2 = "Blue"
const P3 = "Yellow"
@@ -463,6 +465,14 @@ function is_barbarian_leader(id) {
return id === CNIVA || id === ARDASHIR || id === SHAPUR
}
+function is_classic() {
+ return game.v !== DELUXE
+}
+
+function is_deluxe() {
+ return game.v === DELUXE
+}
+
// === BOARD STATE ===
const BIT_AMPHITHEATER = 1 << 7
@@ -5522,6 +5532,12 @@ exports.setup = function (seed, scenario, options) {
log_h1("Time of Crisis")
+ if (options.deluxe) {
+ log("Deluxe Edition PLAYTEST")
+ log_br()
+ game.v = DELUXE
+ }
+
if (options.emperor) {
log("Emperor Rules.")
log_br()