Fix display of cookies needed tk next HC

This commit is contained in:
Daniël van Noord
2021-03-15 08:57:48 +01:00
parent 7831521bc5
commit fd2aa16c60
5 changed files with 27 additions and 23 deletions

View File

@@ -591,18 +591,20 @@ export function PrestigeSection() {
),
);
const neededCook =
const neededCook = Math.max(
0,
Game.HowManyCookiesReset(possiblePresMax + 1) -
(CacheRealCookiesEarned +
Game.cookiesReset +
CacheWrinklersTotal +
((
Game.HasUnlocked('Chocolate egg') && !Game.Has('Chocolate egg')
(CacheRealCookiesEarned +
Game.cookiesReset +
CacheWrinklersTotal +
((
Game.HasUnlocked('Chocolate egg') && !Game.Has('Chocolate egg')
? CacheLastChoEgg
: 0
)
? CacheLastChoEgg
: 0
)
? CacheLastChoEgg
: 0));
: 0)),
);
const cookiesNextFrag = document.createDocumentFragment();
cookiesNextFrag.appendChild(document.createTextNode(Beautify(neededCook)));
const cookiesNextSmall = document.createElement('small');