feat: Initialize attunement state in game store
All checks were successful
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 3m8s
All checks were successful
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 3m8s
- Add attunement state to makeInitial function - Player starts with Enchanter attunement (right hand) unlocked - Initialize all 7 attunement slots with default state - Add primaryMana and primaryManaMax for all mana types - Start with 10 transference mana (Enchanter's primary type)
This commit is contained in:
@@ -44,6 +44,14 @@ import { rollLootDrops, LOOT_DROPS } from './data/loot-drops';
|
|||||||
import { CRAFTING_RECIPES, canCraftRecipe } from './data/crafting-recipes';
|
import { CRAFTING_RECIPES, canCraftRecipe } from './data/crafting-recipes';
|
||||||
import { EQUIPMENT_TYPES } from './data/equipment';
|
import { EQUIPMENT_TYPES } from './data/equipment';
|
||||||
import type { EquipmentInstance } from './types';
|
import type { EquipmentInstance } from './types';
|
||||||
|
import {
|
||||||
|
ATTUNEMENTS,
|
||||||
|
getStartingAttunement,
|
||||||
|
type AttunementType,
|
||||||
|
type AttunementState,
|
||||||
|
type ManaType,
|
||||||
|
getTotalAttunementRegen,
|
||||||
|
} from './attunements';
|
||||||
// Import computed stats and utility functions from computed-stats.ts
|
// Import computed stats and utility functions from computed-stats.ts
|
||||||
import {
|
import {
|
||||||
DEFAULT_EFFECTS,
|
DEFAULT_EFFECTS,
|
||||||
@@ -238,6 +246,52 @@ function makeInitial(overrides: Partial<GameState> = {}): GameState {
|
|||||||
memorySlots: 3 + (pu.deepMemory || 0),
|
memorySlots: 3 + (pu.deepMemory || 0),
|
||||||
memories: overrides.memories || [],
|
memories: overrides.memories || [],
|
||||||
|
|
||||||
|
// Attunement System - Start with Enchanter (right hand) attunement
|
||||||
|
attunements: {
|
||||||
|
enchanter: { unlocked: true, level: 1, manaPool: 10, maxMana: 50 },
|
||||||
|
caster: { unlocked: false, level: 0, manaPool: 0, maxMana: 50 },
|
||||||
|
seer: { unlocked: false, level: 0, manaPool: 0, maxMana: 50 },
|
||||||
|
warden: { unlocked: false, level: 0, manaPool: 0, maxMana: 50 },
|
||||||
|
invoker: { unlocked: false, level: 0, manaPool: 0, maxMana: 50 },
|
||||||
|
strider: { unlocked: false, level: 0, manaPool: 0, maxMana: 50 },
|
||||||
|
anchor: { unlocked: false, level: 0, manaPool: 0, maxMana: 50 },
|
||||||
|
} as Record<AttunementType, AttunementState>,
|
||||||
|
attunementSkills: {},
|
||||||
|
attunementSkillProgress: {},
|
||||||
|
// Primary mana pools (transference, form, vision, barrier, flow, stability)
|
||||||
|
primaryMana: {
|
||||||
|
transference: 10,
|
||||||
|
form: 0,
|
||||||
|
vision: 0,
|
||||||
|
barrier: 0,
|
||||||
|
flow: 0,
|
||||||
|
stability: 0,
|
||||||
|
fire: 0,
|
||||||
|
water: 0,
|
||||||
|
earth: 0,
|
||||||
|
air: 0,
|
||||||
|
light: 0,
|
||||||
|
dark: 0,
|
||||||
|
life: 0,
|
||||||
|
death: 0,
|
||||||
|
} as Record<ManaType, number>,
|
||||||
|
primaryManaMax: {
|
||||||
|
transference: 50,
|
||||||
|
form: 50,
|
||||||
|
vision: 50,
|
||||||
|
barrier: 50,
|
||||||
|
flow: 50,
|
||||||
|
stability: 50,
|
||||||
|
fire: 50,
|
||||||
|
water: 50,
|
||||||
|
earth: 50,
|
||||||
|
air: 50,
|
||||||
|
light: 50,
|
||||||
|
dark: 50,
|
||||||
|
life: 50,
|
||||||
|
death: 50,
|
||||||
|
} as Record<ManaType, number>,
|
||||||
|
|
||||||
incursionStrength: 0,
|
incursionStrength: 0,
|
||||||
containmentWards: 0,
|
containmentWards: 0,
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user