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:
2026-02-05 19:26:49 +01:00
parent c8d8e4b445
commit 9728773a94
19 changed files with 1077 additions and 38 deletions

View File

@@ -12,6 +12,7 @@ from app.models.pokemon import Pokemon
from app.models.route import Route
from app.models.route_encounter import RouteEncounter
from app.seeds.loader import (
upsert_evolutions,
upsert_games,
upsert_pokemon,
upsert_route_encounters,
@@ -75,6 +76,15 @@ async def seed():
print(f"\nTotal routes: {total_routes}")
print(f"Total encounters: {total_encounters}")
# 4. Upsert evolutions
evolutions_path = DATA_DIR / "evolutions.json"
if evolutions_path.exists():
evolutions_data = load_json("evolutions.json")
evo_count = await upsert_evolutions(session, evolutions_data, dex_to_id)
print(f"Evolutions: {evo_count} upserted")
else:
print("No evolutions.json found, skipping evolutions")
print("Seed complete!")