Add HoF team selection and genlocke retirement integration beans

The current retireHoF logic retires all alive Pokemon instead of just
the HoF team. Add beans to track the fix: a general HoF team selection
feature for all runs, and a follow-up task to integrate it into genlocke
retirement logic.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Julian Tabel
2026-02-09 10:16:13 +01:00
parent 48b56f9360
commit 89f46e2b12
4 changed files with 92 additions and 3 deletions

View File

@@ -0,0 +1,46 @@
---
# nuzlocke-tracker-xbxv
title: Hall of Fame team selection
status: todo
type: feature
priority: normal
created_at: 2026-02-09T09:14:44Z
updated_at: 2026-02-09T09:15:08Z
blocking:
- nuzlocke-tracker-25mh
- nuzlocke-tracker-h3fw
---
When a nuzlocke run is completed (status → completed), prompt the player to select which Pokemon were in their Hall of Fame team — the party of up to 6 that beat the Elite Four and Champion.
This is a general nuzlocke feature (not genlocke-specific) and provides value on its own:
- Interesting stats: which Pokemon enter the HoF most often across runs
- Run summary: display the HoF team prominently on the completed run page
- Foundation for genlocke retireHoF logic (only retire HoF team, not all alive Pokemon)
## Behavior
- After marking a run as completed, show a modal/step asking the player to pick their HoF team from all alive Pokemon
- Max 6 Pokemon can be selected
- Store the selection as a list of encounter IDs on the run (or a join table)
- The HoF team should be displayed prominently on the completed run page (e.g. in the victory banner)
- Selection is optional — if skipped, all alive Pokemon are assumed to be in the HoF (backwards-compatible)
## Backend
- Add `hof_team` JSONB column (array of encounter IDs) to `nuzlocke_runs`, or a `hof_encounters` join table
- New endpoint or extend `PATCH /runs/{id}` to accept HoF team selection
- Include HoF team data in `GET /runs/{id}` response
## Frontend
- After the EndRunModal confirms "completed", show a HoF team selection step
- Display alive Pokemon as selectable cards (max 6)
- Show the selected HoF team in the victory banner on the completed run page
- Allow editing the HoF team after the fact (in case the player forgot or made a mistake)
## Checklist
- [ ] Add `hof_encounter_ids` JSONB column to `nuzlocke_runs` (nullable array of ints)
- [ ] Migration for the new column
- [ ] Update `RunResponse` / `RunDetailResponse` schemas to include `hofEncounterIds`
- [ ] Extend `PATCH /runs/{id}` to accept `hofEncounterIds` (validate they belong to the run and are alive)
- [ ] Build HoF team selection modal (shown after completing a run)
- [ ] Display HoF team in the victory banner on completed run pages
- [ ] Allow editing HoF team selection on completed runs