All child features are done. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1.9 KiB
title, status, type, priority, created_at, updated_at, parent
| title | status | type | priority | created_at | updated_at | parent |
|---|---|---|---|---|---|---|
| Add type restriction rules (monolocke) | completed | feature | normal | 2026-02-20T19:56:16Z | 2026-02-21T11:22:16Z | 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[]toNuzlockeRulesinterface (default:[]) - Add a new
BooleanRuleKeystype toRuleDefinitionto exclude non-boolean fields - Add type multi-select UI to
RulesConfiguration(shown when allowedTypes toggle is on) - Show warning indicator on
PokemonCardand encounter list for Pokemon that don't match allowed types - Add
RuleBadgedisplay for active type restriction (e.g., "Monolocke: Fire") - Update
RuleBadgesto handleallowedTypesseparately from boolean rules