Restrict transfers to HoF team and prevent blocking starter route

Transfer modal now only appears when a Hall of Fame team is selected,
using the existing hofTeam data instead of the survivors endpoint.
Without a HoF selection, advance proceeds directly with no transfer step.

Transferred encounters are now a separate category: they appear in their
own "Transferred Pokemon" section, don't occupy route slots in the
encounter map, and don't block the route-lock check (excluded via
genlocke_transfers subquery). The run detail endpoint returns
transferEncounterIds so the frontend can distinguish them.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Julian Tabel
2026-02-09 11:35:05 +01:00
parent e1dac10d27
commit c2e946f500
6 changed files with 115 additions and 65 deletions

View File

@@ -105,8 +105,19 @@ async def get_run(run_id: int, session: AsyncSession = Depends(get_session)):
retired_pokemon_ids=retired_pokemon_ids,
)
# Load transfer-target encounter IDs for this run
transfer_ids_result = await session.execute(
select(GenlockeTransfer.target_encounter_id).where(
GenlockeTransfer.target_encounter_id.in_(
select(Encounter.id).where(Encounter.run_id == run_id)
)
)
)
transfer_encounter_ids = [row[0] for row in transfer_ids_result]
response = RunDetailResponse.model_validate(run)
response.genlocke = genlocke_context
response.transfer_encounter_ids = transfer_encounter_ids
return response