- Add missing EquipmentCraftingProgress interface to types.ts
- Fix CraftingTab to accept store prop like other tabs
- Update attunement XP calculation: 1 XP per 10 capacity used (min 1)
- Change XP requirements: 1000 for lv2, 2500 for lv3, doubling thereafter
- Grant Enchanter XP when enchantments are applied
- Add equipmentCraftingProgress to GameState and persist config
- Add attunement XP system with level-scaled progression (100 * 3^(level-2) XP per level)
- Add addAttunementXP function with automatic level-up handling
- Add debug functions: debugUnlockAttunement, debugAddElementalMana, debugSetTime, debugAddAttunementXP, debugSetFloor
- Update attunement conversion to use level-scaled conversion rate
- Import getAttunementConversionRate, getAttunementXPForLevel, MAX_ATTUNEMENT_LEVEL in store
- Add mana pools display to ManaDisplay component with collapsible elements
- Add Debug tab with reset game, mana debug, time control, attunement unlock, element unlock
- Remove ComboMeter from UI (header and SpireTab)
- Remove 'scrollCrafting' capability from Enchanter attunement
- Add attunement level scaling (exponential with level)
- Add XP progress bar and level display in AttunementsTab
- Add getAttunementConversionRate and getAttunementXPForLevel functions
- MAX_ATTUNEMENT_LEVEL = 10 with 3^level XP scaling
- Added AchievementDef interface for achievement definitions
- Added AchievementState interface for tracking unlocked achievements
- Added achievements, totalSpellsCast, totalDamageDealt, totalCraftsCompleted to GameState
- Added default values for all new fields in makeInitial()
- Added all new fields to persist partialize function
- Fixes build error with achievements and stats tracking
- 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)'
- 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)'
- 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
- 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
- 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)
- 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
- 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
- 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.
- 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
- 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
- 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
- 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
- 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
- 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