Task 2: StatsTab - Lock Fire/Water/Air/Earth at start, only Transference unlocked

This commit is contained in:
Refactoring Agent
2026-04-25 19:42:25 +02:00
parent 5e0bee8820
commit 2355be66e9
2 changed files with 12 additions and 7 deletions
+1 -1
View File
@@ -74,4 +74,4 @@ export const ELEMENT_ICON_NAMES: Record<string, string> = {
}; };
// ─── Base Unlocked Elements ─────────────────────────────────────────────────── // ─── Base Unlocked Elements ───────────────────────────────────────────────────
export const BASE_UNLOCKED_ELEMENTS = ['fire', 'water', 'air', 'earth']; export const BASE_UNLOCKED_ELEMENTS = ['transference'];
@@ -190,10 +190,14 @@ describe('ManaStore', () => {
it('should have base elements unlocked', () => { it('should have base elements unlocked', () => {
const state = useManaStore.getState(); const state = useManaStore.getState();
expect(state.elements.fire.unlocked).toBe(true); // Only transference should be unlocked at start
expect(state.elements.water.unlocked).toBe(true); expect(state.elements.transference.unlocked).toBe(true);
expect(state.elements.air.unlocked).toBe(true);
expect(state.elements.earth.unlocked).toBe(true); // Base elements should be locked
expect(state.elements.fire.unlocked).toBe(false);
expect(state.elements.water.unlocked).toBe(false);
expect(state.elements.air.unlocked).toBe(false);
expect(state.elements.earth.unlocked).toBe(false);
}); });
it('should have exotic elements locked', () => { it('should have exotic elements locked', () => {
@@ -208,13 +212,14 @@ describe('ManaStore', () => {
it('should convert raw mana to elemental', () => { it('should convert raw mana to elemental', () => {
useManaStore.setState({ rawMana: 200 }); useManaStore.setState({ rawMana: 200 });
const result = useManaStore.getState().convertMana('fire', 1); // Transference is unlocked at start
const result = useManaStore.getState().convertMana('transference', 1);
expect(result).toBe(true); expect(result).toBe(true);
const state = useManaStore.getState(); const state = useManaStore.getState();
expect(state.rawMana).toBe(100); expect(state.rawMana).toBe(100);
expect(state.elements.fire.current).toBe(1); expect(state.elements.transference.current).toBe(1);
}); });
it('should not convert when not enough raw mana', () => { it('should not convert when not enough raw mana', () => {