From 7c8dd807daf50f68c57b29e363042ca65a5b0a39 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 13 Jun 2026 20:17:47 -0400 Subject: [PATCH] Fix bestiary BP tier selection --- site/bestiary-tables.js | 6 +++++- site/bestiary.html | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/site/bestiary-tables.js b/site/bestiary-tables.js index 79a0906..036f93f 100644 --- a/site/bestiary-tables.js +++ b/site/bestiary-tables.js @@ -148,7 +148,11 @@ } function bpTier() { - const tier = Number(qs("#bestiary-tier")?.value || 0); + const select = qs("#bestiary-tier"); + const raw = String(select?.value || ""); + const label = String(select?.selectedOptions?.[0]?.textContent || ""); + const match = raw.match(/(\d+)$/) || label.match(/(\d+)/); + const tier = match ? Number(match[1]) : 0; return BP_TIERS[tier] || BP_TIERS[0]; } diff --git a/site/bestiary.html b/site/bestiary.html index e7bffb5..9ee85a4 100644 --- a/site/bestiary.html +++ b/site/bestiary.html @@ -113,6 +113,6 @@ - +