Add pokemon evolution support across the full stack
- Evolution model with trigger, level, item, and condition fields
- Encounter.current_pokemon_id tracks evolved species separately
- Alembic migration for evolutions table and current_pokemon_id column
- Seed pipeline loads evolution data with manual overrides
- GET /pokemon/{id}/evolutions and PATCH /encounters/{id} endpoints
- Evolve button in StatusChangeModal with evolution method details
- PokemonCard shows evolved species with "Originally" label
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,24 +1,29 @@
|
||||
import { api } from './client'
|
||||
import type {
|
||||
Encounter,
|
||||
EncounterDetail,
|
||||
CreateEncounterInput,
|
||||
UpdateEncounterInput,
|
||||
Evolution,
|
||||
} from '../types/game'
|
||||
|
||||
export function createEncounter(
|
||||
runId: number,
|
||||
data: CreateEncounterInput,
|
||||
): Promise<Encounter> {
|
||||
): Promise<EncounterDetail> {
|
||||
return api.post(`/runs/${runId}/encounters`, data)
|
||||
}
|
||||
|
||||
export function updateEncounter(
|
||||
id: number,
|
||||
data: UpdateEncounterInput,
|
||||
): Promise<Encounter> {
|
||||
): Promise<EncounterDetail> {
|
||||
return api.patch(`/encounters/${id}`, data)
|
||||
}
|
||||
|
||||
export function deleteEncounter(id: number): Promise<void> {
|
||||
return api.del(`/encounters/${id}`)
|
||||
}
|
||||
|
||||
export function fetchEvolutions(pokemonId: number): Promise<Evolution[]> {
|
||||
return api.get(`/pokemon/${pokemonId}/evolutions`)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user