Commit Graph

14 Commits

Author SHA1 Message Date
n8n-gitea ab3afae2a6 feat: overhaul mana conversion system to unified regen-deduction model
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m2s
- New files: element-distance.ts, conversion-costs.ts, conversion-rates.ts
- All conversion types (discipline, attunement, pact) use unified formula
- Conversion costs scale exponentially by element tier (10^(d+1) raw, 10*(d+1) per component)
- Costs deducted from regen, not from mana pool
- Auto-pause on insufficient regen with UI warning
- Meditation boosts conversion rates (reduced by distance)
- Attunement levels provide +50% multiplicative bonus per level
- Guardian pacts provide +0.15/hr base rate + invoker level bonus
- Removed convertMana, processConvertAction, craftComposite from manaStore
- Stats tab shows per-element conversion breakdown with formulas
- ManaDisplay shows per-element net regen rates
- All 916 tests pass, all files under 400 lines
2026-06-04 18:12:41 +02:00
n8n-gitea 0232f2ac85 fix: meditation multiplier cap 2.5x, discipline reactivation, Spire crash, earthShard recipe, fabricator E2E test
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 4m53s
2026-05-31 16:12:47 +02:00
n8n-gitea 5578721992 refactor: remove skill system leftovers, migrate click mana to discipline perk
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m30s
- Simplified getMeditationBonus() to continuous ramp formula
- Added click-mana capped perk to Mana Circulation discipline
- Removed manaWell/manaFlow/manaSpring skill reads and prestige upgrades
- Removed all skill fields from GameState and GameActionType
- Updated all call sites and tests (916 tests passing)

Closes #174
2026-05-28 11:50:06 +02:00
n8n-gitea 02600754e7 feat: Add Mana Circulation discipline with regen multiplier and meditation cap perks
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m23s
2026-05-26 20:58:55 +02:00
n8n-gitea 23a83a04cf fix: resolve all TypeScript compilation errors
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m17s
- Fixed DisciplinesAttunementType enum usage in discipline data files
- Fixed EquipmentSlot import in equipment/types.ts
- Fixed enchantment-effects.ts export/import chain
- Fixed safe-persist.ts StateStorage type compatibility
- Fixed store persist partial return types for all stores
- Fixed gameStore.ts ElementState type and error handling
- Fixed useGameDerived.ts missing properties on GameCoordinatorStore
- Added SkillUpgradeChoice type to types.ts
- Fixed ActionButtons.tsx optional currentStudyTarget prop
- Fixed GameToast.tsx Toast type compatibility
- Fixed EnchantmentDesigner sub-component type mismatches
- Fixed SpireCombatPage equippedInstances/equipmentInstances types
- Fixed page.tsx computeClickMana argument
- Added baseCastTime to SpellDef type
- Fixed golem/types.ts and loot-drops.ts import paths
- Fixed craftingStore.ts missing lastError in initial state and actions
- Fixed store-actions-combat-prestige.test.ts Memory type usage
- Fixed floor-utils.upgraded.test.ts array type annotation
- Fixed computed-stats.test.ts state type assertions
- Fixed activity-log.test.ts state type annotation
- Fixed discipline-math.test.ts enum value usage
- Fixed game-loop.test.ts vitest mock import
- Various other test file type fixes
2026-05-24 14:34:49 +02:00
n8n-gitea 8a7ddaae27 refactor: split bloated state types into State + Actions interfaces (issue #102)
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m19s
- CombatState: split into CombatState (data) + CombatActions + CombatStore
- PrestigeState: split into PrestigeState (data) + PrestigeActions + PrestigeStore
- ManaState: split into ManaState (data) + ManaActions + ManaStore
- GameState: deprecated, removed from barrel exports
- crafting-actions: updated to use CraftingState instead of GameState
- combat-utils/mana-utils: replaced Pick<GameState,...> with focused interfaces
- DisciplineCardProps: split into Definition + Runtime + Callbacks
- stores/index.ts: now exports both State and Actions types
2026-05-20 21:05:22 +02:00
n8n-gitea cba42e01ff refactor: remove legacy store.ts and crafting-slice.ts, complete modular store migration
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m18s
- Delete store.ts (355 LOC monolithic store, zero imports)
- Delete crafting-slice.ts (379 LOC legacy crafting module)
- Inline createStartingEquipment() into craftingStore.ts
- Remove legacy equipment/inventory fields from GameState
- Remove EquipmentDef from game.ts imports (unused)
- Fix duplicate EquipmentSpellState export in types.ts
- Fix bluePrintId typo in craftingStore.ts
- Update stores/index.ts to import CraftingState/CraftingActions from craftingStore.types
- Update EquipmentTab.test.ts to test store state instead of deleted module
- Clean up stale comments referencing crafting-slice.ts
- Reduce TS errors from 83 to 72 by removing conflicting legacy types
2026-05-20 12:36:00 +02:00
n8n-gitea 50a9a62060 fix: resolve priority 4 issues — discipline mutation, skill→discipline migration, uiStore persistence, game loop interval, toast listener leak, page re-renders
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m21s
- Issue 70: Fix discipline-slice.ts nested element mutation (use immutable spread)
- Issue 71: Add persist middleware to uiStore for paused/gameOver/victory
- Issue 72: Wire discipline effects into calcDamage (spell-casting, void-manipulation)
- Issue 73: Fix useGameLoop interval recreation (use getState() + empty deps)
- Issue 74: Fix use-toast.ts listener leak (change [state] dep to [])
- Issue 75: Reduce page.tsx re-renders with useShallow for multi-field subscriptions
- Issue 76: Fix createGatherMana hardcoded click mana (use computeClickMana with discipline effects)
- Issue 77: Pass discipline effects to computeMaxMana/computeRegen/calcInsight in tick()
- Export DisciplineBonuses type and useDisciplineStore from barrel exports
- Update tests to match new function signatures
2026-05-19 13:53:33 +02:00
n8n-gitea ca86b6268c 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
2026-05-18 14:21:59 +02:00
n8n-gitea b7a91abc5d fix: handle undefined state/obj in mana calculations to prevent runtime error
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 2m20s
2026-05-06 12:42:25 +02:00
Refactoring Agent 03815f27ee feat: add prestige system and skill upgrades with comprehensive documentation
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 5m57s
2026-05-01 15:18:09 +02:00
Refactoring Agent ebb9d15e9e Deduct mana conversion rates from raw regen (Bug 10)
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 4m35s
- Added getTotalAttunementConversionDrain function to calculate total conversion drain
- Updated computeRegen to include attunement regen bonus
- Added computeEffectiveRegenForDisplay function for UI display
- Added conversionDrains to GameState to track per-attunement drain
- Updated tick function to track and persist conversion drains
- Build passes successfully
2026-04-27 12:25:17 +02:00
Refactoring Agent 23d0a129c1 Phase 3: Split utils.ts by responsibility
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 2m49s
2026-04-24 13:45:12 +02:00
Unknown b3291c3b5e Phase 3: Split computed-stats.ts by responsibility 2026-04-24 13:20:10 +02:00