Implement multiple game improvements
All checks were successful
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m53s

- Guardian barriers with 3x HP regen on guardian floors
- Compound mana types auto-unlock when components available
- Legs equipment slot with 5 equipment types
- Expeditious Retreat and movement enchantments for legs
- Fixed tests for current skill definitions (65/65 pass)
- New achievements for elements, attunements, and guardians
- Removed nonsensical mechanics (thorns, manaShield for player)
- Cleaned up skill test references to match current implementation
This commit is contained in:
Z User
2026-03-28 10:04:48 +00:00
parent 416b2fcde6
commit f07454e024
11 changed files with 991 additions and 339 deletions

View File

@@ -664,3 +664,192 @@ Stage Summary:
- Descent mechanic ensures player must survive entire climb in one go
- Blocking/dodging skills replaced with meaningful alternatives
- All lint checks pass
---
Task ID: 3
Agent: Explore
Task: Review and find nonsensical mechanics
Work Log:
- Read worklog.md to understand previous work (Task 20 already removed some blocking/dodging)
- Searched codebase for blocking, dodging, parry, evasion mechanics
- Searched for player health/HP references
- Searched for defense stats
- Searched for thorns/reflect damage mechanics
- Searched for healing mechanics that heal the player
- Reviewed familiar-slice.ts and familiars.ts for thorns and manaShield
- Reviewed skill-evolution.ts for defensive effects
- Reviewed attunements.ts for defensive mechanics
Stage Summary:
- **Found nonsensical mechanics that should be removed**:
## 1. FAMILIAR THORNS ABILITY (HIGH PRIORITY)
**Files**:
- `/home/z/my-project/src/lib/game/data/familiars.ts` (lines 45-50, 150, 214, 281, 349, 405)
- `/home/z/my-project/src/lib/game/familiar-slice.ts` (lines 36, 50, 264-265)
- `/home/z/my-project/src/components/game/tabs/FamiliarTab.tsx` (lines 81, 196, 334)
**Issue**: "Reflect X% damage taken" - The player has no health and doesn't take damage. This ability is meaningless.
- earthPebble familiar: thorns(2, 0.5)
- crystalGolem familiar: thorns(5, 1)
- shieldGuardian familiar: thorns(8, 1.5)
- ancientGolem familiar: thorns(15, 3)
- celestialGuardian familiar: thorns(25, 5)
## 2. FAMILIAR MANA SHIELD ABILITY (MEDIUM PRIORITY)
**Files**:
- `/home/z/my-project/src/lib/game/data/familiars.ts` (lines 74-79, 215, 282, 335, 351, 390, 406)
- `/home/z/my-project/src/lib/game/familiar-slice.ts` (lines 38, 52, 270-271)
**Issue**: "Shield absorbs X damage, costs 1 mana per X damage" - Since player doesn't take damage, this is useless.
- crystalGolem: manaShield(10, 2)
- shieldGuardian: manaShield(20, 4)
- voidWalker: manaShield(15, 3)
- ancientGolem: manaShield(30, 5)
- leviathanSpawn: manaShield(25, 5)
- celestialGuardian: manaShield(50, 10)
## 3. MANA NOVA UPGRADE (HIGH PRIORITY)
**File**: `/home/z/my-project/src/lib/game/skill-evolution.ts` (line ~161)
```
{ id: 'mw_t4_l10_nova', name: 'Mana Nova', desc: 'When taking damage, release 5% mana as damage', milestone: 10, effect: { type: 'special', specialId: 'manaNova', specialDesc: 'Defensive burst' } }
```
**Issue**: "When taking damage" - Player doesn't take damage, so this never triggers.
## 4. FLAVOR TEXT REFERENCE (LOW PRIORITY - COSMETIC)
**File**: `/home/z/my-project/src/lib/game/data/familiars.ts` (line 286)
```
flavorText: 'It stands motionless for hours, then suddenly moves to block danger.'
```
**Issue**: Just flavor text mentioning "block danger" - not a mechanic, but inconsistent with game design.
## 5. MANA TYPE 'barrier' (REVIEW NEEDED)
**File**: `/home/z/my-project/src/lib/game/attunements.ts` (line 46)
```
| 'barrier' // Warden - protection/defense
```
**Issue**: Warden attunement uses 'barrier' mana type. This may be fine if barrier mana is used for mana-related mechanics (like mana shields for mana, not HP), but the comment "protection/defense" is misleading since player has no health to protect.
## Recommendation:
1. **Remove thorns ability entirely** from familiar system - replace with a different offensive ability (e.g., "Retaliation: Deal X% of damage dealt as bonus damage")
2. **Remove manaShield ability entirely** from familiar system - replace with mana-related bonus (e.g., "Mana Buffer: +X max mana")
3. **Replace Mana Nova upgrade** with something that triggers on mana expenditure or combat actions instead of "taking damage"
4. **Update flavor text** to not reference blocking
5. **Clarify barrier mana type** purpose - if it's for mana mechanics, rename comment to reflect that
---
Task ID: 1
Agent: full-stack-developer
Task: Implement guardian barriers and floor health regen
Work Log:
- **Updated getFloorHPRegen() function** in store.ts:
- Changed guardian floors from 0 regen to 3% per hour (3x the usual)
- Non-guardian floors now have fixed 1% per hour regen
- This makes floors progressively harder during combat
- **Updated combat tick logic** in store.ts:
- Removed the condition that excluded guardian floors from HP regen
- All floors now regenerate HP during combat (climbing action)
- Guardian floors regen 3% per hour, non-guardian floors regen 1% per hour
- **Fixed initial barrier state** in makeInitial():
- Changed from hardcoded 0 to dynamic getFloorBarrier(startFloor)
- Ensures barriers are properly initialized if player starts on a guardian floor
- **Updated SpireTab UI** with improved barrier and HP regen display:
- Added Shield icon for barrier indicator
- Added "(no regen)" text to clarify barriers don't regenerate
- Improved barrier bar visual with gradient (gray tones)
- Added HP regen indicator during combat: shows "+X/hr" with pulsing Heart icon
- Added getFloorHPRegen import from store
- Added HOURS_PER_TICK, Heart, and Shield imports
Stage Summary:
- Guardian barriers are now fully functional as a one-time shield (no regen)
- All floors regenerate HP during combat, making battles more challenging
- Guardian floors regen 3% per hour, non-guardian floors regen 1% per hour
- UI clearly shows barrier status and HP regen rate during combat
- All lint checks pass
---
Task ID: 8
Agent: full-stack-developer
Task: Implement compound mana types
Work Log:
- **Added composite element utility functions to constants.ts**:
- `canUnlockCompositeElement()`: Checks if all recipe components are unlocked
- `getUnlockableCompositeElements()`: Returns list of composite elements that can be unlocked
- `getCompositeConversionRate()`: Calculates rate as half of slowest component rate
- `getBaseElementConversionRates()`: Gets rates from attunements for calculation
- **Updated store.ts tick function**:
- Added imports for new composite element functions
- Added composite element unlocking logic after attunement mana conversion
- When both components of a composite element are unlocked, the composite element unlocks
- Log message shows unlock with recipe (e.g., "🔮 Metal mana unlocked! (Fire + Earth)")
- Added composite element conversion logic:
- Calculates conversion rate as half of slowest component
- Converts from component elements to composite element
- Checks capacity and available mana before conversion
- Handles composite elements: metal (fire+earth), blood (life+water), wood (life+earth), sand (earth+water)
- Handles exotic elements: crystal (sand+mental), stellar (fire+light), void (dark+death)
- **Updated ManaDisplay.tsx UI**:
- Added `baseConversionRates` prop for showing composite conversion rates
- Sorted elements by category (base/utility first, then composite/exotic)
- Added "Compound Elements" section with Sparkles icon
- Shows recipe for each composite element (e.g., "🔥+⛰️" for Metal)
- Shows conversion rate (e.g., "+1.00/hr")
- Visual distinction with colored border accents
- **Updated page.tsx**:
- Added import for `getAttunementConversionRate` and `ATTUNEMENTS_DEF`
- Computed `baseConversionRates` from active attunements
- Passed `baseConversionRates` to ManaDisplay component
Stage Summary:
- Composite elements (metal, blood, wood, sand) automatically unlock when both components are unlocked
- Exotic elements (crystal, stellar, void) also supported with triple-component recipes
- Conversion rate is half of slowest component rate as specified
- UI shows compound elements in separate section with recipes and rates
- All lint checks pass
---
Task ID: 21
Agent: Main
Task: Complete remaining implementation tasks
Work Log:
- **Added legs equipment slot and category**:
- Updated EquipmentSlot type to include 'legs'
- Updated EquipmentCategory type to include 'legs'
- Added LEGS_ONLY helper for enchantment effects
- Added 5 pants equipment types (civilianPants, apprenticeTrousers, travelerPants, battleGreaves, arcanistLeggings)
- Updated getValidSlotsForCategory() to handle 'legs' category
- **Added Expeditious Retreat enchantment**:
- Movement effects category for legs equipment
- expeditious_retreat: Teleport down 5 floors when exiting spire (legs only)
- swift_descent: +20% faster floor descent (legs only)
- spire_runner: +10% movement speed in spire (legs and feet)
- Added EXPEDITIOUS_RETREAT to SPECIAL_EFFECTS constant
- **Updated tests for current skill definitions**:
- Fixed skill.test.ts to match current SKILLS_DEF
- All 65 tests pass
- Removed outdated skill references (combatTrain, arcaneFury, etc.)
- Added tests for attunement skills (enchanter, invoker, fabricator)
- Added tests for combination skills
- **Added new achievements**:
- Element Mastery: elementalDabbler, elementalMaster
- Compound Mana: alchemist, compoundCollector, exoticDiscovery
- Attunements: firstAttunement, dualAttunement, triAttunement, attunementLevel5, attunementLevel10
- Guardians: firstGuardian, guardianHunter, guardianVanquisher, barrierBreaker
Stage Summary:
- Legs equipment slot fully implemented with 5 equipment types
- Movement enchantments for spire navigation added
- All tests updated and passing (65/65)
- New achievements for progression milestones
- All lint checks pass