Commit Graph

125 Commits

Author SHA1 Message Date
n8n-gitea 0894ee8c55 fix: material cancellation refund uses flat 50% per spec §6.3
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m20s
2026-06-08 13:13:57 +02:00
n8n-gitea fa448f233c fix: deduct component consumption from element pools in mana conversion
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m20s
Bug #293: elementDrain was computed but never subtracted from element pools.
The tick pipeline now applies net regen (produced - drained) instead of
gross production to element pools, matching the spec §8 regen deduction model.
2026-06-08 12:43:16 +02:00
n8n-gitea 971b876537 fix: enforce discipline perk gating in enchantment design validation
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m19s
2026-06-08 11:39:43 +02:00
n8n-gitea 1e1fcdc6d4 fix: deduct raw mana cost when starting pact ritual (Issue #306)
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m18s
2026-06-08 11:22:03 +02:00
n8n-gitea 411c355a15 fix: Golemancy enchantment capacity, design persistence, and UI selectors
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m19s
- Fix enchantment capacity formula: multiply magicAffinity by 100 (spec treats it as percentage)
- Fix enterSpireMode preserving golemDesigns (only reset loadout/activeGolems per spec §9)
- Add mana type selector UI for Intermediate/Advanced/Guardian cores
- Add spell selector UI for circuits with spell slots

Fixes #310, #311, #312
2026-06-08 10:30:59 +02:00
n8n-gitea 1e99a57496 fix: golem combat runtime - elemental matchup, enchantment effects, spell damage/cost, armor pierce (issue #313)
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m21s
2026-06-08 10:12:18 +02:00
n8n-gitea 0e1e506213 fix: apply Crafting Efficiency cost reduction to all fabrication paths
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m18s
- Add getCraftingCostReduction() and applyCostReduction() helpers in crafting-fabricator.ts
- Apply cost reduction in deductMaterials() and checkFabricatorCosts()
- Apply cost reduction in startFabricatorCrafting() and cancelEquipmentCrafting() pipeline
- Update canCraftRecipe() in fabricator-recipes.ts to accept costReduction param
- Update FabricatorSubTab and MaterialRecipeCard UIs to display discounted costs
- Spec formula: actualCost = ceil(baseCost × (1 - craftingCostReduction / 100))

Fixes #316
2026-06-07 23:15:55 +02:00
n8n-gitea a11ea065eb fix: mana conversion attunement rate now uses flat base + linear multiplier per spec
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m17s
2026-06-07 23:06:03 +02:00
n8n-gitea e5097211ba fix: recovery room 10× regen/conversion multiplier double-counting bug
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m18s
2026-06-07 18:09:03 +02:00
n8n-gitea 1a0886f702 chore: golemancy redesign cleanup — remove orphaned legacy code and update docs
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m19s
2026-06-07 12:54:12 +02:00
n8n-gitea 59fe6cd111 feat: Complete Golemancy System Redesign - Component-Based Construction
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m18s
- Fix Crystal-Steel Hybrid Frame unlock to require Fabricator 5 + Enchanter 5 (dual attunement)
- Fix golem slot calculation: pass fabricator level to summon logic, cap at 7 (base 5 + discipline bonus)
- Integrate discipline golemCapacity bonus into slot calculation in combat-descent-actions and golem-combat pipeline
- Update GolemancyTab UI to show discipline slot bonus in header
- Add comprehensive test suite: golemancy-data.test.ts (344 lines) and golemancy-combat.test.ts (313 lines)
- All 1009 tests pass across 52 test files
2026-06-06 19:19:06 +02:00
n8n-gitea 9d4b3f3c69 fix: complete golemancy component-based redesign cleanup
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m18s
- Fix summonGolemsForRoom to use golemLoadout instead of removed enabledGolems
- Fix discBonus hardcoded to 0 in golem-combat.ts pipeline (now computed from discipline effects)
- Remove deprecated types: SummonedGolem, ActiveGolem, GolemDef
- Remove legacy GolemancyState fields: enabledGolems, summonedGolems, legacyActiveGolems
- Remove orphaned store actions: toggleGolem, setEnabledGolems
- Delete orphaned legacy data files: base-golems.ts, elemental-golems.ts, hybrid-golems.ts
- Update GolemDebugSection to use new golemLoadout system
- Update golemancy-spec.md §17 to reflect all features as complete
- Update all test files to match new type shapes
- All 958 tests passing
2026-06-06 18:37:09 +02:00
n8n-gitea bd15df85ff fix: add curse amplification to applyEnemyDefenses (spec §6.3)
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m19s
The curse debuff was stored on enemies via dot-runtime.ts but the
amplification was never applied to incoming damage. Added curse
magnitude check in applyEnemyDefenses (combat-tick.ts) that multiplies
incoming damage by (1 + magnitude) for each active curse effect.

- Curse amplification applied BEFORE dodge/barrier/armse defenses
- Multiple curse effects stack multiplicatively
- Non-curse effects (burn, freeze, etc.) are ignored for amplification

Also updated spire-combat-spec.md Known Gaps table to reflect:
- Melee defense bypass fixed (issue #285)
- Curse amplification now implemented (issue #286)

Added 9 regression tests in curse-amplification.test.ts.

All 957 tests pass (50 test files).
2026-06-06 17:46:39 +02:00
n8n-gitea 325949cc5f fix: melee attacks now apply enemy defenses (armor/barrier/dodge)
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m17s
Bug: Melee sword attacks passed null as the enemy to applyEnemyDefenses,
causing all enemy defenses (armor, barrier, dodge) to be bypassed.
Spell damage and DoT effects correctly went through defenses.

Fix: In combat-actions.ts melee loop, get the current target enemy
from currentRoom.enemies (lowest HP, matching focus-fire targeting)
and pass it to applyEnemyDefenses instead of null.

Added 7 regression tests in melee-defense-bypass.test.ts to verify:
- Melee damage is reduced by armor
- Melee damage is reduced by barrier
- Unarmored enemies take more damage than armored ones
- Full damage dealt when no defenses
- Focus-fire targeting (lowest HP enemy)
- Graceful handling of empty enemy list
- Comparison proving defense application

All 948 tests pass (49 test files).
2026-06-06 17:33:31 +02:00
n8n-gitea 4b7aa82953 feat(golemancy): Phase 1 - Component-based construction system data definitions
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m18s
- Add new golem component types (Core, Frame, MindCircuit, Enchantment)
- Create 4 Core tiers, 7 Frames, 4 Mind Circuits, 8 Enchantments
- Rewrite golem utils for component-based stat computation
- Update GolemancyState with new fields (golemDesigns, golemLoadout, activeGolems)
- Update combat store, actions, and pipelines for new golem system
- Rewrite GolemancyTab with component selection UI
- Update fabricator discipline perks for new system
- Add comprehensive tests for component registries and utilities
- All files under 400 lines, all 743 tests passing
2026-06-06 16:50:26 +02:00
n8n-gitea b54b10a899 fix: break circular dependency between combat-descent and non-combat-room actions
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m2s
2026-06-04 19:32:22 +02:00
n8n-gitea ee24227d62 feat: implement non-combat room gameplay (Library, Recovery, Treasure, Puzzle)
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m4s
2026-06-04 19:28:25 +02:00
n8n-gitea 40a50d34f4 fix: combat room progression - replace legacy room-utils with spire-utils, align UI with store state
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m1s
2026-06-04 18:54:33 +02:00
n8n-gitea ab3afae2a6 feat: overhaul mana conversion system to unified regen-deduction model
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m2s
- New files: element-distance.ts, conversion-costs.ts, conversion-rates.ts
- All conversion types (discipline, attunement, pact) use unified formula
- Conversion costs scale exponentially by element tier (10^(d+1) raw, 10*(d+1) per component)
- Costs deducted from regen, not from mana pool
- Auto-pause on insufficient regen with UI warning
- Meditation boosts conversion rates (reduced by distance)
- Attunement levels provide +50% multiplicative bonus per level
- Guardian pacts provide +0.15/hr base rate + invoker level bonus
- Removed convertMana, processConvertAction, craftComposite from manaStore
- Stats tab shows per-element conversion breakdown with formulas
- ManaDisplay shows per-element net regen rates
- All 916 tests pass, all files under 400 lines
2026-06-04 18:12:41 +02:00
n8n-gitea 23e629f37e feat: implement per-enemy damage application (spec §3.2)
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m6s
- Add applyDamageToRoom() function targeting individual enemies
- Add lowestHPEnemy() helper for focus-fire targeting
- AoE spells distribute damage across all enemies
- Single-target attacks hit lowest HP enemy first
- Refactor processCombatTick spell/equipment/melee/DoT damage to use per-enemy system
- Update golemApplyDamageToRoom in golem-combat pipeline for per-enemy targeting
- Add currentRoom to CombatTickResult and sync through gameStore
- Update combat-actions tests with proper enemy setup for per-enemy tests
- Extract combat-damage.ts module to stay under 400-line limit
2026-06-04 11:37:21 +02:00
n8n-gitea 8dde423526 feat: implement sword/melee auto-attack system (spec §3.1, §4.3)
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m1s
- Add calcMeleeDamage() with elemental matchup for enchanted swords
- Add meleeSwordProgress per-instance accumulator to combat state
- Add melee branch in processCombatTick (no mana cost, no Executioner/Berserker)
- Add baseDamage/attackSpeed stats to all 5 sword types
- Wire equippedSwords through gameStore to combat tick pipeline
- 16 new regression tests, all 937 tests pass
2026-06-03 21:59:30 +02:00
n8n-gitea b506f0bcc3 feat: implement DoT/debuff runtime system (spec §6, AC-12, AC-13)
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m18s
- Add ActiveEffect, EffectType types to game.ts; activeEffects + effectiveArmor on EnemyState
- Add SpellOnHitEffect + onHitEffect field to SpellDefinition
- Wire onHitEffect to fire (burn), death (curse), lightning (armor_corrode), frost (freeze), soul (bypassArmor burn)
- Add applyOnHitEffect() — applies on-hit effect on successful spell hit (spec §6.2)
- Add processDoTPhase() — ticks all active effects after weapon/golem attacks (spec §6.3)
- Add bypassArmor/bypassBarrier support in applyEnemyDefenses() (AC-13)
- Export standalone applyEnemyDefenses from combat-tick.ts for DoT pipeline
- Split DoT runtime into separate dot-runtime.ts (135 lines) to keep combat-actions.ts under 400 lines
- Update all enemy generation sites with activeEffects/effectiveArmor defaults
- Fix test helpers for new required fields

All 921 tests pass (45 test files)
2026-06-03 18:38:01 +02:00
n8n-gitea a2cdf6d21c feat: implement golemancy combat system (spec §6, §9)
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m19s
- Add ActiveGolem interface and activeGolems to GolemancyState
- Add maxRoomDuration to all 12 golem definitions
- Create golem-combat-actions.ts with pure golem combat logic (summoning, maintenance, attacks, room-duration)
- Create golem-combat.ts pipeline for golem combat setup
- Wire golem maintenance and attacks into processCombatTick
- Wire golem summoning into advanceRoomOrFloor on room entry
- Wire golem room-duration countdown into onFloorCleared callback
- Update combat-actions tests for new processCombatTick signature
- All 921 tests pass, all files under 400-line limit

Closes #259
2026-06-03 15:40:39 +02:00
n8n-gitea 7c0e740226 feat: implement regular enemy defenses — armor, barrier, dodge (spec §5.2)
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m20s
- Add applyEnemyDefenses() pipeline: dodge → barrier → armor for ALL enemies
- Add speed room + agile additive dodge (capped at 0.75, spec §4.5)
- Add mage barrier recharge per tick (spec §5.2)
- Add effectiveArmor support for armor_corrode debuff compatibility
- Pass enemy defense context via closure (no signature changes to onDamageDealt)
- Add 16 regression tests for defense mechanics
- All 921 tests pass (45 test files)
2026-06-03 14:27:14 +02:00
n8n-gitea 1b4e5cf5ac feat: implement spire descent system with room-aware navigation
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m18s
Implements the spec-driven spire multi-room climbing and descent system:
- Room navigation: currentRoomIndex, roomsPerFloor, startFloor, exitFloor
- Descent tracking: descentPeak, roomResetState, clearedRooms, isDescentComplete
- enterDescentMode: snapshots peak, sets climbDirection='down'
- advanceRoomOrFloor: room-by-room ascending/descending with floor transitions
- onEnterRoomDescend: per-room 50% reset check with auto-skip
- onEnterLibraryRoom: discipline XP scaled by floor
- Seeded PRNG for deterministic room counts and types
- UI: Descend button during ascent, Exit Spire only when isDescentComplete
- UI: Room X/Y display, room type badge, in-game time in RoomDisplay
- Extracted descent actions to combat-descent-actions.ts (file size limit)
- Updated tests for room-aware combat behavior

Spec: docs/specs/spire-climbing-spec.md §4.1-§4.9, §6
2026-06-03 12:40:42 +02:00
n8n-gitea 0e7ff203b6 fix: improve combat-happy-path e2e test reliability and speed
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m24s
- Add data-testid attributes to debug tab buttons (Fill Mana, +10K, +1K, discipline rows)
- Add runTicks(n) to debugBridge for fast-forwarding game ticks in E2E tests
- Fix Step 2: use data-testid selectors instead of fragile DOM traversal for discipline buttons
- Fix Step 4: replace 120s waitForTimeout with runTicks(6000) for deterministic combat
- Fix Step 5: replace 60s waitForTimeout with runTicks(3000)
- Fix Step 6: verify floor decrements after each Climb Down click using waitForFunction
- Fix Step 7: verify Exit Spire button visibility is gated on floor 1
- Remove leftover debug logging (btnInfo DOM inspection)
2026-06-02 15:46:28 +02:00
n8n-gitea fe78ae047f feat: rewrite fabricator e2e test with debug bridge for store access
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m22s
- Rewrite e2e/fabricator-happy-path.spec.ts from scratch:
  craft 8 gear pieces (1 per slot) via Fabricator UI,
  equip all via store bridge, verify equipment effects
- Add debugBridge.ts: exposes Zustand stores on window.__TEST__
  so Playwright can call store actions via page.evaluate()
- Import debugBridge in page.tsx as side-effect
- Uses Debug tab UI for attunement/element unlocking
- Uses store bridge for discipline XP, mana capacity, materials,
  recipe unlocking, and equipment slot assignment
- Test passes in ~3.5 minutes (155s craft time + setup)
2026-06-02 10:49:38 +02:00
n8n-gitea fa78c7a93a fix: bugs #238,#240,#244,#246 + docs #248 update
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m21s
- #238: Fix spire tab inconsistent state (Max Floor 1 but Floors Cleared 0) by not inflating maxFloorReached on enterSpireMode and preserving it on exitSpireMode
- #240: Fix guardian armor display stray text by extracting stat formatters in SpireSummaryTab
- #244: Improve discipline auto-pause UX with log messages and visual feedback on DisciplineCard
- #246: Fix raw mana exceeding max cap by recomputing maxMana after discipline XP gains
- #248: Update AGENTS.md (remove gitea_get_project_boards, add gitea_start_session, 22 mana types, 8 stores, updated guardian tiers)
- #248: Update README.md (remove Prisma/SQLite refs, update mana types/guardian tiers/discipline counts)
- #248: Update GAME_BRIEFING.md (8 stores, 22 mana types, 64 disciplines, 8-tier guardians, correct code architecture)
2026-06-01 13:54:28 +02:00
n8n-gitea 7dd9ad5b92 fix: multiple bug fixes - infinite loop crash, enchant tick handlers, discipline crash, Plasma symbol, desync
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m24s
- #236: Fix Climb the Spire React #185 infinite loop - removed redundant set() in processCombatTick that caused double Zustand writes per tick
- #235: Add enchanting design/prepare/apply tick handlers - extracted to pipelines/enchanting-tick.ts
- #235: Fix startApplying not setting currentAction to 'enchant'
- #243: Guard discipline store against undefined activeIds/processedPerks from corrupted persisted state
- #245: Change Plasma symbol from  (conflicts with Lightning) to 🔴
- #241: Fix combat store maxFloorReached desync - initialize to 0, reset on exitSpireMode
- #239: Fix EffectSelector not rendering when unlockedEffects is empty (fresh game)
- Created pipelines/enchanting-tick.ts to keep gameStore.ts under 400 lines
2026-06-01 12:57:52 +02:00
n8n-gitea 6793461a9f fix: issues #221 #217 #225 #227 #224 #226 - crafting refunds, mana tracking, cancel slot, multi-element guardians, spell kill advance
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m59s
2026-05-31 01:18:01 +02:00
n8n-gitea e4f4b297e8 fix: Bug fixes #218 #222 #220 #223 #215 #216 - attunement free mana, transference circular ref, guardian defeat tracking, discipline negative mana, guardian data, crafting refunds
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m23s
2026-05-30 22:28:45 +02:00
n8n-gitea b8e6d651b2 feat: guardian floors use guardian elements instead of fixed cycle
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m20s
2026-05-30 10:40:48 +02:00
n8n-gitea 7bd28e2085 feat: guardian defensive stats — shield, barrier, health regen + stat label renames
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m21s
2026-05-29 18:18:00 +02:00
n8n-gitea 644b76f16d feat: add fabricator disciplines for recipe unlocks
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m21s
- Add unlocksRecipes field to DisciplinePerk type
- Add study-fabricator-recipes discipline (earth/metal/sand/crystal recipes)
- Add study-wizard-branch discipline (wizard equipment recipes)
- Add study-physical-branch discipline (physical combat equipment recipes)
- Collect unlocksRecipes during discipline tick processing
- Pass recipe unlocks to crafting store via gameStore
- Add unlockRecipes action to craftingStore with persistence
- Filter fabricator recipes by unlock status in FabricatorSubTab UI
2026-05-29 15:42:09 +02:00
n8n-gitea 9e49aa1ca6 fix: update Steady Hand prestige upgrade with real enchantment power effect
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m23s
2026-05-29 15:23:40 +02:00
n8n-gitea e0e7beb495 fix: remove debug Skip to Floor 100 and Reset Floor HP buttons
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m22s
- Remove debugSetFloor and resetFloorHP actions from combatStore.ts
- Remove their type definitions from combat-state.types.ts
- Remove Skip to Floor 100 and Reset Floor HP buttons from GameStateDebugSection.tsx
- Remove same buttons from legacy GameStateDebug.tsx
- Remove floor quick-jump and Reset Floor HP from SpireDebugSection.tsx
- Remove associated tests from DebugTab.test.ts, store-actions.test.ts, store-actions-combat-prestige.test.ts
- Add missing src/test/setup.ts required by vitest config

These debug buttons created inconsistent game states by teleporting players
to floors without proper initialization (no spireMode, no room state, no
clearedFloors, no guardian encounters). resetFloorHP could be spammed to
infinitely retry any floor for free.
2026-05-29 14:54:52 +02:00
n8n-gitea a33e9429fe fix: resolve critical bugs - disciplines, debug reset, floating point, spire loop
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m21s
Fixes:
- Issue 193: Remove unnecessary useEffect that set activeTab when spireMode is true, and redundant setAction('climb') in SpireCombatPage
- Issue 194: Fix signed_pact prerequisite check in checkDisciplinePrerequisites by accepting signedPacts param; add 'At Limit' feedback on discipline button when concurrent limit reached
- Issue 195: Add resetDisciplines(), resetAttunements(), resetCrafting() calls to createResetGame; add resetCrafting action to crafting store
- Issue 196: Fix floating point display in ElementStatsSection (mana pools) and GameStateDebug (time); fix duplicate 'Base Regen' label in ManaStatsSection

All 917 tests pass. Files stay under 400-line limit.
2026-05-29 14:10:04 +02:00
n8n-gitea 6355cf308b fix: Elemental Mana Capacity disciplines now increase element capacity
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m23s
- Add optional baseMax field to ElementState to track prestige-derived max separately from bonuses
- Add computeElementMaxWithBonuses action to manaStore that computes max = baseMax + per-element bonus
- Apply per-element cap bonuses from disciplines and equipment in game tick (elementCap_* keys)
- Fix resetMana to use correct prestige key (elementalAttune instead of nonexistent elemMax)
- Add store migration (v1->v2) to populate baseMax for existing saved games
- Extract pact ritual processing to pipelines/pact-ritual.ts
- Extract element cap bonus utilities to utils/element-cap-bonus.ts
- Fix inline element types in crafting-fabricator.ts
- Update test fixtures to include baseMax in element literals

Fixes #185
2026-05-28 19:49:47 +02:00
n8n-gitea bc184cefb0 fix: defensive hardening — NaN guards, cast loop safety, discipline reset on new loop, spire mode maxFloorReached fix
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m20s
2026-05-28 18:14:19 +02:00
n8n-gitea 268baf3916 fix: auto-unlock element types when attunement conversion begins — Fabricator now unlocks earth
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m26s
2026-05-28 12:28:27 +02:00
n8n-gitea 3e70f481dc fix: set currentAction 'climb' and use generateSpireFloorState in enterSpireMode 2026-05-28 12:11:54 +02:00
n8n-gitea 5578721992 refactor: remove skill system leftovers, migrate click mana to discipline perk
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m30s
- Simplified getMeditationBonus() to continuous ramp formula
- Added click-mana capped perk to Mana Circulation discipline
- Removed manaWell/manaFlow/manaSpring skill reads and prestige upgrades
- Removed all skill fields from GameState and GameActionType
- Updated all call sites and tests (916 tests passing)

Closes #174
2026-05-28 11:50:06 +02:00
n8n-gitea b5996d5b6e fix: resolve circular dependency in discipline-slice → discipline-effects
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m30s
Replaced computeDisciplineEffects() import in discipline-slice.ts with
inline XP bonus calculation using calculateStatBonus from discipline-math.
This avoids the circular chain: discipline-effects → discipline-slice → discipline-effects.
2026-05-28 09:47:45 +02:00
n8n-gitea 8cebea9586 fix(#165,#166,#167,#168,#169,#171,#172): resolve 7 open bug issues
#172 - Grimoire tab: removed dead 'loaded' state guard that permanently showed loading
#169 - Transference Mana Flow: added elements param to checkDisciplinePrerequisites so mana type unlocks are verified
#168 - Perk descriptions: wired 4 broken perks (enchant-2, channel-1, golem-2, efficiency-1) with actual bonus effects; fixed enchant-1 interval (5→50); fixed study-mana-enchantments stat (maxMana→maxManaBonus)
#171 - Shields: removed all shield equipment (4 types), recipes, category, slot mappings; added 'shields' to AGENTS.md banned list
#166 - regenMultiplier: merged disciplineEffects.multipliers.regenMultiplier into computeAllEffects()
#165 - Meditation cap: added meditationCap display to ManaStatsSection UI; updated perk description
#167 - XP accumulation: added Meditative Mastery base discipline with disciplineXpBonus stat; wired into tick pipeline
2026-05-28 09:32:43 +02:00
n8n-gitea 27500f37b7 fix(#170): wire fabricator crafting completion + bonus enchantments + remove dead code
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m22s
2026-05-27 21:08:41 +02:00
n8n-gitea 7279050101 fix: repair persistence - safe-persist getItem now returns parsed objects, fix resetGame localStorage keys
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m22s
- safe-persist.ts: getItem now calls JSON.parse(str) so Zustand receives {state, version} envelope
- gameActions.ts: fix 5 wrong localStorage keys in createResetGame (mana→mana-storage, etc.)
- Add persistence.test.ts with 12 tests covering round-trip, key verification, and reset
- All 918 tests pass with zero regressions
2026-05-27 19:14:01 +02:00
n8n-gitea 3f20991d2d feat: add material crafting recipes to Fabricator
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 4m25s
2026-05-27 14:13:46 +02:00
n8n-gitea 7962a4fdaa fix: discipline reset on mana depletion and re-activation after stop
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m35s
- #143: processTick now removes drained disciplines from activeIds and calls onStopPracticing so currentAction resets to 'meditate'
- #144: Removed paused guard from canProceedDiscipline so stopped disciplines can be re-activated
- Updated test to match new expected behavior for paused disciplines
2026-05-27 11:13:08 +02:00
n8n-gitea 64b472572b fix: fabricator recipes now use correct elemental mana type
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m37s
- fabricator-recipes.ts: add optional manaType param to canCraftRecipe for clarity
- FabricatorSubTab.tsx: read elemental mana from store based on recipe manaType instead of always using rawMana
- craftingStore.ts: add startFabricatorCrafting action that deducts correct mana type
- craftingStore.types.ts: add startFabricatorCrafting to CraftingActions interface
- crafting-fabricator.ts: new helper file to keep craftingStore.ts under 400 lines

Fixes #155
2026-05-27 11:06:24 +02:00
n8n-gitea 707a1eef31 fix: add error logging, missing persist fields, and version to store configs
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m25s
- safe-persist.ts: add console.error logging to setItem catch block (was silently swallowing all errors)
- manaStore.ts: add meditateTicks to partialize (was lost on refresh)
- combatStore.ts: add currentAction, currentRoom, comboHitCount, floorHitCount, totalSpellsCast, totalDamageDealt, totalCraftsCompleted to partialize
- All 8 stores: add version: 1 to persist configs for future schema migration safety

Fixes #147
2026-05-27 10:45:39 +02:00