Add a `condition` column to RouteEncounter for time-of-day, weather, and season variants. Seed loader expands `conditions` dict into per-condition rows. EncounterModal shows condition filter tabs with per-condition encounter rates, and displays rates for all standard encounter methods (walk, surf, fishing, etc.). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1.9 KiB
1.9 KiB
title, status, type, priority, created_at, updated_at
| title | status | type | priority | created_at | updated_at |
|---|---|---|---|---|---|
| Improve encounter rate display for time/weather variants | in-progress | feature | normal | 2026-02-10T14:04:27Z | 2026-02-14T21:39:34Z |
Problem
PokeDB data reveals that encounter rates vary by context across many games:
- Gen 2/4 (G/S/C, HG/SS, D/P/Pt, BDSP): morning/day/night
- Gen 5 (B/W, B2/W2): spring/summer/autumn/winter
- Gen 8 (Sw/Sh): weather (clear, cloudy, rain, thunderstorm, snow, etc.)
- Gen 8 (Legends Arceus): time + weather boolean conditions
- Gen 9 (Sc/Vi): overworld probability weights
Currently the seed format and RouteEncounter model have a single encounter_rate field, which flattens all of this into one number.
Goal
Extend the data model and UI to support conditional encounter rates, so users can see which Pokemon appear under which conditions.
Design
Added a nullable condition column to RouteEncounter with a functional unique index using COALESCE(condition, '') to handle NULL uniqueness. Seed JSON supports an optional conditions dict that expands into per-condition DB rows.
Checklist
- Update seed JSON schema: add optional
conditionsfield to encounter entries - Add
conditioncolumn toRouteEncountermodel with migration - Update seed loader to handle
conditionsentries (expands dict into rows) - Update API serialization to include
conditionfield - Update export endpoint to include
conditionfield - Update frontend types (
RouteEncounter, admin input types) - Update AdminRouteDetail to display condition column (shown only when conditions exist)
- Update EncounterModal to show conditions contextually
- Update seed data for HeartGold Route 29 as proof of concept (morning/day/night)
- Keep simple display for games with flat rates (no regression)
- Update seed data for remaining games with variant encounters (incremental)