Commit Graph

325 Commits

Author SHA1 Message Date
n8n-gitea b68cc948a3 fix: ensure procedural guardian names are unique across floors
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m20s
- Modified generateGuardianName() in guardian-encounters.ts to add a cycleOffset (floor/50) that shifts prefix selection for the same elements at different 100-floor ranges
- For multi-element names, also shift the title by cycleOffset to further reduce collision chance
- Added regression test guardian-names-unique.test.ts with 7 test cases covering:
  * Previously colliding floors (170/370 crystal, 200/230 exotic convergence, 210/240 astral convergence)
  * All static guardian floors (10-240) uniqueness
  * All procedural guardian floors (250-490) uniqueness
  * Full range (10-490) uniqueness
  * Determinism check
  * Title format validation

Fixes #376
2026-06-12 10:05:27 +02:00
n8n-gitea 7e0e9b9f7c fix: Use BASE_ELEMENTS constant for debug unlock to prevent unlocking all 22 elements
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m18s
2026-06-12 09:45:15 +02:00
n8n-gitea 4b8cdb97d7 fix: resetGame button doesn't fully reset game state
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m18s
2026-06-12 09:05:35 +02:00
n8n-gitea 608d4c4ff7 fix: wrap GameOverScreen in ErrorBoundary and add defensive checks for day 30 blank page bug
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 2m25s
- Wrap GameOverScreen in ErrorBoundary in page.tsx to prevent blank page on render errors
- Add defensive Number.isFinite checks in GameOverScreen for all numeric props
- Add regression test for day 30 → game-over flow (day30-blank-page.test.ts)

Fixes #375
2026-06-12 07:01:43 +02:00
n8n-gitea 8b41f137d5 fix: update e2e tests for localhost and current game architecture
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m20s
- playwright.config.ts: change baseURL from dev site to localhost:3000
- combat-happy-path.spec.ts: fix climb button location (LeftPanel, not spire tab), fix descent via store, handle game-over from day overflow, reduce tick counts to avoid day 30 limit
- fabricator-happy-path.spec.ts: set currentAction to meditate before crafting (required by startFabricatorCrafting)
- playtest.spec.ts: rewrite from scratch — use localhost, window.__TEST__ bridge (not window.__debug), current tab names (no grimoire/element tabs), split into 3 files under 400-line limit
  - playtest-basic-ui.spec.ts: sections 1-3 (basic UI, stats, spire)
  - playtest-tabs.spec.ts: sections 4-11 (all tab navigation tests)
  - playtest-debug.spec.ts: sections 12-14 (debug tab, bridge, stress test)
2026-06-11 16:09:44 +02:00
n8n-gitea ae8d669c71 fix: correct ENCHANTMENT_SPELLS import path in combat-damage.ts
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m25s
2026-06-11 12:43:33 +02:00
n8n-gitea 048ffa6ab1 fix: truncate procedural guardian names to key elements only
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m2s
2026-06-11 12:27:16 +02:00
n8n-gitea b15dde26b3 fix: remove duplicate activity log messages after Spire exit
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m1s
2026-06-11 12:10:35 +02:00
n8n-gitea 1dce061cdd fix: persist enchantment design state across tab navigation
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m2s
- EnchantmentDesigner now reads selection state directly from useCraftingStore
  instead of receiving it as props, so state survives tab unmount/remount
- EnchanterSubTab no longer uses local useState for selectedEquipmentType,
  selectedEffects, designName, selectedDesign — all sourced from store
- Removed unused EnchantmentDesignerProps interface from types
- All 1158 existing tests pass, no new type errors introduced

Fixes #366
2026-06-11 11:54:45 +02:00
n8n-gitea 9476e92a4b fix: resolve 7 medium-priority bugs from audit #372
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m1s
- #371: Replace Math.random() with seeded PRNG in getSpireEnemyArmor/Barrier
- #370: Add mana refund when cancelling pact ritual in cancelPactRitual
- #367: Add ENCHANT_MASTERY check for design slot 2 in crafting store
- #364: Fix useGameDerived to read crafting data from useCraftingStore
- #363: Clamp recovery room regen delta to prevent negative mana loss
- #365: Add shield/barrier/healthRegen fields to all procedural guardians
- #362: Refactor enchanting tick pipeline to return writes instead of direct store calls

Extracted procedural guardian generators into guardian-procedural.ts to stay under 400-line limit.

All 1158 tests pass.
2026-06-11 11:37:06 +02:00
n8n-gitea 2d9f0042ef fix: clear autoPaused flag when deactivating discipline
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m2s
2026-06-11 09:08:43 +02:00
n8n-gitea 512fea8e31 fix: align signingCost.mana with pactCost for procedural guardians (Tiers 4-8)
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m1s
2026-06-11 09:05:49 +02:00
n8n-gitea e22c6cef65 fix: cap pact interference penalty at 1.0 to prevent negative multipliers with 4+ pacts
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m3s
2026-06-11 09:02:47 +02:00
n8n-gitea aa5d2abd68 fix: implement fabricator attunement unlock condition (floor 20 guardian)
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m3s
2026-06-10 23:01:32 +02:00
n8n-gitea 05232ae03b fix: check victory condition before game-over on day overflow
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m3s
2026-06-10 22:57:34 +02:00
n8n-gitea 51710e2e1b fix: handle duplicate component keys in conversion cost recipes
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m2s
2026-06-10 22:55:49 +02:00
n8n-gitea 092e6a3d52 fix: correct quickStart prestige upgrade property name in resetMana
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m4s
2026-06-10 21:51:03 +02:00
n8n-gitea 7440b63b2e fix: reject negative amounts in spendRawMana, spendElementMana, addRawMana, addElementMana, and unlockElement to prevent mana exploit
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m4s
2026-06-10 21:48:29 +02:00
n8n-gitea 33be133813 fix: resolve 3 critical bugs — #354 attunement ReferenceError, #353 preparation mana exploit, #352 golem mana wipe
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m1s
- #354: unlockAttunement now uses _get() instead of undefined 'state' variable
- #353: startPreparing now deducts raw mana from the mana store after validation
- #352: processGolemAttacks/processBasicAttack accept current mana as params instead of initializing to 0/{}
- Updated golem-combat-actions.test.ts to pass new currentRawMana/currentElements params
- Added regression tests for all 3 bugs (16 new tests, all passing)
2026-06-10 20:49:46 +02:00
n8n-gitea 43bb53e0b4 fix: remove misleading Floor HP bar from SpireHeader, keep guardian name display
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m1s
2026-06-10 13:12:48 +02:00
n8n-gitea 1708926f8b fix: correct Crystal and Stellar recipes in conversion-costs.ts to match elements.ts
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m5s
2026-06-10 13:09:24 +02:00
n8n-gitea e30962f82f fix: add Critical Chance display to Stats tab Combat Stats section
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m2s
2026-06-10 12:55:26 +02:00
n8n-gitea 62979ea4c7 fix: #346 #345 spell casting guards and equipment spell wiring
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m4s
Issue #346: Added floorHP > 0 guard to primary and equipment spell casting
while loops in combat-actions.ts. Previously spells continued casting and
draining mana after all enemies were dead.

Issue #345 Bug A: Populated equipmentSpellStates from equipped gear in
gameStore.ts combat tick setup using getActiveEquipmentSpells(). Previously
equipment spell enchantments (e.g., spell_manaBolt on casters) never fired
during combat because equipmentSpellStates was always empty.

Issue #345 Bug B: Added deductWeaponEnchantCosts() helper in combat-damage.ts
and wired it into the melee loop in combat-actions.ts. Weapon enchant spells
(fireBlade, frostBlade, lightningBlade, voidBlade) now properly deduct mana
per melee hit instead of providing free elemental bonus damage.

All 1141 tests pass (65 test files), no regressions. Added 5 new regression tests.

Files changed:
- combat-actions.ts: +floorHP>0 guards, weapon enchant cost deduction
- combat-damage.ts: +deductWeaponEnchantCosts() helper
- gameStore.ts: +equipment spell state population from equipped gear
- spell-cast-floorhp-guard.test.ts: new regression test file
2026-06-10 12:48:18 +02:00
n8n-gitea 48eee17d43 fix: deactivate all disciplines when entering/exiting the Spire
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m20s
- Add deactivateAll() action to discipline-slice.ts
- Call deactivateAll() in createEnterSpireMode() (combat-descent-actions.ts)
- Add spireMode guard in gameStore.ts tick() to skip discipline processTick
- Call deactivateAll() in exitSpireMode() (combatStore.ts) as safety measure
- Extract buildConversionParams to utils/conversion-params.ts to keep gameStore.ts under 400 lines
- Add regression tests (5 tests, all 1136 passing)

Fixes #347
2026-06-10 11:41:25 +02:00
n8n-gitea 076282caf3 fix: resolve elemental mana conversion pause bug (#348)
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m22s
Two root causes fixed:
1. gameStore.ts: computeRegen now receives actual attunements instead of empty {}, so rawGrossRegen includes attunement contributions (was ~2/hr, now correct 3000+/hr)
2. gameStore.ts buildConversionParams: use rawManaRegen with level scaling (1.5^(level-1)) instead of conversionRate for per-element grossRegen
3. LeftPanel.tsx: same grossRegen fix + include attunement regen in rawGrossRegen display
4. ElementStatsSection.tsx: same grossRegen fix
5. useGameDerived.ts: pass actual attunements to computeRegen for baseRegen calculation

Added regression test: conversion-pause-bug-regression.test.ts (7 tests)
2026-06-10 11:19:10 +02:00
n8n-gitea bdf2b0050f fix: apply mana drain when practicing disciplines
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m25s
- processTick() now calls calculateManaDrain() for non-conversion disciplines
- Insufficient mana triggers auto-paused state (skips XP accrual)
- Conversion disciplines (sourceManaTypes) correctly skip pool drain
- Auto-paused disciplines can be re-activated when mana is restored
- Updated 7 tests across 3 files to reflect drain model
2026-06-10 10:50:40 +02:00
n8n-gitea 432378fa86 fix: format hour display on Loop End screen to avoid floating-point precision errors
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m22s
- Use formatHour() instead of raw {hour} to display time in HH:MM format
  (e.g. '15:00' instead of '14.999999999999998')
- Export formatHour from stores barrel index
- Fixes #336
2026-06-10 10:14:16 +02:00
n8n-gitea 85637e353a fix: add missing elements migration and harden unlockElement action
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m20s
- Add missing elements to mana store migration: when loading an old save
  that doesn't have all elements from ELEMENTS (e.g. saves from before
  composite/exotic elements were added), the migration now creates the
  missing elements with proper default state
- Harden unlockElement action to handle the case where an element doesn't
  exist in the store (creates a valid element state instead of corrupting
  with { unlocked: true } missing current/max/baseMax)
- Add regression tests (14 tests) for Earth element unlock and migration
  scenarios including old saves with missing elements

Fixes #338, #339
2026-06-10 10:00:03 +02:00
n8n-gitea fef7de8d09 chore: commit investigation state
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m25s
2026-06-10 09:56:14 +02:00
n8n-gitea 8bca8f85d5 fix: persist CraftingTab sub-tab selection across tab navigation
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m28s
- Add activeCraftingSubTab state + setActiveCraftingSubTab action to
  craftingStore (persisted to localStorage via zustand persist middleware)
- Add CraftingAttunement type to craftingStore.types and re-export from
  stores/index.ts barrel
- Update CraftingTab.tsx to read/write active sub-tab from store instead
  of local useState, so selection survives component remount
- Add default 'fabricator' value in craft-initial-state.ts
2026-06-09 19:08:49 +02:00
n8n-gitea 28d39a61ba fix: visually block off-hand slot when 2H weapon equipped in main hand
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m34s
- Add getTwoHandedBlocker() helper to EquipmentSlotGrid that detects when
  mainHand has a two-handed weapon and returns the weapon name
- Render offHand slot with Lock icon + 'Blocked: <weapon name>' label +
  reduced opacity when blocked, distinct from normal 'Empty' dashed-border slot
- Add regression test verifying all 4 two-handed types are correctly flagged
  and non-two-handed types remain unblocked (11 tests)
2026-06-09 18:48:04 +02:00
n8n-gitea 4a282a2121 fix: deduplicate PAUSED conversion log messages in tick pipeline (bug #337)
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m17s
2026-06-09 15:31:14 +02:00
n8n-gitea 87f30b9544 fix: resolve ReferenceError in enterSpireMode - use get() instead of undefined s variable
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m20s
2026-06-09 14:48:53 +02:00
n8n-gitea c3e8bd8fd7 fix: add missing ActivityLog component to fix build
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m21s
2026-06-09 12:03:25 +02:00
n8n-gitea 93ffa0768b fix: #328 fabricator golem-2 interval 250→500 + golem-1 desc
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m2s
- Fix Fabricator golem-2 capped perk interval from 250 to 500 (spec match)
- Update golem-1 description to 'Unlock golem summoning' (spec match)
2026-06-09 11:47:35 +02:00
n8n-gitea 3ad919a047 fix: remove discipline pool-drain model, add conversion stats UI per mana-conversion-spec
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m17s
DISC-2: Removed old pool-drain model from discipline-slice.ts processTick()
- Disciplines no longer drain rawMana or element pools
- canProceedDiscipline() no longer checks mana sufficiency
- Removed auto-pause on insufficient mana from processTick()
- Removed drain display and auto-paused message from DisciplineCard.tsx
- Removed auto-paused log from gameStore.ts tick()

DISC-4: Audited crafting pipeline — no composite crafting logic remains
- craftComposite already removed from manaStore.ts (comment only)
- No other composite crafting references found

DISC-5: Added collapsible formula reference to Conversion Stats section
- Shows unified formula, multipliers, cost formulas, and constraints

DISC-6: Added per-element net regen summary line
- Shows 'Net Fire Regen: +0.50/hr − 0.15/hr = +0.35/hr' per element

DISC-7: Created dedicated 'Conversion Stats' section in Stats tab
- Renamed from 'Conversion Breakdown' to dedicated section header

DISC-8: Added detailed per-element regen breakdown to ManaDisplay
- Each element card now expandable to show produced rate and downstream drains
- New ElementRegenBreakdown type and elementRegenBreakdown prop

Tests: Updated 4 test files to reflect new no-drain behavior
- All 1090 tests pass
2026-06-09 11:18:41 +02:00
n8n-gitea c89d8fd2d8 refactor: make activate() read mana state from stores directly instead of requiring UI to pass gameState bag
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m28s
2026-06-09 10:14:20 +02:00
n8n-gitea 42053f41ac fix: pass rawMana to activate() in DisciplinesTab to allow discipline reactivation after stop
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m18s
2026-06-09 09:59:48 +02:00
n8n-gitea e45c206321 fix: resolve enchanting spec vs code discrepancies (issue #324)
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m19s
- D2: Move spell_iceShard to basic-spells.ts at cost 75 (canonical), remove duplicate from frost-spells.ts
- D7: disenchantEquipment now adds 'Ready for Enchantment' tag and resets rarity to 'common'
- D8: disenchantEquipment now credits recovered mana to raw mana pool
- D14: Wire enchantPower stat from discipline effects into efficiencyBonus via new getEnchantingEfficiencyBonus() helper
- D3: Fix spec file reference from crafting-attunements.ts to data/attunements.ts
- D1/D6: Add missing metalSpellFocus to spec capacity table
2026-06-09 09:33:30 +02:00
n8n-gitea b0e553c290 fix(golemancy): reconcile spec vs code discrepancies (issue #326)
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 2m21s
- D-SLOT-01: Verified slot cap of 7 matches spec §2.2 (no change needed)
- D-COMB-03: Implement AoE damage distribution for Sand/Shadowglass frames
- D-COMB-01: Reconcile armor pierce formula to spire-combat spec §9.4 (dmg × (1 + armorPierce))
- D-CIRC-01: Fix Simple Logic Circuit summon cost from raw to earth mana
- D-ENCHANT-03: Add dual_attunement unlockRequirement to all golem enchantments
- D-CORE-01/02: Add Guardian Core runtime override mechanism for guardian-specific mana

Also increased test timeouts for module import tests that timeout in full suite runs.
2026-06-09 01:25:51 +02:00
n8n-gitea 2994004707 fix(item-fab): wizard thresholds +50 XP shift, dup crystal_cap_10, spec rarity
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m20s
2026-06-08 23:49:55 +02:00
n8n-gitea cba3090d7e fix(pact-system): resolve 5 spec-vs-code discrepancies (DISC-4,6,8,11,12)
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m19s
- DISC-11: Fix floor 140/150 element composition in guardian-data.ts
  Floor 140 now uses [light, fire, radiantflames] (was [sand, earth, water])
  Floor 150 now uses [air, death, miasma] (was [lightning, fire, air])
- DISC-12: Reconcile spec §7.1 vs §8.2 tables in pact-system-spec.md
  Updated §8.2 to match §7.1 authoritative element mappings
- DISC-4: Deduplicate pact ritual completion logic
  Refactored pact-ritual.ts pipeline to delegate completion to
  prestigeStore.completePactRitual() instead of duplicating state writes
- DISC-6: Add 4 missing boon types to guardians
  critChance (floor 90), manaGain (floor 110), prestigeInsight (floor 200),
  studySpeed (floor 220) — all 12 spec boon types now used
- DISC-8: Add comment clarifying signedPactDetails persistence
  Code already correct (not reset by startNewLoop/resetPrestigeForNewLoop)
- Updated spire-utils.test.ts to match corrected floor 140/150 elements
2026-06-08 22:50:03 +02:00
n8n-gitea 573130cdb1 fix: attunement system spec-vs-code discrepancies (issue #331)
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m24s
- Fix conversion rate level scaling from linear (1+level*0.5) to exponential (1.5^(level-1)) in conversion-rates.ts
- Fix getAttunementLevelMultiplier formula to match spec §4.3
- Add level-up logging in attunementStore.ts via combat store addActivityLog
- Clarify getAttunementConversionRate returns flat base rate (level scaling applied separately)
- Update spec §8 to describe time-based puzzle room system matching code implementation
- Add 17 regression tests verifying exponential scaling, base rate behavior, and spec table values
2026-06-08 22:08:17 +02:00
n8n-gitea 64c1d2f51e fix: spire climbing spec discrepancies (DISC-1,14,15,18,19,21,22,23,29,34)
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m21s
- DISC-1: Fix ascent seed missing +runId in combat-descent-actions.ts
- DISC-14: Recovery room 10x regen/conversion already in gameStore.ts
- DISC-15/18/21: Add missing completion logs for recovery, library, treasure rooms
- DISC-19: Filter library discipline selection to non-paused disciplines
- DISC-22: Fix puzzle room log format to match spec
- DISC-23: Replace hardcoded MAX_LEVEL with MAX_ATTUNEMENT_LEVEL
- DISC-29: Update spec to document libraryStayed/recoveryStayed on currentRoom
- DISC-34: Add 'Exited the Spire' activity log in exitSpireMode
2026-06-08 20:36:42 +02:00
n8n-gitea 098ec86189 fix: spire combat 11 high-severity discrepancies (issue #333)
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m19s
D-01: Implement per-weapon cast progress (weaponCastProgress record)
D-04: Bypass Executioner/Berserker discipline specials for golem attacks
D-09: Fix lightning counter direction (lightning→water, not lightning→earth)
D-10: Add full composite element counters (blackflame/radiantflames ↔ frost/water/light/dark)
D-15: Fix Executioner to check per-enemy HP < 25% instead of floorHP ratio
D-20: Fix dodge formula to match spec (min(0.55, floor × 0.003), starts at 0)
D-22: Fix shield modifier to use flat HP pool instead of percentage barrier
D-23: Wire up applyMageBarrierRecharge in the damage pipeline
D-25: Move guardian regen from per-damage-event to once-per-tick
D-26: Add guardian armor reduction to the guardian defensive pipeline
D-31: Fix armor_corrode to be temporary (restore armor on effect expiry)
D-38: Implement AoE damage distribution across enemies

All 1069 tests pass. No files exceed 400 lines.
2026-06-08 18:25:05 +02:00
n8n-gitea d07e74c396 feat: remove Spells tab UI
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m20s
- Remove Spells tab trigger from TabTriggers in page.tsx
- Remove TabsContent value='spells' block in page.tsx
- Remove lazy import of SpellsTab in page.tsx
- Change default activeTab from 'spells' to 'disciplines'
- Remove SpellsTab re-export from tabs/index.ts
- Remove SpellsTab re-export from game/index.ts
- Delete src/components/game/tabs/SpellsTab.tsx

Spell data (SPELLS_DEF, spells store state) preserved - spells still exist as enchantments.
2026-06-08 16:02:48 +02:00
n8n-gitea f31eaac59f feat: remove Grimoire tab
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m23s
2026-06-08 15:51:29 +02:00
n8n-gitea c61a9f88bf fix: three bug fixes - library XP scaling, prep time floor, dual design slot logic
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m19s
Fixes #297: Library room XP now uses 25× rate without undocumented floor multiplier
Fixes #305: Prep time mana-per-tick now applies Math.floor(capacity/50) per spec
Fixes #304: Dual design slot correctly returns false when first slot is empty
2026-06-08 15:03:08 +02:00
n8n-gitea 9c1b2fb6cb fix: correct difficulty/scaling factors for Shadow Glass and Stellar per spec
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m19s
2026-06-08 14:59:24 +02:00
n8n-gitea 83f835ccb0 fix: add runId to seed calculations and use seeded random for treasure loot
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m19s
Fixes #299: Seed calculation now includes runId component per spec (seed = floor × 12345 + runId)
Fixes #298: Treasure loot now uses seeded random instead of Math.random()

Changes:
- Added runId field to CombatState type
- Generated random runId on spire entry in createEnterSpireMode
- Updated getRoomsForFloor, generateSpireRoomType, generateSpireFloorState, generateTreasureLoot to accept and use runId
- Updated all call sites in combat-descent-actions.ts and combatStore.ts
- Treasure loot item count now uses seeded RNG instead of Math.random()
2026-06-08 14:54:37 +02:00