refactor: split bloated state types into State + Actions interfaces (issue #102)
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m19s

- CombatState: split into CombatState (data) + CombatActions + CombatStore
- PrestigeState: split into PrestigeState (data) + PrestigeActions + PrestigeStore
- ManaState: split into ManaState (data) + ManaActions + ManaStore
- GameState: deprecated, removed from barrel exports
- crafting-actions: updated to use CraftingState instead of GameState
- combat-utils/mana-utils: replaced Pick<GameState,...> with focused interfaces
- DisciplineCardProps: split into Definition + Runtime + Callbacks
- stores/index.ts: now exports both State and Actions types
This commit is contained in:
2026-05-20 21:05:22 +02:00
parent ee893e8973
commit 8a7ddaae27
24 changed files with 411 additions and 321 deletions
+5 -5
View File
@@ -170,27 +170,27 @@ describe('computeRegen', () => {
describe('computeClickMana', () => {
it('should return 1 with no skills', () => {
const result = computeClickMana({ skills: {} });
const result = computeClickMana({});
expect(result).toBe(1);
});
it('should add 1 per manaTap skill level', () => {
const result = computeClickMana({ skills: { manaTap: 3 } });
const result = computeClickMana({ manaTap: 3 });
expect(result).toBe(4); // 1 + 3
});
it('should add 3 per manaSurge skill level', () => {
const result = computeClickMana({ skills: { manaSurge: 2 } });
const result = computeClickMana({ manaSurge: 2 });
expect(result).toBe(7); // 1 + 6
});
it('should combine manaTap and manaSurge', () => {
const result = computeClickMana({ skills: { manaTap: 2, manaSurge: 1 } });
const result = computeClickMana({ manaTap: 2, manaSurge: 1 });
expect(result).toBe(6); // 1 + 2 + 3
});
it('should add discipline click multiplier', () => {
const result = computeClickMana({ skills: {} }, {
const result = computeClickMana({}, {
bonuses: { clickManaMultiplier: 5 },
multipliers: {},
});