Resolve conjured baked goods tooltip miscalculation #1074 (#1087)

This commit is contained in:
domoddball
2022-06-04 04:42:18 -04:00
committed by GitHub
parent fdcbbd7ab2
commit 1027d48b51
6 changed files with 22 additions and 11 deletions

View File

@@ -1,9 +1,7 @@
import { CacheNoGoldSwitchCookiesPS } from '../../../Cache/VariablesAndData';
import Beautify from '../../BeautifyAndFormatting/Beautify';
import GetTimeColour from '../../BeautifyAndFormatting/GetTimeColour';
import CalculateGrimoireRefillTime from '../../HelperFunctions/CalculateGrimoireRefillTime';
import GetWrinkConfigBank from '../../HelperFunctions/GetWrinkConfigBank';
import { ColourTextPre, TooltipName } from '../../VariablesAndData';
import * as Create from '../CreateTooltip';
@@ -58,9 +56,12 @@ export default function Grimoire() {
const reward = document.createElement('span');
reward.style.color = '#33FF00';
reward.textContent = Beautify(
Math.min(
(Game.cookies + GetWrinkConfigBank()) * 0.15,
CacheNoGoldSwitchCookiesPS * 60 * 30,
Math.max(
Math.min(
Game.cookies * 0.15,
Game.cookiesPs * 60 * 30
),
7
),
2,
);
@@ -70,7 +71,16 @@ export default function Grimoire() {
conjure.appendChild(seperator);
const loss = document.createElement('span');
loss.style.color = 'red';
loss.textContent = Beautify(CacheNoGoldSwitchCookiesPS * 60 * 15, 2);
loss.textContent = Beautify(
Math.min(
Game.cookies,
Math.min(
Game.cookies * 0.15,
Game.cookiesPs * 60 * 15
) + 13
),
2
);
conjure.appendChild(loss);
}