Resolved additional conflicts
This commit is contained in:
1 parent
39b1ec6db4
commit
a24c666993
2 files changed
+4
-6
No files matched your search
@@ -0,0 +1 @@
|
|||||||
|
const CM={Backup:{},Cache:{},Config:{},ConfigData:{},Data:{},Disp:{},Footer:{},Main:{},Options:{},Sim:{}};CM.Cache.InitCache=function(){CM.Cache.CacheDragonAuras();CM.Cache.CacheWrinklers();CM.Cache.CacheStats();CM.Cache.CacheMissingUpgrades()};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;i<Game.wrinklers.length;i++){var sucked=Game.wrinklers[i].sucked;var 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){var godLvl=CM.Sim.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(){var goldenMult=CM.Cache.GoldenCookiesMult;var wrathMult=CM.Cache.WrathCookiesMult;CM.Cache.Lucky=CM.Cache.NoGoldSwitchCookiesPS*900/.15;CM.Cache.Lucky*=CM.Cache.DragonsFortuneMultAdjustment;var cpsBuffMult=CM.Sim.getCPSBuffMult();if(cpsBuffMult>0)CM.Cache.Lucky/=cpsBuffMult;else CM.Cache.Lucky=0;CM.Cache.LuckyReward=goldenMult*(CM.Cache.Lucky*.15)+13;CM.Cache.LuckyWrathReward=wrathMult*(CM.Cache.Lucky*.15)+13;CM.Cache.LuckyFrenzy=CM.Cache.Lucky*7;CM.Cache.LuckyRewardFrenzy=goldenMult*(CM.Cache.LuckyFrenzy*.15)+13;CM.Cache.LuckyWrathRewardFrenzy=wrathMult*(CM.Cache.LuckyFrenzy*.15)+13;CM.Cache.Conjure=CM.Cache.Lucky*2;CM.Cache.ConjureReward=CM.Cache.Conjure*.15;CM.Cache.Edifice=0;var max=0;var 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.CacheMissingUpgrades=function(){CM.Cache.MissingUpgrades="";CM.Cache.MissingUpgradesCookies="";CM.Cache.MissingUpgradesPrestige="";var list=[];for(let i of Object.keys(Game.Upgrades)){list.push(Game.Upgrades[i])}var sortMap=function(a,b){if(a.order>b.order)return 1;else if(a.order<b.order)return-1;else return 0};list.sort(sortMap);for(let i of Object.keys(list)){var me=list[i];if(me.bought==0){var str="";str+=CM.Disp.crateMissing(me);if(me.pool=="prestige")CM.Cache.MissingUpgradesPrestige+=str;else if(me.pool=="cookie")CM.Cache.MissingUpgradesCookies+=str;else if(me.pool!="toggle"&&me.pool!="unused"&&me.pool!="debug")CM.Cache.MissingUpgrades+=str}}};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;var 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.InitCookiesDiff=function(){CM.Cache.CookiesDiff=new CMAvgQueue(CM.Disp.cookieTimes[CM.Disp.cookieTimes.length-1]);CM.Cache.WrinkDiff=new CMAvgQueue(CM.Disp.cookieTimes[CM.Disp.cookieTimes.length-1]);CM.Cache.WrinkFattestDiff=new CMAvgQueue(CM.Disp.cookieTimes[CM.Disp.cookieTimes.length-1]);CM.Cache.ChoEggDiff=new CMAvgQueue(CM.Disp.cookieTimes[CM.Disp.cookieTimes.length-1]);CM.Cache.ClicksDiff=new CMAvgQueue(CM.Disp.clickTimes[CM.Disp.clickTimes.length-1])};CM.Cache.UpdateAvgCPS=function(){var currDate=Math.floor(Date.now()/1e3);if(Game.T/Game.fps%1==0){var choEggTotal=Game.cookies+CM.Cache.SellForChoEgg;if(Game.cpsSucked>0){choEggTotal+=CM.Cache.WrinklersTotal}CM.Cache.RealCookiesEarned=Math.max(Game.cookiesEarned,choEggTotal);choEggTotal*=.05;if(CM.Cache.lastDate!=-1){var timeDiff=currDate-CM.Cache.lastDate;var bankDiffAvg=Math.max(0,Game.cookies-CM.Cache.lastCookies)/timeDiff;var wrinkDiffAvg=Math.max(0,CM.Cache.WrinklersTotal-CM.Cache.lastWrinkCookies)/timeDiff;var wrinkFattestDiffAvg=Math.max(0,CM.Cache.WrinklersFattest[0]-CM.Cache.lastWrinkFattestCookies)/timeDiff;var choEggDiffAvg=Math.max(0,choEggTotal-CM.Cache.lastChoEgg)/timeDiff;var clicksDiffAvg=(Game.cookieClicks-CM.Cache.lastClicks)/timeDiff;for(let i=0;i<timeDiff;i++){CM.Cache.CookiesDiff.addLatest(bankDiffAvg);CM.Cache.WrinkDiff.addLatest(wrinkDiffAvg);CM.Cache.WrinkFattestDiff.addLatest(wrinkFattestDiffAvg);CM.Cache.ChoEggDiff.addLatest(choEggDiffAvg);CM.Cache.ClicksDiff.addLatest(clicksDiffAvg)}}CM.Cache.lastDate=currDate;CM.Cache.lastCookies=Game.cookies;CM.Cache.lastWrinkCookies=CM.Cache.WrinklersTotal;CM.Cache.lastWrinkFattestCookies=CM.Cache.WrinklersFattest[0];CM.Cache.lastChoEgg=choEggTotal;CM.Cache.lastClicks=Game.cookieClicks;var cpsLength=CM.Disp.Line truncated
|
||||||
+3
-6
@@ -1,10 +1,9 @@
|
|||||||
|
/* eslint-disable no-redeclare */
|
||||||
|
/* eslint-disable no-unused-vars */
|
||||||
/**********
|
/**********
|
||||||
* Header *
|
* Header *
|
||||||
**********/
|
**********/
|
||||||
|
|
||||||
/**
|
|
||||||
* This functions creates the necessary objects and is run when they do not already exist
|
|
||||||
*/
|
|
||||||
const CM = {
|
const CM = {
|
||||||
Backup: {},
|
Backup: {},
|
||||||
Cache: {},
|
Cache: {},
|
||||||
@@ -16,6 +15,4 @@ const CM = {
|
|||||||
Main: {},
|
Main: {},
|
||||||
Options: {},
|
Options: {},
|
||||||
Sim: {},
|
Sim: {},
|
||||||
VersionMajor: '2.031',
|
};
|
||||||
VersionMinor: '3',
|
|
||||||
};
|
|
||||||
Reference in new issue
Block a user