diff --git a/docs/project-structure.txt b/docs/project-structure.txt index f5dc14f..cc9eb89 100644 --- a/docs/project-structure.txt +++ b/docs/project-structure.txt @@ -12,14 +12,34 @@ Mana-Loop/ │ └── custom.db ├── docs/ │ ├── task5/ +│ │ ├── subtask_11_context.md │ │ ├── subtask_12_context.md │ │ ├── subtask_13_context.md │ │ ├── subtask_14_context.md -│ │ └── subtask_17_context.md +│ │ ├── subtask_15_context.md +│ │ ├── subtask_16_context.md +│ │ ├── subtask_17_context.md +│ │ ├── subtask_18_context.md +│ │ ├── subtask_19_context.md +│ │ ├── subtask_5_context.md +│ │ ├── subtask_6_context.md +│ │ └── subtask_9_context.md +│ ├── task6/ +│ │ └── subtask_1_context.md +│ ├── task7/ +│ │ ├── ctx_page.md +│ │ ├── ctx_skillstab.md +│ │ ├── ctx_upgrade_effects.md +│ │ ├── plan_page.md +│ │ ├── plan_skillstab.md +│ │ └── plan_upgrade_effects.md │ ├── GAME_BRIEFING.md │ ├── project-structure.txt │ ├── skills.md -│ └── task5.md +│ ├── task5.md +│ ├── task5_insight_proposals.md +│ ├── task6.md +│ └── task7.md ├── download/ │ └── README.md ├── examples/ @@ -37,12 +57,50 @@ Mana-Loop/ │ ├── app/ │ │ ├── api/ │ │ │ └── route.ts +│ │ ├── components/ +│ │ │ ├── GameOverScreen.tsx +│ │ │ └── LeftPanel.tsx │ │ ├── globals.css │ │ ├── layout.tsx │ │ └── page.tsx │ ├── components/ │ │ ├── game/ +│ │ │ ├── GameContext/ +│ │ │ │ ├── Provider.tsx +│ │ │ │ ├── context-create.ts +│ │ │ │ ├── hooks.ts +│ │ │ │ └── types.ts +│ │ │ ├── LootInventory/ +│ │ │ │ ├── BlueprintsSection.tsx +│ │ │ │ ├── EquipmentItem.tsx +│ │ │ │ ├── EssenceItem.tsx +│ │ │ │ ├── LootInventoryDisplay.tsx +│ │ │ │ ├── MaterialItem.tsx +│ │ │ │ ├── icons.ts +│ │ │ │ ├── index.tsx +│ │ │ │ └── types.ts +│ │ │ ├── SkillsTab/ +│ │ │ │ ├── SkillCategory.tsx +│ │ │ │ ├── SkillRow.tsx +│ │ │ │ ├── SkillStudyProgress.tsx +│ │ │ │ ├── SkillUpgradeDialog.tsx +│ │ │ │ └── skills-utils.ts +│ │ │ ├── StatsTab/ +│ │ │ │ ├── ActiveUpgradesSection.tsx +│ │ │ │ ├── CombatStatsSection.tsx +│ │ │ │ ├── ElementStatsSection.tsx +│ │ │ │ ├── LoopStatsSection.tsx +│ │ │ │ ├── ManaStatsSection.tsx +│ │ │ │ ├── PactStatusSection.tsx +│ │ │ │ └── StudyStatsSection.tsx │ │ │ ├── crafting/ +│ │ │ │ ├── EnchantmentDesigner/ +│ │ │ │ │ ├── DesignForm.tsx +│ │ │ │ │ ├── EffectSelector.tsx +│ │ │ │ │ ├── EquipmentTypeSelector.tsx +│ │ │ │ │ ├── SavedDesigns.tsx +│ │ │ │ │ ├── types.ts +│ │ │ │ │ └── utils.ts │ │ │ │ ├── EnchantmentApplier.tsx │ │ │ │ ├── EnchantmentDesigner.tsx │ │ │ │ ├── EnchantmentPreparer.tsx @@ -72,16 +130,32 @@ Mana-Loop/ │ │ │ │ └── index.tsx │ │ │ ├── tabs/ │ │ │ │ ├── AchievementsTab.tsx +│ │ │ │ ├── ActivityLog.tsx │ │ │ │ ├── AttunementsTab.tsx │ │ │ │ ├── AttunementsTab.tsx.backup +│ │ │ │ ├── CategorySkillsList.tsx +│ │ │ │ ├── CombatStatsPanel.tsx │ │ │ │ ├── CraftingTab.tsx │ │ │ │ ├── DebugTab.tsx +│ │ │ │ ├── EnchantmentsPanel.tsx +│ │ │ │ ├── EquipmentControls.tsx +│ │ │ │ ├── EquipmentInventory.tsx +│ │ │ │ ├── EquipmentSlotGrid.tsx │ │ │ │ ├── EquipmentTab.tsx +│ │ │ │ ├── FloorControls.tsx │ │ │ │ ├── GolemancyTab.tsx +│ │ │ │ ├── GuardianPanel.tsx │ │ │ │ ├── LabTab.tsx │ │ │ │ ├── LootTab.tsx +│ │ │ │ ├── MilestoneProgress.tsx +│ │ │ │ ├── PrestigeTab.tsx +│ │ │ │ ├── RoomDisplay.tsx +│ │ │ │ ├── SkillCategoryHeader.tsx +│ │ │ │ ├── SkillMultipliers.tsx +│ │ │ │ ├── SkillRow.tsx │ │ │ │ ├── SkillsTab.tsx │ │ │ │ ├── SpellsTab.tsx +│ │ │ │ ├── SpireHeader.tsx │ │ │ │ ├── SpireTab.tsx │ │ │ │ ├── StatsTab.tsx │ │ │ │ ├── StudyProgress.tsx @@ -96,7 +170,6 @@ Mana-Loop/ │ │ │ ├── GameContext.tsx │ │ │ ├── GameToast.tsx │ │ │ ├── LabTab.tsx -│ │ │ ├── LootInventory.tsx │ │ │ ├── ManaDisplay.tsx │ │ │ ├── SkillsTab.tsx │ │ │ ├── SpellsTab.tsx @@ -143,11 +216,37 @@ Mana-Loop/ │ └── lib/ │ ├── game/ │ │ ├── __tests__/ +│ │ │ ├── skills-tests/ +│ │ │ │ ├── ascension-skills.test.ts +│ │ │ │ ├── integration-and-evolution.test.ts +│ │ │ │ ├── mana-skills.test.ts +│ │ │ │ ├── prestige-upgrades.test.ts +│ │ │ │ ├── skill-prerequisites.test.ts +│ │ │ │ ├── specialized-skills.test.ts +│ │ │ │ ├── study-skills.test.ts +│ │ │ │ └── study-times.test.ts +│ │ │ ├── store-method-tests/ │ │ │ ├── bug-fixes.test.ts │ │ │ ├── computed-stats.test.ts │ │ │ ├── skill-system.test.ts │ │ │ └── skills.test.ts +│ │ ├── attunements/ +│ │ │ ├── data.ts +│ │ │ ├── index.ts +│ │ │ ├── types.ts +│ │ │ └── utils.ts │ │ ├── constants/ +│ │ │ ├── spells-modules/ +│ │ │ │ ├── advanced-spells.ts +│ │ │ │ ├── aoe-spells.ts +│ │ │ │ ├── basic-elemental-spells.ts +│ │ │ │ ├── compound-spells.ts +│ │ │ │ ├── enchantment-spells.ts +│ │ │ │ ├── legendary-spells.ts +│ │ │ │ ├── lightning-spells.ts +│ │ │ │ ├── master-spells.ts +│ │ │ │ ├── raw-spells.ts +│ │ │ │ └── utility-spells.ts │ │ │ ├── core.ts │ │ │ ├── elements.ts │ │ │ ├── guardians.ts @@ -156,27 +255,93 @@ Mana-Loop/ │ │ │ ├── rooms.ts │ │ │ ├── skills.ts │ │ │ └── spells.ts +│ │ ├── crafting-actions/ +│ │ │ ├── application-actions.ts +│ │ │ ├── computed-getters.ts +│ │ │ ├── crafting-equipment-actions.ts +│ │ │ ├── design-actions.ts +│ │ │ ├── disenchant-actions.ts +│ │ │ ├── equipment-actions.ts +│ │ │ ├── index.ts +│ │ │ └── preparation-actions.ts │ │ ├── data/ │ │ │ ├── enchantments/ +│ │ │ │ ├── spell-effects/ +│ │ │ │ │ ├── basic-spells.ts +│ │ │ │ │ ├── index.ts +│ │ │ │ │ ├── lightning-spells.ts +│ │ │ │ │ ├── metal-spells.ts +│ │ │ │ │ ├── sand-spells.ts +│ │ │ │ │ ├── tier2-spells.ts +│ │ │ │ │ ├── tier3-spells.ts +│ │ │ │ │ └── types.ts │ │ │ │ ├── combat-effects.ts │ │ │ │ ├── defense-effects.ts │ │ │ │ ├── elemental-effects.ts │ │ │ │ ├── index.ts │ │ │ │ ├── mana-effects.ts │ │ │ │ ├── special-effects.ts -│ │ │ │ ├── spell-effects.ts │ │ │ │ └── utility-effects.ts +│ │ │ ├── equipment/ +│ │ │ │ ├── accessories.ts +│ │ │ │ ├── body.ts +│ │ │ │ ├── casters.ts +│ │ │ │ ├── catalysts.ts +│ │ │ │ ├── feet.ts +│ │ │ │ ├── hands.ts +│ │ │ │ ├── head.ts +│ │ │ │ ├── index.ts +│ │ │ │ ├── shields.ts +│ │ │ │ ├── swords.ts +│ │ │ │ ├── types.ts +│ │ │ │ └── utils.ts +│ │ │ ├── golems/ +│ │ │ │ ├── base-golems.ts +│ │ │ │ ├── elemental-golems.ts +│ │ │ │ ├── hybrid-golems.ts +│ │ │ │ ├── index.ts +│ │ │ │ ├── types.ts +│ │ │ │ └── utils.ts │ │ │ ├── achievements.ts │ │ │ ├── attunements.ts │ │ │ ├── crafting-recipes.ts │ │ │ ├── enchantment-effects.ts │ │ │ ├── enchantment-types.ts -│ │ │ ├── equipment.ts -│ │ │ ├── golems.ts │ │ │ └── loot-drops.ts │ │ ├── hooks/ -│ │ │ └── useGameDerived.ts +│ │ │ ├── useGameDerived.ts +│ │ │ └── useSkillUpgradeSelection.ts +│ │ ├── skill-evolution-modules/ +│ │ │ ├── elemental-attunement.ts +│ │ │ ├── enchanting-skills.ts +│ │ │ ├── focused-mind.ts +│ │ │ ├── guardian-skills.ts +│ │ │ ├── hybrid-skills.ts +│ │ │ ├── index.ts +│ │ │ ├── insight-harvest.ts +│ │ │ ├── invocation-skills.ts +│ │ │ ├── knowledge-retention.ts +│ │ │ ├── learning-skills.ts +│ │ │ ├── magic-skills.ts +│ │ │ ├── mana-utility-skills.ts +│ │ │ ├── mana-well-flow.ts +│ │ │ ├── quick-learner.ts +│ │ │ ├── types.ts +│ │ │ └── utils.ts +│ │ ├── skills-split-tests/ +│ │ │ ├── ascension-specialized-skills.test.ts +│ │ │ ├── mana-skills.test.ts +│ │ │ ├── prerequisites-studytimes-prestige-integration.test.ts +│ │ │ └── study-skills.test.ts │ │ ├── store/ +│ │ │ ├── crafting-modules/ +│ │ │ │ ├── initial-state.ts +│ │ │ │ ├── selectors.ts +│ │ │ │ ├── slice-logic.ts +│ │ │ │ ├── starting-equipment.ts +│ │ │ │ ├── tick-processors.ts +│ │ │ │ ├── types.ts +│ │ │ │ └── utils.ts │ │ │ ├── combatSlice.ts │ │ │ ├── computed.ts │ │ │ ├── craftingSlice.ts @@ -186,11 +351,71 @@ Mana-Loop/ │ │ │ ├── prestigeSlice.ts │ │ │ ├── skillSlice.ts │ │ │ └── timeSlice.ts +│ │ ├── store-modules/ +│ │ │ ├── {room-utils,enemy-utils,initial-state,activity-log,store-actions}/ +│ │ │ ├── activity-log.ts +│ │ │ ├── computed-stats.ts +│ │ │ ├── enemy-utils.ts +│ │ │ ├── initial-state.ts +│ │ │ ├── room-utils.ts +│ │ │ ├── store-actions.ts +│ │ │ └── tick-logic.ts +│ │ ├── store-tests/ +│ │ │ ├── damage-calculation.test.ts +│ │ │ ├── element-recipes.test.ts +│ │ │ ├── floor.test.ts +│ │ │ ├── formatting.test.ts +│ │ │ ├── game-constants.test.ts +│ │ │ ├── individual-skills.test.ts +│ │ │ ├── insight-meditation-incursion.test.ts +│ │ │ ├── integration.test.ts +│ │ │ ├── mana-calculation.test.ts +│ │ │ ├── skill-evolution.test.ts +│ │ │ ├── skill-requirements.test.ts +│ │ │ ├── spell-cost.test.ts +│ │ │ ├── study-speed.test.ts +│ │ │ └── test-utils.ts │ │ ├── stores/ │ │ │ ├── __tests__/ +│ │ │ │ ├── combat-store-tests/ +│ │ │ │ ├── index-tests/ +│ │ │ │ │ ├── combat-calculations.test.ts +│ │ │ │ │ ├── definitions.test.ts +│ │ │ │ │ ├── mana-calculations.test.ts +│ │ │ │ │ ├── meditation-insight-incursion.test.ts +│ │ │ │ │ ├── spell-cost.test.ts +│ │ │ │ │ ├── study-speed.test.ts +│ │ │ │ │ └── utility-functions.test.ts +│ │ │ │ ├── mana-store-tests/ +│ │ │ │ ├── prestige-store-tests/ +│ │ │ │ ├── store-method-tests/ +│ │ │ │ │ ├── combat-store.test.ts +│ │ │ │ │ ├── mana-store.test.ts +│ │ │ │ │ ├── prestige-store.test.ts +│ │ │ │ │ ├── skill-store.test.ts +│ │ │ │ │ └── ui-store.test.ts +│ │ │ │ ├── stores-split-tests/ +│ │ │ │ ├── stores-tests/ +│ │ │ │ │ ├── damage-calculation.test.ts +│ │ │ │ │ ├── floor.test.ts +│ │ │ │ │ ├── formatting.test.ts +│ │ │ │ │ ├── guardians.test.ts +│ │ │ │ │ ├── incursion.test.ts +│ │ │ │ │ ├── insight-calculation.test.ts +│ │ │ │ │ ├── mana-calculation.test.ts +│ │ │ │ │ ├── meditation.test.ts +│ │ │ │ │ ├── prestige-upgrades.test.ts +│ │ │ │ │ ├── skill-definitions.test.ts +│ │ │ │ │ ├── spell-cost.test.ts +│ │ │ │ │ ├── spell-definitions.test.ts +│ │ │ │ │ └── study-speed.test.ts +│ │ │ │ ├── ui-store-tests/ │ │ │ │ ├── store-methods.test.ts │ │ │ │ └── stores.test.ts │ │ │ ├── combatStore.ts +│ │ │ ├── gameActions.ts +│ │ │ ├── gameHooks.ts +│ │ │ ├── gameLoopActions.ts │ │ │ ├── gameStore.ts │ │ │ ├── index.test.ts │ │ │ ├── index.ts @@ -198,6 +423,13 @@ Mana-Loop/ │ │ │ ├── prestigeStore.ts │ │ │ ├── skillStore.ts │ │ │ └── uiStore.ts +│ │ ├── stores-split-tests/ +│ │ │ ├── combat-store.test.ts +│ │ │ ├── integration.test.ts +│ │ │ ├── mana-store.test.ts +│ │ │ ├── prestige-store.test.ts +│ │ │ ├── skill-store.test.ts +│ │ │ └── ui-store.test.ts │ │ ├── types/ │ │ │ ├── attunements.ts │ │ │ ├── elements.ts @@ -212,22 +444,31 @@ Mana-Loop/ │ │ │ ├── formatting.ts │ │ │ ├── index.ts │ │ │ └── mana-utils.ts -│ │ ├── attunements.ts │ │ ├── computed-stats.ts │ │ ├── constants.ts +│ │ ├── crafting-apply.ts +│ │ ├── crafting-attunements.ts +│ │ ├── crafting-design.ts +│ │ ├── crafting-equipment.ts +│ │ ├── crafting-loot.ts +│ │ ├── crafting-prep.ts │ │ ├── crafting-slice.ts +│ │ ├── crafting-utils.ts │ │ ├── debug-context.tsx +│ │ ├── dynamic-compute.ts │ │ ├── effects.ts │ │ ├── formatting.ts │ │ ├── navigation-slice.ts │ │ ├── skill-evolution.ts │ │ ├── skills.test.ts +│ │ ├── special-effects.ts │ │ ├── store.test.ts │ │ ├── store.ts │ │ ├── stores.test.ts │ │ ├── study-slice.ts │ │ ├── types.ts -│ │ └── upgrade-effects.ts +│ │ ├── upgrade-effects.ts +│ │ └── upgrade-effects.types.ts │ ├── db.ts │ └── utils.ts ├── .accesslog diff --git a/src/app/components/GameOverScreen.tsx b/src/app/components/GameOverScreen.tsx new file mode 100644 index 0000000..31cb728 --- /dev/null +++ b/src/app/components/GameOverScreen.tsx @@ -0,0 +1,57 @@ +'use client'; + +import { Button } from '@/components/ui/button'; +import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; +import type { GameStore } from '@/lib/game/store'; + +interface GameOverScreenProps { + store: GameStore; +} + +export function GameOverScreen({ store }: GameOverScreenProps) { + return ( +
+ {store.victory + ? 'The Awakened One falls! Your power echoes through eternity.' + : 'The time loop resets... but you remember.'} +
+ +- {store.victory - ? 'The Awakened One falls! Your power echoes through eternity.' - : 'The time loop resets... but you remember.'} -
- -A vast tome of arcane knowledge. Study carefully — each spell costs insight to transcribe into your repertoire.
-Available pages: {availablePages}. Spells in grimoire: {grimoireSpells.length}.
-{spell.desc}
-A vast tome of arcane knowledge. Study carefully — each spell costs insight to transcribe into your repertoire.
+Available pages: {availablePages}. Spells in grimoire: {grimoireSpells.length}.
{spell.desc}
+Cannot switch topics while studying {SKILLS_DEF[store.currentStudyTarget?.id || '']?.name || 'another skill'}
-Study in parallel (50% speed)
-Cannot switch topics while studying {SKILLS_DEF[store.currentStudyTarget?.id || '']?.name || 'another skill'}
+Study in parallel (50% speed)
+Learn Enchanting skill to design enchantments
-Incompatible Effect
-{reason}
-Learn Enchanting skill to design enchantments
+Incompatible Effect
+{reason}
+