Replace playstyle rules with free-text custom rules markdown field
Some checks failed
CI / backend-tests (push) Successful in 28s
CI / frontend-tests (push) Failing after 28s

Remove hardcoreMode, setModeOnly, and bossTeamMatch toggles which had
no mechanical impact on the tracker. Replace them with a customRules
markdown field so users can document their own rules (especially useful
for genlockes). Add react-markdown + remark-gfm for rendering and
@tailwindcss/typography for prose styling. The custom rules display is
collapsible and hidden by default.

Also simplifies the BossDefeatModal by removing the Lost result and
attempts counter, and always shows boss team size in the level cap bar.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Julian Tabel
2026-03-20 15:09:02 +01:00
parent 535154a056
commit 1cd1389408
14 changed files with 1614 additions and 128 deletions

View File

@@ -7,11 +7,6 @@ export interface NuzlockeRules {
pinwheelClause: boolean
levelCaps: boolean
// Playstyle (informational, for stats/categorization)
hardcoreMode: boolean
setModeOnly: boolean
bossTeamMatch: boolean
// Variant (changes which Pokemon can appear)
egglocke: boolean
wonderlocke: boolean
@@ -19,10 +14,13 @@ export interface NuzlockeRules {
// Type restriction (monolocke and variants)
allowedTypes: string[]
// Free-text rules (markdown, for tracking custom/personal rules)
customRules: string
}
/** Keys of NuzlockeRules that are boolean toggles (excludes array fields) */
type BooleanRuleKeys = Exclude<keyof NuzlockeRules, 'allowedTypes'>
/** Keys of NuzlockeRules that are boolean toggles (excludes array and string fields) */
type BooleanRuleKeys = Exclude<keyof NuzlockeRules, 'allowedTypes' | 'customRules'>
export const DEFAULT_RULES: NuzlockeRules = {
// Core rules
@@ -33,11 +31,6 @@ export const DEFAULT_RULES: NuzlockeRules = {
pinwheelClause: true,
levelCaps: false,
// Playstyle - off by default
hardcoreMode: false,
setModeOnly: false,
bossTeamMatch: false,
// Variant - off by default
egglocke: false,
wonderlocke: false,
@@ -45,13 +38,16 @@ export const DEFAULT_RULES: NuzlockeRules = {
// Type restriction - no restriction by default
allowedTypes: [],
// Custom rules - empty by default
customRules: '',
}
export interface RuleDefinition {
key: BooleanRuleKeys
name: string
description: string
category: 'core' | 'playstyle' | 'variant'
category: 'core' | 'variant'
}
export const RULE_DEFINITIONS: RuleDefinition[] = [
@@ -99,28 +95,6 @@ export const RULE_DEFINITIONS: RuleDefinition[] = [
category: 'core',
},
// Playstyle
{
key: 'hardcoreMode',
name: 'Hardcore Mode',
description: 'No items may be used during battle. Held items are still allowed.',
category: 'playstyle',
},
{
key: 'setModeOnly',
name: 'Set Mode Only',
description:
'The game must be played in "Set" battle style, meaning you cannot switch Pokémon after knocking out an opponent.',
category: 'playstyle',
},
{
key: 'bossTeamMatch',
name: 'Boss Team Match',
description:
'Limit your active party to the same number of Pokémon as the boss you are challenging.',
category: 'playstyle',
},
// Variant
{
key: 'egglocke',