TASK-007: Duplicate stat functions across multiple modules — consolidate into computeStats() #4
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?
Duplicate Stat Functions Need Consolidation
Multiple functions are duplicated across 3-4 locations. The new
computeStats()inskills-v2.tsshould be the single source, but old copies still exist and are used.Duplicated functions:
computeMaxManautils/mana-utils.ts,store-modules/computed-stats.ts,store/computed.ts,constants/skills-v2.ts(4 copies!)computeRegenutils/mana-utils.ts,store-modules/computed-stats.ts,store/computed.ts(3 copies)calcDamageutils/combat-utils.ts,store-modules/computed-stats.ts,store/computed.ts(3 copies)getMeditationBonusutils/mana-utils.ts,store-modules/computed-stats.ts,store/computed.ts(3 copies)getFloorMaxHPutils/floor-utils.ts,store/computed.ts(2 copies)getFloorElementutils/floor-utils.ts,store/computed.ts(2 copies)canAffordSpellCostutils/combat-utils.ts,store-modules/computed-stats.ts,store/computed.ts(3 copies)fmt/fmtDecutils/formatting.ts,store/computed.ts(2 copies)Plan:
computeStats()inskills-v2.tsthe single computation entry pointcomputeMaxMana,computeRegen,computeClickManashould all come from applyingcomputeStats()+ prestigecalcDamage,getMeditationBonus, etc. should read fromComputedStatsoutputstore/computed.tsshould import fromutils/(not duplicate)store-modules/computed-stats.tsshould import fromutils/(not duplicate)Acceptance criteria:
computeStats()is the foundation for mana/regen/click calculationsClosed and replaced by Issue #15: Migrate Legacy Skills System to Active Disciplines. TASK-007 skill evolution consolidation is superseded by the new system.