All checks were successful
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 3m9s
- Increase attunement mana conversion rates (0.2 -> 2 for Enchanter) - Hide mana types with current < 1 in ManaDisplay and LabTab - Only show owned equipment types when designing enchantments
125 lines
6.7 KiB
Markdown
Executable File
125 lines
6.7 KiB
Markdown
Executable File
# Crafting & Equipment System Implementation Summary
|
||
|
||
## Overview
|
||
Replaced the combat skills system with a comprehensive equipment and enchantment system. Players now gain combat abilities through enchanted equipment rather than skills.
|
||
|
||
## Completed Tasks
|
||
|
||
### 1. Equipment System (✅ Complete)
|
||
- **File**: `/src/lib/game/data/equipment.ts`
|
||
- 8 equipment slots: mainHand, offHand, head, body, hands, feet, accessory1, accessory2
|
||
- 20+ equipment types across categories: caster, shield, catalyst, head, body, hands, feet, accessory
|
||
- Capacity system: Each equipment has base capacity for enchantments
|
||
- Starting equipment: Basic Staff (with Mana Bolt), Civilian Shirt/Gloves/Shoes
|
||
|
||
### 2. Enchantment Effects Catalogue (✅ Complete)
|
||
- **File**: `/src/lib/game/data/enchantment-effects.ts`
|
||
- 100+ enchantment effects across 7 categories:
|
||
- **Spell** (40+): Grant ability to cast specific spells
|
||
- **Mana** (20+): Capacity, regen, efficiency bonuses
|
||
- **Combat** (15+): Damage, crit, attack speed
|
||
- **Elemental** (10+): Elemental damage bonuses
|
||
- **Defense** (4): Damage reduction, mana shields
|
||
- **Utility** (8): Study speed, meditation, insight
|
||
- **Special** (12): Unique effects like echo, lifesteal, executioner
|
||
|
||
### 3. Crafting Store Slice (✅ Complete)
|
||
- **File**: `/src/lib/game/store/craftingSlice.ts`
|
||
- Equipment instance management
|
||
- Enchantment design workflow
|
||
- Preparation progress tracking
|
||
- Application progress with mana consumption
|
||
- Helper functions for computing equipment effects
|
||
|
||
### 4. CraftingTab UI Component (✅ Complete)
|
||
- **File**: `/src/components/game/tabs/CraftingTab.tsx`
|
||
- 4 sub-tabs: Equipment, Design, Enchant, Craft
|
||
- Equipment slot visualization with rarity colors
|
||
- Effect catalogue with capacity preview
|
||
- Design creation workflow
|
||
|
||
### 5. Type Definitions (✅ Complete)
|
||
- **File**: `/src/lib/game/types.ts`
|
||
- EquipmentInstance, AppliedEnchantment, EnchantmentDesign interfaces
|
||
- Crafting progress states (DesignProgress, PreparationProgress, ApplicationProgress)
|
||
|
||
### 6. Skill Evolution Cleanup (✅ Complete)
|
||
- **File**: `/src/lib/game/skill-evolution.ts`
|
||
- Removed combatTrain evolution path (orphaned - skill not in SKILLS_DEF)
|
||
- Removed COMBAT_TRAIN upgrade definitions
|
||
|
||
### 7. Bug Fixes (✅ Complete)
|
||
- Fixed CraftingTab icon imports (Ring → Circle, HandMetal → Hand)
|
||
|
||
## Remaining Tasks (Future Work)
|
||
|
||
### 1. Equipment-Granted Spells in Combat (Medium Priority)
|
||
- The `equipmentSpellStates` array exists but isn't fully utilized
|
||
- Combat tick should check for equipment-granted spells
|
||
- Multi-spell casting from different equipment pieces
|
||
- Individual spell cooldown tracking
|
||
|
||
### 2. SpellsTab Integration (Low Priority)
|
||
- Add section showing equipment-granted spells
|
||
- Indicate which equipment piece grants each spell
|
||
- Distinguish between learned vs equipment-granted spells
|
||
|
||
### 3. Evolution Paths for Crafting Skills (Low Priority)
|
||
- Add evolution paths for existing crafting skills:
|
||
- `effCrafting` → Efficient Enchanter
|
||
- `durableConstruct` → Master Artisan
|
||
- `fieldRepair` → Field Engineer
|
||
|
||
## System Architecture
|
||
|
||
```
|
||
Equipment System Flow:
|
||
┌─────────────────────────────────────────────────────────────┐
|
||
│ Equipment Instance │
|
||
│ - typeId: Reference to EquipmentTypeDef │
|
||
│ - enchantments: AppliedEnchantment[] │
|
||
│ - usedCapacity / totalCapacity │
|
||
│ - rarity: Based on total capacity used │
|
||
└─────────────────────────────────────────────────────────────┘
|
||
│
|
||
▼
|
||
┌─────────────────────────────────────────────────────────────┐
|
||
│ Enchantment Design │
|
||
│ 1. Select effects from catalogue │
|
||
│ 2. Check capacity constraints │
|
||
│ 3. Pay design time cost │
|
||
└─────────────────────────────────────────────────────────────┘
|
||
│
|
||
▼
|
||
┌─────────────────────────────────────────────────────────────┐
|
||
│ Preparation │
|
||
│ - Clear existing enchantments │
|
||
│ - Pay mana cost (equipment capacity × 5) │
|
||
│ - Wait preparation time (capacity / 5 hours) │
|
||
└─────────────────────────────────────────────────────────────┘
|
||
│
|
||
▼
|
||
┌─────────────────────────────────────────────────────────────┐
|
||
│ Application │
|
||
│ - Continuous mana drain during application │
|
||
│ - Time based on total effect capacity │
|
||
│ - Can be paused if mana runs low │
|
||
│ - On completion: Apply enchantments to equipment │
|
||
└─────────────────────────────────────────────────────────────┘
|
||
```
|
||
|
||
## Key Design Decisions
|
||
|
||
1. **Capacity System**: Equipment has capacity that limits total enchantment power. This creates meaningful choices about which effects to apply.
|
||
|
||
2. **Effect Categories**: Each equipment type only accepts certain effect categories, creating specialization:
|
||
- Staves: All spell types + mana + combat + elemental
|
||
- Shields: Defense + utility only
|
||
- Accessories: Small bonuses, no spells
|
||
|
||
3. **Stacking Effects**: Many effects can be stacked multiple times for increased power, with increasing capacity costs.
|
||
|
||
4. **Rarity from Power**: Rarity is automatically calculated from total capacity used, making powerful enchantments visually distinctive.
|
||
|
||
5. **Time-Gated Application**: Enchantment application takes real time with continuous mana drain, preventing instant power spikes.
|