Complete overhaul of code structure and relevant files (#639)

This commit is contained in:
Daniël van Noord authored and GitHub committed 2021-03-14 00:41:14 +01:00
1 parent bb34bce9a5
commit 1bffb58782
163 files changed
+7369 -10882

No files matched your search

-1
View File
@@ -1 +0,0 @@
(()=>{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 e(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();const e=Game.HowManyCookiesReset(Math.floor(Game.HowMuchPrestige(Game.cookiesReset+Game.cookiesEarned))+1)-(Game.cookiesEarned+Game.cookiesReset);CM.Cache.TimeTillNextPrestige=CM.Disp.FormatTime(e/CM.Disp.GetCPS())};class e{constructor(e){this.maxLength=e,this.queue=[]}addLatest(e){this.queue.push(e)>this.maxLength&&this.queue.shift()}calcAverage(e){e>this.maxLength&&(e=this.maxLength),e>this.queue.length&&(e=this.queue.length);let a=0;for(let C=this.queue.length-1;C>=0&&C>this.queue.length-1-e;C--)a+=this.queue[C];return 0===a?0:a/e}}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 e=0;e<Game.wrinklers.length;e++){let a=Game.wrinklers[e].sucked,C=1.1;if(Game.Has("Sacrilegious corruption")&&(C*=1.05),1===Game.wrinklers[e].type&&(C*=3),a*=C,Game.Has("Wrinklerspawn")&&(a*=1.05),CM.Sim.Objects.Temple.minigameLoaded){const e=Game.hasGod("scorn");1===e?a*=1.15:2===e?a*=1.1:3===e&&(a*=1.05)}CM.Cache.WrinklersTotal+=a,0===Game.wrinklers[e].type&&(CM.Cache.WrinklersNormal+=a,a>CM.Cache.WrinklersFattest[0]&&(CM.Cache.WrinklersFattest=[a,e]))}},CM.Cache.CacheStats=function(){CM.Cache.Lucky=900*CM.Cache.NoGoldSwitchCookiesPS/.15,CM.Cache.Lucky*=CM.Cache.DragonsFortuneMultAdjustment;const e=CM.Cache.getCPSBuffMult();e>0?CM.Cache.Lucky/=e:CM.Cache.Lucky=0,CM.Cache.LuckyReward=CM.Cache.GoldenCookiesMult*(.15*CM.Cache.Lucky)+13,CM.Cache.LuckyWrathReward=CM.Cache.WrathCookiesMult*(.15*CM.Cache.Lucky)+13,CM.Cache.LuckyFrenzy=7*CM.Cache.Lucky,CM.Cache.LuckyRewardFrenzy=CM.Cache.GoldenCookiesMult*(.15*CM.Cache.LuckyFrenzy)+13,CM.Cache.LuckyWrathRewardFrenzy=CM.Cache.WrathCookiesMult*(.15*CM.Cache.LuckyFrenzy)+13,CM.Cache.Conjure=2*CM.Cache.Lucky,CM.Cache.ConjureReward=.15*CM.Cache.Conjure,CM.Cache.Edifice=0;let a=0,C=0;for(const e of Object.keys(Game.Objects))Game.Objects[e].amount>a&&(a=Game.Objects[e].amount),Game.Objects[e].amount>0&&C++;for(const e of Object.keys(Game.Objects))(Game.Objects[e].amount<a||1===C)&&Game.Objects[e].amount<400&&2*Game.Objects[e].price>CM.Cache.Edifice&&(CM.Cache.Edifice=2*Game.Objects[e].price,CM.Cache.EdificeBuilding=e)},CM.Cache.CacheGoldenAndWrathCookiesMults=function(){if(CM.Footer.isInitzializing)CM.Cache.GoldenCookiesMult=1,CM.Cache.WrathCookiesMult=1,CM.Cache.DragonsFortuneMultAdjustment=1;else{let e=1,a=1,C=1;CM.Sim.Has("Green yeast digestives")&&(C*=1.01),CM.Sim.Has("Dragon fang")&&(C*=1.03),e*=1+.1*Game.auraMult("Ancestral Metamorphosis"),e*=Game.eff("goldenCookieGain"),a*=1+.1*Game.auraMult("Unholy Dominion"),a*=Game.eff("wrathCookieGain"),CM.Cache.GoldenCookiesMult=C*e,CM.Cache.WrathCookiesMult=C*a,CM.Cache.DragonsFortuneMultAdjustment=1,0===Game.shimmerTypes.golden.n&&(CM.Cache.DragonsFortuneMultAdjustment*=1+1.23*Game.auraMult("Dragon's Fortune"))}},CM.Cache.MaxChainCookieReward=function(e,a,C){let c=0,o=0,i=0,s=0,t=1+Math.max(0,Math.ceil(Math.log(Game.cookies)/Math.LN10)-10);for(;i<a;)o=Math.max(e,Math.min(Math.floor(1/9*10**t*e*C),a*C)),i=Math.max(e,Math.min(Math.floor(1/9*10**(t+1)*e*C),a*C)),s=Math.floor(1/9*10**(t+1)*e*C),c+=o,t++;return[c,o,s]},CM.Cache.CacheChain=function(){let e=60*CM.Cache.NoGoldSwitchCookiesPS*60*6*CM.Cache.DragonsFortuneMultAdjustment;const a=CM.Cache.getCPSBuffMult();a>0?e/=a:e=0,CM.Cache.ChainMaxReward=CM.Cache.MaxChainCookieReward(7,e,CM.Cache.GoldenCookiesMult),CM.Cache.ChainRequired=2*CM.Cache.ChainMaxReward[1]/CM.Cache.GoldenCookiesMult,CM.Cache.ChainRequiredNext=CM.Cache.ChainMaxReward[2]/60/60/6/CM.Cache.DragonsFortuneMultAdjustment,CM.Cache.ChainMaxWrathReward=CM.Cache.MaxChainCookieReward(6,e,CM.Cache.WrathCookiesMult),CM.Cache.ChainWrathRequired=2*CM.Cache.ChainMaxWrathReward[1]/CM.Cache.WrathCookiesMult,CM.Cache.ChainWrathRequiredNext=CM.Cache.ChainMaxWrathReward[2]/60/60/6/CM.Cache.DragonsFortuneMultAdjustment,CM.Cache.ChainFrenzyMaxReward=CM.Cache.MaxChainCookieReward(7,7*e,CM.Cache.GoldenCookiesMult),CM.Cache.ChainFrenzyRequired=2*CM.Cache.ChainFrenzyMaxReward[1]/CM.Cache.GoldenCookiesMult,CM.Cache.ChainFrenzyRequiredNext=CM.Cache.ChainFrenzyMaxReward[2]/60/60/6/CM.Cache.DragonsFortuneMultAdjustment,CM.Cache.ChainFrenzyMaxWrathReward=CM.Cache.MaxChainCookieReward(6,7*e,CM.Cache.WrathCookiesMult),CM.Cache.ChainFrenzyWrathRequired=2*CM.Cache.ChainFrenzyMaxWrathReward[1]/CMLine truncated
-1
View File
@@ -1 +0,0 @@
CM.Config.SaveConfig=function(){const o=b64_to_utf8(unescape(localStorage.getItem("CookieClickerGame")).split("!END!")[0]),i=o.match(/CookieMonster.*(;|$)/);if(null!==i){const n=o.replace(i[0],`CookieMonster:${CM.save()}`);localStorage.setItem("CookieClickerGame",escape(`${utf8_to_b64(n)}!END!`))}},CM.Config.LoadConfig=function(o){if(void 0!==localStorage.CMConfig&&delete localStorage.CMConfig,void 0!==o){CM.Options=o;let i=!1;for(const o in CM.Data.ConfigDefault)if(void 0===CM.Options[o])i=!0,CM.Options[o]=CM.Data.ConfigDefault[o];else if("Header"!==o&&"Colors"!==o)-1===o.indexOf("SoundURL")?CM.Options[o]>-1&&CM.Options[o]<CM.Data.Config[o].label.length||(i=!0,CM.Options[o]=CM.Data.ConfigDefault[o]):"string"!=typeof CM.Options[o]&&(i=!0,CM.Options[o]=CM.Data.ConfigDefault[o]);else if("Header"===o)for(const n in CM.Data.ConfigDefault.Header)void 0!==CM.Options[o][n]&&CM.Options[o][n]>-1&&CM.Options[o][n]<2||(i=!0,CM.Options[o][n]=CM.Data.ConfigDefault[o][n]);else for(const n in CM.Data.ConfigDefault.Colors)void 0!==CM.Options[o][n]&&"string"==typeof CM.Options[o][n]||(i=!0,CM.Options[o][n]=CM.Data.ConfigDefault[o][n]);i&&CM.Config.SaveConfig(),CM.Main.Loop();for(const o in CM.Data.ConfigDefault)"Header"!==o&&void 0!==CM.Data.Config[o].func&&CM.Data.Config[o].func()}else CM.Config.RestoreDefault()},CM.Config.RestoreDefault=function(){CM.Config.LoadConfig(CM.Data.ConfigDefault),CM.Config.SaveConfig(),Game.UpdateMenu()},CM.Config.ToggleConfig=function(o){CM.Options[o]++,CM.Options[o]===CM.Data.Config[o].label.length?(CM.Options[o]=0,CM.Data.Config[o].toggle&&(l(CM.Config.ConfigPrefix+o).className="option off")):l(CM.Config.ConfigPrefix+o).className="option",void 0!==CM.Data.Config[o].func&&CM.Data.Config[o].func(),l(CM.Config.ConfigPrefix+o).innerHTML=CM.Data.Config[o].label[CM.Options[o]],CM.Config.SaveConfig()},CM.Config.ToggleConfigVolume=function(o){null!==l(`slider${o}`)&&(l(`slider${o}right`).innerHTML=`${l(`slider${o}`).value}%`,CM.Options[o]=Math.round(l(`slider${o}`).value)),CM.Config.SaveConfig()},CM.Config.ToggleHeader=function(o){CM.Options.Header[o]++,CM.Options.Header[o]>1&&(CM.Options.Header[o]=0),CM.Config.SaveConfig()},CM.Config.CheckNotificationPermissions=function(o){if(1===o){const o=function(){try{Notification.requestPermission().then()}catch(o){return!1}return!0};"Notification"in window?o()?Notification.requestPermission().then():Notification.requestPermission():console.log("This browser does not support notifications.")}},CM.Config.ConfigPrefix="CMConfig";
+3
View File
@@ -0,0 +1,3 @@
/*! For license information please see CookieMonster.js.LICENSE.txt */
(()=>{var e={877:function(e){!function(t,o){"use strict";"object"!=typeof e.exports?o(t):e.exports=t.document?o(t):function(e){if(!e.document)throw new Error("jscolor needs a window with document");return o(e)}}("undefined"!=typeof window?window:this,(function(e){"use strict";var t,o,n,i,a=((i={initialized:!1,instances:[],readyQueue:[],register:function(){void 0!==e&&e.document&&e.document.addEventListener("DOMContentLoaded",i.pub.init,!1)},installBySelector:function(t,o){if(!(o=o?i.node(o):e.document))throw new Error("Missing root node");for(var n=o.querySelectorAll(t),a=new RegExp("(^|\\s)("+i.pub.lookupClass+")(\\s*(\\{[^}]*\\})|\\s|$)","i"),r=0;r<n.length;r+=1){var l,s;if(!(n[r].jscolor&&n[r].jscolor instanceof i.pub)&&(void 0===n[r].type||"color"!=n[r].type.toLowerCase()||!i.isColorAttrSupported)&&(null!==(l=i.getDataAttr(n[r],"jscolor"))||n[r].className&&(s=n[r].className.match(a)))){var c=n[r],d="";null!==l?d=l:s&&(console.warn('Installation using class name is DEPRECATED. Use data-jscolor="" attribute instead.'+i.docsRef),s[4]&&(d=s[4]));var p=null;if(d.trim())try{p=i.parseOptionsStr(d)}catch(e){console.warn(e+"\n"+d)}try{new i.pub(c,p)}catch(e){console.warn(e)}}}},parseOptionsStr:function(e){var t=null;try{t=JSON.parse(e)}catch(o){if(!i.pub.looseJSON)throw new Error("Could not parse jscolor options as JSON: "+o);try{t=new Function("var opts = ("+e+'); return typeof opts === "object" ? opts : {};')()}catch(e){throw new Error("Could not evaluate jscolor options: "+e)}}return t},getInstances:function(){for(var e=[],t=0;t<i.instances.length;t+=1)i.instances[t]&&i.instances[t].targetElement&&e.push(i.instances[t]);return e},createEl:function(t){var o=e.document.createElement(t);return i.setData(o,"gui",!0),o},node:function(t){if(!t)return null;if("string"==typeof t){var o=t,n=null;try{n=e.document.querySelector(o)}catch(e){return console.warn(e),null}return n||console.warn("No element matches the selector: %s",o),n}return i.isNode(t)?t:(console.warn("Invalid node of type %s: %s",typeof t,t),null)},isNode:function(e){return"object"==typeof Node?e instanceof Node:e&&"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},nodeName:function(e){return!(!e||!e.nodeName)&&e.nodeName.toLowerCase()},removeChildren:function(e){for(;e.firstChild;)e.removeChild(e.firstChild)},isTextInput:function(e){return e&&"input"===i.nodeName(e)&&"text"===e.type.toLowerCase()},isButton:function(e){if(!e)return!1;var t=i.nodeName(e);return"button"===t||"input"===t&&["button","submit","reset"].indexOf(e.type.toLowerCase())>-1},isButtonEmpty:function(e){switch(i.nodeName(e)){case"input":return!e.value||""===e.value.trim();case"button":return""===e.textContent.trim()}return null},isPassiveEventSupported:function(){var t=!1;try{var o=Object.defineProperty({},"passive",{get:function(){t=!0}});e.addEventListener("testPassive",null,o),e.removeEventListener("testPassive",null,o)}catch(e){}return t}(),isColorAttrSupported:(n=e.document.createElement("input"),!(!n.setAttribute||(n.setAttribute("type","color"),"color"!=n.type.toLowerCase()))),dataProp:"_data_jscolor",setData:function(){var e=arguments[0];if(3===arguments.length){var t=e.hasOwnProperty(i.dataProp)?e[i.dataProp]:e[i.dataProp]={},o=arguments[2];return t[a=arguments[1]]=o,!0}if(2===arguments.length&&"object"==typeof arguments[1]){t=e.hasOwnProperty(i.dataProp)?e[i.dataProp]:e[i.dataProp]={};var n=arguments[1];for(var a in n)n.hasOwnProperty(a)&&(t[a]=n[a]);return!0}throw new Error("Invalid arguments")},removeData:function(){var e=arguments[0];if(!e.hasOwnProperty(i.dataProp))return!0;for(var t=1;t<arguments.length;t+=1){var o=arguments[t];delete e[i.dataProp][o]}return!0},getData:function(e,t,o){if(!e.hasOwnProperty(i.dataProp)){if(void 0===o)return;e[i.dataProp]={}}var n=e[i.dataProp];return n.hasOwnProperty(t)||void 0===o||(n[t]=o),n[t]},getDataAttr:function(e,t){var o="data-"+t;return e.getAttribute(o)},setDataAttr:function(e,t,o){var n="data-"+t;e.setAttribute(n,o)},_attachedGroupEvents:{},attachGroupEvent:function(e,t,o,n){i._attachedGroupEvents.hasOwnProperty(e)||(i._attachedGroupEvents[e]=[]),i._attachedGroupEvents[e].push([t,o,n]),t.addEventListener(o,n,!1)},detachGroupEvents:function(e){if(i._attachedGroupEvents.hasOwnProperty(e)){for(var t=0;t<i._attachedGroupEvents[e].length;t+=1){var o=i._attachedGroupEvents[e][t];o[0].removeEventListener(o[1],o[2],!1)}delete i._attachedGroupEvents[e]}},preventDefault:function(e){e.preventDefault&&e.preventDefault(),e.returnValue=!1},captureTarget:function(e){e.setCapture&&(i._capturedTarget=e,i._capturedTarget.setCapture())},releaseTarget:function(){i._capturedTarget&&(i._capturedTarget.releaseCapture(),i._capturedTarget=null)},triggerEvent:function(t,o,n,a){if(t){var r=null;return"function"==typeof Event?r=new Event(o,{bubbles:n,cancelable:a}):(r=e.document.createEvent("Event")).initEvent(o,n,a),!!r&&(i.setData(r,"internal",!0),t.dispatchEvent(r),!0)}},triggerInputEvent:function(e,t,o,n){e&&i.isTextInput(e)Line truncated
//# sourceMappingURL=CookieMonster.js.map
+10
View File
@@ -0,0 +1,10 @@
/**
* jscolor - JavaScript Color Picker
*
* @link http://jscolor.com
* @license For open source use: GPLv3
* For commercial use: JSColor Commercial License
* @author Jan Odvarko - East Desire
*
* See usage examples at http://jscolor.com/examples/
*/
+1
View File
@@ -0,0 +1 @@
{"version":3,"sources":["webpack://cookiemonster-mod/CookieMonster.js"],"names":["__webpack_modules__","877","module","global","factory","exports","document","win","Error","window","this","BoxShadow","funcName","elm","jsc","jscolor","initialized","instances","readyQueue","register","addEventListener","pub","init","installBySelector","selector","rootNode","node","elms","querySelectorAll","matchClass","RegExp","lookupClass","i","length","dataOpts","m","undefined","type","toLowerCase","isColorAttrSupported","getDataAttr","className","match","targetElm","optsStr","console","warn","docsRef","opts","trim","parseOptionsStr","e","str","JSON","parse","eParse","looseJSON","Function","eEval","getInstances","inst","targetElement","push","createEl","tagName","el","createElement","setData","nodeOrSelector","sel","querySelector","isNode","val","Node","nodeType","nodeName","removeChildren","firstChild","removeChild","isTextInput","isButton","n","indexOf","isButtonEmpty","value","textContent","isPassiveEventSupported","supported","Object","defineProperty","get","removeEventListener","setAttribute","dataProp","obj","arguments","data","hasOwnProperty","prop","map","removeData","getData","setDefault","name","attrName","getAttribute","setDataAttr","_attachedGroupEvents","attachGroupEvent","groupName","evnt","func","detachGroupEvents","evt","preventDefault","returnValue","captureTarget","target","setCapture","_capturedTarget","releaseTarget","releaseCapture","triggerEvent","eventName","bubbles","cancelable","ev","Event","createEvent","initEvent","dispatchEvent","triggerInputEvent","eventKey","keys","9","13","27","code","keyCode","strList","replace","split","hasClass","classList","contains","addClass","classNames","add","removeClass","repl","remove","getCompStyle","getComputedStyle","currentStyle","setStyle","styles","important","reversible","priority","origStyle","setVal","style","setProperty","hexColor","r","g","b","Math","round","toString","substr","toUpperCase","hexaColor","a","rgbColor","rgbaColor","linearGradient","stdName","prefixes","helper","tryFunc","tryVal","background","getFuncName","Array","prototype","join","call","setBorderRadius","border-radius","setBoxShadow","box-shadow","getElementPos","relativeToViewport","x","y","rect","getBoundingClientRect","left","top","viewPos","getViewPos","getElementSize","offsetWidth","offsetHeight","getAbsPointerPos","changedTouches","clientX","clientY","getRelPointerPos","targetRect","srcElement","doc","documentElement","pageXOffset","scrollLeft","clientLeft","pageYOffset","scrollTop","clientTop","getViewSize","innerWidth","clientWidth","innerHeight","clientHeight","RGB_HSV","min","v","max","h","HSV_RGB","s","u","floor","parseColorString","ret","rgba","format","parseInt","charAt","mR","mG","mB","mA","par","re","parseFloat","parsePaletteValue","mixed","vals","isArray","colors","color","containsTranparentColor","isAlphaFormat","scaleCanvasForHighDPR","canvas","dpr","devicePixelRatio","width","height","getContext","scale","genColorPreviewCanvas","separatorPos","specWidth","scaleForHighDPR","sepW","previewSeparator","sqSize","chessboardSize","sqColor1","chessboardColor1","sqColor2","chessboardColor2","cWidth","cHeight","ctx","fillStyle","fillRect","start","clearRect","lineWidth","beginPath","strokeStyle","moveTo","lineTo","stroke","genColorPreviewGradient","position","params","right","apply","redrawPosition","picker","owner","tp","vp","thisObj","fixed","c","ts","vs","pd","getPickerDims","ps","borderW","borderH","l","smartPosition","pp","positionValue","contractShadow","_drawPosition","vShadow","shadowBlur","wrap","boxS","shadow","shadowColor","w","controlBorderWidth","sliderSpace","getControlPadding","sliderSize","getSliderChannel","hasAlphaChannel","pal","getPaletteDims","padding","closeButton","buttonHeight","pW","pH","contentW","contentH","paddedW","paddedH","borderWidth","palette","cols","rows","cellW","cellH","sampleCount","_palette","paletteCols","ceil","paletteSpacing","paletteHeight","pointerBorderWidth","pointerThickness","getPadYChannel","mode","triggerCallback","callback","error","triggerGlobal","eventNames","trigger","_pointerMoveEvent","mouse","touch","_pointerEndEvent","_pointerOrigin","onDocumentKeyUp","tryHide","onWindowResize","onWindowScroll","onParentScroll","onDocumentMouseDown","showOnClick","disabled","show","onControlPointerStart","onPickerTouchStart","controlName","pointerType","registerDragEvents","offset","onDocumentPointerMove","onDocumentPointerEnd","parent","frameElement","ofs","abs","rel","channels","fromHSVA","setPad","setSld","setASld","onPaletteSampleClick","currentTarget","_setFormat","getFormat","paletteSetsAlpha","_paletteHasTransparency","fromRGBA","hideOnPaletteClick","hide","ofsX","ofsY","pointerAbs","xVal","yVal","fmt","createPadCanvas","draw","hGrad","createLinearGradient","addColorStop","vGrad","createSliderGradient","color1","color2","grad","createASliderGradient","hShadow","blur","spread","inset","flags","leaveValue","leaveAlpha","leavePreviewLine truncated
-1
View File
@@ -1 +0,0 @@
(()=>{"use strict";CM.Data={Fortunes:["Fortune #001","Fortune #002","Fortune #003","Fortune #004","Fortune #005","Fortune #006","Fortune #007","Fortune #008","Fortune #009","Fortune #010","Fortune #011","Fortune #012","Fortune #013","Fortune #014","Fortune #015","Fortune #016","Fortune #017","Fortune #018","Fortune #100","Fortune #101","Fortune #102","Fortune #103","Fortune #104"],HalloCookies:["Skull cookies","Ghost cookies","Bat cookies","Slime cookies","Pumpkin cookies","Eyeball cookies","Spider cookies"],ChristCookies:["Christmas tree biscuits","Snowflake biscuits","Snowman biscuits","Holly biscuits","Candy cane biscuits","Bell biscuits","Present biscuits"],ValCookies:["Pure heart biscuits","Ardent heart biscuits","Sour heart biscuits","Weeping heart biscuits","Golden heart biscuits","Eternal heart biscuits","Prism heart biscuits"],PlantDrops:["Elderwort biscuits","Bakeberry cookies","Duketater cookies","Green yeast digestives","Wheat slims","Fern tea","Ichor syrup"],Effects:{buildingCost:"Building prices",click:"Cookies per click",cps:"Total CPS",cursorCps:"Cursor CPS",goldenCookieDur:"Golden cookie duration",goldenCookieEffDur:"Golden cookie effect duration",goldenCookieFreq:"Golden cookie frequency",goldenCookieGain:"Golden cookie gains",grandmaCps:"Grandma CPS",itemDrops:"Random item drop chance",milk:"Effect from milk",reindeerDur:"Reindeer duration",reindeerFreq:"Reindeer frequency",reindeerGain:"Reindeer gains",upgradeCost:"Upgrade prices",wrathCookieDur:"Wrath cookie duration",wrathCookieEffDur:"Wrath cookie effect duration",wrathCookieFreq:"Wrath cookie frequency",wrathCookieGain:"Wrath cookie gains",wrinklerEat:"Wrinkler ",wrinklerSpawn:"Wrinkler spawn frequency"},ModDescription:'<div class="listing">\n <a href="https://github.com/Aktanusa/CookieMonster" target="blank">Cookie Monster</a>\n offers a wide range of tools and statistics to enhance your game experience.\n It is not a cheat interface – although it does offer helpers for golden cookies and such, everything can be toggled off at will to only leave how much information you want.</br>\n Progess on new updates and all previous release notes can be found on the GitHub page linked above!</br>\n Please also report any bugs you may find over there!</br>\n </div>\n ',LatestReleaseNotes:'<div class="listing">\n <b>The latest update (v 2.031.4) has introduced the following features:</b></br>\n - Added a changelog to the info tab and notification indicating a new version</br>\n - Warnings in tooltips are now based on the income after buying the upgrade</br>\n - A new warning and stat for Conjure Baked Goods in combination with Frenzy has been added</br>\n - User can now set a custom tooltip warning ("x times cps") in the settings</br>\n - Garden plots with plants that give cookies on harvest now display a tooltip with current and maximum reward</br>\n - The Harvest All button in the Garden now has a tooltip displaying the current reward </br>\n - The Ascend button can now display additional info (this can be turned off in the settings) </br>\n - The statistics page now displays the Heavenly Chips per second</br>\n - The statistics page now displays the CPS needed for the next level in Chain Cookies</br>\n - The statistics page now displays the cookies needed for optimal rewards for garden plants</br>\n - You can now set a Heavenly Chips target in the settings which will be counted down to in the statistics page</br>\n - The color picker in the settings has been updated to its latest version</br>\n - The overlay of seconds/percentage of timers is now toggle able and more readable</br>\n - You can now toggle to disable bulk-buying from buying less than the selected amount (i.e., buying 7 of a building by pressing the buy 10 when you don\'t have enough for 10)</br>\n - CookieMonster now uses the Modding API provided by the base game</br>\n - There is a new option that allows the decoupling of the base game volume setting and the volumes of sounds created by the mod</br>\n - The tab title now displays a "!" if a Golden Cookie or Reindeer can spawn</br>\n - PP calculation can now be set to: 1) Exclude the 1st, 2nd or 3rd most optimal building (if you never want to buy that it), 2) Always consider optimal buildings that cost below "xx seconds of CPS" (toggleable in the settings), 3) Ignore any building or upgrade that is not purchasable at the moment</br>\n </br>\n <b>This update fixes the following bugs:</b></br>\n - Minigames with enhanced tooltips will now also show these if the minigames were not loaded when CookieMonster was loaded</br>\n - Sound, Flashes and Notifications will no longer play when the mod is initializing</br>\n - The color picker should now update its display consistently</br>\n - Fixed some typo\'s</br>\n - Fixed a game breaking bug when the player had not purchased any upgrades</br>\n - Fixed a number of console errors thrown by CM</br>\n - Fixed the integration with mods that provide additional content, they should now no lLine truncated
-1
View File
@@ -1 +0,0 @@
(()=>{"use strict";const e={FormatTime:function(e,t){if(e===1/0)return e;e=Math.ceil(e);const i=Math.floor(e/31557600),o=Math.floor(e%31557600/86400),a=Math.floor(e%86400/3600),n=Math.floor(e%3600/60),s=Math.floor(e%60);let r="";if(CM.Options.TimeFormat){if(e>315576e4)return"XX:XX:XX:XX:XX";r+=(i<10?"0":"")+i+":",r+=(o<10?"0":"")+o+":",r+=(a<10?"0":"")+a+":",r+=(n<10?"0":"")+n+":",r+=(s<10?"0":"")+s}else{if(e>7776e5)return t?"Over 9000 days!":">9000d";r+=i>0?i+(t?1===i?" year":" years":"y")+", ":"",r+=o>0?o+(t?1===o?" day":" days":"d")+", ":"",(r.length>0||a>0)&&(r+=a+(t?1===a?" hour":" hours":"h")+", "),(r.length>0||n>0)&&(r+=n+(t?1===n?" minute":" minutes":"m")+", "),r+=s+(t?1===s?" second":" seconds":"s")}return r}};CM.Disp=e,CM.Disp.GetWrinkConfigBank=function(){return 1===CM.Options.CalcWrink?CM.Cache.WrinklersTotal:2===CM.Options.CalcWrink?CM.Cache.WrinklersFattest[0]:0},CM.Disp.PopAllNormalWrinklers=function(){for(const e of Object.keys(Game.wrinklers))Game.wrinklers[e].sucked>0&&0===Game.wrinklers[e].type&&(Game.wrinklers[e].hp=0)},CM.Disp.GetCPS=function(){return CM.Options.CPSMode?CM.Cache.AvgCPS:0===CM.Options.CalcWrink?Game.cookiesPs*(1-Game.cpsSucked):1===CM.Options.CalcWrink?Game.cookiesPs*(CM.Cache.CurrWrinklerCPSMult+(1-.05*CM.Cache.CurrWrinklerCount)):2===CM.Options.CalcWrink&&1===Game.wrinklers[CM.Cache.WrinklersFattest[1]].type?Game.cookiesPs*(3*CM.Cache.CurrWrinklerCPSMult/CM.Cache.CurrWrinklerCount+(1-.05*CM.Cache.CurrWrinklerCount)):Game.cookiesPs*(CM.Cache.CurrWrinklerCPSMult/CM.Cache.CurrWrinklerCount+(1-.05*CM.Cache.CurrWrinklerCount))},CM.Disp.CalculateGrimoireRefillTime=function(e,t,i){let o=0;for(;e<i;)e+=.002*Math.max(.002,(e/Math.max(t,100))**.5),o++;return o/Game.fps},CM.Disp.GetLumpColor=function(e){return 0===e?{text:"Normal",color:CM.Disp.colorGray}:1===e?{text:"Bifurcated",color:CM.Disp.colorGreen}:2===e?{text:"Golden",color:CM.Disp.colorYellow}:3===e?{text:"Meaty",color:CM.Disp.colorOrange}:4===e?{text:"Caramelized",color:CM.Disp.colorPurple}:{text:"Unknown Sugar Lump",color:CM.Disp.colorRed}},CM.Disp.GetTimeColor=function(e){let t,i;return e<0?(i=CM.Options.TimeFormat?"00:00:00:00:00":"Done!",t=CM.Disp.colorGreen):(i=CM.Disp.FormatTime(e),t=e>300?CM.Disp.colorRed:e>60?CM.Disp.colorOrange:CM.Disp.colorYellow),{text:i,color:t}},CM.Disp.Beautify=function(e,t,i){const o=CM.Options.ScaleDecimals+1;if(e===1/0)return"Infinity";if(void 0===e)return"0";if(0===CM.Options.Scale)return CM.Backup.Beautify(e,t);if(Number.isFinite(e)){let a="";if(0===e)return e.toString();if(e>.001&&e<CM.Options.ScaleCutoff){a=e.toFixed(2),CM.Options.ScaleSeparator&&(a=a.toLocaleString("nl"));for(let e=0;e<3;e++)"0"!==a[a.length-1]&&"."!==a[a.length-1]||(a=a.slice(0,-1));return a}if(4===CM.Options.Scale&&!i||4===i)a=e.toExponential(o).toString().replace("e","E");else{const t=e.toExponential().toString(),n=Math.floor(t.slice(t.indexOf("e")+1)/3);a=(e/Number("1e"+3*n)).toFixed(o),1===CM.Options.Scale&&!i||1===i?e>=.01&&e<Number("1e"+3*CM.Data.metric.length)?a+=` ${CM.Data.metric[n]}`:a=CM.Disp.Beautify(e,0,4):2===CM.Options.Scale&&!i||2===i?e>=.01&&e<Number("1e"+3*CM.Data.shortScale.length)?a+=` ${CM.Data.shortScale[n]}`:a=CM.Disp.Beautify(e,0,4):3===CM.Options.Scale&&!i||3===i?e>=.01&&e<Number("1e"+3*CM.Data.shortScaleAbbreviated.length)?a+=` ${CM.Data.shortScaleAbbreviated[n]}`:a=CM.Disp.Beautify(e,0,4):(5===CM.Options.Scale&&!i||5===i)&&(a+="E"+3*n)}return""===a&&(console.log(`Could not beautify number with CM.Disp.Beautify: ${e}`),a=CM.Backup.Beautify(e,t)),CM.Options.ScaleSeparator&&(a=a.replace(".",",")),a}return console.log(`Could not beautify number with CM.Disp.Beautify: ${e}`),CM.Backup.Beautify(e,t)},CM.Disp.UpdateAscendState=function(){Game.OnAscend?(l("game").style.bottom="0px",1===CM.Options.BotBar&&(CM.Disp.BotBar.style.display="none"),1===CM.Options.TimerBar&&(CM.Disp.TimerBar.style.display="none")):(CM.Disp.ToggleBotBar(),CM.Disp.ToggleTimerBar()),CM.Disp.UpdateBackground()},CM.Disp.CreateCssArea=function(){CM.Disp.Css=document.createElement("style"),CM.Disp.Css.type="text/css",document.head.appendChild(CM.Disp.Css)},CM.Disp.UpdateBuildingUpgradeStyle=function(){l("products").style.display="grid",l("storeBulk").style.gridRow="1/1",l("upgrades").style.display="flex",l("upgrades").style["flex-wrap"]="wrap"},CM.Disp.UpdateBackground=function(){Game.Background.canvas.width=Game.Background.canvas.parentNode.offsetWidth,Game.Background.canvas.height=Game.Background.canvas.parentNode.offsetHeight,Game.LeftBackground.canvas.width=Game.LeftBackground.canvas.parentNode.offsetWidth,Game.LeftBackground.canvas.height=Game.LeftBackground.canvas.parentNode.offsetHeight},CM.Disp.Draw=function(){if(Game.prefs.autosave&&Game.drawT%10==0&&"stats"===Game.onMenu&&CM.Options.Stats){const e=document.getElementById("CMStatsAutosaveTimer");e&&(e.innerText=Game.sayTime(60*Game.fps-Game.T%(60*Game.fps),4))}CM.Disp.UpdateBuildings(),CM.Disp.UpdateUpgrades(),CM.Disp.UpdateTimerBar(),CM.Disp.UpdateBotBar(),CM.Disp.ULine truncated
-1
View File
@@ -1 +0,0 @@
(()=>{if(CM.init=function(){CM.Footer.isInitzializing=!0;let o=!0;Game.version!==Number(CM.VersionMajor)&&(o=confirm(`Cookie Monster version ${CM.VersionMajor}.${CM.VersionMinor} is meant for Game version ${CM.VersionMajor}. Loading a different version may cause errors. Do you still want to load Cookie Monster?`)),o&&(CM.Main.DelayInit(),Game.registerHook("draw",CM.Disp.Draw),Game.registerHook("logic",CM.Main.Loop),CM.Footer.isInitzializing=!1)},CM.save=function(){return JSON.stringify({settings:CM.Options,version:`${CM.VersionMajor}.${CM.VersionMinor}`})},CM.load=function(o){const e=JSON.parse(o);CM.Sim.InitData(),CM.Config.LoadConfig(e.settings),e.version!==`${CM.VersionMajor}.${CM.VersionMinor}`&&(Game.prefs.popups?Game.Popup("A new version of Cookie Monster has been loaded, check out the release notes in the info tab!"):Game.Notify("A new version of Cookie Monster has been loaded, check out the release notes in the info tab!","","",0,1))},CM.Footer.AddJscolor=function(){CM.Footer.Jscolor=document.createElement("script"),CM.Footer.Jscolor.type="text/javascript",CM.Footer.Jscolor.setAttribute("src","https://aktanusa.github.io/CookieMonster/jscolor/jscolor.js"),document.head.appendChild(CM.Footer.Jscolor)},void 0===CM.Footer.isInitzializing){CM.Footer.AddJscolor();const o=setInterval((function(){"undefined"!=typeof jscolor&&(jscolor.init(),Game.registerMod("CookieMonster",CM),clearInterval(o))}),500)}})();
-1
View File
@@ -1 +0,0 @@
CM={Backup:{},Cache:{},Config:{},Data:{Config:{}},Disp:{},Footer:{},Main:{},Options:{},Sim:{},VersionMajor:"2.031",VersionMinor:"5"};
-1
View File
@@ -1 +0,0 @@
(()=>{var __webpack_exports__={};CM.Main.Loop=function(){if(CM.Disp.lastAscendState!==Game.OnAscend&&(CM.Disp.lastAscendState=Game.OnAscend,CM.Disp.UpdateAscendState()),!Game.OnAscend&&0===Game.AscendTimer){CM.Main.LastModCount!==Object.keys(Game.mods).length&&(CM.Sim.CreateSimFunctions(),CM.Sim.InitData(),CM.Cache.InitCache(),CM.Main.LastModCount=Object.keys(Game.mods).length),CM.Sim.DoSims&&(CM.Cache.CacheIncome(),CM.Cache.NoGoldSwitchCPS(),CM.Cache.CacheGoldenAndWrathCookiesMults(),CM.Cache.CacheStats(),CM.Cache.CacheMissingUpgrades(),CM.Cache.CacheChain(),CM.Cache.CacheDragonCost(),CM.Cache.CacheSeaSpec(),CM.Cache.CacheSellForChoEgg(),CM.Sim.DoSims=0);const e=Game.auraMult("Fierce Hoarder")>0;!CM.Cache.HadBuildAura&&e?(CM.Cache.HadBuildAura=!0,CM.Cache.DoRemakeBuildPrices=1):CM.Cache.HadBuildAura&&!e&&(CM.Cache.HadBuildAura=!1,CM.Cache.DoRemakeBuildPrices=1),CM.Cache.DoRemakeBuildPrices&&(CM.Cache.CacheBuildingsPrices(),CM.Cache.DoRemakeBuildPrices=0),CM.Cache.LoopCache(),CM.Main.CheckGoldenCookie(),CM.Main.CheckTickerFortune(),CM.Main.CheckSeasonPopup(),CM.Main.CheckGardenTick(),CM.Main.CheckMagicMeter(),CM.Main.CheckWrinklerCount()}},CM.Main.DelayInit=function(){CM.Sim.CreateSimFunctions(),CM.Sim.InitData(),CM.Cache.InitCache(),CM.Main.LastModCount=Object.keys(Game.mods).length,CM.Disp.CreateCssArea(),CM.Disp.CreateBotBar(),CM.Disp.CreateTimerBar(),CM.Disp.CreateUpgradeBar(),CM.Disp.CreateWhiteScreen(),CM.Disp.CreateFavicon();for(const e of Object.keys(CM.Disp.TooltipText))CM.Disp.CreateSimpleTooltip(CM.Disp.TooltipText[e][0],CM.Disp.TooltipText[e][1],CM.Disp.TooltipText[e][2]);CM.Disp.CreateWrinklerButtons(),CM.Disp.UpdateBuildingUpgradeStyle(),CM.Main.ReplaceTooltips(),CM.Main.AddWrinklerAreaDetect(),CM.Main.ReplaceNative(),CM.Main.ReplaceNativeGrimoire(),Game.CalculateGains(),CM.Config.LoadConfig(),CM.Disp.lastAscendState=Game.OnAscend,Game.prefs.popups?Game.Popup(`Cookie Monster version ${CM.VersionMajor}.${CM.VersionMinor} loaded!`):Game.Notify(`Cookie Monster version ${CM.VersionMajor}.${CM.VersionMinor} loaded!`,"","",1,1),Game.Win("Third-party")},CM.Main.ReplaceNative=function(){CM.Backup.Beautify=Beautify,Beautify=CM.Disp.Beautify,CM.Backup.CalculateGains=Game.CalculateGains,eval(`CM.Backup.CalculateGainsMod = ${Game.CalculateGains.toString().split("ages');").join("ages');CM.Sim.DateAges = Date.now();").split("if (Game.Has('Century").join("CM.Sim.DateCentury = Date.now();if (Game.Has('Century")}`),Game.CalculateGains=function(){CM.Backup.CalculateGainsMod(),CM.Sim.DoSims=1},CM.Backup.tooltip={},CM.Backup.tooltip.draw=Game.tooltip.draw,eval(`CM.Backup.tooltip.drawMod = ${Game.tooltip.draw.toString().split("this").join("Game.tooltip")}`),Game.tooltip.draw=function(e,i,a){CM.Backup.tooltip.drawMod(e,i,a)},CM.Backup.tooltip.update=Game.tooltip.update,eval(`CM.Backup.tooltip.updateMod = ${Game.tooltip.update.toString().split("this.").join("Game.tooltip.")}`),Game.tooltip.update=function(){CM.Backup.tooltip.updateMod(),CM.Disp.UpdateTooltipLocation()},CM.Backup.UpdateWrinklers=Game.UpdateWrinklers,Game.UpdateWrinklers=function(){CM.Main.FixMouseY(CM.Backup.UpdateWrinklers)},CM.Backup.UpdateSpecial=Game.UpdateSpecial,Game.UpdateSpecial=function(){CM.Main.FixMouseY(CM.Backup.UpdateSpecial)},l("bigCookie").removeEventListener("click",Game.ClickCookie,!1),l("bigCookie").addEventListener("click",(function(){CM.Main.FixMouseY(Game.ClickCookie)}),!1),CM.Backup.RebuildUpgrades=Game.RebuildUpgrades,Game.RebuildUpgrades=function(){CM.Backup.RebuildUpgrades(),CM.Disp.ReplaceTooltipUpgrade(),Game.CalculateGains()},CM.Backup.ClickProduct=Game.ClickProduct,Game.ClickProduct=function(e){(!CM.Options.BulkBuyBlock||Game.ObjectsById[e].bulkPrice<Game.cookies||-1===Game.buyMode)&&CM.Backup.ClickProduct(e)},CM.Backup.DescribeDragonAura=Game.DescribeDragonAura,Game.DescribeDragonAura=function(e){CM.Backup.DescribeDragonAura(e),CM.Disp.AddAuraInfo(e)},CM.Backup.ToggleSpecialMenu=Game.ToggleSpecialMenu,Game.ToggleSpecialMenu=function(e){CM.Backup.ToggleSpecialMenu(e),CM.Disp.AddDragonLevelUpTooltip()},CM.Backup.UpdateMenu=Game.UpdateMenu,Game.UpdateMenu=function(){void 0!==jscolor.picker&&void 0!==jscolor.picker.owner||(CM.Backup.UpdateMenu(),CM.Disp.AddMenu())},CM.Backup.sayTime=Game.sayTime,CM.Disp.sayTime=function(e,i){return Number.isNaN(e)||e<=0?CM.Backup.sayTime(e,i):CM.Disp.FormatTime(e/Game.fps,1)},CM.Backup.Logic=Game.Logic,CM.Backup.LogicMod=new Function(`return ${Game.Logic.toString().split("document.title").join("CM.Disp.Title").split("' more cookies</b> for the next level.<br>';").join("` more cookies</b> for the next level.<br>${CM.Options.TooltipAscendButton ? `<div class='line'></div>It takes ${CM.Cache.TimeTillNextPrestige} to reach the next level and you are making ${Beautify(CM.Cache.HCPerSecond, 2)} chips on average in the last 5 seconds.<br>` : ``}`;")}`)(),Game.Logic=function(){CM.Backup.LogicMod(),CM.Disp.UpdateTitle()}},CM.Main.ReplaceNativeGrimoire=function(){CM.Main.ReplaceNativeGrimoireLaunch(Line truncated
Vendored
-1
View File
@@ -1 +0,0 @@
CM.Sim.BuildingGetPrice=function(e,i,a,n,m){let s=0;for(let t=0;t<m;t++){let m=i*Game.priceIncrease**Math.max(0,a-n);m=Game.modifyBuildingPrice(e,m),m=Math.ceil(m),s+=m,a++}return s},CM.Sim.modifyBuildingPrice=function(e,i){if(CM.Sim.Has("Season savings")&&(i*=.99),CM.Sim.Has("Santa's dominion")&&(i*=.99),CM.Sim.Has("Faberge egg")&&(i*=.99),CM.Sim.Has("Divine discount")&&(i*=.99),CM.Sim.Has("Fortune #100")&&(i*=.99),i*=1-.02*CM.Sim.auraMult("Fierce Hoarder"),Game.hasBuff("Everything must go")&&(i*=.95),Game.hasBuff("Crafty pixies")&&(i*=.98),Game.hasBuff("Nasty goblins")&&(i*=1.02),e.fortune&&CM.Sim.Has(e.fortune.name)&&(i*=.93),i*=CM.Sim.eff("buildingCost"),CM.Sim.Objects.Temple.minigameLoaded){const e=CM.Sim.hasGod("creation");1===e?i*=.93:2===e?i*=.95:3===e&&(i*=.98)}return i},CM.Sim.getSellMultiplier=function(){let e=.25;return e*=1+CM.Sim.auraMult("Earth Shatterer"),e},CM.Sim.BuildingSell=function(e,i,a,n,m,s){s=void 0===s?0:s;let t=0;-1===m&&(m=a),m||(m=Game.buyBulk);for(let o=0;o<m;o++){let m=i*Game.priceIncrease**Math.max(0,a-n);m=s?Game.modifyBuildingPrice(e,m):CM.Sim.modifyBuildingPrice(e,m),m=Math.ceil(m);const o=s?e.getSellMultiplier():CM.Sim.getSellMultiplier();m=Math.floor(m*o),a>0&&(t+=m,a--)}return t},CM.Sim.ReplaceFunction=function(e){return e.toString().split("Game.Upgrades[").join("CM.Sim.Upgrades[").split("Game.Achievements").join("CM.Sim.Achievements").split("Game.Has").join("CM.Sim.Has").split("Game.dragonAura]").join("CM.Sim.dragonAura]").split("Game.dragonAura2]").join("CM.Sim.dragonAura2]").split("Game.auraMult").join("CM.Sim.auraMult").split("Game.hasGod").join("CM.Sim.hasGod").split("Game.effs").join("CM.Sim.effs").split("Game.Objects").join("CM.Sim.Objects").split("Game.GetTieredCpsMult").join("CM.Sim.GetTieredCpsMult").split("Game.eff").join("CM.Sim.eff")},CM.Sim.CreateSimFunctions=function(){CM.Sim.Has=new Function(`return ${CM.Sim.ReplaceFunction(Game.Has)}`)(),CM.Sim.HasAchiev=new Function(`return ${CM.Sim.ReplaceFunction(Game.HasAchiev)}`)(),CM.Sim.hasAura=new Function(`return ${CM.Sim.ReplaceFunction(Game.hasAura)}`)(),CM.Sim.GetHeavenlyMultiplier=new Function(`return ${CM.Sim.ReplaceFunction(Game.GetHeavenlyMultiplier)}`)(),CM.Sim.auraMult=new Function(`return ${CM.Sim.ReplaceFunction(Game.auraMult)}`)(),CM.Sim.eff=new Function(`return ${CM.Sim.ReplaceFunction(Game.eff)}`)(),CM.Sim.GetTieredCpsMult=new Function(`return ${CM.Sim.ReplaceFunction(Game.GetTieredCpsMult)}`)()},CM.Sim.Win=function(e){CM.Sim.Achievements[e]&&0===CM.Sim.Achievements[e].won&&(CM.Sim.Achievements[e].won=1,"shadow"!==Game.Achievements[e].pool&&CM.Sim.AchievementsOwned++)},CM.Sim.hasGod=function(e){if(Game.hasGod){const i=CM.Sim.Objects.Temple.minigame.gods[e];for(let e=0;e<3;e++)if(CM.Sim.Objects.Temple.minigame.slot[e]===i.id)return e+1}return!1},CM.Sim.InitialBuildingData=function(e){const i=Game.Objects[e],a={};return a.cps=new Function(`return ${CM.Sim.ReplaceFunction(i.cps)}`)(),a.baseCps=i.baseCps,a.name=i.name,a.tieredUpgrades=i.tieredUpgrades,a.synergies=i.synergies,a.fortune=i.fortune,a.grandma=i.grandma,a.baseCPS=i.baseCps,a.id=i.id,a.vanilla=i.vanilla,a},CM.Sim.InitUpgrade=function(e){const i=Game.Upgrades[e],a={};return a.power=i.power,"function"==typeof i.power&&(i.power=new Function(`return ${CM.Sim.ReplaceFunction(i.power)}`)()),a.pool=i.pool,a.name=i.name,a},CM.Sim.InitAchievement=function(e){const i=Game.Achievements[e],a={};return a.name=i.name,a},CM.Sim.InitData=function(){CM.Sim.Objects=[];for(const e of Object.keys(Game.Objects))CM.Sim.Objects[e]=CM.Sim.InitialBuildingData(e);CM.Sim.Upgrades=[];for(const e of Object.keys(Game.Upgrades))CM.Sim.Upgrades[e]=CM.Sim.InitUpgrade(e);CM.Sim.Achievements=[];for(const e of Object.keys(Game.Achievements))CM.Sim.Achievements[e]=CM.Sim.InitAchievement(e);CM.Sim.CopyData()},CM.Sim.CopyData=function(){CM.Sim.UpgradesOwned=Game.UpgradesOwned,CM.Sim.pledges=Game.pledges,CM.Sim.AchievementsOwned=Game.AchievementsOwned,CM.Sim.heavenlyPower=Game.heavenlyPower,CM.Sim.prestige=Game.prestige;for(const e of Object.keys(Game.Objects)){const i=Game.Objects[e];let a=CM.Sim.Objects[e];void 0===a&&(CM.Sim.Objects[e]=CM.Sim.InitialBuildingData(e),a=CM.Sim.Objects[e],CM.Disp.CreateBotBarBuildingColumn(e)),a.amount=i.amount,a.level=i.level,a.totalCookies=i.totalCookies,a.basePrice=i.basePrice,a.free=i.free,i.minigameLoaded&&(a.minigameLoaded=i.minigameLoaded,a.minigame=i.minigame)}for(const e of Object.keys(Game.Upgrades)){const i=Game.Upgrades[e];let a=CM.Sim.Upgrades[e];void 0===a&&(CM.Sim.Upgrades[e]=CM.Sim.InitUpgrade(e),a=CM.Sim.Upgrades[e]),a.bought=i.bought}for(const e of Object.keys(Game.Achievements)){const i=Game.Achievements[e];let a=CM.Sim.Achievements[e];void 0===a&&(CM.Sim.Achievements[e]=CM.Sim.InitAchievement(e),a=CM.Sim.Achievements[e]),a.won=i.won}CM.Cache.CacheDragonAuras(),CM.Sim.dragonAura=CM.Cache.dragonAura,CM.Sim.dragonAura2=CM.Cache.dragonAura2},CM.Sim.CalculateGains=function(){CM.Sim.cookiesPs=0;let e=1;const i={};for(const e of ObjecLine truncated