refactor: remove skill system leftovers, migrate click mana to discipline perk
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m30s
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 1m30s
- Simplified getMeditationBonus() to continuous ramp formula - Added click-mana capped perk to Mana Circulation discipline - Removed manaWell/manaFlow/manaSpring skill reads and prestige upgrades - Removed all skill fields from GameState and GameActionType - Updated all call sites and tests (916 tests passing) Closes #174
This commit is contained in:
@@ -186,15 +186,16 @@ describe('PrestigeStore', () => {
|
||||
|
||||
describe('doPrestige', () => {
|
||||
it('should purchase upgrade when affordable', () => {
|
||||
const result = usePrestigeStore.getState().doPrestige('manaWell');
|
||||
usePrestigeStore.setState({ insight: 2000 });
|
||||
const result = usePrestigeStore.getState().doPrestige('insightAmp');
|
||||
expect(result.success).toBe(true);
|
||||
expect(usePrestigeStore.getState().prestigeUpgrades.manaWell).toBe(1);
|
||||
expect(usePrestigeStore.getState().insight).toBeLessThan(500);
|
||||
expect(usePrestigeStore.getState().prestigeUpgrades.insightAmp).toBe(1);
|
||||
expect(usePrestigeStore.getState().insight).toBeLessThan(2000);
|
||||
});
|
||||
|
||||
it('should return false when cannot afford', () => {
|
||||
usePrestigeStore.setState({ insight: 0 });
|
||||
const result = usePrestigeStore.getState().doPrestige('manaWell');
|
||||
const result = usePrestigeStore.getState().doPrestige('insightAmp');
|
||||
expect(result.success).toBe(false);
|
||||
if (!result.success) {
|
||||
expect(result.code).toBe(ErrorCode.INSUFFICIENT_INSIGHT);
|
||||
@@ -320,9 +321,9 @@ describe('PrestigeStore', () => {
|
||||
|
||||
describe('resetPrestigeForNewLoop', () => {
|
||||
it('should preserve insight and upgrades, reset loop state', () => {
|
||||
usePrestigeStore.getState().resetPrestigeForNewLoop(200, { manaWell: 2 });
|
||||
usePrestigeStore.getState().resetPrestigeForNewLoop(200, { insightAmp: 2 });
|
||||
expect(usePrestigeStore.getState().insight).toBe(200);
|
||||
expect(usePrestigeStore.getState().prestigeUpgrades).toEqual({ manaWell: 2 });
|
||||
expect(usePrestigeStore.getState().prestigeUpgrades).toEqual({ insightAmp: 2 });
|
||||
|
||||
expect(usePrestigeStore.getState().defeatedGuardians).toEqual([]);
|
||||
});
|
||||
@@ -330,7 +331,7 @@ describe('PrestigeStore', () => {
|
||||
|
||||
describe('resetPrestige', () => {
|
||||
it('should reset everything to initial state', () => {
|
||||
usePrestigeStore.setState({ insight: 1000, loopCount: 5, prestigeUpgrades: { manaWell: 3 } });
|
||||
usePrestigeStore.setState({ insight: 1000, loopCount: 5, prestigeUpgrades: { insightAmp: 3 } });
|
||||
usePrestigeStore.getState().resetPrestige();
|
||||
expect(usePrestigeStore.getState().insight).toBe(0);
|
||||
expect(usePrestigeStore.getState().loopCount).toBe(0);
|
||||
|
||||
Reference in New Issue
Block a user