--- # nuzlocke-tracker-bs0y title: Add type restriction rules (monolocke) status: todo type: feature priority: normal created_at: 2026-02-20T19:56:16Z updated_at: 2026-02-20T20:01:40Z parent: nuzlocke-tracker-49xj --- Restrict team composition to specific types (monolocke and similar variants). ## Design Decisions **Type selection:** Multi-select from the 18 standard Pokemon types. A monolocke selects one type; multi-type variants (e.g., "fire and water only") select multiple. **Dual-type matching:** A Pokemon qualifies if at least one of its types is in the allowed set. This matches the community standard for monolocke — e.g., in a Fire monolocke, Charizard (Fire/Flying) is allowed because it has Fire. **Enforcement:** Soft enforcement via UI warnings, not hard blocks. The tracker warns when a caught Pokemon doesn't match the allowed types but doesn't prevent logging it. Reason: players sometimes need to use HM slaves or have edge cases the tracker shouldn't block. **Data model:** Add `allowedTypes: string[]` to `NuzlockeRules`. Empty array means no restriction (disabled). This keeps it in the existing JSONB rules blob on the run. **UI:** Add a "Type Restrictions" section to `RulesConfiguration` with a multi-select type picker (reuse the type badge styling from `TypeBadge`). Show a warning badge on encounters that don't match. ## 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