Fix display of cookies needed tk next HC
This commit is contained in:
File diff suppressed because one or more lines are too long
2
dist/CookieMonster.js
vendored
2
dist/CookieMonster.js
vendored
File diff suppressed because one or more lines are too long
2
dist/CookieMonster.js.map
vendored
2
dist/CookieMonster.js.map
vendored
File diff suppressed because one or more lines are too long
@@ -591,18 +591,20 @@ export function PrestigeSection() {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
const neededCook =
|
const neededCook = Math.max(
|
||||||
|
0,
|
||||||
Game.HowManyCookiesReset(possiblePresMax + 1) -
|
Game.HowManyCookiesReset(possiblePresMax + 1) -
|
||||||
(CacheRealCookiesEarned +
|
(CacheRealCookiesEarned +
|
||||||
Game.cookiesReset +
|
Game.cookiesReset +
|
||||||
CacheWrinklersTotal +
|
CacheWrinklersTotal +
|
||||||
((
|
((
|
||||||
Game.HasUnlocked('Chocolate egg') && !Game.Has('Chocolate egg')
|
Game.HasUnlocked('Chocolate egg') && !Game.Has('Chocolate egg')
|
||||||
|
? CacheLastChoEgg
|
||||||
|
: 0
|
||||||
|
)
|
||||||
? CacheLastChoEgg
|
? CacheLastChoEgg
|
||||||
: 0
|
: 0)),
|
||||||
)
|
);
|
||||||
? CacheLastChoEgg
|
|
||||||
: 0));
|
|
||||||
const cookiesNextFrag = document.createDocumentFragment();
|
const cookiesNextFrag = document.createDocumentFragment();
|
||||||
cookiesNextFrag.appendChild(document.createTextNode(Beautify(neededCook)));
|
cookiesNextFrag.appendChild(document.createTextNode(Beautify(neededCook)));
|
||||||
const cookiesNextSmall = document.createElement('small');
|
const cookiesNextSmall = document.createElement('small');
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import {
|
import {
|
||||||
CacheHCPerSecond,
|
CacheHCPerSecond,
|
||||||
|
CacheLastHeavenlyChips,
|
||||||
CacheTimeTillNextPrestige,
|
CacheTimeTillNextPrestige,
|
||||||
} from '../../Cache/VariablesAndData';
|
} from '../../Cache/VariablesAndData';
|
||||||
import { CMOptions } from '../../Config/VariablesAndData';
|
import { CMOptions } from '../../Config/VariablesAndData';
|
||||||
@@ -11,15 +12,15 @@ import { Beautify } from '../BeautifyAndFormatting/BeautifyFormatting';
|
|||||||
* @returns {object} div An object containing the stylized header
|
* @returns {object} div An object containing the stylized header
|
||||||
*/
|
*/
|
||||||
export default function ReplaceAscendTooltip() {
|
export default function ReplaceAscendTooltip() {
|
||||||
const ascendNowToGet =
|
const cookiesToNext = Math.max(
|
||||||
Math.floor(Game.HowMuchPrestige(Game.cookiesReset + Game.cookiesEarned)) -
|
0,
|
||||||
Math.floor(Game.HowMuchPrestige(Game.cookiesReset));
|
|
||||||
const cookiesToNext =
|
|
||||||
Game.HowManyCookiesReset(
|
Game.HowManyCookiesReset(
|
||||||
Math.floor(Game.HowMuchPrestige(Game.cookiesReset + Game.cookiesEarned)) +
|
Math.floor(Game.HowMuchPrestige(Game.cookiesReset + Game.cookiesEarned)) +
|
||||||
1,
|
1,
|
||||||
) -
|
) -
|
||||||
(Game.cookiesEarned + Game.cookiesReset);
|
(Game.cookiesEarned + Game.cookiesReset),
|
||||||
|
);
|
||||||
|
|
||||||
const startDate = Game.sayTime(
|
const startDate = Game.sayTime(
|
||||||
((Date.now() - Game.startDate) / 1000) * Game.fps,
|
((Date.now() - Game.startDate) / 1000) * Game.fps,
|
||||||
-1,
|
-1,
|
||||||
@@ -35,17 +36,18 @@ export default function ReplaceAscendTooltip() {
|
|||||||
)}</b>.<br>(CpS +${Beautify(Game.prestige)}%)`;
|
)}</b>.<br>(CpS +${Beautify(Game.prestige)}%)`;
|
||||||
str += '<div class="line"></div>';
|
str += '<div class="line"></div>';
|
||||||
}
|
}
|
||||||
if (ascendNowToGet < 1) str += 'Ascending now would grant you no prestige.';
|
if (CacheLastHeavenlyChips < 1)
|
||||||
else if (ascendNowToGet < 2)
|
str += 'Ascending now would grant you no prestige.';
|
||||||
|
else if (CacheLastHeavenlyChips < 2)
|
||||||
str +=
|
str +=
|
||||||
'Ascending now would grant you<br><b>1 prestige level</b> (+1% CpS)<br>and <b>1 heavenly chip</b> to spend.';
|
'Ascending now would grant you<br><b>1 prestige level</b> (+1% CpS)<br>and <b>1 heavenly chip</b> to spend.';
|
||||||
else
|
else
|
||||||
str += `Ascending now would grant you<br><b>${Beautify(
|
str += `Ascending now would grant you<br><b>${Beautify(
|
||||||
ascendNowToGet,
|
CacheLastHeavenlyChips,
|
||||||
)} prestige levels</b> (+${Beautify(
|
)} prestige levels</b> (+${Beautify(
|
||||||
ascendNowToGet,
|
CacheLastHeavenlyChips,
|
||||||
)}% CpS)<br>and <b>${Beautify(
|
)}% CpS)<br>and <b>${Beautify(
|
||||||
ascendNowToGet,
|
CacheLastHeavenlyChips,
|
||||||
)} heavenly chips</b> to spend.`;
|
)} heavenly chips</b> to spend.`;
|
||||||
str += '<div class="line"></div>';
|
str += '<div class="line"></div>';
|
||||||
str += `You need <b>${Beautify(
|
str += `You need <b>${Beautify(
|
||||||
|
|||||||
Reference in New Issue
Block a user