fix: correct quickStart prestige upgrade property name in resetMana
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m4s
Build and Publish Mana Loop Docker Image / build-and-publish (push) Failing after 1m4s
This commit is contained in:
@@ -179,7 +179,7 @@ describe('Persistence', () => {
|
||||
expect(useGameStore.getState().hour).toBe(0);
|
||||
|
||||
// Mana store should be reset
|
||||
// Note: resetMana uses 10 + prestigeUpgrades.manaStart, with no upgrades = 10
|
||||
// Note: resetMana uses 10 + prestigeUpgrades.quickStart, with no upgrades = 10
|
||||
expect(useManaStore.getState().rawMana).toBeGreaterThanOrEqual(0);
|
||||
|
||||
// Combat store should be reset
|
||||
|
||||
@@ -131,7 +131,7 @@ describe('ManaStore', () => {
|
||||
});
|
||||
|
||||
it('should apply prestige upgrades for starting mana', () => {
|
||||
useManaStore.getState().resetMana({ manaStart: 5 });
|
||||
useManaStore.getState().resetMana({ quickStart: 5 });
|
||||
expect(useManaStore.getState().rawMana).toBe(10 + 5 * 10);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -162,7 +162,7 @@ describe('ManaStore', () => {
|
||||
});
|
||||
|
||||
it('should apply prestige upgrades for starting mana', () => {
|
||||
useManaStore.getState().resetMana({ manaStart: 5 });
|
||||
useManaStore.getState().resetMana({ quickStart: 5 });
|
||||
expect(useManaStore.getState().rawMana).toBe(10 + 5 * 10);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -168,7 +168,7 @@ export const useManaStore = create<ManaStore>()(
|
||||
|
||||
resetMana: (prestigeUpgrades: Record<string, number>) => {
|
||||
const elementMax = 10 + (prestigeUpgrades.elementalAttune || 0) * 25;
|
||||
const startingMana = 10 + (prestigeUpgrades.manaStart || 0) * 10;
|
||||
const startingMana = 10 + (prestigeUpgrades.quickStart || 0) * 10;
|
||||
set({ rawMana: startingMana, meditateTicks: 0, totalManaGathered: 0, elements: makeInitialElements(elementMax, prestigeUpgrades), elementRegen: {} });
|
||||
},
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user