summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
authorJoël Simoneau <simoneaujoel@gmail.com>2025-04-10 07:03:33 -0400
committerJoël Simoneau <simoneaujoel@gmail.com>2025-04-10 07:03:33 -0400
commit04010047f10ea944402698f831013c27f1c3e57d (patch)
tree420fd4b43fef57efba5dac29f857278e73aa2043 /rules.js
parent4bb7493219f559ac7ef26963e9f9be333f73bc0e (diff)
downloadvijayanagara-04010047f10ea944402698f831013c27f1c3e57d.tar.gz
patch discard
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/rules.js b/rules.js
index 8ac2e91..e1dbe25 100644
--- a/rules.js
+++ b/rules.js
@@ -252,7 +252,7 @@ exports.setup = function (seed, scenario, _options) {
cavalry: Array(10).fill(AVAILABLE),
deck: [],
of_gods_and_kings: [null, null, 0],
- discard: [],
+ // discard: [],
order: [],
cmd: {
type: null,
@@ -411,6 +411,10 @@ function end_card() {
}
function update_discard() {
+ if ("discard" in game === false) {
+ game.discard = []
+ }
+
if (this_card() === 45)
game.discard = [45]
else if (this_card() === 46)