diff --git a/AGENTS.md b/AGENTS.md index af2250a..f549351 100755 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,6 +1,6 @@ # Mana Loop β€” Agent Guide -Browser incremental/idle game. Next.js 16 + Zustand, no backend. +Browser incremental/idle game. Next.js 16 + Zustand, no backend, localStorage persistence. ## πŸ”‘ Git @@ -24,13 +24,13 @@ git add -A && git commit -m "type: desc" && git push origin master 1. `docs/project-structure.txt` 2. `docs/dependency-graph.json` -3. `get_repo_summary` β†’ resume in-progress or pick top todo -4. `update_issue_status` β†’ `ai:in-progress` -5. Work, log with `add_comment`, then `update_issue_status` β†’ `ai:done` +3. `gitea_get_project_boards` β†’ resume in-progress or pick top todo +4. `gitea_update_issue_status` β†’ `ai_state: "in-progress"` +5. Work, log with `gitea_add_comment`, then `gitea_update_issue_status` β†’ `ai_state: "done"` ## Labels -`ai:todo` | `ai:in-progress` | `ai:review` | `ai:blocked` | `ai:done` +`ai_state: todo` | `in_state: in-progress` | `ai_state: review` | `ai_state: blocked` | `ai_state: done` ## Terminal Tool @@ -42,24 +42,36 @@ Use for 3+ sequential independent calls. Zero context from parent β€” paste ever ## Architecture -- **Stack:** Next.js 16, TS 5, Tailwind 4 + shadcn/ui, Zustand+persist, Vitest/Playwright, Bun -- **Active stores:** `src/lib/game/stores/{game,mana,combat,prestige,discipline,ui}Store.ts` -- **Legacy (migrating):** `src/lib/game/store/` and `store-modules/` -- **Crafting:** 3-step flow β€” Design β†’ Prepare β†’ Apply via `crafting-actions/` -- **Disciplines:** `data/disciplines/` + `stores/discipline-slice.ts` + `utils/discipline-math.ts` -- **Effects:** All stat mods through `getUnifiedEffects()` β€” discipline bonuses enter via `computeDisciplineEffects()` +- **Stack:** Next.js 16, TS 5, Tailwind 4 + shadcn/ui, Zustand+persist, Vitest, Bun +- **No backend:** Pure client-side. No Prisma, no database. State persisted to localStorage. +- **Active stores (7 Zustand stores):** + - `useGameStore` β€” Coordinator/tick pipeline, imports all other stores + - `useManaStore` β€” Mana pools, regen, element conversion + - `useCombatStore` β€” Spire/floors, combat, spells, achievements + - `useCraftingStore` β€” Enchanting (Design/Prepare/Apply), equipment instances, loot + - `useAttunementStore` β€” Enchanter/Invoker/Fabricator attunement levels & XP + - `usePrestigeStore` β€” Insight, prestige upgrades, pact persistence, loop state + - `useDisciplineStore` β€” Discipline activation, XP ticking, perk evaluation (slice) + - `useUIStore` β€” Logs, pause, game over/victory flags +- **Legacy:** Fully migrated. No legacy `store.ts`, `store/`, or `store-modules/` directories remain. ### Adding Effects -1. `data/enchantment-effects.ts` -2. `effects.ts` β†’ `computeEquipmentEffects()` -3. Access via `getUnifiedEffects(state)` +1. `data/enchantments/` β€” Add effect definition in the appropriate category file +2. `craftingStore.ts` β†’ effects computation +3. Equipment effects flow through `src/lib/game/effects.ts` β†’ `getUnifiedEffects()` ### Adding Disciplines 1. Choose the correct data file under `data/disciplines/`: - - `base.ts` β€” available to all attunements - - `enchanter.ts` β€” requires Enchanter attunement - - `invoker.ts` β€” requires Invoker attunement - - `fabricator.ts` β€” requires Fabricator attunement + - `base.ts` β€” Raw Mana Mastery (available to all) + - `elemental.ts` β€” Elemental Attunement (7 base+ elements) + - `elemental-regen.ts` β€” Elemental Regen (7 base + transference) + - `elemental-regen-advanced.ts` β€” Advanced Regen (3 composite + 3 exotic) + - `enchanter.ts` β€” Core Enchanter disciplines (4 disciplines) + - `enchanter-utility.ts` β€” Utility enchantment disciplines (2 disciplines) + - `enchanter-spells.ts` β€” Spell enchantment disciplines (3 disciplines) + - `enchanter-special.ts` β€” Special enchantment disciplines (1 discipline) + - `invoker.ts` β€” Invoker combat disciplines (2 disciplines) + - `fabricator.ts` β€” Fabricator crafting/golem disciplines (2 disciplines) 2. Define a `DisciplineDefinition` (see `types/disciplines.ts`): - `statBonus.stat` must match a key consumed by `computeDisciplineEffects()` - Set `difficultyFactor` and `scalingFactor` to control growth rate @@ -69,20 +81,79 @@ Use for 3+ sequential independent calls. Zero context from parent β€” paste ever ### Discipline Math (quick reference) ``` -StatBonus = baseValue Γ— (XP / scalingFactor)^0.65 +StatBonus = baseValue Γ— (XP / scalingFactor)^0.65 ManaDrainPerTick = drainBase Γ— (1 + (XP / difficultyFactor)^0.4) ``` - XP accrues every tick the discipline is active and mana drain is met -- `concurrentLimit` starts at 1 and expands by 1 per 500 total XP (max +3) +- `concurrentLimit` starts at 1 and expands by 1 per 500 total XP (max 4) ### Adding Spells -1. `constants/spells.ts` -2. `data/enchantment-effects.ts` -3. `EFFECT_RESEARCH_MAPPING` +1. `constants/spells-modules/` β€” Add to the appropriate category file +2. `data/enchantments/spell-effects/` β€” Add enchantment effect for the spell +3. Re-export from barrel files + +### Store Architecture (Key Files) +- `stores/gameStore.ts` β€” Main coordinator, combines all stores, tick orchestration +- `stores/tick-pipeline.ts` β†’ `buildTickContext()` / `applyTickWrites()` pattern +- `stores/combat-actions.ts` β€” Combat tick processing +- `stores/gameLoopActions.ts` β€” Climb/spire actions +- `stores/pipelines/[name].ts` β€” Individual pipeline phases + +## Crafting System + +### Enchanting: 3-Step Flow β€” Design β†’ Prepare β†’ Apply +- **Design:** Select effects for a named design. Time: 1h + 0.5h per effect slot. Dual design slot with Enchant Mastery special. +- **Prepare:** Clears existing enchantments, costs `capacity Γ— 10` raw mana, time: `2h + 1h per 50 capacity`. ONLY stage where explicit disenchanting occurs. +- **Apply:** Applies saved design to prepared equipment. Time: `2h + stacks` hours. Mana: `20 + 5Γ—stacks` per hour. + +### Equipment +- 8 slots: mainHand, offHand, head, body, hands, feet, accessory1, accessory2 +- 50 equipment types across 9 categories (casters, swords, shields, catalysts, head, body, hands, feet, accessories) +- Instance fields: `instanceId`, `typeId`, `name`, `enchantments[]`, `usedCapacity`, `totalCapacity`, `rarity`, `quality` +- Stacking cost: each additional stack costs 20% more + +### Golemancy +- 10 golems total: 1 base (Earth) + 3 elemental (Steel, Crystal, Sand) + 6 hybrid (Lava, Galvanic, Obsidian, Prism, Quicksilver, Voidstone) +- Golems slots: `floor(fabricatorLevel / 2)`, max 5 at level 10 +- Hybrid golems require Enchanter 5 + Fabricator 5 + +### Guardian System +- Guardians on every 10th floor +- **Base (floors 10–80):** 7 base elements + Transference, static definitions with unique names +- **Compound (floors 90–110):** Metal, Sand, Lightning β€” procedurally named +- **Exotic (floors 120–140):** Crystal, Stellar, Void β€” procedurally named +- **Combination bosses (floor 150+):** Dual-element procedural guardians cycling through 9 element pairs, scaling indefinitely +- HP formula: `floor(5000 Γ— (floor/10) ^ (1.1 + floor/200))` +- Pact signing: costs raw mana + time, grants permanent boons + +### Combat +- Cast-speed based: `castProgress += HOURS_PER_TICK Γ— spellCastSpeed Γ— attackSpeedMult` +- Elemental bonuses: super effective (1.5Γ—), same element (1.25Γ—), weak (0.75Γ—), neutral (1.0Γ—) +- Element opposites: fire↔water, air↔earth, light↔dark, lightningβ†’earth +- Enemy modifiers (max 2 per enemy): Armored, Agile, Mage, Shield, Swarm +- Room types: Combat (default), Guardian (every 10th), Swarm (15%), Speed (10%), Puzzle (20% on every 7th floor) +- Floor HP: `100 + floor Γ— 50 + floor^1.7` for non-guardian floors + +### Time & Incursion +- `TICK_MS`: 200ms, `HOURS_PER_TICK`: 0.04, `MAX_DAY`: 30 +- Incursion starts day 5 (not day 20) +- Incursion strength: `min(0.95, (totalHours / maxHours) Γ— 0.95)` + +### Prestige (Insight) +- `baseInsight = floor(maxFloorReached Γ— 15 + totalManaGathered / 500 + signedPacts.length Γ— 150)` +- Multiplied by discipline and boon bonuses. Γ—3 for victory (floor 100 + pact signed) +- 14 prestige upgrade types: manaWell, manaFlow, insightAmp, spireKey, temporalEcho, steadyHand, ancientKnowledge, elementalAttune, spellMemory, guardianPact, quickStart, elemStart, unlockedManaTypeCapacity +- Signed pacts persist through prestige (bounded by `pactSlots`) + +### Starting State +- Attunement: Enchanter only (level 1) +- Mana: Only Transference unlocked +- Equipment: Basic Staff with Mana Bolt enchantment (mainHand), Civilian Shirt (body), Civilian Shoes (feet) +- 1 discipline slot, 1 concurrent discipline ## Banned -Lifesteal/healing, scroll crafting, ascension skills, LabTab, pause, mana types: `life`, `blood`, `wood`, `mental`, `force` +Lifesteal/healing, scroll crafting, ascension skills, LabTab, pause mechanics, familiar system, mana types: `life`, `blood`, `wood`, `mental`, `force` ## File Limit @@ -90,7 +161,7 @@ Lifesteal/healing, scroll crafting, ascension skills, LabTab, pause, mana types: ## Mana Types -**Base (7):** Fire πŸ”₯ Water πŸ’§ Air 🌬️ Earth ⛰️ Light β˜€οΈ Dark πŸŒ‘ Death πŸ’€ -**Utility (1):** Transference πŸ”— -**Compound (3):** Fire+Earth=Metal, Earth+Water=Sand, Fire+Air=Lightning -**Exotic (3):** Sand+Sand+Light=Crystal, Fire+Fire+Light=Stellar, Dark+Dark+Death=Void \ No newline at end of file +**Base (7):** Fire πŸ”₯ Water πŸ’§ Air 🌬️ Earth ⛰️ Light β˜€οΈ Dark πŸŒ‘ Death πŸ’€ +**Utility (1):** Transference πŸ”— +**Composite (3):** Fire+Earth=Metal βš™οΈ, Earth+Water=Sand ⏳, Fire+Air=Lightning ⚑ +**Exotic (3):** Sand+Sand+Light=Crystal πŸ’Ž, Fire+Fire+Light=Stellar ⭐, Dark+Dark+Death=Void πŸ•³οΈ diff --git a/docs/GAME_BRIEFING.md b/docs/GAME_BRIEFING.md index 94f7c01..a32ad8d 100644 --- a/docs/GAME_BRIEFING.md +++ b/docs/GAME_BRIEFING.md @@ -1,7 +1,7 @@ # Mana-Loop: Comprehensive Game Briefing Document -**Document Version:** 2.0 -**Updated:** Disciplines Refactor (skills system removed; disciplines replace it entirely) +**Document Version:** 3.0 +**Updated:** Post-refactoring β€” skills removed, disciplines procedural guardians, combo bosses, 14 mana types, localStorage-only --- @@ -13,7 +13,7 @@ 4. [Time & Incursion System](#time--incursion-system) 5. [Spire & Floor System](#spire--floor-system) 6. [Combat System](#combat-system) -7. [Guardian & Pact System](#guardian--pact-system) +7. [Guardian System](#guardian-system) 8. [Attunement System](#attunement-system) 9. [Discipline System](#discipline-system) 10. [Equipment & Enchantment System](#equipment--enchantment-system) @@ -28,16 +28,18 @@ ## Executive Summary -**Mana-Loop** is a browser-based incremental/idle game with a 30-day time loop mechanic. Players gather mana, practice disciplines, climb a 100-floor spire, defeat guardians, sign pacts, enchant equipment, and prestige for permanent progression. +**Mana-Loop** is a browser-based incremental/idle game with a 30-day time loop mechanic. Players gather mana, practice disciplines, climb a 100+ floor spire, defeat procedurally-tiered guardians, sign pacts, enchant equipment, summon golems, and prestige for permanent progression. **Key Differentiators:** - 3-class Attunement system (Enchanter, Invoker, Fabricator) -- Equipment-based spell system (spells come from enchanted gear) +- Equipment-based spell system (spells come from enchanted gear and learned spells) - Practice-based Discipline system β€” no discrete skill levels, only continuous XP growth -- Time pressure through the incursion mechanic -- Guardian pacts provide permanent multipliers +- Time pressure through the incursion mechanic (starts day 5) +- Guardian progression: base β†’ compound β†’ exotic β†’ combination bosses (150+) +- Guardian pacts provide permanent multipliers that persist through prestige +- No backend β€” pure client-side with localStorage persistence -**Code Architecture:** Modular stores, crafting actions, discipline data, and constants. The old skill system (study, skill tiers, milestone upgrades) has been fully removed and replaced by the Discipline system. +**Code Architecture:** Modular Zustand stores, crafting actions, discipline data, and constants. No legacy store files remain. --- @@ -58,7 +60,9 @@ β”‚ β”‚ β”‚ β”‚ β–Ό β”‚ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ -β”‚ β”‚ DEFEAT GUARDIANS β†’ SIGN PACTS β”‚ β”‚ +β”‚ β”‚ DEFEAT GUARDIANS β†’ SIGN PACTS (every 10th) β”‚ β”‚ +β”‚ β”‚ Base(10-80) β†’ Compound(90-110) β†’ Exotic(120-140)β”‚ β”‚ +β”‚ β”‚ β†’ Combination Bosses(150+) β”‚ β”‚ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚ β”‚ β”‚ β”‚ β”‚ β–Ό β”‚ @@ -75,17 +79,16 @@ | **Meditate** | Regen mana with meditation bonus multiplier | Passive (auto-selected after actions) | | **Climb** | Progress through spire floors, cast spells | Active combat | | **Practice** | Run active disciplines, consuming mana each tick | Continuous | -| **Craft** | Create/enchant equipment | Hours per stage | +| **Craft** | Create/enchant equipment (Design/Prepare/Apply) | Hours per stage | | **Convert** | Auto-convert raw mana to elements | Per tick | -| **Design** | Create enchantment designs (limited to owned gear types) | Hours | +| **Design** | Create enchantment designs | Hours | | **Prepare** | Ready equipment for enchanting | Hours + mana | | **Enchant** | Apply enchantment to equipment | Hours + mana | ### Action Transitions - - After completing Design, Prepare, Enchant, or Craft the game automatically transitions to **Meditate** - Action buttons are hidden when in Spire Mode -- `currentAction` state lives in `stores/gameStore.ts` +- `currentAction` state lives in the combat store --- @@ -97,13 +100,13 @@ Raw Mana (Base Resource) β”‚ β”œβ”€β”€β–Ά Base Elements (7) ─────────────────────────────────────┐ - β”‚ Fire*, Water*, Air*, Earth*, Light, Dark, Death β”‚ - β”‚ *Locked at start - must be unlocked β”‚ + β”‚ Fire*, Water*, Air*, Earth*, Light*, Dark*, Death* β”‚ + β”‚ *Locked at start β€” must be unlocked via guardian pacts β”‚ β”‚ β”‚ β”œβ”€β”€β–Ά Utility Element (1) ──────────────────────────────────── - β”‚ Transference (Enchanter attunement - UNLOCKED at start) β”‚ + β”‚ Transference (Enchanter attunement β€” UNLOCKED at start)β”‚ β”‚ β”‚ - β”œβ”€β”€β–Ά Compound Elements (3) ── Created from 2 base ─────────── + β”œβ”€β”€β–Ά Composite Elements (3) ── Created from 2 base ────────── β”‚ Metal = Fire + Earth β”‚ β”‚ Sand = Earth + Water β”‚ β”‚ Lightning = Fire + Air β”‚ @@ -114,24 +117,32 @@ Raw Mana (Base Resource) Void = Dark + Dark + Death β”‚ ``` -Fire, Water, Air, and Earth are **locked at start**. Only Transference is unlocked initially. +Only **Transference** is unlocked at start. All other elements must be unlocked through guardian pacts. ### Mana Formulas **Maximum Raw Mana:** ``` -maxMana = (100 + (manaWellLevel Γ— 100) + (prestigeManaWell Γ— 500) + equipmentBonuses) Γ— maxManaMultiplier +base = 100 + (manaWell_prestige Γ— 500) + disciplineMaxManaBonus +final = (base + equipmentMaxManaBonus) Γ— equipmentMaxManaMultiplier ``` **Maximum Elemental Mana:** ``` -elementMax = (10 + (elemAttuneLevel Γ— 50) + (prestigeElemAttune Γ— 25)) Γ— elementCapMultiplier +elementMax = (10 + (elemAttune_prestige Γ— 25)) Γ— elementCapMultiplier ``` **Base Regeneration (per hour):** ``` -baseRegen = 2 + (manaFlowLevel Γ— 1) + (manaSpringLevel Γ— 2) + (prestigeManaFlow Γ— 0.5) -effectiveRegen = baseRegen Γ— (1 - incursionStrength) Γ— meditationMultiplier +base = 2 + (manaFlow_prestige Γ— 0.5) +temporalMult = 1 + (temporalEcho_prestige Γ— 0.1) +regen = base Γ— temporalMult + attunementRegen + disciplineRegenBonus +final = (regen + equipmentRegenBonus) Γ— equipmentRegenMultiplier +``` + +**Effective Regen (per tick):** +``` +effectiveRegen = max(0, baseRegen Γ— (1 - incursionStrength) Γ— meditationMultiplier - totalConversionPerTick) ``` **Meditation Bonus:** @@ -140,25 +151,13 @@ Base: 1 + min(hours/4, 0.5) β†’ up to 1.5Γ— after 4 hours ``` **Attunement Mana Conversion:** -- Enchanter: Raw β†’ Transference at 0.2/hour base (scales with level) -- Fabricator: Raw β†’ Earth at 0.25/hour base (scales with level) - -### Starting Elements - -| Element | Unlocked at Start | -|---------|-------------------| -| Transference | βœ… Yes | -| Fire | ❌ No | -| Water | ❌ No | -| Air | ❌ No | -| Earth | ❌ No | -| Light | ❌ No | -| Dark | ❌ No | -| Death | ❌ No | +- Enchanter: Raw β†’ Transference at 0.2/hour base (scales with 1.5^level) +- Fabricator: Raw β†’ Earth at 0.25/hour base (scales with 1.5^level) +- Invoker: No automatic conversion (gains mana from pacts) ### Mana Conversion Cost - **100 Raw Mana = 1 Elemental Mana** (for base elements) -- Compound/Exotic elements are crafted, not converted +- Composite/Exotic elements are crafted, not converted --- @@ -171,7 +170,7 @@ Base: 1 + min(hours/4, 0.5) β†’ up to 1.5Γ— after 4 hours | `TICK_MS` | 200ms | Real time per game tick | | `HOURS_PER_TICK` | 0.04 | Game hours per tick | | `MAX_DAY` | 30 | Days per loop | -| `INCURSION_START_DAY` | 20 | When incursion begins | +| `INCURSION_START_DAY` | 5 | When incursion begins | ### Time Progression - 1 real second = 5 game hours (at 5 ticks/second) @@ -181,52 +180,67 @@ Base: 1 + min(hours/4, 0.5) β†’ up to 1.5Γ— after 4 hours ### Incursion Mechanic ``` -if (day < 20): incursionStrength = 0 -else: incursionStrength = min(0.95, (totalHours / maxHours) Γ— 0.95) +if (day < 5): incursionStrength = else: incursionStrength = min(0.95, (totalHours / maxHours) Γ— 0.95) + where totalHours = (day - 5) Γ— 24 + hour + maxHours = (30 - 5) Γ— 24 = 600 ``` -Reduces mana regeneration by `(1 - incursionStrength)`. Starts at 0% on Day 20, reaches 95% by Day 30. +Reduces mana regeneration by `(1 - incursionStrength)`. Starts at 0% on Day 5, reaches 95% by Day 30. --- ## Spire & Floor System -### Floor Generation +### Floor Element Cycle -**Floor Element Cycle:** -```javascript -FLOOR_ELEM_CYCLE = ["fire", "water", "air", "earth", "light", "dark", "death"] +``` +FLOOR_ELEM_CYCLE = [fire, water, air, earth, light, dark, death] element = FLOOR_ELEM_CYCLE[(floor - 1) % 7] ``` -**Floor HP Formula:** +### Floor HP Formulas + +**Normal floors:** ``` -normalFloorHP = floor(100 + floor Γ— 50 + floor^1.7) -guardianFloorHP = GUARDIANS[floor].hp // in constants/guardians.ts +HP = floor(100 + floor Γ— 50 + floor^1.7) ``` -**Guardian Floors:** 10, 20, 30, 40, 50, 60, 80, 90, 100 +**Guardian floors:** +``` +HP = floor(5000 Γ— (floor/10) ^ (1.1 + floor/200)) +``` ### Room Types | Room Type | Chance | Description | |-----------|--------|-------------| -| **Combat** | Default | Single enemy, normal combat | -| **Guardian** | Fixed | Boss floor | +| **Guardian** | Every 10th floor | Boss encounter | +| **Puzzle** | 20% on every 7th floor | Attunement-themed trial | | **Swarm** | 15% | 3–6 enemies with 40% HP each | -| **Speed** | 10% | Enemy with dodge chance (25% base + 0.5%/floor) | -| **Puzzle** | 20% on puzzle floors | Progress-based, faster with relevant attunement | +| **Speed** | 10% | Enemy with dodge chance (25% base + 0.5%/floor, max 50%) | +| **Combat** | Default | Single enemy, normal combat | -### Armor Scaling -```javascript -FLOOR_ARMOR_CONFIG = { - baseChance: 0, // No armor before floor 10 - chancePerFloor: 0.01, // +1% chance per floor after 10 - maxArmorChance: 0.5, // Max 50% of floors have armor - minArmor: 0.05, // Min 5% damage reduction - maxArmor: 0.25 // Max 25% on non-guardians -} -``` +### Puzzle Room Types +- Single attunement: `enchanter_trial`, `fabricator_trial`, `invoker_trial` +- Dual attunement: `hybrid_enchanter_fabricator`, `hybrid_enchanter_invoker`, `hybrid_fabricator_invoker` +- Base progress: 1.5–2% per tick; attunement bonus: 2.5–3% per relevant attunement level + +### Enemy Modifiers (Non-Guardian Floors) + +| Modifier | Min Floor | Effect | Scaling | +|----------|-----------|--------|---------| +| **Armored** | 5+ | Armor (damage reduction) | 10%–45%, scales with floor | +| **Agile** | 12+ | Dodge chance | 20% base + 0.4%/floor, max 55% | +| **Mage** | 15+ | Barrier (shield HP) | Up to 40% of max HP, recharges 5%/tick | +| **Shield** | 10+ | One-time shield | 15% of max HP | +| **Swarm** | 8+ | Multiple weaker enemies | 3–7 enemies, each 35% HP | + +Max 2 modifiers per enemy. Low floors (1–4) get no modifiers. + +### Armor Scaling (Non-Guardian) +- No armor below floor 10 +- Armor chance: `min(0.5, (floor - 10) Γ— 0.01)` +- Armor value: 5%–25% damage reduction, scaling with floor progress --- @@ -235,89 +249,174 @@ FLOOR_ARMOR_CONFIG = { ### Spell Casting Mechanics ``` -progressPerTick = HOURS_PER_TICK Γ— spellCastSpeed Γ— totalAttackSpeed +castProgress += HOURS_PER_TICK Γ— spellCastSpeed Γ— attackSpeedMultiplier +When castProgress >= 1: deduct mana, deal damage, reset progress ``` -Lightning spells get +30% effective cast speed. - ### Damage Calculation -``` -baseDamage = spellDamage + disciplineBonus(combatStat) -pctBonus = 1 + disciplineMultiplier -pactMultiplier = product of all signed pact multipliers -elementalBonus = getElementalBonus(spellElement, floorElement) -finalDamage = baseDamage Γ— pctBonus Γ— pactMultiplier Γ— elementalBonus +``` +baseDmg = spell.dmg + disciplineBaseDmgBonus +pctMult = 1 + disciplineDmgMult +elemMasteryMult = 1 + (elementalMastery Γ— 0.15) +guardianBaneMult = 1 + (guardianBane Γ— 0.2) [guardian floors only] +rawDmgMult = 1 + boonRawDamage / 100 +elemDmgMult = 1 + boonElementalDamage / 100 + +damage = baseDmg Γ— pctMult Γ— elemMasteryMult Γ— guardianBaneMult Γ— rawDmgMult Γ— elemDmgMult +damage *= getElementalBonus(spellElement, floorElement) + +// Critical hit +critChance = disciplineCritChance + boonCritChance / 100 +critDmgMult = 1.5 + boonCritDamage / 100 +if (random() < critChance) damage *= critDmgMult + +// Special modifiers +if (floorHP / floorMaxHP < 0.25) damage *= 2 // Executioner +if (rawMana < maxMana Γ— 0.5) damage *= 1.5 // Berserker + +// Armor reduction +effectiveArmor = max(0, enemyArmor - armorPierce) +damage *= (1 - effectiveArmor) ``` ### Elemental Effectiveness | Condition | Multiplier | |-----------|------------| -| Spell same element as floor | 1.25Γ— | -| Spell is opposite of floor element | 1.50Γ— (Super Effective) | -| Spell's opposite matches floor | 0.75Γ— (Not Very Effective) | -| Raw mana spells | 1.00Γ— | +| Spell opposes floor element (super effective) | 1.50Γ— | +| Spell matches floor element | 1.25Γ— | +| Spell's opposite matches floor (not very effective) | 0.75Γ— | +| Neutral / Raw mana spells | 1.00Γ— | **Element Opposites:** ``` Fire ↔ Water Air ↔ Earth Light ↔ Dark -Lightning β€” no opposite (has armor pierce instead) +Lightning β†’ Earth (grounding) ``` -### Armor & Damage Reduction +### Spell Tiers -``` -effectiveArmor = max(0, enemyArmor - armorPierce) -damageDealt = damage Γ— (1 - effectiveArmor) -``` +| Tier | Category | Example Spells | +|------|----------|----------------| +| 0 | Raw | Mana Bolt (5 dmg), Mana Strike (8 dmg) | +| 1 | Basic Elemental | Fireball, Water Jet, Gust, Stone Bullet, Light Lance, Shadow Bolt, Drain | +| 1 | Lightning | Spark, Lightning Bolt, Chain Lightning, Storm Call | +| 1 | Compound | Metal Shard, Iron Fist, Sand Blast, Sandstorm | +| 1 | AOE | Fireball AOE, Frost Nova, Meteor Shower, Blizzard | +| 1 | Utility | Transfer Strike, Mana Rip, Essence Drain | +| 2 | Advanced | Inferno, Tidal Wave, Earthquake, Hurricane | +| 3 | Master | Pyroclasm, Tsunami, Meteor Strike, Heaven Light, Oblivion | +| 3 | Compound Master | Furnace Blast, Dune Collapse | +| 4 | Legendary | Stellar Nova, Void Collapse, Crystal Shatter | -### Critical Hits - -Critical chance and multiplier come from discipline bonuses (no fixed skill levels). - -### Special Combat Effects - -| Effect | Description | -|--------|-------------| -| **Burn** | Damage over time | -| **Freeze** | Prevents dodge | -| **Stun** | Temporary disable | -| **Pierce** | Ignores % armor | -| **Chain** | Hits multiple targets | -| **AOE** | Area damage | -| **Buff** | Damage multiplier | +### Spell Effects +- `burn`: Damage over time +- `freeze`: Prevents dodge +- `chain`: Hits additional targets +- `aoe`: Area of effect +- `armor_pierce`: Ignores percentage of armor +- `stun`, `pierce`, `multicast`, `shield`, `buff` --- -## Guardian & Pact System +## Guardian System -### Guardian Floors & Stats +### Guardian Tiers -| Floor | Guardian | Element | HP | Pact Mult | Armor | Unique Perk | -|-------|----------|---------|-----|-----------|-------|-------------| -| 10 | Ignis Prime | Fire | 5,000 | 1.5Γ— | 10% | Fire spells cast 10% faster | -| 20 | Aqua Regia | Water | 15,000 | 1.75Γ— | 15% | Water spells +15% damage | -| 30 | Ventus Rex | Air | 30,000 | 2.0Γ— | 18% | Air spells 15% crit chance | -| 40 | Terra Firma | Earth | 50,000 | 2.25Γ— | 25% | Earth spells +25% vs guardians | -| 50 | Lux Aeterna | Light | 80,000 | 2.5Γ— | 20% | Light spells reveal weaknesses | -| 60 | Umbra Mortis | Dark | 120,000 | 2.75Γ— | 22% | Dark spells +25% vs armored | -| 80 | Mors Ultima | Death | 250,000 | 3.25Γ— | 25% | Death spells execute <20% HP | -| 90 | Primordialis | Void | 400,000 | 4.0Γ— | 30% | Void spells ignore 30% resistance | -| 100 | The Awakened One | Stellar | 1,000,000 | 5.0Γ— | 35% | All spells +50% dmg, 25% faster | +#### Tier 1 β€” Base Elements (Floors 10–80) + +| Floor | Name | Element | Armor | Pact Mult | Pact Cost | Pact Time | +|-------|------|---------|-------|-----------|-----------|-----------| +| 10 | Ignis Prime | fire | 10% | 1.5Γ— | 500 | 2h | +| 20 | Aqua Regia | water | 15% | 1.75Γ— | 1,000 | 4h | +| 30 | Ventus Rex | air | 18% | 2.0Γ— | 2,000 | 6h | +| 40 | Terra Firma | earth | 25% | 2.25Γ— | 4,000 | 8h | +| 50 | Lux Aeterna | light | 20% | 2.5Γ— | 8,000 | 10h | +| 60 | Umbra Mortis | dark | 22% | 2.75Γ— | 15,000 | 12h | +| 70 | Mors Ultima | death | 25% | 3.0Γ— | 25,000 | 14h | +| 80 | Vinculum Arcana | transference | 20% | 3.25Γ— | 35,000 | 16h | + +#### Tier 2 β€” Composite Elements (Floors 90–110) + +| Floor | Element | Armor | Pact Mult | Pact Cost | Pact Time | +|-------|---------|-------|-----------|-----------|-----------| +| 90 | metal | 30% | 3.5Γ— | 60,000 | 18h | +| 100 | sand | 25% | 3.75Γ— | 80,000 | 20h | +| 110 | lightning | 22% | 4.0Γ— | 100,000 | 22h | + +#### Tier 3 β€” Exotic Elements (Floors 120–140) + +| Floor | Element | Armor | Pact Mult | Pact Cost | Pact Time | +|-------|---------|-------|-----------|-----------|-----------| +| 120 | crystal | 35% | 4.5Γ— | 150,000 | 26h | +| 130 | stellar | 30% | 5.0Γ— | 200,000 | 30h | +| 140 | void | 35% | 5.5Γ— | 300,000 | 34h | + +Floors 90–140 have procedurally generated names via `generateGuardianName()`. + +#### Tier 4 β€” Combination Bosses (Floor 150+) + +Nine dual-element combinations cycle every 10 floors: + +| Combo Index | Elements | Theme | +|-------------|----------|-------| +| 0 | fire + water | Steam | +| 1 | fire + air | Smoke | +| 2 | water + earth | Mud | +| 3 | light + dark | Twilight | +| 4 | death + light | Undeath | +| 5 | fire + death | Hellfire | +| 6 | water + dark | Abyssal | +| 7 | air + light | Radiant wind | +| 8 | earth + death | Fossil | + +**Scaling (per floor above 150):** +``` +armor = min(0.5, 0.25 + (floor - 150) Γ— 0.002) +pactMultiplier = 6.0 + (floor - 150) Γ— 0.05 +pactCost = floor(hp Γ— 0.5) +pactTime = 20 + floor((floor - 150) / 10) +damageMult = 3.0 + (floor - 150) Γ— 0.02 +insightMult = 2.5 + (floor - 150) Γ— 0.01 +``` + +Combo guardians grant boons to both elements (+10% each) and dual-aspect perks (+20% effectiveness to both element spells). Names generated from combined prefixes (e.g., "Ignis-Aqua the Warden"). + +### Guardian HP Formula (All Tiers) +``` +HP(floor) = floor(5000 Γ— (floor/10) ^ (1.1 + floor/200)) +``` + +### Guardian Combat Effects + +| Element | Passive Effect | +|---------|---------------| +| fire | burn (0.1) | +| water | armor_pierce (0.15) | +| air | cast_speed (0.05) | +| earth | armor_pierce (0.2) | +| light | crit_chance (0.1) | +| dark | crit_damage (0.15) | +| death | raw_damage (0.1) | +| transference | cost_reduction (0.25) | +| metal | armor_pierce (0.2) | +| sand | slow (0.25) | +| lightning | chain (2) | +| crystal | reflect (0.15) | +| stellar | night_bonus (0.3) | +| void | resist_ignore (0.4) | ### Guardian Boons (on pact) -| Boon Type | Effect | -|-----------|--------| -| `maxMana` | +Max raw mana | -| `manaRegen` | +Regen/hour | -| `castingSpeed` | +% cast speed | -| `elementalDamage` | +% element damage | -| `rawDamage` | +% all damage | -| `critChance` | +% crit chance | -| `critDamage` | +% crit multiplier | -| `insightGain` | +% insight | +Each guardian grants 2 boons from: `maxMana`, `manaRegen`, `castingSpeed`, `elementalDamage`, `rawDamage`, `critChance`, `critDamage`, `spellEfficiency`, `manaGain`, `insightGain`, `prestigeInsight`. + +### Pact Ritual +1. Defeat guardian β†’ floor added to `defeatedGuardians` +2. Start ritual: costs raw mana + time (guardian-specific) +3. Progress increases by `HOURS_PER_TICK` per tick +4. On completion: floor moves to `signedPacts`, boons applied +5. Pact slots limit simultaneous signed pacts (starting 1, upgradeable) ### Victory Condition Defeat floor 100 guardian **and** sign the pact β†’ 3Γ— normal insight. @@ -330,7 +429,7 @@ Attunements are class-like specializations that unlock discipline pools and gran ### The Three Attunements -#### 1. Enchanter (Right Hand) βœ… +#### 1. Enchanter (Right Hand) β€” Starting | Property | Value | |----------|-------| @@ -340,10 +439,10 @@ Attunements are class-like specializations that unlock discipline pools and gran | **Conversion** | 0.2 rawβ†’transference/hour | | **Unlock** | Starting attunement | -**Disciplines Unlocked:** Enchanter discipline pool (`data/disciplines/enchanter.ts`) +**Disciplines:** 10 disciplines across 4 files (core, utility, spells, special) **Capabilities:** Enchanting & disenchanting equipment -#### 2. Invoker (Chest) βœ… +#### 2. Invoker (Chest) β€” Locked | Property | Value | |----------|-------| @@ -353,10 +452,10 @@ Attunements are class-like specializations that unlock discipline pools and gran | **Conversion** | None | | **Unlock** | Defeat first guardian | -**Disciplines Unlocked:** Invoker discipline pool (`data/disciplines/invoker.ts`) +**Disciplines:** 2 disciplines (Spell Casting, Void Manipulation) **Capabilities:** Form pacts with guardians, access guardian powers -#### 3. Fabricator (Left Hand) βœ… +#### 3. Fabricator (Left Hand) β€” Locked | Property | Value | |----------|-------| @@ -366,17 +465,16 @@ Attunements are class-like specializations that unlock discipline pools and gran | **Conversion** | 0.25 rawβ†’earth/hour | | **Unlock** | Prove crafting worth | -**Disciplines Unlocked:** Fabricator discipline pool (`data/disciplines/fabricator.ts`) +**Disciplines:** 2 disciplines (Golem Crafting, Crafting Efficiency) **Capabilities:** Golem crafting, gear crafting, Earth shaping ### Attunement Leveling -```javascript +``` Level 2: 1,000 XP Level 3: 2,500 XP -Level 4: 5,000 XP -Level 5: 10,000 XP -// Each level β‰ˆ 2Γ— previous; Max Level: 10 +Level 4+: 1000 Γ— 2^(level-2) Γ— 1.25 +Max Level: 10 regenMultiplier = 1.5^(level - 1) conversionRate = baseRate Γ— 1.5^(level - 1) @@ -386,7 +484,7 @@ conversionRate = baseRate Γ— 1.5^(level - 1) ## Discipline System -Disciplines replace the old skill system entirely. There are no discrete levels or study actions β€” disciplines grow **continuously** through practice. The player activates a discipline and it drains mana each tick in exchange for permanent stat growth. +Disciplines replace the old skill system entirely. There are no discrete levels β€” disciplines grow **continuously** through practice. The player activates a discipline and it drains mana each tick in exchange for permanent stat growth within the run. ### Core Concept @@ -397,16 +495,6 @@ Disciplines replace the old skill system entirely. There are no discrete levels - **Mana drain** also increases with XP β€” mastery has a cost - **Perks** unlock at XP thresholds, granting bonus effects -### Disciplines vs Old Skills - -| Old Skill System | Discipline System | -|-----------------|-------------------| -| Discrete levels (1–10 per tier) | Continuous XP accumulation | -| Mana cost paid once on study | Mana drained every tick | -| Required hours to level up | Grows passively while active | -| Milestone upgrades at L5/L10 | Perks unlock at XP thresholds | -| 5-tier evolution (T1–T5) | Single continuous curve per discipline | - ### Formulas **Stat Bonus (continuous):** @@ -419,14 +507,10 @@ StatBonus = baseValue Γ— (XP / scalingFactor)^0.65 ManaDrainPerTick = drainBase Γ— (1 + (XP / difficultyFactor)^0.4) ``` -- `scalingFactor` controls how quickly stats grow -- `difficultyFactor` controls how quickly drain increases -- Higher `scalingFactor` β†’ slower stat gain; higher `difficultyFactor` β†’ slower drain increase - ### Concurrent Discipline Limit ``` -concurrentLimit = 1 + floor(totalXP / 500) // capped at base + 3 +concurrentLimit = min(1 + floor(totalXP / 500), 4) ``` Players start with 1 active discipline slot. As total XP across all disciplines grows, additional slots unlock (max 4 total). @@ -439,27 +523,42 @@ Players start with 1 active discipline slot. As total XP across all disciplines | `capped` | Grants stacking bonus tiers; each tier requires another `interval` XP beyond `threshold` | | `infinite` | Repeating bonus β€” a new stack every `interval` XP past `threshold` (no cap) | -### Attunement Pools +### Discipline Pools (34 Total) -| Pool | File | Requires | -|------|------|---------| -| Base | `data/disciplines/base.ts` | None (all attunements) | -| Enchanter | `data/disciplines/enchanter.ts` | Enchanter attunement | -| Invoker | `data/disciplines/invoker.ts` | Invoker attunement | -| Fabricator | `data/disciplines/fabricator.ts` | Fabricator attunement | +| Pool | File | Count | Requires | +|------|------|-------|----------| +| Base | `base.ts` | 1 | None | +| Elemental Attunement | `elemental.ts` | 7 | None | +| Elemental Regen | `elemental-regen.ts` | 8 | None | +| Advanced Regen | `elemental-regen-advanced.ts` | 6 | Mana type unlocked | +| Enchanter Core | `enchanter.ts` | 4 | Enchanter attunement | +| Enchanter Utility | `enchanter-utility.ts` | 2 | Enchanter attunement | +| Enchanter Spells | `enchanter-spells.ts` | 3 | Enchanter attunement | +| Enchanter Special | `enchanter-special.ts` | 1 | Enchanter attunement | +| Invoker | `invoker.ts` | 2 | Invoker attunement | +| Fabricator | `fabricator.ts` | 2 | Fabricator attunement | ### Example Disciplines -| Discipline | Attunement | Mana Type | Stat Bonus | Description | -|------------|------------|-----------|------------|-------------| -| Raw Mana Mastery | Base | Raw | `maxManaBonus` | More raw mana from practice | -| Elemental Attunement | Base | Fire | `elementCap_fire` | Expanded fire capacity | -| Lightning Surge | Invoker | Lightning | `lightningDamage` | Boosts lightning spell damage | -| Void Echo | Invoker | Void | `voidCastSpeed` | Increases void spell cast speed | -| Metalworking | Fabricator | Metal | `craftSpeed_metal` | Faster metal equipment crafting | -| Crystal Shaping | Fabricator | Crystal | `durability_crystal` | More durable crystal equipment | -| Soulforge | Enchanter | Light | `enchantPower` | Stronger enchantment effects | -| Mana Prism | Enchanter | Light | `manaReflect` | Prismatic mana focusing | +| Discipline | Pool | Mana Type | Stat Bonus | Description | +|------------|------|-----------|------------|-------------| +| Raw Mana Mastery | Base | raw | `maxManaBonus` | More raw mana from practice | +| Elemental Attunement (Γ—7) | Elemental | per element | `elementCap_{type}` | Expanded element capacity | +| Elemental Regen (Γ—8) | Regen | per element | `regen_{type}` | Passive element regen | +| Advanced Regen (Γ—6) | Adv. Regen | composite/exotic | `regen_{type}` | Composite/exotic regen | +| Enchantment Crafting | Enchanter | transference | `enchantPower` | Stronger enchantments | +| Study Basic Weapon Enchantments | Enchanter | fire | β€” | Unlocks sword_fire, sword_frost, sword_lightning | +| Study Advanced Weapon Enchantments | Enchanter | dark | β€” | Unlocks sword_void, damage_5, crit_5, attack_speed_10 | +| Study Utility Enchantments | Enchanter | light | β€” | Unlocks meditate_10, study_10, insight_5 | +| Study Mana Enchantments | Enchanter | water | β€” | Unlocks mana_cap_50, mana_cap_100, mana_regen_1/2, click_mana_1/3 | +| Study Basic Spell Enchantments | Enchanter | air | β€” | Unlocks 8 basic spell enchants | +| Study Intermediate Spell Enchantments | Enchanter | earth | β€” | Unlocks 6 intermediate spell enchants | +| Study Advanced Spell Enchantments | Enchanter | dark | β€” | Unlocks 10 master spell enchants | +| Study Special Enchantments | Enchanter | death | β€” | Unlocks spell_echo_10, guardian_dmg_10, overpower_80, etc. | +| Spell Casting | Invoker | light | `baseDamage` | +Base damage | +| Void Manipulation | Invoker | void | `baseDamageMult` | +Base damage multiplier | +| Golem Crafting | Fabricator | earth | `golemCapacity` | +Golem capacity | +| Crafting Efficiency | Fabricator | sand | `craftCostReduction` | -Crafting costs | ### Discipline Lifecycle @@ -472,23 +571,16 @@ Players start with 1 active discipline slot. As total XP across all disciplines c. If sufficient mana β†’ disc.xp += 1; stat bonuses recomputed 4. Player can manually pause/resume disciplines 5. On loop end, XP resets (stat bonuses are per-run, not permanent) - β€” Prestige upgrades may eventually preserve some XP ``` -### Discipline UI - -`src/components/game/tabs/DisciplinesTab.tsx` -`src/lib/game/stores/discipline-slice.ts` β€” Zustand store (persisted) -`src/lib/game/effects/discipline-effects.ts` β€” integrates into `getUnifiedEffects()` - --- ## Equipment & Enchantment System -### Equipment Slots +### Equipment Slots (8) ``` -mainHand - Staves (2H), Wands, Swords +mainHand - Casters (some 2H), Swords, Catalysts offHand - Shields, Catalysts (blocked by 2-handed weapons) head - Hoods, Hats, Helms body - Robes, Armor @@ -498,9 +590,22 @@ accessory1 - Rings, Amulets accessory2 - Rings, Amulets ``` -### Two-Handed Weapons +### Equipment Categories & Types (50 total) -2-handed weapons (Staves) occupy both `mainHand` and `offHand`. The offhand slot is **blocked** when a 2H weapon is equipped. The UI shows a "Blocked by 2-handed weapon" label on the offhand slot. +| Category | Slot | Count | Examples | +|----------|------|-------|----------| +| Casters | mainHand | 6 | Basic Staff (2H), Apprentice Wand, Oak Staff (2H), Crystal Wand, Arcanist Staff (2H), Battlestaff (2H) | +| Swords | mainHand | 5 | Iron Blade, Steel Blade, Crystal Blade, Arcanist Blade, Void-Touched Blade | +| Catalysts | mainHand | 3 | Basic Catalyst, Fire Catalyst, Void Catalyst | +| Body | body | 5 | Civilian Shirt, Apprentice Robe, Scholar Robe, Battle Robe, Arcanist Robe | +| Head | head | 5 | Cloth Hood, Apprentice Cap, Wizard Hat, Arcanist Circlet, Battle Helm | +| Hands | hands | 4 | Civilian Gloves, Apprentice Gloves, Spellweave Gloves, Combat Gauntlets | +| Feet | feet | 4 | Civilian Shoes, Apprentice Boots, Traveler Boots, Battle Boots | +| Shields | offHand | 4 | Basic Shield, Reinforced Shield, Runic Shield, Mana Shield | +| Accessories | accessory1/2 | 11 | Copper Ring, Silver Ring, Gold Ring, Signet Ring, Copper Amulet, Silver Amulet, Crystal Pendant, Mana Brooch, Arcanist Pendant, Void-Touched Ring | + +### Two-Handed Weapons +2H weapons (Basic Staff, Oak Staff, Arcanist Staff, Battlestaff) occupy both `mainHand` and `offHand`. The offhand slot is **blocked** when a 2H weapon is equipped. ### Equipment Instance Structure @@ -520,40 +625,60 @@ interface EquipmentInstance { ### Enchantment Process (3 Stages) #### Stage 1: Design -- Select effects from unlocked pool (`data/enchantment-effects.ts`) -- Limited to owned gear types +- Select effects from unlocked pool (`data/enchantments/`) +- Name the design, choose equipment type - Time: 1h base + 0.5h per effect stack -- Implemented in `crafting-actions/design-actions.ts` +- Dual design slot available with Enchant Mastery special +- 10% chance per tick for instant completion (Instant Designs special) +- Implemented in `crafting-design.ts` / `design-actions.ts` #### Stage 2: Prepare -- Mana cost: `capacity Γ— 10` -- Time: `2h + 1h per 50 capacity` +- Equipment must be equipped +- **Removes all existing enchantments** (confirmation dialog if enchanted) +- Mana cost: `totalCapacity Γ— 10` +- Time: `2h + floor(totalCapacity / 50)` hours - Auto-transitions to Meditate on complete -- Implemented in `crafting-actions/preparation-actions.ts` +- **ONLY stage where explicit disenchanting is possible** +- Implemented in `crafting-prep.ts` / `preparation-actions.ts` #### Stage 3: Apply -- Mana per hour: `20 + 5 per effect stack` -- Time: `2h + 1h per effect stack` -- Grants Enchanter XP: 1 XP per 10 capacity -- Auto-transitions to Meditate on complete -- Implemented in `crafting-actions/application-actions.ts` +- Equipment must have "Ready for Enchantment" tag +- Select a saved design to apply +- Time: `2h + sum(stacks)` hours +- Mana per hour: `20 + 5 Γ— sum(stacks)` +- Free enchant chances: Enchant Preservation (25%), Thrifty Enchanter (10%), Optimized Enchanting (25%) +- Pure Essence special: effects with base cost < 100 get 1.25Γ— stacks +- Cannot re-enchant already enchanted gear (must Prepare first) +- Implemented in `crafting-apply.ts` / `application-actions.ts` ### Enchantment Effect Categories -| Category | Description | Equipment Types | -|----------|-------------|-----------------| -| **Spell** | Grants spell ability | Casters only | -| **Mana** | Max/regen/click bonuses | Casters, Catalysts, Head, Body, Accessories | -| **Combat** | Damage, crit, speed | Casters, Hands | -| **Utility** | Meditation, insight | Most equipment | -| **Special** | Unique effects | Various | -| **Elemental** | Weapon enchantments | Swords, Casters | +| Category | File | Equipment Types | Example Effects | +|----------|------|-----------------|-----------------| +| **Mana** | `mana-effects.ts` | Most | `mana_cap_50`, `mana_regen_1`, `click_mana_1`, `{element}_cap_10/25/50` | +| **Combat** | `combat-effects.ts` | Casters, Hands | `damage_5`, `damage_10`, `damage_pct_10`, `crit_5`, `attack_speed_10` | +| **Elemental** | `elemental-effects.ts` | Casters, Swords | `sword_fire`, `sword_frost`, `sword_lightning`, `sword_void` | +| **Special** | `special-effects.ts` | Various | `spell_echo_10`, `guardian_dmg_10`, `overpower_80`, `first_strike`, `combo_master`, `adrenaline_rush` | +| **Utility** | `utility-effects.ts` | Most | `meditate_10`, `study_10`, `insight_5` | +| **Spell** | `spell-effects/` | Casters only | `manaBolt`, `fireball`, `inferno`, `pyroclasm`, `stellarNova`, etc. (~40+ spells) | +| **Defense** | `defense-effects.ts` | β€” | Placeholder (empty) | + +### Capacity & Stacking +- Each equipment type has `baseCapacity` (15–80) +- Each enchantment effect has `baseCapacityCost` per stack +- **Stacking cost:** each additional stack costs 20% more: `cost Γ— (1 + i Γ— 0.2)` for stack index `i` +- Efficiency bonus reduces total cost: `totalCost Γ— (1 - efficiencyBonus)` + +### Disenchanting +- Only possible during **Prepare stage** (or via explicit disenchant action) +- Recovery rate: `0.1 + disenchantLevel Γ— 0.2` (base 10% + 20% per level) +- Clears all enchantments, resets `usedCapacity` to 0 ### Starting Equipment | Slot | Item | Enchantment | Capacity | |------|------|-------------|----------| -| Main Hand | Basic Staff | Mana Bolt spell | 50/50 | +| Main Hand | Basic Staff (2H) | Mana Bolt spell | 50/50 | | Body | Civilian Shirt | None | 0/30 | | Feet | Civilian Shoes | None | 0/15 | @@ -564,49 +689,50 @@ interface EquipmentInstance { ### Golem Slots ``` -Fabricator Level 2: 1 slot -Fabricator Level 4: 2 slots -Fabricator Level 6: 3 slots -Fabricator Level 8: 4 slots -Fabricator Level 10: 5 slots - -slots = floor(fabricatorLevel / 2) +slots = floor(fabricatorLevel / 2) [minimum 0] +Level 2: 1 slot +Level 4: 2 slots +Level 6: 3 slots +Level 8: 4 slots +Level 10: 5 slots ``` -### Golem Types +### Golem Types (10 Total) -#### Base Golems +#### Base Golems (1) -| Golem | Element | Damage | Speed | Armor Pierce | Unlock | -|-------|---------|--------|-------|--------------|--------| -| Earth Golem | Earth | 8 | 1.5/h | 15% | Fabricator 2 | +| Golem | Element | Damage | Speed | HP | Pierce | Unlock | +|-------|---------|--------|-------|----|--------|--------| +| Earth Golem | Earth | 8 | 1.5/s | 50 | 15% | Fabricator 2 | -#### Elemental Variants +#### Elemental Variant Golems (3) -| Golem | Element | Damage | Speed | Pierce | Unlock | -|-------|---------|--------|-------|--------|--------| -| Steel Golem | Metal | 12 | 1.2/h | 35% | Metal mana unlocked | -| Crystal Golem | Crystal | 18 | 1.0/h | 25% | Crystal mana unlocked | -| Sand Golem | Sand | 6 | 2.0/h | 10% | Sand mana unlocked | +| Golem | Element | Damage | Speed | HP | Pierce | Unlock | +|-------|---------|--------|-------|----|--------|--------| +| Steel Golem | Metal | 12 | 1.2/s | 60 | 35% | Metal mana unlocked | +| Crystal Golem | Crystal | 18 | 1.0/s | 40 | 25% | Crystal mana unlocked | +| Sand Golem | Sand | 6 | 2.0/s | 35 | 10% | Sand mana unlocked | -#### Advanced Hybrid Golems (Enchanter 5 + Fabricator 5) +#### Hybrid Golems (6) β€” Require Enchanter 5 + Fabricator 5 -| Golem | Elements | Damage | Speed | Pierce | Special | -|-------|----------|--------|-------|--------|---------| -| Lava Golem | Earth + Fire | 15 | 1.0/h | 20% | AOE 2 | -| Galvanic Golem | Metal + Lightning | 10 | 3.5/h | 45% | Fast | -| Obsidian Golem | Earth + Dark | 25 | 0.8/h | 50% | High damage | -| Prism Golem | Crystal + Light | 20 | 1.5/h | 35% | AOE 3 | -| Quicksilver Golem | Metal + Water | 8 | 4.0/h | 30% | Very fast | -| Voidstone Golem | Earth + Void | 40 | 0.6/h | 60% | Ultimate | +| Golem | Elements | Damage | Speed | HP | Pierce | Special | +|-------|----------|--------|-------|----|--------|---------| +| Lava Golem | Earth + Fire | 15 | 1.0/s | 70 | 20% | AOE 2 | +| Galvanic Golem | Metal + Lightning | 10 | 3.5/s | 45 | 45% | Fast | +| Obsidian Golem | Earth + Dark | 25 | 0.8/s | 55 | 50% | High damage | +| Prism Golem | Crystal + Light | 20 | 1.5/s | 50 | 35% | AOE 3 | +| Quicksilver Golem | Metal + Water | 8 | 4.0/s | 40 | 30% | Very fast | +| Voidstone Golem | Earth + Void | 40 | 0.6/s | 100 | 60% | AOE 3, ultimate | ### Golem Combat ``` progressPerTick = HOURS_PER_TICK Γ— attackSpeed Γ— efficiencyBonus -damage = baseDamage Γ— (1 + golemMasteryBonus) // bonus from discipline +damage = baseDamage Γ— (1 + golemMasteryBonus) ``` +Golems last `1 + golemLongevity` floors. Maintenance cost multiplier: `1 - (golemSiphon Γ— 0.1)`. + --- ## Prestige/Loop System @@ -621,58 +747,66 @@ damage = baseDamage Γ— (1 + golemMasteryBonus) // bonus from discipli ### Insight Formula ``` -baseInsight = floor(maxFloorReached Γ— 15 + totalManaGathered / 500 + signedPacts.length Γ— 150) -finalInsight = floor(baseInsight Γ— (1 + insightAmpLevel Γ— 0.25) Γ— disciplineBonus) +skillBonus = 1 + (insightHarvest Γ— 0.1) + disciplineInsightBonus +boonInsightMult = 1 + boonInsightGain / 100 +mult = (1 + insightAmp Γ— 0.25) Γ— skillBonus Γ— boonInsightMult + +baseInsight = floor(maxFloorReached Γ— 15 + totalManaGathered / 500 + signedPacts.length Γ— 150 + prestigeInsightBonus) +finalInsight = floor(baseInsight Γ— mult) ``` -### Prestige Upgrades +Victory bonus: Γ—3 if maxFloorReached β‰₯ 100 AND floor 100 guardian pact is signed. -| Upgrade | Max | Cost | Effect | -|---------|-----|------|--------| -| Mana Well | 5 | 500 | +500 starting max mana | -| Mana Flow | 10 | 750 | +0.5 permanent regen | -| Deep Memory | 5 | 1000 | +1 memory slot | -| Insight Amp | 4 | 1500 | +25% insight gain | -| Spire Key | 5 | 4000 | Start at floor +2 | -| Temporal Echo | 5 | 3000 | +10% mana generation | -| Steady Hand | 5 | 1200 | -15% durability loss | -| Ancient Knowledge | 5 | 2000 | Start with blueprint | -| Elemental Attune | 10 | 600 | +25 element cap | -| Spell Memory | 3 | 2500 | Start with random spell | -| Guardian Pact | 5 | 3500 | +10% pact multiplier | -| Quick Start | 3 | 400 | +100 starting mana | -| Elem. Start | 3 | 800 | +5 each unlocked element | +### Prestige Upgrades (14 Types) -### Memory System +| ID | Name | Description | Max Level | Cost | +|----|------|-------------|-----------|------| +| `manaWell` | Mana Well | +500 starting max mana | 5 | 500 | +| `manaFlow` | Mana Flow | +0.5 regen/sec permanently | 10 | 750 | +| `insightAmp` | Insight Amp | +25% insight gain | 4 | 1500 | +| `spireKey` | Spire Key | Start at floor +2 | 5 | 4000 | +| `temporalEcho` | Temporal Echo | +10% mana generation | 5 | 3000 | +| `steadyHand` | Steady Hand | -15% durability loss | 5 | 1200 | +| `ancientKnowledge` | Ancient Knowledge | Start with blueprint discovered | 5 | 2000 | +| `elementalAttune` | Elemental Attunement | +25 elemental mana cap | 10 | 600 | +| `spellMemory` | Spell Memory | Start with random spell learned | 3 | 2500 | +| `guardianPact` | Guardian Pact | +10% pact multiplier | 5 | 3500 | +| `quickStart` | Quick Start | Start with 100 raw mana | 3 | 400 | +| `elemStart` | Elem. Start | Start with 5 of each unlocked element | 3 | 800 | +| `unlockedManaTypeCapacity` | Mana Type Capacity | +10 capacity for selected mana type | 5 | 1000 | -- **Base slots:** 3 -- **Additional:** +1 per Deep Memory prestige level -- **Memories:** Spells preserved across loops +### Pact Persistence +- Signed pacts persist through prestige (bounded by `pactSlots`) +- `pactSlots` starting value: 1 (upgradeable) --- ## Achievement System -### Categories +### Categories (24 Total) -| Category | Description | -|----------|-------------| -| `mana` | Mana gathering milestones | -| `combat` | Combat achievements | -| `progression` | Floor/guardian progression | -| `crafting` | Equipment and enchanting | -| `prestige` | Loop and insight milestones | +| Category | Count | Examples | +|----------|-------|---------| +| **Combat** (9) | First Blood (floor 2), Floor Climber (10), Spire Assault (25), Tower Conqueror (50), Spire Master (75), Apex Reached (100), Heavy Hitter (100 dmg), Devastating Blow (1K dmg), Apocalypse Now (10K dmg) | +| **Progression** (3) | Pact Seeker (1 pact), Pact Collector (5), Pact Master (9) | +| **Magic** (6) | Spell Caster/Weaver/Storm (100/1K/10K spells), Mana Pool/Lake/Ocean (1K/100K/10M mana) | +| **Crafting** (3) | Enchanter (1 craft), Master Enchanter (10), Legendary Enchanter (50) | +| **Special** (3) | Speed Runner (floor 50 < 5 days, hidden), Perfectionist (floor 100 no pacts, hidden), Survivor (loop during full incursion day 30+) | ### Reward Types | Reward | Effect | |--------|--------| -| `insight` | One-time insight bonus | -| `manaBonus` | Permanent max mana | -| `damageBonus` | Permanent damage increase | -| `regenBonus` | Permanent regen increase | +| `insight` | One-time insight bonus (10–1000) | +| `manaBonus` | Permanent max mana (10–200) | +| `damageBonus` | Permanent damage increase (3%–25%) | +| `regenBonus` | Permanent regen increase (0.5–1) | | `title` | Cosmetic title | -| `unlockEffect` | Unlocks enchantment effect | +| `unlockEffect` | Unlocks game effect | + +### Hidden Achievements +- 2 hidden achievements: Speed Runner and Perfectionist +- Revealed when player reaches 50% progress toward requirement --- @@ -680,47 +814,47 @@ finalInsight = floor(baseInsight Γ— (1 + insightAmpLevel Γ— 0.25) Γ— disciplineB ### Damage Calculation (Complete) -```javascript -function calcDamage(state, spellId, floorElement) { - const spell = SPELLS_DEF[spellId]; // constants/spells.ts +``` +baseDmg = spell.dmg + disciplineBaseDmgBonus +pctMult = 1 + disciplineDmgMult +elemMasteryMult = 1 + (elementalMastery Γ— 0.15) +guardianBaneMult = 1 + (guardianBane Γ— 0.2) [guardian floors only] +rawDmgMult = 1 + boonRawDamage / 100 +elemDmgMult = 1 + boonElementalDamage / 100 - // Base damage + discipline bonuses - let damage = spell.dmg + disciplineBonus('combatDamage'); +damage = baseDmg Γ— pctMult Γ— elemMasteryMult Γ— guardianBaneMult Γ— rawDmgMult Γ— elemDmgMult +damage *= getElementalBonus(spellElement, floorElement) - // Discipline multiplier bonus - damage *= 1 + disciplineBonus('damagePct'); +// Critical hit +critChance = disciplineCritChance + boonCritChance / 100 +critDmgMult = 1.5 + boonCritDamage / 100 +if (random() < critChance) damage *= critDmgMult - // Guardian bane (vs guardians only) - if (isGuardian) { - damage *= 1 + disciplineBonus('guardianBane'); - } +// Special modifiers +if (floorHP / floorMaxHP < 0.25) damage *= 2 // Executioner +if (rawMana < maxMana Γ— 0.5) damage *= 1.5 // Berserker - // Pact multiplier - damage *= state.signedPacts.reduce((m, f) => m * GUARDIANS[f].pact, 1); +// Armor reduction +effectiveArmor = max(0, enemyArmor - armorPierce) +damage *= (1 - effectiveArmor) - // Elemental effectiveness - damage *= getElementalBonus(spell.elem, floorElement); - - // Critical hit (from discipline crit bonus) - const critChance = disciplineBonus('critChance'); - if (Math.random() < critChance) damage *= 1.5; - - // Equipment effects - damage *= effects.baseDamageMultiplier; - damage += effects.baseDamageBonus; - - // Armor reduction - const effectiveArmor = Math.max(0, enemyArmor - armorPierce); - damage *= (1 - effectiveArmor); - - return Math.floor(damage); -} +return floor(damage) ``` ### DPS Calculation -```javascript -dps = (damage Γ— castSpeed Γ— attackSpeedMultiplier) / hour +``` +dps = damage Γ— castSpeed Γ— attackSpeedMultiplier +``` + +### Elemental Bonus Lookup + +``` +getElementalBonus(spellElement, floorElement): + if spell == floor: return 1.25 (same element) + if spell opposes floor: return 1.50 (super effective) + if floor opposes spell: return 0.75 (not very effective) + return 1.00 (neutral) ``` --- @@ -770,15 +904,15 @@ dps = (damage Γ— castSpeed Γ— attackSpeedMultiplier) / hour | **Enchanting** | Enchanter attunement, Enchanter disciplines | Equipment spells, bonuses | | **Golemancy** | Fabricator attunement, Earth mana | Additional combat damage | | **Pacts** | Guardian defeat | Permanent multipliers, boons | -| **Prestige** | Loop completion | Permanent upgrades, memories | +| **Prestige** | Loop completion | Permanent upgrades, pact persistence | | **Equipment** | Crafting/Blueprints | Spell access, stat bonuses | ### Progression Gates 1. **Early Game (Floors 1–10):** Mana gathering and regen, base disciplines, starting equipment 2. **Mid Game (Floors 10–40):** First guardian pacts, attunement unlocking, attunement discipline pools, equipment enchanting, Golemancy -3. **Late Game (Floors 40–80):** Compound/exotic elements, hybrid golems, advanced discipline perks, advanced enchantments -4. **End Game (Floors 80–100):** Void/Stellar/Crystal spells, ultimate golems, victory preparation +3. **Late Game (Floors 40–140):** Compound/exotic elements, hybrid golems, advanced discipline perks, advanced enchantments, all guardian tiers +4. **End Game (Floors 150+):** Combination bosses with dual elements, indefinite scaling --- @@ -786,42 +920,131 @@ dps = (damage Γ— castSpeed Γ— attackSpeedMultiplier) / hour ### Modular Structure Overview -#### Store Architecture +#### Store Architecture (7 Zustand Stores) **Active Stores (`src/lib/game/stores/`):** -- **gameStore.ts** β€” Core state, tick logic, main actions -- **manaStore.ts** β€” Mana gathering, elements, conversion -- **combatStore.ts** β€” Combat system, spells, floor progression -- **prestigeStore.ts** β€” Prestige/loop system, insight, upgrades +- **gameStore.ts** β€” Coordinator/tick pipeline, combines all stores +- **manaStore.ts** β€” Mana pools, regen, element conversion +- **combatStore.ts** β€” Spire/floors, combat, spells, achievements +- **craftingStore.ts** β€” Enchanting (Design/Prepare/Apply), equipment instances, loot +- **attunementStore.ts** β€” Enchanter/Invoker/Fabricator attunement levels & XP +- **prestigeStore.ts** β€” Insight, prestige upgrades, pact persistence, loop state - **discipline-slice.ts** β€” Discipline activation, XP ticking, perk evaluation -- **uiStore.ts** β€” UI state, modals, debug settings +- **uiStore.ts** β€” Logs, pause, game over/victory flags -**Legacy Store (Migration in Progress):** -- **store.ts** β€” Legacy monolithic store (reduced) -- **store/** β€” Legacy store slices being migrated to `stores/` -- **store-modules/** β€” Legacy store utilities +**Supporting store files:** +- `tick-pipeline.ts` β€” `buildTickContext()` / `applyTickWrites()` pattern +- `combat-actions.ts` β€” Combat tick processing +- `gameLoopActions.ts` β€” Climb/spire actions +- `gameHooks.ts` β€” React hooks bound to stores +- `craftingStore.types.ts` β€” Crafting type definitions +- `crafting-initial-state.ts` β€” Default crafting state +- `combat-state.types.ts` β€” Combat type definitions -#### Discipline System (`src/lib/game/`) -- `data/disciplines/` β€” Per-attunement discipline definitions -- `types/disciplines.ts` β€” `DisciplineDefinition`, `DisciplineState`, perk types -- `utils/discipline-math.ts` β€” `calculateStatBonus`, `calculateManaDrain`, perk helpers -- `effects/discipline-effects.ts` β€” `computeDisciplineEffects()` β†’ feeds `getUnifiedEffects()` -- `stores/discipline-slice.ts` β€” Zustand store for active discipline state +**No legacy store files remain.** The old `store.ts`, `store/`, and `store-modules/` directories have been fully removed. -#### Crafting System (`src/lib/game/crafting-actions/`) -- Modular action files for each crafting stage -- Design, preparation, application, equipment, disenchant actions +#### Data Layer (`src/lib/game/data/`) +- `disciplines/` β€” 11 files: per-attunement discipline definitions (34 disciplines total) +- `enchantments/` β€” 7 files + `spell-effects/` subdirectory: enchantment effects by category +- `equipment/` β€” 13 files: equipment type definitions by slot +- `golems/` β€” 7 files: golem definitions (base, elemental, hybrid) +- `guardian-data.ts` β€” Static guardian definitions (floors 10–140) +- `guardian-encounters.ts` β€” Procedural guardian lookup & combo bosses (150+) +- `attunements.ts` β€” Attunement definitions +- `achievements.ts` β€” Achievement definitions (24 achievements) +- `crafting-recipes.ts` / `fabricator-recipes.ts` β€” Crafting recipes +- `loot-drops.ts` β€” Loot drop tables +- `enchantment-effects.ts` / `enchantment-types.ts` β€” Enchantment metadata #### Constants (`src/lib/game/constants/`) -- Domain-specific constant files: elements, guardians, spells, rooms, prestige -- Barrel exports via `constants/index.ts` +- `core.ts` β€” Tick rate, caps, time constants +- `elements.ts` β€” Element definitions, opposites, floor cycle +- `prestige.ts` β€” Prestige upgrade definitions +- `rooms.ts` β€” Room type configs (armor, speed, swarm, puzzle) +- `spells.ts` β€” Spell constants barrel +- `spells-modules/` β€” 10 files: spell definitions by category (raw, basic, advanced, master, legendary, lightning, compound, AOE, utility, enchantment) -#### Game Data (`src/lib/game/data/`) -- Enchantment effects, equipment types, golems, disciplines, achievements, loot tables -- Organized by domain for easy navigation +#### Types (`src/lib/game/types/`) +- `game.ts` β€” Core game types (GameState, ActivityLogEntry, etc.) +- `disciplines.ts` β€” Discipline definition types +- `attunements.ts` β€” Attunement types +- `equipment.ts` β€” Equipment instance types +- `equipmentSlot.ts` β€” Equipment slot enum +- `elements.ts` β€” Element type definitions +- `spells.ts` β€” Spell types + +#### Utilities (`src/lib/game/utils/`) +- `combat-utils.ts` β€” Damage calculation, elemental bonuses, insight formula +- `spire-utils.ts` β€” Spire/floor progression +- `mana-utils.ts` β€” Mana calculation helpers +- `enemy-generator.ts` β€” Enemy spawning with modifiers +- `discipline-math.ts` β€” Discipline XP/drain/perk formulas +- `room-utils.ts` β€” Room type generation +- `enemy-utils.ts` β€” Enemy stat calculations +- `pact-utils.ts` β€” Guardian pact helpers +- `floor-utils.ts` β€” Floor HP calculations +- `formatting.ts` β€” Number/time formatting +- `activity-log.ts` β€” Activity log helper +- `result.ts` β€” Result/Either type +- `safe-persist.ts` β€” Safe localStorage persistence + +#### Effects (`src/lib/game/effects/`) +- `discipline-effects.ts` β€” Discipline β†’ stat bonuses/multipliers/specials +- `dynamic-compute.ts` β€” Dynamic stat computation +- `special-effects.ts` β€” Special one-off effects +- `upgrade-effects.ts` β€” Upgrade effect application +- `upgrade-effects.types.ts` β€” Types for upgrade effects + +#### Top-Level Game Logic (`src/lib/game/`) +- `effects.ts` β€” Unified effects orchestration (merges equipment + discipline + upgrade effects) +- `crafting-design.ts` β€” Enchantment design logic +- `crafting-prep.ts` β€” Preparation logic +- `crafting-apply.ts` β€” Application logic +- `crafting-equipment.ts` β€” Equipment crafting logic +- `crafting-loot.ts` β€” Loot generation from crafting +- `crafting-utils.ts` β€” Shared crafting utilities +- `crafting-attunements.ts` β€” Attunement-crafting integration + +#### Crafting Actions (`src/lib/game/crafting-actions/`) +- `design-actions.ts` β€” Design stage actions +- `preparation-actions.ts` β€” Preparation stage actions +- `application-actions.ts` β€” Application stage actions +- `crafting-equipment-actions.ts` β€” Equipment crafting actions +- `equipment-actions.ts` β€” Equipment management (equip/unequip/delete) +- `disenchant-actions.ts` β€” Disenchant/salvage actions +- `computed-getters.ts` β€” Derived crafting state + +#### UI Components (`src/components/game/`) + +**Tabs (14 tabs):** +- `SpireSummaryTab.tsx` β€” Spire overview/progress (largest tab) +- `DisciplinesTab.tsx` β€” Discipline management +- `GolemancyTab.tsx` β€” Golem summoning/management +- `PrestigeTab.tsx` β€” Prestige/insight upgrades +- `CraftingTab.tsx` β€” Crafting wrapper (with EnchanterSubTab, FabricatorSubTab) +- `EquipmentTab.tsx` β€” Equipment management +- `GuardianPactsTab.tsx` β€” Guardian pact signing +- `SpellsTab.tsx` β€” Spell management +- `AttunementsTab.tsx` β€” Attunement management +- `AchievementsTab.tsx` β€” Achievement viewer +- `StatsTab.tsx` β€” Player statistics +- `DebugTab.tsx` β€” Debug tools (8 sections) +- `SpireCombatPage/` β€” In-combat UI (7 files) +- `ActivityLog.tsx` β€” Activity log display + +**Shared Components:** +- `ManaDisplay.tsx`, `ActionButtons.tsx`, `TimeDisplay.tsx` +- `AttunementStatus.tsx`, `GameToast.tsx`, `UpgradeDialog.tsx` +- `crafting/` β€” EnchantmentDesigner, EnchantmentPreparer, EnchantmentApplier, EquipmentCrafter +- `debug/` β€” Debug components for each system +- `LootInventory/` β€” Loot/blueprint/materials UI + +### Persistence +- All state persisted to **localStorage** via Zustand `persist` middleware +- No backend, no database, no Prisma +- Store keys: `mana-loop-crafting`, `mana-loop-ui-storage`, etc. ### File Size Guidelines - All files kept under **400 lines** (enforced by pre-commit hook). --- @@ -833,15 +1056,18 @@ The following systems no longer exist and should not be re-introduced: | Removed | Replacement | |---------|-------------| | Skill System (study, tiers T1–T5, milestone upgrades) | Discipline System | -| `skillStore.ts` | `discipline-slice.ts` | +| `skillStore.ts` / `store.ts` / `store-modules/` | Modular Zustand stores in `stores/` | | `skill-evolution-modules/` | `data/disciplines/` + `discipline-math.ts` | | `docs/skills.md` | This document (Discipline System section) | | `docs/strategy/` | Fully implemented; folder removed | | Ascension skills | Deleted (no replacement) | | Scroll crafting | Deleted (violates no-instant-finishing pillar) | | Lifesteal/healing | Banned permanently | +| Familiar System | Replaced by Golemancy and Pact systems | +| Legacy static guardians (named Primordialis, The Awakened One) | Procedural guardian system with 4 tiers | +| Prisma / database | Removed; localStorage-only persistence | --- -*Document Version: 2.0 β€” Disciplines Refactor* -*End of Game Briefing Document* \ No newline at end of file +*Document Version: 3.0 β€” Post-Refactoring Update* +*End of Game Briefing Document*