Fix BUG 2: Set currentAction to 'study' when starting skill or spell study
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 2m21s
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 2m21s
The startStudyingSkill() and startStudyingSpell() functions in skillStore.ts
were setting currentStudyTarget but not updating currentAction in combatStore.
Added useCombatStore.getState().setAction('study') calls to both functions
so the game tick properly processes study progress.
This commit is contained in:
@@ -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 (
|
||||
<Card
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
'use client';
|
||||
|
||||
import { useCombatStore, useCraftingStore, useManaStore, useSkillStore } from '@/lib/game/stores';
|
||||
import { useCombatStore, useCraftingStore, useManaStore, usePrestigeStore } from '@/lib/game/stores';
|
||||
import { GameCard, ElementBadge } from '@/components/ui';
|
||||
import { Badge } from '@/components/ui/badge';
|
||||
import { ELEMENTS, SPELLS_DEF } from '@/lib/game/constants';
|
||||
@@ -20,8 +20,8 @@ export function SpellsTab() {
|
||||
const rawMana = useManaStore((s) => 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() {
|
||||
<div className="text-xs text-[var(--text-secondary)]">
|
||||
{def.elem !== 'raw' && (
|
||||
<span className="mr-2">
|
||||
<ElementBadge elementId={def.elem} size="sm" /> {elemDef?.name}
|
||||
<ElementBadge element={def.elem} size="sm" /> {elemDef?.name}
|
||||
</span>
|
||||
)}
|
||||
<span>⚔️ {def.dmg} dmg</span>
|
||||
@@ -213,7 +213,7 @@ export function SpellsTab() {
|
||||
<div className="text-xs text-[var(--text-secondary)]">
|
||||
{def.elem !== 'raw' && (
|
||||
<span className="mr-2">
|
||||
<ElementBadge elementId={def.elem} size="sm" /> {elemDef?.name}
|
||||
<ElementBadge element={def.elem} size="sm" /> {elemDef?.name}
|
||||
</span>
|
||||
)}
|
||||
<span>⚔️ {def.dmg} dmg</span>
|
||||
|
||||
Reference in New Issue
Block a user