Add effects & skills audit report (Step 5)
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 3m32s
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 3m32s
This commit is contained in:
@@ -1,12 +1,14 @@
|
|||||||
# Effects & Skills Audit Report - Mana Loop Game
|
# Effects & Skills Audit Report - Mana Loop Game
|
||||||
|
|
||||||
**Date:** 2025-01-26
|
**Date:** 2025-01-27 (Updated)
|
||||||
**Auditor:** Senior Next.js Developer / Game Logic Reviewer
|
**Auditor:** Senior Next.js Developer / Game Logic Reviewer
|
||||||
**Scope:** Effects (`effects.ts`, `upgrade-effects.ts`), Skills (`constants/skills.ts`, `skill-evolution.ts`), Enchantments (`data/enchantments/`), Implementation (`store.ts`, `crafting-slice.ts`)
|
**Scope:** Effects (`effects.ts`, `upgrade-effects.ts`), Skills (`constants/skills.ts`, `skill-evolution.ts`), Enchantments (`data/enchantments/`), Implementation (`store.ts`, `crafting-slice.ts`)
|
||||||
|
|
||||||
|
**Status:** VERIFIED - Code inspection completed, issues confirmed in current codebase
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 1. Visual Inconsistencies (for effects/skills UI)
|
## 1. Visual Inconsistencies (Effect/Skill UI)
|
||||||
|
|
||||||
### 1.1 Missing Visual Feedback for Skill Upgrade Effects
|
### 1.1 Missing Visual Feedback for Skill Upgrade Effects
|
||||||
|
|
||||||
@@ -20,12 +22,12 @@
|
|||||||
|
|
||||||
| Issue | Location | Details |
|
| Issue | Location | Details |
|
||||||
|-------|----------|---------|
|
|-------|----------|---------|
|
||||||
| Enchantment effect power not displayed | EquipmentTab | The `enchantPower` multiplier from skills (Essence Refining, Enchanting perks) is never shown to the player |
|
| Enchantment effect power not displayed | EquipmentTab | The `enchantPower` multiplier from skills (Essence Refining, Enchanting perks) is never shown to the player - **BECAUSE IT'S NEVER COMPUTED** |
|
||||||
| Element capacity breakdown missing | StatsTab | While Bug 14 added mana breakdown, it may not show the per-type capacity bonuses from new skills |
|
| Element capacity breakdown missing | StatsTab | While Bug 14 added mana breakdown, it may not show the per-type capacity bonuses from new skills - **BECAUSE THEY'RE NOT IMPLEMENTED** |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 2. UX Friction Points (for skill/enchantment interactions)
|
## 2. UX Friction Points (Skill/Enchantment Interactions)
|
||||||
|
|
||||||
### 2.1 Skill Study Cost Confusion
|
### 2.1 Skill Study Cost Confusion
|
||||||
|
|
||||||
@@ -38,27 +40,28 @@
|
|||||||
|
|
||||||
| Issue | Location | Details |
|
| Issue | Location | Details |
|
||||||
|-------|----------|---------|
|
|-------|----------|---------|
|
||||||
| `enchantPower` multiplier never applied to enchantment effects | `effects.ts:computeEquipmentEffects()`, `upgrade-effects.ts:computeEffects()` | **CRITICAL**: The `enchantPower` stat (from Essence Refining skill and Enchanting perks) is defined but NEVER applied in any computation. Enchantment effects are calculated without this multiplier. |
|
| **`enchantPower` multiplier never applied to enchantment effects** | `effects.ts:computeEquipmentEffects()`, `upgrade-effects.ts:computeEffects()` | **CONFIRMED CRITICAL BUG**: The `enchantPower` stat is defined in 20+ skill perks but NEVER applied in any computation. Code inspection confirms: (1) `ComputedEffects` interface has NO `enchantPower` field, (2) `computeEffects()` switch statement has NO case for `enchantPower`, (3) `computeEquipmentEffects()` never multiplies enchantment values by `enchantPower` |
|
||||||
| No feedback when `essenceRefining` should apply | Entire enchantment system | The Essence Refining skill (max: 1, +10% enchantment effect power) is defined in `constants/skills.ts:35` but the effect never triggers because `enchantPower` isn't used |
|
| No feedback when `essenceRefining` should apply | Entire enchantment system | The Essence Refining skill (max: 1, +10% enchantment effect power) is defined in `constants/skills.ts:35` but the effect never triggers because `enchantPower` isn't implemented |
|
||||||
|
| EFFECT RESEARCH SKILLS (tier unlocks) may not actually unlock effects | `constants/skills.ts`, `EFFECT_RESEARCH_MAPPING` | Need to verify that studying `researchFireSpells` actually unlocks `spell_emberShot` and `spell_fireball` in the enchantment design UI |
|
||||||
|
|
||||||
### 2.3 Dead Code / Never-Triggered Logic
|
### 2.3 Dead Code / Never-Triggered Logic
|
||||||
|
|
||||||
| Issue | Location | Details |
|
| Issue | Location | Details |
|
||||||
|-------|----------|---------|
|
|-------|----------|---------|
|
||||||
| `enchantPower` stat never read | `upgrade-effects.ts`, `effects.ts` | The stat `enchantPower` appears in 20+ perk definitions in `skill-evolution.ts` but is never read by `computeEffects()` or `computeEquipmentEffects()` |
|
| **`enchantPower` stat defined 20+ times but NEVER READ** | `skill-evolution.ts` lines 794, 802, 817, 825, 840, 863, 871, 886, 916, 924, 939, 947, 962, 992, 1000, 1015, 1023, 1038, 1582, 1590 | All these perks define `{ type: 'multiplier', stat: 'enchantPower', value: 0.05-1.50 }` but nothing in `upgrade-effects.ts` or `effects.ts` reads this stat. **COMPLETE DEAD CODE** |
|
||||||
| `essenceRefining` skill has no effect | `constants/skills.ts:35` | Even if studied, the +10% enchantment effect power is never applied since `enchantPower` isn't implemented |
|
| `essenceRefining` skill has no effect | `constants/skills.ts:35` | Even if studied, the +10% enchantment effect power is never applied since `enchantPower` isn't implemented |
|
||||||
| `elemAttune` references in compute functions | `store.ts:340`, `utils/mana-utils.ts:30`, `store/computed.ts:51` | The legacy `elemAttune` skill is still referenced but the new per-mana-type skills (fireManaCap, etc.) from Bug 9 should be what's used |
|
| `elemAttune` references may be obsolete | `store.ts:340`, `skill-evolution.ts:1945-` | The legacy `elemAttune` skill is still referenced in `computeElementMax()` but the new per-mana-type skills (fireManaCap, etc.) from Bug 9 should be what's used - **BUT THEY'RE NOT INTEGRATED** |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 3. Missing Feedback / Empty States (for skill/enchantment results)
|
## 3. Missing Feedback / Empty States (Skill/Enchantment Results)
|
||||||
|
|
||||||
### 3.1 Missing Validation Feedback
|
### 3.1 Missing Validation Feedback
|
||||||
|
|
||||||
| Issue | Location | Issue |
|
| Issue | Location | Issue |
|
||||||
|-----------|----------|-------|
|
|-----------|----------|-------|
|
||||||
| No validation that per-mana-type capacity upgrades actually work | `store.ts`, `utils/mana-utils.ts` | Need to verify the new skills (fireManaCap, etc.) are properly increasing element capacity. The `computeElementMax` function still uses `state.skills.elemAttune` instead of checking per-type skills |
|
| **Per-mana-type capacity upgrades DON'T WORK** | `store.ts:computeElementMax()`, `utils/mana-utils.ts` | **CONFIRMED**: The `computeElementMax()` function (line 340) still uses `state.skills.elemAttune` instead of checking per-type skills. The new skills (fireManaCap, waterManaCap, etc.) from Bug 9 are DEFINED but NEVER APPLIED |
|
||||||
| No feedback when enchantment effect power bonus applies | Enchantment design/apply flow | Player doesn't know if their Essence Refining or Enchanting perks are affecting their enchantments |
|
| No feedback when enchantment effect power bonus applies | Enchantment design/apply flow | Player doesn't know if their Essence Refining or Enchanting perks are affecting their enchantments - **BECAUSE THEY DON'T** |
|
||||||
|
|
||||||
### 3.2 Missing Empty/Error States
|
### 3.2 Missing Empty/Error States
|
||||||
|
|
||||||
@@ -69,89 +72,196 @@
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 4. Suggested Improvements (with priority: high / medium / low)
|
## 4. Suggested Improvements (Priority: High / Medium / Low)
|
||||||
|
|
||||||
### HIGH Priority
|
### HIGH Priority
|
||||||
|
|
||||||
| ID | Improvement | Components Affected | Rationale |
|
| ID | Improvement | Components Affected | Rationale | Status |
|
||||||
|----|--------------|---------------------|-----------|
|
|----|--------------|---------------------|-----------|--------|
|
||||||
| H1 | **Implement `enchantPower` multiplier in enchantment calculations** | `effects.ts:computeEquipmentEffects()`, `upgrade-effects.ts:computeEffects()` | **CRITICAL BUG**: The `enchantPower` stat is defined in 20+ skill perks but NEVER applied. Need to: (1) Add `enchantPowerMultiplier` to `ComputedEffects` and `UnifiedEffects`, (2) Apply it in `computeEquipmentEffects()` when calculating enchantment effect values, (3) Ensure Essence Refining skill (+10%) and Enchanting perks actually work |
|
| **H1** | **Implement `enchantPower` multiplier in enchantment calculations** | `upgrade-effects.ts:computeEffects()`, `effects.ts:computeEquipmentEffects()`, `effects.ts:computeAllEffects()` | **CRITICAL BUG CONFIRMED**: The `enchantPower` stat is defined in 20+ skill perks but NEVER applied. Need to: (1) Add `enchantPower: number` to `ComputedEffects` interface (default: 1.0), (2) Add `case 'enchantPower': effects.enchantPower *= effect.value; break;` in `computeEffects()`, (3) Apply `enchantPower` in `computeEquipmentEffects()` when calculating enchantment effect values, (4) Merge into `UnifiedEffects` via `computeAllEffects()` | **NOT FIXED** |
|
||||||
| H2 | **Fix `computeElementMax` to use per-mana-type skills (Bug 9)** | `store.ts:computeElementMax()`, `utils/mana-utils.ts:computeElementMax()`, `store/computed.ts` | The function still uses `state.skills.elemAttune` but should check individual per-mana-type skills (fireManaCap, waterManaCap, etc.) and apply their bonuses to the respective element's max capacity |
|
| **H2** | **Fix `computeElementMax` to use per-mana-type skills (Bug 9)** | `store.ts:computeElementMax()`, `utils/mana-utils.ts`, `store/computed.ts` | **CONFIRMED BROKEN**: The function (line 340) uses `state.skills.elemAttune || 0` but should check individual per-mana-type skills (fireManaCap, waterManaCap, etc.) and apply their bonuses (+10% each level) to the respective element's max capacity | **NOT FIXED** |
|
||||||
| H3 | **Verify enchantment effect application uses unified effects** | `effects.ts`, `crafting-slice.ts` | Ensure `computeAllEffects()` (which merges skill upgrades + equipment effects) is used everywhere, not just `computeEquipmentEffects()` or `computeEffects()` separately |
|
| **H3** | **Verify enchantment effect application uses unified effects** | `effects.ts`, `crafting-slice.ts` | Ensure `computeAllEffects()` (which merges skill upgrades + equipment effects) is used everywhere, not just `computeEquipmentEffects()` or `computeEffects()` separately | **NEEDS VERIFICATION** |
|
||||||
|
|
||||||
### MEDIUM Priority
|
### MEDIUM Priority
|
||||||
|
|
||||||
| ID | Improvement | Components Affected | Rationale |
|
| ID | Improvement | Components Affected | Rationale | Status |
|
||||||
|----|--------------|---------------------|-----------|
|
|----|--------------|---------------------|-----------|--------|
|
||||||
| M1 | **Add visual indicators for active special effects** | SkillsTab, StatsTab | Show which special effects are active (e.g., "Mana Cascade: +0.1 regen per 100 max mana") with tooltip explanations |
|
| M1 | **Add visual indicators for active special effects** | SkillsTab, StatsTab | Show which special effects are active (e.g., "Mana Cascade: +0.1 regen per 100 max mana") with tooltip explanations | **NOT IMPLEMENTED** |
|
||||||
| M2 | **Display per-mana-type capacity upgrades in UI** | SkillsTab, StatsTab | Show which element types have capacity bonuses and their values. The new skills (fireManaCap, etc.) need clear UI representation |
|
| M2 | **Display per-mana-type capacity upgrades in UI** | SkillsTab, StatsTab | Show which element types have capacity bonuses and their values. The new skills (fireManaCap, etc.) need clear UI representation - **ONCE H2 IS FIXED** | **BLOCKED BY H2** |
|
||||||
| M3 | **Fix `elemAttune` legacy code references** | `store.ts`, `utils/mana-utils.ts`, `store/computed.ts` | Remove or deprecated references to `elemAttune` skill since per-mana-type skills (Bug 9) should handle this now. Or ensure backward compatibility |
|
| M3 | **Fix `elemAttune` legacy code references** | `store.ts`, `utils/mana-utils.ts`, `store/computed.ts`, `skill-evolution.ts` | Either (a) deprecate `elemAttune` and fully switch to per-mana-type skills, or (b) keep both with clear documentation. Currently `elemAttune` evolution path in `skill-evolution.ts:1945-` is potentially obsolete | **NEEDS DECISION** |
|
||||||
| M4 | **Add validation feedback for element mana costs** | SkillsTab, `store.ts:startStudying()` | When studying skills that require element mana (Bug 9, 11), show clear error messages about which element mana is needed and how much |
|
| M4 | **Add validation feedback for element mana costs** | SkillsTab, `store.ts:startStudying()` | When studying skills that require element mana (Bug 9, 11), show clear error messages about which element mana is needed and how much | **NOT IMPLEMENTED** |
|
||||||
| M5 | **Add `enchantPower` display to Enchantment UI** | EquipmentTab, Enchantment design/apply flow | Show player their current enchantment power multiplier from skills so they know the bonus is applying |
|
| M5 | **Add `enchantPower` display to Enchantment UI** | EquipmentTab, Enchantment design/apply flow | Show player their current enchantment power multiplier from skills so they know the bonus is applying - **ONCE H1 IS FIXED** | **BLOCKED BY H1** |
|
||||||
|
| M6 | **Verify Effect Research skills actually unlock enchantment effects** | `constants/skills.ts`, `EFFECT_RESEARCH_MAPPING`, Enchantment design UI | The mapping exists but need to verify studying `researchFireSpells` actually makes `spell_emberShot` and `spell_fireball` available in the UI | **NEEDS VERIFICATION** |
|
||||||
|
|
||||||
### LOW Priority
|
### LOW Priority
|
||||||
|
|
||||||
| ID | Improvement | Components Affected | Rationale |
|
| ID | Improvement | Components Affected | Rationale | Status |
|
||||||
|----|--------------|---------------------|-----------|
|
|----|--------------|---------------------|-----------|--------|
|
||||||
| L1 | **Clean up dead code (unused effect stats)** | `skill-evolution.ts`, `upgrade-effects.ts` | Remove or mark as deprecated the `enchantPower` stat if not being used, or add a TODO comment explaining the implementation plan |
|
| L1 | **Clean up dead code (unused effect stats)** | `skill-evolution.ts`, `upgrade-effects.ts` | Either implement `enchantPower` (H1) or remove/mark as deprecated the 20+ dead perk definitions | **BLOCKED BY H1** |
|
||||||
| L2 | **Add unit tests for per-mana-type capacity** | `skills.test.ts`, `store.test.ts` | Add tests verifying fireManaCap, waterManaCap, etc. properly increase the respective element's max capacity |
|
| L2 | **Add unit tests for per-mana-type capacity** | `skills.test.ts`, `store.test.ts` | Add tests verifying fireManaCap, waterManaCap, etc. properly increase the respective element's max capacity - **ONCE H2 IS FIXED** | **BLOCKED BY H2** |
|
||||||
| L3 | **Add unit tests for `enchantPower` when implemented** | `upgrade-effects.test.ts` | Once H1 is fixed, add tests verifying enchantment effects are properly multiplied |
|
| L3 | **Add unit tests for `enchantPower` when implemented** | `upgrade-effects.test.ts` | Once H1 is fixed, add tests verifying enchantment effects are properly multiplied | **BLOCKED BY H1** |
|
||||||
| L4 | **Standardize effect stat naming** | `upgrade-effects.ts`, `effects.ts` | Some stats use abbreviations (`regen`) while others use full names (`maxMana`). Consider standardizing |
|
| L4 | **Standardize effect stat naming** | `upgrade-effects.ts`, `effects.ts` | Some stats use abbreviations (`regen`) while others use full names (`maxMana`). Consider standardizing | **NICE TO HAVE** |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Summary of Critical Findings
|
## Summary of Critical Findings (VERIFIED)
|
||||||
|
|
||||||
### Broken Logic (Doesn't Work as Intended)
|
### Broken Logic (Doesn't Work as Intended) - CONFIRMED
|
||||||
|
|
||||||
1. **`enchantPower` multiplier is NEVER applied** (H1)
|
#### 1. **`enchantPower` multiplier is NEVER applied** (H1) - **CONFIRMED IN CODE**
|
||||||
- **Files**: `skill-evolution.ts` (defines perks with `stat: 'enchantPower'`), but `upgrade-effects.ts:computeEffects()` doesn't have a case for `enchantPower`
|
- **Files**:
|
||||||
- **Impact**: Essence Refining skill (+10% enchantment effect power) and all Enchanting tier perks that give `enchantPower` are completely useless
|
- `skill-evolution.ts`: Defines 20+ perks with `stat: 'enchantPower'` (lines 794, 802, 817, 825, 840, 863, 871, 886, 916, 924, 939, 947, 962, 992, 1000, 1015, 1023, 1038, 1582, 1590)
|
||||||
- **Fix**: Add `enchantPowerMultiplier` to `ComputedEffects`, apply it in `computeEquipmentEffects()` when calculating final enchantment effect values
|
- `upgrade-effects.ts:computeEffects()`: Switch statement (lines ~260-300) has **NO case for `enchantPower`**
|
||||||
|
- `effects.ts:computeEquipmentEffects()`: Never reads or applies `enchantPower`
|
||||||
|
- **Impact**:
|
||||||
|
- Essence Refining skill (+10% enchantment effect power) has **NO EFFECT**
|
||||||
|
- Enchanting talent tree perks (Artisan's Touch +10%, Greater Artisan +15%, etc.) are **USELESS**
|
||||||
|
- Pact-Weaving perks (Essence Weave +15%, Divine Weave +25%, etc.) **DON'T WORK**
|
||||||
|
- **Root Cause**: The `ComputedEffects` interface has no `enchantPower` field, and `computeEffects()` doesn't handle it
|
||||||
|
- **Fix Required**:
|
||||||
|
1. Add `enchantPower: number` to `ComputedEffects` interface (default: 1.0)
|
||||||
|
2. Add `case 'enchantPower': effects.enchantPower *= effect.value; break;` in `computeEffects()`
|
||||||
|
3. Apply `enchantPower` in `computeEquipmentEffects()` when calculating enchantment values
|
||||||
|
4. Merge `enchantPower` into `UnifiedEffects` in `effects.ts:computeAllEffects()`
|
||||||
|
|
||||||
2. **`computeElementMax` uses legacy `elemAttune` instead of new per-mana-type skills** (H2)
|
#### 2. **`computeElementMax` uses legacy `elemAttune` instead of new per-mana-type skills** (H2) - **CONFIRMED IN CODE**
|
||||||
- **Files**: `store.ts:340`, `utils/mana-utils.ts:30`, `store/computed.ts:51-52`
|
- **Files**:
|
||||||
- **Code**: `const base = 10 + (state.skills.elemAttune || 0) * 50 + ...`
|
- `store.ts:340`: `const base = 10 + (state.skills.elemAttune || 0) * 50 + (pu.elementalAttune || 0) * 25;`
|
||||||
- **Issue**: The new per-mana-type skills (fireManaCap, waterManaCap, etc.) from Bug 9 are defined but `computeElementMax` doesn't check them
|
- `constants/skills.ts:8-21`: Defines per-mana-type skills (fireManaCap, waterManaCap, etc.) with `max: 10, base: 200-350`
|
||||||
- **Fix**: Either (a) make the per-mana-type skills modify `elemAttune` equivalent, or (b) rewrite `computeElementMax` to sum up per-type bonuses
|
- **Issue**:
|
||||||
|
- `computeElementMax()` still uses `state.skills.elemAttune` (legacy skill)
|
||||||
|
- Per-mana-type skills (fireManaCap, etc.) are **DEFINED BUT NEVER INTEGRATED** into `computeElementMax()`
|
||||||
|
- Players can study fireManaCap but it **WON'T INCREASE** fire mana capacity
|
||||||
|
- **Fix Required**: Rewrite `computeElementMax()` to:
|
||||||
|
- Check per-mana-type skills: `state.skills.fireManaCap`, `state.skills.waterManaCap`, etc.
|
||||||
|
- Apply their bonuses: Each level = +10% capacity (per skill description)
|
||||||
|
- Either remove `elemAttune` reference or keep for backward compatibility
|
||||||
|
|
||||||
### Incomplete Implementation
|
### Incomplete Implementation - CONFIRMED
|
||||||
|
|
||||||
3. **Per-mana-type capacity upgrades (Bug 9) may not be integrated**
|
#### 3. **Per-mana-type capacity upgrades (Bug 9) are NOT integrated** - **CONFIRMED INCOMPLETE**
|
||||||
- **Files**: `constants/skills.ts:8-21` (defines skills), but no code applies these to element max capacity
|
- **Files**:
|
||||||
- **Need to verify**: Whether the skills actually work or if they're just defined but never applied
|
- `constants/skills.ts:8-21`: Defines 13 per-mana-type skills (fireManaCap, waterManaCap, airManaCap, earthManaCap, lightManaCap, darkManaCap, deathManaCap, metalManaCap, sandManaCap, lightningManaCap, transferenceManaCap)
|
||||||
|
- Each has `desc: "+10% [element] mana capacity"`, `max: 10`, `studyTime: 4-6`
|
||||||
|
- **Issue**: No code in `store.ts:computeElementMax()` checks these skills
|
||||||
|
- **Verification**: Code inspection confirms `computeElementMax()` only checks `elemAttune` and `elementalAttune` prestige upgrade
|
||||||
|
|
||||||
4. **`essenceRefining` skill has no effect** (related to #1)
|
#### 4. **`essenceRefining` skill has no effect** - **CONFIRMED**
|
||||||
- **File**: `constants/skills.ts:35`
|
- **File**: `constants/skills.ts:35`: `essenceRefining: { name: "Essence Refining", desc: "+10% enchantment effect power", ... max: 1 }`
|
||||||
- **Issue**: Skill can be studied, but +10% enchantment effect power is never applied
|
- **Issue**: Skill can be studied (costs 450 study time), but the +10% bonus is **NEVER APPLIED** because `enchantPower` isn't implemented
|
||||||
|
- **Player Impact**: Wasted time studying a skill that provides no benefit
|
||||||
|
|
||||||
### Dead Code (Never Triggers)
|
### Dead Code (Never Triggers) - CONFIRMED
|
||||||
|
|
||||||
5. **`enchantPower` stat is defined but never read**
|
#### 5. **`enchantPower` stat is defined 20+ times but NEVER read by any computation** - **CONFIRMED DEAD CODE**
|
||||||
- **Files**: `skill-evolution.ts` lines 794, 802, 817, 825, 840, 863, 871, 886, 916, 924, 939, 947, 962, 992, 1000, 1015, 1023, 1038, 1582, 1590
|
- **Files**: `skill-evolution.ts` lines 794, 802, 817, 825, 840, 863, 871, 886, 916, 924, 939, 947, 962, 992, 1000, 1015, 1023, 1038, 1582, 1590
|
||||||
- **All these perks define `stat: 'enchantPower'` but nothing reads it**
|
- **All these perks define `{ type: 'multiplier', stat: 'enchantPower', value: 0.05-1.50 }` but:**
|
||||||
|
- `upgrade-effects.ts:computeEffects()` has NO case for `enchantPower`
|
||||||
|
- `effects.ts:computeEquipmentEffects()` never multiplies enchantment values by `enchantPower`
|
||||||
|
- **Dead perks include**:
|
||||||
|
- Enchanting tree: Artisan's Touch (+10%), Greater Artisan (+15%), Expert Artisan (+25%), etc.
|
||||||
|
- Pact-Weaving tree: Essence Weave (+15%), Divine Weave (+25%), etc.
|
||||||
|
|
||||||
6. **`elemAttune` skill evolution path still exists but may be obsolete**
|
#### 6. **`elemAttune` skill evolution path is potentially obsolete** - **CONFIRMED**
|
||||||
- **File**: `skill-evolution.ts:1945-` (SKILL_EVOLUTION_PATHS.elemAttune)
|
- **File**: `skill-evolution.ts:1945-` (SKILL_EVOLUTION_PATHS.elemAttune)
|
||||||
- **Issue**: With per-mana-type skills (Bug 9), the generic `elemAttune` may be obsolete, but the evolution path still exists
|
- **Issue**: With per-mana-type skills (Bug 9), the generic `elemAttune` evolution path may be obsolete
|
||||||
|
- **Current state**: `computeElementMax()` still uses `state.skills.elemAttune` so it's still functional, but the new per-mana-type skills (fireManaCap, etc.) are NOT integrated
|
||||||
|
- **Recommendation**: Either (a) deprecate `elemAttune` and fully switch to per-mana-type skills, or (b) keep both with clear documentation
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Files Requiring Updates (Priority Order)
|
## Files Requiring Updates (Priority Order)
|
||||||
|
|
||||||
1. **H1**: Implement `enchantPower` in `upgrade-effects.ts` and `effects.ts`
|
1. **H1**: Implement `enchantPower` in `upgrade-effects.ts` and `effects.ts`
|
||||||
|
- Add `enchantPower: number` to `ComputedEffects` interface
|
||||||
|
- Add case in `computeEffects()` switch statement
|
||||||
|
- Apply in `computeEquipmentEffects()`
|
||||||
|
- Merge into `UnifiedEffects`
|
||||||
|
|
||||||
2. **H2**: Fix `computeElementMax` in `store.ts`, `utils/mana-utils.ts`, `store/computed.ts`
|
2. **H2**: Fix `computeElementMax` in `store.ts`, `utils/mana-utils.ts`, `store/computed.ts`
|
||||||
|
- Rewrite to check per-mana-type skills (fireManaCap, etc.)
|
||||||
|
- Apply +10% per level to respective element capacity
|
||||||
|
|
||||||
3. **H3**: Verify unified effects usage in `crafting-slice.ts`
|
3. **H3**: Verify unified effects usage in `crafting-slice.ts`
|
||||||
|
- Ensure `computeAllEffects()` is used everywhere
|
||||||
|
|
||||||
4. **M1**: Add special effects display to SkillsTab/StatsTab
|
4. **M1**: Add special effects display to SkillsTab/StatsTab
|
||||||
5. **M2**: Display per-mana-type upgrades in UI
|
- Show active special effects with tooltips
|
||||||
6. **M3**: Clean up `elemAttune` legacy references
|
|
||||||
|
5. **M2**: Display per-mana-type upgrades in UI (blocked by H2)
|
||||||
|
|
||||||
|
6. **M3**: Clean up `elemAttune` legacy references / decide on deprecation
|
||||||
|
|
||||||
7. **M4**: Add validation feedback for element mana costs
|
7. **M4**: Add validation feedback for element mana costs
|
||||||
|
|
||||||
|
8. **M6**: Verify Effect Research skills actually unlock enchantment effects
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Additional Findings from Code Inspection
|
||||||
|
|
||||||
|
### A. Missing `enchantPower` in `ComputedEffects` Interface
|
||||||
|
**File**: `upgrade-effects.ts:20-45`
|
||||||
|
- The `ComputedEffects` interface does NOT have an `enchantPower` field
|
||||||
|
- This is why `computeEffects()` can't process it - the field doesn't exist
|
||||||
|
|
||||||
|
### B. `computeElementMax` Function Analysis
|
||||||
|
**File**: `store.ts:335-345`
|
||||||
|
```typescript
|
||||||
|
export function computeElementMax(
|
||||||
|
state: Pick<GameState, 'skills' | 'prestigeUpgrades' | 'skillUpgrades' | 'skillTiers'>,
|
||||||
|
effects?: ComputedEffects
|
||||||
|
): number {
|
||||||
|
const pu = state.prestigeUpgrades;
|
||||||
|
const base = 10 + (state.skills.elemAttune || 0) * 50 + (pu.elementalAttune || 0) * 25;
|
||||||
|
|
||||||
|
// Apply upgrade effects if provided
|
||||||
|
if (effects) {
|
||||||
|
return Math.floor((base + effects.elementCapBonus) * effects.elementCapMultiplier);
|
||||||
|
}
|
||||||
|
return base;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
- **Issue**: Only checks `elemAttune` (legacy), not per-mana-type skills
|
||||||
|
- **Missing**: Checks for `fireManaCap`, `waterManaCap`, etc.
|
||||||
|
|
||||||
|
### C. Essence Refining Perk Definition
|
||||||
|
**File**: `skill-evolution.ts:794`
|
||||||
|
```typescript
|
||||||
|
createPerk('en_t1_l5_a', 'Artisan\'s Touch', '+10% Enchantment Power', 'A',
|
||||||
|
{ type: 'multiplier', stat: 'enchantPower', value: 0.10 }, false, 1.5, 5),
|
||||||
|
```
|
||||||
|
- This perk is defined but NEVER PROCESSED
|
||||||
|
|
||||||
|
### D. Effect Research Skills - Need Verification
|
||||||
|
**File**: `constants/skills.ts:46-82`
|
||||||
|
- Defines many Effect Research skills (researchFireSpells, researchWaterSpells, etc.)
|
||||||
|
- `EFFECT_RESEARCH_MAPPING` maps them to effect IDs
|
||||||
|
- **NEEDS VERIFICATION**: That studying these skills actually unlocks the effects in the enchantment design UI
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Testing Recommendations
|
||||||
|
|
||||||
|
### For H1 (enchantPower implementation):
|
||||||
|
1. Learn `Essence Refining` skill (+10% enchantment power)
|
||||||
|
2. Apply a `+50 max mana` enchantment - should give +55 with skill
|
||||||
|
3. Apply a `+10% damage` enchantment - should give +11% with skill
|
||||||
|
4. Verify spell effects are NOT affected (they don't have numeric values)
|
||||||
|
5. Test with higher tier perks like `Essence Weave` (+15%) and `Greater Weave` (+25%)
|
||||||
|
|
||||||
|
### For H2 (per-mana-type skills):
|
||||||
|
1. Study `fireManaCap` to level 1 (+10% fire mana capacity)
|
||||||
|
2. Check fire mana max - should be `base * 1.10`
|
||||||
|
3. Study to level 10 (+100% fire mana capacity)
|
||||||
|
4. Check fire mana max - should be `base * 2.0`
|
||||||
|
5. Repeat for other elements (water, air, earth, etc.)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Notes
|
## Notes
|
||||||
|
- The `enchantPower` issue is the **MOST CRITICAL** finding - it means the Essence Refining skill and Enchanting perks are completely useless
|
||||||
- The `enchantPower` issue is the most critical finding - it means the Essence Refining investigation (Bug 15) was partially correct in identifying issues, but the root cause is that `enchantPower` stat is never applied anywhere
|
- The per-mana-type capacity upgrades (Bug 9) are **NOT IMPLEMENTED** despite being defined in `constants/skills.ts`
|
||||||
- The per-mana-type capacity upgrades (Bug 9) need verification that they actually work - the skills are defined but may not be integrated into `computeElementMax`
|
|
||||||
- The `elemAttune` skill evolution path in `skill-evolution.ts` may need to be updated or removed since per-mana-type skills replace its functionality
|
- The `elemAttune` skill evolution path in `skill-evolution.ts` may need to be updated or removed since per-mana-type skills replace its functionality
|
||||||
- Consider adding debug logging or a "Effects Debug" panel to verify which effects are active and their values
|
- Consider adding debug logging or a "Effects Debug" panel to verify which effects are active and their values
|
||||||
|
- **PRIORITY**: Fix H1 and H2 before next release - players are studying skills that provide NO BENEFIT
|
||||||
|
|||||||
Reference in New Issue
Block a user