diff --git a/src/lib/game/store.ts b/src/lib/game/store.ts index 6fff8df..f86f1b8 100755 --- a/src/lib/game/store.ts +++ b/src/lib/game/store.ts @@ -466,6 +466,13 @@ function makeInitial(overrides: Partial = {}): GameState { activeSpell: 'manaBolt', currentAction: 'meditate', castProgress: 0, + combo: { + count: 0, + maxCombo: 0, + multiplier: 1, + elementChain: [], + decayTimer: 0, + }, spells: startSpells, skills: overrides.skills || {}, @@ -1669,6 +1676,7 @@ export const useGameStore = create()( rawMana: state.rawMana, meditateTicks: state.meditateTicks, totalManaGathered: state.totalManaGathered, + attunements: state.attunements, elements: state.elements, currentFloor: state.currentFloor, floorHP: state.floorHP, @@ -1678,6 +1686,7 @@ export const useGameStore = create()( activeSpell: state.activeSpell, currentAction: state.currentAction, castProgress: state.castProgress, + combo: state.combo, spells: state.spells, skills: state.skills, skillProgress: state.skillProgress, diff --git a/src/lib/game/types.ts b/src/lib/game/types.ts index 1d211a6..79b21a6 100755 --- a/src/lib/game/types.ts +++ b/src/lib/game/types.ts @@ -270,6 +270,15 @@ export interface StudyTarget { required: number; // Total hours needed } +// Combo state for combat +export interface ComboState { + count: number; // Current combo hits + maxCombo: number; // Highest combo this session + multiplier: number; // Current damage multiplier + elementChain: string[]; // Last 3 elements used + decayTimer: number; // Hours until decay starts +} + export interface GameState { // Time day: number; @@ -299,6 +308,7 @@ export interface GameState { activeSpell: string; currentAction: GameAction; castProgress: number; // Progress towards next spell cast (0-1) + combo: ComboState; // Combat combo tracking // Spells spells: Record;