Files
nuzlocke-tracker/.beans/nuzlocke-tracker-x8ol--starter-dependent-boss-battle-teams.md
Julian Tabel a6bf8b4af2 Add conditional boss battle teams (variant teams by condition)
Wire up the existing condition_label column on boss_pokemon to support
variant teams throughout the UI. Boss battles can now have multiple team
configurations based on conditions (e.g., starter choice in Gen 1).

- Add condition_label to BossPokemonInput schema (frontend + backend bulk import)
- Rewrite BossTeamEditor with variant tabs (Default + named conditions)
- Add variant pill selector to BossDefeatModal team preview
- Add BossTeamPreview component to RunEncounters boss cards
- Fix MissingGreenlet error in set_boss_team via session.expunge_all()
- Fix PokemonSelector state bleed between tabs via composite React key
- Add Alembic migration for condition_label column

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 21:20:30 +01:00

31 lines
2.2 KiB
Markdown

---
# nuzlocke-tracker-x8ol
title: Conditional boss battle teams
status: in-progress
type: feature
priority: normal
created_at: 2026-02-08T13:23:00Z
updated_at: 2026-02-08T19:34:27Z
---
Some boss battles have teams that vary based on conditions in the player's run. The most common case is starter choice (e.g., Blue's team in Gen 1 depends on whether you picked Bulbasaur, Charmander, or Squirtle), but other conditions exist too — in Pokemon Yellow, the rival's team changes based on the outcomes of two early-game fights, not the starter. This feature adds support for defining multiple team variants per boss battle, each associated with a named condition.
## Context
Currently each boss battle has a single fixed team (`boss_pokemon` table). This doesn't account for games where the rival/champion adapts their team based on player decisions or battle outcomes. To accurately model these encounters, boss battles need to support variant teams keyed by a general condition system — not just starter choice.
## Scope
- **Variant conditions**: Support a general condition system for team variants. Starter choice is the most common condition, but the design must also handle arbitrary conditions (e.g., "won/lost early rival fight" in Yellow). Each variant should have a human-readable label describing the condition.
- **Admin side**: Allow defining multiple team variants per boss battle, each with a condition label and a team composition
- **Run side**: When viewing a boss battle during a run, allow the player to select which variant applies (or auto-resolve when possible, e.g., from the run's recorded starter)
- **Fallback**: If no variant teams are defined, the boss uses the existing single team as today
## Checklist
- [ ] Design database schema for conditional team variants (e.g., a `boss_team_variant` table grouping pokemon by a condition label, rather than tying directly to starter)
- [ ] Add backend models and migrations
- [ ] Add API endpoints for managing team variants per boss battle
- [ ] Update admin UI (BossTeamEditor) to support defining teams per condition/variant
- [ ] Update run-side boss display to let the player pick or auto-resolve the correct variant
- [ ] Handle edge cases: boss battles with no variants (use default team), unknown conditions