Added requirements for garden to stats page #602
This commit is contained in:
3 files changed
+53
-6
No files matched your search
+1
-1
@@ -1 +1 @@
|
||||
const CM={Backup:{},Cache:{},Config:{},Data:{Config:{}},Disp:{},Footer:{},Main:{},Options:{},Sim:{},VersionMajor:"2.031",VersionMinor:"4"};CM.Cache.InitCache=function(){CM.Cache.CacheDragonAuras();CM.Cache.CacheWrinklers();CM.Cache.CacheStats();CM.Cache.CacheGoldenAndWrathCookiesMults();CM.Cache.CacheChain();CM.Cache.CacheMissingUpgrades();CM.Cache.CacheSeaSpec();CM.Cache.InitCookiesDiff();CM.Cache.HeavenlyChipsDiff=new CMAvgQueue(5);CM.Cache.CacheHeavenlyChipsPS;CM.Cache.CacheAvgCPS();CM.Cache.CacheIncome();CM.Cache.CacheBuildingsPrices();CM.Cache.CachePP()};CM.Cache.LoopCache=function(){CM.Cache.CacheWrinklers();CM.Cache.CachePP();CM.Cache.CacheCurrWrinklerCPS();CM.Cache.CacheAvgCPS();CM.Cache.CacheHeavenlyChipsPS();let cookiesToNext=Game.HowManyCookiesReset(Math.floor(Game.HowMuchPrestige(Game.cookiesReset+Game.cookiesEarned))+1)-(Game.cookiesEarned+Game.cookiesReset);CM.Cache.TimeTillNextPrestige=CM.Disp.FormatTime(cookiesToNext/CM.Disp.GetCPS())};class CMAvgQueue{constructor(maxLength){this.maxLength=maxLength;this.queue=[]}addLatest(newValue){if(this.queue.push(newValue)>this.maxLength){this.queue.shift()}}calcAverage(timePeriod){if(timePeriod>this.maxLength)timePeriod=this.maxLength;if(timePeriod>this.queue.length)timePeriod=this.queue.length;let ret=0;for(let i=this.queue.length-1;i>=0&&i>this.queue.length-1-timePeriod;i--){ret+=this.queue[i]}return ret/timePeriod}}CM.Cache.CacheDragonAuras=function(){CM.Cache.dragonAura=Game.dragonAura;CM.Cache.dragonAura2=Game.dragonAura2};CM.Cache.CacheWrinklers=function(){CM.Cache.WrinklersTotal=0;CM.Cache.WrinklersNormal=0;CM.Cache.WrinklersFattest=[0,null];for(let i=0;i<Game.wrinklers.length;i++){let sucked=Game.wrinklers[i].sucked;let toSuck=1.1;if(Game.Has("Sacrilegious corruption"))toSuck*=1.05;if(Game.wrinklers[i].type==1)toSuck*=3;sucked*=toSuck;if(Game.Has("Wrinklerspawn"))sucked*=1.05;if(CM.Sim.Objects.Temple.minigameLoaded){let godLvl=Game.hasGod("scorn");if(godLvl===1)sucked*=1.15;else if(godLvl===2)sucked*=1.1;else if(godLvl===3)sucked*=1.05}CM.Cache.WrinklersTotal+=sucked;if(Game.wrinklers[i].type===0){CM.Cache.WrinklersNormal+=sucked;if(sucked>CM.Cache.WrinklersFattest[0])CM.Cache.WrinklersFattest=[sucked,i]}}};CM.Cache.CacheStats=function(){CM.Cache.Lucky=CM.Cache.NoGoldSwitchCookiesPS*900/.15;CM.Cache.Lucky*=CM.Cache.DragonsFortuneMultAdjustment;let cpsBuffMult=CM.Cache.getCPSBuffMult();if(cpsBuffMult>0)CM.Cache.Lucky/=cpsBuffMult;else CM.Cache.Lucky=0;CM.Cache.LuckyReward=CM.Cache.GoldenCookiesMult*(CM.Cache.Lucky*.15)+13;CM.Cache.LuckyWrathReward=CM.Cache.WrathCookiesMult*(CM.Cache.Lucky*.15)+13;CM.Cache.LuckyFrenzy=CM.Cache.Lucky*7;CM.Cache.LuckyRewardFrenzy=CM.Cache.GoldenCookiesMult*(CM.Cache.LuckyFrenzy*.15)+13;CM.Cache.LuckyWrathRewardFrenzy=CM.Cache.WrathCookiesMult*(CM.Cache.LuckyFrenzy*.15)+13;CM.Cache.Conjure=CM.Cache.Lucky*2;CM.Cache.ConjureReward=CM.Cache.Conjure*.15;CM.Cache.Edifice=0;let max=0;let n=0;for(let i of Object.keys(Game.Objects)){if(Game.Objects[i].amount>max)max=Game.Objects[i].amount;if(Game.Objects[i].amount>0)n++}for(let i of Object.keys(Game.Objects)){if((Game.Objects[i].amount<max||n===1)&&Game.Objects[i].amount<400&&Game.Objects[i].price*2>CM.Cache.Edifice){CM.Cache.Edifice=Game.Objects[i].price*2;CM.Cache.EdificeBuilding=i}}};CM.Cache.CacheGoldenAndWrathCookiesMults=function(){if(CM.Footer.isInitzializing){CM.Cache.GoldenCookiesMult=1;CM.Cache.WrathCookiesMult=1;CM.Cache.DragonsFortuneMultAdjustment=1}else{let goldenMult=1;let wrathMult=1;let mult=1;if(CM.Sim.Has("Green yeast digestives"))mult*=1.01;if(CM.Sim.Has("Dragon fang"))mult*=1.03;goldenMult*=1+Game.auraMult("Ancestral Metamorphosis")*.1;goldenMult*=Game.eff("goldenCookieGain");wrathMult*=1+Game.auraMult("Unholy Dominion")*.1;wrathMult*=Game.eff("wrathCookieGain");CM.Cache.GoldenCookiesMult=mult*goldenMult;CM.Cache.WrathCookiesMult=mult*wrathMult;CM.Cache.DragonsFortuneMultAdjustment=1;if(Game.shimmerTypes.golden.n===0){CM.Cache.DragonsFortuneMultAdjustment*=1+Game.auraMult("Dragon's Fortune")*1.23}}};CM.Cache.MaxChainCookieReward=function(digit,maxPayout,mult){let totalFromChain=0;let moni=0;let nextMoni=0;let nextRequired=0;let chain=1+Math.max(0,Math.ceil(Math.log(Game.cookies)/Math.LN10)-10);while(nextMoni<maxPayout){moni=Math.max(digit,Math.min(Math.floor(1/9*Math.pow(10,chain)*digit*mult),maxPayout*mult));nextMoni=Math.max(digit,Math.min(Math.floor(1/9*Math.pow(10,chain+1)*digit*mult),maxPayout*mult));nextRequired=Math.floor(1/9*Math.pow(10,chain+1)*digit*mult);totalFromChain+=moni;chain++}return[totalFromChain,moni,nextRequired]};CM.Cache.CacheChain=function(){let maxPayout=CM.Cache.NoGoldSwitchCookiesPS*60*60*6*CM.Cache.DragonsFortuneMultAdjustment;let cpsBuffMult=CM.Cache.getCPSBuffMult();if(cpsBuffMult>0)maxPayout/=cpsBuffMult;else maxPayout=0;CM.Cache.ChainMaxReward=CM.Cache.MaxChainCookieReward(7,maxPayout,CM.Cache.GoldenCookiesMult);CM.Cache.ChainRequired=CM.Cache.ChainMaxReward[1]*2/CM.Cache.GoldenCookiesMult;CM.Cache.ChainRequiredNext=CM.CLine truncated
|
||||
const CM={Backup:{},Cache:{},Config:{},Data:{Config:{}},Disp:{},Footer:{},Main:{},Options:{},Sim:{},VersionMajor:"2.031",VersionMinor:"4"};CM.Cache.InitCache=function(){CM.Cache.CacheDragonAuras();CM.Cache.CacheWrinklers();CM.Cache.CacheStats();CM.Cache.CacheGoldenAndWrathCookiesMults();CM.Cache.CacheChain();CM.Cache.CacheMissingUpgrades();CM.Cache.CacheSeaSpec();CM.Cache.InitCookiesDiff();CM.Cache.HeavenlyChipsDiff=new CMAvgQueue(5);CM.Cache.CacheHeavenlyChipsPS;CM.Cache.CacheAvgCPS();CM.Cache.CacheIncome();CM.Cache.CacheBuildingsPrices();CM.Cache.CachePP()};CM.Cache.LoopCache=function(){CM.Cache.CacheWrinklers();CM.Cache.CachePP();CM.Cache.CacheCurrWrinklerCPS();CM.Cache.CacheAvgCPS();CM.Cache.CacheHeavenlyChipsPS();let cookiesToNext=Game.HowManyCookiesReset(Math.floor(Game.HowMuchPrestige(Game.cookiesReset+Game.cookiesEarned))+1)-(Game.cookiesEarned+Game.cookiesReset);CM.Cache.TimeTillNextPrestige=CM.Disp.FormatTime(cookiesToNext/CM.Disp.GetCPS())};class CMAvgQueue{constructor(maxLength){this.maxLength=maxLength;this.queue=[]}addLatest(newValue){if(this.queue.push(newValue)>this.maxLength){this.queue.shift()}}calcAverage(timePeriod){if(timePeriod>this.maxLength)timePeriod=this.maxLength;if(timePeriod>this.queue.length)timePeriod=this.queue.length;let ret=0;for(let i=this.queue.length-1;i>=0&&i>this.queue.length-1-timePeriod;i--){ret+=this.queue[i]}return ret/timePeriod}}CM.Cache.CacheDragonAuras=function(){CM.Cache.dragonAura=Game.dragonAura;CM.Cache.dragonAura2=Game.dragonAura2};CM.Cache.CacheWrinklers=function(){CM.Cache.WrinklersTotal=0;CM.Cache.WrinklersNormal=0;CM.Cache.WrinklersFattest=[0,null];for(let i=0;i<Game.wrinklers.length;i++){let sucked=Game.wrinklers[i].sucked;let toSuck=1.1;if(Game.Has("Sacrilegious corruption"))toSuck*=1.05;if(Game.wrinklers[i].type==1)toSuck*=3;sucked*=toSuck;if(Game.Has("Wrinklerspawn"))sucked*=1.05;if(CM.Sim.Objects.Temple.minigameLoaded){let godLvl=Game.hasGod("scorn");if(godLvl===1)sucked*=1.15;else if(godLvl===2)sucked*=1.1;else if(godLvl===3)sucked*=1.05}CM.Cache.WrinklersTotal+=sucked;if(Game.wrinklers[i].type===0){CM.Cache.WrinklersNormal+=sucked;if(sucked>CM.Cache.WrinklersFattest[0])CM.Cache.WrinklersFattest=[sucked,i]}}};CM.Cache.CacheStats=function(){CM.Cache.Lucky=CM.Cache.NoGoldSwitchCookiesPS*900/.15;CM.Cache.Lucky*=CM.Cache.DragonsFortuneMultAdjustment;let cpsBuffMult=CM.Cache.getCPSBuffMult();if(cpsBuffMult>0)CM.Cache.Lucky/=cpsBuffMult;else CM.Cache.Lucky=0;CM.Cache.LuckyReward=CM.Cache.GoldenCookiesMult*(CM.Cache.Lucky*.15)+13;CM.Cache.LuckyWrathReward=CM.Cache.WrathCookiesMult*(CM.Cache.Lucky*.15)+13;CM.Cache.LuckyFrenzy=CM.Cache.Lucky*7;CM.Cache.LuckyRewardFrenzy=CM.Cache.GoldenCookiesMult*(CM.Cache.LuckyFrenzy*.15)+13;CM.Cache.LuckyWrathRewardFrenzy=CM.Cache.WrathCookiesMult*(CM.Cache.LuckyFrenzy*.15)+13;CM.Cache.Conjure=CM.Cache.Lucky*2;CM.Cache.ConjureReward=CM.Cache.Conjure*.15;CM.Cache.Edifice=0;let max=0;let n=0;for(let i of Object.keys(Game.Objects)){if(Game.Objects[i].amount>max)max=Game.Objects[i].amount;if(Game.Objects[i].amount>0)n++}for(let i of Object.keys(Game.Objects)){if((Game.Objects[i].amount<max||n===1)&&Game.Objects[i].amount<400&&Game.Objects[i].price*2>CM.Cache.Edifice){CM.Cache.Edifice=Game.Objects[i].price*2;CM.Cache.EdificeBuilding=i}}};CM.Cache.CacheGoldenAndWrathCookiesMults=function(){if(CM.Footer.isInitzializing){CM.Cache.GoldenCookiesMult=1;CM.Cache.WrathCookiesMult=1;CM.Cache.DragonsFortuneMultAdjustment=1}else{let goldenMult=1;let wrathMult=1;let mult=1;if(CM.Sim.Has("Green yeast digestives"))mult*=1.01;if(CM.Sim.Has("Dragon fang"))mult*=1.03;goldenMult*=1+Game.auraMult("Ancestral Metamorphosis")*.1;goldenMult*=Game.eff("goldenCookieGain");wrathMult*=1+Game.auraMult("Unholy Dominion")*.1;wrathMult*=Game.eff("wrathCookieGain");CM.Cache.GoldenCookiesMult=mult*goldenMult;CM.Cache.WrathCookiesMult=mult*wrathMult;CM.Cache.DragonsFortuneMultAdjustment=1;if(Game.shimmerTypes.golden.n===0){CM.Cache.DragonsFortuneMultAdjustment*=1+Game.auraMult("Dragon's Fortune")*1.23}}};CM.Cache.MaxChainCookieReward=function(digit,maxPayout,mult){let totalFromChain=0;let moni=0;let nextMoni=0;let nextRequired=0;let chain=1+Math.max(0,Math.ceil(Math.log(Game.cookies)/Math.LN10)-10);while(nextMoni<maxPayout){moni=Math.max(digit,Math.min(Math.floor(1/9*Math.pow(10,chain)*digit*mult),maxPayout*mult));nextMoni=Math.max(digit,Math.min(Math.floor(1/9*Math.pow(10,chain+1)*digit*mult),maxPayout*mult));nextRequired=Math.floor(1/9*Math.pow(10,chain+1)*digit*mult);totalFromChain+=moni;chain++}return[totalFromChain,moni,nextRequired]};CM.Cache.CacheChain=function(){let maxPayout=CM.Cache.NoGoldSwitchCookiesPS*60*60*6*CM.Cache.DragonsFortuneMultAdjustment;let cpsBuffMult=CM.Cache.getCPSBuffMult();if(cpsBuffMult>0)maxPayout/=cpsBuffMult;else maxPayout=0;CM.Cache.ChainMaxReward=CM.Cache.MaxChainCookieReward(7,maxPayout,CM.Cache.GoldenCookiesMult);CM.Cache.ChainRequired=CM.Cache.ChainMaxReward[1]*2/CM.Cache.GoldenCookiesMult;CM.Cache.ChainRequiredNext=CM.CLine truncated
|
||||
+1
-1
@@ -344,7 +344,7 @@ CM.Data.ConfigDefault = {
|
||||
Favicon: 1,
|
||||
WrinklerButtons: 1,
|
||||
BulkBuyBlock: 0,
|
||||
Header: {BarsColors: 1, Calculation: 1, Notification: 1, NotificationGeneral: 1, NotificationGC: 1, NotificationFC: 1, NotificationSea: 1, NotificationGard: 1, NotificationMagi: 1, NotificationWrink: 1, NotificationWrinkMax: 1, Tooltip: 1, Statistics: 1, Notation: 1, Miscellaneous: 1, Lucky: 1, Spells: 1, Chain: 1, Prestige: 1, Wrink: 1, Sea: 1, Misc: 1, InfoTab: 1},
|
||||
Header: {BarsColors: 1, Calculation: 1, Notification: 1, NotificationGeneral: 1, NotificationGC: 1, NotificationFC: 1, NotificationSea: 1, NotificationGard: 1, NotificationMagi: 1, NotificationWrink: 1, NotificationWrinkMax: 1, Tooltip: 1, Statistics: 1, Notation: 1, Miscellaneous: 1, Lucky: 1, Chain: 1, Spells: 1, Garden: 1, Prestige: 1, Wrink: 1, Sea: 1, Misc: 1, InfoTab: 1},
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
+51
-4
@@ -2241,10 +2241,19 @@ CM.Disp.AddMenuStats = function(title) {
|
||||
if (CM.Options.Header.Chain) {
|
||||
stats.appendChild(CM.Disp.CreateStatsChainSection());
|
||||
}
|
||||
|
||||
stats.appendChild(CM.Disp.CreateStatsHeader('Spells', 'Spells'));
|
||||
if (CM.Options.Header.Spells) {
|
||||
stats.appendChild(CM.Disp.CreateStatsSpellsSection());
|
||||
|
||||
if (Game.Objects["Wizard tower"].minigameLoaded) {
|
||||
stats.appendChild(CM.Disp.CreateStatsHeader('Spells', 'Spells'));
|
||||
if (CM.Options.Header.Spells) {
|
||||
stats.appendChild(CM.Disp.CreateStatsSpellsSection());
|
||||
}
|
||||
}
|
||||
|
||||
if (Game.Objects.Farm.minigameLoaded) {
|
||||
stats.appendChild(CM.Disp.CreateStatsHeader('Garden', 'Garden'));
|
||||
if (CM.Options.Header.Garden) {
|
||||
stats.appendChild(CM.Disp.CreateStatsGardenSection());
|
||||
}
|
||||
}
|
||||
|
||||
stats.appendChild(CM.Disp.CreateStatsHeader('Prestige', 'Prestige'));
|
||||
@@ -2690,6 +2699,44 @@ CM.Disp.CreateStatsSpellsSection = function() {
|
||||
return section;
|
||||
};
|
||||
|
||||
/**
|
||||
* This function creates the "Garden" section of the stats page
|
||||
* @returns {object} section The object contating the Spells section
|
||||
*/
|
||||
CM.Disp.CreateStatsGardenSection = function() {
|
||||
let section = document.createElement('div');
|
||||
section.className = 'CMStatsGardenSection';
|
||||
|
||||
let bakeberryColor = (Game.cookies < Game.cookiesPs * 60 * 30) ? CM.Disp.colorRed : CM.Disp.colorGreen;
|
||||
let bakeberryFrag = document.createElement('span');
|
||||
bakeberryFrag.style.fontWeight = 'bold';
|
||||
bakeberryFrag.className = CM.Disp.colorTextPre + bakeberryColor;
|
||||
bakeberryFrag.textContent = Beautify(Game.cookiesPs * 60 * 30);
|
||||
section.appendChild(CM.Disp.CreateStatsListing("basic", 'Cookies required for max reward of Bakeberry: ', bakeberryFrag));
|
||||
|
||||
let chocorootColor = (Game.cookies < Game.cookiesPs * 60 * 3) ? CM.Disp.colorRed : CM.Disp.colorGreen;
|
||||
let chocorootFrag = document.createElement('span');
|
||||
chocorootFrag.style.fontWeight = 'bold';
|
||||
chocorootFrag.className = CM.Disp.colorTextPre + chocorootColor;
|
||||
chocorootFrag.textContent = Beautify(Game.cookiesPs * 60 * 3);
|
||||
section.appendChild(CM.Disp.CreateStatsListing("basic", 'Cookies required for max reward of Chocoroot: ', chocorootFrag));
|
||||
|
||||
let queenbeetColor = (Game.cookies < Game.cookiesPs * 60 * 60) ? CM.Disp.colorRed : CM.Disp.colorGreen;
|
||||
let queenbeetFrag = document.createElement('span');
|
||||
queenbeetFrag.style.fontWeight = 'bold';
|
||||
queenbeetFrag.className = CM.Disp.colorTextPre + queenbeetColor;
|
||||
queenbeetFrag.textContent = Beautify(Game.cookiesPs * 60 * 60);
|
||||
section.appendChild(CM.Disp.CreateStatsListing("basic", 'Cookies required for max reward of Queenbeet: ', queenbeetFrag));
|
||||
|
||||
let duketaterColor = (Game.cookies < Game.cookiesPs * 60 * 120) ? CM.Disp.colorRed : CM.Disp.colorGreen;
|
||||
let duketaterFrag = document.createElement('span');
|
||||
duketaterFrag.style.fontWeight = 'bold';
|
||||
duketaterFrag.className = CM.Disp.colorTextPre + duketaterColor;
|
||||
duketaterFrag.textContent = Beautify(Game.cookiesPs * 60 * 120);
|
||||
section.appendChild(CM.Disp.CreateStatsListing("basic", 'Cookies required for max reward of Duketater: ', duketaterFrag));
|
||||
return section;
|
||||
};
|
||||
|
||||
/**
|
||||
* This function creates the "Prestige" section of the stats page
|
||||
* @returns {object} section The object contating the Prestige section
|
||||
|
||||
Reference in new issue
Block a user