Files
nuzlocke-tracker/.beans/nuzlocke-tracker-h3fw--use-hof-team-for-genlocke-retirement-instead-of-al.md
Julian Tabel 89f46e2b12 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>
2026-02-09 10:16:13 +01:00

1.6 KiB

title, status, type, priority, created_at, updated_at, parent, blocking
title status type priority created_at updated_at parent blocking
Use HoF team for genlocke retirement instead of all alive Pokemon todo task normal 2026-02-09T09:15:00Z 2026-02-09T09:15:03Z nuzlocke-tracker-8w9s
nuzlocke-tracker-25mh

The current retireHoF implementation in advance_leg() retires ALL alive, non-shiny, caught Pokemon from the completed run. This is incorrect — only the Hall of Fame team (up to 6 Pokemon selected by the player) should be retired.

Current behavior

# genlockes.py — retires everything alive
select(Encounter.pokemon_id).where(
    Encounter.run_id == current_leg.run_id,
    Encounter.status == "caught",
    Encounter.faint_level.is_(None),
    Encounter.is_shiny.is_(False),
)

Desired behavior

  • If the run has hof_encounter_ids set, use those encounter IDs to determine which Pokemon to retire
  • If hof_encounter_ids is not set (legacy/skipped), fall back to the current "all alive" behavior for backwards compatibility
  • Only the HoF team members and their evolutionary families get added to the retired list

Changes needed

  • Update advance_leg() in backend/src/app/api/genlockes.py to check current_run.hof_encounter_ids first
  • If present, query only those encounters for retirement
  • If absent, keep the current fallback query
  • Update the frontend RunEncounters.tsx to also scope retiredPokemonIds correctly (no change needed — it reads from the backend response)

Checklist

  • Update advance_leg() to prefer hof_encounter_ids over all-alive query
  • Verify backwards compatibility when hof_encounter_ids is null