Skip to content

Commit

Permalink
Resolve conjured baked goods tooltip miscalculation #1074 (#1087)
Browse files Browse the repository at this point in the history
  • Loading branch information
domoddball authored Jun 4, 2022
1 parent fdcbbd7 commit 1027d48
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 11 deletions.
2 changes: 1 addition & 1 deletion dist/CookieMonster.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/CookieMonster.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/CookieMonsterDev.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/CookieMonsterDev.js.map

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/Data/Moddata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 unshackled upgrades</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>`;
22 changes: 16 additions & 6 deletions src/Disp/Tooltips/TypesOfTooltips/Grimoire.js
Original file line number Diff line number Diff line change
@@ -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';

Expand Down Expand Up @@ -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,
);
Expand All @@ -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);
}

Expand Down

0 comments on commit 1027d48

Please sign in to comment.