Add type restriction rule (monolocke)
Adds allowedTypes: string[] to NuzlockeRules. When set, the encounter selector hides non-matching Pokemon and the routes endpoint filters out routes with no matching encounters, so only eligible locations appear. Type picker UI in RulesConfiguration; active restriction shown in RuleBadges. Backend accepts allowed_types query param and joins through RouteEncounter.pokemon to filter by type. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
---
|
||||
# nuzlocke-tracker-bs0y
|
||||
title: Add type restriction rules (monolocke)
|
||||
status: todo
|
||||
status: in-progress
|
||||
type: feature
|
||||
priority: normal
|
||||
created_at: 2026-02-20T19:56:16Z
|
||||
updated_at: 2026-02-20T20:01:40Z
|
||||
updated_at: 2026-02-21T11:12:40Z
|
||||
parent: nuzlocke-tracker-49xj
|
||||
---
|
||||
|
||||
@@ -25,9 +25,9 @@ Restrict team composition to specific types (monolocke and similar variants).
|
||||
|
||||
## Checklist
|
||||
|
||||
- [ ] Add `allowedTypes: string[]` to `NuzlockeRules` interface (default: `[]`)
|
||||
- [ ] Add a new `'variant'` category to `RuleDefinition` for variant rules
|
||||
- [ ] Add type multi-select UI to `RulesConfiguration` (shown when allowedTypes toggle is on)
|
||||
- [ ] Show warning indicator on `PokemonCard` and encounter list for Pokemon that don't match allowed types
|
||||
- [ ] Add `RuleBadge` display for active type restriction (e.g., "Monolocke: Fire")
|
||||
- [ ] Update `RuleBadges` color mapping for the new `'variant'` category
|
||||
- [x] Add `allowedTypes: string[]` to `NuzlockeRules` interface (default: `[]`)
|
||||
- [x] Add a new `BooleanRuleKeys` type to `RuleDefinition` to exclude non-boolean fields
|
||||
- [x] Add type multi-select UI to `RulesConfiguration` (shown when allowedTypes toggle is on)
|
||||
- [x] Show warning indicator on `PokemonCard` and encounter list for Pokemon that don't match allowed types
|
||||
- [x] Add `RuleBadge` display for active type restriction (e.g., "Monolocke: Fire")
|
||||
- [x] Update `RuleBadges` to handle `allowedTypes` separately from boolean rules
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
---
|
||||
# nuzlocke-tracker-knnc
|
||||
title: Add static encounter filter rule
|
||||
status: in-progress
|
||||
status: completed
|
||||
type: feature
|
||||
priority: normal
|
||||
created_at: 2026-02-20T19:56:27Z
|
||||
updated_at: 2026-02-21T11:03:12Z
|
||||
updated_at: 2026-02-21T11:04:45Z
|
||||
parent: nuzlocke-tracker-49xj
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user