Replace playstyle rules with free-text custom rules markdown field
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:
@@ -1,7 +1,7 @@
|
||||
import { Link, useParams } from 'react-router-dom'
|
||||
import { useGenlocke } from '../hooks/useGenlockes'
|
||||
import { usePokemonFamilies } from '../hooks/usePokemon'
|
||||
import { GenlockeGraveyard, GenlockeLineage, StatCard, RuleBadges } from '../components'
|
||||
import { CustomRulesDisplay, GenlockeGraveyard, GenlockeLineage, StatCard, RuleBadges } from '../components'
|
||||
import type { GenlockeLegDetail, RetiredPokemon, RunStatus } from '../types'
|
||||
import { useMemo, useState } from 'react'
|
||||
|
||||
@@ -226,6 +226,7 @@ export function GenlockeDetail() {
|
||||
<div>
|
||||
<h3 className="text-sm font-medium text-text-tertiary mb-2">Nuzlocke Rules</h3>
|
||||
<RuleBadges rules={genlocke.nuzlockeRules} />
|
||||
<CustomRulesDisplay customRules={genlocke.nuzlockeRules?.customRules ?? ''} />
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -3,7 +3,7 @@ import { useParams, Link } from 'react-router-dom'
|
||||
import { useRun, useUpdateRun, useNamingCategories } from '../hooks/useRuns'
|
||||
import { useGameRoutes } from '../hooks/useGames'
|
||||
import { useCreateEncounter, useUpdateEncounter } from '../hooks/useEncounters'
|
||||
import { StatCard, PokemonCard, RuleBadges, StatusChangeModal, EndRunModal } from '../components'
|
||||
import { CustomRulesDisplay, StatCard, PokemonCard, RuleBadges, StatusChangeModal, EndRunModal } from '../components'
|
||||
import type { RunStatus, EncounterDetail } from '../types'
|
||||
|
||||
type TeamSortKey = 'route' | 'level' | 'species' | 'dex'
|
||||
@@ -187,6 +187,7 @@ export function RunDashboard() {
|
||||
<div className="mb-6">
|
||||
<h2 className="text-sm font-medium text-text-tertiary mb-2">Active Rules</h2>
|
||||
<RuleBadges rules={run.rules} />
|
||||
<CustomRulesDisplay customRules={run.rules?.customRules ?? ''} />
|
||||
</div>
|
||||
|
||||
{/* Naming Scheme */}
|
||||
|
||||
@@ -7,6 +7,7 @@ import { useCreateEncounter, useUpdateEncounter, useBulkRandomize } from '../hoo
|
||||
import { usePokemonFamilies } from '../hooks/usePokemon'
|
||||
import { useGameBosses, useBossResults, useCreateBossResult } from '../hooks/useBosses'
|
||||
import {
|
||||
CustomRulesDisplay,
|
||||
EggEncounterModal,
|
||||
EncounterModal,
|
||||
EncounterMethodBadge,
|
||||
@@ -1077,12 +1078,10 @@ export function RunEncounters() {
|
||||
{nextBoss && (
|
||||
<span className="text-sm text-text-tertiary">
|
||||
Next: {nextBoss.name}
|
||||
{run.rules?.bossTeamMatch && (
|
||||
<span className="text-text-muted">
|
||||
{' '}
|
||||
({getBossTeamSize(nextBoss.pokemon, starterName)} Pokémon — match their team)
|
||||
</span>
|
||||
)}
|
||||
<span className="text-text-muted">
|
||||
{' '}
|
||||
({getBossTeamSize(nextBoss.pokemon, starterName)} Pokémon)
|
||||
</span>
|
||||
</span>
|
||||
)}
|
||||
{!nextBoss && (
|
||||
@@ -1135,6 +1134,7 @@ export function RunEncounters() {
|
||||
<div className="mb-6">
|
||||
<h2 className="text-sm font-medium text-text-tertiary mb-2">Active Rules</h2>
|
||||
<RuleBadges rules={run.rules} />
|
||||
<CustomRulesDisplay customRules={run.rules?.customRules ?? ''} />
|
||||
</div>
|
||||
|
||||
{/* Team Section */}
|
||||
@@ -1602,7 +1602,6 @@ export function RunEncounters() {
|
||||
}}
|
||||
onClose={() => setSelectedBoss(null)}
|
||||
isPending={createBossResult.isPending}
|
||||
hardcoreMode={run?.rules?.hardcoreMode}
|
||||
starterName={starterName}
|
||||
/>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user