Files
nuzlocke-tracker/.beans/nuzlocke-tracker-rkyc--shiny-clause-dupes-clause-multi-encounter-per-rout.md
Julian Tabel 6d77fb731e Use type PNG badges instead of colored text spans
Replace inline typeColors maps in PokemonCard and StatusChangeModal
with a shared TypeBadge component that renders the type icon PNGs
from /types/{type}.png.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 21:12:45 +01:00

52 lines
2.7 KiB
Markdown

---
# nuzlocke-tracker-rkyc
title: Dupes Clause & Shiny Clause enforcement
status: completed
type: feature
priority: low
created_at: 2026-02-05T12:25:19Z
updated_at: 2026-02-07T20:11:59Z
---
Implement active enforcement for Dupes Clause and Shiny Clause in the encounter flow.
## Dupes Clause
When enabled, Pokemon from an already-caught evolution chain are **greyed out** in the encounter modal. This prevents catching duplicates within the same evolutionary family.
- If you catch a Rattata, both Rattata and Raticate become unavailable
- If you catch an Eevee (or any Eeveelution), the entire Eevee family is blocked
- "Already caught" includes both alive and dead Pokemon from the current run
- Greyed-out Pokemon should still be visible in the encounter list but clearly marked as ineligible (reduced opacity, strikethrough, or similar)
- This requires knowing the full evolution chain for each Pokemon — use the existing evolution data to build family groups
### Implementation notes
- Build a lookup from pokemon_id → set of all pokemon in the same evolution family (walk the evolution tree in both directions)
- On the encounter modal, cross-reference available route Pokemon against caught families
- Grey out / mark as "duped" any Pokemon whose family already has a catch in the current run
- Backend validation is optional (frontend-only is fine since this is a self-enforced rule)
## Shiny Clause
When enabled, shiny Pokemon may be caught regardless of the first-encounter-only rule. Rather than allowing multiple regular encounters per route, add a **dedicated Shiny Box** container.
- Add a "Shiny Box" section on the run page (separate from the team/graveyard)
- Shiny catches are not tied to a route — they're bonus catches stored in the shiny container
- Shiny Box entries need: pokemon, nickname, catch level, and the route where found
- Shinies in the box do NOT count against the one-encounter-per-route rule
- The shiny box should be visually distinct (sparkle icon, gold/yellow accent)
### Implementation notes
- Add an `is_shiny` boolean field to the Encounter model (or a separate shiny encounters table)
- Shiny encounters bypass the route-lock check on the backend
- Frontend: add a "Log Shiny" button or a shiny toggle in the encounter modal
- Display shiny box as a collapsible section similar to the graveyard
## Checklist
- [ ] Build evolution family lookup (pokemon_id → family set)
- [ ] Grey out duped Pokemon in encounter modal when dupes clause is active
- [ ] Add `is_shiny` field to encounter model + migration
- [ ] Backend: allow shiny encounters to bypass route lock
- [ ] Frontend: shiny toggle/button in encounter flow
- [ ] Frontend: shiny box section on run page
- [ ] Test with evolution chains (Eevee family, branching evolutions)