Auto-select boss team variant based on starter choice
When a run has a starter Pokemon, automatically match its species name against boss battle condition labels (e.g., "charmander" matches "Chose Charmander"). If exactly one variant matches, pre-select it and hide the pill selector. Falls back to showing pills when no match is found. Fixes starter lookup to use game routes data (which has encounterMethods populated) instead of the run detail route (which defaults to empty). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
---
|
||||
# nuzlocke-tracker-66hg
|
||||
title: Auto-select boss team variant based on starter choice
|
||||
status: draft
|
||||
status: in-progress
|
||||
type: feature
|
||||
priority: normal
|
||||
created_at: 2026-02-08T20:21:40Z
|
||||
updated_at: 2026-02-08T20:21:40Z
|
||||
updated_at: 2026-02-08T20:22:47Z
|
||||
---
|
||||
|
||||
When a run's starter Pokemon is known, automatically match it against boss battle condition labels (e.g., "Chose Bulbasaur") and pre-select the matching variant instead of showing the pill selector.
|
||||
@@ -28,9 +29,9 @@ Currently, bosses with variant teams (condition_label) display a pill selector o
|
||||
|
||||
## Checklist
|
||||
|
||||
- [ ] Determine how the starter Pokemon is stored/accessible from the run data
|
||||
- [ ] Add matching logic to find the right variant from condition labels
|
||||
- [ ] Update BossDefeatModal to auto-select and hide pills when starter matches
|
||||
- [ ] Update BossTeamPreview in RunEncounters with same logic
|
||||
- [x] Determine how the starter Pokemon is stored/accessible from the run data
|
||||
- [x] Add matching logic to find the right variant from condition labels
|
||||
- [x] Update BossDefeatModal to auto-select and hide pills when starter matches
|
||||
- [x] Update BossTeamPreview in RunEncounters with same logic
|
||||
- [ ] Test with variant bosses where starter matches a condition
|
||||
- [ ] Test fallback behavior when no starter is set or no match found
|
||||
Reference in New Issue
Block a user