Commit Graph

22 Commits

Author SHA1 Message Date
zhipu 30eb6b93a8 fix: add missing LootInventory type and lootInventory state
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m15s
- Added LootInventory interface to types.ts with materials and blueprints
- Added lootInventory field to GameState interface
- Added default lootInventory state to makeInitial() in store.ts
- Added lootInventory to persist partialize function
- Fixes prerender error: 'Cannot read properties of undefined (reading materials)'
2026-03-27 18:09:05 +00:00
zhipu af3f59b259 fix: add missing ComboState type and default combo state
Build and Publish Mana Loop Docker Image / build-and-publish (push) Has been cancelled
- Added ComboState interface to types.ts with count, maxCombo, multiplier, elementChain, decayTimer
- Added combo field to GameState interface
- Added default combo state to makeInitial() in store.ts
- Added combo and attunements to persist partialize function
- Fixes prerender error: 'Cannot read properties of undefined (reading count)'
2026-03-27 18:05:49 +00:00
zhipu c51c8d8ff4 feat: Implement attunement system with 3 attunements
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m14s
- Add attunement types and state to game state
- Create attunements.ts with Enchanter, Invoker, Fabricator definitions
- Player starts with Enchanter attunement (right hand)
- Enchanter: transference mana, unlocks enchanting
- Invoker: gains mana types from pacts with guardians
- Fabricator: earth mana, crafts golems and earthen/metal gear
- Skills now have attunement field for categorization
- Update skill categories to be attunement-based
2026-03-27 16:53:35 +00:00
zhipu 7bf9fa3ff2 feat: Update starting message for attunement system
Build and Publish Mana Loop Docker Image / build-and-publish (push) Has been cancelled
- Change log message to reflect the Enchanter attunement
- Hint at the six other attunements hidden in the spire
2026-03-27 16:04:00 +00:00
zhipu 75026fcb0b feat: Implement attunement mana conversion
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m26s
- Add auto-conversion of raw mana to primary mana types in tick
- Each attunement converts raw mana at its defined rate
- Conversion scales with attunement level (+10% per level)
- Update state in tick to track primaryMana changes
2026-03-27 16:01:52 +00:00
zhipu d459276dcc feat: Initialize attunement state in game store
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 3m8s
- Add attunement state to makeInitial function
- Player starts with Enchanter attunement (right hand) unlocked
- Initialize all 7 attunement slots with default state
- Add primaryMana and primaryManaMax for all mana types
- Start with 10 transference mana (Enchanter's primary type)
2026-03-27 15:57:49 +00:00
zhipu 93e41cfc76 feat: Add attunement system foundation
Build and Publish Mana Loop Docker Image / build-and-publish (push) Has been cancelled
- Create attunements.ts with 7 attunement types:
  - Enchanter (right hand) - Transference mana, enchanting
  - Caster (left hand) - Form mana, spell damage
  - Seer (head) - Vision mana, critical hits
  - Warden (back) - Barrier mana, defense
  - Invoker (chest) - Guardian pact mana types
  - Strider (left leg) - Flow mana, speed
  - Anchor (right leg) - Stability mana, max mana
- Add AttunementState, ManaType types
- Add attunement fields to GameState
- Update SkillDef to include attunement field
2026-03-27 15:54:13 +00:00
zhipu 8a62a4faaf fix: Remove problematic effects and ensure insight only gained on loop reset
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m54s
- Remove armor pierce, mana equilibrium, perfect memory, free study, mind palace, elemental harmony, deep storage, double craft, pure elements
- Replace with balanced alternatives: first strike, flow mastery, quick grasp, efficient learning, deep understanding, elemental affinity, mana overflow, elemental surge, exotic mastery
- Remove insight-gaining effects (studyInsight, manaAscension, knowledgeOverflow, studyMastery)
- Ensure insight can ONLY be gained on loop reset
- Remove conversion-related upgrades (conversion not available to players)
- Fix duplicate effect IDs
2026-03-27 13:55:26 +00:00
zhipu e9e056a3f0 Fix critical bugs, add test framework, improve code quality
Build and Publish Mana Loop Docker Image / build-and-publish (push) Has been cancelled
- Fix syntax errors with missing brackets in store.ts and crafting-slice.ts
- Fix state mutation issues with lootInventory deep cloning
- Remove race condition from mid-tick set() call
- Fix COMBO_MASTER using wrong counter (totalTicks vs totalSpellsCast)
- Add null safety to hasSpecial() function
- Clamp mana to 0 in deductSpellCost() to prevent negative values
- Set up Vitest testing framework with 36 passing tests
2026-03-27 11:28:30 +00:00
zhipu 2f407071a4 Fix study system: per-hour mana cost instead of upfront, fix game time freeze bug, improve mobile UI
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m43s
2026-03-27 09:33:48 +00:00
zhipu a2c9af7d45 Remove familiar system to focus on guardian pacts
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m11s
- Remove familiar-slice.ts, familiars.ts data file, and FamiliarTab.tsx
- Remove all familiar types from types.ts (FamiliarRole, FamiliarAbilityType, etc.)
- Remove familiar state from GameState interface
- Remove familiar bonuses from combat calculations
- Remove familiar XP tracking from tick function
- Remove familiar tab from page.tsx UI

This simplifies the game to focus on guardian pacts as the primary
progression mechanic, avoiding the parallel familiar system that
diluted the importance of pacts.
2026-03-26 14:58:07 +00:00
zhipu c050ca3814 Remove Battle Fury consecutive hit multiplier feature
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m17s
- Remove BATTLE_FURY from SPECIAL_EFFECTS constant
- Remove consecutiveHits from GameState type
- Remove consecutive hit tracking from store.ts
- Replace Battle Fury upgrade with Critical Eye (+10% crit chance)
- Clean up computeDynamicDamage function signature
2026-03-26 13:59:59 +00:00
zhipu 3ce0bea13f feat: Implement study special effects
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m13s
- MENTAL_CLARITY: +10% study speed when mana > 75%
- STUDY_RUSH: First hour of study is 2x speed
- STUDY_MOMENTUM: +5% study speed per consecutive hour (max +50%)
- KNOWLEDGE_ECHO: 10% chance for instant study progress
- STUDY_REFUND: 25% mana back on study completion
- Add tracking for studyStartedAt and consecutiveStudyHours
- Reset tracking when study completes or stops
2026-03-26 13:38:55 +00:00
zhipu fec3a2b88f feat: Implement combat special effects
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m26s
- BATTLE_FURY: +10% damage per consecutive hit (resets on floor change)
- COMBO_MASTER: Every 5th attack deals 3x damage
- ADRENALINE_RUSH: Restore 5% mana on floor clear
- Add hitsThisTick tracking for proper consecutive hit counting
- Reset consecutiveHits when floor changes
2026-03-26 13:33:14 +00:00
zhipu 751b317af2 feat: Implement critical special effects (partial)
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m9s
- Add consecutiveHits to GameState for battle effects
- Implement MANA_ECHO (10% double mana on click)
- Implement EMERGENCY_RESERVE (keep 10% mana on new loop)
- Add foundation for BATTLE_FURY and COMBO_MASTER
- Add lifesteal and spell echo from equipment
- Add parallel study processing in tick
2026-03-26 13:24:04 +00:00
zhipu 315490cedb docs: Add README.md, update AGENTS.md, audit report, and massive refactoring
Documentation:
- Add comprehensive README.md with project overview
- Update AGENTS.md with new file structure and slice pattern
- Add AUDIT_REPORT.md documenting unimplemented effects

Refactoring (page.tsx: 1695 → 434 lines, 74% reduction):
- Extract SkillsTab.tsx component
- Extract StatsTab.tsx component
- Extract UpgradeDialog.tsx component
- Move getDamageBreakdown and getTotalDPS to computed-stats.ts
- Move ELEMENT_ICON_NAMES to constants.ts

All lint checks pass, functionality preserved.
2026-03-26 13:01:29 +00:00
zhipu 2ca5d8b7f8 refactor: Major codebase refactoring for maintainability
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 3m4s
Store refactoring (2138 → 1651 lines, 23% reduction):
- Extract computed-stats.ts with 18 utility functions
- Extract navigation-slice.ts for floor navigation actions
- Extract study-slice.ts for study-related actions
- Move fmt/fmtDec to computed-stats, re-export from formatting

Page refactoring (2554 → 1695 lines, 34% reduction):
- Use existing SpireTab component instead of inline render
- Extract ActionButtons component
- Extract CalendarDisplay component
- Extract CraftingProgress component
- Extract StudyProgress component
- Extract ManaDisplay component
- Extract TimeDisplay component
- Create tabs/index.ts for cleaner exports

This improves code organization and makes the codebase more maintainable.
2026-03-26 12:00:30 +00:00
zhipu 1d2dce75cc Add equipment crafting system
- Add crafting-recipes.ts with blueprint definitions and material requirements
- Update crafting-slice.ts with equipment crafting functions
- Add EquipmentCraftingProgress type and state
- Update CraftingTab.tsx with new Craft tab for equipment crafting
- Add material deletion functionality
- Update store.ts with equipment crafting methods
- Update page.tsx to pass new props to CraftingTab

Features:
- Players can craft equipment from discovered blueprints
- Crafting requires materials and mana
- Materials are obtained from loot drops
- New Craft tab in the crafting interface
- Shows blueprint details and material requirements
2026-03-26 11:04:50 +00:00
zhipu 4f4cbeb527 Add floor navigation system with up/down direction and respawn mechanics
- Added climbDirection state to track player movement direction
- Added clearedFloors tracking for floor respawn system
- Players can now manually navigate between floors using ascend/descend buttons
- Floors respawn when player leaves and returns (for loot farming)
- Enhanced LootInventory component with:
  - Full inventory management (materials, essence, equipment)
  - Search and filter functionality
  - Sorting by name, rarity, or count
  - Delete functionality with confirmation dialog
- Added updateLootInventory function to store
- Blueprints are now shown as permanent unlocks in inventory
- Floor navigation UI shows direction toggle and respawn indicators
2026-03-26 10:28:15 +00:00
Z User 7c5f2f30f0 pack 2026-03-25 16:35:56 +00:00
Z User 3b2e89db74 pack 2026-03-25 15:05:12 +00:00
Z User 5b6e50c0bd Initial commit 2026-03-25 07:22:25 +00:00