Genlockes can now select a naming scheme at creation time, which is automatically applied to every leg's run. When catching a pokemon whose evolution family appeared in a previous leg, the system suggests the original nickname with a roman numeral suffix (e.g., "Heracles II"). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
4.0 KiB
4.0 KiB
title, status, type, priority, created_at, updated_at
| title | status | type | priority | created_at | updated_at |
|---|---|---|---|---|---|
| Enable naming generator for Genlockes | in-progress | task | normal | 2026-02-11T21:14:21Z | 2026-02-14T08:37:11Z |
Overview
Genlockes are multiple nuzlocke runs played back-to-back. Currently, naming scheme selection is only available per-run, meaning genlocke runs don't get naming schemes at all (they're created automatically during genlocke creation and leg advancement). This task adds genlocke-level naming scheme selection and lineage-aware name suggestions.
Key Behaviors
1. Genlocke-Level Naming Scheme
- When creating a genlocke, the user selects a naming scheme (same categories as standalone runs)
- This scheme is stored on the
Genlockemodel and automatically applied to every leg'sNuzlockeRun - Both the initial run (created in
create_genlocke) and subsequent runs (created inadvance_leg) inherit the genlocke's naming scheme
2. Name Suggestions (Current Leg Only)
- Duplicate name checking stays scoped to the current run (already the case)
- Transferred pokemon carry their nicknames forward, so they naturally occupy names in the current run's used-name set
3. Lineage-Aware Name Suggestions (Roman Numerals)
- When catching a pokemon in a genlocke leg (leg 2+), the system checks if any pokemon from the same evolution family was caught in a previous leg
- If so, the original nickname is suggested with a roman numeral suffix (e.g., "Heracles II", "Heracles III")
- The numeral represents the Nth distinct leg where this evolution family was originally caught (not transferred)
- Leg 1: Magikarp → "Heracles" (no numeral, first appearance)
- Leg 2: Magikarp or Gyarados caught → suggest "Heracles II"
- Leg 3: Magikarp caught again → suggest "Heracles III"
- Transferred pokemon don't count as new appearances (they're the same individual)
- The "base name" is taken from the first original encounter of that family across all legs
- The lineage suggestion appears as a priority suggestion alongside regular naming scheme suggestions
- The user can always choose a different name
4. How the API Changes
GET /runs/{run_id}/name-suggestionsgains an optionalpokemon_idquery param- When
pokemon_idis provided AND the run belongs to a genlocke:- Determine the pokemon's evolution family
- Query previous legs' encounters (excluding transfer-target encounters) for matching family members
- If matches found: compute the roman numeral and prepend "{base_name} {numeral}" to the suggestions list
- Regular naming scheme suggestions are returned as before
Checklist
Backend
- Add
naming_schemecolumn togenlockestable (Alembic migration) - Update
Genlockemodel withnaming_scheme: Mapped[str | None] - Update
GenlockeCreateschema to accept optionalnaming_scheme: str | None - Update
GenlockeResponseandGenlockeDetailResponseto includenaming_scheme - Update
create_genlockeendpoint: passnaming_schemeto the first leg'sNuzlockeRun - Update
advance_legendpoint: pass the genlocke'snaming_schemeto the new leg'sNuzlockeRun - Add roman numeral helper function (e.g., in
services/naming.py) - Update
get_name_suggestionsendpoint to accept optionalpokemon_idparam - Implement lineage lookup: when in genlocke context with
pokemon_id, query prior legs for evolution family matches (excluding transfers) and compute suggestion with roman numeral - Add tests for lineage-aware name suggestions
Frontend
- Update
CreateGenlockeInputtype to includenamingScheme?: string | null - Add naming scheme selector to genlocke creation wizard (in the Rules step or as a new step)
- Update
GenlockeResponse/GenlockeDetailResponsetypes to includenamingScheme - Update
EncounterModalto pass selectedpokemonIdto name suggestions API when in genlocke context - Update
getNameSuggestionsAPI client to accept optionalpokemonIdparam - Display lineage suggestion prominently in the suggestions UI (e.g., first pill with distinct styling)