BUG: Enchanting design/preparation/application progress not advanced by game tick #235
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug Description
The enchanting system's three-phase workflow (Design → Prepare → Application) is not completed because the game tick doesn't advance the progress of any of the three phases.
Root Cause
In
src/lib/game/stores/gameStore.ts, thetick()function handlescurrentActionchecks formeditate,climb,convert, andcraft, but there are no handlers for:design(enchantment design progress)prepare(equipment preparation progress)enchant(enchantment application progress)The
setDesignProgress,setPreparationProgress, andsetApplicationProgressstore actions exist but are never called with updated progress values during ticks.Impact
Files Involved
src/lib/game/stores/gameStore.ts— tick() function needs design/prepare/enchant handlerssrc/lib/game/crafting-design.ts—calculateDesignProgress()exists but is never calledsrc/lib/game/crafting-prep.ts— preparation tick logic exists but is never calledsrc/lib/game/crafting-apply.ts—calculateApplicationTick()exists but is never calledSuggested Fix
Add tick handlers in
gameStore.tssimilar to the existingcrafthandler:Playwright Testing Progress Summary
Confirmed Bug #1: Climb the Spire causes React #185 infinite loop
Confirmed Bug #2: Raw mana exceeds max cap
Current: 111.85941260450063 / 100— raw mana is 11.8% over its cap.Confirmed Bug #3: Spire tab shows inconsistent state after reset
"Armor: 10%"followed by stray"000"text — a rendering/formatting bug.Confirmed Bug #4 (from issue): Enchanting design/prepare/apply tick handlers missing
Finding #5: Enchantment Designer EffectSelector not rendering
Ongoing investigation of remaining tabs (Prepare, Apply, Golemancy, Achievements, Stats).
Fixed. Added enchanting design/prepare/apply tick handlers extracted to
pipelines/enchanting-tick.ts. Also fixedstartApplyingto setcurrentAction: 'enchant'(was missing). All three calculation functions (calculateDesignProgress,calculatePreparationTick,calculateApplicationTick) and completion helpers (createCompletedDesignFromProgress,completePreparation,applyEnchantments) already existed but were never called from the tick loop.