diff --git a/.gitignore b/.gitignore index 95e2501..5810435 100644 --- a/.gitignore +++ b/.gitignore @@ -4,5 +4,3 @@ Thumbs.db *.log .env assets/sprites/ -oras/assets/sprites/ -luminescent-platinum/assets/sprites/ diff --git a/Dockerfile b/Dockerfile index 3f95599..784889a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,10 +6,16 @@ COPY index.html /usr/share/nginx/html/index.html COPY assets/ /usr/share/nginx/html/assets/ COPY oras/index.html /usr/share/nginx/html/oras/index.html COPY oras/favicon.svg /usr/share/nginx/html/oras/favicon.svg +COPY oras/assets/ /usr/share/nginx/html/oras/assets/ COPY oras/src/ /usr/share/nginx/html/oras/src/ COPY luminescent-platinum/index.html /usr/share/nginx/html/luminescent-platinum/index.html COPY luminescent-platinum/favicon.svg /usr/share/nginx/html/luminescent-platinum/favicon.svg +COPY luminescent-platinum/assets/ /usr/share/nginx/html/luminescent-platinum/assets/ COPY luminescent-platinum/src/ /usr/share/nginx/html/luminescent-platinum/src/ +COPY legends-arceus/index.html /usr/share/nginx/html/legends-arceus/index.html +COPY legends-arceus/favicon.svg /usr/share/nginx/html/legends-arceus/favicon.svg +COPY legends-arceus/assets/ /usr/share/nginx/html/legends-arceus/assets/ +COPY legends-arceus/src/ /usr/share/nginx/html/legends-arceus/src/ EXPOSE 28473 diff --git a/README.md b/README.md index 047a52d..724591c 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,14 @@ A dedicated tracker tailored to the **Nintendo Switch · BDSP Mod (Luminescent P - **Route Trainers & `[Team 1–4]` Boss Variants:** Collapsible battle cards covering regular trainers, Rivals (`Barry`, `Dawn`, `Lucas`, `Cedric`), Team Galactic raids, Johto Time Portals, Type Masters, and randomized `[Team 1–4]` boss lineups with variant filtering. - **Luminescent Base Stats & Movedex:** Sortable Pokédex plus full inspector modal with Luminescent v2.1 stats, custom abilities, Regular & Shiny sprites, full learnsets, and external Pokédex links. +### 3. Pokémon Legends: Arceus (`/legends-arceus/`) +A complete **Nintendo Switch · Gen VIII · Hisui** Professor Oak Challenge & Research Lv. 10 tracker organized by **Noble Pokémon & Ride Mount Checkpoints**: + +- **Hisui Pokédex (`240` + Optional `+2` Save-Data Mythicals = `242`):** Spans **6 Noble & Progression Sections** (`Pre-Kleavor` -> `Pre-Lilligant` -> `Pre-Arcanine` -> `Pre-Electrode` -> `Pre-Avalugg` -> `Climax & Post-Game Arceus`) with earliest-section evolutions and Space-Time Distortion milestones. +- **Dual Caught & Research Lv. 10 (`RL10`) Sync:** Check off both **Caught** and **`Lv10`** across Routes, Pokédex, and Modals, and toggle progress bars & filters between **Caught Only** and **Research Lv. 10** (accurately shifting `#142 Unown` RL10 to Section 5 once all `28/28` forms are reachable with Braviary). +- **Optional Satchel MP Shop Toggle:** Enable **Satchel MP Shop** in the header to move Trading Post items (`Golem`, `Machamp`, `Scizor`, `Glaceon`) into **Section 1 Pre-Kleavor**, or leave it off for Sparkling Ore, Graveler (`8% Black Augurite`), and Section 2 Distortion timing. +- **Research Tasks, Mastery Movedex & Story Trainers:** Every entry includes its Serebii Research Tasks table (highlighting `2×` boost tasks), Hisui Base Stats, Level-Up + Mastery Lv. & Move Shop learnsets, and collapsible Noble / Warden / Bandit / Volo battle drawers. + --- ## Core Site Features @@ -45,6 +53,8 @@ A dedicated tracker tailored to the **Nintendo Switch · BDSP Mod (Luminescent P ├── assets/ # Hub styles & save-badge preview script ├── oras/ # Alpha Sapphire & Omega Ruby tracker (/oras/) ├── luminescent-platinum/ # Luminescent Platinum v2.1 tracker (/luminescent-platinum/) +├── legends-arceus/ # Pokémon Legends: Arceus tracker (/legends-arceus/) +├── scripts/ # Offline sprite cache & Gitea/Unraid automation scripts ├── tests/ # Hub server & packaging tests ├── docker/nginx.conf # Nginx static server configuration ├── Dockerfile # Lightweight Nginx container build @@ -77,14 +87,17 @@ A dedicated tracker tailored to the **Nintendo Switch · BDSP Mod (Luminescent P Requires **Node.js 20+** for local development/testing: ```bash -# Run all test suites (Hub + ORAS + Luminescent Platinum) +# Run all test suites (Hub + ORAS + Luminescent Platinum + Legends: Arceus) npm test # Start unified local server on http://127.0.0.1:4173 npm start + +# Refresh or verify the bundled local sprite caches in /assets/sprites/ +npm run download-sprites ``` -Or run as a self-contained static container (`nginx:1.27-alpine`, serving on port `28473`): +Or run as a self-contained static container (`nginx:1.27-alpine`, serving on port `28473`, with all Pokémon and item sprites bundled locally inside the image): ```bash docker compose up -d --build @@ -94,8 +107,13 @@ Behind a reverse proxy, point your host/subdomain to container port `28473` over --- -## Data Sources & Credits +## Data Sources, Sprites & Credits -- **Team Luminescent:** Pokémon Luminescent Platinum v2.0/v2.1 Pokédex data, encounter tables, trainer teams, move learnsets, and sprites. -- **Serebii.net:** Pokémon ORAS Pokéarth encounter data and Gen VI `pokedex-xy` base stats & abilities. -- **PokeAPI:** Gen VI Pokémon/item sprites and ORAS learnset tables. +All Pokémon & item sprites are bundled locally inside `*/assets/sprites/` courtesy of the open-source communities below so the site runs self-contained without depending on external image hosts at runtime: + +- **Sprites courtesy of [PokeAPI/sprites](https://github.com/PokeAPI/sprites):** Bundled Gen VI Omega Ruby & Alpha Sapphire sprites/items (`oras/assets/sprites/`) and Pokémon HOME / Hisui sprites & items (`legends-arceus/assets/sprites/`, plus Poké Ball fallback icon). +- **Sprites & mod data courtesy of [Team Luminescent (`TeamLumi/luminescent-team`)](https://github.com/TeamLumi/luminescent-team):** Bundled BDSP-style regular, shiny, item, rock, and incense sprites (`luminescent-platinum/assets/sprites/`), plus Luminescent Platinum v2.0/v2.1 Pokédex, encounter tables, trainer teams, and learnsets. +- **Encounter, trainer & Pokédex data courtesy of [Serebii.net](https://www.serebii.net):** ORAS Pokéarth encounters & Gen VI `pokedex-xy` stats/abilities, and Pokémon Legends: Arceus Pokéarth Hisui subareas, Distortions, Research Tasks, Noble/Warden/Miss Fortune/Volo battles, Requests, and Hisuian stats. +- **Learnset & stat tables courtesy of [PokéAPI (`PokeAPI/pokeapi`)](https://github.com/PokeAPI/pokeapi):** Structured ORAS (`Gen VI`) and Legends: Arceus (`version_group_id=24`) Level-Up / Mastery / Move Shop move tables. + +> *Pokémon and all related names, characters, and artwork are trademarks of Nintendo, Creatures Inc., and GAME FREAK inc. This is a non-commercial fan-made challenge tracker and is not affiliated with or endorsed by them.* diff --git a/assets/landing.css b/assets/landing.css index e818a94..7e06345 100644 --- a/assets/landing.css +++ b/assets/landing.css @@ -69,7 +69,7 @@ body { .cards-grid { display: grid; - grid-template-columns: repeat(2, minmax(0, 1fr)); + grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 20px; } @@ -109,6 +109,14 @@ body { border-color: rgba(56, 189, 248, 0.55); } +.card-pla { + border-top: 3px solid #eab308; +} + +.card-pla:hover { + border-color: rgba(234, 179, 8, 0.55); +} + .card-top { display: flex; justify-content: space-between; @@ -149,6 +157,12 @@ body { color: #7dd3fc; } +.badge-hisui { + background: rgba(234, 179, 8, 0.16); + border: 1px solid rgba(234, 179, 8, 0.45); + color: #fde047; +} + .platform-badge { background: var(--bg-elevated); border: 1px solid var(--border); @@ -234,6 +248,10 @@ body { background: linear-gradient(135deg, #0284c7, #0369a1); } +.btn-pla { + background: linear-gradient(135deg, #d97706, #b45309); +} + .hub-footer { margin-top: 28px; padding: 14px 18px; diff --git a/assets/landing.js b/assets/landing.js index cae30c0..f7c1ba5 100644 --- a/assets/landing.js +++ b/assets/landing.js @@ -4,7 +4,7 @@ function readSaveSummary(storage, prefix, defaultGameId, gameLabels) { const rawMeta = storage.getItem(`${prefix}app-meta`); const meta = rawMeta ? JSON.parse(rawMeta) : null; const gameId = meta?.activeGameId || defaultGameId; - const gameMeta = meta?.gameProfiles?.[gameId]; + const gameMeta = meta?.gameProfiles?.[gameId] || meta?.profilesByGame?.[gameId]; const profileId = gameMeta?.activeProfileId || 'default'; const profileName = gameMeta?.profiles?.find((p) => p.id === profileId)?.name || 'Default'; @@ -14,12 +14,16 @@ function readSaveSummary(storage, prefix, defaultGameId, gameLabels) { if (!rawSave) return null; const parsed = JSON.parse(rawSave); const caughtCount = Array.isArray(parsed?.caught) ? parsed.caught.length : 0; + const rl10Count = Array.isArray(parsed?.rl10) ? parsed.rl10.length : null; + const progressMode = parsed?.progressMode || 'caught'; const gameLabel = gameLabels[gameId] || gameId; return { gameLabel, profileName, profileCount, caughtCount, + rl10Count, + progressMode, }; } catch { return null; @@ -53,6 +57,20 @@ export function renderSavePills(doc = globalThis.document, storage = globalThis. lumiEl.textContent = 'Ready for a new run'; } } + + const plaEl = doc?.getElementById('pla-save-badge'); + if (plaEl) { + const info = readSaveSummary(storage, 'pla-poc-tracker:v1:', 'legends-arceus', { + 'legends-arceus': 'Legends: Arceus', + }); + if (info) { + const rl10Text = Number.isInteger(info.rl10Count) ? ` · ${info.rl10Count} RL10` : ''; + plaEl.textContent = `Saved (${info.profileName}): ${info.caughtCount} caught${rl10Text}`; + plaEl.classList.add('has-save'); + } else { + plaEl.textContent = 'Ready for a new run'; + } + } } if (typeof globalThis.document !== 'undefined') { diff --git a/docker/nginx.conf b/docker/nginx.conf index 4f5e062..7e2be9d 100644 --- a/docker/nginx.conf +++ b/docker/nginx.conf @@ -35,13 +35,24 @@ server { location = /luminescent-platinum { return 301 /luminescent-platinum/; } + location = /legends-arceus { + return 301 /legends-arceus/; + } - # Asset-status probe endpoints (returns false unless bind-mounted offline sprite check overrides) + # Asset-status probe endpoints (serves .ready.json if local sprites are bind-mounted/bundled, otherwise false) location = /oras/api/assets-status { default_type application/json; - return 200 '{"hasLocalSprites":false}'; + try_files /oras/assets/sprites/.ready.json @assets_unavailable; } location = /luminescent-platinum/api/assets-status { + default_type application/json; + try_files /luminescent-platinum/assets/sprites/.ready.json @assets_unavailable; + } + location = /legends-arceus/api/assets-status { + default_type application/json; + try_files /legends-arceus/assets/sprites/.ready.json @assets_unavailable; + } + location @assets_unavailable { default_type application/json; return 200 '{"hasLocalSprites":false}'; } @@ -51,6 +62,12 @@ server { try_files $uri =404; } + location ~* \.(?:png|webp|svg|ico)$ { + expires 7d; + add_header Cache-Control "public, max-age=604800"; + try_files $uri =404; + } + location / { try_files $uri $uri/ =404; } diff --git a/index.html b/index.html index 3753189..b4444dd 100644 --- a/index.html +++ b/index.html @@ -27,14 +27,14 @@