1.4 KiB
1.4 KiB
Context: upgrade-effects.ts
- Total line count: 191
Top-Level Exports
-
getActiveUpgrades(lines ~28-51)- Returns all selected upgrades with full effect definitions from the skill upgrades record
- Builds cache of upgrade definitions on first access, iterates over SKILL_EVOLUTION_PATHS
-
computeEffects(lines ~54-188)- Computes all active effects from selected upgrades into a ComputedEffects object
- Applies multipliers, bonuses, and special effects from upgrades; handles DEEP_UNDERSTANDING and MANA_THRESHOLD
-
upgradeDefinitionsById(line ~15)- Cache Map for quick lookup of upgrade definitions by ID
-
buildUpgradeCache(lines ~18-25)- Initializes the upgrade definition cache from SKILL_EVOLUTION_PATHS
Imports
SkillUpgradeChoice,SkillUpgradeEffectfrom './types'getUpgradesForSkillAtMilestone,SKILL_EVOLUTION_PATHSfrom './skill-evolution'ActiveUpgradeEffect,ComputedEffectsfrom './upgrade-effects.types'SPECIAL_EFFECTS,hasSpecialfrom './special-effects'computeDynamicRegen,computeDynamicClickMana,computeDynamicDamagefrom './dynamic-compute'
Assessment
This file is already 191 lines (well under 400). No refactoring needed. The exports are cleanly separated - getActiveUpgrades handles data gathering, computeEffects handles computation. The module is focused on a single concern (upgrade effects) and is not a candidate for splitting.