Files
Mana-Loop/docs/task7/ctx_upgrade_effects.md
T
Refactoring Agent 03815f27ee
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 5m57s
feat: add prestige system and skill upgrades with comprehensive documentation
2026-05-01 15:18:09 +02:00

1.4 KiB

Context: upgrade-effects.ts

  • Total line count: 191

Top-Level Exports

  1. 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
  2. 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
  3. upgradeDefinitionsById (line ~15)

    • Cache Map for quick lookup of upgrade definitions by ID
  4. buildUpgradeCache (lines ~18-25)

    • Initializes the upgrade definition cache from SKILL_EVOLUTION_PATHS

Imports

  • SkillUpgradeChoice, SkillUpgradeEffect from './types'
  • getUpgradesForSkillAtMilestone, SKILL_EVOLUTION_PATHS from './skill-evolution'
  • ActiveUpgradeEffect, ComputedEffects from './upgrade-effects.types'
  • SPECIAL_EFFECTS, hasSpecial from './special-effects'
  • computeDynamicRegen, computeDynamicClickMana, computeDynamicDamage from './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.