Allow target Heavenly Chips in stats #269
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -685,7 +685,7 @@ CM.Cache.CacheBuildingsPP = function() {
|
|||||||
for (let i of Object.keys(CM.Cache[target])) {
|
for (let i of Object.keys(CM.Cache[target])) {
|
||||||
if (Game.cookiesPs) {
|
if (Game.cookiesPs) {
|
||||||
CM.Cache[target][i].pp = (Math.max(Game.Objects[i].bulkPrice - (Game.cookies + CM.Disp.GetWrinkConfigBank()), 0) / Game.cookiesPs) + (Game.Objects[i].bulkPrice / CM.Cache[target][i].bonus);
|
CM.Cache[target][i].pp = (Math.max(Game.Objects[i].bulkPrice - (Game.cookies + CM.Disp.GetWrinkConfigBank()), 0) / Game.cookiesPs) + (Game.Objects[i].bulkPrice / CM.Cache[target][i].bonus);
|
||||||
} else CM.CM.Cache[target][i].pp = (Game.Objects[i].bulkPrice / CM.Cache[target][i].bonus);
|
} else CM.Cache[target][i].pp = (Game.Objects[i].bulkPrice / CM.Cache[target][i].bonus);
|
||||||
if (CM.Cache.min === -1 || CM.Cache[target][i].pp < CM.Cache.min) CM.Cache.min = CM.Cache[target][i].pp;
|
if (CM.Cache.min === -1 || CM.Cache[target][i].pp < CM.Cache.min) CM.Cache.min = CM.Cache[target][i].pp;
|
||||||
if (CM.Cache.max === -1 || CM.Cache[target][i].pp > CM.Cache.max) CM.Cache.max = CM.Cache[target][i].pp;
|
if (CM.Cache.max === -1 || CM.Cache[target][i].pp > CM.Cache.max) CM.Cache.max = CM.Cache[target][i].pp;
|
||||||
}
|
}
|
||||||
|
|||||||
106
src/Data.js
106
src/Data.js
@@ -232,12 +232,13 @@ CM.Data.Config.UpStats = {type: 'bool', group: 'Statistics', label: ['Statistics
|
|||||||
CM.Data.Config.TimeFormat = {type: 'bool', group: 'Statistics', label: ['Time XXd, XXh, XXm, XXs', 'Time XX:XX:XX:XX:XX'], desc: 'Change the time format', toggle: false};
|
CM.Data.Config.TimeFormat = {type: 'bool', group: 'Statistics', label: ['Time XXd, XXh, XXm, XXs', 'Time XX:XX:XX:XX:XX'], desc: 'Change the time format', toggle: false};
|
||||||
CM.Data.Config.DetailedTime = {type: 'bool', group: 'Statistics', label: ['Detailed Time OFF', 'Detailed Time ON'], desc: 'Change how time is displayed in certain statistics and tooltips', toggle: true, func: function() {CM.Disp.ToggleDetailedTime();}};
|
CM.Data.Config.DetailedTime = {type: 'bool', group: 'Statistics', label: ['Detailed Time OFF', 'Detailed Time ON'], desc: 'Change how time is displayed in certain statistics and tooltips', toggle: true, func: function() {CM.Disp.ToggleDetailedTime();}};
|
||||||
CM.Data.Config.GrimoireBar = {type: 'bool', group: 'Statistics', label: ['Grimoire Magic Meter Timer OFF', 'Grimoire Magic Meter Timer ON'], desc: 'A timer on how long before the Grimoire magic meter is full', toggle: true};
|
CM.Data.Config.GrimoireBar = {type: 'bool', group: 'Statistics', label: ['Grimoire Magic Meter Timer OFF', 'Grimoire Magic Meter Timer ON'], desc: 'A timer on how long before the Grimoire magic meter is full', toggle: true};
|
||||||
|
CM.Data.Config.HeavenlyChipsTarget = {type: 'numscale', group: 'Statistics', label: 'Heavenly Chips Target', desc: 'Use this to set a Heavenly Chips target that will be counted towards in the "prestige" statsistics sections', min: 1, max: Infinity};
|
||||||
|
|
||||||
// Notation
|
// Notation
|
||||||
CM.Data.Config.Scale = {type: 'bool', group: 'Notation', label: ['Game\'s Setting Scale', 'Metric', 'Short Scale', 'Short Scale (Abbreviated)', 'Scientific Notation', 'Engineering Notation'], desc: 'Change how long numbers are handled', toggle: false, func: function() {CM.Disp.RefreshScale();}};
|
CM.Data.Config.Scale = {type: 'bool', group: 'Notation', label: ['Game\'s Setting Scale', 'Metric', 'Short Scale', 'Short Scale (Abbreviated)', 'Scientific Notation', 'Engineering Notation'], desc: 'Change how long numbers are handled', toggle: false, func: function() {CM.Disp.RefreshScale();}};
|
||||||
CM.Data.Config.ScaleDecimals = {type: 'bool', group: 'Notation', label: ['1 decimals', '2 decimals', '3 decimals'], desc: 'Set the number of decimals used when applicable', toggle: false, func: function() {CM.Disp.RefreshScale();}};
|
CM.Data.Config.ScaleDecimals = {type: 'bool', group: 'Notation', label: ['1 decimals', '2 decimals', '3 decimals'], desc: 'Set the number of decimals used when applicable', toggle: false, func: function() {CM.Disp.RefreshScale();}};
|
||||||
CM.Data.Config.ScaleSeparator = {type: 'bool', group: 'Notation', label: ['. for decimals (Standard)', '. for thousands'], desc: 'Set the separator used for decimals and thousands', toggle: false, func: function() {CM.Disp.RefreshScale();}};
|
CM.Data.Config.ScaleSeparator = {type: 'bool', group: 'Notation', label: ['. for decimals (Standard)', '. for thousands'], desc: 'Set the separator used for decimals and thousands', toggle: false, func: function() {CM.Disp.RefreshScale();}};
|
||||||
CM.Data.Config.ScaleCutoff = {type: 'numscale', group: 'Notation', label: 'Notation Cut-off Point', desc: 'The number from which CookieMonster will start formatting numbers based on chosen scale. Standard is 999,999. Setting this above 999,999,999 might break certain notations.', min: 1, max: 999999999};
|
CM.Data.Config.ScaleCutoff = {type: 'numscale', group: 'Notation', label: 'Notation Cut-off Point', desc: 'The number from which CookieMonster will start formatting numbers based on chosen scale. Standard is 999,999. Setting this above 999,999,999 might break certain notations', min: 1, max: 999999999};
|
||||||
|
|
||||||
// Miscellaneous
|
// Miscellaneous
|
||||||
CM.Data.Config.GCTimer = {type: 'bool', group: 'Miscellaneous', label: ['Golden Cookie Timer OFF', 'Golden Cookie Timer ON'], desc: 'A timer on the Golden Cookie when it has been spawned', toggle: true, func: function() {CM.Disp.ToggleGCTimer();}};
|
CM.Data.Config.GCTimer = {type: 'bool', group: 'Miscellaneous', label: ['Golden Cookie Timer OFF', 'Golden Cookie Timer ON'], desc: 'A timer on the Golden Cookie when it has been spawned', toggle: true, func: function() {CM.Disp.ToggleGCTimer();}};
|
||||||
@@ -251,84 +252,85 @@ CM.Data.Config.BulkBuyBlock = {type: 'bool', group: 'Miscellaneous', label: ['Bl
|
|||||||
* It is used by CM.LoadConfig() and CM.Config.RestoreDefault()
|
* It is used by CM.LoadConfig() and CM.Config.RestoreDefault()
|
||||||
*/
|
*/
|
||||||
CM.Data.ConfigDefault = {
|
CM.Data.ConfigDefault = {
|
||||||
BotBar: 1,
|
BotBar: 1,
|
||||||
TimerBar: 1,
|
TimerBar: 1,
|
||||||
TimerBarPos: 0,
|
TimerBarPos: 0,
|
||||||
TimerBarOverlay: 2,
|
TimerBarOverlay: 2,
|
||||||
BuildColor: 1,
|
BuildColor: 1,
|
||||||
BulkBuildColor: 0,
|
BulkBuildColor: 0,
|
||||||
ColorPPBulkMode: 0,
|
ColorPPBulkMode: 0,
|
||||||
UpBarColor: 1,
|
UpBarColor: 1,
|
||||||
UpgradeBarFixedPos: 1,
|
UpgradeBarFixedPos: 1,
|
||||||
CalcWrink: 0,
|
CalcWrink: 0,
|
||||||
CPSMode: 1,
|
CPSMode: 1,
|
||||||
AvgCPSHist: 3,
|
AvgCPSHist: 3,
|
||||||
AvgClicksHist: 0,
|
AvgClicksHist: 0,
|
||||||
ToolWarnBon: 0,
|
ToolWarnBon: 0,
|
||||||
Title: 1,
|
Title: 1,
|
||||||
GeneralSound: 1,
|
GeneralSound: 1,
|
||||||
GCNotification: 0,
|
GCNotification: 0,
|
||||||
GCFlash: 1,
|
GCFlash: 1,
|
||||||
GCSound: 1,
|
GCSound: 1,
|
||||||
GCVolume: 100,
|
GCVolume: 100,
|
||||||
GCSoundURL: 'https://freesound.org/data/previews/66/66717_931655-lq.mp3',
|
GCSoundURL: 'https://freesound.org/data/previews/66/66717_931655-lq.mp3',
|
||||||
FortuneNotification: 0,
|
FortuneNotification: 0,
|
||||||
FortuneFlash: 1,
|
FortuneFlash: 1,
|
||||||
FortuneSound: 1,
|
FortuneSound: 1,
|
||||||
FortuneVolume: 100,
|
FortuneVolume: 100,
|
||||||
FortuneSoundURL: 'https://freesound.org/data/previews/174/174027_3242494-lq.mp3',
|
FortuneSoundURL: 'https://freesound.org/data/previews/174/174027_3242494-lq.mp3',
|
||||||
SeaNotification: 0,
|
SeaNotification: 0,
|
||||||
SeaFlash: 1,
|
SeaFlash: 1,
|
||||||
SeaSound: 1,
|
SeaSound: 1,
|
||||||
SeaVolume: 100,
|
SeaVolume: 100,
|
||||||
SeaSoundURL: 'https://www.freesound.org/data/previews/121/121099_2193266-lq.mp3',
|
SeaSoundURL: 'https://www.freesound.org/data/previews/121/121099_2193266-lq.mp3',
|
||||||
GardFlash: 1,
|
GardFlash: 1,
|
||||||
GardSound: 1,
|
GardSound: 1,
|
||||||
GardVolume: 100,
|
GardVolume: 100,
|
||||||
GardSoundURL: 'https://freesound.org/data/previews/103/103046_861714-lq.mp3',
|
GardSoundURL: 'https://freesound.org/data/previews/103/103046_861714-lq.mp3',
|
||||||
MagicNotification: 0,
|
MagicNotification: 0,
|
||||||
MagicFlash: 1,
|
MagicFlash: 1,
|
||||||
MagicSound: 1,
|
MagicSound: 1,
|
||||||
MagicVolume: 100,
|
MagicVolume: 100,
|
||||||
MagicSoundURL: 'https://freesound.org/data/previews/221/221683_1015240-lq.mp3',
|
MagicSoundURL: 'https://freesound.org/data/previews/221/221683_1015240-lq.mp3',
|
||||||
WrinklerNotification: 0,
|
WrinklerNotification: 0,
|
||||||
WrinklerFlash: 1,
|
WrinklerFlash: 1,
|
||||||
WrinklerSound: 1,
|
WrinklerSound: 1,
|
||||||
WrinklerVolume: 100,
|
WrinklerVolume: 100,
|
||||||
WrinklerSoundURL: 'https://freesound.org/data/previews/124/124186_8043-lq.mp3',
|
WrinklerSoundURL: 'https://freesound.org/data/previews/124/124186_8043-lq.mp3',
|
||||||
WrinklerMaxNotification: 0,
|
WrinklerMaxNotification: 0,
|
||||||
WrinklerMaxFlash: 1,
|
WrinklerMaxFlash: 1,
|
||||||
WrinklerMaxSound: 1,
|
WrinklerMaxSound: 1,
|
||||||
WrinklerMaxVolume: 100,
|
WrinklerMaxVolume: 100,
|
||||||
WrinklerMaxSoundURL: 'https://freesound.org/data/previews/152/152743_15663-lq.mp3',
|
WrinklerMaxSoundURL: 'https://freesound.org/data/previews/152/152743_15663-lq.mp3',
|
||||||
TooltipBuildUpgrade: 1,
|
TooltipBuildUpgrade: 1,
|
||||||
TooltipAmor: 0,
|
TooltipAmor: 0,
|
||||||
ToolWarnLucky: 1,
|
ToolWarnLucky: 1,
|
||||||
ToolWarnLuckyFrenzy: 1,
|
ToolWarnLuckyFrenzy: 1,
|
||||||
ToolWarnConjure: 1,
|
ToolWarnConjure: 1,
|
||||||
ToolWarnConjureFrenzy: 1,
|
ToolWarnConjureFrenzy: 1,
|
||||||
ToolWarnEdifice: 1,
|
ToolWarnEdifice: 1,
|
||||||
ToolWarnPos: 1,
|
ToolWarnPos: 1,
|
||||||
TooltipGrim:1,
|
TooltipGrim:1,
|
||||||
TooltipWrink: 1,
|
TooltipWrink: 1,
|
||||||
TooltipLump: 1,
|
TooltipLump: 1,
|
||||||
TooltipPlots: 1,
|
TooltipPlots: 1,
|
||||||
DragonAuraInfo: 1,
|
DragonAuraInfo: 1,
|
||||||
TooltipAscendButton: 1,
|
TooltipAscendButton: 1,
|
||||||
Stats: 1,
|
Stats: 1,
|
||||||
MissingUpgrades: 1,
|
MissingUpgrades: 1,
|
||||||
UpStats: 1,
|
UpStats: 1,
|
||||||
TimeFormat: 0,
|
TimeFormat: 0,
|
||||||
DetailedTime: 1,
|
DetailedTime: 1,
|
||||||
GrimoireBar: 1,
|
GrimoireBar: 1,
|
||||||
Scale: 2,
|
HeavenlyChipsTarget: 1,
|
||||||
|
Scale: 2,
|
||||||
ScaleDecimals: 2,
|
ScaleDecimals: 2,
|
||||||
ScaleSeparator: 0,
|
ScaleSeparator: 0,
|
||||||
ScaleCutoff: 999999,
|
ScaleCutoff: 999999,
|
||||||
Colors: {Blue: '#4bb8f0', Green: '#00ff00', Yellow: '#ffff00', Orange: '#ff7f00', Red: '#ff0000', Purple: '#ff00ff', Gray: '#b3b3b3', Pink: '#ff1493', Brown: '#8b4513'},
|
Colors: {Blue: '#4bb8f0', Green: '#00ff00', Yellow: '#ffff00', Orange: '#ff7f00', Red: '#ff0000', Purple: '#ff00ff', Gray: '#b3b3b3', Pink: '#ff1493', Brown: '#8b4513'},
|
||||||
SortBuildings: 0,
|
SortBuildings: 0,
|
||||||
SortUpgrades: 0,
|
SortUpgrades: 0,
|
||||||
GCTimer: 1,
|
GCTimer: 1,
|
||||||
Favicon: 1,
|
Favicon: 1,
|
||||||
WrinklerButtons: 1,
|
WrinklerButtons: 1,
|
||||||
BulkBuyBlock: 0,
|
BulkBuyBlock: 0,
|
||||||
|
|||||||
@@ -2367,7 +2367,7 @@ CM.Disp.AddMenuStats = function(title) {
|
|||||||
*/
|
*/
|
||||||
CM.Disp.CreateStatsHeader = function(text, config) {
|
CM.Disp.CreateStatsHeader = function(text, config) {
|
||||||
let div = document.createElement('div');
|
let div = document.createElement('div');
|
||||||
div.className = 'listing';
|
div.className = 'title';
|
||||||
div.style.padding = '5px 16px';
|
div.style.padding = '5px 16px';
|
||||||
div.style.opacity = '0.7';
|
div.style.opacity = '0.7';
|
||||||
div.style.fontSize = '17px';
|
div.style.fontSize = '17px';
|
||||||
@@ -2695,6 +2695,13 @@ CM.Disp.CreateStatsPrestigeSection = function() {
|
|||||||
|
|
||||||
section.appendChild(CM.Disp.CreateStatsListing("basic", 'Heavenly Chips Per Second (last 5 seconds)', document.createTextNode(Beautify(CM.Cache.HCPerSecond))));
|
section.appendChild(CM.Disp.CreateStatsListing("basic", 'Heavenly Chips Per Second (last 5 seconds)', document.createTextNode(Beautify(CM.Cache.HCPerSecond))));
|
||||||
|
|
||||||
|
let HCTarget = Number(CM.Options.HeavenlyChipsTarget)
|
||||||
|
if (!isNaN(HCTarget)) {
|
||||||
|
let CookiesTillTarget = HCTarget - Math.floor(Game.HowMuchPrestige(Game.cookiesReset + Game.cookiesEarned))
|
||||||
|
section.appendChild(CM.Disp.CreateStatsListing("basic", 'Heavenly Chips To Target Set In Settings (CUR)', document.createTextNode(Beautify(CookiesTillTarget))));
|
||||||
|
section.appendChild(CM.Disp.CreateStatsListing("basic", 'Time To Target (CUR, Current 5 Second Average)', document.createTextNode(CM.Disp.FormatTime(CookiesTillTarget / CM.Cache.HCPerSecond))));
|
||||||
|
}
|
||||||
|
|
||||||
let resetBonus = CM.Sim.ResetBonus(possiblePresMax);
|
let resetBonus = CM.Sim.ResetBonus(possiblePresMax);
|
||||||
let resetFrag = document.createDocumentFragment();
|
let resetFrag = document.createDocumentFragment();
|
||||||
resetFrag.appendChild(document.createTextNode(Beautify(resetBonus)));
|
resetFrag.appendChild(document.createTextNode(Beautify(resetBonus)));
|
||||||
|
|||||||
Reference in New Issue
Block a user