File diff suppressed because one or more lines are too long
@@ -16,7 +16,8 @@ max(cost - cookies in bank, 0)/cps + cost/Δ cps
|
||||
|
||||
Cookie Monster also indicates the time left before being able to buy an upgrade or building, and takes it into consideration. It will take *everything* in consideration, meaning if buying a building also unlocks an achievement which boosts your income, which unlocks an achievement, it will know and highlight that building's value.
|
||||
|
||||
This index is computed for buildings and upgrades. If the relevant option is enabled, it will color-code each of them based on their value:
|
||||
This index is computed for buildings and upgrades. If the relevant option is enabled, it will color-code each of them based on their value. It compares the PP across all possible buy options: if a buy 10 option is better than any of the buy 1 options Cookie Monster will colour them accordingly.
|
||||
Cookie Monster uses the following standard colours:
|
||||
|
||||
* Light Blue: (upgrades) This item has a better PP than the best building to buy
|
||||
* Green: This building has the best PP
|
||||
|
||||
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
1713
package-lock.json
generated
1713
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,3 @@
|
||||
/* eslint-disable no-restricted-syntax */
|
||||
/* eslint-disable no-unused-vars */
|
||||
/** Functions related to the Dragon */
|
||||
|
||||
@@ -52,12 +51,12 @@ export default function CacheDragonCost() {
|
||||
} else {
|
||||
let cost = 0;
|
||||
CopyData();
|
||||
for (const j of Object.keys(Game.Objects)) {
|
||||
Object.keys(Game.Objects).forEach((j) => {
|
||||
target = j;
|
||||
if (Game.Objects[target].amount < amount) {
|
||||
CacheCostDragonUpgrade = 'Not enough buildings to sell';
|
||||
break;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
for (let i = 0; i < amount; i++) {
|
||||
let price =
|
||||
SimObjects[target].basePrice *
|
||||
@@ -71,9 +70,8 @@ export default function CacheDragonCost() {
|
||||
cost += price;
|
||||
SimObjects[target].amount -= 1;
|
||||
}
|
||||
}
|
||||
CacheCostDragonUpgrade = `Cost to rebuy: ${Beautify(cost)}`;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
CacheLastDragonLevel = Game.dragonLevel;
|
||||
|
||||
@@ -19,6 +19,10 @@ import ColourOfPP from './ColourOfPP';
|
||||
*/
|
||||
function CacheColor(target, amount) {
|
||||
Object.keys(target).forEach((i) => {
|
||||
if (CMOptions.PPRigidelMode && amount === 1) {
|
||||
target[i].color = ColorGray;
|
||||
return;
|
||||
}
|
||||
target[i].color = ColourOfPP(
|
||||
target[i],
|
||||
Game.Objects[i].getSumPrice(amount),
|
||||
@@ -39,6 +43,7 @@ function CachePP(target, amount) {
|
||||
Game.cookiesPs +
|
||||
price / target[i].bonus;
|
||||
} else target[i].pp = price / target[i].bonus;
|
||||
if (!(CMOptions.PPRigidelMode && amount === 1))
|
||||
CachePPArray.push([target[i].pp, amount]);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ This update also implements the following functions:</br>
|
||||
- Added option to show buttons that can hide the upgrade and building section</br>
|
||||
- Added option to display PP as a time unit, note that these are only approximations. PP does not translate directly into time (the name is deceptive, we know...)</br>
|
||||
- Statistics page now shows chance for random drops when they have not been achieved</br>
|
||||
- In a later hotfix we have added a Rigidel mode that will colour all buy 1 options grey</br>
|
||||
</br>
|
||||
This update fixes the following bugs:</br>
|
||||
- Incorrect amount for "required for max plant reward" in statistics page</br>
|
||||
|
||||
@@ -221,6 +221,13 @@ const Config = {
|
||||
'Makes CookieMonster ignore the 1st, 2nd or 3rd best buildings in labeling and colouring PP values',
|
||||
true,
|
||||
),
|
||||
PPRigidelMode: new SettingStandard(
|
||||
'bool',
|
||||
'Calculation',
|
||||
['Rigidel Mode OFF', 'Rigidel Mode ON'],
|
||||
'Makes CookieMonster ignore all "buy 1" options when colouring PP in order to stay at a total building count ending in 10 for pantheon god Rigidel',
|
||||
true,
|
||||
),
|
||||
PPSecondsLowerLimit: new SettingInputNumber(
|
||||
'numscale',
|
||||
'Calculation',
|
||||
|
||||
@@ -13,6 +13,7 @@ const ConfigDefault = {
|
||||
AvgCPSHist: 3,
|
||||
AvgClicksHist: 0,
|
||||
PPExcludeTop: 0,
|
||||
PPRigidelMode: 0,
|
||||
PPSecondsLowerLimit: 0,
|
||||
PPOnlyConsiderBuyable: 0,
|
||||
ToolWarnBon: 1,
|
||||
|
||||
@@ -38,22 +38,24 @@ function CreateUpgradeBarLegend() {
|
||||
return div;
|
||||
};
|
||||
|
||||
legend.appendChild(legendLine(ColorBlue, 'Better than best PP building'));
|
||||
legend.appendChild(legendLine(ColorGreen, 'Same as best PP building'));
|
||||
legend.appendChild(
|
||||
legendLine(
|
||||
ColorYellow,
|
||||
'Between best and worst PP buildings closer to best',
|
||||
),
|
||||
legendLine(ColorBlue, 'Better than the best PP of a building option'),
|
||||
);
|
||||
legend.appendChild(
|
||||
legendLine(
|
||||
ColorOrange,
|
||||
'Between best and worst PP buildings closer to worst',
|
||||
),
|
||||
legendLine(ColorGreen, 'Same as the best PP building option'),
|
||||
);
|
||||
legend.appendChild(
|
||||
legendLine(ColorYellow, 'Within the top 10 of PP for buildings'),
|
||||
);
|
||||
legend.appendChild(
|
||||
legendLine(ColorOrange, 'Within the top 20 of PP for buildings'),
|
||||
);
|
||||
legend.appendChild(
|
||||
legendLine(ColorRed, 'Within the top 30 of PP for buildings'),
|
||||
);
|
||||
legend.appendChild(
|
||||
legendLine(ColorPurple, 'Outside of the top 30 of PP for buildings'),
|
||||
);
|
||||
legend.appendChild(legendLine(ColorRed, 'Same as worst PP building'));
|
||||
legend.appendChild(legendLine(ColorPurple, 'Worse than worst PP building'));
|
||||
legend.appendChild(legendLine(ColorGray, 'Negative or infinity PP'));
|
||||
return legend;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* eslint-disable no-restricted-syntax */
|
||||
import {
|
||||
CacheObjects1,
|
||||
CacheObjects10,
|
||||
@@ -76,6 +75,9 @@ export default function Building() {
|
||||
// Add "production left till next achievement"-bar
|
||||
l('CMTooltipProductionHeader').style.display = 'none';
|
||||
l('CMTooltipTime').style.marginBottom = '0px';
|
||||
|
||||
// Can this ESLint error be solved while retaining the functionality of break?
|
||||
// eslint-disable-next-line no-restricted-syntax
|
||||
for (const i of Object.keys(Game.Objects[TooltipName].productionAchievs)) {
|
||||
if (
|
||||
!Game.HasAchiev(
|
||||
|
||||
@@ -2,6 +2,7 @@ import {
|
||||
CacheWrinklersFattest,
|
||||
CacheWrinklersTotal,
|
||||
} from '../../../Cache/VariablesAndData';
|
||||
import { Beautify } from '../../BeautifyAndFormatting/BeautifyFormatting';
|
||||
import { TooltipName } from '../../VariablesAndData';
|
||||
import * as Create from '../CreateTooltip';
|
||||
|
||||
@@ -16,9 +17,9 @@ export default function WrinklerButton() {
|
||||
const WrinklerReward = document.createElement('div');
|
||||
WrinklerReward.id = 'CMWrinklerReward';
|
||||
if (TooltipName === 'PopAll') {
|
||||
WrinklerReward.textContent = CacheWrinklersTotal;
|
||||
WrinklerReward.textContent = Beautify(CacheWrinklersTotal);
|
||||
} else if (TooltipName === 'PopFattest') {
|
||||
WrinklerReward.textContent = CacheWrinklersFattest[0];
|
||||
WrinklerReward.textContent = Beautify(CacheWrinklersFattest[0]);
|
||||
}
|
||||
|
||||
l('tooltip').appendChild(WrinklerReward);
|
||||
|
||||
Reference in New Issue
Block a user