diff --git a/docs/circular-deps.txt b/docs/circular-deps.txt index 56435d9..0fc9389 100644 --- a/docs/circular-deps.txt +++ b/docs/circular-deps.txt @@ -1,5 +1,5 @@ # Circular Dependencies -Generated: 2026-06-12T10:15:03.641Z +Generated: 2026-06-12T10:30:18.304Z Found: 4 circular chain(s) — these MUST be fixed before modifying involved files. 1. 1) data/guardian-encounters.ts > data/guardian-procedural.ts diff --git a/docs/dependency-graph.json b/docs/dependency-graph.json index a440f0a..b3c55b4 100644 --- a/docs/dependency-graph.json +++ b/docs/dependency-graph.json @@ -1,6 +1,6 @@ { "_meta": { - "generated": "2026-06-12T10:15:01.393Z", + "generated": "2026-06-12T10:30:16.054Z", "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." }, diff --git a/docs/specs/mana-conversion-spec.md b/docs/specs/mana-conversion-spec.md index 2214455..e22b2fe 100644 --- a/docs/specs/mana-conversion-spec.md +++ b/docs/specs/mana-conversion-spec.md @@ -42,42 +42,41 @@ All conversions produce **1 unit** of destination mana. The cost depends on the For a destination element at distance `d`: -- **Raw mana cost** = `10^(d+1)` - - Distance 1 (base): `10^2 = 100` raw per 1 element - - Distance 2 (composite): `10^3 = 1,000` raw per 1 element - - Distance 3 (exotic): `10^4 = 10,000` raw per 1 element - - Distance 4 (time): `10^5 = 100,000` raw per 1 element +- **Raw mana cost** = `2 * d` + - Distance 1 (base): `2` raw per 1 element + - Distance 2 (composite): `4` raw per 1 element + - Distance 3 (exotic): `6` raw per 1 element + - Distance 4 (time): `8` raw per 1 element -- **Each component mana cost** = `10 * (d + 1)` per 1 destination element - - Distance 1: `10 * 2 = 20` of that element per 1 destination - - Distance 2: `10 * 3 = 30` of that element per 1 destination - - Distance 3: `10 * 4 = 40` of that element per 1 destination - - Distance 4: `10 * 5 = 50` of that element per 1 destination +- **Each component mana cost** = `3 * d` per 1 destination element + - Distance 2: `6` of that element per 1 destination + - Distance 3: `9` of that element per 1 destination + - Distance 4: `12` of that element per 1 destination ### Cost Table (per 1 unit of destination mana) | Destination | Distance | Raw Cost | Each Component Cost | Components | |-------------|----------|----------|---------------------|------------| -| Fire (base) | 1 | 100 | — | — | -| Transference | 1 | 100 | — | — | -| Metal | 2 | 1,000 | 30 fire + 30 earth | fire, earth | -| Sand | 2 | 1,000 | 30 earth + 30 water | earth, water | -| Lightning | 2 | 1,000 | 30 fire + 30 air | fire, air | -| Frost | 2 | 1,000 | 30 air + 30 water | air, water | -| BlackFlame | 2 | 1,000 | 30 dark + 30 fire | dark, fire | -| Radiant Flames | 2 | 1,000 | 30 light + 30 fire | light, fire | -| Miasma | 2 | 1,000 | 30 air + 30 death | air, death | -| Shadow Glass | 2 | 1,000 | 30 earth + 30 dark | earth, dark | -| Crystal | 3 | 10,000 | 40 sand + 40 light | sand, light | -| Stellar | 3 | 10,000 | 40 plasma + 40 light | plasma, light | -| Void | 3 | 10,000 | 40 dark + 40 death | dark, death | -| Soul | 3 | 10,000 | 40 light + 40 dark + 40 transference | light, dark, transference | -| Plasma | 3 | 10,000 | 40 lightning + 40 fire + 40 transference | lightning, fire, transference | -| Time | 4 | 100,000 | 50 soul + 50 sand + 50 transference | soul, sand, transference | +| Fire (base) | 1 | 2 | — | — | +| Transference | 1 | 2 | — | — | +| Metal | 2 | 4 | 6 fire + 6 earth | fire, earth | +| Sand | 2 | 4 | 6 earth + 6 water | earth, water | +| Lightning | 2 | 4 | 6 fire + 6 air | fire, air | +| Frost | 2 | 4 | 6 air + 6 water | air, water | +| BlackFlame | 2 | 4 | 6 dark + 6 fire | dark, fire | +| Radiant Flames | 2 | 4 | 6 light + 6 fire | light, fire | +| Miasma | 2 | 4 | 6 air + 6 death | air, death | +| Shadow Glass | 2 | 4 | 6 earth + 6 dark | earth, dark | +| Crystal | 3 | 6 | 9 sand + 9 light | sand, light | +| Stellar | 3 | 6 | 9 plasma + 9 light | plasma, light | +| Void | 3 | 6 | 9 dark + 9 death | dark, death | +| Soul | 3 | 6 | 9 light + 9 dark + 9 transference | light, dark, transference | +| Plasma | 3 | 6 | 9 lightning + 9 fire + 9 transference | lightning, fire, transference | +| Time | 4 | 8 | 12 soul + 12 sand + 12 transference | soul, sand, transference | ### Key Constraint -Raw mana cost is always **greater** than any individual component cost. This is inherent in the formula: `10^(d+1)` for raw vs `10*(d+1)` for each component. +Costs are linear with distance, keeping conversions achievable at all game stages. Raw mana cost scales as `2*d` while component costs scale as `3*d` per component. --- @@ -356,13 +355,13 @@ For each element with active conversions: │ Effective Rate: 0.50/hr → produces 0.50 fire/hr │ │ │ │ Costs (deducted from raw regen): │ -│ Raw: 100 × 0.50 = 50.0 raw/hr │ +│ Raw: 2 × 0.50 = 1.0 raw/hr │ │ │ │ Drained by downstream conversions: │ -│ → Metal: 30 × 0.005 = 0.15 fire/hr │ -│ → Lightning: 30 × 0.003 = 0.10 fire/hr │ +│ → Metal: 6 × 0.005 = 0.03 fire/hr │ +│ → Lightning: 6 × 0.003 = 0.02 fire/hr │ │ │ -│ Net Fire Regen: +0.50 - 0.15 - 0.10 = +0.25 fire/hr │ +│ Net Fire Regen: +0.50 - 0.03 - 0.02 = +0.45 fire/hr │ └─────────────────────────────────────────────────────────────┘ ``` @@ -380,8 +379,8 @@ Where: meditationMult = 1 + (meditationMultiplier - 1) / elementDistance Cost per 1 unit of destination: - rawCost = 10^(distance+1) - componentCost = 10 × (distance+1) per component + rawCost = 2 × distance + componentCost = 3 × distance per component All costs deducted from source regen (not from mana pool). Conversions pause if source regen < conversion cost.