diff --git a/docs/circular-deps.txt b/docs/circular-deps.txt index f0fe7a2..a194a94 100644 --- a/docs/circular-deps.txt +++ b/docs/circular-deps.txt @@ -1,4 +1,4 @@ # Circular Dependencies -Generated: 2026-05-27T09:26:33.586Z +Generated: 2026-05-27T09:40:41.085Z No circular dependencies found. ✅ diff --git a/docs/dependency-graph.json b/docs/dependency-graph.json index 264649f..2ef1359 100644 --- a/docs/dependency-graph.json +++ b/docs/dependency-graph.json @@ -1,6 +1,6 @@ { "_meta": { - "generated": "2026-05-27T09:26:31.763Z", + "generated": "2026-05-27T09:40:39.287Z", "description": "Import dependency graph for src/lib/game. Keys are files, values are arrays of files they import.", "usage": "To find what a file affects, search for its path in the VALUES. To find what a file depends on, look at its KEY entry." }, diff --git a/src/components/game/tabs/DisciplinesTab.tsx b/src/components/game/tabs/DisciplinesTab.tsx index 38f7988..d14ba8f 100644 --- a/src/components/game/tabs/DisciplinesTab.tsx +++ b/src/components/game/tabs/DisciplinesTab.tsx @@ -45,6 +45,7 @@ export interface DisciplineCardDefinition { perkThresholds?: number[]; perkValues?: number[]; perkTypes?: string[]; + perkDescriptions?: string[]; statBonus: string; statBonusLabel: string; requires?: string[]; @@ -79,7 +80,7 @@ interface DisciplineCardProps { const DisciplineCard: React.FC = ({ definition, runtime, callbacks }) => { const { - id, name, description, manaType, baseCost, perkThresholds, perkValues, perkTypes, + id, name, description, manaType, baseCost, perkThresholds, perkValues, perkTypes, perkDescriptions, statBonusLabel, baseValue, drainBase, difficultyFactor, scalingFactor, } = definition; const { xp, paused: isPaused, concurrentLimit, isLocked, missingPrereqs, missingSourceMana } = runtime; @@ -101,12 +102,13 @@ const DisciplineCard: React.FC = ({ definition, runtime, ca const unlockedPerks = perkTypes?.reduce((acc, typ, idx) => { const threshold = perkThresholds?.[idx]; if (threshold === undefined) return acc; + const desc = perkDescriptions?.[idx]; if (typ === 'once' || typ === 'infinite') { - if (displayXp >= threshold) acc.push(`${typ}-${idx}`); + if (displayXp >= threshold && desc) acc.push(desc); } else if (typ === 'capped') { const interval = perkValues?.[idx] ?? 1; const tier = Math.max(0, Math.floor((displayXp - threshold) / interval) + 1); - if (tier > 0) acc.push(`${typ}-${idx}`); + if (tier > 0 && desc) acc.push(desc); } return acc; }, []); @@ -171,7 +173,7 @@ const DisciplineCard: React.FC = ({ definition, runtime, ca
    {unlockedPerks && unlockedPerks.length > 0 ? ( unlockedPerks.map((p) => ( -
  • {p.replace(/-([0-9]+)$/, ' $1')}
  • +
  • {p}
  • )) ) : (
  • —locked—
  • @@ -265,6 +267,7 @@ export const DisciplinesTab: React.FC = () => { perkThresholds: disc.perks?.map((p) => p.threshold), perkValues: disc.perks?.map((p) => p.value), perkTypes: disc.perks?.map((p) => p.type), + perkDescriptions: disc.perks?.map((p) => p.description), manaType: disc.manaType, baseCost: disc.baseCost, statBonus: disc.statBonus.stat,