[priority: medium-high] Discipline tab UI confusing labels and missing perk/stat info #179
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
The Discipline tab has several UX issues that make it hard for players to understand mechanics:
Issue 1: "Base Cost" label is unclear
baseCostis defined on all discipline definitions but is never consumed by any game logic (discipline-slice.ts activate()never charges it). The field appears to be purely informational but gives no context.src/components/game/tabs/DisciplinesTab.tsxline 154Issue 2: "Drain per tick" uses internal jargon
TICK_MS = 200,HOURS_PER_TICK = 0.04insrc/lib/game/constants/core.tsDisciplinesTab.tsxline 151Issue 3: Perks don't show current computed effect
calculatePerkTier()already exists insrc/lib/game/utils/discipline-math.tsand can compute the current tierDisciplinesTab.tsxlines 102–121 (unlockedPerks computation), lines 172–182 (rendering)Issue 4: Stat bonus doesn't show perk-augmented total
computeDisciplineEffects()insrc/lib/game/effects/discipline-effects.tsalready computes the total including perks — this data needs to flow into the UIDisciplinesTab.tsxline 161Affected Files
src/components/game/tabs/DisciplinesTab.tsx— lines 151, 154, 102–121, 161, 172–182src/lib/game/utils/discipline-math.ts—calculatePerkTier()for computing current perk effectssrc/lib/game/constants/core.ts—TICK_MS,HOURS_PER_TICKfor time unit conversionstatBonus.labelwith "/tick" suffixstarting work on Discipline tab UX improvements: fix unclear labels, tick jargon, missing perk/stat info
All 4 issues fixed and verified:
"Base Cost" label removed —
baseCostis defined on discipline data but never consumed by game logic (discipline-slice.ts activate() doesn't charge it), so showing it was misleading. Removed from the UI entirely.Drain converted from /tick to /sec — "Drain: X/tick" changed to "Drain: X/sec" using
TICKS_PER_SECOND = 1000 / TICK_MS (200) = 5, a new export indisciplines-utils.ts.Perks now show computed current effect — Added
computePerkCurrentEffect()that usescalculatePerkTier()to display e.g. "+1.25/sec" for infinite perks, "+50 (unlocked)" for once perks, and "at 500 XP" for locked perks. Rendered as "description — currentEffect" on each perk line.Stat bonus now shows perk-augmented total — Added
computeTotalPerkBonusForStat()that mirrorscomputeDisciplineEffects()logic. Displays as "5.25/sec on Max Mana (7.75/sec with perks)" when perks contribute bonus to the same stat.Fixed /tick suffixes in data — Changed
statBonus.labeland perk descriptions indata/disciplines/base.tsfrom "/tick" to "/sec" for consistency.Files changed:
src/components/game/tabs/DisciplinesTab.tsx(271 lines, refactored to pass definition directly)src/components/game/tabs/disciplines-utils.ts(90 lines, new shared helpers)src/lib/game/data/disciplines/base.ts(label fixes)All 917 tests pass, build succeeds.