Redesign skill system with upgrade trees and tier progression
Some checks failed
Build and Publish Mana Loop Docker Image / build-and-publish (push) Has been cancelled

Major changes:
- Created docs/skills.md with comprehensive skill system documentation
- Rewrote skill-evolution.ts with new upgrade tree structure:
  - Upgrades organized in branching paths with prerequisites
  - Each choice can lead to upgraded versions at future milestones
  - Support for upgrade children and requirement chains
- Added getBaseSkillId and generateTierSkillDef helper functions
- Fixed getFloorElement to use FLOOR_ELEM_CYCLE.length
- Updated test files to match current skill definitions
- Removed tests for non-existent skills

Skill system now supports:
- Levels 1-10 for most skills, level 5 caps for specialized, level 1 for research
- Tier up system: Tier N Level 1 = Tier N-1 Level 10 in power
- Milestone upgrades at levels 5 and 10 with branching upgrade trees
- Attunement requirements for skill access and tier up
- Study costs and time for leveling
This commit is contained in:
Z User
2026-04-03 11:08:58 +00:00
parent 9044d0ed61
commit b78c979647
61 changed files with 16863 additions and 630 deletions

View File

@@ -633,3 +633,40 @@ Stage Summary:
- UI for selecting and managing golems
- Documentation updated
- Lint passes
---
Task ID: 28
Agent: Main
Task: Fix level upgrade reset loop bug and add golem display to SpireTab
Work Log:
- **Fixed upgrade reset bug in commitSkillUpgrades()**:
- Root cause: `commitSkillUpgrades()` was replacing ALL upgrades for a skill instead of merging by milestone
- When selecting level 10 upgrades, it would wipe out level 5 selections (and vice versa)
- Added optional `milestone` parameter (5 | 10) to the function
- When milestone is specified, the function now:
- Keeps existing upgrades from OTHER milestones
- Only replaces upgrades for the CURRENT milestone
- Updated type definition in GameStore interface
- Updated SkillsTab.tsx to pass `upgradeDialogMilestone` when committing
- **Fixed tier-up upgrade reset in tierUpSkill()**:
- Root cause: `tierUpSkill()` was setting new tier's upgrades to empty array `[]`
- When tiering up, all previous tier's upgrades were lost
- Now copies current tier's upgrades to the new tier
- Example: Tier 1's L5/L10 upgrades persist when becoming Tier 2
- **Added summoned golems display to SpireTab**:
- Imported GOLEMS_DEF and helper functions
- Added Mountain icon import
- Added "Active Golems" card that appears when golems are summoned
- Shows each golem's name, damage, attack speed, and armor pierce
- Displays attack progress bar when climbing
- AOE badge for golems with area attacks
Stage Summary:
- Level 5 and level 10 upgrades no longer reset each other
- Upgrades now carry over when tiering up to the next tier
- Players can safely select upgrades at both milestones across all tiers
- Summoned golems now visible in Spire tab during combat
- Lint passes, pushed to git (e2671d7)