[feature: guardian-restructure] Restructure guardian progression system #201
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?
FEATURE: Complete guardian progression restructure for dynamic element support
Current Guardian Layout
Floors 10-140: Base elements (fire, water, air, earth, light, dark, death) → Utility (transference) → Composite (metal, sand, lightning) → Exotic (crystal, stellar, void)
Floors 150-240: Dual-element combo guardians cycling through 9 pairs
Desired Guardian Progression
New progression should be:
Technical Requirements
elementfield must become an array (currently singlestring)unlocksManamust unlock ALL component chain elementsgetAllGuardianFloors()must be computed dynamically, not hardcodedTouchpoints
src/lib/game/types/attunements.ts- GuardianDef.element typesrc/lib/game/data/guardian-data.ts- Static guardian definitionssrc/lib/game/data/guardian-encounters.ts- Procedural guardian generationPriority
Core feature for game depth expansion
Starting work on guardian progression restructure. Plan:
Guardian Progression Restructure — Complete ✅
What was done
Type change:
GuardianDef.elementchanged fromstring→string[]intypes/attunements.tsNew 9-tier guardian progression:
New utility:
guardian-utils.tswith:resolveUnlockChain(element)— walks ELEMENTS recipe tree to collect all base componentsresolveMultiUnlockChain(elements)— union of chains for multi-element guardianscomputeGuardianFloors(maxFloor)— dynamic floor computationKey design decisions:
unlocksMananow automatically resolves full component chains (e.g., metal guardian → unlocks fire, earth, metal)getAllGuardianFloors()is dynamically computed from static + procedural definitionsisGuardianFloor()usesfloor % 10 === 0 && floor >= 10— no upper bound'+'-joined string for backward compat withEnemyState.element: string"Ignis-Aqua the Warden"Files changed (19):
src/lib/game/types/attunements.ts— element type changesrc/lib/game/data/guardian-data.ts— full rewrite with new tier layout andmk()helpersrc/lib/game/data/guardian-encounters.ts— procedural tiers 5-9, dynamicgetAllGuardianFloors()src/lib/game/utils/guardian-utils.ts— NEW: unlock chain resolution + floor computationsrc/lib/game/utils/room-utils.ts—.join('+')for enemy elementsrc/lib/game/utils/spire-utils.ts—.join('+')for enemy elementsrc/lib/game/utils/combat-utils.ts—.includes()instead of===for element checkgetElementDisplaysacceptsstring | string[]**All 895 tests passing. All files under 400 lines. No circular dependencies.