fix: Elemental Mana Capacity disciplines now increase element capacity
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m23s
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m23s
- Add optional baseMax field to ElementState to track prestige-derived max separately from bonuses - Add computeElementMaxWithBonuses action to manaStore that computes max = baseMax + per-element bonus - Apply per-element cap bonuses from disciplines and equipment in game tick (elementCap_* keys) - Fix resetMana to use correct prestige key (elementalAttune instead of nonexistent elemMax) - Add store migration (v1->v2) to populate baseMax for existing saved games - Extract pact ritual processing to pipelines/pact-ritual.ts - Extract element cap bonus utilities to utils/element-cap-bonus.ts - Fix inline element types in crafting-fabricator.ts - Update test fixtures to include baseMax in element literals Fixes #185
This commit is contained in:
@@ -37,7 +37,7 @@ describe('DisciplineStore — reactivate after deactivate (bug #163)', () => {
|
||||
|
||||
it('should reactivate a discipline with elements after deactivating it', () => {
|
||||
useDisciplineStore.getState().activate('attune-fire', {
|
||||
elements: { fire: { unlocked: true, current: 100, max: 100 } },
|
||||
elements: { fire: { unlocked: true, current: 100, max: 100, baseMax: 100 } },
|
||||
});
|
||||
expect(useDisciplineStore.getState().activeIds).toContain('attune-fire');
|
||||
|
||||
@@ -45,7 +45,7 @@ describe('DisciplineStore — reactivate after deactivate (bug #163)', () => {
|
||||
expect(useDisciplineStore.getState().activeIds).not.toContain('attune-fire');
|
||||
|
||||
useDisciplineStore.getState().activate('attune-fire', {
|
||||
elements: { fire: { unlocked: true, current: 100, max: 100 } },
|
||||
elements: { fire: { unlocked: true, current: 100, max: 100, baseMax: 100 } },
|
||||
});
|
||||
expect(useDisciplineStore.getState().activeIds).toContain('attune-fire');
|
||||
expect(useDisciplineStore.getState().disciplines['attune-fire'].paused).toBe(false);
|
||||
|
||||
Reference in New Issue
Block a user