When enabled, in-game gift Pokemon (starters, trades, fossils) do not count against a location's encounter limit. Both a gift encounter and a regular encounter can coexist on the same route, in any order. Persists encounter origin on the Encounter model so the backend can exclude gift encounters from route-lock checks bidirectionally, and the frontend can split them into a separate display layer that doesn't lock the route for regular encounters. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
51 lines
1.1 KiB
Python
51 lines
1.1 KiB
Python
from datetime import datetime
|
|
|
|
from app.schemas.base import CamelModel
|
|
from app.schemas.game import RouteResponse
|
|
from app.schemas.pokemon import PokemonResponse
|
|
|
|
|
|
class EncounterCreate(CamelModel):
|
|
route_id: int
|
|
pokemon_id: int
|
|
nickname: str | None = None
|
|
status: str
|
|
catch_level: int | None = None
|
|
is_shiny: bool = False
|
|
origin: str | None = None
|
|
|
|
|
|
class EncounterUpdate(CamelModel):
|
|
nickname: str | None = None
|
|
status: str | None = None
|
|
faint_level: int | None = None
|
|
death_cause: str | None = None
|
|
current_pokemon_id: int | None = None
|
|
|
|
|
|
class EncounterResponse(CamelModel):
|
|
id: int
|
|
run_id: int
|
|
route_id: int
|
|
pokemon_id: int
|
|
current_pokemon_id: int | None
|
|
nickname: str | None
|
|
status: str
|
|
catch_level: int | None
|
|
faint_level: int | None
|
|
death_cause: str | None
|
|
is_shiny: bool
|
|
origin: str | None
|
|
caught_at: datetime
|
|
|
|
|
|
class EncounterDetailResponse(EncounterResponse):
|
|
pokemon: PokemonResponse
|
|
current_pokemon: PokemonResponse | None
|
|
route: RouteResponse
|
|
|
|
|
|
class BulkRandomizeResponse(CamelModel):
|
|
created: list[EncounterResponse]
|
|
skipped_routes: int
|