fix: remove discipline pool-drain model, add conversion stats UI per mana-conversion-spec
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m17s

DISC-2: Removed old pool-drain model from discipline-slice.ts processTick()
- Disciplines no longer drain rawMana or element pools
- canProceedDiscipline() no longer checks mana sufficiency
- Removed auto-pause on insufficient mana from processTick()
- Removed drain display and auto-paused message from DisciplineCard.tsx
- Removed auto-paused log from gameStore.ts tick()

DISC-4: Audited crafting pipeline — no composite crafting logic remains
- craftComposite already removed from manaStore.ts (comment only)
- No other composite crafting references found

DISC-5: Added collapsible formula reference to Conversion Stats section
- Shows unified formula, multipliers, cost formulas, and constraints

DISC-6: Added per-element net regen summary line
- Shows 'Net Fire Regen: +0.50/hr − 0.15/hr = +0.35/hr' per element

DISC-7: Created dedicated 'Conversion Stats' section in Stats tab
- Renamed from 'Conversion Breakdown' to dedicated section header

DISC-8: Added detailed per-element regen breakdown to ManaDisplay
- Each element card now expandable to show produced rate and downstream drains
- New ElementRegenBreakdown type and elementRegenBreakdown prop

Tests: Updated 4 test files to reflect new no-drain behavior
- All 1090 tests pass
This commit is contained in:
2026-06-09 11:18:41 +02:00
parent c89d8fd2d8
commit 3ad919a047
13 changed files with 230 additions and 93 deletions
+11 -3
View File
@@ -246,12 +246,12 @@ describe('canProceedDiscipline', () => {
expect(result).toBe(true);
});
it('should return false when raw mana is insufficient', () => {
it('should return true when raw mana is insufficient (no drain model)', () => {
const state: DisciplineState = { id: 'raw-mastery', xp: 10000, paused: false };
const result = canProceedDiscipline(rawMastery, state, {
rawMana: 0,
});
expect(result).toBe(false);
expect(result).toBe(true);
});
it('should return true when element mana is sufficient', () => {
@@ -262,11 +262,19 @@ describe('canProceedDiscipline', () => {
expect(result).toBe(true);
});
it('should return false when element mana is insufficient', () => {
it('should return true when element exists (no drain model)', () => {
const state: DisciplineState = { id: 'attune-fire', xp: 10000, paused: false };
const result = canProceedDiscipline(attuneFire, state, {
elements: { fire: { current: 0, max: 100, unlocked: true } },
});
expect(result).toBe(true);
});
it('should return false when element does not exist in game state', () => {
const state: DisciplineState = { id: 'attune-fire', xp: 10000, paused: false };
const result = canProceedDiscipline(attuneFire, state, {
elements: {},
});
expect(result).toBe(false);
});