Add egglocke, wonderlocke, and randomizer variant rules
When any variant rule is enabled, the encounter modal switches from the game's regional dex to an all-Pokemon search (same debounced API pattern as EggEncounterModal). A new "Run Variant" section in rules configuration groups these rules, and badges render in amber. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -20,6 +20,7 @@ export function RulesConfiguration({
|
||||
: RULE_DEFINITIONS
|
||||
const coreRules = visibleRules.filter((r) => r.category === 'core')
|
||||
const playstyleRules = visibleRules.filter((r) => r.category === 'playstyle')
|
||||
const variantRules = visibleRules.filter((r) => r.category === 'variant')
|
||||
|
||||
const handleRuleChange = (key: keyof NuzlockeRules, value: boolean) => {
|
||||
onChange({ ...rules, [key]: value })
|
||||
@@ -90,6 +91,26 @@ export function RulesConfiguration({
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="bg-surface-1 rounded-lg shadow">
|
||||
<div className="px-4 py-3 border-b border-border-default">
|
||||
<h3 className="text-lg font-medium text-text-primary">Run Variant</h3>
|
||||
<p className="text-sm text-text-tertiary">
|
||||
Changes which Pokémon can appear — affects the encounter selector
|
||||
</p>
|
||||
</div>
|
||||
<div className="px-4">
|
||||
{variantRules.map((rule) => (
|
||||
<RuleToggle
|
||||
key={rule.key}
|
||||
name={rule.name}
|
||||
description={rule.description}
|
||||
enabled={rules[rule.key]}
|
||||
onChange={(value) => handleRuleChange(rule.key, value)}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user