Files
nuzlocke-tracker/.beans/nuzlocke-tracker-bs0y--add-type-restriction-rules-monolocke.md
Julian Tabel 16f9e68821 Mark Overhaul Nuzlocke Rules System epic as completed
All child features are done.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 12:23:37 +01:00

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[] to NuzlockeRules interface (default: [])
  • Add a new BooleanRuleKeys type to RuleDefinition to exclude non-boolean fields
  • 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 to handle allowedTypes separately from boolean rules