refactor: resolve structural inconsistencies and dead code
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 55s

- Fix broken barrel exports in components/game/index.ts
- Remove skill system from stores (gameStore, gameActions, gameLoopActions, gameHooks, craftingStore, combat)
- Remove skill system from components (page.tsx, LeftPanel, StatsTab, SpellsTab, EnchantmentDesigner, EnchantmentPreparer, GameContext/Provider)
- Delete dead code: stats/ directory, attunements/ directory, layout/ Header+TabBar, shared/ StudyProgress+UpgradeDialog duplicates, effects.ts.fix, study-slice.ts, navigation-slice.ts
- Delete legacy store/ and store-modules/ directories, redirect remaining callers
- Merge root formatting.ts into utils/formatting.ts
- Move effects files (dynamic-compute, upgrade-effects, special-effects, upgrade-effects.types) into effects/ directory
- Move debug-context.tsx into components/game/debug/
- Create tabs/index.ts barrel for tab components
- Fix page.tsx lazy imports to use tabs barrel
- Fix all broken import paths across codebase
- Remove SKILLS_DEF and skill-evolution references
- Trim store.ts to under 400 lines by removing dead skill actions
This commit is contained in:
2026-05-18 14:21:59 +02:00
parent 2805f75f5e
commit ca86b6268c
57 changed files with 405 additions and 3726 deletions
+68
View File
@@ -0,0 +1,68 @@
// ─── Upgrade Effect System ────────────────────────────────────────────────────────
// This module handles applying skill upgrade effects to game stats
// Note: Skill evolution paths have been removed. Upgrade effects now return
// base/default values with no skill-dependent modifications.
import type { ActiveUpgradeEffect, ComputedEffects } from './upgrade-effects.types';
// ─── Upgrade Definition Cache ───────────────────────────
// No-op: skill evolution paths have been removed
function buildUpgradeCache(): void {
// No-op: no upgrade definitions to cache
}
// ─── Helper Functions ──────────────────────────────
/**
* Get all selected upgrades with their full effect definitions.
* Since skills are removed, always returns empty array.
*/
export function getActiveUpgrades(
_skillUpgrades: Record<string, string[]>,
_skillTiers: Record<string, number>
): ActiveUpgradeEffect[] {
return [];
}
/**
* Compute all active effects from selected upgrades.
* Since skills are removed, returns base values with no upgrades applied.
*/
export function computeEffects(
_skillUpgrades: Record<string, string[]>,
_skillTiers: Record<string, number>
): ComputedEffects {
return {
maxManaMultiplier: 1,
maxManaBonus: 0,
regenMultiplier: 1,
regenBonus: 0,
clickManaMultiplier: 1,
clickManaBonus: 0,
meditationEfficiency: 1,
spellCostMultiplier: 1,
conversionEfficiency: 1,
baseDamageMultiplier: 1,
baseDamageBonus: 0,
attackSpeedMultiplier: 1,
critChanceBonus: 0,
critDamageMultiplier: 1.5,
elementalDamageMultiplier: 1,
studySpeedMultiplier: 1,
studyCostMultiplier: 1,
progressRetention: 0,
instantStudyChance: 0,
freeStudyChance: 0,
elementCapMultiplier: 1,
elementCapBonus: 0,
perElementCapBonus: {},
conversionCostMultiplier: 1,
doubleCraftChance: 0,
permanentRegenBonus: 0,
specials: new Set<string>(),
activeUpgrades: [],
skillLevelMultiplier: 1,
enchantmentPowerMultiplier: 1,
};
}