52 lines
2.0 KiB
Markdown
52 lines
2.0 KiB
Markdown
# Sub-Task 9 Progress: StatsTab Mana Breakdown
|
|
|
|
## Status: Completed
|
|
|
|
## Completed Steps
|
|
- [x] Review Sub-Task 8 completion (get conversion drain data)
|
|
- [x] Design mana breakdown UI for StatsTab
|
|
- [x] Implement data fetching for each mana type's stats
|
|
- [x] Add modifiers display (attunements, conversion drains)
|
|
- [x] Test reactive updates
|
|
- [x] Commit and push changes
|
|
|
|
## Implementation Details
|
|
|
|
### Files Modified
|
|
1. **src/components/game/stats/ManaTypeBreakdown.tsx** (NEW)
|
|
- Created new component to display detailed breakdown for each mana type
|
|
- Shows current value, capacity, and effective regen rate
|
|
- Lists modifiers: attunement bonuses, conversion drains from Sub-Task 8
|
|
- Groups elements by category (base, composite, exotic, utility)
|
|
- Shows recipe for composite/exotic elements
|
|
- Includes progress bars for visual clarity
|
|
|
|
2. **src/components/game/tabs/StatsTab.tsx** (MODIFIED)
|
|
- Added import for ManaTypeBreakdown component
|
|
- Added ManaTypeBreakdown section after ManaStatsSection
|
|
|
|
### Features Implemented
|
|
- Raw Mana section with:
|
|
- Current/max display
|
|
- Progress bar with color coding
|
|
- Base regen, conversion drain, effective regen
|
|
- Per-attunement conversion drain breakdown
|
|
|
|
- Elemental Mana sections (for each unlocked element):
|
|
- Current/max display with element-specific colors
|
|
- Progress bar with element color
|
|
- Conversion rate from attunements
|
|
- Source attunement names and levels
|
|
- Recipe display for composite/exotic elements
|
|
|
|
### Testing
|
|
- `npm run build` completed successfully with no errors
|
|
- Component uses reactive data from store
|
|
- Properly handles conversion drains from Sub-Task 8
|
|
|
|
## Notes
|
|
- Uses `computeEffectiveRegenForDisplay` from mana-utils.ts for regen calculations
|
|
- Uses `getAttunementConversionRate` from attunements.ts for per-attunement drain
|
|
- Conversion drains are read from `store.conversionDrains` (populated by Sub-Task 8)
|
|
- Element categories (base, composite, exotic, utility) are preserved from ELEMENTS constant
|