summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2025-03-20 21:34:52 +0100
committerTor Andersson <tor@ccxvii.net>2025-03-20 21:34:52 +0100
commitc734cbfa9fab6566c45c712f98df3734202573df (patch)
treeac5a46ee06b6c4e565627bf0aa6b07b5667674eb
parenta68c15ccf06f35f7c650f02417898270566f1328 (diff)
downloadland-and-freedom-c734cbfa9fab6566c45c712f98df3734202573df.tar.gz
don't generate "null" medallion action
it confuses the fuzzer
-rw-r--r--rules.js3
-rw-r--r--rules.ts3
2 files changed, 4 insertions, 2 deletions
diff --git a/rules.js b/rules.js
index 027681e..2e1b0b9 100644
--- a/rules.js
+++ b/rules.js
@@ -1075,7 +1075,8 @@ states.choose_medallion = {
gen_spend_hero_points();
view.prompt = 'Earn a Medallion.';
for (let m of game.medallions[POOL_ID]) {
- gen_action_medallion(m);
+ if (m !== null)
+ gen_action_medallion(m);
}
if (!game.medallions[POOL_ID].some((m) => m !== null)) {
gen_action('skip');
diff --git a/rules.ts b/rules.ts
index e043307..8fdf1b9 100644
--- a/rules.ts
+++ b/rules.ts
@@ -1360,7 +1360,8 @@ states.choose_medallion = {
gen_spend_hero_points();
view.prompt = 'Earn a Medallion.';
for (let m of game.medallions[POOL_ID]) {
- gen_action_medallion(m);
+ if (m !== null)
+ gen_action_medallion(m);
}
if (!game.medallions[POOL_ID].some((m) => m !== null)) {
gen_action('skip');