generated from nhcarrigan/template
feat: achievement timestamps, companion progress bars, max runestone indicator, and auto-prestige max-runes mode
This commit is contained in:
@@ -189,6 +189,7 @@ const buildPostPrestigeState = (
|
||||
} => {
|
||||
const {
|
||||
autoPrestigeEnabled,
|
||||
autoPrestigeMaxRunestonesOnly,
|
||||
count: currentPrestigeCount,
|
||||
purchasedUpgradeIds,
|
||||
runestones: currentRunestones,
|
||||
@@ -215,6 +216,9 @@ const buildPostPrestigeState = (
|
||||
...autoPrestigeEnabled === undefined
|
||||
? {}
|
||||
: { autoPrestigeEnabled },
|
||||
...autoPrestigeMaxRunestonesOnly === undefined
|
||||
? {}
|
||||
: { autoPrestigeMaxRunestonesOnly },
|
||||
};
|
||||
|
||||
const freshState = initialGameState(currentState.player, characterName);
|
||||
|
||||
@@ -255,6 +255,20 @@ describe("buildPostPrestigeState", () => {
|
||||
expect(prestigeData.autoPrestigeEnabled).toBeUndefined();
|
||||
});
|
||||
|
||||
it("preserves autoPrestigeMaxRunestonesOnly when set", () => {
|
||||
const state = makeMinimalState({
|
||||
prestige: { autoPrestigeMaxRunestonesOnly: true, count: 0, productionMultiplier: 1, purchasedUpgradeIds: [], runestones: 0 },
|
||||
});
|
||||
const { prestigeData } = buildPostPrestigeState(state, "Tester");
|
||||
expect(prestigeData.autoPrestigeMaxRunestonesOnly).toBe(true);
|
||||
});
|
||||
|
||||
it("omits autoPrestigeMaxRunestonesOnly when not set", () => {
|
||||
const state = makeMinimalState();
|
||||
const { prestigeData } = buildPostPrestigeState(state, "Tester");
|
||||
expect(prestigeData.autoPrestigeMaxRunestonesOnly).toBeUndefined();
|
||||
});
|
||||
|
||||
it("preserves apotheosis data across prestige", () => {
|
||||
const apotheosis = { count: 2 };
|
||||
const state = makeMinimalState({ apotheosis });
|
||||
|
||||
Reference in New Issue
Block a user