fix: discipline reset on mana depletion and re-activation after stop
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m35s

- #143: processTick now removes drained disciplines from activeIds and calls onStopPracticing so currentAction resets to 'meditate'
- #144: Removed paused guard from canProceedDiscipline so stopped disciplines can be re-activated
- Updated test to match new expected behavior for paused disciplines
This commit is contained in:
2026-05-27 11:13:08 +02:00
parent 64b472572b
commit 7962a4fdaa
5 changed files with 18 additions and 5 deletions
@@ -230,12 +230,12 @@ describe('canProceedDiscipline', () => {
expect(result).toBe(true);
});
it('should return false when discipline is paused', () => {
it('should return true when discipline is paused (paused state is handled by activate, not canProceedDiscipline)', () => {
const state: DisciplineState = { id: 'raw-mastery', xp: 0, paused: true };
const result = canProceedDiscipline(rawMastery, state, {
rawMana: 1000,
});
expect(result).toBe(false);
expect(result).toBe(true);
});
it('should return true when raw mana is sufficient', () => {