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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -17,4 +17,5 @@ export const LatestReleaseNotes = `This update adds support for some parts of co
- added support for new tiers of Shimmering veil</br> - added support for new tiers of Shimmering veil</br>
- added support for unshackled upgrades</br> - added support for unshackled upgrades</br>
- updated some simulator logic to more cloesly match updated cookie clicker logic</br> - updated some simulator logic to more cloesly match updated cookie clicker logic</br>
- resolved major issue for negative calculations due to missing glucosimium upgrades, kittens, and achievements</br>`; - Bugfix: conjure backed goods tooltip used cached no gold switch raw cps instead of live cps</br>
- Bugfix: negative calculations due to glucosimium upgrades, kittens, unshackled, and achievements</br>`;

View File

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