diff --git a/src/components/game/SpellsTab.tsx b/src/components/game/SpellsTab.tsx index 9bb9488..302eae7 100755 --- a/src/components/game/SpellsTab.tsx +++ b/src/components/game/SpellsTab.tsx @@ -71,7 +71,7 @@ export function SpellsTab() { const unlockCost = Math.floor(def.unlock * studyCostMult); // Can start studying? - const canStudy = !learned && !isStudying && store.rawMana >= unlockCost; + const canStudy = !learned && !isStudying && rawMana >= unlockCost; return ( s.rawMana); const elements = useManaStore((s) => s.elements); - const signedPacts = useSkillStore((s) => s.signedPacts); - const unlockedEffects = useSkillStore((s) => s.unlockedEffects); + const signedPacts = usePrestigeStore((s) => s.signedPacts); + const unlockedEffects = useCraftingStore((s) => s.unlockedEffects); // Get spells from equipment const equipmentSpellIds: string[] = []; @@ -109,7 +109,7 @@ export function SpellsTab() {
{def.elem !== 'raw' && ( - {elemDef?.name} + {elemDef?.name} )} ⚔️ {def.dmg} dmg @@ -213,7 +213,7 @@ export function SpellsTab() {
{def.elem !== 'raw' && ( - {elemDef?.name} + {elemDef?.name} )} ⚔️ {def.dmg} dmg diff --git a/src/lib/game/stores/combatStore.ts b/src/lib/game/stores/combatStore.ts index ebb9cee..38c8652 100755 --- a/src/lib/game/stores/combatStore.ts +++ b/src/lib/game/stores/combatStore.ts @@ -77,6 +77,8 @@ export interface CombatState { setIsDescending: (descending: boolean) => void; climbDownFloor: () => void; exitSpireMode: () => void; + startClimbUp: () => void; + startClimbDown: () => void; // Golemancy toggleGolem: (golemId: string) => void; @@ -254,6 +256,10 @@ export const useCombatStore = create()( set({ spireMode: false, climbDirection: null, isDescending: false }); }, + startClimbUp: () => set({ climbDirection: 'up', currentAction: 'climb' }), + + startClimbDown: () => set({ climbDirection: 'down', currentAction: 'climb' }), + // Golemancy toggleGolem: (golemId: string) => { set((s) => { diff --git a/src/lib/game/stores/skillStore.ts b/src/lib/game/stores/skillStore.ts index eb2d580..27abbf6 100755 --- a/src/lib/game/stores/skillStore.ts +++ b/src/lib/game/stores/skillStore.ts @@ -6,6 +6,7 @@ import { persist } from 'zustand/middleware'; import { SKILLS_DEF, getStudySpeedMultiplier, getStudyCostMultiplier } from '../constants'; import type { StudyTarget, SkillUpgradeChoice } from '../types'; import { SKILL_EVOLUTION_PATHS, getBaseSkillId } from '../skill-evolution'; +import { useCombatStore } from './combatStore'; export interface SkillState { // Skills @@ -131,6 +132,8 @@ export const useSkillStore = create()( }, }); + useCombatStore.getState().setAction('study'); + return { started: true, cost: isAlreadyPaid ? 0 : cost }; }, @@ -147,6 +150,8 @@ export const useSkillStore = create()( }, }); + useCombatStore.getState().setAction('study'); + // Spell study has no mana cost upfront - cost is paid via study time return { started: true, cost: 0 }; },