[priority: 4] Recreate Spire Combat Page — Full Spire Climbing Experience #94
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?
Summary
Recreate the Spire Combat page that was deleted in commit
fe0f2a0. This is a completely different view from the normal UI — when clicking "Climb the Spire" the player enters this page, and must climb down to floor 1 and click "Exit the Spire" to return to the main game.Context
spireModeboolean incombatStore.tscurrentFloor,floorHP,floorMaxHP,clearedFloors,climbDirection,isDescendinggetFloorMaxHP(floor)=100 + floor * 50 + floor^1.7(non-guardian floors)room-utils.ts:generateRoomType(),generateFloorState()combat-actions.ts:processCombatTick()calcInsight()Requirements
src/components/game/tabs/SpireCombatPage.tsxspireModeis truepage.tsxshould conditionally render this instead of the normal tab layout whenspireModeis trueSpire Mechanics
UI Elements
Data/Logic New Files Needed
src/lib/game/data/guardian-encounters.ts— Extended guardian definitions for all mana types + combination guardianssrc/lib/game/utils/spire-utils.ts— Spire-specific utility functions (room generation, enemy stat scaling, etc.)src/lib/game/utils/enemy-generator.ts— Enemy generation with modifiers (mage, shield, armored, swarm, agile)Architecture
spireModeis truesrc/app/page.tsxto conditionally renderSpireCombatPagewhenspireModeis trueSpireCombatPage/subdirectory with separate components for:SpireHeader.tsx— Floor info, climb controls, exit buttonRoomDisplay.tsx— Current room info and enemiesSpireCombatControls.tsx— Spell selection, golem statusSpireActivityLog.tsx— Combat activity logsrc/components/ui/Guardian Name Generation
Starting work on Spire Combat Page. Plan:
✅ Spire Combat Page implementation complete and pushed to master.
Files created (13 new files, 2 modified):
Data/Logic:
src/lib/game/data/guardian-encounters.ts— Extended guardian definitions for compound (metal/sand/lightning), exotic (crystal/stellar/void), and combination guardians with dynamic name generationsrc/lib/game/utils/spire-utils.ts— Spire room generation, enemy stat scaling, insight calculation, room type display helperssrc/lib/game/utils/enemy-generator.ts— Enemy generation with 5 combinable modifiers (mage, shield, armored, swarm, agile)UI Components (all under 400 lines):
SpireCombatPage/SpireHeader.tsx— Floor info, climb controls, exit button, HP/room progress barsSpireCombatPage/RoomDisplay.tsx— Current room info with enemies, barriers, armor, dodge stats, special roomsSpireCombatPage/SpireCombatControls.tsx— Spell selection panel, golem status panelSpireCombatPage/SpireActivityLog.tsx— Combat activity logSpireCombatPage/SpireManaDisplay.tsx— Compact mana display with elemental poolsSpireCombatPage/SpireCombatPage.tsx— Main component wiring everything togetherIntegration:
src/app/page.tsxto conditionally render SpireCombatPage whenspireModeis trueTests (49 tests, all passing):
src/lib/game/__tests__/spire-utils.test.ts— 32 tests for spire utils and guardian encounterssrc/lib/game/__tests__/enemy-generator.test.ts— 17 tests for enemy generation and modifiersSummary of implementation:
The Spire Combat Page is now a full-page replacement view that activates when
spireModeis true in the combat store. Key features implemented:Spire Mechanics:
Enemy System:
Guardian System:
UI Elements: