Add genlocke leg progression with advance endpoint and run context
When a run belonging to a genlocke is completed or failed, the genlocke status updates accordingly. The run detail API now includes genlocke context (leg order, total legs, genlocke name). A new advance endpoint creates the next leg's run, and the frontend shows genlocke-aware UI including a "Leg X of Y" banner, advance button, and contextual messaging in the end-run modal. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -37,7 +37,7 @@ from app.schemas.pokemon import (
|
||||
RouteEncounterResponse,
|
||||
RouteEncounterUpdate,
|
||||
)
|
||||
from app.schemas.run import RunCreate, RunDetailResponse, RunResponse, RunUpdate
|
||||
from app.schemas.run import RunCreate, RunDetailResponse, RunGenlockeContext, RunResponse, RunUpdate
|
||||
|
||||
__all__ = [
|
||||
"BossBattleCreate",
|
||||
@@ -75,6 +75,7 @@ __all__ = [
|
||||
"RouteUpdate",
|
||||
"RunCreate",
|
||||
"RunDetailResponse",
|
||||
"RunGenlockeContext",
|
||||
"RunResponse",
|
||||
"RunUpdate",
|
||||
]
|
||||
|
||||
@@ -27,6 +27,15 @@ class RunResponse(CamelModel):
|
||||
completed_at: datetime | None
|
||||
|
||||
|
||||
class RunGenlockeContext(CamelModel):
|
||||
genlocke_id: int
|
||||
genlocke_name: str
|
||||
leg_order: int
|
||||
total_legs: int
|
||||
is_final_leg: bool
|
||||
|
||||
|
||||
class RunDetailResponse(RunResponse):
|
||||
game: GameResponse
|
||||
encounters: list[EncounterDetailResponse] = []
|
||||
genlocke: RunGenlockeContext | None = None
|
||||
|
||||
Reference in New Issue
Block a user