This commit is contained in:
@@ -43,26 +43,42 @@ 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,skill,ui}Store.ts`
|
||||
- **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/`
|
||||
- **Skills v2:** `constants/skills-v2.ts` + `computeStats()` in effects
|
||||
- **Effects:** All stat mods through `getUnifiedEffects()` — never read skill levels directly
|
||||
- **Disciplines:** `data/disciplines/` + `stores/discipline-slice.ts` + `utils/discipline-math.ts`
|
||||
- **Effects:** All stat mods through `getUnifiedEffects()` — discipline bonuses enter via `computeDisciplineEffects()`
|
||||
|
||||
### Adding Effects
|
||||
1. `data/enchantment-effects.ts`
|
||||
2. `effects.ts` → `computeEquipmentEffects()`
|
||||
3. Access via `getUnifiedEffects(state)`
|
||||
|
||||
### Adding Skills
|
||||
1. `constants/skills-v2.ts`
|
||||
2. `computeStats()` mapping
|
||||
### 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
|
||||
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
|
||||
- Add perks (`once`, `capped`, or `infinite`)
|
||||
3. Re-export from `data/disciplines/index.ts` so it appears in `ALL_DISCIPLINES`
|
||||
4. Add any new `statBonus.stat` keys to `discipline-effects.ts` → `computeDisciplineEffects()`
|
||||
|
||||
### Discipline Math (quick reference)
|
||||
```
|
||||
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)
|
||||
|
||||
### Adding Spells
|
||||
1. `constants/spells.ts`
|
||||
2. `data/enchantment-effects.ts`
|
||||
3. `constants/skills-v2.ts` research skill
|
||||
4. `EFFECT_RESEARCH_MAPPING`
|
||||
3. `EFFECT_RESEARCH_MAPPING`
|
||||
|
||||
## Banned
|
||||
|
||||
@@ -74,7 +90,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
|
||||
**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
|
||||
Reference in New Issue
Block a user