From b9e0cccfe1c7f519a8ead931a880c9f96e2bf43d Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 13 Jun 2026 20:38:26 -0400 Subject: [PATCH] Hide zero-value bestiary rows --- site/bestiary-tables.js | 6 ++++++ site/bestiary.html | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/site/bestiary-tables.js b/site/bestiary-tables.js index 48ab514..601a1e8 100644 --- a/site/bestiary-tables.js +++ b/site/bestiary-tables.js @@ -188,10 +188,16 @@ return value ?? ""; } + function hasAnyBestiaryValue(row) { + const keys = ["hp", "atp", "dfp", "mst", "ata", "evp", "lck", "esp", "exp", "efr", "eic", "eth", "elt", "edk"]; + return keys.some((key) => Number(row[key] || 0) !== 0); + } + function visibleRows() { const search = state.filters.search.trim().toLowerCase(); return state.rows.filter((row) => { + if (!hasAnyBestiaryValue(row)) return false; if (state.filters.mode && row.mode !== state.filters.mode) return false; if (state.filters.episode && row.episode !== state.filters.episode) return false; if (state.filters.difficulty && row.difficulty !== state.filters.difficulty) return false; diff --git a/site/bestiary.html b/site/bestiary.html index c29ce03..df684e6 100644 --- a/site/bestiary.html +++ b/site/bestiary.html @@ -114,6 +114,6 @@ - +