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
This commit is contained in:
2026-06-04 18:12:41 +02:00
parent 94a2b671b9
commit ab3afae2a6
19 changed files with 742 additions and 572 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
# Circular Dependencies
Generated: 2026-06-04T09:37:34.683Z
Generated: 2026-06-04T11:37:52.108Z
No circular dependencies found. ✅
+1 -1
View File
@@ -1,6 +1,6 @@
{
"_meta": {
"generated": "2026-06-04T09:37:32.833Z",
"generated": "2026-06-04T11:37:49.892Z",
"description": "Import dependency graph for src/lib/game. Keys are files, values are arrays of files they import.",
"usage": "To find what a file affects, search for its path in the VALUES. To find what a file depends on, look at its KEY entry."
},
+3
View File
@@ -327,6 +327,7 @@ Mana-Loop/
│ │ │ │ │ └── utils.ts
│ │ │ │ ├── achievements.ts
│ │ │ │ ├── attunements.ts
│ │ │ │ ├── conversion-costs.ts
│ │ │ │ ├── crafting-recipes.ts
│ │ │ │ ├── enchantment-effects.ts
│ │ │ │ ├── enchantment-types.ts
@@ -389,8 +390,10 @@ Mana-Loop/
│ │ │ ├── utils/
│ │ │ │ ├── activity-log.ts
│ │ │ │ ├── combat-utils.ts
│ │ │ │ ├── conversion-rates.ts
│ │ │ │ ├── discipline-math.ts
│ │ │ │ ├── element-cap-bonus.ts
│ │ │ │ ├── element-distance.ts
│ │ │ │ ├── enemy-generator.ts
│ │ │ │ ├── enemy-utils.ts
│ │ │ │ ├── floor-utils.ts