diff --git a/8bitCookie.png b/8bitCookie.png new file mode 100644 index 0000000..ded552d Binary files /dev/null and b/8bitCookie.png differ diff --git a/PForPause.js b/PForPause.js index e79fc14..54cb6c2 100644 --- a/PForPause.js +++ b/PForPause.js @@ -1,31 +1,42 @@ //version 1.0 made p for pause, the funny mod for pausing the game //version 1.1 added a bit of functionality, such as to make it possible to set tick speed //version 1.2 fixed most problems and added UI to CCCEM, and made keybinds easy to rebind +//version 2.0 added time manipulation +//version 2.1 fixed various bugs and overlooked elements, integrated time slow to all minigames, big cookie clicks no longer act silly at high gamespeeds var gamePause=0 -var gardenStepDifference=Game.Objects.Farm.minigame.nextStep-Date.now() +var gardenStepDifference=Game.Objects.Farm.minigame?(Game.Objects.Farm.minigame.nextStep-Date.now()):0 var pantheonSwapDifference=0 var lumpTimeDifference=0 var gfdID=0 var gfdArr=[] var tpsLoop=0 var tpsSpeed=30 -var pForPause=[[80, "P"], [84, "T"], [82, "R"]] //keycodes for pause, step and reset, being p, t, r +var pForPause=[[80, "P"], [84, "T"], [82, "R"], [0, 'Never']] //keycodes for pause, step and reset, being p, t, r var newKeyBind=0 var changeKeyBind=0 +var gameSpeedMultTriggerKeybind=0; //never active +var timeFactorWhenEnabled=1; function HoldVars() { var time=Date.now(); - gardenStepDifference=Game.Objects.Farm.minigame.nextStep-time; - if (Game.Objects.Temple.minigame.swaps<3) {pantheonSwapDifference=time-Game.Objects.Temple.minigame.swapT} + if (Game.Objects.Farm.minigame) { gardenStepDifference=Game.Objects.Farm.minigame.nextStep-time; } + if (Game.Objects.Temple.minigame?.swaps<3 && Game.Objects.Temple.minigame) {pantheonSwapDifference=time-Game.Objects.Temple.minigame.swapT} lumpTimeDifference=time-Game.lumpT } -function PauseGame() {gamePause=!gamePause; HoldVars();} +function PauseGame() { + gamePause=!gamePause; + for (let anim of PForPause.allAnimations) { + if (gamePause) { anim.pause(); } + else { anim.play(); } + } + HoldVars(); +} function TickStep() { - gardenStepDifference-=1000/Game.fps; - pantheonSwapDifference+=1000/Game.fps; - Game.lumpTimeDifference+=1000/Game.fps; + gardenStepDifference-=1000/PForPause.fFps; + pantheonSwapDifference+=1000/PForPause.fFps; + Game.lumpTimeDifference+=1000/PForPause.fFps; Game.Logic(); HoldVars(); } @@ -39,6 +50,11 @@ function SetTPS(tps) { } } +function PForPBGetPrompt() { + Game.Prompt('

'+"Input to variable"+'

'+loc("Please paste what you want the variable to be equal to.")+'
',[[loc("Load"),';Game.ClosePrompt(); if (!Number.isNaN(parseFloat(l(\'textareaPrompt\').value))) { timeFactorWhenEnabled = Math.max(parseFloat(l(\'textareaPrompt\').value), 0); if (pForPause[3][0] == -1 || Game.keys[pForPause[3][0]]) { PForPause.changeGameSpeed(timeFactorWhenEnabled); } } UpdatePForPB(); RedrawCCCEM();'],loc("Nevermind")]); + l('textareaPrompt').focus(); +} + function TPSStep() { if (gamePause) {TickStep()}; tpsLoop=setTimeout(TPSStep,Math.round(1000/tpsSpeed)) @@ -50,59 +66,333 @@ function PForPauseButtons() { } function NewKeyBind(key, button) { + if (key == 27 && button == 3) { key = 0; } //esc + if (button == 3 && pForPause[button][0] == -1 && !Game.keys[key]) { PForPause.changeGameSpeed(1); } pForPause[button][0]=key; - pForPause[button][1]=String.fromCharCode((96 <= key && key <= 105) ? key-48 : key); + if (key > 0) { pForPause[button][1]=String.fromCharCode((96 <= key && key <= 105) ? key-48 : key); } + else { + pForPause[button][1]=(key==-1)?('Always'):((key==0)?('Never'):('???')); + } changeKeyBind=0 UpdatePForPB(); } - -Game.ObjectsById[7].minigame.spellsById[6].win=function(){ - var spells=[]; - var selfCost=Game.ObjectsById[7].minigame.getSpellCost(Game.ObjectsById[7].minigame.spells['gambler\'s fever dream']); - for (var i in Game.ObjectsById[7].minigame.spells) - {if (i!='gambler\'s fever dream' && (Game.ObjectsById[7].minigame.magic-selfCost)>=Game.ObjectsById[7].minigame.getSpellCost(Game.ObjectsById[7].minigame.spells[i])*0.5) spells.push(Game.ObjectsById[7].minigame.spells[i]);} - if (spells.length==0){Game.Popup('
'+loc("No eligible spells!")+'
',Game.mouseX,Game.mouseY);return -1;} - var spell=choose(spells); - var cost=Game.ObjectsById[7].minigame.getSpellCost(spell)*0.5; - gfdArr[gfdID]=[, 0] - gfdArr[gfdID][0]=setInterval(function(spell,cost,seed,gfdID){return function(){ - if (gfdArr[gfdID][1]>=1000) { - if (Game.seed!=seed) return false; - var out=Game.ObjectsById[7].minigame.castSpell(spell,{cost:cost,failChanceMax:0.5,passthrough:true}); - if (!out) - { - Game.ObjectsById[7].minigame.magic+=selfCost; - setTimeout(function(){ - Game.Popup('
'+loc("That's too bad!
Magic refunded.")+'
',Game.mouseX,Game.mouseY); - },1500); - } - clearInterval(gfdArr[gfdID][0]);} - }}(spell,cost,Game.seed,gfdID),1000/Game.fps); - gfdID++ - Game.Popup('
'+loc("Casting %1
for %2 magic...",[spell.name,Beautify(cost)])+'
',Game.mouseX,Game.mouseY); +function notifyKeyBind(additional) { + Game.Notify('Press a key to set!'+(additional?('
press esc to set as Never, and click button again to set as Always'):''), '', 0); +} +function changeGrimoire() { + Game.ObjectsById[7].minigame.spellsById[6].win=function(){ + var spells=[]; + var selfCost=Game.ObjectsById[7].minigame.getSpellCost(Game.ObjectsById[7].minigame.spells['gambler\'s fever dream']); + for (var i in Game.ObjectsById[7].minigame.spells) + {if (i!='gambler\'s fever dream' && (Game.ObjectsById[7].minigame.magic-selfCost)>=Game.ObjectsById[7].minigame.getSpellCost(Game.ObjectsById[7].minigame.spells[i])*0.5) spells.push(Game.ObjectsById[7].minigame.spells[i]);} + if (spells.length==0){Game.Popup('
'+loc("No eligible spells!")+'
',Game.mouseX,Game.mouseY);return -1;} + var spell=choose(spells); + var cost=Game.ObjectsById[7].minigame.getSpellCost(spell)*0.5; + gfdArr[gfdID]=[, 0] + gfdArr[gfdID][0]=setInterval(function(spell,cost,seed,gfdID){return function(){ + if (gfdArr[gfdID][1] < 1000) { return; } + if (Game.seed!=seed) return false; + var out=Game.ObjectsById[7].minigame.castSpell(spell,{cost:cost,failChanceMax:0.5,passthrough:true}); + if (!out) + { + Game.ObjectsById[7].minigame.magic+=selfCost; + setTimeout(function(){ + Game.Popup('
'+loc("That's too bad!
Magic refunded.")+'
',Game.mouseX,Game.mouseY); + },1500); + } + clearInterval(gfdArr[gfdID][0]); + }}(spell,cost,Game.seed,gfdID),1000/Game.fps); + gfdID++ + Game.Popup('
'+loc("Casting %1
for %2 magic...",[spell.name,Beautify(cost)])+'
',Game.mouseX,Game.mouseY); }; + const M = Game.ObjectsById[7].minigame; + eval('Game.ObjectsById[7].minigame.logic='+Game.ObjectsById[7].minigame.logic.toString().replace('+=M.magicPS', '+=M.magicPS*PForPause.timeFactor').replaceAll('Game.T%5', 'PForPause.checkAnimTWasAMultipleOf(5)')); +} +setTimeout(function() { if (Game.ObjectsById[7].minigame && Game.ObjectsById[7].minigameLoaded) { changeGrimoire(); } }) -eval("Game.Loop="+Game.Loop.toString().replace("Game.Logic();","if (!gamePause) {Game.Logic();} else {Game.Objects.Farm.minigame.nextStep=Math.floor(Date.now()+gardenStepDifference); Game.Objects.Temple.minigame.swapT=Math.floor(Date.now()-pantheonSwapDifference); Game.lumpT=Math.floor(Date.now()-lumpTimeDifference)}")) +eval("Game.Loop="+Game.Loop.toString().replace("Game.Logic();","if (!gamePause) {Game.Logic();} else {Game.Objects.Farm.minigame.nextStep=Math.floor(Date.now()+gardenStepDifference); Game.Objects.Temple.minigame.swapT=Math.floor(Date.now()-pantheonSwapDifference); Game.lumpT=Math.floor(Date.now()-lumpTimeDifference)}")); eval("Game.Loop="+Game.Loop.toString().replace("Game.accumulatedDelay+=((time-Game.time)-1000/Game.fps);","if (!gamePause) Game.accumulatedDelay+=((time-Game.time)-1000/Game.fps);")) -eval("Game.Logic="+Game.Logic.toString().replace("//minigames","for (var i in gfdArr) {gfdArr[i][1]+=1000/Game.fps}")) +eval("Game.Logic="+Game.Logic.toString().replace("//minigames","//minigames \nfor (var i in gfdArr) {gfdArr[i][1]+=1000/PForPause.fFps;}")) eval("Game.harvestLumps="+Game.harvestLumps.toString().replace("Game.lumpT=Date.now();","Game.lumpT=Date.now(); lumpTimeDifference=0;")) AddEvent(window,'keydown',function(e){ - if (e.keyCode==pForPause[0][0] && !changeKeyBind) {PauseGame()}; - if (e.keyCode==pForPause[1][0] && !changeKeyBind) {TickStep()}}); + if (e.keyCode==pForPause[0][0] && !changeKeyBind) {PauseGame();UpdatePForPB();}; + if (e.keyCode==pForPause[1][0] && !changeKeyBind) {TickStep();} + if (pForPause[3][0] > 0 && e.keyCode==pForPause[3][0]) {PForPause.changeGameSpeed(timeFactorWhenEnabled)} +}); + +AddEvent(window,'keyup',function(e){ + if (pForPause[3][0] > 0 && e.keyCode==pForPause[3][0]) {PForPause.changeGameSpeed(1)} +}); if (!(typeof CCCEMUILoaded === 'undefined')) { UpdatePForPB=function() { for (var i in moreButtons) {for (var ii in pForPauseButtons) {moreButtons[i].splice(moreButtons[i].indexOf(pForPauseButtons),1)}} pForPauseButtons[0]='
' - pForPauseButtons[1]=''+(gamePause?'Unpause':'Pause')+'' + pForPauseButtons[1]=''+(gamePause?'Unpause':'Pause')+'' pForPauseButtons[2]='Tick step
' - pForPauseButtons[3]='Pause: '+pForPause[0][1]+'' - pForPauseButtons[4]='Step: '+pForPause[1][1]+'' - pForPauseButtons[5]='Reset: '+pForPause[2][1]+'
' + pForPauseButtons[3]='Pause: '+pForPause[0][1]+'' + pForPauseButtons[4]='Step: '+pForPause[1][1]+'' + pForPauseButtons[5]='Reset: '+pForPause[2][1]+'
' + pForPauseButtons[6]='Gamespeed multiplier: '+timeFactorWhenEnabled+'' + pForPauseButtons[7]='Trigger method: '+pForPause[3][1]+'' + PForPauseButtons(); RedrawCCCEM(); } AddEvent(window,'keydown',function(e){if (changeKeyBind) {NewKeyBind(e.keyCode, changeKeyBind-1)} else if (e.keyCode==pForPause[2][0]) {ResetAll(1)};}); UpdatePForPB(); }; + +var PForPause = null; +var timeFactorE = 1; +var originalFpsE = 30; +Game.registerMod('P for Pause', { + init: function() { + PForPause = this; + originalFpsE = this.originalFps; + eval('Game.Loop='+Game.Loop.toString().replaceAll('1000/Game.fps', '1000/PForPause.originalFps')); + Game.realT = Game.T; + Game.animT = Game.T; + Game.isNewAnimTick = true; //utility for stuff that triggers per x ticks + Game.lastAnimT = Math.floor(Game.animT); + Game.lastAnimTExact = Game.animT; + + function inRect(x,y,rect) + { + //find out if the point x,y is in the rotated rectangle rect{w,h,r,o} (width,height,rotation in radians,y-origin) (needs to be normalized) + //I found this somewhere online I guess + var dx = x+Math.sin(-rect.r)*(-(rect.h/2-rect.o)),dy=y+Math.cos(-rect.r)*(-(rect.h/2-rect.o)); + var h1 = Math.sqrt(dx*dx + dy*dy); + var currA = Math.atan2(dy,dx); + var newA = currA - rect.r; + var x2 = Math.cos(newA) * h1; + var y2 = Math.sin(newA) * h1; + if (x2 > -0.5 * rect.w && x2 < 0.5 * rect.w && y2 > -0.5 * rect.h && y2 < 0.5 * rect.h) return true; + return false; + } + + eval('Game.Logic='+Game.Logic.toString() + .replace('Game.T++;', 'Game.T++; Game.realT++; Game.animT += PForPause.timeFactor; Game.isNewAnimTick = false; if (Math.floor(Game.animT) > Game.lastAnimT) { Game.isNewAnimTick = true; } Game.lastAnimTExact = Game.lastAnimT; Game.lastAnimT = Game.animT;') + .replace('Game.researchT--;', 'Game.researchT -= PForPause.timeFactor;') + .replace('Game.researchT==0', 'Game.researchT<=0') + .replace('Game.T%Math.ceil(Game.fps/Math.min(10,Game.cookiesPs))==0', 'PForPause.checkAnimTWasAMultipleOf(Math.ceil(Game.fps/Math.min(10,Game.cookiesPs)))') + .replace('Game.BigCookieSizeD+=(Game.BigCookieSizeT-Game.BigCookieSize)*0.75;', 'Game.BigCookieSizeD+=(Game.BigCookieSizeT-Game.BigCookieSize)*0.75 * PForPause.timeFactor;') + .replace('Game.BigCookieSizeD*=0.75;', 'Game.BigCookieSizeD*=Math.pow(0.75, Math.pow(PForPause.timeFactor, 2));') + .replace('Game.BigCookieSize+=Game.BigCookieSizeD;', 'Game.BigCookieSize+=Game.BigCookieSizeD * PForPause.timeFactor;') + .replace('Game.sparklesT--;', 'Game.sparklesT -= PForPause.timeFactor;') + .replace('Game.sparklesFrames-Game.sparklesT+1', 'Game.sparklesFrames-Math.floor(Game.sparklesT)+1') + .replace('if (Game.sparklesT==1)', 'if (Game.sparklesT<=1)') + .replace('-Game.T*', '-Game.animT*') + .replace('Game.ascendMeterPercent+=(Game.ascendMeterPercentT-Game.ascendMeterPercent)*0.1;', 'Game.ascendMeterPercent+=(Game.ascendMeterPercentT-Game.ascendMeterPercent)*0.1*PForPause.timeFactor;') + .replace('Game.T%15==0', 'PForPause.checkAnimTWasAMultipleOf(15)') + .replace('Game.milkHd+=(Game.milkH-Game.milkHd)*0.02', 'Game.milkHd+=(Game.milkH-Game.milkHd)*0.02*PForPause.timeFactor') + .replace('Game.toSave || (Game.T%(Game.fps*60)==0', 'Game.toSave || (PForPause.checkAnimTWasAMultipleOf(Game.fps*60)') + ); + + //kc patched + const funcsToPatch = ['Game.shimmerTypes.golden.updateFunc', (EN?'Game.Upgrades["Endless book of prose"].descFunc':''), 'Game.Achievements["Cookie Clicker"].descFunc', 'Game.UpdateWrinklers', 'Game.DrawWrinklers', 'Game.DrawSpecial', 'Game.DrawBackground']; + for (let i in funcsToPatch) { + /*const n = [].concat(Array.isArray(funcsToPatch[i]) ? funcsToPatch[i][1] : 'all'); + if (n[0] == 'all') { + n[0] = 1; + for (let ii = 2; ii <= 20; ii++) { + n.push(ii); + } + } + const f = eval(funcsToPatch[i]); + if (!f) { continue; } + let funcStr = f.toString(); + for (let ii = 0; ii < n.length; ii++) { + funcStr = this.replaceNthInstanceOf(funcStr, n[ii] - ii, [/\bGame\.T\b(?!%)/g], ['Game.animT']) + } + eval(funcsToPatch[i]+'='+funcStr);*/ + if (!funcsToPatch[i]) { continue; } + eval(funcsToPatch[i]+'='+eval(funcsToPatch[i]).toString().replaceAll(/\bGame\.T\b(?!%)/g, 'Game.animT')); + } + eval('Game.Achievements["Cookie Clicker"].descFunc='+Game.Achievements["Cookie Clicker"].descFunc.toString().replace('Game.T', 'Math.floor(Game.T)')); + //kc patched + const decrementsToPatch = ['Game.updateBuffs', 'Game.doLumps', 'Game.shimmerTypes.golden.updateFunc', 'Game.shimmerTypes.reindeer.updateFunc', 'Game.NotesLogic', 'Game.UpdateTicker', 'Game.UpdateGrandmapocalypse'] + for (let i in decrementsToPatch) { + let decVar = (eval(decrementsToPatch[i]).toString().match(/((?:\w+\.)*\w+)\s*--;/) || [])[1]; + eval(decrementsToPatch[i]+'='+eval(decrementsToPatch[i]).toString() + .replace('--;', ' -= PForPause.timeFactor; ' + (decVar?(decVar + '++; ' + decVar + '--;'):''))); + } + //probably kc patched + const incrementsToPatch = ['Game.updateShimmers', 'Game.particlesUpdate', 'Game.textParticlesUpdate']; + for (let i in incrementsToPatch) { + const n = Array.isArray(incrementsToPatch[i]) ? incrementsToPatch[i][1] : 1; + eval(incrementsToPatch[i] + '=' + this.replaceNthInstanceOf(eval(incrementsToPatch[i]).toString(), n, ['++;'], [' += PForPause.timeFactor;'])); + } + eval('Game.particlesUpdate='+Game.particlesUpdate.toString().replace('0.2+Math.random()*0.1', '(0.2+Math.random()*0.1) * PForPause.timeFactor').replace('+=me.xd', '+=me.xd * PForPause.timeFactor').replace('+=me.yd', '+=me.yd * PForPause.timeFactor')); + eval('Game.textParticlesUpdate='+Game.textParticlesUpdate.toString().replace('for', 'if (gamePause) { return; } for')); + //kc patched + eval('Game.buffType='+Game.buffType.toString().replace('obj.type=type;', 'obj.type=type; obj.time *= PForpause.timeFactor;')); + const divisionsToPatch = ['Game.UpdateWrinklers', 'Game.Logic']; + for (let i in divisionsToPatch) { + const n = Array.isArray(divisionsToPatch[i]) ? divisionsToPatch[i][1] : 1; + eval(divisionsToPatch[i] + '=' + eval(divisionsToPatch[i]).toString().replaceAll('/Game.fps', '/PForPause.fFps')); + } + + //per-frame luck-based events patches + eval('Game.updateShimmers='+Game.updateShimmers.toString() + .replace('Math.pow(Math.max(0,(me.time-me.minTime)/(me.maxTime-me.minTime)),5)', 'PForPause.scaleProbabilitySingle(Math.pow(Math.max(0,(me.time-me.minTime)/(me.maxTime-me.minTime)),5))') + .replace('Math.random()<0.5', 'Math.random() { + for (const m of muts) { + if (m.type === "childList") { + m.addedNodes.forEach(n => PForPause.catchAnimationsInNode(n)); + } else if (m.type === "attributes") { + PForPause.catchAnimationsInNode(m.target); + } + } + }); + observer.observe(document.documentElement, { + childList: true, + attributes: true, + subtree: true, + attributeFilter: ["class", "style"] + }); + + Game.registerHook('logic', function() { + const now = Date.now(); + PForPause.cumulativeRealTime += (now - PForPause.lastFrame) * PForPause.timeFactor; + PForPause.lastFrame = now; + }); + + this.changeMinigame('Farm', ['logic', 'draw', 'reset', 'soilTooltip', 'buildPanel']); + this.changeMinigame('Bank', [], function(M) { + eval('M.logic='+M.logic.toString().replace('M.tickT++;', 'M.tickT += PForPause.timeFactor;')); + }); + this.changeMinigame('Temple', ['logic', 'draw', 'reset', 'useSwap']); + this.changeMinigame('Wizard tower', [], function(M) { + eval('M.logic='+M.logic.toString() + .replace('M.magic+=M.magicPS', 'M.magic+=M.magicPS * PForPause.timeFactor') + ); + eval('M.draw='+M.draw.toString().replace('-Game.T*', '-Game.animT*')); + }); + }, + changeGameSpeed: function(mult, noCSSUpdates) { + if (typeof mult != 'number' || mult < 0) { return; } + this.timeFactor = mult; + timeFactorE = this.timeFactor; + //Game.fps still dont change, create new functional fps to hook to + //this is mostly to minimize mod compatibility, I would very much rather have stuff not be affected by time dilation rather than stuff intiializing with more time when time slowed + //Game.fps = this.originalFps / this.timeFactor; + this.fFps = this.originalFps / this.timeFactor; + + if (!noCSSUpdates) { + for (let anim of this.allAnimations) { + anim.playbackRate = this.timeFactor; + } + } + + for (let i in this.onChangeHooks) { + this.onChangeHooks[i](); + } + }, + replaceNthInstanceOf: function(funcStr, n, searchPatterns, matchingPatterns) { + if (searchPatterns.length != matchingPatterns.length) { throw 'Pattern lengths not matching!'; } + let replaced = 0; + let lastIndex = 0; + while (replaced < n) { + let minIndex = -1; + let patternIdx = -1; + for (let p = 0; p < searchPatterns.length; p++) { + let idx = funcStr.indexOf(searchPatterns[p], lastIndex); + if (idx !== -1 && (minIndex === -1 || idx < minIndex)) { + minIndex = idx; + patternIdx = p; + } + } + if (minIndex === -1) { break; } + funcStr = funcStr.substring(0, minIndex) + + matchingPatterns[patternIdx] + + funcStr.substring(minIndex + searchPatterns[patternIdx].length); + lastIndex = minIndex + matchingPatterns[patternIdx].length; + replaced++; + } + return funcStr; + }, + scaleProbabilityRate: function(p) { + //for random events that you want to keep the amount of successes constant per unit time + //do note that this is not perfect, it has a tendency to asymptotically increase to the actual rate as fFps increases and vice versa, don't use if you are planning to speed the game up to extreme amounts + return 1 - Math.exp(-p * this.timeFactor); + }, + scaleProbabilitySingle: function(p) { + //for random events that you want to keep the average amount of time to a success constant per unit time + return 1 - Math.pow(1 - p, this.timeFactor); + }, + originalFps: window.__PForPauseOriginalFpsPreset__ ?? 30, + fFps: window.__PForPauseOriginalFpsPreset__ ?? 30, //functionalFps, basically fps / timeFactor used for seconds-based timers + timeFactor: 1, + onChangeHooks: [], + allAnimations: new Set(), + hookAnim: function(anim) { + if (PForPause.allAnimations.has(anim)) { return; } + PForPause.allAnimations.add(anim); + if (gamePause) { anim.pause(); } + anim.playbackRate = PForPause.timeFactor; + const c = () => { PForPause.allAnimations.delete(anim); }; + anim.onfinish = c; + anim.oncancel = c; + }, + catchAnimationsInNode: function(node) { + if (node.nodeType !== 1) { return; } + node.getAnimations({ subtree: true }).forEach(PForPause.hookAnim); + }, + sweepAnim: function() { + const all = (document.getAnimations && document.getAnimations()) || []; + for (let i of all) { + this.hookAnim(i); + } + }, + addGameSpeedHook: function(func) { + this.onChangeHooks.push(func); + }, + lastFrame: Date.now(), + cumulativeRealTime: Date.now(), //ms + changeMinigame: function(building, additionalFunctions, func) { + const change = function() { + const M = Game.Objects[building].minigame; + if (M.reset && M.reset.toString().includes('Date.now()')) { + eval('M.reset='+M.reset.toString().replaceAll('Date.now()', 'PForPause.cumulativeRealTime')); + } + for (let i in additionalFunctions) { + eval('M["'+additionalFunctions[i]+'"]='+M[additionalFunctions[i]].toString().replaceAll('Date.now()', 'PForPause.cumulativeRealTime')); + } + func && func(M); + } + if (Game.Objects[building].minigameLoaded) { + change(); + } else { + const interval = setInterval(function() { + if (Game.Objects[building].minigameLoaded) { + change(); + clearInterval(interval); + } + }, 10); + } + }, + checkAnimTWasAMultipleOf: function(int) { + //utility for stuff that triggers every x ticks, but want to use animT + return Math.floor(Math.floor(Game.animT) / int + 1e-13) - Math.floor(Game.lastAnimTExact / int + 1e-13); + }, + save: function() { + return '' + this.timeFactor; + }, + loadTimeMult: false, + load: function(str) { + if (!this.loadTimeMult) { + return; + } + + this.changeGameSpeed(parseFloat(str)); + } +}); diff --git a/autoclicker.js b/autoclicker.js new file mode 100644 index 0000000..e45a463 --- /dev/null +++ b/autoclicker.js @@ -0,0 +1,1921 @@ +(() => { + // LZString: https://github.com/pieroxy/lz-string + var LZString=function(){var r=String.fromCharCode,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",e={};function t(r,o){if(!e[r]){e[r]={};for(var n=0;n>>8,n[2*e+1]=s%256}return n},decompressFromUint8Array:function(o){if(null==o)return i.decompress(o);for(var n=new Array(o.length/2),e=0,t=n.length;e>=1}else{for(t=1,e=0;e>=1}0==--l&&(l=Math.pow(2,h),h++),delete u[c]}else for(t=s[c],e=0;e>=1;0==--l&&(l=Math.pow(2,h),h++),s[p]=f++,c=String(a)}if(""!==c){if(Object.prototype.hasOwnProperty.call(u,c)){if(c.charCodeAt(0)<256){for(e=0;e>=1}else{for(t=1,e=0;e>=1}0==--l&&(l=Math.pow(2,h),h++),delete u[c]}else for(t=s[c],e=0;e>=1;0==--l&&(l=Math.pow(2,h),h++)}for(t=2,e=0;e>=1;for(;;){if(m<<=1,v==o-1){d.push(n(m));break}v++}return d.join("")},decompress:function(r){return null==r?"":""==r?null:i._decompress(r.length,32768,function(o){return r.charCodeAt(o)})},_decompress:function(o,n,e){var t,i,s,u,a,p,c,l=[],f=4,h=4,d=3,m="",v=[],g={val:e(0),position:n,index:1};for(t=0;t<3;t+=1)l[t]=t;for(s=0,a=Math.pow(2,2),p=1;p!=a;)u=g.val&g.position,g.position>>=1,0==g.position&&(g.position=n,g.val=e(g.index++)),s|=(u>0?1:0)*p,p<<=1;switch(s){case 0:for(s=0,a=Math.pow(2,8),p=1;p!=a;)u=g.val&g.position,g.position>>=1,0==g.position&&(g.position=n,g.val=e(g.index++)),s|=(u>0?1:0)*p,p<<=1;c=r(s);break;case 1:for(s=0,a=Math.pow(2,16),p=1;p!=a;)u=g.val&g.position,g.position>>=1,0==g.position&&(g.position=n,g.val=e(g.index++)),s|=(u>0?1:0)*p,p<<=1;c=r(s);break;case 2:return""}for(l[3]=c,i=c,v.push(c);;){if(g.index>o)return"";for(s=0,a=Math.pow(2,d),p=1;p!=a;)u=g.val&g.position,g.position>>=1,0==g.position&&(g.position=n,g.val=e(g.index++)),s|=(u>0?1:0)*p,p<<=1;switch(c=s){case 0:for(s=0,a=Math.pow(2,8),p=1;p!=a;)u=g.val&g.position,g.position>>=1,0==g.position&&(g.position=n,g.val=e(g.index++)),s|=(u>0?1:0)*p,p<<=1;l[h++]=r(s),c=h-1,f--;break;case 1:for(s=0,a=Math.pow(2,16),p=1;p!=a;)u=g.val&g.position,g.position>>=1,0==g.position&&(g.position=n,g.val=e(g.index++)),s|=(u>0?1:0)*p,p<<=1;l[h++]=r(s),c=h-1,f--;break;case 2:return v.join("")}if(0==f&&(f=Math.pow(2,d),d++),l[c])m=l[c];else{if(c!==h)return null;m=i+i.charAt(0)}v.push(m),l[h++]=i+m.charAt(0),i=m,0==--f&&(f=Math.pow(2,d),d++)}}};return i}();"function"==typeof define&&define.amd?define(function(){return LZString}):"undefined"!=typeof module&&null!=module?module.exports=LZString:"undefined"!=typeof angular&&null!=angular&&angular.module("LZString",[]).factory("LZString",function(){return LZString}); + // hijack loc to record all loc strings + /*window.locSet = new Set(); + const loc = t => { + window.locSet.add(t); + return t; + }*/ + function r() { Game.registerMod('metaclicker', { + init: function() { + this.TraversalPattern.addToCatalogue(this.TraversalPattern.createFromData(this.traversalPatternsData)); + this.setTraversalPattern(this.TraversalPattern.catalogue[1]); + this.applyStyles(); + AddLanguage('EN', 'english', LANG, true); + const lang = localStorageGet('CookieClickerLang') ?? 'EN'; + const langMap = { + 'CN': LANG_CN + } + if (lang !== 'EN' && langMap[lang]) { + AddLanguage(lang, Langs[lang].name, langMap[lang], true); + } + document.addEventListener('mousemove', e => { + this.track.lastRealMouseX = this.track.realMouseX; + this.track.lastRealMouseY = this.track.realMouseY; + this.track.realMouseDeltaX = this.track.realMouseX >= 0 ? e.clientX - this.track.realMouseX : 0; + this.track.realMouseDeltaY = this.track.realMouseY >= 0 ? e.clientY - this.track.realMouseY : 0; + this.track.realMouseX = e.clientX; + this.track.realMouseY = e.clientY; + }); + document.addEventListener('mousedown', e => { + this.track.realMouseHeld = true; + }); + document.addEventListener('mouseup', e => { + this.track.realMouseHeld = false; + }); + this.createHotkeys(); + this.createWidget(); + Game.registerHook('logic', () => this.updateCustomParticles()); + Game.registerHook('logic', () => this.syncPrefCheckboxes()); + this.injectParticleDrawPoint(); + this.injectParticleAddSuppression(); + this.injectCookieSoundSuppress(); + Game.registerHook('draw', () => this.regenerateLimiters()); + this.buildCookieImagesCache(); + Game.registerHook('check', () => this.buildCookieImagesCache()); + Game.registerHook('reset', hard => { + if (hard) { + this.state.lbMode = 'none'; + this.refreshTab(); + } + }); + }, + state: { + enabled: false, + clickIntervalMS: 20, + clickLimitEnabled: false, + clickLimit: 100, + toggleHotkey: null, // set later with a Hotkey object + bigCookieEnabled: false, + bigCookieClickCap: 'faithful', // "faithful" | "hacker" | "godmode" + visuals: 'enhanced', // "hidden" | "vanilla" | "enhanced" + bigCookieClickMode: 'automatic', // "automatic" | "hoverover" | "held-down" + bigCookieClicksIntervalMS: 20, + bigCookieToggleHotkey: null, + traversalPattern: null, + speedMult: 1, + reverseTraversal: false, + constantSpeed: false, + trail: false, + soundMult: 100, // 0-150 percentage multiplier for click sound volume + lbMode: 'none', // "none" | "competitive" | "finnless" | "general" + openedTab: 'universal', + }, + track: { + realMouseX: -1, + realMouseY: -1, + lastRealMouseX: -1, + lastRealMouseY: -1, + realMouseDeltaX: 0, + realMouseDeltaY: 0, + realMouseHeld: false, + lastBigCookieClick: performance.now(), + queuedClicks: 0, // for when the interval is less than 1 ms (godmode), batch clicks + tAccumulator: 0, + lastBigCookieEnableDate: performance.now(), + clicksSoFar: 0, + particleGenerationLimiter: 100, // 100 particles, regenerates over time + textGenerationLimiter: 15, + soundLimiter: 10, + velX: 0, velY: 0, //simulated velocities, not real velocities, for big cookie particle visuals only + lastClickSpot: [0, 0], + defaultParticleAddSuppress: false, + soundSuppressed: false, + trailTimeout: null, + clickOccurredThisFrame: false + }, + regenerateLimiters: function() { + // Bundles particle generation to draw speed to avoid throttling + const actualSpeed = Math.max(this.state.bigCookieClicksIntervalMS, (this.state.bigCookieClickCap === 'faithful')?20:0, (this.state.bigCookieClickCap === 'hacker')?1:0); + const particleGenRecovery = (4 * Math.min(Math.log2(Math.max(1000 / actualSpeed - 120, 0) / 240 + 2), 3)); + this.track.particleGenerationLimiter = Math.min(this.track.particleGenerationLimiter + particleGenRecovery, 100); + this.track.textGenerationLimiter = Math.min(this.track.textGenerationLimiter + particleGenRecovery / 2, 15); + this.track.soundLimiter = Math.min(this.track.soundLimiter + particleGenRecovery / 4, 10); + }, + universalLoop: function() { + if (!this.state.enabled) { + return; + } + this.mockClick(this.track.realMouseX, this.track.realMouseY); + this.track.clicksSoFar++; + if (this.state.clickLimitEnabled && this.track.clicksSoFar >= this.state.clickLimit) { + this.disableAC(); + this.track.clicksSoFar = 0; + if (l('ac-enabled')) { + l('ac-enabled').textContent = loc('Click to enable'); + } + return; + } + setTimeout(() => this.universalLoop(), this.state.clickIntervalMS); + }, + enableAC: function() { + this.state.enabled = true; + this.track.clicksSoFar = 0; + this.universalLoop(); + }, + disableAC: function() { + this.state.enabled = false; + }, + bigCookieLoop: function() { + if (!this.state.bigCookieEnabled) { + return; + } + + const left = Game.LeftBackground?.canvas; + if (!left) { + setTimeout(() => this.bigCookieLoop(), Math.ceil(this.state.bigCookieClicksIntervalMS)); + return; + } + const oldX = Game.mouseX, oldY = Game.mouseY; + const centerX = left.getBoundingClientRect().left + left.getBoundingClientRect().width / 2; + const centerY = /*left.getBoundingClientRect().top + */left.getBoundingClientRect().height * 0.4; // game code is bad + + const mode = this.state.bigCookieClickMode; + let shouldClick = true; + + if (mode === 'hoverover' || mode === 'held-down') { + const bigCookie = l('bigCookie'); + let hovered = false; + if (bigCookie) { + const el = document.elementFromPoint(this.track.realMouseX, this.track.realMouseY); + if (el && (el === bigCookie || bigCookie.contains(el))) { + hovered = true; + } + } + if (!hovered) { + shouldClick = false; + } + if (mode === 'held-down' && !this.track.realMouseHeld) { + shouldClick = false; + } + + const dt = Math.max(performance.now() - this.track.lastBigCookieClick, 1) / 1000; + const realInterval = Math.max(this.state.bigCookieClicksIntervalMS, (this.state.bigCookieClickCap === 'faithful')?20:0, (this.state.bigCookieCap === 'hacker')?1:0); + const friction = (0.001 + 0.019 * Math.pow(Math.min(realInterval / 100, 1), 0.5)) ** dt; + this.track.velX *= friction; + this.track.velY *= friction; + + const leftRect = Game.LeftBackground?.canvas?.getBoundingClientRect(); + if (leftRect) { + const centerX = leftRect.left + leftRect.width / 2; + const centerY = leftRect.height * 0.4; + const normX = (this.track.realMouseX - centerX) / 128; + const normY = (this.track.realMouseY - centerY) / 128; + + const deltaScale = 1 / Math.sqrt(Math.max(this.state.speedMult, 0.1)) * 40; + const heldDownDamping = (mode === 'held-down')?0.5:1; + + if (this.track.lastClickSpot) { + this.track.velX += (normX - this.track.lastClickSpot[0]) * deltaScale * heldDownDamping; + this.track.velY += (normY - this.track.lastClickSpot[1]) * deltaScale * heldDownDamping; + } + this.track.lastClickSpot = [normX, normY]; + } + } else if (this.state.visuals !== 'hidden') { + const pattern = this.state.traversalPattern; + const totalSpace = pattern.spaceTable[pattern.spaceTable.length - 1]; + const acc = this.state.reverseTraversal + ? totalSpace - (this.track.tAccumulator % totalSpace) + : this.track.tAccumulator; + const off = pattern.positionAt(pattern.tAt(this.state.constantSpeed?acc:pattern.distAt(acc)))[0] + .map(e => e * 128); + this.track.tAccumulator += (performance.now() - this.track.lastBigCookieClick) / 1000 * pattern.speedMult * this.state.speedMult; + Game.mouseX = centerX + off[0]; + Game.mouseY = centerY + off[1]; + + const realInterval = Math.max(this.state.bigCookieClicksIntervalMS, (this.state.bigCookieClickCap === 'faithful')?20:0, (this.state.bigCookieCap === 'hacker')?1:0); + const friction = (0.001 + 0.019 * Math.pow(Math.min(realInterval / 100, 1), 0.5)) ** ((performance.now() - this.track.lastBigCookieClick) / 1000); + this.track.velX *= friction; + this.track.velY *= friction; + if (this.track.lastClickSpot) { + this.track.velX += (off[0] - this.track.lastClickSpot[0]) / Math.sqrt(this.state.speedMult); + this.track.velY += (off[1] - this.track.lastClickSpot[1]) / Math.sqrt(this.state.speedMult); + //console.log(this.track.velX, this.track.velY, off[0] - this.track.lastClickSpot[0], off[1] - this.track.lastClickSpot[1]); + } + this.track.lastClickSpot = [off[0], off[1]]; + } + + Game.BigCookieState = 2; + + if (shouldClick) { + this.track.clickOccurredThisFrame = true; + const oldClick = Game.lastClick; + const ev = new Event('click'); + if (this.state.visuals !== 'vanilla') { this.track.defaultParticleAddSuppress = true; } + if (this.track.soundLimiter < 1) { + this.track.soundSuppressed = true; + } else { + this.track.soundLimiter--; + } + if (this.state.bigCookieClickCap === 'godmode') { + const now = performance.now(); + this.track.queuedClicks += Math.min(now - this.track.lastBigCookieClick, 3) / this.state.bigCookieClicksIntervalMS; + this.track.lastBigCookieClick = now; + this.customClickCookie(ev, Math.floor(this.track.queuedClicks)); + this.track.queuedClicks = this.track.queuedClicks % 1; + } else { + this.track.lastBigCookieClick = performance.now(); + this.customClickCookie(ev); + } + if (this.state.bigCookieClickCap === 'hacker') { + Game.lastClick = oldClick; + } + this.track.defaultParticleAddSuppress = false; + this.track.soundSuppressed = false; + } + Game.mouseX = oldX; + Game.mouseY = oldY; + + setTimeout(() => this.bigCookieLoop(), Math.ceil(this.state.bigCookieClicksIntervalMS)); + }, + customClickCookie: function(ev, count = 1) { + if (this.state.bigCookieClickCap === 'faithful' && Date.now() - Game.lastClick < 20) { return; } + if (Game.OnAscend || Game.AscendTimer>0) { return; } + for (let i = 0; i < count; i++) { Game.ClickCookie(ev); } + if (this.state.visuals !== 'enhanced' || this.track.particleGenerationLimiter <= 0) { return; } + + const actualSpeed = Math.max(Math.max(this.state.bigCookieClicksIntervalMS, 1), (this.state.bigCookieClickCap === 'faithful')?20:0, (this.state.bigCookieClickCap === 'hacker')?1:0); + const vx = this.track.velX, vy = this.track.velY; + const baseMult = Math.pow(1000 / actualSpeed, 0.5) / 10 + 1; + const reducedMult = Math.pow(baseMult, 1 / 3); + // estimate: when ms = 1, particle drama +300% approximately + + // big cookie wobbling simulation + Game.BigCookieSizeD -= Math.min((3 + Math.sqrt(vx * vx + vy * vy)) * reducedMult / 150 * actualSpeed, 1) / 1000 * Game.fps; + + this.track.particleGenerationLimiter--; + if (this.track.textGenerationLimiter > 0 && Game.prefs.numbers) { + this.track.textGenerationLimiter--; + this.ParticleTypes.Text.create() + .setX(Game.mouseX+Math.random()*8-4) + .setY(Game.mouseY-8+Math.random()*8-4) + .setContent('+' + Beautify(Game.computedMouseCps)) + .setDY(-60) + .deploy() + } + const chosen = Game.season === 'fools' ? [0, 0, 'smallDollars.png'] : + ((Game.bakeryName === 'ortiel' || Math.random() < 1/10000) ? [17, 5] : choose(this.cookieImagesCache).icon); + Game.prefs.particles && this.ParticleTypes.Cookie.create() + .setX(Game.mouseX) + .setY(Game.mouseY) + .setDX(((Math.random()*120-60) + vx * 5) * reducedMult) + .setDY(((Math.random()*-80-10) + vy * 5) * reducedMult * reducedMult) // counteracts the increased gravity + .setDDY(7.5 * reducedMult) + .setScale(Math.max(0.5 + Math.random()*0.75 / reducedMult, 0.25)) + .setMT((1 + 2 * Math.random() * reducedMult)) + .setZ(2) + .setCookie(chosen[0], chosen[1]) + .setURL(chosen[2] ?? '') + .deploy(); + /*this.ParticleTypes.Cookie.create() + .setX(Game.mouseX) + .setY(Game.mouseY) + .setDX(0) + .setDY(0) + .setDDY(0) + .setScale(0.25) + .setMT(1000) + .setZ(2) + .setCookie(chosen[0], chosen[1]) + .setURL(chosen[2] ?? '') + .deploy();*/ + }, + cookieImagesCache: [], + buildCookieImagesCache: function() { + this.cookieImagesCache = []; + for (let i in Game.Upgrades) { + if (Game.Upgrades[i].bought && Game.Upgrades[i].pool === 'cookie') { + this.cookieImagesCache.push(Game.Upgrades[i]); + } + } + this.cookieImagesCache.push(Game.Upgrades['Chocolate chip cookie']); + }, + enableBigCookieAC: function() { + this.state.bigCookieEnabled = true; + this.track.lastBigCookieClick = performance.now(); + this.track.lastBigCookieEnableDate = performance.now(); + if (this.state.bigCookieClickCap === 'godmode') { + Game.Win('Cheated cookies taste awful'); + } + this.lastClickSpot = null; + this.track.velX = 0; + this.track.velY = 0; + if (this.state.trail && this.state.visuals === 'enhanced') { + this.trailSpawnLoop(); + } + this.bigCookieLoop(); + }, + disableBigCookieAC: function() { + this.state.bigCookieEnabled = false; + if (Game.BigCookieState === 2) { Game.BigCookieState = 0; } + this.stopTrailLoop(); + }, + trailSpawnLoop: function() { + if (!this.state.trail || !this.state.bigCookieEnabled || this.state.visuals !== 'enhanced') { + return; + } + const mode = this.state.bigCookieClickMode; + + const left = Game.LeftBackground?.canvas; + if (!left) { + this.track.trailTimeout = setTimeout(() => this.trailSpawnLoop(), 20); + return; + } + + let x, y; + + if (mode === 'automatic') { + const centerX = left.getBoundingClientRect().left + left.getBoundingClientRect().width / 2; + const centerY = left.getBoundingClientRect().height * 0.4; + const pattern = this.state.traversalPattern; + if (!pattern) { + this.track.trailTimeout = setTimeout(() => this.trailSpawnLoop(), 20); + return; + } + const totalSpace = pattern.spaceTable[pattern.spaceTable.length - 1]; + const acc = this.state.reverseTraversal + ? totalSpace - (this.track.tAccumulator % totalSpace) + : this.track.tAccumulator % totalSpace; + const off = pattern.positionAt(pattern.tAt(this.state.constantSpeed ? acc : pattern.distAt(acc)))[0] + .map(e => e * 128); + x = centerX + off[0]; + y = centerY + off[1]; + } else { + // hoverover or held-down: only emit trail when a click actually occurs + if (!this.track.clickOccurredThisFrame) { + this.track.trailTimeout = setTimeout(() => this.trailSpawnLoop(), 20); + return; + } + x = this.track.realMouseX; + y = this.track.realMouseY; + } + + this.ParticleTypes.Trail.create() + .setX(x) + .setY(y) + .setScale(Math.random() * 0.5 + 0.2) + .setRot(Math.random() * Math.PI * 2) + .setDR((Math.random() - 0.5) * 1.5) + .setMT(5 / this.state.speedMult) + .deploy(); + + this.track.clickOccurredThisFrame = false; + this.track.trailTimeout = setTimeout(() => this.trailSpawnLoop(), 20); + }, + stopTrailLoop: function() { + if (this.track.trailTimeout !== null) { + clearTimeout(this.track.trailTimeout); + this.track.trailTimeout = null; + } + }, + createWidget: function() { + var that = this; + var container = document.createElement('div'); + container.id = 'metaclicker-container'; + container.classList.add('framed'); + container.innerHTML = ` +

${loc('Metaclicker v%1', '1.0')}${loc('-')}

+
+ +
+ ${this.contentAC()} +
+ `; + l('game').appendChild(container); + this.eventsAC(); + l('tab-universal').addEventListener('click', e => { + l('metaclicker-content').innerHTML = this.contentAC(); + this.eventsAC(); + e.target.parentNode.querySelectorAll('.selected').forEach(e => e.classList.remove('selected')); + e.target.classList.add('selected'); + this.state.openedTab = 'universal'; + }); + l('tab-big-cookie').addEventListener('click', e => { + l('metaclicker-content').innerHTML = this.contentBigCookieAC(); + this.eventsBigCookieAC(); + e.target.parentNode.querySelectorAll('.selected').forEach(e => e.classList.remove('selected')); + e.target.classList.add('selected'); + this.state.openedTab = 'big-cookie'; + }); + + let restoreBtn = document.createElement('a'); + restoreBtn.id = 'metaclicker-restore'; + restoreBtn.className = 'option framed'; + restoreBtn.textContent = loc('+'); + restoreBtn.style.cssText = 'position:absolute;bottom:20px;right:20px;z-index:100001;display:none;padding:4px 12px;font-size:18px;'; + l('game').appendChild(restoreBtn); + + l('metaclicker-minimize').addEventListener('click', function() { + container.style.display = 'none'; + restoreBtn.style.display = ''; + }); + restoreBtn.addEventListener('click', function() { + container.style.display = ''; + restoreBtn.style.display = 'none'; + }); + }, + refreshTab: function() { + const content = l('metaclicker-content'); + if (!content) { return; } + switch(this.state.openedTab) { + case 'universal': + content.innerHTML = this.contentAC(); + this.eventsAC(); + break; + case 'big-cookie': + content.innerHTML = this.contentBigCookieAC(); + this.eventsBigCookieAC(); + break; + } + }, + contentAC: function() { + // Within autoclicker (universal): + // (in this order) enabled, toggleHotkey, clickIntervalMS + const lb = this.state.lbMode === 'none'; + if (this.state.lbMode === 'competitive') { + return ` +
${loc('Autoclickers are not allowed in the competitive leaderboard.')}
+ `; + } + return ` + ${this.state.enabled?loc('Click to disable'):loc('Click to enable')} +
${loc('Toggle hotkey:')}
${this.state.toggleHotkey.toString()}
${loc('Record')} +
+ ${loc('Click interval (ms):')} +
+ + `; + }, + eventsAC: function() { + var that = this; + // Toggle universal autoclicker on/off + l('ac-enabled')?.addEventListener?.('click', function() { + if (that.state.enabled) { + that.disableAC(); + } else { + that.enableAC(); + } + l('ac-enabled').textContent = that.state.enabled ? loc('Click to disable') : loc('Click to enable'); + l('ac-enabled').classList.toggle('ac-active', that.state.enabled); + }); + // Hotkey + l('hotkey-record')?.addEventListener?.('click', function() { + that.state.toggleHotkey.record(e => { + if (l('hotkey-details-container')) l('hotkey-details-container').innerText = that.state.toggleHotkey.toString(); + if (e.status === 'set' && l('hotkey-record')) { + l('hotkey-record').innerText = loc('Record'); + } + }); + l('hotkey-record').innerText = loc('...'); + l('hotkey-details-container').innerText = that.state.toggleHotkey.toString(); + }); + // Clicks interval (ms between clicks) + l('ac-clicks-per-second')?.addEventListener?.('change', function() { + var v = parseInt(this.value, 10); + if (!isNaN(v) && v > 0) { + that.state.clickIntervalMS = v; + } else { + this.value = that.state.clickIntervalMS; + } + }); + // Click limit (auto-stop after N clicks) + l('ac-click-limit-enabled')?.addEventListener?.('change', function() { + that.state.clickLimitEnabled = this.checked; + }); + l('ac-click-limit')?.addEventListener?.('change', function() { + var v = parseInt(this.value, 10); + if (!isNaN(v) && v > 0) { + that.state.clickLimit = v; + } else { + this.value = that.state.clickLimit; + } + }); + l('lb-configure')?.addEventListener?.('click', e => this.promptLB()); + }, + contentBigCookieAC: function() { + // Within big cookie autoclicker: + // (in this order) enabled, bigCookieToggleHotkey, + // clicksPerSecond, bigCookieClickCap, + // bigCookieclickerMode + // traversalPattern, speedMult + const lb = this.state.lbMode === 'none'; + if (this.state.lbMode === 'competitive') { + return ` +
${loc('Autoclickers are not allowed in the competitive leaderboard.')}
+ ${loc('Leaderboard mode: %1', this.state.lbMode.toUpperCase())} + `; + } + return ` + ${this.state.bigCookieEnabled?loc('Click to disable'):loc('Click to enable')} +
${loc('Toggle hotkey:')} ${loc('Record')} +
${loc('Click interval (ms):')}
+
${loc('Clicks per second:')}
+
${loc('Click cap:')} ?
+ +
${loc('Some settings are restricted due to your leaderboard settings. To use the big cookie autoclicker, you must hold down your mouse over the big cookie for it to activate.')}
+
+
${loc('Click mode:')}
+
+
${loc('Visuals:')}
+
+ + +
+ +
+
+ ${loc('Traversal pattern:')} +
${loc('Speed multiplier:')} +
+
+
+
+ +
+
+ ${loc('Leaderboard mode: %1', this.state.lbMode.toUpperCase())} + `; + }, + eventsBigCookieAC: function() { + var that = this; + // Toggle big cookie autoclicker on/off + l('big-cookie-ac-enabled')?.addEventListener?.('click', function() { + if (that.state.bigCookieEnabled) { + that.disableBigCookieAC(); + } else { + that.enableBigCookieAC(); + } + l('big-cookie-ac-enabled').textContent = that.state.bigCookieEnabled ? loc('Click to disable') : loc('Click to enable'); + l('big-cookie-ac-enabled').classList.toggle('ac-active', that.state.bigCookieEnabled); + }); + // Hotkey + l('hotkey-record-big-cookie')?.addEventListener?.('click', function() { + that.state.bigCookieToggleHotkey.record(e => { + if (l('hotkey-details-container-big-cookie')) l('hotkey-details-container-big-cookie').innerText = that.state.bigCookieToggleHotkey.toString(); + if (e.status === 'set' && l('hotkey-record-big-cookie')) { + l('hotkey-record-big-cookie').innerText = loc('Record'); + } + }); + l('hotkey-record-big-cookie').innerText = loc('...'); + l('hotkey-details-container-big-cookie').innerText = that.state.bigCookieToggleHotkey.toString(); + }); + // Clicks intervals + l('big-cookie-click-interval')?.addEventListener?.('change', function() { + var v = parseInt(this.value, 10); + if (!isNaN(v) && v > 0) { + that.state.bigCookieClicksIntervalMS = v; + } else { + this.value = that.state.bigCookieClicksIntervalMS; + } + l('big-cookie-clicks-per-second').value = Math.round(1000 / v); + }); + l('big-cookie-clicks-per-second')?.addEventListener?.('change', function() { + var v = parseInt(this.value, 10); + if (!isNaN(v) && v > 0) { + that.state.bigCookieClicksIntervalMS = 1000 / v; + } else { + this.value = Math.floor(1000 / that.state.bigCookieClicksIntervalMS); + } + l('big-cookie-click-interval').value = Math.max(Math.round(1000 / v), 1); + }); + // Click cap + l('big-cookie-clicker-cap')?.addEventListener?.('change', function() { + if (this.value === 'godmode') { + that.promptGodmodeWarn(); + this.value = that.state.bigCookieClickCap; + return; + } + that.state.bigCookieClickCap = this.value; + that.godModeToggle(this.value); + that.track.queuedClicks = 0; + }); + // Click mode + l('big-cookie-clicker-mode')?.addEventListener?.('change', function() { + that.state.bigCookieClickMode = this.value; + if (this.value === 'automatic') { + l('traversal-pattern-container').style.display = ''; + if (that.state.trail && that.state.bigCookieEnabled && that.state.visuals === 'enhanced') { + that.stopTrailLoop(); + that.trailSpawnLoop(); + } + } else { + l('traversal-pattern-container').style.display = 'none'; + if (that.state.trail && that.state.bigCookieEnabled && that.state.visuals === 'enhanced') { + that.stopTrailLoop(); + that.trailSpawnLoop(); + } + } + }); + l('big-cookie-clicker-visuals')?.addEventListener?.('change', function() { + that.state.visuals = this.value; + if (this.value !== 'enhanced') { + that.stopTrailLoop(); + } else if (that.state.trail && that.state.bigCookieEnabled) { + that.stopTrailLoop(); + that.trailSpawnLoop(); + } + that.refreshTab(); + }); + // Traversal pattern + l('big-cookie-traversal-pattern')?.addEventListener?.('change', function() { + var pattern = that.TraversalPattern.catalogue.find(function(p) { return p.name === this.value; }.bind(this)); + if (pattern) { + that.setTraversalPattern(pattern); + } + }); + // Speed multiplier + l('big-cookie-speed-mult')?.addEventListener?.('change', function() { + var v = parseFloat(this.value); + if (!isNaN(v) && v > 0) { + that.state.speedMult = v; + } else { + this.value = that.state.speedMult; + } + }); + // Reverse traversal checkbox + l('big-cookie-reverse-traversal')?.addEventListener?.('change', function() { + that.state.reverseTraversal = this.checked; + }); + l('big-cookie-constant-speed')?.addEventListener?.('change', function() { + that.state.constantSpeed = this.checked; + }); + l('big-cookie-trail')?.addEventListener?.('change', function() { + that.state.trail = this.checked; + if (this.checked && that.state.bigCookieEnabled && that.state.visuals === 'enhanced') { + that.stopTrailLoop(); + that.trailSpawnLoop(); + } else if (!this.checked) { + that.stopTrailLoop(); + } + }); + l('ac-prefs-numbers')?.addEventListener?.('change', function() { + Game.prefs.numbers = this.checked ? 1 : 0; + Game.UpdateMenu(); + }); + l('ac-prefs-particles')?.addEventListener?.('change', function() { + Game.prefs.particles = this.checked ? 1 : 0; + Game.UpdateMenu(); + }); + l('ac-sound-mult')?.addEventListener?.('input', function() { + that.state.soundMult = parseInt(this.value); + var valEl = l('ac-sound-mult-value'); + if (valEl) valEl.textContent = this.value + '%'; + }); + l('click-cap-help')?.addEventListener?.('click', e => this.promptCap()); + l('lb-configure')?.addEventListener?.('click', e => this.promptLB()); + }, + godModeToggle: function(value) { + if (!l('click-interval') || !l('clicks-per-second')) { return; } + if (value === 'godmode') { + l('click-interval').classList.add('ac-details-hidden'); + l('clicks-per-second').classList.remove('ac-details-hidden'); + } else { + l('click-interval').classList.remove('ac-details-hidden'); + l('clicks-per-second').classList.add('ac-details-hidden'); + } + }, + promptCap: function() { + Game.Prompt(` +

${loc('Click cap explanation')}

+
+
${loc('Faithful')} +
${loc('Click speed is capped to 50 clicks per second regardless what you set the interval to, which is what the game normally caps all autoclickers to.')}
+
${loc('Hacker')} +
${loc('The autoclicker can click as fast as 1,000 clicks per second, which is not possible with any external autoclickers. Some people may consider this cheating.')}
+
${loc('God mode')} +
${loc('"Click interval" is replaced with "Clicks per second", allowing you to click as fast as your CPU can handle. You will also get the Cheated Cookies Taste Awful shadow achievement.')}
+ `, [[loc('Got it')]]); + }, + promptLB: function() { + // If leaderboard mode is already set, show locked/read-only view + if (this.state.lbMode !== 'none') { + Game.Prompt(` +

${loc('Leaderboard settings')}

+
+
+ ${loc('Leaderboard mode: %1', `${loc(this.state.lbMode.charAt(0).toUpperCase() + this.state.lbMode.slice(1))}`)} +
+
+ ${loc('Leaderboard mode selection is permanent. Once set, it cannot be changed for this save. Wiping save will reset leaderboard modes.')} +
+ `, [[loc('All done!')]]); + return; + } + // Leaderboard mode is still 'none', allow initial selection + Game.Prompt(` +

${loc('Leaderboard settings')}

+
+
${loc('Leaderboard mode: ')}
+
+ ${loc('Leaderboard modes are setting restrictions on the autoclicker, based on the %1.', `${loc('Dashnet Forums Cookie Clicker Leaderboards')}`)} +
+ ${loc('If you choose any leaderboard mode other than "none", some of your settings will be restricted.')} +
${loc('The big cookie autoclicker\'s click mode will be forced to "Held down" in all leaderboards, and the click cap will be set to "Faithful".')} +
+ ${loc('In addition, you cannot use the autoclicker in the competitive leaderboard.')} +
+
${loc('Warning: Once you select a leaderboard mode, it becomes permanent and cannot be changed later, even if you ascend!')}
+
+ `, [ + [loc('Confirm selection'), `var s=l('lb-mode').value;if(s==='none'){Game.ClosePrompt();}else{metaclicker.promptLBConfirm(s);}`], + [loc('Cancel')] + ]); + }, + lbPassPhrases: { + competitive: 'all hail our lord lookas123', + finnless: 'lets go gambling aw dang it', + general: 'the genlarps are out of control' + }, + promptLBConfirm: function(mode) { + var modeLabel = loc(mode.charAt(0).toUpperCase() + mode.slice(1)); + Game.Prompt(` +

${loc('Confirm leaderboard mode')}

+
+
+ ${loc('You are about to set your leaderboard mode to %1.', '' + modeLabel + '')} +
+ ${loc('This choice is permanent and irreversible. You will not be able to switch leaderboards or change this setting later.')} +
+ ${loc('You will not join the leaderboard automatically. This mod will not prevent you from breaking any leaderboard rules and is not proof of eligibility. Make sure that you have already followed the rules for your leaderboard of choice. To join, follow the instructions by clicking on this link.', 'https://docs.google.com/spreadsheets/d/1qgqDVmOy3aTUjA0LTQnM3GXf6R9bXU7GU_ufSDC7h4o/edit')} +
+
+
+ ${loc('To confirm, please sort all words in the following phrase in alphabetical order separated by spaces, then type it in the box below.')} +
${this.lbPassPhrases[mode]} + + +
+ `, [ + [loc('Confirm'), 'var v=l(\'lb-confirm-input\').value.trim();if(v === \''+ + this.lbPassPhrases[mode].split(' ').sort().join(' ') + +'\'){metaclicker.state.lbMode=\'' + mode + '\';if(\'' + mode + '\'!==\'competitive\'){metaclicker.state.bigCookieClickMode=\'held-down\';metaclicker.state.bigCookieClickCap=\'faithful\';}var el=l(\'metaclicker-content\');if(el){el.innerHTML=metaclicker.contentBigCookieAC();metaclicker.eventsBigCookieAC();}Game.ClosePrompt();}else{var err=l(\'lb-confirm-error\');if(err){err.style.display=\'\';err.innerHTML=\'' + loc('Phrase does not match. Please try again.') + '\';}}', 'float:left'], + [loc('Cancel'), '', 'float:right'] + ]); + // Focus the input field + setTimeout(function() { + var inp = l('lb-confirm-input'); + if (inp) inp.focus(); + }, 50); + }, + promptGodmodeWarn: function() { + Game.Prompt(` +

${loc('Are you sure?')}

+
+
${loc('You will get the %1 achievement. Are you sure you want to enable it?', Game.Achievements['Cheated cookies taste awful'].dname)}
+
+ `, [[loc('Nevermind'), 'Game.ClosePrompt();'], [loc('I\'m aware of the consequences, proceed'), 'metaclicker.state.bigCookieClickCap=\'godmode\';l(\'big-cookie-clicker-cap\') && (l(\'big-cookie-clicker-cap\').value = \'godmode\');metaclicker.godModeToggle(\'godmode\');Game.Win(\'Cheated cookies taste awful\');Game.ClosePrompt();']]); + }, + styles: ` + .option.tab.selected { + border: #fff solid 1px; + color: #fff; + } + #tab-switcher { + margin-bottom: 4px; + } + #metaclicker-container { + position: absolute; + bottom: 20px; + right: 20px; + z-index: 100000; + text-align: center; + pointer-event: auto; + padding-top: 10px; + max-height: 75vh; + overflow-y: auto; + } + #metaclicker-container input { + max-width: 50px; + } + #metaclicker-minimize { + float: right; + margin: 0; + margin-top: -3px; + margin-left: -21px; + padding: 3px 8px; + } + .option.big-button { + width: 100%; + box-sizing: border-box; + margin-bottom: 5px; + } + .option.big-button.ac-active { + border: 1px solid #fff; + color: #fff; + text-shadow: none; + background-color: #222; + box-shadow: 0px 0px 1px 2px rgba(0,0,0,0.5), 0px 1px 4px rgba(0,0,0,0.25), 0px 2px 3px 1px rgba(0,0,0,0.5) inset; + } + .option.big-button.ac-active:hover { + border: 1px solid #fff; + color: #fff; + text-shadow: 0px 0px 4px #fff; + background-color: #2a2a2a; + } + .option.big-button.ac-active:active { + background-color: #111; + box-shadow: 0px 0px 1px 2px rgba(0,0,0,0.5), 0px 2px 4px rgba(0,0,0,0.25), 0px 3px 5px 2px rgba(0,0,0,0.5) inset; + } + .ac-details-hidden { + display: none; + } + .lb-warn { + color: rgb(255, 55, 24); + } + .block.lb-warn { + padding: 5px; + color: rgb(255, 55, 24); + border-color: rgb(255, 55, 24); + max-width: 200px; + margin-top: 5px; + } + .block.centered { + text-align: center; + } + .block.hotkey-details { + width: auto; + display: inline-block; + padding: 4px; + margin: 3px; + font-family: Courier,monospace; + background-color: #000; + color: #fff; + border: #fff solid 1px; + } + .click-limit-row { + display: inline-flex; + align-items: center; + gap: 4px; + } + .ac-prefs-row { + display: flex; + justify-content: center; + align-items: center; + gap: 16px; + margin-bottom: 2px; + } + .ac-sound-slider-label { + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; + gap: 4px; + line-height: 100%; + } + .ac-sound-slider-label input[type="range"] { + width: 100px; + margin: 0; + } + `, + applyStyles: function() { + if (l('game')) { l('game').appendChild(document.createElement('style')).innerHTML = this.styles; } + else { document.head.appendChild(document.createElement('style')).innerHTML = this.styles; } + }, + mockClick: function(x, y) { + // A real click at any arbitrary location on the page + // 1. Find the element at the given coordinates + const element = document.elementFromPoint(x, y); + + if (!element) { + return; + } + if (element.id === 'ac-enabled') { + // Do not click on the enabling button + return; + } + + // 2. Create the synthetic mouse events + // Dispatching a sequence of mousedown, mouseup, and click is most realistic + const eventOptions = { + view: window, + bubbles: true, + cancelable: true, + clientX: x, + clientY: y, + detail: 1 + }; + + const mousedownEvent = new MouseEvent('mousedown', eventOptions); + const mouseupEvent = new MouseEvent('mouseup', eventOptions); + const clickEvent = new MouseEvent('click', eventOptions); + + // 3. Dispatch the events to the target element + element.dispatchEvent(mousedownEvent); + element.dispatchEvent(mouseupEvent); + element.dispatchEvent(clickEvent); + }, + createHotkeys: function() { + this.Hotkey.initializeEventListeners(); + this.state.toggleHotkey = new this.Hotkey(e => { + this.state.enabled?this.disableAC():this.enableAC(); + if (l('ac-enabled')) { + l('ac-enabled').innerHTML = this.state.enabled ? loc('Click to disable') : loc('Click to enable'); + l('ac-enabled').classList.toggle('ac-active', this.state.enabled); + } + }); + this.state.bigCookieToggleHotkey = new this.Hotkey(e => { + this.state.bigCookieEnabled?this.disableBigCookieAC():this.enableBigCookieAC(); + if (l('big-cookie-ac-enabled')) { + l('big-cookie-ac-enabled').innerHTML = this.state.bigCookieEnabled ? loc('Click to disable') : loc('Click to enable'); + l('big-cookie-ac-enabled').classList.toggle('ac-active', this.state.bigCookieEnabled); + } + }); + }, + Hotkey: class Hotkey { + constructor(callback, defaultKeys = []) { + this.callback = callback; + this.keys = new Set(defaultKeys.map(e => e.toLowerCase())); + this.constructor.all.add(this); + if (!this.keys.isSubsetOf) { + // old browser + this.keys.isSubsetOf = function(keys) { + for (let key of keys) { + if (!this.has(key)) { + return false; + } + } + return true; + } + } + } + forceSetKeys(keys) { + this.keys = new Set(keys.map(e => e.toLowerCase())); + } + + toString() { + if (this.status === 'await') { + return loc('(press keys)'); + } + if (this.status === 'recording') { + return loc('(release to set)'); + } + if (!this.keys.size) { + return loc('(none)'); + } + return this.constructor.formatKeys(this.keys); + } + static formatKeys(keys) { + // Modifiers like Shift, Ctrl, go first, then keys, capitalized + keys = Array.from(keys); + const cap = str => str.charAt(0).toUpperCase() + str.slice(1); + return keys.filter(e => e.length > 1).map(cap).join('+') + + (keys.find(e => e.length === 1) && keys.find(e => e.length > 1)? '+' : '') + + keys.filter(e => e.length === 1).map(cap).join('+'); + } + status = 'set'; // "set" | "await" | "recording" + hooks = new Set(); + record(callback) { + if (this.status !== 'set') { + return; + } + this.status = 'await'; + this.hooks.add(callback); + } + trigger(keys) { + if (this.keys.size && this.keys.isSubsetOf(keys)) { + this.callback(keys); + } + } + + static all = new Set(); + static track = new Set(); + static initializeEventListeners() { + document.addEventListener('keydown', e => { + const key = e.key.toLowerCase(); + this.track.add(key); + let suppress = false; + for (let hotkey of this.all) { + if (hotkey.status !== 'set') { + suppress = true; + break; + } + } + if (suppress) e.preventDefault(); + for (let hotkey of this.all) { + if (hotkey.status === 'set') { + if (suppress) { continue; } + hotkey.trigger(this.track); + } + if (hotkey.status === 'await') { + hotkey.status = 'recording'; + hotkey.keys = new Set([key]); + hotkey.hooks.forEach(e => e(hotkey)); + } + if (hotkey.status === 'recording') { + hotkey.keys.add(key); + hotkey.hooks.forEach(e => e(hotkey)); + } + } + }); + document.addEventListener('keyup', e => { + this.track.delete(e.key.toLowerCase()); + for (let hotkey of this.all) { + if (hotkey.status === 'recording') { + hotkey.status = 'set'; + hotkey.hooks.forEach(e => e(hotkey)); + hotkey.hooks.clear(); + e.preventDefault(); + } + } + }) + } + toJSON() { + return Array.from(this.keys); + } + }, + TraversalPattern: class TraversalPattern { + constructor(id, pointList, spaceNodesList = [], speedMult, name, sizeMult) { + if (!Array.isArray(pointList)) throw new Error("pointList must be an array"); + if (pointList.length < 2) throw new Error("pointList must have at least 2 points"); + //if (!Array.isArray(spaceNodesList)) throw new Error("spaceNodesList must be an array"); + //if (spaceNodesList.length < 2) throw new Error("spaceNodesList must have at least 2 points"); + //if (spaceNodesList[0].d !== 0) throw new Error("spaceNodesList must start with a node at d=0"); + this.id = id; + let normalizationDist = 1; + pointList.forEach(e => { + const x = e.x ?? e.p[0]; + const y = e.y ?? e.p[1]; + normalizationDist = Math.max(normalizationDist, Math.sqrt(x * x + y * y) / sizeMult); + }); + this.normalizationDist = normalizationDist; + const formatHelper = n => { + // n is [x, y], convert to [direction, magnitude] + return [Math.atan2(n[1], n[0]), Math.sqrt(n[0] * n[0] + n[1] * n[1])]; + } + this.pointList = pointList + .map(e => { + return { + x: (e.x ?? e.p[0]) / normalizationDist, + y: (e.y ?? e.p[1]) / normalizationDist, + id: e.id ?? (formatHelper(e.tOut)[0]), // yes it's the opposite of what you think + im: e.im ?? (formatHelper(e.tOut)[1] / normalizationDist), + od: e.od ?? (formatHelper(e.tIn)[0] - Math.PI), + om: e.om ?? (formatHelper(e.tIn)[1] / normalizationDist), + }; + }) + .map(e => { + return new this.constructor.Point(e.x, e.y, e.id, e.im, e.od, e.om) + }); + this.speedMult = speedMult; + this.sizeMult = sizeMult; + this.totalTime = this.pointList.length - 1; + this.spaceNodesList = null; + this.spaceNodesListRaw = spaceNodesList; + //this.autoFillTangents(); + //this.initializeTable(); + this.name = name ?? 'Unknown pattern'; + } + autoFillTangents() { + const pts = this.pointList; + const n = pts.length; + const closed = n >= 2 && + pts[0].x === pts[n - 1].x && + pts[0].y === pts[n - 1].y; + + for (let i = 0; i < n; i++) { + const p = pts[i]; + const needIn = p.id == null || p.im == null; + const needOut = p.od == null || p.om == null; + if (!needIn && !needOut) continue; + + let vx, vy; + if (closed) { + // Wrap around, skipping the duplicate endpoint + const prevIdx = i === 0 ? n - 2 : i - 1; + const nextIdx = i === n - 1 ? 1 : i + 1; + vx = (pts[nextIdx].x - pts[prevIdx].x) / 2; + vy = (pts[nextIdx].y - pts[prevIdx].y) / 2; + } else if (i === 0) { + // Forward difference at the start of an open path + vx = pts[1].x - pts[0].x; + vy = pts[1].y - pts[0].y; + } else if (i === n - 1) { + // Backward difference at the end of an open path + vx = pts[n - 1].x - pts[n - 2].x; + vy = pts[n - 1].y - pts[n - 2].y; + } else { + // Central difference for interior points + vx = (pts[i + 1].x - pts[i - 1].x) / 2; + vy = (pts[i + 1].y - pts[i - 1].y) / 2; + } + + const mag = Math.sqrt(vx * vx + vy * vy); + const dir = Math.atan2(vy, vx); + + if (needIn) { + p.id = dir; + p.im = mag; + } + if (needOut) { + p.od = dir; + p.om = mag; + } + } + } + static basis = [ + [2, -2, 1, 1], + [-3, 3, -2, -1], + [0, 0, 1, 0], + [1, 0, 0, 0] + ] + static Point = class Point { + /** + * A point in the Hermite spline. + * @param {*} x - (-1, 1) + * @param {*} y - (-1, 1) + * @param {*} id - incoming velocity direction (radian). Right is 0, counterclockwise. null = auto-fill. + * @param {*} im - incoming velocity vector magnitude. null = auto-fill. + * @param {*} od - output velocity direction. null = auto-fill. + * @param {*} om - output velocity magnitude. null = auto-fill. + */ + constructor(x, y, id, im, od, om) { + this.x = x; + this.y = y; + this.id = id == null ? null : id % (2 * Math.PI); + if (this.id != null && this.id < 0) { + this.id = 2 * Math.PI + this.id; + } + this.im = im; + this.od = od == null ? null : od % (2 * Math.PI); + if (this.od != null && this.od < 0) { + this.od = 2 * Math.PI + this.od; + } + this.om = om; + } + pos() { + return [this.x, this.y]; + } + velIn() { + //return [this.id, this.im]; + return [Math.cos(this.id) * this.im, Math.sin(this.id) * this.im]; + } + velOut() { + //return [this.od, this.om]; + return [Math.cos(this.od) * this.om, Math.sin(this.od) * this.om]; + } + } + distTable = null; + spaceTable = null; + precision = 168; + spacePrecision = 64; + initializeTable() { + this.initializeDistTable(); + + this.spaceNodesList = this.spaceNodesListRaw.map(e => new this.constructor.SpaceNode(e.s, e.e, e.d / this.normalizationDist, e.k)); + if (this.spaceNodesList.length == 0) { + this.spaceNodesList = [ + new this.constructor.SpaceNode(1, 1, 0, 1), + new this.constructor.SpaceNode(1, 1, this.distTable[this.distTable.length - 1], 1) + ]; + } + this.initializeSpaceTable(); + } + initializeDistTable() { + const size = this.totalTime * this.precision; + this.distTable = new Float32Array(size); + let previousX = this.pointList[0].x; + let previousY = this.pointList[0].y; + this.distTable[0] = 0; + for (let i = 1; i < size; i++) { + const a = this.positionAt(i / this.precision); + const x = a[0][0]; + const y = a[0][1]; + //console.log(x, y); + this.distTable[i] = Math.sqrt((x - previousX) * (x - previousX) + (y - previousY) * (y - previousY)) + this.distTable[i - 1]; + previousX = x; + previousY = y; + } + } + initializeSpaceTable() { + const spaceSize = Math.ceil(this.distTable[this.distTable.length - 1] * this.spacePrecision); + this.spaceTable = new Float32Array(spaceSize); + this.spaceTable[0] = 0; + for (let i = 1; i < spaceSize; i++) { + const a = this.sIntAt(i / this.spacePrecision); + this.spaceTable[i] = a; + } + } + positionAt(t) { + // normalize t + t = t % this.totalTime; + if (t < 0) t += this.totalTime; + const offset = Math.floor(t); + t = t % 1; + if (t < 0) t += 1; + + //console.log(this.pointList[offset].velOut(), this.pointList[offset + 1].velIn()) + return this.matrixMultiply(this.matrixMultiply([[t * t * t, t * t, t, 1]], this.constructor.basis), [ + this.pointList[offset].pos(), + this.pointList[offset + 1].pos(), + this.pointList[offset].velOut(), + this.pointList[offset + 1].velIn() + ]); + } + tAt(dist) { + // binary search to find corresponding t to dist + dist = dist % this.distTable[this.distTable.length - 1]; + let low = 0; + let high = this.totalTime * this.precision - 1; + let best = 0; + while (low <= high) { + const mid = (low + high) >>> 1; + if (this.distTable[mid] < dist) { + best = mid; + low = mid + 1; + } else { + high = mid - 1; + } + } + // linearly interpolate + low = best; + high = low + 1; + // this could result in NaN due to duplicated point but in practice just don't have duplicated points ok + const t = (dist - this.distTable[low]) / (this.distTable[high] - this.distTable[low]); + return (low + t) / this.precision; + } + distAt(acc) { + // binary search to find the corresponding space to acc + acc = acc % this.spaceTable[this.spaceTable.length - 1]; + let low = 0; + let high = this.spaceTable.length - 1; + let best = 0; + while (low <= high) { + const mid = (low + high) >>> 1; + if (this.spaceTable[mid] < acc) { + best = mid; + low = mid + 1; + } else { + high = mid - 1; + } + } + // linearly interpolate + low = best; + high = low + 1; + const t = (acc - this.spaceTable[low]) / (this.spaceTable[high] - this.spaceTable[low]); + return (low + t) / this.spacePrecision; + } + static SpaceNode = class SpaceNode { + constructor(s, e, d, k) { + // Steepness specification: goes forward to the next node, + // so yes the k for the last node is irrelevant + this.s = s; + this.e = e; // ending space factor + this.d = d; + this.k = k; // higher k = more steep, t is bounded between 0 and 1 + this.kc = Math.exp(k / 2); + } + spaceStart() { + return this.s; + } + spaceEnd() { + return this.e; + } + dist() { + return this.d; + } + steepness() { + return this.k; + } + + static sCurve(ekd, kc) { + // ekd = Math.exp(k * d), kc is cached + return (kc * (ekd - 1)) / ((kc - 1) * (ekd + kc)); + } + static sCurveIntLocal(d, k, kc) { + // integral of the S curve from 0 to d, needs renormalization after output + if (k === 0) { return d * d / 2; } + return (1 / (kc - 1)) * ((kc + 1) / k * Math.log((Math.exp(k * d) + kc) / (1 + kc)) - d); + } + } + sIntAt(d) { + // Find the two relevant space nodes + let relevant = this.spaceNodesList.length - 1; + for (let i in this.spaceNodesList) { + // While a binary search scales better this should be fine + if (this.spaceNodesList[i].d > d) { + relevant = parseInt(i); + break; + } + } + + // Calculate cumulative space + const list = this.spaceNodesList; + let sum = 0; + for (let i = 0; i < relevant - 1; i++) { + const dd = list[i + 1].d - list[i].d; + const ds = Math.abs(list[i].e - list[i].s); + sum += 0.5 // integral over any s curve + * dd * ds + dd * Math.min(list[i].e, list[i].s); + } + + const low = this.spaceNodesList[relevant - 1]; + const high = this.spaceNodesList[relevant]; + sum += this.constructor.SpaceNode.sCurveIntLocal((d - low.d) / (high.d - low.d), low.k, low.kc) + * (high.d - low.d) * (low.e - low.s) + (d - low.d) * low.s; + //console.log((d - low.d) / (high.d - low.d), low.k, low.kc); + return sum; + } + + matrixMultiply(a, b) { + if (a[0].length !== b.length) throw new Error("Incompatible dimensions"); + const result = new Array(a.length).fill(0).map(() => new Array(b[0].length).fill(0)); + for (let i = 0; i < a.length; i++) { + for (let j = 0; j < b[0].length; j++) { + for (let k = 0; k < a[0].length; k++) { + result[i][j] += a[i][k] * b[k][j]; + } + } + } + return result; + } + static catalogue = []; // will be initialized in init() + static addToCatalogue(list) { + list.forEach(e => this.catalogue.push(e)); + } + static createFromData(data) { + const thisObject = this; + console.log(thisObject.decompress(data[1].points)); + return data.map(e => { + const d = thisObject.decompress(e.points); + return new thisObject(e.id, d.nodes + .concat(e.closed?Object.assign({}, d.nodes[0]):[]) + .map(i => Object.assign(i, { + id: (i.id == null || i.tIn) ? null : i.id * Math.PI, + od: (i.od == null || i.tOut) ? null : i.od * Math.PI + })), d.spaceNodes, e.speedMult, e.name, e.sizeMult) + }); + } + static decompress(points) { + if (typeof points !== 'string') { + return { nodes: points }; + } + if (!LZString) { + console.error('LZString not found'); + return []; + } + return JSON.parse(LZString.decompressFromBase64(points.trim())); + } + toJSON() { + return this.id; + } + }, + setTraversalPattern: function(pattern) { + pattern.initializeTable(); + this.state.traversalPattern = pattern; + this.track.lastClickSpot = null; + this.track.velX = 0; + this.track.velY = 0; + }, + traversalPatternsData: [ + { + id: 'point', + name: loc('Point'), + points: ` + N4IgbgpgTgzglgewHYgFwBYA0ICGBXAFwQDE4AbMtUAWwgIAsEATNEAMziTgIgFom4bNtAhIAxhBDYC+NAAZpo+MnkA6AKwBfbAAccDGGgDaoOC1QgkARikgEUJtHnYYMqAQByzCAElzlgCZbKAhIWElUNhwyGAhsAVcAFQQZSlQAgIAOVQC5OQB2TQBdFz0JL0dDVBMQPQY/VmtbKqtsCNaQcwUQAGs0K21QOvoGiyaXfrbJzrQM7NyC7D7UAZLLbyqas0ag3WMFOTWCHxRq3gCATlULgDZMgMwrG9V0dAD8o4B5QmNL67uHrwni83h9sPgiCc0AQoHg4rhCAhvgRobD4WROD0IOYYXDBiBtmN1LYdMZ1NkLlZ8g90ABmDQ3G4XI5Q6pyDRyW6YXi0+YBG5WL4/M7s9Scm6YXk5fmC8GI1m4+EQpHCxXYDFILE4tH4wmWGx7M5WVRyKyUzD5Z7odQZFmnIx/a2ZCUBY35TK09BClFnR3kiXnN0er1yyGnNUIojI1Fw9WY7ExiDFNpMADmEE2Rn1tiQQRKWaQxOwTXzgRzxKKa1TUAQeB0myKmiAA=== + `, + speedMult: 0.0, + sizeMult: 0.5, + closed: true + }, + { + id: 'circle', + name: loc('Circle'), + points: ` + N4IgbgpgTgzglgewHYgFwBYA0ICGBXAFwQDE4AbMtUAWwgIAsEATNEAMziTgIgFom4bNtAhIAxhBDYC+NAAZpo+MnkA6AKwBfbAAccDGGgDaoOC1QgkbKSARQm0NFhAwZUAgDlmEAJLnLYDZQEJCwkqhsOGQwENgCrgAqCDKUqABsAEwAHKpy6OoZmgC62DB6El4OhqgmIHoMfqxWNtUAjNjhcqpprQDM7SDmCiAA1mhamKD19I0WzaVqPf0dahkAnOi9cWgA7GvdeVnYY6gTU/oz/vMuqxtbIOED5q3q6qpraWtrx2i92ucNK7WBaoAaPbbpDJpbpQ+4nVr/OoXWaWYE3UErDGDNCZHJ5Ao/UHFbBIbzVWpmJqBXTGBS8VpyOQlEAEHwoGp7DRpNKYJnSADyhGMvE56m5vOZ+CIbLQkWisVwhAQgoIsqiMWwZE4Iwg5gIUDwEERlLm9BsOmFOy6OwZO0wIuttuZrPZRjFqihrTtvHdnp2zpVwt9PTtwa9kqVMoi6oVUuVQuj8s12t1aH1huNV0MNJq9MZEukUaMdNF3IDCeLmFLaQj0vZco1iqIgcTja1SB1eoNRsmIBNlgAVubLY65HaraobWPnUWfdC/faw/6BRWl5gl7WEFGG7GlS2d8mO6nUOme6Yrigc5WGXyWbPqwWWS2jA/b3HtzHsHH95+QO3O2m3aZk0lBXhOU7jqOy53q6c4eiG67ziG5aqjUa5wX6m4fkmTbxqhB5/imXYZr2/ZIHgw41Dej4urSVb7GKNYrqhlYigxZZfpG9a/t+CYEf+x6nsBcxohaHJQfaNq5FkLwzq6a4bsxQZIV6i4qdB77cThvH4b+AnEUazK6gA5hA5JGAENhIGaJQWdZVmGLZljZoOIBOUgQ4kig7mXpYlDuaBlgUe5FEktY7lokggRFMyxlQAgeA6OSRSaEAA== + `, + speedMult: 0.5, + sizeMult: 0.75, + closed: true + }, + { + id: 'infinity', + name: loc('Infinity'), + points: ` + N4IgbgpgTgzglgewHYgFwBYA0ICGBXAFwQDE4AbMtUAWwgIAsEATNEAYxwOrwoFooE1ENgL40ABhEQk8ZBIB0AVgC+2AA6d6MNAG1QcFqhBIAjMJAIoTaBOwxRUAgDlmEAJKHjZ7FAiRYEGgAZjhkMBDYTHD2ACoIopSoABwAnABM8ikpAGwqALp2GmwQLtbaqHogGgwerKbm5Sby6EnZAMzYgaji8tkmaSmRtiAA1mgqmKDV9LVG9XYKfQOdCuhrWCCGJv1KAxtjqBNTmrNeDavrK93yAOzZfUOoaYqKmUk3g6Pjqsc1nvMgco9O4PEBdJrvdAdTZoNoDeTiNpI7AHI5VE7/byAtAQm5Qq5ND5pJKPNqKG6ZdBpEwo76TdF/OpYxq3dIksGrG6KR5QprZFImG60w4/BkzTHna7oLlXHppbLibkww4mHrocTZdmo0XTU4AoHyeWK2WG9CKNKPckpW6KbJCr4i+m6iULa5pM0WjlSy7K7JUw03No0h1o51MyVqn3g+Rtdr2ww3EzoXoK/Z037i8Oupqxtr26PqlLxtBJDXyExB+3ap0YrPY1BNQv5nGPVIZLK5YUmZQFYyucqVAx1tS6XjbSS8XK9ghuFAVMfiSSq1nm6cAeUIulVE+XH1X2HwRFnwVC4QPhAQG4IJ7CERAZDgSBGEEMBCgeAgoqHczS5hH88UCdAOnY8AO5Xg4SUddNwqF5MEgxRe0PBBQLfD9zyIK80DQu8HyfF9sPfT96W/YwhHUXRJHEEC5x0XhAMwejqJELDYMkYCMJQuccM41iePvR9n1fIiv3+bQKLYzAOJAGdaPo8CEOg69YO5RTONQojeJg/i8KEwiP1EuooD/LdVUwKcRFAujt0wXcUn3GTWJ0GyFxXNIkIvUCQlvLTlO8s8BPw4SDJI/5rwk5yFUwZiZKsyQLMcmCdAnBLkI09DcAvPjNMCvTUBwwy5jAEyKnHRiEtkrdF0wJJyzZJTRxc2qTHq9S538u9kNYjrsF0gj8pE0K6jwEqdAYpiaN0OCIIyRCWKS+T4Nmjyj24nKuu0nK+uC4j9H+AAPUaqMmySJvm5S6IY6S0rWjKNuUnTBP6gqhrmFgIqYqSYsqlTGLUxKLsW/6bv0zqss2jLttBwrjECD6yoqqybOa1qAca6reBR4kVq4m8AvuvHcKenaYaQFJRrHKLvri8y5rRioUrpkGBru8GHq24nod7F8AHMIAHHQzmwJBfwKQWyfMeoxeMd7YZAaWkDh4xyYV39haEBXxOMYyFeM4XrwV4rhZGhXwuMYqFfI4xtAVkbhcOhXDuFlg8l7HmBDwNQBzyZQgA + `, + speedMult: 0.5, + sizeMult: 0.75, + closed: true + }, + { + id: 'ellipse', + name: loc('Ellipse'), + points: ` + N4IgbgpgTgzglgewHYgFwBYA0ICGBXAFwQDE4AbMtUAWwgIAsEATNEAMziTgIgFom4bNtAhIAxhBDYC+NAAZpo+MnkA6AKwBfbAAccDGGgDaoOC1QgkARikgEUJtHnYYMqAQByzCAElzlgA5bKAhIWElUNhwyGAhsAVcAFQQZSlQrAGYAuVUAdgA2OVzNAF0XPQkvR0NUExA9Bj9Wa1saq1U5K1yA7Aic/Kt1HpBzBRAAazQtTFAG+iaLFpc1AaHetHaAJlyrTfiN3IyO9U2M7EnUAE5tWf15/yWQNtVt3fXUI/R0Tfz9j/R1KpCrlLuc0NcZvU7gtLDZlh9VF8fu8chkMrlcn91F1VAF0BlfhNwTcoY0HnCnmo0RiUS8slgRmh8pccod8piiahNiS5jDHjUcqc8bTvps9ozUAF8kdupdxRcIbcyc0KQLEWLxRF2rk5AFxeYrHICaoMl91GDUPkedDya0NnldZqNn9drqNCDhgrrcrFqrnSAtS6sqzgRarKVsEhvDU6mZmkFdMZeIMFHIyiACD4ULUFMnNmnpAB5QjGBSu9P4IhZtBRGJxXCEBDFgg16KxbBkTjjCDmAhQPAQElxxYZWw6UtA9RyX6FdOZ7NGZPZTAFjPN4xWZerysIauRNv1nfr/d1jtdntoPsDocPdBjjdTyfTzC8QVdfJzvdGMv5ufH78vuW2A7nutbtg2RDHmB9adkg3a9v2g6QsOsL3jmT6/Lw6iXBo7Kfgum6pn+Ja1EuRHAY2oEHhRkEkdBZ5wReqBXkhpgPJsaGLimK74aWgG/kWJEAUBEG7tm9GiVB1EgLB8GXohN7NJcnH9FOM6rvOSaETxgktrU2nbpR4nSUedHSbJTEsYpiw4JxKYYS+b4FLxOaYCJBD/rmIkgcZp6SWZfkWQh17IQ8uQqQ5WE4eoeHSF+BnEXpXFbhWRmtn5pl6RJQXyde6Y9gA5hAMZGKhkYcWUpVIKOkZ3pVlh3pGNj1Ug4WRkELXKZGtktbZkbhS1HGRspLUJpYo4lOmBVQAgeA6DGbGsAV+S2FGjh+DGZWWEN42rXVLh4AARgA4jNc0bcY6Z6CESCZuYSB4BQ1kgAV9Crd4F21JYfWWG1gSrSNB0nWdOifUYV04Ddd1oA9T0lJoQA== + `, + speedMult: 0.75, + sizeMult: 0.75, + closed: true + }, + { + id: 'triangle', + name: loc('Triangle'), + points: ` + N4IgbgpgTgzglgewHYgFwBYA0ICGBXAFwQDE4AbMtUAWwgIAsEATNEAYxwOrwoFooE1ENgL40ARhEQk8ZGgAMAOgCsAX2wAHTvRhoA2qDgtUIJOOEgEUJtAXYYoqAQByzCAEljp89igRIsBBoAGY4ZDAQ2ExwDgAqCKKUqMriAJwqAByp6KoAuvZabBCuNrqoBiBaDJ6sZhZlAEzYQaiSIMby2ADWaBnqoFX0NSZ19hLNCooNylG9AGyKWehYID0Y/ZXaw971aE0gLW3G4gDsAMxT8mcZ3b0bg9ujIGVtLUrTs6jT6ScNN6toHKYAZbLxPRoTVqfM7oBboK6pW6oPrAzbVME+Z7jA6TD7tQFnBqLeTyfZrIEg9G1TEQnFQ/HJNKZbJI8R5bBINxlCpGakWDT6Tq8cQk/IgAjuFDlTryMUEADyhEFmFl2HwRElaAIUDwkVwhAQioIWp1erIcCQXQgxm1uo2vJGDX5+l4GQWc0wylV4s10pVcqNyu96oQvttepDgdQ4ew5st1pNdtRDtMZ2d5Tdig9Xrlvr0MoDSr9wYNYdNaoNUZjIDjVptpvZByYAHMINy9DsOU78h2kE6OWme6mLHVcmLmwI8BpublVEA== + `, + speedMult: 0.75, + sizeMult: 0.8, + closed: true + } + ], + Particle: class Particle { + constructor() { + this.x = 0; + this.y = 0; + this.r = 0; + this.z = 0; + this.dx = 0; + this.dy = 0; + this.dr = 0; + this.s = 1; // Scale + this.mt = 4; + this.t = 1e-30; // Increases by 1 / fps every frame, setting float to hint the engine + } + setX(x) { + this.x = x; + return this; + } + setY(y) { + this.y = y; + return this; + } + setZ(z) { + this.z = z; + return this; + } + setRot(radians) { + this.r = radians; + return this; + } + setDX(dx) { + this.dx = dx; + return this; + } + setDY(dy) { + this.dy = dy; + return this; + } + setDR(dr) { + this.dr = dr; + return this; + } + setScale(s) { + this.s = s; + return this; + } + setMT(mt) { + this.mt = mt; + return this; + } + deploy() { + this.t = 0; + Particle.all.add(this); + return this; + } + static create() { + return new this(arguments); + } + + draw(ctx) { + throw new Error('Unimplemented'); + } + static all = new Set(); + static drawAll(ctx, filter) { + let last = { + x: 0, + y: 0, + r: 0 + }; + ctx.save(); + for (let particle of this.all) { + if (!filter(particle)) { continue; } + + // Set up translations and rotations + ctx.translate(particle.x - last.x, particle.y - last.y); + //console.log(particle.x - last.x, particle.y - last.y); + ctx.rotate(particle.r); + particle.draw(ctx); + ctx.rotate(-particle.r); + + last = particle; + } + ctx.restore(); + } + update() { + this.x += this.dx / Game.fps; + this.y += this.dy / Game.fps; + this.r += this.dr / Game.fps; + this.t += 1 / Game.fps; + if (this.t > this.mt) { + this.die(); + } + } + die() { + this.constructor.all.delete(this); + } + static updateAll() { + for (let particle of this.all) { + particle.update(); + } + } + }, + ParticleTypes: Particle => ({ + Cookie: class CookieParticle extends Particle { + constructor() { + super(); + this.friction = 0; + this.xi = 0; + this.yi = 0; + this.ddy = 0; + this.url = ''; // For third party spritesheets by other mods + } + static create() { + return new this(arguments); + } + setDDY(ddy) { + this.ddy = ddy; + return this; + } + setFriction(friction) { + this.friction = friction; + return this; + } + setCookie(xi, yi) { + this.xi = xi * 48; + this.yi = yi * 48; + return this; + } + setURL(url) { + this.url = url; + return this; + } + + draw(ctx) { + ctx.globalAlpha = Math.sqrt(1 - (this.t / this.mt)); + //console.log(Pic(this.url || 'icons.png'), this.xi, this.yi, 48, 48, -24 * this.s, -24 * this.s, 48 * this.s, 48 * this.s); + ctx.drawImage(Pic(this.url || 'icons.png'), this.xi, this.yi, 48, 48, -24 * this.s, -24 * this.s, 48 * this.s, 48 * this.s); + //ctx.drawImage(Pic('icons.png'), 1, 1, 48, 48, 0, 0, 200, 200); + } + static trimHeight = Game.LeftBackground.canvas.height + 100; + static trimWidth = Game.LeftBackground.canvas.width + 100; + update() { + this.dy += this.ddy; + this.dy *= Math.pow(1 - this.friction, 1 / Game.fps); + if (this.y > this.constructor.trimHeight || this.x > this.constructor.trimWidth || this.x < -100) { + this.die(); + } + super.update(); + } + }, + Text: class TextParticle extends Particle { + constructor() { + super(); + this.z = 2; + this.content = ''; + this.fontSize = 20; + } + static create() { + return new this(arguments); + } + setContent(content) { + this.content = content; + return this; + } + setSize(size) { + this.fontSize = size; + return this; + } + + draw(ctx) { + ctx.globalAlpha = Math.sqrt(1 - (this.t / this.mt)); + ctx.font = `${this.fontSize}px Merriweather`; + ctx.fillText(this.content, 0, 0); + } + }, + Trail: class TrailParticle extends Particle { + constructor() { + super(); + this.z = 2; + } + static create() { + return new this(arguments); + } + draw(ctx) { + ctx.globalAlpha = Math.sqrt(1 - (this.t / this.mt)); + const old = ctx.globalCompositeOperation; + ctx.globalCompositeOperation = 'lighter'; + const shrink = 1 - (this.t / this.mt); + const size = 48 * this.s * shrink; + ctx.drawImage(Pic('glint.png'), -size / 2, -size / 2, size, size); + ctx.globalCompositeOperation = old; + } + } + }), + drawCustomParticles: function(z, ctx) { + // z of 0: draw normal particles + // z of 2: draw text particles and manual click particles + const that = this; + switch(z) { + case 0: + this.Particle.drawAll(ctx, p => p.z === 0); + break; + case 2: + this.Particle.drawAll(ctx, p => p.z === 2); + break; + default: + break; + } + }, + updateCustomParticles: function() { + this.Particle.updateAll(); + }, + syncPrefCheckboxes: function() { + const numbersCb = l('ac-prefs-numbers'); + const particlesCb = l('ac-prefs-particles'); + if (numbersCb && numbersCb.checked !== !!Game.prefs.numbers) { + numbersCb.checked = !!Game.prefs.numbers; + } + if (particlesCb && particlesCb.checked !== !!Game.prefs.particles) { + particlesCb.checked = !!Game.prefs.particles; + } + }, + injectParticleDrawPoint: function() { + this.ParticleTypes = this.ParticleTypes(this.Particle); + this.drawCustomParticles.bind(this); + + const func = Game.particlesDraw; + const str = func.toString(); + let unsafe = false; + if (str.includes(`function(z)`) && + str.includes(`ctx.restore();`) && + str.includes(`ctx.save();`) && + str.includes(`for (var i=0;i { + this.ParticleTypes.Cookie.trimHeight = Game.LeftBackground.canvas.height + 100; + this.ParticleTypes.Cookie.trimWidth = Game.LeftBackground.canvas.width + 100; + } + const observer = new MutationObserver(callback); + const element = Game.LeftBackground.canvas; + if (!element) { + console.error('Game.LeftBackground.canvas not found'); + return; + } + observer.observe(element, { + attributes: true, + attributeFilter: ['height', 'width'], + attributeOldValue: true, + }); + }, + injectParticleAddSuppression: function() { + const func = Game.particleAdd; + const str = func.toString(); + let unsafe = false; + if (str.includes('function(x,y,xd,yd,size,dur,z,pic,text') && + str.includes('cookies.push(cookie.icon);')) { + window.__test_particle_add_function = null; + eval('window.__test_particle_add_function = ' + str); + try { + for (let i = 0; i < 25; i++) { window.__test_particle_add_function(i, i, i, i, i, 6, i, i, i); } + } catch (e) { + console.log('injectParticleAddSuppression unsafe, switching to wrapping'); + unsafe = true; + } + } else { + unsafe = true; + } + if (unsafe) { + window.___old_particleAdd_func = func; + Game.particleAdd = function(x, y, d, yd, size, dur, z, pic, text) { + if (!metaclicker.track.defaultParticleAddSuppress) { + window.___old_particleAdd_func(x, y, d, yd, size, dur, z, pic, text); + } + } + } else { + eval('Game.particleAdd='+str.slice(0, str.indexOf('{') + 1) + '\nif (metaclicker.track.defaultParticleAddSuppress) { return; }\n' + str.slice(str.indexOf('{') + 1, str.length)); + } + }, + injectCookieSoundSuppress: function() { + // test for the following: `if (Game.prefs.cookiesound)`, `function()`, `if (Game.cookieClickSound>7) Game.cookieClickSound-=7;` + // if passes inject a return clause at the very beginning based on this.track.soundSuppressed, otherwise wrap with return clause + const func = Game.playCookieClickSound; + const str = func.toString(); + let unsafe = false; + if (str.includes('if (Game.prefs.cookiesound)') && + str.includes('if (Game.cookieClickSound>7) Game.cookieClickSound-=7;') && + str.includes('function()')) { + window.__test_cookie_sound_function = null; + eval('window.__test_cookie_sound_function = ' + str); + try { + for (let i = 0; i < 25; i++) { window.__test_cookie_sound_function(); } + } catch (e) { + unsafe = true; + } + } else { + unsafe = true; + } + if (unsafe) { + window.___old_cookieSound_func = func; + Game.playCookieClickSound = function() { + if (!metaclicker.track.soundSuppressed) { + var oldVol = Game.volume; + Game.volume = oldVol * metaclicker.state.soundMult / 100; + window.___old_cookieSound_func(); + Game.volume = oldVol; + } + } + } else { + eval('Game.playCookieClickSound='+str.slice(0, str.indexOf('{') + 1) + + '\nif (metaclicker.track.soundSuppressed) { return; }\n' + + 'var oldVol=Game.volume;Game.volume=oldVol*metaclicker.state.soundMult/100;\n' + + str.slice(str.indexOf('{') + 1, str.length - 1) + + '\nGame.volume=oldVol;}'); + } + }, + save: function() { + return JSON.stringify(this.state); + }, + load: function(data) { + if (!data) { + return; + } + const d = JSON.parse(data); + const excluded = new Set(['toggleHotkey', 'bigCookieToggleHotkey', 'traversalPattern']); + for (let i in d) { + if (excluded.has(i)) continue; + this.state[i] = d[i]; + } + this.state.toggleHotkey.forceSetKeys(d.toggleHotkey); + this.state.bigCookieToggleHotkey.forceSetKeys(d.bigCookieToggleHotkey); + this.setTraversalPattern(this.TraversalPattern.catalogue.find(e => e.id === d.traversalPattern) ?? this.TraversalPattern.catalogue[0]); + this.universalLoop(); + this.bigCookieLoop(); + switch(this.state.openedTab) { + case 'universal': + l('tab-universal')?.click?.(); + break; + case 'big-cookie': + l('tab-big-cookie')?.click?.(); + break; + } + } +}); +window.metaclicker = Game.mods.metaclicker; +} + +const LANG = { + "Point": "Point", + "Circle": "Circle", + "Infinity": "Infinity", + "Ellipse": "Ellipse", + "Triangle": "Triangle", + "Metaclicker v%1": "Metaclicker v%1", + "-": "-", + "Universal": "Universal", + "Big Cookie": "Big Cookie", + "Click to enable": "Click to enable", + "Toggle hotkey:": "Toggle hotkey:", + "(none)": "(none)", + "Record": "Record", + "Click interval (ms):": "Click interval (ms):", + "Click": "Click", + "times": "times", + "+": "+", + "Clicks per second:": "Clicks per second:", + "Some settings are restricted due to your leaderboard settings. To use the big cookie autoclicker, you must hold down your mouse over the big cookie for it to activate.": "Some settings are restricted due to your leaderboard settings. To use the big cookie autoclicker, you must hold down your mouse over the big cookie for it to activate.", + "Click cap:": "Click cap:", + "Faithful": "Faithful", + "Hacker": "Hacker", + "God mode": "God mode", + "Click mode:": "Click mode:", + "Automatic": "Automatic", + "Hover over": "Hover over", + "Held down": "Held down", + "Visuals:": "Visuals:", + "Hidden": "Hidden", + "Vanilla": "Vanilla", + "Enhanced": "Enhanced", + "Ultra": "Ultra", + "Traversal pattern:": "Traversal pattern:", + "Speed multiplier:": "Speed multiplier:", + "Reverse direction": "Reverse direction", + "Constant travel speed": "Constant travel speed", + "Trail particles": "Trail particles", + "Numbers": "Numbers", + "Particles": "Particles", + "Click sound": "Click sound", + "Leaderboard mode: %1": "Leaderboard mode: %1", + "Click to disable": "Click to disable", + "Leaderboard settings": "Leaderboard settings", + "Leaderboard mode: ": "Leaderboard mode: ", + "None": "None", + "Competitive": "Competitive", + "Finnless": "Finnless", + "General": "General", + "Dashnet Forums Cookie Clicker Leaderboards": "Dashnet Forums Cookie Clicker Leaderboards", + "Leaderboard modes are setting restrictions on the autoclicker, based on the %1.": "Leaderboard modes are setting restrictions on the autoclicker, based on the %1.", + "If you choose any leaderboard mode other than \"none\", some of your settings will be restricted.": "If you choose any leaderboard mode other than \"none\", some of your settings will be restricted.", + "The big cookie autoclicker's click mode will be forced to \"Held down\" in all leaderboards, and the click cap will be set to \"Faithful\".": "The big cookie autoclicker's click mode will be forced to \"Held down\" in all leaderboards, and the click cap will be set to \"Faithful\".", + "In addition, you cannot use the autoclicker in the competitive leaderboard.": "In addition, you cannot use the autoclicker in the competitive leaderboard.", + "Leaderboard mode selection is permanent. Once set, it cannot be changed for this save. Wiping save will reset leaderboard modes.": "Leaderboard mode selection is permanent. Once set, it cannot be changed for this save. Wiping save will reset leaderboard modes.", + "Warning: Once you select a leaderboard mode, it becomes permanent and cannot be changed later, even if you ascend!": "Warning: Once you select a leaderboard mode, it becomes permanent and cannot be changed later, even if you ascend!", + "You will not join the leaderboard automatically. This mod will not prevent you from breaking any leaderboard rules and is not proof of eligibility. Make sure that you have already followed the rules for your leaderboard of choice. To join, follow the instructions by clicking on this link.": "You will not join the leaderboard automatically. This mod will not prevent you from breaking any leaderboard rules and is not proof of eligibility. Make sure that you have already followed the rules for your leaderboard of choice. To join, follow the instructions by clicking on this link.", + "Confirm leaderboard mode": "Confirm leaderboard mode", + "You are about to set your leaderboard mode to %1.": "You are about to set your leaderboard mode to %1.", + "This choice is permanent and irreversible. You will not be able to switch leaderboards or change this setting later.": "This choice is permanent and irreversible. You will not be able to switch leaderboards or change this setting later.", + "To confirm, please sort all words in the following phrase in alphabetical order separated by spaces, then type it in the box below.": "To confirm, please sort all words in the following phrase in alphabetical order separated by spaces, then type it in the box below.", + "Type the confirmation phrase above": "Type the confirmation phrase above", + "Confirm selection": "Confirm selection", + "I understand and accept": "I understand and accept", + "Phrase does not match. Please try again.": "Phrase does not match. Please try again.", + "All done!": "All done!", + "Cancel": "Cancel", + "Click cap explanation": "Click cap explanation", + "Click speed is capped to 50 clicks per second regardless what you set the interval to, which is what the game normally caps all autoclickers to.": "Click speed is capped to 50 clicks per second regardless what you set the interval to, which is what the game normally caps all autoclickers to.", + "The autoclicker can click as fast as 1,000 clicks per second, which is not possible with any external autoclickers. Some people may consider this cheating.": "The autoclicker can click as fast as 1,000 clicks per second, which is not possible with any external autoclickers. Some people may consider this cheating.", + "\"Click interval\" is replaced with \"Clicks per second\", allowing you to click as fast as your CPU can handle. You will also get the Cheated Cookies Taste Awful shadow achievement.": "\"Click interval\" is replaced with \"Clicks per second\", allowing you to click as fast as your CPU can handle. You will also get the Cheated Cookies Taste Awful shadow achievement.", + "Got it": "Got it", + "Are you sure?": "Are you sure?", + "You will get the %1 achievement. Are you sure you want to enable it?": "You will get the %1 achievement. Are you sure you want to enable it?", + "I'm aware of the consequences, proceed": "I'm aware of the consequences, proceed", + "Nevermind": "Nevermind", + "...": "...", + "(press keys)": "(press keys)", + "(release to set)": "(release to set)" +} + +const LANG_CN = Object.assign({}, LANG); // translate later + +if (typeof Game !== 'undefined' && Game && Game.ready) { r(); } +else { + const int = setInterval(() => { + if (typeof Game !== 'undefined' && Game && Game.ready) { + r(); + clearInterval(int); + } + }, 100); +} +})(); diff --git a/garden-178.png b/garden-178.png new file mode 100644 index 0000000..633f7b1 Binary files /dev/null and b/garden-178.png differ diff --git a/garden-179.png b/garden-179.png new file mode 100644 index 0000000..b45fb7b Binary files /dev/null and b/garden-179.png differ diff --git a/gardengarden.webp b/gardengarden.webp new file mode 100644 index 0000000..6e3f98c Binary files /dev/null and b/gardengarden.webp differ diff --git a/glow.png b/glow.png index f41cc85..1d064c4 100644 Binary files a/glow.png and b/glow.png differ diff --git a/kaizo.js b/kaizo.js index 52c481e..39914a8 100644 --- a/kaizo.js +++ b/kaizo.js @@ -221,7 +221,7 @@ Game.registerMod("Kaizo Cookies", { kaizoCookies = this; if (App) { if (CrumbsEngineLoaded) { this.header(); } else { Game.Notify('Incorrect loading order!', 'Please restart the game, and load Crumbs Engine before Kaizo cookies.', 0); } return; } if (typeof CrumbsEngineLoaded === 'undefined' || !CrumbsEngineLoaded) { - try { Game.LoadMod((window.kaizo_load_local)?'./Crumbs.js':'https://cursedsliver.github.io/Crumbs-engine/Crumbs.js'); } catch (err) { Game.Notify('Crumbs engine failed to load!', 'Critical prerequisite failed to load; mod loading halted', 0); console.log(err); } + try { Game.LoadMod((window.kaizo_load_local)?'./Crumbs.js':'https://yeetdragon24.github.io/Old-crumbs/Crumbs.js'); } catch (err) { Game.Notify('Crumbs engine failed to load!', 'Critical prerequisite failed to load; mod loading halted', 0); console.log(err); } } //the cccem solution, fixes import corruption on mod load @@ -390,13 +390,10 @@ Game.registerMod("Kaizo Cookies", { metaTag.content = 'initial-scale=0.5'; document.head.appendChild(metaTag); - - l('game').style.touchAction = 'manipulation'; - l('game').style.webkitUserSelect = 'none'; - l('game').style.userSelect = 'none'; - - Game.Notify('Mobile', '', 0, 100000000, false, true); } + l('wrapper').style.touchAction = 'none'; //'manipulation'; + l('wrapper').style.webkitUserSelect = 'none'; + l('wrapper').style.userSelect = 'none'; } this.paused = false; this.lastPause = 0; @@ -406,7 +403,7 @@ Game.registerMod("Kaizo Cookies", { addLoc('On cooldown (%1s left)'); this.togglePause = function() { if (Game.OnAscend) { return; } - if (Game.T - kaizoCookies.lastPause < 0.25 * Game.fps && !kaizoCookies.paused) { Game.Notify(loc('Too soon!'), '', 0, 1); return; } + if (Game.T - kaizoCookies.lastPause < 0.2 * Game.fps && !kaizoCookies.paused) { Game.Notify(loc('Too soon!'), '', 0, 1); return; } if (kaizoCookies.paused) { kaizoCookies.unpauseGame(); } else { @@ -420,9 +417,11 @@ Game.registerMod("Kaizo Cookies", { if (decay.pausingCooldown) { decay.pausingCooldown--; } }); this.skippedGameCanOnPause = ['openStats', 'closeNotifs']; + this.skippedGameCanOnPauseWithEasyPurchases = ['openStats', 'closeNotifs', 'buyUpgrades', 'buyAllUpgrades', 'castSpells', 'changeTickspeed', 'closeMinigames', 'interactDragon', 'levelUpBuildings', 'plant', 'refillMinigames', 'scrollNews', 'selectSeeds', 'sellGoods', 'slotAuras', 'slotGods', 'takeLoans', 'toggleAutoClaim', 'togglePowerchannel', 'toggleUpgrades', 'upgradeOffice', 'useGardenTools', 'viewMinigames']; let gamePauseL = document.createElement('div'); addLoc('GAME PAUSED'); - gamePauseL.innerText = loc('GAME PAUSED'); + addLoc('(Shift + C to pause or unpause)'); + gamePauseL.innerHTML = '
'+loc('(Shift + C to pause or unpause)')+'
'+loc('GAME PAUSED'); gamePauseL.id = 'gamePauseText'; gamePauseL.classList.add('title'); gamePauseL.classList.add('gamePauseText'); @@ -433,15 +432,15 @@ Game.registerMod("Kaizo Cookies", { decay.gamePauseL.style.display = 'none'; this.pauseGame = function() { if (kaizoCookies.paused) { return; } - decay.gamePausedCount++; if (!window.PauseGame) { Game.Notify('Prerequisite mod not yet loaded!', 'You cannot pause the game yet, as P for Pause has not yet been loaded. If this continues, check your internet connection.', 0, 4); return; } + decay.gamePausedCount++; PauseGame(); kaizoCookies.paused = true; for (let i in decay.gameCan) { kaizoCookies.prepauseAllowanceSettings[i] = decay.gameCan[i]; - if (!kaizoCookies.skippedGameCanOnPause.includes(i)) { decay.gameCan[i] = false; } + if (!kaizoCookies[decay.prefs.easyPurchases?'skippedGameCanOnPauseWithEasyPurchases':'skippedGameCanOnPause'].includes(i)) { decay.gameCan[i] = false; } } - decay.gamePauseL.style.display = ''; + if (!Crumbs.mobile) { decay.gamePauseL.style.display = ''; } } this.unpauseGame = function() { if (!kaizoCookies.paused) { return; } @@ -450,8 +449,23 @@ Game.registerMod("Kaizo Cookies", { for (let i in decay.gameCan) { decay.gameCan[i] = kaizoCookies.prepauseAllowanceSettings[i]; } - decay.gamePauseL.style.display = 'none'; + if (!Crumbs.mobile) { decay.gamePauseL.style.display = 'none'; } } + eval('Game.Upgrade.prototype.buy='+Game.Upgrade.prototype.buy.toString().replace('if (this.bought && this.activateFunction) this.activateFunction();', 'if (this.bought && this.activateFunction) this.activateFunction(); if (kaizoCookies.paused && success) { Game.RebuildUpgrades(); }')); + addLoc('It looks like you weren\'t there, so your game was paused automatically!'); + decay.lastVisible = Date.now(); + Game.visible = !document.hidden; + Game.registerHook('logic', function() { + if (Game.visible) { + decay.lastVisible = Date.now(); + return; + } + if (decay.prefs.autoPause && !kaizoCookies.paused && !Game.OnAscend && (Crumbs.lastUpdate + 5000 < Date.now() || decay.lastVisible + 5000 < Date.now())) { + if (decay.pausingCooldown && decay.prefs.autoPause) { return; } + Game.Notify(loc('Game automatically paused'), loc('It looks like you weren\'t there, so your game was paused automatically!'), 0); + kaizoCookies.pauseGame(); + } + }) addLoc('Assist option; shortcuts: Shift+C OR Shift+P'); addLoc('Pause'); addLoc('Unpause'); addLoc('Times paused: '); @@ -588,7 +602,14 @@ Game.registerMod("Kaizo Cookies", { scrollWrinklers: 1, touchpad: 0, comp: 0, - powerClickShiftReverse: 0 + powerClickShiftReverse: 0, + easyPurchases: 0, + autoPause: 1, + fatigueWarning: 1, + bigSouls: 0, + bigOrbs: 1, + slowSouls: 0, + slowOrbs: 0 } Game.TCount = 0; @@ -666,6 +687,7 @@ Game.registerMod("Kaizo Cookies", { Game.Notify('Elder Pledge restored!', '', 0); } } + if (decay.effectiveHalt > 3.6 && Game.Has('Purity bakery')) { decay.purifyAll(1 + 0.1 / Game.fps, 0.05 / Game.fps, 1); } if (decay.times.sinceLastPurify > 30) { decay.bankedPurification += Game.auraMult('Fierce Hoarder') / (4 * Game.fps * Math.pow(1 + decay.bankedPurification, 0.5)); } decay.gen = decay.mults[20]; decay.cpsDiff = decay.gen; @@ -834,8 +856,9 @@ Game.registerMod("Kaizo Cookies", { mult *= decay.getPurificationMult(); let u = false; if (Game.Has('Unshackled Purity')) { u = true; } + if (Game.Has('Purity factory')) { cap *= 1.5; } for (let i in decay.mults) { - if (decay.purify(i, mult + decay.bankedPurification, 1 - Math.pow(1 / (1 + decay.bankedPurification), 0.5) * (1 - close), cap * (1 + decay.bankedPurification), u, true)) { decay.triggerNotif('purityCap'); } + if (decay.purify(i, mult + decay.bankedPurification, 1 - Math.pow(1 / (1 + decay.bankedPurification), 0.5) * (1 - close), cap * (1 + decay.bankedPurification / 3), u, true)) { decay.triggerNotif('purityCap'); } } decay.bankedPurification *= 0.5; if (Game.hasGod) { @@ -888,7 +911,7 @@ Game.registerMod("Kaizo Cookies", { } decay.haltChannel = function(obj) { this.decMult = 1; //multiplier to decrease - this.overtimeLimit = 18; + this.overtimeLimit = 10000; this.factor = 0.2; //more = faster that decay recovers from decreasing effective halt this.keep = 0.35; //fraction of halt each stop kept as overtime this.tickspeedPow = 0.25; //represents the amount that the current tickspeed affects its effectiveness, more = more effect @@ -909,7 +932,7 @@ Game.registerMod("Kaizo Cookies", { } decay.haltChannel.prototype.addHalt = function(val) { this.halt = Math.max(this.halt, val); - this.overtime = Math.min(this.overtimeLimit, this.overtime + this.halt * this.keep); + this.overtime = Math.min(this.overtimeLimit * Game.eff('haltPower'), this.overtime + this.halt * this.keep); } decay.haltChannel.prototype.recover = function(mult) { const decHalt = decay.decHalt * Math.pow(Math.max(decay.rateTS / Math.pow(decay.acceleration, 0.75), 1), this.tickspeedPow) * this.decMult / Game.fps; @@ -921,9 +944,14 @@ Game.registerMod("Kaizo Cookies", { } } decay.haltChannel.prototype.getEffectiveHalt = function() { - return Math.min(Math.pow(this.halt + this.overtime * this.overtimeEfficiency, this.factor), this.haltMax) * this.power; + return Math.min(Math.pow(this.halt + this.overtime * this.overtimeEfficiency, this.factor), this.haltMax) * (typeof this.power === 'function'?this.power():this.power); } - decay.halts['click'] = new decay.haltChannel({}); + decay.halts['click'] = new decay.haltChannel({ + overtimeLimit: 18, + power: function() { + return 1 + Game.Has('Purity stand') * 0.1; + } + }); Crumbs.fallingCookieOnclick = function() { if (Game.prefs.particles) { Crumbs.spawnFallingCookie(0, -64, 0, 0, 2, 'fallingCookie', false, 1, 0); } Crumbs.spawnFallingCookie(0, 0, Math.random()*-2-2, Math.random()*4-2, 1, 'clickedCookie', true, Math.pow(decay.halts.click.overtime / decay.halts.click.overtimeLimit, 1) * 1.25 * (Math.random() * 0.2 + 0.9), 20); @@ -1061,10 +1089,19 @@ Game.registerMod("Kaizo Cookies", { decay.amplify(i, mult, anticlose); } } + addLoc('Fatigue warning (%1%)'); + decay.warningThresholds = [0.5, 0.8, 0.9, 0.95, 0.98, 0.99]; decay.work = function(amount) { //working increases fatigue - if (Game.cookiesEarned < decay.featureUnlockThresholds.fatigue || Game.hasBuff('Power poked')) { return; } - if (!amount) { amount = 1; } + if (Game.cookiesEarned < decay.featureUnlockThresholds.fatigue || decay.exhaustion || Game.hasBuff('Power poked')) { return; } + if (!amount) { amount = 0; } + if (decay.prefs.fatigueWarning) { + const prev = decay.fatigue / decay.fatigueMax; + const post = (decay.fatigue + amount) / decay.fatigueMax; + for (let i in decay.warningThresholds) { + if (prev < decay.warningThresholds[i] && post >= decay.warningThresholds[i]) { Game.Notify(loc('Fatigue warning (%1%)', Beautify(decay.warningThresholds[i] * 100)), '', 0, 6); } + } + } decay.fatigue += amount; if (decay.fatigue >= decay.fatigueMax && !decay.exhaustion) { decay.fatigue = 0; decay.exhaust(); } decay.times.sinceLastWork = 0; @@ -1248,17 +1285,12 @@ Game.registerMod("Kaizo Cookies", { } decay.halt = 0; decay.haltOvertime = 0; - decay.bankedPurification = 0; decay.momentum = 1; for (let i in decay.times) { decay.times[i] = 1000; } decay.cpsList = []; decay.multList = []; decay.bankedPurification = 0; decay.incMult = 0.001; - decay.hasEncounteredNotif = false; - for (let i in decay.prefs.preventNotifs) { - decay.prefs.preventNotifs[i] = false; - } decay.power = 0; for (let i in decay.challenges) { if (decay.challenges[i].reset) { decay.challenges[i].reset(); } @@ -1290,6 +1322,11 @@ Game.registerMod("Kaizo Cookies", { decay.onAscending(); + decay.hasEncounteredNotif = false; + for (let i in decay.prefs.preventNotifs) { + decay.prefs.preventNotifs[i] = false; + } + decay.NGMState = 0; decay.NGMResets = 0; decay.cookiesTotalNGM = 0; @@ -1300,6 +1337,8 @@ Game.registerMod("Kaizo Cookies", { decay.spellsCastTotalNGM = 0; decay.harvestsTotalNGM = 0; + kaizoCookies.lastPause = 0; + for (let i in Game.Objects) { Game.Objects[i].everUnlocked = false; } @@ -1356,7 +1395,7 @@ Game.registerMod("Kaizo Cookies", { decay.killAllPowerOrbs(); - decay.prefs.preventNotifs.ascendReminder = 1; + decay.prefs.preventNotifs.ascendReminder = true; if (decay.gen >= 21) { Game.Win("Corrupted and tainted"); } @@ -1387,6 +1426,12 @@ Game.registerMod("Kaizo Cookies", { decay.fatigue = 0; decay.exhaustion = 0; + if (Game.Has('Click-o-meter')) { l('clickHaltDisplayContainer').style.display = ''; } + + decay.bankedPurification = 0; + + kaizoCookies.lastPause = 0; + decay.ascendUtenglobe(); decay.removeAllWrinklerSouls(); @@ -1397,19 +1442,19 @@ Game.registerMod("Kaizo Cookies", { if (decay.challengeStatus('pledge')) { Game.Upgrades['Touch of force [ACTIVE]'].buy(); } decay.boundlessSackOrbCount = 0; - if (Game.Has('Virtues')) { Game.Upgrades['Boundless sack'].bought = 1; } - Game.Upgrades['Boundless sack'].icon = [34, 12]; for (let i in Game.Objects) { Game.Objects[i].everUnlocked = false; } decay.checkBuildingEverUnlocks(); + decay.dragonGutsKBMeter = decay.dragonGutsKBMeterMax; + decay.grabbedObj = []; decay.stop(5); decay.stop(5, 'wSoul'); - decay.resetAll(1); + decay.resetAll(1 + (Game.Has('Purity chips')?(Math.min(Math.log10(Game.heavenlyChips + 1), 19)):0)); decay.broken = 1; decay.gen = 1; @@ -1417,7 +1462,14 @@ Game.registerMod("Kaizo Cookies", { decay.performConditionalInits(); } + decay.onAfterReincarnation = function() { + if (Game.Has('Virtues')) { Game.Upgrades['Boundless sack'].bought = 1; } + Game.Upgrades['Boundless sack'].icon = [34, 12]; + + decay.setRates(); + } Game.registerHook('reset', decay.onReincarnation); + Game.registerHook('reincarnate', decay.onAfterReincarnation); Game.registerHook('reset', function(hard) { if (kaizoCookies.paused) { kaizoCookies.togglePause(); } if (hard) { decay.wipeSave(); } }); eval('Game.HardReset='+Game.HardReset.toString().replace('Game.lumpRefill=0;', 'Game.lumpRefill=0; decay.setRates();')); decay.getCpSBoostFromPrestige = function() { @@ -1557,7 +1609,7 @@ Game.registerMod("Kaizo Cookies", { }, powerOrb: { title: 'Power orbs', - desc: 'This is the power orb that the Power click heavenly upgrade was talking about! Easy clicks and easy wrinklers are disabled while you can perform a power click.', + desc: 'This is the power orb that the Power click heavenly upgrade was talking about! Easy clicks and easy wrinklers are disabled while you can perform a power click. You can also click them with the space bar.', icon: 0 }, dragonflight: { @@ -1567,7 +1619,7 @@ Game.registerMod("Kaizo Cookies", { }, godzamok: { title: 'Godzamok reminder', - desc: 'Reminder that Godzamok\'s buff stacks with itself strength wise, even when the buff tooltip doesn\'t say!', + desc: 'Reminder that Godzamok\'s buff stacks with itself strength wise with each consecutive sell!', icon: [23, 18] }, fatigue: { @@ -1677,7 +1729,7 @@ Game.registerMod("Kaizo Cookies", { //if (decay.momentum > 1.001) { decay.triggerNotif('momentum'); } if (decay.momentum > 7.5) { decay.triggerNotif('momentumPlus'); } //if (Game.prestige > 1000000) { decay.triggerNotif('degradation'); } - if (Game.resets < 1 && decay.gen < 0.001 && Game.cookiesEarned > 1e14) { decay.triggerNotif('ascendReminder'); } + if (Game.resets < 1 && decay.gen < 0.001 && Game.cookiesEarned > 10000000 * Math.pow(decay.minimumPrestigeAmountToAscend, Game.HCfactor)) { decay.triggerNotif('ascendReminder'); } } Game.registerHook('logic', decay.checkTriggerNotifs); decay.onWin = function(what) { @@ -1715,6 +1767,66 @@ Game.registerMod("Kaizo Cookies", { } l(button).className='smallFancyButton prefButton option'+((decay.prefs[prefName]^invert)?'':' off'); } + decay.prefPreset = function(name, desc, turnOns, turnOffs) { + this.name = name; + this.desc = desc; + this.turnOns = turnOns; + this.turnOffs = turnOffs; + this.turnOnStr = ''; + for (let i in this.turnOns) { + this.turnOnStr += '' + decay.prefToNameMap[this.turnOns[i]] + ', '; + } + this.turnOnStr = this.turnOnStr.slice(0, this.turnOnStr.length - 2); + this.turnOffStr = ''; + for (let i in this.turnOffs) { + this.turnOffStr += '' + decay.prefToNameMap[this.turnOffs[i]] + ', '; + } + this.turnOffStr = this.turnOffStr.slice(0, this.turnOffStr.length - 2); + + decay.prefPresets.push(this); + } + decay.prefToNameMap = { + easyPurchases: loc('Convenient purchasing'), + widget: loc('Informational widget'), + typingDisplay: loc('Typing display'), + fatigueWarning: loc('Fatigue warning'), + bigSouls: loc('Big souls'), + slowSouls: loc('Slow souls'), + bigOrbs: loc('Big orbs'), + slowOrbs: loc('Slow orbs'), + comp: loc('Competition mode'), + wipeOnInf: loc('Wipe save on infinite decay') + } + addLoc('Are you sure?'); + addLoc('You are about to apply the preset "%1"'); + addLoc('Applying this preset will have the following changes:'); + addLoc('%1 will be turned ON'); + addLoc('%1 will be turned OFF'); + decay.prefPreset.prototype.getPrompt = function() { + //prompt when clicking to confirm and verify the settings that will be changed + Game.Prompt(`

${loc('Are you sure?')}

${loc('You are about to apply the preset "%1"', this.name)}.
"${this.desc}"
+
+ ${loc('Applying this preset will have the following changes:')}
+ ${loc('%1 will be turned ON', this.turnOnStr)}
+ ${loc('%1 will be turned OFF', this.turnOffStr)} +
`, [[loc('Yes!'), 'decay.prefPresets['+decay.prefPresets.indexOf(this)+'].apply();Game.ClosePrompt();'], [loc('Nevermind')]], 0, 'widePrompt'); + } + decay.prefPreset.prototype.apply = function() { + for (let i in this.turnOns) { + decay.prefs[this.turnOns[i]] = 1; + } + for (let i in this.turnOffs) { + decay.prefs[this.turnOffs[i]] = 0; + } + Game.UpdateMenu(); + } + decay.prefPresets = []; + decay.lockedPreset = null; + addLoc('Accessible'); addLoc('Intended / Default'); addLoc('True comp'); addLoc('True kaizo'); + new decay.prefPreset(loc('Accessible'), loc('A friendly and smooth experience, containing all the QoL and assistance tools available.'), ['easyPurchases', 'fatigueWarning', 'typingDisplay', 'widget', 'bigSouls', 'bigOrbs', 'slowSouls', 'slowOrbs'], ['wipeOnInf', 'comp']); + new decay.prefPreset(loc('Intended / Default'), loc('The original designed experience of this mod, with QoL but minimal assistance tools.'), ['fatigueWarning', 'typingDisplay', 'widget', 'bigOrbs'], ['wipeOnInf', 'easyPurchases', 'comp', 'bigSouls', 'slowSouls', 'slowOrbs']); + new decay.prefPreset(loc('True comp'), loc('A somewhat challenging experience, with a limited capacity to pause the game.'), ['typingDisplay', 'comp', 'widget'], ['fatigueWarning', 'wipeOnInf', 'easyPurchases', 'bigSouls', 'bigOrbs', 'slowSouls', 'slowOrbs']); + new decay.prefPreset(loc('True kaizo'), loc('A challenging experience, with a limited access to information and only one live!'), ['comp', 'wipeOnInf'], ['typingDisplay', 'fatigueWarning', 'widget', 'easyPurchases', 'bigSouls', 'bigOrbs', 'slowSouls', 'slowOrbs']); decay.writePrefButton = function(prefName,button,on,off,callback,invert) { //I love stealing code from orteil var invert=invert?1:0; @@ -1726,6 +1838,9 @@ Game.registerMod("Kaizo Cookies", { if (!decay.prefs.preventNotifs[decay.notifs[prefName].pref]) { return ''; } return ''+decay.notifs[prefName].title+''; } + addLoc('Kaizo cookies settings'); + addLoc('Invoking a difficulty preset configures your Kaizo cookies settings, and can be readjusted at any time. Presets do not override all settings.'); + addLoc('Difficulty presets:'); addLoc('Ascend on infinite decay'); addLoc('Wipe save on infinite decay'); addLoc('Upon reaching infinite decay, ascend without gaining any prestige or heavenly chips'); @@ -1746,25 +1861,67 @@ Game.registerMod("Kaizo Cookies", { addLoc('Shows a more accurate timer of the legacy started stat.'); addLoc('none.
(You can see and replay information snippets you\'ve collected throughout the game here. The first one occurs at 5,555 cookies baked this ascension.)'); addLoc('Typing display'); - addLoc('Shows your keyboard inputs in real time.'); + addLoc('Shows your keyboard inputs in real time. Only works with the Script writer heavenly upgrade.'); addLoc('Shift to Power click'); addLoc('Instead of holding shift to prevent power clicks from being used, have power clicks only enabled while holding shift'); addLoc('Competition mode'); - addLoc('Adds limitations to pausing; adds a 1 minute, 30 seconds long cooldown to pausing the game.'); + addLoc('Adds a 1 minute, 30 seconds long cooldown to pausing the game.'); + addLoc('Convenient purchasing'); + addLoc('Assist option; allows you to perform simple actions such as purchasing upgrades, interacting with minigames, and using switches while paused.'); + addLoc('Auto pause on leave'); + addLoc('Automatically pauses the game if it detects that you haven\'t been looking at it for 5 seconds.'); + addLoc('Fatigue warning'); + addLoc('Warns you about how close you are to becoming exhausted upon reaching certain fatigue thresholds.'); + addLoc('Big souls'); + addLoc('Assist option; all wrinkler souls are much bigger'); + addLoc('Big orbs'); + addLoc('Assist option; all power orbs are much bigger'); + addLoc('Slow souls'); + addLoc('Assist option; all wrinkler souls are significantly slower'); + addLoc('Slow orbs'); + addLoc('Assist option; all power orbs are significantly slower'); + decay.prefToNameMap = { + easyPurchases: loc('Convenient purchasing'), + widget: loc('Informational widget'), + typingDisplay: loc('Typing display'), + fatigueWarning: loc('Fatigue warning'), + bigSouls: loc('Big souls'), + slowSouls: loc('Slow souls'), + bigOrbs: loc('Big orbs'), + slowOrbs: loc('Slow orbs'), + comp: loc('Competition mode'), + wipeOnInf: loc('Wipe save on infinite decay') + } injectCSS(`.block.infoSnippetBox { margin-top: 5px; text-align: center; }`); decay.getPrefButtons = function() { - var str = ''; + var str = '
'+loc('Kaizo cookies settings')+'
'; + str += ''+loc('Difficulty presets:')+'
'; + str += '

'; + for (let i in decay.prefPresets) { + str += ''+decay.prefPresets[i].name+'
'; + } + str += '
'; //str += decay.writePrefButton('ascendOnInf', 'AscOnInfDecayButton', loc('Ascend on infinite decay')+' ON', loc('Ascend on infinite decay')+' OFF')+'
'; - str += decay.writePrefButton('scrollClick', 'scrollClickButton', loc('Easy clicks')+' ON', loc('Easy clicks')+' OFF')+'
'; - str += decay.writePrefButton('scrollWrinklers', 'scrollWrinklersButton', loc('Easy wrinklers')+' ON', loc('Easy wrinklers')+' OFF')+'
'; - str += decay.writePrefButton('touchpad', 'touchpadButton', loc('Touchpad mode')+' ON', loc('Touchpad mode')+' OFF')+'
'; - str += decay.writePrefButton('wipeOnInf', 'WipeOnInfDecayButton', loc('Wipe save on infinite decay')+' ON', loc('Wipe save on infinite decay')+' OFF')+'
'; - str += decay.writePrefButton('widget', 'widgetButton', loc('Informational widget')+' ON', loc('Informational widget')+' OFF')+'
'; - str += decay.writePrefButton('RunTimer','RunTimerButton',loc("Show run timer")+' ON',loc("Show run timer")+' OFF', 'if (decay.prefs.RunTimer) { l(\'Timer\').style.display = \'\'; } else { l(\'Timer\').style.display = \'none\'; }')+'
'; - str += decay.writePrefButton('LegacyTimer','LegacyTimerButton',loc("Show legacy timer")+' ON',loc("Show legacy timer")+' OFF', 'if (decay.prefs.LegacyTimer) { l(\'Timer2\').style.display = \'\'; } else { l(\'Timer2\').style.display = \'none\'; }')+'
'; - str += decay.writePrefButton('typingDisplay', 'typingDisplayButton', loc('Typing display')+' ON', loc('Typing display')+' OFF', 'if (decay.prefs.typingDisplay) { l(\'typingDisplayContainer\').style.display = \'\' } else { l(\'typingDisplayContainer\').style.display = \'none\'; }')+'
'; - str += decay.writePrefButton('powerClickShiftReverse', 'PCShiftReverseButton', loc('Shift to Power click')+' ON', loc('Shift to Power click')+' OFF')+'
'; - str += decay.writePrefButton('comp', 'compButton', loc('Competition mode')+' ON', loc('Competition mode')+' OFF')+'
'; + str += decay.writePrefButton('scrollClick', 'scrollClickButton', loc('Easy clicks')+' ON', loc('Easy clicks')+' OFF')+'
'; + str += decay.writePrefButton('scrollWrinklers', 'scrollWrinklersButton', loc('Easy wrinklers')+' ON', loc('Easy wrinklers')+' OFF')+'
'; + str += decay.writePrefButton('touchpad', 'touchpadButton', loc('Touchpad mode')+' ON', loc('Touchpad mode')+' OFF')+'
'; + str += decay.writePrefButton('autoPause', 'autoPauseButton', loc('Auto pause on leave')+' ON', loc('Auto pause on leave')+' OFF')+'
'; + str += decay.writePrefButton('powerClickShiftReverse', 'PCShiftReverseButton', loc('Shift to Power click')+' ON', loc('Shift to Power click')+' OFF')+'
'; + str += decay.writePrefButton('RunTimer','RunTimerButton',loc("Show run timer")+' ON',loc("Show run timer")+' OFF', 'if (decay.prefs.RunTimer) { l(\'Timer\').style.display = \'\'; } else { l(\'Timer\').style.display = \'none\'; }')+'
'; + str += decay.writePrefButton('LegacyTimer','LegacyTimerButton',loc("Show legacy timer")+' ON',loc("Show legacy timer")+' OFF', 'if (decay.prefs.LegacyTimer) { l(\'Timer2\').style.display = \'\'; } else { l(\'Timer2\').style.display = \'none\'; }')+'
'; + str += '
'; + if (!decay.lockedPreset) { + str += decay.writePrefButton('easyPurchases', 'easyPurchasesButton', loc('Convenient purchasing')+' ON', loc('Convenient purchasing')+' OFF')+'
'; + str += decay.writePrefButton('widget', 'widgetButton', loc('Informational widget')+' ON', loc('Informational widget')+' OFF')+'
'; + str += decay.writePrefButton('typingDisplay', 'typingDisplayButton', loc('Typing display')+' ON', loc('Typing display')+' OFF', 'if (decay.prefs.typingDisplay) { l(\'typingDisplayContainer\').style.display = \'\' } else { l(\'typingDisplayContainer\').style.display = \'none\'; }')+'
'; + str += decay.writePrefButton('fatigueWarning', 'fatigueWarningButton', loc('Fatigue warning')+' ON', loc('Fatigue warning')+' OFF')+'
'; + str += decay.writePrefButton('bigSouls', 'bigSoulsButton', loc('Big souls')+' ON', loc('Big souls')+' OFF')+'
'; + str += decay.writePrefButton('slowSouls', 'slowSoulsButton', loc('Slow souls')+' ON', loc('Slow souls')+' OFF')+'
'; + str += decay.writePrefButton('bigOrbs', 'bigOrbsButton', loc('Big orbs')+' ON', loc('Big orbs')+' OFF')+'
'; + str += decay.writePrefButton('slowOrbs', 'slowOrbsButton', loc('Slow orbs')+' ON', loc('Slow orbs')+' OFF')+'
'; + str += decay.writePrefButton('comp', 'compButton', loc('Competition mode')+' ON', loc('Competition mode')+' OFF')+'
'; + str += decay.writePrefButton('wipeOnInf', 'WipeOnInfDecayButton', loc('Wipe save on infinite decay')+' ON', loc('Wipe save on infinite decay')+' OFF')+'
'; + } str += '
Replay information snippets:
'; var str2 = ''; for (let i in decay.notifs) { @@ -1773,7 +1930,7 @@ Game.registerMod("Kaizo Cookies", { if (str2 == '') { str2 = loc('none.
(You can see and replay information snippets you\'ve collected throughout the game here. The first one occurs at 5,555 cookies baked this ascension.)'); } - return str + str2 + '
'; + return str + str2 + '
'; } eval('Game.UpdateMenu='+Game.UpdateMenu.toString() .replace(`rs; game will reload")+')
'+`, `rs; game will reload")+')
'+decay.getPrefButtons()+`) @@ -2075,6 +2232,27 @@ Game.registerMod("Kaizo Cookies", { } } }); + + //mobile integration + injectCSS(`.bottomRightContainer { position: absolute; right: 20px; bottom: 20px; z-index: 10000000000000000000000; display: none; flex-direction: row; justify-content: flex-end; align-items: flex-end; }`) + injectCSS(`.bottomRightAC { width: 72px; height: 72px; padding: 4px; }`); + injectCSS(`.bottomRightBox { display: flex; align-items: center; justify-content: center; }`); + injectCSS(`.bottomRightBox:active { background: radial-gradient(circle at 50% 50%, #000, rgb(0, 0, 0)); box-shadow: 0px 0px 8px 3px rgba(3, 49, 44, 0.8); }`); + injectCSS(`.bottomRightBox.enabled { background: radial-gradient(circle at 50% 50%, #000, rgb(0, 81, 73)); box-shadow: 0px 0px 8px 3px rgba(3, 49, 44, 0.8); }`); + injectCSS(`.bottomRightPause { width: 60px; height: 60px; padding: 4px; margin-right: 10px; }`); + + addLoc('ENABLE AUTOCLICK'); + addLoc('Autoclicker only works when also pressing down on the big cookie or a wrinkler'); + addLoc('TOGGLE PAUSE'); + let autoClickerEle = document.createElement('div'); + autoClickerEle.id = 'bottomRightContainer'; + autoClickerEle.classList.add('bottomRightContainer'); + l('game').appendChild(autoClickerEle); + decay.easyClicksEnable = false; + autoClickerEle.innerHTML = '
'+loc('TOGGLE PAUSE')+'
'+loc('Autoclicker only works when also pressing down on the big cookie or a wrinkler')+'
'+loc('ENABLE AUTOCLICK')+'
'; + AddEvent(l('mobileAC'), 'touchstart', function() { decay.easyClicksEnable = !decay.easyClicksEnable; if (decay.easyClicksEnable) { l('mobileAC').classList.add('enabled'); } else { l('mobileAC').classList.remove('enabled'); } }); + AddEvent(l('mobilePause'), 'touchstart', function() { kaizoCookies.togglePause(); if (kaizoCookies.paused) { l('mobilePause').classList.add('enabled'); } else { l('mobilePause').classList.remove('enabled'); } }) + if (Crumbs.mobile) { autoClickerEle.style.display = 'flex'; } //decay scaling decay.setRates = function() { @@ -2131,7 +2309,7 @@ Game.registerMod("Kaizo Cookies", { //the bigger the building, the more "space" they take up, thus increasing decay by more let c = 0; let add = 0; - if (Game.Has('Thousand fingers')) add += Math.log10(Game.BuildingsOwned); + if (Game.Has('Thousand fingers')) add += Math.log10(Game.BuildingsOwned + 1); if (Game.Has('Million fingers')) add+= 0.6989700043360189; //log10(5) if (Game.Has('Billion fingers')) add+= 1; //log10(10) if (Game.Has('Trillion fingers')) add+= 1.3010299956639813; //log10(20) @@ -2156,7 +2334,7 @@ Game.registerMod("Kaizo Cookies", { c += Game.Objects['Antimatter condenser'].amount * 2.5 + Game.Objects['Prism'].amount + Game.Objects['Chancemaker'].amount * 1.5; c += Game.Objects['Fractal engine'].amount * 2.71828 + Math.pow(Game.Objects['Javascript console'].amount, 1.2); c += Game.Objects['Idleverse'].amount * 7.5 + Game.Objects['Cortex baker'].amount * 6 + Game.Objects['You'].amount * 2; - return c; + return c + 1; } decay.setOthers = function() { decay.powerGainMult = decay.setPowerGainMult(); @@ -2171,7 +2349,6 @@ Game.registerMod("Kaizo Cookies", { decay.rawCpsMults = function(mult) { //mult *= (1 + 3 * Math.pow(1 - decay.incMult, 12)); if (decay.challengeStatus('combo1')) { mult *= 1 + 9.09 / (Math.max(Game.log10Cookies - 10, 0) / 2 + 1); } - if (decay.challengeStatus('comboGSwitch')) { mult *= 1.1; } if (Game.Has('Wrinkler ambergris')) { mult *= 1.06; } if (decay.covenantStatus('wrathBan')) { mult *= 0.75; } for (let i in Game.UpgradesByPool['tech']) { @@ -2324,9 +2501,11 @@ Game.registerMod("Kaizo Cookies", { else { if (Game.prefs.popups) Game.Popup('Game reset'); else Game.Notify('Gave up','Let\'s try this again!',[0,5],4); + let ch = decay.currentConditional; Game.Reset(); decay.onAscending(); decay.onReincarnation(); + decay.currentConditional = ch; } } @@ -2575,7 +2754,10 @@ Game.registerMod("Kaizo Cookies", { else if (godLvl == 2) { mult *= 1/0.8; } else if (godLvl == 3) { mult *= 1/0.9; } } - if (decay.challengeStatus('buildingsAlternate')) { mult *= 1/0.9; } + if (decay.challengeStatus('buildingsAlternate')) { mult *= 1 / 0.9; } + if (decay.challengeStatus('veil')) { mult *= 1 / 0.9; } + if (decay.challengeStatus('comboGSwitch')) { mult *= 1 / 0.9; } + if (Game.Has('Stevia Caelestis')) { mult *= 1 / 0.95; } return Math.min(Math.sqrt(Game.log10Cookies + 20), (Game.Has('Legacy')?10:3)) * 0.00125 * (1 / mult) + (Game.resets > 0?(1 / Math.max(5, base * mult / (Math.log(1 / Math.min(1, Math.pow(Math.max(Math.min(decay.gen, (1 / (1 + Math.max(Math.min(Game.log10Cookies - 30, 40), 0) / 7))), decay.breakingPoint), decay.wrinklerApproachPow))) / Math.log(decay.wrinklerApproachFactor)))):0); }; @@ -2586,9 +2768,8 @@ Game.registerMod("Kaizo Cookies", { 0: 0, 3: 0.01, 5: 0.02, - 7: 0.04, - 12: 0.05, - 12: 0.045, + 7: 0.03, + 12: 0.035, 21: 0.03, 27: 0.015, 48: 0.01, @@ -2642,6 +2823,7 @@ Game.registerMod("Kaizo Cookies", { base *= 1 + Math.max(Game.santaLevel - 7, 0) * 0.01; } if (Game.Has('Unholy bait')) { base *= 1.1; } + if (Game.Has('Stevia Caelestis')) { base *= 1.05; } if (decay.isConditional('powerClickWrinklers')) { base *= 0.5; } if (decay.isConditional('reindeer')) { base *= 1.4; } base *= 1 / (1 + Math.max(Game.log10Cookies - 18, 0) / 30); @@ -2745,7 +2927,7 @@ Game.registerMod("Kaizo Cookies", { this.x = this.leftSection.offsetWidth / 2 + pos[0]; this.y = this.leftSection.offsetHeight * 0.4 + pos[1]; this.rotation = Math.PI * 2 - this.rad; if (this.getComponent('pointerInteractive').hovered) { - if (Date.now() - decay.lastWrinklerScroll > 100 && !(decay.powerClicksOn() && decay.power >= decay.firstPowerClickReq) && !decay.isConditional('reindeer') && ((decay.prefs.scrollWrinklers && Game.Scroll!=0) || (Game.keys[65] && decay.prefs.touchpad))) { + if (Date.now() - decay.lastWrinklerScroll > 100 && !(decay.powerClicksOn() && decay.power >= decay.firstPowerClickReq) && !decay.isConditional('reindeer') && ((decay.prefs.scrollWrinklers && Game.Scroll!=0) || (Game.keys[65] && decay.prefs.touchpad) || decay.easyClicksEnable)) { decay.onWrinklerClick.call(this); //console.log(Date.now() - decay.lastWrinklerClick); decay.lastWrinklerClick = Date.now(); @@ -2784,7 +2966,7 @@ Game.registerMod("Kaizo Cookies", { }); decay.wrinklerAI = new Crumbs.behavior(function() { const toAdd = -this.speedMult * (decay.wrinklerApproach / Game.fps) * (this.bomber?2.5:1); - this.dist = Math.max(this.dist + toAdd * (1 / Math.max((this.hurt - 10) / 10, 1)), 0); + this.dist = Math.max(this.dist + toAdd * (1 / Math.max((this.hurt - 10) / (Game.Has('Diabetica Daemonicus')?5:10), 1)), 0); this.lastDistMoved = toAdd; }); decay.wrinklerStats = new Crumbs.behavior(function() { @@ -2935,7 +3117,7 @@ Game.registerMod("Kaizo Cookies", { } } decay.getSpecialProtectMult = function() { - return (this.shiny?0.333:1) * (this.bomber?2:1); + return (this.shiny?(0.333 * (Game.Has('Sugar aging process')?(1 + Math.min(Game.Objects.Grandma.amount, 800) * 0.0005):1)):1) * (this.bomber?2:1); } decay.onWrinklerClick = function() { if (!decay.gameCan.popWrinklers) { return; } @@ -2958,7 +3140,7 @@ Game.registerMod("Kaizo Cookies", { decay.bombersPoppedLocal++; decay.accumulateFuse(0.5 + 0.5 * Math.random()); decay.triggerNotif('bombers'); - decay.prefs.preventNotifs.bomberHint = 1; + decay.prefs.preventNotifs.bomberHint = true; } if (this.sucked && this.dist <= 0) { decay.onWrinklerSuckedPop.call(this); @@ -3161,6 +3343,9 @@ Game.registerMod("Kaizo Cookies", { if (!decay.unlocked || decay.wrinklersN >= 72) { return; } let obj = {}; obj.size = decay.getCurrentWrinklerSize(Math.random() * 100); + if (Game.Has('Sucralosia Inutilis') && Math.random() < 0.1) { + obj.size = Math.max(obj.size - 4, 1); + } obj.rad = Math.random() * Math.PI * 2; obj.speedMult = Math.random() * 0.6 + 0.7; for (let i = 0; i < Math.floor(Math.random() * (Math.sqrt(Game.log10Cookies))); i++) { @@ -3181,7 +3366,10 @@ Game.registerMod("Kaizo Cookies", { if (obj.size <= 14) { obj.size = Math.round(Math.max(obj.size - Math.min(Math.max(Math.pow(14 - obj.size, 0.6), 0), 5) - 1, 0)); } else { - obj.size = Math.max(obj.size - 1, 0); + obj.size -= 1; + } + if (Game.Has('Sucralosia Inutilis') && Math.random() < 0.1) { + obj.size = Math.max(obj.size - 4, 1); } obj.rad = Math.random() * Math.PI * 2; obj.speedMult = Math.random() * 0.8 + 0.6; @@ -3285,13 +3473,13 @@ Game.registerMod("Kaizo Cookies", { return Crumbs.spawn(decay.wrinklerSoulTemplate, { x: x, y: y, - scaleX: shiny?0.9:1.3, - scaleY: shiny?0.9:1.3, + scaleX: (shiny?1:1.3) * (decay.prefs.bigSouls?1.5:1), + scaleY: (shiny?1:1.3) * (decay.prefs.bigSouls?1.5:1), imgs: shiny?kaizoCookies.images.shinySoul:kaizoCookies.images.wrinklerSoul, shiny: shiny, children: ([decay.wrinklerSoulShine1].concat(Game.prefs.fancy?decay.wrinklerSoulShine2:[])), behaviors: [ - new Crumbs.behaviorInstance(decay.wSoulMovement, { ddy: ddy * (shiny?1.5:1), dx: dx * (shiny?1.5:1) }), + new Crumbs.behaviorInstance(decay.wSoulMovement, { ddy: ddy * (shiny?1.35:1) * (decay.slowSouls?0.75:1), dx: dx * (shiny?1.4:1) * (decay.slowSouls?0.4:1) }), new Crumbs.behaviorInstance(decay.wSoulClaim), new Crumbs.behaviorInstance(decay.wSoulDeposit) ], @@ -3335,7 +3523,6 @@ Game.registerMod("Kaizo Cookies", { if (decay.exhaustion) { if (Game.Has('Elder spice')) { stopMult *= 1.1; } if (decay.challengeStatus('veil')) { stopMult *= 1.1; } - if (!me.shiny && Game.Has('Soul compression')) { stopMult *= 1.1; } if (Game.Has('Weightlessness')) { stopMult *= 1.1; } } if (Game.Has('Santaic zoom')) { stopMult *= 1 + Math.max(Game.santaLevel - 7, 0) * 0.01; } @@ -3350,6 +3537,7 @@ Game.registerMod("Kaizo Cookies", { decay.times.sinceSoulClaim = 0; Game.BigCookieState = 2; decay.bounceBackIn = Math.floor(0.15 * (me.shiny?1.5:1) * Game.fps); + if (decay.exhaustion && Game.Has('Soul compression')) { decay.exhaustion -= Math.round(0.5 * Game.fps); decay.exhaustion = Math.max(decay.exhaustion, 1); } if (decay.indicator.behaviors && decay.indicator.behaviors[1]) { decay.indicator.behaviors[1].lastClaiming = 0; if (Math.random() < 0.2) { decay.indicator.behaviors[1].direction *= -1; } } if (me.shiny) { decay.shinySoulClaimCount++; @@ -3387,7 +3575,12 @@ Game.registerMod("Kaizo Cookies", { } }); addLoc('Reflective blessing!'); - eval('Game.shimmerTypes.golden.popFunc='+Game.shimmerTypes.golden.popFunc.toString().replace(`Game.cookies*0.15,Game.cookiesPs*60*15`, `Game.cookies*0.33,Game.cookiesPs*60*15`).replace(`else if (choice=='cookie storm drop')`, `else if (choice=='reflective blessing') { decay.triggerNotif('shinySoulEffect'); const toEarn = Math.min(Game.cookies, mult * Game.cookiesPs * 180) + 13; Game.Earn(toEarn); Game.Popup('
'+loc('Reflective blessing!')+'
'+(Game.cookies<(mult * Game.cookiesPs * 180)?'
'+loc('Cookies doubled!')+'
':'')+'
(' + loc('+%1!', loc('%1 cookie', Beautify(toEarn))) + ')
', me.x, me.y); } else if (choice=='cookie storm drop')`).replace('this.last=choice;', 'if (choice != "reflective blessing") this.last=choice;')); + decay.getReflectiveBlessingPopup = function(mult, toEarn) { + return '
' + loc('Reflective blessing!') + '
' + (Game.cookies < (mult * Game.cookiesPs * 360) ? + '
' + loc('Cookies doubled!') + '
(' + loc('+%1!', loc('%1 cookie', Beautify(toEarn))) + ')
' : + '
' + loc('+%1!', loc('%1 cookie', Beautify(toEarn))) + '
(' + loc('CpS too low to double') + ')
'); + } + eval('Game.shimmerTypes.golden.popFunc='+Game.shimmerTypes.golden.popFunc.toString().replace(`Game.cookies*0.15,Game.cookiesPs*60*15`, `Game.cookies*0.33,Game.cookiesPs*60*15`).replace(`else if (choice=='cookie storm drop')`, `else if (choice=='reflective blessing') { decay.triggerNotif('shinySoulEffect'); const toEarn = Math.min(Game.cookies, mult * Game.cookiesPs * 360) + 13; Game.Earn(toEarn); Game.Popup(decay.getReflectiveBlessingPopup(mult, toEarn), me.x, me.y); } else if (choice=='cookie storm drop')`).replace('this.last=choice;', 'if (choice != "reflective blessing") this.last=choice;')); decay.indicator = Crumbs.spawn({ id: 'soulClaimIndicator', width: 2 * 72, @@ -3549,7 +3742,7 @@ Game.registerMod("Kaizo Cookies", { this.sucked *= decay.wrinklerLossMult; Game.Notify(loc("Popped a wrinkler"), loc("You lost %1!", loc("%1 cookie", LBeautify(this.sucked))), [19, 8], 6); if (this.sucked >= 1) { Game.Popup('
' + loc("-%1!", loc("%1 cookie", LBeautify(this.sucked))) + '
', Game.mouseX, Game.mouseY); } - else { Game.Popup('
' + loc('Decay amplified!') + '
', Game.mouseX, Game.mouseY); decay.amplifyAll(1.5, 0.15); decay.triggerNotif('wrinklerAmplify'); } + //else { Game.Popup('
' + loc('Decay amplified!') + '
', Game.mouseX, Game.mouseY); decay.amplifyAll(1.5, 0.15); decay.triggerNotif('wrinklerAmplify'); } for (let i = 0; i < 7; i++) { Crumbs.spawnFallingCookie(0, 0, Math.random() * 4 - 6, Math.random() * 8 - 4, 2.5, 'wrinklerPoppedCookie', true, Math.random() * 0.5 + 0.75, 3); } @@ -3984,7 +4177,7 @@ Game.registerMod("Kaizo Cookies", { addLoc('Complete unshackled decay challenges to raise maximum storage (Maxed out: +%1)'); addLoc('Offer %1 to unlock the shiny condenser, converting normal souls to a shiny soul'); addLoc('Offer %1 to make shiny condensation more efficient'); - addLoc('Shiny condenser acquired'); + addLoc('Shiny condenser complete'); decay.utenglobeSoulCookieUpgradeCount = 0; decay.ugSoulCookieUpgradeCostMap = [1e9, 1e10, 1e11, 1e12, 1e14, 1e17, 1e21, 1e26, 1e32, 1e39, 1e47, 1e56]; decay.tryBuyUtenglobeCookieUpgrade = function() { @@ -4031,7 +4224,7 @@ Game.registerMod("Kaizo Cookies", { //implement upgrade later const button = ('
' + loc('Offer %1 to unlock the shiny condenser, converting normal souls to a shiny soul', loc('%1 cookie', Beautify(2e10))) + '
'); const buttonAlt = ('
' + loc('Offer %1 to make shiny condensation more efficient', loc('%1 cookie', Beautify(2e18))) + '
'); - const buttonCapped = '
' + loc('Shiny condenser acquired') + '
'; + const buttonCapped = '
' + loc('Shiny condenser complete') + '
'; const prompt = '
' + loc('Complete %1 more unshackled decay challenges to raise maximum storage by %2 (Currently: +%3)', [Beautify(Math.pow(2, Math.floor(Math.log2(decay.challengesCompleted + 1)) + 1) - 1 - decay.challengesCompleted), 1, Math.floor(Math.log2(decay.challengesCompleted + 1))]) + '
'; const promptCapped = '
' + loc('Complete unshackled decay challenges to raise maximum storage (Maxed out: +%1)', Beautify(4)) + '
'; return (decay.shinyCondenserUnlocked?(decay.shinyCondenserUpgrades?buttonCapped:buttonAlt):button) + (decay.challengesCompleted<31?prompt:promptCapped); @@ -4260,7 +4453,7 @@ Game.registerMod("Kaizo Cookies", { decay.purifyFromShimmer = function(obj) { if (obj.type == 'reindeer') { if (decay.isConditional('reindeer')) { decay.amplifyAll(2, 0); } else if (obj.noPurity) { decay.amplifyAll(10, 0); Game.Notify('LOL', '', [12, 8]); }// else { decay.purifyAll(1.3 * (1 + Game.Has('Weighted sleighs') * 0.25), 0.2, 5); decay.triggerNotif('reindeer'); } - if (Game.Has('Weighted sleighs')) { decay.stop(5); } + if (Game.Has('Weighted sleighs')) { decay.stop(7, 'reindeer'); } return; } if (obj.type == 'a mistake') { @@ -4268,7 +4461,7 @@ Game.registerMod("Kaizo Cookies", { return; } - if (obj.spawnLead && Game.ascensionMode == 42069 && !decay.challengeStatus("comboDragonCursor") && Game.clickMult > 1282 && Game.buffCount() <= 1 && !Game.Has("Santa\'s helpers") && Game.eff('click') < 1.1 && Game.auraMult("Reaper of Fields") >= 0.5) { decay.challenges.comboDragonCursor.finish(); } + if (obj.spawnLead && Game.ascensionMode == 42069 && !decay.challengeStatus("comboDragonCursor") && Game.clickMult > 1165 && !Game.hasBuff('Dragonflight') && Game.buffCount() <= 1 && !Game.Has("Santa\'s helpers") && Game.eff('click') < 1.1 && Game.auraMult("Reaper of Fields") >= 0.5) { decay.challenges.comboDragonCursor.finish(); } var strength = 5; if (decay.challengeStatus('noGC1')) { strength *= 1.15; } @@ -4277,7 +4470,7 @@ Game.registerMod("Kaizo Cookies", { decay.purifyAll(strength, 1 - Math.pow((Game.resets<1?0.6:0.8), strength), 15); decay.stop(1, 'wSoulShiny'); } else if (obj.force == 'cookie storm drop' || obj.force == 'chain cookie') { decay.purifyAll(Math.pow(strength, 0.01), 0.0001, 5); decay.stop(0.6, 'wSoulShiny'); decay.triggerNotif('stormDrop'); - } else if (obj.force == '' && (obj.type == 'reindeer' || obj.type == 'golden')) { + } else if (obj.force == '' && obj.type == 'golden') { decay.purifyAll(Math.pow(strength, 0.33), 1 - Math.pow(0.99, strength), 10); decay.triggerNotif("pesudonat"); } } @@ -4319,9 +4512,16 @@ Game.registerMod("Kaizo Cookies", { decay.bounceBackInForce = 0; Game.lastClickCount = Date.now(); eval('Game.Logic='+Game.Logic.toString() - .replace(`//if (Game.BigCookieState==2 && !Game.promptOn && Game.Scroll!=0) Game.ClickCookie();`, `if (Game.bigCookieHovered && !(decay.powerClicksOn() && Game.Has('Mammon') && decay.power >= decay.firstPowerClickReq) && !decay.isConditional('reindeer') && ((decay.prefs.scrollClick && Game.Scroll!=0) || (Game.keys[65] && decay.prefs.touchpad)) && !Game.promptOn && Date.now()-Game.lastClickCount >= 105) { Game.ClickCookie(); Game.BigCookieState = 1; decay.bounceBackInForce = 1 + randomFloor(Math.random()); }`) + .replace(`//if (Game.BigCookieState==2 && !Game.promptOn && Game.Scroll!=0) Game.ClickCookie();`, `if (Game.bigCookieHovered && !(decay.powerClicksOn() && Game.Has('Mammon') && decay.power >= decay.firstPowerClickReq) && !decay.isConditional('reindeer') && ((decay.prefs.scrollClick && Game.Scroll!=0) || (Game.keys[65] && decay.prefs.touchpad) || decay.easyClicksEnable) && !Game.promptOn && Date.now()-Game.lastClickCount >= 105) { Game.ClickCookie(); Game.BigCookieState = 1; decay.bounceBackInForce = 1 + randomFloor(Math.random()); }`) .replace(`Beautify(Game.prestige)]);`, `Beautify(decay.getCpSBoostFromPrestige())]);`) ); + decay.halts['reindeer'] = new decay.haltChannel({ + keep: 0.4, + overtimeEfficiency: 1, + overtimeDec: 0, + overtimeLimit: 1e6, + power: 1.2 + }); Game.registerHook('logic', function() { if (decay.bounceBackInForce > 0) { decay.bounceBackInForce--; @@ -4331,6 +4531,67 @@ Game.registerMod("Kaizo Cookies", { Game.registerHook('click', function() { Game.lastClickCount = Math.max(Date.now() - 250, Game.lastClickCount + 100); }); + let clickHaltDisplayContainer = document.createElement('div'); + clickHaltDisplayContainer.id = 'clickHaltDisplayContainer'; + clickHaltDisplayContainer.style.display = 'none'; + injectCSS(`#clickHaltDisplayContainer { min-height: 24px; background:#999; background:url(img/darkNoise.jpg); width: 100%; box-shadow:0px 0px 4px #000 inset; position: relative; text-align: center; margin-bottom: 8px; }`); + injectCSS(`#game.onMenu #clickHaltDisplayContainer { display: none; }`); + injectCSS(`#clickHaltTitle { white-space: nowrap; width: 100%; text-align: center; text-shadow: rgb(111, 109, 109) 0px 1px 4px; font-size: 12px; font-style: bold; color: #bbb; }`); + injectCSS(`.clickHaltCell { display: table-cell; text-align: center; display: inline-flex; justify-content: center; align-items: center; width: 25%; z-index: 1; }`); + l('buildingsMaster').insertAdjacentElement('beforebegin', clickHaltDisplayContainer); + clickHaltDisplayContainer.innerHTML = ` +
+
+ <- less time - Click-o-meter - more time -> +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
'+loc("Show")+'
('+loc("Show the Click-o-meter")+')
','this')} onclick="decay.showClickHaltDisplay();" style="display: none;">Show
+
'+loc("Hide")+'
('+loc("Minimize the Click-o-meter")+')
','this')} onclick="decay.hideClickHaltDisplay();" style="">Hide + + `; //this is truly a mess + addLoc('Minimize the Click-o-meter'); + addLoc('Show the Click-o-meter'); + addLoc('Hide'); + decay.clickHaltDisplayHidden = false; + decay.hideClickHaltDisplay = function() { + l('clickHaltProgress').style.display = 'none'; + //l('clickHaltTitle').style.display = 'none'; + l('clickHaltMuteButton').style.display = 'none'; + l('clickHaltUnmuteButton').style.display = ''; + decay.clickHaltDisplayHidden = true; + } + decay.showClickHaltDisplay = function() { + l('clickHaltProgress').style.display = ''; + //l('clickHaltTitle').style.display = ''; + l('clickHaltMuteButton').style.display = ''; + l('clickHaltUnmuteButton').style.display = 'none'; + decay.clickHaltDisplayHidden = false; + } + decay.clickHaltElementsList = [l('clickHaltCell1'), l('clickHaltCell2'), l('clickHaltCell3'), l('clickHaltCell4')]; + Game.registerHook('draw', function() { + if (decay.clickHaltDisplayHidden) { return; } + let frac = decay.halts.click.overtime / decay.halts.click.overtimeLimit * decay.clickHaltElementsList.length; + for (let i = 0; i < decay.clickHaltElementsList.length; i++) { + decay.clickHaltElementsList[i].style.opacity = (Math.pow(Math.min(Math.max(frac - i, 0), 1), 0.25)); + } + }); addLoc('Decay propagation rate -%1% for %2!'); new Game.buffType('creation storm', function(time, pow) { return { @@ -4346,7 +4607,7 @@ Game.registerMod("Kaizo Cookies", { //breaking point replaceDesc('Legacy', "This is the first heavenly upgrade; it unlocks the Heavenly chips system.
Each time you ascend, the cookies you made in your past life are turned into heavenly chips and prestige.
Heavenly chips can be spent on a variety of permanent transcendental upgrades.
Your prestige level also gives you a permanent +1% CpS per level.
Decay starts to break after -90%, becoming more powerful the more decay you have: ascending is no longer immediate and you gain a decay propagation increase that scales with current decay.
In addition, wrinklers have also inherited a part of the power: popping any that has already reached the big cookie will now inflict Coagulated and Cursed, and they explode if sucking on the big cookie for long enough. Their speed also increases the more decay you have, for up to the point where decay breaks.We've all been waiting for you. And some more."); Game.Upgrades['Legacy'].icon = [7, 3, kaizoCookies.images.custImg]; - decay.minimumPrestigeAmountToAscend = 14; //legacy + power clck + heavenly cookies + dragon + decay.minimumPrestigeAmountToAscend = 300; decay.eligibleForAscend = function() { if (Game.resets >= 1) { return true; } let chips = Math.pow(Game.cookiesEarned / Game.firstHC, 1 / Game.HCfactor); @@ -4381,6 +4642,10 @@ Game.registerMod("Kaizo Cookies", { if (Game.pledges >= 5) { Game.Unlock('Sacrificial rolling pins'); } }); Game.elderWrath = 0; + Game.Upgrades['Bingo center/Research facility'].buyFunction = function() { + Game.SetResearch('Specialized chocolate chips'); + Game.Win('Grandmapocalypse'); + } eval('Game.SetResearch=' + Game.SetResearch.toString().replace(`if (Game.Has('Persistent memory')) Game.researchT=Math.ceil(Game.baseResearchTime/10);`, `if (Game.Has('Persistent memory')) { Game.researchT /= 2; } if (decay.challengeStatus('pledge')) { Game.researchT /= 2; } if (Game.Has('Memory capsule')) { Game.researchT /= 2; } Game.researchT = Math.ceil(Game.researchT);`)); replaceDesc('Persistent memory', 'Subsequent research will be twice as fast.It\'s all making sense!
Again!
'); replaceDesc('One mind', 'Each grandma gains +0.02 base CpS per grandma.
Also unlocks the Elder Pledge, which slowly purifies the decay for some cookies.Repels the ancient evil with industrial magic.'); @@ -4397,6 +4662,7 @@ Game.registerMod("Kaizo Cookies", { replaceAchievDesc('Elder nap', 'Use the Elder Pledge to purify decay at least once.decay
shall
begone
'); replaceAchievDesc('Elder slumber', 'Use the Elder Pledge to purify decay 5 times in a run.purity transcends
all
evil
'); replaceAchievDesc('Elder calm', 'Unlock the Elder Covenant.our final gift...
use it...
well...
'); + replaceAchievDesc('Grandmapocalypse', 'Start the Bingo researches by purchasing the research facility.An apocalypse... for decay!'); replaceDesc('Elder Pledge', 'Purifies the decay, at least for a short while.
Price is equal to 5 minutes of highest raw CpS reached this ascension.Incredible power lies within.'); decay.halts['pledge'] = new decay.haltChannel({ @@ -5360,7 +5626,7 @@ Game.registerMod("Kaizo Cookies", { decay.getCFChance = function() { if (Game.resets < 1) { return 0.25 * Math.pow(0.6, Game.gcBuffCount()); } - let chance = 0.75; + let chance = 1; if (decay.challengeStatus('combo1')) { chance += (Game.HasAchiev('A wizard is you')?0.5:0.25); } chance += decay.challengeStatus('allBuffStackR') * 0.02; if (decay.isConditional('dualcast') || decay.isConditional('comboOrbs')) { chance += 3; } @@ -5412,20 +5678,20 @@ Game.registerMod("Kaizo Cookies", { } catch(err) { Game.Notify('adding spells failed!', 'uh oh', 0, 1e21, false, true); } - eval('gp.logic='+gp.logic.toString().replace('M.magicPS=Math.max(0.002,Math.pow(M.magic/Math.max(M.magicM,100),0.5))*0.002;', 'M.magicPS = Math.min(1.5, decay.gen) * Math.max(0.002,Math.pow(M.magic/Math.max(M.magicM,100),0.5))*0.006;')); + eval('gp.logic='+gp.logic.toString().replace('M.magicPS=Math.max(0.002,Math.pow(M.magic/Math.max(M.magicM,100),0.5))*0.002;', 'M.magicPS = Math.min(1.5, decay.gen) * Game.eff(\'magicRegenSpeed\') * Math.max(0.002,Math.pow(M.magic/Math.max(M.magicM,100),0.5))*0.006;')); eval('gp.logic='+replaceAll('M.','gp.',gp.logic.toString())); - eval("gp.spells['spontaneous edifice'].win=" + Game.Objects['Wizard tower'].minigame.spells['spontaneous edifice'].win.toString().replace("{if ((Game.Objects[i].amount0 && decay.seFrees[Game.Objects[i].id] < 20) buildings.push(Game.Objects[i]);}").replace('building.buyFree(1);', 'decay.seFrees[building.id]++; building.getFree(1);')); + eval("gp.spells['spontaneous edifice'].win=" + Game.Objects['Wizard tower'].minigame.spells['spontaneous edifice'].win.toString().replace("{if ((Game.Objects[i].amount0 && decay.seFrees[Game.Objects[i].id] < 20) buildings.push(Game.Objects[i]);}").replace('building.buyFree(1);', 'decay.seFrees[building.id] += 5; building.getFree(5);')); gp.spells['spontaneous edifice'].fail = function() { for (let i in Game.Objects) { Game.Objects[i].sacrifice(1); } Game.Popup('
'+loc("Backfire!")+'
'+loc("One of every single one of your buildings disappear in a puff of smoke!")+'
',Game.mouseX,Game.mouseY); } - addLoc('The spell picks a random building that you have at least 1 of, and gives you one for free that also doesn\'t affect its current price.'); + addLoc('The spell picks a random building that you have at least 1 of, and gives you five of them for free that also doesn\'t affect its current price.'); addLoc('Can give up to %1 free buildings for each building type.'); addLoc('Lose one of every building.'); addLoc('One of every single one of your buildings disappear in a puff of smoke!'); - gp.spells['spontaneous edifice'].desc = loc('The spell picks a random building that you have at least 1 of, and gives you one for free that also doesn\'t affect its current price.')+'
'+loc('Can give up to %1 free buildings for each building type.', Beautify(20)); + gp.spells['spontaneous edifice'].desc = loc('The spell picks a random building that you have at least 1 of, and gives you five of them for free that also doesn\'t affect its current price.')+'
'+loc('Can give up to %1 free buildings for each building type.', Beautify(20)); gp.spells['spontaneous edifice'].failDesc = loc("Lose one of every building."); addLoc('Spells cast: %1 (total: %2; cross-legacies total: %3)'); decay.spellsCastTotalNGM = gp.spellsCastTotal; @@ -5597,7 +5863,7 @@ Game.registerMod("Kaizo Cookies", { decay.manifestSpringHaltParameters = { autoExpire: true, keep: 0, - halt: 3, + halt: 4, decMult: 0.05, power: 1 } @@ -5729,6 +5995,8 @@ Game.registerMod("Kaizo Cookies", { n++; } + eval('M.clickTile='+M.clickTile.toString().replace(`//PlaySound('snd/tick.mp3');`, `if (kaizoCookies.paused) { M.buildPlot(); M.computeEffs(); }`)) + eval('M.logic='+M.logic.toString().replace('function()', 'function(force)').replace('if (now>=M.nextStep)', 'if (now>=M.nextStep || force)').replace('M.nextStep=now+M.stepT*1000;', 'if (!force) { M.nextStep=now+M.stepT*1000; }')); M.harvestAll=function(type,mature,mortal)//Declaring harvestAll so M.convert works @@ -5767,7 +6035,7 @@ Game.registerMod("Kaizo Cookies", { M.soils.clay.effsStr = '
• '+loc("tick every %1",''+Game.sayTime(4*60*Game.fps, -1)+'')+'
• '+loc("passive plant effects")+' +25%
'; M.soils.pebbles.effsStr = '
• '+loc("tick every %1",''+Game.sayTime(1.5*60*Game.fps, -1)+'')+'
• '+loc("passive plant effects")+' -75%
• '+loc("plants age %1 times faster",3)+'
• '+loc("weed growth")+' -90%
'; //pebbles secondary effect can stay because why not M.soils.woodchips.effsStr = '
• '+loc("tick every %1",''+Game.sayTime(1.5*60*Game.fps), -1+'')+'
• '+loc("passive plant effects")+' -75%
• '+loc("plants spread and mutate %1 times more",3)+'
• '+loc("weed growth")+' -90%
'; - eval('M.logic='+M.logic.toString().replace(`tile[1]+=randomFloor((me.ageTick+me.ageTickR*Math.random())*M.plotBoost[y][x][0]*dragonBoost);`, `tile[1]+=randomFloor((me.ageTick+me.ageTickR*Math.random())*M.plotBoost[y][x][0]*dragonBoost*(M.soilsById[M.soil].key=='pebbles'?1/3:1));`)); + eval('M.logic='+M.logic.toString().replace(`tile[1]+=randomFloor((me.ageTick+me.ageTickR*Math.random())*M.plotBoost[y][x][0]*dragonBoost);`, `tile[1]+=randomFloor((me.ageTick+me.ageTickR*Math.random())*M.plotBoost[y][x][0]*dragonBoost*(M.soilsById[M.soil].key=='pebbles'?3:1));`)); eval('M.getPlantDesc='+M.getPlantDesc.toString().replace('dragonBoost', '[FILLER]').replaceAll(`dragonBoost`, `(dragonBoost*(M.soilsById[M.soil].key=='pebbles'?(1/3):1))`).replace('[FILLER]', 'dragonBoost')); eval('M.tileTooltip='+M.tileTooltip.toString().replace('dragonBoost', '[FILLER]').replaceAll('dragonBoost', `(dragonBoost*(M.soilsById[M.soil].key=='pebbles'?(1/3):1))`).replace('[FILLER]', 'dragonBoost')); @@ -5826,16 +6094,17 @@ Game.registerMod("Kaizo Cookies", { eval('M.computeEffs='+M.computeEffs.toString() .replace("effs.cursorCps+=0.01*mult","effs.cursorCps+=0.005*mult") - .replace("goldenClover') effs.goldenCookieFreq+=0.03*mult;","goldenClover') { effs.goldenCookieFreq+=0.03*mult; effs.goldenCookieEffDur*=1-0.015; effs.goldenCookieGain+=0.0389; }") + .replace("goldenClover') effs.goldenCookieFreq+=0.03*mult;","goldenClover') { effs.goldenCookieFreq+=0.03*mult; effs.goldenCookieEffDur*=1-0.03; effs.goldenCookieGain+=0.0389; }") .replace("else if (name=='whiskerbloom') effs.milk+=0.002*mult;","else if (name=='whiskerbloom') effs.milk+=0.001*mult;") - .replace('buildingCost:1,', 'buildingCost:1, wrinklerApproach:1, wrathReplace:1, haltPower:1, decayRate:1, decayMomentum:1') + .replace('buildingCost:1,', 'buildingCost:1, wrinklerApproach:1, wrathReplace:1, haltPower:1, decayRate:1, decayMomentum:1, magicRegenSpeed:1') .replace(`else if (name=='wardlichen') {effs.wrinklerSpawn*=1-0.15*mult;effs.wrathCookieFreq*=1-0.02*mult;}`, `else if (name=='wardlichen') {effs.haltPower+=0.02*mult; effs.wrathReplace*=1-0.02*mult;}`) .replace(`else if (name=='wrinklegill') {effs.wrinklerSpawn+=0.02*mult;effs.wrinklerEat+=0.01*mult;}`,`else if (name=='wrinklegill') {effs.wrinklerApproach*=1-0.02*mult;}`) .replace(`effs.wrathCookieGain+=0.01*mult;effs.wrathCookieFreq+=0.01*mult;`,`effs.wrinklerApproach*=1-0.01*mult; effs.haltPower+=0.01*mult;`) .replace(`effs.goldenCookieGain+=0.01*mult;effs.goldenCookieFreq+=0.01*mult;effs.itemDrops+=0.01*mult;`, `effs.decayRate *= 1 - 0.02*mult; effs.decayMomentum *= 1 - 0.02*mult;`) .replace(`effs.goldenCookieGain+=0.01*mult;effs.goldenCookieEffDur+=0.001*mult;`, `effs.goldenCookieGain+=0.05*mult;effs.goldenCookieEffDur+=0.001*mult;`) .replace(`'shriekbulb') {effs.cps*=1-0.02*mult;}`, `'shriekbulb') {effs.cps*=1-0.02*mult;} else if (name=='tidygrass') { effs.decayMomentum *= 1 - 0.05*mult; } else if (name=='everdaisy') { effs.decayRate *= 1 - 0.03*mult; }`) - .replace(`else if (name=='whiteChocoroot') effs.goldenCookieGain+=0.01*mult;`, `else if (name=='whiteChocoroot') effs.goldenCookieGain+=1.88*mult;`) + .replace(`effs.goldenCookieFreq+=0.01*mult;`, `{effs.goldenCookieFreq+=0.005*mult;effs.goldenCookieEffDur+=0.02*mult;}`) + .replace(`effs.cps+=0.03*mult;effs.click*=1-0.05*mult;effs.goldenCookieFreq*=1-0.1*mult;`, `effs.magicRegenSpeed+=0.04*mult;effs.click*=1-0.05*mult;`) ); decay.halts['bakeberry'] = new decay.haltChannel({ keep: 3, @@ -5874,11 +6143,42 @@ Game.registerMod("Kaizo Cookies", { overtimeEfficiency: 0.1 }); M.plants['crumbspore'].onDie = function() { - decay.stop(6, 'crumbspore'); + decay.stop(8, 'crumbspore'); Game.Popup('Decay halted!',Game.mouseX,Game.mouseY); } M.plants['doughshroom'].onDie = function() { - decay.purifyAll(1.15, 0.15, 5); + decay.purifyAll(1.2, 0.2, 5); + } + M.plants['greenRot'].onHarvest = function(x, y, age) { + if (age < this.mature) { return; } + for (let i = 0; i < 1; i++) { + let h = new Game.shimmer('golden', { type: 'reflective blessing', noWrath: true }, true); + h.sizeMult = 0.6; + h.dur = Math.ceil((Math.random()*6+12)); + h.life = Math.ceil(h.dur * Game.fps); + } + } + M.plants['chocoroot'].onHarvest = function(x, y, age) { + if (age < this.mature) { return; } + let allWrinklers = Crumbs.getObjects('w'); + for (let i in allWrinklers) { + allWrinklers[i].dist += 0.015; + if (allWrinklers[i] && !allWrinklers[i].dead) { decay.damageWrinkler.call(allWrinklers[i], 10 * decay.wrinklerResistance); } + } + } + M.plants['whiteChocoroot'].onHarvest = function(x, y, age) { + if (age < this.mature) { return; } + if (decay.exhaustion) { decay.exhaustion = Math.max(decay.exhaustion - 3 * Game.fps, 1); } + } + decay.halts['jqb'] = new decay.haltChannel({ + power: 12, + keep: 0, + factor: 0.9 + }); + M.plants['queenbeetLump'].onHarvest = function() { + //if (age < this.mature) { return; } + decay.stop(6, 'jqb'); + decay.purifyAll(1, 1, 1); } addLoc('all decay-halting sources\' effect'); addLoc('wrath cookies replacement'); @@ -5891,6 +6191,12 @@ Game.registerMod("Kaizo Cookies", { addLoc('harvest when mature to purify decay'); addLoc('explodes and temporarily halts decay at the end of its lifecycle'); addLoc('explodes and purifies decay at the end of its lifecycle'); + addLoc('summons a reflective blessing on mature harvest'); + addLoc('harvest when mature to damage and knock back all wrinklers'); + addLoc('harvest when mature to recover %1 worth of exhaustion'); + addLoc('magic regeneration speed'); + addLoc('harvest when mature to completely stop decay for a maximum of %1'); + addLoc('harvest when mature to purify all decay'); M.plants['wardlichen'].effsStr = '
• ' + loc("all decay-halting sources' effect") + ' +2%
• ' + loc("wrath cookies replacement") + ' -2%
'; M.plants['wrinklegill'].effsStr = '
• ' + loc("wrinklers approach speed") + ' -2%
'; M.plants['elderwort'].effsStr = '
• ' + loc("wrinklers approach speed") + ' -1%
• ' + loc("all decay-halting source' effect") + ' +1%
• ' + loc("%1 CpS", Game.Objects['Grandma'].single) + ' +1%
• ' + loc("immortal") + '
• ' + loc("surrounding plants (%1x%1) age %2% faster", [3, 3]) + '
'; @@ -5901,14 +6207,19 @@ Game.registerMod("Kaizo Cookies", { M.plants['whiteChocoroot'].effsStr = '
• ' + loc("golden cookie gains") + ' +188%
• ' + loc("harvest when mature for +%1 of CpS (max. %2% of bank)", [Game.sayTime(3 * 60 * Game.fps), 3]) + '
• ' + loc("predictable growth") + '
'; M.plants['whiskerbloom'].effsStr = '
•' + loc("milk effects") + ' +0.05%
'; M.plants['glovemorel'].effsStr = '
•' + loc("cookies/click") + ' +4%
• ' + loc("%1 CpS", Game.Objects['Cursor'].single) + ' +0.5%
• ' + loc("CpS") + ' -1%
'; - M.plants['goldenClover'].effsStr = '
• ' + loc("golden cookie frequency") + ' +3%
• ' + loc("golden cookie gains") + ' +3.89%
• ' + loc('golden cookie effect duration') + ' -1.5%
'; + M.plants['goldenClover'].effsStr = '
• ' + loc("golden cookie frequency") + ' +3%
• ' + loc("golden cookie gains") + ' +3.89%
• ' + loc('golden cookie effect duration') + ' -3%
'; + M.plants['clover'].effsStr = '
• '+loc("golden cookie frequency")+' +0.5%
' + '
• '+loc("golden cookie effect duration")+' +2%
'; M.plants['bakeberry'].effsStr = '
• '+loc("CpS")+' +1%
• '+loc("harvest when mature to temporarily halt decay")+'
'; //hellrangers idea M.plants['queenbeet'].effsStr = '
• '+loc("golden cookie effect duration")+' +0.3%
• '+loc("CpS")+' -2%
• '+loc("harvest when mature to purify decay")+'
'; //also hellrangers idea M.plants['duketater'].effsStr = '
• '+loc('harvest when mature to temporarily halt decay')+'
• '+loc('harvest when mature to purify decay')+'
'; //also hellrangers idea M.plants['crumbspore'].effsStr = '
• '+loc("explodes and temporarily halts decay at the end of its lifecycle")+'
• '+loc("may overtake nearby plants")+'
'; M.plants['doughshroom'].effsStr = '
• '+loc("explodes and purifies decay at the end of its lifecycle")+'
• '+loc("may overtake nearby plants")+'
'; - eval("M.tools['info'].descFunc="+M.tools['info'].descFunc.toString().replace(`buildingCost:{n:'building costs',rev:true},`, `buildingCost:{n:'building costs',rev:true}, wrinklerApproach:{n:'wrinklers approach speed',rev:true}, wrathReplace:{n:'wrath cookies replacement',rev:true}, haltPower:{n:'decay-halting power'}, decayRate:{n:'decay rates',rev:true}, decayMomentum:{n:'decay momentum',rev:true}`)); - + M.plants['greenRot'].effsStr = '
• '+loc("golden cookie duration")+' +0.5%
• '+loc("golden cookie frequency")+' +1%
• '+loc("summons a reflective blessing on mature harvest")+'
'; //ig the random drop increase can be left in as an easter egg + M.plants['chocoroot'].effsStr = '
• '+loc("CpS")+' +1%
• '+loc("harvest when mature to damage and knock back all wrinklers")+'
• '+loc("predictable growth")+'
'; + M.plants['whiteChocoroot'].effsStr = '
• '+loc("golden cookie gains")+' +1%
• '+loc("harvest when mature to recover %1 worth of exhaustion",[Game.sayTime(3*Game.fps)])+'
• '+loc("predictable growth")+'
'; + M.plants['drowsyfern'].effsStr = '
• '+loc('magic regeneration speed')+' +4%
• '+loc('cookies/click')+' -5%
'; + M.plants['queenbeetLump'].effsStr = '
• '+loc("CpS")+' -10%
• '+loc("surrounding plants (%1x%1) are %2% less efficient",[3,20])+'
• '+loc('harvest when mature to completely stop decay for a maximum of %1', Game.sayTime(6 * Game.fps))+'
• '+loc('harvest when mature to purify all decay')+'
'; + eval("M.tools['info'].descFunc="+M.tools['info'].descFunc.toString().replace(`buildingCost:{n:'building costs',rev:true},`, `buildingCost:{n:'building costs',rev:true}, wrinklerApproach:{n:'wrinklers approach speed',rev:true}, wrathReplace:{n:'wrath cookies replacement',rev:true}, haltPower:{n:'decay-halting power'}, decayRate:{n:'decay rates',rev:true}, decayMomentum:{n:'decay momentum',rev:true}, magicRegenSpeed:{n:'magic regeneration speed'}`)); eval("M.convert="+M.convert.toString().replace("Game.gainLumps(10);","Game.gainLumps(30);").replace(`M.unlockSeed(M.plants['bakerWheat']);`, `M.unlockProtectedSeeds();`)); @@ -5931,7 +6242,6 @@ Game.registerMod("Kaizo Cookies", { M.buildPanel(); - M.tools['convert'].desc=loc("A swarm of sugar hornets comes down on your garden, destroying every plant as well as every seed you've unlocked - leaving only a %1 seed.
In exchange, they will grant you %2.
This action is only available with a complete seed log.",[loc("Baker's wheat"),loc("%1 sugar lump",LBeautify(30))]); eval("M.askConvert="+M.askConvert.toString().replace("10","30")); eval("M.convert="+M.convert.toString().replace("10","30")); @@ -6030,7 +6340,7 @@ Game.registerMod("Kaizo Cookies", { .replace(`else if (godLvl==3) Game.gainBuff('devastation',10,1+sold*0.0025);`,`else if (godLvl==3) Game.gainBuff('devastation',10,1+sold*0.0025,1+sold*0.0015); if (Game.hasBuff('Devastation')) { decay.triggerNotif('godzamok'); }`) .replace('if (success && Game.hasGod)', 'if (success && (Game.auraMult("Earth Shatterer") || (decay.challengeStatus("dualcast") && this.name == "Wizard tower"))) { decay.stop(Math.pow(sold, 0.5) * (decay.challengeStatus("earthShatterer")?1.1:1) * (Game.auraMult("Earth Shatterer")?Game.auraMult("Earth Shatterer"):0.1) * 1, "earthShatterer"); } if (success && Game.hasGod)') .replace('else if (godLvl==2) old.multClick+=sold*0.005;', 'else if (godLvl==2) { old.multClick+=sold*0.005; old.arg2+=sold*0.004; }') - .replace('else if (godLvl==3) old.multClick+=sold*0.0025;', 'else if (godLvl==3) { old.multClick+=sold*0.0025; old.arg2+=sold*0.0015; }') + .replace('else if (godLvl==3) old.multClick+=sold*0.0025;', 'else if (godLvl==3) { old.multClick+=sold*0.0025; old.arg2+=sold*0.0015; } old.desc = loc("Clicking power +%1% for %2!",[Math.floor(old.multClick*100-100),Game.sayTime(old.time,-1)]);') .replace(`Game.auraMult('Dragon Orbs')*0.1`, `Game.auraMult('Dragon Orbs')*(decay.challengeStatus('comboOrbs')?0.25:0.1)`) .replace('if (buffsN==0)', 'if (buffsN<=(decay.challengeStatus("allBuffStack")?1:0))') ); @@ -6094,6 +6404,7 @@ Game.registerMod("Kaizo Cookies", { temp.gods['scorn'].desc2=''+loc('Wrinkler move -%1% as fast.', 20)+' '+loc('Wrath cookies replaces Golden cookies with %1% less decay.', 33); temp.gods['scorn'].desc3=''+loc('Wrinkler move -%1% as fast.', 10)+' '+loc('Wrath cookies replaces Golden cookies with %1% less decay.', 20); delete temp.gods['scorn'].descBefore; + eval('Game.shimmerTypes.golden.popFunc='+Game.shimmerTypes.golden.popFunc.toString().replace(`Game.hasGod && Game.hasGod('scorn')`, `false`)); addLoc('Purifying decay grants a buff.'); addLoc('-%1% decay for %2 seconds.'); @@ -6397,6 +6708,7 @@ Game.registerMod("Kaizo Cookies", { eval('Game.ToggleSpecialMenu='+Game.ToggleSpecialMenu.toString() .replace('var moni=Math.pow(Game.santaLevel+1,Game.santaLevel+1);', 'var moni=(Game.Has("Season switcher")?1:1e9)*Math.pow((Game.santaLevel+1)*1.2,(Game.santaLevel+1)*1.2);') .replace(`'
'+loc("sacrifice %1",'moni?'':' style="color:#777;"')+'>'+loc("%1 cookie",LBeautify(Math.pow(Game.santaLevel+1,Game.santaLevel+1)))+'
')+''+`, `'
'+'moni&&decay.utenglobeStorage.soul.amount>=Game.santaSoulReqGet(Game.santaLevel)&&decay.utenglobeStorage.shinySoul.amount>=Game.santaShinySoulReqGet(Game.santaLevel))?'':' style="color:#777;"')+'>'+loc("%1 cookie",LBeautify(moni))+'
'+((Game.santaSoulReqGet(Game.santaLevel) > 0)?loc('%1 soul',LBeautify(Game.santaSoulReqGet(Game.santaLevel))):'')+(Game.santaShinySoulReqGet(Game.santaLevel)>0?('
'+loc('%1 shiny soul',LBeautify(Game.santaShinySoulReqGet(Game.santaLevel)))):'')+'
'+`) + .replace(`if (Game.santaLevel<14)`, `if (Game.santaLevel>=14) { str += decay.getSantaFinalStageContents(); } else if (Game.santaLevel<14)`) ); addLoc('Also makes all santa\'s gifts %1 times cheaper.'); replaceDesc('Season switcher', 'Allow you to trigger seasonal events at will, for a price.' + '
' + loc('Also makes all santa\'s gifts %1 times cheaper.', Beautify(1e9)) + '' + 'There will always be time.' + ''); @@ -6452,6 +6764,57 @@ Game.registerMod("Kaizo Cookies", { Game.Upgrades[Game.santaDrops[i]].desc = Game.Upgrades[Game.santaDrops[i]].desc.slice(0, Game.Upgrades[Game.santaDrops[i]].desc.indexOf('')) + '
' + loc('Cost increases by 12 times for each santa upgrade bought.') + Game.Upgrades[Game.santaDrops[i]].desc.slice(Game.Upgrades[Game.santaDrops[i]].desc.indexOf(''), Game.Upgrades[Game.santaDrops[i]].desc.length); Game.Upgrades[Game.santaDrops[i]].desc = Game.Upgrades[Game.santaDrops[i]].desc.replace('
'+loc('Cost scales with Santa level.'), ''); } + decay.getSantaFinalStageContents = function() { + return '
'+ + ''; + } + addLoc('Reindeer frenzy'); + addLoc('Reindeers incoming!') + new Game.buffType('reindeerFrenzy', function(time) { + return { + name: loc('Reindeer frenzy'), + desc: loc('Reindeers incoming!'), + icon: [21, 2, kaizoCookies.images.custImg], + time: time*Game.fps, + add: true, + aura: 1 + } + }); + decay.summonReindeerFrenzy = function() { + if (!(decay.utenglobeStorage.soul.amount>=16&&decay.utenglobeStorage.shinySoul.amount>=4)) { return; } + Game.gainBuff('reindeerFrenzy', 7); + decay.reindeerFrenzyLastSpawn = Game.T; + decay.utenglobeStorage.soul.lose(16); + decay.utenglobeStorage.shinySoul.lose(4); + Game.ToggleSpecialMenu(1); + Game.Win('Mass reindeer duplication'); + } + decay.reindeerFrenzyLastSpawn = 0; + Game.registerHook('logic', function() { + if (!Game.hasBuff('Reindeer frenzy')) { + return; + } + + if (Math.random() < (Game.T - decay.reindeerFrenzyLastSpawn) / (Game.fps / 2)) { + let h = new Game.shimmer('reindeer'); + h.spawnLead = 1; + decay.reindeerFrenzyLastSpawn = Game.T; + } + }); + eval('Game.shimmerTypes.reindeer.initFunc='+Game.shimmerTypes.reindeer.initFunc.toString().replace(`if (Game.Has('Weighted sleighs')) dur*=2;`, `if (Game.Has('Weighted sleighs') && !Game.hasBuff('Reindeer frenzy')) dur*=2;`)); + + replaceDesc('Stevia Caelestis', 'Wrinklers approach the big cookie 5% slower.
You deal 5% more damage to wrinklers.', true); + replaceDesc('Diabetica Daemonicus', 'The wrinkler stun effect on damage is twice as potent.', true); + replaceDesc('Sugar aging process', 'Each grandma (up to 800) increases damage against shiny wrinklers by 0.05%.', true); + replaceDesc('Sucralosia Inutilis', 'Each wrinkler has a 10% chance to spawn with 4 less layers.', true); + Game.Upgrades['Kitten wages'].basePrice /= 1000; Game.synergyPriceFunc = function() { return (this.buildingTie1.basePrice*this.buildingTie2.basePrice)*Game.Tiers[this.tier].price*(Game.Has('Chimera')?0.98:1); } Game.Tiers.synergy1.price = 200; @@ -6506,6 +6869,11 @@ Game.registerMod("Kaizo Cookies", { Game.Upgrades[Game.Tiers[i].unshackleUpgrade].basePrice = Math.pow(parseFloat(i), 6)*20000000; } + eval('Game.CalculateGains='+Game.CalculateGains.toString().replace('eggMult*=1+(1-Math.pow(1-day/100,3))*0.1;', 'eggMult*=1+(1-Math.pow(1-Math.min(Game.TCount / Game.fps / 3600 / 12, 1), 3))*0.25;')); + Game.Upgrades['Century egg'].descFunc = function() { + return '
'+loc("Current boost:")+' +'+Beautify((1-Math.pow(1-Math.min(Game.TCount / Game.fps / 3600 / 12, 1), 3))*0.25*100,1)+'%
'+this.ddesc; + } + //building locks injectCSS(`.priceBuildings { font-weight:bold; color:#f66; padding-left:18px; position:relative; }`); injectCSS(`.priceBuildings:before { @@ -6751,15 +7119,22 @@ Game.registerMod("Kaizo Cookies", { auraDesc(12, "Elder frenzy from Wrath cookies appear 4x as often.", 'Aura: 4x Elder frenzy chance from Wrath cookies'); auraDesc(13, "Having purity now makes positive buffs run out slower, for up to -50% buff duration decrease rate.", 'Aura: purity decreases buff duration decrease rate'); auraDesc(15, "All cookie production multiplied by 1.5.", 'Aura: all cookie production multiplied by 1.5'); - auraDesc(21, "Clicking on the big cookie knock back all wrinklers slightly", 'Aura: global wrinkler knockback on click'); + auraDesc(21, "Clicking on the big cookie knock back all wrinklers slightly, but excessive use in a short amount of time may lead to reduced effectiveness.", 'Aura: global wrinkler knockback on click'); + decay.dragonGutsKBMeter = 0.2; + decay.dragonGutsKBMeterMax = 0.2; + decay.dragonGutsKBRegenPerSec = 0.008 * 1.5; //1.5 cps maximum Game.registerHook('click', function() { - if (!Game.auraMult('Dragon Guts')) { return; } + if (!Game.auraMult('Dragon Guts') || decay.dragonGutsKBMeter <= 0) { return; } let allWrinklers = Crumbs.getObjects('w', 'left'); + decay.dragonGutsKBMeter -= 0.008 * Game.auraMult('Dragon Guts'); for (let i in allWrinklers) { - allWrinklers[i].dist += 0.004 * Game.auraMult('Dragon Guts'); + allWrinklers[i].dist += 0.008 * Game.auraMult('Dragon Guts'); } }); + Game.registerHook('logic', function() { + decay.dragonGutsKBMeter = Math.min(decay.dragonGutsKBMeter + decay.dragonGutsKBRegenPerSec / Game.fps * Math.max(Game.auraMult('Dragon Guts'), 1), decay.dragonGutsKBMeterMax); + }); allValues('auras'); @@ -6786,7 +7161,6 @@ Game.registerMod("Kaizo Cookies", { allValues('upgrades rework'); - /* decay.getNews = function() { var newList = []; var name = Game.bakeryName; @@ -7176,7 +7550,6 @@ Game.registerMod("Kaizo Cookies", { eval('Game.getNewTicker='+Game.getNewTicker.toString().replace(/News :/g, "News:").replace("Neeeeews :", "Neeeeews:").replace("Nws :", "Nws:").replace('Game.TickerEffect=0;', 'var ov = Game.overrideNews(); if (ov.length) { list = choose(ov); } Game.TickerEffect=0;').replace('Game.Ticker=choose(list);', 'Game.Ticker=choose(list); Game.lastTicker = Game.Ticker;')); allValues('news'); - */ /*===================================================================================== Power clicks @@ -7502,7 +7875,7 @@ Game.registerMod("Kaizo Cookies", { allWrinklers[i].dist += 0.03; if (Game.Has('Abaddon')) { allWrinklers[i].dist += 0.07; } } - allWrinklers[i].hurt += 100; + allWrinklers[i].hurt += 100 * (Game.Has('Diabetica Daemonicus') + 1); if (allWrinklers[i].size < prevSize) { decay.spawnWrinklerbits(allWrinklers[i], 4, 1.5, 1.5, decay.wrinklerExplosionBitsFunc, originX - allWrinklers[i].x, originY - allWrinklers[i].y); } } } @@ -7560,8 +7933,9 @@ Game.registerMod("Kaizo Cookies", { l('cookieAnchor').appendChild(bigCookie); if (Game.touchEvents) { AddEvent(bigCookie,'touchend',Game.ClickCookie); - AddEvent(bigCookie,'touchstart',function(event){if (decay.gameCan.click) { Game.BigCookieState=1; }if (event) event.preventDefault();}); - AddEvent(bigCookie,'touchend',function(event){if (decay.gameCan.click) { Game.BigCookieState=0; }if (event) event.preventDefault();}); + AddEvent(bigCookie,'touchstart',function(event){if (decay.gameCan.click) { Game.BigCookieState=1; } Game.bigCookieHovered = true; if (event) event.preventDefault();}); + AddEvent(bigCookie,'touchend',function(event){if (decay.gameCan.click) { Game.BigCookieState=0; } Game.bigCookieHovered = false; if (event) event.preventDefault();}); + AddEvent(bigCookie,'touchcancel',function(event) { Game.BigCookieState=0; Game.bigCookieHovered = false; if (event) event.preventDefault(); }); } else { AddEvent(bigCookie,'click',Game.ClickCookie); AddEvent(bigCookie,'mousedown',function(event){if (decay.gameCan.click) { Game.BigCookieState=1; }if (Game.prefs.cookiesound) {Game.playCookieClickSound();}if (event) event.preventDefault();}); @@ -8026,7 +8400,10 @@ Game.registerMod("Kaizo Cookies", { let newVector = this.mouseVector.copy().toPolar(); newVector[0] = Math.pow(newVector[0], 0.15); this.velocity.addPolar(newVector); - this.scale *= 2; + this.scale *= 1.75; + } + if (decay.prefs.bigOrbs) { + this.scale *= 1.6; } if (Game.hasBuff('Haggler\'s misery')) { this.velocity.multiply(3); @@ -8147,6 +8524,7 @@ Game.registerMod("Kaizo Cookies", { } vel.multiply(Math.min(1, 1.5 - Math.pow(this.hp / this.hpMax, 2))); //decreased momentum if above some health + if (decay.prefs.slowOrbs) { vel.multiply(0.5); } this.velToAdd.add(vel); } Game.randomRad = function() { @@ -8154,7 +8532,7 @@ Game.registerMod("Kaizo Cookies", { } decay.teleportMirageObj = { update: function(me) { - me.scale -= 2 / Game.fps; + me.scale -= 1.5 / Game.fps; if (me.scale <= 0) { me.die(); } }, onClick: function(me) { @@ -8180,7 +8558,7 @@ Game.registerMod("Kaizo Cookies", { decay.powerOrb.prototype.selectMode = function(bans) { var pool = ['floating', 'jumpy']; if (this.hp > this.hpMax / 2) { pool.push('daring'); } else { pool.push('teleporting'); } - if (this.hp < this.hpMax / 5) { pool.push('crazy'); pool.push('crazy'); } + if (this.hp < this.hpMax / 5) { pool.push('crazy'); } if (Math.random() < 0.8 && pool.indexOf(this.mode) != -1) { pool.splice(pool.indexOf(this.mode), 1); } for (let i in bans) { @@ -8276,7 +8654,7 @@ Game.registerMod("Kaizo Cookies", { this.spawnAura(); decay.triggerNotif('powerOrb'); - me.velocity.add(decay.polar((Math.random() * 50 + 50) * (1 - 0.8 * this.hp / this.hpMax), 2 * Math.PI * (Math.random() - 0.5))); + me.velocity.add(decay.polar((Math.random() * 50 + 50) * (1 - 0.8 * this.hp / this.hpMax) * (decay.prefs.slowOrbs?0.5:1), 2 * Math.PI * (Math.random() - 0.5))); me.times.sinceLastClick = 0; me.fleeIn += 20 * Game.fps; if (this.mode == 'teleporting' || this.mode == 'fleeing') { @@ -8284,7 +8662,7 @@ Game.registerMod("Kaizo Cookies", { } me.nextModeIn /= 4; me.nextModeIn = Math.floor(me.nextModeIn); - me.hp -= 8 * (Game.Has('Dominions')?1.5:1) * (decay.challengeStatus('godz')?1.4:1) * (Game.hasBuff('Haggler\'s luck')?1.5:1); + me.hp -= 10 * (Game.Has('Dominions')?1.5:1) * (decay.challengeStatus('godz')?1.4:1) * (Game.hasBuff('Haggler\'s luck')?1.5:1); decay.stop(1.8, 'click'); } decay.powerOrb.prototype.onBounce = function() { @@ -8521,6 +8899,7 @@ Game.registerMod("Kaizo Cookies", { kaizoCookies.checkChallengeAchievs(); decay.checkChallengeUnlocks(); Game.UpdateMenu(); + Game.WriteSave(); } decay.challenge.prototype.checkUnlock = function() { if (!this.unlockCondition()) { return false; } @@ -8601,7 +8980,7 @@ Game.registerMod("Kaizo Cookies", { addLoc('Show completed challenges'); addLoc('Hide unfinished challenges'); addLoc('Show unfinished challenges'); - addLoc('It seems that there\'s nothing here. Come back after getting some more heavenly upgrades! (Specifically, the Vial of challenges)'); + addLoc('Come back after getting some more heavenly upgrades! (Specifically, the Vial of challenges)'); decay.challengeDisplay = function() { //returns html for the challenges if (Game.ascensionMode != 42069 && !decay.challengesCompleted) { return ''; } @@ -8660,7 +9039,7 @@ Game.registerMod("Kaizo Cookies", { str2 += ''; } if (!str2) { - str2 += '
' + loc('It seems that there\'s nothing here.') + (Game.Has('Vial of challenges')?'':' '+loc('Come back after getting some more heavenly upgrades! (Specifically, the Vial of challenges)')) + '
'; + str2 += '
' + loc('It seems that there\'s nothing here.') + (Game.Has('Vial of challenges')?'':' '+loc('Come back after getting some more heavenly upgrades! (Specifically, the Vial of challenges)', decay.getUpgradeTooltipCSS('Vial of challenges'))) + '
'; } if (hasPrereq) { str2 += '
'; @@ -8912,18 +9291,24 @@ Game.registerMod("Kaizo Cookies", { return new decay.challengeChecker(obj.check, obj.save, obj.load, init); } } + + decay.getUpgradeTooltipCSS = function(name) { + return Game.getDynamicTooltip('(function(){return Game.crateTooltip(Game.Upgrades[\''+name+'\']);})','',true); + } + injectCSS(`.highlightHover.underlined { text-decoration: underline; color: #ddd; cursor: pointer; }`); + injectCSS(`.highlightHover.underlined:hover { text-decoration: underline; color: #fff; }`); //DO NOT ADD CHALLENGES IN BETWEEN. Affix them at the end only and use the order argument (in the obj argument); if not, the save breaks new decay.challenge('sb1', decay.challengeDescModules.bakeFast(1e6, 35*60), function(c) { if (Game.TCount >= 35 * 60 * Game.fps) { c.makeCannotComplete(); } return (Game.cookiesEarned >= 1e6); }, 'Speed baking I', function() { return false && decay.challengeUnlockModules.always; }, { onCompletion: function() { Game.Win('Speed baking I'); }, order: -1 }); new decay.challenge('sb2', decay.challengeDescModules.bakeFast(1e6, 25*60), function(c) { if (Game.TCount >= 25 * 60 * Game.fps) { c.makeCannotComplete(); } return (Game.cookiesEarned >= 1e6); }, 'Speed baking II', function() { return false && decay.challengeUnlockModules.always; }, { onCompletion: function() { Game.Win('Speed baking II'); }, prereq: 'sb1', order: -1 }); new decay.challenge('sb3', decay.challengeDescModules.bakeFast(1e6, 15*60), function(c) { if (Game.TCount >= 15 * 60 * Game.fps) { c.makeCannotComplete(); } return (Game.cookiesEarned >= 1e6); }, 'Speed baking III', function() { return false && decay.challengeUnlockModules.always; }, { onCompletion: function() { Game.Win('Speed baking III'); }, prereq: 'sb2', order: -1 }); - addLoc('(Heavenly) Enchanted Permanent upgrade slot I'); addLoc('(Linked heavenly) Rift to the beyond'); - new decay.challenge(1, decay.challengeDescModules.bakeAndKeep(1e18, 60), decay.quickCheck(decay.checkerBundles.bakeAndKeep, decay.checkerBundles.bakeAndKeep.init(1e18, 60 * Game.fps)), loc('(Heavenly) Enchanted Permanent upgrade slot I') + '
' + loc('(Linked heavenly) Rift to the beyond'), decay.challengeUnlockModules.vial, { prereq: 'combo1' }); addLoc('(Heavenly) Enchanted Permanent upgrade slot II'); addLoc('(Linked heavenly) Stabilizing crystal') - new decay.challenge(2, decay.challengeDescModules.bakeAndKeep(1e27, 70), decay.quickCheck(decay.checkerBundles.bakeAndKeep, decay.checkerBundles.bakeAndKeep.init(1e27, 70 * Game.fps)), loc('(Heavenly) Enchanted Permanent upgrade slot II') + '
' + loc('(Linked heavenly) Stabilizing crystal'), decay.challengeUnlockModules.vial, { prereq: 1 }); addLoc('(Heavenly) Enchanted Permanent upgrade slot III'); addLoc('(Linked heavenly) Thunder marker'); - new decay.challenge(3, decay.challengeDescModules.bakeAndKeep(1e33, 80), decay.quickCheck(decay.checkerBundles.bakeAndKeep, decay.checkerBundles.bakeAndKeep.init(1e33, 80 * Game.fps)), loc('(Heavenly) Enchanted Permanent upgrade slot III') + '
' + loc('(Linked heavenly) Thunder marker'), decay.challengeUnlockModules.box, { prereq: 2 }); addLoc('(Heavenly) Enchanted Permanent upgrade slot IV'); - new decay.challenge(4, decay.challengeDescModules.bakeAndKeep(1e45, 90), decay.quickCheck(decay.checkerBundles.bakeAndKeep, decay.checkerBundles.bakeAndKeep.init(1e45, 90 * Game.fps)), loc('(Heavenly) Enchanted Permanent upgrade slot IV'), decay.challengeUnlockModules.box, { prereq: 3 }); addLoc('(Heavenly) Enchanted Permanent upgrade slot V'); - new decay.challenge(5, decay.challengeDescModules.bakeAndKeep(1e57, 30), decay.quickCheck(decay.checkerBundles.bakeAndKeep, decay.checkerBundles.bakeAndKeep.init(1e57, 30 * Game.fps)), loc('(Heavenly) Enchanted Permanent upgrade slot V'), decay.challengeUnlockModules.truck, { prereq: 4 }); + addLoc('Enchanted Permanent upgrade slot I'); addLoc('Rift to the beyond'); + new decay.challenge(1, decay.challengeDescModules.bakeAndKeep(1e18, 60), decay.quickCheck(decay.checkerBundles.bakeAndKeep, decay.checkerBundles.bakeAndKeep.init(1e18, 60 * Game.fps)), '' + loc('Enchanted Permanent upgrade slot I') + '
' + loc('Rift to the beyond') + '', decay.challengeUnlockModules.vial, { prereq: 'combo1' }); addLoc('Enchanted Permanent upgrade slot II'); addLoc('Stabilizing crystal') + new decay.challenge(2, decay.challengeDescModules.bakeAndKeep(1e27, 70), decay.quickCheck(decay.checkerBundles.bakeAndKeep, decay.checkerBundles.bakeAndKeep.init(1e27, 70 * Game.fps)), '' + loc('Enchanted Permanent upgrade slot II') + '
' + loc('Stabilizing crystal') + '', decay.challengeUnlockModules.vial, { prereq: 1 }); addLoc('Enchanted Permanent upgrade slot III'); addLoc('Thunder marker'); + new decay.challenge(3, decay.challengeDescModules.bakeAndKeep(1e33, 80), decay.quickCheck(decay.checkerBundles.bakeAndKeep, decay.checkerBundles.bakeAndKeep.init(1e33, 80 * Game.fps)), '' + loc('Enchanted Permanent upgrade slot III') + '
' + loc('Thunder marker') + '', decay.challengeUnlockModules.box, { prereq: 2 }); addLoc('Enchanted Permanent upgrade slot IV'); + new decay.challenge(4, decay.challengeDescModules.bakeAndKeep(1e45, 90), decay.quickCheck(decay.checkerBundles.bakeAndKeep, decay.checkerBundles.bakeAndKeep.init(1e45, 90 * Game.fps)), '' + loc('Enchanted Permanent upgrade slot IV') + '', decay.challengeUnlockModules.box, { prereq: 3 }); addLoc('Enchanted Permanent upgrade slot V'); + new decay.challenge(5, decay.challengeDescModules.bakeAndKeep(1e57, 30), decay.quickCheck(decay.checkerBundles.bakeAndKeep, decay.checkerBundles.bakeAndKeep.init(1e57, 30 * Game.fps)), '' + loc('Enchanted Permanent upgrade slot V') + '', decay.challengeUnlockModules.truck, { prereq: 4 }); addLoc('Bake %1 with no normal upgrades bought.'); addLoc('Halved flavored cookie cost'); @@ -8931,17 +9316,17 @@ Game.registerMod("Kaizo Cookies", { eval('Game.Upgrade.prototype.buy='+Game.Upgrade.prototype.buy.toString().replace('Game.Spend(price);', 'Game.Spend(price); if (this.pool != "toggle") { decay.challenges.hc.makeCannotComplete(); }')) addLoc('Activate the Elder Pledge in the first %1 of the run.'); - addLoc('The Memory capsule upgrade becomes free'); + addLoc('The Memory capsule becomes free'); addLoc('Unlocks the Touch of force'); - new decay.challenge('pledge', loc('Activate the Elder Pledge in the first %1 of the run.', Game.sayTime(7.35 * 60 * Game.fps, -1)), function(c) { if (Game.TCount >= 7.35 * 60 * Game.fps) { c.makeCannotComplete(); return; } return Game.pledges>=1; }, loc('The Memory capsule upgrade becomes free') + '
' + loc('Research is twice as fast') + '
' + loc('Unlocks the Touch of force'), decay.challengeUnlockModules.vial, { prereq: 'combo2', onCompletion: function() { Game.Unlock('Touch of force'); Game.Unlock('Touch of force [ACTIVE]'); Game.Upgrades['Touch of force [ACTIVE]'].bought = 1; } }); + new decay.challenge('pledge', loc('Activate the Elder Pledge in the first %1 of the run.', Game.sayTime(7.35 * 60 * Game.fps, -1)), function(c) { if (Game.TCount >= 7.35 * 60 * Game.fps) { c.makeCannotComplete(); return; } return Game.pledges>=1; }, loc('The Memory capsule becomes free', decay.getUpgradeTooltipCSS('Memory capsule')) + '
' + loc('Research is twice as fast') + '
' + loc('Unlocks the Touch of force'), decay.challengeUnlockModules.vial, { prereq: 'combo2', onCompletion: function() { Game.Unlock('Touch of force'); Game.Unlock('Touch of force [ACTIVE]'); Game.Upgrades['Touch of force [ACTIVE]'].bought = 1; } }); addLoc('Reach a base CpS multiplier from purity of at least %1 with no spells casted.'); addLoc('CpS multiplier x%1 for each x2 CpS multiplier from your purity'); new decay.challenge('purity1', loc('Reach a base CpS multiplier from purity of at least %1 with no spells casted.', '+900%'), function(c) { if (gp && gp.spellsCast > 0) { c.makeCannotComplete(); return; } return decay.gen>=10; }, loc('CpS multiplier x%1 for each x2 CpS multiplier from your purity', '1.1'), decay.challengeUnlockModules.vial, { prereq: 'pledge' }); addLoc('Reach the Elfling santa stage without ever spending any wrinkler souls.'); - addLoc('The "A golden hat" upgrade is 10 times cheaper.'); - new decay.challenge('buildingCount', loc('Reach the Elfling santa stage without ever spending any wrinkler souls.'), function(c) { return (Game.santaLevel >= 7); }, loc('The "A golden hat" upgrade is 10 times cheaper.') + '
' + loc('CpS multiplier x%1 for each x2 CpS multiplier from your purity', '1.1'), function() { return decay.challengeUnlockModules.vial && Game.Upgrades['A golden hat']?.everBought; }, { prereq: 2, category: 'vial' }); + addLoc('The golden hat is 10 times cheaper'); + new decay.challenge('buildingCount', loc('Reach the Elfling santa stage without ever spending any wrinkler souls.'), function(c) { return (Game.santaLevel >= 7); }, loc('The golden hat is 10 times cheaper', decay.getUpgradeTooltipCSS('A golden hat')) + '
' + loc('CpS multiplier x%1 for each x2 CpS multiplier from your purity', '1.1'), function() { return decay.challengeUnlockModules.vial && Game.Upgrades['A golden hat']?.everBought; }, { prereq: 2, category: 'vial' }); addLoc('Wrinklers approach the big cookie %1 slower'); addLoc('Only buy every other building type, starting from Grandmas, and bake %1.'); @@ -8950,8 +9335,8 @@ Game.registerMod("Kaizo Cookies", { addLoc('Bake %1 without popping any wrinklers.'); addLoc('Your clicks are %1 more effective against wrinklers'); - addLoc('Improves the Molten piercer to destroy wrinklers with one more layer'); - new decay.challenge('wrinkler1', loc('Bake %1 without popping any wrinklers.', Beautify(1e20)), function(c) { if (Game.wrinklersPopped) { c.makeCannotComplete(); } return (Game.cookiesEarned >= 1e20); }, loc('Your clicks are %1 more effective against wrinklers', '15%') + '
' + loc('Improves the Molten piercer to destroy wrinklers with one more layer'), decay.challengeUnlockModules.vial, { prereq: ['hc', 'combo1'] }); + addLoc('Improves the Molten piercer to destroy wrinklers with one more layer'); + new decay.challenge('wrinkler1', loc('Bake %1 without popping any wrinklers.', Beautify(1e20)), function(c) { if (Game.wrinklersPopped) { c.makeCannotComplete(); } return (Game.cookiesEarned >= 1e20); }, loc('Your clicks are %1 more effective against wrinklers', '15%') + '
' + loc('Improves the Molten piercer to destroy wrinklers with one more layer', decay.getUpgradeTooltipCSS('Molten piercer')), decay.challengeUnlockModules.vial, { prereq: ['hc', 'combo1'] }); addLoc('Bake %1 without ever having any purity or clicking any golden cookies.'); addLoc('Golden cookies are %1 more effective in purifying decay'); @@ -8966,7 +9351,7 @@ Game.registerMod("Kaizo Cookies", { addLoc('You start with the Shimmering veil turned on, but if the Shimmering veil collapses, force ascend. Having purity greatly heals the veil.'); addLoc('While exhausted, wrinkler souls halt decay for 10% longer'); - new decay.challenge('veil', loc('You start with the Shimmering veil turned on, but if the Shimmering veil collapses, force ascend. Having purity greatly heals the veil.')+'
'+loc('Bake %1 cookies.', Beautify(1e33)), function() { return Game.cookiesEarned>=1e33; }, loc('While exhausted, wrinkler souls halt decay for 10% longer'), function() { return decay.challengeUnlockModules.box && Game.Has('Shimmering veil'); }, { prereq: ['powerClickWrinklers', 'earthShatterer'], category: 'box', conditional: true }); + new decay.challenge('veil', loc('You start with the Shimmering veil turned on, but if the Shimmering veil collapses, force ascend. Having purity greatly heals the veil.')+'
'+loc('Bake %1 cookies.', Beautify(1e33)), function() { return Game.cookiesEarned>=1e33; }, loc('While exhausted, wrinkler souls halt decay for 10% longer') + '
' + loc('Wrinklers approach the big cookie 10% slower'), function() { return decay.challengeUnlockModules.box && Game.Has('Shimmering veil'); }, { prereq: ['powerClickWrinklers', 'earthShatterer'], category: 'box', conditional: true }); addLoc('Reindeers spawn constantly, regardless of season, and massively amplify decay when clicked. Easy clicks and wrinklers are disabled.'); new decay.challenge('reindeer', loc('Reindeers spawn constantly, regardless of season, and massively amplify decay when clicked. Easy clicks and wrinklers are disabled.')+'
'+loc('Bake %1 cookies.', Beautify(1e24)), function() { return Game.cookiesEarned>=1e24; }, loc('CpS multiplier x%1 for each x2 CpS multiplier from your purity', '1.1'), decay.challengeUnlockModules.box, { prereq: 'powerClickWrinklers', conditional: true }); @@ -9324,17 +9709,17 @@ Game.registerMod("Kaizo Cookies", { //comboing tutorial addLoc('Get a Click frenzy in the first %1 of the run.'); addLoc('(Note: Click frenzies cannot be gotten from naturally spawning Golden cookies or Wrath cookies in this mod)') - addLoc('Click frenzy from Force the Hand of Fate Grimoire spell base chance %1 --> %2'); + addLoc('Click frenzy from Force the Hand of Fate Grimoire spell base chance %1 --> %2'); addLoc('A %1 %2 multiplier that gradually decreases with your current progress in a run'); - new decay.challenge('combo1', loc('Get a Click frenzy in the first %1 of the run.', Game.sayTime(10 * 60 * Game.fps)) + '
' + loc('(Note: Click frenzies cannot be gotten from naturally spawning Golden cookies or Wrath cookies in this mod)'), function(c) { if (Game.TCount >= 600 * Game.fps) { c.makeCannotComplete(); } return Game.hasBuff('Click frenzy'); }, function(hide) { return loc('Click frenzy from Force the Hand of Fate Grimoire spell base chance %1 --> %2', ['75%', '100%']) + '
' + loc('A %1 %2 multiplier that gradually decreases with your current progress in a run', ['+' + Beautify(909) + '%', 'CpS']) + (hide?'':(' ' + loc('(Currently: %1)', '+'+Beautify(909 / (Math.max(Game.log10Cookies - 10, 0) / 2 + 1))+'%'))); }, decay.challengeUnlockModules.vial); + new decay.challenge('combo1', loc('Get a Click frenzy in the first %1 of the run.', Game.sayTime(10 * 60 * Game.fps)) + '
' + loc('(Note: Click frenzies cannot be gotten from naturally spawning Golden cookies or Wrath cookies in this mod)'), function(c) { if (Game.TCount >= 600 * Game.fps) { c.makeCannotComplete(); } return Game.hasBuff('Click frenzy'); }, function(hide) { return loc('Click frenzy from Force the Hand of Fate Grimoire spell base chance %1 --> %2', ['100%', '125%']) + '
' + loc('A %1 %2 multiplier that gradually decreases with your current progress in a run', ['+' + Beautify(909) + '%', 'CpS']) + (hide?'':(' ' + loc('(Currently: %1)', '+'+Beautify(909 / (Math.max(Game.log10Cookies - 10, 0) / 2 + 1))+'%'))); }, decay.challengeUnlockModules.vial); eval('Game.shimmerTypes.golden.popFunc='+Game.shimmerTypes.golden.popFunc.toString().replace(`!Game.hasBuff('Dragonflight')`, `false`)); - addLoc('Get a Click frenzy and a Frenzy active simultaneously in the first %1 of the run.'); + addLoc('Get a Click frenzy and a Frenzy (or any other golden cookie buff) active simultaneously in the first %1 of the run.'); //addLoc('(Golden cookies not spawning fast enough? Maybe your permanent upgrade slots can help with that...)'); addLoc('(does not contribute to future click power multiplier checks)'); - addLoc('The Lucky day upgrade no longer resets on ascension'); + addLoc('Lucky day no longer resets on ascension'); addLoc('(Currently: %1)'); - new decay.challenge('combo2', loc('Get a Click frenzy and a Frenzy active simultaneously in the first %1 of the run.', Game.sayTime(4.5 * 60 * Game.fps, -1)), function(c) { if (Game.TCount >= 270 * Game.fps) { c.makeCannotComplete(); } return (Game.hasBuff('Click frenzy') && Game.hasBuff('Frenzy')); }, function(hide) { return loc('The Lucky day upgrade no longer resets on ascension') + '
' + loc('A %1 %2 multiplier that gradually decreases with your current progress in a run', ['+' + Beautify(909) + '%', 'click power']) + ' ' + loc('(does not contribute to future click power multiplier checks)') + (hide?'':(' '+loc('(Currently: %1)', '+'+Beautify(909 / (Math.max(Game.log10Cookies - 12, 0) / 5 + 1))+'%'))) }, decay.challengeUnlockModules.vial, { onCompletion: function() { decay.triggerNotif('combos'); }, prereq: 'combo1' }); + new decay.challenge('combo2', loc('Get a Click frenzy and a Frenzy (or any other golden cookie buff) active simultaneously in the first %1 of the run.', Game.sayTime(4.5 * 60 * Game.fps, -1)), function(c) { if (Game.TCount >= 270 * Game.fps) { c.makeCannotComplete(); } return (Game.hasBuff('Click frenzy') && Game.gcBuffCount() >= 2); }, function(hide) { return loc('Lucky day no longer resets on ascension', decay.getUpgradeTooltipCSS('Lucky day')) + '
' + loc('A %1 %2 multiplier that gradually decreases with your current progress in a run', ['+' + Beautify(909) + '%', 'click power']) + ' ' + loc('(does not contribute to future click power multiplier checks)') + (hide?'':(' '+loc('(Currently: %1)', '+'+Beautify(909 / (Math.max(Game.log10Cookies - 12, 0) / 5 + 1))+'%'))) }, decay.challengeUnlockModules.vial, { onCompletion: function() { decay.triggerNotif('combos'); }, prereq: 'combo1' }); Game.registerHook('cookiesPerClick', function(out) { if (decay.challengeStatus('combo2')) { return out * (1 + 9.09 / (Math.max(Game.log10Cookies - 12, 0) / 5 + 1)); } return out; }); addLoc('Get a direct click power multiplier of at least x%1 in the first %2 of the run.'); @@ -9348,14 +9733,14 @@ Game.registerMod("Kaizo Cookies", { addLoc('Sacrificing the garden leaves the %1 seed in addition to Baker\'s Wheat'); addLoc('Unlocks the Power channel in your Utenglobe'); new decay.challenge('combo4', loc('Get a direct click power multiplier of at least x%1 in the first %2 of the run.', [Beautify(50000), Game.sayTime(10 * 60 * Game.fps)]) + '
' + loc('(note: there is no way to stack Click frenzy and Dragonflight in this mod)'), function(c) { if (Game.TCount >= 600 * Game.fps) { c.makeCannotComplete(); } return (Game.clickMult >= 50000); }, loc('Sacrificing the garden leaves the %1 seed in addition to Baker\'s Wheat', 'Thumbcorn') + '
' + loc('Unlocks the Power channel in your Utenglobe'), decay.challengeUnlockModules.box, { prereq: 'combo3' }); - addLoc('Get a direct click power multiplier of at least x%1 with only one buff active, without Santa\'s helpers, and without help from the Garden. Then, click a naturally spawning golden cookie with Reaper of Fields slotted. (while the click power requirement is met)'); + addLoc('Get a direct click power multiplier of at least x%1 with only one buff active, without Santa\'s helpers, while not having a Dragonflight, and without help from the Garden. Then, click a naturally spawning golden cookie with Reaper of Fields slotted. (while the click power requirement is met)'); addLoc('All dragon auras cost 50 less buildings to unlock'); addLoc('Your dragon starts out hatched with the first aura unlocked'); - new decay.challenge('comboDragonCursor', loc('Get a direct click power multiplier of at least x%1 with only one buff active, without Santa\'s helpers, and without help from the Garden. Then, click a naturally spawning golden cookie with Reaper of Fields slotted. (while the click power requirement is met)', [Beautify(1282)]), function(c) { if (Game.Has('Santa\'s helpers')) { c.makeCannotComplete(); } return false; }, loc('All dragon auras cost 50 less buildings to unlock') + '
' + loc('Your dragon starts out hatched with the first aura unlocked'), decay.challengeUnlockModules.vial, { prereq: 'combo3' }); + new decay.challenge('comboDragonCursor', loc('Get a direct click power multiplier of at least x%1 with only one buff active, without Santa\'s helpers, while not having a Dragonflight, and without help from the Garden. Then, click a naturally spawning golden cookie with Reaper of Fields slotted. (while the click power requirement is met)', [Beautify(1165)]), function(c) { if (Game.Has('Santa\'s helpers')) { c.makeCannotComplete(); } return false; }, loc('All dragon auras cost 50 less buildings to unlock') + '
' + loc('Your dragon starts out hatched with the first aura unlocked'), decay.challengeUnlockModules.vial, { prereq: 'combo3' }); addLoc('Obtain a direct click power multiplier of at least x%1 during a Frenzy in the first %2 of the run, without casting more than one spell, and with the Golden switch turned on.'); - addLoc('The Golden switch is %1% cheaper.'); - new decay.challenge('comboGSwitch', loc('Obtain a direct click power multiplier of at least x%1 during a Frenzy in the first %2 of the run, without casting more than one spell, and with the Golden switch turned on.', [Beautify(1000), Game.sayTime(3 * 60 * Game.fps)]), function(c) { if (Game.TCount >= 180 * Game.fps) { c.makeCannotComplete(); } return (gp.spellsCast <= 1 && Game.clickMult >= 1000 && Game.Has('Golden switch [off]')); }, loc('The Golden switch is %1% cheaper.', 25) + '
' + loc('Cookie production multiplier +%1%.', 10), function() { return (decay.challengeUnlockModules.box() && Game.Has('Golden switch')); }, { category: 'box', prereq: ['combo2', 'earthShatterer'] }); + addLoc('The Golden switch is %1% cheaper'); + new decay.challenge('comboGSwitch', loc('Obtain a direct click power multiplier of at least x%1 during a Frenzy in the first %2 of the run, without casting more than one spell, and with the Golden switch turned on.', [Beautify(1000), Game.sayTime(3 * 60 * Game.fps)]), function(c) { if (Game.TCount >= 180 * Game.fps) { c.makeCannotComplete(); } return (gp.spellsCast <= 1 && Game.clickMult >= 1000 && Game.Has('Golden switch [off]')); }, loc('The Golden switch is %1% cheaper', 25) + '
' + loc('Wrinklers approach the big cookie 10% slower'), function() { return (decay.challengeUnlockModules.box() && Game.Has('Golden switch')); }, { category: 'box', prereq: ['combo2', 'earthShatterer'] }); Game.Upgrades['Golden switch [off]'].priceFunc = function() {return Game.cookiesPs*60*60*(decay.challengeStatus('comboGSwitch')?0.75:1);} Game.Upgrades['Golden switch [on]'].priceFunc = function() {return Game.cookiesPs*60*60*(decay.challengeStatus('comboGSwitch')?0.75:1);} @@ -9380,9 +9765,9 @@ Game.registerMod("Kaizo Cookies", { }); eval('Game.shimmerTypes.golden.popFunc='+Game.shimmerTypes.golden.popFunc.toString().replace(`if (Math.random()<0.05 && Game.season=='fools') list.push('everything must go');`, `if (Math.random()<0.05 && Game.season=='fools') list.push('everything must go'); if (decay.isConditional('comboOrbs') && !me.wrath) { list.push('miniFrenzy'); }`).replace(`else if (choice=='multiply cookies')`, `else if (choice=='miniFrenzy') { buff=Game.gainBuff('mini frenzy', Math.ceil(77 * effectDurMod), 1.7); } else if (choice=='multiply cookies')`)); - addLoc('You keep the Trigger fingers and Non-euclidean baking trays upgrades across ascensions.'); + addLoc('You keep Trigger fingers and Non-euclidean baking trays across ascensions'); addLoc('Speed baking IV'); - new decay.challenge('sb4', loc("Get to %1 baked in %2.", [loc("%1 cookie", LBeautify(1e8)), Game.sayTime(3 * Game.fps)]), function(c) { if (Game.TCount >= 3 * Game.fps) { c.makeCannotComplete(); } return ( Game.cookiesEarned > 1e8); }, loc('You keep the Trigger fingers and Non-euclidean baking trays upgrades across ascensions.') + '
' + loc('Speed baking IV'), decay.challengeUnlockModules.box, { prereq: 'comboOrbs', onCompletion: function() { Game.Win('Speed baking IV'); } }); + new decay.challenge('sb4', loc("Get to %1 baked in %2.", [loc("%1 cookie", LBeautify(1e8)), Game.sayTime(3 * Game.fps)]), function(c) { if (Game.TCount >= 3 * Game.fps) { c.makeCannotComplete(); } return ( Game.cookiesEarned > 1e8); }, loc('You keep Trigger fingers and Non-euclidean baking trays across ascensions', [decay.getUpgradeTooltipCSS('Trigger fingers'), decay.getUpgradeTooltipCSS('Non-euclidean baking trays')]) + '
' + loc('Speed baking IV'), decay.challengeUnlockModules.box, { prereq: 'comboOrbs', onCompletion: function() { Game.Win('Speed baking IV'); } }); addLoc('Get a CpS multiplier from buffs of at least x%1 and a direct click power multiplier of at least x%2 simultaneously, in the first %3 of the run'); new decay.challenge('godzSwap', loc('Get a CpS multiplier from buffs of at least x%1 and a direct click power multiplier of at least x%2 simultaneously, in the first %3 of the run', [100, 5000, Game.sayTime(6 * 60 * Game.fps)]), function(c) { if (Game.TCount >= 360 * Game.fps) { c.makeCannotComplete(); } return (Game.buffCpsMult >= 100 && Game.clickMult >= 5000); }, loc(''), function() { return false; }, { prereq: 'godz' }); @@ -9499,13 +9884,28 @@ Game.registerMod("Kaizo Cookies", { window.getStrCookieProductionMultiplierPlus=function(x) {return strCookieProductionMultiplierPlus.replace('[x]',x);} - this.createAchievements=function(){//Adding the custom upgrades - this.achievements = [] - this.achievements.push(new Game.Upgrade('Golden sugar',("Sugar lumps ripen (not including fall) 8 hours sooner.")+'Made from the highest quality sugar!',1000000000,[28,16])) - this.achievements.push(new Game.Upgrade('Cursedor',("Unlocks cursedor, which concentrates and converts your cookies clicked amount this ascension into a golden cookie; the more you clicked, the better effects the golden cookie will yield.")+'Like Russian roulette, but for cookies.',11111111111111111,[0,1,kaizoCookies.images.custImg])); Game.last.pool='prestige'; - Game.Upgrades['Cursedor'].parents=[Game.Upgrades['Luminous gloves']] - Game.PrestigeUpgrades.push(Game.Upgrades['Cursedor']); Game.UpgradesByPool.prestige.push(Game.last); - Game.last.posY=-760,Game.last.posX=-150; + this.createHeavenlyUpgrade = function(name, desc, cost, icon, parents, posX, posY, order) { + let upgrade = new Game.Upgrade(name, desc, cost, icon); + this.achievements.push(upgrade); + upgrade.pool = 'prestige'; + upgrade.posX = posX ?? 0; + upgrade.posY = posY ?? 0; + parents = parents ?? []; + parents = [].concat(parents); + if (order) { upgrade.order = order; } + for (let i = 0; i < parents.length; i++) { + if (typeof parents[i] == 'string') { parents.splice(i, 1, Game.Upgrades[parents[i]]); } + } + upgrade.parents = parents; + Game.PrestigeUpgrades.push(upgrade); Game.UpgradesByPool.prestige.push(upgrade); + return upgrade; + } + + this.createAchievements = function() {//Adding the custom upgrades + this.achievements = []; + this.achievements.push(new Game.Upgrade('Golden sugar',("Sugar lumps ripen (not including fall) 8 hours sooner.")+'Made from the highest quality sugar!',1000000000,[28,16])); + + this.createHeavenlyUpgrade('Cursedor',("Unlocks cursedor, which concentrates and converts your cookies clicked amount this ascension into a golden cookie; the more you clicked, the better effects the golden cookie will yield.")+'Like Russian roulette, but for cookies.',11111111111111111,[0,1,kaizoCookies.images.custImg], ['Luminous gloves'], -150, -760); this.achievements.push(new Game.Upgrade('Cursedor [inactive]',("Activating this will spawn a golden cookie based on the amount of times you clicked the big cookie this ascension when you click the big cookie. Upon use, your cookies clicked stat will be reset and the golden cookie spawned yields effects based on the amount it consumed."),0,[0,1,kaizoCookies.images.custImg])); Game.last.pool='toggle';Game.last.toggleInto='Cursedor [active]'; @@ -9519,30 +9919,15 @@ Game.registerMod("Kaizo Cookies", { decay.unskippableUpgrades.push(Game.last); this.achievements.push(new Game.Upgrade('Purity vaccines', 'Stops all decay.Developed for the time of need.', 7, [20, 6])); Game.last.pool='debug'; Game.UpgradesByPool['debug'].push(Game.last); - this.achievements.push(new Game.Upgrade('Unshackled Purity',("Purification is no longer limited by caps; however, increasing purity past the cap will require an increased amount of purification power.
The decay rate increase from purity increase -25%.")+'One of the strongest antidotes that has been found; it can cure all known diseases.',250000000000000,[4,1,kaizoCookies.images.custImg])); Game.last.pool='prestige'; - Game.Upgrades['Unshackled Purity'].parents=[Game.Upgrades['Unshackled flavor'],Game.Upgrades['Unshackled berrylium'],Game.Upgrades['Unshackled blueberrylium'],Game.Upgrades['Unshackled chalcedhoney'],Game.Upgrades['Unshackled buttergold'],Game.Upgrades['Unshackled sugarmuck'],Game.Upgrades['Unshackled jetmint'],Game.Upgrades['Unshackled cherrysilver'],Game.Upgrades['Unshackled hazelrald'],Game.Upgrades['Unshackled mooncandy'],Game.Upgrades['Unshackled astrofudge'],Game.Upgrades['Unshackled alabascream'],Game.Upgrades['Unshackled iridyum'],Game.Upgrades['Unshackled glucosmium'],Game.Upgrades['Unshackled glimmeringue']] - Game.PrestigeUpgrades.push(Game.Upgrades['Unshackled Purity']); Game.UpgradesByPool.prestige.push(Game.last); - Game.last.posY=195,Game.last.posX=750 + this.createHeavenlyUpgrade('Unshackled Purity',("Purification is no longer limited by caps; however, increasing purity past the cap will require an increased amount of purification power.
The decay rate increase from purity increase -25%.")+'One of the strongest antidotes that has been found; it can cure all known diseases.',250000000000000,[4,1,kaizoCookies.images.custImg], [], 750, 200); - this.achievements.push(new Game.Upgrade('Unshackled Elder Pledge',("Makes Elder Pledge's purification 25% stronger, reduces the cooldown by 25%, and makes the active duration 25% longer.")+'Your pledge to the grandmas is stronger than ever before.',2560000000000000,[1,1,kaizoCookies.images.custImg])); Game.last.pool='prestige'; - Game.Upgrades['Unshackled Elder Pledge'].parents=[Game.Upgrades['Unshackled grandmas']]; - Game.PrestigeUpgrades.push(Game.Upgrades['Unshackled Elder Pledge']); Game.UpgradesByPool.prestige.push(Game.last); - Game.last.posY=-361; Game.last.posX=516; + this.createHeavenlyUpgrade('Unshackled Elder Pledge',("Makes Elder Pledge's purification 25% stronger, reduces the cooldown by 25%, and makes the active duration 25% longer.")+'Your pledge to the grandmas is stronger than ever before.',2560000000000000,[1,1,kaizoCookies.images.custImg],['Unshackled grandmas'], 515, -360); - this.achievements.push(new Game.Upgrade('Uranium rolling pins', ('The Elder Pledge halts decay for 3 times longer on use.')+('Radiation, my superpower!'), 90000000000000, [5, 1, kaizoCookies.images.custImg])); Game.last.pool='prestige'; - Game.Upgrades['Uranium rolling pins'].parents=[Game.Upgrades['Cat ladies']]; - Game.PrestigeUpgrades.push(Game.Upgrades['Uranium rolling pins']); Game.UpgradesByPool.prestige.push(Game.last); - Game.last.posY=-740; Game.last.posX=800; - - this.achievements.push(new Game.Upgrade('Sparkling wonder', ('The Shimmering Veil has a 10% chance to be revived to full health on collapse.')+('Just within reach, yet at what cost?'), 1500000000000000, [23, 34])); Game.last.pool='prestige'; - Game.Upgrades['Sparkling wonder'].parents=[Game.Upgrades['Glittering edge']]; - Game.PrestigeUpgrades.push(Game.Upgrades['Sparkling wonder']); Game.UpgradesByPool.prestige.push(Game.last); - Game.last.posY=662; Game.last.posX=-622; + this.createHeavenlyUpgrade('Uranium rolling pins', ('The Elder Pledge halts decay for 3 times longer on use.')+('Radiation, my superpower!'), 90000000000000, [5, 1, kaizoCookies.images.custImg],['Cat ladies'],800,-740); + + this.createHeavenlyUpgrade('Sparkling wonder', ('The Shimmering Veil has a 10% chance to be revived to full health on collapse.')+('Just within reach, yet at what cost?'), 1500000000000000, [23, 34], 'Glittering edge', -622, 662); - this.achievements.push(new Game.Upgrade('Withering prices', 'Your upgrades are 0.1% cheaper for every x0.5 CpS multiplier from your decay.Oh my, oh my!', 666, [3, 3, kaizoCookies.images.custImg])); Game.last.pool = 'prestige'; - Game.Upgrades['Withering prices'].parents = [Game.Upgrades['Starter kit']]; - Game.PrestigeUpgrades.push(Game.Upgrades['Withering prices']); Game.UpgradesByPool.prestige.push(Game.last); - Game.last.posY = -300; Game.last.posX = -390; + this.createHeavenlyUpgrade('Withering prices', 'Your upgrades are 0.1% cheaper for every x0.5 CpS multiplier from your decay.Oh my, oh my!', 666, [3, 3, kaizoCookies.images.custImg], ['Starter kit'], -390, -300); this.achievements.push(new Game.Upgrade('Caramelized luxury', 'Sugar lumps ripen (not including fall) 4 hours sooner.The caramelization process causes the sugar molecules to change states, giving it a strong, deep aroma.', 1000000000000000, [28, 27])); this.achievements.push(new Game.Upgrade('Meaty disgust', 'Sugar lumps ripen (not including fall) 2 hours sooner.The presence of decay causes the sugar molecules growing within to fold in on itself, creating an entangled conglomeration that breeds agony.', 1000000000000000000000000000, [28, 17])); @@ -9572,10 +9957,8 @@ Game.registerMod("Kaizo Cookies", { Game.Upgrades['Rainy day lumps'].order = 350045; - this.achievements.push(new Game.Upgrade('Purification domes', 'Lets you unlock a set of new tiered upgrades at 600 of each building, which make individual buildings accumulate decay slower.
All other decay-related calculations uses the combined impact of all buildings. Within it is the incredible power of the belief in our ability to change.', 5e14, [22, 3, kaizoCookies.images.custImg])); Game.last.pool = 'prestige'; - Game.last.parents = [Game.Upgrades['Unshackled Purity']]; - Game.PrestigeUpgrades.push(Game.last); Game.UpgradesByPool.prestige.push(Game.last); - Game.last.posY = 195; Game.last.posX = 615; + this.createHeavenlyUpgrade('Purification domes', 'Lets you unlock a set of new tiered upgrades at 600 of each building, which make individual buildings accumulate decay slower.
All other decay-related calculations uses the combined impact of all buildings. Within it is the incredible power of the belief in our ability to change.', 5e14, [22, 3, kaizoCookies.images.custImg], 'Unshackled Purity', 615, 195); + Game.Tiers['purity'] = {name:'Marbledpuree', unlock: -1, iconRow: 0, color: '#9ae726', special: 1, req: 'Purification domes', price: 8.888888888888888888888e+41, upgrades: []}; eval('Game.TieredUpgrade='+Game.TieredUpgrade.toString().replace(`tier!='fortune'`, `tier!='fortune' && tier!='purity'`).replace(`else desc=loc("%1 are twice as efficient.",cap(Game.Objects[building].plural))+desc;`, `else if (tier!='purity') { desc=loc("%1 are twice as efficient.",cap(Game.Objects[building].plural))+desc; }`)); this.upgrades = []; @@ -9611,15 +9994,9 @@ Game.registerMod("Kaizo Cookies", { this.achievements = this.achievements.concat(this.upgrades); - this.achievements.push(new Game.Upgrade('Ultra-concentrated sweetener', 'Each building accumulates 2% less decay for every level it has, for up to level 20.\>99.99999% pure sweetness. Warning: ingestation may lead to lead poisoning.', 1e15, [9, 4, kaizoCookies.images.custImg])); Game.last.pool = 'prestige'; - Game.last.parents = [Game.Upgrades['Purification domes']]; - Game.PrestigeUpgrades.push(Game.last); Game.UpgradesByPool.prestige.push(Game.last); - Game.last.posY = 242; Game.last.posX = 513; + this.createHeavenlyUpgrade('Ultra-concentrated sweetener', 'Each building accumulates 2% less decay for every level it has, for up to level 20.\>99.99999% pure sweetness. Warning: ingestation may lead to lead poisoning.', 1e15, [9, 4, kaizoCookies.images.custImg], ['Purification domes'], 513, 242); - this.achievements.push(new Game.Upgrade('Lumpy evolution', 'Decay propagation -1% for each building leveled to level 10 or above.In this universe, the weak survives while the strong dies.', 2e15, [23, 3, kaizoCookies.images.custImg])); Game.last.pool = 'prestige'; - Game.last.parents = [Game.Upgrades['Ultra-concentrated sweetener']]; - Game.PrestigeUpgrades.push(Game.last); Game.UpgradesByPool.prestige.push(Game.last); - Game.last.posY = 355; Game.last.posX = 492; + this.createHeavenlyUpgrade('Lumpy evolution', 'Decay propagation -1% for each building leveled to level 10 or above.In this universe, the weak survives while the strong dies.', 2e15, [23, 3, kaizoCookies.images.custImg], ['Ultra-concentrated sweetener'], 492, 355); this.achievements.push(new Game.Upgrade('Wrinkler ambergris',getStrCookieProductionMultiplierPlus(6)+'
'+"All upgrades are 1% cheaper."+'
'+"Cost scales with CpS."+'Occasionally regurgitated by wrinklers that died while digesting cookies.
The byproduct of some obscure metabolic process or other, it is as rare and precious as it is pungent.
Makes for a great toast spread.
',60,[7,2,kaizoCookies.images.custImg])); Game.last.priceFunc=function(){return Math.max(1000000,Game.cookiesPs*60*60);}; @@ -9630,15 +10007,9 @@ Game.registerMod("Kaizo Cookies", { this.achievements.push(new Game.Upgrade('Kitten janitors', 'You gain more milk the more purity you have.This job sucks meow', 900e+63, [18, 4, kaizoCookies.images.custImg])); Game.last.tier = 'purity'; Game.last.order = 20010; eval('Game.CalculateGains='+Game.CalculateGains.toString().replace(`milkMult*=Game.eff('milk');`, `milkMult*=Game.eff('milk'); if (Game.Has('Kitten janitors')) { milkMult*=1 + Math.log2(Math.max(decay.gen, 1)) * 0.0123; }`)) - this.achievements.push(new Game.Upgrade('Script writer', 'Writing certain things will give some special effects (case insensitive).Balance? I barely know her.

Where to start? The leading spriter of this mod might have the answer...
', 5000000000000, [8, 2, kaizoCookies.images.custImg])); Game.last.pool = 'prestige'; - Game.last.parents = [Game.Upgrades['Sound test']]; - Game.PrestigeUpgrades.push(Game.last); Game.UpgradesByPool.prestige.push(Game.last); - Game.last.posY = 672; Game.last.posX = 279; + this.createHeavenlyUpgrade('Script writer', 'Writing certain things will give some special effects (case insensitive).Balance? I barely know her.

Where to start? The leading spriter of this mod might have the answer...
', 5000000000000, [8, 2, kaizoCookies.images.custImg], 'Sound test', 280, 672); - this.achievements.push(new Game.Upgrade('Bakery', 'Unlocks the cookie selector, letting you pick how the big cookie looks.
Comes with a variety of cookies.Weird, why would anyone build a bakery up here?', 1000, [9, 1, kaizoCookies.images.custImg])); Game.last.pool = 'prestige'; - Game.last.parents = [Game.Upgrades['Legacy']]; - Game.PrestigeUpgrades.push(Game.last); Game.UpgradesByPool.prestige.push(Game.last); - Game.last.posY = 180; Game.last.posX = -200; + this.createHeavenlyUpgrade('Bakery', 'Unlocks the cookie selector, letting you pick how the big cookie looks.
Comes with a variety of cookies.Weird, why would anyone build a bakery up here?', 1000, [9, 1, kaizoCookies.images.custImg], ['Legacy'], -200, 180); this.achievements.push(new Game.Upgrade('Cookie selector', 'Lets you pick which cookie to display.',0,[26,17])); Game.last.descFunc=function(){ @@ -9700,30 +10071,20 @@ Game.registerMod("Kaizo Cookies", { } } - this.achievements.push(new Game.Upgrade('Enchanted Permanent upgrade slot I',"Placing an upgrade in this slot will make its effects permanent across all playthroughs.", 1,[0,0,kaizoCookies.images.custImg]));Game.last.pool='prestige';Game.last.iconFunction=function(){return Game.EnchantedPermanentSlotIcon(0);};Game.last.activateFunction=function(){Game.AssignEnchantedPermanentSlot(0);}; - Game.last.parents = [Game.Upgrades['Starter kit']]; - Game.PrestigeUpgrades.push(Game.last); Game.UpgradesByPool.prestige.push(Game.last); - Game.last.posX = -522; Game.last.posY = -384; + this.createHeavenlyUpgrade('Enchanted Permanent upgrade slot I',"Placing an upgrade in this slot will make its effects permanent across all playthroughs.", 1,[0,0,kaizoCookies.images.custImg], ['Starter kit'], -522, -384); + Game.last.iconFunction=function(){return Game.EnchantedPermanentSlotIcon(0);};Game.last.activateFunction=function(){Game.AssignEnchantedPermanentSlot(0);}; Game.last.showIf=function(){return (decay.challengeStatus(1));}; - this.achievements.push(new Game.Upgrade('Enchanted Permanent upgrade slot II',"Placing an upgrade in this slot will make its effects permanent across all playthroughs.", 200,[1,0,kaizoCookies.images.custImg]));Game.last.pool='prestige';Game.last.iconFunction=function(){return Game.EnchantedPermanentSlotIcon(1);};Game.last.activateFunction=function(){Game.AssignEnchantedPermanentSlot(1);}; - Game.last.parents = [Game.Upgrades['Enchanted Permanent upgrade slot I']]; - Game.PrestigeUpgrades.push(Game.last); Game.UpgradesByPool.prestige.push(Game.last); - Game.last.posX = -665; Game.last.posY = -490; + this.createHeavenlyUpgrade('Enchanted Permanent upgrade slot II',"Placing an upgrade in this slot will make its effects permanent across all playthroughs.", 200,[1,0,kaizoCookies.images.custImg], ['Enchanted Permanent upgrade slot I'], -655, -490); + Game.last.iconFunction=function(){return Game.EnchantedPermanentSlotIcon(1);};Game.last.activateFunction=function(){Game.AssignEnchantedPermanentSlot(1);}; Game.last.showIf=function(){return (decay.challengeStatus(2));}; - this.achievements.push(new Game.Upgrade('Enchanted Permanent upgrade slot III',"Placing an upgrade in this slot will make its effects permanent across all playthroughs.", 30000,[2,0,kaizoCookies.images.custImg]));Game.last.pool='prestige';Game.last.iconFunction=function(){return Game.EnchantedPermanentSlotIcon(2);};Game.last.activateFunction=function(){Game.AssignEnchantedPermanentSlot(2);}; - Game.last.parents = [Game.Upgrades['Enchanted Permanent upgrade slot II']]; - Game.PrestigeUpgrades.push(Game.last); Game.UpgradesByPool.prestige.push(Game.last); - Game.last.posX = -765; Game.last.posY = -611; + this.createHeavenlyUpgrade('Enchanted Permanent upgrade slot III',"Placing an upgrade in this slot will make its effects permanent across all playthroughs.", 30000,[2,0,kaizoCookies.images.custImg], ['Enchanted Permanent upgrade slot II'], -765, -610); + Game.last.iconFunction=function(){return Game.EnchantedPermanentSlotIcon(2);};Game.last.activateFunction=function(){Game.AssignEnchantedPermanentSlot(2);}; Game.last.showIf=function(){return (decay.challengeStatus(3));}; - this.achievements.push(new Game.Upgrade('Enchanted Permanent upgrade slot IV',"Placing an upgrade in this slot will make its effects permanent across all playthroughs.", 4000000,[3,0,kaizoCookies.images.custImg]));Game.last.pool='prestige';Game.last.iconFunction=function(){return Game.EnchantedPermanentSlotIcon(3);};Game.last.activateFunction=function(){Game.AssignEnchantedPermanentSlot(3);}; - Game.last.parents = [Game.Upgrades['Enchanted Permanent upgrade slot III']]; - Game.PrestigeUpgrades.push(Game.last); Game.UpgradesByPool.prestige.push(Game.last); - Game.last.posX = -785; Game.last.posY = -771; + this.createHeavenlyUpgrade('Enchanted Permanent upgrade slot IV',"Placing an upgrade in this slot will make its effects permanent across all playthroughs.", 4000000,[3,0,kaizoCookies.images.custImg], ['Enchanted Permanent upgrade slot III'], -785, -771); + Game.last.iconFunction=function(){return Game.EnchantedPermanentSlotIcon(3);};Game.last.activateFunction=function(){Game.AssignEnchantedPermanentSlot(3);}; Game.last.showIf=function(){return (decay.challengeStatus(4));}; - this.achievements.push(new Game.Upgrade('Enchanted Permanent upgrade slot V',"Placing an upgrade in this slot will make its effects permanent across all playthroughs.", 500000000,[4,0,kaizoCookies.images.custImg]));Game.last.pool='prestige';Game.last.iconFunction=function(){return Game.EnchantedPermanentSlotIcon(4);};Game.last.activateFunction=function(){Game.AssignEnchantedPermanentSlot(4);}; - Game.last.parents = [Game.Upgrades['Enchanted Permanent upgrade slot IV']]; - Game.PrestigeUpgrades.push(Game.last); Game.UpgradesByPool.prestige.push(Game.last); - Game.last.posX = -743; Game.last.posY = -925; + this.createHeavenlyUpgrade('Enchanted Permanent upgrade slot V',"Placing an upgrade in this slot will make its effects permanent across all playthroughs.", 500000000,[4,0,kaizoCookies.images.custImg], ['Enchanted Permanent upgrade slot IV'], -743, -925); + Game.last.iconFunction=function(){return Game.EnchantedPermanentSlotIcon(4);};Game.last.activateFunction=function(){Game.AssignEnchantedPermanentSlot(4);}; Game.last.showIf=function(){return (decay.challengeStatus(5));}; var enchantedSlots=['Enchanted Permanent upgrade slot I','Enchanted Permanent upgrade slot II','Enchanted Permanent upgrade slot III','Enchanted Permanent upgrade slot IV','Enchanted Permanent upgrade slot V']; @@ -9812,32 +10173,20 @@ Game.registerMod("Kaizo Cookies", { decay.offBrandFingers[i].order = 110 + 0.0001 * decay.offBrandFingers[i].id; } - this.achievements.push(new Game.Upgrade('Vial of challenges', 'Unlocks new challenges for the Unshackled decay challenge mode.
Also disables building requirements for buying new buildings.
This upgrade was unlocked after obtaining at least '+Beautify(20000)+' total prestige levels.Quite concentrated, in fact.', 1, [9, 0, kaizoCookies.images.custImg])); - Game.last.pool = 'prestige'; + this.createHeavenlyUpgrade('Vial of challenges', 'Unlocks new challenges for the Unshackled decay challenge mode.
Also disables building requirements for buying new buildings.
This upgrade was unlocked after obtaining at least '+Beautify(20000)+' total prestige levels.Quite concentrated, in fact.', 1, [9, 0, kaizoCookies.images.custImg], ['Persistent memory'], 218, -115); Game.last.showIf = function() { return Game.prestige > 20000; } - Game.last.parents = [Game.Upgrades['Persistent memory']] - Game.PrestigeUpgrades.push(Game.last); Game.UpgradesByPool.prestige.push(Game.last); - Game.last.posX = 218; Game.last.posY = -115; - this.achievements.push(new Game.Upgrade('Box of challenges', 'Unlocks new challenges for the Unshackled decay challenge mode.
This upgrade was unlocked after obtaining at least '+Beautify(3e6)+' total prestige levels.It\'s full of fun!', 1, [8, 0, kaizoCookies.images.custImg])); - Game.last.pool = 'prestige'; + this.createHeavenlyUpgrade('Box of challenges', 'Unlocks new challenges for the Unshackled decay challenge mode.
This upgrade was unlocked after obtaining at least '+Beautify(3e6)+' total prestige levels.It\'s full of fun!', 1, [8, 0, kaizoCookies.images.custImg], [], Game.Upgrades['Twin Gates of Transcendence'].posX + 200, Game.Upgrades['Twin Gates of Transcendence'].posY - 70); Game.last.showIf = function() { return Game.prestige > 3e6; } - Game.last.parents = [Game.Upgrades['Twin Gates of Transcendence']]; - Game.PrestigeUpgrades.push(Game.last); Game.UpgradesByPool.prestige.push(Game.last); - Game.last.posX = Game.Upgrades['Twin Gates of Transcendence'].posX + 120; Game.last.posY = Game.Upgrades['Twin Gates of Transcendence'].posY; - this.achievements.push(new Game.Upgrade('Truck of challenges', 'Unlocks new challenges for the Unshackled decay challenge mode.
This upgrade was unlocked after obtaining at least '+Beautify(7e12)+' total prestige levels.Is a truck really necessary for this...?', 1, [10, 0, kaizoCookies.images.custImg])); - Game.last.pool = 'prestige'; + this.createHeavenlyUpgrade('Truck of challenges', 'Unlocks new challenges for the Unshackled decay challenge mode.
This upgrade was unlocked after obtaining at least '+Beautify(7e12)+' total prestige levels.Is a truck really necessary for this...?', 1, [10, 0, kaizoCookies.images.custImg], ['Chimera'], 190, -1300); Game.last.showIf = function() { return Game.prestige > 7e12; } - Game.last.parents = [Game.Upgrades['Chimera']]; - Game.PrestigeUpgrades.push(Game.last); Game.UpgradesByPool.prestige.push(Game.last); - Game.last.posX = 190; Game.last.posY = -1305; decay.multiFingers = []; this.achievements.push(new Game.Upgrade('Shell breaker', 'Your clicks are 15% more effective against wrinklers.Wrinklers have a very hard and resilient shell, but luckily, rapid clicks alongside a sharp tip can help with that!', 1e8, [12, 5, kaizoCookies.images.custImg])); decay.multiFingers.push(Game.last); @@ -9951,21 +10300,16 @@ Game.registerMod("Kaizo Cookies", { } } } + eval('Game.LoadSave='+Game.LoadSave.toString() + .replace(`Game.Objects['Cursor'].free=10;`, `Game.Objects['Cursor'].free+=10;`) + .replace(`Game.Objects['Grandma'].free=5;`, `Game.Objects['Grandma'].free+=5;`) + .replace('if (Game.ascensionMode!=1)', 'for (let i in Game.Objects) { Game.Objects[i].free = 0; } kaizoCookies.applyPolargurt(); for (let i in decay.seFrees) { Game.ObjectsById[i].getFree(decay.seFrees[i]); } if (Game.ascensionMode!=1)')); - this.achievements.push(new Game.Upgrade('Wrinkly balls', 'Evolving Santa requires 1 less normal wrinkler soul per level.A set of 14 cute - albeit disgusting - balls of wrinkler conglomerate, they are often used as a substitute for wrinkler souls.', 2222, [11, 0, kaizoCookies.images.custImg])); Game.last.pool = 'prestige'; - Game.PrestigeUpgrades.push(Game.last); Game.UpgradesByPool.prestige.push(Game.last); - Game.last.parents = [Game.Upgrades['Season switcher']]; - Game.last.posX = Game.Upgrades['Season switcher'].posX; - Game.last.posY = Game.Upgrades['Season switcher'].posY + 150; + this.createHeavenlyUpgrade('Wrinkly balls', 'Evolving Santa requires 1 less normal wrinkler soul per level.A set of 14 cute - albeit disgusting - balls of wrinkler conglomerate, they are often used as a substitute for wrinkler souls.', 2222, [11, 0, kaizoCookies.images.custImg], ['Season switcher'], Game.Upgrades['Season switcher'].posX, Game.Upgrades['Season switcher'].posY + 150); this.achievements.push(new Game.Upgrade('Santaic zoom', 'Wrinkler souls halt decay for 1% longer per Santa level past Elfling.Let the goodness take hold.', 5e14, [18, 9])); Game.last.order = 25011; - this.achievements.push(new Game.Upgrade('Rift to the beyond', 'While having no purity and is not coagulated, decay is twice as slow.Let us go, together.', 12000, [1, 3, kaizoCookies.images.custImg])); Game.last.order = 288; - Game.last.pool = 'prestige'; - Game.PrestigeUpgrades.push(Game.last); Game.UpgradesByPool.prestige.push(Game.last); - Game.last.parents = [Game.Upgrades['Enchanted Permanent upgrade slot I']]; - Game.last.posX = -720; - Game.last.posY = -380; + this.createHeavenlyUpgrade('Rift to the beyond', 'While having no purity and is not coagulated, decay is twice as slow.Let us go, together.', 12000, [1, 3, kaizoCookies.images.custImg], ['Enchanted Permanent upgrade slot I'], -720, -380, 288); addLoc('Improved by challenge %1!'); this.achievements.push(new Game.Upgrade('Molten piercer', 'Destroys wrinklers after only depleting the health of the second to last layer.And you also get more wrinkler gore! Isn\'t it nice?', 3.3e18, [15, 1, kaizoCookies.images.custImg])); Game.last.order = 159; @@ -10068,11 +10412,8 @@ Game.registerMod("Kaizo Cookies", { this.achievements.push(new Game.Upgrade('Paint of proof', 'Clicking halts decay 10% faster.You\'ve come so far... why not keep going?', 2.345e11, [11, 23])); Game.last.order = 160.01; this.achievements.push(new Game.Upgrade('Integrated alloys', 'Clicking halts decay 10% faster.Inner strength comes from experience.', 3.456e12, [11, 24])); Game.last.order = 160.02; - this.achievements.push(new Game.Upgrade('Stabilizing crystal', 'The decay speed and strength increase with purity is slightly slower.Insignificant... or is it?', 120000, [22, 0, kaizoCookies.images.custImg])); Game.last.order = 289; - Game.last.pool = 'prestige'; Game.PrestigeUpgrades.push(Game.last); Game.UpgradesByPool.prestige.push(Game.last); - Game.last.parents = [Game.Upgrades['Rift to the beyond'], Game.Upgrades['Enchanted Permanent upgrade slot II']]; + this.createHeavenlyUpgrade('Stabilizing crystal', 'The decay speed and strength increase with purity is slightly slower.Insignificant... or is it?', 120000, [22, 0, kaizoCookies.images.custImg], ['Rift to the beyond', 'Enchanted Permanent upgrade slot II'], -880, -490, 289); Game.last.showIf = function() { return decay.challengeStatus(2); } - Game.last.posX = -880; Game.last.posY = -490; //credits for the two tiers below goes to fifi :heart: this.eldersiteUpgrades = []; @@ -10220,13 +10561,11 @@ Game.registerMod("Kaizo Cookies", { return (decay.challengeStatus('buildingCount')?0.1:1) * Game.Upgrades['A golden hat'].basePrice; } - this.achievements.push(new Game.Upgrade('Soul compression', 'While exhausted, normal wrinkler souls halt decay for 10% longer.Smaller souls make for an easier ingestion.', 3.6e18, [16, 3, kaizoCookies.images.custImg])); Game.last.order = 25070; + this.achievements.push(new Game.Upgrade('Soul compression', 'While exhausted, claiming wrinkler souls clear half a second worth of exhaustion.Smaller souls make for an easier ingestion.', 3.6e18, [16, 3, kaizoCookies.images.custImg])); Game.last.order = 25070; this.achievements.push(new Game.Upgrade('Weightlessness', 'While exhausted, normal and shiny wrinkler souls halt decay for 10% longer.Reducing the required processing time by removing the need for supports.', 3.6e33, [17, 3, kaizoCookies.images.custImg])); Game.last.order = 25071; - this.achievements.push(new Game.Upgrade('Thunder marker', 'Creates a draggable marker; whenever power click shockwaves pass through it, it creates an additional, smaller power click shockwave that hits all wrinklers in range for 250% the damage of the original shockwave.Let the destruction unfold!', 1.2e6, [17, 2, kaizoCookies.images.custImg])); - Game.last.pool = 'prestige'; Game.UpgradesByPool.prestige.push(Game.last); Game.PrestigeUpgrades.push(Game.last); Game.last.order = 272; - Game.last.posX = -625; Game.last.posY = -690; Game.last.showIf = function() { return decay.challengeStatus(3); } - Game.last.parents = [Game.Upgrades['Enchanted Permanent upgrade slot III'], Game.Upgrades['Unholy bait']]; + this.createHeavenlyUpgrade('Thunder marker', 'Creates a draggable marker; whenever power click shockwaves pass through it, it creates an additional, smaller power click shockwave that hits all wrinklers in range for 250% the damage of the original shockwave.Let the destruction unfold!', 1.2e6, [17, 2, kaizoCookies.images.custImg], ['Unholy bait', 'Enchanted Permanent upgrade slot III'], -625, -690, 272); + Game.last.showIf = function() { return decay.challengeStatus(3); } Game.Upgrades['Lucky digit'].showIf = function() { return Game.prestige > 7777; } replaceDesc('Lucky digit', Game.Upgrades['Lucky digit'].baseDesc.replace('your prestige level contains a 7', 'your prestige level is higher than 7777')); @@ -10235,6 +10574,19 @@ Game.registerMod("Kaizo Cookies", { Game.Upgrades['Lucky payout'].showIf = function() { return Game.prestige > 7777777777; } replaceDesc('Lucky payout', Game.Upgrades['Lucky payout'].baseDesc.replace('your prestige level contains four 7\'s', 'your prestige level is higher than 7777777777')); + let unshackledPurityPosX = Game.Upgrades['Unshackled Purity'].posX; + let unshackledPurityPosY = Game.Upgrades['Unshackled Purity'].posY; + this.createHeavenlyUpgrade('Purity chips', 'Each digit in the amount of heavenly chips you have unspent grants you +100% initial purity on reincarnation.To be this pure, this chip was put through 15 separate steps of distillation.', 1e11, [18, 2, kaizoCookies.images.custImg], ['Unshackled flavor', 'Unshackled berrylium', 'Unshackled blueberrylium'], unshackledPurityPosX + (Game.Upgrades['Unshackled berrylium'].posX - unshackledPurityPosX) / 2, unshackledPurityPosY + (Game.Upgrades['Unshackled berrylium'].posY - unshackledPurityPosY) / 2, 300); + this.createHeavenlyUpgrade('Purity stand', 'Clicking halts decay 10% harder.Pure and heavenly, a masterful fusion of elements.', 8e11, [19, 2, kaizoCookies.images.custImg], ['Purity chips', 'Unshackled chalcedhoney', 'Unshackled buttergold', 'Unshackled sugarmuck'], unshackledPurityPosX + (Game.Upgrades['Unshackled buttergold'].posX - unshackledPurityPosX) / 2, unshackledPurityPosY + (Game.Upgrades['Unshackled buttergold'].posY - unshackledPurityPosY) / 2, 300.01); + this.createHeavenlyUpgrade('Purity bakery', 'You purify decay over time while decay is halted with enough power.The tiny has grown into something massive, something extraordinary.', 6e12, [18, 3, kaizoCookies.images.custImg], ['Purity stand', 'Unshackled jetmint', 'Unshackled cherrysilver', 'Unshackled hazelrald'], unshackledPurityPosX + (Game.Upgrades['Unshackled cherrysilver'].posX - unshackledPurityPosX) / 2, unshackledPurityPosY + (Game.Upgrades['Unshackled cherrysilver'].posY - unshackledPurityPosY) / 2, 300.02); + this.createHeavenlyUpgrade('Purity factory', 'All purity caps are 50% higher.The universe\'s the limit.', 4e13, [19, 3, kaizoCookies.images.custImg], ['Purity bakery', 'Unshackled mooncandy', 'Unshackled astrofudge', 'Unshackled alabascream'], unshackledPurityPosX + (Game.Upgrades['Unshackled astrofudge'].posX - unshackledPurityPosX) / 2, unshackledPurityPosY + (Game.Upgrades['Unshackled astrofudge'].posY - unshackledPurityPosY) / 2, 300.03); + this.createHeavenlyUpgrade('Purity key', '', 2e14, [20, 3, kaizoCookies.images.custImg], ['Purity factory', 'Unshackled iridyum', 'Unshackled glucosmium', 'Unshackled glimmeringue'], unshackledPurityPosX + (Game.Upgrades['Unshackled glucosmium'].posX - unshackledPurityPosX) / 2, unshackledPurityPosY + (Game.Upgrades['Unshackled glucosmium'].posY - unshackledPurityPosY) / 2, 300.04); + Game.Upgrades['Unshackled Purity'].parents = ['Purity chips', 'Purity stand', 'Purity bakery', 'Purity factory', 'Purity key']; + for (let i in Game.Upgrades['Unshackled Purity'].parents) { Game.Upgrades['Unshackled Purity'].parents.splice(parseInt(i), 1, Game.Upgrades[Game.Upgrades['Unshackled Purity'].parents[i]]); } + + this.createHeavenlyUpgrade('Click-o-meter', 'Unlocks a meter above your list of buildings that indicate the amount of time you have left until the decay-halting effect of your clicks subside.Also comes with a nice remote-activated LED screen!', 1, [18, 0, kaizoCookies.images.custImg], ['Twin Gates of Transcendence'], Game.Upgrades['Twin Gates of Transcendence'].posX + 120, Game.Upgrades['Twin Gates of Transcendence'].posY, 273.5); + Game.Upgrades['Box of challenges'].parents = [Game.Upgrades['Click-o-meter']]; + this.upgrades = []; //:ortroll: decay.purityAchievsReqMap = []; @@ -10339,6 +10691,8 @@ Game.registerMod("Kaizo Cookies", { this.upgrades.push(new Game.Achievement('The red wire', loc('Burst %1 bomber wrinklers.', Beautify(66)), [13, 1, kaizoCookies.images.custImg])); Game.Achievements['The red wire'].order = 21000.2631; this.upgrades.push(new Game.Achievement('Innocence farmer', loc('Burst %1 bomber wrinklers.', Beautify(6666)), [13, 1, kaizoCookies.images.custImg])); Game.Achievements['Innocence farmer'].order = 21000.2632; + this.upgrades.push(new Game.Achievement('Mass reindeer duplication', 'Trigger a Reindeer frenzy.', [21, 2, kaizoCookies.images.custImg])); Game.Achievements['Mass reindeer duplication'].order = 22200; + this.checkChallengeAchievs = function() { const completions = decay.challengesCompleted; if (completions>=1) { Game.Win('First contact'); } @@ -10610,6 +10964,10 @@ Game.registerMod("Kaizo Cookies", { Game.RebuildUpgrades(); + if (Crumbs.mobile) { + Game.Notify('Mobile notice', 'If you are currently using a phone to play Kaizo cookies, we strongly suggest that you use the horizontal orientation (long side on the bottom).', 0, 30); + } + //if (Game.cookiesEarned + Game.cookiesReset < 1000) { kaizoWarning = false; } allValues('init completion'); @@ -10684,7 +11042,7 @@ Game.registerMod("Kaizo Cookies", { str += '/' + decay.saveUtenglobe() + '/' + decay.saveMaterialCounts() + '/' + decay.saveHaltValues() + '/' + decay.shattered; str += '/' + (decay.shatterFuseDrain ?? 'NA') + '/' + decay.highestReachedChallenged + '/' + decay.wrinklersPoppedTotal str += '/' + decay.saveEverBoughts() + '/' + decay.pausingCooldown + '/' + (decay.everUnlocked?1:0) + '/' + decay.saveTouchOfForce() + '/' + decay.saveBoundlessSack(); - str += '/' + decay.thunderMarkerObj.x + ',' + decay.thunderMarkerObj.y; + str += '/' + decay.thunderMarkerObj.x + ',' + decay.thunderMarkerObj.y + '/' + (decay.clickHaltDisplayHidden?1:0) + '/' + (decay.lockedPreset==null?'NA':decay.lockedPreset); return str; }, loadStr: '', @@ -10773,12 +11131,19 @@ Game.registerMod("Kaizo Cookies", { if (kaizoCookies.unpauseGame) { kaizoCookies.unpauseGame(); } str = str.split('/'); Game.CloseNotes(); + decay.killAllPowerOrbs(); + if (decay.DEBUG) { + if (Crumbs.mobile) { + Game.Notify('Mobile', '', 0, 100000000, false, true); + } else { + Game.Notify('Not mobile', '', 0, 100000000, false, true); + } + } let version = getVer(str[0]); for (let i = 0; i < str[1].length; i += 2) { if (isv(str[1][i])) { kaizoCookies.achievements[i / 2].unlocked=parseInt(str[1][i]); } if (isv(str[1][i + 1])) { kaizoCookies.achievements[i / 2].bought=parseInt(str[1][i + 1]); } } - this.applyPolargurt(); let strIn = str[2].split(','); for (let i in strIn) { if (isv(strIn[i])) { decay.mults[i] = parseFloat(strIn[i]); } @@ -10799,12 +11164,18 @@ Game.registerMod("Kaizo Cookies", { Game.Upgrades["Elder Pledge"].icon[0] = 6; Game.Upgrades["Elder Pledge"].icon[1] = 3; Game.Upgrades["Elder Pledge"].icon[2] = kaizoCookies.images.custImg; } - strIn = str[5].split(','); allValues('load; pledge and halt'); - if (isv(strIn[0])) { Game.veilHP = parseFloat(strIn[0]); } + strIn = str[5].split(','); + if (isv(strIn[2])) { Game.veilRestoreC = parseFloat(strIn[2]); } + if (isv(strIn[3])) { Game.veilPreviouslyCollapsed = Boolean(strIn[3]); } + if (Game.Has('Shimmering veil')) { Game.setVeilMaxHP(); + Game.veilHP = Game.veilMaxHP; + Game.Lock('Shimmering veil [broken]'); + Game.Lock('Shimmering veil [on]'); + Game.Lock('Shimmering veil [off]'); if (strIn[1] == 'on') { Game.Upgrades['Shimmering veil [off]'].earn(); Game.Lock('Shimmering veil [on]'); Game.Unlock('Shimmering veil [on]'); @@ -10823,8 +11194,8 @@ Game.registerMod("Kaizo Cookies", { console.log('veil: something went wrong'); } } - if (isv(strIn[2])) { Game.veilRestoreC = parseFloat(strIn[2]); } - if (isv(strIn[3])) { Game.veilPreviouslyCollapsed = Boolean(strIn[3]); } + + if (isv(strIn[0])) { veilHP = parseFloat(strIn[0]); } allValues('load; veil'); let counter = 0; @@ -10908,7 +11279,7 @@ Game.registerMod("Kaizo Cookies", { strIn = str[23].split(','); for (let i in strIn) { - if (isv(strIn[i])) { decay.seFrees[i] = parseFloat(strIn[i]); Game.ObjectsById[i].getFree(decay.seFrees[i]); } + if (isv(strIn[i])) { decay.seFrees[i] = parseFloat(strIn[i]); } } strIn = str[24]; @@ -10959,10 +11330,24 @@ Game.registerMod("Kaizo Cookies", { if (isv(strIn[0])) { decay.thunderMarkerObj.x = parseFloat(strIn[0]); } if (isv(strIn[1])) { decay.thunderMarkerObj.y = parseFloat(strIn[1]); } if (Game.Has('Thunder marker')) { decay.thunderMarkerObj.enabled = true; } + + if (isv(str[42])) { decay.clickHaltDisplayHidden = Boolean(parseFloat(str[42])); } + if (decay.clickHaltDisplayHiddenClick) { + decay.hideClickHaltDisplay(); + } + if (Game.Has('Click-o-meter')) { + l('clickHaltDisplayContainer').style.display = ''; + } else { + l('clickHaltDisplayContainer').style.display = 'none'; + } + + if (isv(str[43]) && str[43] != 'NA') { decay.lockedPreset = parseInt(str[43]); } decay.checkBuildingEverUnlocks(); Game.storeToRefresh=1; + kaizoCookies.lastPause = 0; + decay.setRates(); decay.assignThreshold(); Game.RebuildUpgrades(); diff --git a/locPatches/EN_patch.js b/locPatches/EN_patch.js new file mode 100644 index 0000000..62e84f6 --- /dev/null +++ b/locPatches/EN_patch.js @@ -0,0 +1,1542 @@ +kaizoCookies.patchLanguage('EN', 'english', { + "Incorrect loading order!": "Incorrect loading order!", + "Please restart the game, and load Crumbs Engine before Kaizo cookies.": "Please restart the game, and load Crumbs Engine before Kaizo cookies.", + "%1 failed to load!": "%1 failed to load!", + "Please contact the developers about it. (find in info menu)": "Please contact the developers about it. (find in info menu)", + "Too soon!": "Too soon!", + "On cooldown (%1s left)": "On cooldown (%1s left)", + "GAME PAUSED": "GAME PAUSED", + "(Shift + C to pause or unpause)": "(Shift + C to pause or unpause)", + "Prerequisite mod not yet loaded!": "Prerequisite mod not yet loaded!", + "You cannot pause the game yet, as P for Pause has not yet been loaded. If this continues, check your internet connection.": "You cannot pause the game yet, as P for Pause has not yet been loaded. If this continues, check your internet connection.", + "It looks like you weren't there, so your game was paused automatically!": "It looks like you weren't there, so your game was paused automatically!", + "Assist option; shortcuts: Shift+C OR Shift+P": "Assist option; shortcuts: Shift+C OR Shift+P", + "Pause": "Pause", + "Unpause": "Unpause", + "Times paused: ": "Times paused: ", + "Fatigue warning (%1%)": "Fatigue warning (%1%)", + "Exhausted! (%1s)": "Exhausted! (%1s)", + "Refreshed!": "Refreshed!", + "Times exhausted:": "Times exhausted:", + "Exhaustion time remaining:": "Exhaustion time remaining:", + "paused": "paused", + "Infinite decay": "Infinite decay", + "Your game was wiped due to infinite decay!": "Your game was wiped due to infinite decay!", + "Excess decay caused a forced ascension without gaining any prestige or heavenly chips.": "Excess decay caused a forced ascension without gaining any prestige or heavenly chips.", + "Game automatically paused": "Game automatically paused", + "Go to the options menu or use the hotkey (Shift + P or Shift + C) to toggle pausing.": "Go to the options menu or use the hotkey (Shift + P or Shift + C) to toggle pausing.", + "Mobile notice": "Mobile notice", + "If you are currently using a phone to play Kaizo cookies, we strongly suggest that you use the horizontal orientation (long side on the bottom).": "If you are currently using a phone to play Kaizo cookies, we strongly suggest that you use the horizontal orientation (long side on the bottom).", + + //core + "Decay": "Decay", + "Purity": "Purity", + "decay": "decay", + "purity": "purity", + + //notif + "You have just reached infinite decay, which would have caused a forced ascension with no heavenly chips gained, effectively wiping all progress made in this run.
Luckily, reaching infinite decay for the first time earned you an achievement that purified all of your decay, giving you another chance. Use it well!": "You have just reached infinite decay, which would have caused a forced ascension with no heavenly chips gained, effectively wiping all progress made in this run.
Luckily, reaching infinite decay for the first time earned you an achievement that purified all of your decay, giving you another chance. Use it well!", + "Due to aging and corruption in your facilities, CpS continuously decreases over time. You can temporarily stop it from decreasing with certain actions, such as clicking the big cookie.": "Due to aging and corruption in your facilities, CpS continuously decreases over time. You can temporarily stop it from decreasing with certain actions, such as clicking the big cookie.", + "REMOVED": "REMOVED", + "Achievements": "Achievements", + "If you can purify all of your decay, any extra purification power will be spent as an increase in CpS. The extra CpS (called \"purity\") acts as a sacrificial buffer for the decay; however, the more purity you have, the more halting power will be needed to stop it, shown by increasing the number on the right side of the slash, below your CpS display.": "If you can purify all of your decay, any extra purification power will be spent as an increase in CpS. The extra CpS (called \"purity\") acts as a sacrificial buffer for the decay; however, the more purity you have, the more halting power will be needed to stop it, shown by increasing the number on the right side of the slash, below your CpS display.", + "Wrinklers now spawn passively and do very bad things upon reaching the big cookie. Luckily, if you manage to pop them, you get to extract their souls which you can offer to the big cookie by dragging or flinging them into it, temporarily stopping decay.": "Wrinklers now spawn passively and do very bad things upon reaching the big cookie. Luckily, if you manage to pop them, you get to extract their souls which you can offer to the big cookie by dragging or flinging them into it, temporarily stopping decay.", + "Wrinklers": "Wrinklers", + "Wrath cookies now replace Golden cookies according to the amount of decay you have when it spawns; the more decay you have, the more often that Wraths replace Golden cookies. Luckily, it still purifies decay the same way as Golden cookies do.": "Wrath cookies now replace Golden cookies according to the amount of decay you have when it spawns; the more decay you have, the more often that Wraths replace Golden cookies. Luckily, it still purifies decay the same way as Golden cookies do.", + "Wrath cookies": "Wrath cookies", + "The Grandmapocalypse, in the vanilla sense, no longer exists.": "The Grandmapocalypse, in the vanilla sense, no longer exists.", + "Grandmapocalypse": "Grandmapocalypse", + "The decay gets stronger as you progress through the game, but you also obtain more items to help you fight it as the game goes on.": "The decay gets stronger as you progress through the game, but you also obtain more items to help you fight it as the game goes on.", + "decay: the return": "decay: the return", + "HIDDEN": "HIDDEN", + "Shimmering Veil": "Shimmering Veil", + "Buffs under decay": "Buffs under decay", + "Buff stacking": "Buff stacking", + "Notice: Force the Hand of Fate has its pool modified and have elder frenzy removed. Planners may not be accurate.": "Notice: Force the Hand of Fate has its pool modified and have elder frenzy removed. Planners may not be accurate.", + "Force the Hand of Fate": "Force the Hand of Fate", + "All methods of purification have a hard limit on how much purity they can apply. This limit varies per the method.
(Telling you this because you just reached a purity limit!)": "All methods of purification have a hard limit on how much purity they can apply. This limit varies per the method.
(Telling you this because you just reached a purity limit!)", + "Purity limit": "Purity limit", + "Building size": "Building size", + "Your decay has grown so powerful that it has begun to create a force of its own, called momentum. Momentum steadily grows over time and provides a boost to required halting power, like having purity but without the decay rates boost. Unstoppable by most methods, you must use great souls conjured in the newly-unlocked \"conjure\" tab in your Utenglobe to reverse its progress. To progress past this point, you would definitely have to start doing challenges in the box of challenges.
Also, some descriptions may have been changed to include momentum!": "Your decay has grown so powerful that it has begun to create a force of its own, called momentum. Momentum steadily grows over time and provides a boost to required halting power, like having purity but without the decay rates boost. Unstoppable by most methods, you must use great souls conjured in the newly-unlocked \"conjure\" tab in your Utenglobe to reverse its progress. To progress past this point, you would definitely have to start doing challenges in the box of challenges.
Also, some descriptions may have been changed to include momentum!", + "Decay momentum": "Decay momentum", + "Some upgrades decrease your decay, but not all decreases decrease the same thing! There are three main ways:
\"Decay rate\" - The amount of decay that gets generated per second
\"Decay momentum\" - The decay momentum, which increases the decay rate if the decay is left uninterrupted (requires a few quintillion cookies baked all time to unlock)
\"Decay propagation\" - Decay rates AND decay momentum": "Some upgrades decrease your decay, but not all decreases decrease the same thing! There are three main ways:
\"Decay rate\" - The amount of decay that gets generated per second
\"Decay momentum\" - The decay momentum, which increases the decay rate if the decay is left uninterrupted (requires a few quintillion cookies baked all time to unlock)
\"Decay propagation\" - Decay rates AND decay momentum", + "Purity boosts": "Purity boosts", + "Autoclickers": "Autoclickers", + "The garden has been changed dramatically, mostly including buffs that make it stronger and getting or growing plants faster or more convenient.": "The garden has been changed dramatically, mostly including buffs that make it stronger and getting or growing plants faster or more convenient.", + "The garden": "The garden", + "Momentum not only increases your rate of decay, but also makes methods that normally stop it less effective! There's really no way around it - if you got this much momentum, the only way to recover control is to keep clicking the cookie or popping wrinklers until it dies down.": "Momentum not only increases your rate of decay, but also makes methods that normally stop it less effective! There's really no way around it - if you got this much momentum, the only way to recover control is to keep clicking the cookie or popping wrinklers until it dies down.", + "Too much momentum": "Too much momentum", + "Pesudo-naturals": "Pesudo-naturals", + "Momentum unlock": "Momentum unlock", + "No, these are not 1 in 10,000 in this mod.": "No, these are not 1 in 10,000 in this mod.", + "Shiny wrinklers": "Shiny wrinklers", + "Reindeers": "Reindeers", + "Cookie storm drops": "Cookie storm drops", + "Decay halting overtime": "Decay halting overtime", + "You can click them to damage them, but an easier way is to press space while hovering over them. Easy clicks and easy wrinklers are disabled while you can perform a power click.": "You can click them to damage them, but an easier way is to press space while hovering over them. Easy clicks and easy wrinklers are disabled while you can perform a power click.", + "Power orbs": "Power orbs", + "Dragonflight!": "Dragonflight!", + "IRRELEVANT": "IRRELEVANT", + "Godzamok reminder": "Godzamok reminder", + "The lethargy of the left background and the general dimming indicates fatigue, and once exhaustion sets in, you will need to find other ways (such as via wrinkler souls) to halt decay.
(also, if you are using an op autoclicker, you should stop now; clicking faster also makes you accumulate fatigue faster.)": "The lethargy of the left background and the general dimming indicates fatigue, and once exhaustion sets in, you will need to find other ways (such as via wrinkler souls) to halt decay.
(also, if you are using an op autoclicker, you should stop now; clicking faster also makes you accumulate fatigue faster.)", + "Click fatigue & exhaustion": "Click fatigue & exhaustion", + "Prestige degradation": "Prestige degradation", + "If you haven't already, you might want to reread the description of the Legacy heavenly upgrade (the very first one and the prerequisite to all other heavenly upgrades) - it has been changed.": "If you haven't already, you might want to reread the description of the Legacy heavenly upgrade (the very first one and the prerequisite to all other heavenly upgrades) - it has been changed.", + "Breaking point": "Breaking point", + "Wrinkler decay amplification": "Wrinkler decay amplification", + "Free souls dissipate after enough time.": "Free souls dissipate after enough time.", + "Wrinkler soul expiry": "Wrinkler soul expiry", + "A new pet has been unlocked! Check the bottom left of the game.": "A new pet has been unlocked! Check the bottom left of the game.", + "Friendly reminder": "Friendly reminder", + "Acceleration past x1.5 also increases decay gain like purity does, but is not as powerful as purity.": "Acceleration past x1.5 also increases decay gain like purity does, but is not as powerful as purity.", + "Acceleration on halting": "Acceleration on halting", + "The challenges in this mod doesn't just serve as changes in gameplay, they also sometimes teach you certain vital game mechanics! Because of this, some of the challenges can be a little puzzly; if you find yourself not knowing what to do, you can check the rewards of the challenges; the rewards will usually have something to do with the solution to the challenge.": "The challenges in this mod doesn't just serve as changes in gameplay, they also sometimes teach you certain vital game mechanics! Because of this, some of the challenges can be a little puzzly; if you find yourself not knowing what to do, you can check the rewards of the challenges; the rewards will usually have something to do with the solution to the challenge.", + "Decay challenges": "Decay challenges", + "What you just performed is a combo, and also the simplest one. They are very, very good.": "What you just performed is a combo, and also the simplest one. They are very, very good.", + "Combos": "Combos", + "Bombers explode after eating on the big cookie for a while. They might be actually very useful for you.
(if you are not up for the puzzle or can't figure it out, go to the options menu and invoke the \"Bomber hint\" notification!)": "Bombers explode after eating on the big cookie for a while. They might be actually very useful for you.
(if you are not up for the puzzle or can't figure it out, go to the options menu and invoke the \"Bomber hint\" notification!)", + "Bombers": "Bombers", + "Bombers move much faster with less health, and explodes upon reaching the big cookie, inflicting coagulated and cursed, and distorted for 30 seconds which continuously spawns low-health bombers. All bombers spawned still grants souls, but can be popped very easily.": "Bombers move much faster with less health, and explodes upon reaching the big cookie, inflicting coagulated and cursed, and distorted for 30 seconds which continuously spawns low-health bombers. All bombers spawned still grants souls, but can be popped very easily.", + "Bomber hint": "Bomber hint", + "Look into the options menu for accessibility options (especially if you play on a touchpad), the ability to pause the game, and to replay these informational notifications!": "Look into the options menu for accessibility options (especially if you play on a touchpad), the ability to pause the game, and to replay these informational notifications!", + "Options": "Options", + "Clicking Golden or Wrath cookies can purify decay, essentially reversing its effects.": "Clicking Golden or Wrath cookies can purify decay, essentially reversing its effects.", + "Purification": "Purification", + "Remember that, since you still haven't ascended, you can ascend! If all things seem hopeless, you can convert your current cookies to prestige and get a faster next run.": "Remember that, since you still haven't ascended, you can ascend! If all things seem hopeless, you can convert your current cookies to prestige and get a faster next run.", + "Hmmm...": "Hmmm...", + "After some time has elapsed since the start of an ascension, the effective cookie count dictating difficulty will start to steadily increase, eventually reaching up to a small portion of your cookies baked all time - if you haven't reached that already.
If ramping is currently inflating the difficulty, you can see the exact cookie count your game is using to calculate decay-based mechanics in the stats menu.": "After some time has elapsed since the start of an ascension, the effective cookie count dictating difficulty will start to steadily increase, eventually reaching up to a small portion of your cookies baked all time - if you haven't reached that already.
If ramping is currently inflating the difficulty, you can see the exact cookie count your game is using to calculate decay-based mechanics in the stats menu.", + "Difficulty ramping": "Difficulty ramping", + "Drag them over the center of big cookie for a few seconds to collect them.": "Drag them over the center of big cookie for a few seconds to collect them.", + "Sugar lumps": "Sugar lumps", + "Release a soul OVER them to briefly render them vulnerable to attacks!": "Release a soul OVER them to briefly render them vulnerable to attacks!", + "Phantom wrinklers": "Phantom wrinklers", + "Entangle a wrinkler by dropping one of those on them. The area of effect becomes bigger if the target is also a phantom wrinkler.": "Entangle a wrinkler by dropping one of those on them. The area of effect becomes bigger if the target is also a phantom wrinkler.", + "Phantom essences": "Phantom essences", + "Momentum is only unlocked after obtaining at least %1 cookies this ascension. Before it's unlocked, momentum boosts do nothing.": "Momentum is only unlocked after obtaining at least %1 cookies this ascension. Before it's unlocked, momentum boosts do nothing.", + + //options + "Are you sure?": "Are you sure?", + "You are about to apply the preset \"%1\"": "You are about to apply the preset \"%1\"", + "Applying this preset will have the following changes:": "Applying this preset will have the following changes:", + "%1 will be turned ON": "%1 will be turned ON", + "%1 will be turned OFF": "%1 will be turned OFF", + "Accessible": "Accessible", + "Intended / Default": "Intended / Default", + "True comp": "True comp", + "True kaizo": "True kaizo", + "A friendly and smooth experience, containing all the QoL and assistance tools available.": "A friendly and smooth experience, containing all the QoL and assistance tools available.", + "The original designed experience of this mod, with QoL but minimal assistance tools.": "The original designed experience of this mod, with QoL but minimal assistance tools.", + "A somewhat challenging experience, with a limited capacity to pause the game.": "A somewhat challenging experience, with a limited capacity to pause the game.", + "A challenging experience, with a limited access to information and only one life!": "A challenging experience, with a limited access to information and only one life!", + "Kaizo cookies settings": "Kaizo cookies settings", + "Invoking a difficulty preset configures your Kaizo cookies settings, and can be readjusted at any time. Presets do not override all settings.": "Invoking a difficulty preset configures your Kaizo cookies settings, and can be readjusted at any time. Presets do not override all settings.", + "Difficulty presets:": "Difficulty presets:", + "Replay information snippets:": "Replay information snippets:", + "Ascend on infinite decay": "Ascend on infinite decay", + "Upon reaching infinite decay, wipe save": "Upon reaching infinite decay, wipe save", + "Wipe save on infinite decay": "Wipe save on infinite decay", + "Upon reaching infinite decay, ascend without gaining any prestige or heavenly chips": "Upon reaching infinite decay, ascend without gaining any prestige or heavenly chips", + "Informational widget": "Informational widget", + "Widget below the big cookie that displays information without having to look into the stats menu.": "Widget below the big cookie that displays information without having to look into the stats menu.", + "Easy clicks": "Easy clicks", + "Allows you to automatically click the big cookie by holding down click, but click speed is capped to 10 clicks per second.": "Allows you to automatically click the big cookie by holding down click, but click speed is capped to 10 clicks per second.", + "Easy wrinklers": "Easy wrinklers", + "Allows you to automatically click wrinklers you are hovering over by holding down click, but click speed is capped to 10 clicks per second.": "Allows you to automatically click wrinklers you are hovering over by holding down click, but click speed is capped to 10 clicks per second.", + "Touchpad mode": "Touchpad mode", + "For touchpad users; changes the mod to be more accomodating of touchpads. See the list of changes here.": "For touchpad users; changes the mod to be more accomodating of touchpads. See the list of changes here.", + "Automatically activate easy clicks or easy wrinklers by holding down A while hovering over the big cookie or a wrinkler, respectively.": "Automatically activate easy clicks or easy wrinklers by holding down A while hovering over the big cookie or a wrinkler, respectively.", + "The A key also functions as clicks for wrinkler souls and power orbs.": "The A key also functions as clicks for wrinkler souls and power orbs.", + "Note: if you are having issues with your touchpad's range or speed, try adjusting its sensitivity; if that still isn't enough, you may also pause the game with the hotkey to reposition your mouse as needed.": "Note: if you are having issues with your touchpad's range or speed, try adjusting its sensitivity; if that still isn't enough, you may also pause the game with the hotkey to reposition your mouse as needed.", + "Show run timer": "Show run timer", + "Shows a more accurate timer of the run started stat.": "Shows a more accurate timer of the run started stat.", + "Show legacy timer": "Show legacy timer", + "Shows a more accurate timer of the legacy started stat.": "Shows a more accurate timer of the legacy started stat.", + "none.
(You can see and replay information snippets you've collected throughout the game here. The first one occurs at 5,555 cookies baked this ascension.)": "none.
(You can see and replay information snippets you've collected throughout the game here. The first one occurs at 5,555 cookies baked this ascension.)", + "Typing display": "Typing display", + "Shows your keyboard inputs in real time. Only works with the Script writer heavenly upgrade.": "Shows your keyboard inputs in real time. Only works with the Script writer heavenly upgrade.", + "Shift to Power click": "Shift to Power click", + "Instead of holding shift to prevent power clicks from being used, have power clicks only enabled while holding shift": "Instead of holding shift to prevent power clicks from being used, have power clicks only enabled while holding shift", + "Competition mode": "Competition mode", + "Adds a 1 minute, 30 seconds long cooldown to pausing the game.": "Adds a 1 minute, 30 seconds long cooldown to pausing the game.", + "Convenient purchasing": "Convenient purchasing", + "Assist option; allows you to perform simple actions such as purchasing upgrades, interacting with minigames, and using switches while paused.": "Assist option; allows you to perform simple actions such as purchasing upgrades, interacting with minigames, and using switches while paused.", + "Auto pause on leave": "Auto pause on leave", + "Automatically pauses the game if it detects that you haven't been looking at it for 5 seconds.": "Automatically pauses the game if it detects that you haven't been looking at it for 5 seconds.", + "Fatigue warning": "Fatigue warning", + "Warns you about how close you are to becoming exhausted upon reaching certain fatigue thresholds.": "Warns you about how close you are to becoming exhausted upon reaching certain fatigue thresholds.", + "Big souls": "Big souls", + "Assist option; all wrinkler souls are much bigger": "Assist option; all wrinkler souls are much bigger", + "Big orbs": "Big orbs", + "Assist option; all power orbs are much bigger": "Assist option; all power orbs are much bigger", + "Slow souls": "Slow souls", + "Assist option; all wrinkler souls are significantly slower": "Assist option; all wrinkler souls are significantly slower", + "Slow orbs": "Slow orbs", + "Assist option; all power orbs are significantly slower": "Assist option; all power orbs are significantly slower", + "Slowly increases minimum effective progress for calculating decay-related stats over time, up to a fraction of the total amount of cookies you have baked across all ascensions": "Slowly increases minimum effective progress for calculating decay-related stats over time, up to a fraction of the total amount of cookies you have baked across all ascensions", + "Easy typing": "Easy typing", + "Assist option; allows you to use the Script writer while paused": "Assist option; allows you to use the Script writer while paused", + "Scroll cooldown display": "Scroll cooldown display", + "Displays active scroll cooldowns in a panel above the buildings and minigames": "Displays active scroll cooldowns in a panel above the buildings and minigames", + "Prestige progress display": "Prestige progress display", + "Displays current amount of prestige unleashed; only appears after ascending": "Displays current amount of prestige unleashed; only appears after ascending", + + //statistics + "halt: %1 / %2": "halt: %1 / %2", + "(fully halted)": "(fully halted)", + "(x%1 decay)": "(x%1 decay)", + "Decay rate multiplier from your momentum:": "Decay rate multiplier from your momentum:", + "Decay propagation multiplier from your acceleration:": "Decay propagation multiplier from your acceleration:", + "with %1 of active time": "with %1 of active time", + "additionally: ": "additionally: ", + "direct multiplier: x%1": "direct multiplier: x%1", + "for decay-related calculations due to ramping: ": "for decay-related calculations due to ramping: ", + "total: ": "total: ", + "kept: ": "kept: ", + "CpS multiplier from your decay": "CpS multiplier from your decay", + "CpS multiplier from %1": "CpS multiplier from %1", + "Decay rate multiplier from your momentum": "Decay rate multiplier from your momentum", + "Decay propagation multiplier from your acceleration": "Decay propagation multiplier from your acceleration", + "ENABLE AUTOCLICK": "ENABLE AUTOCLICK", + "Autoclicker only works when also pressing down on the big cookie or a wrinkler": "Autoclicker only works when also pressing down on the big cookie or a wrinkler", + "TOGGLE PAUSE": "TOGGLE PAUSE", + "Difficulty ramping has started!": "Difficulty ramping has started!", + "+%1/min": "+%1/min", + "Give up": "Give up", + "Are you sure? You'll have to start this run over and won't gain any heavenly chips!": "Are you sure? You'll have to start this run over and won't gain any heavenly chips!", + "Gave up": "Gave up", + "Let's try this again!": "Let's try this again!", + "Ascending in...": "Ascending in...", + "Due to the fact that decay has progressed past its breaking point, it will take an additional %1 for the ascend animation to start! You can cancel the ascension countdown at any time using the esc key.": "Due to the fact that decay has progressed past its breaking point, it will take an additional %1 for the ascend animation to start! You can cancel the ascension countdown at any time using the esc key.", + "New game minus": "New game minus", + "Do you REALLY want to start a new New game minus legacy?
You will lose your progress, your achievements, and your heavenly chips, start over with increased difficulty, and without gaining any benefits!": "Do you REALLY want to start a new New game minus legacy?
You will lose your progress, your achievements, and your heavenly chips, start over with increased difficulty, and without gaining any benefits!", + "Are you REALLY, REALLY, sure about this? The game will get harder, you will gain NO benefits or boosts, and while you can disable the negative effects of New game minus at any time - you won't get your current progress back!
Don't say we didn't warn you!": "Are you REALLY, REALLY, sure about this? The game will get harder, you will gain NO benefits or boosts, and while you can disable the negative effects of New game minus at any time - you won't get your current progress back!
Don't say we didn't warn you!", + "Are you ready to return to where you left off?
Last time you were in New game minus, you were %1 layers deep.": "Are you ready to return to where you left off?
Last time you were in New game minus, you were %1 layers deep.", + "This will wipe your current progress, including all of your prestige!": "This will wipe your current progress, including all of your prestige!", + "Exit New game minus": "Exit New game minus", + "Are you sure? You can reactivate New game minus at any time, but doing so will wipe your progress again.": "Are you sure? You can reactivate New game minus at any time, but doing so will wipe your progress again.", + "Resets everything and adds one New game minus layer, starting a new legacy with stronger decay than before. In addition, breaking point will be present in the first ascension as well.
Only unlocked upon obtaining at least %1, and advancing a layer requires achievement completions to be complete.": "Resets everything and adds one New game minus layer, starting a new legacy with stronger decay than before. In addition, breaking point will be present in the first ascension as well.
Only unlocked upon obtaining at least %1, and advancing a layer requires achievement completions to be complete.", + "Reset everything and return to layer %1 of New game minus.": "Reset everything and return to layer %1 of New game minus.", + "Unlocked upon obtaining an achievement completion of at least %1%.": "Unlocked upon obtaining an achievement completion of at least %1%.", + "Next layer: layer %1": "Next layer: layer %1", + "Cookies baked (cross-legacies total):": "Cookies baked (cross-legacies total):", + "First legacy started:": "First legacy started:", + ", with %1 new game minus layer%2": ", with %1 new game minus layer%2", + "cross-legacies total: ": "cross-legacies total: ", + "Sugar lumps harvested across all legacies:": "Sugar lumps harvested across all legacies:", + "Disables New game minus and reverts all of its effects for this legacy and all future legacies, until New game minus is invoked again": "Disables New game minus and reverts all of its effects for this legacy and all future legacies, until New game minus is invoked again", + "%1 to exploding": "%1 to exploding", + "In never": "In never", + "In %1": "In %1", + "Eating...": "Eating...", + "Hold to autoclick!": "Hold to autoclick!", + + //wrinkler & soul + "Popped a wrinkler": "Popped a wrinkler", + "Decay amplified!": "Decay amplified!", + "You found Wrinkler ambergris!": "You found Wrinkler ambergris!", + "-%1!": "-%1!", + "You lost %1!": "You lost %1!", + "You have become cursed and coagulated!": "You have become cursed and coagulated!", + "+%1 sugar lump!": [ + "+%1 sugar lump!", + "+%1 sugar lumps!" + ], + "%1 soul": [ + "%1 soul", + "%1 souls" + ], + "%1 shiny soul": [ + "%1 shiny soul", + "%1 shiny souls" + ], + "Decay halting requirement +50% for %1!": "Decay halting requirement +50% for %1!", + "Decay halting requirement +200% for %1!": "Decay halting requirement +200% for %1!", + "Decay rates and halting requirement +200% for %1!": "Decay rates and halting requirement +200% for %1!", + "Bombers incoming!": "Bombers incoming!", + "Wrinkler speed x6 for %1!": "Wrinkler speed x6 for %1!", + "Wrinkler soul": "Wrinkler soul", + "Shiny soul": "Shiny soul", + "Reflective blessing!": "Reflective blessing!", + "Cookies doubled!": "Cookies doubled!", + "CpS too low to double": "CpS too low to double", + "%1 unlocked!": "%1 unlocked!", + "This scroll will be available for selection in subsequent runs.": "This scroll will be available for selection in subsequent runs.", + "%1
until completion": "%1
until completion", + "Complete!
Drag into the big cookie and hold for a few seconds to claim it!": "Complete!
Drag into the big cookie and hold for a few seconds to claim it!", + "First Chance to Suffer": "First Chance to Suffer", + "Burst the especially insufferable shiny wrinkler.What a good citizen!": "Burst the especially insufferable shiny wrinkler.What a good citizen!", + "Wrinkler souls claimed:": "Wrinkler souls claimed:", + "Shiny wrinkler souls claimed:": "Shiny wrinkler souls claimed:", + "Bombers popped:": "Bombers popped:", + "Fuse discharge unlocked!": "Fuse discharge unlocked!", + "Decay is shattered!": "Decay is shattered!", + "expend": "expend", + "upgrade": "upgrade", + "incubate": "incubate", + "conjure": "conjure", + "Click to release one, or shift-ctrl-click to release all at once.": "Click to release one, or shift-ctrl-click to release all at once.", + "Fuse: %1": "Fuse: %1", + "(click to discharge!)": "(click to discharge!)", + "(recovery: %1%)": "(recovery: %1%)", + "Toggle this on to have released souls autonomously fly into the big cookie. (green = on)": "Toggle this on to have released souls autonomously fly into the big cookie. (green = on)", + "Click this to trade %1 normal wrinkler souls in your storage for %2 shiny wrinkler soul.": "Click this to trade %1 normal wrinkler souls in your storage for %2 shiny wrinkler soul.", + "Cannot use (not enough normal souls!)": "Cannot use (not enough normal souls!)", + "Toggle this on to make releasing souls convert it into %1% of its power instead.": "Toggle this on to make releasing souls convert it into %1% of its power instead.", + "Click this to release one phantom essence fixed to your mouse. (Hotkey: Shift + Ctrl + Q)": "Click this to release one phantom essence fixed to your mouse. (Hotkey: Shift + Ctrl + Q)", + "You can deposit this material by dragging an instance into the milk, and take out stored material by clicking on the button.": "You can deposit this material by dragging an instance into the milk, and take out stored material by clicking on the button.", + "Revealed upon the death of wrinklers.": "Revealed upon the death of wrinklers.", + "Offer %1 to raise maximum storage by %2 (Currently: +%3)": "Offer %1 to raise maximum storage by %2 (Currently: +%3)", + "Offer cookies to raise maximum storage (Maxed out: +%1)": "Offer cookies to raise maximum storage (Maxed out: +%1)", + "Unlock another %1 achievements to raise maximum storage by another %2 (Currently: +%3)": "Unlock another %1 achievements to raise maximum storage by another %2 (Currently: +%3)", + "Unlock achievements to raise maximum storage (Maxed out: +%1)": "Unlock achievements to raise maximum storage (Maxed out: +%1)", + "Revealed upon the death of an especially shiny variant of wrinklers. Quite hard to come by, as the shiny wrinklers are known for being tough.": "Revealed upon the death of an especially shiny variant of wrinklers. Quite hard to come by, as the shiny wrinklers are known for being tough.", + "Complete %1 more unshackled decay challenges to raise maximum storage by %2 (Currently: +%3)": "Complete %1 more unshackled decay challenges to raise maximum storage by %2 (Currently: +%3)", + "Complete unshackled decay challenges to raise maximum storage (Maxed out: +%1)": "Complete unshackled decay challenges to raise maximum storage (Maxed out: +%1)", + "Offer %1 to unlock the shiny condenser, converting normal souls to a shiny soul": "Offer %1 to unlock the shiny condenser, converting normal souls to a shiny soul", + "Offer %1 to make shiny condensation more efficient": "Offer %1 to make shiny condensation more efficient", + "Shiny condenser complete": "Shiny condenser complete", + "Energy embedded in the near-invisible and invincible phantom wrinklers, they seem to have the power to dispel the unholy.": "Energy embedded in the near-invisible and invincible phantom wrinklers, they seem to have the power to dispel the unholy.", + "Offer %1 to unlock quick release, fixing essences to your mouse": "Offer %1 to unlock quick release, fixing essences to your mouse", + "Quick release button unlocked": "Quick release button unlocked", + "Shiny wrinkler soul": "Shiny wrinkler soul", + "Phantom essence": "Phantom essence", + + "Touch of force [ACTIVE]": "Touch of force [ACTIVE]", + "Click a wrinkler to destroy a layer and knock it back!": "Click a wrinkler to destroy a layer and knock it back!", + "Touch of force": "Touch of force", + "Enable to empower the next click against wrinklers!
(Shortcut: Ctrl + D)": "Enable to empower the next click against wrinklers!
(Shortcut: Ctrl + D)", + "Recharges in: %1": "Recharges in: %1", + "Touch of force recharged!": "Touch of force recharged!", + "Wrinklers may occasionally carry sugar lumps, which greatly increases their durability.": "Wrinklers may occasionally carry sugar lumps, which greatly increases their durability.", + "Sugar lump-carrying wrinklers shares the damage other wrinklers take with damage reduction, and removing a layer of a lump-carrying wrinkler speeds up all wrinklers for a short amount of time.": "Sugar lump-carrying wrinklers shares the damage other wrinklers take with damage reduction, and removing a layer of a lump-carrying wrinkler speeds up all wrinklers for a short amount of time.", + "Sugar lumps are delicious and may be used as currency for all sorts of things.": "Sugar lumps are delicious and may be used as currency for all sorts of things.", + "Because you've baked a billion cookies in total, you are now attracting sugar lumps. Wrinklers now have a chance to carry them, and they may be spent on a variety of useful upgrades and things, such as upgrading the existing 4 minigames! (All minigames are already unlocked)": "Because you've baked a billion cookies in total, you are now attracting sugar lumps. Wrinklers now have a chance to carry them, and they may be spent on a variety of useful upgrades and things, such as upgrading the existing 4 minigames! (All minigames are already unlocked)", + "Minigame refills triggered!": "Minigame refills triggered!", + "Triggered a garden tick with forced mutations, maxed out worship swaps, and filled 100 magic.": "Triggered a garden tick with forced mutations, maxed out worship swaps, and filled 100 magic.", + "Glucose furnace": "Glucose furnace", + "Click to open the furnace!": "Click to open the furnace!", + "Will be ready in %1!": "Will be ready in %1!", + "Current boost: +%1% CpS": "Current boost: +%1% CpS", + "Current boost: +%1 CpS": "Current boost: +%1 CpS", + "Use %1 to burn and increase CpS by %2 per minute over %3, for up to %4": "Use %1 to burn and increase CpS by %2 per minute over %3, for up to %4", + "Burn sugar lump": "Burn sugar lump", + "Sacrifice your garden (by getting every seed) to increase cap by %1 (additive) and add +%2 per minute!": "Sacrifice your garden (by getting every seed) to increase cap by %1 (additive) and add +%2 per minute!", + "Capped": "Capped", + "Burn!": "Burn!", + "Burning
%1 remaining": "Burning
%1 remaining", + "+%1% --> +%2% per minute": "+%1% --> +%2% per minute", + "%1% --> %2% boost cap": "%1% --> %2% boost cap", + "MAXED": "MAXED", + "Upgrade furnace speed": "Upgrade furnace speed", + "Upgrade furnace boost cap": "Upgrade furnace boost cap", + "The below upgrades are kept through ascensions.": "The below upgrades are kept through ascensions.", + "Level %1": "Level %1", + "Auto-first burn": "Auto-first burn", + "outside": "outside", + "inside": "inside", + "Unshackled decay": "Unshackled decay", + "The Glucose furnace is ready!": "The Glucose furnace is ready!", + "Look in your switches section.": "Look in your switches section.", + "Sugar burning started!": "Sugar burning started!", + "Finishes after %1.": "Finishes after %1.", + "Sugar burning ended!": "Sugar burning ended!", + "Cap of +%1% reached.": "Cap of +%1% reached.", + "Current sugar burning boost: +%1%": "Current sugar burning boost: +%1%", + "get over %1": "get over %1", + "complete challenge %1": "complete challenge %1", + "heavenly upgrade %1": "heavenly upgrade %1", + "less time": "less time", + "Click-o-meter": "Click-o-meter", + "more time": "more time", + "Minimize the Click-o-meter": "Minimize the Click-o-meter", + "Show the Click-o-meter": "Show the Click-o-meter", + "Hide": "Hide", + "Click-o-meter unlocked!": "Click-o-meter unlocked!", + "Check it out at the top the middle section.": "Check it out at the top the middle section.", + "This meter shows for how long your clicks will keep decay halted.": "This meter shows for how long your clicks will keep decay halted.", + "Decay halted!": "Decay halted!", + "Amount of time left: %1": "Amount of time left: %1", + "Decay propagation rate -%1% for %2!": "Decay propagation rate -%1% for %2!", + "You cannot ascend right now, as you have not yet earned enough cookies.
Ascending for the first time requires a minimum of %1 heavenly chips.": "You cannot ascend right now, as you have not yet earned enough cookies.
Ascending for the first time requires a minimum of %1 heavenly chips.", + "Ascending cancelled!": "Ascending cancelled!", + + //covenant & veil + "Elder Covenant": "Elder Covenant", + "Covenant mode switched!": "Covenant mode switched!", + "Your covenant mode is now: ": "Your covenant mode is now: ", + "Elder Covenant [switching]": "Elder Covenant [switching]", + "The Elder Covenant is preparing to switch modes...": "The Elder Covenant is preparing to switch modes...", + "Time remaining until next mode:": "Time remaining until next mode:", + "off": "off", + "Switches between different modes, each one giving an unique bonus with an unique drawback.": "Switches between different modes, each one giving an unique bonus with an unique drawback.", + "holy": "holy", + "Decay rates -70% while having no purity, but CpS -98%.Blocks an outlet for decay using a portion of your production.": "Decay rates -70% while having no purity, but CpS -98%.Blocks an outlet for decay using a portion of your production.", + "energized": "energized", + "Clicking halts decay twice as fast, but fatigue also builds up twice as fast.Motivates you to be faster, stronger, and better, but...": "Clicking halts decay twice as fast, but fatigue also builds up twice as fast.Motivates you to be faster, stronger, and better, but...", + "Cookie production -%1 for %2!": "Cookie production -%1 for %2!", + "Wrath cookie disappeared, cookie smited!": "Wrath cookie disappeared, cookie smited!", + "boosted clicks": "boosted clicks", + "Click power +25%, but decay halting from clicks lasts half as long.Redirects your focus to the cookie-making ability of your clicks, with the side effect of decreasing its decay halting ability.": "Click power +25%, but decay halting from clicks lasts half as long.Redirects your focus to the cookie-making ability of your clicks, with the side effect of decreasing its decay halting ability.", + "draconic imbalance": "draconic imbalance", + "The aura slot on the right is 50% more powerful, but the aura slot on the left is 50% less powerful.As the prophecy foretold, one wing is always lighter than the other.": "The aura slot on the right is 50% more powerful, but the aura slot on the left is 50% less powerful.As the prophecy foretold, one wing is always lighter than the other.", + "frenzied": "frenzied", + "If a golden cookies spawned with this covenant mode gives Frenzy while a Frenzy is already ongoing, it will halves its duration and increase the strength of the ongoing Frenzy by 25%, for up to +400% strength.It's time to party!": "If a golden cookies spawned with this covenant mode gives Frenzy while a Frenzy is already ongoing, it will halves its duration and increase the strength of the ongoing Frenzy by 25%, for up to +400% strength.It's time to party!", + "plentiful harvests": "plentiful harvests", + "If a golden cookies spawned with this covenant mode gives Dragon Harvest while a Dragon Harvest is already ongoing, it will halves its duration and increase the strength of the ongoing Dragon Harvest by +150%, for up to +250% strength.A bounty for the patient.": "If a golden cookies spawned with this covenant mode gives Dragon Harvest while a Dragon Harvest is already ongoing, it will halves its duration and increase the strength of the ongoing Dragon Harvest by +150%, for up to +250% strength.A bounty for the patient.", + "Frenzy strengthened!": "Frenzy strengthened!", + "Dragon Harvest strengthened!": "Dragon Harvest strengthened!", + "Frenzy strength maximum reached!": "Frenzy strength maximum reached!", + "Dragon Harvest strength maximum reached!": "Dragon Harvest strength maximum reached!", + "%1x CpS multiplier": "%1x CpS multiplier", + "-%1 Frenzy duration!": "-%1 Frenzy duration!", + "-%1 Dragon Harvest duration!": "-%1 Dragon Harvest duration!", + "artifical lights": "artifical lights", + "Claiming shiny wrinkler souls have a 50% chance to trigger a garden tick with 3x mutation rates instead of spawning a golden cookie.An unholy mass, glowing as bright as the sun.": "Claiming shiny wrinkler souls have a 50% chance to trigger a garden tick with 3x mutation rates instead of spawning a golden cookie.An unholy mass, glowing as bright as the sun.", + "sacred": "sacred", + "All Grimoire spells are 10% cheaper, but also costs 1 worship swap.": "All Grimoire spells are 10% cheaper, but also costs 1 worship swap.", + "powerful": "powerful", + "You gain 25% more power, but power orbs no longer spawn.This power is truly fearsome.": "You gain 25% more power, but power orbs no longer spawn.This power is truly fearsome.", + "You also gained some extra purity!": "You also gained some extra purity!", + "Purification complete!": "Purification complete!", + "Elder Pledge restored!": "Elder Pledge restored!", + "Purity key activated!": "Purity key activated!", + "You purified all of your decay!": "You purified all of your decay!", + "Purity key charged!": "Purity key charged!", + "Pure suppression": "Pure suppression", + "Wrinkler spawning completely nullified for %1!": "Wrinkler spawning completely nullified for %1!", + "This Shimmering Veil is currently protecting you from %1.": "This Shimmering Veil is currently protecting you from %1.", + "your exhaustion": "your exhaustion", + "fatigue buildup": "fatigue buildup", + "Price scales with highest raw CpS reached this ascension.": "Price scales with highest raw CpS reached this ascension.", + "Turning it off will also incur some damage to the veil itself.": "Turning it off will also incur some damage to the veil itself.", + "If activated, this veil will protect you from %1.": "If activated, this veil will protect you from %1.", + "Your veil has previously collapsed, so this activation will require %1x more cookies than usual.": "Your veil has previously collapsed, so this activation will require %1x more cookies than usual.", + "This Shimmering Veil has collapsed.": "This Shimmering Veil has collapsed.", + "This Shimmering Veil will be restored in: ": "This Shimmering Veil will be restored in: ", + "Veil restored!": "Veil restored!", + "Your Shimmering Veil has recovered from the collapse!": "Your Shimmering Veil has recovered from the collapse!", + "Veil revived!": "Veil revived!", + "Your Sparkling wonder saved your veil from collapse and healed it back to full health!": "Your Sparkling wonder saved your veil from collapse and healed it back to full health!", + "Veil collapsed!": "Veil collapsed!", + "Your Shimmering Veil collapsed.": "Your Shimmering Veil collapsed.", + + //script writer + "You thought something will happen, didn't you?": "You thought something will happen, didn't you?", + "(repeating this code may yield different effects)": "(repeating this code may yield different effects)", + "How can I help you, sir?": "How can I help you, sir?", + "Debug tool activated!": "Debug tool activated!", + "I love the way they cook linguini.": "I love the way they cook linguini.", + "You are exhausted!": "You are exhausted!", + "Exhaustion not yet unlocked!": "Exhaustion not yet unlocked!", + "Fatigue report": "Fatigue report", + "You are %1% fatigued, and it would take you %2 clicks (%3 seconds with 10 clicks per second) to become exhausted.": "You are %1% fatigued, and it would take you %2 clicks (%3 seconds with 10 clicks per second) to become exhausted.", + "Halt time report: %1": "Halt time report: %1", + "This halting method will fully run out in %1!": "This halting method will fully run out in %1!", + "This channel is currently not active!": "This channel is currently not active!", + "Halt group report: %1 (%2 active methods)": "Halt group report: %1 (%2 active methods)", + "This halting group will all run out in %1.": "This halting group will all run out in %1.", + "To fully halt decay, you need at least %1 distinct halting methods. You currently have a functional %2 distinct halting methods, so the rate is decay is %3% of original.": "To fully halt decay, you need at least %1 distinct halting methods. You currently have a functional %2 distinct halting methods, so the rate is decay is %3% of original.", + "No wrinkler selected!": "No wrinkler selected!", + "This wrinkler currently has %1 health across all of its %2 layers, which would take a total of %3 clicks with the current %4 damage per click (%5); it %6, meaning that it would take %7 to reach the big cookie! %8": "This wrinkler currently has %1 health across all of its %2 layers, which would take a total of %3 clicks with the current %4 damage per click (%5); it %6, meaning that it would take %7 to reach the big cookie! %8", + "due to it taking %1% more damage": "due to it taking %1% more damage", + "no wrinkler-specific damage multipliers": "no wrinkler-specific damage multipliers", + "has %1% movement speed": "has %1% movement speed", + "has no movement speed multipliers specific to this wrinkler": "has no movement speed multipliers specific to this wrinkler", + "HP: pops all %1 layers in %2 clicks (takes %3x damage, %4 at 10 clicks/second)": "HP: pops all %1 layers in %2 clicks (takes %3x damage, %4 at 10 clicks/second)", + "Speed: %1%/s (%2 to reach)": "Speed: %1%/s (%2 to reach)", + "Stun: %1 (%2 left)": "Stun: %1 (%2 left)", + "-%1% speed": "-%1% speed", + "Wizard tower level reset!": "Wizard tower level reset!", + "Your wizard tower levels have been successfully reset, and refunding %1 sugar lumps.": "Your wizard tower levels have been successfully reset, and refunding %1 sugar lumps.", + "On cooldown! (%1 left)": "On cooldown! (%1 left)", + "Scroll \"%1\" reloaded!": "Scroll \"%1\" reloaded!", + "Has a cooldown of %1.": "Has a cooldown of %1.", + "%1 left": "%1 left", + "Typing \"activatepartymode\" will unlock party mode!": "Typing \"activatepartymode\" will unlock party mode!", + "You know limes?": "You know limes?", + "There is a code for summoning reindeer.": "There is a code for summoning reindeer.", + "Do you hate this game?": "Do you hate this game?", + "Someone must have told you how to get here.": "Someone must have told you how to get here.", + "Trufflz is the 9th best comp player.": "Trufflz is the 9th best comp player.", + "You can spawn a hideous creature if you have met the conditions; 15 minutes needs to have passed, and you need to be on the Christmas season, then typing
\"isurewouldloveifyoucanspawnagoldencookie
andareindeeratthesametime\" will spawn it.": "You can spawn a hideous creature if you have met the conditions; 15 minutes needs to have passed, and you need to be on the Christmas season, then typing
\"isurewouldloveifyoucanspawnagoldencookie
andareindeeratthesametime\" will spawn it.", + "Not-historically, the garden of eden had at least one of every plant species in it.": "Not-historically, the garden of eden had at least one of every plant species in it.", + "Do you know how much fatigue you have? With \"get fatigue\", now you know!": "Do you know how much fatigue you have? With \"get fatigue\", now you know!", + "There's \"get halt click\", or you can \"get halt soul\", or maybe \"get halt shiny\", so many options...": "There's \"get halt click\", or you can \"get halt soul\", or maybe \"get halt shiny\", so many options...", + "Try \"info\" while hovering over a wrinkler.": "Try \"info\" while hovering over a wrinkler.", + "Wrinklers appear %1 times as fast for %2!": "Wrinklers appear %1 times as fast for %2!", + "Surprise!": "Surprise!", + "There is a rare creature called \"reingold\" that can only be found normally on this day, have fun hunting it!": "There is a rare creature called \"reingold\" that can only be found normally on this day, have fun hunting it!", + "Reingold": "Reingold", + + "Kaizo cookies": "Kaizo cookies", + "Kaizo cookies is a Cookie clicker content mod made by a few members of Dashnet Forums, featuring drastic changes that aims to make the game faster and more active. The mod is currently not complete, with content ending at the %1 range.": "Kaizo cookies is a Cookie clicker content mod made by a few members of Dashnet Forums, featuring drastic changes that aims to make the game faster and more active. The mod is currently not complete, with content ending at the %1 range.", + "Developing this mod took a lot of thought and effort over almost a year, culminating into one of the biggest cookie clicker content mod ever made, and we'd really appreciate some support! Here's how:": "Developing this mod took a lot of thought and effort over almost a year, culminating into one of the biggest cookie clicker content mod ever made, and we'd really appreciate some support! Here's how:", + "You can find a non-comprehensive changelog of the mod here, but we recommend against spoiling yourself with that information.": "You can find a non-comprehensive changelog of the mod here, but we recommend against spoiling yourself with that information.", + "join our Discord server! Any feedback is welcome!": "join our Discord server! Any feedback is welcome!", + "like, favorite, and (if you want) give an award to our steam workshop entry!": "like, favorite, and (if you want) give an award to our steam workshop entry!", + "share our mod with anyone who you think will like it!": "share our mod with anyone who you think will like it!", + "Curve activated": "Curve activated", + "Sugar lump wrinkler spawned!": "Sugar lump wrinkler spawned!", + "Buff boosts clicks by +%1% for every building sold for %2 seconds, ": "Buff boosts clicks by +%1% for every building sold for %2 seconds, ", + "but also temporarily increases decay momentum by %1% with every building sold.": "but also temporarily increases decay momentum by %1% with every building sold.", + "+%1 prestige level effect on CpS for %2!": "+%1 prestige level effect on CpS for %2!", + "Power x%1 from %2!": "Power x%1 from %2!", + "Selebrak": "Selebrak", + "Cherish a season": "Cherish a season", + "Click to select this season to cherish.": "Click to select this season to cherish.", + "Here are all the relevant seasonal upgrades you have, sorted by seasons.
When a season is chosen, its upgrades will not be lost on ascension, but you will still need to get them in a run to be kept.
You can reassign it anytime you ascend.": "Here are all the relevant seasonal upgrades you have, sorted by seasons.
When a season is chosen, its upgrades will not be lost on ascension, but you will still need to get them in a run to be kept.
You can reassign it anytime you ascend.", + "with %1 prestige levels unleashed (+%2% CpS)": "with %1 prestige levels unleashed (+%2% CpS)", + "at x%1 effect and count": "at x%1 effect and count", + "and additional x%1 count": "and additional x%1 count", + "fully unleashed (+%1% CpS)": "fully unleashed (+%1% CpS)", + "%1% prestige unleashed (%2 / %3)": "%1% prestige unleashed (%2 / %3)", + "Also makes all santa's gifts %1 times cheaper.": "Also makes all santa's gifts %1 times cheaper.", + "Cost increases by 12 times for each santa upgrade bought.": "Cost increases by 12 times for each santa upgrade bought.", + "The latest building produces %1% more.": "The latest building produces %1% more.", + "All buildings are %1% cheaper.": "All buildings are %1% cheaper.", + "All upgrades are %1% cheaper.": "All upgrades are %1% cheaper.", + "Reindeer frenzy": "Reindeer frenzy", + "Reindeers incoming!": "Reindeers incoming!", + + //upgrade & achievement descs + "Always permaslottable": "Always permaslottable", + "Kept on ascension": "Kept on ascension", + "Obtaining a dropped sugar lump gives %1 of Frenzy.": "Obtaining a dropped sugar lump gives %1 of Frenzy.", + "Unlocks cursedor, which concentrates and converts your cookies clicked amount this ascension into a golden cookie; the more you clicked, the better effects the golden cookie will yield.": "Unlocks cursedor, which concentrates and converts your cookies clicked amount this ascension into a golden cookie; the more you clicked, the better effects the golden cookie will yield.", + "Activating this will spawn a golden cookie based on the amount of times you clicked the big cookie this ascension when you click the big cookie. Upon use, your cookies clicked stat will be reset and the golden cookie spawned yields effects based on the amount it consumed.": "Activating this will spawn a golden cookie based on the amount of times you clicked the big cookie this ascension when you click the big cookie. Upon use, your cookies clicked stat will be reset and the golden cookie spawned yields effects based on the amount it consumed.", + "The Cursedor is currently active, and clicking the big cookie will reset your big cookies clicked amount and spawn a golden cookie.
Turning it off will revert those effects.": "The Cursor is currently active, and clicking the big cookie will reset your big cookies clicked amount and spawn a golden cookie.
Turning it off will revert those effects.", + "Stops all decay.": "Stops all decay.", + "Purification is no longer limited by caps; however, increasing purity past the cap will require an increased amount of purification power.
The decay rate increase from purity increase -25%.": "Purification is no longer limited by caps; however, increasing purity past the cap will require an increased amount of purification power.
The decay rate increase from purity increase -25%.", + "Makes Elder Pledge's purification 25% stronger, reduces the cooldown by 25%, and makes the active duration 25% longer.": "Makes Elder Pledge's purification 25% stronger, reduces the cooldown by 25%, and makes the active duration 25% longer.", + "The Elder Pledge halts decay for 3 times longer on use.": "The Elder Pledge halts decay for 3 times longer on use.", + "Your upgrades are 0.1% cheaper for every x0.5 CpS multiplier from your decay.": "Your upgrades are 0.1% cheaper for every x0.5 CpS multiplier from your decay.", + "The Shimmering Veil has a %1% chance to be revived to full health on collapse.": "The Shimmering Veil has a %1% chance to be revived to full health on collapse.", + "These were made with the purest and highest quality ingredients, legend says: \"whom has the cookie they shall become the most powerful baker.\" No, this isn\'t just a normal cookie.": "These were made with the purest and highest quality ingredients, legend says: \"whom has the cookie they shall become the most powerful baker.\" No, this isn\'t just a normal cookie.", + "You gain +5% CpS for each sugar lump that you have ever obtained, for up to a total of +80% CpS.": "You gain +5% CpS for each sugar lump that you have ever obtained, for up to a total of +80% CpS.", + "Claiming sugar lumps halt decay, with triple the duration for meaty sugar lumps.": "Claiming sugar lumps halt decay, with triple the duration for meaty sugar lumps.", + "The effect cap of Caramelized luxury is increased to +300%.": "The effect cap of Caramelized luxury is increased to +300%.", + "You gain +1% prestige effect for each level of all buildings, for up to a total of +200% effect.": "You gain +1% prestige effect for each level of all buildings, for up to a total of +200% effect.", + "Lets you unlock a set of new tiered upgrades at 600 of each building, which make individual buildings accumulate decay slower.
All other decay-related calculations uses the combined impact of all buildings.": "Lets you unlock a set of new tiered upgrades at 600 of each building, which make individual buildings accumulate decay slower.
All other decay-related calculations uses the combined impact of all buildings.", + "Obtain a CpS multiplier from purity of +%1% or more for at least 5 seconds.": "Obtain a CpS multiplier from purity of +%1% or more for at least 5 seconds.", + "%1 accumulates %2% less decay.": "%1 accumulates %2% less decay.", + "Looks bad, but still edible - just barely.": "Looks bad, but still edible - just barely.", + "Each building accumulates 2% less decay for every level it has, for up to level 20.": "Each building accumulates 2% less decay for every level it has, for up to level 20.", + "Decay propagation -1% for each building leveled to level 10 or above.": "Decay propagation -1% for each building leveled to level 10 or above.", + "Contains a variety of new kittens.": "Contains a variety of new kittens.", + "You gain more milk the more purity you have.": "You gain more milk the more purity you have.", + "Price scaling for %1 are pushed back by %2 buildings.": "Price scaling for %1 are pushed back by %2 buildings.", + "Typing certain things may reveal some useful hidden information. (case insensitive).": "Typing certain things may reveal some useful hidden information. (case insensitive).", + "Unlocks the cookie selector, letting you pick how the big cookie looks.
Comes with a variety of cookies.": "Unlocks the cookie selector, letting you pick how the big cookie looks.
Comes with a variety of cookies.", + "Lets you pick which cookie to display.": "Lets you pick which cookie to display.", + "Placing an upgrade in this slot will make its effects permanent across all playthroughs.": "Placing an upgrade in this slot will make its effects permanent across all playthroughs.", + "Can only slot flavored cookie upgrades.": "Can only slot flavored cookie upgrades.", + "Unlocks new challenges for the Unshackled decay challenge mode.": "Unlocks new challenges for the Unshackled decay challenge mode.", + "Also disables building requirements for buying new buildings, automatically unlocks Force the Hand of Fate and Godzamok, and refunds sugar lumps spent if already unlocked.": "Also disables building requirements for buying new buildings, automatically unlocks Force the Hand of Fate and Godzamok, and refunds sugar lumps spent if already unlocked.", + "This upgrade was unlocked after obtaining at least %1 total prestige levels.": "This upgrade was unlocked after obtaining at least %1 total prestige levels.", + "Your clicks are %1% more effective against wrinklers.": "Your clicks are %1% more effective against wrinklers.", + "Big cookie clicks have a 1% chance to purify a small amount of decay.": "Big cookie clicks have a 1% chance to purify a small amount of decay.", + "Frenzy from golden cookies last 35% longer.
Unlocks after clicking 27 naturally spawning golden cookies this ascension.": "Frenzy from golden cookies last 35% longer.
Unlocks after clicking 27 naturally spawning golden cookies this ascension.", + "Golden cookie gain is doubled.": "Golden cookie gain is doubled.", + "Golden cookie gain refers to any effect from golden cookies that involves directly creating some amount of cookies, such as Lucky.": "Golden cookie gain refers to any effect from golden cookies that involves directly creating some amount of cookies, such as Lucky.", + "The mouse is four times as efficient.": "The mouse is four times as efficient.", + "Wrinklers take 1% more damage from clicks for each santa level past Elfling.": "Wrinklers take 1% more damage from clicks for each santa level past Elfling.", + "Research is twice as fast.": "Research is twice as fast.", + "%1 are +%2 more efficient.": "%1 are +%2 more efficient.", + "Evolving Santa requires 1 less normal wrinkler soul per level.": "Evolving Santa requires 1 less normal wrinkler soul per level.", + "Wrinkler souls halt decay for 1% longer per Santa level past Elfling.": "Wrinkler souls halt decay for 1% longer per Santa level past Elfling.", + "While having no purity and is not coagulated, decay is twice as slow.": "While having no purity and is not coagulated, decay is twice as slow.", + "Destroys wrinklers after only depleting the health of the second to last layer.": "Destroys wrinklers after only depleting the health of the second to last layer.", + "%1 are %2% more efficient.": "%1 are %2% more efficient.", + "Clicking halts decay %1% faster.": "Clicking halts decay %1% faster.", + "The decay speed and strength increase with purity is slightly slower.": "The decay speed and strength increase with purity is slightly slower.", + "Leveling the Santa takes half as many souls and shiny souls.": "Leveling the Santa takes half as many souls and shiny souls.", + "While exhausted, claiming wrinkler souls clear half a second worth of exhaustion.": "While exhausted, claiming wrinkler souls clear half a second worth of exhaustion.", + "While exhausted, normal and shiny wrinkler souls halt decay for 10% longer.": "While exhausted, normal and shiny wrinkler souls halt decay for 10% longer.", + "Creates a draggable marker; whenever power click shockwaves pass through it, it creates an additional, smaller power click shockwave that hits all wrinklers in range for %1% the damage of the original shockwave.": "Creates a draggable marker; whenever power click shockwaves pass through it, it creates an additional, smaller power click shockwave that hits all wrinklers in range for %1% the damage of the original shockwave.", + "Each digit in the amount of heavenly chips you have unspent grants you +100% initial purity on reincarnation.": "Each digit in the amount of heavenly chips you have unspent grants you +100% initial purity on reincarnation.", + "Clicking halts decay 10% harder.": "Clicking halts decay 10% harder.", + "You purify decay over time while decay is halted with enough power.": "You purify decay over time while decay is halted with enough power.", + "All purity caps are 50% higher.": "All purity caps are 50% higher.", + "Upon getting at least +%1% purity for at least %2 for the first time in an ascension, it becomes charged; it discharges when decay breaks, which purifies all decay, damages and stuns all wrinklers, and applies a buff to completely stop wrinkler spawning for %3.": "Upon getting at least +%1% purity for at least %2 for the first time in an ascension, it becomes charged; it discharges when decay breaks, which purifies all decay, damages and stuns all wrinklers, and applies a buff to completely stop wrinkler spawning for %3.", + "The click-o-meter now shows the amount of time left on hover.": "The click-o-meter now shows the amount of time left on hover.", + "Wrinklers approach the big cookie %1% slower.": "Wrinklers approach the big cookie %1% slower.", + "Your clicks deal %1% more damage to wrinklers.": "Your clicks deal %1% more damage to wrinklers.", + "The wrinkler stun effect on damage is twice as potent.": "The wrinkler stun effect on damage is twice as potent.", + "Each grandma (up to %1) increases damage against shiny wrinklers by %2%.": "Each grandma (up to %1) increases damage against shiny wrinklers by %2%.", + "Magic regeneration in the Grimoire is 2 times faster.": "Magic regeneration in the Grimoire is 2 times faster.", + "Unlocks the Glucose furnace, converting sugar lumps into permanent increasing CpS bonuses in a run.": "Unlocks the Glucose furnace, converting sugar lumps into permanent increasing CpS bonuses in a run.", + "The thunder marker now releases a small damaging shockwave once every %1.": "The thunder marker now releases a small damaging shockwave once every %1.", + "The thunder marker shockwave multiplier is increased to %1%.": "The thunder marker shockwave multiplier is increased to %1%.", + "Is a prerequisite to a glucose furnace boost cap upgrade.": "Is a prerequisite to a glucose furnace boost cap upgrade.", + "Upon recovering from exhaustion, your most advanced building produces %1x as much for %2.": "Upon recovering from exhaustion, your most advanced building produces %1x as much for %2.", + "Upon recovering from exhaustion, your clicks deal +%1% damage to wrinklers for %2.": "Upon recovering from exhaustion, your clicks deal +%1% damage to wrinklers for %2.", + "Upon recovering from exhaustion, all wrinklers on-screen permanently take x%1 damage from all sources (stackable).": "Upon recovering from exhaustion, all wrinklers on-screen permanently take x%1 damage from all sources (stackable).", + "Upon recovering from exhaustion, the thunder marker releases two large shockwaves.": "Upon recovering from exhaustion, the thunder marker releases two large shockwaves.", + "You gain more milk the more CpS you have.": "You gain more milk the more CpS you have.", + "You gain a bit more CpS the more milk you have.": "You gain a bit more CpS the more milk you have.", + "CpS +%1%. You gain less CpS the less milk you have.": "CpS +%1%. You gain less CpS the less milk you have.", + "You start non-unshackled decay runs with 1 free shipment.": "You start non-unshackled decay runs with 1 free shipment.", + "You keep the first eight cortex baker upgrades across ascensions.": "You keep the first eight cortex baker upgrades across ascensions.", + "You keep all polargurt-tiered upgrades across ascensions.": "You keep all polargurt-tiered upgrades across ascensions.", + "You permanently keep %1% of your big cookie clicks performed in a run upon ascension.": "You permanently keep %1% of your big cookie clicks performed in a run upon ascension.", + "Wrinklers with runes around them carry scrolls, granting them resistances against certain high-damage attacks and causing them to explode like a bomber (but will not inflict distorted).": "Wrinklers with runes around them carry scrolls, granting them resistances against certain high-damage attacks and causing them to explode like a bomber (but will not inflict distorted).", + "Defeating them unlocks awakened scrolls after a long delay.": "Defeating them unlocks awakened scrolls after a long delay.", + "The new scrolls can only be used if slotted in a soulbound container like this one.": "The new scrolls can only be used if slotted in a soulbound container like this one.", + + "Type \"stop\" to freeze all wrinkler souls on screen for %1!": "Type \"stop\" to freeze all wrinkler souls on screen for %1!", + "Type \"unleash the potential\" to increase the amount of prestige unleashed by 30% for up to +150%, lasting until the end of the current run.": "Type \"unleash the potential\" to increase the amount of prestige unleashed by 30% for up to +150%, lasting until the end of the current run.", + "Type \"unleash the hidden will\" to refresh the cooldown on the Scroll of prestige escalation, at the cost of %1 normal souls or %2 shiny souls, priortizing normal souls when both are available.": "Type \"unleash the hidden will\" to refresh the cooldown on the Scroll of prestige escalation, at the cost of %1 normal souls or %2 shiny souls, priortizing normal souls when both are available.", + "The effect cap of the Scroll of prestige escalation is removed.": "The effect cap of the Scroll of prestige escalation is removed.", + "Type \"i need an orb\" to spawn a power orb instantly.": "Type \"i need an orb\" to spawn a power orb instantly.", + "Type \"getin\" to pull in all wrinkler souls present on screen into the big cookie!": "Type \"getin\" to pull in all wrinkler souls present on screen into the big cookie!", + "Type \"%1\" to have big cookie clicks halt decay and builds up fatigue 3 times faster for %2.": "Type \"%1\" to have big cookie clicks halt decay and builds up fatigue 3 times faster for %2.", + "Type \"sp1n\", \"sp2n\", or \"sp3n\" to rotate the next wrinkler clicked clockwise 90, 180, and 270 degrees respectively.": "Type \"sp1n\", \"sp2n\", or \"sp3n\" to rotate the next wrinkler clicked clockwise 90, 180, and 270 degrees respectively.", + + "Obtain a CpS multiplier from decay of -%1% or less.": "Obtain a CpS multiplier from decay of -%1% or less.", + "Reach infinite decay.": "Reach infinite decay.", + "Obtaining this achievement purifies all of your decay.": "Obtaining this achievement purifies all of your decay.", + "Reach a decay rates multiplier of at least x%1 from your momentum.": "Reach a decay rates multiplier of at least x%1 from your momentum.", + "Reach a kitten multiplier of at least +%1% whilst having a CpS multiplier from purity of at least +%2%.": "Reach a kitten multiplier of at least +%1% whilst having a CpS multiplier from purity of at least +%2%.", + "Complete a challenge.": "Complete a challenge.", + "Complete %1 challenges.": "Complete %1 challenges.", + "Complete every challenge.": "Complete every challenge.", + "Complete every challenge from the %1.": "Complete every challenge from the %1.", + "Complete a repeatable challenge at least %1 times.": "Complete a repeatable challenge at least %1 times.", + "Ascend with a purity of at least +%1%.": "Ascend with a purity of at least +%1%.", + "Claim your first shiny wrinkler soul, unlocking the Utenglobe.": "Claim your first shiny wrinkler soul, unlocking the Utenglobe.", + "Claim your first wrinkler soul.": "Claim your first wrinkler soul.", + "Claim %1 normal wrinkler souls.": "Claim %1 normal wrinkler souls.", + "Maintain purity by claiming a wrinkler soul while also halting decay with clicking.": "Maintain purity by claiming a wrinkler soul while also halting decay with clicking.", + "Claim %1 shiny wrinkler souls.": "Claim %1 shiny wrinkler souls.", + "Pop your first bomber wrinkler.": "Pop your first bomber wrinkler.", + "Distort yourself by letting a bomber wrinkler explode.": "Distort yourself by letting a bomber wrinkler explode.", + "Burst %1 bomber wrinklers.": "Burst %1 bomber wrinklers.", + "Unlock decay momentum.": "Unlock decay momentum.", + "Unlock decay.": "Unlock decay.", + "Trigger a Reindeer frenzy.": "Trigger a Reindeer frenzy.", + + //replacement + "[Kaizo Upgrade replacement 0]The cursor is twice as efficient and the mouse is 4 times as efficient.": "The cursor is twice as efficient and the mouse is 4 times as efficient.", + "[Kaizo Upgrade replacement 1]The cursor is twice as efficient and the mouse is 4 times as efficient.": "The cursor is twice as efficient and the mouse is 4 times as efficient.", + "[Kaizo Upgrade replacement 2]The cursor is twice as efficient and the mouse is 4 times as efficient.": "The cursor is twice as efficient and the mouse is 4 times as efficient.", + "[Kaizo Upgrade replacement 52]Golden cookies appear 50% more often and stay twice as long.
Unlocks after clicking 1 naturally spawning golden cookie this ascension.
Note that while the effect is reduced, the base golden cookie spawn rate is increased to compensate.": "Golden cookies appear 50% more often and stay twice as long.
Unlocks after clicking 1 naturally spawning golden cookie this ascension.
Note that while the effect is reduced, the base golden cookie spawn rate is increased to compensate.", + "[Kaizo Upgrade replacement 53]Golden cookies appear 50% more often and stay twice as long.
Unlocks after clicking 3 naturally spawning golden cookies this ascension.
Note that while the effect is reduced, the base golden cookie spawn rate is increased to compensate.": "Golden cookies appear 50% more often and stay twice as long.
Unlocks after clicking 3 naturally spawning golden cookies this ascension.
Note that while the effect is reduced, the base golden cookie spawn rate is increased to compensate.", + "[Kaizo Upgrade replacement 69]Each grandma gains +0.02 base CpS per grandma.
Also unlocks the Elder Pledge, which slowly purifies the decay for some cookies.": "Each grandma gains +0.02 base CpS per grandma.
Also unlocks the Elder Pledge, which slowly purifies the decay for some cookies.", + "[Kaizo Upgrade replacement 70]Cookie production multiplier +4%, and reduces the Elder Pledge cooldown by 30 seconds.": "Cookie production multiplier +4%, and reduces the Elder Pledge cooldown by 30 seconds.", + "[Kaizo Upgrade replacement 71]Each grandma gains another +0.02 base CpS per grandma, and makes the Elder Pledge purify for 20% more time.": "Each grandma gains another +0.02 base CpS per grandma, and makes the Elder Pledge purify for 20% more time.", + "[Kaizo Upgrade replacement 72]Cookie production multiplier +5%, and reduces the Elder Pledge cooldown by 30 seconds.": "Cookie production multiplier +5%, and reduces the Elder Pledge cooldown by 30 seconds.", + "[Kaizo Upgrade replacement 73]Each grandma gains +0.05 base CpS per portal, and makes the Elder Pledge 10% more powerful.": "Each grandma gains +0.05 base CpS per portal, and makes the Elder Pledge 10% more powerful.", + "[Kaizo Upgrade replacement 74]Purifies the decay, at least for a short while.": "Purifies the decay, at least for a short while.", + "[Kaizo Upgrade replacement 86]Golden cookie effects last 50% longer.
Unlocks after clicking 7 naturally spawning golden cookies this ascension.": "Golden cookie effects last 50% longer.
Unlocks after clicking 7 naturally spawning golden cookies this ascension.", + "[Kaizo Upgrade replacement 87]The Elder Pledge is 10 times as cheap.": "The Elder Pledge is 10 times as cheap.", + "[Kaizo Upgrade replacement 129]Unleash up to 100 prestige levels, making them each grant +1% CpS.
The amount unleashed is also boosted by prestige effect boosts.": "Unleash up to 100 prestige levels, making them each grant +1% CpS.
The amount unleashed is also boosted by prestige effect boosts.", + "[Kaizo Upgrade replacement 130]Increase the maximum amount of unleashed prestige levels to 1,000.": "Increase the maximum amount of unleashed prestige levels to 1,000.", + "[Kaizo Upgrade replacement 131]Increase the maximum amount of unleashed prestige levels to 10,000.": "Increase the maximum amount of unleashed prestige levels to 10,000.", + "[Kaizo Upgrade replacement 132]Increase the maximum amount of unleashed prestige levels to 100,000.": "Increase the maximum amount of unleashed prestige levels to 100,000.", + "[Kaizo Upgrade replacement 133]Increase the maximum amount of unleashed prestige levels to 1,000,000, and also allows you to charge this upgrade over time by sustaining purity, unleashing even more prestige levels.
The speed of charging also scales with prestige effect multipliers and is faster the more prestige you have unleashed.": "Increase the maximum amount of unleashed prestige levels to 1,000,000, and also allows you to charge this upgrade over time by sustaining purity, unleashing even more prestige levels.
The speed of charging also scales with prestige effect multipliers, and is faster the more prestige you have unleashed.", + "[Kaizo Upgrade replacement 141]Subsequent research will be twice as fast.": "Subsequent research will be twice as fast.", + "[Kaizo Upgrade replacement 142]Wrinklers no longer spawn.": "Wrinklers no longer spawn.", + "[Kaizo Upgrade replacement 158]Reindeers are twice as slow.
Clicking a reindeer briefly halts decay.": "Reindeers are twice as slow.
Clicking a reindeer briefly halts decay.", + "[Kaizo Upgrade replacement 159]Reindeer give 4 times as much.": "Reindeer give 4 times as much.", + "[Kaizo Upgrade replacement 160]All buildings are 25% cheaper.": "All buildings are 25% cheaper.", + "[Kaizo Upgrade replacement 161]All upgrades are 25% cheaper.": "All upgrades are 25% cheaper.", + "[Kaizo Upgrade replacement 162]Grandmas are twice as efficient.
Grandmas are 100 times cheaper.": "Grandmas are twice as efficient.
Grandmas are 100 times cheaper.", + "[Kaizo Upgrade replacement 163]Random drops are 10% more common.
Decay rates -10%.": "Random drops are 10% more common.
Decay rates -10%.", + "[Kaizo Upgrade replacement 164]Clicking is 50% more powerful, and the six mouse efficiency quadrupling upgrades multiply by 16 instead.": "Clicking is 50% more powerful, and the six mouse efficiency quadrupling upgrades multiply by 16 instead.", + "[Kaizo Upgrade replacement 165]Cookie production multiplier +5% per Santa's levels.": "Cookie production multiplier +5% per Santa's levels.", + "[Kaizo Upgrade replacement 168]Cookie production multiplier +42%.
All buildings are 1% cheaper.
All upgrades are 2% cheaper.": "Cookie production multiplier +42%.
All buildings are 1% cheaper.
All upgrades are 2% cheaper.", + "[Kaizo Upgrade replacement 169]Cookie production multiplier +4%.": "Cookie production multiplier +4%.", + "[Kaizo Upgrade replacement 170]Cookie production multiplier +5%.": "Cookie production multiplier +5%.", + "[Kaizo Upgrade replacement 171]Cookie production multiplier +6%.": "Cookie production multiplier +6%.", + "[Kaizo Upgrade replacement 172]Cookie production multiplier +7%.": "Cookie production multiplier +7%.", + "[Kaizo Upgrade replacement 173]Cookie production multiplier +8%.": "Cookie production multiplier +8%.", + "[Kaizo Upgrade replacement 174]Cookie production multiplier +9%.": "Cookie production multiplier +9%.", + "[Kaizo Upgrade replacement 181]Allow you to trigger seasonal events at will, for a price.
Also makes all santa's gifts 1,000,000,000 times cheaper.": "Allow you to trigger seasonal events at will, for a price.
Also makes all santa's gifts 1,000,000,000 times cheaper.", + "[Kaizo Upgrade replacement 224]Wrinklers are 5% slower.": "Wrinklers are 5% slower.", + "[Kaizo Upgrade replacement 274]Maximum power click capacity increased to 2.": "Maximum power click capacity increased to 2.", + "[Kaizo Upgrade replacement 275]You gain 50% more power.": "You gain 50% more power.", + "[Kaizo Upgrade replacement 276]Unlocks the Boundless sack, allowing to summon power orbs at will.": "Unlocks the Boundless sack, allowing to summon power orbs at will.", + "[Kaizo Upgrade replacement 277]Power orbs spawn 50% more often and you deal 50% more damage to them.": "Power orbs spawn 50% more often and you deal 50% more damage to them.", + "[Kaizo Upgrade replacement 278]Maximum power click capacity increased to 3, and makes purifying decay also grant power.": "Maximum power click capacity increased to 3, and makes purifying decay also grant power.", + "[Kaizo Upgrade replacement 279]You gain 20% more power for each full power click you have stored.": "You gain 20% more power for each full power click you have stored.", + "[Kaizo Upgrade replacement 280]Maximum power click capacity increased to 5.": "Maximum power click capacity increased to 5.", + "[Kaizo Upgrade replacement 281]Adds the power gauge once decay is unlocked. Power clicks can be used to obliterate one wrinkler and deal massive damage to all other wrinklers.": "Adds the power gauge once decay is unlocked. Power clicks can be used to obliterate one wrinkler and deal massive damage to all other wrinklers.", + "[Kaizo Upgrade replacement 284]The time to spawn golden cookies varies less.": "The time to spawn golden cookies varies less.", + "[Kaizo Upgrade replacement 292]Your clicks are 20% more effective against wrinklers. Wrinklers are 10% slower.": "Your clicks are 20% more effective against wrinklers. Wrinklers are 10% slower.", + "[Kaizo Upgrade replacement 293]Wrinklers have a 10% chance to drop two souls instead of one.": "Wrinklers have a 10% chance to drop two souls instead of one.", + "[Kaizo Upgrade replacement 325]Allows power clicks to be done on golden cookies, which increases its effect duration by 30%.
Power poked buff increases prestige effect by another 15%.": "Allows power clicks to be done on golden cookies, which increases its effect duration by 30%.
Power poked buff increases prestige effect by another 15%.", + "[Kaizo Upgrade replacement 331]Turning this on will give you a passive +50% CpS, but will prevent golden cookies from spawning.
Cost is equal to 10 minutes of CpS..": "Turning this on will give you a passive +50% CpS, but will prevent golden cookies from spawning.
Cost is equal to 10 minutes of CpS..", + "[Kaizo Upgrade replacement 353]The shockwave from power clicking wrinklers repeats one more time.": "The shockwave from power clicking wrinklers repeats one more time.", + "[Kaizo Upgrade replacement 354]You can perform power clicks on the big cookie as well, which stops decay for an extended period of time with each activation being considered a distinct method.": "You can perform power clicks on the big cookie as well, which stops decay for an extended period of time with each activation being considered a distinct method.", + "[Kaizo Upgrade replacement 355]The shockwave from power clicking wrinklers also knocks back all wrinklers hit.": "The shockwave from power clicking wrinklers also knocks back all wrinklers hit.", + "[Kaizo Upgrade replacement 356]Power clicking the big cookie renders it \"Power poked\", boosting prestige effect by +20% for 20 seconds (strength stacks with each use) as well as preventing fatigue from building up while power poked.": "Power clicking the big cookie renders it \"Power poked\", boosting prestige effect by +20% for 20 seconds (strength stacks with each use) as well as preventing fatigue from building up while power poked.", + "[Kaizo Upgrade replacement 357]Power poked effect lasts 50% longer, and clicking on the big cookie knocks back all wrinklers even more.": "Power poked effect lasts 50% longer, and clicking on the big cookie knocks back all wrinklers even more.", + "[Kaizo Upgrade replacement 358]Wrinkler click shockwaves trigger one more time and power clicking wrinklers deal 25% more damage.": "Wrinkler click shockwaves trigger one more time and power clicking wrinklers deal 25% more damage.", + "[Kaizo Upgrade replacement 359]Power poked effect increased to +45% prestige effect.": "Power poked effect increased to +45% prestige effect.", + "[Kaizo Upgrade replacement 363]This is the first heavenly upgrade; it unlocks the Heavenly chips system.
Each time you ascend, the cookies you made in your past life are turned into heavenly chips and prestige.
Heavenly chips can be spent on a variety of permanent transcendental upgrades.
Your prestige level also gives you a permanent +1% CpS per level.
Decay starts to break after -90%, becoming more powerful the more decay you have: ascending is no longer immediate and you gain a decay propagation increase that scales with current decay.
In addition, wrinklers have also inherited a part of the power: popping any that has already reached the big cookie will now inflict Coagulated and Cursed, and their speed also increases the more decay you have, for up to the point where decay breaks.": "This is the first heavenly upgrade; it unlocks the Heavenly chips system.
Each time you ascend, the cookies you made in your past life are turned into heavenly chips and prestige.
Heavenly chips can be spent on a variety of permanent transcendental upgrades.
Your prestige level also gives you a permanent +1% CpS per level.
Decay starts to break after -90%, becoming more powerful the more decay you have: ascending is no longer immediate and you gain a decay propagation increase that scales with current decay.
In addition, wrinklers have also inherited a part of the power: popping any that has already reached the big cookie will now inflict Coagulated and Cursed, and their speed also increases the more decay you have, for up to the point where decay breaks.", + "[Kaizo Upgrade replacement 364]While exhausted, wrinkler souls halt decay for 10% longer..": "While exhausted, wrinkler souls halt decay for 10% longer..", + "[Kaizo Upgrade replacement 397]Naturally spawning golden cookies have a 20% chance to spawn another golden cookie alongside it; the second golden cookie will always give Lucky.": "Naturally spawning golden cookies have a 20% chance to spawn another golden cookie alongside it; the second golden cookie will always give Lucky.", + "[Kaizo Upgrade replacement 408]Sugar lump-carrying wrinklers are 25% more likely to carry special sugar lumps.": "Sugar lump-carrying wrinklers are 25% more likely to carry special sugar lumps.", + "[Kaizo Upgrade replacement 409]You deal 30% more damage to lump-carrying wrinklers.": "You deal 30% more damage to lump-carrying wrinklers.", + "[Kaizo Upgrade replacement 410]Bifurcated sugar lumps give 2 sugar lumps 75% of the times instead of 50%.": "Bifurcated sugar lumps give 2 sugar lumps 75% of the times instead of 50%.", + "[Kaizo Upgrade replacement 411]+1% prestige level effect on CpS.
+1% golden cookie effect duration.
+1% golden cookie lifespan.": "+1% prestige level effect on CpS.
+1% golden cookie effect duration.
+1% golden cookie lifespan.", + "[Kaizo Upgrade replacement 412]+1% prestige level effect on CpS.
+1% golden cookie effect duration.
+1% golden cookie lifespan.": "+1% prestige level effect on CpS.
+1% golden cookie effect duration.
+1% golden cookie lifespan.", + "[Kaizo Upgrade replacement 413]+1% prestige level effect on CpS.
+1% golden cookie effect duration.
+1% golden cookie lifespan.": "+1% prestige level effect on CpS.
+1% golden cookie effect duration.
+1% golden cookie lifespan.", + "[Kaizo Upgrade replacement 451]Each Grandma makes meaty sugar lumps 0.06% more common and make meaty sugar lumps give 0.06% more, for up to 666 Grandmas.": "Each Grandma makes meaty sugar lumps 0.06% more common and make meaty sugar lumps give 0.06% more, for up to 666 Grandmas.", + "[Kaizo Upgrade replacement 474]The duration of Power poked and Power surge +3%.
Dropped by drowsyfern plants.": "The duration of Power poked and Power surge +3%.
Dropped by drowsyfern plants.", + "[Kaizo Upgrade replacement 475]The duration of Power poked and Power surge +7%.
Sugar lumps mature 7 minutes sooner.
Dropped by ichorpuff plants.": "The duration of Power poked and Power surge +7%.
Sugar lumps mature 7 minutes sooner.
Dropped by ichorpuff plants.", + "[Kaizo Upgrade replacement 495]Mouse over a wrinkler to see how long it would take for it to reach the big cookie or its progress to exploding.": "Mouse over a wrinkler to see how long it would take for it to reach the big cookie or its progress to exploding.", + "[Kaizo Upgrade replacement 537]You keep all flavored cookies or eggs of a season of your choice across ascensions.": "You keep all flavored cookies or eggs of a season of your choice across ascensions.", + "[Kaizo Upgrade replacement 562]Unlocks the Shimmering veil, which is a toggleable veil that protects you from exhaustion, preventing fatigue buildup and can temporarily reverse exhaustion. The veil is damaged over time.": "Unlocks the Shimmering veil, which is a toggleable veil that protects you from exhaustion, preventing fatigue buildup and can temporarily reverse exhaustion. The veil is damaged over time.", + "[Kaizo Upgrade replacement 592]Increases the Shimmering veil's maximum health by 35%.": "Increases the Shimmering veil's maximum health by 35%.", + "[Kaizo Upgrade replacement 640]The duration of Power poked and Power surge +10%.
": "The duration of Power poked and Power surge +10%.
", + "[Kaizo Upgrade replacement 645]Cookie production multiplier +10%.": "Cookie production multiplier +10%.", + "[Kaizo Upgrade replacement 650]Golden cookies give 3% more cookies.
Dragon harvest, Dragonflight, and Dragon's hoard are 10% stronger.
Cost scales with CpS, but 10 times cheaper with a fully-trained dragon.": "Golden cookies give 3% more cookies.
Dragon harvest, Dragonflight, and Dragon's hoard are 10% stronger.
Cost scales with CpS, but 10 times cheaper with a fully-trained dragon.", + "[Kaizo Upgrade replacement 651]Slotting auras no longer sacrifice any buildings.
Random drops are 3% more common.": "Slotting auras no longer sacrifice any buildings.
Random drops are 3% more common.", + "[Kaizo Upgrade replacement 801]The Shimmering veil takes 30% less time to recover from a collapse.": "The Shimmering veil takes 30% less time to recover from a collapse.", + "[Kaizo Upgrade replacement 802]Exhaustion recovery still occurs when the Shimmering veil is used, at 25% the speed.": "Exhaustion recovery still occurs when the Shimmering veil is used, at 25% the speed.", + "[Kaizo Upgrade replacement 803]The Shimmering Veil also decreases decay rates by 20% when turned on.": "The Shimmering Veil also decreases decay rates by 20% when turned on.", + "[Kaizo Upgrade replacement 805]You unleash 10% more prestige. Each big cookie click adds 0.005% onto the multiplier, and each wrinkler pop adds 0.25% onto the multiplier, for up to +100% in total.
Also unlocks the Jukebox, which allows you to play through every sound file in the game.": "You unleash 10% more prestige. Each big cookie click adds 0.005% onto the multiplier, and each wrinkler pop adds 0.25% onto the multiplier, for up to +100% in total.
Also unlocks the Jukebox, which allows you to play through every sound file in the game.", + + //achievement replacement + "[Kaizo Achievement replacement 79]Use the Elder Pledge to purify decay at least once.": "Use the Elder Pledge to purify decay at least once.", + "[Kaizo Achievement replacement 80]Use the Elder Pledge to purify decay 5 times in a run.": "Use the Elder Pledge to purify decay 5 times in a run.", + "[Kaizo Achievement replacement 82]Unlock the Elder Covenant.": "Unlock the Elder Covenant.", + "[Kaizo Achievement replacement 103]Purchase the Heavenly key, the portal to infinite power.": "Purchase the Heavenly key, the portal to infinite power.", + "[Kaizo Achievement replacement 262]Burst the especially insufferable shiny wrinkler.": "Burst the especially insufferable shiny wrinkler.", + "[Kaizo Achievement replacement 380]Have at least one copy of every species of plant (of any growth stage) in your garden simultaneously, then let a tick pass.": "Have at least one copy of every species of plant (of any growth stage) in your garden simultaneously, then let a tick pass.", + "[Kaizo Achievement replacement 432]Have your Sparkling wonder save your Shimmering veil from collapsing.": "Have your Sparkling wonder save your Shimmering veil from collapsing.", + "[Kaizo Achievement replacement 594]Start the Bingo researches by purchasing the research facility.": "Start the Bingo researches by purchasing the research facility.", + "[Kaizo Achievement replacement 598]Have at least 52 wrinklers on-screen simultaneously.
Obtaining this achievement also obliterates all wrinklers.": "Have at least 52 wrinklers on-screen simultaneously.
Obtaining this achievement also obliterates all wrinklers.", + + //dragon + "requires %1": "requires %1", + "You discovered a": "You discovered a", + "Dragon's hoard!": "Dragon's hoard!", + "Collecting treasures...": "Collecting treasures...", + "A batch of cookies!": "A batch of cookies!", + "A batch of biscuits!": "A batch of biscuits!", + "A mound of chocolate!": "A mound of chocolate!", + "A handful of cookie dough!": "A handful of cookie dough!", + "A bag of silver!": "A bag of silver!", + "A chest of bronze!": "A chest of bronze!", + "A pit of dragon scales!": "A pit of dragon scales!", + "A shiny stone!": "A shiny stone!", + "A chest of gold!": "A chest of gold!", + "A well of silver!": "A well of silver!", + "A pack of platinum!": "A pack of platinum!", + "A bakery's worth of cookies!": "A bakery's worth of cookies!", + "A bakery's worth of biscuit!": "A bakery's worth of biscuit!", + "A mountain of pure dark chocolate!": "A mountain of pure dark chocolate!", + "A canyon of pure white chocolate!": "A canyon of pure white chocolate!", + "A mound of cookie dough!": "A mound of cookie dough!", + "A dragon's blessing!": "A dragon's blessing!", + "A spring of fresh water!": "A spring of fresh water!", + "Iridescent opal!": "Iridescent opal!", + "Exquisite amber!": "Exquisite amber!", + "Flawless ruby!": "Flawless ruby!", + "Intricate jade!": "Intricate jade!", + "Vivid amethyst!": "Vivid amethyst!", + "Lustrous emerald!": "Lustrous emerald!", + "Brilliant sapphire!": "Brilliant sapphire!", + "Gleaming golden pearl!": "Gleaming golden pearl!", + "A whole room of gold!": "A whole room of gold!", + "A whole pool of platinum!": "A whole pool of platinum!", + "A wedding ring!": "A wedding ring!", + "A perfectly baked cookie!": "A perfectly baked cookie!", + "A perfect diamond!": "A perfect diamond!", + "A key to a mysterious vault!": "A key to a mysterious vault!", + "A map of other treasures!": "A map of other treasures!", + "A magnificant palace!": "A magnificant palace!", + "Clicking is 5% more powerful.
Click frenzy and Dragonflight is 50% more powerful.": "Clicking is 5% more powerful.
Click frenzy and Dragonflight is 50% more powerful.", + "Aura: greatly boosted Click frenzy & Dragonflight": "Aura: greatly boosted Click frenzy & Dragonflight", + "Golden cookies may trigger a Dragon Harvest.
Changes: increased trigger chance": "Golden cookies may trigger a Dragon Harvest.
Changes: increased trigger chance", + "Buildings sell back for 50% instead of 25%.
Selling buildings partially halts decay based on the square root of the amount of buildings sold.": "Buildings sell back for 50% instead of 25%.
Selling buildings partially halts decay based on the square root of the amount of buildings sold.", + "Aura: selling buildings halt decay": "Aura: selling buildings halt decay", + "Get 1% (multiplicative) closer to +60% golden cookie frequency for each x1.02 CpS multiplier from your purity.
(Note: this effect reduces the initial amount of time on Golden cookie click)": "Get 1% (multiplicative) closer to +60% golden cookie frequency for each x1.02 CpS multiplier from your purity.
(Note: this effect reduces the initial amount of time on Golden cookie click)", + "Aura: golden cookie frequency buff based on purity": "Aura: golden cookie frequency buff based on purity", + "While not purifying decay, you accumulate purification power that will be spent in the next purification; the banked purification power is kept even when this aura is off.": "While not purifying decay, you accumulate purification power that will be spent in the next purification; the banked purification power is kept even when this aura is off.", + "Aura: passively accumulate purification power": "Aura: passively accumulate purification power", + "+40% prestige level effect and potential.": "+40% prestige level effect and potential.", + "Aura: +40% prestige level effect and potential": "Aura: +40% prestige level effect and potential", + "Get 2.5% (multiplicative) closer to +125% Golden cookie frequency for each x0.9 CpS multiplier from your decay.
(Note: this effect reduces the initial amount of time on Golden cookie click)": "Get 2.5% (multiplicative) closer to +125% Golden cookie frequency for each x0.9 CpS multiplier from your decay.
(Note: this effect reduces the initial amount of time on Golden cookie click)", + "Aura: great golden cookie frequency buff based on decay": "Aura: great golden cookie frequency buff based on decay", + "Golden cookies may trigger a Dragonflight.
Changes: increased trigger chance scaling with the amount of golden cookie buffs existing, can never stack with Click frenzy": "Golden cookies may trigger a Dragonflight.
Changes: increased trigger chance scaling with the amount of golden cookie buffs existing, can never stack with Click frenzy", + "Golden cookies may trigger a Dragon's hoard.": "Golden cookies may trigger a Dragon's hoard.", + "Aura: golden cookies may trigger a Dragon's hoard": "Aura: golden cookies may trigger a Dragon's hoard", + "Elder frenzy from Wrath cookies appear 4x as often.": "Elder frenzy from Wrath cookies appear 4x as often.", + "Aura: 4x Elder frenzy chance from Wrath cookies": "Aura: 4x Elder frenzy chance from Wrath cookies", + "Having purity now makes positive buffs run out slower, for up to -50% buff duration decrease rate.": "Having purity now makes positive buffs run out slower, for up to -50% buff duration decrease rate.", + "Aura: purity decreases buff duration decrease rate": "Aura: purity decreases buff duration decrease rate", + "+123% CpS per golden cookie on-screen, multiplicative.
Each reflective blessing counts as one-thirds of a golden cookie.": "+123% CpS per golden cookie on-screen, multiplicative.
Each reflective blessing counts as one-thirds of a golden cookie.", + "Selling buildings has a 1 in 100,000 chance to summon a lump-carrying wrinkler per building sold.": "Selling buildings has a 1 in 100,000 chance to summon a lump-carrying wrinkler per building sold.", + "Aura: sell buildings to summon lump wrinklers": "Aura: sell buildings to summon lump wrinklers", + "Clicking on the big cookie knock back all wrinklers slightly, but excessive use in a short amount of time may lead to reduced effectiveness.": "Clicking on the big cookie knock back all wrinklers slightly, but excessive use in a short amount of time may lead to reduced effectiveness.", + "Aura: global wrinkler knockback on click": "Aura: global wrinkler knockback on click", + + //power clicks + "Prestige effect x%1 for %2!": "Prestige effect x%1 for %2!", + "The duration of Power poked and Power surge +%1%.": "The duration of Power poked and Power surge +%1%.", + "Power click base": "Power click base", + "Power clicks": "Power clicks", + "This is your power gauge, representing the amount of power clicks you have as well as the amount of power you will need to get to your next power click.": "This is your power gauge, representing the amount of power clicks you have as well as the amount of power you will need to get to your next power click.", + "Orb clicked!": "Orb clicked!", + "Boundless sack": "Boundless sack", + "Popping power orbs store a fraction of their power within this sack, and allows you to summon a power orb when filled.
Hotkey: Ctrl + B": "Popping power orbs store a fraction of their power within this sack, and allows you to summon a power orb when filled.
Hotkey: Ctrl + B", + "%1 out of %2 power orbs stored": "%1 out of %2 power orbs stored", + "Ready to release!": "Ready to release!", + + //unshackled decay + "Decay gains \"Acceleration\", an ever-increasing boost to decay propagation. Past x1.5 acceleration, acceleration also starts boosting the amount of halting methods required to halt by the same amount / 1.5.
Perform tasks in order to complete challenges and get rewards. You can find the list of challenges in the Stats menu during the challenge mode.": "Decay gains \"Acceleration\", an ever-increasing boost to decay propagation. Past x1.5 acceleration, acceleration also starts boosting the amount of halting methods required to halt by the same amount / 1.5.
Perform tasks in order to complete challenges and get rewards. You can find the list of challenges in the Stats menu during the challenge mode.", + "Challenge complete!": "Challenge complete!", + "challenge %1": "challenge %1", + "You completed challenge %1!": "You completed challenge %1!", + "Hide completed challenges": "Hide completed challenges", + "Show completed challenges": "Show completed challenges", + "Hide unfinished challenges": "Hide unfinished challenges", + "Show unfinished challenges": "Show unfinished challenges", + "Come back after getting some more heavenly upgrades! (Specifically, the Vial of challenges)": "Come back after getting some more heavenly upgrades! (Specifically, the Vial of challenges)", + "Challenges": "Challenges", + "Challenges completed:": "Challenges completed:", + "Highest cookies reached in Unshackled decay:": "Highest cookies reached in Unshackled decay:", + "Because you are not in the Unshackled decay challenge mode, you cannot complete any challenges. However, you can still view any unlocked challenges, and the rewards still work.": "Because you are not in the Unshackled decay challenge mode, you cannot complete any challenges. However, you can still view any unlocked challenges, and the rewards still work.", + "Because a conditional challenge is currently ongoing, you cannot complete any other challenges.": "Because a conditional challenge is currently ongoing, you cannot complete any other challenges.", + "Challenges with a circle in the middle indicates that it is a prerequisite to unlocking another challenge.": "Challenges with a circle in the middle indicates that it is a prerequisite to unlocking another challenge.", + "Normal challenges marked with red on the edges cannot be (or can no longer be) completed in this ascension due to the challenge's requirements.": "Normal challenges marked with red on the edges cannot be (or can no longer be) completed in this ascension due to the challenge's requirements.", + "Challenges that are not completed and highlighted with this color requires you to enable it at the beginning of the ascension. While one is active, no other challenges can be obtained.": "Challenges that are not completed and highlighted with this color requires you to enable it at the beginning of the ascension. While one is active, no other challenges can be obtained.", + "Challenges highlighted with this color (and with this color for challenges that require enabling when ascending) can be completed repeatedly; each completion gives you the reward stacking with previous completions, and simultaneously raises the requirement.": "Challenges highlighted with this color (and with this color for challenges that require enabling when ascending) can be completed repeatedly; each completion gives you the reward stacking with previous completions, and simultaneously raises the requirement.", + "Shift-click a completed challenge to disable or enable its reward.": "Shift-click a completed challenge to disable or enable its reward.", + "Choose a challenge to start your ascension with, or skip. If a challenge is chosen, you cannot complete any other challenges in the same ascension; the chosen challenge will be highlighted red in stats. To complete the challenges not shown here, click skip.": "Choose a challenge to start your ascension with, or skip. If a challenge is chosen, you cannot complete any other challenges in the same ascension; the chosen challenge will be highlighted red in stats. To complete the challenges not shown here, click skip.", + "Skip": "Skip", + "Bake %1 cookies this ascension.": "Bake %1 cookies this ascension.", + "Survive for %1.": "Survive for %1.", + "Bake %1 cookies this ascension, then keep it for %2.": "Bake %1 cookies this ascension, then keep it for %2.", + "Nothing (optional challenge)": "Nothing (optional challenge)", + "Get all Halloween cookies before acceleration reaches x1.55, or get all common (non-special) Easter eggs before acceleration reaches x1.6.": "Get all Halloween cookies before acceleration reaches x1.55, or get all common (non-special) Easter eggs before acceleration reaches x1.6.", + "You unleash +12% more prestige per Halloween or Christmas cookie": "You unleash +12% more prestige per Halloween or Christmas cookie", + "Random drop chance +25%": "Random drop chance +25%", + "Improved by challenge %1! +%2% more prestige unleashed!": "Improved by challenge %1! +%2% more prestige unleashed!", + "All eggs are +50% more common.": "All eggs are +50% more common.", + "Get all common (non-special) Easter eggs before acceleration reaches x1.55.": "Get all common (non-special) Easter eggs before acceleration reaches x1.55.", + "You unleash +5% more prestige per common Easter egg": "You unleash +5% more prestige per common Easter egg", + "You unleash +10% more prestige per rare Easter egg": "You unleash +10% more prestige per rare Easter egg", + "The Dragon Guts aura is always slotted.": "The Dragon Guts aura is always slotted.", + "Wrinklers spawn closer to the big cookie and moves faster.": "Wrinklers spawn closer to the big cookie and moves faster.", + "Your clicks halt decay 3 times faster.": "Your clicks halt decay 3 times faster.", + "Bake %1.": "Bake %1.", + "Switching your auras is free because you have the Dragon teddy bear.": "Switching your auras is free because you have the Dragon teddy bear.", + "Enchanted Permanent upgrade slot I": "Enchanted Permanent upgrade slot I", + "Enchanted Permanent upgrade slot II": "Enchanted Permanent upgrade slot II", + "Enchanted Permanent upgrade slot III": "Enchanted Permanent upgrade slot III", + "Enchanted Permanent upgrade slot IV": "Enchanted Permanent upgrade slot IV", + "Enchanted Permanent upgrade slot V": "Enchanted Permanent upgrade slot V", + "Bake %1 with no normal upgrades bought.": "Bake %1 with no normal upgrades bought.", + "Halved flavored cookie cost": "Halved flavored cookie cost", + "Activate the Elder Pledge in the first %1 of the run.": "Activate the Elder Pledge in the first %1 of the run.", + "The Memory capsule becomes free": "The Memory capsule becomes free", + "Research is twice as fast": "Research is twice as fast", + "Unlocks the Touch of force": "Unlocks the Touch of force", + "Reach a base CpS multiplier from purity of at least %1 with no spells casted.": "Reach a base CpS multiplier from purity of at least %1 with no spells casted.", + "CpS multiplier x%1 for each x2 CpS multiplier from your purity": "CpS multiplier x%1 for each x2 CpS multiplier from your purity", + "Clicking halts decay %1% faster": "Clicking halts decay %1% faster", + "Improves the Molten piercer to destroy wrinklers with one more layer": "Improves the Molten piercer to destroy wrinklers with one more layer", + "Reach the Elfling santa stage without ever spending any wrinkler souls.": "Reach the Elfling santa stage without ever spending any wrinkler souls.", + "The golden hat is 10 times cheaper": "The golden hat is 10 times cheaper", + "Wrinklers approach the big cookie %1 slower": "Wrinklers approach the big cookie %1 slower", + "Only buy every other building type, starting from Grandmas, and bake %1.": "Only buy every other building type, starting from Grandmas, and bake %1.", + "Bake %1 without popping any wrinklers.": "Bake %1 without popping any wrinklers.", + "Your clicks are %1 more effective against wrinklers": "Your clicks are %1 more effective against wrinklers", + "Bake %1 without ever having any purity or clicking any golden cookies.": "Bake %1 without ever having any purity or clicking any golden cookies.", + "Golden cookies are %1 more effective in purifying decay": "Golden cookies are %1 more effective in purifying decay", + "You gain %1 click power but also gains %2 required halt for each building you own. You cannot cast any spells.": "You gain %1 click power but also gains %2 required halt for each building you own. You cannot cast any spells.", + "Bake %1 cookies.": "Bake %1 cookies.", + "You regenerate worship swaps %1 times faster.": "You regenerate worship swaps %1 times faster.", + "You deal %1% more damage to power orbs.": "You deal %1% more damage to power orbs.", + "You start with the Shimmering veil turned on, but if the Shimmering veil collapses, force ascend. Having purity greatly heals the veil.": "You start with the Shimmering veil turned on, but if the Shimmering veil collapses, force ascend. Having purity greatly heals the veil.", + "While exhausted, wrinkler souls halt decay for 10% longer": "While exhausted, wrinkler souls halt decay for 10% longer", + "Reindeers spawn constantly, regardless of season, and massively amplify decay when clicked. Easy clicks and wrinklers are disabled.": "Reindeers spawn constantly, regardless of season, and massively amplify decay when clicked. Easy clicks and wrinklers are disabled.", + "Make %1 with no cookie clicks or wrinkler pops.": "Make %1 with no cookie clicks or wrinkler pops.", + "Bake %1, but the game is rotated 180 degrees clockwise. Some things may stop working. You can ascend by hitting ctrl+A in this mode.": "Bake %1, but the game is rotated 180 degrees clockwise. Some things may stop working. You can ascend by hitting ctrl+A in this mode.", + "Wrinklers have much more health, spawn much more often, and have a 50% chance to not drop souls, but wrinkler souls also give much more power and power orbs spawn much more frequently.": "Wrinklers have much more health, spawn much more often, and have a 50% chance to not drop souls, but wrinkler souls also give much more power and power orbs spawn much more frequently.", + "Power clicking wrinklers deal 25% more damage to all wrinklers": "Power clicking wrinklers deal 25% more damage to all wrinklers", + "You start each ascension with 1 power click worth of power and an Utenglobe filled with normal souls": "You start each ascension with 1 power click worth of power and an Utenglobe filled with normal souls", + "Milk is 10% more powerful.": "Milk is 10% more powerful.", + "Bake %1, but typing stuff is required to do most things. Type \"help\" to view the available actions. To compensate, decay is massively nerfed.": "Bake %1, but typing stuff is required to do most things. Type \"help\" to view the available actions. To compensate, decay is massively nerfed.", + "Unlocks more codes in the Script writer, accessible by typing the name of the leading programmer.": "Unlocks more codes in the Script writer, accessible by typing the name of the leading programmer.", + "View keywords": "View keywords", + "You can delete everything you've typed using the enter key.": "You can delete everything you've typed using the enter key.", + "Opens the help menu": "Opens the help menu", + "help": "help", + "Closes the menu": "Closes the menu", + "exit": "exit", + "Clicked!": "Clicked!", + "Clicks the big cookie": "Clicks the big cookie", + "click": "click", + "Buys or sells 1 of the corresponding building": "Buys or sells 1 of the corresponding building", + "[buy/sell] a [building name]": "[buy/sell] a [building name]", + "Buy or sell 10 of the corresponding building": "Buy or sell 10 of the corresponding building", + "[buy/sell] 10 [building name plural]": "[buy/sell] 10 [building name plural]", + "Buy or sell 100 of the corresponding building": "Buy or sell 100 of the corresponding building", + "[buy/sell] 100 [building name plural]": "[buy/sell] 100 [building name plural]", + "Couldn't buy upgrade": "Couldn't buy upgrade", + "Buy the upgrade": "Buy the upgrade", + "purchase [upgrade name]": "purchase [upgrade name]", + "Buy all upgrades": "Buy all upgrades", + "buy all upgrades": "buy all upgrades", + "Couldn't toggle switch": "Couldn't toggle switch", + "Toggles the switch": "Toggles the switch", + "toggle [switch name]": "toggle [switch name]", + "Scrolls the news ticker": "Scrolls the news ticker", + "flip to next page": "flip to next page", + "Opens/closes the stats menu
(typing is not required to open any other menus)": "Opens/closes the stats menu
(typing is not required to open any other menus)", + "open stats": "open stats", + "Ascends": "Ascends", + "confirm ascend": "confirm ascend", + "Pops a reindeer": "Pops a reindeer", + "ding ding reindeer begone": "ding ding reindeer begone", + "Clicks a golden or wrath cookie at that one third of the screen": "Clicks a golden or wrath cookie at that one third of the screen", + "pop [golden/wrath] cookie at [left/middle/right] section of screen": "pop [golden/wrath] cookie at [left/middle/right] section of screen", + "opens Santa, if available": "opens Santa, if available", + "open santa": "open santa", + "closes Santa": "closes Santa", + "close santa": "close santa", + "opens Krumblor, cookie dragon, if available": "opens Krumblor, cookie dragon, if available", + "open krumblor": "open krumblor", + "closes Krumblor, cookie dragon": "closes Krumblor, cookie dragon", + "close krumblor": "close krumblor", + "Santa leveling...": "Santa leveling...", + "if Santa is open, level up the santa": "if Santa is open, level up the santa", + "level up santa": "level up santa", + "Krumblor evolving...": "Krumblor evolving...", + "if Krumblor, cookie dragon is open, evolve it": "if Krumblor, cookie dragon is open, evolve it", + "evolve krumblor": "evolve krumblor", + "if possible, prompt to select first aura": "if possible, prompt to select first aura", + "open first aura for selection": "open first aura for selection", + "if possible, prompt to select second aura": "if possible, prompt to select second aura", + "open second aura for selection": "open second aura for selection", + "if on aura selection prompt, selects and confirms the aura": "if on aura selection prompt, selects and confirms the aura", + "slot [dragon aura name]": "slot [dragon aura name]", + "Closes all active notifications": "Closes all active notifications", + "close all notifications": "close all notifications", + "levels up the building": "levels up the building", + "using lumps level up [building name plural]": "using lumps level up [building name plural]", + "seven clicks on currently selected wrinkler": "seven clicks on currently selected wrinkler", + "pop": "pop", + "clicks on currently hovered over power orb": "clicks on currently hovered over power orb", + "pow": "pow", + "opens the minigame": "opens the minigame", + "view [minigame name]": "view [minigame name]", + "closes the minigame": "closes the minigame", + "close [minigame name]": "close [minigame name]", + "casts the spell in the Grimoire": "casts the spell in the Grimoire", + "cast [spell name]": "cast [spell name]", + "slots the corresponding god into the corresponding slot, or puts it back into the roster": "slots the corresponding god into the corresponding slot, or puts it back into the roster", + "slot [god primary name] to [diamond/ruby/jade/roster] slot
(primary name excludes the title, e.g. \"Mokalsium, Mother Spirit\" to \"mokalsium\")": "slot [god primary name] to [diamond/ruby/jade/roster] slot
(primary name excludes the title, e.g. \"Mokalsium, Mother Spirit\" to \"mokalsium\")", + "takes the loan in the Stock market, if available": "takes the loan in the Stock market, if available", + "take loan [loan number]": "take loan [loan number]", + "hires a broker in the Stock market": "hires a broker in the Stock market", + "hire a broker": "hire a broker", + "buys or sells that quantity of a goods in the Stock market": "buys or sells that quantity of a goods in the Stock market", + "stock [buy/sell] [1/10/100/max/all] of [the goods' proper name]": "stock [buy/sell] [1/10/100/max/all] of [the goods' proper name]", + "upgrades the office in the Stock market": "upgrades the office in the Stock market", + "upgrade your office": "upgrade your office", + "changes the tickspeed in the Stock market": "changes the tickspeed in the Stock market", + "change tickspeed": "change tickspeed", + "refills magic in the Grimoire using a sugar lump": "refills magic in the Grimoire using a sugar lump", + "refill magic": "refill magic", + "refills worship swaps in the Pantheon using a sugar lump": "refills worship swaps in the Pantheon using a sugar lump", + "refill worship swaps": "refill worship swaps", + "activates the sugar lump ability (not sacrifice garden) in the Garden": "activates the sugar lump ability (not sacrifice garden) in the Garden", + "supercharge garden": "supercharge garden", + "uses the garden tool as if clicking on it": "uses the garden tool as if clicking on it", + "garden use [garden tool name]": "garden use [garden tool name]", + "selects or unselects the seed corresponding to the plant, if possible": "selects or unselects the seed corresponding to the plant, if possible", + "select [garden plant name]": "select [garden plant name]", + "plants the currently selected seed on currently hovered over tile": "plants the currently selected seed on currently hovered over tile", + "plant": "plant", + "uproots the currently hovered over plant": "uproots the currently hovered over plant", + "uproot": "uproot", + "Bake %1, but power passively accumulates with speed scaling with current acceleration. In addition, the duration of Power surge buff decreases with acceleration. Upon reaching maximum power click capacity, force ascend.": "Bake %1, but power passively accumulates with speed scaling with current acceleration. In addition, the duration of Power surge buff decreases with acceleration. Upon reaching maximum power click capacity, force ascend.", + "Power poked duration +%1%.": "Power poked duration +%1%.", + "Power poked strength +%1%.": "Power poked strength +%1%.", + "You gain +%1% power.": "You gain +%1% power.", + "Fortunes appear %1 more often.": "Fortunes appear %1 more often.", + "Bake %1, but typing stuff is required to do most things. Type \"help\" to view the available actions.": "Bake %1, but typing stuff is required to do most things. Type \"help\" to view the available actions.", + "Get a Click frenzy in the first %1 of the run.": "Get a Click frenzy in the first %1 of the run.", + "(Note: Click frenzies cannot be gotten from naturally spawning Golden cookies or Wrath cookies in this mod)": "(Note: Click frenzies cannot be gotten from naturally spawning Golden cookies or Wrath cookies in this mod)", + "Click frenzy from Force the Hand of Fate Grimoire spell base chance %1 --> %2": "Click frenzy from Force the Hand of Fate Grimoire spell base chance %1 --> %2", + "A %1 %2 multiplier that gradually decreases with your current progress in a run": "A %1 %2 multiplier that gradually decreases with your current progress in a run", + "All mouse upgrades give %1% of CpS instead of 1%. You make %2 cookies each click by default.": "All mouse upgrades give %1% of CpS instead of 1%. You make %2 cookies each click by default.", + "Get a Click frenzy and a Frenzy (or any other golden cookie buff) active simultaneously in the first %1 of the run.": "Get a Click frenzy and a Frenzy (or any other golden cookie buff) active simultaneously in the first %1 of the run.", + "(does not contribute to future click power multiplier checks)": "(does not contribute to future click power multiplier checks)", + "Lucky day no longer resets on ascension": "Lucky day no longer resets on ascension", + "click power": "click power", + "(Currently: %1)": "(Currently: %1)", + "Get a direct click power multiplier of at least x%1 in the first %2 of the run.": "Get a direct click power multiplier of at least x%1 in the first %2 of the run.", + "Slotting gods in the Pantheon has a %1% chance to not use any worship swaps": "Slotting gods in the Pantheon has a %1% chance to not use any worship swaps", + "(note: there is no way to stack Click frenzy and Dragonflight in this mod)": "(note: there is no way to stack Click frenzy and Dragonflight in this mod)", + "Sacrificing the garden leaves the %1 seed in addition to Baker's Wheat": "Sacrificing the garden leaves the %1 seed in addition to Baker's Wheat", + "Unlocks the Power channel in your Utenglobe, converting souls into power at double the rates": "Unlocks the Power channel in your Utenglobe, converting souls into power at double the rates", + "Get a direct click power multiplier of at least x%1 with only one buff active, without Santa's helpers, while not having a Dragonflight, and without help from the Garden. Then, click a naturally spawning golden cookie with Reaper of Fields slotted. (while the click power requirement is met)": "Get a direct click power multiplier of at least x%1 with only one buff active, without Santa's helpers, while not having a Dragonflight, and without help from the Garden. Then, click a naturally spawning golden cookie with Reaper of Fields slotted. (while the click power requirement is met)", + "All dragon auras cost 50 less buildings to unlock": "All dragon auras cost 50 less buildings to unlock", + "Your dragon starts out hatched with the first aura unlocked": "Your dragon starts out hatched with the first aura unlocked", + "Obtain a direct click power multiplier of at least x%1 during a Frenzy in the first %2 of the run, without casting more than one spell, and with the Golden switch turned on.": "Obtain a direct click power multiplier of at least x%1 during a Frenzy in the first %2 of the run, without casting more than one spell, and with the Golden switch turned on.", + "The Golden switch is %1% cheaper": "The Golden switch is %1% cheaper", + "Each dragon aura only takes %1 buildings each to unlock.": "Each dragon aura only takes %1 buildings each to unlock.", + "Golden cookies have a high chance to grant Mini-frenzies, a distinct buff from regular Frenzies.": "Golden cookies have a high chance to grant Mini-frenzies, a distinct buff from regular Frenzies.", + "Click frenzies from Force the Hand of Fate are much more common.": "Click frenzies from Force the Hand of Fate are much more common.", + "Get at least %1 Golden cookie effects active at the same time in the first %2 of the run.": "Get at least %1 Golden cookie effects active at the same time in the first %2 of the run.", + "Chance to spawn a Golden cookie when selling with Dragon Orbs %1% --> %2%": "Chance to spawn a Golden cookie when selling with Dragon Orbs %1% --> %2%", + "Evolving your dragon no longer consume buildings": "Evolving your dragon no longer consume buildings", + "three": "three", + "You keep Trigger fingers and Non-euclidean baking trays across ascensions": "You keep Trigger fingers and Non-euclidean baking trays across ascensions", + "Speed baking IV": "Speed baking IV", + "Get a CpS multiplier from buffs of at least x%1 and a direct click power multiplier of at least x%2 simultaneously, in the first %3 of the run": "Get a CpS multiplier from buffs of at least x%1 and a direct click power multiplier of at least x%2 simultaneously, in the first %3 of the run", + "%1 and %2": "%1 and %2", + "Get %1 distinct Golden cookie effects active at once": "Get %1 distinct Golden cookie effects active at once", + "Script writer code to purify decay by an especially large amount": "Script writer code to purify decay by an especially large amount", + "Unlocks a Elder Covenant mode to allow the strength stacking of Frenzy.": "Unlocks a Elder Covenant mode to allow the strength stacking of Frenzy.", + "Get any golden cookie buff to be at least %1 long.": "Get any golden cookie buff to be at least %1 long.", + "Get %1 of any buffs active simultaneously.": "Get %1 of any buffs active simultaneously.", + "Dragon Orbs can ignore up to 1 buff when attempting to spawn a Golden cookie.": "Dragon Orbs can ignore up to 1 buff when attempting to spawn a Golden cookie.", + "Click frenzy from Force the Hand of Fate chance +%1%": "Click frenzy from Force the Hand of Fate chance +%1%", + "Get a Click Frenzy of at least %1 long.": "Get a Click Frenzy of at least %1 long.", + "Chance of Click Frenzy from Force the Hand of Fate is massively increased and magic regeneration is faster. Gambler's Fever dream cannot be used. You cannot refill minigames with sugar lumps.": "Chance of Click Frenzy from Force the Hand of Fate is massively increased and magic regeneration is faster. Gambler's Fever dream cannot be used. You cannot refill minigames with sugar lumps.", + "Get another Click frenzy while a Click frenzy is ongoing.": "Get another Click frenzy while a Click frenzy is ongoing.", + "Valentine's cookies are between 2x and 5x stronger": "Valentine's cookies are between 2x and 5x stronger", + "Get hint": "Get hint", + "Each exhaustion lasts 15% shorter": "Each exhaustion lasts 15% shorter", + "While having no purity and is not coagulated, decay rates -25%.": "While having no purity and is not coagulated, decay rates -25%.", + "By selling wizard towers at the right moment, you can cast Force the Hand of Fate twice in a row.": "By selling wizard towers at the right moment, you can cast Force the Hand of Fate twice in a row.", + "You start with an acceleration of x%1.": "You start with an acceleration of x%1.", + "Stack a Frenzy, Dragon Harvest, and a Click frenzy, then gain at least +200% purity and at least %1 cookies.": "Stack a Frenzy, Dragon Harvest, and a Click frenzy, then gain at least +200% purity and at least %1 cookies.", + "Unlocks a Elder Covenant mode to allow the strength stacking of Dragon Harvest.": "Unlocks a Elder Covenant mode to allow the strength stacking of Dragon Harvest.", + "Each research upgrade gives an additional +%1% CpS.": "Each research upgrade gives an additional +%1% CpS.", + "With less than %1x acceleration, increase decay by %2 times over the course of an Elder Pledge purification.": "With less than %1x acceleration, increase decay by %2 times over the course of an Elder Pledge purification.", + "With Challenge %1 completed: +%2% CpS": "With Challenge %1 completed: +%2% CpS", + "The required halt increase from acceleration starts immediately instead of at x1.5.": "The required halt increase from acceleration starts immediately instead of at x1.5.", + "All halting methods are %1% stronger.": "All halting methods are %1% stronger.", + "The Earth Shatterer aura halts decay for 10% longer": "The Earth Shatterer aura halts decay for 10% longer", + "You get +1% CpS for each flavored cookie you have": "You get +1% CpS for each flavored cookie you have", + "The game becomes very weird.": "The game becomes very weird.", + "Augments are adjusted, but every available augment becomes free.
Refill cooldowns are three times as short.
You start with only Baker's wheat and Meddleweed, and sacrifice the garden by getting every seed. (Your seeds outside of this challenge will be restored when you leave this challenge)": "Augments are adjusted, but every available augment becomes free.
Refill cooldowns are three times as short.
You start with only Baker's wheat and Meddleweed, and sacrifice the garden by getting every seed. (Your seeds outside of this challenge will be restored when you leave this challenge)", + "CpS +20% permanently per sacrifice, for up to +80%": "CpS +20% permanently per sacrifice, for up to +80%", + "Corresponding boost in the glucose furnace if you have not sacrificed the garden before": "Corresponding boost in the glucose furnace if you have not sacrificed the garden before", + "Marbledpuree": "Marbledpuree", + "Polargurt": "Polargurt", + "Improved by challenge %1!": "Improved by challenge %1!", + "Rhodorange": "Rhodorange", + "Eldersite": "Eldersite", + "Malachilla": "Malachilla", + "Celestough": "Celestough", + "Chocosidian": "Chocosidian", + "No souls to pull!": "No souls to pull!", + "Protocol No escape activated!": "Protocol No escape activated!", + "Souls slowed!": "Souls slowed!", + "Wrinkler soul deceleration for %1!": "Wrinkler soul deceleration for %1!", + "Prestige maximally escalated!": "Prestige maximally escalated!", + "Scroll activated!": "Scroll activated!", + "Prestige escalating in progress...": "Prestige escalating in progress...", + "Prestige escalation complete!": "Prestige escalation complete!", + "Current cumulative effects: +%1% prestige unleashed": "Current cumulative effects: +%1% prestige unleashed", + "Cooldown refreshed!": "Cooldown refreshed!", + "Your Scroll of prestige escalation is ready to use again!": "Your Scroll of prestige escalation is ready to use again!", + "Not enough souls!": "Not enough souls!", + "The scroll is not on cooldown!": "The scroll is not on cooldown!", + "Production of most advanced building +%1% for %2!": "Production of most advanced building +%1% for %2!", + "Click damage against wrinklers +%1% for %2!": "Click damage against wrinklers +%1% for %2!", + "wrinkler damage x%1!": "wrinkler damage x%1!", + "Souls pulled: %1": "Souls pulled: %1", + "Phantom tethers activated!": "Phantom tethers activated!", + "Enhanced clicks": "Enhanced clicks", + "Clicks halt decay and build up fatigue %1x faster for %2!": "Clicks halt decay and build up fatigue %1x faster for %2!", + "Invalid input!": "Invalid input!", + "\"%1\" is not a valid spin amount!": "\"%1\" is not a valid spin amount!", + + "[Kaizo Upgrade name 0]Golden sugar": "Golden sugar", + "[Kaizo Upgrade name 1]Cursedor": "Cursedor", + "[Kaizo Upgrade name 2]Cursedor [inactive]": "Cursedor [inactive]", + "[Kaizo Upgrade name 3]Cursedor [active]": "Cursedor [active]", + "[Kaizo Upgrade name 4]The ultimate cookie": "The ultimate cookie", + "[Kaizo Upgrade name 5]Purity vaccines": "Purity vaccines", + "[Kaizo Upgrade name 6]Unshackled Purity": "Unshackled Purity", + "[Kaizo Upgrade name 7]Unshackled Elder Pledge": "Unshackled Elder Pledge", + "[Kaizo Upgrade name 8]Uranium rolling pins": "Uranium rolling pins", + "[Kaizo Upgrade name 9]Sparkling wonder": "Sparkling wonder", + "[Kaizo Upgrade name 10]Withering prices": "Withering prices", + "[Kaizo Upgrade name 11]Caramelized luxury": "Caramelized luxury", + "[Kaizo Upgrade name 12]Meaty disgust": "Meaty disgust", + "[Kaizo Upgrade name 13]High-fructose sugar lumps": "High-fructose sugar lumps", + "[Kaizo Upgrade name 14]Rainy day lumps": "Rainy day lumps", + "[Kaizo Upgrade name 15]Purification domes": "Purification domes", + "[Kaizo Upgrade name 16]Decayed cookie": "Decayed cookie", + "[Kaizo Upgrade name 17]Weekly finger-cutting": "Weekly finger-cutting", + "[Kaizo Upgrade name 18]Concentrated workplace": "Concentrated workplace", + "[Kaizo Upgrade name 19]Everything repellant": "Everything repellant", + "[Kaizo Upgrade name 20]Improved resting condition": "Improved resting condition", + "[Kaizo Upgrade name 21]Unified production lines": "Unified production lines", + "[Kaizo Upgrade name 22]Sensible policies": "Sensible policies", + "[Kaizo Upgrade name 23]Morals": "Morals", + "[Kaizo Upgrade name 24]Reduced babbling": "Reduced babbling", + "[Kaizo Upgrade name 25]No more engines": "No more engines", + "[Kaizo Upgrade name 26]Lab-free alchemy": "Lab-free alchemy", + "[Kaizo Upgrade name 27]Anti-anti-gravity-anti-matter": "Anti-anti-gravity-anti-matter", + "[Kaizo Upgrade name 28]The present": "The present", + "[Kaizo Upgrade name 29]Matter conversion": "Matter conversion", + "[Kaizo Upgrade name 30]-1st electron layer": "-1st electron layer", + "[Kaizo Upgrade name 31]Quantum tunneling": "Quantum tunneling", + "[Kaizo Upgrade name 32]0.00000000001": "0.00000000001", + "[Kaizo Upgrade name 33]Restarts": "Restarts", + "[Kaizo Upgrade name 34]Going bowling": "Going bowling", + "[Kaizo Upgrade name 35]A nice walk outside": "A nice walk outside", + "[Kaizo Upgrade name 36]Me": "Me", + "[Kaizo Upgrade name 37]Ultra-concentrated sweetener": "Ultra-concentrated sweetener", + "[Kaizo Upgrade name 38]Lumpy evolution": "Lumpy evolution", + "[Kaizo Upgrade name 39]Wrinkler ambergris": "Wrinkler ambergris", + "[Kaizo Upgrade name 40]Kitten janitors": "Kitten janitors", + "[Kaizo Upgrade name 41]Script writer": "Script writer", + "[Kaizo Upgrade name 42]Bakery": "Bakery", + "[Kaizo Upgrade name 43]Cookie selector": "Cookie selector", + "[Kaizo Upgrade name 44]Enchanted Permanent upgrade slot I": "Enchanted Permanent upgrade slot I", + "[Kaizo Upgrade name 45]Enchanted Permanent upgrade slot II": "Enchanted Permanent upgrade slot II", + "[Kaizo Upgrade name 46]Enchanted Permanent upgrade slot III": "Enchanted Permanent upgrade slot III", + "[Kaizo Upgrade name 47]Enchanted Permanent upgrade slot IV": "Enchanted Permanent upgrade slot IV", + "[Kaizo Upgrade name 48]Enchanted Permanent upgrade slot V": "Enchanted Permanent upgrade slot V", + "[Kaizo Upgrade name 49]Market manipulator": "Market manipulator", + "[Kaizo Upgrade name 50]Illustrium fingernails": "Illustrium fingernails", + "[Kaizo Upgrade name 51]Vegetable-oiled joints": "Vegetable-oiled joints", + "[Kaizo Upgrade name 52]Ultraviolet obliteration": "Ultraviolet obliteration", + "[Kaizo Upgrade name 53]Method acting": "Method acting", + "[Kaizo Upgrade name 54]Sinister glint": "Sinister glint", + "[Kaizo Upgrade name 55]Future clicks": "Future clicks", + "[Kaizo Upgrade name 56]Shanzhai glucosium": "Shanzhai glucosium", + "[Kaizo Upgrade name 57]Vial of challenges": "Vial of challenges", + "[Kaizo Upgrade name 58]Box of challenges": "Box of challenges", + "[Kaizo Upgrade name 59]Truck of challenges": "Truck of challenges", + "[Kaizo Upgrade name 60]Shell breaker": "Shell breaker", + "[Kaizo Upgrade name 61]Liquidating touch": "Liquidating touch", + "[Kaizo Upgrade name 62]Carbon disintegration": "Carbon disintegration", + "[Kaizo Upgrade name 63]Rare earths": "Rare earths", + "[Kaizo Upgrade name 64]Holy glow": "Holy glow", + "[Kaizo Upgrade name 65]Click flurry": "Click flurry", + "[Kaizo Upgrade name 66]Lunar flares": "Lunar flares", + "[Kaizo Upgrade name 67]Touch of nature": "Touch of nature", + "[Kaizo Upgrade name 68]Chance encounter": "Chance encounter", + "[Kaizo Upgrade name 69]Lucky radar": "Lucky radar", + "[Kaizo Upgrade name 70]Shimmering encapsulation": "Shimmering encapsulation", + "[Kaizo Upgrade name 71]Immense flow": "Immense flow", + "[Kaizo Upgrade name 72]Muscle relaxant": "Muscle relaxant", + "[Kaizo Upgrade name 73]Trigger fingers": "Trigger fingers", + "[Kaizo Upgrade name 74]Non-euclidean baking trays": "Non-euclidean baking trays", + "[Kaizo Upgrade name 75]Santaic doom": "Santaic doom", + "[Kaizo Upgrade name 76]Memory capsule": "Memory capsule", + "[Kaizo Upgrade name 77]Carpal miniaturization": "Carpal miniaturization", + "[Kaizo Upgrade name 78]Permanent residence": "Permanent residence", + "[Kaizo Upgrade name 79]Rooftop botanies": "Rooftop botanies", + "[Kaizo Upgrade name 80]Collapsing extraction": "Collapsing extraction", + "[Kaizo Upgrade name 81]Sub-minimum wages": "Sub-minimum wages", + "[Kaizo Upgrade name 82]Starter funds": "Starter funds", + "[Kaizo Upgrade name 83]Saints of the world": "Saints of the world", + "[Kaizo Upgrade name 84]Magic": "Magic", + "[Kaizo Upgrade name 85]Hyperspeed railguns": "Hyperspeed railguns", + "[Kaizo Upgrade name 86]100% organic hyper-catalysts": "100% organic hyper-catalysts", + "[Kaizo Upgrade name 87]At home": "At home", + "[Kaizo Upgrade name 88]Future heist": "Future heist", + "[Kaizo Upgrade name 89]The medicore force": "The medicore force", + "[Kaizo Upgrade name 90]Blackbody indigestion": "Blackbody indigestion", + "[Kaizo Upgrade name 91]Ordinary beginner's luck": "Ordinary beginner's luck", + "[Kaizo Upgrade name 92]Enlarging rays": "Enlarging rays", + "[Kaizo Upgrade name 93]Clean code": "Clean code", + "[Kaizo Upgrade name 94]Buy-one-get-one-free universes": "Buy-one-get-one-free universes", + "[Kaizo Upgrade name 95]Puberty": "Puberty", + "[Kaizo Upgrade name 96]Brotherhood": "Brotherhood", + "[Kaizo Upgrade name 97]Wrinkly balls": "Wrinkly balls", + "[Kaizo Upgrade name 98]Santaic zoom": "Santaic zoom", + "[Kaizo Upgrade name 99]Rift to the beyond": "Rift to the beyond", + "[Kaizo Upgrade name 100]Molten piercer": "Molten piercer", + "[Kaizo Upgrade name 101]Bazillion fingers": "Bazillion fingers", + "[Kaizo Upgrade name 102]Rolling pin pins": "Rolling pin pins", + "[Kaizo Upgrade name 103]A very special watering can": "A very special watering can", + "[Kaizo Upgrade name 104]Labor at all costs": "Labor at all costs", + "[Kaizo Upgrade name 105]Intensive manufacturers": "Intensive manufacturers", + "[Kaizo Upgrade name 106]ChStTh-onk": "ChStTh-onk", + "[Kaizo Upgrade name 107]Bodily worships": "Bodily worships", + "[Kaizo Upgrade name 108]Unscientific science": "Unscientific science", + "[Kaizo Upgrade name 109]Green engines": "Green engines", + "[Kaizo Upgrade name 110]Cerebral transmutations": "Cerebral transmutations", + "[Kaizo Upgrade name 111]Trans-dimensional conveyor": "Trans-dimensional conveyor", + "[Kaizo Upgrade name 112]Dilated time": "Dilated time", + "[Kaizo Upgrade name 113]Parity vacuums": "Parity vacuums", + "[Kaizo Upgrade name 114]Echo chambers": "Echo chambers", + "[Kaizo Upgrade name 115]A 9.007 quadrillion sided die": "A 9.007 quadrillion sided die", + "[Kaizo Upgrade name 116]Systematic rescaling": "Systematic rescaling", + "[Kaizo Upgrade name 117]Frameworks": "Frameworks", + "[Kaizo Upgrade name 118]The universal shredder": "The universal shredder", + "[Kaizo Upgrade name 119]An actual central nervous system in the center": "An actual central nervous system in the center", + "[Kaizo Upgrade name 120]Integrated entertainment": "Integrated entertainment", + "[Kaizo Upgrade name 121]Blessed monuments": "Blessed monuments", + "[Kaizo Upgrade name 122]Paint of proof": "Paint of proof", + "[Kaizo Upgrade name 123]Integrated alloys": "Integrated alloys", + "[Kaizo Upgrade name 124]Stabilizing crystal": "Stabilizing crystal", + "[Kaizo Upgrade name 125]Poky fingers": "Poky fingers", + "[Kaizo Upgrade name 126]Niceness": "Niceness", + "[Kaizo Upgrade name 127]Special \"water\"": "Special \"water\"", + "[Kaizo Upgrade name 128]Increased work hours": "Increased work hours", + "[Kaizo Upgrade name 129]Infant labour": "Infant labour", + "[Kaizo Upgrade name 130]Dedollarization": "Dedollarization", + "[Kaizo Upgrade name 131]Goodbye declaration": "Goodbye declaration", + "[Kaizo Upgrade name 132]Level 9 spellbooks": "Level 9 spellbooks", + "[Kaizo Upgrade name 133]Chocolate nebulae": "Chocolate nebulae", + "[Kaizo Upgrade name 134]Ag+": "Ag+", + "[Kaizo Upgrade name 135]Robot visitors": "Robot visitors", + "[Kaizo Upgrade name 136]Memory": "Memory", + "[Kaizo Upgrade name 137]Anti-condensers": "Anti-condensers", + "[Kaizo Upgrade name 138]Tesseract": "Tesseract", + "[Kaizo Upgrade name 139]Luck balancer": "Luck balancer", + "[Kaizo Upgrade name 140]Mandatory meta reference": "Mandatory meta reference", + "[Kaizo Upgrade name 141]ReferenceError": "ReferenceError", + "[Kaizo Upgrade name 142]Defunct waffle shops": "Defunct waffle shops", + "[Kaizo Upgrade name 143]Sound business decisions": "Sound business decisions", + "[Kaizo Upgrade name 144]Caste system": "Caste system", + "[Kaizo Upgrade name 145]Chocolate nail polish": "Chocolate nail polish", + "[Kaizo Upgrade name 146]Body ovens": "Body ovens", + "[Kaizo Upgrade name 147]Semi-permeable ground": "Semi-permeable ground", + "[Kaizo Upgrade name 148]Diamond pickaxes": "Diamond pickaxes", + "[Kaizo Upgrade name 149]Specialty managers": "Specialty managers", + "[Kaizo Upgrade name 150]Post-mortal debt": "Post-mortal debt", + "[Kaizo Upgrade name 151]Loudspeakers": "Loudspeakers", + "[Kaizo Upgrade name 152]Taller towers": "Taller towers", + "[Kaizo Upgrade name 153]Rooms at the back": "Rooms at the back", + "[Kaizo Upgrade name 154]Crystal chemistry": "Crystal chemistry", + "[Kaizo Upgrade name 155]The other side of the portal": "The other side of the portal", + "[Kaizo Upgrade name 156]The fourth hand": "The fourth hand", + "[Kaizo Upgrade name 157]The C Boson": "The C Boson", + "[Kaizo Upgrade name 158]Interference filters": "Interference filters", + "[Kaizo Upgrade name 159]One-sided die": "One-sided die", + "[Kaizo Upgrade name 160]Glasses": "Glasses", + "[Kaizo Upgrade name 161]CookieOS": "CookieOS", + "[Kaizo Upgrade name 162]Milkfalls": "Milkfalls", + "[Kaizo Upgrade name 163]Satellite brains": "Satellite brains", + "[Kaizo Upgrade name 164]Performance enhancing drugs": "Performance enhancing drugs", + "[Kaizo Upgrade name 165]A golden hat": "A golden hat", + "[Kaizo Upgrade name 166]Soul compression": "Soul compression", + "[Kaizo Upgrade name 167]Weightlessness": "Weightlessness", + "[Kaizo Upgrade name 168]Thunder marker": "Thunder marker", + "[Kaizo Upgrade name 169]Purity chips": "Purity chips", + "[Kaizo Upgrade name 170]Purity stand": "Purity stand", + "[Kaizo Upgrade name 171]Purity bakery": "Purity bakery", + "[Kaizo Upgrade name 172]Purity factory": "Purity factory", + "[Kaizo Upgrade name 173]Purity key": "Purity key", + "[Kaizo Upgrade name 174]Blessings of the starfall": "Blessings of the starfall", + "[Kaizo Upgrade name 175]Scroll of no escape": "Scroll of no escape", + "[Kaizo Upgrade name 176]Scroll of no escape": "Scroll of no escape", + "[Kaizo Upgrade name 177]Scroll of prestige escalation": "Scroll of prestige escalation", + "[Kaizo Upgrade name 178]Scroll of prestige escalation": "Scroll of prestige escalation", + "[Kaizo Upgrade name 179]Scroll of opportune power": "Scroll of opportune power", + "[Kaizo Upgrade name 180]Scroll of opportune power": "Scroll of opportune power", + "[Kaizo Upgrade name 181]Phantom clicks": "Phantom clicks", + "[Kaizo Upgrade name 182]Scroll of prestige unbound": "Scroll of prestige unbound", + "[Kaizo Upgrade name 183]Scroll of prestige unbound": "Scroll of prestige unbound", + "[Kaizo Upgrade name 184]Mangled cookies": "Mangled cookies", + "[Kaizo Upgrade name 185]Eternal light": "Eternal light", + "[Kaizo Upgrade name 186]Ancient shiny busters": "Ancient shiny busters", + "[Kaizo Upgrade name 187]Mana-enhanced magic": "Mana-enhanced magic", + "[Kaizo Upgrade name 188]Sugar burning": "Sugar burning", + "[Kaizo Upgrade name 189]Pulsatic discharge": "Pulsatic discharge", + "[Kaizo Upgrade name 190]Rebound boost": "Rebound boost", + "[Kaizo Upgrade name 191]Counter strike": "Counter strike", + "[Kaizo Upgrade name 192]Withering shock": "Withering shock", + "[Kaizo Upgrade name 193]Back in a flash": "Back in a flash", + "[Kaizo Upgrade name 194]Box of kittens": "Box of kittens", + "[Kaizo Upgrade name 195]Confused kitten": "Confused kitten", + "[Kaizo Upgrade name 196]Tiny kitten": "Tiny kitten", + "[Kaizo Upgrade name 197]Negative kitten": "Negative kitten", + "[Kaizo Upgrade name 198]Scroll of phantom tethers": "Scroll of phantom tethers", + "[Kaizo Upgrade name 199]Scroll of phantom tethers": "Scroll of phantom tethers", + "[Kaizo Upgrade name 200]Voyager": "Voyager", + "[Kaizo Upgrade name 201]Your first idea": "Your first idea", + "[Kaizo Upgrade name 202]Scroll of charged clicks": "Scroll of charged clicks", + "[Kaizo Upgrade name 203]Scroll of charged clicks": "Scroll of charged clicks", + "[Kaizo Upgrade name 204]Polar power": "Polar power", + "[Kaizo Upgrade name 205]The autobiography": "The autobiography", + "[Kaizo Upgrade name 206]Scroll of sustained distance": "Scroll of sustained distance", + "[Kaizo Upgrade name 207]Scroll of sustained distance": "Scroll of sustained distance", + "[Kaizo Upgrade name 208]Traveler's soulbound scroll pouch": "Traveler's soulbound scroll pouch", + "[Kaizo Upgrade name 209]Heavenly soulbound scroll bag": "Heavenly soulbound scroll bag", + "[Kaizo Upgrade name 210]Undying soulbound scroll backpack": "Undying soulbound scroll backpack", + "[Kaizo Upgrade name 211]Transcendental soulbound scroll pocket dimension": "Transcendental soulbound scroll pocket dimension", + "[Kaizo Upgrade name 212]Scroll of favored resurrection": "Scroll of favored resurrection", + "[Kaizo Upgrade name 213]Scroll of space shift": "Scroll of space shift", + "[Kaizo Upgrade name 214]Finger sharpening": "Finger sharpening", + "[Kaizo Upgrade name 215]Elder fancies": "Elder fancies", + "[Kaizo Upgrade name 216]Cosmic harvests": "Cosmic harvests", + "[Kaizo Upgrade name 217]The reality liquid": "The reality liquid", + "[Kaizo Upgrade name 218]Factory factory": "Factory factory", + "[Kaizo Upgrade name 219]Inherited fortunes": "Inherited fortunes", + "[Kaizo Upgrade name 220]In the clouds": "In the clouds", + "[Kaizo Upgrade name 221]Solar focus": "Solar focus", + "[Kaizo Upgrade name 222]Highway of light": "Highway of light", + "[Kaizo Upgrade name 223]Golden cookie mining": "Golden cookie mining", + "[Kaizo Upgrade name 224]Space fractures": "Space fractures", + "[Kaizo Upgrade name 225]The everman": "The everman", + "[Kaizo Upgrade name 226]Photoids": "Photoids", + "[Kaizo Upgrade name 227]The end of the Highway of light": "The end of the Highway of light", + "[Kaizo Upgrade name 228]Quantum chancemakers": "Quantum chancemakers", + "[Kaizo Upgrade name 229]Enlargement": "Enlargement", + "[Kaizo Upgrade name 230]The marker": "The marker", + "[Kaizo Upgrade name 231]This universe": "This universe", + "[Kaizo Upgrade name 232]Examples": "Examples", + "[Kaizo Upgrade name 233]Awakened power": "Awakened power", + "[Kaizo Achievement name 0]You gotta start somewhere": "You gotta start somewhere", + "[Kaizo Achievement name 1]+110% purity is a lot": "+110% purity is a lot", + "[Kaizo Achievement name 2]Half life 1.8 CONFIRMED": "Half life 1.8 CONFIRMED", + "[Kaizo Achievement name 3]P4M: Purified 4 Mines": "P4M: Purified 4 Mines", + "[Kaizo Achievement name 4]5-dimensional Purification Punch": "5-dimensional Purification Punch", + "[Kaizo Achievement name 5]We couldn't afford a 4.5": "We couldn't afford a 4.5", + "[Kaizo Achievement name 6]Not a luck-related achievement": "Not a luck-related achievement", + "[Kaizo Achievement name 7]90 degrees to NaN": "90 degrees to NaN", + "[Kaizo Achievement name 8]To a better world": "To a better world", + "[Kaizo Achievement name 9]Consistency obtained": "Consistency obtained", + "[Kaizo Achievement name 10]Gravity of the situation": "Gravity of the situation", + "[Kaizo Achievement name 11]The old days were better": "The old days were better", + "[Kaizo Achievement name 12]Pretty close to infinity": "Pretty close to infinity", + "[Kaizo Achievement name 13]As bright as a hypernova": "As bright as a hypernova", + "[Kaizo Achievement name 14]Pure skill": "Pure skill", + "[Kaizo Achievement name 15]In filtration": "In filtration", + "[Kaizo Achievement name 16]var decay = undefined": "var decay = undefined", + "[Kaizo Achievement name 17]Third-universe idleverses": "Third-universe idleverses", + "[Kaizo Achievement name 18]Innocence": "Innocence", + "[Kaizo Achievement name 19]Self remade": "Self remade", + "[Kaizo Achievement name 20]Weak grail material": "Weak grail material", + "[Kaizo Achievement name 21]Morale boost": "Morale boost", + "[Kaizo Achievement name 22]Glimmering hope": "Glimmering hope", + "[Kaizo Achievement name 23]Saving grace": "Saving grace", + "[Kaizo Achievement name 24]Last chance": "Last chance", + "[Kaizo Achievement name 25]Ultimate death": "Ultimate death", + "[Kaizo Achievement name 26]Magmaball effect": "Magmaball effect", + "[Kaizo Achievement name 27]Fast (but you wish it wasn't)": "Fast (but you wish it wasn't)", + "[Kaizo Achievement name 28]Unstoppable": "Unstoppable", + "[Kaizo Achievement name 29]Calcium overflow": "Calcium overflow", + "[Kaizo Achievement name 30]First contact": "First contact", + "[Kaizo Achievement name 31]Better, faster, stronger": "Better, faster, stronger", + "[Kaizo Achievement name 32]The olympiad": "The olympiad", + "[Kaizo Achievement name 33]Godhood": "Godhood", + "[Kaizo Achievement name 34]Getting a taste of what's to come": "Getting a taste of what's to come", + "[Kaizo Achievement name 35]All boxed up": "All boxed up", + "[Kaizo Achievement name 36]Esoteric world traveler": "Esoteric world traveler", + "[Kaizo Achievement name 37]Practice makes perfect": "Practice makes perfect", + "[Kaizo Achievement name 38]Total mastery": "Total mastery", + "[Kaizo Achievement name 39]Corrupted and tainted": "Corrupted and tainted", + "[Kaizo Achievement name 40]A light reward": "A light reward", + "[Kaizo Achievement name 41]Extracts of the cursed": "Extracts of the cursed", + "[Kaizo Achievement name 42]Energy of the unseen": "Energy of the unseen", + "[Kaizo Achievement name 43]Humanity of the impure": "Humanity of the impure", + "[Kaizo Achievement name 44]Possibility of the bonded": "Possibility of the bonded", + "[Kaizo Achievement name 45]Finality of the unrest": "Finality of the unrest", + "[Kaizo Achievement name 46]A new era of purity": "A new era of purity", + "[Kaizo Achievement name 47]Suffering in nobility": "Suffering in nobility", + "[Kaizo Achievement name 48]Golden escalation": "Golden escalation", + "[Kaizo Achievement name 49]Greatness unfolding over millenia, without a reason, without an end": "Greatness unfolding over millenia, without a reason, without an end", + "[Kaizo Achievement name 50]Undead terrorism": "Undead terrorism", + "[Kaizo Achievement name 51]Way to soulflow": "Way to soulflow", + "[Kaizo Achievement name 52]Mass x velocity": "Mass x velocity", + "[Kaizo Achievement name 53]Unnatural resistance": "Unnatural resistance", + "[Kaizo Achievement name 54]Speed baking IV": "Speed baking IV", + "[Kaizo Achievement name 55]Fleshmangler": "Fleshmangler", + "[Kaizo Achievement name 56]Horrorsubduer": "Horrorsubduer", + "[Kaizo Achievement name 57]The red wire": "The red wire", + "[Kaizo Achievement name 58]Innocence farmer": "Innocence farmer", + "[Kaizo Achievement name 59]Mass reindeer duplication": "Mass reindeer duplication", + + //grimoire + "Liquify Politician": "Liquify Politician", + "Purifies a lot of decay with a very high purity limit, but the purity limit is halved for every golden cookie effect active.": "Purifies a lot of decay with a very high purity limit, but the purity limit is halved for every golden cookie effect active.", + "Amplifies your decay.": "Amplifies your decay.", + "Corruption cleared!": "Corruption cleared!", + "Backfire! Corruption intensified!": "Backfire! Corruption intensified!", + "Manifest Spring": "Manifest Spring", + "Decay propagation is %1% slower for the next %2 minutes.
(this stacks with itself multiplicatively)": "Decay propagation is %1% slower for the next %2 minutes.
(this stacks with itself multiplicatively)", + "Decay propagation is %1% faster for the next %2 minutes.": "Decay propagation is %1% faster for the next %2 minutes.", + "The water shall flow!": "The water shall flow!", + "Oops! Pipes broken!": "Oops! Pipes broken!", + "Unending flow": "Unending flow", + "Halts decay for an especially long time. (each use is considered a distinct method)": "Halts decay for an especially long time. (each use is considered a distinct method)", + "Stagnant body": "Stagnant body", + "Decay propagation rate +%1% for %2!": "Decay propagation rate +%1% for %2!", + "unlock %1": "unlock %1", + "Cost to unlock:": "Cost to unlock:", + "Magic regen multiplier from %1: %2": "Magic regen multiplier from %1: %2", + "The spell picks a random building that you have at least 1 of, and gives you five of them for free that also doesn't affect its current price.": "The spell picks a random building that you have at least 1 of, and gives you five of them for free that also doesn't affect its current price.", + "Can give up to %1 free buildings for each building type.": "Can give up to %1 free buildings for each building type.", + "Lose one of every building.": "Lose one of every building.", + "One of every single one of your buildings disappear in a puff of smoke!": "One of every single one of your buildings disappear in a puff of smoke!", + "Spells cast: %1 (total: %2; cross-legacies total: %3)": "Spells cast: %1 (total: %2; cross-legacies total: %3)", + "Summon a golden cookie with high chance (100%) to yield Click frenzy. Each existing golden cookie makes this spell +%1% more likely to backfire.": "Summon a golden cookie with high chance (100%) to yield Click frenzy. Each existing golden cookie makes this spell +%1% more likely to backfire.", + "Each golden cookie buff active reduces the chance of clicking buffs.": "Each golden cookie buff active reduces the chance of clicking buffs.", + "Obtaining this achievement also makes the second part of challenge reward %1 twice as powerful.": "Obtaining this achievement also makes the second part of challenge reward %1 twice as powerful.", + "Summons a power orb if there aren't any currently present, and continuously attracts every present power orb to your mouse for the next %1 seconds.": "Summons a power orb if there aren't any currently present, and continuously attracts every present power orb to your mouse for the next %1 seconds.", + "Continuously heals and speeds up every present power orb for the next %1 seconds.": "Continuously heals and speeds up every present power orb for the next %1 seconds.", + "Come, power orbs! Come!": "Come, power orbs! Come!", + "Better luck next time...": "Better luck next time...", + "Bending Power orbs to your will.": "Bending Power orbs to your will.", + "Those Power orbs are quite a headache...": "Those Power orbs are quite a headache...", + "Power clicks not yet unlocked!": "Power clicks not yet unlocked!", + "+%1% prestige level effect for %2.": "+%1% prestige level effect for %2.", + "Trigger a %1-minute coagulation and lose %2% of your cookies owned.": "Trigger a %1-minute coagulation and lose %2% of your cookies owned.", + "Holify Abomination": "Holify Abomination", + "Obliterate the biggest wrinkler without any negative effects or losing any cookies, and automatically stores its soul if possible.": "Obliterate the biggest wrinkler without any negative effects or losing any cookies, and automatically stores its soul if possible.", + "Summons a shiny wrinkler.": "Summons a shiny wrinkler.", + "Wrinkler obliteration in progress...": "Wrinkler obliteration in progress...", + "But the shiny wrinkler couldn't fit.": "But the shiny wrinkler couldn't fit.", + "Beware of the beast!": "Beware of the beast!", + "The current ongoing challenge forbids you from using this spell!": "The current ongoing challenge forbids you from using this spell!", + "Summons a crafty pixie to predict good luck on your next cast, then refunds all magic used. Will guarantee success as long as the next cast casts a spell with the same backfire chance as this one, and that the next spell is casted in the same ascension.
A successful prediction cannot be changed without casting another spell or ascending.": "Summons a crafty pixie to predict good luck on your next cast, then refunds all magic used. Will guarantee success as long as the next cast casts a spell with the same backfire chance as this one, and that the next spell is casted in the same ascension.
A successful prediction cannot be changed without casting another spell or ascending.", + "Uses up the magic spent without predicting anything.": "Uses up the magic spent without predicting anything.", + "Great news! Next spell will not backfire!": "Great news! Next spell will not backfire!", + "Summoning failed!": "Summoning failed!", + + //garden + "plants age %1 times faster": "plants age %1 times faster", + "Mature plants harvested: %1 (total: %2 (%3))": "Mature plants harvested: %1 (total: %2 (%3))", + "Click to plant %1.": "Click to plant %1.", + "all decay-halting sources' effect": "all decay-halting sources' effect", + "wrath cookies replacement": "wrath cookies replacement", + "wrinklers approach speed": "wrinklers approach speed", + "decay-halting power": "decay-halting power", + "decay rates": "decay rates", + "decay momentum": "decay momentum", + "decay propagation": "decay propagation", + "harvest when mature to temporarily halt decay": "harvest when mature to temporarily halt decay", + "harvest when mature to purify decay": "harvest when mature to purify decay", + "explodes and temporarily halts decay at the end of its lifecycle": "explodes and temporarily halts decay at the end of its lifecycle", + "explodes and purifies decay at the end of its lifecycle": "explodes and purifies decay at the end of its lifecycle", + "if there are no golden cookies onscreen, summons a reflective blessing on mature harvest": "if there are no golden cookies onscreen, summons a reflective blessing on mature harvest", + "harvest when mature to damage and knock back all wrinklers": "harvest when mature to damage and knock back all wrinklers", + "harvest when mature to recover %1 worth of exhaustion": "harvest when mature to recover %1 worth of exhaustion", + "magic regeneration speed": "magic regeneration speed", + "harvest when mature to completely stop decay for a maximum of %1": "harvest when mature to completely stop decay for a maximum of %1", + "harvest when mature to purify all decay": "harvest when mature to purify all decay", + "Click to open the garden augmentation menu.": "Click to open the garden augmentation menu.", + "%1 cooldown after triggering an augment": "%1 cooldown after triggering an augment", + "Trigger augment": "Trigger augment", + "Triggering any augment automatically refills your soil timer; however, they have a shared cooldown of %1 on use.": "Triggering any augment automatically refills your soil timer; however, they have a shared cooldown of %1 on use.", + "Click to trigger %1 plant growth tick with x%2 spread and mutation rate.": "Click to trigger %1 plant growth tick with x%2 spread and mutation rate.", + "Click to trigger %1 plant growth ticks at once with x%2 spread and mutation rate.": "Click to trigger %1 plant growth ticks at once with x%2 spread and mutation rate.", + "Click to trigger 1 plant growth tick with a guaranteed mutation on every tile that can have a mutation.": "Click to trigger 1 plant growth tick with a guaranteed mutation on every tile that can have a mutation.", + + //pantheon + "Requires %1!": "Requires %1!", + "unlock god": "unlock god", + "Note: this effect stacks in strength with multiple sells.": "Note: this effect stacks in strength with multiple sells.", + "While this spirit is slotted, you cannot switch seasons.": "While this spirit is slotted, you cannot switch seasons.", + "Clicks halt decay %1% faster.": "Clicks halt decay %1% faster.", + "You build up fatigue %1% faster.": "You build up fatigue %1% faster.", + "Wrinkler move -%1% as fast.": "Wrinkler move -%1% as fast.", + "Wrath cookies replaces Golden cookies with %1% less decay.": "Wrath cookies replaces Golden cookies with %1% less decay.", + "Purifying decay grants a buff.": "Purifying decay grants a buff.", + "-%1% decay for %2 seconds.": "-%1% decay for %2 seconds.", + "Purifying decay grants a buff that weakens decay propagation.": "Purifying decay grants a buff that weakens decay propagation.", + "Decay propagation rate -%1%.": "Decay propagation rate -%1%.", + "Sugar lump-carrying wrinklers appear %1x more often.": "Sugar lump-carrying wrinklers appear %1x more often.", + "Golden and wrath cookie gain +%1%.": "Golden and wrath cookie gain +%1%.", + "Input to modify the tick speed.": "Input to modify the tick speed.", + "(Minimum: %1 per tick)": "(Minimum: %1 per tick)", + + "Before you start...": "Before you start...", + "Kaizo Cookies uses a different save slot than vanilla cookie clicker for your convenience. This means that:": "Kaizo Cookies uses a different save slot than vanilla cookie clicker for your convenience. This means that:", + "Once you confirm this prompt, you will be placed into a fresh save, but your original save remains untouched and can be accessed at any time by simply unloading the mod.": "Once you confirm this prompt, you will be placed into a fresh save, but your original save remains untouched and can be accessed at any time by simply unloading the mod.", + "You can unload the mod by %1.": "You can unload the mod by %1.", + "removing the mod from your modlist and restarting the game": "removing the mod from your modlist and restarting the game", + "Your Kaizo cookies save will reappear if the mod is loaded again on the same website, and this prompt will not appear again. Changing (or even wiping) the original save or the Kaizo cookies save have no effect on the other.": "Your Kaizo cookies save will reappear if the mod is loaded again on the same website, and this prompt will not appear again. Changing (or even wiping) the original save or the Kaizo cookies save have no effect on the other.", + "simply reloading, and removing it from your mod list if you are using a mod manager": "simply reloading, and removing it from your mod list if you are using a mod manager", + "If you wish to play on your Kaizo save while simultaneously having your main save open, you can open two tabs of your game, then loading the mod on one; or alternatively, you can use a different site to host your Kaizo cookies save, such as cookieclicker.eu or cdn.dashnet.org.": "If you wish to play on your Kaizo save while simultaneously having your main save open, you can open two tabs of your game, then loading the mod on one; or alternatively, you can use a different site to host your Kaizo cookies save, such as cookieclicker.eu or cdn.dashnet.org.", + "Because this is a content mod, you will start again from scratch, and your original progress will not carry into your new save.": "Because this is a content mod, you will start again from scratch, and your original progress will not carry into your new save.", + "While you may export and import your main save into the new save, doing so is highly discouraged, is cheating, and will likely heavily break the game.": "While you may export and import your main save into the new save, doing so is highly discouraged, is cheating, and will likely heavily break the game.", + "Once you\'ve read and understood the above, click Let\'s go! to start playing. Enjoy!": "Once you\'ve read and understood the above, click Let\'s go! to start playing. Enjoy!", + "Let's go!": "Let's go!", + "Nevermind": "Nevermind", + "Time Slow": "Time Slow", + "Hold %1": "Hold %1", + "x%1": "x%1", + "Stronger time slow": "Stronger time slow", + "Makes time slow multiplier to game speed 0.4 instead of 0.5.": "Makes time slow multiplier to game speed 0.4 instead of 0.5.", + "Shift + Z": "Shift + Z", + "Hold to click!": "Hold to click!", + + "Allows you to slot an awakened scroll.": "Allows you to slot an awakened scroll.", + "Can slot purified scrolls.": "Can slot purified scrolls.", + "Pick an awakened scroll to activate": "Pick an awakened scroll to activate", + "Select a scroll by clicking on its box.": "Select a scroll by clicking on its box.", + "You don't have any scrolls unlocked.": "You don't have any scrolls unlocked.", + "Refreshes cooldown of Scroll of prestige escalation": "Refreshes cooldown of Scroll of prestige escalation", + "Already slotted in the %1!" : "Already slotted in the %1!", + "Each big cookie click counts as 2 clicks for all upgrades that unlock based on click count.": "Each big cookie click counts as 2 clicks for all upgrades that unlock based on click count.", + "Type \"%1\" to make your next click summon a weakened wrinkler with at least one special trait at the mouse.": "Type \"%1\" to make your next click summon a weakened wrinkler with at least one special trait at the mouse.", + "Summon weakened special wrinklers": "Summon weakened special wrinklers", + "Wrinkler summoned!": "Wrinkler summoned!", + "It was a %1!": "It was a %1!", + "shiny": "shiny", + "bomber": "bomber", + "phantom": "phantom", + "Scroll activation halted": "Scroll activation halted", + "There is already an ongoing resurrection!": "There is already an ongoing resurrection!", + "Fetching assets...": "Fetching assets...", + "Time slow toggle mode": "Time slow toggle mode", + "Changes the behavior of the ctrl key on time slowing; if on, ctrl toggles time slow, else time is only slowed while holding it": "Changes the behavior of the ctrl key on time slowing; if on, ctrl toggles time slow, else time is only slowed while holding it", + "Kaizo Cookies load error": "Kaizo Cookies load error", + "There was an error while loading your Kaizo Cookies save. Please open the developer console, screenshot the contents, export the save below, and report it at the discord server, then CLOSE THE GAME. DO NOT SAVE UNDER ANY CIRCUMSTANCE UNTIL THE ISSUE IS FIXED.": "There was an error while loading your Kaizo Cookies save. Please open the developer console, screenshot the contents, export the save below, and report it at the discord server, then CLOSE THE GAME. DO NOT SAVE UNDER ANY CIRCUMSTANCE UNTIL THE ISSUE IS FIXED.", + "Upgrades a new tier of building price scaling pushback upgrades.": "Upgrades a new tier of building price scaling pushback upgrades.", + "It\'s raining shiny souls for %1!": "It\'s raining shiny souls for %1!", + "Hint: use the %1 aura!": "Hint: use the %1 aura!", + "DECAYED": "DECAYED", + "Decay broken!": "Decay broken!", + "Abandon the current run; you will not ascend, you will lose your current progress, but you will keep anything ascending normally keeps.": "Abandon the current run; you will not ascend, you will lose your current progress, but you will keep anything ascending normally keeps.", + "sacrifice %1": "sacrifice %1", + "Summon reindeer frenzy": "Summon reindeer frenzy", + "It seems that there\'s nothing here.": "It seems that there\'s nothing here.", + "Quick scrolls": "Quick scrolls", + "Allows you to use a panel to activate each scroll without typing in anything.": "Allows you to use a panel to activate each scroll without typing in anything.", + "Classic layout": "Classic layout", + "Restores the old look of the game, with the big cookie to the left and buildings in the middle.": "Restores the old look of the game, with the big cookie to the left and buildings in the middle.", + "Want the old looks back?": "Want the old looks back?", + "To restore the game\'s layout to how it was without any mods, go to the \"options\" menu and turn on \"Classic layout\", or click me!": "To restore the game\'s layout to how it was without any mods, go to the \"options\" menu and turn on \"Classic layout\", or click me!", + "Not yet halted": "Not yet halted", + "%1 refreshed!": "%1 refreshed!", + "Claiming the scroll refreshed its cooldown!": "Claiming the scroll refreshed its cooldown!", + "Phantom essences used:": "Phantom essences used:", + "all time: ": "all time: ", + "Total: %1": "Total: %1", + "+%1%!": "+%1%!", + "Each big cookie click has a %1% chance to halt decay %2x more.": "Each big cookie click has a %1% chance to halt decay %2x more.", + "Haggler\'s dream": "Haggler\'s dream", + "Sugar boost": "Sugar boost", + "Soul storm": "Soul storm", + "Cursed": "Cursed", + "Coagulated": "Coagulated", + "Distorted": "Distorted", + "Storm of creation": "Storm of creation", + "Smited": "Smited", + "Pure suppression": "Pure suppression", + "Trick or treat": "Trick or treat", + "Unending flow": "Unending flow", + "Stagnant body": "Stagnant body", + "Power poked": "Power poked", + "Power surge": "Power surge", + "Mini frenzy": "Mini frenzy", + "Reversed momentum": "Reversed momentum", + "Rebound boost": "Rebound boost", + "Counter strike": "Counter strike", + "Enhanced clicks": "Enhanced clicks", + "The effect cap of Caramelized luxury is increased to +%1%, but each sugar lump obtained past the previous cap only gives %2% as much cps.": "The effect cap of Caramelized luxury is increased to +%1%, but each sugar lump obtained past the previous cap only gives %2% as much cps.", + "Decay reached -%1%!": "Decay reached -%1%!", + "Type \"%1\" to swap the positions of the next two wrinklers clicked.": "Type \"%1\" to swap the positions of the next two wrinklers clicked.", + "Swaps wrinkler positions": "Swaps wrinkler positions", + "Wrinkler marked!": "Wrinkler marked!", + "Click another wrinkler to swap.": "Click another wrinkler to swap.", + "Wrinklers swapped!": "Wrinklers swapped!" +}); + +//plan for new lines to translate: +//add to corresponding place +//use code to filter out ones that need translating +//slot back in idk diff --git a/locPatches/ZH-CN_patch.js b/locPatches/ZH-CN_patch.js new file mode 100644 index 0000000..9514905 --- /dev/null +++ b/locPatches/ZH-CN_patch.js @@ -0,0 +1,1516 @@ +kaizoCookies.patchLanguage('ZH-CN', 'chinese', { + "Incorrect loading order!": "加载顺序错误!", + "Please restart the game, and load Crumbs Engine before Kaizo cookies.": "请重启游戏,并在加载极限烘培(Kaizo cookies)前先加载Crumbs Engine。", + "%1 failed to load!": "%1 加载失败!", + "Please contact the developers about it. (find in info menu)": "请就此问题联系开发者。(可在信息菜单中找到)", + "Too soon!": "太快了!", + "On cooldown (%1s left)": "冷却中(剩余 %1 秒)", + "GAME PAUSED": "游戏已暂停", + "(Shift + C to pause or unpause)": "(Shift + C 暂停或取消暂停)", + "Prerequisite mod not yet loaded!": "前置模组尚未加载!", + "You cannot pause the game yet, as P for Pause has not yet been loaded. If this continues, check your internet connection.": "您尚无法暂停游戏,因为暂停功能(P for Pause)尚未加载。如果持续如此,请检查您的网络连接。", + "It looks like you weren't there, so your game was paused automatically!": "检测到您可能不在,游戏已自动暂停!", + "Assist option; shortcuts: Shift+C OR Shift+P": "辅助选项;快捷键:Shift+C 或 Shift+P", + "Pause": "暂停", + "Unpause": "取消暂停", + "Times paused: ": "暂停次数:", + "Fatigue warning (%1%)": "疲倦警告 (%1%)", + "Exhausted! (%1s)": "疲惫! (%1秒)", + "Refreshed!": "恢复精神!", + "Times exhausted:": "疲惫次数:", + "Exhaustion time remaining:": "剩余疲惫时间:", + "paused": "已暂停", + "Infinite decay": "无限衰变", + "Your game was wiped due to infinite decay!": "您的游戏因无限衰变而被重置!", + "Excess decay caused a forced ascension without gaining any prestige or heavenly chips.": "过量的衰变导致了一次强制飞升,且未获得任何威望或天堂碎片。", + "Game automatically paused": "游戏已自动暂停", + "Go to the options menu or use the hotkey (Shift + P or Shift + C) to toggle pausing.": "请前往选项菜单或使用热键(Shift + P 或 Shift + C)来切换暂停状态。", + "Mobile notice": "移动设备提示", + "If you are currently using a phone to play Kaizo cookies, we强烈建议您使用横屏模式(长边在下)。": "如果您正在使用手机游玩Kaizo cookies,我们强烈建议您使用横屏模式(长边在下)。", + "Decay": "衰变量", + "Purity": "纯净量", + "decay": "衰变", + "purity": "纯净", + "You have just reached infinite decay, which would have caused a forced ascension with no heavenly chips gained, effectively wiping all progress made in this run.
Luckily, reaching infinite decay for the first time earned you an achievement that purified all of your decay, giving you another chance. Use it well!": "您刚刚达到了无限衰变,这原本会导致一次强制飞升且无法获得任何天堂碎片, effectively wiping all progress made in this run.
幸运的是,首次达到无限衰变为您赢得了一个成就,该成就净化了您所有的衰变,给了您又一次机会。请好好利用它!", + "Due to aging and corruption in your facilities, CpS continuously decreases over time. You can temporarily stop it from decreasing with certain actions, such as clicking the big cookie": "由于设施的老化和腐化,CpS会随时间持续降低。您可以通过特定操作(例如点击大饼干)来暂时阻止其下降。", + "REMOVED": "已移除", + "Achievements": "成就", + "If you can purify all of your decay, any extra purification power will be spent as an increase in CpS. The extra CpS (called \"purity\") acts as a sacrificial buffer for the decay; however, the more purity you have, the more halting power will be needed to stop it, shown by increasing the number on the right side of the slash, below your CpS display.": "如果您能净化所有衰变,任何额外的净化力量将转化为CpS的提升。额外的CpS(称为“纯净量”)充当衰变的牺牲缓冲;然而,您拥有的纯净量越多,阻止它所需的衰停力量就越多,这体现在您CpS显示下方斜杠右侧数字的增加。", + "Wrinklers now spawn passively and do very bad things upon reaching the big cookie. Luckily, if you manage to pop them, you get to extract their souls which you can offer to the big cookie by dragging or flinging them into it, temporarily stopping decay.": "饼干虫现在会被动生成,并在到达大饼干时造成非常坏的影响。幸运的是,如果您成功击破了它们,您可以提取它们的虫魂,通过拖拽或投掷将其献祭给大饼干,从而暂时停止衰变。", + "Wrinklers": "饼干虫", + "Wrath cookies now replace Golden cookies according to the amount of decay you have when it spawns; the more decay you have, the more often that Wraths replace Golden cookies. Luckily, it still purifies decay the same way as Golden cookies do.": "愤怒饼干现在会根据其生成时您拥有的衰变量来替换黄金饼干;您的衰变量越多,愤怒饼干替换黄金饼干的频率就越高。幸运的是,它仍以与黄金饼干相同的方式净化衰变。", + "Wrath cookies": "愤怒饼干", + "The Grandmapocalypse, in the vanilla sense, no longer exists.": "原版意义上的祖母末世已不复存在。", + "Grandmapocalypse": "祖母末世", + "The decay gets stronger as you progress through the game, but you also obtain more items to help you fight it as the game goes on.": "随着游戏进程,衰变会变得更强,但您也会获得更多物品来帮助您对抗它。", + "decay: the return": "衰变:回归", + "HIDDEN": "隐藏", + "Shimmering Veil": "闪烁面纱", + "Buffs under decay": "衰变下的增益效果", + "Buff stacking": "增益效果叠加", + "Notice: Force the Hand of Fate has its pool modified and have elder frenzy removed. Planners may not be accurate.": "注意:命运之手(Force the Hand of Fate)的池已被修改,并移除了长老狂热。规划器可能不准确。", + "Force the Hand of Fate": "命运之手", + "All methods of purification have a hard limit on how much purity they can apply. This limit varies per the method.
(Telling you this because you just reached a purity limit!)": "所有净化方法所能施加的纯净量都有硬性上限。此限制因方法而异。
(告知您此信息是因为您刚刚达到了一个纯净量上限!)", + "Purity limit": "纯净量上限", + "Building size": "建筑大小", + "Your decay has grown so powerful that it has begun to create a force of its own, called momentum. Momentum steadily grows over time and provides a boost to required halting power, like having purity but without the decay rates boost. Unstoppable by most methods, you must use great souls conjured in the newly-unlocked \"conjure\" tab in your Utenglobe to reverse its progress. To progress past this point, you would definitely have to start doing challenges in the box of challenges.
Also, some descriptions may have been changed to include momentum!": "您的衰变已变得如此强大,以至于开始产生一种自身的力量,称为动量(Momentum)。动量随时间稳定增长,并提升所需的衰停力量,类似于拥有纯净量但不会提升衰变率。大多数方法无法阻止它,您必须使用在乌滕球(Utenglobe)中新解锁的“召唤(conjure)”标签页中召唤出的伟大灵魂(Great Souls)来逆转其进程。要突破此阶段,您肯定需要开始在挑战盒(box of challenges)中进行挑战。
此外,一些描述可能已更改以包含动量!", + "Decay momentum": "衰变动量", + "Some upgrades decrease your decay, but not all decreases decrease the same thing! There are three main ways:
\"Decay rate\" - The amount of decay that gets generated per second
\"Decay momentum\" - The decay momentum, which increases the decay rate if the decay is left uninterrupted (requires a few quintillion cookies baked all time to unlock)
\"Decay propagation\" - Decay rates AND decay momentum": "一些升级会减少您的衰变,但并非所有减少都针对同一事物!主要有三种方式:
“衰变率” - 每秒产生的衰变量
“衰变动量” - 衰变动量,如果衰变未被中断,它会增加衰变率(需要解锁条件:累计烘焙达到数京(quintillion)饼干)
“衰变传播” - 衰变率和衰变动量", + "Purity boosts": "纯净量提升", + "Autoclickers": "自动点击器", + "The garden has been changed dramatically, mostly including buffs that make it stronger and getting or growing plants faster or more convenient.": "花园已被大幅修改,主要包括使其更强大的增益效果,以及更快或更方便地获得或种植植物。", + "The garden": "花园", + "Momentum not only increases your rate of decay, but also makes methods that normally stop it less effective! There's really no way around it - if you got this much momentum, the only way to recover control is to keep clicking the cookie or popping wrinklers until it dies down.": "动量不仅增加您的衰变率,还会使通常阻止它的方法效果降低!确实没有捷径可走——如果您积累了如此多的动量,恢复控制的唯一方法就是持续点击饼干或击破饼干虫,直到动量减弱。", + "Too much momentum": "动量过多", + "Pesudo-naturals": "伪自然", + "Momentum unlock": "动量解锁", + "No, these are not 1 in 10,000 in this mod.": "不,这些在该模组中不再是万分之一概率。", + "Shiny wrinklers": "发光虫", + "Reindeers": "驯鹿", + "Cookie storm drops": "饼干风暴掉落", + "Decay halting overtime": "随时间衰减的衰停效果", + "You can click them to damage them, but an easier way is to press space while hovering over them. Easy clicks and easy wrinklers are disabled while you can perform a power click.": "您可以点击它们来造成伤害,但更简单的方法是将鼠标悬停在它们上方时按空格键。当您可以执行强击时,轻松点击和轻松饼干虫功能会被禁用。", + "Power orbs": "力量法球", + "Dragonflight!": "龙之军团!", + "IRRELEVANT": "无关", + "Godzamok reminder": "格斯马克提醒", + "The lethargy of the left background and the general dimming indicates fatigue, and once exhaustion sets in, you will need to find other ways (such as via wrinkler souls) to halt decay.
(also, if you are using an op autoclicker, you should stop now; clicking faster also makes you accumulate fatigue faster.)": "左侧背景的迟滞感和整体变暗表示疲倦,一旦陷入疲惫,您将需要寻找其他方法(例如通过饼干虫魂)来停止衰变。
(另外,如果您正在使用高性能自动点击器,您现在应该停止;点击越快也会使您积累疲倦的速度越快。)", + "Click fatigue & exhaustion": "点击疲倦与疲惫", + "Prestige degradation": "威望衰减", + "If you haven't already, you might want to reread the description of the Legacy heavenly upgrade (the very first one and the prerequisite to all other heavenly upgrades) - it has been changed.": "如果您还没有,您可能需要重读遗产天堂升级(第一个天堂升级,也是所有其他天堂升级的前提)的描述——它已被更改。", + "Breaking point": "临界点", + "Wrinkler decay amplification": "饼干虫衰变放大", + "Free souls dissipates after enough time.": "游离的虫魂在一段时间后会消散。", + "Wrinkler soul expiry": "饼干虫魂过期", + "A new pet has been unlocked! Check the bottom left of the game.": "已解锁一个新宠物!请查看游戏左下角。", + "Friendly reminder": "友好提醒", + "Acceleration past x1.5 also increases decay gain like purity does, but is not as powerful as purity.": "加速值超过x1.5后也会像纯净量一样增加衰变获取量,但效果不如纯净量强。", + "Acceleration on halting": "衰停时的加速", + "The challenges in this mod doesn't just serve as changes in gameplay, they also sometimes teach you certain vital game mechanics! Because of this, some of the challenges can be a little puzzly; if you find yourself not knowing what to do, you can check the rewards of the challenges; the rewards will usually have something to do with the solution to the challenge.": "此模组中的挑战不仅服务于游戏玩法的改变,它们有时还会教您某些至关重要的游戏机制!因此,一些挑战可能有点谜题性质;如果您发现自己不知道该怎么做,可以查看挑战的奖励;奖励通常与解决挑战的方法有关。", + "Decay challenges": "衰变挑战", + "What you just performed is a combo, and also the simplest one. They are very, very good.": "您刚才执行的是一个组合技(combo),也是最简单的一种。组合技是一种非常强大的做饼干的策略。", + "Combos": "效果组合", + "Bombers explode after eating on the big cookie for a while. They might be actually very useful for you.
(if you are not up for the puzzle or can't figure it out, go to the options menu and invoke the \"Bomber hint\" notification!)": "自爆虫(Bombers)在啃食大饼干一段时间后会爆炸。它们实际上可能对您非常有用。
(如果您不想解这个谜题或无法弄清楚,请前往选项菜单并触发“自爆虫提示”通知!)", + "Bombers": "自爆虫", + "Bombers move much faster with less health, and explodes upon reaching the big cookie, inflicting coagulated and cursed, and distorted for 30 seconds which continuously spawns low-health bombers. All bombers spawned still grants souls, but can be popped very easily.": "自爆虫移动速度更快,生命值更低,并在到达大饼干时爆炸,施加凝结、诅咒和空间扭曲效果持续30秒,期间会持续生成低生命值的自爆虫。所有生成的自爆虫仍然会给予虫魂,但可以非常容易地被击破。", + "Bomber hint": "自爆虫提示", + "Look into the options menu for accessibility options (especially if you play on a touchpad), the ability to pause the game, and to replay these informational notifications!": "请在选项菜单中查看辅助功能选项(特别是如果您在触摸板上游玩)、暂停游戏的能力以及重新播放这些信息通知的功!", + "Options": "选项", + "Clicking Golden or Wrath cookies can purify decay, essentially reversing its effects.": "点击黄金或愤怒饼干可以净化衰变, essentially reversing its effects.", + "Purification": "净化", + "Remember that, since you still haven't ascended, you can ascend! If all things seem hopeless, you can convert your current cookies to prestige and get a faster next run.": "请记住,既然您还没有飞升,您是能够飞升的!如果一切似乎都无望,您可以将您当前的饼干转化为威望,并获得更快的下一轮游戏。", + "Hmmm...": "嗯...", + "After some time has elapsed since the start of an ascension, the effective cookie count dictating difficulty will start to steadily increase, eventually reaching up to a small portion of your cookies baked all time - if you haven't reached that already.
If ramping is currently inflating the difficulty, you can see the exact cookie count your game is using to calculate decay-based mechanics in the stats menu.": "从一次飞升开始经过一段时间后,决定难度的有效饼干数量将开始稳步增加,最终达到您累计烘焙饼干总量的一小部分——如果您尚未达到该总量的话。
如果难度攀升当前正在加剧难度,您可以在统计菜单中查看游戏用于计算基于衰变的机制的确切饼干数量。", + "Difficulty ramping": "难度攀升", + "Drag them over the center of big cookie for a few seconds to collect them.": "将它们拖到大饼干中心上方几秒钟以收集它们。", + "Sugar lumps": "糖块", + "Release a soul OVER them to briefly render them vulnerable to attacks!": "在它们上方释放一个虫魂,使其短暂地易受攻击!", + "Phantom wrinklers": "幻影虫", + "Entangle a wrinkler by dropping one of those on them. The area of effect becomes bigger if the target is also a phantom wrinkler.": "通过将其中一个(幻影精华)丢在它们身上来纠缠一个饼干虫。如果目标也是幻影虫,则效果范围会变大。", + "Phantom essences": "幻影精华", + "Momentum is only unlocked after obtaining at least %1 cookies this ascension. Before it's unlocked, momentum boosts do nothing.": "动量仅在此轮飞升中获得至少 %1 块饼干后解锁。在解锁之前,动量提升没有任何效果。", + "Are you sure?": "确定吗?", + "You are about to apply the preset \"%1\"": "您即将应用预设 \"%1\"", + "Applying this preset will have the following changes:": "应用此预设将产生以下更改:", + "%1 will be turned ON": "%1 将被开启", + "%1 will be turned OFF": "%1 将被关闭", + "Accessible": "无障碍模式", + "Intended / Default": "预期/默认模式", + "True comp": "真竞速模式", + "True kaizo": "真极限模式", + "A friendly and smooth experience, containing all the QoL and assistance tools available.": "友好且流畅的体验,包含所有可用的生活质量(QoL)和辅助工具。", + "The original designed experience of this mod, with QoL but minimal assistance tools.": "此模组最初设计的体验,包含生活质量(QoL)改进但辅助工具最少。", + "A somewhat challenging experience, with a limited capacity to pause the game.": "具有一定挑战性的体验,暂停游戏的能力受限。", + "A challenging experience, with a limited access to information and only one life!": "极具挑战性的体验,信息获取受限且只有一条命!", + "Kaizo cookies settings": "极限烘培设置", + "Invoking a difficulty preset configures your Kaizo cookies settings, and can be readjusted at any time. Presets do not override all settings.": "调用难度预设会配置您的极限烘培设置,并且可以随时重新调整。预设不会覆盖所有设置。", + "Difficulty presets:": "难度预设:", + "Replay information snippets:": "重放信息片段:", + "Ascend on infinite decay": "无限衰变时飞升", + "Upon reaching infinite decay, wipe save": "达到无限衰变时,重置存档", + "Wipe save on infinite decay": "无限衰变时重置存档", + "Upon reaching infinite decay, ascend without gaining any prestige or heavenly chips": "达到无限衰变时,进行飞升且不获得任何威望或天堂碎片", + "Informational widget": "信息小部件", + "Widget below the big cookie that displays information without having to look into the stats menu.": "大饼干下方的小部件,显示信息而无需查看统计菜单。", + "Easy clicks": "轻松点击", + "Allows you to automatically click the big cookie by holding down click, but click speed is capped to 10 clicks per second.": "允许您通过长按来自动点击大饼干,但点击速度上限为每秒10次。", + "Easy wrinklers": "轻松饼干虫", + "Allows you to automatically click wrinklers you are hovering over by holding down click, but click speed is capped to 10 clicks per second.": "允许您通过长按自动点击鼠标悬停的饼干虫,但点击速度上限为每秒10次。", + "Touchpad mode": "触摸板模式", + "For touchpad users; changes the mod to be more accomodating of touchpads. See the list of changes here.": "适用于触摸板用户;修改模组以更好地适应触摸板。查看更改列表请点击此处。", + "Automatically activate easy clicks or easy wrinklers by holding down A while hovering over the big cookie or a wrinkler, respectively.": "分别通过在悬停在大饼干或饼干虫上时按住A键来自动激活轻松点击或轻松饼干虫功能。", + "The A key also functions as clicks for wrinkler souls and power orbs.": "A键也可用作点击饼干虫魂和力量法球。", + "Note: if you are having issues with your touchpad's range or speed, try adjusting its sensitivity; if that still isn't enough, you may also pause the game with the hotkey to reposition your mouse as needed.": "注意:如果您的触摸板存在范围或速度问题,请尝试调整其灵敏度;如果这仍然不够,您也可以使用热键暂停游戏以根据需要重新定位鼠标。", + "Show run timer": "显示运行计时器", + "Shows a more accurate timer of the run started stat.": "显示更精确的“本轮开始”统计计时器。", + "Show legacy timer": "显示传承计时器", + "Shows a more accurate timer of the legacy started stat.": "显示更精确的“传承开始”统计计时器。", + "none.
(You can see and replay information snippets you've collected throughout the game here. The first one occurs at 5,555 cookies baked this ascension.)": "无。
(您可以在此处查看和重放您在游戏过程中收集到的信息片段。第一个片段出现在本轮飞升烘焙了5,555块饼干时。)", + "Typing display": "输入显示", + "Shows your keyboard inputs in real time. Only works with the Script writer heavenly upgrade.": "实时显示您的键盘输入。仅在使用脚本撰写者天堂升级时有效。", + "Shift to Power click": "Shift键触发强击", + "Instead of holding shift to prevent power clicks from being used, have power clicks only enabled while holding shift": "不是按住Shift键来防止使用强击,而是改为仅在按住Shift键时才启用强击", + "Competition mode": "竞赛模式", + "Adds a 1 minute, 30 seconds long cooldown to pausing the game.": "为暂停游戏添加1分30秒的冷却时间。", + "Convenient purchasing": "便捷购买", + "Assist option; allows you to perform simple actions such as purchasing upgrades, interacting with minigames, and using switches while paused.": "辅助选项;允许您在暂停时执行简单操作,例如购买升级、与小游戏互动以及使用开关。", + "Auto pause on leave": "离开时自动暂停", + "Automatically pauses the game if it detects that you haven't been looking at it for 5 seconds.": "如果检测到您有5秒未观看游戏,则自动暂停游戏。", + "Fatigue warning": "疲倦警告", + "Warns you about how close you are to becoming exhausted upon reaching certain fatigue thresholds.": "在达到某些疲倦阈值时,警告您距离变得疲惫还有多近。", + "Big souls": "大虫魂", + "Assist option; all wrinkler souls are much bigger": "辅助选项;所有饼干虫魂都更大", + "Big orbs": "大法球", + "Assist option; all power orbs are much bigger": "辅助选项;所有力量法球都更大", + "Slow souls": "慢虫魂", + "Assist option; all wrinkler souls are significantly slower": "辅助选项;所有饼干虫魂速度显著变慢", + "Slow orbs": "慢法球", + "Assist option; all power orbs are significantly slower": "辅助选项;所有力量法球速度显著变慢", + "Slowly increases minimum effective progress for calculating decay-related stats over time, up to a fraction of the total amount of cookies you have baked across all ascensions": "随时间缓慢增加用于计算衰变相关统计的最小有效进度,最高可达您所有飞升中累计烘焙饼干总量的一小部分", + "Easy typing": "轻松输入", + "Assist option; allows you to use the Script writer while paused": "辅助选项;允许您在暂停时使用脚本撰写者", + "Scroll cooldown display": "滚动冷却显示", + "Displays active scroll cooldowns in a panel above the buildings and minigames": "在建筑和小游戏上方的面板中显示活跃的滚动冷却时间", + "Prestige progress display": "威望进度显示", + "Displays current amount of prestige unleashed; only appears after ascending": "显示当前已释放的威望数量;仅在飞升后出现", + "halt: %1 / %2": "衰停: %1 / %2", + "(fully halted)": "(完全停止)", + "(x%1 decay)": "(x%1 衰变)", + "Decay rate multiplier from your momentum:": "来自动量的衰变率乘数:", + "Decay propagation multiplier from your acceleration:": "来自加速的衰变传播乘数:", + "with %1 of active time": "具有 %1 的活跃时间", + "additionally: ": "此外:", + "direct multiplier: x%1": "直接乘数:x%1", + "for decay-related calculations due to ramping: ": "由于难度攀升,用于衰变相关计算:", + "total: ": "总计:", + "kept: ": "保留:", + "CpS multiplier from your decay": "来自衰变的CpS乘数", + "CpS multiplier from %1": "来自 %1 的CpS乘数", + "Decay rate multiplier from your momentum": "来自动量的衰变率乘数", + "Decay propagation multiplier from your acceleration": "来自加速的衰变传播乘数", + "ENABLE AUTOCLICK": "启用自动点击", + "Autoclicker only works when also pressing down on the big cookie or a wrinkler": "自动点击器仅在同时按住大饼干或饼干虫时有效", + "TOGGLE PAUSE": "切换暂停", + "Difficulty ramping has started!": "难度攀升已开始!", + "+%1/min": "+%1/分钟", + "Give up": "放弃", + "Are you sure? You'll have to start this run over and won't gain any heavenly chips!": "确定吗?您将不得不重新开始本轮游戏并且不会获得任何天堂碎片!", + "Gave up": "已放弃", + "Let's try this again!": "让我们再试一次!", + "Ascending in...": "飞升倒计时...", + "Due to the fact that decay has progressed past its breaking point, it will take an additional %1 for the ascend animation to start! You can cancel the ascension countdown at any time using the esc key.": "由于衰变已进展超过其临界点,飞升动画开始还需要额外的%1!您随时可以使用esc键取消飞升倒计时。", + "New game minus": "负级新游戏", + "Do you REALLY want to start a new New game minus legacy?
You will lose your progress, your achievements, and your heavenly chips, start over with increased difficulty, and without gaining any benefits!": "您真的想要开启一个新的负级新游戏(New game minus)传承吗?
您将失去您的进度、成就和天堂碎片,以更高的难度重新开始,并且不会获得任何收益", + "Are you REALLY, REALLY, sure about this? The game will get harder, you will gain NO benefits or boosts, and while you can disable the negative effects of New game minus at any time - you won't get your current progress back!
Don't say we didn't warn you!": "您真的,真的确定要这样做吗?游戏会变得更难,您将无法获得任何收益或提升,并且虽然您可以随时禁用负级新游戏的负面效果——但您当前的进度将无法恢复!
别说我们没有警告您!", + "Are you ready to return to where you left off?
Last time you were in New game minus, you were %1 layers deep.": "您准备好回到上次离开的地方了吗?
上次您处于负级新游戏时,深度为第%1层。", + "This will wipe your current progress, including all of your prestige!": "这将重置您当前的进度,包括您所有的威望!", + "Exit New game minus": "退出负级新游戏", + "Are you sure? You can reactivate New game minus at any time, but doing so will wipe your progress again.": "确定吗?您可以随时重新激活负级新游戏,但这样做将再次重置您的进度。", + "Resets everything and adds one New game minus layer, starting a new legacy with stronger decay than before. In addition, breaking point will be present in the first ascension as well.
Only unlocked upon obtaining at least %1, and advancing a layer requires achievement completions to be complete.": "重置一切并增加一层负级新游戏层数,开始一个衰变比之前更强的新的传承。此外,临界点也将在第一次飞升中出现。
仅在获得至少%1后解锁,并且推进层数需要成就完成度达标。", + "Reset everything and return to layer %1 of New game minus.": "重置一切并返回负级新游戏的第%1层。", + "Unlocked upon obtaining an achievement completion of at least %1%.": "在获得至少%1%的成就完成度后解锁。", + "Next layer: layer %1": "下一层:第%1层", + "Cookies baked (cross-legacies total):": "烘焙的饼干(跨传承总计):", + "First legacy started:": "第一个传承开始于:", + ", with %1 new game minus layer%2": ",具有 %1 个负级新游戏层%2", + "cross-legacies total: ": "跨传承总计:", + "Sugar lumps harvested across all legacies:": "所有传承中收获的糖块:", + "Disables New game minus and reverts all of its effects for this legacy and all future legacies, until New game minus is invoked again": "禁用负级新游戏并为其对此传承及所有未来传承的所有效果,直到再次调用负级新游戏", + "%1 to exploding": "%1 后爆炸", + "In never": "永不", + "In %1": "%1 后", + "Eating...": "啃食中...", + + "Popped a wrinkler": "击破了一个饼干虫", + "Decay amplified!": "衰变放大了!", + "You found Wrinkler ambergris!": "您找到了饼干虫龙涎香!", + "-%1!": "-%1!", + "You lost %1!": "您失去了 %1!", + "You have become cursed and coagulated!": "您被诅咒和凝结了!", + "+%1 sugar lump!": [ + "+%1 糖块!", + "+%1 糖块!" + ], + "%1 soul": [ + "%1 虫魂", + "%1 虫魂" + ], + "%1 shiny soul": [ + "%1 发光虫魂", + "%1 发光虫魂" + ], + "Decay halting requirement +50% for %1!": "衰停需求提升50%,持续 %1!", + "Decay halting requirement +200% for %1!": "衰停需求提升200%,持续 %1!", + "Decay rates and halting requirement +200% for %1!": "衰变率与衰停需求均提升200%,持续 %1!", + "Bombers incoming!": "自爆虫来袭!", + "Wrinkler speed x6 for %1!": "饼干虫速度x6,持续 %1!", + "Wrinkler soul": "饼干虫魂", + "Shiny soul": "发光虫魂", + "Reflective blessing!": "反射祝福!", + "Cookies doubled!": "饼干翻倍!", + "CpS too low to double": "CpS过低无法翻倍", + "%1 unlocked!": "%1 已解锁!", + "This scroll will be available for selection in subsequent runs.": "此卷轴将在后续游戏中可供选择。", + "%1
until completion": "%1
后完成", + "Complete!
Drag into the big cookie and hold for a few seconds to claim it!": "完成!
将其拖入大饼干并按住几秒钟以领取!", + "First Chance to Suffer": "初次受苦", + "Burst the especially insufferable shiny wrinkler.What a good citizen!": "击破特别令人难以忍受的发光虫真是个好公民!", + "Wrinkler souls claimed:": "已获取的饼干虫魂:", + "Shiny wrinkler souls claimed:": "已获取的发光虫魂:", + "Bombers popped:": "击破的自爆虫:", + "Fuse discharge unlocked!": "引信释放已解锁!", + "Decay is shattered!": "衰变已被粉碎!", + "expend": "消耗", + "upgrade": "升级", + "incubate": "孵化", + "conjure": "召唤", + "Click to release one, or shift-ctrl-click to release all at once.": "点击释放一个,或按Shift-Ctrl点击一次性全部释放。", + "Fuse: %1": "引信:%1", + "(click to discharge!)": "(点击释放!)", + "(recovery: %1%)": "(恢复:%1%)", + "Toggle this on to have released souls autonomously fly into the big cookie. (green = on)": "切换此选项可使释放的虫魂自动飞向大饼干。(绿色 = 开启)", + "Click this to trade %1 normal wrinkler souls in your storage for %2 shiny wrinkler soul.": "点击此按钮用库存中的 %1 个普通虫魂交易 %2 个发光虫魂。", + "Cannot use (not enough normal souls!)": "无法使用(普通虫魂不足!)", + "Toggle this on to make releasing souls convert it into %1% of its power instead.": "切换此选项可使释放虫魂时将其转化为 %1% 的效果。", + "Click this to release one phantom essence fixed to your mouse. (Hotkey: Shift + Ctrl + Q)": "点击此按钮释放一个固定到鼠标的幻影精华。(快捷键:Shift + Ctrl + Q)", + "You can deposit this material by dragging an instance into the milk, and take out stored material by clicking on the button.": "您可以通过将实例拖入牛奶中来存入此材料,并通过点击按钮取出存储的材料。", + "Revealed upon the death of wrinklers.": "在饼干虫死亡时揭示。", + "Offer %1 to raise maximum storage by %2 (Currently: +%3)": "贡献 %1 以将最大存储量增加 %2(当前:+%3)", + "Offer cookies to raise maximum storage (Maxed out: +%1)": "贡献饼干以提高最大存储量(已满:+%1)", + "Unlock another %1 achievements to raise maximum storage by another %2 (Currently: +%3)": "再解锁 %1 个成就以将最大存储量再提高 %2(当前:+%3)", + "Unlock achievements to raise maximum storage (Maxed out: +%1)": "解锁成就以提高最大存储量(已满:+%1)", + "Revealed upon the death of an especially shiny variant of wrinklers. Quite hard to come by, as the shiny wrinklers are known for being tough.": "在一种特别闪亮的饼干虫变体死亡时揭示。非常难以获得,因为发光虫以坚韧著称。", + "Complete %1 more unshackled decay challenges to raise maximum storage by %2 (Currently: +%3)": "再完成 %1 个末日衰减挑战以将最大存储量提高 %2(当前:+%3)", + "Complete unshackled decay challenges to raise maximum storage (Maxed out: +%1)": "完成末日衰减挑战以提高最大存储量(已满:+%1)", + "Offer %1 to unlock the shiny condenser, converting normal souls to a shiny soul": "贡献 %1 以解锁发光凝聚器,将普通虫魂转化为发光虫魂", + "Offer %1 to make shiny condensation more efficient": "贡献 %1 以使发光凝聚更高效", + "Shiny condenser complete": "发光凝聚器完成", + "Energy embedded in the near-invisible and invincible phantom wrinklers, they seem to have the power to dispel the unholy.": "嵌入近乎隐形且无敌的幻影虫中的能量,它们似乎拥有驱散不洁之物的力量。", + "Offer %1 to unlock quick release, fixing essences to your mouse": "贡献 %1 以解锁快速释放,将精华固定到您的鼠标", + "Quick release button unlocked": "快速释放按钮已解锁", + "Shiny wrinkler soul": "发光虫魂", + "Phantom essence": "幻影精华", + + "Touch of force [ACTIVE]": "冲击之触 [激活]", + "Click a wrinkler to destroy a layer and knock it back!": "点击一个饼干虫以摧毁一层击退它!", + "Touch of force": "冲击之触", + "Enable to empower the next click against wrinklers!
(Shortcut: Ctrl + D)": "启用以强化下一次对饼干虫的点击!
(快捷键:Ctrl + D)", + "Recharges in: %1": "充能时间:%1", + "Touch of force recharged!": "冲击之触充能完毕!", + "Wrinklers may occasionally carry sugar lumps, which greatly increases their durability.": "饼干虫偶尔会携带糖块,这会极大增加它们的耐久度。", + "Sugar lump-carrying wrinklers shares the damage other wrinklers take with damage reduction, and removing a layer of a lump-carrying wrinkler speeds up all wrinklers for a short amount of time.": "携带糖块的饼干虫会以减伤方式分担其他饼干虫受到的伤害,并且移除携带糖块饼干虫的一层会在短时间内加速所有饼干虫。", + "Sugar lumps are delicious and may be used as currency for all sorts of things.": "糖块很美味,可用作各种事物的货币。", + "Because you've baked a billion cookies in total, you are now attracting sugar lumps. Wrinklers now have a chance to carry them, and they may be spent on a variety of useful upgrades and things, such as upgrading the existing 4 minigames! (All minigames are already unlocked)": "因为您总共烘焙了十亿块饼干,您现在会吸引糖块。饼干虫现在有机会携带它们,并且可以将其用于各种有用的升级和事物,例如升级现有的4个小游戏!(所有小游戏均已解锁)", + "Minigame refills triggered!": "小游戏补充已触发!", + "Triggered a garden tick with forced mutations, maxed out worship swaps, and filled 100 magic.": "触发了带有强制变异的花园周期,最大化崇拜交换,并填充了100点魔法。", + "Glucose furnace": "糖块熔炉", + "Click to open the furnace!": "点击打开熔炉!", + "Will be ready in %1!": "将在 %1 后准备就绪!", + "Current boost: +%1% CpS": "当前增益:+%1% CpS", + "Current boost: +%1 CpS": "当前增益:+%1 CpS", + "Use %1 to burn and increase CpS by %2 per minute over %3, for up to %4": "使用 %1 燃烧并在 %3 内每分钟增加 %2 CpS,最多 %4", + "Burn sugar lump": "燃烧糖块", + "Sacrifice your garden (by getting every seed) to increase cap by %1 (additive) and add +%2 per minute!": "牺牲您的花园(通过获得所有种子)以将上限增加 %1(叠加)并每分钟增加 +%2!", + "Capped": "已达上限", + "Burn!": "燃烧!", + "Burning
%1 remaining": "燃烧中
剩余 %1", + "+%1% --> +%2% per minute": "每分钟 +%1% --> +%2%", + "%1% --> %2% boost cap": "%1% --> %2% 增益上限", + "MAXED": "已最大化", + "Upgrade furnace speed": "升级熔炉速度", + "Upgrade furnace boost cap": "升级熔炉增益上限", + "The below upgrades are kept through ascensions.": "以下升级在飞升后保留。", + "Level %1": "等级 %1", + "Auto-first burn": "自动首次燃烧", + "outside": "外部", + "inside": "内部", + "Unshackled decay": "末日衰减", + "The Glucose furnace is ready!": "糖块熔炉已就绪!", + "Look in your switches section.": "请在您的开关部分查看。", + "Sugar burning started!": "糖块燃烧开始!", + "Finishes after %1.": "%1 后完成。", + "Sugar burning ended!": "糖块燃烧结束!", + "Cap of +%1% reached.": "已达到 +%1% 的上限。", + "Current sugar burning boost: +%1%": "当前糖块燃烧增益:+%1%", + "get over %1": "超过 %1", + "complete challenge %1": "完成挑战 %1", + "heavenly upgrade %1": "天堂升级 %1", + "less time": "更少时间", + "Click-o-meter": "点击计量器", + "more time": "更多时间", + "Minimize the Click-o-meter": "最小化点击计量器", + "Show the Click-o-meter": "显示点击计量器", + "Hide": "隐藏", + "Click-o-meter unlocked!": "点击计量器已解锁!", + "Check it out at the top the middle section.": "请在中间部分的顶部查看。", + "This meter shows for how long your clicks will keep decay halted.": "此计量器显示您的点击还能保持衰变停止多久。", + "Decay halted!": "衰变停止!", + "Amount of time left: %1": "剩余时间:%1", + "Decay propagation rate -%1% for %2!": "衰变传播率降低 %1%,持续 %2!", + "You cannot ascend right now, as you have not yet earned enough cookies.
Ascending for the first time requires a minimum of %1 heavenly chips.": "您现在无法飞升,因为您尚未赚取足够的饼干。
首次飞升需要至少 %1 个天堂碎片。", + "Ascending cancelled!": "飞升已取消!", + + "Elder Covenant": "长者盟约", + "Covenant mode switched!": "盟约模式已切换!", + "Your covenant mode is now: ": "您的盟约模式现在是:", + "Elder Covenant [switching]": "长者盟约 [切换中]", + "The Elder Covenant is preparing to switch modes...": "长者盟约正在准备切换模式...", + "Time remaining until next mode:": "距离下次模式切换剩余时间:", + "off": "关闭", + "Switches between different modes, each one giving an unique bonus with an unique drawback.": "在不同模式之间切换,每种模式都提供独特的奖励和独特的缺点。", + "holy": "神圣", + "Decay rates -70% while having no purity, but CpS -98%.Blocks an outlet for decay using a portion of your production.": "在没有纯净量时衰变率 -70%,但CpS -98%使用您的一部分生产来阻塞衰变的出口。", + "energized": "充能", + "Clicking halts decay twice as fast, but fatigue also builds up twice as fast.Motivates you to be faster, stronger, and better, but...": "点击停止衰变的速度加倍,但疲倦积累的速度也加倍激励您更快、更强、更好,但是...", + "Cookie production -%1 for %2!": "饼干生产 -%1,持续 %2!", + "Wrath cookie disappeared, cookie smited!": "愤怒饼干消失,饼干被摧毁!", + "boosted clicks": "强化点击", + "Click power +25%, but decay halting from clicks lasts half as long.Redirects your focus to the cookie-making ability of your clicks, with the side effect of decreasing its decay halting ability.": "点击产出 +25%,但点击带来的衰停持续时间减半将您的注意力重新导向点击的饼干制作能力,副作用是降低其衰停能力。", + "draconic imbalance": "龙族失衡", + "The aura slot on the right is 50% more powerful, but the aura slot on the left is 50% less powerful.As the prophecy foretold, one wing is always lighter than the other.": "右侧的光环槽效果提升50%,但左侧的光环槽效果降低50%正如预言所示,一翼总是比另一翼轻。", + "frenzied": "狂热", + "If a golden cookies spawned with this covenant mode gives Frenzy while a Frenzy is already ongoing, it will halves its duration and increase the strength of the ongoing Frenzy by 25%, for up to +400% strength.It's time to party!": "如果在此盟约模式下生成的黄金饼干在狂热效果已存在时再次给予狂热,则将其持续时间减半并将当前狂热效果的强度增加25%,最高可达+400%强度。是时候派对了!", + "plentiful harvests": "丰收", + "If a golden cookies spawned with this covenant mode gives Dragon Harvest while a Dragon Harvest is already ongoing, it will halves its duration and increase the strength of the ongoing Dragon Harvest by +150%, for up to +250% strength.A bounty for the patient.": "如果在此盟约模式下生成的黄金饼干在龙之收获效果已存在时再次给予龙之收获,则将其持续时间减半并将当前龙之收获效果的强度增加+150%,最高可达+250%强度。对耐心者的奖赏。", + "Frenzy strengthened!": "狂热效果增强!", + "Dragon Harvest strengthened!": "龙之收获效果增强!", + "Frenzy strength maximum reached!": "狂热强度已达最大值!", + "Dragon Harvest strength maximum reached!": "龙之收获强度已达最大值!", + "%1x CpS multiplier": "%1x CpS 乘数", + "-%1 Frenzy duration!": "-%1 狂热持续时间!", + "-%1 Dragon Harvest duration!": "-%1 龙之收获持续时间!", + "artifical lights": "人造之光", + "Claiming shiny wrinkler souls have a 50% chance to trigger a garden tick with 3x mutation rates instead of spawning a golden cookie.An unholy mass, glowing as bright as the sun.": "获取发光虫魂时有50%几率触发一次花园周期,具有3倍突变率,而不是生成一个黄金饼干。一个不洁的团块,发出如太阳般明亮的光芒。", + "sacred": "神圣", + "All Grimoire spells are 10% cheaper, but also costs 1 worship swap.": "所有魔法书法术便宜10%,但也会消耗1次崇拜交换。", + "powerful": "强力", + "You gain 25% more power, but power orbs no longer spawn.This power is truly fearsome.": "您获得25%更多的能量,但力量法球不再生成这股力量确实可怕。", + "You also gained some extra purity!": "您还获得了一些额外的纯净量!", + "Purification complete!": "净化完成!", + "Elder Pledge restored!": "长者誓约已恢复!", + "Purity key activated!": "纯净密钥已激活!", + "You purified all of your decay!": "您净化了所有的衰变!", + "Purity key charged!": "纯净密钥已充能!", + "Pure suppression": "纯净压制", + "Wrinkler spawning completely nullified for %1!": "饼干虫生成被完全抑制,持续 %1!", + "This Shimmering Veil is currently protecting you from %1.": "此闪烁面纱当前正保护您免受%1的影响。", + "your exhaustion": "您的疲惫", + "fatigue buildup": "疲倦积累", + "Price scales with highest raw CpS reached this ascension.": "价格随本轮飞升达到的最高原始CpS缩放。", + "Turning it off will also incur some damage to the veil itself.": "关闭它也会对面纱本身造成一些损害。", + "If activated, this veil will protect you from %1.": "如果激活,此面纱将保护您免受%1的影响。", + "Your veil has previously collapsed, so this activation will require %1x more cookies than usual.": "您的面纱之前已崩溃,因此此次激活需要比平时多%1x的饼干。", + "This Shimmering Veil has collapsed.": "此闪烁面纱已崩溃。", + "This Shimmering Veil will be restored in: ": "此闪烁面纱将在以下时间后恢复:", + "Veil restored!": "面纱已恢复!", + "Your Shimmering Veil has recovered from the collapse!": "您的闪烁面纱已从崩溃中恢复!", + "Veil revived!": "面纱已复活!", + "Your Sparkling wonder saved your veil from collapse and healed it back to full health!": "您的闪耀奇迹拯救了您的面纱免于崩溃并将其治愈至满血!", + "Veil collapsed!": "面纱崩溃!", + "Your Shimmering Veil collapsed.": "您的闪烁面纱崩溃了。", + + "You thought something will happen, didn't you?": "您以为会发生什么,对吧?", + "(repeating this code may yield different effects)": "(重复此代码可能会产生不同的效果)", + "How can I help you, sir?": "有什么可以帮您的,先生?", + "Debug tool activated!": "调试工具已激活!", + "I love the way they cook linguini.": "我喜欢他们烹饪扁面条的方式。", + "You are exhausted!": "您已疲惫!", + "Exhaustion not yet unlocked!": "疲惫尚未解锁!", + "Fatigue report": "疲倦报告", + "You are %1% fatigued, and it would take you %2 clicks (%3 seconds with 10 clicks per second) to become exhausted.": "您的疲倦度为 %1%,还需要点击 %2 次(以每秒10次点击计算为 %3 秒)才会变得疲惫。", + "Halt time report: %1": "衰停时间报告:%1", + "This halting method will fully run out in %1!": "此衰停方法将在 %1 后完全耗尽!", + "This channel is currently not active!": "此通道当前未激活!", + "Halt group report: %1 (%2 active methods)": "衰停组报告:%1(%2 个活跃方法)", + "This halting group will all run out in %1.": "此衰停组中的所有方法都将在 %1 后耗尽。", + "To fully halt decay, you need at least %1 distinct halting methods. You currently have a functional %2 distinct halting methods, so the rate is decay is %3% of original.": "要完全停止衰变,您需要至少 %1 种不同的衰停方法。您目前有 %2 种有效的不同衰停方法,因此衰变率是原始的 %3%。", + "No wrinkler selected!": "未选择饼干虫!", + "This wrinkler currently has %1 health across all of its %2 layers, which would take a total of %3 clicks with the current %4 damage per click (%5); it %6, meaning that it would take %7 to reach the big cookie! %8": "此饼干虫当前在所有 %2 层中总共有 %1 点生命值,以当前每次点击 %4 点伤害(%5)计算,总共需要点击 %3 次;它 %6,意味着需要 %7 才能到达大饼干!%8", + "due to it taking %1% more damage": "因为它受到 %1% 更多伤害", + "no wrinkler-specific damage multipliers": "没有饼干虫特定的伤害乘数", + "has %1% movement speed": "具有 %1% 移动速度", + "has no movement speed multipliers specific to this wrinkler": "没有此饼干虫特定的移动速度乘数", + "HP: pops all %1 layers in %2 clicks (takes %3x damage, %4 at 10 clicks/second)": "生命值:点击 %2 次可击破所有 %1 层(承受 %3x 伤害,每秒10次点击时为 %4)", + "Speed: %1%/s (%2 to reach)": "速度:%1%/秒(%2 后到达)", + "Stun: %1 (%2 left)": "眩晕:%1(剩余 %2)", + "-%1% speed": "-%1% 速度", + "Wizard tower level reset!": " wizard tower level reset!", + "Your wizard tower levels have been successfully reset, and refunding %1 sugar lumps.": " wizard tower levels have been successfully reset, and refunding %1 sugar lumps.", + "On cooldown! (%1 left)": "冷却中!(剩余 %1)", + "Scroll \"%1\" reloaded!": "卷轴“%1”已重新加载!", + "Has a cooldown of %1.": "具有 %1 的冷却时间。", + "%1 left": "剩余 %1", + "Typing \"activatepartymode\" will unlock party mode!": "输入“activatepartymode”将解锁派对模式!", + "You know limes?": "您知道酸橙吗?", + "There is a code for summoning reindeer.": "有一个召唤驯鹿的代码。", + "Do you hate this game?": "您讨厌这个游戏吗?", + "Someone must have told you how to get here.": "一定有人告诉过您如何到达这里。", + "Trufflz is the 9th best comp player.": "Trufflz是第9好的竞速玩家。", + "You can spawn a hideous creature if you have met the conditions; 15 minutes needs to have passed, and you need to be on the Christmas season, then typing
\"isurewouldloveifyoucanspawnagoldencookie
andareindeeratthesametime\" will spawn it.": "如果满足条件,您可以生成一个丑陋的生物;需要经过15分钟,并且您需要处于圣诞节季节,然后输入
“isurewouldloveifyoucanspawnagoldencookie
andareindeeratthesametime”将会生成它。", + "Not-historically, the garden of eden had at least one of every plant species in it.": "非历史地,伊甸园中至少有每种植物物种各一株。", + "Do you know how much fatigue you have? With \"get fatigue\", now you know!": "您知道您有多少疲倦值吗?使用“get fatigue”,现在您知道了!", + "There's \"get halt click\", or you can \"get halt soul\", or maybe \"get halt shiny\", so many options...": "有“get halt click”,或者您可以“get halt soul”,或者“get halt shiny”,这么多选项...", + "Try \"info\" while hovering over a wrinkler.": "在鼠标悬停在饼干虫上时尝试“info”。", + "Wrinklers appear %1 times as fast for %2!": "饼干虫出现速度加快 %1 倍,持续 %2!", + "Surprise!": "惊喜!", + "There is a rare creature called \"reingold\" that can only be found normally on this day, have fun hunting it!": "有一种名为“reingold”的稀有生物,通常只能在这一天找到,祝您狩猎愉快!", + "Reingold": "莱茵金", + + "Kaizo cookies": "极限烘培", + "Kaizo cookies is a Cookie clicker content mod made by a few members of Dashnet Forums, featuring drastic changes that aims to make the game faster and more active. The mod is currently not complete, with content ending at the %1 range.": "极限烘培(Kaizo cookies)是由Dashnet论坛的一些成员制作的饼干点点乐(Cookie clicker)内容模组,具有旨在使游戏更快、更活跃的巨大变化。该模组目前尚未完成,内容截止到 %1 范围。", + "Developing this mod took a lot of thought and effort over almost a year, culminating into one of the biggest cookie clicker content mod ever made, and we'd really appreciate some support! Here's how:": "开发这个模组花了近一年的深思熟虑和努力,最终成为有史以来最大的饼干点点乐内容模组之一,我们非常感谢您的支持!方式如下:", + "You can find a non-comprehensive changelog of the mod here, but we recommend against spoiling yourself with that information.": "您可以在此处找到模组的非全面更新日志here,但我们不建议用这些信息剧透自己。", + "join our Discord server! Any feedback is welcome!": "加入我们的Discord服务器!欢迎任何反馈!", + "like, favorite, and (if you want) give an award to our steam workshop entry!": "点赞、收藏并(如果您愿意)给我们的Steam创意工坊条目颁奖!", + "share our mod with anyone who you think will like it!": "与任何您认为会喜欢它的人分享我们的模组!", + "Curve activated": "曲线已激活", + "Sugar lump wrinkler spawned!": "携带糖块的饼干虫已生成!", + "Buff boosts clicks by +%1% for every building sold for %2 seconds, ": "增益效果在 %2 秒内,每出售一个建筑点击产出增加 +%1%,", + "but also temporarily increases decay momentum by %1% with every building sold.": "但每出售一个建筑也会暂时增加 %1% 的衰变动量。", + "+%1 prestige level effect on CpS for %2!": "威望等级对CpS的效果增加 +%1,持续 %2!", + "Power x%1 from %2!": "来自 %2 的能量 x%1!", + "Selebrak": "塞勒布拉克", + "Cherish a season": "珍视一个季节", + "Click to select this season to cherish.": "点击选择要珍视的季节。", + "Here are all the relevant seasonal upgrades you have, sorted by seasons.
When a season is chosen, its upgrades will not be lost on ascension, but you will still need to get them in a run to be kept.
You can reassign it anytime you ascend.": "以下是您拥有的所有相关季节升级,按季节排序。
当选择一个季节时,其升级在飞升时不会丢失,但您仍然需要在一轮游戏中获得它们才能保留。
您可以在每次飞升时重新分配它。", + "with %1 prestige levels unleashed (+%2% CpS)": "已释放 %1 个威望等级 (+%2% CpS)", + "at x%1 effect and count": "效果和数量为 x%1", + "and additional x%1 count": "以及额外的 x%1 数量", + "fully unleashed (+%1% CpS)": "完全释放 (+%1% CpS)", + "%1% prestige unleashed (%2 / %3)": "已释放 %1% 的威望(%2 / %3)", + "Also makes all santa's gifts %1 times cheaper.": "也使所有圣诞老人的礼物便宜 %1 倍。", + "Cost increases by 12 times for each santa upgrade bought.": "每购买一个圣诞老人升级,成本增加 12倍。", + "The latest building produces %1% more.": "最新建筑产量增加 %1%。", + "All buildings are %1% cheaper.": "所有建筑便宜 %1%。", + "All upgrades are %1% cheaper.": "所有升级便宜 %1%。", + "Reindeer frenzy": "驯鹿狂热", + "Reindeers incoming!": "驯鹿来袭!", + + "Always permaslottable": "始终可永久放置", + "Kept on ascension": "飞升时保留", + "Obtaining a dropped sugar lump gives %1 of Frenzy.": "获取掉落的糖块给予 %1 的狂热效果。", + "Unlocks cursedor, which concentrates and converts your cookies clicked amount this ascension into a golden cookie; the more you clicked, the better effects the golden cookie will yield.": "解锁魔化之击,它将您本轮飞升点击饼干的次数浓缩并转化为一个黄金饼干;点击次数越多,黄金饼干产生的效果越好。", + "Activating this will spawn a golden cookie based on the amount of times you clicked the big cookie this ascension when you click the big cookie. Upon use, your cookies clicked stat will be reset and the golden cookie spawned yields effects based on the amount it consumed.": "激活后,点击大饼干时会根据您本轮飞升点击大饼干的次数生成一个黄金饼干。使用时,您的饼干点击统计将被重置,生成的黄金饼干根据其消耗的数量产生效果。", + "The Cursedor is currently active, and clicking the big cookie will reset your big cookies clicked amount and spawn a golden cookie.
Turning it off will revert those effects.": "魔化之击当前处于激活状态,点击大饼干将重置您的大饼干点击次数并生成一个黄金饼干。
关闭它将恢复这些效果。", + "Stops all decay.": "停止所有衰变。", + "Purification is no longer limited by caps; however, increasing purity past the cap will require an increased amount of purification power.
The decay rate increase from purity increase -25%.": "净化不再受上限限制;然而,将纯净量提升超过上限需要更多的净化力量。
由纯净量增加带来的衰变率提升-25%。", + "Makes Elder Pledge's purification 25% stronger, reduces the cooldown by 25%, and makes the active duration 25% longer.": "使长者誓约的净化效果增强25%,冷却时间减少25%,并使激活持续时间延长25%。", + "The Elder Pledge halts decay for 3 times longer on use.": "长者誓约在使用时停止衰变的时间延长3倍。", + "Your upgrades are 0.1% cheaper for every x0.5 CpS multiplier from your decay.": "您的升级价格对于来自衰变的每x0.5 CpS乘数便宜0.1%。", + "The Shimmering Veil has a %1% chance to be revived to full health on collapse.": "闪烁面纱在崩溃时有%1%几率复活至满血。", + "These were made with the purest and highest quality ingredients, legend says: \"whom has the cookie they shall become the most powerful baker.\" No, this isn't just a normal cookie.": "这些是用最纯净和最高质量的成分制成的,传说称:“拥有此饼干者将成为最强大的烘焙师。”不,这不仅仅是一块普通的饼干。", + "You gain +5% CpS for each sugar lump that you have ever obtained, for up to a total of +80% CpS.": "您每获得过一个糖块,就获得+5% CpS,最多总计+80% CpS。", + "Claiming sugar lumps halt decay, with triple the duration for meaty sugar lumps.": "获取糖块停止衰变,多肉糖块的持续时间变为三倍。", + "The effect cap of Caramelized luxury is increased to +300%.": "焦糖奢华的效果上限增加至+300%。", + "You gain +1% prestige effect for each level of all buildings, for up to a total of +200% effect.": "您所有建筑的每个等级提供+1%威望效果,最多总计+200%效果。", + "Lets you unlock a set of new tiered upgrades at 600 of each building, which make individual buildings accumulate decay slower.
All other decay-related calculations uses the combined impact of all buildings.": "让您在每座建筑达到600时解锁一套新的分层升级,这些升级使单个建筑积累衰变的速度变慢。
所有其他与衰变相关的计算使用所有建筑的组合影响。", + "Obtain a CpS multiplier from purity of +%1% or more for at least 5 seconds.": "获得来自纯净量的+%1%或更高的CpS乘数,持续至少5秒。", + "%1 accumulates %2% less decay.": "%1积累的衰变减少%2%。", + "Looks bad, but still edible - just barely.": "看起来不好,但仍然可食用——勉强可以。", + "Each building accumulates 2% less decay for every level it has, for up to level 20.": "每座建筑每升一级积累的衰变减少2%,最高至20级。", + "Decay propagation -1% for each building leveled to level 10 or above.": "每座升到10级或以上的建筑使衰变传播-1%。", + "You gain more milk the more purity you have.": "您拥有的纯净量越多,获得的牛奶就越多。", + "Price scaling for %1 are pushed back by %2 buildings.": "%1的价格增长被推迟了%2座建筑。", + "Typing certain things may reveal some useful hidden information. (case insensitive).": "输入某些内容可能会揭示一些有用的隐藏信息。(不区分大小写)。", + "Unlocks the cookie selector, letting you pick how the big cookie looks.
Comes with a variety of cookies.": "解锁饼干选择器,让您选择大饼干的外观。
附带多种饼干。", + "Lets you pick which cookie to display.": "让您选择显示哪个饼干。", + "Placing an upgrade in this slot will make its effects permanent across all playthroughs.": "将升级放置在此槽位中会使其效果在所有游戏过程中永久生效。", + "Can only slot flavored cookie upgrades.": "只能放置风味饼干升级。", + "Unlocks new challenges for the Unshackled decay challenge mode.": "为末日衰减挑战模式解锁新挑战。", + "Also disables building requirements for buying new buildings, automatically unlocks Force the Hand of Fate and Godzamok, and refunds sugar lumps spent if already unlocked.": "同时移除购买新建筑的建筑要求,自动解锁命运之手和格斯马克,如果已解锁则退还花费的糖块。", + "This upgrade was unlocked after obtaining at least %1 total prestige levels.": "此升级在获得至少%1总威望等级后解锁。", + "Your clicks are %1% more effective against wrinklers.": "您的点击对饼干虫的效果提高%1%。", + "Big cookie clicks have a 1% chance to purify a small amount of decay.": "大饼干点击有1%几率净化少量衰变。", + "Frenzy from golden cookies last 35% longer.
Unlocks after clicking 27 naturally spawning golden cookies this ascension.": "来自黄金饼干的狂热效果持续时间延长35%
在本轮飞升点击27个自然生成的黄金饼干后解锁。", + "Golden cookie gain is doubled.": "黄金饼干收益翻倍。", + "Golden cookie gain refers to any effect from golden cookies that involves directly creating some amount of cookies, such as Lucky.": "黄金饼干收益指的是来自黄金饼干的任何直接创造一定数量饼干的效果,例如幸运(Lucky)。", + "The mouse is four times as efficient.": "鼠标的效率提高四倍。", + "Wrinklers take 1% more damage from clicks for each santa level past Elfling.": "对于每个超过小精灵(Elfling)的圣诞老人等级,饼干虫从点击中受到的伤害增加1%。", + "Research is twice as fast.": "研究速度加倍。", + "%1 are +%2 more efficient.": "%1的效率提高+%2。", + "Evolving Santa requires 1 less normal wrinkler soul per level.": "进化圣诞老人每级需要减少1个普通虫魂。", + "Wrinkler souls halt decay for 1% longer per Santa level past Elfling.": "对于每个超过小精灵的圣诞老人等级,虫魂停止衰变的时间延长1%。", + "While having no purity and is not coagulated, decay is twice as slow.": "当没有纯净量且未被凝结时,衰变速度减半。", + "Destroys wrinklers after only depleting the health of the second to last layer.": "仅在耗尽倒数第二层的生命值后即可摧毁饼干虫。", + "%1 are %2% more efficient.": "%1的效率提高%2%。", + "Clicking halts decay %1% faster.": "点击停止衰变的速度加快%1%。", + "The decay speed and strength increase with purity is slightly slower.": "随纯净量增加的衰变速度和强度提升略微变慢。", + "Leveling the Santa takes half as many souls and shiny souls.": "提升圣诞老人等级所需的虫魂和发光虫魂数量减半。", + "While exhausted, claiming wrinkler souls clear half a second worth of exhaustion.": "疲惫时,获取虫魂清除半秒价值的疲惫。", + "While exhausted, normal and shiny wrinkler souls halt decay for 10% longer.": "疲惫时,普通和发光虫魂停止衰变的时间延长10%。", + "Creates a draggable marker; whenever power click shockwaves pass through it, it creates an additional, smaller power click shockwave that hits all wrinklers in range for %1% the damage of the original shockwave.": "创建一个可拖动的标记;每当强击冲击波穿过它时,它会产生一个额外的、更小的强击冲击波,对范围内的所有饼干虫造成原始冲击波%1%的伤害。", + "Each digit in the amount of heavenly chips you have unspent grants you +100% initial purity on reincarnation.": "您未花费的天堂碎片数量的每一位数字使您在转生时获得+100%的初始纯净量。", + "Clicking halts decay 10% harder.": "点击停止衰变的效果增强10%。", + "You purify decay over time while decay is halted with enough power.": "当衰变被足够的力量停止时,您会随时间净化衰变。", + "All purity caps are 50% higher.": "所有纯净量上限提高50%。", + "Upon getting at least +%1% purity for at least %2 for the first time in an ascension, it becomes charged; it discharges when decay breaks, which purifies all decay, damages and stuns all wrinklers, and applies a buff to completely stop wrinkler spawning for %3.": "当在一轮飞升中首次获得至少+%1%纯净量并持续至少%2时,它会充能;它在衰变突破时放电,净化所有衰变,伤害并击晕所有饼干虫,并施加一个增益效果以完全停止饼干虫生成,持续%3。", + "The click-o-meter now shows the amount of time left on hover.": "点击计量器现在在悬停时显示剩余时间。", + "Wrinklers approach the big cookie %1% slower.": "饼干虫接近大饼干的速度减慢%1%。", + "Your clicks deal %1% more damage to wrinklers.": "您的点击对饼干虫造成的伤害提高%1%。", + "The wrinkler stun effect on damage is twice as potent.": "对饼干虫的伤害造成的击晕效果加倍。", + "Each grandma (up to %1) increases damage against shiny wrinklers by %2%.": "每个老太婆(最多%1个)对发光虫的伤害增加%2%。", + "Magic regeneration in the Grimoire is 2 times faster.": "魔法书中的魔法恢复速度加快2倍。", + "Unlocks the Glucose furnace, converting sugar lumps into permanent increasing CpS bonuses in a run.": "解锁糖块熔炉,将糖块转化为一轮游戏中永久增加的CpS奖励。", + "The thunder marker now releases a small damaging shockwave once every %1.": "雷霆标记现在每%1释放一次小型伤害冲击波。", + "The thunder marker shockwave multiplier is increased to %1%.": "雷霆标记冲击波乘数增加至%1%。", + "Is a prerequisite to a glucose furnace boost cap upgrade.": "是糖块熔炉增益上限升级的前提条件。", + "Upon recovering from exhaustion, your most advanced building produces %1x as much for %2.": "从疲惫中恢复时,您最先进的建筑产量增加%1x,持续%2。", + "Upon recovering from exhaustion, your clicks deal +%1% damage to wrinklers for %2.": "从疲惫中恢复时,您的点击对饼干虫造成的伤害增加+%1%,持续%2。", + "Upon recovering from exhaustion, all wrinklers on-screen permanently take x%1 damage from all sources (stackable).": "从疲惫中恢复时,屏幕上所有饼干虫永久承受来自所有来源x%1的伤害(可叠加)。", + "Upon recovering from exhaustion, the thunder marker releases two large shockwaves.": "从疲惫中恢复时,雷霆标记释放两个大型冲击波。", + "Contains a variety of new kittens.": "含有多种小猫。", + "You gain more milk the more CpS you have.": "您的CpS越高,获得的牛奶就越多。", + "You gain a bit more CpS the more milk you have.": "您的牛奶越多,获得的CpS就略多。", + "CpS +%1%. You gain less CpS the less milk you have.": "CpS +%1%。您的牛奶越少,获得的CpS就越少。", + "You start non-unshackled decay runs with 1 free shipment.": "您开始非末日衰减游戏时拥有1次免费运输。", + "You keep the first eight cortex baker upgrades across ascensions.": "您在飞升时保留前个皮质烘焙师升级。", + "You keep all polargurt-tiered upgrades across ascensions.": "您在飞升时保留所有极地凝乳层级的升级。", + "You permanently keep %1% of your big cookie clicks performed in a run upon ascension.": "飞升时,您永久保留一轮游戏中执行的大饼干点击次数的%1%。", + "Wrinklers with runes around them carry scrolls, granting them resistances against certain high-damage attacks and causing them to explode like a bomber (but will not inflict distorted).": "带有符文环绕的饼干虫携带卷轴,赋予它们对某些高伤害攻击的抗性,还会使他们像自爆虫一样爆炸(但是不会造成空间扭曲)。", + "Defeating them unlocks awakened scrolls after a long delay.": "击败它们会在长时间延迟后解锁觉醒卷轴。", + "The new scrolls can only be used if slotted in a soulbound container like this one.": "新卷轴只有放置在像这样的灵魂绑定容器中才能使用。", + + "Type \"stop\" to freeze all wrinkler souls on screen for %1!": "输入\"stop\"以冻结屏幕上所有虫魂,持续%1!", + "Type \"unleash the potential\" to increase the amount of prestige unleashed by 30% for up to +150%, lasting until the end of the current run.": "输入\"unleash the potential\"以增加释放的威望量30%,最多+150%,持续到当前运行结束。", + "Type \"unleash the hidden will\" to refresh the cooldown on the Scroll of prestige escalation, at the cost of %1 normal souls or %2 shiny souls, priortizing normal souls when both are available.": "输入\"unleash the hidden will\"以刷新威望提升卷轴的冷却时间,消耗%1个普通虫魂%2个发光虫魂,两者皆有时优先消耗普通虫魂。", + "The effect cap of the Scroll of prestige escalation is removed.": "威望提升卷轴的效果上限已被移除。", + "Type \"i need an orb\" to spawn a power orb instantly.": "输入\"i need an orb\"以立即生成一个能量球。", + "Type \"getin\" to pull in all wrinkler souls present on screen into the big cookie!": "输入\"getin\"以将屏幕上所有虫魂拉入大饼干!", + "Type \"%1\" to have big cookie clicks halt decay and builds up fatigue 3 times faster for %2.": "输入\"%1\"使大饼干点击停止衰变和积累疲劳的速度加快3倍,持续%2。", + "Type \"sp1n\", \"sp2n\", or \"sp3n\" to rotate the next wrinkler clicked clockwise 90, 180, and 270 degrees respectively.": "输入\"sp1n\"、\"sp2n\"或\"sp3n\"以分别将下一个点击的饼干虫顺时针旋转90、180和270度。", + + "Obtain a CpS multiplier from decay of -%1% or less.": "获得来自衰变的-%1%或更低的CpS乘数。", + "Reach infinite decay.": "达到无限衰变。", + "Obtaining this achievement purifies all of your decay.": "获得此成就净化您所有的衰变。", + "Reach a decay rates multiplier of at least x%1 from your momentum.": "达到来自动量的至少x%1的衰变率乘数。", + "Reach a kitten multiplier of at least +%1% whilst having a CpS multiplier from purity of at least +%2%.": "在拥有来自纯净量的至少+%2%的CpS乘数的同时,达到至少+%1%的小猫乘数。", + "Complete a challenge.": "完成一个挑战。", + "Complete %1 challenges.": "完成%1个挑战。", + "Complete every challenge.": "完成所有挑战。", + "Complete every challenge from the %1.": "完成%1中的所有挑战。", + "Complete a repeatable challenge at least %1 times.": "完成可重复挑战至少%1次。", + "Ascend with a purity of at least +%1%.": "以至少+%1%的纯净量进行飞升。", + "Claim your first shiny wrinkler soul, unlocking the Utenglobe.": "获取您的第一个发光虫魂,解锁乌滕球。", + "Claim your first wrinkler soul.": "获取您的第一个虫魂。", + "Claim %1 normal wrinkler souls.": "获取%1个普通虫魂。", + "Maintain purity by claiming a wrinkler soul while also halting decay with clicking.": "通过获取一个虫魂同时用点击停止衰变来维持纯净量。", + "Claim %1 shiny wrinkler souls.": "获取%1个发光虫魂。", + "Pop your first bomber wrinkler.": "击破您的第一个自爆虫。", + "Distort yourself by letting a bomber wrinkler explode.": "通过让一个自爆虫爆炸来使自己空间扭曲。", + "Burst %1 bomber wrinklers.": "击破%1个自爆虫。", + "Unlock decay momentum.": "解锁衰变动量。", + "Unlock decay.": "解锁衰变。", + "Trigger a Reindeer frenzy.": "触发一次驯鹿狂热。", + + "[Kaizo Upgrade replacement 0]The cursor is twice as efficient and the mouse is 4 times as efficient.": "指针的效率提高两倍,鼠标的效率提高四倍。", + "[Kaizo Upgrade replacement 1]The cursor is twice as efficient and the mouse is 4 times as efficient.": "指针的效率提高两倍,鼠标的效率提高四倍。", + "[Kaizo Upgrade replacement 2]The cursor is twice as efficient and the mouse is 4 times as efficient.": "指针的效率提高两倍,鼠标的效率提高四倍。", + "[Kaizo Upgrade replacement 52]Golden cookies appear 50% more often and stay twice as long.
Unlocks after clicking 1 naturally spawning golden cookie this ascension.
Note that while the effect is reduced, the base golden cookie spawn rate is increased to compensate.": "黄金饼干出现频率提高50%且持续时间延长一倍
在本轮飞升点击1个自然生成的黄金饼干后解锁。
请注意,虽然效果有所减弱,但基础黄金饼干生成率已提高以作补偿。", + "[Kaizo Upgrade replacement 53]Golden cookies appear 50% more often and stay twice as long.
Unlocks after clicking 3 naturally spawning golden cookies this ascension.
Note that while the effect is reduced, the base golden cookie spawn rate is increased to compensate.": "黄金饼干出现频率提高50%且持续时间延长一倍
在本轮飞升点击3个自然生成的黄金饼干后解锁。
请注意,虽然效果有所减弱,但基础黄金饼干生成率已提高以作补偿。", + "[Kaizo Upgrade replacement 69]Each grandma gains +0.02 base CpS per grandma.
Also unlocks the Elder Pledge, which slowly purifies the decay for some cookies.": "每个老太婆获得+0.02 基础CpS/每个老太婆
同时解锁长者誓约,它可消耗一些饼干缓慢净化衰变。", + "[Kaizo Upgrade replacement 70]Cookie production multiplier +4%, and reduces the Elder Pledge cooldown by 30 seconds.": "饼干生产乘数+4%,并将长者誓约的冷却时间减少30秒。", + "[Kaizo Upgrade replacement 71]Each grandma gains another +0.02 base CpS per grandma, and makes the Elder Pledge purify for 20% more time.": "每个老太婆再获得+0.02 基础CpS/每个老太婆,并使长者誓约的净化时间延长20%。", + "[Kaizo Upgrade replacement 72]Cookie production multiplier +5%, and reduces the Elder Pledge cooldown by 30 seconds.": "饼干生产乘数+5%,并将长者誓约的冷却时间减少30秒。", + "[Kaizo Upgrade replacement 73]Each grandma gains +0.05 base CpS per portal, and makes the Elder Pledge 10% more powerful.": "每个老太婆获得+0.05 基础CpS/每个传送门,并使长者誓约的效果增强10%。", + "[Kaizo Upgrade replacement 74]Purifies the decay, at least for a short while.": "净化衰变,至少持续一小段时间。", + "[Kaizo Upgrade replacement 86]Golden cookie effects last 50% longer.
Unlocks after clicking 7 naturally spawning golden cookies this ascension.": "黄金饼干效果持续时间延长50%
在本轮飞升点击7个自然生成的黄金饼干后解锁。", + "[Kaizo Upgrade replacement 87]The Elder Pledge is 10 times as cheap.": "长者誓约的价格便宜10倍。", + "[Kaizo Upgrade replacement 129]Unleash up to 100 prestige levels, making them each grant +1% CpS.
The amount unleashed is also boosted by prestige effect boosts.": "释放最多100个威望等级,使每个等级提供+1% CpS
释放的数量也会受到威望效果提升的加成。", + "[Kaizo Upgrade replacement 130]Increase the maximum amount of unleashed prestige levels to 1,000.": "将最大释放威望等级数增加至1,000。", + "[Kaizo Upgrade replacement 131]Increase the maximum amount of unleashed prestige levels to 10,000.": "将最大释放威望等级数增加至10,000。", + "[Kaizo Upgrade replacement 132]Increase the maximum amount of unleashed prestige levels to 100,000.": "将最大释放威望等级数增加至100,000。", + "[Kaizo Upgrade replacement 133]Increase the maximum amount of unleashed prestige levels to 1,000,000, and also allows you to charge this upgrade over time by sustaining purity, unleashing even more prestige levels.
The speed of charging also scales with prestige effect multipliers and is faster the more prestige you have unleashed.": "将最大释放威望等级数增加至1,000,000,并且允许您通过维持纯净量随时间为此升级充能,释放更多威望等级。
充能速度也随威望效果乘数以及已释放的威望数量增加而加快。", + "[Kaizo Upgrade replacement 141]Subsequent research will be twice as fast.": "后续研究速度加倍。", + "[Kaizo Upgrade replacement 142]Wrinklers no longer spawn.": "饼干虫不再生成。", + "[Kaizo Upgrade replacement 158]Reindeers are twice as slow.
Clicking a reindeer briefly halts decay.": "驯鹿速度减半
点击驯鹿会短暂地停止衰变。", + "[Kaizo Upgrade replacement 159]Reindeer give 4 times as much.": "驯鹿给予四倍的奖励。", + "[Kaizo Upgrade replacement 160]All buildings are 25% cheaper.": "所有建筑便宜25%。", + "[Kaizo Upgrade replacement 161]All upgrades are 25% cheaper.": "所有升级便宜25%。", + "[Kaizo Upgrade replacement 162]Grandmas are twice as efficient.
Grandmas are 100 times cheaper.": "老太婆的效率提高两倍
老太婆便宜100倍。", + "[Kaizo Upgrade replacement 163]Random drops are 10% more common.
Decay rates -10%.": "随机掉落几率提高10%
衰变率-10%。", + "[Kaizo Upgrade replacement 164]Clicking is 50% more powerful, and the six mouse efficiency quadrupling upgrades multiply by 16 instead.": "点击效果增强50%,并且六个鼠标效率四倍升级改为乘以16。", + "[Kaizo Upgrade replacement 165]Cookie production multiplier +5% per Santa's levels.": "饼干生产乘数+5%/每个圣诞老人等级。", + "[Kaizo Upgrade replacement 168]Cookie production multiplier +42%.
All buildings are 1% cheaper.
All upgrades are 2% cheaper.": "饼干生产乘数+42%
所有建筑便宜1%
所有升级便宜2%。", + "[Kaizo Upgrade replacement 169]Cookie production multiplier +4%.": "饼干生产乘数+4%。", + "[Kaizo Upgrade replacement 170]Cookie production multiplier +5%.": "饼干生产乘数+5%。", + "[Kaizo Upgrade replacement 171]Cookie production multiplier +6%.": "饼干生产乘数+6%。", + "[Kaizo Upgrade replacement 172]Cookie production multiplier +7%.": "饼干生产乘数+7%。", + "[Kaizo Upgrade replacement 173]Cookie production multiplier +8%.": "饼干生产乘数+8%。", + "[Kaizo Upgrade replacement 174]Cookie production multiplier +9%.": "饼干生产乘数+9%。", + "[Kaizo Upgrade replacement 181]Allow you to trigger seasonal events at will, for a price.
Also makes all santa's gifts %1 times cheaper.": "允许您随意触发季节性事件,需支付代价。
同时使所有圣诞老人的礼物便宜%1倍。", + "[Kaizo Upgrade replacement 224]Wrinklers are 5% slower.": "饼干虫速度减慢5%。", + "[Kaizo Upgrade replacement 274]Maximum power click capacity increased to 2.": "最大强击容量增加至2。", + "[Kaizo Upgrade replacement 275]You gain 50% more power.": "您获得的能量增加50%。", + "[Kaizo Upgrade replacement 276]Unlocks the Boundless sack, allowing to summon power orbs at will.": "解锁无尽之袋,允许随意召唤力量法球。", + "[Kaizo Upgrade replacement 277]Power orbs spawn 50% more often and you deal 50% more damage to them.": "力量法球生成频率提高50%,并且您对它们造成的伤害提高50%。", + "[Kaizo Upgrade replacement 278]Maximum power click capacity increased to 3, and makes purifying decay also grant power.": "最大强击容量增加至3,并且净化衰变也会授予能量。", + "[Kaizo Upgrade replacement 279]You gain 20% more power for each full power click you have stored.": "您每存储一个完整的强击,获得的能量就增加20%。", + "[Kaizo Upgrade replacement 280]Maximum power click capacity increased to 5.": "最大强击容量增加至5。", + "[Kaizo Upgrade replacement 281]Adds the power gauge once decay is unlocked. Power clicks can be used to obliterate one wrinkler and deal massive damage to all other wrinklers.": "解锁衰变后添加能量计量表。强击可用于消灭一个饼干虫并对所有其他饼干虫造成巨大伤害。", + "[Kaizo Upgrade replacement 284]The time to spawn golden cookies varies less.": "生成黄金饼干的时间变化减小。", + "[Kaizo Upgrade replacement 292]Your clicks are 20% more effective against wrinklers. Wrinklers are 10% slower.": "您的点击对饼干虫的效果提高20%。饼干虫速度减慢10%。", + "[Kaizo Upgrade replacement 293]Wrinklers have a 10% chance to drop two souls instead of one.": "饼干虫有10%几率掉落两个虫魂而不是一个。", + "[Kaizo Upgrade replacement 325]Allows power clicks to be done on golden cookies, which increases its effect duration by 30%.
Power poked buff increases prestige effect by another 15%.": "允许对黄金饼干进行强击,将其效果持续时间延长30%
强力点击增益使威望效果再提高15%。", + "[Kaizo Upgrade replacement 331]Turning this on will give you a passive +50% CpS, but will prevent golden cookies from spawning.
Cost is equal to 10 minutes of CpS..": "开启此选项将给予您被动的+50% CpS,但会阻止黄金饼干生成。
成本等于10分钟的CpS。", + "[Kaizo Upgrade replacement 353]The shockwave from power clicking wrinklers repeats one more time.": "强击饼干虫产生的冲击波额外重复一次。", + "[Kaizo Upgrade replacement 354]You can perform power clicks on the big cookie as well, which stops decay for an extended period of time with each activation being considered a distinct method.": "您也可以对大饼干进行强击,这会在延长的时间内停止衰变,每次激活被视为一种独立的方法。", + "[Kaizo Upgrade replacement 355]The shockwave from power clicking wrinklers also knocks back all wrinklers hit.": "强击饼干虫产生的冲击波还会击退所有被击中的饼干虫。", + "[Kaizo Upgrade replacement 356]Power clicking the big cookie renders it \"Power poked\", boosting prestige effect by +20% for 20 seconds (strength stacks with each use) as well as preventing fatigue from building up while power poked.": "强击大饼干使其进入“强力点击”状态,在20秒内提升威望效果+20%(强度随每次使用叠加),并在强力点击状态下防止疲倦积累。", + "[Kaizo Upgrade replacement 357]Power poked effect lasts 50% longer, and clicking on the big cookie knocks back all wrinklers even more.": "强力点击效果持续时间延长50%,并且点击大饼干会更大幅度地击退所有饼干虫。", + "[Kaizo Upgrade replacement 358]Wrinkler click shockwaves trigger one more time and power clicking wrinklers deal 25% more damage.": "饼干虫点击冲击波额外触发一次,并且强击饼干虫造成的伤害提高25%。", + "[Kaizo Upgrade replacement 359]Power poked effect increased to +45% prestige effect.": "强力点击效果提升至威望效果+45%。", + "[Kaizo Upgrade replacement 363]This is the first heavenly upgrade; it unlocks the Heavenly chips system.
Each time you ascend, the cookies you made in your past life are turned into heavenly chips and prestige.
Heavenly chips can be spent on a variety of permanent transcendental upgrades.
Your prestige level also gives you a permanent +1% CpS per level.
Decay starts to break after -90%, becoming more powerful the more decay you have: ascending is no longer immediate and you gain a decay propagation increase that scales with current decay.
In addition, wrinklers have also inherited a part of the power: popping any that has already reached the big cookie will now inflict Coagulated and Cursed, and their speed also increases the more decay you have, for up to the point where decay breaks.": "这是第一个天堂升级;它解锁了天堂碎片系统。
每次您飞升时,您在前世制作的饼干会转化为天堂碎片威望
天堂碎片可用于购买各种永久的超凡升级。
您的威望等级还会每级永久提供+1% CpS
衰变在-90%之后开始突破,您的衰变越多,它就越强大:飞升不再立即进行,并且您会获得一个随当前衰变量增长的衰变传播增加。
此外,饼干虫也继承了一部分力量:击破任何已到达大饼干的饼干虫现在会施加凝结和诅咒效果,并且它们的速度也会随着您的衰变量增加而增加,直至衰变突破点。", + "[Kaizo Upgrade replacement 364]While exhausted, wrinkler souls halt decay for 10% longer..": "疲惫时,虫魂停止衰变的时间延长10%。", + "[Kaizo Upgrade replacement 397]Naturally spawning golden cookies have a 20% chance to spawn another golden cookie alongside it; the second golden cookie will always give Lucky.": "自然生成的黄金饼干有20%几率在旁边生成另一个黄金饼干;第二个黄金饼干总是给予幸运(Lucky)效果。", + "[Kaizo Upgrade replacement 408]Sugar lump-carrying wrinklers are 25% more likely to carry special sugar lumps.": "携带糖块的饼干虫携带特殊糖块的几率提高25%。", + "[Kaizo Upgrade replacement 409]You deal 30% more damage to lump-carrying wrinklers.": "您对携带糖块的饼干虫造成的伤害提高30%。", + "[Kaizo Upgrade replacement 410]Bifurcated sugar lumps give 2 sugar lumps 75% of the times instead of 50%.": "分叉糖块有75%的几率给予2个糖块,而不是50%。", + "[Kaizo Upgrade replacement 411]+1% prestige level effect on CpS.
+1% golden cookie effect duration.
+1% golden cookie lifespan.": "威望等级对CpS的效果+1%
黄金饼干效果持续时间+1%
黄金饼干存在时间+1%。", + "[Kaizo Upgrade replacement 412]+1% prestige level effect on CpS.
+1% golden cookie effect duration.
+1% golden cookie lifespan.": "威望等级对CpS的效果+1%
黄金饼干效果持续时间+1%
黄金饼干存在时间+1%。", + "[Kaizo Upgrade replacement 413]+1% prestige level effect on CpS.
+1% golden cookie effect duration.
+1% golden cookie lifespan.": "威望等级对CpS的效果+1%
黄金饼干效果持续时间+1%
黄金饼干存在时间+1%。", + "[Kaizo Upgrade replacement 451]Each Grandma makes meaty sugar lumps 0.06% more common and make meaty sugar lumps give 0.06% more, for up to 666 Grandmas.": "每个老太婆使多肉糖块出现几率提高0.06%并使多肉糖块给予量提高0.06%,最多666个老太婆。", + "[Kaizo Upgrade replacement 474]The duration of Power poked and Power surge +3%.
Dropped by drowsyfern plants.": "强力点击和能量涌动持续时间+3%
由嗜睡蕨植物掉落。", + "[Kaizo Upgrade replacement 475]The duration of Power poked and Power surge +7%.
Sugar lumps mature 7 minutes sooner.
Dropped by ichorpuff plants.": "强力点击和能量涌动持续时间+7%
糖块成熟时间提前7分钟
由灵液马勃菌植物掉落。", + "[Kaizo Upgrade replacement 495]Mouse over a wrinkler to see how long it would take for it to reach the big cookie or its progress to exploding.": "将鼠标悬停在饼干虫上以查看其到达大饼干或爆炸进度所需的时间。", + "[Kaizo Upgrade replacement 537]You keep all flavored cookies or eggs of a season of your choice across ascensions.": "您在飞升时保留您所选季节的所有风味饼干或彩蛋。", + "[Kaizo Upgrade replacement 562]Unlocks the Shimmering veil, which is a toggleable veil that protects you from exhaustion, preventing fatigue buildup and can temporarily reverse exhaustion. The veil is damaged over time.": "解锁闪烁面纱,这是一个可切换的面纱,保护您免受疲惫影响,防止疲倦积累并可以暂时逆转疲惫。面纱会随时间受损。", + "[Kaizo Upgrade replacement 592]Increases the Shimmering veil's maximum health by 35%.": "将闪烁面纱的最大生命值提高35%。", + "[Kaizo Upgrade replacement 640]The duration of Power poked and Power surge +10%.
": "强力点击和能量涌动持续时间+10%
", + "[Kaizo Upgrade replacement 645]Cookie production multiplier +10%.": "饼干生产乘数+10%。", + "[Kaizo Upgrade replacement 650]Golden cookies give 3% more cookies.
Dragon harvest, Dragonflight, and Dragon's hoard are 10% stronger.
Cost scales with CpS, but 10 times cheaper with a fully-trained dragon.": "黄金饼干给予的饼干数量增加3%
龙之收获、龙之军团和龙之宝藏效果增强10%
成本随CpS缩放,但拥有完全训练的龙时便宜10倍。", + "[Kaizo Upgrade replacement 651]Slotting auras no longer sacrifice any buildings.
Random drops are 3% more common.": "放置光环不再牺牲任何建筑。
随机掉落几率提高3%。", + "[Kaizo Upgrade replacement 801]The Shimmering veil takes 30% less time to recover from a collapse.": "闪烁面纱从崩溃中恢复所需的时间减少30%。", + "[Kaizo Upgrade replacement 802]Exhaustion recovery still occurs when the Shimmering veil is used, at 25% the speed.": "在疲惫中使用闪烁面纱时,疲惫值在25%的速度恢复。", + "[Kaizo Upgrade replacement 803]The Shimmering Veil also decreases decay rates by 20% when turned on.": "闪烁面纱在开启时还会使衰变率降低20%。", + "[Kaizo Upgrade replacement 805]You unleash 10% more prestige. Each big cookie click adds 0.005% onto the multiplier, and each wrinkler pop adds 0.25% onto the multiplier, for up to +100% in total.
Also unlocks the Jukebox, which allows you to play through every sound file in the game.": "您释放的威望增加10%。每次大饼干点击为乘数增加0.0005%,每个饼干虫击破为乘数增加0.25%,总计最多+100%
同时解锁点唱机,允许您播放游戏中的每个声音文件。", + + "[Kaizo Achievement replacement 79]Use the Elder Pledge to purify decay at least once.": "使用长者誓约净化衰变至少一次。", + "[Kaizo Achievement replacement 80]Use the Elder Pledge to purify decay 5 times in a run.": "在一轮游戏中使用长者誓约净化衰变5次。", + "[Kaizo Achievement replacement 82]Unlock the Elder Covenant.": "解锁长者盟约。", + "[Kaizo Achievement replacement 262]Burst the especially insufferable shiny wrinkler.": "击破特别令人难以忍受的发光虫。", + "[Kaizo Achievement replacement 103]Purchase the Heavenly key, the portal to infinite power.": "购买天堂密钥,通往无限力量的门户。", + "[Kaizo Achievement replacement 380]Have at least one copy of every species of plant (of any growth stage) in your garden simultaneously, then let a tick pass.": "在您的花园中同时拥有每种植物(任何生长阶段)的至少株,然后让一个周期过去。", + "[Kaizo Achievement replacement 432]Have your Sparkling wonder save your Shimmering veil from collapsing.": "让您的闪耀奇迹拯救您的闪烁面纱免于崩溃。", + "[Kaizo Achievement replacement 594]Start the Bingo researches by purchasing the research facility.": "通过购买研究设施启动宾果研究。", + "[Kaizo Achievement replacement 598]Have at least 52 wrinklers on-screen simultaneously.
Obtaining this achievement also obliterates all wrinklers.": "同时拥有至少 52 个屏幕上的饼干虫。
获得此成就也会湮灭所有饼干虫。", + + "requires %1": "需要 %1", + "You discovered a": "你发现了一个", + "Dragon's hoard!": "龙之宝藏!", + "Collecting treasures...": "收集宝藏中...", + "A batch of cookies!": "一批饼干!", + "A batch of biscuits!": "一批酥饼!", + "A mound of chocolate!": "一堆巧克力!", + "A handful of cookie dough!": "一把生面团!", + "A bag of silver!": "一袋银币!", + "A chest of bronze!": "一箱青铜!", + "A pit of dragon scales!": "一坑龙鳞!", + "A shiny stone!": "一块闪亮的石头!", + "A chest of gold!": "一箱金币!", + "A well of silver!": "一井白银!", + "A pack of platinum!": "一包铂金!", + "A bakery's worth of cookies!": "一整个面包店的饼干!", + "A bakery's worth of biscuit!": "一整个面包店的酥饼!", + "A mountain of pure dark chocolate!": "一座纯黑巧克力山!", + "A canyon of pure white chocolate!": "一条纯白巧克力峡谷!", + "A mound of cookie dough!": "一堆生面团!", + "A dragon's blessing!": "龙之祝福!", + "A spring of fresh water!": "一汪清泉!", + "Iridescent opal!": "虹彩蛋白石!", + "Exquisite amber!": "精美琥珀!", + "Flawless ruby!": "无瑕红宝石!", + "Intricate jade!": "繁复玉石!", + "Vivid amethyst!": "鲜艳紫水晶!", + "Lustrous emerald!": "光泽翡翠!", + "Brilliant sapphire!": "璀璨蓝宝石!", + "Gleaming golden pearl!": "闪亮金珍珠!", + "A whole room of gold!": "一整屋黄金!", + "A whole pool of platinum!": "一整池铂金!", + "A wedding ring!": "一枚婚戒!", + "A perfectly baked cookie!": "一块完美烘焙的饼干!", + "A perfect diamond!": "一颗完美钻石!", + "A key to a mysterious vault!": "一把神秘金库的钥匙!", + "A map of other treasures!": "一张其他宝藏的地图!", + "A magnificant palace!": "一座宏伟宫殿!", + "Clicking is 5% more powerful.
Click frenzy and Dragonflight is 50% more powerful.": "点击威力提升5%
点击狂热和龙之翱翔威力提升50%。", + "Aura: greatly boosted Click frenzy & Dragonflight": "光环:大幅强化点击狂热与龙之翱翔", + "Golden cookies may trigger a Dragon Harvest.
Changes: increased trigger chance": "黄金饼干可能触发龙之丰收
改动:提高了触发几率", + "Buildings sell back for 50% instead of 25%.
Selling buildings partially halts decay based on the square root of the amount of buildings sold.": "建筑出售返还50%(原为25%)。
出售建筑会根据出售数量的平方根部分停止衰变。", + "Aura: selling buildings halt decay": "光环:出售建筑停止衰变", + "Get 1% (multiplicative) closer to +60% golden cookie frequency for each x1.02 CpS multiplier from your purity.
(Note: this effect reduces the initial amount of time on Golden cookie click)": "纯净值每提供x1.02的CpS倍率,黄金饼干出现频率就(乘算)更接近+60%一点(1%)。
(注:此效果会减少黄金饼干点击的初始持续时间)", + "Aura: golden cookie frequency buff based on purity": "光环:基于纯净值的黄金饼干频率增益", + "While not purifying decay, you accumulate purification power that will be spent in the next purification; the banked purification power is kept even when this aura is off.": "当未进行净化时,你会积累净化能量,该能量将在下次净化时消耗;即使关闭此光环,储存的净化能量也会保留。", + "Aura: passively accumulate purification power": "光环:被动积累净化能量", + "+40% prestige level effect and potential.": "+40% 威望等级效果与潜力。", + "Aura: +40% prestige level effect and potential": "光环:+40%威望等级效果与潜力", + "Get 2.5% (multiplicative) closer to +125% Golden cookie frequency for each x0.9 CpS multiplier from your decay.
(Note: this effect reduces the initial amount of time on Golden cookie click)": "衰变值每提供x0.9的CpS倍率,黄金饼干出现频率就(乘算)更接近+125%一点(2.5%)。
(注:此效果会减少黄金饼干点击的初始持续时间)", + "Aura: great golden cookie frequency buff based on decay": "光环:基于衰变值的强力黄金饼干频率增益", + "Golden cookies may trigger a Dragonflight.
Changes: increased trigger chance scaling with the amount of golden cookie buffs existing, can never stack with Click frenzy": "黄金饼干可能触发龙之翱翔
改动:触发几率随现有黄金饼干增益数量增加而提高,永不与点击狂热叠加", + "Golden cookies may trigger a Dragon's hoard.": "黄金饼干可能触发龙之宝藏。", + "Aura: golden cookies may trigger a Dragon's hoard": "光环:黄金饼干可能触发龙之宝藏", + "Elder frenzy from Wrath cookies appear 4x as often.": "来自愤怒饼干的长者狂热出现频率变为4倍。", + "Aura: 4x Elder frenzy chance from Wrath cookies": "光环:愤怒饼干触发长者狂热几率4倍", + "Having purity now makes positive buffs run out slower, for up to -50% buff duration decrease rate.": "拥有纯净值现在会使正面增益效果消耗更慢,最多降低50%的增益持续时间减少速率。", + "Aura: purity decreases buff duration decrease rate": "光环:纯净值降低增益持续时间减少速率", + "+123% CpS per golden cookie on-screen, multiplicative.
Each reflective blessing counts as one-thirds of a golden cookie.": "屏幕上每存在一个黄金饼干,CpS提高+123%(乘算)。
每个反射祝福计为三分之一个黄金饼干。", + "Selling buildings has a 1 in 100,000 chance to summon a lump-carrying wrinkler per building sold.": "出售建筑时,每出售一个建筑,有十万分之一的几率召唤一个携带糖块的饼干虫。", + "Aura: sell buildings to summon lump wrinklers": "光环:出售建筑以召唤糖块虫", + "Clicking on the big cookie knock back all wrinklers slightly, but excessive use in a short amount of time may lead to reduced effectiveness.": "点击大饼干会轻微击退所有饼干虫,但在短时间内过度使用可能会导致效果减弱。", + "Aura: global wrinkler knockback on click": "光环:点击时全局击退饼干虫", + + "Prestige effect x%1 for %2!": "威望效果 x%1,持续 %2!", + "The duration of Power poked and Power surge +%1%.": "强力戳刺与能量奔涌的持续时间+%1%。", + "Power click base": "强击基础", + "Power clicks": "强击次数", + "This is your power gauge, representing the amount of power clicks you have as well as the amount of power you will need to get to your next power click.": "这是你的能量槽,代表你拥有的强击次数以及获得下一次强击所需的能量。", + "Orb clicked!": "能量球已点击!", + "Boundless sack": "无尽之袋", + "Popping power orbs store a fraction of their power within this sack, and allows you to summon a power orb when filled.
Hotkey: Ctrl + B": "戳破能量球会将其部分能量储存于此袋中,充满后允许你召唤一个能量球。
快捷键:Ctrl + B", + "%1 out of %2 power orbs stored": "已储存能量球:%1 / %2", + "Ready to release!": "准备释放!", + + "Decay gains \"Acceleration\", an ever-increasing boost to decay propagation. Past x1.5 acceleration, acceleration also starts boosting the amount of halting methods required to halt by the same amount / 1.5.
Perform tasks in order to complete challenges and get rewards. You can find the list of challenges in the Stats menu during the challenge mode.": "衰变获得\"加速值\",一个持续增长的衰变传播增益。超过x1.5加速值后,加速值还会开始以相同量/1.5的比例增加所需的停止方法数量。
执行任务以完成挑战并获得奖励。在挑战模式期间,你可以在统计菜单中找到挑战列表。", + "Challenge complete!": "挑战完成!", + "challenge %1": "挑战%1", + "You completed challenge %1!": "你完成了挑战 %1!", + "Hide completed challenges": "隐藏已完成的挑战", + "Show completed challenges": "显示已完成的挑战", + "Hide unfinished challenges": "隐藏未完成的挑战", + "Show unfinished challenges": "显示未完成的挑战", + "Come back after getting some more heavenly upgrades! (Specifically, the Vial of challenges)": "获得更多威望升级后再回来!(特别是挑战药水)", + "Challenges": "挑战", + "Challenges completed:": "已完成的挑战:", + "Highest cookies reached in Unshackled decay:": "在末日衰减中达到的最高饼干数:", + "Because you are not in the Unshackled decay challenge mode, you cannot complete any challenges. However, you can still view any unlocked challenges, and the rewards still work.": "因为你不在末日衰减挑战模式中,你无法完成任何挑战。但你仍然可以查看任何已解锁的挑战,且奖励仍然有效。", + "Because a conditional challenge is currently ongoing, you cannot complete any other challenges.": "因为一个条件性挑战正在进行中,你无法完成任何其他挑战。", + "Challenges with a circle in the middle indicates that it is a prerequisite to unlocking another challenge.": "中间带有圆圈的挑战表示它是解锁另一个挑战的先决条件。", + "Normal challenges marked with red on the edges cannot be (or can no longer be) completed in this ascension due to the challenge's requirements.": "边缘标记为红色的普通挑战由于挑战要求,无法(或不再能)在此次飞升中完成。", + "Challenges that are not completed and highlighted with this color requires you to enable it at the beginning of the ascension. While one is active, no other challenges can be obtained.": "未完成且以此颜色高亮的挑战要求你在飞升开始时启用它。当一个挑战处于活动状态时,无法获得其他挑战。", + "Challenges highlighted with this color (and with this color for challenges that require enabling when ascending) can be completed repeatedly; each completion gives you the reward stacking with previous completions, and simultaneously raises the requirement.": "以此颜色高亮的挑战(以及需要在飞升时启用并以此颜色高亮的挑战)可以重复完成;每次完成都会给你与先前完成叠加的奖励,同时提高要求。", + "Shift-click a completed challenge to disable or enable its reward.": "Shift-点击已完成的挑战以禁用或启用其奖励。", + "Choose a challenge to start your ascension with, or skip. If a challenge is chosen, you cannot complete any other challenges in the same ascension; the chosen challenge will be highlighted red in stats. To complete the challenges not shown here, click skip.": "选择一个挑战开始你的飞升,或跳过。如果选择了一个挑战,你无法在同一飞升中完成任何其他挑战;所选挑战将在统计中显示为红色。要完成此处未显示的挑战,请点击跳过。", + "Skip": "跳过", + "Bake %1 cookies this ascension.": "在此次飞升中烘焙%1块饼干。", + "Survive for %1.": "存活%1。", + "Bake %1 cookies this ascension, then keep it for %2.": "在此次飞升中烘焙%1块饼干,并保持%2。", + "Nothing (optional challenge)": "无(可选挑战)", + "Get all Halloween cookies before acceleration reaches x1.55, or get all common (non-special) Easter eggs before acceleration reaches x1.6.": "在加速值达到x1.55前获得所有万圣节饼干,或在加速值达到x1.6前获得所有普通(非特殊)复活节彩蛋。", + "You unleash +12% more prestige per Halloween or Christmas cookie": "每个万圣节或圣诞节饼干使你释放+12%更多威望", + "Random drop chance +25%": "随机掉落几率+25%", + "Improved by challenge %1! +%2% more prestige unleashed!": "由挑战%1改进!释放+%2%更多威望!", + "All eggs are +50% more common.": "所有彩蛋出现几率+50%。", + "Get all common (non-special) Easter eggs before acceleration reaches x1.55.": "在加速值达到x1.55前获得所有普通(非特殊)复活节彩蛋。", + "You unleash +5% more prestige per common Easter egg": "每个普通复活节彩蛋使你释放+5%更多威望", + "You unleash +10% more prestige per rare Easter egg": "每个稀有复活节彩蛋使你释放+10%更多威望", + "The Dragon Guts aura is always slotted.": "龙之胆魄光环始终处于槽位。", + "Wrinklers spawn closer to the big cookie and moves faster.": "饼干虫生成位置更靠近大饼干且移动更快。", + "Your clicks halt decay 3 times faster.": "你的点击停止衰变速度加快3倍。", + "Bake %1.": "烘焙%1。", + "Switching your auras is free because you have the Dragon teddy bear.": "因为你拥有龙泰迪熊,切换光环是免费的。", + "Enchanted Permanent upgrade slot I": "附魔永久升级槽 I", + "Enchanted Permanent upgrade slot II": "附魔永久升级槽 II", + "Enchanted Permanent upgrade slot III": "附魔永久升级槽 III", + "Enchanted Permanent upgrade slot IV": "附魔永久升级槽 IV", + "Enchanted Permanent upgrade slot V": "附魔永久升级槽 V", + "Bake %1 with no normal upgrades bought.": "在未购买任何普通升级的情况下烘焙%1。", + "Halved flavored cookie cost": "风味饼干成本减半", + "Activate the Elder Pledge in the first %1 of the run.": "在运行的第一个%1内激活长者誓约。", + "The Memory capsule becomes free": "记忆胶囊变为免费", + "Research is twice as fast": "研究速度加快两倍", + "Unlocks the Touch of force": "解锁冲击之触", + "Reach a base CpS multiplier from purity of at least %1 with no spells casted.": "在未施放任何法术的情况下,达到至少%1的来自纯净值的基础CpS倍率。", + "CpS multiplier x%1 for each x2 CpS multiplier from your purity": "来自纯净值的CpS倍率每达到x2,CpS倍率提高x%1", + "Clicking halts decay %1% faster": "点击停止衰变速度加快%1%", + "Improves the Molten piercer to destroy wrinklers with one more layer": "改进熔融穿刺者以摧毁多一层的饼干虫", + "Reach the Elfling santa stage without ever spending any wrinkler souls.": "在不花费任何虫魂的情况下达到小精灵圣诞老人阶段。", + "The golden hat is 10 times cheaper": "黄金帽价格降低10倍", + "Wrinklers approach the big cookie %1 slower": "饼干虫接近大饼干的速度减慢%1", + "Only buy every other building type, starting from Grandmas, and bake %1.": "只购买每隔一种建筑类型(从老奶奶开始),并烘焙%1。", + "Bake %1 without popping any wrinklers.": "在不戳破任何饼干虫的情况下烘焙%1。", + "Your clicks are %1 more effective against wrinklers": "你的点击对饼干虫的效果提高%1", + "Bake %1 without ever having any purity or clicking any golden cookies.": "在从未拥有任何纯净值或点击任何黄金饼干的情况下烘焙%1。", + "Golden cookies are %1 more effective in purifying decay": "黄金饼干净化衰变的效果提高%1", + "You gain %1 click power but also gains %2 required halt for each building you own. You cannot cast any spells.": "你获得%1点击产出,但拥有的每个建筑也会增加%2所需停止值。你无法施放任何法术。", + "Bake %1 cookies.": "烘焙%1块饼干。", + "You regenerate worship swaps %1 times faster.": "你恢复崇拜交换的速度加快%1倍。", + "You deal %1% more damage to power orbs.": "你对能量球造成的伤害提高%1%。", + "You start with the Shimmering veil turned on, but if the Shimmering veil collapses, force ascend. Having purity greatly heals the veil.": "你开始时闪烁面纱处于开启状态,但如果闪烁面纱崩溃,则强制飞升。拥有纯净值会极大地治愈面纱。", + "While exhausted, wrinkler souls halt decay for 10% longer": "疲惫时,虫魂停止衰变的持续时间延长10%", + "Reindeers spawn constantly, regardless of season, and massively amplify decay when clicked. Easy clicks and wrinklers are disabled.": "驯鹿持续生成(无论季节),点击时会大幅放大衰变。轻松点击和饼干虫被禁用。", + "Make %1 with no cookie clicks or wrinkler pops.": "在没有点击饼干或戳破饼干虫的情况下制作%1。", + "Bake %1, but the game is rotated 180 degrees clockwise. Some things may stop working. You can ascend by hitting ctrl+A in this mode.": "烘焙%1,但游戏顺时针旋转180度。某些功能可能停止工作。在此模式下,你可以按Ctrl+A飞升。", + "Wrinklers have much more health, spawn much more often, and have a 50% chance to not drop souls, but wrinkler souls also give much more power and power orbs spawn much more frequently.": "饼干虫拥有更多生命值,生成更频繁,且有50%几率不掉落虫魂,但虫魂也会提供更多能量,且能量球生成更频繁。", + "Power clicking wrinklers deal 25% more damage to all wrinklers": "对饼干虫进行强击会对所有饼干虫造成25%更多伤害", + "You start each ascension with 1 power click worth of power and an Utenglobe filled with normal souls": "你每次飞升开始时拥有相当于1次强击的能量和一个充满普通虫魂的乌滕球", + "Milk is 10% more powerful.": "牛奶效果提高10%。", + "Bake %1, but typing stuff is required to do most things. Type \"help\" to view the available actions. To compensate, decay is massively nerfed.": "烘焙%1,但需要输入内容来完成大多数操作。输入\"help\"查看可用操作。作为补偿,衰变被大幅削弱。", + "Unlocks more codes in the Script writer, accessible by typing the name of the leading programmer.": "在脚本编写器中解锁更多代码,可通过输入首席程序员的名称访问。", + "View keywords": "查看关键词", + "You can delete everything you've typed using the enter key.": "你可以使用回车键删除已输入的所有内容。", + "Opens the help menu": "打开帮助菜单", + "help": "help", + "Closes the menu": "关闭菜单", + "exit": "exit", + "Clicked!": "已点击!", + "Clicks the big cookie": "点击大饼干", + "click": "click", + "Buys or sells 1 of the corresponding building": "购买或出售1个相应建筑", + "[buy/sell] a [building name]": "[buy/sell] a [建筑名称]", + "Buy or sell 10 of the corresponding building": "购买或出售10个相应建筑", + "[buy/sell] 10 [building name plural]": "[buy/sell] 10 [建筑名称复数]", + "Buy or sell 100 of the corresponding building": "购买或出售100个相应建筑", + "[buy/sell] 100 [building name plural]": "[buy/sell] 100 [建筑名称复数]", + "Couldn't buy upgrade": "无法购买升级", + "Buy the upgrade": "购买升级", + "purchase [upgrade name]": "purchase [升级名称]", + "Buy all upgrades": "购买所有升级", + "buy all upgrades": "buy all upgrades", + "Couldn't toggle switch": "无法切换开关", + "Toggles the switch": "切换开关", + "toggle [switch name]": "toggle [开关名称]", + "Scrolls the news ticker": "滚动新闻提示", + "flip to next page": "flip to next page", + "Opens/closes the stats menu
(typing is not required to open any other menus)": "打开/关闭统计菜单
(打开任何其他菜单无需输入)", + "open stats": "open stats", + "Ascends": "飞升", + "confirm ascend": "confirm ascend", + "Pops a reindeer": "戳破一只驯鹿", + "ding ding reindeer begone": "ding ding reindeer begone", + "Clicks a golden or wrath cookie at that one third of the screen": "点击屏幕该三分之一区域的黄金或愤怒饼干", + "pop [golden/wrath] cookie at [left/middle/right] section of screen": "pop [golden/wrath] cookie at [left/middle/right] section of screen", + "opens Santa, if available": "打开圣诞老人(如果可用)", + "open santa": "open santa", + "closes Santa": "关闭圣诞老人", + "close santa": "close santa", + "opens Krumblor, cookie dragon, if available": "打开克鲁姆伯勒,饼干龙(如果可用)", + "open krumblor": "open krumblor", + "closes Krumblor, cookie dragon": "关闭克鲁姆伯勒,饼干龙", + "close krumblor": "close krumblor", + "Santa leveling...": "圣诞老人升级中...", + "if Santa is open, level up the santa": "如果圣诞老人已打开,则升级圣诞老人", + "level up santa": "level up santa", + "Krumblor evolving...": "克鲁姆伯勒进化中...", + "if Krumblor, cookie dragon is open, evolve it": "如果克鲁姆伯勒,饼干龙已打开,则进化它", + "evolve krumblor": "evolve krumblor", + "if possible, prompt to select first aura": "如果可能,提示选择第一个光环", + "open first aura for selection": "open first aura for selection", + "if possible, prompt to select second aura": "如果可能,提示选择第二个光环", + "open second aura for selection": "open second aura for selection", + "if on aura selection prompt, selects and confirms the aura": "如果在光环选择提示上,则选择并确认光环", + "slot [dragon aura name]": "slot [龙光环名称]", + "Closes all active notifications": "关闭所有活动通知", + "close all notifications": "close all notifications", + "levels up the building": "升级建筑", + "using lumps level up [building name plural]": "using lumps level up [建筑名称复数]", + "seven clicks on currently selected wrinkler": "对当前选中的饼干虫点击七次", + "pop": "pop", + "clicks on currently hovered over power orb": "点击当前悬停的能量球", + "pow": "pow", + "opens the minigame": "打开小游戏", + "view [minigame name]": "view [小游戏名称]", + "closes the minigame": "关闭小游戏", + "close [minigame name]": "close [小游戏名称]", + "casts the spell in the Grimoire": "在魔法书中施放法术", + "cast [spell name]": "cast [法术名称]", + "slots the corresponding god into the corresponding slot, or puts it back into the roster": "将相应的神放入相应的槽位,或放回名册", + "slot [god primary name] to [diamond/ruby/jade/roster] slot
(primary name excludes the title, e.g. \"Mokalsium, Mother Spirit\" to \"mokalsium\")": "slot [神主名称] to [diamond/ruby/jade/roster] slot
(主名称不包括标题,例如\"Mokalsium, Mother Spirit\" 到 \"mokalsium\")", + "takes the loan in the Stock market, if available": "在股票市场接受贷款(如果可用)", + "take loan [loan number]": "take loan [贷款编号]", + "hires a broker in the Stock market": "在股票市场雇佣经纪人", + "hire a broker": "hire a broker", + "buys or sells that quantity of a goods in the Stock market": "在股票市场购买或出售该数量的商品", + "stock [buy/sell] [1/10/100/max/all] of [the goods' proper name]": "stock [buy/sell] [1/10/100/max/all] of [商品正式名称]", + "upgrades the office in the Stock market": "升级股票市场的办公室", + "upgrade your office": "upgrade your office", + "changes the tickspeed in the Stock market": "更改股票市场的滴答速度", + "change tickspeed": "change tickspeed", + "refills magic in the Grimoire using a sugar lump": "使用糖块补充魔法书中的魔法值", + "refill magic": "refill magic", + "refills worship swaps in the Pantheon using a sugar lump": "使用糖块补充万神殿中的崇拜交换次数", + "refill worship swaps": "refill worship swaps", + "activates the sugar lump ability (not sacrifice garden) in the Garden": "在花园中激活糖块能力(非牺牲花园)", + "supercharge garden": "supercharge garden", + "uses the garden tool as if clicking on it": "使用花园工具,如同点击它一样", + "garden use [garden tool name]": "garden use [花园工具名称]", + "selects or unselects the seed corresponding to the plant, if possible": "如果可能,选择或取消选择与植物对应的种子", + "select [garden plant name]": "select [花园植物名称]", + "plants the currently selected seed on currently hovered over tile": "将当前选中的种子种植在当前悬停的图块上", + "plant": "plant", + "uproots the currently hovered over plant": "拔除当前悬停的植物", + "uproot": "uproot", + "Bake %1, but power passively accumulates with speed scaling with current acceleration. In addition, the duration of Power surge buff decreases with acceleration. Upon reaching maximum power click capacity, force ascend.": "烘焙%1,但能量会被动积累,速度随当前加速值缩放。此外,能量奔涌增益的持续时间随加速值减少。达到最大强击容量时,强制飞升。", + "Power poked duration +%1%.": "强力戳刺持续时间+%1%。", + "Power poked strength +%1%.": "强力戳刺强度+%1%。", + "You gain +%1% power.": "你获得+%1%能量。", + "Fortunes appear %1 more often.": "财富出现频率提高%1。", + "Bake %1, but typing stuff is required to do most things. Type \"help\" to view the available actions.": "烘焙%1,但需要输入内容来完成大多数操作。输入\"help\"查看可用操作。", + "Get a Click frenzy in the first %1 of the run.": "在运行的第一个%1内获得一个点击狂热。", + "(Note: Click frenzies cannot be gotten from naturally spawning Golden cookies or Wrath cookies in this mod)": "(注:在此模组中,无法从自然生成的黄金饼干或愤怒饼干获得点击狂热)", + "Click frenzy from Force the Hand of Fate Grimoire spell base chance %1 --> %2": "来自命运之手法术的点击狂热基础几率 %1 --> %2", + "A %1 %2 multiplier that gradually decreases with your current progress in a run": "一个%1 %2倍率,随着你在运行中的当前进度逐渐减少", + "All mouse upgrades give %1% of CpS instead of 1%. You make %2 cookies each click by default.": "所有鼠标升级提供%1%的CpS,而不是1%。默认情况下,你每次点击制作%2块饼干。", + "Get a Click frenzy and a Frenzy (or any other golden cookie buff) active simultaneously in the first %1 of the run.": "在运行的第一个%1内,同时激活点击狂热狂热(或任何其他黄金饼干增益)。", + "(does not contribute to future click power multiplier checks)": "(不贡献于未来的点击产出倍率检查)", + "Lucky day no longer resets on ascension": "幸运日不再在飞升时重置", + "click power": "点击产出", + "(Currently: %1)": "(当前:%1)", + "Get a direct click power multiplier of at least x%1 in the first %2 of the run.": "在运行的第一个%2内,获得至少x%1直接点击产出倍率。", + "Slotting gods in the Pantheon has a %1% chance to not use any worship swaps": "在万神殿中放置神灵有%1%的几率不消耗任何崇拜交换次数", + "(note: there is no way to stack Click frenzy and Dragonflight in this mod)": "(注:在此模组中无法叠加点击狂热和龙之翱翔)", + "Sacrificing the garden leaves the %1 seed in addition to Baker's Wheat": "牺牲花园除了留下贝克小麦外,还会留下%1种子", + "Unlocks the Power channel in your Utenglobe, converting souls into power at double the rates": "在你的乌滕球中解锁能量通道,以双倍速率将虫魂转化为能量", + "Get a direct click power multiplier of at least x%1 with only one buff active, without Santa's helpers, while not having a Dragonflight, and without help from the Garden. Then, click a naturally spawning golden cookie with Reaper of Fields slotted. (while the click power requirement is met)": "在仅有一个增益激活、没有圣诞老人帮手、没有龙之翱翔且没有花园帮助的情况下,获得至少x%1直接点击产出倍率。然后,在装备田野收割者的情况下点击一个自然生成的黄金饼干。(在满足点击产出要求时)", + "All dragon auras cost 50 less buildings to unlock": "所有龙光环的解锁所需建筑减少50", + "Your dragon starts out hatched with the first aura unlocked": "你的龙开始时已孵化并解锁第一个光环", + "Obtain a direct click power multiplier of at least x%1 during a Frenzy in the first %2 of the run, without casting more than one spell, and with the Golden switch turned on.": "在运行的第一个%2内的狂热期间,获得至少x%1直接点击产出倍率,施放不超过一个法术,且黄金开关处于开启状态。", + "The Golden switch is %1% cheaper": "黄金开关价格降低%1%", + "Each dragon aura only takes %1 buildings each to unlock.": "每个龙光环仅需%1个建筑即可解锁。", + "Golden cookies have a high chance to grant Mini-frenzies, a distinct buff from regular Frenzies.": "黄金饼干有高几率授予迷你狂热,这是一个与常规狂热不同的增益。", + "Click frenzies from Force the Hand of Fate are much more common.": "来自命运之手的点击狂热更为常见。", + "Get at least %1 Golden cookie effects active at the same time in the first %2 of the run.": "在运行的第一个%2内,同时激活至少%1个黄金饼干效果。", + "Chance to spawn a Golden cookie when selling with Dragon Orbs %1% --> %2%": "使用龙之宝珠出售时生成黄金饼干的几率 %1% --> %2%", + "Evolving your dragon no longer consume buildings": "进化你的龙不再消耗建筑", + "three": "三", + "You keep Trigger fingers and Non-euclidean baking trays across ascensions": "你在飞升之间保留扳机指非欧几里得烤盘", + "Speed baking IV": "速焙 IV", + "Get a CpS multiplier from buffs of at least x%1 and a direct click power multiplier of at least x%2 simultaneously, in the first %3 of the run": "在运行的第一个%3内,同时获得至少x%1的来自增益的CpS倍率和至少x%2的直接点击产出倍率", + "%1 and %2": "%1和%2", + "Get %1 distinct Golden cookie effects active at once": "同时激活%1个不同的黄金饼干效果", + "Script writer code to purify decay by an especially large amount": "脚本编写器代码,用于大量净化衰变", + "Unlocks a Elder Covenant mode to allow the strength stacking of Frenzy.": "解锁一种长者盟约模式,允许狂热强度叠加。", + "Get any golden cookie buff to be at least %1 long.": "使任何黄金饼干增益持续时间至少为%1。", + "Get %1 of any buffs active simultaneously.": "同时激活%1个任何增益。", + "Dragon Orbs can ignore up to 1 buff when attempting to spawn a Golden cookie.": "龙之宝珠在尝试生成黄金饼干时最多可忽略1个增益。", + "Click frenzy from Force the Hand of Fate chance +%1%": "来自命运之手的点击狂热几率+%1%", + "Get a Click Frenzy of at least %1 long.": "获得一个持续时间至少为%1的点击狂热。", + "Chance of Click Frenzy from Force the Hand of Fate is massively increased and magic regeneration is faster. Gambler's Fever dream cannot be used. You cannot refill minigames with sugar lumps.": "来自命运之手的点击狂热几率大幅增加,魔法恢复更快。无法使用赌徒狂热梦。你无法用糖块补充小游戏。", + "Get another Click frenzy while a Click frenzy is ongoing.": "在点击狂热进行期间获得另一个点击狂热。", + "Valentine's cookies are between 2x and 5x stronger": "情人节饼干效果提升2倍5倍", + "Get hint": "获取提示", + "Each exhaustion lasts 15% shorter": "每次疲惫持续时间缩短15%", + "While having no purity and is not coagulated, decay rates -25%.": "当没有纯净值且未凝结时,衰变速率-25%。", + "By selling wizard towers at the right moment, you can cast Force the Hand of Fate twice in a row.": "通过在适当时刻出售巫师塔,你可以连续施放两次命运之手。", + "You start with an acceleration of x%1.": "你开始时拥有x%1的加速值。", + "Stack a Frenzy, Dragon Harvest, and a Click frenzy, then gain at least +200% purity and at least %1 cookies.": "叠加狂热、龙之丰收和点击狂热,然后获得至少+200%纯净值和至少%1块饼干。", + "Unlocks a Elder Covenant mode to allow the strength stacking of Dragon Harvest.": "解锁一种长者盟约模式,允许龙之丰收强度叠加。", + "Each research upgrade gives an additional +%1% CpS.": "每个研究升级额外提供+%1% CpS。", + "With less than %1x acceleration, increase decay by %2 times over the course of an Elder Pledge purification.": "在加速值小于%1x的情况下,在长者誓约净化过程中将衰变增加%2倍。", + "With Challenge %1 completed: +%2% CpS": "完成挑战%1后:+%2% CpS", + "The required halt increase from acceleration starts immediately instead of at x1.5.": "来自加速值的所需停止值增加立即开始,而不是在x1.5时开始。", + "All halting methods are %1% stronger.": "所有停止方法效果提高%1%。", + "The Earth Shatterer aura halts decay for 10% longer": "碎地者光环停止衰变的持续时间延长10%", + "You get +1% CpS for each flavored cookie you have": "你拥有的每个风味饼干提供+1% CpS", + "The game becomes very weird.": "游戏变得非常奇怪。", + "Augments are adjusted, but every available augment becomes free.
Refill cooldowns are three times as short.
You start with only Baker's wheat and Meddleweed, and sacrifice the garden by getting every seed. (Your seeds outside of this challenge will be restored when you leave this challenge)": "增强物被调整,但每个可用增强物变为免费
补充冷却时间缩短三倍。
你开始时只有贝克小麦和干涉草,并通过获得所有种子来牺牲花园。(你在此挑战外的种子将在离开此挑战时恢复)", + "CpS +20% permanently per sacrifice, for up to +80%": "每次牺牲永久提供+20% CpS,最多+80%", + "Corresponding boost in the glucose furnace if you have not sacrificed the garden before": "如果你之前未牺牲过花园,则在糖块熔炉中有相应提升", + "Marbledpuree": "大理果泥", + "Polargurt": "极地凝乳", + "Improved by challenge %1!": "由挑战%1改进!", + "Rhodorange": "杜鹃橙", + "Eldersite": "长老石", + "Malachilla": "孔雀草", + "Celestough": "星辰面团", + "Chocosidian": "巧克石", + "No souls to pull!": "没有可拉的虫魂!", + "Protocol No escape activated!": "协议:无处可逃已激活!", + "Souls slowed!": "虫魂减速!", + "Wrinkler soul deceleration for %1!": "饼干虫魂减速持续%1!", + "Prestige maximally escalated!": "威望最大化提升!", + "Scroll activated!": "卷轴已激活!", + "Prestige escalating in progress...": "威望提升进行中...", + "Prestige escalation complete!": "威望提升完成!", + "Current cumulative effects: +%1% prestige unleashed": "当前累积效果:+%1%威望释放", + "Cooldown refreshed!": "冷却已刷新!", + "Your Scroll of prestige escalation is ready to use again!": "你的威望提升卷轴已准备就绪,可再次使用!", + "Not enough souls!": "虫魂不足!", + "The scroll is not on cooldown!": "卷轴不在冷却中!", + "Production of most advanced building +%1% for %2!": "最先进建筑产量+%1%,持续%2!", + "Click damage against wrinklers +%1% for %2!": "对饼干虫的点击伤害+%1%,持续%2!", + "wrinkler damage x%1!": "对饼干虫伤害x%1!", + "Souls pulled: %1": "拉取的虫魂:%1", + "Phantom tethers activated!": "幻影锁链已激活!", + "Enhanced clicks": "强化点击", + "Clicks halt decay and build up fatigue %1x faster for %2!": "点击停止衰变和积累疲劳的速度加快%1倍,持续%2!", + "Invalid input!": "输入无效!", + "\"%1\" is not a valid spin amount!": "\"%1\"不是有效的旋转量!", + + "[Kaizo Upgrade name 0]Golden sugar": "黄金糖块", + "[Kaizo Upgrade name 1]Cursedor": "魔化之击", + "[Kaizo Upgrade name 2]Cursedor [inactive]": "魔化之击 [未激活]", + "[Kaizo Upgrade name 3]Cursedor [active]": "魔化之击 [已激活]", + "[Kaizo Upgrade name 4]The ultimate cookie": "终极饼干", + "[Kaizo Upgrade name 5]Purity vaccines": "纯净疫苗", + "[Kaizo Upgrade name 6]Unshackled Purity": "无束缚纯净", + "[Kaizo Upgrade name 7]Unshackled Elder Pledge": "无束缚长者誓约", + "[Kaizo Upgrade name 8]Uranium rolling pins": "铀制擀面杖", + "[Kaizo Upgrade name 9]Sparkling wonder": "闪耀奇迹", + "[Kaizo Upgrade name 10]Withering prices": "凋零价格", + "[Kaizo Upgrade name 11]Caramelized luxury": "焦糖奢华", + "[Kaizo Upgrade name 12]Meaty disgust": "肉食厌恶", + "[Kaizo Upgrade name 13]High-fructose sugar lumps": "高果糖糖块", + "[Kaizo Upgrade name 14]Rainy day lumps": "雨天糖块", + "[Kaizo Upgrade name 15]Purification domes": "净化穹顶", + "[Kaizo Upgrade name 16]Decayed cookie": "衰变饼干", + "[Kaizo Upgrade name 17]Weekly finger-cutting": "每周切指", + "[Kaizo Upgrade name 18]Concentrated workplace": "浓缩工作场所", + "[Kaizo Upgrade name 19]Everything repellant": "万物驱避剂", + "[Kaizo Upgrade name 20]Improved resting condition": "改良休息条件", + "[Kaizo Upgrade name 21]Unified production lines": "统一生产线", + "[Kaizo Upgrade name 22]Sensible policies": "明智政策", + "[Kaizo Upgrade name 23]Morals": "道德准则", + "[Kaizo Upgrade name 24]Reduced babbling": "减少胡言乱语", + "[Kaizo Upgrade name 25]No more engines": "不再有引擎", + "[Kaizo Upgrade name 26]Lab-free alchemy": "无实验室炼金术", + "[Kaizo Upgrade name 27]Anti-anti-gravity-anti-matter": "反反重力反物质", + "[Kaizo Upgrade name 28]The present": "当下礼物", + "[Kaizo Upgrade name 29]Matter conversion": "物质转换", + "[Kaizo Upgrade name 30]-1st electron layer": "-1电子层", + "[Kaizo Upgrade name 31]Quantum tunneling": "量子隧穿", + "[Kaizo Upgrade name 32]0.00000000001": "0.00000000001", + "[Kaizo Upgrade name 33]Restarts": "重新开始", + "[Kaizo Upgrade name 34]Going bowling": "去打保龄", + "[Kaizo Upgrade name 35]A nice walk outside": "户外漫步", + "[Kaizo Upgrade name 36]Me": "自我", + "[Kaizo Upgrade name 37]Ultra-concentrated sweetener": "超浓缩甜味剂", + "[Kaizo Upgrade name 38]Lumpy evolution": "块状进化", + "[Kaizo Upgrade name 39]Wrinkler ambergris": "饼干虫龙涎香", + "[Kaizo Upgrade name 40]Kitten janitors": "小猫清洁工", + "[Kaizo Upgrade name 41]Script writer": "脚本编写器", + "[Kaizo Upgrade name 42]Bakery": "面包店", + "[Kaizo Upgrade name 43]Cookie selector": "饼干选择器", + "[Kaizo Upgrade name 44]Enchanted Permanent upgrade slot I": "附魔永久升级槽 I", + "[Kaizo Upgrade name 45]Enchanted Permanent upgrade slot II": "附魔永久升级槽 II", + "[Kaizo Upgrade name 46]Enchanted Permanent upgrade slot III": "附魔永久升级槽 III", + "[Kaizo Upgrade name 47]Enchanted Permanent upgrade slot IV": "附魔永久升级槽 IV", + "[Kaizo Upgrade name 48]Enchanted Permanent upgrade slot V": "附魔永久升级槽 V", + "[Kaizo Upgrade name 49]Market manipulator": "市场操纵者", + "[Kaizo Upgrade name 50]Illustrium fingernails": "光辉指甲", + "[Kaizo Upgrade name 51]Vegetable-oiled joints": "植物油关节", + "[Kaizo Upgrade name 52]Ultraviolet obliteration": "紫外湮灭", + "[Kaizo Upgrade name 53]Method acting": "方法演技", + "[Kaizo Upgrade name 54]Sinister glint": "邪恶闪光", + "[Kaizo Upgrade name 55]Future clicks": "未来点击", + "[Kaizo Upgrade name 56]Shanzhai glucosium": "山寨葡萄糖", + "[Kaizo Upgrade name 57]Vial of challenges": "挑战药水", + "[Kaizo Upgrade name 58]Box of challenges": "挑战盒子", + "[Kaizo Upgrade name 59]Truck of challenges": "挑战卡车", + "[Kaizo Upgrade name 60]Shell breaker": "外壳破坏者", + "[Kaizo Upgrade name 61]Liquidating touch": "清算之触", + "[Kaizo Upgrade name 62]Carbon disintegration": "碳崩解", + "[Kaizo Upgrade name 63]Rare earths": "稀土元素", + "[Kaizo Upgrade name 64]Holy glow": "神圣光辉", + "[Kaizo Upgrade name 65]Click flurry": "点击连击", + "[Kaizo Upgrade name 66]Lunar flares": "月球耀斑", + "[Kaizo Upgrade name 67]Touch of nature": "自然之触", + "[Kaizo Upgrade name 68]Chance encounter": "偶然相遇", + "[Kaizo Upgrade name 69]Lucky radar": "幸运雷达", + "[Kaizo Upgrade name 70]Shimmering encapsulation": "闪烁封装", + "[Kaizo Upgrade name 71]Immense flow": "巨大流量", + "[Kaizo Upgrade name 72]Muscle relaxant": "肌肉松弛剂", + "[Kaizo Upgrade name 73]Trigger fingers": "扳机指", + "[Kaizo Upgrade name 74]Non-euclidean baking trays": "非欧几里得烤盘", + "[Kaizo Upgrade name 75]Santaic doom": "圣诞末日", + "[Kaizo Upgrade name 76]Memory capsule": "记忆胶囊", + "[Kaizo Upgrade name 77]Carpal miniaturization": "腕骨微型化", + "[Kaizo Upgrade name 78]Permanent residence": "永久居所", + "[Kaizo Upgrade name 79]Rooftop botanies": "屋顶植物园", + "[Kaizo Upgrade name 80]Collapsing extraction": "坍缩提取", + "[Kaizo Upgrade name 81]Sub-minimum wages": "低于最低工资", + "[Kaizo Upgrade name 82]Starter funds": "启动资金", + "[Kaizo Upgrade name 83]Saints of the world": "世界圣徒", + "[Kaizo Upgrade name 84]Magic": "魔法", + "[Kaizo Upgrade name 85]Hyperspeed railguns": "超速轨道炮", + "[Kaizo Upgrade name 86]100% organic hyper-catalysts": "100%有机超催化剂", + "[Kaizo Upgrade name 87]At home": "在家", + "[Kaizo Upgrade name 88]Future heist": "未来劫案", + "[Kaizo Upgrade name 89]The medicore force": "平庸之力", + "[Kaizo Upgrade name 90]Blackbody indigestion": "黑体消化不良", + "[Kaizo Upgrade name 91]Ordinary beginner's luck": "普通新手运气", + "[Kaizo Upgrade name 92]Enlarging rays": "放大射线", + "[Kaizo Upgrade name 93]Clean code": "清洁代码", + "[Kaizo Upgrade name 94]Buy-one-get-one-free universes": "买一送一宇宙", + "[Kaizo Upgrade name 95]Puberty": "青春期", + "[Kaizo Upgrade name 96]Brotherhood": "兄弟会", + "[Kaizo Upgrade name 97]Wrinkly balls": "皱巴巴的球", + "[Kaizo Upgrade name 98]Santaic zoom": "圣诞缩放", + "[Kaizo Upgrade name 99]Rift to the beyond": "通往彼界的裂隙", + "[Kaizo Upgrade name 100]Molten piercer": "熔融穿刺者", + "[Kaizo Upgrade name 101]Bazillion fingers": "无数手指", + "[Kaizo Upgrade name 102]Rolling pin pins": "擀面杖针", + "[Kaizo Upgrade name 103]A very special watering can": "非常特别的喷壶", + "[Kaizo Upgrade name 104]Labor at all costs": "不惜一切代价的劳动", + "[Kaizo Upgrade name 105]Intensive manufacturers": "密集型制造商", + "[Kaizo Upgrade name 106]ChStTh-onk": "ChStTh-onk", + "[Kaizo Upgrade name 107]Bodily worships": "身体崇拜", + "[Kaizo Upgrade name 108]Unscientific science": "不科学的科学", + "[Kaizo Upgrade name 109]Green engines": "绿色引擎", + "[Kaizo Upgrade name 110]Cerebral transmutations": "大脑转化", + "[Kaizo Upgrade name 111]Trans-dimensional conveyor": "跨维度传送带", + "[Kaizo Upgrade name 112]Dilated time": "膨胀时间", + "[Kaizo Upgrade name 113]Parity vacuums": "奇偶真空", + "[Kaizo Upgrade name 114]Echo chambers": "回音室", + "[Kaizo Upgrade name 115]A 9.007 quadrillion sided die": "9.007千的五次方面骰子", + "[Kaizo Upgrade name 116]Systematic rescaling": "系统重新缩放", + "[Kaizo Upgrade name 117]Frameworks": "框架", + "[Kaizo Upgrade name 118]The universal shredder": "通用粉碎机", + "[Kaizo Upgrade name 119]An actual central nervous system in the center": "中心的真实中枢神经系统", + "[Kaizo Upgrade name 120]Integrated entertainment": "集成娱乐", + "[Kaizo Upgrade name 121]Blessed monuments": "祝福纪念碑", + "[Kaizo Upgrade name 122]Paint of proof": "证明之漆", + "[Kaizo Upgrade name 123]Integrated alloys": "集成合金", + "[Kaizo Upgrade name 124]Stabilizing crystal": "稳定水晶", + "[Kaizo Upgrade name 125]Poky fingers": "迟钝手指", + "[Kaizo Upgrade name 126]Niceness": "友善", + "[Kaizo Upgrade name 127]Special \"water\"": "特殊\"水\"", + "[Kaizo Upgrade name 128]Increased work hours": "增加工作时间", + "[Kaizo Upgrade name 129]Infant labour": "童工", + "[Kaizo Upgrade name 130]Dedollarization": "去美元化", + "[Kaizo Upgrade name 131]Goodbye declaration": "告别宣言", + "[Kaizo Upgrade name 132]Level 9 spellbooks": "9级法术书", + "[Kaizo Upgrade name 133]Chocolate nebulae": "巧克力星云", + "[Kaizo Upgrade name 134]Ag+": "银离子", + "[Kaizo Upgrade name 135]Robot visitors": "机器人访客", + "[Kaizo Upgrade name 136]Memory": "记忆", + "[Kaizo Upgrade name 137]Anti-condensers": "反冷凝器", + "[Kaizo Upgrade name 138]Tesseract": "超立方体", + "[Kaizo Upgrade name 139]Luck balancer": "运气平衡器", + "[Kaizo Upgrade name 140]Mandatory meta reference": "强制元参考", + "[Kaizo Upgrade name 141]ReferenceError": "引用错误", + "[Kaizo Upgrade name 142]Defunct waffle shops": "倒闭的华夫饼店", + "[Kaizo Upgrade name 143]Sound business decisions": "明智的商业决策", + "[Kaizo Upgrade name 144]Caste system": "种姓制度", + "[Kaizo Upgrade name 145]Chocolate nail polish": "巧克力指甲油", + "[Kaizo Upgrade name 146]Body ovens": "身体烤箱", + "[Kaizo Upgrade name 147]Semi-permeable ground": "半透性地面的", + "[Kaizo Upgrade name 148]Diamond pickaxes": "钻石镐", + "[Kaizo Upgrade name 149]Specialty managers": "专业经理", + "[Kaizo Upgrade name 150]Post-mortal debt": "死后债务", + "[Kaizo Upgrade name 151]Loudspeakers": "扬声器", + "[Kaizo Upgrade name 152]Taller towers": "更高的塔", + "[Kaizo Upgrade name 153]Rooms at the back": "后面的房间", + "[Kaizo Upgrade name 154]Crystal chemistry": "晶体化学", + "[Kaizo Upgrade name 155]The other side of the portal": "传送门的另一侧", + "[Kaizo Upgrade name 156]The fourth hand": "第四只手", + "[Kaizo Upgrade name 157]The C Boson": "C玻色子", + "[Kaizo Upgrade name 158]Interference filters": "干扰过滤器", + "[Kaizo Upgrade name 159]One-sided die": "单面骰子", + "[Kaizo Upgrade name 160]Glasses": "眼镜", + "[Kaizo Upgrade name 161]CookieOS": "饼干操作系统", + "[Kaizo Upgrade name 162]Milkfalls": "牛奶瀑布", + "[Kaizo Upgrade name 163]Satellite brains": "卫星大脑", + "[Kaizo Upgrade name 164]Performance enhancing drugs": "性能增强药物", + "[Kaizo Upgrade name 165]A golden hat": "黄金帽", + "[Kaizo Upgrade name 166]Soul compression": "灵魂压缩", + "[Kaizo Upgrade name 167]Weightlessness": "失重", + "[Kaizo Upgrade name 168]Thunder marker": "雷电标记", + "[Kaizo Upgrade name 169]Purity chips": "纯净碎片", + "[Kaizo Upgrade name 170]Purity stand": "纯净支架", + "[Kaizo Upgrade name 171]Purity bakery": "纯净面包店", + "[Kaizo Upgrade name 172]Purity factory": "纯净工厂", + "[Kaizo Upgrade name 173]Purity key": "纯净钥匙", + "[Kaizo Upgrade name 174]Blessings of the starfall": "星陨祝福", + "[Kaizo Upgrade name 175]Scroll of no escape": "无处可逃卷轴", + "[Kaizo Upgrade name 176]Scroll of no escape": "无处可逃卷轴", + "[Kaizo Upgrade name 177]Scroll of prestige escalation": "威望提升卷轴", + "[Kaizo Upgrade name 178]Scroll of prestige escalation": "威望提升卷轴", + "[Kaizo Upgrade name 179]Scroll of opportune power": "时机力量卷轴", + "[Kaizo Upgrade name 180]Scroll of opportune power": "时机力量卷轴", + "[Kaizo Upgrade name 181]Phantom clicks": "幻影点击", + "[Kaizo Upgrade name 182]Scroll of prestige unbound": "无束缚威望卷轴", + "[Kaizo Upgrade name 183]Scroll of prestige unbound": "无束缚威望卷轴", + "[Kaizo Upgrade name 184]Mangled cookies": "破碎饼干", + "[Kaizo Upgrade name 185]Eternal light": "永恒之光", + "[Kaizo Upgrade name 186]Ancient shiny busters": "远古的闪光虫破坏者", + "[Kaizo Upgrade name 187]Mana-enhanced magic": "法力增强魔法", + "[Kaizo Upgrade name 188]Sugar burning": "糖燃烧", + "[Kaizo Upgrade name 189]Pulsatic discharge": "脉冲放电", + "[Kaizo Upgrade name 190]Rebound boost": "反弹提升", + "[Kaizo Upgrade name 191]Counter strike": "反击", + "[Kaizo Upgrade name 192]Withering shock": "凋零冲击", + "[Kaizo Upgrade name 193]Back in a flash": "瞬间返回", + "[Kaizo Upgrade name 194]Box of kittens": "一盒小猫", + "[Kaizo Upgrade name 195]Confused kitten": "困惑的小猫", + "[Kaizo Upgrade name 196]Tiny kitten": "微小猫咪", + "[Kaizo Upgrade name 197]Negative kitten": "负面小猫", + "[Kaizo Upgrade name 198]Scroll of phantom tethers": "幻影锁链卷轴", + "[Kaizo Upgrade name 199]Scroll of phantom tethers": "幻影锁链卷轴", + "[Kaizo Upgrade name 200]Voyager": "航行者", + "[Kaizo Upgrade name 201]Your first idea": "你的第一个想法", + "[Kaizo Upgrade name 202]Scroll of charged clicks": "充能点击卷轴", + "[Kaizo Upgrade name 203]Scroll of charged clicks": "充能点击卷轴", + "[Kaizo Upgrade name 204]Polar power": "极地力量", + "[Kaizo Upgrade name 205]The autobiography": "自传", + "[Kaizo Upgrade name 206]Scroll of sustained distance": "持续距离卷轴", + "[Kaizo Upgrade name 207]Scroll of sustained distance": "持续距离卷轴", + "[Kaizo Upgrade name 208]Traveler's soulbound scroll pouch": "旅行者的灵魂绑定卷轴袋", + "[Kaizo Upgrade name 209]Heavenly soulbound scroll bag": "天堂灵魂绑定卷轴袋", + "[Kaizo Upgrade name 210]Undying soulbound scroll backpack": "不朽灵魂绑定卷轴背包", + "[Kaizo Upgrade name 211]Transcendental soulbound scroll pocket dimension": "超然灵魂绑定卷轴次元袋", + "[Kaizo Upgrade name 212]Scroll of favored resurrection": "受眷顾的复活卷轴", + "[Kaizo Upgrade name 213]Scroll of space shift": "空间转移卷轴", + "[Kaizo Upgrade name 214]Finger sharpening": "指尖锐化", + "[Kaizo Upgrade name 215]Elder fancies": "长老的奇想", + "[Kaizo Upgrade name 216]Cosmic harvests": "宇宙丰收", + "[Kaizo Upgrade name 217]The reality liquid": "现实液", + "[Kaizo Upgrade name 218]Factory factory": "工厂工厂", + "[Kaizo Upgrade name 219]Inherited fortunes": "继承的财富", + "[Kaizo Upgrade name 220]In the clouds": "云端之上", + "[Kaizo Upgrade name 221]Solar focus": "太阳聚焦", + "[Kaizo Upgrade name 222]Highway of light": "光之高速路", + "[Kaizo Upgrade name 223]Golden cookie mining": "黄金饼干采矿", + "[Kaizo Upgrade name 224]Space fractures": "空间裂隙", + "[Kaizo Upgrade name 225]The everman": "永恒者", + "[Kaizo Upgrade name 226]Photoids": "光蚀体", + "[Kaizo Upgrade name 227]The end of the Highway of light": "光之高速路的尽头", + "[Kaizo Upgrade name 228]Quantum chancemakers": "量子机遇制造器", + "[Kaizo Upgrade name 229]Enlargement": "放大术", + "[Kaizo Upgrade name 230]The marker": "标记者", + "[Kaizo Upgrade name 231]This universe": "此方宇宙", + "[Kaizo Upgrade name 232]Examples": "范例", + "[Kaizo Upgrade name 233]Awakened power": "觉醒之力", + "[Kaizo Achievement name 0]You gotta start somewhere": "总得有个开始", + "[Kaizo Achievement name 1]+110% purity is a lot": "+110%纯净值很多了", + "[Kaizo Achievement name 2]Half life 1.8 CONFIRMED": "半衰期1.8确认", + "[Kaizo Achievement name 3]P4M: Purified 4 Mines": "P4M:净化4座矿场", + "[Kaizo Achievement name 4]5-dimensional Purification Punch": "5维净化拳", + "[Kaizo Achievement name 5]We couldn't afford a 4.5": "我们买不起4.5", + "[Kaizo Achievement name 6]Not a luck-related achievement": "非运气相关成就", + "[Kaizo Achievement name 7]90 degrees to NaN": "90度转向NaN", + "[Kaizo Achievement name 8]To a better world": "迈向更美好的世界", + "[Kaizo Achievement name 9]Consistency obtained": "获得一致性", + "[Kaizo Achievement name 10]Gravity of the situation": "局势的严重性", + "[Kaizo Achievement name 11]The old days were better": "旧日更好", + "[Kaizo Achievement name 12]Pretty close to infinity": "非常接近无限", + "[Kaizo Achievement name 13]As bright as a hypernova": "如超新星般明亮", + "[Kaizo Achievement name 14]Pure skill": "纯粹技巧", + "[Kaizo Achievement name 15]In filtration": "过滤中", + "[Kaizo Achievement name 16]var decay = undefined": "var 衰变 = 未定义", + "[Kaizo Achievement name 17]Third-universe idleverses": "第三宇宙放置宇宙", + "[Kaizo Achievement name 18]Innocence": "天真无邪", + "[Kaizo Achievement name 19]Self remade": "自我重塑", + "[Kaizo Achievement name 20]Weak grail material": "弱圣杯材料", + "[Kaizo Achievement name 21]Morale boost": "士气提升", + "[Kaizo Achievement name 22]Glimmering hope": "微光希望", + "[Kaizo Achievement name 23]Saving grace": "救赎之恩", + "[Kaizo Achievement name 24]Last chance": "最后机会", + "[Kaizo Achievement name 25]Ultimate death": "终极死亡", + "[Kaizo Achievement name 26]Magmaball effect": "岩浆球效应", + "[Kaizo Achievement name 27]Fast (but you wish it wasn't)": "快速(但你希望不是)", + "[Kaizo Achievement name 28]Unstoppable": "不可阻挡", + "[Kaizo Achievement name 29]Calcium overflow": "钙溢出", + "[Kaizo Achievement name 30]First contact": "第一次接触", + "[Kaizo Achievement name 31]Better, faster, stronger": "更好、更快、更强", + "[Kaizo Achievement name 32]The olympiad": "奥林匹克", + "[Kaizo Achievement name 33]Godhood": "神性", + "[Kaizo Achievement name 34]Getting a taste of what's to come": "尝到未来的滋味", + "[Kaizo Achievement name 35]All boxed up": "全部装箱", + "[Kaizo Achievement name 36]Esoteric world traveler": "神秘世界旅行者", + "[Kaizo Achievement name 37]Practice makes perfect": "熟能生巧", + "[Kaizo Achievement name 38]Total mastery": "完全掌握", + "[Kaizo Achievement name 39]Corrupted and tainted": "腐化与污染", + "[Kaizo Achievement name 40]A light reward": "轻微奖励", + "[Kaizo Achievement name 41]Extracts of the cursed": "被诅咒的提取物", + "[Kaizo Achievement name 42]Energy of the unseen": "未见能量", + "[Kaizo Achievement name 43]Humanity of the impure": "不纯者之人性", + "[Kaizo Achievement name 44]Possibility of the bonded": "联结可能性", + "[Kaizo Achievement name 45]Finality of the unrest": "动荡终结", + "[Kaizo Achievement name 46]A new era of purity": "纯净新时代", + "[Kaizo Achievement name 47]Suffering in nobility": "高贵中的苦难", + "[Kaizo Achievement name 48]Golden escalation": "黄金升级", + "[Kaizo Achievement name 49]Greatness unfolding over millenia, without a reason, without an end": "千年伟大,无缘无故,无休无止", + "[Kaizo Achievement name 50]Undead terrorism": "亡灵恐怖主义", + "[Kaizo Achievement name 51]Way to soulflow": "灵魂流动之道", + "[Kaizo Achievement name 52]Mass x velocity": "质量 x 速度", + "[Kaizo Achievement name 53]Unnatural resistance": "非自然抗性", + "[Kaizo Achievement name 54]Speed baking IV": "速焙 IV", + "[Kaizo Achievement name 55]Fleshmangler": "血肉撕裂者", + "[Kaizo Achievement name 56]Horrorsubduer": "恐怖镇压者", + "[Kaizo Achievement name 57]The red wire": "红线", + "[Kaizo Achievement name 58]Innocence farmer": "天真农夫", + "[Kaizo Achievement name 59]Mass reindeer duplication": "大规模驯鹿复制", + + "Liquify Politician": "液化政客", + "Purifies a lot of decay with a very high purity limit, but the purity limit is halved for every golden cookie effect active.": "以非常高的纯净值上限净化大量衰变,但每个活跃的黄金饼干效果会使纯净值上限减半。", + "Amplifies your decay.": "放大你的衰变。", + "Corruption cleared!": "腐化已清除!", + "Backfire! Corruption intensified!": "反噬!腐化加剧!", + "Manifest Spring": "显化清泉", + "Decay propagation is %1% slower for the next %2 minutes.
(this stacks with itself multiplicatively)": "在接下来的%2分钟内,衰变传播速度减慢%1%。
(此效果与自身乘算叠加)", + "Decay propagation is %1% faster for the next %2 minutes.": "在接下来的%2分钟内,衰变传播速度加快%1%。", + "The water shall flow!": "泉水将流淌!", + "Oops! Pipes broken!": "糟糕!管道破裂!", + "Unending flow": "无尽之流", + "Halts decay for an especially long time. (each use is considered a distinct method)": "停止衰变特别长的时间。(每次使用被视为独立方法)", + "Stagnant body": "停滞水体", + "Decay propagation rate +%1% for %2!": "衰变传播速率+%1%,持续%2!", + "unlock %1": "解锁%1", + "Cost to unlock:": "解锁成本:", + "Magic regen multiplier from %1: %2": "来自%1的魔法恢复速度乘数:%2", + "The spell picks a random building that you have at least 1 of, and gives you five of them for free that also doesn't affect its current price.": "该法术随机选择一个你至少拥有1个的建筑,免费给你五个,且不影响其当前价格。", + "Can give up to %1 free buildings for each building type.": "每种建筑类型最多可提供%1个免费建筑。", + "Lose one of every building.": "失去每种建筑各一个。", + "One of every single one of your buildings disappear in a puff of smoke!": "你的每种建筑都有一个在一阵烟雾中消失!", + "Spells cast: %1 (total: %2; cross-legacies total: %3)": "法术施放:%1(总计:%2;跨传承总计:%3)", + "Summon a golden cookie with high chance (100%) to yield Click frenzy. Each existing golden cookie makes this spell +%1% more likely to backfire.": "召唤一个黄金饼干,有高达100%的几率产生点击狂热。每个存在的黄金饼干使此法术反噬几率增加+%1%。", + "Each golden cookie buff active reduces the chance of clicking buffs.": "每个活跃的黄金饼干增益减少点击增益的几率。", + "Obtaining this achievement also makes the second part of challenge reward %1 twice as powerful.": "获得此成就还会使挑战奖励%1的第二部分效果翻倍。", + "Summons a power orb if there aren't any currently present, and continuously attracts every present power orb to your mouse for the next %1 seconds.": "如果当前没有能量球则召唤一个,并在接下来的%1秒内持续吸引所有现有能量球至你的鼠标。", + "Continuously heals and speeds up every present power orb for the next %1 seconds.": "在接下来的%1秒内持续治疗并加速所有现有能量球。", + "Come, power orbs! Come!": "来吧,能量球!来吧!", + "Better luck next time...": "下次好运...", + "Bending Power orbs to your will.": "让能量球屈从于你的意志。", + "Those Power orbs are quite a headache...": "那些能量球真让人头疼...", + "Power clicks not yet unlocked!": "强击尚未解锁!", + "+%1% prestige level effect for %2.": "+%1%威望等级效果,持续%2。", + "Trigger a %1-minute coagulation and lose %2% of your cookies owned.": "触发持续%1分钟的凝结效果并失去所持饼干的%2%。", + "Holify Abomination": "圣化畸变体", + "Obliterate the biggest wrinkler without any negative effects or losing any cookies, and automatically stores its soul if possible.": " obliterate最大的饼干虫,无任何负面效果或饼干损失,并自动储存其虫魂(如果可能)。", + "Summons a shiny wrinkler.": "召唤一个发光虫。", + "Wrinkler obliteration in progress...": "饼干虫圣化进行中...", + "But the shiny wrinkler couldn't fit.": "但发光虫无法容纳。", + "Beware of the beast!": "小心野兽!", + "The current ongoing challenge forbids you from using this spell!": "当前进行的挑战禁止你使用此法术!", + "Summons a crafty pixie to predict good luck on your next cast, then refunds all magic used. Will guarantee success as long as the next cast casts a spell with the same backfire chance as this one, and that the next spell is casted in the same ascension.
A successful prediction cannot be changed without casting another spell or ascending.": "召唤一个狡猾的精灵预测你下次施法的好运,然后返还所有消耗的魔法。只要下次施放的法术反噬几率与此法术相同,且在同一飞升中进行,就能保证成功。
成功的预测无法在不施放其他法术或飞升的情况下改变。", + "Uses up the magic spent without predicting anything.": "消耗魔法但未预测任何事。", + "Great news! Next spell will not backfire!": "好消息!下次法术不会反噬!", + "Summoning failed!": "召唤失败!", + + "plants age %1 times faster": "植物成熟速度加快%1倍", + "Mature plants harvested: %1 (total: %2 (%3))": "成熟植物收获:%1(总计:%2(%3))", + "Click to plant %1.": "点击种植%1。", + "all decay-halting sources' effect": "所有衰停来源的效果", + "wrath cookies replacement": "愤怒饼干替换", + "wrinklers approach speed": "饼干虫接近速度", + "decay-halting power": "衰停力量", + "decay rates": "衰变速率", + "decay momentum": "衰变动量", + "decay propagation": "衰变传播", + "harvest when mature to temporarily halt decay": "成熟时收获以暂时停止衰变", + "harvest when mature to purify decay": "成熟时收获以净化衰变", + "explodes and temporarily halts decay at the end of its lifecycle": "生命周期结束时爆炸并暂时停止衰变", + "explodes and purifies decay at the end of its lifecycle": "生命周期结束时爆炸并净化衰变", + "if there are no golden cookies onscreen, summons a reflective blessing on mature harvest": "如果屏幕上没有黄金饼干,成熟收获时召唤一个反射祝福", + "harvest when mature to damage and knock back all wrinklers": "成熟时收获以伤害并击退所有饼干虫", + "harvest when mature to recover %1 worth of exhaustion": "成熟时收获以恢复价值%1的疲惫值", + "magic regeneration speed": "魔法恢复速度", + "harvest when mature to completely stop decay for a maximum of %1": "成熟时收获以完全停止衰变,最多持续%1", + "harvest when mature to purify all decay": "成熟时收获以净化所有衰变", + "Click to open the garden augmentation menu.": "点击打开花园增强菜单。", + "%1 cooldown after triggering an augment": "触发增强后有%1冷却", + "Trigger augment": "触发增强", + "Triggering any augment automatically refills your soil timer; however, they have a shared cooldown of %1 on use.": "触发任何增强会自动补充土壤计时器;然而,它们有%1的共享使用冷却。", + "Click to trigger %1 plant growth tick with x%2 spread and mutation rate.": "点击触发%1次植物生长滴答,具有x%2的传播和突变率。", + "Click to trigger %1 plant growth ticks at once with x%2 spread and mutation rate.": "点击一次性触发%1次植物生长滴答,具有x%2的传播和突变率。", + "Click to trigger 1 plant growth tick with a guaranteed mutation on every tile that can have a mutation.": "点击触发1次植物生长滴答,在每个可突变的图块上保证突变。", + + "Requires %1!": "需要%1!", + "unlock god": "解锁神明", + "Note: this effect stacks in strength with multiple sells.": "注意:此效果随多次出售而强度叠加。", + "While this spirit is slotted, you cannot switch seasons.": "当此精神被放置时,你无法切换季节。", + "Clicks halt decay %1% faster.": "点击停止衰变速度加快%1%。", + "You build up fatigue %1% faster.": "你积累疲劳速度加快%1%。", + "Wrinkler move -%1% as fast.": "饼干虫移动速度减慢%1%。", + "Wrath cookies replaces Golden cookies with %1% less decay.": "愤怒饼干替换黄金饼干,衰变减少%1%。", + "Purifying decay grants a buff.": "净化衰变授予一个增益。", + "-%1% decay for %2 seconds.": "-%1%衰变,持续%2秒。", + "Purifying decay grants a buff that weakens decay propagation.": "净化衰变授予一个削弱衰变传播的增益。", + "Decay propagation rate -%1%.": "衰变传播速率-%1%。", + "Sugar lump-carrying wrinklers appear %1x more often.": "携带糖块的饼干虫出现频率提高%1倍。", + "Golden and wrath cookie gain +%1%.": "黄金和愤怒饼干增益+%1%。", + "Input to modify the tick speed.": "输入以修改滴答速度。", + "(Minimum: %1 per tick)": "(最低:每滴答%1)", + + "Before you start...": "开始之前...", + "Kaizo Cookies uses a different save slot than vanilla cookie clicker for your convenience. This means that:": "极限烘培(Kaizo Cookies)为您的便利使用了与原版饼干点点乐不同的存档槽。这意味着:", + "Once you confirm this prompt, you will be placed into a fresh save, but your original save remains untouched and can be accessed at any time by simply unloading the mod.": "一旦您确认此提示,您将进入一个全新的存档,但您的原始存档将保持不变,并且可以随时通过卸载此模组来访问。", + "You can unload the mod by %1.": "您可以通过%1来卸载此模组。", + "removing the mod from your modlist and restarting the game": "从模组列表中移除此模组并重启游戏", + "Your Kaizo cookies save will reappear if the mod is loaded again on the same website, and this prompt will not appear again. Changing (or even wiping) the original save or the Kaizo cookies save have no effect on the other.": "如果您在同一网站上再次加载此模组,您的极限烘培存档将重新出现,且此提示不会再次弹出。更改(甚至清除)原始存档或极限烘培存档不会影响另一方。", + "simply reloading, and removing it from your mod list if you are using a mod manager": "直接重新加载页面,如果您使用的是模组管理器,还需将其从模组列表中移除", + "If you wish to play on your Kaizo save while simultaneously having your main save open, you can open two tabs of your game, then loading the mod on one; or alternatively, you can use a different site to host your Kaizo cookies save, such as cookieclicker.eu or cdn.dashnet.org.": "如果您希望在打开主存档的同时游玩极限烘培(Kaizo cookies)存档,您可以打开两个游戏标签页,并在其中一个加载此模组;或者,您也可以使用其他网站来托管您的极限烘培存档,例如cookieclicker.eucdn.dashnet.org。", + "Because this is a content mod, you will start again from scratch, and your original progress will not carry into your new save.": "由于这是一个内容模组,您将从零开始,您原有的进度不会继承到新存档中。", + "While you may export and import your main save into the new save, doing so is highly discouraged, is cheating, and will likely heavily break the game.": "虽然您可以将主存档导出并导入到新存档中,但这样做是非常不推荐的,属于作弊行为,并且很可能会严重破坏游戏体验。", + "Once you've read and understood the above, click Let's go! to start playing. Enjoy!": "一旦您阅读并理解了以上内容,请点击开始吧!来开始游戏。祝您玩得愉快!", + "Let's go!": "开始吧!", + "Nevermind": "再想想", + "Time Slow": "时间减缓", + "Hold %1": "按住 %1", + "x%1": "x%1", + "Stronger time slow": "更强时间减缓", + "Makes time slow multiplier to game speed 0.4 instead of 0.5.": "使时间减缓对游戏速度的倍率变为0.4而非0.5。", + "Shift + Z": "Shift + Z", + "Hold to click!": "按下连击!", + + "Allows you to slot an awakened scroll.": "允许您装备一个觉醒卷轴。", + "Can slot purified scrolls.": "可装备纯净卷轴。", + "Pick an awakened scroll to activate": "选择一个觉醒卷轴来激活", + "Select a scroll by clicking on its box.": "点击卷轴框来选择卷轴。", + "You don't have any scrolls unlocked.": "您尚未解锁任何卷轴。", + "Refreshes cooldown of Scroll of prestige escalation": "刷新威望提升卷轴的冷却时间", + "Already slotted in the %1!": "已装备在%1中!", + "Each big cookie click counts as 2 clicks for all upgrades that unlock based on click count.": "每点击一次大饼干,对于所有基于点击次数解锁的升级,均计为2次点击。", + "Type \"%1\" to make your next click summon a weakened wrinkler with at least one special trait at the mouse.": "输入\"%1\"使您的下一次点击在点击地召唤一个带有至少一种特殊特性的虚弱饼干虫。", + "Summon weakened special wrinklers": "召唤虚弱的特殊饼干虫", + "Wrinkler summoned!": "饼干虫已召唤!", + "It was a %1!": "这是一只%1!", + "shiny": "发光虫", + "bomber": "自爆虫", + "phantom": "幻影虫", + "Scroll activation halted": "卷轴激活已中断", + "There is already an ongoing resurrection!": "已有一个正在进行中的复活过程!", + "Fetching assets...": "获取资源中...", + "Time slow toggle mode": "时间减缓切换模式", + "Changes the behavior of the ctrl key on time slowing; if on, ctrl toggles time slow, else time is only slowed while holding it": "改变Ctrl键对时间减缓的作用方式;开启时,Ctrl键切换时间减缓状态,否则仅在按住时减缓时间。", + "Kaizo Cookies load error": "极限烘培(Kaizo Cookies)加载错误", + "There was an error while loading your Kaizo Cookies save. Please open the developer console, screenshot the contents, export the save below, and report it at the discord server, then CLOSE THE GAME. DO NOT SAVE UNDER ANY CIRCUMSTANCE UNTIL THE ISSUE IS FIXED.": "加载您的极限烘培(Kaizo Cookies)存档时出现错误。请打开开发者控制台,截图记录内容,导出下方存档,并在Discord服务器上报告此问题,然后关闭游戏。在问题修复前,请勿在任何情况下进行保存。", + "Upgrades a new tier of building price scaling pushback upgrades.": "升级一个新阶层的建筑价格增长抑制升级。", + "It's raining shiny souls for %1!": "正在为%1降下发光虫魂雨!", + "Hint: use the %1 aura!": "提示:使用%1光环!", + "DECAYED": "衰减", + "Decay broken!": "衰减已损坏!", + "Abandon the current run; you will not ascend, you will lose your current progress, but you will keep anything ascending normally keeps.": "放弃当前运行;您将不会飞升,您将失去当前进度,但您将保留任何正常飞升时保留的内容。", + "sacrifice %1": "牺牲 %1", + "Summon reindeer frenzy": "召唤驯鹿狂热", + "It seems that there's nothing here.": "此处似乎空无一物。", + "Quick scrolls": "快速卷轴", + "Allows you to use a panel to activate each scroll without typing in anything.": "允许您使用面板激活各卷轴,无需输入任何内容。", + "Classic layout": "经典布局", + "Restores the old look of the game, with the big cookie to the left and buildings in the middle.": "恢复游戏的旧版外观,大饼干位于左侧,建筑位于中央。", + "Want the old looks back?": "想要恢复旧版外观吗?", + "To restore the game's layout to how it was without any mods, go to the \"options\" menu and turn on \"Classic layout\", or click me!": "要将游戏布局恢复至未安装任何模组时的样子,请前往\"选项\"菜单开启\"经典布局\",或者点击此处!", + "Not yet halted": "尚未停止", + "%1 refreshed!": "%1已刷新!", + "Claiming the scroll refreshed its cooldown!": "领取卷轴刷新了其冷却时间!", + "Phantom essences used:": "已使用幻影精华:", + "all time: ": "总计:", + "Total: %1": "总计: %1", + "+%1%!": "+%1%!", + "Each big cookie click has a %1% chance to halt decay %2x more.": "每次点击大饼干有%1%的几率额外停止%2x的衰变。", + "Haggler's dream": "议价者之梦", + "Sugar boost": "糖块增益", + "Soul storm": "灵魂风暴", + "Cursed": "诅咒效果", + "Coagulated": "凝结效果", + "Distorted": "空间扭曲", + "Storm of creation": "创造风暴", + "Smited": "天罚", + "Pure suppression": "纯粹压制", + "Trick or treat": "不给糖就捣蛋", + "Unending flow": "无尽之流", + "Stagnant body": "停滞之躯", + "Power poked": "能量戳刺", + "Power surge": "能量涌动", + "Mini frenzy": "小型狂热", + "Reversed momentum": "动量反转", + "Rebound boost": "回弹增益", + "Counter strike": "反击", + "Enhanced clicks": "强化点击", + "The effect cap of Caramelized luxury is increased to +%1%, but each sugar lump obtained past the previous cap only gives %2% as much cps.": "焦糖奢华的增益上限提升至+%1%,但超过原上限后获得的每个糖块仅提供%2%的CpS加成。", + "Decay reached -%1%!": "衰变已达到 -%1%!", + "Type \"%1\" to swap the positions of the next two wrinklers clicked.": "输入\"%1\"以交换接下来点击的两只饼干虫的位置。", + "Swaps wrinkler positions": "交换饼干虫位置", + "Wrinkler marked!": "饼干虫已标记!", + "Click another wrinkler to swap.": "点击另一只饼干虫进行交换。", + "Wrinklers swapped!": "饼干虫已交换!" +}); diff --git a/main.js b/main.js index 881d0ef..c389e28 100644 --- a/main.js +++ b/main.js @@ -1,8 +1,8 @@ /* All this code is copyright Orteil, 2013-2023. - -with some help, advice and fixes by Nicholas Laux, Debugbro, Opti, the folks at Playsaurus, and lots of people on reddit, Discord, and the DashNet forums - -also includes a bunch of snippets found on stackoverflow.com and others - -want to mod the game? scroll down to the "MODDING API" section + -with some help, advice and fixes by Nicholas Laux, Debugbro, Opti, the folks at Playsaurus, and lots of people on reddit, Discord, and the DashNet forums + -also includes a bunch of snippets found on stackoverflow.com and others + -want to mod the game? scroll down to the "MODDING API" section Hello, and welcome to the joyous mess that is main.js. Code contained herein is not guaranteed to be good, consistent, or sane. Most of this is years old at this point and harkens back to simpler, cruder times. In particular I've tried to maintain compatibility with fairly old versions of javascript, which means luxuries such as 'let', arrow functions and string literals are unavailable. As Cookie Clicker is rife with puns and tricky wordplay, localization was never intended to be possible - but ended up happening anyway as part of the Steam port. As a result, usage of strings is somewhat unorthodox in some places. Have a nice trip, and stay safe. @@ -13,22 +13,22 @@ http://orteil.dashnet.org /*===================================================================================== MISC HELPER FUNCTIONS =======================================================================================*/ -function l(what) { return document.getElementById(what); } -function choose(arr) { return arr[Math.floor(Math.random() * arr.length)]; } +function l(what) {return document.getElementById(what);} +function choose(arr) {return arr[Math.floor(Math.random()*arr.length)];} -function escapeRegExp(str) { return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); } -function replaceAll(find, replace, str) { return str.replace(new RegExp(escapeRegExp(find), 'g'), replace); } +function escapeRegExp(str){return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");} +function replaceAll(find,replace,str){return str.replace(new RegExp(escapeRegExp(find),'g'),replace);} -function cap(str) { return str.charAt(0).toUpperCase() + str.slice(1); } +function cap(str){return str.charAt(0).toUpperCase()+str.slice(1);} -function romanize(num) { +function romanize(num){ if (isNaN(num)) return NaN; var digits = String(+num).split(""), - key = ["", "C", "CC", "CCC", "CD", "D", "DC", "DCC", "DCCC", "CM", - "", "X", "XX", "XXX", "XL", "L", "LX", "LXX", "LXXX", "XC", - "", "I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX"], + key = ["","C","CC","CCC","CD","D","DC","DCC","DCCC","CM", + "","X","XX","XXX","XL","L","LX","LXX","LXXX","XC", + "","I","II","III","IV","V","VI","VII","VIII","IX"], roman = "", i = 3; while (i--) @@ -37,470 +37,522 @@ function romanize(num) { } //disable sounds coming from soundjay.com (sorry) -var realAudio = typeof Audio !== 'undefined' ? Audio : function () { return {} };//backup real audio -Audio = function (src) { - if (src && src.indexOf('soundjay') > -1) { Game.Popup('Sorry, no sounds hotlinked from soundjay.com.'); this.play = function () { }; } - else return new realAudio(src); +var realAudio=typeof Audio!=='undefined'?Audio:function(){return {}};//backup real audio +Audio=function(src){ + if (src && src.indexOf('soundjay')>-1) {Game.Popup('Sorry, no sounds hotlinked from soundjay.com.');this.play=function(){};} + else return new realAudio(src); }; -if (!Array.prototype.indexOf) { - Array.prototype.indexOf = function (needle) { - for (var i = 0; i < this.length; i++) { - if (this[i] === needle) { return i; } +if(!Array.prototype.indexOf) { + Array.prototype.indexOf = function(needle) { + for(var i = 0; i < this.length; i++) { + if(this[i] === needle) {return i;} } return -1; }; } -function randomFloor(x) { if ((x % 1) < Math.random()) return Math.floor(x); else return Math.ceil(x); } +function randomFloor(x) {if ((x%1) 20) { - e -= 20; - x /= Math.pow(10, e); - x += (new Array(e + 1)).join('0'); - } - } - return x; +function toFixed(x) +{ + if (Math.abs(x) < 1.0) { + var e = parseInt(x.toString().split('e-')[1]); + if (e) { + x *= Math.pow(10,e-1); + x = '0.' + (new Array(e)).join('0') + x.toString().substring(2); + } + } else { + var e = parseInt(x.toString().split('+')[1]); + if (e > 20) { + e -= 20; + x /= Math.pow(10,e); + x += (new Array(e+1)).join('0'); + } + } + return x; } //Beautify and number-formatting adapted from the Frozen Cookies add-on (http://cookieclicker.wikia.com/wiki/Frozen_Cookies_%28JavaScript_Add-on%29) -function formatEveryThirdPower(notations) { - return function (val) { - var base = 0, notationValue = ''; - if (!isFinite(val)) return 'Infinity'; - if (val >= 1000000) { - val /= 1000; - while (Math.round(val) >= 1000) { - val /= 1000; - base++; - } - if (base >= notations.length) { return 'Infinity'; } else { notationValue = notations[base]; } - } - return (Math.round(val * 1000) / 1000) + notationValue; - }; +function formatEveryThirdPower(notations) +{ + return function (val) + { + var base=0,notationValue=''; + if (!isFinite(val)) return 'Infinity'; + if (val>=1000000) + { + val/=1000; + while(Math.round(val)>=1000) + { + val/=1000; + base++; + } + if (base>=notations.length) {return 'Infinity';} else {notationValue=notations[base];} + } + return (Math.round(val*1000)/1000)+notationValue; + }; } -function rawFormatter(val) { return Math.round(val * 1000) / 1000; } +function rawFormatter(val){return Math.round(val*1000)/1000;} -var formatLong = [' thousand', ' million', ' billion', ' trillion', ' quadrillion', ' quintillion', ' sextillion', ' septillion', ' octillion', ' nonillion']; -var prefixes = ['', 'un', 'duo', 'tre', 'quattuor', 'quin', 'sex', 'septen', 'octo', 'novem']; -var suffixes = ['decillion', 'vigintillion', 'trigintillion', 'quadragintillion', 'quinquagintillion', 'sexagintillion', 'septuagintillion', 'octogintillion', 'nonagintillion']; -for (var i in suffixes) { - for (var ii in prefixes) { - formatLong.push(' ' + prefixes[ii] + suffixes[i]); - } +var formatLong=[' thousand',' million',' billion',' trillion',' quadrillion',' quintillion',' sextillion',' septillion',' octillion',' nonillion']; +var prefixes=['','un','duo','tre','quattuor','quin','sex','septen','octo','novem']; +var suffixes=['decillion','vigintillion','trigintillion','quadragintillion','quinquagintillion','sexagintillion','septuagintillion','octogintillion','nonagintillion']; +for (var i in suffixes) +{ + for (var ii in prefixes) + { + formatLong.push(' '+prefixes[ii]+suffixes[i]); + } } -var formatShort = ['k', 'M', 'B', 'T', 'Qa', 'Qi', 'Sx', 'Sp', 'Oc', 'No']; -var prefixes = ['', 'Un', 'Do', 'Tr', 'Qa', 'Qi', 'Sx', 'Sp', 'Oc', 'No']; -var suffixes = ['D', 'V', 'T', 'Qa', 'Qi', 'Sx', 'Sp', 'O', 'N']; -for (var i in suffixes) { - for (var ii in prefixes) { - formatShort.push(' ' + prefixes[ii] + suffixes[i]); - } +var formatShort=['k','M','B','T','Qa','Qi','Sx','Sp','Oc','No']; +var prefixes=['','Un','Do','Tr','Qa','Qi','Sx','Sp','Oc','No']; +var suffixes=['D','V','T','Qa','Qi','Sx','Sp','O','N']; +for (var i in suffixes) +{ + for (var ii in prefixes) + { + formatShort.push(' '+prefixes[ii]+suffixes[i]); + } } -formatShort[10] = 'Dc'; +formatShort[10]='Dc'; -var numberFormatters = - [ - formatEveryThirdPower(formatShort), - formatEveryThirdPower(formatLong), - rawFormatter - ]; -var Beautify = function (val, floats) { - var negative = (val < 0); - var decimal = ''; - var fixed = val.toFixed(floats); - if (floats > 0 && Math.abs(val) < 1000 && Math.floor(fixed) != fixed) decimal = '.' + (fixed.toString()).split('.')[1]; - val = Math.floor(Math.abs(val)); - if (floats > 0 && fixed == val + 1) val++; - //var format=!EN?2:Game.prefs.format?2:1; - var format = Game.prefs.format ? 2 : 1; - var formatter = numberFormatters[format]; - var output = (val.toString().indexOf('e+') != -1 && format == 2) ? val.toPrecision(3).toString() : formatter(val).toString().replace(/\B(?=(\d{3})+(?!\d))/g, ','); - //var output=formatter(val).toString().replace(/\B(?=(\d{3})+(?!\d))/g,','); - if (output == '0') negative = false; - return negative ? '-' + output : output + decimal; +var numberFormatters= +[ + formatEveryThirdPower(formatShort), + formatEveryThirdPower(formatLong), + rawFormatter +]; +var Beautify=function(val,floats) +{ + var negative=(val<0); + var decimal=''; + var fixed=val.toFixed(floats); + if (floats>0 && Math.abs(val)<1000 && Math.floor(fixed)!=fixed) decimal='.'+(fixed.toString()).split('.')[1]; + val=Math.floor(Math.abs(val)); + if (floats>0 && fixed==val+1) val++; + //var format=!EN?2:Game.prefs.format?2:1; + var format=Game.prefs.format?2:1; + var formatter=numberFormatters[format]; + var output=(val.toString().indexOf('e+')!=-1 && format==2)?val.toPrecision(3).toString():formatter(val).toString().replace(/\B(?=(\d{3})+(?!\d))/g,','); + //var output=formatter(val).toString().replace(/\B(?=(\d{3})+(?!\d))/g,','); + if (output=='0') negative=false; + return negative?'-'+output:output+decimal; } -var shortenNumber = function (val) { - //if no scientific notation, return as is, else : - //keep only the 5 first digits (plus dot), round the rest - //may or may not work properly - if (val >= 1000000 && isFinite(val)) { - var num = val.toString(); - var ind = num.indexOf('e+'); - if (ind == -1) return val; - var str = ''; - for (var i = 0; i < ind; i++) { str += (i < 6 ? num[i] : '0'); } - str += 'e+'; - str += num.split('e+')[1]; - return parseFloat(str); - } - return val; +var shortenNumber=function(val) +{ + //if no scientific notation, return as is, else : + //keep only the 5 first digits (plus dot), round the rest + //may or may not work properly + if (val>=1000000 && isFinite(val)) + { + var num=val.toString(); + var ind=num.indexOf('e+'); + if (ind==-1) return val; + var str=''; + for (var i=0;i 0) str2 += ','; - str2 += str[i]; - } - return str2; +var SimpleBeautify=function(val) +{ + var str=val.toString(); + var str2=''; + for (var i in str)//add commas + { + if ((str.length-i)%3==0 && i>0) str2+=','; + str2+=str[i]; + } + return str2; } -var beautifyInTextFilter = /(([\d]+[,]*)+)/g;//new regex -function BeautifyInTextFunction(str) { return Beautify(parseInt(str.replace(/,/g, ''), 10)); }; -function BeautifyInText(str) { return str.replace(beautifyInTextFilter, BeautifyInTextFunction); }//reformat every number inside a string +var beautifyInTextFilter=/(([\d]+[,]*)+)/g;//new regex +function BeautifyInTextFunction(str){return Beautify(parseInt(str.replace(/,/g,''),10));}; +function BeautifyInText(str) {return str.replace(beautifyInTextFilter,BeautifyInTextFunction);}//reformat every number inside a string function BeautifyAll()//run through upgrades and achievements to reformat the numbers { - var func = function (what) { what.ddesc = BeautifyInText(what.ddesc); } - for (var i in Game.UpgradesById) { Game.UpgradesById[i].ddesc = BeautifyInText(Game.UpgradesById[i].ddesc); } - for (var i in Game.AchievementsById) { Game.AchievementsById[i].ddesc = BeautifyInText(Game.AchievementsById[i].ddesc); } + var func=function(what){what.ddesc=BeautifyInText(what.ddesc);} + for (var i in Game.UpgradesById){Game.UpgradesById[i].ddesc=BeautifyInText(Game.UpgradesById[i].ddesc);} + for (var i in Game.AchievementsById){Game.AchievementsById[i].ddesc=BeautifyInText(Game.AchievementsById[i].ddesc);} } //=== LOCALIZATION === -var locStrings = {}; -var locStringsFallback = {}; -var locId = 'NONE'; -var EN = true; -var locName = 'none'; -var locPatches = []; -var locPlur = 'nplurals=2;plural=(n!=1);';//see http://docs.translatehouse.org/projects/localization-guide/en/latest/l10n/pluralforms.html -var locPlurFallback = locPlur; +var locStrings={}; +var locStringsFallback={}; +var locId='NONE'; +var EN=true; +var locName='none'; +var locPatches=[]; +var locPlur='nplurals=2;plural=(n!=1);';//see http://docs.translatehouse.org/projects/localization-guide/en/latest/l10n/pluralforms.html +var locPlurFallback=locPlur; //note : plural index will be downgraded to the last matching, ie. in this case, if we get "0" but don't have a 3rd option, use the 2nd option (or 1st, lacking that too) -var locStringsByPart = {}; -var FindLocStringByPart = function (match) { - return locStringsByPart[match] || undefined; - /* - //note: slow, only do this on init - for (var i in locStrings){ - var bit=i.split(']'); - if (bit[0].substring(1)==match) return i; - } - return undefined; - */ +var locStringsByPart={}; +var FindLocStringByPart=function(match) +{ + return locStringsByPart[match]||undefined; + /* + //note: slow, only do this on init + for (var i in locStrings){ + var bit=i.split(']'); + if (bit[0].substring(1)==match) return i; + } + return undefined; + */ } -var Langs = { - 'EN': { file: 'EN', nameEN: 'English', name: 'English', changeLanguage: 'Language', icon: 0, w: 1, isEN: true }, - 'FR': { file: 'FR', nameEN: 'French', name: 'Français', changeLanguage: 'Langue', icon: 0, w: 1 }, - 'DE': { file: 'DE', nameEN: 'German', name: 'Deutsch', changeLanguage: 'Sprache', icon: 0, w: 1 }, - 'NL': { file: 'NL', nameEN: 'Dutch', name: 'Nederlands', changeLanguage: 'Taal', icon: 0, w: 1 }, - 'CS': { file: 'CS', nameEN: 'Czech', name: 'Čeština', changeLanguage: 'Jazyk', icon: 0, w: 1 }, - 'PL': { file: 'PL', nameEN: 'Polish', name: 'Polski', changeLanguage: 'Język', icon: 0, w: 1 }, - 'IT': { file: 'IT', nameEN: 'Italian', name: 'Italiano', changeLanguage: 'Lingua', icon: 0, w: 1 }, - 'ES': { file: 'ES', nameEN: 'Spanish', name: 'Español', changeLanguage: 'Idioma', icon: 0, w: 1 }, - 'PT-BR': { file: 'PT-BR', nameEN: 'Portuguese', name: 'Português', changeLanguage: 'Idioma', icon: 0, w: 1 }, - 'JA': { file: 'JA', nameEN: 'Japanese', name: '日本語', changeLanguage: '言語', icon: 0, w: 1.5 }, - 'ZH-CN': { file: 'ZH-CN', nameEN: 'Chinese', name: '中文', changeLanguage: '语言', icon: 0, w: 1.5 }, - 'KO': { file: 'KO', nameEN: 'Korean', name: '한글', changeLanguage: '언어', icon: 0, w: 1.5 }, - 'RU': { file: 'RU', nameEN: 'Russian', name: 'Русский', changeLanguage: 'Язык', icon: 0, w: 1.2 }, +var Langs={ + 'EN':{file:'EN',nameEN:'English',name:'English',changeLanguage:'Language',icon:0,w:1,isEN:true}, + 'FR':{file:'FR',nameEN:'French',name:'Français',changeLanguage:'Langue',icon:0,w:1}, + 'DE':{file:'DE',nameEN:'German',name:'Deutsch',changeLanguage:'Sprache',icon:0,w:1}, + 'NL':{file:'NL',nameEN:'Dutch',name:'Nederlands',changeLanguage:'Taal',icon:0,w:1}, + 'CS':{file:'CS',nameEN:'Czech',name:'Čeština',changeLanguage:'Jazyk',icon:0,w:1}, + 'PL':{file:'PL',nameEN:'Polish',name:'Polski',changeLanguage:'Język',icon:0,w:1}, + 'IT':{file:'IT',nameEN:'Italian',name:'Italiano',changeLanguage:'Lingua',icon:0,w:1}, + 'ES':{file:'ES',nameEN:'Spanish',name:'Español',changeLanguage:'Idioma',icon:0,w:1}, + 'PT-BR':{file:'PT-BR',nameEN:'Portuguese',name:'Português',changeLanguage:'Idioma',icon:0,w:1}, + 'JA':{file:'JA',nameEN:'Japanese',name:'日本語',changeLanguage:'言語',icon:0,w:1.5}, + 'ZH-CN':{file:'ZH-CN',nameEN:'Chinese',name:'中文',changeLanguage:'语言',icon:0,w:1.5}, + 'KO':{file:'KO',nameEN:'Korean',name:'한글',changeLanguage:'언어',icon:0,w:1.5}, + 'RU':{file:'RU',nameEN:'Russian',name:'Русский',changeLanguage:'Язык',icon:0,w:1.2}, }; //note : baseline should be the original english text //in several instances, the english text will be quite different from the other languages, as this game was initially never meant to be translated and the translation process doesn't always play well with complex sentence structures /*use: - loc('Plain text') - loc('Text where %1 is a parameter','something') - loc('Text where %1 and %2 are parameters',['a thing','another thing']) - loc('There is %1 apple',5) - ...if the localized string is an array, this is parsed as a pluralized string; for instance, the localized string could be - "There is %1 apple":[ - "There is %1 apple", - "There are %1 apples" - ] - loc('There is %1 apple and also, %2!',[5,'hello']) - loc('This string is localized.',0,'This is the string displayed in the english version.') - loc('You have %1.',''+loc('%1 apple',LBeautify(amount))+'') - ...you may nest localized strings, and use LBeautify() to pack Beautified values + loc('Plain text') + loc('Text where %1 is a parameter','something') + loc('Text where %1 and %2 are parameters',['a thing','another thing']) + loc('There is %1 apple',5) + ...if the localized string is an array, this is parsed as a pluralized string; for instance, the localized string could be + "There is %1 apple":[ + "There is %1 apple", + "There are %1 apples" + ] + loc('There is %1 apple and also, %2!',[5,'hello']) + loc('This string is localized.',0,'This is the string displayed in the english version.') + loc('You have %1.',''+loc('%1 apple',LBeautify(amount))+'') + ...you may nest localized strings, and use LBeautify() to pack Beautified values */ -var locBlink = false; -var localizationNotFound = []; -var loc = function (id, params, baseline) { - var fallback = false; - var found = locStrings[id]; - if (!found) { found = locStringsFallback[id]; fallback = true; } - if (found) { - var str = ''; - str = parseLoc(found, params); - //return str; - if (str.constructor === Array) return str; - if (locBlink && !fallback) return '' + str + '';//will make every localized text blink on screen, making omissions obvious; will not work for elements filled with textContent - } - - //if ((fallback || !found) && localizationNotFound.length<20 && localizationNotFound.indexOf(id)==-1){localizationNotFound.push(id);console.trace('localization string not found: ',id);} - if (found) return str; - return baseline || id; +var locBlink=false; +var localizationNotFound=[]; +var loc=function(id,params,baseline) +{ + var fallback=false; + var found=locStrings[id]; + if (!found) {found=locStringsFallback[id];fallback=true;} + if (found) + { + var str=''; + str=parseLoc(found,params); + //return str; + if (str.constructor===Array) return str; + if (locBlink && !fallback) return ''+str+'';//will make every localized text blink on screen, making omissions obvious; will not work for elements filled with textContent + } + + //if ((fallback || !found) && localizationNotFound.length<20 && localizationNotFound.indexOf(id)==-1){localizationNotFound.push(id);console.trace('localization string not found: ',id);} + if (found) return str; + return baseline||id; } -var parseLoc = function (str, params) { - /* - parses localization strings - -there can only be 1 plural per string and it MUST be at index %1 - -a pluralized string is detected if we have at least 1 param and the matching localized string is an array - */ - if (typeof params === 'undefined') params = []; - else if (params.constructor !== Array) params = [params]; - if (!str) return ''; - //if (str.constructor===Array) return str; - //if (typeof str==='function') return str(params); - //str=str.replace(/[\t\n\r]/gm,''); - - if (params.length == 0) return str; - - if (str.constructor === Array) { - if (typeof params[0] === 'object')//an object containing a beautified number - { - var plurIndex = locPlur(params[0].n); - plurIndex = Math.min(str.length - 1, plurIndex); - str = str[plurIndex]; - str = replaceAll('%1', params[0].b, str); - } - else { - var plurIndex = locPlur(params[0]); - plurIndex = Math.min(str.length - 1, plurIndex); - str = str[plurIndex]; - str = replaceAll('%1', params[0], str); - } - } - - var out = ''; - var len = str.length; - var inPercent = false; - for (var i = 0; i < len; i++) { - var it = str[i]; - if (inPercent) { - inPercent = false; - if (!isNaN(it) && params.length >= parseInt(it) - 1) out += params[parseInt(it) - 1]; - else out += '%' + it; - } - else if (it == '%') inPercent = true; - else out += it; - } - return out; +var parseLoc=function(str,params) +{ + /* + parses localization strings + -there can only be 1 plural per string and it MUST be at index %1 + -a pluralized string is detected if we have at least 1 param and the matching localized string is an array + */ + if (typeof params==='undefined') params=[]; + else if (params.constructor!==Array) params=[params]; + if (!str) return ''; + //if (str.constructor===Array) return str; + //if (typeof str==='function') return str(params); + //str=str.replace(/[\t\n\r]/gm,''); + + if (params.length==0) return str; + + if (str.constructor===Array) + { + if (typeof params[0]==='object')//an object containing a beautified number + { + var plurIndex=locPlur(params[0].n); + plurIndex=Math.min(str.length-1,plurIndex); + str=str[plurIndex]; + str=replaceAll('%1',params[0].b,str); + } + else + { + var plurIndex=locPlur(params[0]); + plurIndex=Math.min(str.length-1,plurIndex); + str=str[plurIndex]; + str=replaceAll('%1',params[0],str); + } + } + + var out=''; + var len=str.length; + var inPercent=false; + for (var i=0;i=parseInt(it)-1) out+=params[parseInt(it)-1]; + else out+='%'+it; + } + else if (it=='%') inPercent=true; + else out+=it; + } + return out; } -var LBeautify = function (val, floats) { - //returns an object in the form {n:original value floored,b:beautified value as string} for localization purposes - return { n: Math.floor(Math.abs(val)), b: Beautify(val, floats) }; +var LBeautify=function(val,floats) +{ + //returns an object in the form {n:original value floored,b:beautified value as string} for localization purposes + return {n:Math.floor(Math.abs(val)),b:Beautify(val,floats)}; } -var ModLanguage = function (id, json) { - if (id == '*') id = locId; - if (id != locId || !Langs[id]) return false; - if (json['REPLACE ALL']) { - var rep = function (str, from, to) { - var regex = new RegExp(from, 'ig'); - return str.replace(regex, function (match) { - return (match[0] == match[0].toLowerCase()) ? to : cap(to); - }); - } - for (var i in json['REPLACE ALL']) { - var to = json['REPLACE ALL'][i]; - for (var ii in locStrings) { - if (Array.isArray(locStrings[ii])) { - for (var iii in locStrings[ii]) { - locStrings[ii][iii] = rep(locStrings[ii][iii], i, to); - } - } - else locStrings[ii] = rep(locStrings[ii], i, to); - } - } - } - delete json['REPLACE ALL']; - AddLanguage(id, Langs[id].name, json, true); +var ModLanguage=function(id,json){ + if (id=='*') id=locId; + if (id!=locId || !Langs[id]) return false; + if (json['REPLACE ALL']) + { + var rep=function(str,from,to) + { + var regex=new RegExp(from,'ig'); + return str.replace(regex,function(match){ + return (match[0]==match[0].toLowerCase())?to:cap(to); + }); + } + for (var i in json['REPLACE ALL']) + { + var to=json['REPLACE ALL'][i]; + for (var ii in locStrings) + { + if (Array.isArray(locStrings[ii])) + { + for (var iii in locStrings[ii]) + { + locStrings[ii][iii]=rep(locStrings[ii][iii],i,to); + } + } + else locStrings[ii]=rep(locStrings[ii],i,to); + } + } + } + delete json['REPLACE ALL']; + AddLanguage(id,Langs[id].name,json,true); } -var AddLanguage = function (id, name, json, mod) { - //used in loc files - //if mod is true, this file is augmenting the current language - if (id == locId && !mod) return false;//don't load twice - if (!Langs[id]) return false; - locId = id; - if (Langs[locId].isEN) EN = true; else EN = false; - locName = Langs[id].nameEN;//name - - if (mod) { - for (var i in json) { - locStrings[i] = json[i]; - } - for (var i in locStrings) { - var bit = i.split(']'); - if (bit[1] && bit[0].indexOf('[COMMENT:') != 0 && !locStringsByPart[bit[0].substring(1)]) locStringsByPart[bit[0].substring(1)] = i; - } - console.log('Augmented language "' + locName + '".'); - } - else { - locStrings = json; - locPlur = json['']['plural-forms'] || locPlurFallback; - delete locStrings['']; - for (var i in locStrings) { - if (locStrings[i] == '/') locStrings[i] = i; - } - - locPlur = (function (plural_form) { - //lifted and modified from gettext.js - var pf_re = new RegExp('^\\s*nplurals\\s*=\\s*[0-9]+\\s*;\\s*plural\\s*=\\s*(?:\\s|[-\\?\\|&=!<>+*/%:;n0-9_\(\)])+'); - if (!pf_re.test(plural_form)) - throw new Error('The plural form "' + plural_form + '" is not valid'); - return new Function('n', 'var plural, nplurals; ' + plural_form + ' return plural;'); - //return new Function('n','var plural, nplurals; '+ plural_form +' return { nplurals: nplurals, plural: (plural === true ? 1 : (plural ? plural : 0)) };'); - })(locPlur); - - locPatches = []; - for (var i in locStrings) { - if (i.split('|')[0] == 'Update notes') { - var patch = i.split('|'); - var patchTranslated = locStrings[i].split('|'); - locPatches.push({ id: parseInt(patch[1]), type: 1, title: patchTranslated[2], points: patchTranslated.slice(3) }) - } - } - var sortMap = function (a, b) { - if (a.id < b.id) return 1; - else return -1; - } - locPatches.sort(sortMap); - - for (var i in locStrings) { - var bit = i.split(']'); - if (bit[1] && bit[0].indexOf('[COMMENT:') != 0 && !locStringsByPart[bit[0].substring(1)]) locStringsByPart[bit[0].substring(1)] = i; - } - - console.log('Loaded language "' + locName + '".'); - } +var AddLanguage=function(id,name,json,mod) +{ + //used in loc files + //if mod is true, this file is augmenting the current language + if (id==locId && !mod) return false;//don't load twice + if (!Langs[id]) return false; + locId=id; + if (Langs[locId].isEN) EN=true; else EN=false; + locName=Langs[id].nameEN;//name + + if (mod) + { + for (var i in json) + { + locStrings[i]=json[i]; + } + for (var i in locStrings) + { + var bit=i.split(']'); + if (bit[1] && bit[0].indexOf('[COMMENT:')!=0 && !locStringsByPart[bit[0].substring(1)]) locStringsByPart[bit[0].substring(1)]=i; + } + console.log('Augmented language "'+locName+'".'); + } + else + { + locStrings=json; + locPlur=json['']['plural-forms']||locPlurFallback; + delete locStrings['']; + for (var i in locStrings) + { + if (locStrings[i]=='/') locStrings[i]=i; + } + + locPlur=(function(plural_form){ + //lifted and modified from gettext.js + var pf_re=new RegExp('^\\s*nplurals\\s*=\\s*[0-9]+\\s*;\\s*plural\\s*=\\s*(?:\\s|[-\\?\\|&=!<>+*/%:;n0-9_\(\)])+'); + if (!pf_re.test(plural_form)) + throw new Error('The plural form "'+plural_form+'" is not valid'); + return new Function('n','var plural, nplurals; '+ plural_form +' return plural;'); + //return new Function('n','var plural, nplurals; '+ plural_form +' return { nplurals: nplurals, plural: (plural === true ? 1 : (plural ? plural : 0)) };'); + })(locPlur); + + locPatches=[]; + for (var i in locStrings){ + if (i.split('|')[0]=='Update notes') + { + var patch=i.split('|'); + var patchTranslated=locStrings[i].split('|'); + locPatches.push({id:parseInt(patch[1]),type:1,title:patchTranslated[2],points:patchTranslated.slice(3)}) + } + } + var sortMap=function(a,b) + { + if (a.id.*/, '');//strip quote section - it.ddesc = BeautifyInText(it.baseDesc); - - found = FindLocStringByPart(type + ' desc ' + it.id); - if (found) it.ddesc = loc(found); - found = FindLocStringByPart(type + ' quote ' + it.id); - if (found) it.ddesc += '' + loc(found) + ''; - } - BeautifyAll(); +var LocalizeUpgradesAndAchievs=function() +{ + if (!Game.UpgradesById) return false; + + var allThings=[]; + for (var i in Game.UpgradesById){allThings.push(Game.UpgradesById[i]);} + for (var i in Game.AchievementsById){allThings.push(Game.AchievementsById[i]);} + for (var i=0;i.*/,'');//strip quote section + it.ddesc=BeautifyInText(it.baseDesc); + + found=FindLocStringByPart(type+' desc '+it.id); + if (found) it.ddesc=loc(found); + found=FindLocStringByPart(type+' quote '+it.id); + if (found) it.ddesc+=''+loc(found)+''; + } + BeautifyAll(); } -var getUpgradeName = function (name) { - var it = Game.Upgrades[name]; - var found = FindLocStringByPart('Upgrade name ' + it.id); - if (found) return loc(found); else return name; +var getUpgradeName=function(name) +{ + var it=Game.Upgrades[name]; + var found=FindLocStringByPart('Upgrade name '+it.id); + if (found) return loc(found); else return name; } -var getAchievementName = function (name) { - var it = Game.Achievements[name]; - var found = FindLocStringByPart('Achievement name ' + it.id); - if (found) return loc(found); else return name; +var getAchievementName=function(name) +{ + var it=Game.Achievements[name]; + var found=FindLocStringByPart('Achievement name '+it.id); + if (found) return loc(found); else return name; } @@ -510,95 +562,99 @@ var getAchievementName = function (name) { //function b64_to_utf8(str){return atob(str);} /*function utf8_to_b64( str ) { - try{return Base64.encode(unescape(encodeURIComponent( str )));} - catch(err) - {return '';} + try{return Base64.encode(unescape(encodeURIComponent( str )));} + catch(err) + {return '';} } function b64_to_utf8( str ) { - try{return decodeURIComponent(escape(Base64.decode( str )));} - catch(err) - {return '';} + try{return decodeURIComponent(escape(Base64.decode( str )));} + catch(err) + {return '';} }*/ //phewie! https://stackoverflow.com/questions/30106476/using-javascripts-atob-to-decode-base64-doesnt-properly-decode-utf-8-strings function utf8_to_b64(str) { - try { - return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, function (match, p1) { - return String.fromCharCode(parseInt(p1, 16)) - })); - } - catch (err) { return ''; } + try{return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, function(match, p1) { + return String.fromCharCode(parseInt(p1, 16)) + }));} + catch(err) + {return '';} } function b64_to_utf8(str) { - try { - return decodeURIComponent(Array.prototype.map.call(atob(str), function (c) { - return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2) - }).join('')); - } - catch (err) { return ''; } + try{return decodeURIComponent(Array.prototype.map.call(atob(str), function(c) { + return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2) + }).join(''));} + catch(err) + {return '';} } function CompressBin(arr)//compress a sequence like [0,1,1,0,1,0]... into a number like 54. { - var str = ''; - var arr2 = arr.slice(0); - arr2.unshift(1); - arr2.push(1); - arr2.reverse(); - for (var i in arr2) { - str += arr2[i]; - } - str = parseInt(str, 2); - return str; + var str=''; + var arr2=arr.slice(0); + arr2.unshift(1); + arr2.push(1); + arr2.reverse(); + for (var i in arr2) + { + str+=arr2[i]; + } + str=parseInt(str,2); + return str; } function UncompressBin(num)//uncompress a number like 54 to a sequence like [0,1,1,0,1,0]. { - var arr = num.toString(2); - arr = arr.split(''); - arr.reverse(); - arr.shift(); - arr.pop(); - return arr; + var arr=num.toString(2); + arr=arr.split(''); + arr.reverse(); + arr.shift(); + arr.pop(); + return arr; } function CompressLargeBin(arr)//we have to compress in smaller chunks to avoid getting into scientific notation { - var arr2 = arr.slice(0); - var thisBit = []; - var bits = []; - for (var i in arr2) { - thisBit.push(arr2[i]); - if (thisBit.length >= 50) { - bits.push(CompressBin(thisBit)); - thisBit = []; - } - } - if (thisBit.length > 0) bits.push(CompressBin(thisBit)); - arr2 = bits.join(';'); - return arr2; + var arr2=arr.slice(0); + var thisBit=[]; + var bits=[]; + for (var i in arr2) + { + thisBit.push(arr2[i]); + if (thisBit.length>=50) + { + bits.push(CompressBin(thisBit)); + thisBit=[]; + } + } + if (thisBit.length>0) bits.push(CompressBin(thisBit)); + arr2=bits.join(';'); + return arr2; } -function UncompressLargeBin(arr) { - var arr2 = arr.split(';'); - var bits = []; - for (var i in arr2) { - bits.push(UncompressBin(parseInt(arr2[i]))); - } - arr2 = []; - for (var i in bits) { - for (var ii in bits[i]) arr2.push(bits[i][ii]); - } - return arr2; +function UncompressLargeBin(arr) +{ + var arr2=arr.split(';'); + var bits=[]; + for (var i in arr2) + { + bits.push(UncompressBin(parseInt(arr2[i]))); + } + arr2=[]; + for (var i in bits) + { + for (var ii in bits[i]) arr2.push(bits[i][ii]); + } + return arr2; } function pack(bytes) { var chars = []; - var len = bytes.length; - for (var i = 0, n = len; i < n;) { + var len=bytes.length; + for(var i = 0, n = len; i < n;) { chars.push(((bytes[i++] & 0xff) << 8) | (bytes[i++] & 0xff)); } return String.fromCharCode.apply(null, chars); @@ -606,8 +662,8 @@ function pack(bytes) { function unpack(str) { var bytes = []; - var len = str.length; - for (var i = 0, n = len; i < n; i++) { + var len=str.length; + for(var i = 0, n = len; i < n; i++) { var char = str.charCodeAt(i); bytes.push(char >>> 8, char & 0xFF); } @@ -617,15108 +673,16245 @@ function unpack(str) { //modified from http://www.smashingmagazine.com/2011/10/19/optimizing-long-lists-of-yesno-values-with-javascript/ function pack2(/* string */ values) { var chunks = values.match(/.{1,14}/g), packed = ''; - for (var i = 0; i < chunks.length; i++) { - packed += String.fromCharCode(parseInt('1' + chunks[i], 2)); + for (var i=0; i < chunks.length; i++) { + packed += String.fromCharCode(parseInt('1'+chunks[i], 2)); } return packed; } function unpack2(/* string */ packed) { var values = ''; - for (var i = 0; i < packed.length; i++) { + for (var i=0; i < packed.length; i++) { values += packed.charCodeAt(i).toString(2).substring(1); } return values; } -function pack3(values) { - //too many save corruptions, darn it to heck - return values; +function pack3(values){ + //too many save corruptions, darn it to heck + return values; } //file save function from https://github.com/eligrey/FileSaver.js -var saveAs = saveAs || function (view) { "use strict"; if (typeof navigator !== "undefined" && /MSIE [1-9]\./.test(navigator.userAgent)) { return } var doc = view.document, get_URL = function () { return view.URL || view.webkitURL || view }, save_link = doc.createElementNS("http://www.w3.org/1999/xhtml", "a"), can_use_save_link = "download" in save_link, click = function (node) { var event = new MouseEvent("click"); node.dispatchEvent(event) }, is_safari = /Version\/[\d\.]+.*Safari/.test(navigator.userAgent), webkit_req_fs = view.webkitRequestFileSystem, req_fs = view.requestFileSystem || webkit_req_fs || view.mozRequestFileSystem, throw_outside = function (ex) { (view.setImmediate || view.setTimeout)(function () { throw ex }, 0) }, force_saveable_type = "application/octet-stream", fs_min_size = 0, arbitrary_revoke_timeout = 500, revoke = function (file) { var revoker = function () { if (typeof file === "string") { get_URL().revokeObjectURL(file) } else { file.remove() } }; if (view.chrome) { revoker() } else { setTimeout(revoker, arbitrary_revoke_timeout) } }, dispatch = function (filesaver, event_types, event) { event_types = [].concat(event_types); var i = event_types.length; while (i--) { var listener = filesaver["on" + event_types[i]]; if (typeof listener === "function") { try { listener.call(filesaver, event || filesaver) } catch (ex) { throw_outside(ex) } } } }, auto_bom = function (blob) { if (/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(blob.type)) { return new Blob(["\ufeff", blob], { type: blob.type }) } return blob }, FileSaver = function (blob, name, no_auto_bom) { if (!no_auto_bom) { blob = auto_bom(blob) } var filesaver = this, type = blob.type, blob_changed = false, object_url, target_view, dispatch_all = function () { dispatch(filesaver, "writestart progress write writeend".split(" ")) }, fs_error = function () { if (target_view && is_safari && typeof FileReader !== "undefined") { var reader = new FileReader; reader.onloadend = function () { var base64Data = reader.result; target_view.location.href = "data:attachment/file" + base64Data.slice(base64Data.search(/[,;]/)); filesaver.readyState = filesaver.DONE; dispatch_all() }; reader.readAsDataURL(blob); filesaver.readyState = filesaver.INIT; return } if (blob_changed || !object_url) { object_url = get_URL().createObjectURL(blob) } if (target_view) { target_view.location.href = object_url } else { var new_tab = view.open(object_url, "_blank"); if (new_tab == undefined && is_safari) { view.location.href = object_url } } filesaver.readyState = filesaver.DONE; dispatch_all(); revoke(object_url) }, abortable = function (func) { return function () { if (filesaver.readyState !== filesaver.DONE) { return func.apply(this, arguments) } } }, create_if_not_found = { create: true, exclusive: false }, slice; filesaver.readyState = filesaver.INIT; if (!name) { name = "download" } if (can_use_save_link) { object_url = get_URL().createObjectURL(blob); setTimeout(function () { save_link.href = object_url; save_link.download = name; click(save_link); dispatch_all(); revoke(object_url); filesaver.readyState = filesaver.DONE }); return } if (view.chrome && type && type !== force_saveable_type) { slice = blob.slice || blob.webkitSlice; blob = slice.call(blob, 0, blob.size, force_saveable_type); blob_changed = true } if (webkit_req_fs && name !== "download") { name += ".download" } if (type === force_saveable_type || webkit_req_fs) { target_view = view } if (!req_fs) { fs_error(); return } fs_min_size += blob.size; req_fs(view.TEMPORARY, fs_min_size, abortable(function (fs) { fs.root.getDirectory("saved", create_if_not_found, abortable(function (dir) { var save = function () { dir.getFile(name, create_if_not_found, abortable(function (file) { file.createWriter(abortable(function (writer) { writer.onwriteend = function (event) { target_view.location.href = file.toURL(); filesaver.readyState = filesaver.DONE; dispatch(filesaver, "writeend", event); revoke(file) }; writer.onerror = function () { var error = writer.error; if (error.code !== error.ABORT_ERR) { fs_error() } }; "writestart progress write abort".split(" ").forEach(function (event) { writer["on" + event] = filesaver["on" + event] }); writer.write(blob); filesaver.abort = function () { writer.abort(); filesaver.readyState = filesaver.DONE }; filesaver.readyState = filesaver.WRITING }), fs_error) }), fs_error) }; dir.getFile(name, { create: false }, abortable(function (file) { file.remove(); save() }), abortable(function (ex) { if (ex.code === ex.NOT_FOUND_ERR) { save() } else { fs_error() } })) }), fs_error) }), fs_error) }, FS_proto = FileSaver.prototype, saveAs = function (blob, name, no_auto_bom) { return new FileSaver(blob, name, no_auto_bom) }; if (typeof navigator !== "undefined" && navigator.msSaveOrOpenBlob) { return function (blob, name, no_auto_bom) { if (!no_auto_bom) { blob = auto_bom(blob) } return navigator.msSaveOrOpenBlob(blob, name || "download") } } FS_proto.abort = function () { var filesaver = this; filesaver.readyState = filesaver.DONE; dispatch(filesaver, "abort") }; FS_proto.readyState = FS_proto.INIT = 0; FS_proto.WRITING = 1; FS_proto.DONE = 2; FS_proto.error = FS_proto.onwritestart = FS_proto.onprogress = FS_proto.onwrite = FS_proto.onabort = FS_proto.onerror = FS_proto.onwriteend = null; return saveAs }(typeof self !== "undefined" && self || typeof window !== "undefined" && window || this.content); if (typeof module !== "undefined" && module.exports) { module.exports.saveAs = saveAs } else if (typeof define !== "undefined" && define !== null && define.amd != null) { define([], function () { return saveAs }) } +var saveAs=saveAs||function(view){"use strict";if(typeof navigator!=="undefined"&&/MSIE [1-9]\./.test(navigator.userAgent)){return}var doc=view.document,get_URL=function(){return view.URL||view.webkitURL||view},save_link=doc.createElementNS("http://www.w3.org/1999/xhtml","a"),can_use_save_link="download"in save_link,click=function(node){var event=new MouseEvent("click");node.dispatchEvent(event)},is_safari=/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),webkit_req_fs=view.webkitRequestFileSystem,req_fs=view.requestFileSystem||webkit_req_fs||view.mozRequestFileSystem,throw_outside=function(ex){(view.setImmediate||view.setTimeout)(function(){throw ex},0)},force_saveable_type="application/octet-stream",fs_min_size=0,arbitrary_revoke_timeout=500,revoke=function(file){var revoker=function(){if(typeof file==="string"){get_URL().revokeObjectURL(file)}else{file.remove()}};if(view.chrome){revoker()}else{setTimeout(revoker,arbitrary_revoke_timeout)}},dispatch=function(filesaver,event_types,event){event_types=[].concat(event_types);var i=event_types.length;while(i--){var listener=filesaver["on"+event_types[i]];if(typeof listener==="function"){try{listener.call(filesaver,event||filesaver)}catch(ex){throw_outside(ex)}}}},auto_bom=function(blob){if(/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(blob.type)){return new Blob(["\ufeff",blob],{type:blob.type})}return blob},FileSaver=function(blob,name,no_auto_bom){if(!no_auto_bom){blob=auto_bom(blob)}var filesaver=this,type=blob.type,blob_changed=false,object_url,target_view,dispatch_all=function(){dispatch(filesaver,"writestart progress write writeend".split(" "))},fs_error=function(){if(target_view&&is_safari&&typeof FileReader!=="undefined"){var reader=new FileReader;reader.onloadend=function(){var base64Data=reader.result;target_view.location.href="data:attachment/file"+base64Data.slice(base64Data.search(/[,;]/));filesaver.readyState=filesaver.DONE;dispatch_all()};reader.readAsDataURL(blob);filesaver.readyState=filesaver.INIT;return}if(blob_changed||!object_url){object_url=get_URL().createObjectURL(blob)}if(target_view){target_view.location.href=object_url}else{var new_tab=view.open(object_url,"_blank");if(new_tab==undefined&&is_safari){view.location.href=object_url}}filesaver.readyState=filesaver.DONE;dispatch_all();revoke(object_url)},abortable=function(func){return function(){if(filesaver.readyState!==filesaver.DONE){return func.apply(this,arguments)}}},create_if_not_found={create:true,exclusive:false},slice;filesaver.readyState=filesaver.INIT;if(!name){name="download"}if(can_use_save_link){object_url=get_URL().createObjectURL(blob);setTimeout(function(){save_link.href=object_url;save_link.download=name;click(save_link);dispatch_all();revoke(object_url);filesaver.readyState=filesaver.DONE});return}if(view.chrome&&type&&type!==force_saveable_type){slice=blob.slice||blob.webkitSlice;blob=slice.call(blob,0,blob.size,force_saveable_type);blob_changed=true}if(webkit_req_fs&&name!=="download"){name+=".download"}if(type===force_saveable_type||webkit_req_fs){target_view=view}if(!req_fs){fs_error();return}fs_min_size+=blob.size;req_fs(view.TEMPORARY,fs_min_size,abortable(function(fs){fs.root.getDirectory("saved",create_if_not_found,abortable(function(dir){var save=function(){dir.getFile(name,create_if_not_found,abortable(function(file){file.createWriter(abortable(function(writer){writer.onwriteend=function(event){target_view.location.href=file.toURL();filesaver.readyState=filesaver.DONE;dispatch(filesaver,"writeend",event);revoke(file)};writer.onerror=function(){var error=writer.error;if(error.code!==error.ABORT_ERR){fs_error()}};"writestart progress write abort".split(" ").forEach(function(event){writer["on"+event]=filesaver["on"+event]});writer.write(blob);filesaver.abort=function(){writer.abort();filesaver.readyState=filesaver.DONE};filesaver.readyState=filesaver.WRITING}),fs_error)}),fs_error)};dir.getFile(name,{create:false},abortable(function(file){file.remove();save()}),abortable(function(ex){if(ex.code===ex.NOT_FOUND_ERR){save()}else{fs_error()}}))}),fs_error)}),fs_error)},FS_proto=FileSaver.prototype,saveAs=function(blob,name,no_auto_bom){return new FileSaver(blob,name,no_auto_bom)};if(typeof navigator!=="undefined"&&navigator.msSaveOrOpenBlob){return function(blob,name,no_auto_bom){if(!no_auto_bom){blob=auto_bom(blob)}return navigator.msSaveOrOpenBlob(blob,name||"download")}}FS_proto.abort=function(){var filesaver=this;filesaver.readyState=filesaver.DONE;dispatch(filesaver,"abort")};FS_proto.readyState=FS_proto.INIT=0;FS_proto.WRITING=1;FS_proto.DONE=2;FS_proto.error=FS_proto.onwritestart=FS_proto.onprogress=FS_proto.onwrite=FS_proto.onabort=FS_proto.onerror=FS_proto.onwriteend=null;return saveAs}(typeof self!=="undefined"&&self||typeof window!=="undefined"&&window||this.content);if(typeof module!=="undefined"&&module.exports){module.exports.saveAs=saveAs}else if(typeof define!=="undefined"&&define!==null&&define.amd!=null){define([],function(){return saveAs})} //seeded random function, courtesy of http://davidbau.com/archives/2010/01/30/random_seeds_coded_hints_and_quintillions.html -(function (a, b, c, d, e, f) { function k(a) { var b, c = a.length, e = this, f = 0, g = e.i = e.j = 0, h = e.S = []; for (c || (a = [c++]); d > f;)h[f] = f++; for (f = 0; d > f; f++)h[f] = h[g = j & g + a[f % c] + (b = h[f])], h[g] = b; (e.g = function (a) { for (var b, c = 0, f = e.i, g = e.j, h = e.S; a--;)b = h[f = j & f + 1], c = c * d + h[j & (h[f] = h[g = j & g + b]) + (h[g] = b)]; return e.i = f, e.j = g, c })(d) } function l(a, b) { var e, c = [], d = (typeof a)[0]; if (b && "o" == d) for (e in a) try { c.push(l(a[e], b - 1)) } catch (f) { } return c.length ? c : "s" == d ? a : a + "\0" } function m(a, b) { for (var d, c = a + "", e = 0; c.length > e;)b[j & e] = j & (d ^= 19 * b[j & e]) + c.charCodeAt(e++); return o(b) } function n(c) { try { return a.crypto.getRandomValues(c = new Uint8Array(d)), o(c) } catch (e) { return [+new Date, a, a.navigator.plugins, a.screen, o(b)] } } function o(a) { return String.fromCharCode.apply(0, a) } var g = c.pow(d, e), h = c.pow(2, f), i = 2 * h, j = d - 1; c.seedrandom = function (a, f) { var j = [], p = m(l(f ? [a, o(b)] : 0 in arguments ? a : n(), 3), j), q = new k(j); return m(o(q.S), b), c.random = function () { for (var a = q.g(e), b = g, c = 0; h > a;)a = (a + c) * d, b *= d, c = q.g(1); for (; a >= i;)a /= 2, b /= 2, c >>>= 1; return (a + c) / b }, p }, m(c.random(), b) })(this, [], Math, 256, 6, 52); +(function(a,b,c,d,e,f){function k(a){var b,c=a.length,e=this,f=0,g=e.i=e.j=0,h=e.S=[];for(c||(a=[c++]);d>f;)h[f]=f++;for(f=0;d>f;f++)h[f]=h[g=j&g+a[f%c]+(b=h[f])],h[g]=b;(e.g=function(a){for(var b,c=0,f=e.i,g=e.j,h=e.S;a--;)b=h[f=j&f+1],c=c*d+h[j&(h[f]=h[g=j&g+b])+(h[g]=b)];return e.i=f,e.j=g,c})(d)}function l(a,b){var e,c=[],d=(typeof a)[0];if(b&&"o"==d)for(e in a)try{c.push(l(a[e],b-1))}catch(f){}return c.length?c:"s"==d?a:a+"\0"}function m(a,b){for(var d,c=a+"",e=0;c.length>e;)b[j&e]=j&(d^=19*b[j&e])+c.charCodeAt(e++);return o(b)}function n(c){try{return a.crypto.getRandomValues(c=new Uint8Array(d)),o(c)}catch(e){return[+new Date,a,a.navigator.plugins,a.screen,o(b)]}}function o(a){return String.fromCharCode.apply(0,a)}var g=c.pow(d,e),h=c.pow(2,f),i=2*h,j=d-1;c.seedrandom=function(a,f){var j=[],p=m(l(f?[a,o(b)]:0 in arguments?a:n(),3),j),q=new k(j);return m(o(q.S),b),c.random=function(){for(var a=q.g(e),b=g,c=0;h>a;)a=(a+c)*d,b*=d,c=q.g(1);for(;a>=i;)a/=2,b/=2,c>>>=1;return(a+c)/b},p},m(c.random(),b)})(this,[],Math,256,6,52); -function bind(scope, fn) { - //use : bind(this,function(){this.x++;}) - returns a function where "this" refers to the scoped this - return function () { fn.apply(scope, arguments); }; +function bind(scope,fn) +{ + //use : bind(this,function(){this.x++;}) - returns a function where "this" refers to the scoped this + return function() {fn.apply(scope,arguments);}; } -var grabProps = function (arr, prop) { - if (!arr) return []; - arr2 = []; - for (var i = 0; i < arr.length; i++) { - arr2.push(arr[i][prop]); - } - return arr2; +var grabProps=function(arr,prop) +{ + if (!arr) return []; + arr2=[]; + for (var i=0;i 0) { offX = (offX % iW) - iW; } - if (offY < 0) { offY = offY - Math.floor(offY / iH) * iH; } if (offY > 0) { offY = (offY % iH) - iH; } - for (var y = offY; y < H; y += iH) { for (var x = offX; x < W; x += iW) { this.drawImage(img, X + x, Y + y, iW, iH); } } - } +CanvasRenderingContext2D.prototype.fillPattern=function(img,X,Y,W,H,iW,iH,offX,offY) +{ + //for when built-in patterns aren't enough + if (img.alt!='blank') + { + var offX=offX||0; + var offY=offY||0; + if (offX<0) {offX=offX-Math.floor(offX/iW)*iW;} if (offX>0) {offX=(offX%iW)-iW;} + if (offY<0) {offY=offY-Math.floor(offY/iH)*iH;} if (offY>0) {offY=(offY%iH)-iH;} + for (var y=offY;y'; +function tinyIcon(icon,css) +{ + //returns HTML displaying an icon, with optional extra CSS + return '
'; } -var Loader = function ()//asset-loading system +var Loader=function()//asset-loading system { - this.loadingN = 0; - this.assetsN = 0; - this.assets = []; - this.assetsLoading = []; - this.assetsLoaded = []; - this.domain = ''; - this.loaded = 0;//callback - this.doneLoading = 0; - - this.blank = document.createElement('canvas'); - this.blank.width = 8; - this.blank.height = 8; - this.blank.alt = 'blank'; - - this.Load = function (assets) { - for (var i in assets) { - this.loadingN++; - this.assetsN++; - if (this.assetsLoading.indexOf(assets[i]) == -1 && this.assetsLoaded.indexOf(assets[i]) == -1) { - var img = new Image(); - if (!Game.local) img.crossOrigin = 'anonymous'; - img.alt = assets[i]; - img.onload = bind(this, this.onLoad); - this.assets[assets[i]] = img; - this.assetsLoading.push(assets[i]); - if (assets[i].indexOf('/') != -1) img.src = assets[i]; - else img.src = this.domain + assets[i]; - } - } - } - this.Replace = function (old, newer) { - if (!this.assets[old]) this.Load([old]); - var img = new Image(); - if (!Game.local) img.crossOrigin = 'anonymous'; - if (newer.indexOf('/') != -1)/*newer.indexOf('http')!=-1 || newer.indexOf('https')!=-1)*/ img.src = newer; - else img.src = this.domain + newer; - img.alt = newer; - img.onload = bind(this, this.onLoad); - this.assets[old] = img; - } - this.onLoadReplace = function () { - } - this.onLoad = function (e) { - this.assetsLoaded.push(e.target.alt); - this.assetsLoading.splice(this.assetsLoading.indexOf(e.target.alt), 1); - this.loadingN--; - if (this.doneLoading == 0 && this.loadingN <= 0 && this.loaded != 0) { - this.doneLoading = 1; - this.loaded(); - } - } - this.waitForLoad = function (assets, callback) { - //execute callback if all assets are ready to use, else check again every 200ms - var me = this; - var checkLoadedLoop = function () { - for (var i = 0; i < assets.length; i++) { - if (me.assetsLoaded.indexOf(assets[i]) == -1) { setTimeout(checkLoadedLoop, 200); return false }; - } - callback(); - return true; - } - me.Load(assets); - checkLoadedLoop(); - } - this.getProgress = function () { - return (1 - this.loadingN / this.assetsN); - } + this.loadingN=0; + this.assetsN=0; + this.assets=[]; + this.assetsLoading=[]; + this.assetsLoaded=[]; + this.domain=''; + this.loaded=0;//callback + this.doneLoading=0; + + this.blank=document.createElement('canvas'); + this.blank.width=8; + this.blank.height=8; + this.blank.alt='blank'; + + this.Load=function(assets) + { + for (var i in assets) + { + this.loadingN++; + this.assetsN++; + if (this.assetsLoading.indexOf(assets[i])==-1 && this.assetsLoaded.indexOf(assets[i])==-1) + { + var img=new Image(); + if (!Game.local) img.crossOrigin='anonymous'; + img.alt=assets[i]; + img.onload=bind(this,this.onLoad); + this.assets[assets[i]]=img; + this.assetsLoading.push(assets[i]); + if (assets[i].indexOf('/')!=-1) img.src=assets[i]; + else img.src=this.domain+assets[i]; + } + } + } + this.Replace=function(old,newer) + { + if (!this.assets[old]) this.Load([old]); + var img=new Image(); + if (!Game.local) img.crossOrigin='anonymous'; + if (newer.indexOf('/')!=-1)/*newer.indexOf('http')!=-1 || newer.indexOf('https')!=-1)*/ img.src=newer; + else img.src=this.domain+newer; + img.alt=newer; + img.onload=bind(this,this.onLoad); + this.assets[old]=img; + } + this.onLoadReplace=function() + { + } + this.onLoad=function(e) + { + this.assetsLoaded.push(e.target.alt); + this.assetsLoading.splice(this.assetsLoading.indexOf(e.target.alt),1); + this.loadingN--; + if (this.doneLoading==0 && this.loadingN<=0 && this.loaded!=0) + { + this.doneLoading=1; + this.loaded(); + } + } + this.waitForLoad=function(assets,callback) + { + //execute callback if all assets are ready to use, else check again every 200ms + var me=this; + var checkLoadedLoop=function() + { + for (var i=0;i= 2) { Sounds[url].currentTime = 0; Sounds[url].volume = Math.pow(volume * Game.volume / 100, 2); } - Sounds[url].play(); +var Sounds=[]; +var OldPlaySound=function(url,vol) +{ + var volume=1; + if (vol!==undefined) volume=vol; + if (!Game.volume || volume==0) return 0; + if (!Sounds[url]) {Sounds[url]=new Audio(url);Sounds[url].onloadeddata=function(e){e.target.volume=Math.pow(volume*Game.volume/100,2);}} + else if (Sounds[url].readyState>=2) {Sounds[url].currentTime=0;Sounds[url].volume=Math.pow(volume*Game.volume/100,2);} + Sounds[url].play(); } -var SoundInsts = []; -var SoundI = 0; -for (var i = 0; i < 12; i++) { SoundInsts[i] = new Audio(); } -var pitchSupport = false; +var SoundInsts=[]; +var SoundI=0; +for (var i=0;i<12;i++){SoundInsts[i]=new Audio();} +var pitchSupport=false; //note : Chrome turns out to not support webkitPreservesPitch despite the specifications claiming otherwise, and Firefox clips some short sounds when changing playbackRate, so i'm turning the feature off completely until browsers get it together //if (SoundInsts[0].preservesPitch || SoundInsts[0].mozPreservesPitch || SoundInsts[0].webkitPreservesPitch) pitchSupport=true; -var PlaySound = function (url, vol, pitchVar) { - //url : the url of the sound to play (will be cached so it only loads once) - //vol : volume between 0 and 1 (multiplied by game volume setting); defaults to 1 (full volume) - //(DISABLED) pitchVar : pitch variance in browsers that support it (Firefox only at the moment); defaults to 0.05 (which means pitch can be up to -5% or +5% anytime the sound plays) - var volume = 1; - var volumeSetting = Game.volume; - if (typeof vol !== 'undefined') volume = vol; - if (volume < -5) { volume += 10; volumeSetting = Game.volumeMusic; } - if (!volumeSetting || volume == 0) return 0; - if (typeof Sounds[url] === 'undefined') { - //sound isn't loaded, cache it - Sounds[url] = new Audio(url.indexOf('snd/') == 0 ? (Game.resPath + url) : url); - Sounds[url].onloadeddata = function (e) { PlaySound(url, vol, pitchVar); } - //Sounds[url].load(); - } - else if (Sounds[url].readyState >= 2 && SoundInsts[SoundI].paused) { - var sound = SoundInsts[SoundI]; - SoundI++; - if (SoundI >= 12) SoundI = 0; - sound.src = Sounds[url].src; - //sound.currentTime=0; - sound.volume = Math.pow(volume * volumeSetting / 100, 2); - if (pitchSupport) { - var pitchVar = (typeof pitchVar === 'undefined') ? 0.05 : pitchVar; - var rate = 1 + (Math.random() * 2 - 1) * pitchVar; - sound.preservesPitch = false; - sound.mozPreservesPitch = false; - sound.webkitPreservesPitch = false; - sound.playbackRate = rate; - } - try { sound.play(); } catch (e) { } - /* - var sound=Sounds[url].cloneNode(); - sound.volume=Math.pow(volume*volumeSetting/100,2); - sound.onended=function(e){if (e.target){delete e.target;}}; - sound.play();*/ - } +var PlaySound=function(url,vol,pitchVar) +{ + //url : the url of the sound to play (will be cached so it only loads once) + //vol : volume between 0 and 1 (multiplied by game volume setting); defaults to 1 (full volume) + //(DISABLED) pitchVar : pitch variance in browsers that support it (Firefox only at the moment); defaults to 0.05 (which means pitch can be up to -5% or +5% anytime the sound plays) + var volume=1; + var volumeSetting=Game.volume; + if (typeof vol!=='undefined') volume=vol; + if (volume<-5) {volume+=10;volumeSetting=Game.volumeMusic;} + if (!volumeSetting || volume==0) return 0; + if (typeof Sounds[url]==='undefined') + { + //sound isn't loaded, cache it + Sounds[url]=new Audio(url.indexOf('snd/')==0?(Game.resPath+url):url); + Sounds[url].onloadeddata=function(e){PlaySound(url,vol,pitchVar);} + //Sounds[url].load(); + } + else if (Sounds[url].readyState>=2 && SoundInsts[SoundI].paused) + { + var sound=SoundInsts[SoundI]; + SoundI++; + if (SoundI>=12) SoundI=0; + sound.src=Sounds[url].src; + //sound.currentTime=0; + sound.volume=Math.pow(volume*volumeSetting/100,2); + if (pitchSupport) + { + var pitchVar=(typeof pitchVar==='undefined')?0.05:pitchVar; + var rate=1+(Math.random()*2-1)*pitchVar; + sound.preservesPitch=false; + sound.mozPreservesPitch=false; + sound.webkitPreservesPitch=false; + sound.playbackRate=rate; + } + try{sound.play();}catch(e){} + /* + var sound=Sounds[url].cloneNode(); + sound.volume=Math.pow(volume*volumeSetting/100,2); + sound.onended=function(e){if (e.target){delete e.target;}}; + sound.play();*/ + } } -var PlayMusicSound = function (url, vol, pitchVar) { - //like PlaySound but, if music is enabled, play with music volume - PlaySound(url, (vol || 1) - (Music ? 10 : 0), pitchVar); +var PlayMusicSound=function(url,vol,pitchVar) +{ + //like PlaySound but, if music is enabled, play with music volume + PlaySound(url,(vol||1)-(Music?10:0),pitchVar); } -Music = false; -PlayCue = function (cue, arg) { - if (Music && Game.jukebox.trackAuto) Music.cue(cue, arg); +Music=false; +PlayCue=function(cue,arg) +{ + if (Music && Game.jukebox.trackAuto) Music.cue(cue,arg); } -if (!Date.now) { Date.now = function now() { return new Date().getTime(); }; } +if (!Date.now){Date.now=function now() {return new Date().getTime();};} -var triggerAnim = function (element, anim) { - if (!element) return; - element.classList.remove(anim); - void element.offsetWidth; - element.classList.add(anim); +var triggerAnim=function(element,anim) +{ + if (!element) return; + element.classList.remove(anim); + void element.offsetWidth; + element.classList.add(anim); }; -var debugStr = ''; -var Debug = function (what) { - if (!debugStr) debugStr = what; - else debugStr += '; ' + what; +var debugStr=''; +var Debug=function(what) +{ + if (!debugStr) debugStr=what; + else debugStr+='; '+what; } -var Timer = {}; -Timer.t = Date.now(); -Timer.labels = []; -Timer.smoothed = []; -Timer.reset = function () { - Timer.labels = []; - Timer.t = Date.now(); +var Timer={}; +Timer.t=Date.now(); +Timer.labels=[]; +Timer.smoothed=[]; +Timer.reset=function() +{ + Timer.labels=[]; + Timer.t=Date.now(); } -Timer.track = function (label) { - if (!Game.sesame) return; - var now = Date.now(); - if (!Timer.smoothed[label]) Timer.smoothed[label] = 0; - Timer.smoothed[label] += ((now - Timer.t) - Timer.smoothed[label]) * 0.1; - Timer.labels[label] = '
' + label + ' : ' + Math.round(Timer.smoothed[label]) + 'ms
'; - Timer.t = now; +Timer.track=function(label) +{ + if (!Game.sesame) return; + var now=Date.now(); + if (!Timer.smoothed[label]) Timer.smoothed[label]=0; + Timer.smoothed[label]+=((now-Timer.t)-Timer.smoothed[label])*0.1; + Timer.labels[label]='
'+label+' : '+Math.round(Timer.smoothed[label])+'ms
'; + Timer.t=now; } -Timer.clean = function () { - if (!Game.sesame) return; - var now = Date.now(); - Timer.t = now; +Timer.clean=function() +{ + if (!Game.sesame) return; + var now=Date.now(); + Timer.t=now; } -Timer.say = function (label) { - if (!Game.sesame) return; - Timer.labels[label] = '
' + label + '
'; +Timer.say=function(label) +{ + if (!Game.sesame) return; + Timer.labels[label]='
'+label+'
'; } /*===================================================================================== GAME INITIALIZATION =======================================================================================*/ -var Game = {}; - -(function () { - /*===================================================================================== - MODDING API - =======================================================================================*/ - /* - to use: - -(NOTE: this functions a little differently in the standalone/Steam version; have a look in the game's /mods folder for example mods - though most of the information below still applies) - -have your mod call Game.registerMod("unique id",mod object) - -the "unique id" value is a string the mod will use to index and retrieve its save data; special characters are ignored - -the "mod object" value is an object structured like so: - { - init:function(){ - //this function is called as soon as the mod is registered - //declare hooks here - }, - save:function(){ - //use this to store persistent data associated with your mod - return 'a string to be saved'; - }, - load:function(str){ - //do stuff with the string data you saved previously - }, - } - -the mod object may also contain any other data or functions you want, for instance to make them accessible to other mods - -your mod and its data can be accessed with Game.mods['mod id'] - -hooks are functions the game calls automatically in certain circumstances, like when calculating cookies per click or when redrawing the screen - -to add a hook: Game.registerHook('hook id',yourFunctionHere) - note: you can also declare whole arrays of hooks, ie. Game.registerHook('hook id',[function1,function2,...]) - -to remove a hook: Game.removeHook('hook id',theSameFunctionHere) - -some hooks are fed a parameter you can use in the function - -list of valid hook ids: - 'logic' - called every logic tick - 'draw' - called every draw tick - 'reset' - called whenever the player resets; parameter is true if this is a hard reset, false if it's an ascension - 'reincarnate' - called when the player has reincarnated after an ascension - 'ticker' - called when determining news ticker text; should return an array of possible choices to add - 'cps' - called when determining the CpS; parameter is the current CpS; should return the modified CpS - 'cookiesPerClick' - called when determining the cookies per click; parameter is the current value; should return the modified value - 'click' - called when the big cookie is clicked - 'create' - called after the game declares all buildings, buffs, upgrades and achievs; use this to declare your own - note that while the game distinguishes between vanilla and non-vanilla content, saving/loading functionality for custom content (including stuff like active buffs or permanent upgrade slotting) is not explicitly implemented and may be unpredictable and broken - 'check' - called every few seconds when we check for upgrade/achiev unlock conditions; you can also use this for other checks that you don't need happening every logic frame - -function hooks are provided for convenience and more advanced mod functionality will probably involve manual code injection - -please be mindful of the length of the data you save, as it does inflate the export-save-to-string feature - - NOTE: modding API is susceptible to change and may not always function super-well - */ - Game.mods = {}; - Game.sortedMods = []; - Game.brokenMods = []; - Game.modSaveData = {}; - Game.modHooks = {}; - Game.modHooksNames = ['logic', 'draw', 'reset', 'reincarnate', 'ticker', 'cps', 'cookiesPerClick', 'click', 'create', 'check']; - for (var i = 0; i < Game.modHooksNames.length; i++) { Game.modHooks[Game.modHooksNames[i]] = []; } - Game.registerMod = function (id, mod) { - id = id.replace(/\W+/g, ' '); - if (id == 'META') return false; - if (Game.mods[id]) { console.log('ERROR: mod already registered with the id "' + id + '".'); return false; } - Game.mods[id] = mod; - Game.sortedMods.push(mod); - mod.id = id; - mod.name = mod.name || id; - if (App) App.registerMod(mod); - console.log('Mod "' + id + '" added.'); - if (Game.ready && mod.init) { - if (!App && Game.Win) Game.Win('Third-party'); - mod.init(); - if (mod.load && Game.modSaveData[id]) mod.load(Game.modSaveData[id]); - mod.init = 0; - } - } - Game.launchMods = function () { - if (Game.brokenMods.length > 0) { - Game.Notify('' + loc("Some mods couldn't be loaded:") + '', '[' + Game.brokenMods.join(', ') + ']', [32, 17]); - } - for (var i = 0; i < Game.sortedMods.length; i++) { - var mod = Game.sortedMods[i]; - if (mod.init) { - console.log('===initializing mod', mod.id); - mod.init(); - mod.init = 0; - //if (mod.load && Game.modSaveData[mod.id]) mod.load(Game.modSaveData[mod.id]); - } - } - if (!App && Game.sortedMods.length > 0) Game.Win('Third-party'); - } - Game.registerHook = function (hook, func) { - if (func.constructor === Array) { - for (var i = 0; i < func.length; i++) { Game.registerHook(hook, func[i]); } - return; - } - if (typeof func !== 'function') return; - if (typeof Game.modHooks[hook] !== 'undefined') Game.modHooks[hook].push(func); - else console.log('Error: a mod tried to register a non-existent hook named "' + hook + '".'); - } - Game.removeHook = function (hook, func) { - if (func.constructor === Array) { - for (var i = 0; i < func.length; i++) { Game.removeHook(hook, func[i]); } - return; - } - if (typeof func !== 'function') return; - if (typeof Game.modHooks[hook] !== 'undefined' && Game.modHooks[hook].indexOf(func) != -1) Game.modHooks[hook].splice(Game.modHooks[hook].indexOf(func), 1); - else console.log('Error: a mod tried to remove a non-existent hook named "' + hook + '".'); - } - Game.runModHook = function (hook, param) { - for (var i = 0; i < Game.modHooks[hook].length; i++) { - Game.modHooks[hook][i](param); - } - } - Game.runModHookOnValue = function (hook, val) { - for (var i = 0; i < Game.modHooks[hook].length; i++) { - val = Game.modHooks[hook][i](val); - } - return val; - } - Game.safeSaveString = function (str) { - //look as long as it works - str = replaceAll('|', '[P]', str); - str = replaceAll(';', '[S]', str); - return str; - } - Game.safeLoadString = function (str) { - str = replaceAll('[P]', '|', str); - str = replaceAll('[S]', ';', str); - return str; - } - Game.saveModData = function () { - var str = ''; - for (var i = 0; i < Game.sortedMods.length; i++) { - if (Game.sortedMods[i]['save']) { - var data = Game.sortedMods[i]['save'](); - if (typeof data !== 'undefined') Game.modSaveData[Game.sortedMods[i].id] = data; - } - } - for (var i in Game.modSaveData) { - str += i + ':' + Game.safeSaveString(Game.modSaveData[i]) + ';'; - } - if (App && App.saveMods) str += App.saveMods(); - return str; - } - Game.loadModData = function () { - for (var i in Game.modSaveData) { - if (Game.mods[i] && Game.mods[i]['load']) Game.mods[i]['load'](Game.modSaveData[i]); - } - } - Game.deleteModData = function (id) { - if (Game.modSaveData[id]) delete Game.modSaveData[id]; - } - Game.deleteAllModData = function () { - Game.modSaveData = {}; - } - Game.CheckModData = function () { - var modsN = 0; - var str = ''; - for (var i in Game.modSaveData) { - str += '
'; - str += '
' + i + ''; - if (Game.mods[i]) str += ' ' + loc("(loaded)"); - str += '
'; - str += '
' + loc("%1 char", Game.modSaveData[i].length) + ' X'; - str += '
'; - str += '
'; - modsN++; - } - if (modsN == 0) str += loc("No mod data present."); - else str += ''; - Game.Prompt('

' + loc("Mod data") + '

' + tinyIcon([16, 5]) + '
' + loc("These are the mods present in your save data. You may delete some of this data to make your save file smaller.") + '
' + str + '
', [loc("Back")]); - } - - Game.LoadMod = LoadScript;//loads the mod at the given URL - - if (false) { - //EXAMPLE MOD - Game.registerMod('test mod', { - /* - what this example mod does: - -double your CpS - -display a little popup for half a second whenever you click the big cookie - -add a little intro text above your bakery name, and generate that intro text at random if you don't already have one - -save and load your intro text - */ - init: function () { - Game.registerHook('reincarnate', function () { Game.mods['test mod'].addIntro(); }); - Game.registerHook('check', function () { if (!Game.playerIntro) { Game.mods['test mod'].addIntro(); } }); - Game.registerHook('click', function () { Game.Notify(choose(['A good click.', 'A solid click.', 'A mediocre click.', 'An excellent click!']), '', 0, 0.5); }); - Game.registerHook('cps', function (cps) { return cps * 2; }); - }, - save: function () { - //note: we use stringified JSON for ease and clarity but you could store any type of string - return JSON.stringify({ text: Game.playerIntro }) - }, - load: function (str) { - var data = JSON.parse(str); - if (data.text) Game.mods['test mod'].addIntro(data.text); - }, - addIntro: function (text) { - //note: this is not a mod hook, just a function that's part of the mod - Game.playerIntro = text || choose(['oh snap, it\'s', 'watch out, it\'s', 'oh no! here comes', 'hide your cookies, for here comes', 'behold! it\'s']); - if (!l('bakerySubtitle')) l('bakeryName').insertAdjacentHTML('afterend', '
'); - l('bakerySubtitle').textContent = '~' + Game.playerIntro + '~'; - }, - }); - } - - //replacing an existing canvas picture with a new one at runtime : Game.Loader.Replace('perfectCookie.png','imperfectCookie.png'); - //upgrades and achievements can use other pictures than icons.png; declare their icon with [posX,posY,'http://example.com/myIcons.png'] - //check out the "UNLOCKING STUFF" section to see how unlocking achievs and upgrades is done +var Game={}; + +(function(){ + /*===================================================================================== + MODDING API + =======================================================================================*/ + /* + to use: + -(NOTE: this functions a little differently in the standalone/Steam version; have a look in the game's /mods folder for example mods - though most of the information below still applies) + -have your mod call Game.registerMod("unique id",mod object) + -the "unique id" value is a string the mod will use to index and retrieve its save data; special characters are ignored + -the "mod object" value is an object structured like so: + { + init:function(){ + //this function is called as soon as the mod is registered + //declare hooks here + }, + save:function(){ + //use this to store persistent data associated with your mod + return 'a string to be saved'; + }, + load:function(str){ + //do stuff with the string data you saved previously + }, + } + -the mod object may also contain any other data or functions you want, for instance to make them accessible to other mods + -your mod and its data can be accessed with Game.mods['mod id'] + -hooks are functions the game calls automatically in certain circumstances, like when calculating cookies per click or when redrawing the screen + -to add a hook: Game.registerHook('hook id',yourFunctionHere) - note: you can also declare whole arrays of hooks, ie. Game.registerHook('hook id',[function1,function2,...]) + -to remove a hook: Game.removeHook('hook id',theSameFunctionHere) + -some hooks are fed a parameter you can use in the function + -list of valid hook ids: + 'logic' - called every logic tick + 'draw' - called every draw tick + 'reset' - called whenever the player resets; parameter is true if this is a hard reset, false if it's an ascension + 'reincarnate' - called when the player has reincarnated after an ascension + 'ticker' - called when determining news ticker text; should return an array of possible choices to add + 'cps' - called when determining the CpS; parameter is the current CpS; should return the modified CpS + 'cookiesPerClick' - called when determining the cookies per click; parameter is the current value; should return the modified value + 'click' - called when the big cookie is clicked + 'create' - called after the game declares all buildings, buffs, upgrades and achievs; use this to declare your own - note that while the game distinguishes between vanilla and non-vanilla content, saving/loading functionality for custom content (including stuff like active buffs or permanent upgrade slotting) is not explicitly implemented and may be unpredictable and broken + 'check' - called every few seconds when we check for upgrade/achiev unlock conditions; you can also use this for other checks that you don't need happening every logic frame + -function hooks are provided for convenience and more advanced mod functionality will probably involve manual code injection + -please be mindful of the length of the data you save, as it does inflate the export-save-to-string feature + + NOTE: modding API is susceptible to change and may not always function super-well + */ + Game.mods={}; + Game.sortedMods=[]; + Game.brokenMods=[]; + Game.modSaveData={}; + Game.modHooks={}; + Game.modHooksNames=['logic','draw','reset','reincarnate','ticker','cps','cookiesPerClick','click','create','check']; + for (var i=0;i0) + { + Game.Notify(''+loc("Some mods couldn't be loaded:")+'','['+Game.brokenMods.join(', ')+']',[32,17]); + } + for (var i=0;i0) Game.Win('Third-party'); + } + Game.registerHook=function(hook,func) + { + if (func.constructor===Array) + { + for (var i=0;i'; + if (Game.mods[i]) str+=' '+loc("(loaded)"); + str+=''; + str+='
'+loc("%1 char",Game.modSaveData[i].length)+' X'; + str+='
'; + str+=''; + modsN++; + } + if (modsN==0) str+=loc("No mod data present."); + else str+=''; + Game.Prompt('

'+loc("Mod data")+'

'+tinyIcon([16,5])+'
'+loc("These are the mods present in your save data. You may delete some of this data to make your save file smaller.")+'
'+str+'
',[loc("Back")]); + } + + Game.LoadMod=LoadScript;//loads the mod at the given URL + + if (false) + { + //EXAMPLE MOD + Game.registerMod('test mod',{ + /* + what this example mod does: + -double your CpS + -display a little popup for half a second whenever you click the big cookie + -add a little intro text above your bakery name, and generate that intro text at random if you don't already have one + -save and load your intro text + */ + init:function(){ + Game.registerHook('reincarnate',function(){Game.mods['test mod'].addIntro();}); + Game.registerHook('check',function(){if (!Game.playerIntro){Game.mods['test mod'].addIntro();}}); + Game.registerHook('click',function(){Game.Notify(choose(['A good click.','A solid click.','A mediocre click.','An excellent click!']),'',0,0.5);}); + Game.registerHook('cps',function(cps){return cps*2;}); + }, + save:function(){ + //note: we use stringified JSON for ease and clarity but you could store any type of string + return JSON.stringify({text:Game.playerIntro}) + }, + load:function(str){ + var data=JSON.parse(str); + if (data.text) Game.mods['test mod'].addIntro(data.text); + }, + addIntro:function(text){ + //note: this is not a mod hook, just a function that's part of the mod + Game.playerIntro=text||choose(['oh snap, it\'s','watch out, it\'s','oh no! here comes','hide your cookies, for here comes','behold! it\'s']); + if (!l('bakerySubtitle')) l('bakeryName').insertAdjacentHTML('afterend','
'); + l('bakerySubtitle').textContent='~'+Game.playerIntro+'~'; + }, + }); + } + + //replacing an existing canvas picture with a new one at runtime : Game.Loader.Replace('perfectCookie.png','imperfectCookie.png'); + //upgrades and achievements can use other pictures than icons.png; declare their icon with [posX,posY,'http://example.com/myIcons.png'] + //check out the "UNLOCKING STUFF" section to see how unlocking achievs and upgrades is done })(); -Game.version = VERSION; -Game.loadedFromVersion = VERSION; -Game.beta = BETA; -if (!App && window.location.href.indexOf('/beta') > -1) Game.beta = 1; -else if (App && new URL(window.location.href).searchParams.get('beta')) Game.beta = 1; -Game.https = !App ? ((location.protocol != 'https:') ? false : true) : true; -Game.SaveTo = 'CookieClickerGame'; -if (Game.beta) Game.SaveTo = 'CookieClickerGameBeta'; -if (App && new URL(window.location.href).searchParams.get('modless')) Game.modless = 1; -Game.local = (!location.hostname || location.hostname === 'localhost' || location.hostname === '127.0.0.1'); -if (App) Game.local = true; -Game.resPath = ''; -if (!App && !Game.local && window.location.href.indexOf('orteil.dashnet.org') != -1) { - Game.resPath = ('//' + location.host + location.pathname).replace('orteil.dashnet.org', 'cdn.dashnet.org'); - if (Game.resPath.substr(-1) != '/') Game.resPath += '/'; +Game.version=VERSION; +Game.loadedFromVersion=VERSION; +Game.beta=BETA; +if (!App && window.location.href.indexOf('/beta')>-1) Game.beta=1; +else if (App && new URL(window.location.href).searchParams.get('beta')) Game.beta=1; +Game.https=!App?((location.protocol!='https:')?false:true):true; +Game.SaveTo='CookieClickerGame'; +if (Game.beta) Game.SaveTo='CookieClickerGameBeta'; +if (App && new URL(window.location.href).searchParams.get('modless')) Game.modless=1; +Game.local=(!location.hostname || location.hostname==='localhost' || location.hostname==='127.0.0.1'); +if (App) Game.local=true; +Game.resPath=''; +if (!App && !Game.local && window.location.href.indexOf('orteil.dashnet.org')!=-1) +{ + Game.resPath=('//'+location.host+location.pathname).replace('orteil.dashnet.org','cdn.dashnet.org'); + if (Game.resPath.substr(-1)!='/') Game.resPath+='/'; } -Game.Launch = function () { - Game.mobile = 0; - Game.touchEvents = 0; - //if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) Game.mobile=1; - //if (Game.mobile) Game.touchEvents=1; - //if ('ontouchstart' in document.documentElement) Game.touchEvents=1; - - var css = document.createElement('style'); - css.type = 'text/css'; - css.innerHTML = 'body .icon,body .crate,body .usesIcon{background-image:url(' + Game.resPath + 'img/icons.png?v=' + Game.version + ');}' + - '.product .icon,.product .icon.off,.tinyProductIcon{background-image:url(' + Game.resPath + 'img/buildings.png?v=' + Game.version + ');}'; - document.head.appendChild(css); - - //this is so shimmers can still appear even if you lose connection after the game is loaded - var preloadImages = ['img/goldCookie.png', 'img/wrathCookie.png', 'img/spookyCookie.png', 'img/hearts.png', 'img/contract.png', 'img/wrathContract.png', 'img/bunnies.png', 'img/frostedReindeer.png']; - var preloadImagesL = l('preloadImages'); - for (var i = 0; i < preloadImages.length; i++) { - var img = document.createElement('img'); - img.src = Game.resPath + preloadImages[i]; - preloadImagesL.appendChild(img); - } - - Game.visible = true; - AddEvent(document, 'visibilitychange', function (e) { if (document.visibilityState === 'hidden') Game.visible = false; else Game.visible = true; }); - - - if (!EN) { - //code-patching the CSS for localization feels like it should be against the law, and yet - var css = document.createElement('style'); - css.type = 'text/css'; - css.innerHTML = - '#upgrades:before{content:\'' + loc("Upgrades") + '\';}' + - '#toggleUpgrades:before{content:\'' + loc("Switches") + '\';}' + - '#techUpgrades:before{content:\'' + loc("Research") + '\';}' + - '#vaultUpgrades:before{content:\'' + loc("Vault") + '\';}' + - '#products:before{content:\'' + loc("Buildings") + '\';}' + - ''; - document.head.appendChild(css); - } - - Game.baseSeason = '';//halloween, christmas, valentines, fools, easter - //automatic season detection (might not be 100% accurate) - var year = new Date().getFullYear(); - var leap = (((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0)) ? 1 : 0; - var day = Math.floor((new Date() - new Date(year, 0, 0)) / (1000 * 60 * 60 * 24)); - if (day >= 41 && day <= 46) Game.baseSeason = 'valentines'; - else if (day + leap >= 90 && day <= 92 + leap) Game.baseSeason = 'fools'; - else if (day >= 304 - 7 + leap && day <= 304 + leap) Game.baseSeason = 'halloween'; - else if (day >= 349 + leap && day <= 365 + leap) Game.baseSeason = 'christmas'; - else { - //easter is a pain goddamn - var easterDay = function (Y) { var C = Math.floor(Y / 100); var N = Y - 19 * Math.floor(Y / 19); var K = Math.floor((C - 17) / 25); var I = C - Math.floor(C / 4) - Math.floor((C - K) / 3) + 19 * N + 15; I = I - 30 * Math.floor((I / 30)); I = I - Math.floor(I / 28) * (1 - Math.floor(I / 28) * Math.floor(29 / (I + 1)) * Math.floor((21 - N) / 11)); var J = Y + Math.floor(Y / 4) + I + 2 - C + Math.floor(C / 4); J = J - 7 * Math.floor(J / 7); var L = I - J; var M = 3 + Math.floor((L + 40) / 44); var D = L + 28 - 31 * Math.floor(M / 4); return new Date(Y, M - 1, D); }(year); - easterDay = Math.floor((easterDay - new Date(easterDay.getFullYear(), 0, 0)) / (1000 * 60 * 60 * 24)); - if (day >= easterDay - 7 && day <= easterDay) Game.baseSeason = 'easter'; - } - - Game.updateLog = - '
' + - '
' + loc("Info") + '
' + - '
' + - '
' + loc("About") + '
' + - (App ? '
' + loc("Note: links will open in your web browser.") + '
' : '') + - '
' + loc("Cookie Clicker is a javascript game by %1 and %2.", ['Orteil', 'Opti']) + '
' + - (App ? '
' + loc("Music by %1.", 'C418') + '
' : '') + - //'
We have an official Discord, as well as a forum; '+ - '
' + (EN ? - 'We have an official Discord; if you\'re looking for help, you may also want to visit the subreddit or the wiki.
News and teasers are usually posted on Orteil\'s tumblr and twitter.' - : - loc("Useful links: %1, %2, %3, %4.", [ - 'Discord', - 'wiki', - 'tumblr', - 'twitter', - ])) - + '
' + - (!App ? '
' + loc( - "This version of Cookie Clicker is 100% free, forever. Want to support us so we can keep developing games? Here's some ways you can help:%1", - [(!App ? '

• ' + (EN ? 'get ' : '') + 'Cookie Clicker on Steam' : '') + '' + (EN ? ' (it\'s about 5 bucks)' : '') + '

• ' + (EN ? 'support us on ' : '') + 'Patreon' + (EN ? ' (there\'s perks!)' : '') + '

• ' + (EN ? 'check out our ' : '') + 'Shop' + (EN ? ' with rad cookie shirts, hoodies and stickers' : '') + ((!App && EN) ? '

• disable your adblocker (if you want!)' : '')] - ) + - '
' : '') + - '
' + loc("Note: if you find a new bug after an update and you're using a 3rd-party add-on, make sure it's not just your add-on causing it!") + '
' + - (!App ? ('
' + loc("Warning: clearing your browser cache or cookies (what else?) will result in your save being wiped. Export your save and back it up first!") + '
') : '') + - - '
' + - '
' + loc("Version history") + '
'; - - for (var i = 0; i < locPatches.length; i++) { - var patch = locPatches[i]; - var patchText = - '
' + - '
' + patch.title + '
'; - for (var ii = 0; ii < patch.points.length; ii++) { - patchText += '
• ' + patch.points[ii] + '
'; - } - Game.updateLog += patchText; - } - - if (!EN) Game.updateLog += '
' + loc("Note: older update notes are in English.") + '
'; - - Game.updateLog += - - '
' + - '
07/05/2023 - often imitated, never duplicated
' + - '
• added the final, 20th building
' + - '
-currently, no more buildings are planned beyond this one; there are still many more updates to come, but future patches will focus on adding minigames to the existing buildings along with other features!
' + - '
• added another tier of upgrades and achievements
' + - '
• updated flavored milk icons
' + - '
• added visual cue for shimmering veil
' + - '
• touched up old Santa sprites
' + - '
• new heavenly upgrade that lets you trade presents with other players
' + - (App ? '
• removed Discord rich presence support (plugin currently broken)
' : '') + - '
• Cookie Clicker turns 10 years old this year. Thank you for clicking cookies with us!
' + - - '
' + - '
31/05/2022 - a mind of its own
' + - '
• added a new building
' + - '
• added a new tier of upgrades and achievements
' + - '
• multi-language support added to web version
' + - '
• added a few new heavenly upgrades
' + - '
• added the jukebox
' + - '
• the 3 secret heavenly upgrades now rely on how many times the relevant digit is present in total, rather than at the end
' + - '
• backgrounds overhauled; extra options for the background selector
' + - '
• extra options for the golden cookie sound selector
' + - '
• the bank minigame now tells you the value you previously bought a stock at
' + - '
• the bank minigame flow is a little more exciting
' + - (App ? '
• new option to disable your game activity showing up in Discord
' : '') + - (App ? '
• launch errors now provide the option to restart without mods
' : '') + - - (App ? ('
' + - '
18/12/2021 - work it
' + - '
• added Steam Workshop support (lets you install mods and upload your own)
' + - '
• added Korean language support
' + - '
• added back "short numbers" option for non-english languages (uses english terms for the time being)
' + - '
• added tooltips on achievement notifications
' + - '
• added Discord rich presence support
') : '') + - - '
' + - '
01/09/2021 - give me Steam
' + - '
• Cookie Clicker has been released on Steam with music by C418!
' + - '
• web version and Steam version will receive the same updates from now on
' + - '
• you can now play in 13 different languages
' + - '
• new option to disable scary stuff
' + - '
• basic screen-reader support
' + - '
• various other improvements
' + - - '
' + - '
01/11/2020 - alternate reality
' + - '
• new building
' + - '
• new upgrade tier
' + - '
• new achievement tier
' + - '
• new heavenly upgrades
' + - '
• new modding API
' + - '
• new rebalancing (ascension slot prices, finger upgrades...)
' + - '
• new fixes (leap years, ghost swaps, carryover seeds...)
' + - '
• new stuff
' + - - '
' + - '
23/08/2020 - money me, money now
' + - '
• finalized stock market minigame beta and added it to live version
' + - '
• dark mode added to stock market minigame
' + - '
• can no longer select a milk before unlocking it; milk selector layout has been improved
' + - '
• stock market goods have higher value caps and a larger spread; can also shift-click the hide buttons to hide/show all other stocks
' + - - '
' + - '
08/08/2020 - checking account (beta)
' + - '
• stock market layout has been revised
' + - '
• selling stocks no longer increases cookies baked all time
' + - '
• stock prices are now defined by your highest raw CpS this ascension (which is now displayed in the stats screen)
' + - '
• can no longer buy and sell a stock in the same tick
' + - '
• warehouse space now gains +10 per associated building level (up from +5)
' + - '
• bank level now improves average (and maximum) stock values
' + - '
• later stocks are worth more
' + - '
• Cookie Clicker turns 7!
' + - - '
' + - '
18/06/2020 - making bank (beta)
' + - '
• added the stock market minigame, accessible with level 1 banks or above; buy low, sell high!
' + - '
• (minigame subject to heavy rebalancing over the coming patches)
' + - '
• added a couple heavenly upgrades, including one that lets you pet your dragon
' + - '
• added a new tier of building upgrades and achievements
' + - '
• reindeer clicks now properly count for shimmering veil
' + - '
• numbers in scientific notation should display better with Short numbers off
' + - '
• replaced ツ in the javascript console building display with more accurate ッ
' + - - '
' + - '
28/09/2019 - going off-script
' + - '
• added a new building
' + - '
• added fortune cookies (a new heavenly upgrade)
' + - '
• more upgrades, achievements etc
' + - '
• updated the Russian bread cookies icon to better reflect their cyrillic origins
' + - '
stealth update : the sugar lump refill timeout (not sugar lump growth) now no longer ticks down while the game is closed (this fixes an exploit)
' + - '
• also released the official Android version of Cookie Clicker, playable here (iOS version will come later)
' + - - '
' + - '
01/04/2019 - 2.019 (the "this year" update)
' + - '
• game has been renamed to "Cookie Clicker" to avoid confusion
' + - '
• can now click the big cookie to generate cookies for free
' + - '
• removed fall damage
' + - //'
• fixed various typos : player\'s name is now correctly spelled as "[bakeryName]"
'+ - '
• removed all references to computer-animated movie Hoodwinked! (2005)
' + - '
• went back in time and invented cookies and computer mice, ensuring Cookie Clicker would one day come to exist
' + - '
• game now fully compliant with Geneva Conventions
' + - '
• dropped support for TI-84 version
' + - '
• released a low-res retro version of the game, playable here : orteil.dashnet.org/experiments/cookie
' + - '
• updated version number
' + - - '
' + - '
05/03/2019 - cookies for days
' + - '
• added over 20 new cookies, all previously suggested by our supporters on Patreon
' + - '
• added 2 heavenly upgrades
' + - '
• the Golden goose egg now counts as a golden cookie upgrade for Residual luck purposes
' + - '
• golden sugar lumps now either double your cookies, or give you 24 hours of your CpS, whichever is lowest (previously was doubling cookies with no cap)
' + - '
• the amount of heralds is now saved with your game, and is used to compute offline CpS the next time the game is loaded; previously, on page load, the offline calculation assumed heralds to be 0
' + - '
• added a system to counteract the game freezing up (and not baking cookies) after being inactive for a long while on slower computers; instead, this will now trigger sleep mode, during which you still produce cookies as if the game was closed; to enable this feature, use the "Sleep mode timeout" option in the settings
' + - '
• vaulting upgrades is now done with shift-click, as ctrl-click was posing issues for Mac browsers
' + - '
• made tooltips for building CpS boosts from synergies hopefully clearer
' + - '
• fixed an exploit with gambler\'s fever dream working across exports and ascensions
' + - '
• can now hide tooltips in the garden by keeping the shift key pressed to make it easier to see where you\'re planting
' + - '
• fixed a bug with golden cookies/reindeer not disappearing properly in some circumstances
' + - '
• the Dragon\'s Curve aura should now properly make sugar lumps twice as weird
' + - '
• the ctrl key should less often register incorrectly as pressed
' + - '
• added a new ad slot in the top-right, as while our playerbase is strong and supportive as ever, our ad revenue sometimes fluctuates badly; we may remove the ad again should our income stabilize
' + - '
• made a few adjustments to make the game somewhat playable in mobile browsers; it\'s not perfect and can get buggy, but it\'s functional! (you may need to zoom out or scroll around to view the game properly)
' + - '
• speaking of which, we also got some good progress on the mobile app version (built from scratch for mobile), so stay tuned!
' + - - '
' + - '
25/10/2018 - feedback loop
' + - '
• added a new building
' + - '
• launched our Patreon (the link is orange so you\'ll notice it!)
' + - '
• added a bunch of new heavenly upgrades, one of which ties into our Patreon but benefits everyone (this is still experimental!)
' + - '
• when hovering over grandmas, you can now see their names and ages
' + - '
• "make X cookies just from Y" requirements are now higher
' + - '
• tweaked the prices of some heavenly upgrades to better fit the current cookie economy (it turns out billions of heavenly chips is now very achievable)
' + - '
• building tooltips now display what % of CpS they contribute through synergy upgrades
' + - '
• queenbeets now give up to 4% of bank, down from 6%
' + - '
• among other things, season switches now display how many seasonal upgrades you\'re missing, and permanent upgrade slots now display the name of the slotted upgrade
' + - '
• season switches have reworked prices
' + - '
• season switches can now be cancelled by clicking them again
' + - '
• can no longer accidentally click wrinklers through other elements
' + - '
• sugar frenzy now triples your CpS for an hour instead of doubling it
' + - '
• this text is now selectable
' + - '
• progress on dungeons minigame is still very much ongoing
' + - - '
' + - '
08/08/2018 - hey now
' + - '
• Cookie Clicker somehow turns 5, going against doctors\' most optimistic estimates
' + - '
• added a new tier of building achievements, all named after Smash Mouth\'s classic 1999 hit "All Star"
' + - '
• added a new tier of building upgrades, all named after nothing in particular
' + - '
to our players : thank you so much for sticking with us all those years and allowing us to keep making the dumbest game known to mankind
' + - '
• resumed work on the dungeons minigame
' + - - '
' + - '
01/08/2018 - buy buy buy
' + - '
• added a heavenly upgrade that lets you buy all your upgrades instantly
' + - '
• added a heavenly upgrade that lets you see upgrade tiers (feature was previously removed due to being confusing)
' + - '
• added a new wrinkler-related heavenly upgrade
' + - '
• added a new upgrade tier
' + - '
• added a couple new cookies and achievements
' + - '
• new "extra buttons" setting; turning it on adds buttons that let you minimize buildings
' + - '
• new "lump confirmation" setting; turning it on will show a confirmation prompt when you spend sugar lumps
' + - '
• buildings now sell back for 25% of their current price (down from 50%); Earth Shatterer modified accordingly, now gives back 50% (down from 85%)
' + - '
• farm soils now unlock correctly based on current amount of farms
' + - '
• cheapcaps have a new exciting nerf
' + - '
• wrinklegill spawns a bunch more
' + - '
• can now ctrl-shift-click on "Harvest all" to only harvest mature, non-immortal plants
' + - '
• added a new rare type of sugar lump
' + - - '
' + - '
20/04/2018 - weeding out some bugs
' + - '
• golden clovers and wrinklegills should spawn a bit more often
' + - '
• cronerice matures a lot sooner
' + - '
• mature elderworts stay mature after reloading
' + - '
• garden interface occupies space more intelligently
' + - '
• seed price displays should be better behaved with short numbers disabled
' + - '
• minigame animations are now turned off if using the "Fancy graphics" option is disabled
' + - '
• CpS achievement requirements were dialed down a wee tad
' + - - '
' + - '
19/04/2018 - garden patch
' + - '
• upgrades dropped by garden plants now stay unlocked forever (but drop much more rarely)
' + - '
• garden sugar lump refill now also makes plants spread and mutate 3 times more during the bonus tick
' + - '
• a few new upgrades
' + - '
• a couple bug fixes and rephrasings
' + - - '
' + - '
18/04/2018 - your garden-variety update
' + - '
• added the garden, a minigame unlocked by having at least level 1 farms
' + - '
• added a little arrow and a blinky label to signal the game has updated since you last played it (hi!)
' + - '
• new cookies, milk flavors and achievements
' + - '
• sugar lumps are now unlocked whenever you\'ve baked at least a billion cookies, instead of on your first ascension
' + - '
• sugar lump type now saves correctly
' + - '
• minigame sugar lump refills can now only be done every 15 minutes (timer shared across all minigames)
' + - '
• CpS achievements now have steeper requirements
' + - '
• golden cookies now last 5% shorter for every other golden cookie on the screen
' + - '
• the game now remembers which minigames are closed or open
' + - '
• added a popup that shows when a season starts (so people won\'t be so confused about "the game looking weird today")
' + - '
• permanent upgrade slots now show a tooltip for the selected upgrade
' + - '
• finally fixed the save corruption bug, hopefully
' + - - '
' + - '
24/02/2018 - sugar coating
' + - '
• added link to official Discord server
' + - '
• felt weird about pushing an update without content so :
' + - '
• added a handful of new cookies
' + - '
• added 3 new heavenly upgrades
' + - '
• short numbers should now be displayed up to novemnonagintillions
' + - '
• cookie chains no longer spawn from the Force the Hand of Fate spell
' + - '
• bigger, better Cookie Clicker content coming later this year
' + - - '
' + - '
08/08/2017 - 4 more years
' + - '
• new building : Chancemakers
' + - '
• new milk, new kittens, new dragon aura, new cookie, new upgrade tier
' + - '
• buffs no longer affect offline CpS
' + - '
• Godzamok\'s hunger was made less potent (this is a nerf, very sorry)
' + - '
• grimoire spell costs and maximum magic work differently
' + - '
• Spontaneous Edifice has been reworked
' + - '
• changed unlock levels and prices for some cursor upgrades
' + - '
• fixed buggy pantheon slots, hopefully
' + - '
• fixed "Legacy started a long while ago" showing as "a few seconds ago"
' + - '
• Cookie Clicker just turned 4. Thank you for sticking with us this long!
' + - - '
' + - '
15/07/2017 - the spiritual update
' + - '
• implemented sugar lumps, which start coalescing if you\'ve ascended at least once and can be used as currency for special things
' + - '
• buildings can now level up by using sugar lumps in the main buildings display, permanently boosting their CpS
' + - '
• added two new features unlocked by levelling up their associated buildings, Temples and Wizard towers; more building-related minigames will be implemented in the future
' + - '
• active buffs are now saved
' + - '
• the background selector upgrade is now functional
' + - '
• the top menu no longer scrolls with the rest
' + - '
• timespans are written nicer
' + - '
• Dragonflights now tend to supercede Click frenzies, you will rarely have both at the same time
' + - '
• some old bugs were phased out and replaced by new ones
' + - - '
' + - '
24/07/2016 - golden cookies overhaul
' + - '
• golden cookies and reindeer now follow a new system involving explicitly defined buffs
' + - '
• a bunch of new golden cookie effects have been added
' + - '
• CpS gains from eggs are now multiplicative
' + - '
• shiny wrinklers are now saved
' + - '
• reindeer have been rebalanced ever so slightly
' + - '
• added a new cookie upgrade near the root of the heavenly upgrade tree; this is intended to boost early ascensions and speed up the game as a whole
' + - '
• due to EU legislation, implemented a warning message regarding browser cookies; do understand that the irony is not lost on us
' + - - '
' + - '
08/02/2016 - legacy
' + - '
Everything that was implemented during the almost 2-year-long beta has been added to the live game. To recap :
' + - '
• 3 new buildings : banks, temples, and wizard towers; these have been added in-between existing buildings and as such, may disrupt some building-related achievements
' + - '
• the ascension system has been redone from scratch, with a new heavenly upgrade tree
' + - '
• mysterious new features such as angel-powered offline progression, challenge runs, and a cookie dragon
' + - '
• sounds have been added (can be disabled in the options)
' + - '
• heaps of rebalancing and bug fixes
' + - '
• a couple more upgrades and achievements, probably
' + - '
• fresh new options to further customize your cookie-clicking experience
' + - '
• quality-of-life improvements : better bulk-buy, better switches etc
' + - '
• added some general polish
' +/* i liked this dumb pun too much to let it go unnoticed */ - '
• tons of other little things we can\'t even remember right now
' + - '
Miss the old version? Your old save was automatically exported here!
' + - - '
' + - '
05/02/2016 - legacy beta, more fixes
' + - '
• added challenge modes, which can be selected when ascending (only 1 for now : "Born again")
' + - '
• changed the way bulk-buying and bulk-selling works
' + - '
• more bugs ironed out
' + - - '
' + - '
03/02/2016 - legacy beta, part III
' + - '
• Not all bugs have been fixed, but everything should be much less broken.
' + - '
• Additions' + - '
' + - '-a few more achievements
' + - '-new option for neat, but slow CSS effects (disabled by default)
' + - '-new option for a less grating cookie sound (enabled by default)
' + - '-new option to bring back the boxes around icons in the stats screen
' + - '-new buttons for saving and loading your game to a text file
' + - '
' + - '
' + - '
• Changes' + - '
' + - '-early game should be a bit faster and very late game was kindly asked to tone it down a tad
' + - '-dragonflight should be somewhat less ridiculously overpowered
' + - '-please let me know if the rebalancing was too heavy or not heavy enough
' + - '-santa and easter upgrades now depend on Santa level and amount of eggs owned, respectively, instead of costing several minutes worth of CpS
' + - '-cookie upgrades now stack multiplicatively rather than additively
' + - '-golden switch now gives +50% CpS, and residual luck is +10% CpS per golden cookie upgrade (up from +25% and +1%, respectively)
' + - '-lucky cookies and cookie chain payouts have been modified a bit, possibly for the better, who knows!
' + - '-wrinklers had previously been reduced to a maximum of 8 (10 with a heavenly upgrade), but are now back to 10 (12 with the upgrade)
' + - /*'-all animations are now handled by requestAnimationFrame(), which should hopefully help make the game less resource-intensive
'+*/ - '-an ascension now only counts for achievement purposes if you earned at least 1 prestige level from it
' + - '-the emblematic Cookie Clicker font (Kavoon) was bugged in Firefox, and has been replaced with a new font (Merriweather)
' + - '-the mysterious wrinkly creature is now even rarer, but has a shadow achievement tied to it
' + - '
' + - '
' + - '
• Fixes' + - '
' + - '-prestige now grants +1% CpS per level as intended, instead of +100%
' + - '-heavenly chips should no longer add up like crazy when you ascend
' + - '-upgrades in the store should no longer randomly go unsorted
' + - '-window can be resized to any size again
' + - '-the "Stats" and "Options" buttons have been swapped again
' + - '-the golden cookie sound should be somewhat clearer
' + - '-the ascend screen should be less CPU-hungry
' + - '
' + - '
' + - - '
' + - '
20/12/2015 - legacy beta, part II
' + - '
• existing beta saves have been wiped due to format inconsistencies and just plain broken balance; you\'ll have to start over from scratch - which will allow you to fully experience the update and find all the awful little bugs that no doubt plague it
' + - '
• importing your save from the live version is also fine
' + - '
• we took so long to make this update, Cookie Clicker turned 2 years old in the meantime! Hurray!
' + - '
• heaps of new upgrades and achievements
' + - '
• fixed a whole bunch of bugs
' + - '
• did a lot of rebalancing
' + - '
• reworked heavenly chips and heavenly cookies (still experimenting, will probably rebalance things further)
' + - '
• you may now unlock a dragon friend
' + - '
• switches and season triggers now have their own store section
' + - '
• ctrl-s and ctrl-o now save the game and open the import menu, respectively
' + - '
• added some quick sounds, just as a test
' + - '
• a couple more options
' + - '
• even more miscellaneous changes and additions
' + - - '
' + - '
25/08/2014 - legacy beta, part I
' + - '
• 3 new buildings
' + - '
• price and CpS curves revamped
' + - '
• CpS calculations revamped; cookie upgrades now stack multiplicatively
' + - '
• prestige system redone from scratch, with a whole new upgrade tree
' + - '
• added some general polish
' + - '
• tons of other miscellaneous fixes and additions
' + - '
• Cookie Clicker is now 1 year old! (Thank you guys for all the support!)
' + - '
• Note : this is a beta; you are likely to encounter bugs and oversights. Feel free to send me feedback if you find something fishy!
' + - - '
' + - '
18/05/2014 - better late than easter
' + - '
• bunnies and eggs, somehow
' + - '
• prompts now have keyboard shortcuts like system prompts would
' + - '
• naming your bakery? you betcha
' + - '
• "Fast notes" option to make all notifications close faster; new button to close all notifications
' + - '
• the dungeons beta is now available on /betadungeons
' + - - '
' + - '
09/04/2014 - nightmare in heaven
' + - '
• broke a thing; heavenly chips were corrupted for some people
' + - '
• will probably update to /beta first in the future
' + - '
• sorry again
' + - - '
' + - '
09/04/2014 - quality of life
' + - '
• new upgrade and achievement tier
' + - '
• popups and prompts are much nicer
' + - '
• tooltips on buildings are more informative
' + - '
• implemented a simplified version of the Frozen Cookies add-on\'s short number formatting
' + - '
• you can now buy 10 and sell all of a building at a time
' + - '
• tons of optimizations and subtler changes
' + - '' + - - '
' + - '
05/04/2014 - pity the fool
' + - '
• wrinklers should now be saved so you don\'t have to pop them every time you refresh the game
' + - '
• you now properly win 1 cookie upon reaching 10 billion cookies and making it on the local news
' + - '
• miscellaneous fixes and tiny additions
' + - '
• added a few very rudimentary mod hooks
' + - '
• the game should work again in Opera
' + - '
• don\'t forget to check out RandomGen, our all-purpose random generator maker!
' + - - '
' + - '
01/04/2014 - fooling around
' + - '
• it\'s about time : Cookie Clicker has turned into the much more realistic Cookie Baker
' + - '
• season triggers are cheaper and properly unlock again when they run out
' + - '
• buildings should properly unlock (reminder : building unlocking is completely cosmetic and does not change the gameplay)
' + - - '
' + - '
14/02/2014 - lovely rainbowcalypse
' + - '
• new building (it\'s been a while). More to come!
' + - '
• you can now trigger seasonal events to your heart\'s content (upgrade unlocks at 5000 heavenly chips)
' + - '
• new ultra-expensive batch of seasonal cookie upgrades you\'ll love to hate
' + - '
• new timer bars for golden cookie buffs
' + - '
• buildings are now hidden when you start out and appear as they become available
' + - '
• technical stuff : the game is now saved through localstorage instead of browser cookies, therefore ruining a perfectly good pun
' + - - '
' + - '
22/12/2013 - merry fixmas
' + - '
• some issues with the christmas upgrades have been fixed
' + - '
• reindeer cookie drops are now more common
' + - '
• reindeers are now reindeer
' + - - '
' + - '
20/12/2013 - Christmas is here
' + - '
• there is now a festive new evolving upgrade in store
' + - '
• reindeer are running amok (catch them if you can!)
' + - '
• added a new option to warn you when you close the window, so you don\'t lose your un-popped wrinklers
' + - '
• also added a separate option for displaying cursors
' + - '
• all the Halloween features are still there (and having the Spooky cookies achievements makes the Halloween cookies drop much more often)
' + - '
• oh yeah, we now have Cookie Clicker shirts, stickers and hoodies! (they\'re really rad)
' + - - '
' + - '
29/10/2013 - spooky update
' + - '
• the Grandmapocalypse now spawns wrinklers, hideous elderly creatures that damage your CpS when they reach your big cookie. Thankfully, you can click on them to make them explode (you\'ll even gain back the cookies they\'ve swallowed - with interest!).
' + - '
• wrath cookie now 27% spookier
' + - '
• some other stuff
' + - '
• you should totally go check out Candy Box 2, the sequel to the game that inspired Cookie Clicker
' + - - '
' + - '
15/10/2013 - it\'s a secret
' + - '
• added a new heavenly upgrade that gives you 5% of your heavenly chips power for 11 cookies (if you purchased the Heavenly key, you might need to buy it again, sorry)
' + - '
• golden cookie chains should now work properly
' + - - '
' + - '
15/10/2013 - player-friendly
' + - '
• heavenly upgrades are now way, way cheaper
' + - '
• tier 5 building upgrades are 5 times cheaper
' + - '
• cursors now just plain disappear with Fancy Graphics off, I might add a proper option to toggle only the cursors later
' + - '
• warning : the Cookie Monster add-on seems to be buggy with this update, you might want to wait until its programmer updates it
' + - - '
' + - '
15/10/2013 - a couple fixes
' + - '
• golden cookies should no longer spawn embarrassingly often
' + - '
• cursors now stop moving if Fancy Graphics is turned off
' + - - '
' + - '
14/10/2013 - going for the gold
' + - '
• golden cookie chains work a bit differently
' + - '
• golden cookie spawns are more random
' + - '
• CpS achievements are no longer affected by golden cookie frenzies
' + - '
• revised cookie-baking achievement requirements
' + - '
• heavenly chips now require upgrades to function at full capacity
' + - '
• added 4 more cookie upgrades, unlocked after reaching certain amounts of Heavenly Chips
' + - '
• speed baking achievements now require you to have no heavenly upgrades; as such, they have been reset for everyone (along with the Hardcore achievement) to better match their initially intended difficulty
' + - '
• made good progress on the mobile port
' + - - '
' + - '
01/10/2013 - smoothing it out
' + - '
• some visual effects have been completely rewritten and should now run more smoothly (and be less CPU-intensive)
' + - '
• new upgrade tier
' + - '
• new milk tier
' + - '
• cookie chains have different capping mechanics
' + - '
• antimatter condensers are back to their previous price
' + - '
• heavenly chips now give +2% CpS again (they will be extensively reworked in the future)
' + - '
• farms have been buffed a bit (to popular demand)
' + - '
• dungeons still need a bit more work and will be released soon - we want them to be just right! (you can test an unfinished version in the beta)
' + - - '
' + - '
28/09/2013 - dungeon beta
' + - '
• from now on, big updates will come through a beta stage first (you can try it here)
' + - '
• first dungeons! (you need 50 factories to unlock them!)
' + - '
• cookie chains can be longer
' + - '
• antimatter condensers are a bit more expensive
' + - '
• heavenly chips now only give +1% cps each (to account for all the cookies made from condensers)
' + - '
• added flavor text on all upgrades
' + - - '
' + - '
15/09/2013 - anticookies
' + - '
• ran out of regular matter to make your cookies? Try our new antimatter condensers!
' + - '
• renamed Hard-reset to "Wipe save" to avoid confusion
' + - '
• reset achievements are now regular achievements and require cookies baked all time, not cookies in bank
' + - '
• heavenly chips have been nerfed a bit (and are now awarded following a geometric progression : 1 trillion for the first, 2 for the second, etc); the prestige system will be extensively reworked in a future update (after dungeons)
' + - '
• golden cookie clicks are no longer reset by soft-resets
' + - '
• you can now see how long you\'ve been playing in the stats
' + - - '
' + - '
08/09/2013 - everlasting cookies
' + - '
• added a prestige system - resetting gives you permanent CpS boosts (the more cookies made before resetting, the bigger the boost!)
' + - '
• save format has been slightly modified to take less space
' + - '
• Leprechaun has been bumped to 777 golden cookies clicked and is now shadow; Fortune is the new 77 golden cookies achievement
' + - '
• clicking frenzy is now x777
' + - - '
' + - '
04/09/2013 - smarter cookie
' + - '
• golden cookies only have 20% chance of giving the same outcome twice in a row now
' + - '
• added a golden cookie upgrade
' + - '
• added an upgrade that makes pledges last twice as long (requires having pledged 10 times)
' + - '
• Quintillion fingers is now twice as efficient
' + - '
• Uncanny clicker was really too unpredictable; it is now a regular achievement and no longer requires a world record, just *pretty fast* clicking
' + - - '
' + - '
02/09/2013 - a better way out
' + - '
• Elder Covenant is even cheaper, and revoking it is cheaper still (also added a new achievement for getting it)
' + - '
• each grandma upgrade now requires 15 of the matching building
' + - '
• the dreaded bottom cursor has been fixed with a new cursor display style
' + - '
• added an option for faster, cheaper graphics
' + - '
• base64 encoding has been redone; this might make saving possible again on some older browsers
' + - '
• shadow achievements now have their own section
' + - '
• raspberry juice is now named raspberry milk, despite raspberry juice being delicious and going unquestionably well with cookies
' + - '
• HOTFIX : cursors now click; fancy graphics button renamed; cookies amount now more visible against cursors
' + - - '
' + - '
01/09/2013 - sorting things out
' + - '
• upgrades and achievements are properly sorted in the stats screen
' + - '
• made Elder Covenant much cheaper and less harmful
' + - '
• importing from the first version has been disabled, as promised
' + - '
• "One mind" now actually asks you to confirm the upgrade
' + - - '
' + - '
31/08/2013 - hotfixes
' + - '
• added a way to permanently stop the grandmapocalypse
' + - '
• Elder Pledge price is now capped
' + - '
• One Mind and other grandma research upgrades are now a little more powerful, if not 100% accurate
' + - '
• "golden" cookie now appears again during grandmapocalypse; Elder Pledge-related achievements are now unlockable
' + - - '
' + - '
31/08/2013 - too many grandmas
' + - '
• the grandmapocalypse is back, along with more grandma types
' + - '
• added some upgrades that boost your clicking power and make it scale with your cps
' + - '
• clicking achievements made harder; Neverclick is now a shadow achievement; Uncanny clicker should now truly be a world record
' + - - '
' + - '
28/08/2013 - over-achiever
' + - '
• added a few more achievements
' + - '
• reworked the "Bake X cookies" achievements so they take longer to achieve
' + - - '
' + - '
27/08/2013 - a bad idea
' + - '
• due to popular demand, retired 5 achievements (the "reset your game" and "cheat" ones); they can still be unlocked, but do not count toward your total anymore. Don\'t worry, there will be many more achievements soon!
' + - '
• made some achievements hidden for added mystery
' + - - '
' + - '
27/08/2013 - a sense of achievement
' + - '
• added achievements (and milk)
' + - '
(this is a big update, please don\'t get too mad if you lose some data!)
' + - - '
' + - '
26/08/2013 - new upgrade tier
' + - '
• added some more upgrades (including a couple golden cookie-related ones)
' + - '
• added clicking stats
' + - - '
' + - '
26/08/2013 - more tweaks
' + - '
• tweaked a couple cursor upgrades
' + - '
• made time machines less powerful
' + - '
• added offline mode option
' + - - '
' + - '
25/08/2013 - tweaks
' + - '
• rebalanced progression curve (mid- and end-game objects cost more and give more)
' + - '
• added some more cookie upgrades
' + - '
• added CpS for cursors
' + - '
• added sell button
' + - '
• made golden cookie more useful
' + - - '
' + - '
24/08/2013 - hotfixes
' + - '
• added import/export feature, which also allows you to retrieve a save game from the old version (will be disabled in a week to prevent too much cheating)
' + - '
• upgrade store now has unlimited slots (just hover over it), due to popular demand
' + - '
• added update log
' + - - '
' + - '
24/08/2013 - big update!
' + - '
• revamped the whole game (new graphics, new game mechanics)
' + - '
• added upgrades
' + - '
• much safer saving
' + - - '
' + - '
08/08/2013 - game launch
' + - '
• made the game in a couple hours, for laughs
' + - '
• kinda starting to regret it
' + - '
• ah well
' + - '
' + - '
' - ; - - Game.ready = 0; - - Game.Load = function (callback) { - //l('offGameMessage').innerHTML='
Loading...
'; - Game.Loader = new Loader(); - Game.Loader.domain = Game.resPath + 'img/'; - if (typeof PRELOAD !== 'undefined') Game.Loader.loaded = PRELOAD(Game.Init); - else Game.Loader.loaded = callback; - Game.Loader.Load(['filler.png']); - } - Game.ErrorFrame = function () { - l('offGameMessage').innerHTML = - '
Oops. Wrong address!
' + - '
It looks like you\'re accessing Cookie Clicker from another URL than the official one.
' + - 'You can play Cookie Clicker over here!
' + - '(If for any reason, you are unable to access the game on the official URL, we are currently working on a second domain.)
'; - } - Game.timedout = false; - Game.Timeout = function () { - Game.WriteSave(); - Game.killShimmers(); - l('offGameMessage').innerHTML = '
' + (Game.Has('Twin Gates of Transcendence') ? loc("Cookie Clicker is in sleep mode and generating offline cookies.") : loc("Cookie Clicker is in sleep mode.")) + '
' + loc("%1 to resume from your save file.", '' + loc("Click here") + '') + '
' + loc("(this happens when too many frames are skipped at once,
usually when the game has been running in the background for a while)
(you can turn this feature off in the settings menu)") + '
'; - l('offGameMessageWrap').style.display = 'table'; - Game.timedout = true; - console.log('[=== Game timed out and has been put in sleep mode. Data was saved. ===]'); - } - Game.Resume = function () { - l('offGameMessage').innerHTML = ''; - l('offGameMessageWrap').style.display = 'none'; - Game.timedout = false; - Game.time = Date.now(); - Game.accumulatedDelay = 0; - Game.delayTimeouts = 0; - Game.lastActivity = Date.now(); - Game.Loop(); - Game.LoadSave(); - console.log('[=== Game resumed! Data was loaded. ===]'); - } - - - Game.Init = function () { - Game.ready = 1; - - /*===================================================================================== - VARIABLES AND PRESETS - =======================================================================================*/ - Game.T = 0; - Game.drawT = 0; - Game.loopT = 0; - Game.fps = 30; - - Game.season = Game.baseSeason; - - Game.l = l('game'); - Game.wrapper = l('wrapper'); - Game.bounds = 0;//rectangle defining screen limits (right,left,bottom,top) updated every logic frame - - TopBarOffset = 32; - if (!App) Game.wrapper.classList.add('onWeb'); - else { Game.wrapper.classList.add('offWeb'); TopBarOffset = 0; } - - if (Game.mobile == 1) { - Game.wrapper.className = 'mobile'; - } - Game.clickStr = Game.touchEvents ? 'ontouchend' : 'onclick'; - - l('versionNumber').innerHTML = 'v. ' + Game.version + (!App ? ('
') : '') + (Game.beta ? ' beta' : ''); - - if (!App) { - if (Game.beta) { var me = l('linkVersionBeta'); me.parentNode.removeChild(me); } - else if (Game.version == 1.0466) { var me = l('linkVersionOld'); me.parentNode.removeChild(me); } - else { var me = l('linkVersionLive'); me.parentNode.removeChild(me); } - } - - Game.lastActivity = Date.now();//reset on mouse move, key press or click - - //latency compensator stuff - Game.time = Date.now(); - Game.accumulatedDelay = 0; - Game.delayTimeouts = 0;//how many times we've gone over the timeout delay - Game.catchupLogic = 0; - Game.fpsStartTime = 0; - Game.frameNumber = 0; - Game.currentFps = Game.fps; - Game.previousFps = Game.currentFps; - Game.getFps = function () { - Game.frameNumber++; - var currentTime = (Date.now() - Game.fpsStartTime) / 1000; - var result = Math.floor((Game.frameNumber / currentTime)); - if (currentTime > 1) { - Game.fpsStartTime = Date.now(); - Game.frameNumber = 0; - } - return result; - } - - Game.cookiesEarned = 0;//all cookies earned during gameplay - Game.cookies = 0;//cookies - Game.cookiesd = 0;//cookies display - Game.cookiesPs = 1;//cookies per second (to recalculate with every new purchase) - Game.cookiesPsRaw = 0;//raw cookies per second - Game.cookiesPsRawHighest = 0;//highest raw cookies per second this ascension - Game.cookiesReset = 0;//cookies lost to resetting (used to determine prestige and heavenly chips) - Game.cookieClicks = 0;//+1 for each click on the cookie - Game.goldenClicks = 0;//+1 for each golden cookie clicked (all time) - Game.goldenClicksLocal = 0;//+1 for each golden cookie clicked (this game only) - Game.missedGoldenClicks = 0;//+1 for each golden cookie missed - Game.handmadeCookies = 0;//all the cookies made from clicking the cookie - Game.milkProgress = 0;//you gain a little bit for each achievement. Each increment of 1 is a different milk displayed. - Game.milkH = Game.milkProgress / 2;//milk height, between 0 and 1 (although should never go above 0.5) - Game.milkHd = 0;//milk height display - Game.milkType = 0;//custom milk - Game.bgType = 0;//custom background - Game.chimeType = 0;//golden cookie chime - Game.prestige = 0;//prestige level (recalculated depending on Game.cookiesReset) - Game.heavenlyChips = 0;//heavenly chips the player currently has - Game.heavenlyChipsDisplayed = 0;//ticks up or down to match Game.heavenlyChips - Game.heavenlyChipsSpent = 0;//heavenly chips spent on cookies, upgrades and such - Game.heavenlyCookies = 0;//how many cookies have we baked from chips (unused) - Game.permanentUpgrades = [-1, -1, -1, -1, -1]; - Game.ascensionMode = 0;//type of challenge run if any - Game.resets = 0;//reset counter - Game.lumps = -1;//sugar lumps - Game.lumpsTotal = -1;//sugar lumps earned across all playthroughs (-1 means they haven't even started yet) - Game.lumpT = Date.now();//time when the current lump started forming - Game.lumpRefill = 0;//time left before a sugar lump can be used again (on minigame refills etc) in logic frames - - Game.makeSeed = function () { - var chars = 'abcdefghijklmnopqrstuvwxyz'.split(''); - var str = ''; - for (var i = 0; i < 5; i++) { str += choose(chars); } - return str; - } - Game.seed = Game.makeSeed();//each run has its own seed, used for deterministic random stuff - - Game.volume = 75;//sound volume - Game.volumeMusic = 50;//music volume - - Game.elderWrath = 0; - Game.elderWrathOld = 0; - Game.elderWrathD = 0; - Game.pledges = 0; - Game.pledgeT = 0; - Game.researchT = 0; - Game.nextResearch = 0; - Game.cookiesSucked = 0;//cookies sucked by wrinklers - Game.cpsSucked = 0;//percent of CpS being sucked by wrinklers - Game.wrinklersPopped = 0; - Game.santaLevel = 0; - Game.reindeerClicked = 0; - Game.seasonT = 0; - Game.seasonUses = 0; - Game.dragonLevel = 0; - Game.dragonAura = 0; - Game.dragonAura2 = 0; - - Game.fortuneGC = 0; - Game.fortuneCPS = 0; - - Game.blendModesOn = (document.createElement('detect').style.mixBlendMode === ''); - - Game.bg = '';//background (grandmas and such) - Game.bgFade = '';//fading to background - Game.bgR = 0;//ratio (0 - not faded, 1 - fully faded) - Game.bgRd = 0;//ratio displayed - - Game.windowW = window.innerWidth; - Game.windowH = window.innerHeight; - Game.scale = 1; - - window.addEventListener('resize', function (e) { - Game.resize(); - if (App && App.onResize) App.onResize(); - }); +Game.Launch=function() +{ + Game.mobile=0; + Game.touchEvents=0; + //if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) Game.mobile=1; + //if (Game.mobile) Game.touchEvents=1; + //if ('ontouchstart' in document.documentElement) Game.touchEvents=1; + + var css=document.createElement('style'); + css.type='text/css'; + css.innerHTML='body .icon,body .crate,body .usesIcon{background-image:url('+Game.resPath+'img/icons.png?v='+Game.version+');}'+ + '.product .icon,.product .icon.off,.tinyProductIcon{background-image:url('+Game.resPath+'img/buildings.png?v='+Game.version+');}'; + document.head.appendChild(css); + + //this is so shimmers can still appear even if you lose connection after the game is loaded + var preloadImages=['img/goldCookie.png','img/wrathCookie.png','img/spookyCookie.png','img/hearts.png','img/contract.png','img/wrathContract.png','img/bunnies.png','img/frostedReindeer.png']; + var preloadImagesL=l('preloadImages'); + for (var i=0;i=41 && day<=46) Game.baseSeason='valentines'; + else if (day+leap>=90 && day<=92+leap) Game.baseSeason='fools'; + else if (day>=304-7+leap && day<=304+leap) Game.baseSeason='halloween'; + else if (day>=349+leap && day<=365+leap) Game.baseSeason='christmas'; + else + { + //easter is a pain goddamn + var easterDay=function(Y){var C = Math.floor(Y/100);var N = Y - 19*Math.floor(Y/19);var K = Math.floor((C - 17)/25);var I = C - Math.floor(C/4) - Math.floor((C - K)/3) + 19*N + 15;I = I - 30*Math.floor((I/30));I = I - Math.floor(I/28)*(1 - Math.floor(I/28)*Math.floor(29/(I + 1))*Math.floor((21 - N)/11));var J = Y + Math.floor(Y/4) + I + 2 - C + Math.floor(C/4);J = J - 7*Math.floor(J/7);var L = I - J;var M = 3 + Math.floor((L + 40)/44);var D = L + 28 - 31*Math.floor(M/4);return new Date(Y,M-1,D);}(year); + easterDay=Math.floor((easterDay-new Date(easterDay.getFullYear(),0,0))/(1000*60*60*24)); + if (day>=easterDay-7 && day<=easterDay) Game.baseSeason='easter'; + } + + Game.updateLog= + '
'+ + '
'+loc("Info")+'
'+ + '
'+ + '
'+loc("About")+'
'+ + (App?'
'+loc("Note: links will open in your web browser.")+'
':'')+ + '
'+loc("Cookie Clicker is a javascript game by %1 and %2.",['Orteil','Opti'])+'
'+ + (App?'
'+loc("Music by %1.",'C418')+'
':'')+ + //'
We have an official Discord, as well as a forum; '+ + '
'+(EN? + 'We have an official Discord; if you\'re looking for help, you may also want to visit the subreddit or the wiki.
News and teasers are usually posted on Orteil\'s tumblr and twitter.' + : + loc("Useful links: %1, %2, %3, %4.",[ + 'Discord', + 'wiki', + 'tumblr', + 'twitter', + ])) + +'
'+ + (!App?'
'+loc( + "This version of Cookie Clicker is 100% free, forever. Want to support us so we can keep developing games? Here's some ways you can help:%1", + [(!App?'

• '+(EN?'get ':'')+'Cookie Clicker on Steam':'')+''+(EN?' (it\'s about 5 bucks)':'')+'

• '+(EN?'support us on ':'')+'Patreon'+(EN?' (there\'s perks!)':'')+'

• '+(EN?'check out our ':'')+'Shop'+(EN?' with rad cookie shirts, hoodies and stickers':'')+((!App && EN)?'

• disable your adblocker (if you want!)':'')] + )+ + '
':'')+ + '
'+loc("Note: if you find a new bug after an update and you're using a 3rd-party add-on, make sure it's not just your add-on causing it!")+'
'+ + (!App?('
'+loc("Warning: clearing your browser cache or cookies (what else?) will result in your save being wiped. Export your save and back it up first!")+'
'):'')+ + + '
'+ + '
'+loc("Version history")+'
'; + + for (var i=0;i
'+ + '
'+patch.title+'
'; + for (var ii=0;ii'; + } + Game.updateLog+=patchText; + } + + if (!EN) Game.updateLog+='
'+loc("Note: older update notes are in English.")+'
'; + + Game.updateLog+= + + '
'+ + '
07/05/2023 - often imitated, never duplicated
'+ + '
• added the final, 20th building
'+ + '
-currently, no more buildings are planned beyond this one; there are still many more updates to come, but future patches will focus on adding minigames to the existing buildings along with other features!
'+ + '
• added another tier of upgrades and achievements
'+ + '
• updated flavored milk icons
'+ + '
• added visual cue for shimmering veil
'+ + '
• touched up old Santa sprites
'+ + '
• new heavenly upgrade that lets you trade presents with other players
'+ + (App?'
• removed Discord rich presence support (plugin currently broken)
':'')+ + '
• Cookie Clicker turns 10 years old this year. Thank you for clicking cookies with us!
'+ + + '
'+ + '
31/05/2022 - a mind of its own
'+ + '
• added a new building
'+ + '
• added a new tier of upgrades and achievements
'+ + '
• multi-language support added to web version
'+ + '
• added a few new heavenly upgrades
'+ + '
• added the jukebox
'+ + '
• the 3 secret heavenly upgrades now rely on how many times the relevant digit is present in total, rather than at the end
'+ + '
• backgrounds overhauled; extra options for the background selector
'+ + '
• extra options for the golden cookie sound selector
'+ + '
• the bank minigame now tells you the value you previously bought a stock at
'+ + '
• the bank minigame flow is a little more exciting
'+ + (App?'
• new option to disable your game activity showing up in Discord
':'')+ + (App?'
• launch errors now provide the option to restart without mods
':'')+ + + (App?('
'+ + '
18/12/2021 - work it
'+ + '
• added Steam Workshop support (lets you install mods and upload your own)
'+ + '
• added Korean language support
'+ + '
• added back "short numbers" option for non-english languages (uses english terms for the time being)
'+ + '
• added tooltips on achievement notifications
'+ + '
• added Discord rich presence support
'):'')+ + + '
'+ + '
01/09/2021 - give me Steam
'+ + '
• Cookie Clicker has been released on Steam with music by C418!
'+ + '
• web version and Steam version will receive the same updates from now on
'+ + '
• you can now play in 13 different languages
'+ + '
• new option to disable scary stuff
'+ + '
• basic screen-reader support
'+ + '
• various other improvements
'+ + + '
'+ + '
01/11/2020 - alternate reality
'+ + '
• new building
'+ + '
• new upgrade tier
'+ + '
• new achievement tier
'+ + '
• new heavenly upgrades
'+ + '
• new modding API
'+ + '
• new rebalancing (ascension slot prices, finger upgrades...)
'+ + '
• new fixes (leap years, ghost swaps, carryover seeds...)
'+ + '
• new stuff
'+ + + '
'+ + '
23/08/2020 - money me, money now
'+ + '
• finalized stock market minigame beta and added it to live version
'+ + '
• dark mode added to stock market minigame
'+ + '
• can no longer select a milk before unlocking it; milk selector layout has been improved
'+ + '
• stock market goods have higher value caps and a larger spread; can also shift-click the hide buttons to hide/show all other stocks
'+ + + '
'+ + '
08/08/2020 - checking account (beta)
'+ + '
• stock market layout has been revised
'+ + '
• selling stocks no longer increases cookies baked all time
'+ + '
• stock prices are now defined by your highest raw CpS this ascension (which is now displayed in the stats screen)
'+ + '
• can no longer buy and sell a stock in the same tick
'+ + '
• warehouse space now gains +10 per associated building level (up from +5)
'+ + '
• bank level now improves average (and maximum) stock values
'+ + '
• later stocks are worth more
'+ + '
• Cookie Clicker turns 7!
'+ + + '
'+ + '
18/06/2020 - making bank (beta)
'+ + '
• added the stock market minigame, accessible with level 1 banks or above; buy low, sell high!
'+ + '
• (minigame subject to heavy rebalancing over the coming patches)
'+ + '
• added a couple heavenly upgrades, including one that lets you pet your dragon
'+ + '
• added a new tier of building upgrades and achievements
'+ + '
• reindeer clicks now properly count for shimmering veil
'+ + '
• numbers in scientific notation should display better with Short numbers off
'+ + '
• replaced ツ in the javascript console building display with more accurate ッ
'+ + + '
'+ + '
28/09/2019 - going off-script
'+ + '
• added a new building
'+ + '
• added fortune cookies (a new heavenly upgrade)
'+ + '
• more upgrades, achievements etc
'+ + '
• updated the Russian bread cookies icon to better reflect their cyrillic origins
'+ + '
stealth update : the sugar lump refill timeout (not sugar lump growth) now no longer ticks down while the game is closed (this fixes an exploit)
'+ + '
• also released the official Android version of Cookie Clicker, playable here (iOS version will come later)
'+ + + '
'+ + '
01/04/2019 - 2.019 (the "this year" update)
'+ + '
• game has been renamed to "Cookie Clicker" to avoid confusion
'+ + '
• can now click the big cookie to generate cookies for free
'+ + '
• removed fall damage
'+ + //'
• fixed various typos : player\'s name is now correctly spelled as "[bakeryName]"
'+ + '
• removed all references to computer-animated movie Hoodwinked! (2005)
'+ + '
• went back in time and invented cookies and computer mice, ensuring Cookie Clicker would one day come to exist
'+ + '
• game now fully compliant with Geneva Conventions
'+ + '
• dropped support for TI-84 version
'+ + '
• released a low-res retro version of the game, playable here : orteil.dashnet.org/experiments/cookie
'+ + '
• updated version number
'+ + + '
'+ + '
05/03/2019 - cookies for days
'+ + '
• added over 20 new cookies, all previously suggested by our supporters on Patreon
'+ + '
• added 2 heavenly upgrades
'+ + '
• the Golden goose egg now counts as a golden cookie upgrade for Residual luck purposes
'+ + '
• golden sugar lumps now either double your cookies, or give you 24 hours of your CpS, whichever is lowest (previously was doubling cookies with no cap)
'+ + '
• the amount of heralds is now saved with your game, and is used to compute offline CpS the next time the game is loaded; previously, on page load, the offline calculation assumed heralds to be 0
'+ + '
• added a system to counteract the game freezing up (and not baking cookies) after being inactive for a long while on slower computers; instead, this will now trigger sleep mode, during which you still produce cookies as if the game was closed; to enable this feature, use the "Sleep mode timeout" option in the settings
'+ + '
• vaulting upgrades is now done with shift-click, as ctrl-click was posing issues for Mac browsers
'+ + '
• made tooltips for building CpS boosts from synergies hopefully clearer
'+ + '
• fixed an exploit with gambler\'s fever dream working across exports and ascensions
'+ + '
• can now hide tooltips in the garden by keeping the shift key pressed to make it easier to see where you\'re planting
'+ + '
• fixed a bug with golden cookies/reindeer not disappearing properly in some circumstances
'+ + '
• the Dragon\'s Curve aura should now properly make sugar lumps twice as weird
'+ + '
• the ctrl key should less often register incorrectly as pressed
'+ + '
• added a new ad slot in the top-right, as while our playerbase is strong and supportive as ever, our ad revenue sometimes fluctuates badly; we may remove the ad again should our income stabilize
'+ + '
• made a few adjustments to make the game somewhat playable in mobile browsers; it\'s not perfect and can get buggy, but it\'s functional! (you may need to zoom out or scroll around to view the game properly)
'+ + '
• speaking of which, we also got some good progress on the mobile app version (built from scratch for mobile), so stay tuned!
'+ + + '
'+ + '
25/10/2018 - feedback loop
'+ + '
• added a new building
'+ + '
• launched our Patreon (the link is orange so you\'ll notice it!)
'+ + '
• added a bunch of new heavenly upgrades, one of which ties into our Patreon but benefits everyone (this is still experimental!)
'+ + '
• when hovering over grandmas, you can now see their names and ages
'+ + '
• "make X cookies just from Y" requirements are now higher
'+ + '
• tweaked the prices of some heavenly upgrades to better fit the current cookie economy (it turns out billions of heavenly chips is now very achievable)
'+ + '
• building tooltips now display what % of CpS they contribute through synergy upgrades
'+ + '
• queenbeets now give up to 4% of bank, down from 6%
'+ + '
• among other things, season switches now display how many seasonal upgrades you\'re missing, and permanent upgrade slots now display the name of the slotted upgrade
'+ + '
• season switches have reworked prices
'+ + '
• season switches can now be cancelled by clicking them again
'+ + '
• can no longer accidentally click wrinklers through other elements
'+ + '
• sugar frenzy now triples your CpS for an hour instead of doubling it
'+ + '
• this text is now selectable
'+ + '
• progress on dungeons minigame is still very much ongoing
'+ + + '
'+ + '
08/08/2018 - hey now
'+ + '
• Cookie Clicker somehow turns 5, going against doctors\' most optimistic estimates
'+ + '
• added a new tier of building achievements, all named after Smash Mouth\'s classic 1999 hit "All Star"
'+ + '
• added a new tier of building upgrades, all named after nothing in particular
'+ + '
to our players : thank you so much for sticking with us all those years and allowing us to keep making the dumbest game known to mankind
'+ + '
• resumed work on the dungeons minigame
'+ + + '
'+ + '
01/08/2018 - buy buy buy
'+ + '
• added a heavenly upgrade that lets you buy all your upgrades instantly
'+ + '
• added a heavenly upgrade that lets you see upgrade tiers (feature was previously removed due to being confusing)
'+ + '
• added a new wrinkler-related heavenly upgrade
'+ + '
• added a new upgrade tier
'+ + '
• added a couple new cookies and achievements
'+ + '
• new "extra buttons" setting; turning it on adds buttons that let you minimize buildings
'+ + '
• new "lump confirmation" setting; turning it on will show a confirmation prompt when you spend sugar lumps
'+ + '
• buildings now sell back for 25% of their current price (down from 50%); Earth Shatterer modified accordingly, now gives back 50% (down from 85%)
'+ + '
• farm soils now unlock correctly based on current amount of farms
'+ + '
• cheapcaps have a new exciting nerf
'+ + '
• wrinklegill spawns a bunch more
'+ + '
• can now ctrl-shift-click on "Harvest all" to only harvest mature, non-immortal plants
'+ + '
• added a new rare type of sugar lump
'+ + + '
'+ + '
20/04/2018 - weeding out some bugs
'+ + '
• golden clovers and wrinklegills should spawn a bit more often
'+ + '
• cronerice matures a lot sooner
'+ + '
• mature elderworts stay mature after reloading
'+ + '
• garden interface occupies space more intelligently
'+ + '
• seed price displays should be better behaved with short numbers disabled
'+ + '
• minigame animations are now turned off if using the "Fancy graphics" option is disabled
'+ + '
• CpS achievement requirements were dialed down a wee tad
'+ + + '
'+ + '
19/04/2018 - garden patch
'+ + '
• upgrades dropped by garden plants now stay unlocked forever (but drop much more rarely)
'+ + '
• garden sugar lump refill now also makes plants spread and mutate 3 times more during the bonus tick
'+ + '
• a few new upgrades
'+ + '
• a couple bug fixes and rephrasings
'+ + + '
'+ + '
18/04/2018 - your garden-variety update
'+ + '
• added the garden, a minigame unlocked by having at least level 1 farms
'+ + '
• added a little arrow and a blinky label to signal the game has updated since you last played it (hi!)
'+ + '
• new cookies, milk flavors and achievements
'+ + '
• sugar lumps are now unlocked whenever you\'ve baked at least a billion cookies, instead of on your first ascension
'+ + '
• sugar lump type now saves correctly
'+ + '
• minigame sugar lump refills can now only be done every 15 minutes (timer shared across all minigames)
'+ + '
• CpS achievements now have steeper requirements
'+ + '
• golden cookies now last 5% shorter for every other golden cookie on the screen
'+ + '
• the game now remembers which minigames are closed or open
'+ + '
• added a popup that shows when a season starts (so people won\'t be so confused about "the game looking weird today")
'+ + '
• permanent upgrade slots now show a tooltip for the selected upgrade
'+ + '
• finally fixed the save corruption bug, hopefully
'+ + + '
'+ + '
24/02/2018 - sugar coating
'+ + '
• added link to official Discord server
'+ + '
• felt weird about pushing an update without content so :
'+ + '
• added a handful of new cookies
'+ + '
• added 3 new heavenly upgrades
'+ + '
• short numbers should now be displayed up to novemnonagintillions
'+ + '
• cookie chains no longer spawn from the Force the Hand of Fate spell
'+ + '
• bigger, better Cookie Clicker content coming later this year
'+ + + '
'+ + '
08/08/2017 - 4 more years
'+ + '
• new building : Chancemakers
'+ + '
• new milk, new kittens, new dragon aura, new cookie, new upgrade tier
'+ + '
• buffs no longer affect offline CpS
'+ + '
• Godzamok\'s hunger was made less potent (this is a nerf, very sorry)
'+ + '
• grimoire spell costs and maximum magic work differently
'+ + '
• Spontaneous Edifice has been reworked
'+ + '
• changed unlock levels and prices for some cursor upgrades
'+ + '
• fixed buggy pantheon slots, hopefully
'+ + '
• fixed "Legacy started a long while ago" showing as "a few seconds ago"
'+ + '
• Cookie Clicker just turned 4. Thank you for sticking with us this long!
'+ + + '
'+ + '
15/07/2017 - the spiritual update
'+ + '
• implemented sugar lumps, which start coalescing if you\'ve ascended at least once and can be used as currency for special things
'+ + '
• buildings can now level up by using sugar lumps in the main buildings display, permanently boosting their CpS
'+ + '
• added two new features unlocked by levelling up their associated buildings, Temples and Wizard towers; more building-related minigames will be implemented in the future
'+ + '
• active buffs are now saved
'+ + '
• the background selector upgrade is now functional
'+ + '
• the top menu no longer scrolls with the rest
'+ + '
• timespans are written nicer
'+ + '
• Dragonflights now tend to supercede Click frenzies, you will rarely have both at the same time
'+ + '
• some old bugs were phased out and replaced by new ones
'+ + + '
'+ + '
24/07/2016 - golden cookies overhaul
'+ + '
• golden cookies and reindeer now follow a new system involving explicitly defined buffs
'+ + '
• a bunch of new golden cookie effects have been added
'+ + '
• CpS gains from eggs are now multiplicative
'+ + '
• shiny wrinklers are now saved
'+ + '
• reindeer have been rebalanced ever so slightly
'+ + '
• added a new cookie upgrade near the root of the heavenly upgrade tree; this is intended to boost early ascensions and speed up the game as a whole
'+ + '
• due to EU legislation, implemented a warning message regarding browser cookies; do understand that the irony is not lost on us
'+ + + '
'+ + '
08/02/2016 - legacy
'+ + '
Everything that was implemented during the almost 2-year-long beta has been added to the live game. To recap :
'+ + '
• 3 new buildings : banks, temples, and wizard towers; these have been added in-between existing buildings and as such, may disrupt some building-related achievements
'+ + '
• the ascension system has been redone from scratch, with a new heavenly upgrade tree
'+ + '
• mysterious new features such as angel-powered offline progression, challenge runs, and a cookie dragon
'+ + '
• sounds have been added (can be disabled in the options)
'+ + '
• heaps of rebalancing and bug fixes
'+ + '
• a couple more upgrades and achievements, probably
'+ + '
• fresh new options to further customize your cookie-clicking experience
'+ + '
• quality-of-life improvements : better bulk-buy, better switches etc
'+ + '
• added some general polish
'+/* i liked this dumb pun too much to let it go unnoticed */ + '
• tons of other little things we can\'t even remember right now
'+ + '
Miss the old version? Your old save was automatically exported here!
'+ + + '
'+ + '
05/02/2016 - legacy beta, more fixes
'+ + '
• added challenge modes, which can be selected when ascending (only 1 for now : "Born again")
'+ + '
• changed the way bulk-buying and bulk-selling works
'+ + '
• more bugs ironed out
'+ + + '
'+ + '
03/02/2016 - legacy beta, part III
'+ + '
• Not all bugs have been fixed, but everything should be much less broken.
'+ + '
• Additions'+ + '
'+ + '-a few more achievements
'+ + '-new option for neat, but slow CSS effects (disabled by default)
'+ + '-new option for a less grating cookie sound (enabled by default)
'+ + '-new option to bring back the boxes around icons in the stats screen
'+ + '-new buttons for saving and loading your game to a text file
'+ + '
'+ + '
'+ + '
• Changes'+ + '
'+ + '-early game should be a bit faster and very late game was kindly asked to tone it down a tad
'+ + '-dragonflight should be somewhat less ridiculously overpowered
'+ + '-please let me know if the rebalancing was too heavy or not heavy enough
'+ + '-santa and easter upgrades now depend on Santa level and amount of eggs owned, respectively, instead of costing several minutes worth of CpS
'+ + '-cookie upgrades now stack multiplicatively rather than additively
'+ + '-golden switch now gives +50% CpS, and residual luck is +10% CpS per golden cookie upgrade (up from +25% and +1%, respectively)
'+ + '-lucky cookies and cookie chain payouts have been modified a bit, possibly for the better, who knows!
'+ + '-wrinklers had previously been reduced to a maximum of 8 (10 with a heavenly upgrade), but are now back to 10 (12 with the upgrade)
'+ + /*'-all animations are now handled by requestAnimationFrame(), which should hopefully help make the game less resource-intensive
'+*/ + '-an ascension now only counts for achievement purposes if you earned at least 1 prestige level from it
'+ + '-the emblematic Cookie Clicker font (Kavoon) was bugged in Firefox, and has been replaced with a new font (Merriweather)
'+ + '-the mysterious wrinkly creature is now even rarer, but has a shadow achievement tied to it
'+ + '
'+ + '
'+ + '
• Fixes'+ + '
'+ + '-prestige now grants +1% CpS per level as intended, instead of +100%
'+ + '-heavenly chips should no longer add up like crazy when you ascend
'+ + '-upgrades in the store should no longer randomly go unsorted
'+ + '-window can be resized to any size again
'+ + '-the "Stats" and "Options" buttons have been swapped again
'+ + '-the golden cookie sound should be somewhat clearer
'+ + '-the ascend screen should be less CPU-hungry
'+ + '
'+ + '
'+ + + '
'+ + '
20/12/2015 - legacy beta, part II
'+ + '
• existing beta saves have been wiped due to format inconsistencies and just plain broken balance; you\'ll have to start over from scratch - which will allow you to fully experience the update and find all the awful little bugs that no doubt plague it
'+ + '
• importing your save from the live version is also fine
'+ + '
• we took so long to make this update, Cookie Clicker turned 2 years old in the meantime! Hurray!
'+ + '
• heaps of new upgrades and achievements
'+ + '
• fixed a whole bunch of bugs
'+ + '
• did a lot of rebalancing
'+ + '
• reworked heavenly chips and heavenly cookies (still experimenting, will probably rebalance things further)
'+ + '
• you may now unlock a dragon friend
'+ + '
• switches and season triggers now have their own store section
'+ + '
• ctrl-s and ctrl-o now save the game and open the import menu, respectively
'+ + '
• added some quick sounds, just as a test
'+ + '
• a couple more options
'+ + '
• even more miscellaneous changes and additions
'+ + + '
'+ + '
25/08/2014 - legacy beta, part I
'+ + '
• 3 new buildings
'+ + '
• price and CpS curves revamped
'+ + '
• CpS calculations revamped; cookie upgrades now stack multiplicatively
'+ + '
• prestige system redone from scratch, with a whole new upgrade tree
'+ + '
• added some general polish
'+ + '
• tons of other miscellaneous fixes and additions
'+ + '
• Cookie Clicker is now 1 year old! (Thank you guys for all the support!)
'+ + '
• Note : this is a beta; you are likely to encounter bugs and oversights. Feel free to send me feedback if you find something fishy!
'+ + + '
'+ + '
18/05/2014 - better late than easter
'+ + '
• bunnies and eggs, somehow
'+ + '
• prompts now have keyboard shortcuts like system prompts would
'+ + '
• naming your bakery? you betcha
'+ + '
• "Fast notes" option to make all notifications close faster; new button to close all notifications
'+ + '
• the dungeons beta is now available on /betadungeons
'+ + + '
'+ + '
09/04/2014 - nightmare in heaven
'+ + '
• broke a thing; heavenly chips were corrupted for some people
'+ + '
• will probably update to /beta first in the future
'+ + '
• sorry again
'+ + + '
'+ + '
09/04/2014 - quality of life
'+ + '
• new upgrade and achievement tier
'+ + '
• popups and prompts are much nicer
'+ + '
• tooltips on buildings are more informative
'+ + '
• implemented a simplified version of the Frozen Cookies add-on\'s short number formatting
'+ + '
• you can now buy 10 and sell all of a building at a time
'+ + '
• tons of optimizations and subtler changes
'+ + ''+ + + '
'+ + '
05/04/2014 - pity the fool
'+ + '
• wrinklers should now be saved so you don\'t have to pop them every time you refresh the game
'+ + '
• you now properly win 1 cookie upon reaching 10 billion cookies and making it on the local news
'+ + '
• miscellaneous fixes and tiny additions
'+ + '
• added a few very rudimentary mod hooks
'+ + '
• the game should work again in Opera
'+ + '
• don\'t forget to check out RandomGen, our all-purpose random generator maker!
'+ + + '
'+ + '
01/04/2014 - fooling around
'+ + '
• it\'s about time : Cookie Clicker has turned into the much more realistic Cookie Baker
'+ + '
• season triggers are cheaper and properly unlock again when they run out
'+ + '
• buildings should properly unlock (reminder : building unlocking is completely cosmetic and does not change the gameplay)
'+ + + '
'+ + '
14/02/2014 - lovely rainbowcalypse
'+ + '
• new building (it\'s been a while). More to come!
'+ + '
• you can now trigger seasonal events to your heart\'s content (upgrade unlocks at 5000 heavenly chips)
'+ + '
• new ultra-expensive batch of seasonal cookie upgrades you\'ll love to hate
'+ + '
• new timer bars for golden cookie buffs
'+ + '
• buildings are now hidden when you start out and appear as they become available
'+ + '
• technical stuff : the game is now saved through localstorage instead of browser cookies, therefore ruining a perfectly good pun
'+ + + '
'+ + '
22/12/2013 - merry fixmas
'+ + '
• some issues with the christmas upgrades have been fixed
'+ + '
• reindeer cookie drops are now more common
'+ + '
• reindeers are now reindeer
'+ + + '
'+ + '
20/12/2013 - Christmas is here
'+ + '
• there is now a festive new evolving upgrade in store
'+ + '
• reindeer are running amok (catch them if you can!)
'+ + '
• added a new option to warn you when you close the window, so you don\'t lose your un-popped wrinklers
'+ + '
• also added a separate option for displaying cursors
'+ + '
• all the Halloween features are still there (and having the Spooky cookies achievements makes the Halloween cookies drop much more often)
'+ + '
• oh yeah, we now have Cookie Clicker shirts, stickers and hoodies! (they\'re really rad)
'+ + + '
'+ + '
29/10/2013 - spooky update
'+ + '
• the Grandmapocalypse now spawns wrinklers, hideous elderly creatures that damage your CpS when they reach your big cookie. Thankfully, you can click on them to make them explode (you\'ll even gain back the cookies they\'ve swallowed - with interest!).
'+ + '
• wrath cookie now 27% spookier
'+ + '
• some other stuff
'+ + '
• you should totally go check out Candy Box 2, the sequel to the game that inspired Cookie Clicker
'+ + + '
'+ + '
15/10/2013 - it\'s a secret
'+ + '
• added a new heavenly upgrade that gives you 5% of your heavenly chips power for 11 cookies (if you purchased the Heavenly key, you might need to buy it again, sorry)
'+ + '
• golden cookie chains should now work properly
'+ + + '
'+ + '
15/10/2013 - player-friendly
'+ + '
• heavenly upgrades are now way, way cheaper
'+ + '
• tier 5 building upgrades are 5 times cheaper
'+ + '
• cursors now just plain disappear with Fancy Graphics off, I might add a proper option to toggle only the cursors later
'+ + '
• warning : the Cookie Monster add-on seems to be buggy with this update, you might want to wait until its programmer updates it
'+ + + '
'+ + '
15/10/2013 - a couple fixes
'+ + '
• golden cookies should no longer spawn embarrassingly often
'+ + '
• cursors now stop moving if Fancy Graphics is turned off
'+ + + '
'+ + '
14/10/2013 - going for the gold
'+ + '
• golden cookie chains work a bit differently
'+ + '
• golden cookie spawns are more random
'+ + '
• CpS achievements are no longer affected by golden cookie frenzies
'+ + '
• revised cookie-baking achievement requirements
'+ + '
• heavenly chips now require upgrades to function at full capacity
'+ + '
• added 4 more cookie upgrades, unlocked after reaching certain amounts of Heavenly Chips
'+ + '
• speed baking achievements now require you to have no heavenly upgrades; as such, they have been reset for everyone (along with the Hardcore achievement) to better match their initially intended difficulty
'+ + '
• made good progress on the mobile port
'+ + + '
'+ + '
01/10/2013 - smoothing it out
'+ + '
• some visual effects have been completely rewritten and should now run more smoothly (and be less CPU-intensive)
'+ + '
• new upgrade tier
'+ + '
• new milk tier
'+ + '
• cookie chains have different capping mechanics
'+ + '
• antimatter condensers are back to their previous price
'+ + '
• heavenly chips now give +2% CpS again (they will be extensively reworked in the future)
'+ + '
• farms have been buffed a bit (to popular demand)
'+ + '
• dungeons still need a bit more work and will be released soon - we want them to be just right! (you can test an unfinished version in the beta)
'+ + + '
'+ + '
28/09/2013 - dungeon beta
'+ + '
• from now on, big updates will come through a beta stage first (you can try it here)
'+ + '
• first dungeons! (you need 50 factories to unlock them!)
'+ + '
• cookie chains can be longer
'+ + '
• antimatter condensers are a bit more expensive
'+ + '
• heavenly chips now only give +1% cps each (to account for all the cookies made from condensers)
'+ + '
• added flavor text on all upgrades
'+ + + '
'+ + '
15/09/2013 - anticookies
'+ + '
• ran out of regular matter to make your cookies? Try our new antimatter condensers!
'+ + '
• renamed Hard-reset to "Wipe save" to avoid confusion
'+ + '
• reset achievements are now regular achievements and require cookies baked all time, not cookies in bank
'+ + '
• heavenly chips have been nerfed a bit (and are now awarded following a geometric progression : 1 trillion for the first, 2 for the second, etc); the prestige system will be extensively reworked in a future update (after dungeons)
'+ + '
• golden cookie clicks are no longer reset by soft-resets
'+ + '
• you can now see how long you\'ve been playing in the stats
'+ + + '
'+ + '
08/09/2013 - everlasting cookies
'+ + '
• added a prestige system - resetting gives you permanent CpS boosts (the more cookies made before resetting, the bigger the boost!)
'+ + '
• save format has been slightly modified to take less space
'+ + '
• Leprechaun has been bumped to 777 golden cookies clicked and is now shadow; Fortune is the new 77 golden cookies achievement
'+ + '
• clicking frenzy is now x777
'+ + + '
'+ + '
04/09/2013 - smarter cookie
'+ + '
• golden cookies only have 20% chance of giving the same outcome twice in a row now
'+ + '
• added a golden cookie upgrade
'+ + '
• added an upgrade that makes pledges last twice as long (requires having pledged 10 times)
'+ + '
• Quintillion fingers is now twice as efficient
'+ + '
• Uncanny clicker was really too unpredictable; it is now a regular achievement and no longer requires a world record, just *pretty fast* clicking
'+ + + '
'+ + '
02/09/2013 - a better way out
'+ + '
• Elder Covenant is even cheaper, and revoking it is cheaper still (also added a new achievement for getting it)
'+ + '
• each grandma upgrade now requires 15 of the matching building
'+ + '
• the dreaded bottom cursor has been fixed with a new cursor display style
'+ + '
• added an option for faster, cheaper graphics
'+ + '
• base64 encoding has been redone; this might make saving possible again on some older browsers
'+ + '
• shadow achievements now have their own section
'+ + '
• raspberry juice is now named raspberry milk, despite raspberry juice being delicious and going unquestionably well with cookies
'+ + '
• HOTFIX : cursors now click; fancy graphics button renamed; cookies amount now more visible against cursors
'+ + + '
'+ + '
01/09/2013 - sorting things out
'+ + '
• upgrades and achievements are properly sorted in the stats screen
'+ + '
• made Elder Covenant much cheaper and less harmful
'+ + '
• importing from the first version has been disabled, as promised
'+ + '
• "One mind" now actually asks you to confirm the upgrade
'+ + + '
'+ + '
31/08/2013 - hotfixes
'+ + '
• added a way to permanently stop the grandmapocalypse
'+ + '
• Elder Pledge price is now capped
'+ + '
• One Mind and other grandma research upgrades are now a little more powerful, if not 100% accurate
'+ + '
• "golden" cookie now appears again during grandmapocalypse; Elder Pledge-related achievements are now unlockable
'+ + + '
'+ + '
31/08/2013 - too many grandmas
'+ + '
• the grandmapocalypse is back, along with more grandma types
'+ + '
• added some upgrades that boost your clicking power and make it scale with your cps
'+ + '
• clicking achievements made harder; Neverclick is now a shadow achievement; Uncanny clicker should now truly be a world record
'+ + + '
'+ + '
28/08/2013 - over-achiever
'+ + '
• added a few more achievements
'+ + '
• reworked the "Bake X cookies" achievements so they take longer to achieve
'+ + + '
'+ + '
27/08/2013 - a bad idea
'+ + '
• due to popular demand, retired 5 achievements (the "reset your game" and "cheat" ones); they can still be unlocked, but do not count toward your total anymore. Don\'t worry, there will be many more achievements soon!
'+ + '
• made some achievements hidden for added mystery
'+ + + '
'+ + '
27/08/2013 - a sense of achievement
'+ + '
• added achievements (and milk)
'+ + '
(this is a big update, please don\'t get too mad if you lose some data!)
'+ + + '
'+ + '
26/08/2013 - new upgrade tier
'+ + '
• added some more upgrades (including a couple golden cookie-related ones)
'+ + '
• added clicking stats
'+ + + '
'+ + '
26/08/2013 - more tweaks
'+ + '
• tweaked a couple cursor upgrades
'+ + '
• made time machines less powerful
'+ + '
• added offline mode option
'+ + + '
'+ + '
25/08/2013 - tweaks
'+ + '
• rebalanced progression curve (mid- and end-game objects cost more and give more)
'+ + '
• added some more cookie upgrades
'+ + '
• added CpS for cursors
'+ + '
• added sell button
'+ + '
• made golden cookie more useful
'+ + + '
'+ + '
24/08/2013 - hotfixes
'+ + '
• added import/export feature, which also allows you to retrieve a save game from the old version (will be disabled in a week to prevent too much cheating)
'+ + '
• upgrade store now has unlimited slots (just hover over it), due to popular demand
'+ + '
• added update log
'+ + + '
'+ + '
24/08/2013 - big update!
'+ + '
• revamped the whole game (new graphics, new game mechanics)
'+ + '
• added upgrades
'+ + '
• much safer saving
'+ + + '
'+ + '
08/08/2013 - game launch
'+ + '
• made the game in a couple hours, for laughs
'+ + '
• kinda starting to regret it
'+ + '
• ah well
'+ + '
'+ + '
' + ; + + Game.ready=0; + + Game.Load=function(callback) + { + //l('offGameMessage').innerHTML='
Loading...
'; + Game.Loader=new Loader(); + Game.Loader.domain=Game.resPath+'img/'; + if (typeof PRELOAD!=='undefined') Game.Loader.loaded=PRELOAD(Game.Init); + else Game.Loader.loaded=callback; + Game.Loader.Load(['filler.png']); + } + Game.ErrorFrame=function() + { + l('offGameMessage').innerHTML= + '
Oops. Wrong address!
'+ + '
It looks like you\'re accessing Cookie Clicker from another URL than the official one.
'+ + 'You can play Cookie Clicker over here!
'+ + '(If for any reason, you are unable to access the game on the official URL, we are currently working on a second domain.)
'; + } + Game.timedout=false; + Game.Timeout=function() + { + Game.WriteSave(); + Game.killShimmers(); + l('offGameMessage').innerHTML='
'+(Game.Has('Twin Gates of Transcendence')?loc("Cookie Clicker is in sleep mode and generating offline cookies."):loc("Cookie Clicker is in sleep mode."))+'
'+loc("%1 to resume from your save file.",''+loc("Click here")+'')+'
'+loc("(this happens when too many frames are skipped at once,
usually when the game has been running in the background for a while)
(you can turn this feature off in the settings menu)")+'
'; + l('offGameMessageWrap').style.display='table'; + Game.timedout=true; + console.log('[=== Game timed out and has been put in sleep mode. Data was saved. ===]'); + } + Game.Resume=function() + { + l('offGameMessage').innerHTML=''; + l('offGameMessageWrap').style.display='none'; + Game.timedout=false; + Game.time=Date.now(); + Game.accumulatedDelay=0; + Game.delayTimeouts=0; + Game.lastActivity=Date.now(); + Game.Loop(); + Game.LoadSave(); + console.log('[=== Game resumed! Data was loaded. ===]'); + } + + + Game.Init=function() + { + Game.ready=1; + + /*===================================================================================== + VARIABLES AND PRESETS + =======================================================================================*/ + Game.T=0; + Game.drawT=0; + Game.loopT=0; + Game.fps=30; + + Game.season=Game.baseSeason; + + Game.l=l('game'); + Game.wrapper=l('wrapper'); + Game.bounds=0;//rectangle defining screen limits (right,left,bottom,top) updated every logic frame + + TopBarOffset=32; + if (!App) Game.wrapper.classList.add('onWeb'); + else {Game.wrapper.classList.add('offWeb');TopBarOffset=0;} + + if (Game.mobile==1) + { + Game.wrapper.className='mobile'; + } + Game.clickStr=Game.touchEvents?'ontouchend':'onclick'; + + l('versionNumber').innerHTML='v. '+Game.version+(!App?('
'):'')+(Game.beta?' beta':''); + + if (!App) + { + if (Game.beta) {var me=l('linkVersionBeta');me.parentNode.removeChild(me);} + else if (Game.version==1.0466) {var me=l('linkVersionOld');me.parentNode.removeChild(me);} + else {var me=l('linkVersionLive');me.parentNode.removeChild(me);} + } + + Game.lastActivity=Date.now();//reset on mouse move, key press or click + + //latency compensator stuff + Game.time=Date.now(); + Game.accumulatedDelay=0; + Game.delayTimeouts=0;//how many times we've gone over the timeout delay + Game.catchupLogic=0; + Game.fpsStartTime=0; + Game.frameNumber=0; + Game.currentFps=Game.fps; + Game.previousFps=Game.currentFps; + Game.getFps=function() + { + Game.frameNumber++; + var currentTime=(Date.now()-Game.fpsStartTime )/1000; + var result=Math.floor((Game.frameNumber/currentTime)); + if (currentTime>1) + { + Game.fpsStartTime=Date.now(); + Game.frameNumber=0; + } + return result; + } + + Game.cookiesEarned=0;//all cookies earned during gameplay + Game.cookies=0;//cookies + Game.cookiesd=0;//cookies display + Game.cookiesPs=1;//cookies per second (to recalculate with every new purchase) + Game.cookiesPsRaw=0;//raw cookies per second + Game.cookiesPsRawHighest=0;//highest raw cookies per second this ascension + Game.cookiesReset=0;//cookies lost to resetting (used to determine prestige and heavenly chips) + Game.cookieClicks=0;//+1 for each click on the cookie + Game.goldenClicks=0;//+1 for each golden cookie clicked (all time) + Game.goldenClicksLocal=0;//+1 for each golden cookie clicked (this game only) + Game.missedGoldenClicks=0;//+1 for each golden cookie missed + Game.handmadeCookies=0;//all the cookies made from clicking the cookie + Game.milkProgress=0;//you gain a little bit for each achievement. Each increment of 1 is a different milk displayed. + Game.milkH=Game.milkProgress/2;//milk height, between 0 and 1 (although should never go above 0.5) + Game.milkHd=0;//milk height display + Game.milkType=0;//custom milk + Game.bgType=0;//custom background + Game.chimeType=0;//golden cookie chime + Game.prestige=0;//prestige level (recalculated depending on Game.cookiesReset) + Game.heavenlyChips=0;//heavenly chips the player currently has + Game.heavenlyChipsDisplayed=0;//ticks up or down to match Game.heavenlyChips + Game.heavenlyChipsSpent=0;//heavenly chips spent on cookies, upgrades and such + Game.heavenlyCookies=0;//how many cookies have we baked from chips (unused) + Game.permanentUpgrades=[-1,-1,-1,-1,-1]; + Game.ascensionMode=0;//type of challenge run if any + Game.resets=0;//reset counter + Game.lumps=-1;//sugar lumps + Game.lumpsTotal=-1;//sugar lumps earned across all playthroughs (-1 means they haven't even started yet) + Game.lumpT=Date.now();//time when the current lump started forming + Game.lumpRefill=0;//time left before a sugar lump can be used again (on minigame refills etc) in logic frames + + Game.makeSeed=function() + { + var chars='abcdefghijklmnopqrstuvwxyz'.split(''); + var str=''; + for (var i=0;i<5;i++){str+=choose(chars);} + return str; + } + Game.seed=Game.makeSeed();//each run has its own seed, used for deterministic random stuff + + Game.volume=75;//sound volume + Game.volumeMusic=50;//music volume + + Game.elderWrath=0; + Game.elderWrathOld=0; + Game.elderWrathD=0; + Game.pledges=0; + Game.pledgeT=0; + Game.researchT=0; + Game.nextResearch=0; + Game.cookiesSucked=0;//cookies sucked by wrinklers + Game.cpsSucked=0;//percent of CpS being sucked by wrinklers + Game.wrinklersPopped=0; + Game.santaLevel=0; + Game.reindeerClicked=0; + Game.seasonT=0; + Game.seasonUses=0; + Game.dragonLevel=0; + Game.dragonAura=0; + Game.dragonAura2=0; + + Game.fortuneGC=0; + Game.fortuneCPS=0; + + Game.blendModesOn=(document.createElement('detect').style.mixBlendMode===''); + + Game.bg='';//background (grandmas and such) + Game.bgFade='';//fading to background + Game.bgR=0;//ratio (0 - not faded, 1 - fully faded) + Game.bgRd=0;//ratio displayed + + Game.windowW=window.innerWidth; + Game.windowH=window.innerHeight; + Game.scale=1; + + window.addEventListener('resize',function(e) + { + Game.resize(); + if (App && App.onResize) App.onResize(); + }); + + Game.resize=function() + { + var w=window.innerWidth; + var h=window.innerHeight; + + var prevW=Game.windowW; + var prevH=Game.windowH; + + var scale=Math.min( + w/Math.max(800,w), + h/Math.max(200,h) + ); + Game.windowW=Math.floor(w/scale); + Game.windowH=Math.floor(h/scale); + if (scale!=1) + { + Game.wrapper.style.transform='scale('+(scale)+')'; + Game.wrapper.style.width=Game.windowW+'px'; + Game.wrapper.style.height=Game.windowH+'px'; + } + else + { + Game.wrapper.style.removeProperty('transform'); + Game.wrapper.style.width='100%'; + Game.wrapper.style.height='100%'; + } + Game.scale=scale; + + for (var i in Game.Objects) + { + var me=Game.Objects[i]; + me.toResize=true; + if (me.minigame && me.minigame.onResize) me.minigame.onResize(); + } + + if (Game.getNewTicker) + { + if (prevW>=Game.tickerTooNarrow && Game.windowW=Game.tickerTooNarrow) Game.getNewTicker(true); + } + } + Game.resize(); + + Game.startDate=parseInt(Date.now());//when we started playing + Game.fullDate=parseInt(Date.now());//when we started playing (carries over with resets) + Game.lastDate=parseInt(Date.now());//when we last saved the game (used to compute "cookies made since we closed the game" etc) + + Game.cookiesSent=0;Game.cookiesReceived=0; + + Game.prefs=[]; + Game.DefaultPrefs=function() + { + Game.prefs.particles=1;//particle effects : falling cookies etc + Game.prefs.numbers=1;//numbers that pop up when clicking the cookie + Game.prefs.autosave=1;//save the game every minute or so + Game.prefs.autoupdate=1;//send an AJAX request to the server every 30 minutes (note : ignored) + Game.prefs.milk=1;//display milk + Game.prefs.fancy=1;//CSS shadow effects (might be heavy on some browsers) + Game.prefs.warn=0;//warn before closing the window + Game.prefs.cursors=1;//display cursors + Game.prefs.focus=1;//make the game refresh less frequently when off-focus + Game.prefs.popups=0;//use old-style popups (no longer used) + Game.prefs.format=0;//shorten numbers + Game.prefs.notifs=0;//notifications fade faster + Game.prefs.animate=1;//animate buildings + Game.prefs.wobbly=1;//wobbly cookie + Game.prefs.monospace=0;//alt monospace font for cookies + Game.prefs.filters=1;//CSS filter effects (might be heavy on some browsers) + Game.prefs.cookiesound=1;//use new cookie click sound + Game.prefs.crates=0;//show crates around icons in stats + Game.prefs.altDraw=0;//use requestAnimationFrame to update drawing instead of fixed 30 fps setTimeout + Game.prefs.showBackupWarning=1;//if true, show a "Have you backed up your save?" message on save load; set to false when save is exported + Game.prefs.extraButtons=1;//if true, show Mute buttons and the building master bar + Game.prefs.askLumps=0;//if true, show a prompt before spending lumps + Game.prefs.customGrandmas=1;//if true, show patreon names for grandmas + Game.prefs.timeout=0;//if true, game may show pause screen when timed out + Game.prefs.cloudSave=1;//if true and on Steam, save and load to cloud + Game.prefs.bgMusic=1;//if true and on Steam, play music even when game isn't focused + Game.prefs.notScary=0;//if true, make some of the scary stuff less scary ("eyebrow mode") + Game.prefs.fullscreen=0;//if true, Steam game will be fullscreen + Game.prefs.screenreader=0;//if true, add some DOM stuff to facilitate screenreader interaction (requires reload) + Game.prefs.discordPresence=1;//if true and applicable, show game activity in Discord status + } + Game.DefaultPrefs(); + + window.onbeforeunload=function(event) + { + if (Game.prefs && Game.prefs.warn) + { + if (typeof event=='undefined') event=window.event; + if (event) event.returnValue=loc("Are you sure you want to close Cookie Clicker?"); + } + } + + Game.Mobile=function() + { + if (!Game.mobile) + { + Game.wrapper.className='mobile'; + Game.mobile=1; + } + else + { + Game.wrapper.className=''; + Game.mobile=0; + } + } + + Game.showBackupWarning=function() + { + Game.Notify(loc("Back up your save!"),loc("Hello again! Just a reminder that you may want to back up your Cookie Clicker save every once in a while, just in case.
To do so, go to Options and hit \"Export save\" or \"Save to file\"!")+'
'+loc("Don't show this again")+'',[25,7]); + } + + + + + /*===================================================================================== + BAKERY NAME + =======================================================================================*/ + Game.RandomBakeryName=function() + { + var str=''; + if (EN) + { + return (Math.random()>0.05?(choose(['Magic','Fantastic','Fancy','Sassy','Snazzy','Pretty','Cute','Pirate','Ninja','Zombie','Robot','Radical','Urban','Cool','Hella','Sweet','Awful','Double','Triple','Turbo','Techno','Disco','Electro','Dancing','Wonder','Mutant','Space','Science','Medieval','Future','Captain','Bearded','Lovely','Tiny','Big','Fire','Water','Frozen','Metal','Plastic','Solid','Liquid','Moldy','Shiny','Happy','Happy Little','Slimy','Tasty','Delicious','Hungry','Greedy','Lethal','Professor','Doctor','Power','Chocolate','Crumbly','Choklit','Righteous','Glorious','Mnemonic','Psychic','Frenetic','Hectic','Crazy','Royal','El','Von'])+' '):'Mc')+choose(['Cookie','Biscuit','Muffin','Scone','Cupcake','Pancake','Chip','Sprocket','Gizmo','Puppet','Mitten','Sock','Teapot','Mystery','Baker','Cook','Grandma','Click','Clicker','Spaceship','Factory','Portal','Machine','Experiment','Monster','Panic','Burglar','Bandit','Booty','Potato','Pizza','Burger','Sausage','Meatball','Spaghetti','Macaroni','Kitten','Puppy','Giraffe','Zebra','Parrot','Dolphin','Duckling','Sloth','Turtle','Goblin','Pixie','Gnome','Computer','Pirate','Ninja','Zombie','Robot']); + } + else + { + if (locStrings["bakery random name, 1st half"] && locStrings["bakery random name, 2nd half"]) str+=choose(loc("bakery random name, 1st half"))+' '+choose(loc("bakery random name, 2nd half")); + else str+=choose(loc("bakery random name")); + } + return str; + } + Game.GetBakeryName=function() {return Game.RandomBakeryName();} + Game.bakeryNameL=l('bakeryName'); + Game.bakeryNameSet=function(what) + { + try + { + var exp=new RegExp('[^\'\\-_0-9 \\p{L}]','gu'); + Game.bakeryName=what.replace(exp,' '); + //Game.bakeryName=what.replace(/[^'\-_0-9 \p{L}]/gu,' '); + Game.bakeryName=Game.bakeryName.trim().substring(0,28); + } + catch(e) + { + var exp=new RegExp('\W+','g'); + Game.bakeryName=what.replace(exp,' '); + //Game.bakeryName=what.replace(/\W+/g,' '); + Game.bakeryName=Game.bakeryName.substring(0,28); + } + Game.bakeryNameRefresh(); + if (Game.bakeryName=='RESTORE BACKUP' && App && App.restoreBackup) App.restoreBackup(); + } + Game.bakeryNameRefresh=function() + { + var name=Game.bakeryName; + if (EN) {if (name.slice(-1).toLowerCase()=='s') name+='\' bakery'; else name+='\'s bakery';} + else name=loc("%1's bakery",name); + Game.bakeryNameL.textContent=name; + name=Game.bakeryName.toLowerCase(); + if (name=='orteil') Game.Win('God complex'); + if (!App && name.indexOf('saysopensesame',name.length-('saysopensesame').length)>0 && !Game.sesame) Game.OpenSesame(); + Game.recalculateGains=1; + } + Game.bakeryNamePrompt=function() + { + PlaySound('snd/tick.mp3'); + Game.Prompt('

'+loc("Name your bakery")+'

'+loc("What should your bakery's name be?")+'
',[[loc("Confirm"),'if (l(\'bakeryNameInput\').value.length>0) {Game.bakeryNameSet(l(\'bakeryNameInput\').value);Game.Win(\'What\\\'s in a name\');Game.ClosePrompt();}'],[loc("Random"),'Game.bakeryNamePromptRandom();'],loc("Cancel")]); + l('bakeryNameInput').focus(); + l('bakeryNameInput').select(); + } + Game.bakeryNamePromptRandom=function() + { + l('bakeryNameInput').value=Game.RandomBakeryName(); + } + AddEvent(Game.bakeryNameL,'click',Game.bakeryNamePrompt); + + Game.bakeryNameSet(Game.GetBakeryName()); + + /*===================================================================================== + TOOLTIP + =======================================================================================*/ + Game.tooltip={text:'',x:0,y:0,origin:'',on:0,tt:l('tooltip'),tta:l('tooltipAnchor'),shouldHide:1,dynamic:0,from:0}; + Game.tooltip.draw=function(from,text,origin) + { + this.shouldHide=0; + this.text=text; + this.from=from; + //this.x=x; + //this.y=y; + this.origin=origin; + var tt=this.tt; + var tta=this.tta; + tt.style.left='auto'; + tt.style.top='auto'; + tt.style.right='auto'; + tt.style.bottom='auto'; + if (typeof this.text==='function') + { + var text=this.text(); + if (text=='') tta.style.opacity='0'; + else + { + tt.innerHTML=unescape(text); + tta.style.opacity='1'; + } + } + else tt.innerHTML=unescape(this.text); + //tt.innerHTML=(typeof this.text==='function')?unescape(this.text()):unescape(this.text); + tta.style.display='block'; + tta.style.visibility='hidden'; + Game.tooltip.update(); + tta.style.visibility='visible'; + this.on=1; + } + Game.tooltip.update=function() + { + var X=0; + var Y=0; + var width=this.tt.offsetWidth; + var height=this.tt.offsetHeight; + if (this.origin=='store') + { + X=Game.windowW-332-width; + Y=Game.mouseY-32; + if (Game.onCrate) Y=Game.onCrate.getBounds().top-42; + Y=Math.max(0,Math.min(Game.windowH-height-44,Y)); + /*this.tta.style.right='308px';//'468px'; + this.tta.style.left='auto'; + if (Game.onCrate) Y=Game.onCrate.getBounds().top-2; + this.tta.style.top=Math.max(0,Math.min(Game.windowH-this.tt.clientHeight-64,Y-48))+'px';*/ + } + else + { + if (Game.onCrate) + { + var rect=Game.onCrate.getBounds(); + if (rect.left==0 && rect.top==0)//if we get that bug where we get stuck in the top-left, move to the mouse (REVISION : just do nothing) + {return false;/*rect.left=Game.mouseX-24;rect.right=Game.mouseX+24;rect.top=Game.mouseY-24;rect.bottom=Game.mouseY+24;*/} + if (this.origin=='left') + { + X=rect.left-width-16; + Y=rect.top+(rect.bottom-rect.top)/2-height/2-38; + Y=Math.max(0,Math.min(Game.windowH-height-19,Y)); + if (X<0) X=rect.right; + } + else + { + X=rect.left+(rect.right-rect.left)/2-width/2-8; + Y=rect.top-height-TopBarOffset-16; + X=Math.max(0,Math.min(Game.windowW-width-16,X)); + if (Y<0) Y=rect.bottom-TopBarOffset; + } + } + else if (this.origin=='bottom-right') + { + X=Game.mouseX+8; + Y=Game.mouseY-32; + X=Math.max(0,Math.min(Game.windowW-width-16,X)); + Y=Math.max(0,Math.min(Game.windowH-height-64,Y)); + } + else if (this.origin=='bottom') + { + X=Game.mouseX-width/2-8; + Y=Game.mouseY+24; + X=Math.max(0,Math.min(Game.windowW-width-16,X)); + Y=Math.max(0,Math.min(Game.windowH-height-64,Y)); + } + else if (this.origin=='left') + { + X=Game.mouseX-width-24; + Y=Game.mouseY-height/2-8; + X=Math.max(0,Math.min(Game.windowW-width-16,X)); + Y=Math.max(0,Math.min(Game.windowH-height-64,Y)); + } + else if (this.origin=='this' && this.from) + { + var rect=this.from.getBounds(); + X=(rect.left+rect.right)/2-width/2-8; + Y=(rect.top)-this.tt.clientHeight-48; + X=Math.max(0,Math.min(Game.windowW-width-16,X)); + //Y=Math.max(0,Math.min(Game.windowH-this.tt.clientHeight-64,Y)); + if (Y<0) Y=(rect.bottom-24); + if (Y+height+40>Game.windowH) + { + X=rect.right+8; + Y=rect.top+(rect.bottom-rect.top)/2-height/2-38; + Y=Math.max(0,Math.min(Game.windowH-height-19,Y)); + } + } + else + { + X=Game.mouseX-width/2-8; + Y=Game.mouseY-height-32; + X=Math.max(0,Math.min(Game.windowW-width-16,X)); + Y=Math.max(0,Math.min(Game.windowH-height-64,Y)); + } + } + this.tta.style.left=X+'px'; + this.tta.style.right='auto'; + this.tta.style.top=Y+'px'; + this.tta.style.bottom='auto'; + if (this.shouldHide) {this.hide();this.shouldHide=0;} + else if (Game.drawT%10==0 && typeof(this.text)==='function') + { + var text=this.text(); + if (text=='') this.tta.style.opacity='0'; + else + { + this.tt.innerHTML=unescape(text); + this.tta.style.opacity='1'; + } + } + } + Game.tooltip.hide=function() + { + if (this.tta) this.tta.style.display='none'; + this.dynamic=0; + this.on=0; + } + Game.getTooltip=function(text,origin,isCrate) + { + origin=(origin?origin:'middle'); + if (isCrate) return 'onMouseOut="Game.setOnCrate(0);Game.tooltip.shouldHide=1;" onMouseOver="if (!Game.mouseDown) {Game.setOnCrate(this);Game.tooltip.dynamic=0;Game.tooltip.draw(this,\''+escape(text)+'\',\''+origin+'\');Game.tooltip.wobble();}"'; + else return 'onMouseOut="Game.tooltip.shouldHide=1;" onMouseOver="Game.tooltip.dynamic=0;Game.tooltip.draw(this,\''+escape(text)+'\',\''+origin+'\');Game.tooltip.wobble();"'; + } + Game.getDynamicTooltip=function(func,origin,isCrate) + { + origin=(origin?origin:'middle'); + if (isCrate) return 'onMouseOut="Game.setOnCrate(0);Game.tooltip.shouldHide=1;" onMouseOver="if (!Game.mouseDown) {Game.setOnCrate(this);Game.tooltip.dynamic=1;Game.tooltip.draw(this,'+'function(){return '+func+'();}'+',\''+origin+'\');Game.tooltip.wobble();}"'; + return 'onMouseOut="Game.tooltip.shouldHide=1;" onMouseOver="Game.tooltip.dynamic=1;Game.tooltip.draw(this,'+'function(){return '+func+'();}'+',\''+origin+'\');Game.tooltip.wobble();"'; + } + Game.attachTooltip=function(el,func,origin) + { + if (typeof func==='string') + { + var str=func; + func=function(str){return function(){return str;};}(str); + } + origin=(origin?origin:'middle'); + AddEvent(el,'mouseover',function(func,el,origin){return function(){Game.tooltip.dynamic=1;Game.tooltip.draw(el,func,origin);};}(func,el,origin)); + AddEvent(el,'mouseout',function(){return function(){Game.tooltip.shouldHide=1;};}()); + } + Game.tooltip.wobble=function() + { + //disabled because this effect doesn't look good with the slight slowdown it might or might not be causing. + if (false) + { + this.tt.className='framed'; + void this.tt.offsetWidth; + this.tt.className='framed wobbling'; + } + } + + + /*===================================================================================== + UPDATE CHECKER + =======================================================================================*/ + Game.CheckUpdates=function() + { + if (!App) ajax('server.php?q=checkupdate',Game.CheckUpdatesResponse); + } + Game.CheckUpdatesResponse=function(response) + { + var r=response.split('|'); + var str=''; + if (r[0]=='alert') + { + if (r[1]) str=r[1]; + } + else if (parseFloat(r[0])>Game.version) + { + str=''+loc("New version available: v. %1!",r[0])+''; + if (r[1]) str+='
'+loc("Update note: \"%1\"",r[1])+''; + str+='
'+loc("Refresh to get it!")+''; + } + if (str!='') + { + l('alert').innerHTML=str; + l('alert').style.display='block'; + } + } + + /*===================================================================================== + DATA GRABBER + =======================================================================================*/ + + Game.externalDataLoaded=false; + + Game.grandmaNames=['Granny','Gusher','Ethel','Edna','Doris','Maud','Hilda','Gladys','Michelle','Michele','Phyllis','Millicent','Muriel','Myrtle','Mildred','Mavis','Helen','Gloria','Sheila','Betty','Gertrude','Agatha','Beryl','Agnes','Pearl','Precious','Ruby','Vera','Bonnie','Ada','Bunny','Cookie','Darling','Gaga','GamGam','Memaw','Mimsy','Peanut','Nana','Nan','Tootsie','Warty','Stinky','Heinous']; + Game.customGrandmaNames=[]; + Game.heralds=0; + + Game.GrabData=function() + { + if (!App) ajax('grab.txt',Game.GrabDataResponse); + else App.grabData(function(res){ + Game.heralds=res?(res.playersN||1):1; + Game.heralds=Math.max(0,Math.min(100,Math.ceil(Game.heralds/100*100)/100)); + l('heraldsAmount').textContent=Math.floor(Game.heralds); + }); + } + Game.GrabDataResponse=function(response) + { + /* + response should be formatted as + {"herald":3,"grandma":"a|b|c|...} + */ + var r={}; + try{ + r=JSON.parse(response); + if (typeof r['herald']!=='undefined') + { + Game.heralds=parseInt(r['herald']); + Game.heralds=Math.max(0,Math.min(100,Game.heralds)); + } + if (typeof r['grandma']!=='undefined' && r['grandma']!='') + { + Game.customGrandmaNames=r['grandma'].split('|'); + Game.customGrandmaNames=Game.customGrandmaNames.filter(function(el){return el!='';}); + } + + l('heraldsAmount').textContent=Math.floor(Game.heralds); + Game.externalDataLoaded=true; + }catch(e){} + } + + + if (!App) + { + Game.attachTooltip(l('httpsSwitch'),'
'+loc("You are currently playing Cookie Clicker on the %1 protocol.
The %2 version uses a different save slot than this one.
Click this lock to reload the page and switch to the %2 version!",[(Game.https?'HTTPS':'HTTP'),(Game.https?'HTTP':'HTTPS')])+'
','this'); + AddEvent(l('httpsSwitch'),'click',function(){ + PlaySound('snd/pop'+Math.floor(Math.random()*3+1)+'.mp3',0.75); + if (location.protocol=='https:') location.href='http:'+window.location.href.substring(window.location.protocol.length); + else if (location.protocol=='http:') location.href='https:'+window.location.href.substring(window.location.protocol.length); + }); + + AddEvent(l('changeLanguage'),'click',function() + { + Game.showLangSelection(); + }); + + Game.attachTooltip(l('topbarOrteil'),'
Back to Orteil\'s subdomain!
Lots of other games in there!
'+tinyIcon([17,5],'display:block;margin:-12px auto;'),'this'); + Game.attachTooltip(l('topbarDashnet'),'
Back to our homepage!
','this'); + Game.attachTooltip(l('topbarTwitter'),'
Orteil\'s twitter, which frequently features game updates.
','this'); + Game.attachTooltip(l('topbarTumblr'),'
Orteil\'s tumblr, which frequently features game updates.
','this'); + Game.attachTooltip(l('topbarDiscord'),'
Our official discord server.
You can share tips and questions about Cookie Clicker and all our other games!
','this'); + Game.attachTooltip(l('topbarPatreon'),'
Support us on Patreon and help us keep updating Cookie Clicker!
There\'s neat rewards for patrons too!
','this'); + Game.attachTooltip(l('topbarMerch'),'
Cookie Clicker shirts, hoodies and stickers!
','this'); + Game.attachTooltip(l('topbarMobileCC'),'
Play Cookie Clicker on your phone!
(Android only; iOS version will be released later)
','this'); + Game.attachTooltip(l('topbarSteamCC'),'
Get Cookie Clicker on Steam!
Featuring music by C418.
','this'); + Game.attachTooltip(l('topbarRandomgen'),'
A thing we made that lets you write random generators.
','this'); + Game.attachTooltip(l('topbarIGM'),'
A thing we made that lets you create your own idle games using a simple scripting language.
','this'); + l('changeLanguage').innerHTML=loc("Change language"); + l('links').childNodes[0].nodeValue=loc("Other versions"); + //l('linkVersionBeta').innerHTML=loc("Beta"); + } + + Game.attachTooltip(l('heralds'),function(){ + var str=''; + + if (!App && !Game.externalDataLoaded) str+=loc("Heralds couldn't be loaded. There may be an issue with our servers, or you are playing the game locally."); + else + { + if (!App && Game.heralds==0) str+=loc("There are no heralds at the moment. Please consider donating to our Patreon!"); + else + { + str+=''+loc("%1 herald",Game.heralds)+' '+loc("selflessly inspiring a boost in production for everyone, resulting in %1.",'
'+loc("+%1% cookies per second",Game.heralds)+'
'); + str+='
'; + if (Game.ascensionMode==1) str+=loc("You are in a Born again run, and are not currently benefiting from heralds."); + else if (Game.Has('Heralds')) str+=loc("You own the Heralds upgrade, and therefore benefit from the production boost."); + else str+=loc("To benefit from the herald bonus, you need a special upgrade you do not yet own. You will permanently unlock it later in the game."); + } + } + str+='
'+(!App?loc("Heralds are people who have donated to our highest Patreon tier, and are limited to 100.
Each herald gives everyone +1% CpS.
Heralds benefit everyone playing the game, regardless of whether you donated."):loc("Every %1 current players on Steam generates 1 herald, up to %2 heralds.
Each herald gives everyone +1% CpS.",[100,100]))+'
'+tinyIcon([21,29]); + + str+='
'; + + return '

'+loc("Heralds")+'

'+str+'
'; + },'this'); + l('heraldsAmount').textContent='?'; + l('heralds').style.display='inline-block'; + if (App) + { + l('heralds').style.paddingTop='4px'; + l('heralds').style.position='absolute'; + l('heralds').style.top='0px'; + l('heralds').style.right='0px'; + l('heralds').style.width='28px'; + l('heralds').style.textAlign='center'; + l('leftBeam').appendChild(l('heralds')); + + l('buffs').style.top='16px'; + } + + Game.GrabData(); + + + Game.useLocalStorage=1; + //window.localStorage.clear();//won't switch back to cookie-based if there is localStorage info + + /*===================================================================================== + SAVE + =======================================================================================*/ + Game.ExportSave=function() + { + //if (App) return false; + Game.prefs.showBackupWarning=0; + Game.Prompt('

'+loc("Export save")+'

'+loc("This is your save code.
Copy it and keep it somewhere safe!")+'
',[loc("All done!")]);//prompt('Copy this text and keep it somewhere safe!',Game.WriteSave(1)); + l('textareaPrompt').focus();l('textareaPrompt').select(); + } + Game.ImportSave=function(def) + { + //if (App) return false; + Game.Prompt('

'+loc("Import save")+'

'+loc("Please paste in the code that was given to you on save export.")+'
',[[loc("Load"),'if (l(\'textareaPrompt\').value.length==0){return false;}if (Game.ImportSaveCode(l(\'textareaPrompt\').value)){Game.ClosePrompt();}else{l(\'importError\').innerHTML=\'(\'+loc("Error importing save")+\')\';}'],loc("Nevermind")]);//prompt('Please paste in the text that was given to you on save export.',''); + l('textareaPrompt').focus(); + } + Game.ImportSaveCode=function(save) + { + var out=false; + if (save && save!='') out=Game.LoadSave(save); + if (out && App && App.onImportSave) App.onImportSave(out,save); + return out; + } + + Game.FileSave=function() + { + if (App) return false; + Game.prefs.showBackupWarning=0; + var filename=Game.bakeryName.replace(/[^a-zA-Z0-9]+/g,'')+'Bakery'; + var text=Game.WriteSave(1); + var blob=new Blob([text],{type:'text/plain;charset=utf-8'}); + saveAs(blob,filename+'.txt'); + } + Game.FileLoad=function(e) + { + if (App) return false; + if (e.target.files.length==0) return false; + var file=e.target.files[0]; + var reader=new FileReader(); + reader.onload=function(e) + { + Game.ImportSaveCode(e.target.result); + } + reader.readAsText(file); + } + + + Game.toReload=false; + Game.toSave=false; + Game.toQuit=false; + Game.isSaving=false;//true while we're saving, to block some behavior; when in App mode saving may be asynchronous + Game.lastSaveData=''; + Game.WriteSave=function(type) + { + Game.toSave=false; + //type: none is default, 1=return string only, 2=return uncompressed string, 3=return uncompressed, commented string + Game.lastDate=parseInt(Game.time); + var str=''; + if (type==3) str+='\nGame version\n'; + str+=Game.version+'|'; + str+='|';//just in case we need some more stuff here + if (type==3) str+='\n\nRun details'; + str+=//save stats + (type==3?'\n run start date : ':'')+parseInt(Game.startDate)+';'+ + (type==3?'\n legacy start date : ':'')+parseInt(Game.fullDate)+';'+ + (type==3?'\n date when we last opened the game : ':'')+parseInt(Game.lastDate)+';'+ + (type==3?'\n bakery name : ':'')+(Game.bakeryName)+';'+ + (type==3?'\n seed : ':'')+(Game.seed)+';'+ + (type==3?'\n appearance : ':'')+(Game.YouCustomizer.save())+ + '|'; + if (type==3) str+='\n\nPacked preferences bitfield\n '; + var str2=//prefs + (Game.prefs.particles?'1':'0')+ + (Game.prefs.numbers?'1':'0')+ + (Game.prefs.autosave?'1':'0')+ + (Game.prefs.autoupdate?'1':'0')+ + (Game.prefs.milk?'1':'0')+ + (Game.prefs.fancy?'1':'0')+ + (Game.prefs.warn?'1':'0')+ + (Game.prefs.cursors?'1':'0')+ + (Game.prefs.focus?'1':'0')+ + (Game.prefs.format?'1':'0')+ + (Game.prefs.notifs?'1':'0')+ + (Game.prefs.wobbly?'1':'0')+ + (Game.prefs.monospace?'1':'0')+ + (Game.prefs.filters?'1':'0')+ + (Game.prefs.cookiesound?'1':'0')+ + (Game.prefs.crates?'1':'0')+ + (Game.prefs.showBackupWarning?'1':'0')+ + (Game.prefs.extraButtons?'1':'0')+ + (Game.prefs.askLumps?'1':'0')+ + (Game.prefs.customGrandmas?'1':'0')+ + (Game.prefs.timeout?'1':'0')+ + (Game.prefs.cloudSave?'1':'0')+ + (Game.prefs.bgMusic?'1':'0')+ + (Game.prefs.notScary?'1':'0')+ + (Game.prefs.fullscreen?'1':'0')+ + (Game.prefs.screenreader?'1':'0')+ + (Game.prefs.discordPresence?'1':'0')+ + ''; + str2=pack3(str2); + str+=str2+'|'; + if (type==3) str+='\n\nMisc game data'; + str+= + (type==3?'\n cookies : ':'')+parseFloat(Game.cookies).toString()+';'+ + (type==3?'\n total cookies earned : ':'')+parseFloat(Game.cookiesEarned).toString()+';'+ + (type==3?'\n cookie clicks : ':'')+parseInt(Math.floor(Game.cookieClicks))+';'+ + (type==3?'\n golden cookie clicks : ':'')+parseInt(Math.floor(Game.goldenClicks))+';'+ + (type==3?'\n cookies made by clicking : ':'')+parseFloat(Game.handmadeCookies).toString()+';'+ + (type==3?'\n golden cookies missed : ':'')+parseInt(Math.floor(Game.missedGoldenClicks))+';'+ + (type==3?'\n background type : ':'')+parseInt(Math.floor(Game.bgType))+';'+ + (type==3?'\n milk type : ':'')+parseInt(Math.floor(Game.milkType))+';'+ + (type==3?'\n cookies from past runs : ':'')+parseFloat(Game.cookiesReset).toString()+';'+ + (type==3?'\n elder wrath : ':'')+parseInt(Math.floor(Game.elderWrath))+';'+ + (type==3?'\n pledges : ':'')+parseInt(Math.floor(Game.pledges))+';'+ + (type==3?'\n pledge time left : ':'')+parseInt(Math.floor(Game.pledgeT))+';'+ + (type==3?'\n currently researching : ':'')+parseInt(Math.floor(Game.nextResearch))+';'+ + (type==3?'\n research time left : ':'')+parseInt(Math.floor(Game.researchT))+';'+ + (type==3?'\n ascensions : ':'')+parseInt(Math.floor(Game.resets))+';'+ + (type==3?'\n golden cookie clicks (this run) : ':'')+parseInt(Math.floor(Game.goldenClicksLocal))+';'+ + (type==3?'\n cookies sucked by wrinklers : ':'')+parseFloat(Game.cookiesSucked).toString()+';'+ + (type==3?'\n wrinkles popped : ':'')+parseInt(Math.floor(Game.wrinklersPopped))+';'+ + (type==3?'\n santa level : ':'')+parseInt(Math.floor(Game.santaLevel))+';'+ + (type==3?'\n reindeer clicked : ':'')+parseInt(Math.floor(Game.reindeerClicked))+';'+ + (type==3?'\n season time left : ':'')+parseInt(Math.floor(Game.seasonT))+';'+ + (type==3?'\n season switcher uses : ':'')+parseInt(Math.floor(Game.seasonUses))+';'+ + (type==3?'\n current season : ':'')+(Game.season?Game.season:'')+';'; + var wrinklers=Game.SaveWrinklers(); + str+= + (type==3?'\n amount of cookies contained in wrinklers : ':'')+parseFloat(Math.floor(wrinklers.amount))+';'+ + (type==3?'\n number of wrinklers : ':'')+parseInt(Math.floor(wrinklers.number))+';'+ + (type==3?'\n prestige level : ':'')+parseFloat(Game.prestige).toString()+';'+ + (type==3?'\n heavenly chips : ':'')+parseFloat(Game.heavenlyChips).toString()+';'+ + (type==3?'\n heavenly chips spent : ':'')+parseFloat(Game.heavenlyChipsSpent).toString()+';'+ + (type==3?'\n heavenly cookies : ':'')+parseFloat(Game.heavenlyCookies).toString()+';'+ + (type==3?'\n ascension mode : ':'')+parseInt(Math.floor(Game.ascensionMode))+';'+ + (type==3?'\n permanent upgrades : ':'')+parseInt(Math.floor(Game.permanentUpgrades[0]))+';'+parseInt(Math.floor(Game.permanentUpgrades[1]))+';'+parseInt(Math.floor(Game.permanentUpgrades[2]))+';'+parseInt(Math.floor(Game.permanentUpgrades[3]))+';'+parseInt(Math.floor(Game.permanentUpgrades[4]))+';'+ + (type==3?'\n dragon level : ':'')+parseInt(Math.floor(Game.dragonLevel))+';'+ + (type==3?'\n dragon aura : ':'')+parseInt(Math.floor(Game.dragonAura))+';'+ + (type==3?'\n dragon aura 2 : ':'')+parseInt(Math.floor(Game.dragonAura2))+';'+ + (type==3?'\n chime type : ':'')+parseInt(Math.floor(Game.chimeType))+';'+ + (type==3?'\n volume : ':'')+parseInt(Math.floor(Game.volume))+';'+ + (type==3?'\n number of shiny wrinklers : ':'')+parseInt(Math.floor(wrinklers.shinies))+';'+ + (type==3?'\n amount of cookies contained in shiny wrinklers : ':'')+parseFloat(Math.floor(wrinklers.amountShinies))+';'+ + (type==3?'\n current amount of sugar lumps : ':'')+parseFloat(Math.floor(Game.lumps))+';'+ + (type==3?'\n total amount of sugar lumps made : ':'')+parseFloat(Math.floor(Game.lumpsTotal))+';'+ + (type==3?'\n time when current sugar lump started : ':'')+parseFloat(Math.floor(Game.lumpT))+';'+ + (type==3?'\n time when last refilled a minigame with a sugar lump : ':'')+parseFloat(Math.floor(Game.lumpRefill))+';'+ + (type==3?'\n sugar lump type : ':'')+parseInt(Math.floor(Game.lumpCurrentType))+';'+ + (type==3?'\n vault : ':'')+Game.vault.join(',')+';'+ + (type==3?'\n heralds : ':'')+parseInt(Game.heralds)+';'+ + (type==3?'\n golden cookie fortune : ':'')+parseInt(Game.fortuneGC)+';'+ + (type==3?'\n CpS fortune : ':'')+parseInt(Game.fortuneCPS)+';'+ + (type==3?'\n highest raw CpS : ':'')+parseFloat(Game.cookiesPsRawHighest)+';'+ + (type==3?'\n music volume : ':'')+parseInt(Math.floor(Game.volumeMusic))+';'+ + (type==3?'\n cookies sent : ':'')+parseInt(Math.floor(Game.cookiesSent))+';'+ + (type==3?'\n cookies received : ':'')+parseInt(Math.floor(Game.cookiesReceived))+';'+ + + '|';//cookies and lots of other stuff + + if (type==3) str+='\n\nBuildings : amount, bought, cookies produced, level, minigame data'; + for (var i in Game.Objects)//buildings + { + var me=Game.Objects[i]; + if (type==3) str+='\n '+me.name+' : '; + if (me.vanilla) + { + str+=me.amount+','+me.bought+','+parseFloat(Math.floor(me.totalCookies))+','+parseInt(me.level); + if (Game.isMinigameReady(me)) str+=','+me.minigame.save(); else str+=','+(me.minigameSave||''); + str+=','+(me.muted?'1':'0'); + str+=','+me.highest; + str+=';'; + } + } + str+='|'; + if (type==3) str+='\n\nPacked upgrades bitfield (unlocked and bought)\n '; + var toCompress=[]; + for (var i in Game.UpgradesById)//upgrades + { + var me=Game.UpgradesById[i]; + if (me.vanilla) toCompress.push(Math.min(me.unlocked,1),Math.min(me.bought,1)); + }; + + toCompress=pack3(toCompress.join(''));//toCompress=pack(toCompress);//CompressLargeBin(toCompress); + + str+=toCompress; + str+='|'; + if (type==3) str+='\n\nPacked achievements bitfield (won)\n '; + var toCompress=[]; + for (var i in Game.AchievementsById)//achievements + { + var me=Game.AchievementsById[i]; + if (me.vanilla) toCompress.push(Math.min(me.won)); + } + toCompress=pack3(toCompress.join(''));//toCompress=pack(toCompress);//CompressLargeBin(toCompress); + str+=toCompress; + + str+='|'; + if (type==3) str+='\n\nBuffs : type, maxTime, time, arg1, arg2, arg3'; + for (var i in Game.buffs) + { + var me=Game.buffs[i]; + if (me.type) + { + if (type==3) str+='\n '+me.type.name+' : '; + if (me.type.vanilla) + { + str+=me.type.id+','+me.maxTime+','+me.time; + if (typeof me.arg1!=='undefined') str+=','+parseFloat(me.arg1); + if (typeof me.arg2!=='undefined') str+=','+parseFloat(me.arg2); + if (typeof me.arg3!=='undefined') str+=','+parseFloat(me.arg3); + str+=';'; + } + } + } + + + if (type==3) str+='\n\nCustom :\n'; + + str+='|'; + str+=Game.saveModData(); + + Game.lastSaveData=str; + + if (type==2 || type==3) + { + return str; + } + else if (type==1) + { + str=escape(utf8_to_b64(str)+'!END!'); + return str; + } + else + { + if (Game.useLocalStorage) + { + //so we used to save the game using browser cookies, which was just really neat considering the game's name + //we're using localstorage now, which is more efficient but not as cool + //a moment of silence for our fallen puns + str=utf8_to_b64(str)+'!END!'; + if (str.length<10) + { + Game.Notify('Saving failed!','Purchasing an upgrade and saving again might fix this.
This really shouldn\'t happen; please notify Orteil on his tumblr.'); + } + else + { + str=escape(str); + localStorageSet(Game.SaveTo,str);//aaand save + if (App) App.save(str); + if (!localStorageGet(Game.SaveTo)) + { + Game.Notify(loc("Error while saving"),loc("Export your save instead!")); + } + else if (document.hasFocus()) + { + Game.Notify(loc("Game saved"),'','',1,1); + } + } + } + else//legacy system + { + //that's right + //we're using cookies + //yeah I went there + var now=new Date();//we storin dis for 5 years, people + now.setFullYear(now.getFullYear()+5);//mmh stale cookies + str=utf8_to_b64(str)+'!END!'; + Game.saveData=escape(str); + str=Game.SaveTo+'='+escape(str)+'; expires='+now.toUTCString()+';'; + document.cookie=str;//aaand save + if (App) App.save(str); + if (document.cookie.indexOf(Game.SaveTo)<0) + { + Game.Notify(loc("Error while saving"),loc("Export your save instead!"),'',0,1); + } + else if (document.hasFocus()) + { + Game.Notify(loc("Game saved"),'','',1,1); + } + } + } + } + + /*===================================================================================== + LOAD + =======================================================================================*/ + Game.salvageSave=function() + { + //for when Cookie Clicker won't load and you need your save + console.log('==================================================='); + console.log('This is your save data. Copypaste it (without quotation marks) into another version using the "Import save" feature.'); + console.log(localStorageGet(Game.SaveTo)); + } + Game.LoadSave=function(data,ignoreVersionIssues) + { + var str=''; + if (typeof data!=='undefined') str=unescape(data); + else + { + if (App) + { + App.getMostRecentSave(function(data){Game.LoadSave(data,true);}); + return false; + } + if (Game.useLocalStorage) + { + var local=localStorageGet(Game.SaveTo); + if (!local)//no localstorage save found? let's get the cookie one last time + { + if (document.cookie.indexOf(Game.SaveTo)>=0) + { + str=unescape(document.cookie.split(Game.SaveTo+'=')[1]); + document.cookie=Game.SaveTo+'=;expires=Thu, 01 Jan 1970 00:00:01 GMT;'; + } + else return false; + } + else + { + str=unescape(local); + } + } + else//legacy system + { + if (document.cookie.indexOf(Game.SaveTo)>=0) str=unescape(document.cookie.split(Game.SaveTo+'=')[1]);//get cookie here + else return false; + } + } + if (str!='') + { + var version=0; + var oldstr=str.split('|'); + if (oldstr[0].length<1) return false; + else + { + str=str.split('!END!')[0]; + str=b64_to_utf8(str); + } + if (str=='') return false; + else + { + var spl=''; + str=str.split('|'); + version=parseFloat(str[0]); + Game.loadedFromVersion=version; + + if (isNaN(version) || str.length<5) + { + Game.Notify(loc("Error importing save"),loc("Oops, looks like the import string is all wrong!"),'',6,1); + return false; + } + if (version>=1 && version>Game.version) + { + if (ignoreVersionIssues) Game.Notify('Retrieving save from a future version.','That\'s...odd.','',0,1); + else + { + Game.Notify(loc("Error importing save"),loc("You are attempting to load a save from a future version (v. %1; you are using v. %2).",[version,Game.version]),'',6,1); + return false; + } + } + if (version>=1) + { + Game.T=0; + + spl=str[2].split(';');//save stats + Game.startDate=parseInt(spl[0]); + Game.fullDate=parseInt(spl[1]); + Game.lastDate=parseInt(spl[2]); + var bakeryName=(spl[3]?spl[3]:Game.GetBakeryName()); + Game.seed=spl[4]?spl[4]:Game.makeSeed(); + Game.YouCustomizer.load(spl[5]||0); + //prefs + if (version<1.0503) spl=str[3].split(''); + else if (version<2.0046) spl=unpack2(str[3]).split(''); + else spl=(str[3]).split(''); + Game.prefs.particles=parseInt(spl[0]); + Game.prefs.numbers=parseInt(spl[1]); + Game.prefs.autosave=parseInt(spl[2]); + Game.prefs.autoupdate=spl[3]?parseInt(spl[3]):1; + Game.prefs.milk=spl[4]?parseInt(spl[4]):1; + Game.prefs.fancy=parseInt(spl[5]);if (Game.prefs.fancy) Game.removeClass('noFancy'); else if (!Game.prefs.fancy) Game.addClass('noFancy'); + Game.prefs.warn=spl[6]?parseInt(spl[6]):0; + Game.prefs.cursors=spl[7]?parseInt(spl[7]):0; + Game.prefs.focus=spl[8]?parseInt(spl[8]):0; + Game.prefs.format=spl[9]?parseInt(spl[9]):0; + Game.prefs.notifs=spl[10]?parseInt(spl[10]):0; + Game.prefs.wobbly=spl[11]?parseInt(spl[11]):0; + Game.prefs.monospace=spl[12]?parseInt(spl[12]):0; + Game.prefs.filters=spl[13]?parseInt(spl[13]):1;if (Game.prefs.filters) Game.removeClass('noFilters'); else if (!Game.prefs.filters) Game.addClass('noFilters'); + Game.prefs.cookiesound=spl[14]?parseInt(spl[14]):1; + Game.prefs.crates=spl[15]?parseInt(spl[15]):0; + Game.prefs.showBackupWarning=spl[16]?parseInt(spl[16]):1; + Game.prefs.extraButtons=spl[17]?parseInt(spl[17]):1;if (!Game.prefs.extraButtons) Game.removeClass('extraButtons'); else if (Game.prefs.extraButtons) Game.addClass('extraButtons'); + Game.prefs.askLumps=spl[18]?parseInt(spl[18]):0; + Game.prefs.customGrandmas=spl[19]?parseInt(spl[19]):1; + Game.prefs.timeout=spl[20]?parseInt(spl[20]):0; + Game.prefs.cloudSave=spl[21]?parseInt(spl[21]):1; + Game.prefs.bgMusic=spl[22]?parseInt(spl[22]):1; + Game.prefs.notScary=spl[23]?parseInt(spl[23]):0; + Game.prefs.fullscreen=spl[24]?parseInt(spl[24]):0;if (App) App.setFullscreen(Game.prefs.fullscreen); + Game.prefs.screenreader=spl[25]?parseInt(spl[25]):0; + Game.prefs.discordPresence=spl[26]?parseInt(spl[26]):1; + BeautifyAll(); + spl=str[4].split(';');//cookies and lots of other stuff + Game.cookies=parseFloat(spl[0]); + Game.cookiesEarned=parseFloat(spl[1]); + Game.cookieClicks=spl[2]?parseInt(spl[2]):0; + Game.goldenClicks=spl[3]?parseInt(spl[3]):0; + Game.handmadeCookies=spl[4]?parseFloat(spl[4]):0; + Game.missedGoldenClicks=spl[5]?parseInt(spl[5]):0; + Game.bgType=spl[6]?parseInt(spl[6]):0; + Game.milkType=spl[7]?parseInt(spl[7]):0; + Game.cookiesReset=spl[8]?parseFloat(spl[8]):0; + Game.elderWrath=spl[9]?parseInt(spl[9]):0; + Game.pledges=spl[10]?parseInt(spl[10]):0; + Game.pledgeT=spl[11]?parseInt(spl[11]):0; + Game.nextResearch=spl[12]?parseInt(spl[12]):0; + Game.researchT=spl[13]?parseInt(spl[13]):0; + Game.resets=spl[14]?parseInt(spl[14]):0; + Game.goldenClicksLocal=spl[15]?parseInt(spl[15]):0; + Game.cookiesSucked=spl[16]?parseFloat(spl[16]):0; + Game.wrinklersPopped=spl[17]?parseInt(spl[17]):0; + Game.santaLevel=spl[18]?parseInt(spl[18]):0; + Game.reindeerClicked=spl[19]?parseInt(spl[19]):0; + Game.seasonT=spl[20]?parseInt(spl[20]):0; + Game.seasonUses=spl[21]?parseInt(spl[21]):0; + Game.season=spl[22]?spl[22]:Game.baseSeason; + var wrinklers={amount:spl[23]?parseFloat(spl[23]):0,number:spl[24]?parseInt(spl[24]):0}; + Game.prestige=spl[25]?parseFloat(spl[25]):0; + Game.heavenlyChips=spl[26]?parseFloat(spl[26]):0; + Game.heavenlyChipsSpent=spl[27]?parseFloat(spl[27]):0; + Game.heavenlyCookies=spl[28]?parseFloat(spl[28]):0; + Game.ascensionMode=spl[29]?parseInt(spl[29]):0; + Game.permanentUpgrades[0]=spl[30]?parseInt(spl[30]):-1;Game.permanentUpgrades[1]=spl[31]?parseInt(spl[31]):-1;Game.permanentUpgrades[2]=spl[32]?parseInt(spl[32]):-1;Game.permanentUpgrades[3]=spl[33]?parseInt(spl[33]):-1;Game.permanentUpgrades[4]=spl[34]?parseInt(spl[34]):-1; + //if (version<1.05) {Game.heavenlyChipsEarned=Game.HowMuchPrestige(Game.cookiesReset);Game.heavenlyChips=Game.heavenlyChipsEarned;} + Game.dragonLevel=spl[35]?parseInt(spl[35]):0; + if (version<2.0041 && Game.dragonLevel==Game.dragonLevels.length-2) {Game.dragonLevel=Game.dragonLevels.length-1;} + Game.dragonAura=spl[36]?parseInt(spl[36]):0; + Game.dragonAura2=spl[37]?parseInt(spl[37]):0; + Game.chimeType=spl[38]?parseInt(spl[38]):0; + Game.volume=spl[39]?parseInt(spl[39]):75; + wrinklers.shinies=spl[40]?parseInt(spl[40]):0; + wrinklers.amountShinies=spl[41]?parseFloat(spl[41]):0; + Game.lumps=spl[42]?parseFloat(spl[42]):-1; + Game.lumpsTotal=spl[43]?parseFloat(spl[43]):-1; + Game.lumpT=spl[44]?parseInt(spl[44]):Date.now(); + Game.lumpRefill=spl[45]?parseInt(spl[45]):0; + if (version<2.022) Game.lumpRefill=Game.fps*60; + Game.lumpCurrentType=spl[46]?parseInt(spl[46]):0; + Game.vault=spl[47]?spl[47].split(','):[]; + for (var i in Game.vault){Game.vault[i]=parseInt(Game.vault[i]);} + var actualHeralds=Game.heralds;//we store the actual amount of heralds to restore it later; here we used the amount present in the save to compute offline CpS + Game.heralds=spl[48]?parseFloat(spl[48]):Game.heralds; + Game.fortuneGC=spl[49]?parseInt(spl[49]):0; + Game.fortuneCPS=spl[50]?parseInt(spl[50]):0; + Game.cookiesPsRawHighest=spl[51]?parseFloat(spl[51]):0; + Game.volumeMusic=spl[52]?parseInt(spl[52]):50; + Game.cookiesSent=spl[53]?parseInt(spl[53]):0; + Game.cookiesReceived=spl[54]?parseInt(spl[54]):0; + + spl=str[5].split(';');//buildings + Game.BuildingsOwned=0; + for (var i in Game.ObjectsById) + { + var me=Game.ObjectsById[i]; + me.switchMinigame(false); + me.pics=[]; + if (spl[i]) + { + var mestr=spl[i].toString().split(','); + me.amount=parseInt(mestr[0]);me.bought=parseInt(mestr[1]);me.totalCookies=parseFloat(mestr[2]);me.level=parseInt(mestr[3]||0);me.highest=(version>=2.024?parseInt(mestr[6]):me.amount); + if (me.minigame && me.minigameLoaded && me.minigame.reset) {me.minigame.reset(true);me.minigame.load(mestr[4]||'');} else me.minigameSave=(mestr[4]||0); + me.muted=parseInt(mestr[5])||0; + Game.BuildingsOwned+=me.amount; + if (version<2.003) me.level=0; + } + else + { + me.amount=0;me.unlocked=0;me.bought=0;me.highest=0;me.totalCookies=0;me.level=0; + } + } + + Game.setVolumeMusic(Game.volumeMusic); + + Game.LoadMinigames(); + + if (version<1.035)//old non-binary algorithm + { + spl=str[6].split(';');//upgrades + Game.UpgradesOwned=0; + for (var i in Game.UpgradesById) + { + var me=Game.UpgradesById[i]; + if (spl[i]) + { + var mestr=spl[i].split(','); + me.unlocked=parseInt(mestr[0]);me.bought=parseInt(mestr[1]); + if (me.bought && Game.CountsAsUpgradeOwned(me.pool)) Game.UpgradesOwned++; + } + else + { + me.unlocked=0;me.bought=0; + } + } + if (str[7]) spl=str[7].split(';'); else spl=[];//achievements + Game.AchievementsOwned=0; + for (var i in Game.AchievementsById) + { + var me=Game.AchievementsById[i]; + if (spl[i]) + { + var mestr=spl[i].split(','); + me.won=parseInt(mestr[0]); + } + else + { + me.won=0; + } + if (me.won && Game.CountsAsAchievementOwned(me.pool)) Game.AchievementsOwned++; + } + } + else if (version<1.0502)//old awful packing system + { + if (str[6]) spl=str[6]; else spl=[];//upgrades + if (version<1.05) spl=UncompressLargeBin(spl); + else spl=unpack(spl); + Game.UpgradesOwned=0; + for (var i in Game.UpgradesById) + { + var me=Game.UpgradesById[i]; + if (spl[i*2]) + { + var mestr=[spl[i*2],spl[i*2+1]]; + me.unlocked=parseInt(mestr[0]);me.bought=parseInt(mestr[1]); + if (me.bought && Game.CountsAsUpgradeOwned(me.pool)) Game.UpgradesOwned++; + } + else + { + me.unlocked=0;me.bought=0; + } + } + if (str[7]) spl=str[7]; else spl=[];//achievements + if (version<1.05) spl=UncompressLargeBin(spl); + else spl=unpack(spl); + Game.AchievementsOwned=0; + for (var i in Game.AchievementsById) + { + var me=Game.AchievementsById[i]; + if (spl[i]) + { + var mestr=[spl[i]]; + me.won=parseInt(mestr[0]); + } + else + { + me.won=0; + } + if (me.won && Game.CountsAsAchievementOwned(me.pool)) Game.AchievementsOwned++; + } + } + else + { + if (str[6]) spl=str[6]; else spl=[];//upgrades + if (version<2.0046) spl=unpack2(spl).split(''); + else spl=(spl).split(''); + Game.UpgradesOwned=0; + for (var i in Game.UpgradesById) + { + var me=Game.UpgradesById[i]; + if (spl[i*2]) + { + var mestr=[spl[i*2],spl[i*2+1]]; + me.unlocked=parseInt(mestr[0]);me.bought=parseInt(mestr[1]); + if (me.bought && Game.CountsAsUpgradeOwned(me.pool)) Game.UpgradesOwned++; + } + else + { + me.unlocked=0;me.bought=0; + } + } + if (str[7]) spl=str[7]; else spl=[];//achievements + if (version<2.0046) spl=unpack2(spl).split(''); + else spl=(spl).split(''); + Game.AchievementsOwned=0; + for (var i in Game.AchievementsById) + { + var me=Game.AchievementsById[i]; + if (spl[i]) + { + var mestr=[spl[i]]; + me.won=parseInt(mestr[0]); + } + else + { + me.won=0; + } + if (me.won && Game.CountsAsAchievementOwned(me.pool)) Game.AchievementsOwned++; + } + } + + Game.killBuffs(); + var buffsToLoad=[]; + spl=(str[8]||'').split(';');//buffs + for (var i in spl) + { + if (spl[i]) + { + var mestr=spl[i].toString().split(','); + buffsToLoad.push(mestr); + } + } + + spl=(str[9]||'').split(';');//mod data + + for (var i in spl) + { + if (spl[i]) + { + var data=spl[i].split(':'); + var modId=data[0]; + if (modId=='META') continue; + data.shift(); + data=Game.safeLoadString(data.join(':')); + Game.modSaveData[modId]=data; + } + } + + for (var i in Game.ObjectsById) + { + var me=Game.ObjectsById[i]; + if (me.buyFunction) me.buyFunction(); + me.refresh(); + if (me.id>0) + { + if (me.muted) me.mute(1); + } + } + + if (version<1.0503)//upgrades that used to be regular, but are now heavenly + { + var me=Game.Upgrades['Persistent memory'];me.unlocked=0;me.bought=0; + var me=Game.Upgrades['Season switcher'];me.unlocked=0;me.bought=0; + } + + if (Game.bgType==-1) Game.bgType=0; + if (Game.milkType==-1 || !Game.AllMilks[Game.milkType]) Game.milkType=0; + + + //advance timers + var framesElapsed=Math.ceil(((Date.now()-Game.lastDate)/1000)*Game.fps); + if (Game.pledgeT>0) Game.pledgeT=Math.max(Game.pledgeT-framesElapsed,1); + if (Game.seasonT>0) Game.seasonT=Math.max(Game.seasonT-framesElapsed,1); + if (Game.researchT>0) Game.researchT=Math.max(Game.researchT-framesElapsed,1); + + + Game.ResetWrinklers(); + Game.LoadWrinklers(wrinklers.amount,wrinklers.number,wrinklers.shinies,wrinklers.amountShinies); + + //recompute season trigger prices + if (Game.Has('Season switcher')) {for (var i in Game.seasons) {Game.Unlock(Game.seasons[i].trigger);}} + Game.computeSeasonPrices(); + + //recompute prestige + Game.prestige=Math.floor(Game.HowMuchPrestige(Game.cookiesReset)); + //if ((Game.heavenlyChips+Game.heavenlyChipsSpent)Beta patch
We\'ve tweaked some things and fixed some others, please check the update notes!
Of note : due to changes in prestige balancing, all your heavenly upgrades have been removed and your heavenly chips refunded; you\'ll be able to reallocate them next time you ascend.
Thank you again for beta-testing Cookie Clicker!
',[['Alright then!','Game.ClosePrompt();']]);},200); + } + if (version<=1.0466)//are we loading from the old live version? reset HCs + { + Game.heavenlyChips=Game.prestige; + Game.heavenlyChipsSpent=0; + } + + if (Game.ascensionMode!=1) + { + if (Game.Has('Starter kit')) Game.Objects['Cursor'].free=10; + if (Game.Has('Starter kitchen')) Game.Objects['Grandma'].free=5; + } + + Game.CalculateGains(); + + var timeOffline=(Date.now()-Game.lastDate)/1000; + + if (Math.random()<1/10000) Game.TOYS=1;//teehee! + if (Math.random()<1/10000) Game.WINKLERS=1;//squeak + + //compute cookies earned while the game was closed + if (Game.mobile || Game.Has('Perfect idling') || Game.Has('Twin Gates of Transcendence')) + { + if (Game.Has('Perfect idling')) + { + var maxTime=60*60*24*1000000000; + var percent=100; + } + else + { + var maxTime=60*60; + if (Game.Has('Belphegor')) maxTime*=2; + if (Game.Has('Mammon')) maxTime*=2; + if (Game.Has('Abaddon')) maxTime*=2; + if (Game.Has('Satan')) maxTime*=2; + if (Game.Has('Asmodeus')) maxTime*=2; + if (Game.Has('Beelzebub')) maxTime*=2; + if (Game.Has('Lucifer')) maxTime*=2; + + var percent=5; + if (Game.Has('Angels')) percent+=10; + if (Game.Has('Archangels')) percent+=10; + if (Game.Has('Virtues')) percent+=10; + if (Game.Has('Dominions')) percent+=10; + if (Game.Has('Cherubim')) percent+=10; + if (Game.Has('Seraphim')) percent+=10; + if (Game.Has('God')) percent+=10; + + if (Game.Has('Chimera')) {maxTime+=60*60*24*2;percent+=5;} + + if (Game.Has('Fern tea')) percent+=3; + if (Game.Has('Ichor syrup')) percent+=7; + if (Game.Has('Fortune #102')) percent+=1; + } + + var timeOfflineOptimal=Math.min(timeOffline,maxTime); + var timeOfflineReduced=Math.max(0,timeOffline-timeOfflineOptimal); + var amount=(timeOfflineOptimal+timeOfflineReduced*0.1)*Game.cookiesPs*(percent/100); + + if (amount>0) + { + Game.Notify(loc("Welcome back!"),loc("You earned %1 while you were away.",loc("%1 cookie",LBeautify(amount)))+(EN?('
('+Game.sayTime(timeOfflineOptimal*Game.fps,-1)+' at '+Math.floor(percent)+'% CpS'+(timeOfflineReduced?', plus '+Game.sayTime(timeOfflineReduced*Game.fps,-1)+' at '+(Math.floor(percent*10)/100)+'%':'')+'.)'):''),[Math.floor(Math.random()*16),11]); + Game.Earn(amount); + } + } + + //we load buffs after everything as we do not want them to interfer with offline CpS + for (var i in buffsToLoad) + { + var mestr=buffsToLoad[i]; + var type=Game.buffTypes[parseInt(mestr[0])]; + Game.gainBuff(type.name,parseFloat(mestr[1])/Game.fps,parseFloat(mestr[3]||0),parseFloat(mestr[4]||0),parseFloat(mestr[5]||0)).time=parseFloat(mestr[2]); + } + + + Game.loadLumps(timeOffline); + + Game.bakeryNameRefresh(); + + } + else//importing old version save + { + Game.Notify(loc("Error importing save"),loc("Sorry, you can't import saves from the classic version."),'',6,1); + return false; + } + + if (Game.prefs.screenreader) + { + Game.BuildStore(); + } + + Game.RebuildUpgrades(); + + Game.TickerAge=0; + Game.TickerEffect=0; + + Game.elderWrathD=0; + Game.recalculateGains=1; + Game.storeToRefresh=1; + Game.upgradesToRebuild=1; + + Game.buyBulk=1;Game.buyMode=1;Game.storeBulkButton(-1); + + + Game.specialTab=''; + Game.ToggleSpecialMenu(0); + + Game.killShimmers(); + + if (Game.T>Game.fps*5 && Game.ReincarnateTimer==0)//fade out of black and pop the cookie + { + Game.ReincarnateTimer=1; + Game.addClass('reincarnating'); + Game.BigCookieSize=0; + } + + + var prestigeUpgradesOwned=0; + for (var i in Game.Upgrades) + { + if (Game.Upgrades[i].bought && Game.Upgrades[i].pool=='prestige') prestigeUpgradesOwned++; + } + if (prestigeUpgradesOwned>=100) Game.Win('All the stars in heaven'); + + + if (versionValentine's season!
Love's in the air and cookies are just that much sweeter!"),[20,3],60*3); + else if (Game.season=='fools') Game.Notify(loc("Business Day!"),loc("It's Business season!
Don't panic! Things are gonna be looking a little more corporate for a few days."),[17,6],60*3); + else if (Game.season=='halloween') Game.Notify(loc("Halloween!"),loc("It's Halloween season!
Everything is just a little bit spookier!"),[13,8],60*3); + else if (Game.season=='christmas') Game.Notify(loc("Christmas time!"),loc("It's Christmas season!
Bring good cheer to all and you just may get cookies in your stockings!"),[12,10],60*3); + else if (Game.season=='easter') Game.Notify(loc("Easter!"),loc("It's Easter season!
Keep an eye out and you just might click a rabbit or two!"),[0,12],60*3); + } + + Game.heralds=actualHeralds; + + Game.Notify(loc("Game loaded"),'','',1,1); + + if (!App && Game.prefs.showBackupWarning==1) Game.showBackupWarning(); + + if (App) App.justLoadedSave(); + } + } + else return false; + return true; + } + + /*===================================================================================== + RESET + =======================================================================================*/ + Game.Reset=function(hard) + { + Game.T=0; + + if (hard) {Game.loadedFromVersion=Game.version;} + + var cookiesForfeited=Game.cookiesEarned; + if (!hard) + { + if (cookiesForfeited>=1000000) Game.Win('Sacrifice'); + if (cookiesForfeited>=1000000000) Game.Win('Oblivion'); + if (cookiesForfeited>=1000000000000) Game.Win('From scratch'); + if (cookiesForfeited>=1000000000000000) Game.Win('Nihilism'); + if (cookiesForfeited>=1000000000000000000) Game.Win('Dematerialize'); + if (cookiesForfeited>=1000000000000000000000) Game.Win('Nil zero zilch'); + if (cookiesForfeited>=1000000000000000000000000) Game.Win('Transcendence'); + if (cookiesForfeited>=1000000000000000000000000000) Game.Win('Obliterate'); + if (cookiesForfeited>=1000000000000000000000000000000) Game.Win('Negative void'); + if (cookiesForfeited>=1000000000000000000000000000000000) Game.Win('To crumbs, you say?'); + if (cookiesForfeited>=1000000000000000000000000000000000000) Game.Win('You get nothing'); + if (cookiesForfeited>=1000000000000000000000000000000000000000) Game.Win('Humble rebeginnings'); + if (cookiesForfeited>=1000000000000000000000000000000000000000000) Game.Win('The end of the world'); + if (cookiesForfeited>=1000000000000000000000000000000000000000000000) Game.Win('Oh, you\'re back'); + if (cookiesForfeited>=1000000000000000000000000000000000000000000000000) Game.Win('Lazarus'); + if (cookiesForfeited>=1000000000000000000000000000000000000000000000000000) Game.Win('Smurf account'); + if (cookiesForfeited>=1000000000000000000000000000000000000000000000000000000) Game.Win('If at first you don\'t succeed'); + if (cookiesForfeited>=1000000000000000000000000000000000000000000000000000000000) Game.Win('No more room in hell'); + + if (Math.round(Game.cookies)==1000000000000) Game.Win('When the cookies ascend just right'); + + if (Game.hasBuff('Loan 1') || Game.hasBuff('Loan 2') || Game.hasBuff('Loan 3')) Game.Win('Debt evasion'); + } + + Game.killBuffs(); + + Game.seed=Game.makeSeed(); + + Game.cookiesReset+=Game.cookiesEarned; + Game.cookies=0; + Game.cookiesEarned=0; + Game.cookieClicks=0; + Game.goldenClicksLocal=0; + //Game.goldenClicks=0; + //Game.missedGoldenClicks=0; + Game.handmadeCookies=0; + Game.cookiesPsRawHighest=0; + if (hard) + { + Game.bgType=0; + Game.milkType=0; + Game.chimeType=0; + + Game.vault=[]; + } + Game.pledges=0; + Game.pledgeT=0; + Game.elderWrath=0; + Game.elderWrathOld=0; + Game.elderWrathD=0; + Game.nextResearch=0; + Game.researchT=0; + Game.seasonT=0; + Game.seasonUses=0; + Game.season=Game.baseSeason; + Game.computeSeasonPrices(); + + Game.startDate=parseInt(Date.now()); + Game.lastDate=parseInt(Date.now()); + + if (hard) {Game.cookiesSent=0;Game.cookiesReceived=0;} + + Game.cookiesSucked=0; + Game.wrinklersPopped=0; + Game.ResetWrinklers(); + + Game.santaLevel=0; + Game.reindeerClicked=0; + + Game.dragonLevel=0; + Game.dragonAura=0; + Game.dragonAura2=0; + + Game.fortuneGC=0; + Game.fortuneCPS=0; + + Game.TickerClicks=0; + + if (Game.gainedPrestige>0) Game.resets++; + if (!hard && Game.canLumps() && Game.ascensionMode!=1) Game.addClass('lumpsOn'); + else Game.removeClass('lumpsOn'); + Game.gainedPrestige=0; + + for (var i in Game.ObjectsById) + { + var me=Game.ObjectsById[i]; + me.amount=0;me.bought=0;me.highest=0;me.free=0;me.totalCookies=0; + me.switchMinigame(false); + if (hard) {me.muted=0;} + me.pics=[]; + me.refresh(); + } + for (var i in Game.UpgradesById) + { + var me=Game.UpgradesById[i]; + if (hard || me.pool!='prestige') me.bought=0; + if (hard) me.unlocked=0; + if (me.pool!='prestige' && !me.lasting) + { + if (Game.Has('Keepsakes') && Game.seasonDrops.indexOf(me.name)!=-1 && Math.random()<1/5){} + else if (Game.ascensionMode==1 && Game.HasAchiev('O Fortuna') && me.tier=='fortune'){} + else if (Game.HasAchiev('O Fortuna') && me.tier=='fortune' && Math.random()<0.4){} + else me.unlocked=0; + } + } + + Game.BuildingsOwned=0; + Game.UpgradesOwned=0; + + Game.cookiesPsByType={}; + Game.cookiesMultByType={}; + + if (!hard) + { + if (Game.ascensionMode!=1) + { + for (var i in Game.permanentUpgrades) + { + if (Game.permanentUpgrades[i]!=-1) + {Game.UpgradesById[Game.permanentUpgrades[i]].earn();} + } + if (Game.Has('Season switcher')) {for (var i in Game.seasons) {Game.Unlock(Game.seasons[i].trigger);}} + + if (Game.Has('Starter kit')) Game.Objects['Cursor'].getFree(10); + if (Game.Has('Starter kitchen')) Game.Objects['Grandma'].getFree(5); + } + } + + /*for (var i in Game.AchievementsById) + { + var me=Game.AchievementsById[i]; + me.won=0; + }*/ + //Game.DefaultPrefs(); + BeautifyAll(); + + Game.RebuildUpgrades(); + Game.TickerAge=0; + Game.TickerEffect=0; + Game.recalculateGains=1; + Game.storeToRefresh=1; + Game.upgradesToRebuild=1; + Game.killShimmers(); + + Game.buyBulk=1;Game.buyMode=1;Game.storeBulkButton(-1); + + Game.LoadMinigames(); + for (var i in Game.ObjectsById) + { + var me=Game.ObjectsById[i]; + if (hard && me.minigame && me.minigame.launch) {me.minigame.launch();me.minigame.reset(true);} + else if (!hard && me.minigame && me.minigame.reset) me.minigame.reset(); + } + + l('toggleBox').style.display='none'; + l('toggleBox').innerHTML=''; + Game.choiceSelectorOn=-1; + Game.ToggleSpecialMenu(0); + Game.specialTab=''; + + l('logButton').classList.remove('hasUpdate'); + + Game.runModHook('reset',hard); + + if (hard) + { + Game.YouCustomizer.resetGenes(); + + Game.clicksThisSession=0; + if (Game.T>Game.fps*5 && Game.ReincarnateTimer==0)//fade out of black and pop the cookie + { + Game.ReincarnateTimer=1; + Game.addClass('reincarnating'); + Game.BigCookieSize=0; + } + Game.Notify(loc("Game reset"),EN?"So long, cookies.":loc("Good bye, cookies."),[21,6],6); + } + else Game.clicksThisSession=Math.max(Game.clicksThisSession,1); + + Game.jukebox.reset(); + if (hard) PlayCue('launch'); + else PlayCue('play'); + } + Game.HardReset=function(bypass) + { + if (!bypass) + { + Game.Prompt('

'+loc("Wipe save")+'

'+tinyIcon([15,5])+'
'+loc("Do you REALLY want to wipe your save?
You will lose your progress, your achievements, and your heavenly chips!")+'
',[[EN?'Yes!':loc("Yes"),'Game.ClosePrompt();Game.HardReset(1);','float:left'],[loc("No"),0,'float:right']]); + } + else if (bypass==1) + { + Game.Prompt('

'+loc("Wipe save")+'

'+tinyIcon([15,5])+'
'+loc("Whoah now, are you really, REALLY sure you want to go through with this?
Don't say we didn't warn you!")+'
',[[EN?'Do it!':loc("Yes"),'Game.ClosePrompt();Game.HardReset(2);','float:left'],[loc("No"),0,'float:right']]); + } + else + { + for (var i in Game.AchievementsById) + { + var me=Game.AchievementsById[i]; + me.won=0; + } + for (var i in Game.ObjectsById) + { + var me=Game.ObjectsById[i]; + me.level=0; + } + + Game.AchievementsOwned=0; + Game.goldenClicks=0; + Game.missedGoldenClicks=0; + Game.Reset(1); + Game.resets=0; + Game.fullDate=parseInt(Date.now()); + Game.bakeryName=Game.GetBakeryName(); + Game.bakeryNameRefresh(); + Game.cookiesReset=0; + Game.prestige=0; + Game.heavenlyChips=0; + Game.heavenlyChipsSpent=0; + Game.heavenlyCookies=0; + Game.permanentUpgrades=[-1,-1,-1,-1,-1]; + Game.ascensionMode=0; + Game.lumps=-1; + Game.lumpsTotal=-1; + Game.lumpT=Date.now(); + Game.lumpRefill=0; + Game.removeClass('lumpsOn'); + if (App) App.hardReset(); + } + } + + + + Game.onCrate=0; + Game.setOnCrate=function(what) + { + Game.onCrate=what; + } + Game.crate=function(me,context,forceClickStr,id,style) + { + //produce a crate with associated tooltip for an upgrade or achievement + //me is an object representing the upgrade or achievement + //context can be "store", "ascend", "stats" or undefined + //forceClickStr changes what is done when the crate is clicked + //id is the resulting div's desired id + + var classes='crate'; + var enabled=0; + var noFrame=0; + var attachment='top'; + var neuromancy=0; + if (context=='stats' && (Game.Has('Neuromancy') || (Game.sesame && me.pool=='debug'))) neuromancy=1; + var mysterious=0; + var clickStr=''; + + if (me.type=='upgrade') + { + var canBuy=(context=='store'?me.canBuy():true); + if (context=='stats' && me.bought==0 && !Game.Has('Neuromancy') && (!Game.sesame || me.pool!='debug')) return ''; + else if (context=='stats' && (Game.Has('Neuromancy') || (Game.sesame && me.pool=='debug'))) neuromancy=1; + else if (context=='store' && !canBuy) enabled=0; + else if (context=='ascend' && me.bought==0) enabled=0; + else enabled=1; + if (me.bought>0) enabled=1; + + if (context=='stats' && !Game.prefs.crates) noFrame=1; + + classes+=' upgrade'; + if (me.pool=='prestige') classes+=' heavenly'; + + + if (neuromancy) clickStr='Game.UpgradesById['+me.id+'].toggle();'; + } + else if (me.type=='achievement') + { + if (context=='stats' && me.won==0 && me.pool!='normal') return ''; + else if (context!='stats') enabled=1; + + if (context=='stats' && !Game.prefs.crates) noFrame=1; + + classes+=' achievement'; + if (me.pool=='shadow') classes+=' shadow'; + if (me.won>0) enabled=1; + else mysterious=1; + if (!enabled) clickStr='Game.AchievementsById['+me.id+'].click();'; + + if (neuromancy) clickStr='Game.AchievementsById['+me.id+'].toggle();'; + } + + if (context=='store') attachment='store'; + + if (forceClickStr) clickStr=forceClickStr; + + if (me.choicesFunction) classes+=' selector'; + + + var icon=me.icon; + if (mysterious) icon=[0,7]; + + if (me.iconFunction) icon=me.iconFunction(); + + if (me.bought && context=='store') enabled=0; + + if (enabled) classes+=' enabled';// else classes+=' disabled'; + if (noFrame) classes+=' noFrame'; + + var text=[]; + if (Game.sesame) + { + if (Game.debuggedUpgradeCpS[me.name] || Game.debuggedUpgradeCpClick[me.name]) + { + text.push('x'+Beautify(1+Game.debuggedUpgradeCpS[me.name],2));text.push(Game.debugColors[Math.floor(Math.max(0,Math.min(Game.debugColors.length-1,Math.pow(Game.debuggedUpgradeCpS[me.name]/2,0.5)*Game.debugColors.length)))]); + text.push('x'+Beautify(1+Game.debuggedUpgradeCpClick[me.name],2));text.push(Game.debugColors[Math.floor(Math.max(0,Math.min(Game.debugColors.length-1,Math.pow(Game.debuggedUpgradeCpClick[me.name]/2,0.5)*Game.debugColors.length)))]); + } + if (Game.extraInfo) {text.push(Math.floor(me.order)+(me.power?'
P:'+me.power:''));text.push('#fff');} + } + var textStr=''; + for (var i=0;i'+text[i]+'
'; + } + return (Game.prefs.screenreader?'':''); + } + Game.crateTooltip=function(me,context) + { + var tags=[]; + mysterious=0; + var neuromancy=0; + var price=''; + if (context=='stats' && (Game.Has('Neuromancy') || (Game.sesame && me.pool=='debug'))) neuromancy=1; + + var ariaText=''; + + if (me.type=='upgrade') + { + ariaText+='Upgrade. '; + + if (me.pool=='prestige') tags.push(loc("[Tag]Heavenly",0,'Heavenly'),'#efa438'); + else if (me.pool=='tech') tags.push(loc("[Tag]Tech",0,'Tech'),'#36a4ff'); + else if (me.pool=='cookie') tags.push(loc("[Tag]Cookie",0,'Cookie'),0); + else if (me.pool=='debug') tags.push(loc("[Tag]Debug",0,'Debug'),'#00c462'); + else if (me.pool=='toggle') tags.push(loc("[Tag]Switch",0,'Switch'),0); + else tags.push(loc("[Tag]Upgrade",0,'Upgrade'),0); + + if (Game.Has('Label printer')) + { + if (me.tier!=0) tags.push(loc("Tier:")+' '+loc("[Tier]"+Game.Tiers[me.tier].name,0,Game.Tiers[me.tier].name),Game.Tiers[me.tier].color); + if (me.name=='Label printer' || me.name=='This upgrade') tags.push(loc("Tier:")+' '+loc("[Tier]Self-referential"),'#ff00ea'); + } + + if (me.isVaulted()) tags.push(loc("Vaulted"),'#4e7566'); + + if (me.bought>0) + { + ariaText+='Owned. '; + if (me.pool=='tech') tags.push(loc("Researched"),0); + else if (EN && me.kitten) tags.push('Purrchased',0); + else tags.push(loc("Purchased"),0); + } + + if (me.lasting && me.unlocked) tags.push(loc("Unlocked forever"),'#f2ff87'); + + if (neuromancy && me.bought==0) tags.push(loc("Click to learn!"),'#00c462'); + else if (neuromancy && me.bought>0) tags.push(loc("Click to unlearn!"),'#00c462'); + + var canBuy=(context=='store'?me.canBuy():true); + var cost=me.getPrice(); + if (me.priceLumps>0) cost=me.priceLumps; + + if (me.priceLumps==0 && cost==0) price=''; + else + { + price='
'+Beautify(Math.round(cost))+''+((me.pool!='prestige' && me.priceLumps==0)?Game.costDetails(cost):'')+'
'; + + ariaText+=(me.bought?'Bought for':canBuy?'Can buy for':'Cannot afford the')+' '+Beautify(Math.round(cost))+' '+((me.priceLumps>0)?'sugar lumps':(me.pool=='prestige')?'heavenly chips':'cookies')+'. '; + } + } + else if (me.type=='achievement') + { + ariaText+='Achievement. '; + if (me.pool=='shadow') tags.push(loc("Shadow Achievement"),'#9700cf'); + else tags.push(loc("Achievement"),0); + if (me.won>0) {tags.push(loc("Unlocked"),0);ariaText+='Unlocked. ';} + else {tags.push(loc("Locked"),0);mysterious=1;} + + if (neuromancy && me.won==0) tags.push(loc("Click to win!"),'#00c462'); + else if (neuromancy && me.won>0) tags.push(loc("Click to lose!"),'#00c462'); + } + + var tagsStr=''; + for (var i=0;i'+tags[i]+''; + } + + var icon=me.icon; + if (mysterious) icon=[0,7]; + + if (me.iconFunction) icon=me.iconFunction(); + + ariaText+=(mysterious?'Hidden':me.dname)+'. '; + + var tip=''; + if (context=='store') + { + if (me.pool!='toggle' && me.pool!='tech') + { + var purchase=me.kitten?'purrchase':'purchase'; + if (Game.Has('Inspired checklist')) + { + if (me.isVaulted()) tip=EN?('Upgrade is vaulted and will not be auto-'+purchase+'d.
Click to '+purchase+'. Shift-click to unvault.'):(loc("Upgrade is vaulted and will not be auto-purchased.")+'
'+loc("Click to purchase.")+' '+loc("%1 to unvault.",loc("Shift-click"))); + else tip=EN?('Click to '+purchase+'. Shift-click to vault.'):(loc("Click to purchase.")+' '+loc("%1 to vault.",loc("Shift-click"))); + if (EN){ + if (Game.keys[16]) tip+='
(You are holding Shift.)'; + else tip+='
(You are not holding Shift.)'; + } + } + else tip=EN?('Click to '+purchase+'.'):loc("Click to purchase."); + } + else if (me.pool=='toggle' && me.choicesFunction) tip=loc("Click to open selector."); + else if (me.pool=='toggle') tip=loc("Click to toggle."); + else if (me.pool=='tech') tip=loc("Click to research."); + } + + if (tip!='') ariaText+=tip+' '; + + var desc=me.ddesc; + if (me.descFunc) desc=me.descFunc(context); + if (me.bought && context=='store' && me.displayFuncWhenOwned) desc=me.displayFuncWhenOwned()+'
'+desc; + if (me.unlockAt) + { + if (me.unlockAt.require) + { + var it=Game.Upgrades[me.unlockAt.require]; + desc='
'+(EN?'From':loc("Source:"))+' '+tinyIcon(it.icon)+' '+it.dname+'
'+desc; + } + else if (me.unlockAt.text) + { + //var it=Game.Upgrades[me.unlockAt.require]; + desc='
'+(EN?'From':loc("Source:"))+' '+text+'
'+desc; + } + } + + if (!mysterious) ariaText+='Description: '+desc+' '; + + if (Game.prefs.screenreader) + { + var ariaLabel=l('ariaReader-'+me.type+'-'+me.id); + if (ariaLabel) ariaLabel.innerHTML=ariaText.replace(/(<([^>]+)>)/gi,' '); + } + + return '
'+ + '
'+ + (me.bought && context=='store'?'':price)+ + '
'+(mysterious?'???':me.dname)+'
'+ + tagsStr+ + '
'+(mysterious?'???':desc)+'
'+ + (tip!=''?('
'+tip+'
'):'')+ + (Game.sesame?('
Id: '+me.id+' | Order: '+(me.order)+(me.tier?' | Tier: '+me.tier:'')+' | Icon: ['+me.icon[0]+','+me.icon[1]+']'+'
'):''); + } + + Game.costDetails=function(cost) + { + if (!Game.Has('Genius accounting')) return ''; + if (!cost) return ''; + var priceInfo=''; + var cps=Game.cookiesPs*(1-Game.cpsSucked); + if (cost>Game.cookies) priceInfo+=loc("in %1",Game.sayTime(((cost-Game.cookies)/cps+1)*Game.fps))+'
'; + priceInfo+=loc("%1 worth",Game.sayTime((cost/cps+1)*Game.fps))+'
'; + priceInfo+=loc("%1% of bank",Beautify((cost/Game.cookies)*100,1))+'
'; + return '
'+priceInfo+'
'; + } + + + /*===================================================================================== + PRESTIGE + =======================================================================================*/ + + Game.HCfactor=3; + Game.HowMuchPrestige=function(cookies)//how much prestige [cookies] should land you + { + return Math.pow(cookies/1000000000000,1/Game.HCfactor); + } + Game.HowManyCookiesReset=function(chips)//how many cookies [chips] are worth + { + //this must be the inverse of the above function (ie. if cookies=chips^2, chips=cookies^(1/2) ) + return Math.pow(chips,Game.HCfactor)*1000000000000; + } + Game.gainedPrestige=0; + Game.EarnHeavenlyChips=function(cookiesForfeited,silent) + { + //recalculate prestige and chips owned + var prestige=Math.floor(Game.HowMuchPrestige(Game.cookiesReset+cookiesForfeited)); + prestige=Math.max(0,prestige); + if (prestige!=Game.prestige)//did we change prestige levels? + { + var prestigeDifference=prestige-Game.prestige; + Game.gainedPrestige=prestigeDifference; + Game.heavenlyChips+=prestigeDifference; + Game.prestige=prestige; + if (!silent && prestigeDifference>0) Game.Notify(loc("You forfeit your %1.",loc("%1 cookie",LBeautify(cookiesForfeited))),loc("You gain %1!",loc("%1 prestige level",LBeautify(prestigeDifference))),[19,7]); + } + } + + Game.GetHeavenlyMultiplier=function() + { + var heavenlyMult=0; + if (Game.Has('Heavenly chip secret')) heavenlyMult+=0.05; + if (Game.Has('Heavenly cookie stand')) heavenlyMult+=0.20; + if (Game.Has('Heavenly bakery')) heavenlyMult+=0.25; + if (Game.Has('Heavenly confectionery')) heavenlyMult+=0.25; + if (Game.Has('Heavenly key')) heavenlyMult+=0.25; + //if (Game.hasAura('Dragon God')) heavenlyMult*=1.05; + heavenlyMult*=1+Game.auraMult('Dragon God')*0.05; + if (Game.Has('Lucky digit')) heavenlyMult*=1.01; + if (Game.Has('Lucky number')) heavenlyMult*=1.01; + if (Game.Has('Lucky payout')) heavenlyMult*=1.01; + if (Game.hasGod) + { + var godLvl=Game.hasGod('creation'); + if (godLvl==1) heavenlyMult*=0.7; + else if (godLvl==2) heavenlyMult*=0.8; + else if (godLvl==3) heavenlyMult*=0.9; + } + return heavenlyMult; + } + + Game.ascensionModes={ + 0:{name:'None',dname:loc("None [ascension type]"),desc:loc("No special modifiers."),icon:[10,0]}, + 1:{name:'Born again',dname:loc("Born again [ascension type]"),desc:loc("This run will behave as if you'd just started the game from scratch. Prestige levels and heavenly upgrades will have no effect, as will sugar lumps and building levels. Perma-upgrades and minigames will be unavailable.
Some achievements are only available in this mode."),icon:[2,7]}/*, + 2:{name:'Trigger finger',dname:loc("Trigger finger [ascension type]"),desc:loc("In this run, scrolling your mouse wheel on the cookie counts as clicking it. Some upgrades introduce new clicking behaviors.
No clicking achievements may be obtained in this mode.
Reaching 1 quadrillion cookies in this mode unlocks a special heavenly upgrade."),icon:[12,0]}*/ + }; + + Game.ascendMeterPercent=0; + Game.ascendMeterPercentT=0; + Game.ascendMeterLevel=100000000000000000000000000000; + + Game.nextAscensionMode=0; + Game.UpdateAscensionModePrompt=function() + { + var icon=Game.ascensionModes[Game.nextAscensionMode].icon; + var name=Game.ascensionModes[Game.nextAscensionMode].dname; + l('ascendModeButton').innerHTML= + '
'+loc("Challenge mode for the next run:")+'
'+name+'
'+loc("Challenge modes apply special modifiers to your next ascension.
Click to change.")+'
' + ,'bottom-right')+' style="opacity:1;float:none;display:block;background-position:'+(-icon[0]*48)+'px '+(-icon[1]*48)+'px;">'; + } + Game.PickAscensionMode=function() + { + PlaySound('snd/tick.mp3'); + Game.tooltip.hide(); + + var str=''; + for (var i in Game.ascensionModes) + { + var icon=Game.ascensionModes[i].icon; + str+='
'; + } + Game.Prompt('

'+loc("Select a challenge mode")+'

'+ + '
'+str+'

'+Game.ascensionModes[Game.nextAscensionMode].dname+'

'+Game.ascensionModes[Game.nextAscensionMode].desc+'
' + ,[[loc("Confirm"),'Game.UpdateAscensionModePrompt();Game.ClosePrompt();']],0,'widePrompt'); + } + + + l('ascendOverlay').innerHTML= + '' + ,'bottom-right')+' style="font-size:16px;margin-top:0px;">'+loc("Reincarnate")+''+ + ''+ + ''+ + + '
'+loc("You are ascending.
Drag the screen around
or use arrow keys!
When you're ready,
click Reincarnate.")+'
'; + + Game.attachTooltip(l('ascendData1'),function(){return '
('+Beautify(Game.heavenlyChips)+')
'+loc("Each prestige level grants you a permanent +%1% CpS.
The more levels you have, the more cookies they require.",1)+'
';},'bottom-right'); + Game.attachTooltip(l('ascendData2'),function(){return '
('+loc("%1 heavenly chip",LBeautify(Game.heavenlyChips))+')
'+loc("Heavenly chips are used to buy heavenly upgrades.
You gain 1 chip every time you gain a prestige level.")+'
';},'bottom-right'); + + Game.UpdateAscensionModePrompt(); + + AddEvent(l('ascendButton'),'click',function(){ + PlaySound('snd/tick.mp3'); + Game.Reincarnate(); + }); + + Game.ascendl=l('ascend'); + Game.ascendContentl=l('ascendContent'); + Game.ascendZoomablel=l('ascendZoomable'); + Game.ascendUpgradesl=l('ascendUpgrades'); + Game.OnAscend=0; + Game.AscendTimer=0;//how far we are into the ascend animation + Game.AscendDuration=Game.fps*5;//how long the ascend animation is + Game.AscendBreakpoint=Game.AscendDuration*0.5;//at which point the cookie explodes during the ascend animation + Game.UpdateAscendIntro=function() + { + if (Game.AscendTimer==1) PlaySound('snd/charging.mp3'); + if (Game.AscendTimer==Math.floor(Game.AscendBreakpoint)) PlaySound('snd/thud.mp3'); + Game.AscendTimer++; + if (Game.AscendTimer>Game.AscendDuration)//end animation and launch ascend screen + { + PlayCue('ascend'); + PlayMusicSound('snd/cymbalRev.mp3'); + if (!App || Game.volumeMusic==0) PlaySound('snd/choir.mp3'); + Game.EarnHeavenlyChips(Game.cookiesEarned); + Game.AscendTimer=0; + Game.OnAscend=1;Game.removeClass('ascendIntro'); + Game.addClass('ascending'); + Game.BuildAscendTree(); + Game.heavenlyChipsDisplayed=Game.heavenlyChips; + Game.nextAscensionMode=0; + Game.ascensionMode=0; + Game.UpdateAscensionModePrompt(); + } + } + Game.ReincarnateTimer=0;//how far we are into the reincarnation animation + Game.ReincarnateDuration=Game.fps*1;//how long the reincarnation animation is + Game.UpdateReincarnateIntro=function() + { + if (Game.ReincarnateTimer==1) PlaySound('snd/pop'+Math.floor(Math.random()*3+1)+'.mp3',0.75); + Game.ReincarnateTimer++; + if (Game.ReincarnateTimer>Game.ReincarnateDuration)//end animation and launch regular game + { + Game.ReincarnateTimer=0; + Game.removeClass('reincarnating'); + } + } + Game.Reincarnate=function(bypass) + { + if (!bypass) Game.Prompt('

'+loc("Reincarnate")+'

'+loc("Are you ready to return to the mortal world?")+'
',[[loc("Yes"),'Game.ClosePrompt();Game.Reincarnate(1);'],loc("No")]); + else + { + Game.ascendUpgradesl.innerHTML=''; + Game.ascensionMode=Game.nextAscensionMode; + Game.nextAscensionMode=0; + Game.Reset(); + if (Game.HasAchiev('Rebirth')) + { + Game.Notify('Reincarnated',loc("Hello, cookies!"),[10,0],4); + } + if (Game.resets>=1000) Game.Win('Endless cycle'); + if (Game.resets>=100) Game.Win('Reincarnation'); + if (Game.resets>=10) Game.Win('Resurrection'); + if (Game.resets>=1) Game.Win('Rebirth'); + + var prestigeUpgradesOwned=0; + for (var i in Game.Upgrades) + { + if (Game.Upgrades[i].bought && Game.Upgrades[i].pool=='prestige') prestigeUpgradesOwned++; + } + if (prestigeUpgradesOwned>=100) Game.Win('All the stars in heaven'); + + Game.removeClass('ascending'); + Game.OnAscend=0; + //trigger the reincarnate animation + Game.ReincarnateTimer=1; + Game.addClass('reincarnating'); + Game.BigCookieSize=0; + + Game.runModHook('reincarnate'); + } + } + Game.Ascend=function(bypass) + { + if (!bypass) Game.Prompt('

'+loc("Ascend")+'

'+tinyIcon([19,7])+'
'+loc("Do you REALLY want to ascend?
You will lose your progress and start over from scratch.
All your cookies will be converted into prestige and heavenly chips.")+'
'+(Game.canLumps()?loc("You will keep your achievements, building levels and sugar lumps."):loc("You will keep your achievements."))+'
',[[loc("Yes"),'Game.ClosePrompt();Game.Ascend(1);','float:left;display:none;'],[loc("Cancel"),0,'float:right']]); + else + { + Game.Notify(loc("Ascending"),loc("So long, cookies."),[20,7],4); + Game.OnAscend=0;Game.removeClass('ascending'); + Game.addClass('ascendIntro'); + //trigger the ascend animation + Game.AscendTimer=1; + Game.killShimmers(); + l('toggleBox').style.display='none'; + l('toggleBox').innerHTML=''; + Game.choiceSelectorOn=-1; + Game.ToggleSpecialMenu(0); + Game.AscendOffX=0; + Game.AscendOffY=0; + Game.AscendOffXT=0; + Game.AscendOffYT=0; + Game.AscendZoomT=1; + Game.AscendZoom=0.2; + + Game.jukebox.reset(); + PlayCue('preascend'); + } + } + + Game.DebuggingPrestige=0; + Game.AscendDragX=0; + Game.AscendDragY=0; + Game.AscendOffX=0; + Game.AscendOffY=0; + Game.AscendZoom=1; + Game.AscendOffXT=0; + Game.AscendOffYT=0; + Game.AscendZoomT=1; + Game.AscendDragging=0; + Game.heavenlyBounds={left:0,right:0,top:0,bottom:0}; + Game.UpdateAscend=function() + { + if (Game.keys[37]) Game.AscendOffXT+=16*(1/Game.AscendZoomT); + if (Game.keys[38]) Game.AscendOffYT+=16*(1/Game.AscendZoomT); + if (Game.keys[39]) Game.AscendOffXT-=16*(1/Game.AscendZoomT); + if (Game.keys[40]) Game.AscendOffYT-=16*(1/Game.AscendZoomT); + + if (Game.AscendOffXT>-Game.heavenlyBounds.left) Game.AscendOffXT=-Game.heavenlyBounds.left; + if (Game.AscendOffXT<-Game.heavenlyBounds.right) Game.AscendOffXT=-Game.heavenlyBounds.right; + if (Game.AscendOffYT>-Game.heavenlyBounds.top) Game.AscendOffYT=-Game.heavenlyBounds.top; + if (Game.AscendOffYT<-Game.heavenlyBounds.bottom) Game.AscendOffYT=-Game.heavenlyBounds.bottom; + Game.AscendOffX+=(Game.AscendOffXT-Game.AscendOffX)*0.5; + Game.AscendOffY+=(Game.AscendOffYT-Game.AscendOffY)*0.5; + Game.AscendZoom+=(Game.AscendZoomT-Game.AscendZoom)*0.25; + if (Math.abs(Game.AscendZoomT-Game.AscendZoom)<0.005) Game.AscendZoom=Game.AscendZoomT; + if (Math.abs(Game.AscendOffXT-Game.AscendOffX)<0.005) Game.AscendOffX=Game.AscendOffXT; + if (Math.abs(Game.AscendOffYT-Game.AscendOffY)<0.005) Game.AscendOffY=Game.AscendOffYT; + + + if (Game.mouseDown && !Game.promptOn) + { + if (!Game.AscendDragging) + { + Game.AscendDragX=Game.mouseX; + Game.AscendDragY=Game.mouseY; + } + Game.AscendDragging=1; + + if (!Game.SelectedHeavenlyUpgrade) + { + Game.AscendOffXT+=(Game.mouseX-Game.AscendDragX)*(1/Game.AscendZoomT); + Game.AscendOffYT+=(Game.mouseY-Game.AscendDragY)*(1/Game.AscendZoomT); + } + Game.AscendDragX=Game.mouseX; + Game.AscendDragY=Game.mouseY; + } + else + { + Game.AscendDragging=0; + Game.SelectedHeavenlyUpgrade=0; + } + if (Game.Click || Game.promptOn) + { + Game.AscendDragging=0; + } + + //Game.ascendl.style.backgroundPosition=Math.floor(Game.AscendOffX/2)+'px '+Math.floor(Game.AscendOffY/2)+'px'; + //Game.ascendl.style.backgroundPosition=Math.floor(Game.AscendOffX/2)+'px '+Math.floor(Game.AscendOffY/2)+'px,'+Math.floor(Game.AscendOffX/4)+'px '+Math.floor(Game.AscendOffY/4)+'px'; + //Game.ascendContentl.style.left=Math.floor(Game.AscendOffX)+'px'; + //Game.ascendContentl.style.top=Math.floor(Game.AscendOffY)+'px'; + Game.ascendContentl.style.webkitTransform='translate('+Math.floor(Game.AscendOffX)+'px,'+Math.floor(Game.AscendOffY)+'px)'; + Game.ascendContentl.style.msTransform='translate('+Math.floor(Game.AscendOffX)+'px,'+Math.floor(Game.AscendOffY)+'px)'; + Game.ascendContentl.style.oTransform='translate('+Math.floor(Game.AscendOffX)+'px,'+Math.floor(Game.AscendOffY)+'px)'; + Game.ascendContentl.style.mozTransform='translate('+Math.floor(Game.AscendOffX)+'px,'+Math.floor(Game.AscendOffY)+'px)'; + Game.ascendContentl.style.transform='translate('+Math.floor(Game.AscendOffX)+'px,'+Math.floor(Game.AscendOffY)+'px)'; + Game.ascendZoomablel.style.webkitTransform='scale('+(Game.AscendZoom)+','+(Game.AscendZoom)+')'; + Game.ascendZoomablel.style.marginLeft=(Game.windowW/2)+'px'; + Game.ascendZoomablel.style.marginTop=(Game.windowH/2)+'px'; + Game.ascendZoomablel.style.msTransform='scale('+(Game.AscendZoom)+','+(Game.AscendZoom)+')'; + Game.ascendZoomablel.style.oTransform='scale('+(Game.AscendZoom)+','+(Game.AscendZoom)+')'; + Game.ascendZoomablel.style.mozTransform='scale('+(Game.AscendZoom)+','+(Game.AscendZoom)+')'; + Game.ascendZoomablel.style.transform='scale('+(Game.AscendZoom)+','+(Game.AscendZoom)+')'; + + //if (Game.Scroll!=0) Game.ascendContentl.style.transformOrigin=Math.floor(Game.windowW/2-Game.mouseX)+'px '+Math.floor(Game.windowH/2-Game.mouseY)+'px'; + if (Game.Scroll<0 && !Game.promptOn) {Game.AscendZoomT=0.5;} + if (Game.Scroll>0 && !Game.promptOn) {Game.AscendZoomT=1;} + + if (Game.T%2==0) + { + l('ascendPrestige').innerHTML=loc("Prestige level:")+'
'+SimpleBeautify(Game.prestige); + l('ascendHCs').innerHTML=loc("Heavenly chips:")+'
'+SimpleBeautify(Math.round(Game.heavenlyChipsDisplayed))+''; + if (Game.prestige>0) l('ascendModeButton').style.display='block'; + else l('ascendModeButton').style.display='none'; + } + Game.heavenlyChipsDisplayed+=(Game.heavenlyChips-Game.heavenlyChipsDisplayed)*0.4; + } + Game.AscendRefocus=function() + { + Game.AscendOffX=0; + Game.AscendOffY=0; + Game.ascendl.className=''; + } + + Game.SelectedHeavenlyUpgrade=0; + Game.PurchaseHeavenlyUpgrade=function(what) + { + //if (Game.Has('Neuromancy')) Game.UpgradesById[what].toggle(); else + if (Game.UpgradesById[what].buy()) + { + if (l('heavenlyUpgrade'+what)){var rect=l('heavenlyUpgrade'+what).getBounds();Game.SparkleAt((rect.left+rect.right)/2,(rect.top+rect.bottom)/2-24);} + //Game.BuildAscendTree(); + } + } + Game.BuildAscendTree=function(justBought) + { + var str=''; + Game.heavenlyBounds={left:0,right:0,top:0,bottom:0}; + + var toPop=[]; + for (var i in Game.PrestigeUpgrades) + { + var me=Game.PrestigeUpgrades[i]; + var prevCanBePurchased=me.canBePurchased; + me.canBePurchased=1; + if (!me.bought && !Game.DebuggingPrestige) + { + if (me.showIf && !me.showIf()) me.canBePurchased=0; + else + { + for (var ii in me.parents) + { + if (me.parents[ii]!=-1 && !me.parents[ii].bought) me.canBePurchased=0; + } + } + } + if (justBought && me.parents.indexOf(justBought)!=-1 && !prevCanBePurchased && me.canBePurchased && !me.bought) toPop.push(me); + } + toPop.sort(function(parent){return function(a,b){ + var rot=Math.atan2(a.posY-parent.posY,parent.posX-a.posX)-Math.PI/2; + var rot2=Math.atan2(b.posY-parent.posY,parent.posX-b.posX)-Math.PI/2; + return rot'; + } + } + if (me.canBePurchased || Game.Has('Neuromancy') || ghosted) + { + if (me.posXGame.heavenlyBounds.right) Game.heavenlyBounds.right=me.posX; + if (me.posYGame.heavenlyBounds.bottom) Game.heavenlyBounds.bottom=me.posY; + } + for (var ii in me.parents)//create pulsing links + { + if (me.parents[ii]!=-1 && (me.canBePurchased || ghosted)) + { + var origX=0; + var origY=0; + var targX=me.posX+28; + var targY=me.posY+28; + if (me.parents[ii]!=-1) {origX=me.parents[ii].posX+28;origY=me.parents[ii].posY+28;} + var rot=-(Math.atan((targY-origY)/(origX-targX))/Math.PI)*180; + if (targX<=origX) rot+=180; + var dist=Math.floor(Math.sqrt((targX-origX)*(targX-origX)+(targY-origY)*(targY-origY))); + str+=''; + } + } + } + Game.heavenlyBounds.left-=128; + Game.heavenlyBounds.top-=128; + Game.heavenlyBounds.right+=128+64; + Game.heavenlyBounds.bottom+=128+64; + str+=''; + Game.ascendUpgradesl.innerHTML=str; + + setTimeout(function(){Game.tooltip.shouldHide=true;},100); + } + + /*===================================================================================== + COALESCING SUGAR LUMPS + =======================================================================================*/ + Game.lumpMatureAge=1; + Game.lumpRipeAge=1; + Game.lumpOverripeAge=1; + Game.lumpCurrentType=0; + l('comments').innerHTML=l('comments').innerHTML+ + '
0
'; + Game.lumpTooltip=function() + { + var str='
'+ + loc("You have %1.",''+loc("%1 sugar lump",LBeautify(Game.lumps))+'')+ + '
'+ + loc("A sugar lump is coalescing here, attracted by your accomplishments."); + + var age=Date.now()-Game.lumpT; + str+='
'; + if (age<0) str+=loc("This sugar lump has been exposed to time travel shenanigans and will take an excruciating %1 to reach maturity.",Game.sayTime(((Game.lumpMatureAge-age)/1000+1)*Game.fps,-1)); + else if (age%1 to reach maturity.",Game.sayTime(((Game.lumpMatureAge-age)/1000+1)*Game.fps,-1)); + else if (age%1.
You may click it to harvest it now, but there is a 50% chance you won't get anything.",Game.sayTime(((Game.lumpRipeAge-age)/1000+1)*Game.fps,-1)); + else if (ageThis sugar lump is ripe! Click it to harvest it.
If you do nothing, it will auto-harvest in %1.",Game.sayTime(((Game.lumpOverripeAge-age)/1000+1)*Game.fps,-1)); + + var phase=(age/Game.lumpOverripeAge)*7; + if (phase>=3) + { + if (Game.lumpCurrentType!=0) str+='
'; + if (Game.lumpCurrentType==1) str+=loc("This sugar lump grew to be bifurcated; harvesting it has a 50% chance of yielding two lumps."); + else if (Game.lumpCurrentType==2) str+=loc("This sugar lump grew to be golden; harvesting it will yield 2 to 7 lumps, your current cookies will be doubled (capped to a gain of 24 hours of your CpS), and you will find 10% more golden cookies for the next 24 hours."); + else if (Game.lumpCurrentType==3) str+=loc("This sugar lump was affected by the elders and grew to be meaty; harvesting it will yield between 0 and 2 lumps."); + else if (Game.lumpCurrentType==4) str+=loc("This sugar lump is caramelized, its stickiness binding it to unexpected things; harvesting it will yield between 1 and 3 lumps and will refill your sugar lump cooldowns."); + } + + str+='
'; + str+=loc("Your sugar lumps mature after %1,
ripen after %2,
and fall after %3.",[Game.sayTime((Game.lumpMatureAge/1000)*Game.fps,-1),Game.sayTime((Game.lumpRipeAge/1000)*Game.fps,-1),Game.sayTime((Game.lumpOverripeAge/1000)*Game.fps,-1)]); + + str+='
'+loc("• Sugar lumps can be harvested when mature, though if left alone beyond that point they will start ripening (increasing the chance of harvesting them) and will eventually fall and be auto-harvested after some time.
• Sugar lumps are delicious and may be used as currency for all sorts of things.
• Once a sugar lump is harvested, another one will start growing in its place.
• Note that sugar lumps keep growing when the game is closed.")+'
'; + return str; + } + Game.computeLumpTimes=function() + { + var hour=1000*60*60; + Game.lumpMatureAge=hour*20; + Game.lumpRipeAge=hour*23; + if (Game.Has('Stevia Caelestis')) Game.lumpRipeAge-=hour; + if (Game.Has('Diabetica Daemonicus')) Game.lumpMatureAge-=hour; + if (Game.Has('Ichor syrup')) Game.lumpMatureAge-=1000*60*7; + if (Game.Has('Sugar aging process')) Game.lumpRipeAge-=6000*Math.min(600,Game.Objects['Grandma'].amount);//capped at 600 grandmas + if (Game.hasGod && Game.BuildingsOwned%10==0) + { + var godLvl=Game.hasGod('order'); + if (godLvl==1) Game.lumpRipeAge-=hour; + else if (godLvl==2) Game.lumpRipeAge-=(hour/3)*2; + else if (godLvl==3) Game.lumpRipeAge-=(hour/3); + } + //if (Game.hasAura('Dragon\'s Curve')) {Game.lumpMatureAge/=1.05;Game.lumpRipeAge/=1.05;} + Game.lumpMatureAge/=1+Game.auraMult('Dragon\'s Curve')*0.05;Game.lumpRipeAge/=1+Game.auraMult('Dragon\'s Curve')*0.05; + Game.lumpOverripeAge=Game.lumpRipeAge+hour; + if (Game.Has('Glucose-charged air')) {Game.lumpMatureAge/=2000;Game.lumpRipeAge/=2000;Game.lumpOverripeAge/=2000;} + } + Game.loadLumps=function(time) + { + Game.computeLumpTimes(); + //Game.computeLumpType(); + if (!Game.canLumps()) Game.removeClass('lumpsOn'); + else + { + if (Game.ascensionMode!=1) Game.addClass('lumpsOn'); + Game.lumpT=Math.min(Date.now(),Game.lumpT); + var age=Math.max(Date.now()-Game.lumpT,0); + var amount=Math.floor(age/Game.lumpOverripeAge);//how many lumps did we harvest since we closed the game? + if (amount>=1) + { + Game.harvestLumps(1,true); + Game.lumpCurrentType=0;//all offline lumps after the first one have a normal type + if (amount>1) Game.harvestLumps(amount-1,true); + Game.Notify('',loc("You harvested %1 while you were away.",loc("%1 sugar lump",LBeautify(amount))),[29,14]); + Game.lumpT=Date.now()-(age-amount*Game.lumpOverripeAge); + Game.computeLumpType(); + } + } + } + Game.gainLumps=function(total) + { + if (Game.lumpsTotal==-1){Game.lumpsTotal=0;Game.lumps=0;} + Game.lumps+=total; + Game.lumpsTotal+=total; + + if (Game.lumpsTotal>=7) Game.Win('Dude, sweet'); + if (Game.lumpsTotal>=30) Game.Win('Sugar rush'); + if (Game.lumpsTotal>=365) Game.Win('Year\'s worth of cavities'); + } + Game.clickLump=function() + { + triggerAnim(l('lumpsIcon'),'pucker'); + triggerAnim(l('lumpsIcon2'),'pucker'); + if (!Game.canLumps()) return; + var age=Date.now()-Game.lumpT; + if (age+10% golden cookies for the next 24 hours."),[29,16]); + } + else if (Game.lumpCurrentType==3) total*=choose([0,0,1,2,2]); + else if (Game.lumpCurrentType==4) + { + total*=choose([1,2,3]); + Game.lumpRefill=0;//Date.now()-Game.getLumpRefillMax(); + Game.Notify(loc("Sugar lump cooldowns cleared!"),'',[29,27]); + } + total=Math.floor(total); + Game.gainLumps(total); + if (Game.lumpCurrentType==1) Game.Win('Sugar sugar'); + else if (Game.lumpCurrentType==2) Game.Win('All-natural cane sugar'); + else if (Game.lumpCurrentType==3) Game.Win('Sweetmeats'); + else if (Game.lumpCurrentType==4) Game.Win('Maillard reaction'); + + if (!silent) + { + var rect=l('lumpsIcon2').getBounds();Game.SparkleAt((rect.left+rect.right)/2,(rect.top+rect.bottom)/2-24+32-TopBarOffset); + if (total>0) Game.Popup('+'+loc("%1 sugar lump",LBeautify(total))+'',(rect.left+rect.right)/2,(rect.top+rect.bottom)/2-48); + else Game.Popup(''+loc("Botched harvest!")+'',(rect.left+rect.right)/2,(rect.top+rect.bottom)/2-48); + PlaySound('snd/pop'+Math.floor(Math.random()*3+1)+'.mp3',0.75); + } + Game.computeLumpTimes(); + } + Game.computeLumpType=function() + { + Math.seedrandom(Game.seed+'/'+Game.lumpT); + var types=[0]; + var loop=1; + //if (Game.hasAura('Dragon\'s Curve')) loop=2; + loop+=Game.auraMult('Dragon\'s Curve'); + loop=randomFloor(loop); + for (var i=0;i-1 || (Game.ascensionMode!=1 && (Game.cookiesEarned+Game.cookiesReset)>=1000000000)) return true; + return false; + } + + Game.getLumpRefillMax=function() + { + return Game.fps*60*15;//1000*60*15;//15 minutes + } + Game.getLumpRefillRemaining=function() + { + return Game.lumpRefill;//Game.getLumpRefillMax()-(Date.now()-Game.lumpRefill); + } + Game.canRefillLump=function() + { + return Game.lumpRefill<=0;//((Date.now()-Game.lumpRefill)>=Game.getLumpRefillMax()); + } + Game.refillLump=function(n,func) + { + if (Game.lumps>=n && Game.canRefillLump()) + { + Game.spendLump(n,'refill',function() + { + if (!Game.sesame) Game.lumpRefill=Game.getLumpRefillMax();//Date.now(); + func(); + })(); + } + } + Game.spendLump=function(n,str,func,free) + { + //ask if we want to spend N lumps (unless free) + return function() + { + if (!free && Game.lumps
'+loc("Do you want to spend %1 to %2?",[''+loc("%1 sugar lump",LBeautify(n))+'',str])+'
',[[loc("Yes"),'Game.lumps-='+n+';Game.promptConfirmFunc();Game.promptConfirmFunc=0;Game.recalculateGains=1;Game.ClosePrompt();'],loc("No")]); + return false; + } + else + { + if (!free) Game.lumps-=n; + func(); + Game.recalculateGains=1; + } + } + } + + Game.doLumps=function() + { + if (Game.lumpRefill>0) Game.lumpRefill--; + + if (!Game.canLumps()) {Game.removeClass('lumpsOn');return;} + if (Game.lumpsTotal==-1) + { + //first time ! + if (Game.ascensionMode!=1) Game.addClass('lumpsOn'); + Game.lumpT=Date.now(); + Game.lumpsTotal=0; + Game.lumps=0; + Game.computeLumpType(); + + Game.Notify(loc("Sugar lumps!"),loc("Because you've baked a billion cookies in total, you are now attracting sugar lumps. They coalesce quietly near the top of your screen, under the Stats button.
You will be able to harvest them when they're ripe, after which you may spend them on all sorts of things!"),[23,14]); + } + var age=Date.now()-Game.lumpT; + if (age>Game.lumpOverripeAge) + { + age=0; + Game.harvestLumps(1); + Game.computeLumpType(); + } + + var phase=Math.min(6,Math.floor((age/Game.lumpOverripeAge)*7)); + var phase2=Math.min(6,Math.floor((age/Game.lumpOverripeAge)*7)+1); + var row=14; + var row2=14; + var type=Game.lumpCurrentType; + if (type==1)//double + { + //if (phase>=6) row=15; + if (phase2>=6) row2=15; + } + else if (type==2)//golden + { + if (phase>=4) row=16; + if (phase2>=4) row2=16; + } + else if (type==3)//meaty + { + if (phase>=4) row=17; + if (phase2>=4) row2=17; + } + else if (type==4)//caramelized + { + if (phase>=4) row=27; + if (phase2>=4) row2=27; + } + var icon=[23+Math.min(phase,5),row]; + var icon2=[23+phase2,row2]; + if (age<0){icon=[17,5];icon2=[17,5];} + var opacity=Math.min(6,(age/Game.lumpOverripeAge)*7)%1; + if (phase>=6) {opacity=1;} + l('lumpsIcon').style.backgroundPosition=(-icon[0]*48)+'px '+(-icon[1]*48)+'px'; + l('lumpsIcon2').style.backgroundPosition=(-icon2[0]*48)+'px '+(-icon2[1]*48)+'px'; + l('lumpsIcon2').style.opacity=opacity; + l('lumpsAmount').textContent=Beautify(Game.lumps); + } + + /*===================================================================================== + COOKIE ECONOMICS + =======================================================================================*/ + Game.Earn=function(howmuch) + { + Game.cookies+=howmuch; + Game.cookiesEarned+=howmuch; + } + Game.Spend=function(howmuch) + { + Game.cookies-=howmuch; + } + Game.Dissolve=function(howmuch) + { + Game.cookies-=howmuch; + Game.cookiesEarned-=howmuch; + Game.cookies=Math.max(0,Game.cookies); + Game.cookiesEarned=Math.max(0,Game.cookiesEarned); + } + Game.mouseCps=function() + { + var add=0; + if (Game.Has('Thousand fingers')) add+= 0.1; + if (Game.Has('Million fingers')) add*= 5; + if (Game.Has('Billion fingers')) add*= 10; + if (Game.Has('Trillion fingers')) add*= 20; + if (Game.Has('Quadrillion fingers')) add*= 20; + if (Game.Has('Quintillion fingers')) add*= 20; + if (Game.Has('Sextillion fingers')) add*= 20; + if (Game.Has('Septillion fingers')) add*= 20; + if (Game.Has('Octillion fingers')) add*= 20; + if (Game.Has('Nonillion fingers')) add*= 20; + if (Game.Has('Decillion fingers')) add*= 20; + if (Game.Has('Undecillion fingers')) add*= 20; + if (Game.Has('Unshackled cursors')) add*= 25; + + var num=0; + for (var i in Game.Objects) {num+=Game.Objects[i].amount;} + num-=Game.Objects['Cursor'].amount; + add=add*num; + if (Game.Has('Plastic mouse')) add+=Game.cookiesPs*0.01; + if (Game.Has('Iron mouse')) add+=Game.cookiesPs*0.01; + if (Game.Has('Titanium mouse')) add+=Game.cookiesPs*0.01; + if (Game.Has('Adamantium mouse')) add+=Game.cookiesPs*0.01; + if (Game.Has('Unobtainium mouse')) add+=Game.cookiesPs*0.01; + if (Game.Has('Eludium mouse')) add+=Game.cookiesPs*0.01; + if (Game.Has('Wishalloy mouse')) add+=Game.cookiesPs*0.01; + if (Game.Has('Fantasteel mouse')) add+=Game.cookiesPs*0.01; + if (Game.Has('Nevercrack mouse')) add+=Game.cookiesPs*0.01; + if (Game.Has('Armythril mouse')) add+=Game.cookiesPs*0.01; + if (Game.Has('Technobsidian mouse')) add+=Game.cookiesPs*0.01; + if (Game.Has('Plasmarble mouse')) add+=Game.cookiesPs*0.01; + if (Game.Has('Miraculite mouse')) add+=Game.cookiesPs*0.01; + if (Game.Has('Aetherice mouse')) add+=Game.cookiesPs*0.01; + if (Game.Has('Omniplast mouse')) add+=Game.cookiesPs*0.01; + + if (Game.Has('Fortune #104')) add+=Game.cookiesPs*0.01; + var mult=1; + + + if (Game.Has('Santa\'s helpers')) mult*=1.1; + if (Game.Has('Cookie egg')) mult*=1.1; + if (Game.Has('Halo gloves')) mult*=1.1; + if (Game.Has('Dragon claw')) mult*=1.03; + + if (Game.Has('Aura gloves')) + { + mult*=1+0.05*Math.min(Game.Objects['Cursor'].level,Game.Has('Luminous gloves')?20:10); + } + + mult*=Game.eff('click'); + + if (Game.hasGod) + { + var godLvl=Game.hasGod('labor'); + if (godLvl==1) mult*=1.15; + else if (godLvl==2) mult*=1.1; + else if (godLvl==3) mult*=1.05; + } + + for (var i in Game.buffs) + { + if (typeof Game.buffs[i].multClick != 'undefined') mult*=Game.buffs[i].multClick; + } + + //if (Game.hasAura('Dragon Cursor')) mult*=1.05; + mult*=1+Game.auraMult('Dragon Cursor')*0.05; + + var out=mult*Game.ComputeCps(1,Game.Has('Reinforced index finger')+Game.Has('Carpal tunnel prevention cream')+Game.Has('Ambidextrous'),add); + + out=Game.runModHookOnValue('cookiesPerClick',out); + + if (Game.hasBuff('Cursed finger')) out=Game.buffs['Cursed finger'].power; + return out; + } + Game.computedMouseCps=1; + Game.globalCpsMult=1; + Game.unbuffedCps=0; + Game.buildingCps=0; + Game.lastClick=0; + Game.CanClick=1; + Game.autoclickerDetected=0; + Game.BigCookieState=0;//0 = normal, 1 = clicked (small), 2 = released/hovered (big) + Game.BigCookieSize=0; + Game.BigCookieSizeD=0; + Game.BigCookieSizeT=1; + Game.cookieClickSound=Math.floor(Math.random()*7)+1; + Game.playCookieClickSound=function() + { + if (Game.prefs.cookiesound) PlaySound('snd/clickb'+(Game.cookieClickSound)+'.mp3',0.5); + else PlaySound('snd/click'+(Game.cookieClickSound)+'.mp3',0.5); + Game.cookieClickSound+=Math.floor(Math.random()*4)+1; + if (Game.cookieClickSound>7) Game.cookieClickSound-=7; + } + Game.ClickCookie=function(e,amount) + { + var now=Date.now(); + if (e) e.preventDefault(); + if (Game.OnAscend || Game.AscendTimer>0 || Game.T<3 || now-Game.lastClick<1000/((e?e.detail:1)===0?3:50)) {} + else + { + if (now-Game.lastClick<(1000/15)) + { + Game.autoclickerDetected+=Game.fps; + if (Game.autoclickerDetected>=Game.fps*5) Game.Win('Uncanny clicker'); + } + Game.loseShimmeringVeil('click'); + var amount=amount?amount:Game.computedMouseCps; + Game.Earn(amount); + Game.handmadeCookies+=amount; + if (Game.prefs.particles) + { + Game.particleAdd(); + Game.particleAdd(Game.mouseX,Game.mouseY,Math.random()*4-2,Math.random()*-2-2,Math.random()*0.5+0.75,1,2); + } + if (Game.prefs.numbers) Game.particleAdd(Game.mouseX+Math.random()*8-4,Game.mouseY-8+Math.random()*8-4,0,-2,1,4,2,'','+'+Beautify(amount,1)); + + Game.runModHook('click'); + + Game.playCookieClickSound(); + Game.cookieClicks++; + + if (Game.clicksThisSession==0) PlayCue('preplay'); + Game.clicksThisSession++; + Game.lastClick=now; + } + Game.Click=0; + } + Game.mouseX=0; + Game.mouseY=0; + Game.mouseX2=0; + Game.mouseY2=0; + Game.mouseMoved=0; + Game.GetMouseCoords=function(e) + { + var posx=0; + var posy=0; + if (!e) var e=window.event; + if (e.pageX||e.pageY) + { + posx=e.pageX; + posy=e.pageY; + } + else if (e.clientX || e.clientY) + { + posx=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft; + posy=e.clientY+document.body.scrollTop+document.documentElement.scrollTop; + } + var x=0; + var y=TopBarOffset; + /* + var el=l('sectionLeft'); + while(el && !isNaN(el.offsetLeft) && !isNaN(el.offsetTop)) + { + x+=el.offsetLeft-el.scrollLeft; + y+=el.offsetTop-el.scrollTop; + el=el.offsetParent; + }*/ + Game.mouseX2=Game.mouseX; + Game.mouseY2=Game.mouseY; + Game.mouseX=(posx-x)/Game.scale; + Game.mouseY=(posy-y)/Game.scale; + Game.mouseMoved=1; + Game.lastActivity=Game.time; + } + var bigCookie=l('bigCookie'); + if (Game.prefs.screenreader) + { + bigCookie.ariaLabelledby='bigCookieLabel'; + bigCookie.insertAdjacentHTML('beforeend',''); + bigCookie.tabIndex=1; + } + Game.Click=0; + Game.lastClickedEl=0; + Game.clicksThisSession=0; + Game.clickFrom=0; + Game.Scroll=0; + Game.mouseDown=0; + if (!Game.touchEvents) + { + AddEvent(bigCookie,'click',Game.ClickCookie); + AddEvent(bigCookie,'mousedown',function(event){Game.BigCookieState=1;if (Game.prefs.cookiesound) {Game.playCookieClickSound();}if (event) event.preventDefault();}); + AddEvent(bigCookie,'mouseup',function(event){Game.BigCookieState=2;if (event) event.preventDefault();}); + AddEvent(bigCookie,'mouseout',function(event){Game.BigCookieState=0;}); + AddEvent(bigCookie,'mouseover',function(event){Game.BigCookieState=2;}); + AddEvent(document,'mousemove',Game.GetMouseCoords); + AddEvent(document,'mousedown',function(event){Game.lastActivity=Game.time;Game.mouseDown=1;Game.clickFrom=event.target;}); + AddEvent(document,'mouseup',function(event){Game.lastActivity=Game.time;Game.mouseDown=0;Game.clickFrom=0;}); + AddEvent(document,'click',function(event){Game.lastActivity=Game.time;Game.Click=1;Game.lastClickedEl=event.target;Game.clickFrom=0;}); + Game.handleScroll=function(e) + { + if (!e) e=event; + Game.Scroll=(e.detail<0||e.wheelDelta>0)?1:-1; + Game.lastActivity=Game.time; + }; + AddEvent(document,'DOMMouseScroll',Game.handleScroll); + AddEvent(document,'mousewheel',Game.handleScroll); + } + else + { + //touch events + AddEvent(bigCookie,'touchend',Game.ClickCookie); + AddEvent(bigCookie,'touchstart',function(event){Game.BigCookieState=1;if (event) event.preventDefault();}); + AddEvent(bigCookie,'touchend',function(event){Game.BigCookieState=0;if (event) event.preventDefault();}); + //AddEvent(document,'touchmove',Game.GetMouseCoords); + AddEvent(document,'mousemove',Game.GetMouseCoords); + AddEvent(document,'touchstart',function(event){Game.lastActivity=Game.time;Game.mouseDown=1;}); + AddEvent(document,'touchend',function(event){Game.lastActivity=Game.time;Game.mouseDown=0;}); + AddEvent(document,'touchend',function(event){Game.lastActivity=Game.time;Game.Click=1;}); + } + + Game.keys=[]; + AddEvent(window,'keyup',function(e){ + Game.lastActivity=Game.time; + if (e.keyCode==27) + { + if (Game.promptOn && !Game.promptNoClose) {Game.ClosePrompt();PlaySound('snd/tickOff.mp3');} + if (Game.AscendTimer>0) Game.AscendTimer=Game.AscendDuration; + }//esc closes prompt + if (Game.promptOn) + { + if (e.keyCode==13) Game.ConfirmPrompt();//enter confirms prompt + } + Game.keys[e.keyCode]=0; + }); + AddEvent(window,'keydown',function(e){ + if (Game.promptOn) + { + if (e.keyCode==9) + { + //tab to shift through prompt buttons + if (e.shiftKey) Game.FocusPromptOption(-1); + else Game.FocusPromptOption(1); + e.preventDefault(); + } + } + if (!Game.OnAscend && Game.AscendTimer==0) + { + if (e.ctrlKey && e.keyCode==83) {Game.toSave=true;e.preventDefault();}//ctrl-s saves the game + else if (e.ctrlKey && e.keyCode==79) {Game.ImportSave();e.preventDefault();}//ctrl-o opens the import menu + } + if ((e.keyCode==16 || e.keyCode==17) && Game.tooltip.dynamic) Game.tooltip.update(); + Game.keys[e.keyCode]=1; + if (e.keyCode==9) Game.keys=[];//reset keys on tab press + }); + + AddEvent(window,'visibilitychange',function(e){ + Game.keys=[];//reset all key pressed on visibility change (should help prevent ctrl still being down after ctrl-tab) + }); + + /*===================================================================================== + CPS RECALCULATOR + =======================================================================================*/ + + Game.heavenlyPower=1;//how many CpS percents a single heavenly chip gives + Game.recalculateGains=1; + Game.cookiesPsByType={}; + Game.cookiesMultByType={}; + //display bars with http://codepen.io/anon/pen/waGyEJ + Game.effs={}; + Game.eff=function(name,def){if (typeof Game.effs[name]==='undefined') return (typeof def==='undefined'?1:def); else return Game.effs[name];}; + + Game.CalculateGains=function() + { + Game.cookiesPs=0; + var mult=1; + //add up effect bonuses from building minigames + var effs={}; + for (var i in Game.Objects) + { + if (Game.Objects[i].minigameLoaded && Game.Objects[i].minigame.effs) + { + var myEffs=Game.Objects[i].minigame.effs; + for (var ii in myEffs) + { + if (effs[ii]) effs[ii]*=myEffs[ii]; + else effs[ii]=myEffs[ii]; + } + } + } + Game.effs=effs; + + if (Game.ascensionMode!=1) mult+=parseFloat(Game.prestige)*0.01*Game.heavenlyPower*Game.GetHeavenlyMultiplier(); + + mult*=Game.eff('cps'); + + if (Game.Has('Heralds') && Game.ascensionMode!=1) mult*=(1+0.01*Game.heralds); + + for (var i in Game.cookieUpgrades) + { + var me=Game.cookieUpgrades[i]; + if (Game.Has(me.name)) + { + mult*=(1+(typeof(me.power)==='function'?me.power(me):me.power)*0.01); + } + } + + if (Game.Has('Specialized chocolate chips')) mult*=1.01; + if (Game.Has('Designer cocoa beans')) mult*=1.02; + if (Game.Has('Underworld ovens')) mult*=1.03; + if (Game.Has('Exotic nuts')) mult*=1.04; + if (Game.Has('Arcane sugar')) mult*=1.05; + + if (Game.Has('Increased merriness')) mult*=1.15; + if (Game.Has('Improved jolliness')) mult*=1.15; + if (Game.Has('A lump of coal')) mult*=1.01; + if (Game.Has('An itchy sweater')) mult*=1.01; + if (Game.Has('Santa\'s dominion')) mult*=1.2; + + if (Game.Has('Fortune #100')) mult*=1.01; + if (Game.Has('Fortune #101')) mult*=1.07; + + if (Game.Has('Dragon scale')) mult*=1.03; + + var buildMult=1; + if (Game.hasGod) + { + var godLvl=Game.hasGod('asceticism'); + if (godLvl==1) mult*=1.15; + else if (godLvl==2) mult*=1.1; + else if (godLvl==3) mult*=1.05; + + var godLvl=Game.hasGod('ages'); + if (godLvl==1) mult*=1+0.15*Math.sin((Date.now()/1000/(60*60*3))*Math.PI*2); + else if (godLvl==2) mult*=1+0.15*Math.sin((Date.now()/1000/(60*60*12))*Math.PI*2); + else if (godLvl==3) mult*=1+0.15*Math.sin((Date.now()/1000/(60*60*24))*Math.PI*2); + + var godLvl=Game.hasGod('decadence'); + if (godLvl==1) buildMult*=0.93; + else if (godLvl==2) buildMult*=0.95; + else if (godLvl==3) buildMult*=0.98; + + var godLvl=Game.hasGod('industry'); + if (godLvl==1) buildMult*=1.1; + else if (godLvl==2) buildMult*=1.06; + else if (godLvl==3) buildMult*=1.03; + + var godLvl=Game.hasGod('labor'); + if (godLvl==1) buildMult*=0.97; + else if (godLvl==2) buildMult*=0.98; + else if (godLvl==3) buildMult*=0.99; + } + + if (Game.Has('Santa\'s legacy')) mult*=1+(Game.santaLevel+1)*0.03; + + + Game.milkProgress=Game.AchievementsOwned/25; + var milkMult=1; + if (Game.Has('Santa\'s milk and cookies')) milkMult*=1.05; + //if (Game.hasAura('Breath of Milk')) milkMult*=1.05; + milkMult*=1+Game.auraMult('Breath of Milk')*0.05; + if (Game.hasGod) + { + var godLvl=Game.hasGod('mother'); + if (godLvl==1) milkMult*=1.1; + else if (godLvl==2) milkMult*=1.05; + else if (godLvl==3) milkMult*=1.03; + } + milkMult*=Game.eff('milk'); + + var catMult=1; + + if (Game.Has('Kitten helpers')) catMult*=(1+Game.milkProgress*0.1*milkMult); + if (Game.Has('Kitten workers')) catMult*=(1+Game.milkProgress*0.125*milkMult); + if (Game.Has('Kitten engineers')) catMult*=(1+Game.milkProgress*0.15*milkMult); + if (Game.Has('Kitten overseers')) catMult*=(1+Game.milkProgress*0.175*milkMult); + if (Game.Has('Kitten managers')) catMult*=(1+Game.milkProgress*0.2*milkMult); + if (Game.Has('Kitten accountants')) catMult*=(1+Game.milkProgress*0.2*milkMult); + if (Game.Has('Kitten specialists')) catMult*=(1+Game.milkProgress*0.2*milkMult); + if (Game.Has('Kitten experts')) catMult*=(1+Game.milkProgress*0.2*milkMult); + if (Game.Has('Kitten consultants')) catMult*=(1+Game.milkProgress*0.2*milkMult); + if (Game.Has('Kitten assistants to the regional manager')) catMult*=(1+Game.milkProgress*0.175*milkMult); + if (Game.Has('Kitten marketeers')) catMult*=(1+Game.milkProgress*0.15*milkMult); + if (Game.Has('Kitten analysts')) catMult*=(1+Game.milkProgress*0.125*milkMult); + if (Game.Has('Kitten executives')) catMult*=(1+Game.milkProgress*0.115*milkMult); + if (Game.Has('Kitten admins')) catMult*=(1+Game.milkProgress*0.11*milkMult); + if (Game.Has('Kitten strategists')) catMult*=(1+Game.milkProgress*0.105*milkMult); + if (Game.Has('Kitten angels')) catMult*=(1+Game.milkProgress*0.1*milkMult); + if (Game.Has('Fortune #103')) catMult*=(1+Game.milkProgress*0.05*milkMult); + + Game.cookiesMultByType['kittens']=catMult; + + for (var i in Game.Objects) + { + var me=Game.Objects[i]; + me.storedCps=me.cps(me); + if (Game.ascensionMode!=1) me.storedCps*=(1+me.level*0.01)*buildMult; + if (me.id==1 && Game.Has('Milkhelp® lactose intolerance relief tablets')) me.storedCps*=1+0.05*Game.milkProgress*milkMult;//this used to be "me.storedCps*=1+0.1*Math.pow(catMult-1,0.5)" which was. hmm + me.storedTotalCps=me.amount*me.storedCps; + Game.cookiesPs+=me.storedTotalCps; + Game.cookiesPsByType[me.name]=me.storedTotalCps; + } + //cps from buildings only + Game.buildingCps=Game.cookiesPs; + + if (Game.Has('"egg"')) {Game.cookiesPs+=9;Game.cookiesPsByType['"egg"']=9;}//"egg" + + mult*=catMult; + + var eggMult=1; + if (Game.Has('Chicken egg')) eggMult*=1.01; + if (Game.Has('Duck egg')) eggMult*=1.01; + if (Game.Has('Turkey egg')) eggMult*=1.01; + if (Game.Has('Quail egg')) eggMult*=1.01; + if (Game.Has('Robin egg')) eggMult*=1.01; + if (Game.Has('Ostrich egg')) eggMult*=1.01; + if (Game.Has('Cassowary egg')) eggMult*=1.01; + if (Game.Has('Salmon roe')) eggMult*=1.01; + if (Game.Has('Frogspawn')) eggMult*=1.01; + if (Game.Has('Shark egg')) eggMult*=1.01; + if (Game.Has('Turtle egg')) eggMult*=1.01; + if (Game.Has('Ant larva')) eggMult*=1.01; + if (Game.Has('Century egg')) + { + //the boost increases a little every day, with diminishing returns up to +10% on the 100th day + var day=Math.floor((Date.now()-Game.startDate)/1000/10)*10/60/60/24; + day=Math.min(day,100); + eggMult*=1+(1-Math.pow(1-day/100,3))*0.1; + } + + Game.cookiesMultByType['eggs']=eggMult; + mult*=eggMult; + + if (Game.Has('Sugar baking')) mult*=(1+Math.min(100,Game.lumps)*0.01); + + //if (Game.hasAura('Radiant Appetite')) mult*=2; + mult*=1+Game.auraMult('Radiant Appetite'); + + var rawCookiesPs=Game.cookiesPs*mult; + for (var i in Game.CpsAchievements) + { + if (rawCookiesPs>=Game.CpsAchievements[i].threshold) Game.Win(Game.CpsAchievements[i].name); + } + Game.cookiesPsRaw=rawCookiesPs; + Game.cookiesPsRawHighest=Math.max(Game.cookiesPsRawHighest,rawCookiesPs); + + var n=Game.shimmerTypes['golden'].n; + var auraMult=Game.auraMult('Dragon\'s Fortune'); + for (var i=0;i=0;i--) + { + Game.shimmers[i].die(); + } + for (var i in Game.shimmerTypes) + { + var me=Game.shimmerTypes[i]; + if (me.reset) me.reset(); + me.n=0; + if (me.spawnsOnTimer) + { + me.time=0; + me.spawned=0; + me.minTime=me.getMinTime(me); + me.maxTime=me.getMaxTime(me); + } + } + } + + Game.shimmerTypes={ + //in these, "me" refers to the shimmer itself, and "this" to the shimmer's type object + 'golden':{ + reset:function() + { + this.chain=0; + this.totalFromChain=0; + this.last=''; + }, + initFunc:function(me) + { + if (!this.spawned && me.force!='cookie storm drop' && Game.chimeType!=0 && Game.ascensionMode!=1) Game.playGoldenCookieChime(); + + //set image + var bgPic=Game.resPath+'img/goldCookie.png'; + var picX=0;var picY=0; + + + if ((!me.forceObj || !me.forceObj.noWrath) && ((me.forceObj && me.forceObj.wrath) || (Game.elderWrath==1 && Math.random()<1/3) || (Game.elderWrath==2 && Math.random()<2/3) || (Game.elderWrath==3) || (Game.hasGod && Game.hasGod('scorn')))) + { + me.wrath=1; + if (Game.season=='halloween') bgPic=Game.resPath+'img/spookyCookie.png'; + else bgPic=Game.resPath+'img/wrathCookie.png'; + } + else + { + me.wrath=0; + } + + if (Game.season=='valentines') + { + bgPic=Game.resPath+'img/hearts.png'; + picX=Math.floor(Math.random()*8); + } + else if (Game.season=='fools') + { + bgPic=Game.resPath+'img/contract.png'; + if (me.wrath) bgPic=Game.resPath+'img/wrathContract.png'; + } + else if (Game.season=='easter') + { + bgPic=Game.resPath+'img/bunnies.png'; + picX=Math.floor(Math.random()*4); + picY=0; + if (me.wrath) picY=1; + } + + me.x=Math.floor(Math.random()*Math.max(0,(Game.bounds.right-300)-Game.bounds.left-128)+Game.bounds.left+64)-64; + me.y=Math.floor(Math.random()*Math.max(0,Game.bounds.bottom-Game.bounds.top-128)+Game.bounds.top+64)-64; + me.l.style.left=me.x+'px'; + me.l.style.top=me.y+'px'; + me.l.style.width='96px'; + me.l.style.height='96px'; + me.l.style.backgroundImage='url('+bgPic+')'; + me.l.style.backgroundPosition=(-picX*96)+'px '+(-picY*96)+'px'; + me.l.style.opacity='0'; + me.l.style.display='block'; + me.l.setAttribute('alt',loc(me.wrath?"Wrath cookie":"Golden cookie")); + + me.life=1;//the cookie's current progression through its lifespan (in frames) + me.dur=13;//duration; the cookie's lifespan in seconds before it despawns + + var dur=13; + if (Game.Has('Lucky day')) dur*=2; + if (Game.Has('Serendipity')) dur*=2; + if (Game.Has('Decisive fate')) dur*=1.05; + if (Game.Has('Lucky digit')) dur*=1.01; + if (Game.Has('Lucky number')) dur*=1.01; + if (Game.Has('Lucky payout')) dur*=1.01; + if (!me.wrath) dur*=Game.eff('goldenCookieDur'); + else dur*=Game.eff('wrathCookieDur'); + dur*=Math.pow(0.95,Game.shimmerTypes['golden'].n-1);//5% shorter for every other golden cookie on the screen + if (this.chain>0) dur=Math.max(2,10/this.chain);//this is hilarious + me.dur=dur; + me.life=Math.ceil(Game.fps*me.dur); + me.sizeMult=1; + }, + updateFunc:function(me) + { + var curve=1-Math.pow((me.life/(Game.fps*me.dur))*2-1,4); + me.l.style.opacity=curve; + //this line makes each golden cookie pulse in a unique way + if (Game.prefs.fancy) me.l.style.transform='rotate('+(Math.sin(me.id*0.69)*24+Math.sin(Game.T*(0.35+Math.sin(me.id*0.97)*0.15)+me.id/*+Math.sin(Game.T*0.07)*2+2*/)*(3+Math.sin(me.id*0.36)*2))+'deg) scale('+(me.sizeMult*(1+Math.sin(me.id*0.53)*0.2)*curve*(1+(0.06+Math.sin(me.id*0.41)*0.05)*(Math.sin(Game.T*(0.25+Math.sin(me.id*0.73)*0.15)+me.id))))+')'; + me.life--; + if (me.life<=0) {this.missFunc(me);me.die();} + }, + popFunc:function(me) + { + //get achievs and stats + if (me.spawnLead) + { + Game.goldenClicks++; + Game.goldenClicksLocal++; + + if (Game.goldenClicks>=1) Game.Win('Golden cookie'); + if (Game.goldenClicks>=7) Game.Win('Lucky cookie'); + if (Game.goldenClicks>=27) Game.Win('A stroke of luck'); + if (Game.goldenClicks>=77) Game.Win('Fortune'); + if (Game.goldenClicks>=777) Game.Win('Leprechaun'); + if (Game.goldenClicks>=7777) Game.Win('Black cat\'s paw'); + if (Game.goldenClicks>=27777) Game.Win('Seven horseshoes'); + + if (Game.goldenClicks>=7) Game.Unlock('Lucky day'); + if (Game.goldenClicks>=27) Game.Unlock('Serendipity'); + if (Game.goldenClicks>=77) Game.Unlock('Get lucky'); + + if ((me.life/Game.fps)>(me.dur-1)) Game.Win('Early bird'); + if (me.life0) list.push('clot','multiply cookies','ruin cookies'); + else list.push('frenzy','multiply cookies'); + if (me.wrath>0 && Game.hasGod && Game.hasGod('scorn')) list.push('clot','ruin cookies','clot','ruin cookies'); + if (me.wrath>0 && Math.random()<0.3) list.push('blood frenzy','chain cookie','cookie storm'); + else if (Math.random()<0.03 && Game.cookiesEarned>=100000) list.push('chain cookie','cookie storm'); + if (Math.random()<0.05 && Game.season=='fools') list.push('everything must go'); + if (Math.random()<0.1 && (Math.random()<0.05 || !Game.hasBuff('Dragonflight'))) list.push('click frenzy'); + if (me.wrath && Math.random()<0.1) list.push('cursed finger'); + + if (Game.BuildingsOwned>=10 && Math.random()<0.25) list.push('building special'); + + if (Game.canLumps() && Math.random()<0.0005) list.push('free sugar lump'); + + if ((me.wrath==0 && Math.random()<0.15) || Math.random()<0.05) + { + //if (Game.hasAura('Reaper of Fields')) list.push('dragon harvest'); + if (Math.random()0) choice='chain cookie'; + if (me.force!='') {this.chain=0;choice=me.force;me.force='';} + if (choice!='chain cookie') this.chain=0; + + this.last=choice; + + //create buff for effect + //buff duration multiplier + var effectDurMod=1; + if (Game.Has('Get lucky')) effectDurMod*=2; + if (Game.Has('Lasting fortune')) effectDurMod*=1.1; + if (Game.Has('Lucky digit')) effectDurMod*=1.01; + if (Game.Has('Lucky number')) effectDurMod*=1.01; + if (Game.Has('Green yeast digestives')) effectDurMod*=1.01; + if (Game.Has('Lucky payout')) effectDurMod*=1.01; + //if (Game.hasAura('Epoch Manipulator')) effectDurMod*=1.05; + effectDurMod*=1+Game.auraMult('Epoch Manipulator')*0.05; + if (!me.wrath) effectDurMod*=Game.eff('goldenCookieEffDur'); + else effectDurMod*=Game.eff('wrathCookieEffDur'); + + if (Game.hasGod) + { + var godLvl=Game.hasGod('decadence'); + if (godLvl==1) effectDurMod*=1.07; + else if (godLvl==2) effectDurMod*=1.05; + else if (godLvl==3) effectDurMod*=1.02; + } + + //effect multiplier (from lucky etc) + var mult=1; + //if (me.wrath>0 && Game.hasAura('Unholy Dominion')) mult*=1.1; + //else if (me.wrath==0 && Game.hasAura('Ancestral Metamorphosis')) mult*=1.1; + if (me.wrath>0) mult*=1+Game.auraMult('Unholy Dominion')*0.1; + else if (me.wrath==0) mult*=1+Game.auraMult('Ancestral Metamorphosis')*0.1; + if (Game.Has('Green yeast digestives')) mult*=1.01; + if (Game.Has('Dragon fang')) mult*=1.03; + if (!me.wrath) mult*=Game.eff('goldenCookieGain'); + else mult*=Game.eff('wrathCookieGain'); + + var popup=''; + var buff=0; + + if (choice=='building special') + { + var time=Math.ceil(30*effectDurMod); + var list=[]; + for (var i in Game.Objects) + { + if (Game.Objects[i].amount>=10) list.push(Game.Objects[i].id); + } + if (list.length==0) {choice='frenzy';}//default to frenzy if no proper building + else + { + var obj=choose(list); + var pow=Game.ObjectsById[obj].amount/10+1; + if (me.wrath && Math.random()<0.3) + { + buff=Game.gainBuff('building debuff',time,pow,obj); + } + else + { + buff=Game.gainBuff('building buff',time,pow,obj); + } + } + } + + if (choice=='free sugar lump') + { + Game.gainLumps(1); + popup=loc("Sweet!
Found 1 sugar lump!"); + } + else if (choice=='frenzy') + { + buff=Game.gainBuff('frenzy',Math.ceil(77*effectDurMod),7); + } + else if (choice=='dragon harvest') + { + buff=Game.gainBuff('dragon harvest',Math.ceil(60*effectDurMod),15); + } + else if (choice=='everything must go') + { + buff=Game.gainBuff('everything must go',Math.ceil(8*effectDurMod),5); + } + else if (choice=='multiply cookies') + { + var moni=mult*Math.min(Game.cookies*0.15,Game.cookiesPs*60*15)+13;//add 15% to cookies owned (+13), or 15 minutes of cookie production - whichever is lowest + Game.Earn(moni); + popup=loc("Lucky!")+'
'+loc("+%1!",loc("%1 cookie",LBeautify(moni)))+''; + } + else if (choice=='ruin cookies') + { + var moni=Math.min(Game.cookies*0.05,Game.cookiesPs*60*10)+13;//lose 5% of cookies owned (-13), or 10 minutes of cookie production - whichever is lowest + moni=Math.min(Game.cookies,moni); + Game.Spend(moni); + popup=loc("Ruin!")+'
'+loc("Lost %1!",loc("%1 cookie",LBeautify(moni)))+''; + } + else if (choice=='blood frenzy') + { + buff=Game.gainBuff('blood frenzy',Math.ceil(6*effectDurMod),666); + } + else if (choice=='clot') + { + buff=Game.gainBuff('clot',Math.ceil(66*effectDurMod),0.5); + } + else if (choice=='cursed finger') + { + buff=Game.gainBuff('cursed finger',Math.ceil(10*effectDurMod),Game.cookiesPs*Math.ceil(10*effectDurMod)); + } + else if (choice=='click frenzy') + { + buff=Game.gainBuff('click frenzy',Math.ceil(13*effectDurMod),777); + } + else if (choice=='dragonflight') + { + buff=Game.gainBuff('dragonflight',Math.ceil(10*effectDurMod),1111); + if (Math.random()<0.8) Game.killBuff('Click frenzy'); + } + else if (choice=='chain cookie') + { + //fix by Icehawk78 + if (this.chain==0) this.totalFromChain=0; + this.chain++; + var digit=me.wrath?6:7; + if (this.chain==1) this.chain+=Math.max(0,Math.ceil(Math.log(Game.cookies)/Math.LN10)-10); + + var maxPayout=Math.min(Game.cookiesPs*60*60*6,Game.cookies*0.5)*mult; + var moni=Math.max(digit,Math.min(Math.floor(1/9*Math.pow(10,this.chain)*digit*mult),maxPayout)); + var nextMoni=Math.max(digit,Math.min(Math.floor(1/9*Math.pow(10,this.chain+1)*digit*mult),maxPayout)); + this.totalFromChain+=moni; + + //break the chain if we're above 5 digits AND it's more than 50% of our bank, it grants more than 6 hours of our CpS, or just a 1% chance each digit (update : removed digit limit) + if (Math.random()<0.01 || nextMoni>=maxPayout) + { + this.chain=0; + popup=loc("Cookie chain")+'
'+loc("+%1!",loc("%1 cookie",LBeautify(moni)))+'
'+loc("Cookie chain over. You made %1.",loc("%1 cookie",LBeautify(this.totalFromChain)))+'
'; + } + else + { + popup=loc("Cookie chain")+'
'+loc("+%1!",loc("%1 cookie",LBeautify(moni)))+''; + } + Game.Earn(moni); + } + else if (choice=='cookie storm') + { + buff=Game.gainBuff('cookie storm',Math.ceil(7*effectDurMod),7); + } + else if (choice=='cookie storm drop') + { + var moni=Math.max(mult*(Game.cookiesPs*60*Math.floor(Math.random()*7+1)),Math.floor(Math.random()*7+1));//either 1-7 cookies or 1-7 minutes of cookie production, whichever is highest + Game.Earn(moni); + popup='
'+loc("+%1!",loc('%1 cookie',LBeautify(moni)))+'
'; + } + else if (choice=='blab')//sorry (it's really rare) + { + var str=EN?(choose([ + 'Cookie crumbliness x3 for 60 seconds!', + 'Chocolatiness x7 for 77 seconds!', + 'Dough elasticity halved for 66 seconds!', + 'Golden cookie shininess doubled for 3 seconds!', + 'World economy halved for 30 seconds!', + 'Grandma kisses 23% stingier for 45 seconds!', + 'Thanks for clicking!', + 'Fooled you! This one was just a test.', + 'Golden cookies clicked +1!', + 'Your click has been registered. Thank you for your cooperation.', + 'Thanks! That hit the spot!', + 'Thank you. A team has been dispatched.', + 'They know.', + 'Oops. This was just a chocolate cookie with shiny aluminium foil.', + 'Eschaton immanentized!', + 'Oh, that tickled!', + 'Again.', + 'You\'ve made a grave mistake.', + 'Chocolate chips reshuffled!', + 'Randomized chance card outcome!', + 'Mouse acceleration +0.03%!', + 'Ascension bonuses x5,000 for 0.1 seconds!', + 'Gained 1 extra!', + 'Sorry, better luck next time!', + 'I felt that.', + 'Nice try, but no.', + 'Wait, sorry, I wasn\'t ready yet.', + 'Yippee!', + 'Bones removed.', + 'Organs added.', + 'Did you just click that?', + 'Huh? Oh, there was nothing there.', + 'You saw nothing.', + 'It seems you hallucinated that golden cookie.', + 'This golden cookie was a complete fabrication.', + 'In theory there\'s no wrong way to click a golden cookie, but you just did that, somehow.', + 'All cookies multiplied by 999!
All cookies divided by 999!', + 'Why?' + ])):choose(loc("Cookie blab")); + popup=str; + } + + if (popup=='' && buff && buff.name && buff.desc) popup=buff.dname+'
'+buff.desc+'
'; + if (popup!='') Game.Popup(popup,me.x+me.l.offsetWidth/2,me.y); + + Game.DropEgg(0.9); + + //sparkle and kill the shimmer + Game.SparkleAt(me.x+48,me.y+48); + if (choice=='cookie storm drop') + { + if (Game.prefs.cookiesound) PlaySound('snd/clickb'+Math.floor(Math.random()*7+1)+'.mp3',0.75); + else PlaySound('snd/click'+Math.floor(Math.random()*7+1)+'.mp3',0.75); + } + else PlaySound('snd/shimmerClick.mp3'); + me.die(); + }, + missFunc:function(me) + { + if (this.chain>0 && this.totalFromChain>0) + { + Game.Popup(loc("Cookie chain broken.
You made %1.",loc("%1 cookie",LBeautify(this.totalFromChain))),me.x+me.l.offsetWidth/2,me.y); + this.chain=0;this.totalFromChain=0; + } + if (me.spawnLead) Game.missedGoldenClicks++; + }, + spawnsOnTimer:true, + spawnConditions:function() + { + if (!Game.Has('Golden switch [off]')) return true; else return false; + }, + spawned:0, + time:0, + minTime:0, + maxTime:0, + getTimeMod:function(me,m) + { + if (Game.Has('Lucky day')) m/=2; + if (Game.Has('Serendipity')) m/=2; + if (Game.Has('Golden goose egg')) m*=0.95; + if (Game.Has('Heavenly luck')) m*=0.95; + if (Game.Has('Green yeast digestives')) m*=0.99; + //if (Game.hasAura('Arcane Aura')) m*=0.95; + m*=1-Game.auraMult('Arcane Aura')*0.05; + if (Game.hasBuff('Sugar blessing')) m*=0.9; + if (Game.season=='easter' && Game.Has('Starspawn')) m*=0.98; + else if (Game.season=='halloween' && Game.Has('Starterror')) m*=0.98; + else if (Game.season=='valentines' && Game.Has('Starlove')) m*=0.98; + else if (Game.season=='fools' && Game.Has('Startrade')) m*=0.95; + if (!me.wrath) m*=1/Game.eff('goldenCookieFreq'); + else m*=1/Game.eff('wrathCookieFreq'); + if (Game.hasGod) + { + var godLvl=Game.hasGod('industry'); + if (godLvl==1) m*=1.1; + else if (godLvl==2) m*=1.06; + else if (godLvl==3) m*=1.03; + var godLvl=Game.hasGod('mother'); + if (godLvl==1) m*=1.15; + else if (godLvl==2) m*=1.1; + else if (godLvl==3) m*=1.05; + + if (Game.season!='') + { + var godLvl=Game.hasGod('seasons'); + if (Game.season!='fools') + { + if (godLvl==1) m*=0.97; + else if (godLvl==2) m*=0.98; + else if (godLvl==3) m*=0.99; + } + else + { + if (godLvl==1) m*=0.955; + else if (godLvl==2) m*=0.97; + else if (godLvl==3) m*=0.985; + } + } + } + if (this.chain>0) m=0.05; + if (Game.Has('Gold hoard')) m=0.01; + return Math.ceil(Game.fps*60*m); + }, + getMinTime:function(me) + { + var m=5; + return this.getTimeMod(me,m); + }, + getMaxTime:function(me) + { + var m=15; + return this.getTimeMod(me,m); + }, + last:'', + }, + 'reindeer':{ + reset:function() + { + }, + initFunc:function(me) + { + if (!this.spawned && Game.chimeType!=0 && Game.ascensionMode!=1) PlaySound('snd/jingle.mp3'); + + me.x=-128; + me.y=Math.floor(Math.random()*Math.max(0,Game.bounds.bottom-Game.bounds.top-256)+Game.bounds.top+128)-128; + //me.l.style.left=me.x+'px'; + //me.l.style.top=me.y+'px'; + me.l.style.width='167px'; + me.l.style.height='212px'; + me.l.style.backgroundImage='url('+Game.resPath+'img/frostedReindeer.png)'; + me.l.style.opacity='0'; + //me.l.style.transform='rotate('+(Math.random()*60-30)+'deg) scale('+(Math.random()*1+0.25)+')'; + me.l.style.display='block'; + me.l.setAttribute('alt',loc("Reindeer")); + + me.life=1;//the reindeer's current progression through its lifespan (in frames) + me.dur=4;//duration; the cookie's lifespan in seconds before it despawns + + var dur=4; + if (Game.Has('Weighted sleighs')) dur*=2; + dur*=Game.eff('reindeerDur'); + me.dur=dur; + me.life=Math.ceil(Game.fps*me.dur); + me.sizeMult=1; + }, + updateFunc:function(me) + { + var curve=1-Math.pow((me.life/(Game.fps*me.dur))*2-1,12); + me.l.style.opacity=curve; + me.l.style.transform='translate('+(me.x+(Game.bounds.right-Game.bounds.left)*(1-me.life/(Game.fps*me.dur)))+'px,'+(me.y-Math.abs(Math.sin(me.life*0.1))*128)+'px) rotate('+(Math.sin(me.life*0.2+0.3)*10)+'deg) scale('+(me.sizeMult*(1+Math.sin(me.id*0.53)*0.1))+')'; + me.life--; + if (me.life<=0) {this.missFunc(me);me.die();} + }, + popFunc:function(me) + { + //get achievs and stats + if (me.spawnLead) + { + Game.reindeerClicked++; + } + + var val=Game.cookiesPs*60; + if (Game.hasBuff('Elder frenzy')) val*=0.5;//very sorry + if (Game.hasBuff('Frenzy')) val*=0.75;//I sincerely apologize + var moni=Math.max(25,val);//1 minute of cookie production, or 25 cookies - whichever is highest + if (Game.Has('Ho ho ho-flavored frosting')) moni*=2; + moni*=Game.eff('reindeerGain'); + Game.Earn(moni); + if (Game.hasBuff('Elder frenzy')) Game.Win('Eldeer'); + + var cookie=''; + var failRate=0.8; + if (Game.HasAchiev('Let it snow')) failRate=0.6; + failRate*=1/Game.dropRateMult(); + if (Game.Has('Starsnow')) failRate*=0.95; + if (Game.hasGod) + { + var godLvl=Game.hasGod('seasons'); + if (godLvl==1) failRate*=0.9; + else if (godLvl==2) failRate*=0.95; + else if (godLvl==3) failRate*=0.97; + } + if (Math.random()>failRate)//christmas cookie drops + { + cookie=choose(['Christmas tree biscuits','Snowflake biscuits','Snowman biscuits','Holly biscuits','Candy cane biscuits','Bell biscuits','Present biscuits']); + if (!Game.HasUnlocked(cookie) && !Game.Has(cookie)) + { + Game.Unlock(cookie); + } + else cookie=''; + } + + var popup=''; + + Game.Notify(loc("You found %1!",choose(loc("Reindeer names"))),loc("The reindeer gives you %1.",loc("%1 cookie",LBeautify(moni)))+(cookie==''?'':'
'+loc("You are also rewarded with %1!",Game.Upgrades[cookie].dname)),[12,9],6); + popup='
'+loc("+%1!",loc("%1 cookie",LBeautify(moni)))+'
'; + + if (popup!='') Game.Popup(popup,Game.mouseX,Game.mouseY); + + //sparkle and kill the shimmer + Game.SparkleAt(Game.mouseX,Game.mouseY); + PlaySound('snd/jingleClick.mp3'); + me.die(); + }, + missFunc:function(me) + { + }, + spawnsOnTimer:true, + spawnConditions:function() + { + if (Game.season=='christmas') return true; else return false; + }, + spawned:0, + time:0, + minTime:0, + maxTime:0, + getTimeMod:function(me,m) + { + if (Game.Has('Reindeer baking grounds')) m/=2; + if (Game.Has('Starsnow')) m*=0.95; + if (Game.hasGod) + { + var godLvl=Game.hasGod('seasons'); + if (godLvl==1) m*=0.9; + else if (godLvl==2) m*=0.95; + else if (godLvl==3) m*=0.97; + } + m*=1/Game.eff('reindeerFreq'); + if (Game.Has('Reindeer season')) m=0.01; + return Math.ceil(Game.fps*60*m); + }, + getMinTime:function(me) + { + var m=3; + return this.getTimeMod(me,m); + }, + getMaxTime:function(me) + { + var m=6; + return this.getTimeMod(me,m); + }, + } + }; + + Game.goldenCookieChoices=[ + "Frenzy","frenzy", + "Lucky","multiply cookies", + "Ruin","ruin cookies", + "Elder frenzy","blood frenzy", + "Clot","clot", + "Click frenzy","click frenzy", + "Cursed finger","cursed finger", + "Cookie chain","chain cookie", + "Cookie storm","cookie storm", + "Building special","building special", + "Dragon Harvest","dragon harvest", + "Dragonflight","dragonflight", + "Sweet","free sugar lump", + "Blab","blab" + ]; + Game.goldenCookieBuildingBuffs={ + 'Cursor':['High-five','Slap to the face'], + 'Grandma':['Congregation','Senility'], + 'Farm':['Luxuriant harvest','Locusts'], + 'Mine':['Ore vein','Cave-in'], + 'Factory':['Oiled-up','Jammed machinery'], + 'Bank':['Juicy profits','Recession'], + 'Temple':['Fervent adoration','Crisis of faith'], + 'Wizard tower':['Manabloom','Magivores'], + 'Shipment':['Delicious lifeforms','Black holes'], + 'Alchemy lab':['Breakthrough','Lab disaster'], + 'Portal':['Righteous cataclysm','Dimensional calamity'], + 'Time machine':['Golden ages','Time jam'], + 'Antimatter condenser':['Extra cycles','Predictable tragedy'], + 'Prism':['Solar flare','Eclipse'], + 'Chancemaker':['Winning streak','Dry spell'], + 'Fractal engine':['Macrocosm','Microcosm'], + 'Javascript console':['Refactoring','Antipattern'], + 'Idleverse':['Cosmic nursery','Big crunch'], + 'Cortex baker':['Brainstorm','Brain freeze'], + 'You':['Deduplication','Clone strike'], + }; + + /*===================================================================================== + PARTICLES + =======================================================================================*/ + //generic particles (falling cookies etc) + //only displayed on left section + Game.particles=[]; + Game.particlesN=50; + for (var i=0;i=Game.fps*me.dur) + { + me.life=-1; + } + } + } + } + Game.particleAdd=function(x,y,xd,yd,size,dur,z,pic,text) + { + //Game.particleAdd(pos X,pos Y,speed X,speed Y,size (multiplier),duration (seconds),layer,picture,text); + //pick the first free (or the oldest) particle to replace it + if (true)//Game.prefs.particles) + { + var highest=0; + var highestI=0; + for (var i=0;ihighest) + { + highest=Game.particles[i].life; + highestI=i; + } + } + var auto=0; + if (x) auto=1; + var i=highestI; + var x=x||-64; + if (Game.LeftBackground && !auto) x=Math.floor(Math.random()*Game.LeftBackground.canvas.width); + var y=y||-64; + var me=Game.particles[i]; + me.life=0; + me.x=x; + me.y=y; + me.xd=xd||0; + me.yd=yd||0; + me.size=size||1; + me.z=z||0; + me.dur=dur||2; + me.r=Math.floor(Math.random()*360); + me.picId=Math.floor(Math.random()*10000); + if (!pic) + { + if (Game.season=='fools') pic='smallDollars.png'; + else + { + var cookies=[[10,0]]; + for (var i in Game.Upgrades) + { + var cookie=Game.Upgrades[i]; + if (cookie.bought>0 && cookie.pool=='cookie') cookies.push(cookie.icon); + } + me.picPos=choose(cookies); + if (Game.bakeryName.toLowerCase()=='ortiel' || Math.random()<1/10000) me.picPos=[17,5]; + pic='icons.png'; + } + } + else if (typeof pic!=='string'){me.picPos=pic;pic='icons.png';} + me.pic=pic||'smallCookies.png'; + me.text=text||0; + return me; + } + return {}; + } + Game.particlesDraw=function(z) + { + var ctx=Game.LeftBackground; + ctx.fillStyle='#fff'; + ctx.font='20px Merriweather'; + ctx.textAlign='center'; + + for (var i=0;i'; + } + l('particles').innerHTML=str; + Game.textParticlesUpdate=function() + { + for (var i in Game.textParticles) + { + var me=Game.textParticles[i]; + if (me.life!=-1) + { + me.life++; + if (me.life>=Game.fps*4) + { + var el=me.l; + me.life=-1; + el.style.opacity=0; + el.style.display='none'; + } + } + } + } + Game.textParticlesAdd=function(text,el,posX,posY) + { + //pick the first free (or the oldest) particle to replace it + var highest=0; + var highestI=0; + for (var i in Game.textParticles) + { + if (Game.textParticles[i].life==-1) {highestI=i;break;} + if (Game.textParticles[i].life>highest) + { + highest=Game.textParticles[i].life; + highestI=i; + } + } + var i=highestI; + var noStack=0; + if (typeof posX!=='undefined' && typeof posY!=='undefined') + { + x=posX; + y=posY; + noStack=1; + } + else + { + var x=(Math.random()-0.5)*40; + var y=0;//+(Math.random()-0.5)*40; + if (!el) + { + var rect=Game.bounds; + var x=Math.floor((rect.left+rect.right)/2); + var y=Math.floor((rect.bottom))-(Game.mobile*64); + x+=(Math.random()-0.5)*40; + y+=0;//(Math.random()-0.5)*40; + } + } + if (!noStack) y-=Game.textParticlesY; + + x=Math.max(Game.bounds.left+200,x); + x=Math.min(Game.bounds.right-200,x); + y=Math.max(Game.bounds.top+32+(App?32:0),y); + + var me=Game.textParticles[i]; + if (!me.l) me.l=l('particle'+i); + me.life=0; + me.x=x; + me.y=y; + me.text=text; + me.l.innerHTML=text; + me.l.style.left=Math.floor(Game.textParticles[i].x-200)+'px'; + me.l.style.bottom=Math.floor(-Game.textParticles[i].y)+'px'; + for (var ii in Game.textParticles) + {if (ii!=i) (Game.textParticles[ii].l||l('particle'+ii)).style.zIndex=100000000;} + me.l.style.zIndex=100000001; + me.l.style.display='block'; + me.l.className='particle title'; + void me.l.offsetWidth; + me.l.className='particle title risingUpLinger'; + if (!noStack) Game.textParticlesY+=60; + } + Game.popups=1; + Game.Popup=function(text,x,y) + { + if (Game.popups) Game.textParticlesAdd(text,0,x,y); + } + + //display sparkles at a set position + Game.sparkles=l('sparkles'); + Game.sparklesT=0; + Game.sparklesFrames=16; + Game.SparkleAt=function(x,y) + { + if (Game.blendModesOn) + { + Game.sparklesT=Game.sparklesFrames+1; + Game.sparkles.style.backgroundPosition='0px 0px'; + Game.sparkles.style.left=Math.floor(x-64)+'px'; + Game.sparkles.style.top=Math.floor(y-64)+'px'; + Game.sparkles.style.display='block'; + } + } + Game.SparkleOn=function(el) + { + var rect=el.getBounds(); + Game.SparkleAt((rect.left+rect.right)/2,(rect.top+rect.bottom)/2-24); + } + + /*===================================================================================== + NOTIFICATIONS + =======================================================================================*/ + //maybe do all this mess with proper DOM instead of rewriting the innerHTML + Game.Notes=[]; + Game.NotesById=[]; + Game.noteId=0; + Game.noteL=l('notes'); + Game.Note=function(title,desc,pic,quick) + { + this.title=title; + this.desc=desc||''; + this.pic=pic||''; + this.id=Game.noteId; + this.date=Date.now(); + this.quick=quick||0; + this.life=(this.quick||1)*Game.fps; + this.l=0; + this.height=0; + this.tooltip=0; + Game.noteId++; + Game.NotesById[this.id]=this; + Game.Notes.unshift(this); + if (Game.Notes.length>50) Game.Notes.pop(); + //Game.Notes.push(this); + //if (Game.Notes.length>50) Game.Notes.shift(); + Game.UpdateNotes(); + } + Game.CloseNote=function(id) + { + var me=Game.NotesById[id]; + if (Game.tooltip.from && Game.tooltip.from.id.indexOf('note-')==0) Game.tooltip.hide(); + Game.Notes.splice(Game.Notes.indexOf(me),1); + //Game.NotesById.splice(Game.NotesById.indexOf(me),1); + Game.NotesById[id]=null; + Game.UpdateNotes(); + } + Game.CloseNotes=function() + { + Game.Notes=[]; + Game.NotesById=[]; + Game.tooltip.hide(); + Game.UpdateNotes(); + } + Game.UpdateNotes=function() + { + var str=''; + var remaining=Game.Notes.length; + for (var i in Game.Notes) + { + if (i<5) + { + var me=Game.Notes[i]; + var pic=''; + if (me.pic!='') pic='
'; + str='
x
'+pic+'

'+me.title+'

'+(me.desc!=''?'
'+me.desc+'
':'')+'
'+str; + remaining--; + } + } + if (remaining>0) str='
'+loc("+%1 more notification.",LBeautify(remaining))+'
'+str; + if (Game.Notes.length>1) + { + str+='
x
'; + } + Game.noteL.innerHTML=str; + for (var i in Game.Notes) + { + me.l=0; + if (i<5) + { + var me=Game.Notes[i]; + me.l=l('note-'+me.id); + } + } + } + Game.NotesLogic=function() + { + for (var i in Game.Notes) + { + if (Game.Notes[i].quick>0) + { + var me=Game.Notes[i]; + me.life--; + if (me.life<=0) Game.CloseNote(me.id); + } + } + } + Game.NotesDraw=function() + { + for (var i in Game.Notes) + { + if (Game.Notes[i].quick>0) + { + var me=Game.Notes[i]; + if (me.l) + { + if (me.life<10) + { + me.l.style.opacity=(me.life/10); + } + } + } + } + } + Game.Notify=function(title,desc,pic,quick,noLog) + { + if (Game.prefs.notifs) + { + quick=Math.min(6,quick); + if (!quick) quick=6; + } + desc=replaceAll('==CLOSETHIS()==','Game.CloseNote('+Game.noteId+');',desc); + if (Game.popups) new Game.Note(title,desc,pic,quick); + if (!noLog) Game.AddToLog(''+title+' | '+desc); + } + Game.NotifyTooltip=function(content) + { + //attaches a tooltip to the last spawned note + if (!Game.NotesById[Game.noteId-1]) return false; + var me=Game.NotesById[Game.noteId-1]; + me.tooltip=content; + Game.UpdateNotes(); + } + + + /*===================================================================================== + PROMPT + =======================================================================================*/ + Game.darkenL=l('darken'); + AddEvent(Game.darkenL,'click',function(){if (Game.promptNoClose) {} else {Game.Click=0;PlaySound('snd/tickOff.mp3');Game.ClosePrompt();}}); + Game.promptL=l('promptContent'); + Game.promptAnchorL=l('promptAnchor'); + Game.promptWrapL=l('prompt'); + Game.promptConfirm=''; + Game.promptOn=0; + Game.promptUpdateFunc=0; + Game.promptOptionsN=0; + Game.promptOptionFocus=0; + Game.promptNoClose=false; + Game.UpdatePrompt=function() + { + if (Game.promptUpdateFunc) Game.promptUpdateFunc(); + Game.promptAnchorL.style.top=Math.floor((Game.windowH-Game.promptWrapL.offsetHeight)/2-16)+'px'; + } + Game.Prompt=function(content,options,updateFunc,style) + { + Game.promptNoClose=false; + if (updateFunc) Game.promptUpdateFunc=updateFunc; + if (style) Game.promptWrapL.className='framed '+style; else Game.promptWrapL.className='framed'; + var str=''; + str+=content; + if (str.indexOf('')); + str=str.substring(str.indexOf('>')+1); + str='
'+str+'
'; + } + if (str.indexOf('')!=-1) + { + str=str.replace('',''); + Game.promptNoClose=true; + } + var opts=''; + Game.promptOptionsN=0; + for (var i=0;i'+options[i][0]+''; + Game.promptOptionsN++; + } + } + Game.promptL.innerHTML=str+'
'+opts+'
'; + Game.promptAnchorL.style.display='block'; + Game.darkenL.style.display='block'; + Game.promptL.focus(); + Game.promptOn=1; + Game.promptOptionFocus=0; + Game.FocusPromptOption(0); + Game.UpdatePrompt(); + if (!Game.promptNoClose) l('promptClose').style.display='block'; else l('promptClose').style.display='none'; + } + Game.ClosePrompt=function() + { + if (!Game.promptOn) return false; + Game.promptAnchorL.style.display='none'; + Game.darkenL.style.display='none'; + Game.promptOn=0; + Game.promptUpdateFunc=0; + Game.promptOptionFocus=0; + Game.promptOptionsN=0; + Game.promptNoClose=false; + } + Game.ConfirmPrompt=function() + { + var el=l('promptOption'+Game.promptOptionFocus); + if (Game.promptOn && el && el.style.display!='none' && (' '+el.className+' ').indexOf(' disabled ')==-1) FireEvent(el,'click'); + } + Game.FocusPromptOption=function(dir,tryN) + { + var id=Game.promptOptionFocus+dir; + if (id<0) id=Game.promptOptionsN-1; + if (id>=Game.promptOptionsN) id=0; + while (id>=0 && id'+(Game.prefs[prefName]?on:off)+''; + } + Game.Toggle=function(prefName,button,on,off,invert) + { + if (Game.prefs[prefName]) + { + l(button).innerHTML=off; + Game.prefs[prefName]=0; + } + else + { + l(button).innerHTML=on; + Game.prefs[prefName]=1; + } + l(button).className='smallFancyButton prefButton option'+((Game.prefs[prefName]^invert)?'':' off'); + + } + Game.ToggleFancy=function() + { + if (Game.prefs.fancy) Game.removeClass('noFancy'); + else if (!Game.prefs.fancy) Game.addClass('noFancy'); + } + Game.ToggleFilters=function() + { + if (Game.prefs.filters) Game.removeClass('noFilters'); + else if (!Game.prefs.filters) Game.addClass('noFilters'); + } + Game.ToggleExtraButtons=function() + { + if (!Game.prefs.extraButtons) Game.removeClass('extraButtons'); + else if (Game.prefs.extraButtons) Game.addClass('extraButtons'); + for (var i in Game.Objects) + { + Game.Objects[i].mute(0); + } + } + Game.ToggleFullscreen=function() + { + if (App) App.setFullscreen(Game.prefs.fullscreen); + } + + Game.WriteSlider=function(slider,leftText,rightText,startValueFunction,callback) + { + if (!callback) callback=''; + return '
'+leftText+'
'+rightText.replace('[$]',startValueFunction())+'
'; + } + + Game.onPanel='Left'; + Game.addClass('focus'+Game.onPanel); + Game.ShowPanel=function(what) + { + if (!what) what=''; + if (Game.onPanel!=what) + { + Game.removeClass('focus'+Game.onPanel); + Game.addClass('focus'+what); + } + Game.onPanel=what; + } + + Game.onMenu=''; + Game.ShowMenu=function(what) + { + if (!what || what=='') what=Game.onMenu; + if (Game.onMenu=='' && what!='') Game.addClass('onMenu'); + else if (Game.onMenu!='' && what!=Game.onMenu) Game.addClass('onMenu'); + else if (what==Game.onMenu) {Game.removeClass('onMenu');what='';} + //if (what=='log') l('donateBox').className='on'; else l('donateBox').className=''; + Game.onMenu=what; + + l('prefsButton').className=(Game.onMenu=='prefs')?'panelButton selected':'panelButton'; + l('statsButton').className=(Game.onMenu=='stats')?'panelButton selected':'panelButton'; + l('logButton').className=(Game.onMenu=='log')?'panelButton selected':'panelButton'; + + if (Game.onMenu=='') PlaySound('snd/clickOff2.mp3'); + else PlaySound('snd/clickOn2.mp3'); + + Game.UpdateMenu(); + + if (what=='') + { + for (var i in Game.Objects) + { + var me=Game.Objects[i]; + if (me.minigame && me.minigame.onResize) me.minigame.onResize(); + } + } + } + Game.sayTime=function(time,detail) + { + //time is a value where one second is equal to Game.fps (30). + //detail skips days when >1, hours when >2, minutes when >3 and seconds when >4. + //if detail is -1, output something like "3 hours, 9 minutes, 48 seconds" + if (time<=0) return ''; + var str=''; + var detail=detail||0; + time=Math.floor(time); + if (detail==-1) + { + //var months=0; + var days=0; + var hours=0; + var minutes=0; + var seconds=0; + //if (time>=Game.fps*60*60*24*30) months=(Math.floor(time/(Game.fps*60*60*24*30))); + if (time>=Game.fps*60*60*24) days=(Math.floor(time/(Game.fps*60*60*24))); + if (time>=Game.fps*60*60) hours=(Math.floor(time/(Game.fps*60*60))); + if (time>=Game.fps*60) minutes=(Math.floor(time/(Game.fps*60))); + if (time>=Game.fps) seconds=(Math.floor(time/(Game.fps))); + //days-=months*30; + hours-=days*24; + minutes-=hours*60+days*24*60; + seconds-=minutes*60+hours*60*60+days*24*60*60; + if (days>10) {hours=0;} + if (days) {minutes=0;seconds=0;} + if (hours) {seconds=0;} + var bits=[]; + //if (months>0) bits.push(Beautify(months)+' month'+(days==1?'':'s')); + if (days>0) bits.push(loc("%1 day",LBeautify(days))); + if (hours>0) bits.push(loc("%1 hour",LBeautify(hours))); + if (minutes>0) bits.push(loc("%1 minute",LBeautify(minutes))); + if (seconds>0) bits.push(loc("%1 second",LBeautify(seconds))); + if (bits.length==0) str=loc("less than 1 second"); + else str=bits.join(', '); + /*//if (months>0) bits.push(Beautify(months)+' month'+(days==1?'':'s')); + if (days>0) bits.push(Beautify(days)+' day'+(days==1?'':'s')); + if (hours>0) bits.push(Beautify(hours)+' hour'+(hours==1?'':'s')); + if (minutes>0) bits.push(Beautify(minutes)+' minute'+(minutes==1?'':'s')); + if (seconds>0) bits.push(Beautify(seconds)+' second'+(seconds==1?'':'s')); + if (bits.length==0) str='less than 1 second'; + else str=bits.join(', ');*/ + } + else + { + /*if (time>=Game.fps*60*60*24*30*2 && detail<1) str=Beautify(Math.floor(time/(Game.fps*60*60*24*30)))+' months'; + else if (time>=Game.fps*60*60*24*30 && detail<1) str='1 month'; + else */if (time>=Game.fps*60*60*24 && detail<2) str=loc("%1 day",LBeautify(Math.floor(time/(Game.fps*60*60*24))));//Beautify(Math.floor(time/(Game.fps*60*60*24)))+' days'; + else if (time>=Game.fps*60*60 && detail<3) str=loc("%1 hour",LBeautify(Math.floor(time/(Game.fps*60*60))));//Beautify(Math.floor(time/(Game.fps*60*60)))+' hours'; + else if (time>=Game.fps*60 && detail<4) str=loc("%1 minute",LBeautify(Math.floor(time/(Game.fps*60))));//Beautify(Math.floor(time/(Game.fps*60)))+' minutes'; + else if (time>=Game.fps && detail<5) str=loc("%1 second",LBeautify(Math.floor(time/(Game.fps))));//Beautify(Math.floor(time/(Game.fps)))+' seconds'; + else str=loc("less than 1 second"); + } + return str; + } + + Game.tinyCookie=function() + { + if (!Game.HasAchiev('Tiny cookie')) + { + return '
'; + } + return ''; + } + Game.ClickTinyCookie=function(){if (!Game.HasAchiev('Tiny cookie')){PlaySound('snd/tick.mp3');Game.Win('Tiny cookie');}} + + Game.setVolume=function(what) + { + Game.volume=what; + /*for (var i in Sounds) + { + Sounds[i].volume=Game.volume; + }*/ + } + Game.setVolumeMusic=function(what) + { + Game.volumeMusic=what; + if (Music) Music.setVolume(what/100); + } + Game.setWubMusic=function(what) + { + if (Music) Music.setFilter(what/100); + } + + Game.showLangSelection=function(firstLaunch) + { + var str=''; + for (var i in Langs) + { + var lang=Langs[i]; + str+='
'+lang.name+'
'; + } + Game.Prompt(''+(firstLaunch?'':'')+'

'+loc("Change language")+'

'+ + '
'+ + (firstLaunch?'':'
('+loc("note: this will save and reload your game")+')
')+ + str, + (firstLaunch?0:[loc("Cancel")])); + + for (var i in Langs) + { + var lang=Langs[i]; + AddEvent(l('langSelect-'+i),'click',function(lang){return function(){ + if (true)//lang!=locId) + { + PlaySound('snd/tick.mp3'); + localStorageSet('CookieClickerLang',lang); + Game.toSave=true; + Game.toReload=true; + } + };}(i)); + AddEvent(l('langSelect-'+i),'mouseover',function(lang){return function(){ + PlaySound('snd/smallTick.mp3',0.75); + l('languageSelectHeader').innerHTML=Langs[lang].changeLanguage; + };}(i)); + } + } + + ON=' '+loc("ON"); + OFF=' '+loc("OFF"); + Game.UpdateMenu=function() + { + var str=''; + if (Game.onMenu!='') + { + str+=''; + //str+='
X
'; + } + if (Game.onMenu=='prefs') + { + str+='
'+loc("Options")+'
'; + + str+= + ''+ + '
'+loc("Language: %1",''+Langs[locId].name+'')+'
'+(!EN?'Change language
':'')+loc("Change language")+'
'+ + (App?'':'')+ + '
'+loc("Save")+'
'+ + '
'+loc("Export save")+''+loc("Import save")+'
'+ + (!App?('
'+loc("Save to file")+''+loc("Load from file")+'
'):'')+ + '
'+loc("Wipe save")+'
'+ + + ''+ + ''+ + '
'+ + '
'+ + + '
'+loc("Settings")+'
'+ + ((App && App.writeCloudUI)?App.writeCloudUI():'')+ + '
'+ + Game.WriteSlider('volumeSlider',loc("Volume"),'[$]%',function(){return Game.volume;},'Game.setVolume(Math.round(l(\'volumeSlider\').value));l(\'volumeSliderRightText\').innerHTML=Game.volume+\'%\';')+ + (App?Game.WriteSlider('volumeMusicSlider',loc("Volume (music)"),'[$]%',function(){return Game.volumeMusic;},'Game.setVolumeMusic(Math.round(l(\'volumeMusicSlider\').value));l(\'volumeMusicSliderRightText\').innerHTML=Game.volumeMusic+\'%\';'):'')+ + /*(App?Game.WriteSlider('wubMusicSlider',loc("Wub"),'[$]%',function(){return 100;},'Game.setWubMusic(Math.round(l(\'wubMusicSlider\').value));l(\'wubMusicSliderRightText\').innerHTML=(Math.round(l(\'wubMusicSlider\').value))+\'%\';'):'')+*/ + '
'+ + (App?Game.WritePrefButton('bgMusic','bgMusicButton',loc("Music in background")+ON,loc("Music in background")+OFF,'')+'
':'')+ + (App?Game.WritePrefButton('fullscreen','fullscreenButton',loc("Fullscreen")+ON,loc("Fullscreen")+OFF,'Game.ToggleFullscreen();')+'
':'')+ + Game.WritePrefButton('fancy','fancyButton',loc("Fancy graphics")+ON,loc("Fancy graphics")+OFF,'Game.ToggleFancy();')+'
'+ + Game.WritePrefButton('filters','filtersButton',loc("CSS filters")+ON,loc("CSS filters")+OFF,'Game.ToggleFilters();')+'
'+ + Game.WritePrefButton('particles','particlesButton',loc("Particles")+ON,loc("Particles")+OFF)+(EN?'':'')+'
'+ + Game.WritePrefButton('numbers','numbersButton',loc("Numbers")+ON,loc("Numbers")+OFF)+'
'+ + Game.WritePrefButton('milk','milkButton',loc("Milk [setting]")+ON,loc("Milk [setting]")+OFF)+(EN?'':'')+'
'+ + Game.WritePrefButton('cursors','cursorsButton',loc("Cursors [setting]")+ON,loc("Cursors [setting]")+OFF)+'
'+ + Game.WritePrefButton('wobbly','wobblyButton',loc("Wobbly cookie")+ON,loc("Wobbly cookie")+OFF)+(EN?'':'')+'
'+ + Game.WritePrefButton('cookiesound','cookiesoundButton',loc("Alt cookie sound")+ON,loc("Alt cookie sound")+OFF)+(EN?'':'')+'
'+ + Game.WritePrefButton('crates','cratesButton',loc("Icon crates")+ON,loc("Icon crates")+OFF)+'
'+ + Game.WritePrefButton('monospace','monospaceButton',loc("Alt font")+ON,loc("Alt font")+OFF)+'
'+ + Game.WritePrefButton('format','formatButton',loc("Short numbers")+OFF,loc("Short numbers")+ON,'BeautifyAll();Game.RefreshStore();Game.upgradesToRebuild=1;',1)+(EN?'':'')+'
'+ + Game.WritePrefButton('notifs','notifsButton',loc("Fast notes")+ON,loc("Fast notes")+OFF)+'
'+ + //Game.WritePrefButton('autoupdate','autoupdateButton','Offline mode OFF','Offline mode ON',0,1)+'
'+ + (!App?Game.WritePrefButton('warn','warnButton',loc("Closing warning")+ON,loc("Closing warning")+OFF)+'
':'')+ + //Game.WritePrefButton('focus','focusButton',loc("Defocus")+OFF,loc("Defocus")+ON,0,1)+'
'+ + Game.WritePrefButton('extraButtons','extraButtonsButton',loc("Extra buttons")+ON,loc("Extra buttons")+OFF,'Game.ToggleExtraButtons();')+'
'+ + Game.WritePrefButton('askLumps','askLumpsButton',loc("Lump confirmation")+ON,loc("Lump confirmation")+OFF)+'
'+ + (!App?Game.WritePrefButton('customGrandmas','customGrandmasButton',loc("Custom grandmas")+ON,loc("Custom grandmas")+OFF)+'
':'')+ + Game.WritePrefButton('notScary','notScaryButton',loc("Scary stuff")+OFF,loc("Scary stuff")+ON,0,1)+'
'+ + Game.WritePrefButton('timeout','timeoutButton',loc("Sleep mode timeout")+ON,loc("Sleep mode timeout")+OFF)+'
'+ + Game.WritePrefButton('screenreader','screenreaderButton',loc("Screen reader mode")+ON,loc("Screen reader mode")+OFF,'Game.toSave=true;Game.toReload=true;')+'
'+ + '
'+ + //'
'+Game.WritePrefButton('autosave','autosaveButton','Autosave ON','Autosave OFF')+'
'+ + (!App?'
'+loc("Check mod data")+'
':'')+ + + '
'+ + '
'+ + ''; + + if (App && App.writeModUI) + { + str+= + '
'+ + '
'+ + + '
'+loc("Mods")+'
'+ + App.writeModUI()+ + '
'+ + '
'; + } + + str+='
'; + } + else if (Game.onMenu=='log') + { + //str+=replaceAll('[bakeryName]',Game.bakeryName,Game.updateLog); + str+=Game.updateLog; + if (!Game.HasAchiev('Olden days')) str+='
'; + } + else if (Game.onMenu=='stats') + { + var buildingsOwned=0; + buildingsOwned=Game.BuildingsOwned; + var upgrades=''; + var cookieUpgrades=''; + var hiddenUpgrades=''; + var prestigeUpgrades=''; + var upgradesTotal=0; + var upgradesOwned=0; + var prestigeUpgradesTotal=0; + var prestigeUpgradesOwned=0; + + var list=[]; + //sort the upgrades + for (var i in Game.Upgrades){list.push(Game.Upgrades[i]);}//clone first + var sortMap=function(a,b) + { + if (a.order>b.order) return 1; + else if (a.orderb.order) return 1; + else if (a.order0) achievementsTotal++; + if (Game.CountsAsAchievementOwned(me.pool)) achievementsTotal++; + var pool=me.pool; + if (!achievements[pool]) achievements[pool]=''; + achievements[pool]+=Game.crate(me,'stats'); + + if (me.won) + { + if (Game.CountsAsAchievementOwned(me.pool)) achievementsOwned++; + else achievementsOwnedOther++; + } + } + + var achievementsStr=''; + var pools={ + 'dungeon':(EN?'Dungeon achievements (Not technically achievable yet.)':'???'), + 'shadow':''+loc("Shadow achievements")+' ('+loc("These are feats that are either unfair or difficult to attain. They do not give milk.")+')' + }; + for (var i in achievements) + { + if (achievements[i]!='') + { + if (pools[i]) achievementsStr+='
'+pools[i]+'
'; + achievementsStr+='
'+achievements[i]+'
'; + } + } + + var milkStr=''; + for (var i=0;i=i) + { + var milk=Game.Milks[i]; + milkStr+='

'+(loc("Rank %1",romanize(i+1))+' - '+milk.name)+'

('+(i==0?loc("starter milk"):loc("for %1 achievements",Beautify(i*25)))+')
' + ,'top')+' style="background:url('+Game.resPath+'img/icons.png?v='+Game.version+') '+(-milk.icon[0]*48)+'px '+(-milk.icon[1]*48)+'px;margin:2px 0px;" class="trophy">'; + } + } + milkStr+='
'; + + var santaStr=''; + var frames=15; + if (Game.Has('A festive hat')) + { + for (var i=0;i<=Game.santaLevel;i++) + { + santaStr+='

'+Game.santaLevels[i]+'

' + ,'top')+' style="background:url('+Game.resPath+'img/santa.png?v='+Game.version+') '+(-i*48)+'px 0px;background-size:'+(frames*48)+'px 48px;" class="trophy">'; + } + santaStr+='
'; + } + var dragonStr=''; + var frames=9; + var mainLevels=[0,4,8,Game.dragonLevels.length-3,Game.dragonLevels.length-2,Game.dragonLevels.length-1]; + if (Game.Has('A crumbly egg')) + { + for (var i=0;i<=mainLevels.length;i++) + { + if (Game.dragonLevel>=mainLevels[i]) + { + var level=Game.dragonLevels[mainLevels[i]]; + dragonStr+='
'+level.name+'
' + '

'+level.name+'

' + ,'top')+' style="background:url('+Game.resPath+'img/dragon.png?v='+Game.version+') '+(-level.pic*48)+'px 0px;background-size:'+(frames*48)+'px 48px;" class="trophy">'; + } + } + dragonStr+='
'; + } + var ascensionModeStr=''; + var icon=Game.ascensionModes[Game.ascensionMode].icon; + if (Game.resets>0) ascensionModeStr=''+Game.ascensionModes[Game.ascensionMode].desc+'' + ,'top')+'>
'+Game.ascensionModes[Game.ascensionMode].dname+'
'; + + var milkName=Game.Milk.name; + + var researchStr=Game.sayTime(Game.researchT,-1); + var pledgeStr=Game.sayTime(Game.pledgeT,-1); + var wrathStr=''; + if (Game.elderWrath==1) wrathStr=loc("awoken"); + else if (Game.elderWrath==2) wrathStr=loc("displeased"); + else if (Game.elderWrath==3) wrathStr=loc("angered"); + else if (Game.elderWrath==0 && Game.pledges>0) wrathStr=loc("appeased"); + + var dropMult=Game.dropRateMult(); + + var date=new Date(); + date.setTime(Date.now()-Game.startDate); + var timeInSeconds=date.getTime()/1000; + var startDate=Game.sayTime(timeInSeconds*Game.fps,-1); + date.setTime(Date.now()-Game.fullDate); + var fullDate=Game.sayTime(date.getTime()/1000*Game.fps,-1); + if (!Game.fullDate || !fullDate || fullDate.length<1) fullDate=loc("a long while"); + /*date.setTime(new Date().getTime()-Game.lastDate); + var lastDate=Game.sayTime(date.getTime()/1000*Game.fps,2);*/ + + var heavenlyMult=Game.GetHeavenlyMultiplier(); + + var seasonStr=Game.sayTime(Game.seasonT,-1); + + var giftStr=''; + if (Game.cookiesSent>0) giftStr+=''+loc("Cookies gifted:")+' '+Beautify(Game.cookiesSent); + if (Game.cookiesReceived>0) giftStr+=(Game.cookiesSent>0?' / ':'')+''+loc("Cookies received:")+' '+Beautify(Game.cookiesReceived); + + str+='
'+(EN?"Statistics":loc("Stats"))+'
'+ + '
'+ + '
'+loc("General")+ + '
'+ + '
'+ + '
'+loc("Cookies in bank:")+'
'+Game.tinyCookie()+Beautify(Game.cookies)+'
'+ + '
'+loc("Cookies baked (this ascension):")+'
'+Game.tinyCookie()+Beautify(Game.cookiesEarned)+'
'+ + '
'+loc("Cookies baked (all time):")+'
'+Game.tinyCookie()+Beautify(Game.cookiesEarned+Game.cookiesReset)+'
'+ + (Game.cookiesReset>0?'
'+loc("Cookies forfeited by ascending:")+'
'+Game.tinyCookie()+Beautify(Game.cookiesReset)+'
':'')+ + (Game.resets?('
'+loc("Legacy started:")+' '+(fullDate==''?loc("just now"):loc("%1 ago",fullDate))+', '+loc("with %1 ascension",LBeautify(Game.resets))+'
'):'')+ + '
'+loc("Run started:")+' '+(startDate==''?loc("just now"):loc("%1 ago",startDate))+'
'+ + '
'+loc("Buildings owned:")+' '+Beautify(buildingsOwned)+'
'+ + '
'+loc("Cookies per second:")+' '+Beautify(Game.cookiesPs,1)+' '+ + '('+loc("multiplier:")+' '+Beautify(Math.round(Game.globalCpsMult*100),1)+'%)'+ + (Game.cpsSucked>0?' ('+loc("withered:")+' '+Beautify(Math.round(Game.cpsSucked*100),1)+'%)':'')+ + '
'+ + '
'+loc("Raw cookies per second:")+' '+Beautify(Game.cookiesPsRaw,1)+' '+ + '('+loc("highest this ascension:")+' '+Beautify(Game.cookiesPsRawHighest,1)+')'+ + '
'+ + '
'+loc("Cookies per click:")+' '+Beautify(Game.computedMouseCps,1)+'
'+ + '
'+loc("Cookie clicks:")+' '+Beautify(Game.cookieClicks)+'
'+ + '
'+loc("Hand-made cookies:")+' '+Beautify(Game.handmadeCookies)+'
'+ + '
'+loc("Golden cookie clicks:")+' '+Beautify(Game.goldenClicksLocal)+' ('+loc("all time:")+' '+Beautify(Game.goldenClicks)+')
'+//'
'+ + (dropMult!=1?'
'+loc("Random drop multiplier:")+' x'+Beautify(dropMult,2)+'
':'')+ + (giftStr!=''?'
'+giftStr+'
':'')+ + '
'+ + '
'+loc("Running version:")+' '+Game.version+'
'+ + + ((researchStr!='' || wrathStr!='' || pledgeStr!='' || santaStr!='' || dragonStr!='' || Game.season!='' || ascensionModeStr!='' || Game.canLumps())?( + '
'+ + '
'+loc("Special")+'
'+ + '
'+ + (ascensionModeStr!=''?'
'+loc("Challenge mode:")+''+ascensionModeStr+'
':'')+ + (Game.season!=''?'
'+loc("Seasonal event:")+' '+Game.seasons[Game.season].name+ + (seasonStr!=''?' ('+loc("%1 remaining",seasonStr)+')':'')+ + '
':'')+ + (EN && Game.season=='fools'? + '
Money made from selling cookies : '+Beautify(Game.cookiesEarned*0.08,2)+' cookie dollars
'+ + (Game.Objects['Portal'].highest>0?'
TV show seasons produced : '+Beautify(Math.floor((timeInSeconds/60/60)*(Game.Objects['Portal'].highest*0.13)+1))+'
':'') + :'')+ + (researchStr!=''?'
'+loc("Research:")+' '+loc("%1 remaining",researchStr)+'
':'')+ + (wrathStr!=''?'
'+loc("Grandmatriarchs status:")+' '+wrathStr+'
':'')+ + (pledgeStr!=''?'
'+loc("Pledge:")+' '+loc("%1 remaining",pledgeStr)+'
':'')+ + (Game.wrinklersPopped>0?'
'+loc("Wrinklers popped:")+' '+Beautify(Game.wrinklersPopped)+'
':'')+ + ((Game.canLumps() && Game.lumpsTotal>-1)?'
'+loc("Sugar lumps harvested:")+'
'+Beautify(Game.lumpsTotal)+'
':'')+ + //(Game.cookiesSucked>0?'
Withered : '+Beautify(Game.cookiesSucked)+' cookies
':'')+ + (Game.reindeerClicked>0?'
'+loc("Reindeer found:")+' '+Beautify(Game.reindeerClicked)+'
':'')+ + (santaStr!=''?'
'+loc("Santa stages unlocked:")+'
'+santaStr+'
':'')+ + (dragonStr!=''?'
'+loc("Dragon training:")+'
'+dragonStr+'
':'')+ + '
' + ):'')+ + ((Game.prestige>0 || prestigeUpgrades!='')?( + '
'+ + '
'+loc("Prestige")+'
'+ + '
'+ + '
'+ + '
'+loc("Prestige level:")+' '+Beautify(Game.prestige)+' '+loc("at %1% of its potential (+%2% CpS)",[Beautify(heavenlyMult*100,1),Beautify(parseFloat(Game.prestige)*Game.heavenlyPower*heavenlyMult,1)])+'
'+loc("Heavenly chips:")+' '+Beautify(Game.heavenlyChips)+'
'+ + '
'+ + (prestigeUpgrades!=''?( + '
'+loc("Prestige upgrades unlocked:")+' '+prestigeUpgradesOwned+'/'+prestigeUpgradesTotal+' ('+Math.floor((prestigeUpgradesOwned/prestigeUpgradesTotal)*100)+'%)
'+ + '
'+prestigeUpgrades+'
'):'')+ + '
' + ):'')+ + + '
'+ + '
'+loc("Upgrades")+'
'+ + '
'+ + (hiddenUpgrades!=''?('
Debug
'+ + '
'+hiddenUpgrades+'
'):'')+ + '
'+loc("Upgrades unlocked:")+' '+upgradesOwned+'/'+upgradesTotal+' ('+Math.floor((upgradesOwned/upgradesTotal)*100)+'%)
'+ + '
'+upgrades+'
'+ + (cookieUpgrades!=''?('
'+loc("Cookies")+'
'+ + '
'+cookieUpgrades+'
'):'')+ + '
'+ + '
'+ + '
'+loc("Achievements")+'
'+ + '
'+ + '
'+loc("Achievements unlocked:")+' '+achievementsOwned+'/'+achievementsTotal+' ('+Math.floor((achievementsOwned/achievementsTotal)*100)+'%)'+(achievementsOwnedOther>0?(' (+'+achievementsOwnedOther+')'):'')+'
'+ + (Game.cookiesMultByType['kittens']>1?('
'+loc("Kitten multiplier:")+' '+Beautify((Game.cookiesMultByType['kittens'])*100)+'%
'):'')+ + '
'+loc("Milk")+': '+milkName+'
'+ + (milkStr!=''?'
'+loc("Milk flavors unlocked:")+'
'+milkStr+'
':'')+ + '
('+loc("Milk is gained with each achievement. It can unlock unique upgrades over time.")+')
'+ + achievementsStr+ + '
'+ + '
'+ + '
' + ; + } + //str='
'+str+'
'; + l('menu').innerHTML=str; + if (App) + { + var anchors=l('menu').getElementsByTagName('a'); + for (var i=0;i14) + { + var animals=['newts','penguins','scorpions','axolotls','puffins','porpoises','blowfish','horses','crayfish','slugs','humpback whales','nurse sharks','giant squids','polar bears','fruit bats','frogs','sea squirts','velvet worms','mole rats','paramecia','nematodes','tardigrades','giraffes','monkfish','wolfmen','goblins','hippies']; + + if (Math.random()<0.75 || Game.cookiesEarned<10000) + { + if (Game.Objects['Grandma'].amount>0) list.push(''+choose(loc("Ticker (grandma)"))+''+Game.Objects['Grandma'].single+''); + + if (!Game.prefs.notScary && Game.Objects['Grandma'].amount>=50) list.push(''+choose(loc("Ticker (threatening grandma)"))+''+Game.Objects['Grandma'].single+''); + + if (EN && Game.HasAchiev('Just wrong') && Math.random()<0.05) list.push(NEWS+'cookie manufacturer downsizes, sells own grandmother!'); + if (!Game.prefs.notScary && Game.HasAchiev('Just wrong') && Math.random()<0.4) list.push(''+choose(loc("Ticker (angry grandma)"))+''+Game.Objects['Grandma'].single+''); + + if (!Game.prefs.notScary && Game.Objects['Grandma'].amount>=1 && Game.pledges>0 && Game.elderWrath==0) list.push(''+choose(loc("Ticker (grandmas return)"))+''+Game.Objects['Grandma'].single+''); + + if (!EN) + { + for (var i in Game.Objects) + { + if (i!='Cursor' && i!='Grandma' && Game.Objects[i].amount>0) list.push(NEWS+choose(loc("Ticker ("+i+")"))); + } + + if (Game.cookiesEarned>=1000) + { + if (Game.season=='halloween') list.push(NEWS+choose(loc("Ticker (Halloween)"))); + if (Game.season=='christmas') list.push(NEWS+choose(loc("Ticker (Christmas)"))); + if (Game.season=='valentines') list.push(NEWS+choose(loc("Ticker (Valentines)"))); + if (Game.season=='easter') list.push(NEWS+choose(loc("Ticker (Easter)"))); + } + } + else + { + if (Game.Objects['Farm'].amount>0) list.push(choose([ + 'News : cookie farms suspected of employing undeclared elderly workforce!', + 'News : cookie farms release harmful chocolate in our rivers, says scientist!', + 'News : genetically-modified chocolate controversy strikes cookie farmers!', + 'News : free-range farm cookies popular with today\'s hip youth, says specialist.', + 'News : farm cookies deemed unfit for vegans, says nutritionist.' + ])); + + if (Game.Objects['Mine'].amount>0) list.push(choose([ + 'News : is our planet getting lighter? Experts examine the effects of intensive chocolate mining.', + 'News : '+Math.floor(Math.random()*1000+2)+' miners trapped in collapsed chocolate mine!', + 'News : chocolate mines found to cause earthquakes and sinkholes!', + 'News : chocolate mine goes awry, floods village in chocolate!', + 'News : depths of chocolate mines found to house "peculiar, chocolaty beings"!' + ])); + + if (Game.Objects['Factory'].amount>0) list.push(choose([ + 'News : cookie factories linked to global warming!', + 'News : cookie factories involved in chocolate weather controversy!', + 'News : cookie factories on strike, robotic minions employed to replace workforce!', + 'News : cookie factories on strike - workers demand to stop being paid in cookies!', + 'News : factory-made cookies linked to obesity, says study.' + ])); + + if (Game.Objects['Bank'].amount>0) list.push(choose([ + 'News : cookie loans on the rise as people can no longer afford them with regular money.', + 'News : cookies slowly creeping up their way as a competitor to traditional currency!', + 'News : most bakeries now fitted with ATMs to allow for easy cookie withdrawals and deposits.', + 'News : cookie economy now strong enough to allow for massive vaults doubling as swimming pools!', + 'News : "Tomorrow\'s wealthiest people will be calculated by their worth in cookies", predict economists.' + ])); + + if (Game.Objects['Temple'].amount>0) list.push(choose([ + 'News : explorers bring back ancient artifact from abandoned temple; archeologists marvel at the centuries-old '+choose(['magic','carved','engraved','sculpted','royal','imperial','mummified','ritual','golden','silver','stone','cursed','plastic','bone','blood','holy','sacred','sacrificial','electronic','singing','tapdancing'])+' '+choose(['spoon','fork','pizza','washing machine','calculator','hat','piano','napkin','skeleton','gown','dagger','sword','shield','skull','emerald','bathtub','mask','rollerskates','litterbox','bait box','cube','sphere','fungus'])+'!', + 'News : recently-discovered chocolate temples now sparking new cookie-related cult; thousands pray to Baker in the sky!', + 'News : just how extensive is the cookie pantheon? Theologians speculate about possible '+choose(['god','goddess'])+' of '+choose([choose(animals),choose(['kazoos','web design','web browsers','kittens','atheism','handbrakes','hats','aglets','elevator music','idle games','the letter "P"','memes','hamburgers','bad puns','kerning','stand-up comedy','failed burglary attempts','clickbait','one weird tricks'])])+'.', + 'News : theists of the world discover new cookie religion - "Oh boy, guess we were wrong all along!"', + 'News : cookie heaven allegedly "sports elevator instead of stairway"; cookie hell "paved with flagstone, as good intentions make for poor building material".' + ])); + + if (Game.Objects['Wizard tower'].amount>0) list.push(choose([ + 'News : all '+choose([choose(animals),choose(['public restrooms','clouds','politicians','moustaches','hats','shoes','pants','clowns','encyclopedias','websites','potted plants','lemons','household items','bodily fluids','cutlery','national landmarks','yogurt','rap music','underwear'])])+' turned into '+choose([choose(animals),choose(['public restrooms','clouds','politicians','moustaches','hats','shoes','pants','clowns','encyclopedias','websites','potted plants','lemons','household items','bodily fluids','cutlery','national landmarks','yogurt','rap music','underwear'])])+' in freak magic catastrophe!', + 'News : heavy dissent rages between the schools of '+choose(['water','fire','earth','air','lightning','acid','song','battle','peace','pencil','internet','space','time','brain','nature','techno','plant','bug','ice','poison','crab','kitten','dolphin','bird','punch','fart'])+' magic and '+choose(['water','fire','earth','air','lightning','acid','song','battle','peace','pencil','internet','space','time','brain','nature','techno','plant','bug','ice','poison','crab','kitten','dolphin','bird','punch','fart'])+' magic!', + 'News : get your new charms and curses at the yearly National Spellcrafting Fair! Exclusive prices on runes and spellbooks.', + 'News : cookie wizards deny involvement in shockingly ugly newborn - infant is "honestly grody-looking, but natural", say doctors.', + 'News : "Any sufficiently crude magic is indistinguishable from technology", claims renowned technowizard.' + ])); + + if (Game.Objects['Shipment'].amount>0) list.push(choose([ + 'News : new chocolate planet found, becomes target of cookie-trading spaceships!', + 'News : massive chocolate planet found with 99.8% certified pure dark chocolate core!', + 'News : space tourism booming as distant planets attract more bored millionaires!', + 'News : chocolate-based organisms found on distant planet!', + 'News : ancient baking artifacts found on distant planet; "terrifying implications", experts say.' + ])); + + if (Game.Objects['Alchemy lab'].amount>0) list.push(choose([ + 'News : national gold reserves dwindle as more and more of the precious mineral is turned to cookies!', + 'News : chocolate jewelry found fashionable, gold and diamonds "just a fad", says specialist.', + 'News : silver found to also be transmutable into white chocolate!', + 'News : defective alchemy lab shut down, found to convert cookies to useless gold.', + 'News : alchemy-made cookies shunned by purists!' + ])); + + if (Game.Objects['Portal'].amount>0) list.push(choose([ + 'News : nation worried as more and more unsettling creatures emerge from dimensional portals!', + 'News : dimensional portals involved in city-engulfing disaster!', + 'News : tourism to cookieverse popular with bored teenagers! Casualty rate as high as 73%!', + 'News : cookieverse portals suspected to cause fast aging and obsession with baking, says study.', + 'News : "do not settle near portals," says specialist; "your children will become strange and corrupted inside."' + ])); + + if (Game.Objects['Time machine'].amount>0) list.push(choose([ + 'News : time machines involved in history-rewriting scandal! Or are they?', + 'News : time machines used in unlawful time tourism!', + 'News : cookies brought back from the past "unfit for human consumption", says historian.', + 'News : various historical figures inexplicably replaced with talking lumps of dough!', + 'News : "I have seen the future," says time machine operator, "and I do not wish to go there again."' + ])); + + if (Game.Objects['Antimatter condenser'].amount>0) list.push(choose([ + 'News : whole town seemingly swallowed by antimatter-induced black hole; more reliable sources affirm town "never really existed"!', + 'News : "explain to me again why we need particle accelerators to bake cookies?" asks misguided local woman.', + 'News : first antimatter condenser successfully turned on, doesn\'t rip apart reality!', + 'News : researchers conclude that what the cookie industry needs, first and foremost, is "more magnets".', + 'News : "unravelling the fabric of reality just makes these cookies so much tastier", claims scientist.' + ])); + + if (Game.Objects['Prism'].amount>0) list.push(choose([ + 'News : new cookie-producing prisms linked to outbreak of rainbow-related viral videos.', + 'News : scientists warn against systematically turning light into matter - "One day, we\'ll end up with all matter and no light!"', + 'News : cookies now being baked at the literal speed of light thanks to new prismatic contraptions.', + 'News : "Can\'t you sense the prism watching us?", rambles insane local man. "No idea what he\'s talking about", shrugs cookie magnate/government official.', + 'News : world citizens advised "not to worry" about frequent atmospheric flashes.', + ])); + + if (Game.Objects['Chancemaker'].amount>0) list.push(choose([ + 'News : strange statistical anomalies continue as weather forecast proves accurate an unprecedented 3 days in a row!', + 'News : local casino ruined as all gamblers somehow hit a week-long winning streak! "We might still be okay", says owner before being hit by lightning 47 times.', + 'News : neighboring nation somehow elects president with sensible policies in freak accident of random chance!', + 'News : million-to-one event sees gritty movie reboot turning out better than the original! "We have no idea how this happened", say movie execs.', + 'News : all scratching tickets printed as winners, prompting national economy to crash and, against all odds, recover overnight.', + ])); + + if (Game.Objects['Fractal engine'].amount>0) list.push(choose([ + 'News : local man "done with Cookie Clicker", finds the constant self-references "grating and on-the-nose".', + 'News : local man sails around the world to find himself - right where he left it.', + 'News : local guru claims "there\'s a little bit of ourselves in everyone", under investigation for alleged cannibalism.', + 'News : news writer finds herself daydreaming about new career. Or at least a raise.', + 'News : polls find idea of cookies made of cookies "acceptable" - "at least we finally know what\'s in them", says interviewed citizen.', + ])); + + if (Game.Objects['Javascript console'].amount>0) list.push(choose([ + 'News : strange fad has parents giving their newborns names such as Emma.js or Liam.js. At least one Baby.js reported.', + 'News : coding is hip! More and more teenagers turn to technical fields like programming, ensuring a future robot apocalypse and the doom of all mankind.', + 'News : developers unsure what to call their new javascript libraries as all combinations of any 3 dictionary words have already been taken.', + 'News : nation holds breath as nested ifs about to hatch.', + 'News : clueless copywriter forgets to escape a quote, ends news line prematurely; last words reported to be "Huh, why isn', + ])); + + if (Game.Objects['Idleverse'].amount>0) list.push(choose([ + 'News : is another you living out their dreams in an alternate universe? Probably, you lazy bum!', + 'News : public recoils at the notion of a cosmos made of infinite idle games. "I kinda hoped there\'d be more to it", says distraught citizen.', + 'News : with an infinity of parallel universes, people turn to reassuring alternate dimensions, which only number "in the high 50s".', + 'News : "I find solace in the knowledge that at least some of my alternate selves are probably doing fine out there", says citizen\'s last remaining exemplar in the multiverse.', + 'News : comic book writers point to actual multiverse in defense of dubious plot points. "See? I told you it wasn\'t \'hackneyed and contrived\'!"' + ])); + + if (Game.Objects['Cortex baker'].amount>0) list.push(choose([ + 'News : cortex baker wranglers kindly remind employees that cortex bakers are the bakery\'s material property and should not be endeared with nicknames.', + 'News : space-faring employees advised to ignore unusual thoughts and urges experienced within 2 parsecs of gigantic cortex bakers, say guidelines.', + 'News : astronomers warn of cortex baker trajectory drift, fear future head-on collisions resulting in costly concussions.', + 'News : runt cortex baker identified with an IQ of only quintuple digits: "just a bit of a dummy", say specialists.', + 'News : are you smarter than a cortex baker? New game show deemed "unfair" by contestants.' + ])); + + if (Game.Objects['You'].amount>0) list.push(choose([ + 'News : the person of the year is, this year again, '+Game.bakeryName+'! How unexpected!', + 'News : criminals caught sharing pirated copies of '+Game.bakeryName+'\'s genome may be exposed to fines and up to 17 billion years prison, reminds constable.', + 'News : could local restaurants be serving you bootleg '+Game.bakeryName+' clone meat? Our delicious investigation follows after tonight\'s news.', + 'News : beloved cookie magnate '+Game.bakeryName+', erroneously reported as trampled to death by crazed fans, thankfully found to be escaped clone mistaken for original.', + 'News : "Really, we\'re just looking for some basic societal acceptance and compassion", mumbles incoherent genetic freak '+Game.bakeryName+'-Clone #59014.' + ])); + + if (Game.season=='halloween' && Game.cookiesEarned>=1000) list.push(choose([ + 'News : strange twisting creatures amass around cookie factories, nibble at assembly lines.', + 'News : ominous wrinkly monsters take massive bites out of cookie production; "this can\'t be hygienic", worries worker.', + 'News : pagan rituals on the rise as children around the world dress up in strange costumes and blackmail homeowners for candy.', + 'News : new-age terrorism strikes suburbs as houses find themselves covered in eggs and toilet paper.', + 'News : children around the world "lost and confused" as any and all Halloween treats have been replaced by cookies.' + ])); + + if (Game.season=='christmas' && Game.cookiesEarned>=1000) list.push(choose([ + 'News : bearded maniac spotted speeding on flying sleigh! Investigation pending.', + 'News : Santa Claus announces new brand of breakfast treats to compete with cookie-flavored cereals! "They\'re ho-ho-horrible!" says Santa.', + 'News : "You mean he just gives stuff away for free?!", concerned moms ask. "Personally, I don\'t trust his beard."', + 'News : obese jolly lunatic still on the loose, warn officials. "Keep your kids safe and board up your chimneys. We mean it."', + 'News : children shocked as they discover Santa Claus isn\'t just their dad in a costume after all!
"I\'m reassessing my life right now", confides Laura, aged 6.', + 'News : mysterious festive entity with quantum powers still wrecking havoc with army of reindeer, officials say.', + 'News : elves on strike at toy factory! "We will not be accepting reindeer chow as payment anymore. And stop calling us elves!"', + 'News : elves protest around the nation; wee little folks in silly little outfits spread mayhem, destruction; rabid reindeer running rampant through streets.', + 'News : scholars debate regarding the plural of reindeer(s) in the midst of elven world war.', + 'News : elves "unrelated to gnomes despite small stature and merry disposition", find scientists.', + 'News : elves sabotage radioactive frosting factory, turn hundreds blind in vicinity - "Who in their right mind would do such a thing?" laments outraged mayor.', + 'News : drama unfolds at North Pole as rumors crop up around Rudolph\'s red nose; "I may have an addiction or two", admits reindeer.' + ])); + + if (Game.season=='valentines' && Game.cookiesEarned>=1000) list.push(choose([ + 'News : organ-shaped confectioneries being traded in schools all over the world; gruesome practice undergoing investigation.', + 'News : heart-shaped candies overtaking sweets business, offering competition to cookie empire. "It\'s the economy, cupid!"', + 'News : love\'s in the air, according to weather specialists. Face masks now offered in every city to stunt airborne infection.', + 'News : marrying a cookie - deranged practice, or glimpse of the future?', + 'News : boyfriend dumped after offering his lover cookies for Valentine\'s Day, reports say. "They were off-brand", shrugs ex-girlfriend.' + ])); + + if (Game.season=='easter' && Game.cookiesEarned>=1000) list.push(choose([ + 'News : long-eared critters with fuzzy tails invade suburbs, spread terror and chocolate!', + 'News : eggs have begun to materialize in the most unexpected places; "no place is safe", warn experts.', + 'News : packs of rampaging rabbits cause billions in property damage; new strain of myxomatosis being developed.', + 'News : egg-laying rabbits "not quite from this dimension", warns biologist; advises against petting, feeding, or cooking the creatures.', + 'News : mysterious rabbits found to be egg-layers, but mammalian, hinting at possible platypus ancestry.' + ])); + } + } + if (!EN) + { + if (Game.cookiesEarned>=10000) + { + list.push(NEWS+choose(loc("Ticker (misc)"))); + list.push(NEWS+choose(loc("Ticker (misc)"))); + list.push(NEWS+choose(loc("Ticker (misc)"))); + } + } + else + { + if (Math.random()<0.05) + { + if (Game.HasAchiev('Base 10')) list.push('News : cookie manufacturer completely forgoes common sense, lets strange obsession with round numbers drive building decisions!'); + if (Game.HasAchiev('From scratch')) list.push('News : follow the tear-jerking, riches-to-rags story about a local cookie manufacturer who decided to give it all up!'); + if (Game.HasAchiev('A world filled with cookies')) list.push('News : known universe now jammed with cookies! No vacancies!'); + if (Game.HasAchiev('Last Chance to See')) list.push('News : incredibly rare albino wrinkler on the brink of extinction poached by cookie-crazed pastry magnate!'); + if (Game.Has('Serendipity')) list.push('News : local cookie manufacturer becomes luckiest being alive!'); + if (Game.Has('Season switcher')) list.push('News : seasons are all out of whack! "We need to get some whack back into them seasons", says local resident.'); + + if (Game.Has('Kitten helpers')) list.push('News : faint meowing heard around local cookie facilities; suggests new ingredient being tested.'); + if (Game.Has('Kitten workers')) list.push('News : crowds of meowing kittens with little hard hats reported near local cookie facilities.'); + if (Game.Has('Kitten engineers')) list.push('News : surroundings of local cookie facilities now overrun with kittens in adorable little suits. Authorities advise to stay away from the premises.'); + if (Game.Has('Kitten overseers')) list.push('News : locals report troupe of bossy kittens meowing adorable orders at passersby.'); + if (Game.Has('Kitten managers')) list.push('News : local office cubicles invaded with armies of stern-looking kittens asking employees "what\'s happening, meow".'); + if (Game.Has('Kitten accountants')) list.push('News : tiny felines show sudden and amazing proficiency with fuzzy mathematics and pawlinomials, baffling scientists and pet store owners.'); + if (Game.Has('Kitten specialists')) list.push('News : new kitten college opening next week, offers courses on cookie-making and catnip studies.'); + if (Game.Has('Kitten experts')) list.push('News : unemployment rates soaring as woefully adorable little cats nab jobs on all levels of expertise, says study.'); + if (Game.Has('Kitten consultants')) list.push('News : "In the future, your job will most likely be done by a cat", predicts suspiciously furry futurologist.'); + if (Game.Has('Kitten assistants to the regional manager')) list.push('News : strange kittens with peculiar opinions on martial arts spotted loitering on local beet farms!'); + if (Game.Has('Kitten marketeers')) list.push('News : nonsensical kitten billboards crop up all over countryside, trying to sell people the cookies they already get for free!'); + if (Game.Has('Kitten analysts')) list.push('News : are your spending habits sensible? For a hefty fee, these kitten analysts will tell you!'); + if (Game.Has('Kitten executives')) list.push('News : kittens strutting around in hot little business suits shouting cut-throat orders at their assistants, possibly the cutest thing this reporter has ever seen!'); + if (Game.Has('Kitten admins')) list.push('News : all systems nominal, claim kitten admins obviously in way over their heads.'); + if (Game.Has('Kitten strategists')) list.push('News : overpaid kittens scratching their fuzzy little heads trying to find new ways to get cookies in your shopping cart!'); + if (Game.Has('Kitten angels')) list.push('News : "Try to ignore any ghostly felines that may be purring inside your ears," warn scientists. "They\'ll just lure you into making poor life choices."'); + if (Game.Has('Kitten wages')) list.push('News : kittens break glass ceiling! Do they have any idea how expensive those are!'); + if (Game.HasAchiev('Jellicles')) list.push('News : local kittens involved in misguided musical production, leave audience perturbed and unnerved.'); + } + + if (Game.HasAchiev('Dude, sweet') && Math.random()<0.2) list.push(choose([ + 'News : major sugar-smuggling ring dismantled by authorities; '+Math.floor(Math.random()*30+3)+' tons of sugar lumps seized, '+Math.floor(Math.random()*48+2)+' suspects apprehended.', + 'News : authorities warn tourists not to buy bootleg sugar lumps from street peddlers - "You think you\'re getting a sweet deal, but what you\'re being sold is really just ordinary cocaine", says agent.', + 'News : pro-diabetes movement protests against sugar-shaming. "I\'ve eaten nothing but sugar lumps for the past '+Math.floor(Math.random()*10+4)+' years and I\'m feeling great!", says woman with friable skin.', + 'News : experts in bitter disagreement over whether sugar consumption turns children sluggish or hyperactive.', + 'News : fishermen deplore upturn in fish tooth decay as sugar lumps-hauling cargo sinks into the ocean.', + 'News : rare black sugar lump that captivated millions in unprecedented auction revealed to be common toxic fungus.', + 'News : "Back in my day, sugar lumps were these little cubes you\'d put in your tea, not those fist-sized monstrosities people eat for lunch", whines curmudgeon with failing memory.', + 'News : sugar lump-snacking fad sweeps the nation; dentists everywhere rejoice.' + ])); + + if (Math.random()<0.001)//apologies to Will Wright + { + list.push( + 'You have been chosen. They will come soon.', + 'They\'re coming soon. Maybe you should think twice about opening the door.', + 'The end is near. Make preparations.', + 'News : broccoli tops for moms, last for kids; dads indifferent.', + 'News : middle age a hoax, declares study; turns out to be bad posture after all.', + 'News : kitties want answers in possible Kitty Kibble shortage.' + ); + } + + if (Game.cookiesEarned>=10000) list.push( + 'News : '+choose([ + 'cookies found to '+choose(['increase lifespan','sensibly increase intelligence','reverse aging','decrease hair loss','prevent arthritis','cure blindness'])+' in '+choose(animals)+'!', + 'cookies found to make '+choose(animals)+' '+choose(['more docile','more handsome','nicer','less hungry','more pragmatic','tastier'])+'!', + 'cookies tested on '+choose(animals)+', found to have no ill effects.', + 'cookies unexpectedly popular among '+choose(animals)+'!', + 'unsightly lumps found on '+choose(animals)+' near cookie facility; "they\'ve pretty much always looked like that", say biologists.', + 'new species of '+choose(animals)+' discovered in distant country; "yup, tastes like cookies", says biologist.', + 'cookies go well with '+choose([choose(['roasted','toasted','boiled','sauteed','minced'])+' '+choose(animals),choose(['sushi','soup','carpaccio','steak','nuggets'])+' made from '+choose(animals)])+', says controversial chef.', + '"do your cookies contain '+choose(animals)+'?", asks PSA warning against counterfeit cookies.', + 'doctors recommend twice-daily consumption of fresh cookies.', + 'doctors warn against chocolate chip-snorting teen fad.', + 'doctors advise against new cookie-free fad diet.', + 'doctors warn mothers about the dangers of "home-made cookies".' + ]), + 'News : "'+choose([ + 'I\'m all about cookies', + 'I just can\'t stop eating cookies. I think I seriously need help', + 'I guess I have a cookie problem', + 'I\'m not addicted to cookies. That\'s just speculation by fans with too much free time', + 'my upcoming album contains 3 songs about cookies', + 'I\'ve had dreams about cookies 3 nights in a row now. I\'m a bit worried honestly', + 'accusations of cookie abuse are only vile slander', + 'cookies really helped me when I was feeling low', + 'cookies are the secret behind my perfect skin', + 'cookies helped me stay sane while filming my upcoming movie', + 'cookies helped me stay thin and healthy', + 'I\'ll say one word, just one : cookies', + 'alright, I\'ll say it - I\'ve never eaten a single cookie in my life' + ])+'", reveals celebrity.', + choose([ + 'News : scientist predicts imminent cookie-related "end of the world"; becomes joke among peers.', + 'News : man robs bank, buys cookies.', + 'News : scientists establish that the deal with airline food is, in fact, a critical lack of cookies.', + 'News : hundreds of tons of cookies dumped into starving country from airplanes; thousands dead, nation grateful.', + 'News : new study suggests cookies neither speed up nor slow down aging, but instead "take you in a different direction".', + 'News : overgrown cookies found in fishing nets, raise questions about hormone baking.', + 'News : "all-you-can-eat" cookie restaurant opens in big city; waiters trampled in minutes.', + 'News : man dies in cookie-eating contest; "a less-than-impressive performance", says judge.', + 'News : what makes cookies taste so right? "Probably all the [*****] they put in them", says anonymous tipper.', + 'News : man found allergic to cookies; "what a weirdo", says family.', + 'News : foreign politician involved in cookie-smuggling scandal.', + 'News : cookies now more popular than '+choose(['cough drops','broccoli','smoked herring','cheese','video games','stable jobs','relationships','time travel','cat videos','tango','fashion','television','nuclear warfare','whatever it is we ate before','politics','oxygen','lamps'])+', says study.', + 'News : obesity epidemic strikes nation; experts blame '+choose(['twerking','that darn rap music','video-games','lack of cookies','mysterious ghostly entities','aliens','parents','schools','comic-books','cookie-snorting fad'])+'.', + 'News : cookie shortage strikes town, people forced to eat cupcakes; "just not the same", concedes mayor.', + 'News : "you gotta admit, all this cookie stuff is a bit ominous", says confused idiot.', + //'News : scientists advise getting used to cookies suffusing every aspect of life; "this is the new normal", expert says.', + //'News : doctors advise against wearing face masks when going outside. "You never know when you might need a cookie... a mask would just get in the way."',//these were written back when covid hadn't really done much damage yet but they just feel in poor taste now + 'News : is there life on Mars? Various chocolate bar manufacturers currently under investigation for bacterial contaminants.', + 'News : "so I guess that\'s a thing now", scientist comments on cookie particles now present in virtually all steel manufactured since cookie production ramped up worldwide.', + 'News : trace amounts of cookie particles detected in most living creatures, some of which adapting them as part of new and exotic metabolic processes.', + ]), + choose([ + 'News : movie cancelled from lack of actors; "everybody\'s at home eating cookies", laments director.', + 'News : comedian forced to cancel cookie routine due to unrelated indigestion.', + 'News : new cookie-based religion sweeps the nation.', + 'News : fossil records show cookie-based organisms prevalent during Cambrian explosion, scientists say.', + 'News : mysterious illegal cookies seized; "tastes terrible", says police.', + 'News : man found dead after ingesting cookie; investigators favor "mafia snitch" hypothesis.', + 'News : "the universe pretty much loops on itself," suggests researcher; "it\'s cookies all the way down."', + 'News : minor cookie-related incident turns whole town to ashes; neighboring cities asked to chip in for reconstruction.', + 'News : is our media controlled by the cookie industry? This could very well be the case, says crackpot conspiracy theorist.', + 'News : '+choose(['cookie-flavored popcorn pretty damn popular; "we kinda expected that", say scientists.','cookie-flavored cereals break all known cereal-related records','cookies popular among all age groups, including fetuses, says study.','cookie-flavored popcorn sales exploded during screening of Grandmothers II : The Moistening.']), + 'News : all-cookie restaurant opening downtown. Dishes such as braised cookies, cookie thermidor, and for dessert : crepes.', + 'News : "Ook", says interviewed orangutan.', + 'News : cookies could be the key to '+choose(['eternal life','infinite riches','eternal youth','eternal beauty','curing baldness','world peace','solving world hunger','ending all wars world-wide','making contact with extraterrestrial life','mind-reading','better living','better eating','more interesting TV shows','faster-than-light travel','quantum baking','chocolaty goodness','gooder thoughtness'])+', say scientists.', + 'News : flavor text '+choose(['not particularly flavorful','kind of unsavory','"rather bland"','pretty spicy lately'])+', study finds.', + ]), + choose([ + 'News : what do golden cookies taste like? Study reveals a flavor "somewhere between spearmint and liquorice".', + 'News : what do wrath cookies taste like? Study reveals a flavor "somewhere between blood sausage and seawater".', + 'News : '+Game.bakeryName+'-brand cookies "'+choose(['much less soggy','much tastier','relatively less crappy','marginally less awful','less toxic','possibly more edible','more fashionable','slightly nicer','trendier','arguably healthier','objectively better choice','slightly less terrible','decidedly cookier','a tad cheaper'])+' than competitors", says consumer survey.', + 'News : "'+Game.bakeryName+'" set to be this year\'s most popular baby name.', + 'News : new popularity survey says '+Game.bakeryName+'\'s the word when it comes to cookies.', + 'News : major city being renamed '+Game.bakeryName+'ville after world-famous cookie manufacturer.', + 'News : '+choose(['street','school','nursing home','stadium','new fast food chain','new planet','new disease','flesh-eating bacteria','deadly virus','new species of '+choose(animals),'new law','baby','programming language'])+' to be named after '+Game.bakeryName+', the world-famous cookie manufacturer.', + 'News : don\'t miss tonight\'s biopic on '+Game.bakeryName+'\'s irresistible rise to success!', + 'News : don\'t miss tonight\'s interview of '+Game.bakeryName+' by '+choose(['Bloprah','Blavid Bletterman','Blimmy Blimmel','Blellen Blegeneres','Blimmy Blallon','Blonan Blo\'Brien','Blay Bleno','Blon Blewart','Bleven Blolbert','Lord Toxikhron of dimension 7-B19',Game.bakeryName+'\'s own evil clone'])+'!', + 'News : people all over the internet still scratching their heads over nonsensical reference : "Okay, but why an egg?"', + 'News : viral video "Too Many Cookies" could be "a grim commentary on the impending crisis our world is about to face", says famous economist.', + 'News : "memes from last year somehow still relevant", deplore experts.', + 'News : cookie emoji most popular among teenagers, far ahead of "judgmental OK hand sign" and "shifty-looking dark moon", says study.', + ]), + choose([ + 'News : births of suspiciously bald babies on the rise; ancient alien cabal denies involvement.', + 'News : "at this point, cookies permeate the economy", says economist. "If we start eating anything else, we\'re all dead."', + 'News : pun in headline infuriates town, causes riot. 21 wounded, 5 dead; mayor still missing.', + 'Nws : ky btwn W and R brokn, plas snd nw typwritr ASAP.', + 'Neeeeews : "neeeew EEEEEE keeeeey working fineeeeeeeee", reeeports gleeeeeeeeful journalist.', + 'News : cookies now illegal in some backwards country nobody cares about. Political tensions rising; war soon, hopefully.', + 'News : irate radio host rambles about pixelated icons. "None of the cookies are aligned! Can\'t anyone else see it? I feel like I\'m taking crazy pills!"', + 'News : nation cheers as legislators finally outlaw '+choose(['cookie criticism','playing other games than Cookie Clicker','pineapple on pizza','lack of cheerfulness','mosquitoes','broccoli','the human spleen','bad weather','clickbait','dabbing','the internet','memes','millennials'])+'!', + 'News : '+choose(['local','area'])+' '+choose(['man','woman'])+' goes on journey of introspection, finds cookies : "I honestly don\'t know what I was expecting."', + 'News : '+choose(['man','woman'])+' wakes up from coma, '+choose(['tries cookie for the first time, dies.','regrets it instantly.','wonders "why everything is cookies now".','babbles incoherently about some supposed "non-cookie food" we used to eat.','cites cookies as main motivator.','asks for cookies.']), + 'News : pet '+choose(animals)+', dangerous fad or juicy new market?', + 'News : person typing these wouldn\'t mind someone else breaking the news to THEM, for a change.', + 'News : "average person bakes '+Beautify(Math.ceil(Game.cookiesEarned/8000000000))+' cookie'+(Math.ceil(Game.cookiesEarned/8000000000)==1?'':'s')+' a year" factoid actually just statistical error; '+Game.bakeryName+', who has produced '+Beautify(Game.cookiesEarned)+' cookies in their lifetime, is an outlier and should not have been counted.' + ]) + ); + } + } + + if (list.length==0) + { + if (loreProgress<=0) list.push(loc("You feel like making cookies. But nobody wants to eat your cookies.")); + else if (loreProgress<=1) list.push(loc("Your first batch goes to the trash. The neighborhood raccoon barely touches it.")); + else if (loreProgress<=2) list.push(loc("Your family accepts to try some of your cookies.")); + else if (loreProgress<=3) list.push(loc("Your cookies are popular in the neighborhood."),loc("People are starting to talk about your cookies.")); + else if (loreProgress<=4) list.push(loc("Your cookies are talked about for miles around."),loc("Your cookies are renowned in the whole town!")); + else if (loreProgress<=5) list.push(loc("Your cookies bring all the boys to the yard."),loc("Your cookies now have their own website!")); + else if (loreProgress<=6) list.push(loc("Your cookies are worth a lot of money."),loc("Your cookies sell very well in distant countries.")); + else if (loreProgress<=7) list.push(loc("People come from very far away to get a taste of your cookies."),loc("Kings and queens from all over the world are enjoying your cookies.")); + else if (loreProgress<=8) list.push(loc("There are now museums dedicated to your cookies."),loc("A national day has been created in honor of your cookies.")); + else if (loreProgress<=9) list.push(loc("Your cookies have been named a part of the world wonders."),loc("History books now include a whole chapter about your cookies.")); + else if (loreProgress<=10) list.push(loc("Your cookies have been placed under government surveillance."),loc("The whole planet is enjoying your cookies!")); + else if (loreProgress<=11) list.push(loc("Strange creatures from neighboring planets wish to try your cookies."),loc("Elder gods from the whole cosmos have awoken to taste your cookies.")); + else if (loreProgress<=12) list.push(loc("Beings from other dimensions lapse into existence just to get a taste of your cookies."),loc("Your cookies have achieved sentience.")); + else if (loreProgress<=13) list.push(loc("The universe has now turned into cookie dough, to the molecular level."),loc("Your cookies are rewriting the fundamental laws of the universe.")); + else if (loreProgress<=14) list.push(loc("A local news station runs a 10-minute segment about your cookies. Success!
(you win a cookie)"),loc("it's time to stop playing")); + } + + //if (Game.elderWrath>0 && (Game.pledges==0 || Math.random()<0.2)) + if (Game.elderWrath>0 && (((Game.pledges==0 && Game.resets==0) && Math.random()<0.3) || Math.random()<0.03)) + { + list=[]; + if (Game.elderWrath==1) list.push(EN?choose([ + 'News : millions of old ladies reported missing!', + 'News : processions of old ladies sighted around cookie facilities!', + 'News : families around the continent report agitated, transfixed grandmothers!', + 'News : doctors swarmed by cases of old women with glassy eyes and a foamy mouth!', + 'News : nurses report "strange scent of cookie dough" around female elderly patients!' + ]):(NEWS+choose(loc("Ticker (grandma invasion start)")))); + if (Game.elderWrath==2) list.push(EN?choose([ + 'News : town in disarray as strange old ladies break into homes to abduct infants and baking utensils!', + 'News : sightings of old ladies with glowing eyes terrify local population!', + 'News : retirement homes report "female residents slowly congealing in their seats"!', + 'News : whole continent undergoing mass exodus of old ladies!', + 'News : old women freeze in place in streets, ooze warm sugary syrup!' + ]):(NEWS+choose(loc("Ticker (grandma invasion rise)")))); + if (Game.elderWrath==3) list.push(EN?choose([ + 'News : large "flesh highways" scar continent, stretch between various cookie facilities!', + 'News : wrinkled "flesh tendrils" visible from space!', + 'News : remains of "old ladies" found frozen in the middle of growing fleshy structures!', + 'News : all hope lost as writhing mass of flesh and dough engulfs whole city!', + 'News : nightmare continues as wrinkled acres of flesh expand at alarming speeds!' + ]):(NEWS+choose(loc("Ticker (grandma invasion full)")))); + } + + if (EN && Game.season=='fools') + { + list=[]; + + if (Game.cookiesEarned>=1000) list.push(choose([ + choose(['Your office chair is really comfortable.','Profit\'s in the air!','Business meetings are such a joy!','What a great view from your office!','Smell that? That\'s capitalism, baby!','You truly love answering emails.','Working hard, or hardly working?','Another day in paradise!','Expensive lunch time!','Another government bailout coming up! Splendid!','These profits are doing wonderful things for your skin.','You daydream for a moment about a world without taxes.','You\'ll worry about environmental damage when you\'re dead!','Yay, office supplies!','Sweet, those new staplers just came in!','Ohh, coffee break!']), + choose(['You\'ve spent the whole day','Another great day','First order of business today:','Why, you truly enjoy','What next? That\'s right,','You check what\'s next on the agenda. Oh boy,'])+' '+choose(['signing contracts','filling out forms','touching base with the team','examining exciting new prospects','playing with your desk toys','getting new nameplates done','attending seminars','videoconferencing','hiring dynamic young executives','meeting new investors','updating your rolodex','pumping up those numbers','punching in some numbers','getting investigated for workers\' rights violations','reorganizing documents','belittling underlings','reviewing employee performance','revising company policies','downsizing','pulling yourself up by your bootstraps','adjusting your tie','performing totally normal human activities','recentering yourself in the scream room','immanentizing the eschaton','shredding some sensitive documents','comparing business cards','pondering the meaning of your existence','listening to the roaring emptiness inside your soul','playing minigolf in your office'])+'!', + 'The word of the day is: '+choose(['viral','search engine optimization','blags and wobsites','social networks','webinette','staycation','user experience','crowdfunding','carbon neutral','big data','machine learning','disrupting','influencers','monoconsensual transactions','sustainable','freemium','incentives','grassroots','web 3.0'/*this was before this whole crypto mess i'm so sorry*/,'logistics','leveraging','branding','proactive','synergizing','market research','demographics','pie charts','blogular','blogulacious','blogastic','authenticity','plastics','electronic mail','cellular phones','rap music','bulbs','goblinization','straight-to-bakery','microbakeries','chocolativity','flavorfulness','tastyfication','sugar offsets','activated wheat','reification','immanentize the eschaton','cookies, I guess'])+'.' + ])); + if (Game.cookiesEarned>=1000 && Math.random()<0.05) list.push(choose([ + 'If you could get some more cookies baked, that\'d be great.', + 'So. About those TPS reports.', + 'Hmm, you\'ve got some video tapes to return.', + 'They\'ll pay. They\'ll all pay.', + 'You haven\'t even begun to peak.', + 'There is an idea of a '+Game.bakeryName+'. Some kind of abstraction. But there is no real you, only an entity. Something illusory.', + 'This was a terrible idea!' + ])); + + + if (Game.TickerN%2==0) + { + if (Game.Objects['Grandma'].amount>0) list.push(choose([ + 'Your rolling pins are rolling and pinning!', + 'Production is steady!' + ])); + + if (Game.Objects['Grandma'].amount>0) list.push(choose([ + 'Your ovens are diligently baking more and more cookies.', + 'Your ovens burn a whole batch. Ah well! Still good.' + ])); + + if (Game.Objects['Farm'].amount>0) list.push(choose([ + 'Scores of cookies come out of your kitchens.', + 'Today, new recruits are joining your kitchens!' + ])); + + if (Game.Objects['Factory'].amount>0) list.push(choose([ + 'Your factories are producing an unending stream of baked goods.', + 'Your factory workers decide to go on strike!', + 'It\'s safety inspection day in your factories.' + ])); + + if (Game.Objects['Mine'].amount>0) list.push(choose([ + 'Your secret recipes are kept safely inside a giant underground vault.', + 'Your chefs are working on new secret recipes!' + ])); + + if (Game.Objects['Shipment'].amount>0) list.push(choose([ + 'Your supermarkets are bustling with happy, hungry customers.', + 'Your supermarkets are full of cookie merch!' + ])); + + if (Game.Objects['Alchemy lab'].amount>0) list.push(choose([ + 'It\'s a new trading day at the stock exchange, and traders can\'t get enough of your shares!', + 'Your stock is doubling in value by the minute!' + ])); + + if (Game.Objects['Portal'].amount>0) list.push(choose([ + 'You just released a new TV show episode!', + 'Your cookie-themed TV show is being adapted into a new movie!' + ])); + + if (Game.Objects['Time machine'].amount>0) list.push(choose([ + 'Your theme parks are doing well - puddles of vomit and roller-coaster casualties are being swept under the rug!', + 'Visitors are stuffing themselves with cookies before riding your roller-coasters. You might want to hire more clean-up crews.' + ])); + + if (Game.Objects['Antimatter condenser'].amount>0) list.push(choose([ + 'Cookiecoin is officially the most mined digital currency in the history of mankind!', + 'Cookiecoin piracy is rampant!' + ])); + + if (Game.Objects['Prism'].amount>0) list.push(choose([ + 'Your corporate nations just gained a new parliament!', + 'You\'ve just annexed a new nation!', + 'A new nation joins the grand cookie conglomerate!' + ])); + + if (Game.Objects['Chancemaker'].amount>0) list.push(choose([ + 'Your intergalactic federation of cookie-sponsored planets reports record-breaking profits!', + 'Billions of unwashed aliens are pleased to join your workforce as you annex their planet!', + 'New toll opened on interstellar highway, funnelling more profits into the cookie economy!' + ])); + + if (Game.Objects['Fractal engine'].amount>0) list.push(choose([ + 'Your cookie-based political party is doing fantastic in the polls!', + 'New pro-cookie law passes without a hitch thanks to your firm grasp of the political ecosystem!', + 'Your appointed senators are overturning cookie bans left and right!' + ])); + + if (Game.Objects['Javascript console'].amount>0) list.push(choose([ + 'Cookies are now one of the defining aspects of mankind! Congratulations!', + 'Time travelers report that this era will later come to be known, thanks to you, as the cookie millennium!', + 'Cookies now deeply rooted in human culture, likely puzzling future historians!' + ])); + + if (Game.Objects['Idleverse'].amount>0) list.push(choose([ + 'Public aghast as all remaining aspects of their lives overtaken by universal cookie industry!', + 'Every single product currently sold in the observable universe can be traced back to your company! And that\'s a good thing.', + 'Antitrust laws let out a helpless whimper before being engulfed by your sprawling empire!' + ])); + + if (Game.Objects['Cortex baker'].amount>0) list.push(choose([ + 'Bold new law proposal would grant default ownership of every new idea by anyone anywhere to '+Game.bakeryName+'\'s bakery!', + 'Bakery think tanks accidentally reinvent cookies for the 57th time this week!', + 'Bakery think tanks invent entire new form of human communication to advertise and boost cookie sales!' + ])); + + if (Game.Objects['You'].amount>0) list.push(choose([ + ''+Game.bakeryName+' releases new self-help book: "How I Made My '+Beautify(Game.cookiesEarned)+' Cookies And How You Can Too"!', + 'Don\'t miss our interview tonight with the stupefying '+Game.bakeryName+', who discusses where to go next once you\'re at the top!', + 'Fame, beauty, biscuits; '+Game.bakeryName+' has it all - but is it enough?' + ])); + } + + if (loreProgress<=0) list.push('Such a grand day to begin a new business.'); + else if (loreProgress<=1) list.push('You\'re baking up a storm!'); + else if (loreProgress<=2) list.push('You are confident that one day, your cookie company will be the greatest on the market!'); + else if (loreProgress<=3) list.push('Business is picking up!'); + else if (loreProgress<=4) list.push('You\'re making sales left and right!'); + else if (loreProgress<=5) list.push('Everyone wants to buy your cookies!'); + else if (loreProgress<=6) list.push('You are now spending most of your day signing contracts!'); + else if (loreProgress<=7) list.push('You\'ve been elected "business tycoon of the year"!'); + else if (loreProgress<=8) list.push('Your cookies are a worldwide sensation! Well done, old chap!'); + else if (loreProgress<=9) list.push('Your brand has made its way into popular culture. Children recite your slogans and adults reminisce them fondly!'); + else if (loreProgress<=10) list.push('A business day like any other. It\'s good to be at the top!'); + else if (loreProgress<=11) list.push('You look back on your career. It\'s been a fascinating journey, building your baking empire from the ground up.'); + } + + for (var i=0;iGame.fps*10 && Game.Has('Fortune cookies') && Math.random()<(Game.HasAchiev('O Fortuna')?0.04:0.02)) + { + var fortunes=[]; + for (var i in Game.Tiers['fortune'].upgrades) + { + var it=Game.Tiers['fortune'].upgrades[i]; + if (!Game.HasUnlocked(it.name)) fortunes.push(it); + } + + if (!Game.fortuneGC) fortunes.push('fortuneGC'); + if (!Game.fortuneCPS) fortunes.push('fortuneCPS'); + + if (fortunes.length>0) + { + list=[]; + var me=choose(fortunes); + Game.TickerEffect={type:'fortune',sub:me}; + + if (me=='fortuneGC') me=loc("Today is your lucky day!");/*
Click here for a golden cookie.';*/ + else if (me=='fortuneCPS') {Math.seedrandom(Game.seed+'-fortune');me=loc("Your lucky numbers are:")+' '+Math.floor(Math.random()*100)+' '+Math.floor(Math.random()*100)+' '+Math.floor(Math.random()*100)+' '+Math.floor(Math.random()*100)/*+'
Click here to gain one hour of your CpS.'*/;Math.seedrandom();} + else + { + if (EN) + { + me=me.dname.substring(me.name.indexOf('#'))+' : '+me.baseDesc.substring(me.baseDesc.indexOf('')+3); + me=me.substring(0,me.length-4); + } + else if (me.buildingTie) me=me.dname+' : '+loc(choose(["Never forget your %1.","Pay close attention to the humble %1.","You've been neglecting your %1.","Remember to visit your %1 sometimes."]),me.buildingTie.single); + else me=me.dname+' : '+loc(choose(["You don't know what you have until you've lost it.","Remember to take breaks.","Hey, what's up. I'm a fortune cookie.","You think you have it bad? Look at me."])); + } + me='
'+me+'
'; + list=[me]; + } + } + + if (Game.windowW'+NEWS+(EN?'help!':loc("help me!"))+'']; + + Game.TickerAge=Game.fps*10; + Game.Ticker=choose(list); + Game.AddToLog(Game.Ticker); + Game.TickerN++; + Game.TickerDraw(); + } + Game.tickerL=l('commentsText1'); + Game.tickerBelowL=l('commentsText2'); + Game.tickerTooNarrow=900; + Game.TickerDraw=function() + { + var str=''; + if (Game.Ticker!='') str=Game.Ticker; + Game.tickerBelowL.innerHTML=Game.tickerL.innerHTML; + Game.tickerL.innerHTML=str; + + Game.tickerBelowL.className='commentsText'; + void Game.tickerBelowL.offsetWidth; + Game.tickerBelowL.className='commentsText risingAway'; + Game.tickerL.className='commentsText'; + void Game.tickerL.offsetWidth; + Game.tickerL.className='commentsText risingUp'; + } + AddEvent(Game.tickerL,'click',function(event){ + Game.Ticker=''; + Game.TickerClicks++; + if (Game.windowW=50) {Game.Win('Tabloid addiction');} + + if (Game.TickerEffect && Game.TickerEffect.type=='fortune') + { + PlaySound('snd/fortune.mp3',1); + Game.SparkleAt(Game.mouseX,Game.mouseY); + var effect=Game.TickerEffect.sub; + if (effect=='fortuneGC') + { + Game.Notify(loc("Fortune!"),loc("A golden cookie has appeared."),[10,32]); + Game.fortuneGC=1; + var newShimmer=new Game.shimmer('golden',{noWrath:true}); + } + else if (effect=='fortuneCPS') + { + Game.Notify(loc("Fortune!"),loc("You gain one hour of your CpS (capped at double your bank)."),[10,32]); + Game.fortuneCPS=1; + Game.Earn(Math.min(Game.cookiesPs*60*60,Game.cookies)); + } + else + { + Game.Notify(effect.dname,loc("You've unlocked a new upgrade."),effect.icon); + effect.unlock(); + } + } + + Game.TickerEffect=0; + + }); + + Game.Log=[]; + Game.AddToLog=function(what) + { + Game.Log.unshift(what); + if (Game.Log.length>100) Game.Log.pop(); + } + + Game.vanilla=1; + /*===================================================================================== + BUILDINGS + =======================================================================================*/ + Game.last=0; + + Game.storeToRefresh=1; + Game.priceIncrease=1.15; + Game.buyBulk=1; + Game.buyMode=1;//1 for buy, -1 for sell + Game.buyBulkOld=Game.buyBulk;//used to undo changes from holding Shift or Ctrl + Game.buyBulkShortcut=0;//are we pressing Shift or Ctrl? + + Game.Objects={}; + Game.ObjectsById=[]; + Game.ObjectsN=0; + Game.BuildingsOwned=0; + Game.Object=function(name,commonName,desc,icon,iconColumn,art,price,cps,buyFunction) + { + this.id=Game.ObjectsN; + this.name=name; + this.dname=name; + this.displayName=this.name; + commonName=commonName.split('|'); + this.single=commonName[0]; + this.plural=commonName[1]; + this.bsingle=this.single;this.bplural=this.plural;//store untranslated as we use those too + this.actionName=commonName[2]; + this.extraName=commonName[3]; + this.extraPlural=commonName[4]; + this.desc=desc; + if (true)//if (EN) + { + this.dname=loc(this.name); + this.single=loc(this.single); + this.plural=loc(this.plural); + this.desc=loc(FindLocStringByPart(this.name+' quote')); + } + this.basePrice=price; + this.price=this.basePrice; + this.bulkPrice=this.price; + this.cps=cps; + this.baseCps=this.cps; + this.mouseOn=false; + this.mousePos=[-100,-100]; + this.productionAchievs=[]; + + this.n=this.id; + if (this.n!=0) + { + //new automated price and CpS curves + //this.baseCps=Math.ceil(((this.n*0.5)*Math.pow(this.n*1,this.n*0.9))*10)/10; + //this.baseCps=Math.ceil((Math.pow(this.n*1,this.n*0.5+2.35))*10)/10;//by a fortunate coincidence, this gives the 3rd, 4th and 5th buildings a CpS of 10, 69 and 420 + this.baseCps=Math.ceil((Math.pow(this.n*1,this.n*0.5+2))*10)/10;//0.45 used to be 0.5 + //this.baseCps=Math.ceil((Math.pow(this.n*1,this.n*0.45+2.10))*10)/10; + //clamp 14,467,199 to 14,000,000 (there's probably a more elegant way to do that) + var digits=Math.pow(10,(Math.ceil(Math.log(Math.ceil(this.baseCps))/Math.LN10)))/100; + this.baseCps=Math.round(this.baseCps/digits)*digits; + + this.basePrice=(this.n*1+9+(this.n<5?0:Math.pow(this.n-5,1.75)*5))*Math.pow(10,this.n)*(Math.max(1,this.n-14)); + //this.basePrice=(this.n*2.5+7.5)*Math.pow(10,this.n); + var digits=Math.pow(10,(Math.ceil(Math.log(Math.ceil(this.basePrice))/Math.LN10)))/100; + this.basePrice=Math.round(this.basePrice/digits)*digits; + if (this.id>=16) this.basePrice*=10; + if (this.id>=17) this.basePrice*=10; + if (this.id>=18) this.basePrice*=10; + if (this.id>=19) this.basePrice*=20; + this.price=this.basePrice; + this.bulkPrice=this.price; + } + + this.totalCookies=0; + this.storedCps=0; + this.storedTotalCps=0; + this.icon=icon; + this.iconColumn=iconColumn; + this.art=art; + if (art.base) + {art.pic=art.base+'.png';art.bg=art.base+'Background.png';} + this.buyFunction=buyFunction; + this.locked=1; + this.level=0; + this.vanilla=Game.vanilla; + + this.tieredUpgrades={}; + this.tieredAchievs={}; + this.synergies=[]; + this.fortune=0; + + this.amount=0; + this.bought=0; + this.highest=0; + this.free=0; + + this.eachFrame=0; + + this.minigameUrl=0;//if this is defined, load the specified script if the building's level is at least 1 + this.minigameName=0; + this.onMinigame=false; + this.minigameLoaded=false; + + this.switchMinigame=function(on)//change whether we're on the building's minigame + { + if (!Game.isMinigameReady(this)) on=false; + if (on==-1) on=!this.onMinigame; + this.onMinigame=on; + if (this.id!=0) + { + if (this.onMinigame) + { + l('row'+this.id).classList.add('onMinigame'); + //l('rowSpecial'+this.id).style.display='block'; + //l('rowCanvas'+this.id).style.display='none'; + if (this.minigame.onResize) this.minigame.onResize(); + } + else + { + l('row'+this.id).classList.remove('onMinigame'); + //l('rowSpecial'+this.id).style.display='none'; + //l('rowCanvas'+this.id).style.display='block'; + } + } + this.refresh(); + } + + this.getPrice=function(n) + { + var price=this.basePrice*Math.pow(Game.priceIncrease,Math.max(0,this.amount-this.free)); + price=Game.modifyBuildingPrice(this,price); + return Math.ceil(price); + } + this.getSumPrice=function(amount)//return how much it would cost to buy [amount] more of this building + { + var price=0; + for (var i=Math.max(0,this.amount);i=price) + { + bought++; + moni+=price; + Game.Spend(price); + this.amount++; + this.bought++; + price=this.getPrice(); + this.price=price; + if (this.buyFunction) this.buyFunction(); + Game.recalculateGains=1; + if (this.amount==1 && this.id!=0) l('row'+this.id).classList.add('enabled'); + this.highest=Math.max(this.highest,this.amount); + Game.BuildingsOwned++; + success=1; + } + } + if (success) {PlaySound('snd/buy'+choose([1,2,3,4])+'.mp3',0.75);this.refresh();} + //if (moni>0 && amount>1) Game.Notify(this.name,'Bought '+bought+' for '+Beautify(moni)+' cookies','',2); + } + this.sell=function(amount,bypass) + { + var success=0; + var moni=0; + var sold=0; + if (amount==-1) amount=this.amount; + if (!amount) amount=Game.buyBulk; + for (var i=0;i0) + { + sold++; + moni+=price; + Game.cookies+=price; + Game.cookiesEarned=Math.max(Game.cookies,Game.cookiesEarned);//this is to avoid players getting the cheater achievement when selling buildings that have a higher price than they used to + this.amount--; + price=this.getPrice(); + this.price=price; + if (this.sellFunction) this.sellFunction(); + Game.recalculateGains=1; + if (this.amount==0 && this.id!=0) l('row'+this.id).classList.remove('enabled'); + Game.BuildingsOwned--; + success=1; + } + } + if (success && Game.hasGod) + { + var godLvl=Game.hasGod('ruin'); + var old=Game.hasBuff('Devastation'); + if (old) + { + if (godLvl==1) old.multClick+=sold*0.01; + else if (godLvl==2) old.multClick+=sold*0.005; + else if (godLvl==3) old.multClick+=sold*0.0025; + } + else + { + if (godLvl==1) Game.gainBuff('devastation',10,1+sold*0.01); + else if (godLvl==2) Game.gainBuff('devastation',10,1+sold*0.005); + else if (godLvl==3) Game.gainBuff('devastation',10,1+sold*0.0025); + } + } + if (success && Game.shimmerTypes['golden'].n<=0 && Game.auraMult('Dragon Orbs')>0) + { + var highestBuilding=0; + for (var i in Game.Objects) {if (Game.Objects[i].amount>0) highestBuilding=Game.Objects[i];} + if (highestBuilding==this && Math.random()0) Game.Notify(this.name,'Sold '+sold+' for '+Beautify(moni)+' cookies','',2); + } + this.sacrifice=function(amount)//sell without getting back any money + { + var success=0; + //var moni=0; + var sold=0; + if (amount==-1) amount=this.amount; + if (!amount) amount=1; + for (var i=0;i0) + { + sold++; + //moni+=price; + //Game.cookies+=price; + //Game.cookiesEarned=Math.max(Game.cookies,Game.cookiesEarned); + this.amount--; + price=this.getPrice(); + this.price=price; + if (this.sellFunction) this.sellFunction(); + Game.recalculateGains=1; + if (this.amount==0 && this.id!=0) l('row'+this.id).classList.remove('enabled'); + Game.BuildingsOwned--; + success=1; + } + } + if (success) {this.refresh();} + //if (moni>0) Game.Notify(this.name,'Sold '+sold+' for '+Beautify(moni)+' cookies','',2); + } + this.buyFree=function(amount)//unlike getFree, this still increases the price + { + for (var i=0;i=price) + { + this.amount++; + this.bought++; + this.price=this.getPrice(); + Game.recalculateGains=1; + if (this.amount==1 && this.id!=0) l('row'+this.id).classList.add('enabled'); + this.highest=Math.max(this.highest,this.amount); + Game.BuildingsOwned++; + } + } + this.refresh(); + } + this.getFree=function(amount)//get X of this building for free, with the price behaving as if you still didn't have them + { + this.amount+=amount; + this.bought+=amount; + this.free+=amount; + this.highest=Math.max(this.highest,this.amount); + Game.BuildingsOwned+=amount; + this.highest=Math.max(this.highest,this.amount); + this.refresh(); + } + this.getFreeRanks=function(amount)//this building's price behaves as if you had X less of it + { + this.free+=amount; + this.refresh(); + } + + this.tooltip=function() + { + var me=this; + var ariaText=''; + var desc=me.desc; + var name=me.dname; + if (Game.season=='fools') + { + if (!Game.foolObjects[me.name]) + { + name=Game.foolObjects['Unknown'].name; + desc=Game.foolObjects['Unknown'].desc; + } + else + { + name=Game.foolObjects[me.name].name; + desc=Game.foolObjects[me.name].desc; + } + } + var icon=[me.iconColumn,0]; + if (me.locked) + { + name='???'; + desc='???'; + icon=[0,7]; + } + //if (l('rowInfo'+me.id) && Game.drawT%10==0) l('rowInfoContent'+me.id).innerHTML='• '+me.amount+' '+(me.amount==1?me.single:me.plural)+'
• producing '+Beautify(me.storedTotalCps,1)+' '+(me.storedTotalCps==1?'cookie':'cookies')+' per second
• total : '+Beautify(me.totalCookies)+' '+(Math.floor(me.totalCookies)==1?'cookie':'cookies')+' '+me.actionName; + + var canBuy=false; + var price=me.bulkPrice; + if ((Game.buyMode==1 && Game.cookies>=price) || (Game.buyMode==-1 && me.amount>0)) canBuy=true; + + var synergiesStr=''; + //note : might not be entirely accurate, math may need checking + if (me.amount>0) + { + var synergiesWith={}; + var synergyBoost=0; + + if (me.name=='Grandma') + { + for (var i in Game.GrandmaSynergies) + { + if (Game.Has(Game.GrandmaSynergies[i])) + { + var other=Game.Upgrades[Game.GrandmaSynergies[i]].buildingTie; + var mult=me.amount*0.01*(1/(other.id-1)); + var boost=(other.storedTotalCps*Game.globalCpsMult)-(other.storedTotalCps*Game.globalCpsMult)/(1+mult); + synergyBoost+=boost; + if (!synergiesWith[other.plural]) synergiesWith[other.plural]=0; + synergiesWith[other.plural]+=mult; + } + } + } + else if (me.name=='Portal' && Game.Has('Elder Pact')) + { + var other=Game.Objects['Grandma']; + var boost=(me.amount*0.05*other.amount)*Game.globalCpsMult; + synergyBoost+=boost; + if (!synergiesWith[other.plural]) synergiesWith[other.plural]=0; + synergiesWith[other.plural]+=boost/(other.storedTotalCps*Game.globalCpsMult); + } + + for (var i in me.synergies) + { + var it=me.synergies[i]; + if (Game.Has(it.name)) + { + var weight=0.05; + var other=it.buildingTie1; + if (me==it.buildingTie1) {weight=0.001;other=it.buildingTie2;} + var boost=(other.storedTotalCps*Game.globalCpsMult)-(other.storedTotalCps*Game.globalCpsMult)/(1+me.amount*weight); + synergyBoost+=boost; + if (!synergiesWith[other.plural]) synergiesWith[other.plural]=0; + synergiesWith[other.plural]+=me.amount*weight; + } + } + if (synergyBoost>0) + { + for (var i in synergiesWith) + { + if (synergiesStr!='') synergiesStr+=', '; + synergiesStr+=''+i+' +'+Beautify(synergiesWith[i]*100,1)+'%'; + } + synergiesStr=loc("...also boosting some other buildings:")+' '+synergiesStr+' - '+loc("all combined, these boosts account for %1 per second (%2% of total CpS)",[loc("%1 cookie",LBeautify(synergyBoost,1)),Beautify((synergyBoost/Game.cookiesPs)*100,1)]); + } + } + + if (Game.prefs.screenreader) + { + if (me.locked) ariaText='This building is not yet unlocked. '; + else ariaText=name+'. '; + if (!me.locked) ariaText+='You own '+me.amount+'. '; + ariaText+=(canBuy?'Can buy 1 for':'Cannot afford the')+' '+Beautify(Math.round(price))+' cookies. '; + if (!me.locked && me.totalCookies>0) + { + ariaText+='Each '+me.single+' produces '+Beautify((me.storedTotalCps/me.amount)*Game.globalCpsMult,1)+' cookies per second. '; + ariaText+=Beautify(me.totalCookies)+' cookies '+me.actionName+' so far. '; + } + if (!me.locked) ariaText+=desc; + + var ariaLabel=l('ariaReader-product-'+(me.id)); + if (ariaLabel) ariaLabel.innerHTML=ariaText.replace(/(<([^>]+)>)/gi,' '); + } + + return '
'+Beautify(Math.round(price))+''+Game.costDetails(price)+'
'+name+'
'+'
'+loc("owned: %1",me.amount)+'
'+(me.free>0?'
'+loc("free: %1!",me.free)+'
':'')+'
'+ + '
'+desc+'
'+ + (me.totalCookies>0?( + '
'+ + (me.amount>0?'
'+loc("each %1 produces %2 per second",[me.single,loc("%1 cookie",LBeautify((me.storedTotalCps/me.amount)*Game.globalCpsMult,1))])+'
':'')+ + '
'+loc("%1 producing %2 per second",[loc("%1 "+me.bsingle,LBeautify(me.amount)),loc("%1 cookie",LBeautify(me.storedTotalCps*Game.globalCpsMult,1))])+' ('+loc("%1% of total CpS",Beautify(Game.cookiesPs>0?((me.amount>0?((me.storedTotalCps*Game.globalCpsMult)/Game.cookiesPs):0)*100):0,1))+')
'+ + (synergiesStr?('
'+synergiesStr+'
'):'')+ + (EN?'
'+Beautify(me.totalCookies)+' '+(Math.floor(me.totalCookies)==1?'cookie':'cookies')+' '+me.actionName+' so far
':'
'+loc("%1 produced so far",loc("%1 cookie",LBeautify(me.totalCookies)))+'
') + ):'')+ + '
'; + } + this.levelTooltip=function() + { + var me=this; + return '
'+loc("Level %1 %2",[Beautify(me.level),me.plural])+'
'+(EN?((me.level==1?me.extraName:me.extraPlural).replace('[X]',Beautify(me.level))+' granting +'+Beautify(me.level)+'% '+me.dname+' CpS.'):loc("Granting +%1% %2 CpS.",[Beautify(me.level),me.single]))+'
'+loc("Click to level up for %1.",''+loc("%1 sugar lump",LBeautify(me.level+1))+'')+((me.level==0 && me.minigameUrl)?'
'+loc("Levelling up this building unlocks a minigame.")+'':'')+'
'; + } + this.levelUp=function(me){ + return function(free){Game.spendLump(me.level+1,loc("level up your %1",me.plural),function() + { + me.level+=1; + if (me.level>=10 && me.levelAchiev10) Game.Win(me.levelAchiev10.name); + if (!free) PlaySound('snd/upgrade.mp3',0.6); + Game.LoadMinigames(); + me.refresh(); + if (l('productLevel'+me.id)){var rect=l('productLevel'+me.id).getBounds();Game.SparkleAt((rect.left+rect.right)/2,(rect.top+rect.bottom)/2-24+32-TopBarOffset);} + if (me.minigame && me.minigame.onLevel) me.minigame.onLevel(me.level); + },free)();}; + }(this); + + this.refresh=function()//show/hide the building display based on its amount, and redraw it + { + this.price=this.getPrice(); + if (Game.buyMode==1) this.bulkPrice=this.getSumPrice(Game.buyBulk); + else if (Game.buyMode==-1 && Game.buyBulk==-1) this.bulkPrice=this.getReverseSumPrice(1000); + else if (Game.buyMode==-1) this.bulkPrice=this.getReverseSumPrice(Game.buyBulk); + this.rebuild(); + if (this.amount==0 && this.id!=0) l('row'+this.id).classList.remove('enabled'); + else if (this.amount>0 && this.id!=0) l('row'+this.id).classList.add('enabled'); + if (this.muted>0 && this.id!=0) {l('row'+this.id).classList.add('muted');l('mutedProduct'+this.id).style.display='inline-block';} + else if (this.id!=0) {l('row'+this.id).classList.remove('muted');l('mutedProduct'+this.id).style.display='none';} + //if (!this.onMinigame && !this.muted) {} + //else this.pics=[]; + } + this.rebuild=function() + { + var me=this; + //var classes='product'; + var price=me.bulkPrice; + /*if (Game.cookiesEarned>=me.basePrice || me.bought>0) {classes+=' unlocked';me.locked=0;} else {classes+=' locked';me.locked=1;} + if (Game.cookies>=price) classes+=' enabled'; else classes+=' disabled'; + if (me.l.className.indexOf('toggledOff')!=-1) classes+=' toggledOff'; + */ + var icon=[0,me.icon]; + var iconOff=[1,me.icon]; + if (me.iconFunc) icon=me.iconFunc(); + + var desc=me.desc; + var name=me.dname; + var displayName=me.displayName; + if (Game.season=='fools') + { + if (!Game.foolObjects[me.name]) + { + icon=[2,0]; + iconOff=[3,0]; + name=Game.foolObjects['Unknown'].name; + desc=Game.foolObjects['Unknown'].desc; + } + else + { + icon=[2,me.icon]; + iconOff=[3,me.icon]; + name=Game.foolObjects[me.name].name; + desc=Game.foolObjects[me.name].desc; + } + displayName=name; + //if (name.length>16) displayName=''+name+''; + } + else if (!EN) displayName=name; + //else if (!EN && name.length>16) displayName=''+name+''; + icon=[icon[0]*64,icon[1]*64]; + iconOff=[iconOff[0]*64,iconOff[1]*64]; + + //me.l.className=classes; + //l('productIcon'+me.id).style.backgroundImage='url('+Game.resPath+'img/'+icon+')'; + l('productIcon'+me.id).style.backgroundPosition='-'+icon[0]+'px -'+icon[1]+'px'; + //l('productIconOff'+me.id).style.backgroundImage='url('+Game.resPath+'img/'+iconOff+')'; + l('productIconOff'+me.id).style.backgroundPosition='-'+iconOff[0]+'px -'+iconOff[1]+'px'; + l('productName'+me.id).innerHTML=displayName; + if (name.length>12/Langs[locId].w && (Game.season=='fools' || !EN)) l('productName'+me.id).classList.add('longProductName'); else l('productName'+me.id).classList.remove('longProductName'); + l('productOwned'+me.id).textContent=me.amount?me.amount:''; + l('productPrice'+me.id).textContent=Beautify(Math.round(price)); + l('productPriceMult'+me.id).textContent=(Game.buyBulk>1)?('x'+Game.buyBulk+' '):''; + l('productLevel'+me.id).textContent='lvl '+Beautify(me.level); + if (Game.isMinigameReady(me) && Game.ascensionMode!=1) + { + l('productMinigameButton'+me.id).style.display='block'; + if (!me.onMinigame) l('productMinigameButton'+me.id).textContent=loc("View %1",me.minigameName); + else l('productMinigameButton'+me.id).textContent=loc("Close %1",me.minigameName); + } + else l('productMinigameButton'+me.id).style.display='none'; + if (Game.isMinigameReady(me) && Game.ascensionMode!=1 && me.minigame.dragonBoostTooltip && Game.hasAura('Supreme Intellect')) + { + l('productDragonBoost'+me.id).style.display='block'; + } + else l('productDragonBoost'+me.id).style.display='none'; + } + this.muted=false; + this.mute=function(val) + { + if (this.id==0) return false; + this.muted=val; + if (val) {l('productMute'+this.id).classList.add('on');l('row'+this.id).classList.add('muted');l('mutedProduct'+this.id).style.display='inline-block';} + else {l('productMute'+this.id).classList.remove('on');l('row'+this.id).classList.remove('muted');l('mutedProduct'+this.id).style.display='none';} + }; + + this.draw=function(){}; + + var str=''; + if (this.id!=0) str+='
'; + str+='
'; + str+='
'; + str+='
'; + if (this.id!=0) str+='
'+loc("Mute")+'
('+loc("Minimize this building")+')
','this')+' onclick="Game.ObjectsById['+this.id+'].mute(1);PlaySound(Game.ObjectsById['+this.id+'].muted?\'snd/clickOff2.mp3\':\'snd/clickOn2.mp3\');" id="productMute'+this.id+'">'+loc("Mute")+'
'; + str+=''; + str+='
'; + if (this.id==0) l('sectionLeftExtra').innerHTML=l('sectionLeftExtra').innerHTML+str; + else + { + if (this.id==19) + { + str+=''; + str+=''+loc("Customize")+''; + } + str+=''; + str+='
'; + str+=''; + l('rows').innerHTML=l('rows').innerHTML+str; + + //building canvas + this.pics=[]; + + this.toResize=true; + this.redraw=function() + { + var me=this; + me.pics=[]; + } + this.draw=function() + { + if (this.amount<=0) return false; + if (this.toResize) + { + this.canvas.width=this.canvas.clientWidth; + this.canvas.height=this.canvas.clientHeight; + this.toResize=false; + } + var ctx=this.ctx; + //clear + //ctx.clearRect(0,0,this.canvas.width,this.canvas.height); + ctx.globalAlpha=1; + + //pic : a loaded picture or a function returning a loaded picture + //bg : a loaded picture or a function returning a loaded picture - tiled as the background, 128x128 + //xV : the pictures will have a random horizontal shift by this many pixels + //yV : the pictures will have a random vertical shift by this many pixels + //w : how many pixels between each picture (or row of pictures) + //x : horizontal offset + //y : vertical offset (+32) + //rows : if >1, arrange the pictures in rows containing this many pictures + //frames : if present, slice the pic in [frames] horizontal slices and pick one at random + + var pic=this.art.pic; + if (this.id==19) pic='canvasAdd'; + var bg=this.art.bg; + var xV=this.art.xV||0; + var yV=this.art.yV||0; + var w=this.art.w||48; + var h=this.art.h||48; + var offX=this.art.x||0; + var offY=this.art.y||0; + var rows=this.art.rows||1; + var frames=this.art.frames||1; + + if (typeof(bg)=='string') ctx.fillPattern(Pic(this.art.bg),0,0,this.canvas.width,this.canvas.height,128,128); + else bg(this,ctx); + /* + ctx.globalAlpha=0.5; + if (typeof(bg)=='string')//test + { + ctx.fillPattern(Pic(this.art.bg),-128+Game.T%128,0,this.canvas.width+128,this.canvas.height,128,128); + ctx.fillPattern(Pic(this.art.bg),-128+Math.floor(Game.T/2)%128,-128+Math.floor(Game.T/2)%128,this.canvas.width+128,this.canvas.height+128,128,128); + } + ctx.globalAlpha=1; + */ + var maxI=Math.floor(this.canvas.width/(w/rows)+1); + var iT=Math.min(this.amount,maxI); + var i=this.pics.length; + + + var x=0; + var y=0; + var added=0; + if (i!=iT) + { + //for (var iter=0;iter<3;iter++) + //{ + var prevFrame=0; + while (i1) frame=Math.floor(Math.random()*frames); + if (frames>1) {frame=prevFrame+Math.floor(Math.random()*(frames-1)+1);frame=frame%frames;} + prevFrame=frame; + this.pics.push({x:Math.floor(x),y:Math.floor(y),z:y,pic:usedPic,id:i,frame:frame}); + i++; + added++; + } + while (i>iT) + //else if (i>iT) + { + this.pics.sort(Game.sortSpritesById); + this.pics.pop(); + i--; + added--; + } + //} + this.pics.sort(Game.sortSprites); + } + + var len=this.pics.length; + + if (this.mouseOn) + { + var selected=-1; + if (this.name=='Grandma') + { + var marginW=-18; + var marginH=-10; + for (var i=0;i=pic.x-marginW && this.mousePos[0]=pic.y-marginH && this.mousePos[1]0) + { + var str=loc("Names in white were submitted by our supporters on Patreon."); + ctx.globalAlpha=0.75; + ctx.fillStyle='#000'; + ctx.font='9px Merriweather'; + ctx.textAlign='left'; + ctx.fillRect(0,0,ctx.measureText(str).width+4,12); + ctx.globalAlpha=1; + ctx.fillStyle='rgba(255,255,255,0.7)'; + ctx.fillText(str,2,8); + if (EN) + { + ctx.fillStyle='rgba(255,255,255,1)'; + ctx.fillText('white',2+ctx.measureText('Names in ').width,8); + } + } + } + else if (this.name=='You') + { + var marginW=-16; + var marginH=64; + for (var i=0;i=pic.x-marginW && this.mousePos[0]=pic.y-marginH && this.mousePos[1]0 && Math.random()<0.2) {name=choose(Game.customGrandmaNames);custom=true;} + var text=loc("%1, age %2",[name,Beautify(Math.floor(70+Math.random()*30+years+this.level))]); + var width=ctx.measureText(text).width+12; + var x=Math.max(0,Math.min(pic.x+32-width/2+Math.random()*32-16,this.canvas.width-width)); + var y=4+Math.random()*8-4; + Math.seedrandom(); + ctx.fillStyle='#000'; + ctx.strokeStyle='#000'; + ctx.lineWidth=8; + ctx.globalAlpha=0.75; + ctx.beginPath(); + ctx.moveTo(pic.x+32,pic.y+32); + ctx.lineTo(Math.floor(x+width/2),Math.floor(y+20)); + ctx.stroke(); + ctx.fillRect(Math.floor(x),Math.floor(y),Math.floor(width),24); + ctx.globalAlpha=1; + if (custom) ctx.fillStyle='#fff'; + else ctx.fillStyle='rgba(255,255,255,0.7)'; + ctx.fillText(text,Math.floor(x+width/2),Math.floor(y+16)); + + ctx.drawImage(sprite,Math.floor(pic.x+Math.random()*4-2),Math.floor(pic.y+Math.random()*4-2)); + } + //else if (1) ctx.drawImage(sprite,0,0,sprite.width,sprite.height,pic.x,pic.y,sprite.width,sprite.height); + else if (pic.frame!=-1) ctx.drawImage(sprite,(sprite.width/frames)*pic.frame,0,sprite.width/frames,sprite.height,pic.x,pic.y,(sprite.width/frames),sprite.height); + else ctx.drawImage(sprite,pic.x,pic.y); + + if (selected==i && this.name=='You') + { + ctx.drawImage(Pic('youLight.png'),pic.x+11,0); + + Math.seedrandom(Game.seed+' cloneTitle'); + var cloneTitle=Math.floor(Math.random()*3); + Math.seedrandom(Game.seed+' clone '+pic.id); + ctx.font='9px Merriweather'; + ctx.textAlign='center'; + var text=loc("Clone")+' #'+Math.floor(Math.random()*500+pic.id*500+1); + if (EN) + { + text=[ + text, + Game.bakeryName+' '+romanize(pic.id+2)+(Math.random()<0.05?choose([', Jr.',', Esq.',', Etc.',', Cont\'d',', and so forth']):''), + choose([choose(['Lil\' $','Mini-$','$ '+(pic.id+2),'Attempt '+(pic.id+1),'Experiment '+(pic.id+1),'Not $','$, again','$, the sequel','$ '+(pic.id+2)+' Electric Boogaloo','Also $','$ (remixed)','The Other $','$, The Next Generation','$, part '+romanize(pic.id+2),'Revenge of $','The Return of $','$ reborn','$ in the flesh']),'$ "'+choose(['The Menace','The Artisan','The Relative','The Twin','The Specialist','The Officer','The Snitch','The Simpleton','The Genius','The Conformist','The Mistake','The Accident','Lab-grown','Vat Kid','Photocopy','Cloney','Ditto','Accounted For','Twitchy','Wacky','Zen','Rinse & Repeat','Spitting Image','Passing Resemblance','Nickname','Make It So','Deja-vu','Cookie','Clicky','Orteil','But Better','Guess Who','Transplant Fodder','Furthermore','One More Thing','Liquid','Second Chance','Offspring','Mulligan','Spare Parts'])+'" McClone']).replace('$',Game.bakeryName), + ][cloneTitle]; + } + var width=ctx.measureText(text).width+12; + var x=Math.max(0,Math.min(pic.x+32-width/2,this.canvas.width-width)); + var y=10; + ctx.fillStyle='#000'; + ctx.fillText(text,Math.floor(x+width/2),Math.floor(y)+1); + ctx.fillStyle='#fff'; + ctx.fillText(text,Math.floor(x+width/2),Math.floor(y)); + } + } + + /* + var picX=this.id; + var picY=12; + var w=1; + var h=1; + var w=Math.abs(Math.cos(Game.T*0.2+this.id*2-0.3))*0.2+0.8; + var h=Math.abs(Math.sin(Game.T*0.2+this.id*2))*0.3+0.7; + var x=64+Math.cos(Game.T*0.19+this.id*2)*8-24*w; + var y=128-Math.abs(Math.pow(Math.sin(Game.T*0.2+this.id*2),5)*16)-48*h; + ctx.drawImage(Pic('icons.png'),picX*48,picY*48,48,48,Math.floor(x),Math.floor(y),48*w,48*h); + */ + } + } + + Game.last=this; + Game.Objects[this.name]=this; + Game.ObjectsById.push(this); + Game.ObjectsN++; + return this; + } + + Game.DrawBuildings=function()//draw building displays with canvas + { + if (Game.drawT%3==0) + { + for (var i in Game.Objects) + { + var me=Game.Objects[i]; + if (me.id>0 && !me.onMinigame && !me.muted) me.draw(); + else me.pics=[]; + } + } + } + + Game.sortSprites=function(a,b) + { + if (a.z>b.z) return 1; + else if (a.zb.id) return 1; + else if (a.id'+loc("You can also press %1 to bulk-buy or sell %2 of a building at a time, or %3 for %4.",[''+loc("Ctrl")+'','10',''+loc("Shift")+'','100'])+'' + ,'store')+ + '>'+ + '
'+loc("Buy")+'
'+ + '
'+loc("Sell")+'
'+ + '
1
'+ + '
10
'+ + '
100
'+ + '
'+loc("all")+'
'+ + ''; + for (var i in Game.Objects) + { + var me=Game.Objects[i]; + str+=(Game.prefs.screenreader?'':''); + } + l('products').innerHTML=str; + + Game.storeBulkButton(-1); + + /*var SellAllPrompt=function(id) + { + return function(id){Game.Prompt('
Do you really want to sell your '+loc("%1 "+Game.ObjectsById[id].bsingle,LBeautify(Game.ObjectsById[id].amount))+'?
',[['Yes','Game.ObjectsById['+id+'].sell(-1);Game.ClosePrompt();'],['No','Game.ClosePrompt();']]);}(id); + }*/ + + for (var i in Game.Objects) + { + var me=Game.Objects[i]; + me.l=l('product'+me.id); + + //these are a bit messy but ah well + if (!Game.touchEvents) + { + AddEvent(me.l,'click',function(what){return function(e){Game.ClickProduct(what);e.preventDefault();};}(me.id)); + } + else + { + AddEvent(me.l,'touchend',function(what){return function(e){Game.ClickProduct(what);e.preventDefault();};}(me.id)); + } + } + } + + Game.ClickProduct=function(what) + { + Game.ObjectsById[what].buy(); + } + + Game.RefreshStore=function()//refresh the store's buildings + { + for (var i in Game.Objects) + { + Game.Objects[i].refresh(); + } + Game.storeToRefresh=0; + } + + Game.ComputeCps=function(base,mult,bonus) + { + if (!bonus) bonus=0; + return ((base)*(Math.pow(2,mult))+bonus); + } + + Game.isMinigameReady=function(me) + {return (me.minigameUrl && me.minigameLoaded && me.level>0);} + Game.scriptBindings=[]; + Game.showedScriptLoadError=false; + Game.LoadMinigames=function()//load scripts for each minigame + { + for (var i in Game.Objects) + { + var me=Game.Objects[i]; + if (me.minigameUrl && me.level>0 && !me.minigameLoaded && !me.minigameLoading && !l('minigameScript-'+me.id)) + { + me.minigameLoading=true; + //we're only loading the minigame scripts that aren't loaded yet and which have enough building level + //we call this function on building level up and on load + //console.log('Loading script '+me.minigameUrl+'...'); + setTimeout(function(me){return function(){ + var script=document.createElement('script'); + script.id='minigameScript-'+me.id; + Game.scriptBindings['minigameScript-'+me.id]=me; + script.setAttribute('src',me.minigameUrl+'?r='+Game.version); + script.onload=function(me,script){return function(){ + if (!me.minigameLoaded) Game.scriptLoaded(me,script); + }}(me,'minigameScript-'+me.id); + script.onerror=function(me,script){return function(){ + me.minigameLoading=false; + if (!me.minigameLoaded && !Game.showedScriptLoadError) + { + Game.showedScriptLoadError=true; + Game.Notify(loc("Error!"),'Couldn\'t load minigames. Try reloading.'); + } + }}(me,'minigameScript-'+me.id); + document.head.appendChild(script); + }}(me),10); + } + } + } + Game.scriptLoaded=function(who,script) + { + who.minigameLoading=false; + who.minigameLoaded=true; + who.refresh(); + who.minigame.launch(); + if (who.minigameSave) {who.minigame.reset(true);who.minigame.load(who.minigameSave);who.minigameSave=0;} + } + + Game.magicCpS=function(what) + { + /* + if (Game.Objects[what].amount>=250) + { + //this makes buildings give 1% more cookies for every building over 250. + //this turns out to be rather stupidly overpowered. + var n=Game.Objects[what].amount-250; + return 1+Math.pow(1.01,n); + } + else return 1; + */ + return 1; + } + + //define objects + new Game.Object('Cursor','cursor|cursors|clicked|[X] extra finger|[X] extra fingers','Autoclicks once every 10 seconds.',0,0,{},15,function(me){ + var add=0; + if (Game.Has('Thousand fingers')) add+= 0.1; + if (Game.Has('Million fingers')) add*= 5; + if (Game.Has('Billion fingers')) add*= 10; + if (Game.Has('Trillion fingers')) add*= 20; + if (Game.Has('Quadrillion fingers')) add*= 20; + if (Game.Has('Quintillion fingers')) add*= 20; + if (Game.Has('Sextillion fingers')) add*= 20; + if (Game.Has('Septillion fingers')) add*= 20; + if (Game.Has('Octillion fingers')) add*= 20; + if (Game.Has('Nonillion fingers')) add*= 20; + if (Game.Has('Decillion fingers')) add*= 20; + if (Game.Has('Undecillion fingers')) add*= 20; + if (Game.Has('Unshackled cursors')) add*= 25; + var mult=1; + var num=0; + for (var i in Game.Objects) {if (Game.Objects[i].name!='Cursor') num+=Game.Objects[i].amount;} + add=add*num; + mult*=Game.GetTieredCpsMult(me); + mult*=Game.magicCpS('Cursor'); + mult*=Game.eff('cursorCps'); + return Game.ComputeCps(0.1,Game.Has('Reinforced index finger')+Game.Has('Carpal tunnel prevention cream')+Game.Has('Ambidextrous'),add)*mult; + },function(){ + if (this.amount>=1) Game.Unlock(['Reinforced index finger','Carpal tunnel prevention cream']); + if (this.amount>=10) Game.Unlock('Ambidextrous'); + if (this.amount>=25) Game.Unlock('Thousand fingers'); + if (this.amount>=50) Game.Unlock('Million fingers'); + if (this.amount>=100) Game.Unlock('Billion fingers'); + if (this.amount>=150) Game.Unlock('Trillion fingers'); + if (this.amount>=200) Game.Unlock('Quadrillion fingers'); + if (this.amount>=250) Game.Unlock('Quintillion fingers'); + if (this.amount>=300) Game.Unlock('Sextillion fingers'); + if (this.amount>=350) Game.Unlock('Septillion fingers'); + if (this.amount>=400) Game.Unlock('Octillion fingers'); + if (this.amount>=450) Game.Unlock('Nonillion fingers'); + if (this.amount>=500) Game.Unlock('Decillion fingers'); + if (this.amount>=550) Game.Unlock('Undecillion fingers'); + + if (this.amount>=1) Game.Win('Click');if (this.amount>=2) Game.Win('Double-click');if (this.amount>=50) Game.Win('Mouse wheel');if (this.amount>=100) Game.Win('Of Mice and Men');if (this.amount>=200) Game.Win('The Digital');if (this.amount>=300) Game.Win('Extreme polydactyly');if (this.amount>=400) Game.Win('Dr. T');if (this.amount>=500) Game.Win('Thumbs, phalanges, metacarpals');if (this.amount>=600) Game.Win('With her finger and her thumb');if (this.amount>=700) Game.Win('Gotta hand it to you');if (this.amount>=800) Game.Win('The devil\'s workshop');if (this.amount>=900) Game.Win('All on deck');if (this.amount>=1000) Game.Win('A round of applause'); + }); + + Game.SpecialGrandmaUnlock=15; + new Game.Object('Grandma','grandma|grandmas|baked|Grandmas are [X] year older|Grandmas are [X] years older','A nice grandma to bake more cookies.',1,1,{pic:function(i){ + var list=['grandma']; + if (Game.Has('Farmer grandmas')) list.push('farmerGrandma'); + if (Game.Has('Worker grandmas')) list.push('workerGrandma'); + if (Game.Has('Miner grandmas')) list.push('minerGrandma'); + if (Game.Has('Cosmic grandmas')) list.push('cosmicGrandma'); + if (Game.Has('Transmuted grandmas')) list.push('transmutedGrandma'); + if (Game.Has('Altered grandmas')) list.push('alteredGrandma'); + if (Game.Has('Grandmas\' grandmas')) list.push('grandmasGrandma'); + if (Game.Has('Antigrandmas')) list.push('antiGrandma'); + if (Game.Has('Rainbow grandmas')) list.push('rainbowGrandma'); + if (Game.Has('Banker grandmas')) list.push('bankGrandma'); + if (Game.Has('Priestess grandmas')) list.push('templeGrandma'); + if (Game.Has('Witch grandmas')) list.push('witchGrandma'); + if (Game.Has('Lucky grandmas')) list.push('luckyGrandma'); + if (Game.Has('Metagrandmas')) list.push('metaGrandma'); + if (Game.Has('Script grannies')) list.push('scriptGrandma'); + if (Game.Has('Alternate grandmas')) list.push('alternateGrandma'); + if (Game.Has('Brainy grandmas')) list.push('brainyGrandma'); + if (Game.Has('Clone grandmas')) list.push('cloneGrandma'); + if (Game.season=='christmas') list.push('elfGrandma'); + if (Game.season=='easter') list.push('bunnyGrandma'); + return choose(list)+'.png'; + },bg:'grandmaBackground.png',xV:8,yV:8,w:32,rows:3,x:0,y:16},100,function(me){ + var mult=1; + for (var i in Game.GrandmaSynergies) + { + if (Game.Has(Game.GrandmaSynergies[i])) mult*=2; + } + if (Game.Has('Bingo center/Research facility')) mult*=4; + if (Game.Has('Ritual rolling pins')) mult*=2; + if (Game.Has('Naughty list')) mult*=2; + + if (Game.Has('Elderwort biscuits')) mult*=1.02; + + mult*=Game.eff('grandmaCps'); + + if (Game.Has('Cat ladies')) + { + for (var i=0;i0) return [3,2]; + return grandmaIcons[Game.elderWrath]; + }; + + + new Game.Object('Farm','farm|farms|harvested|[X] more acre|[X] more acres','Grows cookie plants from cookie seeds.',3,2,{base:'farm',xV:8,yV:8,w:64,rows:2,x:0,y:16},500,function(me){ + var mult=1; + mult*=Game.GetTieredCpsMult(me); + mult*=Game.magicCpS(me.name); + return me.baseCps*mult; + },function(){ + Game.UnlockTiered(this); + if (this.amount>=Game.SpecialGrandmaUnlock && Game.Objects['Grandma'].amount>0) Game.Unlock(this.grandma.name); + }); + Game.last.minigameUrl='minigameGarden.js'; + Game.last.minigameName=loc("Garden"); + + new Game.Object('Mine','mine|mines|mined|[X] mile deeper|[X] miles deeper','Mines out cookie dough and chocolate chips.',4,3,{base:'mine',xV:16,yV:16,w:64,rows:2,x:0,y:24},10000,function(me){ + var mult=1; + mult*=Game.GetTieredCpsMult(me); + mult*=Game.magicCpS(me.name); + return me.baseCps*mult; + },function(){ + Game.UnlockTiered(this); + if (this.amount>=Game.SpecialGrandmaUnlock && Game.Objects['Grandma'].amount>0) Game.Unlock(this.grandma.name); + }); + + new Game.Object('Factory','factory|factories|mass-produced|[X] additional patent|[X] additional patents','Produces large quantities of cookies.',5,4,{base:'factory',xV:8,yV:0,w:64,rows:1,x:0,y:-22},3000,function(me){ + var mult=1; + mult*=Game.GetTieredCpsMult(me); + mult*=Game.magicCpS(me.name); + return me.baseCps*mult; + },function(){ + Game.UnlockTiered(this); + if (this.amount>=Game.SpecialGrandmaUnlock && Game.Objects['Grandma'].amount>0) Game.Unlock(this.grandma.name); + }); + //Game.last.minigameUrl='minigameDungeon.js';//not yet + Game.last.minigameName=loc("Dungeon"); + + new Game.Object('Bank','bank|banks|banked|Interest rates [X]% better|Interest rates [X]% better','Generates cookies from interest.',6,15,{base:'bank',xV:8,yV:4,w:56,rows:1,x:0,y:13},0,function(me){ + var mult=1; + mult*=Game.GetTieredCpsMult(me); + mult*=Game.magicCpS(me.name); + return me.baseCps*mult; + },function(){ + Game.UnlockTiered(this); + if (this.amount>=Game.SpecialGrandmaUnlock && Game.Objects['Grandma'].amount>0) Game.Unlock(this.grandma.name); + }); + Game.last.minigameUrl='minigameMarket.js'; + Game.last.minigameName=loc("Stock Market"); + + new Game.Object('Temple','temple|temples|discovered|[X] sacred artifact retrieved|[X] sacred artifacts retrieved','Full of precious, ancient chocolate.',7,16,{base:'temple',xV:8,yV:4,w:72,rows:2,x:0,y:-5},0,function(me){ + var mult=1; + mult*=Game.GetTieredCpsMult(me); + mult*=Game.magicCpS(me.name); + return me.baseCps*mult; + },function(){ + Game.UnlockTiered(this); + if (this.amount>=Game.SpecialGrandmaUnlock && Game.Objects['Grandma'].amount>0) Game.Unlock(this.grandma.name); + }); + Game.last.minigameUrl='minigamePantheon.js'; + Game.last.minigameName=loc("Pantheon"); + + new Game.Object('Wizard tower','wizard tower|wizard towers|summoned|Incantations have [X] more syllable|Incantations have [X] more syllables','Summons cookies with magic spells.',8,17,{base:'wizardtower',xV:16,yV:16,w:48,rows:2,x:0,y:20},0,function(me){ + var mult=1; + mult*=Game.GetTieredCpsMult(me); + mult*=Game.magicCpS(me.name); + return me.baseCps*mult; + },function(){ + Game.UnlockTiered(this); + if (this.amount>=Game.SpecialGrandmaUnlock && Game.Objects['Grandma'].amount>0) Game.Unlock(this.grandma.name); + }); + Game.last.displayName='Wizard tower';//shrink + Game.last.minigameUrl='minigameGrimoire.js'; + Game.last.minigameName=loc("Grimoire"); + + new Game.Object('Shipment','shipment|shipments|shipped|[X] galaxy fully explored|[X] galaxies fully explored','Brings in fresh cookies from the cookie planet.',9,5,{base:'shipment',xV:16,yV:16,w:64,rows:1,x:0,y:0},40000,function(me){ + var mult=1; + mult*=Game.GetTieredCpsMult(me); + mult*=Game.magicCpS(me.name); + return me.baseCps*mult; + },function(){ + Game.UnlockTiered(this); + if (this.amount>=Game.SpecialGrandmaUnlock && Game.Objects['Grandma'].amount>0) Game.Unlock(this.grandma.name); + }); + + new Game.Object('Alchemy lab','alchemy lab|alchemy labs|transmuted|[X] primordial element mastered|[X] primordial elements mastered','Turns gold into cookies!',10,6,{base:'alchemylab',xV:16,yV:16,w:64,rows:2,x:0,y:16},200000,function(me){ + var mult=1; + mult*=Game.GetTieredCpsMult(me); + mult*=Game.magicCpS(me.name); + return me.baseCps*mult; + },function(){ + Game.UnlockTiered(this); + if (this.amount>=Game.SpecialGrandmaUnlock && Game.Objects['Grandma'].amount>0) Game.Unlock(this.grandma.name); + }); + Game.last.displayName='Alchemy lab';//shrink + + new Game.Object('Portal','portal|portals|retrieved|[X] dimension enslaved|[X] dimensions enslaved','Opens a door to the Cookieverse.',11,7,{base:'portal',xV:32,yV:32,w:64,rows:2,x:0,y:0},1666666,function(me){ + var mult=1; + mult*=Game.GetTieredCpsMult(me); + mult*=Game.magicCpS(me.name); + return me.baseCps*mult; + },function(){ + Game.UnlockTiered(this); + if (this.amount>=Game.SpecialGrandmaUnlock && Game.Objects['Grandma'].amount>0) Game.Unlock(this.grandma.name); + }); + + new Game.Object('Time machine','time machine|time machines|recovered|[X] century secured|[X] centuries secured','Brings cookies from the past, before they were even eaten.',12,8,{base:'timemachine',xV:32,yV:32,w:64,rows:1,x:0,y:0},123456789,function(me){ + var mult=1; + mult*=Game.GetTieredCpsMult(me); + mult*=Game.magicCpS(me.name); + return me.baseCps*mult; + },function(){ + Game.UnlockTiered(this); + if (this.amount>=Game.SpecialGrandmaUnlock && Game.Objects['Grandma'].amount>0) Game.Unlock(this.grandma.name); + }); + Game.last.displayName='Time machine';//shrink + + new Game.Object('Antimatter condenser','antimatter condenser|antimatter condensers|condensed|[X] extra quark flavor|[X] extra quark flavors','Condenses the antimatter in the universe into cookies.',13,13,{base:'antimattercondenser',xV:0,yV:64,w:64,rows:1,x:0,y:0},3999999999,function(me){ + var mult=1; + mult*=Game.GetTieredCpsMult(me); + mult*=Game.magicCpS(me.name); + return me.baseCps*mult; + },function(){ + Game.UnlockTiered(this); + if (this.amount>=Game.SpecialGrandmaUnlock && Game.Objects['Grandma'].amount>0) Game.Unlock(this.grandma.name); + }); + Game.last.displayName='Antim. condenser';//shrink + + new Game.Object('Prism','prism|prisms|converted|[X] new color discovered|[X] new colors discovered','Converts light itself into cookies.',14,14,{base:'prism',xV:16,yV:4,w:64,rows:1,x:0,y:20},75000000000,function(me){ + var mult=1; + mult*=Game.GetTieredCpsMult(me); + mult*=Game.magicCpS(me.name); + return me.baseCps*mult; + },function(){ + Game.UnlockTiered(this); + if (this.amount>=Game.SpecialGrandmaUnlock && Game.Objects['Grandma'].amount>0) Game.Unlock(this.grandma.name); + }); + + new Game.Object('Chancemaker','chancemaker|chancemakers|spontaneously generated|Chancemakers are powered by [X]-leaf clovers|Chancemakers are powered by [X]-leaf clovers','Generates cookies out of thin air through sheer luck.',15,19,{base:'chancemaker',xV:8,yV:64,w:64,rows:1,x:0,y:0,rows:2},77777777777,function(me){ + var mult=1; + mult*=Game.GetTieredCpsMult(me); + mult*=Game.magicCpS(me.name); + return me.baseCps*mult; + },function(){ + Game.UnlockTiered(this); + if (this.amount>=Game.SpecialGrandmaUnlock && Game.Objects['Grandma'].amount>0) Game.Unlock(this.grandma.name); + }); + Game.last.displayName='Chancemaker';//shrink + + new Game.Object('Fractal engine','fractal engine|fractal engines|made from cookies|[X] iteration deep|[X] iterations deep','Turns cookies into even more cookies.',16,20,{base:'fractalEngine',xV:8,yV:64,w:64,rows:1,x:0,y:0},12345678987654321,function(me){ + var mult=1; + mult*=Game.GetTieredCpsMult(me); + mult*=Game.magicCpS(me.name); + return me.baseCps*mult; + },function(){ + Game.UnlockTiered(this); + if (this.amount>=Game.SpecialGrandmaUnlock && Game.Objects['Grandma'].amount>0) Game.Unlock(this.grandma.name); + }); + Game.last.displayName='Fractal engine';//shrink + + new Game.Object('Javascript console','javascript console|javascript consoles|programmed|Equipped with [X] external library|Equipped with [X] external libraries','Creates cookies from the very code this game was written in.',17,32,{base:'javascriptconsole',xV:8,yV:64,w:14,rows:1,x:8,y:-32,frames:2},12345678987654321,function(me){ + var mult=1; + mult*=Game.GetTieredCpsMult(me); + mult*=Game.magicCpS(me.name); + return me.baseCps*mult; + },function(){ + Game.UnlockTiered(this); + if (this.amount>=Game.SpecialGrandmaUnlock && Game.Objects['Grandma'].amount>0) Game.Unlock(this.grandma.name); + }); + Game.last.displayName='Javascript console';//shrink + + new Game.Object('Idleverse','idleverse|idleverses|hijacked|[X] manifold|[X] manifolds','There\'s been countless other idle universes running alongside our own. You\'ve finally found a way to hijack their production and convert whatever they\'ve been making into cookies!',18,33,{base:'idleverse',xV:8,yV:96,w:48,rows:2,x:0,y:0,frames:4},12345678987654321,function(me){ + var mult=1; + mult*=Game.GetTieredCpsMult(me); + mult*=Game.magicCpS(me.name); + return me.baseCps*mult; + },function(){ + Game.UnlockTiered(this); + if (this.amount>=Game.SpecialGrandmaUnlock && Game.Objects['Grandma'].amount>0) Game.Unlock(this.grandma.name); + }); + + new Game.Object('Cortex baker','cortex baker|cortex bakers|imagined|[X] extra IQ point|[X] extra IQ points','These artificial brains the size of planets are capable of simply dreaming up cookies into existence. Time and space are inconsequential. Reality is arbitrary.',19,34,{base:'cortex',xV:8,yV:96,w:48,rows:1,x:0,y:0,frames:4},12345678987654321,function(me){ + var mult=1; + mult*=Game.GetTieredCpsMult(me); + mult*=Game.magicCpS(me.name); + return me.baseCps*mult; + },function(){ + Game.UnlockTiered(this); + if (this.amount>=Game.SpecialGrandmaUnlock && Game.Objects['Grandma'].amount>0) Game.Unlock(this.grandma.name); + }); + + new Game.Object('You','You|You|cloned|[X] optimized gene|[X] optimized genes','You, alone, are the reason behind all these cookies. You figure if there were more of you... maybe you could make even more.',20,35,{pic:'you.png',bg:'youBackground.png',xV:0,yV:0,w:64,rows:2,x:0,y:0},12345678987654321,function(me){ + var mult=1; + mult*=Game.GetTieredCpsMult(me); + mult*=Game.magicCpS(me.name); + return me.baseCps*mult; + },function(){ + Game.UnlockTiered(this); + if (this.amount>=Game.SpecialGrandmaUnlock && Game.Objects['Grandma'].amount>0) Game.Unlock(this.grandma.name); + }); + Game.YouCustomizer={}; + Game.YouCustomizer.render=function() + { + var me=Game.Objects['You']; + var ctx=me.ctxAdd; + var img='you.png'; + var imgAddons='youAddons.png?v='+Game.version; + + Game.Loader.waitForLoad([img,imgAddons],function(){ + //accessing pixel data not allowed locally; set img and imgAddons to base64-encoded image strings for testing + if (!App && (Game.local)) + { + ctx.drawImage(Pic(img),0,0); + } + else + { + ctx.drawImage(Pic(img),0,0); + var canvasAddon=document.createElement('canvas'); + canvasAddon.width=32; + canvasAddon.height=32; + ctxAddon=canvasAddon.getContext('2d'); + var canvasCols=document.createElement('canvas'); + var colsN=64; + canvasCols.width=8; + canvasCols.height=colsN; + var ctxCols=canvasCols.getContext('2d'); + ctxCols.drawImage(Pic(imgAddons),0,0,8,colsN,0,0,8,colsN); + var imgDataCols=ctxCols.getImageData(0,0,8,colsN); + var dataCols=imgDataCols.data; + var cols=[]; + for (var i=0;i0) typeOr=1;//is skin + else if (indShadeOr==-1) + { + indShadeOr=colHair.indexOf(ro*1000000+go*1000+bo); + if (indShadeOr>0) typeOr=2;//is hair + } + + if (shade>0 && indShadeOr>0)//painting shadow on hair or skin + {//light blue: shade one stage; dark blue: shade 2 stages + var colOut=(typeOr==1?colSkinFull:typeOr==2?colHairFull:0)[Math.max(0,indShadeOr-shade)]; + data[off]=colOut[0];data[off+1]=colOut[1];data[off+2]=colOut[2];data[off+3]=a; + } + else if (shade==0) {data[off]=r;data[off+1]=g;data[off+2]=b;data[off+3]=a;} + } + x++; + if (x>=32) {x=0;y++;} + } + } + + //recolor hair and skin on final image + var skinCol=Game.YouCustomizer.getGeneValue('skinCol'); + var hairCol=Game.YouCustomizer.getGeneValue('hairCol'); + for (i=0;i0) + { + var col=cols[skinCol][indSkin-1]; + data[i]=col[0];data[i+1]=col[1];data[i+2]=col[2]; + } + else + { + var indHair=colHair.indexOf(r*1000000+g*1000+b); + if (indHair>0) + { + var col=cols[hairCol][indHair-1]; + data[i]=col[0];data[i+1]=col[1];data[i+2]=col[2]; + } + } + } + } + ctx.putImageData(imgData,0,0); + } + }); + } + Game.YouCustomizer.genes=[ + {id:'hair',isList:true,def:0,choices:[ + [0,0],[1,0],[2,0],[3,0],[4,0],[2,1],[3,1],[4,1],[4,2],[5,3],[8,2],[7,1],[5,5],[4,5],[10,0],[9,1],[9,2], + ]}, + {id:'hairCol',isList:true,def:1,choices:[20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37]}, + {id:'skinCol',isList:true,def:0,choices:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]}, + {id:'head',isList:true,def:0,choices:[ + [0,0],[1,1],[0,1],[4,3],[10,3], + ]}, + {id:'face',isList:true,def:0,choices:[ + [3,5],[0,0],[0,2],[1,2],[2,2],[3,2],[0,3],[1,3],[2,3],[3,3], + ]}, + {id:'acc1',isList:true,def:0,choices:[ + [0,0],[5,1],[5,0],[5,2],[0,4],[1,4],[2,4],[6,4],[8,5],[3,4],[7,5],[6,0],[6,1],[4,4],[5,4],[2,5],[7,4],[0,5],[1,5],[6,5],[6,2],[6,3],[7,0],[7,2],[7,3],[8,1],[8,3],[8,4],[9,3],[9,0],[10,1],[10,2],[9,4],[9,5],[10,4],[10,5], + ]}, + {id:'acc2',isList:true,def:0,choices:[ + [] + ]}, + ]; + Game.YouCustomizer.save=function() + { + return Game.YouCustomizer.currentGenes.join(','); + } + Game.YouCustomizer.load=function(genes,noReset) + { + if (!noReset) Game.YouCustomizer.resetGenes(); + if (genes) + { + genes=genes.split(','); + for (var i=0;i=gene.choices.length)) continue; + else if (!gene.isList && (valgene.choices[1])) continue; + else Game.YouCustomizer.currentGenes[i]=val; + } + } + return true; + } + else return false; + } + Game.YouCustomizer.genesById={};for (var i=0;i=gene.choices.length) Game.YouCustomizer.currentGenes[gene.n]=0; + else if (Game.YouCustomizer.currentGenes[gene.n]<0) Game.YouCustomizer.currentGenes[gene.n]=gene.choices.length-1; + if (l('customizerSelect-N-'+gene.id)) l('customizerSelect-N-'+gene.id).innerHTML=Game.YouCustomizer.currentGenes[gene.n]+1; + } + else + { + if (Game.YouCustomizer.currentGenes[gene.n]>gene.choices[1]) Game.YouCustomizer.currentGenes[gene.n]=gene.choices[0]; + else if (Game.YouCustomizer.currentGenes[gene.n]'+loc("Export")+'
',[[loc("Done"),'Game.YouCustomizer.prompt();']]); + l('textareaPrompt').focus();l('textareaPrompt').select(); + } + Game.YouCustomizer.import=function(def) + { + //1,14,6,0,6,29,30 + //2,13,1,0,6,10,9 + Game.Prompt('

'+loc("Import")+'

',[[loc("Load"),'if (l(\'textareaPrompt\').value.length==0){return false;}if (Game.YouCustomizer.load(l(\'textareaPrompt\').value,true)){Game.YouCustomizer.prompt();}else{l(\'importError\').innerHTML=\'(\'+loc("Error!")+\')\';}'],[loc("Nevermind"),'Game.YouCustomizer.prompt();']]); + l('textareaPrompt').focus(); + } + Game.YouCustomizer.prompt=function() + { + var makeCustomizerSelector=function(gene,text) + { + gene=Game.YouCustomizer.genesById[gene]; + return '
<'+text+'
'+(gene.isList?(Game.YouCustomizer.currentGenes[gene.n]+1):(Game.YouCustomizer.currentGenes[gene.n]+1-gene.choices[0]))+'
>
'; + } + Game.Prompt('

'+loc("Customize your clones")+'

'+loc("Sprung from your very DNA. Shape them in your image!")+'
'+ + ''+loc("Import")+''+ + ''+loc("Export")+''+ + '
'+ + '
'+ + ''+loc("Random")+'
'+ + makeCustomizerSelector('hair',loc("Hair"))+ + makeCustomizerSelector('hairCol',loc("Hair color"))+ + makeCustomizerSelector('skinCol',loc("Skin color"))+ + makeCustomizerSelector('head',loc("Head shape"))+ + makeCustomizerSelector('face',loc("Face"))+ + makeCustomizerSelector('acc1',loc("Extra")+'-A')+ + makeCustomizerSelector('acc2',loc("Extra")+'-B')+ + '
'+ + '',[loc("Done")]); + Game.YouCustomizer.render(); + Game.YouCustomizer.renderPortrait(); + } + + Game.foolObjects={ + 'Unknown':{name:'Investment',desc:'You\'re not sure what this does, you just know it means profit.',icon:0}, + 'Cursor':{name:'Rolling pin',desc:'Essential in flattening dough. The first step in cookie-making.',icon:0}, + 'Grandma':{name:'Oven',desc:'A crucial element of baking cookies.',icon:1}, + 'Farm':{name:'Kitchen',desc:'The more kitchens, the more cookies your employees can produce.',icon:2}, + 'Mine':{name:'Secret recipe',desc:'These give you the edge you need to outsell those pesky competitors.',icon:3}, + 'Factory':{name:'Factory',desc:'Mass production is the future of baking. Seize the day, and synergize!',icon:4}, + 'Bank':{name:'Investor',desc:'Business folks with a nose for profit, ready to finance your venture as long as there\'s money to be made.',icon:5}, + 'Temple':{name:'Like',desc:'Your social media page is going viral! Amassing likes is the key to a lasting online presence and juicy advertising deals.',icon:9}, + 'Wizard tower':{name:'Meme',desc:'Cookie memes are all the rage! With just the right amount of social media astroturfing, your brand image will be all over the cyberspace.',icon:6}, + 'Shipment':{name:'Supermarket',desc:'A gigantic cookie emporium - your very own retail chain.',icon:7}, + 'Alchemy lab':{name:'Stock share',desc:'You\'re officially on the stock market, and everyone wants a piece!',icon:8}, + 'Portal':{name:'TV show',desc:'Your cookies have their own sitcom! Hilarious baking hijinks set to the cheesiest laughtrack.',icon:10}, + 'Time machine':{name:'Theme park',desc:'Cookie theme parks, full of mascots and roller-coasters. Build one, build a hundred!',icon:11}, + 'Antimatter condenser':{name:'Cookiecoin',desc:'A virtual currency, already replacing regular money in some small countries.',icon:12}, + 'Prism':{name:'Corporate country',desc:'You\'ve made it to the top, and you can now buy entire nations to further your corporate greed. Godspeed.',icon:13}, + 'Chancemaker':{name:'Privatized planet',desc:'Actually, you know what\'s cool? A whole planet dedicated to producing, advertising, selling, and consuming your cookies.',icon:15}, + 'Fractal engine':{name:'Senate seat',desc:'Only through political dominion can you truly alter this world to create a brighter, more cookie-friendly future.',icon:16}, + 'Javascript console':{name:'Doctrine',desc:'Taking many forms -religion, culture, philosophy- a doctrine may, when handled properly, cause a lasting impact on civilizations, reshaping minds and people and ensuring all future generations share a singular goal - the production, and acquisition, of more cookies.',icon:17}, + 'Idleverse':{name:'Lateral expansions',desc:'Sometimes the best way to keep going up is sideways. Diversify your ventures through non-cookie investments.',icon:18}, + 'Cortex baker':{name:'Think tank',desc:'There\'s only so many ways you can bring in more profit. Or is there? Hire the most brilliant experts in the known universe and let them scrape their brains for you!',icon:19}, + 'You':{name:'You',desc:'Your business is as great as it\'s gonna get. The only real way to improve it anymore is to improve yourself - and become the best Chief Executive Officer this world has ever seen.',icon:20}, + }; + + if (true)//if (!EN) + { + Game.foolObjects['Unknown'].name=loc("Investment"); + Game.foolObjects['Unknown'].desc=loc("You're not sure what this does, you just know it means profit."); + for (var i in Game.Objects) + { + Game.foolObjects[i].name=loc(FindLocStringByPart(Game.Objects[i].name+' business name'))||Game.foolObjects[i].name; + Game.foolObjects[i].desc=loc(FindLocStringByPart(Game.Objects[i].name+' business quote'))||Game.foolObjects[i].desc; + } + } + + //build store + Game.BuildStore(); + + //build master bar + var str=''; + str+='
'; + str+='
'; + l('buildingsMaster').innerHTML=str; + + //build object displays + var muteStr='
'+loc("Muted:")+'
'; + for (var i in Game.Objects) + { + var me=Game.Objects[i]; + + if (locStrings[me.name+' (short)']) me.displayName=loc(me.name+' (short)'); + + if (me.id>0) + { + me.canvas=l('rowCanvas'+me.id); + me.ctx=me.canvas.getContext('2d',{alpha:false}); + if (me.id==19) + { + me.canvasAdd=l('rowCanvasAdd'+me.id); + me.ctxAdd=me.canvasAdd.getContext('2d'); + Game.YouCustomizer.render(); + } + me.pics=[]; + var icon=[0*64,me.icon*64]; + muteStr+=''; + //muteStr+='')+'>
'; + + AddEvent(me.canvas,'mouseover',function(me){return function(){me.mouseOn=true;}}(me)); + AddEvent(me.canvas,'mouseout',function(me){return function(){me.mouseOn=false;}}(me)); + AddEvent(me.canvas,'mousemove',function(me){return function(e){var box=this.getBounds();me.mousePos[0]=e.pageX-box.left;me.mousePos[1]=e.pageY-box.top;}}(me)); + } + } + Game.mutedBuildingTooltip=function(id) + { + return function(){ + var me=Game.ObjectsById[id]; + return '
'+(EN?(''+cap(me.plural)+(me.level>0?' (lvl. '+me.level+')':'')+'
Click to unmute '+me.plural+'
(display this building)'):(''+loc("Level %1 %2",[Beautify(me.level),me.plural])+'
'+loc("Click to unmute")))+'
'; + } + } + l('buildingsMute').innerHTML=muteStr; + + /*===================================================================================== + UPGRADES + =======================================================================================*/ + Game.upgradesToRebuild=1; + Game.Upgrades={}; + Game.UpgradesById={}; + Game.UpgradesN=0; + Game.UpgradesInStore=[]; + Game.UpgradesOwned=0; + Game.Upgrade=function(name,desc,price,icon,buyFunction) + { + this.id=Game.UpgradesN; + this.name=name; + this.dname=this.name; + this.desc=desc; + this.baseDesc=this.desc; + this.basePrice=price; + this.priceLumps=0;//note : doesn't do much on its own, you still need to handle the buying yourself + this.icon=icon; + this.iconFunction=0; + this.buyFunction=buyFunction; + /*this.unlockFunction=unlockFunction; + this.unlocked=(this.unlockFunction?0:1);*/ + this.unlocked=0; + this.bought=0; + this.order=this.id; + if (order) this.order=order+this.id*0.001; + this.pool='';//can be '', cookie, toggle, debug, prestige, prestigeDecor, tech, or unused + if (pool) this.pool=pool; + this.power=0; + if (power) this.power=power; + this.vanilla=Game.vanilla; + this.unlockAt=0; + this.techUnlock=[]; + this.parents=[]; + this.type='upgrade'; + this.tier=0; + this.buildingTie=0;//of what building is this a tiered upgrade of ? + + Game.last=this; + Game.Upgrades[this.name]=this; + Game.UpgradesById[this.id]=this; + Game.UpgradesN++; + return this; + } + Game.Upgrade.prototype.getType=function(){return 'Upgrade';} + + Game.Upgrade.prototype.getPrice=function() + { + var price=this.basePrice; + if (this.priceFunc) price=this.priceFunc(this); + if (price==0) return 0; + if (this.pool!='prestige') + { + if (Game.Has('Toy workshop')) price*=0.95; + if (Game.Has('Five-finger discount')) price*=Math.pow(0.99,Game.Objects['Cursor'].amount/100); + if (Game.Has('Santa\'s dominion')) price*=0.98; + if (Game.Has('Faberge egg')) price*=0.99; + if (Game.Has('Divine sales')) price*=0.99; + if (Game.Has('Fortune #100')) price*=0.99; + if (this.kitten && Game.Has('Kitten wages')) price*=0.9; + if (Game.hasBuff('Haggler\'s luck')) price*=0.98; + if (Game.hasBuff('Haggler\'s misery')) price*=1.02; + //if (Game.hasAura('Master of the Armory')) price*=0.98; + price*=1-Game.auraMult('Master of the Armory')*0.02; + price*=Game.eff('upgradeCost'); + if (this.pool=='cookie' && Game.Has('Divine bakeries')) price/=5; + } + return Math.ceil(price); + } + + Game.Upgrade.prototype.canBuy=function() + { + if (this.canBuyFunc) return this.canBuyFunc(); + if (Game.cookies>=this.getPrice()) return true; else return false; + } + + Game.storeBuyAll=function() + { + if (!Game.Has('Inspired checklist')) return false; + for (var i in Game.UpgradesInStore) + { + var me=Game.UpgradesInStore[i]; + if (!me.isVaulted() && me.pool!='toggle' && me.pool!='tech') me.buy(1); + } + } + + Game.vault=[]; + Game.Upgrade.prototype.isVaulted=function() + { + if (Game.vault.indexOf(this.id)!=-1) return true; else return false; + } + Game.Upgrade.prototype.vault=function() + { + if (!this.isVaulted()) Game.vault.push(this.id); + } + Game.Upgrade.prototype.unvault=function() + { + if (this.isVaulted()) Game.vault.splice(Game.vault.indexOf(this.id),1); + } + + Game.Upgrade.prototype.click=function(e) + { + if ((e && e.shiftKey) || Game.keys[16]) + { + if (this.pool=='toggle' || this.pool=='tech') {} + else if (Game.Has('Inspired checklist')) + { + if (this.isVaulted()) this.unvault(); + else this.vault(); + Game.upgradesToRebuild=1; + PlaySound('snd/tick.mp3'); + } + } + else this.buy(); + } + + + Game.Upgrade.prototype.buy=function(bypass) + { + var success=0; + var cancelPurchase=0; + if (this.clickFunction && !bypass) cancelPurchase=!this.clickFunction(); + if (!cancelPurchase) + { + if (this.choicesFunction) + { + if (Game.choiceSelectorOn==this.id) + { + l('toggleBox').style.display='none'; + l('toggleBox').innerHTML=''; + Game.choiceSelectorOn=-1; + PlaySound('snd/tickOff.mp3'); + } + else + { + Game.choiceSelectorOn=this.id; + var choices=this.choicesFunction(); + var str=''; + str+='
x
'; + str+='

'+this.dname+'

'+ + '
'; + if (typeof choices==='string') + { + str+=choices; + } + else if (choices.length>0) + { + var selected=0; + for (var i in choices) {if (choices[i].selected) selected=i;} + Game.choiceSelectorChoices=choices;//this is a really dumb way of doing this i am so sorry + Game.choiceSelectorSelected=selected; + str+='

'+choices[selected].name+'

'+ + '
'; + + for (var i in choices) + { + choices[i].id=i; + choices[i].order=choices[i].order||0; + } + + var sortMap=function(a,b) + { + if (a.order>b.order) return 1; + else if (a.order'; + } + } + l('toggleBox').innerHTML=str; + l('toggleBox').style.display='block'; + l('toggleBox').focus(); + Game.tooltip.hide(); + PlaySound('snd/tick.mp3'); + success=1; + } + } + else if (this.pool!='prestige') + { + var price=this.getPrice(); + if (this.canBuy() && !this.bought) + { + Game.Spend(price); + this.bought=1; + if (this.buyFunction) this.buyFunction(); + if (this.toggleInto) + { + Game.Lock(this.toggleInto); + Game.Unlock(this.toggleInto); + } + Game.upgradesToRebuild=1; + Game.recalculateGains=1; + if (Game.CountsAsUpgradeOwned(this.pool)) Game.UpgradesOwned++; + Game.setOnCrate(0); + Game.tooltip.hide(); + PlaySound('snd/buy'+choose([1,2,3,4])+'.mp3',0.75); + success=1; + } + } + else + { + var price=this.getPrice(); + if (Game.heavenlyChips>=price && !this.bought) + { + Game.heavenlyChips-=price; + Game.heavenlyChipsSpent+=price; + this.unlocked=1; + this.bought=1; + if (this.buyFunction) this.buyFunction(); + Game.BuildAscendTree(this); + PlaySound('snd/buy'+choose([1,2,3,4])+'.mp3',0.75); + PlaySound('snd/shimmerClick.mp3'); + //PlaySound('snd/buyHeavenly.mp3'); + success=1; + } + } + } + if (this.bought && this.activateFunction) this.activateFunction(); + return success; + } + Game.Upgrade.prototype.earn=function()//just win the upgrades without spending anything + { + this.unlocked=1; + this.bought=1; + if (this.buyFunction) this.buyFunction(); + Game.upgradesToRebuild=1; + Game.recalculateGains=1; + if (Game.CountsAsUpgradeOwned(this.pool)) Game.UpgradesOwned++; + } + Game.Upgrade.prototype.unearn=function()//remove the upgrade, but keep it unlocked + { + this.bought=0; + Game.upgradesToRebuild=1; + Game.recalculateGains=1; + if (Game.CountsAsUpgradeOwned(this.pool)) Game.UpgradesOwned--; + } + Game.Upgrade.prototype.unlock=function() + { + this.unlocked=1; + Game.upgradesToRebuild=1; + } + Game.Upgrade.prototype.lose=function() + { + this.unlocked=0; + this.bought=0; + Game.upgradesToRebuild=1; + Game.recalculateGains=1; + if (Game.CountsAsUpgradeOwned(this.pool)) Game.UpgradesOwned--; + } + Game.Upgrade.prototype.toggle=function()//cheating only + { + if (!this.bought) + { + this.bought=1; + if (this.buyFunction) this.buyFunction(); + Game.upgradesToRebuild=1; + Game.recalculateGains=1; + if (Game.CountsAsUpgradeOwned(this.pool)) Game.UpgradesOwned++; + PlaySound('snd/buy'+choose([1,2,3,4])+'.mp3',0.75); + if (this.pool=='prestige' || this.pool=='debug') PlaySound('snd/shimmerClick.mp3'); + } + else + { + this.bought=0; + Game.upgradesToRebuild=1; + Game.recalculateGains=1; + if (Game.CountsAsUpgradeOwned(this.pool)) Game.UpgradesOwned--; + PlaySound('snd/sell'+choose([1,2,3,4])+'.mp3',0.75); + if (this.pool=='prestige' || this.pool=='debug') PlaySound('snd/shimmerClick.mp3'); + } + if (Game.onMenu=='stats') Game.UpdateMenu(); + } + + Game.CountsAsUpgradeOwned=function(pool) + { + if (pool=='' || pool=='cookie' || pool=='tech') return true; else return false; + } + + /*AddEvent(l('toggleBox'),'blur',function()//if we click outside of the selector, close it + { + //this has a couple problems, such as when clicking on the upgrade - this toggles it off and back on instantly + l('toggleBox').style.display='none'; + l('toggleBox').innerHTML=''; + Game.choiceSelectorOn=-1; + } + );*/ + + Game.RequiresConfirmation=function(upgrade,prompt) + { + upgrade.clickFunction=function(){Game.Prompt(''+prompt,[[loc("Yes"),'Game.UpgradesById['+upgrade.id+'].buy(1);Game.ClosePrompt();'],loc("No")]);return false;}; + } + + Game.Unlock=function(what) + { + if (typeof what==='string') + { + if (Game.Upgrades[what]) + { + if (Game.Upgrades[what].unlocked==0) + { + Game.Upgrades[what].unlocked=1; + Game.upgradesToRebuild=1; + Game.recalculateGains=1; + /*Game.Notify('Upgrade unlocked','
'+Game.Upgrades[what].dname+'
',Game.Upgrades[what].icon,6);*/ + } + } + } + else {for (var i in what) {Game.Unlock(what[i]);}} + } + Game.Lock=function(what) + { + if (typeof what==='string') + { + if (Game.Upgrades[what]) + { + Game.Upgrades[what].unlocked=0; + Game.upgradesToRebuild=1; + if (Game.Upgrades[what].bought==1 && Game.CountsAsUpgradeOwned(Game.Upgrades[what].pool)) Game.UpgradesOwned--; + Game.Upgrades[what].bought=0; + Game.recalculateGains=1; + } + } + else {for (var i in what) {Game.Lock(what[i]);}} + } + + Game.Has=function(what) + { + var it=Game.Upgrades[what]; + if (it && Game.ascensionMode==1 && (it.pool=='prestige' || it.tier=='fortune')) return 0; + return (it?it.bought:0); + } + Game.HasUnlocked=function(what) + { + return (Game.Upgrades[what]?Game.Upgrades[what].unlocked:0); + } + + + Game.RebuildUpgrades=function()//recalculate the upgrades you can buy + { + Game.upgradesToRebuild=0; + var list=[]; + for (var i in Game.Upgrades) + { + var me=Game.Upgrades[i]; + if (!me.bought && me.pool!='debug' && me.pool!='prestige' && me.pool!='prestigeDecor' && (Game.ascensionMode!=1 || (!me.lasting && me.tier!='fortune'))) + { + if (me.unlocked) list.push(me); + } + else if (me.displayFuncWhenOwned && me.bought) list.push(me); + } + var sortMap=function(a,b) + { + var ap=a.pool=='toggle'?a.order:a.getPrice(); + var bp=b.pool=='toggle'?b.order:b.getPrice(); + if (ap>bp) return 1; + else if (ap'+loc("Will instantly purchase every upgrade you can afford, starting from the cheapest one.
Upgrades in the vault will not be auto-purchased.
You may place an upgrade into the vault by Shift-clicking on it.")+'' + ,'store')+ + '>'+ + '
'+loc("Buy all upgrades")+'
'+ + ''; + l('upgrades').classList.add('hasMenu'); + } + else l('upgrades').classList.remove('hasMenu'); + + for (var i in Game.UpgradesInStore) + { + //if (!Game.UpgradesInStore[i]) break; + var me=Game.UpgradesInStore[i]; + var str=Game.crate(me,'store','Game.UpgradesById['+me.id+'].click(event);','upgrade'+i); + + /*var str='
'+Beautify(Math.round(me.getPrice()))+'
'+(me.pool=='toggle'?'[Togglable]':'[Upgrade]')+'
'+me.dname+'
'+me.desc+'
' + ,'store')+' '+Game.clickStr+'="Game.UpgradesById['+me.id+'].buy();" id="upgrade'+i+'" style="'+writeIcon(me.icon)+'">';*/ + if (me.pool=='toggle') toggleStr+=str; else if (me.pool=='tech') techStr+=str; else + { + if (me.isVaulted() && Game.Has('Inspired checklist')) vaultStr+=str; else storeStr+=str; + } + } + + l('upgrades').innerHTML=storeStr; + l('toggleUpgrades').innerHTML=toggleStr; + if (toggleStr=='') l('toggleUpgrades').style.display='none'; else l('toggleUpgrades').style.display='block'; + l('techUpgrades').innerHTML=techStr; + if (techStr=='') l('techUpgrades').style.display='none'; else l('techUpgrades').style.display='block'; + l('vaultUpgrades').innerHTML=vaultStr; + if (vaultStr=='') l('vaultUpgrades').style.display='none'; else l('vaultUpgrades').style.display='block'; + } + + Game.UnlockAt=[];//this contains an array of every upgrade with a cookie requirement in the form of {cookies:(amount of cookies earned required),name:(name of upgrade or achievement to unlock)} (and possibly require:(name of upgrade of achievement to own)) + //note : the cookie will not be added to the list if it contains locked:1 (use for seasonal cookies and such) + + var strCookieProductionMultiplierPlus=loc("Cookie production multiplier +%1%.",'[x]'); + var getStrCookieProductionMultiplierPlus=function(x) + {return strCookieProductionMultiplierPlus.replace('[x]',x);} + var getStrThousandFingersGain=function(x) + {return loc("Multiplies the gain from %1 by %2.",[getUpgradeName("Thousand fingers"),x]);} + var strKittenDesc=loc("You gain more CpS the more milk you have."); + var getStrClickingGains=function(x) + {return loc("Clicking gains +%1% of your CpS.",x);} + + Game.NewUpgradeCookie=function(obj) + { + var upgrade=new Game.Upgrade(obj.name,getStrCookieProductionMultiplierPlus(Beautify((typeof(obj.power)==='function'?obj.power(obj):obj.power),1))+(EN?''+obj.desc+'':''),obj.price,obj.icon); + upgrade.power=obj.power; + upgrade.pool='cookie'; + var toPush={cookies:obj.price/20,name:obj.name}; + if (obj.require) toPush.require=obj.require; + if (obj.season) toPush.season=obj.season; + if (!obj.locked) Game.UnlockAt.push(toPush); + return upgrade; + } + + //tiered upgrades system + //each building has several upgrade tiers + //all upgrades in the same tier have the same color, unlock threshold and price multiplier + Game.Tiers={ + 1:{name:'Plain',unlock:1,achievUnlock:1,iconRow:0,color:'#ccb3ac',price: 10}, + 2:{name:'Berrylium',unlock:5,achievUnlock:50,iconRow:1,color:'#ff89e7',price: 50}, + 3:{name:'Blueberrylium',unlock:25,achievUnlock:100,iconRow:2,color:'#00deff',price: 500}, + 4:{name:'Chalcedhoney',unlock:50,achievUnlock:150,iconRow:13,color:'#ffcc2f',price: 50000}, + 5:{name:'Buttergold',unlock:100,achievUnlock:200,iconRow:14,color:'#e9d673',price: 5000000}, + 6:{name:'Sugarmuck',unlock:150,achievUnlock:250,iconRow:15,color:'#a8bf91',price: 500000000}, + 7:{name:'Jetmint',unlock:200,achievUnlock:300,iconRow:16,color:'#60ff50',price: 500000000000}, + 8:{name:'Cherrysilver',unlock:250,achievUnlock:350,iconRow:17,color:'#f01700',price: 500000000000000}, + 9:{name:'Hazelrald',unlock:300,achievUnlock:400,iconRow:18,color:'#9ab834',price: 500000000000000000}, + 10:{name:'Mooncandy',unlock:350,achievUnlock:450,iconRow:19,color:'#7e7ab9',price: 500000000000000000000}, + 11:{name:'Astrofudge',unlock:400,achievUnlock:500,iconRow:28,color:'#9a3316',price: 5000000000000000000000000}, + 12:{name:'Alabascream',unlock:450,achievUnlock:550,iconRow:30,color:'#c1a88c',price: 50000000000000000000000000000}, + 13:{name:'Iridyum',unlock:500,achievUnlock:600,iconRow:31,color:'#adb1b3',price: 500000000000000000000000000000000}, + 14:{name:'Glucosmium',unlock:550,achievUnlock:650,iconRow:34,color:'#ff89e7',price: 5000000000000000000000000000000000000}, + 15:{name:'Glimmeringue',unlock:600,achievUnlock:700,iconRow:36,color:'#fffaa8',price: 50000000000000000000000000000000000000000}, + 'synergy1':{name:'Synergy I',unlock:15,iconRow:20,color:'#008595',special:1,req:'Synergies Vol. I',price: 200000}, + 'synergy2':{name:'Synergy II',unlock:75,iconRow:29,color:'#008595',special:1,req:'Synergies Vol. II',price: 200000000000}, + 'fortune':{name:'Fortune',unlock:-1,iconRow:32,color:'#9ab834',special:1,price: 77777777777777777777777777777}, + }; + for (var i in Game.Tiers){Game.Tiers[i].upgrades=[];} + Game.GetIcon=function(type,tier) + { + var col=0; + if (type=='Kitten') col=18; else col=Game.Objects[type].iconColumn; + return [col,Game.Tiers[tier].iconRow]; + } + Game.SetTier=function(building,tier) + { + if (!Game.Objects[building]) console.log('Warning: No building named',building); + Game.last.tier=tier; + Game.last.buildingTie=Game.Objects[building]; + if (Game.last.type=='achievement') Game.Objects[building].tieredAchievs[tier]=Game.last; + else Game.Objects[building].tieredUpgrades[tier]=Game.last; + } + Game.MakeTiered=function(upgrade,tier,col) + { + upgrade.tier=tier; + if (typeof col!=='undefined') upgrade.icon=[col,Game.Tiers[tier].iconRow]; + } + Game.TieredUpgrade=function(name,desc,building,tier) + { + if (tier=='fortune' && building) desc=loc("%1 are %2% more efficient and %3% cheaper.",[cap(Game.Objects[building].plural),7,7])+desc; + else desc=loc("%1 are twice as efficient.",cap(Game.Objects[building].plural))+desc; + var upgrade=new Game.Upgrade(name,desc,Game.Objects[building].basePrice*Game.Tiers[tier].price,Game.GetIcon(building,tier)); + if (tier!='fortune') + { + upgrade.descFunc=function(){ + return ((Game.ascensionMode!=1 && Game.Has(this.buildingTie1.unshackleUpgrade) && Game.Has(Game.Tiers[this.tier].unshackleUpgrade))?('
'+loc("Unshackled! +%1% extra production.",Math.round((this.buildingTie.id==1?0.5:(20-this.buildingTie.id)*0.1)*100))+'
'):'')+this.ddesc; + }; + } + + Game.SetTier(building,tier); + if (!upgrade.buildingTie1 && building) upgrade.buildingTie1=Game.Objects[building]; + if (tier=='fortune' && building) Game.Objects[building].fortune=upgrade; + return upgrade; + } + Game.SynergyUpgrade=function(name,desc,building1,building2,tier) + { + /* + creates a new upgrade that : + -unlocks when you have tier.unlock of building1 and building2 + -is priced at (building1.price*10+building2.price*1)*tier.price (formerly : Math.sqrt(building1.price*building2.price)*tier.price) + -gives +(0.1*building1)% cps to building2 and +(5*building2)% cps to building1 + -if building2 is below building1 in worth, swap them + */ + //if (Game.Objects[building1].basePrice>Game.Objects[building2].basePrice) {var temp=building2;building2=building1;building1=temp;} + var b1=Game.Objects[building1]; + var b2=Game.Objects[building2]; + if (b1.basePrice>b2.basePrice) {b1=Game.Objects[building2];b2=Game.Objects[building1];}//swap + + desc= + loc("%1 gain +%2% CpS per %3.",[cap(b1.plural),5,b2.single])+'
'+ + loc("%1 gain +%2% CpS per %3.",[cap(b2.plural),0.1,b1.single])+ + (EN?desc:''); + var upgrade=new Game.Upgrade(name,desc,(b1.basePrice*10+b2.basePrice*1)*Game.Tiers[tier].price,Game.GetIcon(building1,tier));//Math.sqrt(b1.basePrice*b2.basePrice)*Game.Tiers[tier].price + upgrade.tier=tier; + upgrade.buildingTie1=b1; + upgrade.buildingTie2=b2; + upgrade.priceFunc=function(){return (this.buildingTie1.basePrice*10+this.buildingTie2.basePrice*1)*Game.Tiers[this.tier].price*(Game.Has('Chimera')?0.98:1);}; + Game.Objects[building1].synergies.push(upgrade); + Game.Objects[building2].synergies.push(upgrade); + //Game.SetTier(building1,tier); + return upgrade; + } + Game.GetTieredCpsMult=function(me) + { + var mult=1; + for (var i in me.tieredUpgrades) + { + if (!Game.Tiers[me.tieredUpgrades[i].tier].special && Game.Has(me.tieredUpgrades[i].name)) + { + var tierMult=2; + //unshackled + if (Game.ascensionMode!=1 && Game.Has(me.unshackleUpgrade) && Game.Has(Game.Tiers[me.tieredUpgrades[i].tier].unshackleUpgrade)) tierMult+=me.id==1?0.5:(20-me.id)*0.1; + mult*=tierMult; + } + } + for (var i in me.synergies) + { + var syn=me.synergies[i]; + if (Game.Has(syn.name)) + { + if (syn.buildingTie1.name==me.name) mult*=(1+0.05*syn.buildingTie2.amount); + else if (syn.buildingTie2.name==me.name) mult*=(1+0.001*syn.buildingTie1.amount); + } + } + if (me.fortune && Game.Has(me.fortune.name)) mult*=1.07; + if (me.grandma && Game.Has(me.grandma.name)) mult*=(1+Game.Objects['Grandma'].amount*0.01*(1/(me.id-1))); + return mult; + } + Game.UnlockTiered=function(me) + { + for (var i in me.tieredUpgrades) {if (Game.Tiers[me.tieredUpgrades[i].tier].unlock!=-1 && me.amount>=Game.Tiers[me.tieredUpgrades[i].tier].unlock) Game.Unlock(me.tieredUpgrades[i].name);} + for (var i in me.tieredAchievs) {if (me.amount>=Game.Tiers[me.tieredAchievs[i].tier].achievUnlock) Game.Win(me.tieredAchievs[i].name);} + for (var i in me.synergies) {var syn=me.synergies[i];if (Game.Has(Game.Tiers[syn.tier].req) && syn.buildingTie1.amount>=Game.Tiers[syn.tier].unlock && syn.buildingTie2.amount>=Game.Tiers[syn.tier].unlock) Game.Unlock(syn.name);} + } + + + + var pool=''; + var power=0; + + //define upgrades + //WARNING : do NOT add new upgrades in between, this breaks the saves. Add them at the end ! + var order=100;//this is used to set the order in which the items are listed + new Game.Upgrade('Reinforced index finger',loc("The mouse and cursors are twice as efficient.")+'prod prod',100,[0,0]);Game.MakeTiered(Game.last,1,0); + new Game.Upgrade('Carpal tunnel prevention cream',loc("The mouse and cursors are twice as efficient.")+'it... it hurts to click...',500,[0,1]);Game.MakeTiered(Game.last,2,0); + new Game.Upgrade('Ambidextrous',loc("The mouse and cursors are twice as efficient.")+'Look ma, both hands!',10000,[0,2]);Game.MakeTiered(Game.last,3,0); + new Game.Upgrade('Thousand fingers',loc("The mouse and cursors gain +%1 cookies for each non-cursor building owned.",0.1)+'clickity',100000,[0,13]);Game.MakeTiered(Game.last,4,0); + + new Game.Upgrade('Million fingers',getStrThousandFingersGain(5)+'clickityclickity',10000000,[0,14]);Game.MakeTiered(Game.last,5,0); + new Game.Upgrade('Billion fingers',getStrThousandFingersGain(10)+'clickityclickityclickity',100000000,[0,15]);Game.MakeTiered(Game.last,6,0); + new Game.Upgrade('Trillion fingers',getStrThousandFingersGain(20)+'clickityclickityclickityclickity',1000000000,[0,16]);Game.MakeTiered(Game.last,7,0); + + order=200; + Game.TieredUpgrade('Forwards from grandma','RE:RE:thought you\'d get a kick out of this ;))','Grandma',1); + Game.TieredUpgrade('Steel-plated rolling pins','Just what you kneaded.','Grandma',2); + Game.TieredUpgrade('Lubricated dentures','squish','Grandma',3); + + order=300; + Game.TieredUpgrade('Cheap hoes','Rake in the dough!','Farm',1); + Game.TieredUpgrade('Fertilizer','It\'s chocolate, I swear.','Farm',2); + Game.TieredUpgrade('Cookie trees','A relative of the breadfruit.','Farm',3); + + order=500; + Game.TieredUpgrade('Sturdier conveyor belts','You\'re going places.','Factory',1); + Game.TieredUpgrade('Child labor','Cheaper, healthier workforce.','Factory',2); + Game.TieredUpgrade('Sweatshop','Slackers will be terminated.','Factory',3); + + order=400; + Game.TieredUpgrade('Sugar gas','A pink, volatile gas, found in the depths of some chocolate caves.','Mine',1); + Game.TieredUpgrade('Megadrill','You\'re in deep.','Mine',2); + Game.TieredUpgrade('Ultradrill','Finally caved in?','Mine',3); + + order=600; + Game.TieredUpgrade('Vanilla nebulae','If you removed your space helmet, you could probably smell it!
(Note : don\'t do that.)
','Shipment',1); + Game.TieredUpgrade('Wormholes','By using these as shortcuts, your ships can travel much faster.','Shipment',2); + Game.TieredUpgrade('Frequent flyer','Come back soon!','Shipment',3); + + order=700; + Game.TieredUpgrade('Antimony','Actually worth a lot of mony.','Alchemy lab',1); + Game.TieredUpgrade('Essence of dough','Extracted through the 5 ancient steps of alchemical baking.','Alchemy lab',2); + Game.TieredUpgrade('True chocolate','The purest form of cacao.','Alchemy lab',3); + + order=800; + Game.TieredUpgrade('Ancient tablet','A strange slab of peanut brittle, holding an ancient cookie recipe. Neat!','Portal',1); + Game.TieredUpgrade('Insane oatling workers','ARISE, MY MINIONS!','Portal',2); + Game.TieredUpgrade('Soul bond','So I just sign up and get more cookies? Sure, whatever!','Portal',3); + + order=900; + Game.TieredUpgrade('Flux capacitors','Bake to the future.','Time machine',1); + Game.TieredUpgrade('Time paradox resolver','No more fooling around with your own grandmother!','Time machine',2); + Game.TieredUpgrade('Quantum conundrum','There is only one constant, and that is universal uncertainty.
Or is it?
','Time machine',3); + + order=20000; + new Game.Upgrade('Kitten helpers',strKittenDesc+'meow may I help you',9000000,Game.GetIcon('Kitten',1));Game.last.kitten=1;Game.MakeTiered(Game.last,1,18); + new Game.Upgrade('Kitten workers',strKittenDesc+'meow meow meow meow',9000000000,Game.GetIcon('Kitten',2));Game.last.kitten=1;Game.MakeTiered(Game.last,2,18); + + order=10000; + Game.NewUpgradeCookie({name:'Plain cookies',desc:'We all gotta start somewhere.',icon:[2,3],power: 1, price: 999999}); + Game.NewUpgradeCookie({name:'Sugar cookies',desc:'Tasty, if a little unimaginative.',icon:[7,3],power: 1, price: 999999*5}); + Game.NewUpgradeCookie({name:'Oatmeal raisin cookies',desc:'No raisin to hate these.',icon:[0,3],power: 1, price: 9999999}); + Game.NewUpgradeCookie({name:'Peanut butter cookies',desc:'Get yourself some jam cookies!',icon:[1,3],power: 2, price: 9999999*5}); + Game.NewUpgradeCookie({name:'Coconut cookies',desc:'Flaky, but not unreliable. Some people go crazy for these.',icon:[3,3],power: 2, price: 99999999}); + order=10001; + Game.NewUpgradeCookie({name:'White chocolate cookies',desc:'I know what you\'ll say. It\'s just cocoa butter! It\'s not real chocolate!
Oh please.',icon:[4,3],power:2, price: 99999999*5}); + order=10000; + Game.NewUpgradeCookie({name:'Macadamia nut cookies',desc:'They\'re macadamn delicious!',icon:[5,3],power: 2, price: 99999999}); + order=10002; + Game.NewUpgradeCookie({name:'Double-chip cookies',desc:'DOUBLE THE CHIPS
DOUBLE THE TASTY
(double the calories)',icon:[6,3],power:2, price: 999999999*5}); + Game.NewUpgradeCookie({name:'White chocolate macadamia nut cookies',desc:'Orteil\'s favorite.',icon:[8,3],power: 2, price: 9999999999}); + Game.NewUpgradeCookie({name:'All-chocolate cookies',desc:'CHOCOVERDOSE.',icon:[9,3],power: 2, price: 9999999999*5}); + + order=100; + new Game.Upgrade('Quadrillion fingers',getStrThousandFingersGain(20)+'clickityclickityclickityclickityclick',10000000000,[0,17]);Game.MakeTiered(Game.last,8,0); + + order=200;Game.TieredUpgrade('Prune juice','Gets me going.','Grandma',4); + order=300;Game.TieredUpgrade('Genetically-modified cookies','All-natural mutations.','Farm',4); + order=500;Game.TieredUpgrade('Radium reactors','Gives your cookies a healthy glow.','Factory',4); + order=400;Game.TieredUpgrade('Ultimadrill','Pierce the heavens, etc.','Mine',4); + order=600;Game.TieredUpgrade('Warp drive','To boldly bake.','Shipment',4); + order=700;Game.TieredUpgrade('Ambrosia','Adding this to the cookie mix is sure to make them even more addictive!
Perhaps dangerously so.
Let\'s hope you can keep selling these legally.
','Alchemy lab',4); + order=800;Game.TieredUpgrade('Sanity dance','We can change if we want to.
We can leave our brains behind.
','Portal',4); + order=900;Game.TieredUpgrade('Causality enforcer','What happened, happened.','Time machine',4); + + order=5000; + new Game.Upgrade('Lucky day',loc("Golden cookies appear twice as often and stay twice as long.")+'Oh hey, a four-leaf penny!',777777777,[27,6]); + new Game.Upgrade('Serendipity',loc("Golden cookies appear twice as often and stay twice as long.")+'What joy! Seven horseshoes!',77777777777,[27,6]); + + order=20000; + new Game.Upgrade('Kitten engineers',strKittenDesc+'meow meow meow meow, sir',90000000000000,Game.GetIcon('Kitten',3));Game.last.kitten=1;Game.MakeTiered(Game.last,3,18); + + order=10020; + Game.NewUpgradeCookie({name:'Dark chocolate-coated cookies',desc:'These absorb light so well you almost need to squint to see them.',icon:[10,3],power: 5, price: 99999999999}); + Game.NewUpgradeCookie({name:'White chocolate-coated cookies',desc:'These dazzling cookies absolutely glisten with flavor.',icon:[11,3],power: 5, price: 99999999999}); + + Game.GrandmaSynergies=[]; + Game.GrandmaSynergy=function(name,desc,building) + { + var building=Game.Objects[building]; + var grandmaNumber=loc("%1 grandma",LBeautify(building.id-1)); + desc=loc("%1 are twice as efficient.",cap(Game.Objects['Grandma'].plural))+' '+loc("%1 gain +%2% CpS per %3.",[cap(building.plural),1,grandmaNumber])+''+desc+''; + + var upgrade=new Game.Upgrade(name,desc,building.basePrice*Game.Tiers[2].price,[10,9],function(){Game.Objects['Grandma'].redraw();}); + building.grandma=upgrade; + upgrade.buildingTie=building; + Game.GrandmaSynergies.push(upgrade.name); + return upgrade; + } + + order=250; + Game.GrandmaSynergy('Farmer grandmas','A nice farmer to grow more cookies.','Farm'); + Game.GrandmaSynergy('Miner grandmas','A nice miner to dig more cookies.','Mine'); + Game.GrandmaSynergy('Worker grandmas','A nice worker to manufacture more cookies.','Factory'); + Game.GrandmaSynergy('Cosmic grandmas','A nice thing to... uh... cookies.','Shipment'); + Game.GrandmaSynergy('Transmuted grandmas','A nice golden grandma to convert into more cookies.','Alchemy lab'); + Game.GrandmaSynergy('Altered grandmas','a NiCe GrAnDmA tO bA##########','Portal'); + Game.GrandmaSynergy('Grandmas\' grandmas','A nice grandma\'s nice grandma to bake double the cookies.','Time machine'); + + order=14000; + Game.baseResearchTime=Game.fps*60*30; + Game.SetResearch=function(what,time) + { + if (Game.Upgrades[what] && !Game.Has(what)) + { + Game.researchT=Game.baseResearchTime; + if (Game.Has('Persistent memory')) Game.researchT=Math.ceil(Game.baseResearchTime/10); + if (Game.Has('Ultrascience')) Game.researchT=Game.fps*5; + Game.nextResearch=Game.Upgrades[what].id; + Game.Notify(loc("Research has begun"),loc("Your bingo center/research facility is conducting experiments."),[9,0]); + } + } + + new Game.Upgrade('Bingo center/Research facility',loc("Grandma-operated science lab and leisure club.
Grandmas are 4 times as efficient.
Regularly unlocks new upgrades.")+'What could possibly keep those grandmothers in check?...
Bingo.
',1000000000000000,[11,9],function(){Game.SetResearch('Specialized chocolate chips');});Game.last.noPerm=1; + + order=15000; + new Game.Upgrade('Specialized chocolate chips',getStrCookieProductionMultiplierPlus(1)+'Computer-designed chocolate chips. Computer chips, if you will.',1000000000000000,[0,9],function(){Game.SetResearch('Designer cocoa beans');});Game.last.pool='tech'; + new Game.Upgrade('Designer cocoa beans',getStrCookieProductionMultiplierPlus(2)+'Now more aerodynamic than ever!',2000000000000000,[1,9],function(){Game.SetResearch('Ritual rolling pins');});Game.last.pool='tech'; + new Game.Upgrade('Ritual rolling pins',loc("%1 are twice as efficient.",cap(Game.Objects['Grandma'].plural))+'The result of years of scientific research!',4000000000000000,[2,9],function(){Game.SetResearch('Underworld ovens');});Game.last.pool='tech'; + new Game.Upgrade('Underworld ovens',getStrCookieProductionMultiplierPlus(3)+'Powered by science, of course!',8000000000000000,[3,9],function(){Game.SetResearch('One mind');});Game.last.pool='tech'; + new Game.Upgrade('One mind',loc("Each %1 gains +%2 base CpS per %3.",[loc("grandma"),'0.02',loc("grandma")])+'
'+loc("Note: the grandmothers are growing restless. Do not encourage them.")+'
We are one. We are many.',16000000000000000,[4,9],function(){Game.elderWrath=1;Game.SetResearch('Exotic nuts');Game.storeToRefresh=1;});Game.last.pool='tech'; + //Game.last.clickFunction=function(){return confirm('Warning : purchasing this will have unexpected, and potentially undesirable results!\nIt\'s all downhill from here. You have been warned!\nPurchase anyway?');}; + Game.RequiresConfirmation(Game.last,'
'+loc("Warning: purchasing this will have unexpected, and potentially undesirable results!
It's all downhill from here. You have been warned!

Purchase anyway?")+'
'); + new Game.Upgrade('Exotic nuts',getStrCookieProductionMultiplierPlus(4)+'You\'ll go crazy over these!',32000000000000000,[5,9],function(){Game.SetResearch('Communal brainsweep');});Game.last.pool='tech'; + new Game.Upgrade('Communal brainsweep',(EN?'Each grandma gains another +0.02 base CpS per grandma.':loc("Each %1 gains +%2 base CpS per %3.",[loc("grandma"),'0.02',loc("grandma")]))+'
'+loc("Note: proceeding any further in scientific research may have unexpected results. You have been warned.")+'
We fuse. We merge. We grow.',64000000000000000,[6,9],function(){Game.elderWrath=2;Game.SetResearch('Arcane sugar');Game.storeToRefresh=1;});Game.last.pool='tech'; + new Game.Upgrade('Arcane sugar',getStrCookieProductionMultiplierPlus(5)+'Tastes like insects, ligaments, and molasses.',128000000000000000,[7,9],function(){Game.SetResearch('Elder Pact');});Game.last.pool='tech'; + new Game.Upgrade('Elder Pact',loc("Each %1 gains +%2 base CpS per %3.",[loc("grandma"),'0.05',loc("portal")])+'
'+loc("Note: this is a bad idea.")+'
squirm crawl slither writhe
today we rise
',256000000000000000,[8,9],function(){Game.elderWrath=3;Game.storeToRefresh=1;});Game.last.pool='tech'; + new Game.Upgrade('Elder Pledge',loc("Contains the wrath of the elders, at least for a while.")+'This is a simple ritual involving anti-aging cream, cookie batter mixed in the moonlight, and a live chicken.',1,[9,9],function() + { + Game.elderWrath=0; + Game.pledges++; + Game.pledgeT=Game.getPledgeDuration(); + Game.Unlock('Elder Covenant'); + Game.CollectWrinklers(); + Game.storeToRefresh=1; + }); + Game.getPledgeDuration=function(){return Game.fps*60*(Game.Has('Sacrificial rolling pins')?60:30);} + Game.last.pool='toggle'; + Game.last.displayFuncWhenOwned=function(){return '
'+loc("Time remaining until pledge runs out:")+'
'+Game.sayTime(Game.pledgeT,-1)+'
';} + Game.last.timerDisplay=function(){if (!Game.Upgrades['Elder Pledge'].bought) return -1; else return 1-Game.pledgeT/Game.getPledgeDuration();} + Game.last.priceFunc=function(){return Math.pow(8,Math.min(Game.pledges+2,14));} + + Game.last.descFunc=function(){ + return '
'+(Game.pledges==0?loc("You haven't pledged to the elders yet."):loc("You've pledged to the elders %1 times.",LBeautify(Game.pledges)))+'
'+this.ddesc; + }; + + + order=150; + new Game.Upgrade('Plastic mouse',getStrClickingGains(1)+'Slightly squeaky.',50000,[11,0]);Game.MakeTiered(Game.last,1,11); + new Game.Upgrade('Iron mouse',getStrClickingGains(1)+'Click like it\'s 1349!',5000000,[11,1]);Game.MakeTiered(Game.last,2,11); + new Game.Upgrade('Titanium mouse',getStrClickingGains(1)+'Heavy, but powerful.',500000000,[11,2]);Game.MakeTiered(Game.last,3,11); + new Game.Upgrade('Adamantium mouse',getStrClickingGains(1)+'You could cut diamond with these.',50000000000,[11,13]);Game.MakeTiered(Game.last,4,11); + + order=40000; + new Game.Upgrade('Ultrascience',loc("Research takes only 5 seconds.")+'YEAH, SCIENCE!',7,[9,2]);//debug purposes only + Game.last.pool='debug'; + + order=10020; + Game.NewUpgradeCookie({name:'Eclipse cookies',desc:'Look to the cookie.',icon:[0,4],power: 2, price: 99999999999*5}); + Game.NewUpgradeCookie({name:'Zebra cookies',desc:'...',icon:[1,4],power: 2, price: 999999999999}); + + order=100; + new Game.Upgrade('Quintillion fingers',getStrThousandFingersGain(20)+'man, just go click click click click click, it\'s real easy, man.',10000000000000,[0,18]);Game.MakeTiered(Game.last,9,0); + + order=40000; + new Game.Upgrade('Gold hoard',loc("Golden cookies appear really often.")+'That\'s entirely too many.',7,[10,14]);//debug purposes only + Game.last.pool='debug'; + + order=15000; + new Game.Upgrade('Elder Covenant',loc("Puts a permanent end to the elders' wrath, at the cost of %1% of your CpS.",5)+'This is a complicated ritual involving silly, inconsequential trivialities such as cursed laxatives, century-old cacao, and an infant.
Don\'t question it.
',66666666666666,[8,9],function() + { + Game.pledgeT=0; + Game.Lock('Revoke Elder Covenant'); + Game.Unlock('Revoke Elder Covenant'); + Game.Lock('Elder Pledge'); + Game.Win('Elder calm'); + Game.CollectWrinklers(); + Game.storeToRefresh=1; + }); + Game.last.pool='toggle'; + + new Game.Upgrade('Revoke Elder Covenant',loc("You will get %1% of your CpS back, but the grandmatriarchs will return.",5)+'we
rise
again
',6666666666,[8,9],function() + { + Game.Lock('Elder Covenant'); + Game.Unlock('Elder Covenant'); + }); + Game.last.pool='toggle'; + + order=5000; + new Game.Upgrade('Get lucky',loc("Golden cookie effects last twice as long.")+'You\'ve been up all night, haven\'t you?',77777777777777,[27,6]); + + order=15000; + new Game.Upgrade('Sacrificial rolling pins',loc("Elder pledges last twice as long.")+'These are mostly just for spreading the anti-aging cream.
(And accessorily, shortening the chicken\'s suffering.)
',2888888888888,[2,9]); + + order=10020; + Game.NewUpgradeCookie({name:'Snickerdoodles',desc:'True to their name.',icon:[2,4],power: 2, price: 999999999999*5}); + Game.NewUpgradeCookie({name:'Stroopwafels',desc:'If it ain\'t dutch, it ain\'t much.',icon:[3,4],power: 2, price: 9999999999999}); + Game.NewUpgradeCookie({name:'Macaroons',desc:'Not to be confused with macarons.
These have coconut, okay?',icon:[4,4],power: 2, price: 9999999999999*5}); + + order=40000; + new Game.Upgrade('Neuromancy',loc("Can toggle upgrades on and off at will in the stats menu.")+'Can also come in handy to unsee things that can\'t be unseen.',7,[4,9]);//debug purposes only + Game.last.pool='debug'; + + order=10020; + Game.NewUpgradeCookie({name:'Empire biscuits',desc:'For your growing cookie empire, of course!',icon:[5,4],power: 2, price: 99999999999999}); + order=10031; + Game.NewUpgradeCookie({name:'British tea biscuits',desc:'Quite.',icon:[6,4],require:'Tin of british tea biscuits',power: 2, price: 99999999999999}); + Game.NewUpgradeCookie({name:'Chocolate british tea biscuits',desc:'Yes, quite.',icon:[7,4],require:Game.last.name,power: 2, price: 99999999999999}); + Game.NewUpgradeCookie({name:'Round british tea biscuits',desc:'Yes, quite riveting.',icon:[8,4],require:Game.last.name,power: 2, price: 99999999999999}); + Game.NewUpgradeCookie({name:'Round chocolate british tea biscuits',desc:'Yes, quite riveting indeed.',icon:[9,4],require:Game.last.name,power: 2, price: 99999999999999}); + Game.NewUpgradeCookie({name:'Round british tea biscuits with heart motif',desc:'Yes, quite riveting indeed, old chap.',icon:[10,4],require:Game.last.name,power: 2, price: 99999999999999}); + Game.NewUpgradeCookie({name:'Round chocolate british tea biscuits with heart motif',desc:'I like cookies.',icon:[11,4],require:Game.last.name,power: 2, price: 99999999999999}); + + order=1000; + Game.TieredUpgrade('Sugar bosons','Sweet firm bosons.','Antimatter condenser',1); + Game.TieredUpgrade('String theory','Reveals new insight about the true meaning of baking cookies (and, as a bonus, the structure of the universe).','Antimatter condenser',2); + Game.TieredUpgrade('Large macaron collider','How singular!','Antimatter condenser',3); + Game.TieredUpgrade('Big bang bake','And that\'s how it all began.','Antimatter condenser',4); + + order=255; + Game.GrandmaSynergy('Antigrandmas','A mean antigrandma to vomit more cookies.','Antimatter condenser'); + + order=10020; + Game.NewUpgradeCookie({name:'Madeleines',desc:'Unforgettable!',icon:[12,3],power: 2, price: 99999999999999*5}); + Game.NewUpgradeCookie({name:'Palmiers',desc:'Palmier than you!',icon:[13,3],power: 2, price: 99999999999999*5}); + Game.NewUpgradeCookie({name:'Palets',desc:'You could probably play hockey with these.
I mean, you\'re welcome to try.',icon:[12,4],power: 2, price: 999999999999999}); + Game.NewUpgradeCookie({name:'Sablés',desc:'The name implies they\'re made of sand. But you know better, don\'t you?',icon:[13,4],power: 2, price: 999999999999999}); + + order=20000; + new Game.Upgrade('Kitten overseers',strKittenDesc+'my purrpose is to serve you, sir',90000000000000000,Game.GetIcon('Kitten',4));Game.last.kitten=1;Game.MakeTiered(Game.last,4,18); + + + order=100; + new Game.Upgrade('Sextillion fingers',getStrThousandFingersGain(20)+'sometimes
things just
click
',10000000000000000,[0,19]);Game.MakeTiered(Game.last,10,0); + + order=200;Game.TieredUpgrade('Double-thick glasses','Oh... so THAT\'s what I\'ve been baking.','Grandma',5); + order=300;Game.TieredUpgrade('Gingerbread scarecrows','Staring at your crops with mischievous glee.','Farm',5); + order=500;Game.TieredUpgrade('Recombobulators','A major part of cookie recombobulation.','Factory',5); + order=400;Game.TieredUpgrade('H-bomb mining','Questionable efficiency, but spectacular nonetheless.','Mine',5); + order=600;Game.TieredUpgrade('Chocolate monoliths','My god. It\'s full of chocolate bars.','Shipment',5); + order=700;Game.TieredUpgrade('Aqua crustulae','Careful with the dosing - one drop too much and you get muffins.
And nobody likes muffins.
','Alchemy lab',5); + order=800;Game.TieredUpgrade('Brane transplant','This refers to the practice of merging higher dimensional universes, or "branes", with our own, in order to facilitate transit (and harvesting of precious cookie dough).','Portal',5); + order=900;Game.TieredUpgrade('Yestermorrow comparators','Fortnights into millennia.','Time machine',5); + order=1000;Game.TieredUpgrade('Reverse cyclotrons','These can uncollision particles and unspin atoms. For... uh... better flavor, and stuff.','Antimatter condenser',5); + + order=150; + new Game.Upgrade('Unobtainium mouse',getStrClickingGains(1)+'These nice mice should suffice.',5000000000000,[11,14]);Game.MakeTiered(Game.last,5,11); + + order=10030; + Game.NewUpgradeCookie({name:'Caramoas',desc:'Yeah. That\'s got a nice ring to it.',icon:[14,4],require:'Box of brand biscuits',power: 3, price: 9999999999999999}); + Game.NewUpgradeCookie({name:'Sagalongs',desc:'Grandma\'s favorite?',icon:[15,3],require:'Box of brand biscuits',power: 3, price: 9999999999999999}); + Game.NewUpgradeCookie({name:'Shortfoils',desc:'Foiled again!',icon:[15,4],require:'Box of brand biscuits',power: 3, price: 9999999999999999}); + Game.NewUpgradeCookie({name:'Win mints',desc:'They\'re the luckiest cookies you\'ve ever tasted!',icon:[14,3],require:'Box of brand biscuits',power: 3, price: 9999999999999999}); + + order=40000; + new Game.Upgrade('Perfect idling',loc("You keep producing cookies even while the game is closed.")+'It\'s the most beautiful thing I\'ve ever seen.',7,[10,0]);//debug purposes only + Game.last.pool='debug'; + + order=10030; + Game.NewUpgradeCookie({name:'Fig gluttons',desc:'Got it all figured out.',icon:[17,4],require:'Box of brand biscuits',power: 2, price: 999999999999999*5}); + Game.NewUpgradeCookie({name:'Loreols',desc:'Because, uh... they\'re worth it?',icon:[16,3],require:'Box of brand biscuits',power: 2, price: 999999999999999*5}); + Game.NewUpgradeCookie({name:'Jaffa cakes',desc:'If you want to bake a cookie from scratch, you must first build a factory.',icon:[17,3],require:'Box of brand biscuits',power: 2, price: 999999999999999*5}); + Game.NewUpgradeCookie({name:'Grease\'s cups',desc:'Extra-greasy peanut butter.',icon:[16,4],require:'Box of brand biscuits',power: 2, price: 999999999999999*5}); + + order=30000; + new Game.Upgrade('Heavenly chip secret',loc("Unlocks %1% of the potential of your prestige level.",5)+'Grants the knowledge of heavenly chips, and how to use them to make baking more efficient.
It\'s a secret to everyone.
',11,[19,7]);Game.last.noPerm=1; + new Game.Upgrade('Heavenly cookie stand',loc("Unlocks %1% of the potential of your prestige level.",25)+'Don\'t forget to visit the heavenly lemonade stand afterwards. When afterlife gives you lemons...',1111,[18,7]);Game.last.noPerm=1; + new Game.Upgrade('Heavenly bakery',loc("Unlocks %1% of the potential of your prestige level.",50)+'Also sells godly cakes and divine pastries. The pretzels aren\'t too bad either.',111111,[17,7]);Game.last.noPerm=1; + new Game.Upgrade('Heavenly confectionery',loc("Unlocks %1% of the potential of your prestige level.",75)+'They say angel bakers work there. They take angel lunch breaks and sometimes go on angel strikes.',11111111,[16,7]);Game.last.noPerm=1; + new Game.Upgrade('Heavenly key',loc("Unlocks %1% of the potential of your prestige level.",100)+'This is the key to the pearly (and tasty) gates of pastry heaven, granting you access to your entire stockpile of heavenly chips for baking purposes.
May you use them wisely.
',1111111111,[15,7]);Game.last.noPerm=1; + + order=10100; + Game.NewUpgradeCookie({name:'Skull cookies',desc:'Wanna know something spooky? You\'ve got one of these inside your head RIGHT NOW.',locked:1,icon:[12,8],power: 2, price: 444444444444}); + Game.NewUpgradeCookie({name:'Ghost cookies',desc:'They\'re something strange, but they look pretty good!',locked:1,icon:[13,8],power: 2, price: 444444444444}); + Game.NewUpgradeCookie({name:'Bat cookies',desc:'The cookies this town deserves.',locked:1,icon:[14,8],power: 2, price: 444444444444}); + Game.NewUpgradeCookie({name:'Slime cookies',desc:'The incredible melting cookies!',locked:1,icon:[15,8],power: 2, price: 444444444444}); + Game.NewUpgradeCookie({name:'Pumpkin cookies',desc:'Not even pumpkin-flavored. Tastes like glazing. Yeugh.',locked:1,icon:[16,8],power: 2, price: 444444444444}); + Game.NewUpgradeCookie({name:'Eyeball cookies',desc:'When you stare into the cookie, the cookie stares back at you.',locked:1,icon:[17,8],power: 2, price: 444444444444}); + Game.NewUpgradeCookie({name:'Spider cookies',desc:'You found the recipe on the web. They do whatever a cookie can.',locked:1,icon:[18,8],power: 2, price: 444444444444}); + + Game.halloweenDrops=['Skull cookies','Ghost cookies','Bat cookies','Slime cookies','Pumpkin cookies','Eyeball cookies','Spider cookies']; + + Game.GetHowManyHalloweenDrops=function() + { + var num=0; + for (var i in Game.halloweenDrops) {if (Game.Has(Game.halloweenDrops[i])) num++;} + return num; + } + /*for (var i in Game.halloweenDrops) + { + Game.Upgrades[Game.halloweenDrops[i]].descFunc=function(){return '
You currently own '+Game.GetHowManyHalloweenDrops()+'/'+Game.halloweenDrops.length+' halloween cookies.
'+this.ddesc;}; + }*/ + + order=0; + new Game.Upgrade('Persistent memory',loc("Subsequent research will be %1 times as fast.",10)+'It\'s all making sense!
Again!
',500,[9,2]);Game.last.pool='prestige'; + + order=40000; + new Game.Upgrade('Wrinkler doormat',loc("Wrinklers spawn much more frequently.")+'You\'re such a pushover.',7,[19,8]);//debug purposes only + Game.last.pool='debug'; + + order=10200; + Game.NewUpgradeCookie({name:'Christmas tree biscuits',desc:'Whose pine is it anyway?',locked:1,icon:[12,10],power:2,price: 252525252525}); + Game.NewUpgradeCookie({name:'Snowflake biscuits',desc:'Mass-produced to be unique in every way.',locked:1,icon:[13,10],power:2,price: 252525252525}); + Game.NewUpgradeCookie({name:'Snowman biscuits',desc:'It\'s frosted. Doubly so.',locked:1,icon:[14,10],power:2,price: 252525252525}); + Game.NewUpgradeCookie({name:'Holly biscuits',desc:'You don\'t smooch under these ones. That would be the mistletoe (which, botanically, is a smellier variant of the mistlefinger).',locked:1,icon:[15,10],power:2,price: 252525252525}); + Game.NewUpgradeCookie({name:'Candy cane biscuits',desc:'It\'s two treats in one!
(Further inspection reveals the frosting does not actually taste like peppermint, but like mundane sugary frosting.)',locked:1,icon:[16,10],power:2,price: 252525252525}); + Game.NewUpgradeCookie({name:'Bell biscuits',desc:'What do these even have to do with christmas? Who cares, ring them in!',locked:1,icon:[17,10],power:2,price: 252525252525}); + Game.NewUpgradeCookie({name:'Present biscuits',desc:'The prequel to future biscuits. Watch out!',locked:1,icon:[18,10],power:2,price: 252525252525}); + + order=10020; + Game.NewUpgradeCookie({name:'Gingerbread men',desc:'You like to bite the legs off first, right? How about tearing off the arms? You sick monster.',icon:[18,4],power: 2,price: 9999999999999999}); + Game.NewUpgradeCookie({name:'Gingerbread trees',desc:'Evergreens in pastry form. Yule be surprised what you can come up with.',icon:[18,3],power: 2,price: 9999999999999999}); + + order=25000; + new Game.Upgrade('A festive hat',''+loc("Unlocks... something.")+'Not a creature was stirring, not even a mouse.',25,[19,9],function() + { + var drop=choose(Game.santaDrops); + Game.Unlock(drop); + Game.Notify(loc("In the festive hat, you find..."),loc("a festive test tube
and %1.",drop),Game.Upgrades[drop].icon); + }); + + new Game.Upgrade('Increased merriness',getStrCookieProductionMultiplierPlus(15)+'
'+loc("Cost scales with Santa level.")+'It turns out that the key to increased merriness, strangely enough, happens to be a good campfire and some s\'mores.
You know what they say, after all; the s\'more, the merrier.
',2525,[17,9]); + new Game.Upgrade('Improved jolliness',getStrCookieProductionMultiplierPlus(15)+'
'+loc("Cost scales with Santa level.")+'A nice wobbly belly goes a long way.
You jolly?
',2525,[17,9]); + new Game.Upgrade('A lump of coal',getStrCookieProductionMultiplierPlus(1)+'
'+loc("Cost scales with Santa level.")+'Some of the world\'s worst stocking stuffing.
I guess you could try starting your own little industrial revolution, or something?...
',2525,[13,9]); + new Game.Upgrade('An itchy sweater',getStrCookieProductionMultiplierPlus(1)+'
'+loc("Cost scales with Santa level.")+'You don\'t know what\'s worse : the embarrassingly quaint "elf on reindeer" motif, or the fact that wearing it makes you feel like you\'re wrapped in a dead sasquatch.',2525,[14,9]); + new Game.Upgrade('Reindeer baking grounds',loc("Reindeer appear twice as frequently.")+'
'+loc("Cost scales with Santa level.")+'Male reindeer are from Mars; female reindeer are from venison.',2525,[12,9]); + new Game.Upgrade('Weighted sleighs',loc("Reindeer are twice as slow.")+'
'+loc("Cost scales with Santa level.")+'Hope it was worth the weight.
(Something something forced into cervidude)
',2525,[12,9]); + new Game.Upgrade('Ho ho ho-flavored frosting',loc("Reindeer give twice as much.")+'
'+loc("Cost scales with Santa level.")+'It\'s time to up the antler.',2525,[12,9]); + new Game.Upgrade('Season savings',loc("All buildings are %1% cheaper.",1)+'
'+loc("Cost scales with Santa level.")+'By Santa\'s beard, what savings!
But who will save us?
',2525,[16,9],function(){Game.storeToRefresh=1;}); + new Game.Upgrade('Toy workshop',loc("All upgrades are %1% cheaper.",5)+'
'+loc("Cost scales with Santa level.")+'Watch yours-elf around elvesdroppers who might steal our production secrets.
Or elven worse!
',2525,[16,9],function(){Game.upgradesToRebuild=1;}); + new Game.Upgrade('Naughty list',loc("%1 are twice as efficient.",cap(loc("grandmas")))+'
'+loc("Cost scales with Santa level.")+'This list contains every unholy deed perpetuated by grandmakind.
He won\'t be checking this one twice.
Once. Once is enough.
',2525,[15,9]); + new Game.Upgrade('Santa\'s bottomless bag',loc("Random drops are %1% more common.",10)+'
'+loc("Cost scales with Santa level.")+'This is one bottom you can\'t check out.',2525,[19,9]); + new Game.Upgrade('Santa\'s helpers',loc("Clicking is %1% more powerful.",10)+'
'+loc("Cost scales with Santa level.")+'Some choose to help hamburger; some choose to help you.
To each their own, I guess.
',2525,[19,9]); + new Game.Upgrade('Santa\'s legacy',loc("Cookie production multiplier +%1% per Santa's levels.",3)+'
'+loc("Cost scales with Santa level.")+'In the north pole, you gotta get the elves first. Then when you get the elves, you start making the toys. Then when you get the toys... then you get the cookies.',2525,[19,9]); + new Game.Upgrade('Santa\'s milk and cookies',loc("Milk is %1% more powerful.",5)+'
'+loc("Cost scales with Santa level.")+'Part of Santa\'s dreadfully unbalanced diet.',2525,[19,9]); + + order=40000; + new Game.Upgrade('Reindeer season',loc("Reindeer spawn much more frequently.")+'Go, Cheater! Go, Hacker and Faker!',7,[12,9]);//debug purposes only + Game.last.pool='debug'; + + order=25000; + new Game.Upgrade('Santa\'s dominion',getStrCookieProductionMultiplierPlus(20)+'
'+loc("All buildings are %1% cheaper.",1)+'
'+loc("All upgrades are %1% cheaper.",2)+'My name is Claus, king of kings;
Look on my toys, ye Mighty, and despair!
',2525252525252525,[19,10],function(){Game.storeToRefresh=1;}); + + order=10300; + var heartPower=function(){ + var pow=2; + if (Game.Has('Starlove')) pow=3; + if (Game.hasGod) + { + var godLvl=Game.hasGod('seasons'); + if (godLvl==1) pow*=1.3; + else if (godLvl==2) pow*=1.2; + else if (godLvl==3) pow*=1.1; + } + return pow; + }; + Game.NewUpgradeCookie({name:'Pure heart biscuits',desc:'Melty white chocolate
that says "I *like* like you".',season:'valentines',icon:[19,3], power:heartPower,price: 1000000}); + Game.NewUpgradeCookie({name:'Ardent heart biscuits',desc:'A red hot cherry biscuit that will nudge the target of your affection in interesting directions.',require:Game.last.name,season:'valentines',icon:[20,3], power:heartPower,price: 1000000000}); + Game.NewUpgradeCookie({name:'Sour heart biscuits',desc:'A bitter lime biscuit for the lonely and the heart-broken.',require:Game.last.name,season:'valentines',icon:[20,4], power:heartPower,price: 1000000000000}); + Game.NewUpgradeCookie({name:'Weeping heart biscuits',desc:'An ice-cold blueberry biscuit, symbol of a mending heart.',require:Game.last.name,season:'valentines',icon:[21,3], power:heartPower,price: 1000000000000000}); + Game.NewUpgradeCookie({name:'Golden heart biscuits',desc:'A beautiful biscuit to symbolize kindness, true love, and sincerity.',require:Game.last.name,season:'valentines',icon:[21,4], power:heartPower,price: 1000000000000000000}); + Game.NewUpgradeCookie({name:'Eternal heart biscuits',desc:'Silver icing for a very special someone you\'ve liked for a long, long time.',require:Game.last.name,season:'valentines',icon:[19,4], power:heartPower,price: 1000000000000000000000}); + + Game.heartDrops=['Pure heart biscuits','Ardent heart biscuits','Sour heart biscuits','Weeping heart biscuits','Golden heart biscuits','Eternal heart biscuits','Prism heart biscuits']; + + Game.GetHowManyHeartDrops=function() + { + var num=0; + for (var i in Game.heartDrops) {if (Game.Has(Game.heartDrops[i])) num++;} + return num; + } + + order=1100; + Game.TieredUpgrade('Gem polish','Get rid of the grime and let more light in.
Truly, truly outrageous.
','Prism',1); + Game.TieredUpgrade('9th color','Delve into untouched optical depths where even the mantis shrimp hasn\'t set an eye!','Prism',2); + Game.TieredUpgrade('Chocolate light','Bask into its cocoalescence.
(Warning : may cause various interesting albeit deadly skin conditions.)
','Prism',3); + Game.TieredUpgrade('Grainbow','Remember the different grains using the handy Roy G. Biv mnemonic : R is for rice, O is for oats... uh, B for barley?...','Prism',4); + Game.TieredUpgrade('Pure cosmic light','Your prisms now receive pristine, unadulterated photons from the other end of the universe.','Prism',5); + + order=255; + Game.GrandmaSynergy('Rainbow grandmas','A luminous grandma to sparkle into cookies.','Prism'); + + order=24000; + Game.seasonTriggerBasePrice=1000000000;//1111111111; + new Game.Upgrade('Season switcher',loc("Allows you to trigger seasonal events at will, for a price.")+'There will always be time.',1111,[16,6],function(){for (var i in Game.seasons){Game.Unlock(Game.seasons[i].trigger);}});Game.last.pool='prestige';Game.last.parents=['Heralds']; + new Game.Upgrade('Festive biscuit',loc("Triggers %1 season for the next 24 hours.
Triggering another season will cancel this one.
Cost scales with unbuffed CpS and increases with every season switch.",loc("Christmas"))+'\'Twas the night before Christmas- or was it?',Game.seasonTriggerBasePrice,[12,10]);Game.last.season='christmas';Game.last.pool='toggle'; + new Game.Upgrade('Ghostly biscuit',loc("Triggers %1 season for the next 24 hours.
Triggering another season will cancel this one.
Cost scales with unbuffed CpS and increases with every season switch.",loc("Halloween"))+'spooky scary skeletons
will wake you with a boo
',Game.seasonTriggerBasePrice,[13,8]);Game.last.season='halloween';Game.last.pool='toggle'; + new Game.Upgrade('Lovesick biscuit',loc("Triggers %1 season for the next 24 hours.
Triggering another season will cancel this one.
Cost scales with unbuffed CpS and increases with every season switch.",loc("Valentine's day"))+'Romance never goes out of fashion.',Game.seasonTriggerBasePrice,[20,3]);Game.last.season='valentines';Game.last.pool='toggle'; + new Game.Upgrade('Fool\'s biscuit',loc("Triggers %1 season for the next 24 hours.
Triggering another season will cancel this one.
Cost scales with unbuffed CpS and increases with every season switch.",loc("Business day"))+'Business. Serious business. This is absolutely all of your business.',Game.seasonTriggerBasePrice,[17,6]);Game.last.season='fools';Game.last.pool='toggle'; + + + order=40000; + new Game.Upgrade('Eternal seasons',loc("Seasons now last forever.")+'Season to taste.',7,[16,6],function(){for (var i in Game.seasons){Game.Unlock(Game.seasons[i].trigger);}});//debug purposes only + Game.last.pool='debug'; + + + order=20000; + new Game.Upgrade('Kitten managers',strKittenDesc+'that\'s not gonna paws any problem, sir',900000000000000000000,Game.GetIcon('Kitten',5));Game.last.kitten=1;Game.MakeTiered(Game.last,5,18); + + order=100; + new Game.Upgrade('Septillion fingers',getStrThousandFingersGain(20)+'[cursory flavor text]',10000000000000000000,[12,20]);Game.MakeTiered(Game.last,11,0); + new Game.Upgrade('Octillion fingers',getStrThousandFingersGain(20)+'Turns out you can quite put your finger on it.',10000000000000000000000,[12,19]);Game.MakeTiered(Game.last,12,0); + + order=150;new Game.Upgrade('Eludium mouse',getStrClickingGains(1)+'I rodent do that if I were you.',500000000000000,[11,15]);Game.MakeTiered(Game.last,6,11); + new Game.Upgrade('Wishalloy mouse',getStrClickingGains(1)+'Clicking is fine and dandy, but don\'t smash your mouse over it. Get your game on. Go play.',50000000000000000,[11,16]);Game.MakeTiered(Game.last,7,11); + order=200;Game.TieredUpgrade('Aging agents','Counter-intuitively, grandmas have the uncanny ability to become more powerful the older they get.','Grandma',6); + order=300;Game.TieredUpgrade('Pulsar sprinklers','There\'s no such thing as over-watering. The moistest is the bestest.','Farm',6); + order=500;Game.TieredUpgrade('Deep-bake process','A patented process increasing cookie yield two-fold for the same amount of ingredients. Don\'t ask how, don\'t take pictures, and be sure to wear your protective suit.','Factory',6); + order=400;Game.TieredUpgrade('Coreforge','You\'ve finally dug a tunnel down to the Earth\'s core. It\'s pretty warm down here.','Mine',6); + order=600;Game.TieredUpgrade('Generation ship','Built to last, this humongous spacecraft will surely deliver your cookies to the deep ends of space, one day.','Shipment',6); + order=700;Game.TieredUpgrade('Origin crucible','Built from the rarest of earths and located at the very deepest of the largest mountain, this legendary crucible is said to retain properties from the big-bang itself.','Alchemy lab',6); + order=800;Game.TieredUpgrade('Deity-sized portals','It\'s almost like, say, an elder god could fit through this thing now. Hypothetically.','Portal',6); + order=900;Game.TieredUpgrade('Far future enactment','The far future enactment authorizes you to delve deep into the future - where civilization has fallen and risen again, and cookies are plentiful.','Time machine',6); + order=1000;Game.TieredUpgrade('Nanocosmics','The theory of nanocosmics posits that each subatomic particle is in fact its own self-contained universe, holding unfathomable amounts of energy.
This somehow stacks with the nested universe theory, because physics.
','Antimatter condenser',6); + order=1100; + Game.TieredUpgrade('Glow-in-the-dark','Your prisms now glow in the dark, effectively doubling their output!','Prism',6); + + order=10032; + Game.NewUpgradeCookie({name:'Rose macarons',desc:'Although an odd flavor, these pastries recently rose in popularity.',icon:[22,3],require:'Box of macarons', power:3,price: 9999}); + Game.NewUpgradeCookie({name:'Lemon macarons',desc:'Tastefully sour, delightful treats.',icon:[23,3],require:'Box of macarons', power:3,price: 9999999}); + Game.NewUpgradeCookie({name:'Chocolate macarons',desc:'They\'re like tiny sugary burgers!',icon:[24,3],require:'Box of macarons', power:3,price: 9999999999}); + Game.NewUpgradeCookie({name:'Pistachio macarons',desc:'Pistachio shells now removed after multiple complaints.',icon:[22,4],require:'Box of macarons', power:3,price: 9999999999999}); + Game.NewUpgradeCookie({name:'Hazelnut macarons',desc:'These go especially well with coffee.',icon:[23,4],require:'Box of macarons', power:3,price: 9999999999999999}); + Game.NewUpgradeCookie({name:'Violet macarons',desc:'It\'s like spraying perfume into your mouth!',icon:[24,4],require:'Box of macarons', power:3,price: 9999999999999999999}); + + order=40000; + new Game.Upgrade('Magic shenanigans',loc("Cookie production multiplied by 1,000.")+'It\'s magic. I ain\'t gotta explain sh
t.
',7,[17,5]);//debug purposes only + Game.last.pool='debug'; + + + order=24000; + new Game.Upgrade('Bunny biscuit',loc("Triggers %1 season for the next 24 hours.
Triggering another season will cancel this one.
Cost scales with unbuffed CpS and increases with every season switch.",loc("Easter"))+'All the world will be your enemy
and when they catch you,
they will kill you...
but first they must catch you.
',Game.seasonTriggerBasePrice,[0,12]);Game.last.season='easter';Game.last.pool='toggle'; + + var eggPrice=999999999999; + var eggPrice2=99999999999999; + new Game.Upgrade('Chicken egg',getStrCookieProductionMultiplierPlus(1)+'
'+loc("Cost scales with how many eggs you own.")+'The egg. The egg came first. Get over it.',eggPrice,[1,12]); + new Game.Upgrade('Duck egg',getStrCookieProductionMultiplierPlus(1)+'
'+loc("Cost scales with how many eggs you own.")+'Then he waddled away.',eggPrice,[2,12]); + new Game.Upgrade('Turkey egg',getStrCookieProductionMultiplierPlus(1)+'
'+loc("Cost scales with how many eggs you own.")+'These hatch into strange, hand-shaped creatures.',eggPrice,[3,12]); + new Game.Upgrade('Quail egg',getStrCookieProductionMultiplierPlus(1)+'
'+loc("Cost scales with how many eggs you own.")+'These eggs are positively tiny. I mean look at them. How does this happen? Whose idea was that?',eggPrice,[4,12]); + new Game.Upgrade('Robin egg',getStrCookieProductionMultiplierPlus(1)+'
'+loc("Cost scales with how many eggs you own.")+'Holy azure-hued shelled embryos!',eggPrice,[5,12]); + new Game.Upgrade('Ostrich egg',getStrCookieProductionMultiplierPlus(1)+'
'+loc("Cost scales with how many eggs you own.")+'One of the largest eggs in the world. More like ostrouch, am I right?
Guys?
',eggPrice,[6,12]); + new Game.Upgrade('Cassowary egg',getStrCookieProductionMultiplierPlus(1)+'
'+loc("Cost scales with how many eggs you own.")+'The cassowary is taller than you, possesses murderous claws and can easily outrun you.
You\'d do well to be casso-wary of them.
',eggPrice,[7,12]); + new Game.Upgrade('Salmon roe',getStrCookieProductionMultiplierPlus(1)+'
'+loc("Cost scales with how many eggs you own.")+'Do the impossible, see the invisible.
Roe roe, fight the power?
',eggPrice,[8,12]); + new Game.Upgrade('Frogspawn',getStrCookieProductionMultiplierPlus(1)+'
'+loc("Cost scales with how many eggs you own.")+'I was going to make a pun about how these "toadally look like eyeballs", but froget it.',eggPrice,[9,12]); + new Game.Upgrade('Shark egg',getStrCookieProductionMultiplierPlus(1)+'
'+loc("Cost scales with how many eggs you own.")+'HELLO IS THIS FOOD?
LET ME TELL YOU ABOUT FOOD.
WHY DO I KEEP EATING MY FRIENDS
',eggPrice,[10,12]); + new Game.Upgrade('Turtle egg',getStrCookieProductionMultiplierPlus(1)+'
'+loc("Cost scales with how many eggs you own.")+'Turtles, right? Hatch from shells. Grow into shells. What\'s up with that?
Now for my skit about airplane food.
',eggPrice,[11,12]); + new Game.Upgrade('Ant larva',getStrCookieProductionMultiplierPlus(1)+'
'+loc("Cost scales with how many eggs you own.")+'These are a delicacy in some countries, I swear. You will let these invade your digestive tract, and you will derive great pleasure from it.
And all will be well.
',eggPrice,[12,12]); + new Game.Upgrade('Golden goose egg',loc("Golden cookies appear %1% more often.",5)+'
'+loc("Cost scales with how many eggs you own.")+'The sole vestige of a tragic tale involving misguided investments.',eggPrice2,[13,12]); + new Game.Upgrade('Faberge egg',loc("All buildings and upgrades are %1% cheaper.",1)+'
'+loc("Cost scales with how many eggs you own.")+'This outrageous egg is definitely fab.',eggPrice2,[14,12],function(){Game.storeToRefresh=1;}); + new Game.Upgrade('Wrinklerspawn',loc("Wrinklers explode into %1% more cookies.",5)+'
'+loc("Cost scales with how many eggs you own.")+'Look at this little guy! It\'s gonna be a big boy someday! Yes it is!',eggPrice2,[15,12]); + new Game.Upgrade('Cookie egg',loc("Clicking is %1% more powerful.",10)+'
'+loc("Cost scales with how many eggs you own.")+'The shell appears to be chipped.
I wonder what\'s inside this one!
',eggPrice2,[16,12]); + new Game.Upgrade('Omelette',loc("Other eggs appear %1% more frequently.",10)+'
'+loc("Cost scales with how many eggs you own.")+'Fromage not included.',eggPrice2,[17,12]); + new Game.Upgrade('Chocolate egg',loc("Contains a lot of cookies.")+'
'+loc("Cost scales with how many eggs you own.")+'Laid by the elusive cocoa bird. There\'s a surprise inside!',eggPrice2,[18,12],function() + { + var cookies=Game.cookies*0.05; + Game.Notify('Chocolate egg',loc("The egg bursts into %1 cookies!",Beautify(cookies)),Game.Upgrades['Chocolate egg'].icon); + Game.Earn(cookies); + }); + new Game.Upgrade('Century egg',loc("You continually gain more CpS the longer you've played in the current ascension.")+'
'+loc("Cost scales with how many eggs you own.")+'Actually not centuries-old. This one isn\'t a day over 86!',eggPrice2,[19,12]); + Game.last.descFunc=function(){ + var day=Math.floor((Date.now()-Game.startDate)/1000/10)*10/60/60/24; + day=Math.min(day,100); + var n=(1-Math.pow(1-day/100,3))*0.1; + return '
'+loc("Current boost:")+' +'+Beautify(n*100,1)+'%
'+this.ddesc; + }; + new Game.Upgrade('"egg"',''+loc("+%1 CpS",9)+'hey it\'s "egg"',eggPrice2,[20,12]); + + Game.easterEggs=['Chicken egg','Duck egg','Turkey egg','Quail egg','Robin egg','Ostrich egg','Cassowary egg','Salmon roe','Frogspawn','Shark egg','Turtle egg','Ant larva','Golden goose egg','Faberge egg','Wrinklerspawn','Cookie egg','Omelette','Chocolate egg','Century egg','"egg"']; + Game.eggDrops=['Chicken egg','Duck egg','Turkey egg','Quail egg','Robin egg','Ostrich egg','Cassowary egg','Salmon roe','Frogspawn','Shark egg','Turtle egg','Ant larva']; + Game.rareEggDrops=['Golden goose egg','Faberge egg','Wrinklerspawn','Cookie egg','Omelette','Chocolate egg','Century egg','"egg"']; + + Game.GetHowManyEggs=function() + { + var num=0; + for (var i in Game.easterEggs) {if (Game.Has(Game.easterEggs[i])) num++;} + return num; + } + for (var i in Game.eggDrops)//scale egg prices to how many eggs you have + {Game.Upgrades[Game.eggDrops[i]].priceFunc=function(){return Math.pow(2,Game.GetHowManyEggs())*999;}} + + for (var i in Game.rareEggDrops) + {Game.Upgrades[Game.rareEggDrops[i]].priceFunc=function(){return Math.pow(3,Game.GetHowManyEggs())*999;}} + + + Game.DropEgg=function(failRate) + { + failRate*=1/Game.dropRateMult(); + if (Game.season!='easter') return; + if (Game.HasAchiev('Hide & seek champion')) failRate*=0.7; + if (Game.Has('Omelette')) failRate*=0.9; + if (Game.Has('Starspawn')) failRate*=0.9; + if (Game.hasGod) + { + var godLvl=Game.hasGod('seasons'); + if (godLvl==1) failRate*=0.9; + else if (godLvl==2) failRate*=0.95; + else if (godLvl==3) failRate*=0.97; + } + if (Math.random()>=failRate) + { + var drop=''; + if (Math.random()<0.1) drop=choose(Game.rareEggDrops); + else drop=choose(Game.eggDrops); + if (Game.Has(drop) || Game.HasUnlocked(drop))//reroll if we have it + { + if (Math.random()<0.1) drop=choose(Game.rareEggDrops); + else drop=choose(Game.eggDrops); + } + if (Game.Has(drop) || Game.HasUnlocked(drop)) return; + Game.Unlock(drop); + Game.Notify(loc("You found an egg!"),''+drop+'',Game.Upgrades[drop].icon); + } + }; + + order=10032; + Game.NewUpgradeCookie({name:'Caramel macarons',desc:'The saltiest, chewiest of them all.',icon:[25,3],require:'Box of macarons', power:3,price: 9999999999999999999999}); + Game.NewUpgradeCookie({name:'Licorice macarons',desc:'Also known as "blackarons".',icon:[25,4],require:'Box of macarons', power:3,price: 9999999999999999999999999}); + + + order=525; + Game.TieredUpgrade('Taller tellers','Able to process a higher amount of transactions. Careful though, as taller tellers tell tall tales.','Bank',1); + Game.TieredUpgrade('Scissor-resistant credit cards','For those truly valued customers.','Bank',2); + Game.TieredUpgrade('Acid-proof vaults','You know what they say : better safe than sorry.','Bank',3); + Game.TieredUpgrade('Chocolate coins','This revolutionary currency is much easier to melt from and into ingots - and tastes much better, for a change.','Bank',4); + Game.TieredUpgrade('Exponential interest rates','Can\'t argue with mathematics! Now fork it over.','Bank',5); + Game.TieredUpgrade('Financial zen','The ultimate grail of economic thought; the feng shui of big money, the stock market yoga - the Heimlich maneuver of dimes and nickels.','Bank',6); + + order=550; + Game.TieredUpgrade('Golden idols','Lure even greedier adventurers to retrieve your cookies. Now that\'s a real idol game!','Temple',1); + Game.TieredUpgrade('Sacrifices','What\'s a life to a gigaton of cookies?','Temple',2); + Game.TieredUpgrade('Delicious blessing','And lo, the Baker\'s almighty spoon came down and distributed holy gifts unto the believers - shimmering sugar, and chocolate dark as night, and all manner of wheats. And boy let me tell you, that party was mighty gnarly.','Temple',3); + Game.TieredUpgrade('Sun festival','Free the primordial powers of your temples with these annual celebrations involving fire-breathers, traditional dancing, ritual beheadings and other merriments!','Temple',4); + Game.TieredUpgrade('Enlarged pantheon','Enough spiritual inadequacy! More divinities than you\'ll ever need, or your money back! 100% guaranteed!','Temple',5); + Game.TieredUpgrade('Great Baker in the sky','This is it. The ultimate deity has finally cast Their sublimely divine eye upon your operation; whether this is a good thing or possibly the end of days is something you should find out very soon.','Temple',6); + + order=575; + Game.TieredUpgrade('Pointier hats','Tests have shown increased thaumic receptivity relative to the geometric proportions of wizardly conic implements.','Wizard tower',1); + Game.TieredUpgrade('Beardlier beards','Haven\'t you heard? The beard is the word.','Wizard tower',2); + Game.TieredUpgrade('Ancient grimoires','Contain interesting spells such as "Turn Water To Drool", "Grow Eyebrows On Furniture" and "Summon Politician".','Wizard tower',3); + Game.TieredUpgrade('Kitchen curses','Exotic magic involved in all things pastry-related. Hexcellent!','Wizard tower',4); + Game.TieredUpgrade('School of sorcery','This cookie-funded academy of witchcraft is home to the 4 prestigious houses of magic : the Jocks, the Nerds, the Preps, and the Deathmunchers.','Wizard tower',5); + Game.TieredUpgrade('Dark formulas','Eldritch forces are at work behind these spells - you get the feeling you really shouldn\'t be messing with those. But I mean, free cookies, right?','Wizard tower',6); + + + order=250; + Game.GrandmaSynergy('Banker grandmas','A nice banker to cash in more cookies.','Bank');Game.last.order=250.0591; + Game.GrandmaSynergy('Priestess grandmas','A nice priestess to praise the one true Baker in the sky.','Temple');Game.last.order=250.0592; + Game.GrandmaSynergy('Witch grandmas','A nice witch to cast a zip, and a zoop, and poof! Cookies.','Wizard tower');Game.last.order=250.0593; + + + + order=0; + new Game.Upgrade('Tin of british tea biscuits',loc("Contains an assortment of fancy biscuits.")+'Every time is tea time.',25,[21,8]);Game.last.pool='prestige';Game.last.parents=['Heavenly cookies']; + new Game.Upgrade('Box of macarons',loc("Contains an assortment of macarons.")+'Multicolored delicacies filled with various kinds of jam.
Not to be confused with macaroons, macaroni, macarena or any of that nonsense.
',25,[20,8]);Game.last.pool='prestige';Game.last.parents=['Heavenly cookies']; + new Game.Upgrade('Box of brand biscuits',loc("Contains an assortment of popular biscuits.")+'They\'re brand new!',25,[20,9]);Game.last.pool='prestige';Game.last.parents=['Heavenly cookies']; + + order=10020; + Game.NewUpgradeCookie({name:'Pure black chocolate cookies',desc:'Dipped in a lab-made substance darker than the darkest cocoa (dubbed "chocoalate").',icon:[26,3],power: 5,price: 9999999999999999*5}); + Game.NewUpgradeCookie({name:'Pure white chocolate cookies',desc:'Elaborated on the nano-scale, the coating on this biscuit is able to refract light even in a pitch-black environment.',icon:[26,4],power: 5,price: 9999999999999999*5}); + Game.NewUpgradeCookie({name:'Ladyfingers',desc:'Cleaned and sanitized so well you\'d swear they\'re actual biscuits.',icon:[27,3],power: 3,price: 99999999999999999}); + Game.NewUpgradeCookie({name:'Tuiles',desc:'These never go out of tile.',icon:[27,4],power: 3,price: 99999999999999999*5}); + Game.NewUpgradeCookie({name:'Chocolate-stuffed biscuits',desc:'A princely snack!
The holes are so the chocolate stuffing can breathe.',icon:[28,3],power: 3,price: 999999999999999999}); + Game.NewUpgradeCookie({name:'Checker cookies',desc:'A square cookie? This solves so many storage and packaging problems! You\'re a genius!',icon:[28,4],power: 3,price: 999999999999999999*5}); + Game.NewUpgradeCookie({name:'Butter cookies',desc:'These melt right off your mouth and into your heart. (Let\'s face it, they\'re rather fattening.)',icon:[29,3],power: 3,price: 9999999999999999999}); + Game.NewUpgradeCookie({name:'Cream cookies',desc:'It\'s like two chocolate chip cookies! But brought together with the magic of cream! It\'s fiendishly perfect!',icon:[29,4],power: 3,price: 9999999999999999999*5}); + + order=0; + var desc=loc("Placing an upgrade in this slot will make its effects permanent across all playthroughs."); + new Game.Upgrade('Permanent upgrade slot I',desc, 100,[0,10]);Game.last.pool='prestige';Game.last.iconFunction=function(){return Game.PermanentSlotIcon(0);};Game.last.activateFunction=function(){Game.AssignPermanentSlot(0);}; + new Game.Upgrade('Permanent upgrade slot II',desc, 20000,[1,10]);Game.last.pool='prestige';Game.last.parents=['Permanent upgrade slot I'];Game.last.iconFunction=function(){return Game.PermanentSlotIcon(1);};Game.last.activateFunction=function(){Game.AssignPermanentSlot(1);}; + new Game.Upgrade('Permanent upgrade slot III',desc, 3000000,[2,10]);Game.last.pool='prestige';Game.last.parents=['Permanent upgrade slot II'];Game.last.iconFunction=function(){return Game.PermanentSlotIcon(2);};Game.last.activateFunction=function(){Game.AssignPermanentSlot(2);}; + new Game.Upgrade('Permanent upgrade slot IV',desc, 400000000,[3,10]);Game.last.pool='prestige';Game.last.parents=['Permanent upgrade slot III'];Game.last.iconFunction=function(){return Game.PermanentSlotIcon(3);};Game.last.activateFunction=function(){Game.AssignPermanentSlot(3);}; + new Game.Upgrade('Permanent upgrade slot V',desc, 50000000000,[4,10]);Game.last.pool='prestige';Game.last.parents=['Permanent upgrade slot IV'];Game.last.iconFunction=function(){return Game.PermanentSlotIcon(4);};Game.last.activateFunction=function(){Game.AssignPermanentSlot(4);}; + + var slots=['Permanent upgrade slot I','Permanent upgrade slot II','Permanent upgrade slot III','Permanent upgrade slot IV','Permanent upgrade slot V']; + for (var i=0;i'+loc("Click to activate.")+''); + var upgrade=Game.UpgradesById[Game.permanentUpgrades[i]]; + return '
'+loc("Current:")+' '+tinyIcon(upgrade.icon)+' '+upgrade.dname+'
'+this.ddesc+(context=='stats'?'':'
'+loc("Click to activate.")+''); + };}(i); + } + + Game.PermanentSlotIcon=function(slot) + { + if (Game.permanentUpgrades[slot]==-1) return [slot,10]; + return Game.UpgradesById[Game.permanentUpgrades[slot]].icon; + } + Game.AssignPermanentSlot=function(slot) + { + PlaySound('snd/tick.mp3'); + Game.tooltip.hide(); + var list=[]; + for (var i in Game.Upgrades) + { + var me=Game.Upgrades[i]; + if (me.bought && me.unlocked && !me.noPerm && (me.pool=='' || me.pool=='cookie')) + { + var fail=0; + for (var ii in Game.permanentUpgrades) {if (Game.permanentUpgrades[ii]==me.id) fail=1;}//check if not already in another permaslot + if (!fail) list.push(me); + } + } + + var sortMap=function(a,b) + { + if (a.order>b.order) return 1; + else if (a.order

'+loc("Pick an upgrade to make permanent")+'

'+ + + '
'+(Game.crate(Game.UpgradesById[upgrade==-1?0:upgrade],'','','upgradeToSlot'))+'
'+ + '
'+upgrades+'
'+ + '
'+loc("Here are all the upgrades you've purchased last playthrough.
Pick one to permanently gain its effects!
You can reassign this slot anytime you ascend.")+'
' + ,[[loc("Confirm"),'Game.permanentUpgrades['+slot+']=Game.SelectingPermanentUpgrade;Game.BuildAscendTree();Game.ClosePrompt();'],loc("Cancel")],0,'widePrompt'); + } + Game.SelectingPermanentUpgrade=-1; + Game.PutUpgradeInPermanentSlot=function(upgrade,slot) + { + Game.SelectingPermanentUpgrade=upgrade; + l('upgradeToSlotWrap').innerHTML=''; + l('upgradeToSlotWrap').style.display=(upgrade==-1?'none':'block'); + l('upgradeToSlotNone').style.display=(upgrade!=-1?'none':'block'); + l('upgradeToSlotWrap').innerHTML=(Game.crate(Game.UpgradesById[upgrade==-1?0:upgrade],'','','upgradeToSlot')); + } + + new Game.Upgrade('Starspawn',loc("Eggs drop %1% more often.",10)+'
'+loc("Golden cookies appear %1% more often during %2.",[2,loc("Easter")]),111111,[0,12]);Game.last.pool='prestige';Game.last.parents=['Season switcher']; + new Game.Upgrade('Starsnow',loc("Christmas cookies drop %1% more often.",5)+'
'+loc("Reindeer appear %1% more often.",5),111111,[12,9]);Game.last.pool='prestige';Game.last.parents=['Season switcher']; + new Game.Upgrade('Starterror',loc("Spooky cookies drop %1% more often.",10)+'
'+loc("Golden cookies appear %1% more often during %2.",[2,loc("Halloween")]),111111,[13,8]);Game.last.pool='prestige';Game.last.parents=['Season switcher']; + new Game.Upgrade('Starlove',loc("Heart cookies are %1% more powerful.",50)+'
'+loc("Golden cookies appear %1% more often during %2.",[2,loc("Valentine's day")]),111111,[20,3]);Game.last.pool='prestige';Game.last.parents=['Season switcher']; + new Game.Upgrade('Startrade',loc("Golden cookies appear %1% more often during %2.",[5,loc("Business day")]),111111,[17,6]);Game.last.pool='prestige';Game.last.parents=['Season switcher']; + + var angelPriceFactor=7; + var desc=function(percent,total){return loc("You gain another +%1% of your regular CpS while the game is closed, for a total of %2%.",[percent,total]);} + new Game.Upgrade('Angels',desc(10,15)+'Lowest-ranking at the first sphere of pastry heaven, angels are tasked with delivering new recipes to the mortals they deem worthy.',Math.pow(angelPriceFactor,1),[0,11]);Game.last.pool='prestige';Game.last.parents=['Twin Gates of Transcendence']; + new Game.Upgrade('Archangels',desc(10,25)+'Members of the first sphere of pastry heaven, archangels are responsible for the smooth functioning of the world\'s largest bakeries.',Math.pow(angelPriceFactor,2),[1,11]);Game.last.pool='prestige';Game.last.parents=['Angels']; + new Game.Upgrade('Virtues',desc(10,35)+'Found at the second sphere of pastry heaven, virtues make use of their heavenly strength to push and drag the stars of the cosmos.',Math.pow(angelPriceFactor,3),[2,11]);Game.last.pool='prestige';Game.last.parents=['Archangels']; + new Game.Upgrade('Dominions',desc(10,45)+'Ruling over the second sphere of pastry heaven, dominions hold a managerial position and are in charge of accounting and regulating schedules.',Math.pow(angelPriceFactor,4),[3,11]);Game.last.pool='prestige';Game.last.parents=['Virtues']; + new Game.Upgrade('Cherubim',desc(10,55)+'Sieging at the first sphere of pastry heaven, the four-faced cherubim serve as heavenly bouncers and bodyguards.',Math.pow(angelPriceFactor,5),[4,11]);Game.last.pool='prestige';Game.last.parents=['Dominions']; + new Game.Upgrade('Seraphim',desc(10,65)+'Leading the first sphere of pastry heaven, seraphim possess ultimate knowledge of everything pertaining to baking.',Math.pow(angelPriceFactor,6),[5,11]);Game.last.pool='prestige';Game.last.parents=['Cherubim']; + new Game.Upgrade('God',desc(10,75)+'Like Santa, but less fun.',Math.pow(angelPriceFactor,7),[6,11]);Game.last.pool='prestige';Game.last.parents=['Seraphim']; + + new Game.Upgrade('Twin Gates of Transcendence',loc("You now keep making cookies while the game is closed, at the rate of %1% of your regular CpS and up to 1 hour after the game is closed.
(Beyond 1 hour, this is reduced by a further %2% - your rate goes down to %3% of your CpS.)",[5,90,0.5])+'This is one occasion you\'re always underdressed for. Don\'t worry, just rush in past the bouncer and pretend you know people.',1,[15,11]);Game.last.pool='prestige'; + + new Game.Upgrade('Heavenly luck',loc("Golden cookies appear %1% more often.",5)+'Someone up there likes you.',77,[22,6]);Game.last.pool='prestige'; + new Game.Upgrade('Lasting fortune',loc("Golden cookie effects last %1% longer.",10)+'This isn\'t your average everyday luck. This is... advanced luck.',777,[23,6]);Game.last.pool='prestige';Game.last.parents=['Heavenly luck']; + new Game.Upgrade('Decisive fate',loc("Golden cookies stay %1% longer.",5)+'Life just got a bit more intense.',7777,[10,14]);Game.last.pool='prestige';Game.last.parents=['Lasting fortune']; + + new Game.Upgrade('Divine discount',loc("All buildings are %1% cheaper.",1)+'Someone special deserves a special price.',99999,[21,7]);Game.last.pool='prestige';Game.last.parents=['Decisive fate']; + new Game.Upgrade('Divine sales',loc("All upgrades are %1% cheaper.",1)+'Everything must go!',99999,[18,7]);Game.last.pool='prestige';Game.last.parents=['Decisive fate']; + new Game.Upgrade('Divine bakeries',loc("Cookie upgrades are %1 times cheaper.",5)+'They sure know what they\'re doing.',399999,[17,7]);Game.last.pool='prestige';Game.last.parents=['Divine sales','Divine discount']; + + new Game.Upgrade('Starter kit',loc("You start with %1.",loc("%1 cursor",10))+'This can come in handy.',50,[0,14]);Game.last.pool='prestige';Game.last.parents=['Tin of british tea biscuits','Box of macarons','Box of brand biscuits','Tin of butter cookies']; + new Game.Upgrade('Starter kitchen',loc("You start with %1.",loc("%1 grandma",5))+'Where did these come from?',5000,[1,14]);Game.last.pool='prestige';Game.last.parents=['Starter kit']; + new Game.Upgrade('Halo gloves',loc("Clicking is %1% more powerful.",10)+'Smite that cookie.',55555,[22,7]);Game.last.pool='prestige';Game.last.parents=['Starter kit']; + + new Game.Upgrade('Kitten angels',strKittenDesc+'All cats go to heaven.',9000,[23,7]);Game.last.pool='prestige';Game.last.parents=['Dominions'];Game.last.kitten=1; + + new Game.Upgrade('Unholy bait',loc("Wrinklers appear %1 times as fast.",5)+'No wrinkler can resist the scent of worm biscuits.',44444,[15,12]);Game.last.pool='prestige';Game.last.parents=['Starter kitchen']; + new Game.Upgrade('Sacrilegious corruption',loc("Wrinklers explode into %1% more cookies.",5)+'Unique in the animal kingdom, the wrinkler digestive tract is able to withstand an incredible degree of dilation - provided you prod them appropriately.',444444,[19,8]);Game.last.pool='prestige';Game.last.parents=['Unholy bait']; + + + order=200;Game.TieredUpgrade('Xtreme walkers','Complete with flame decals and a little horn that goes "toot".','Grandma',7); + order=300;Game.TieredUpgrade('Fudge fungus','A sugary parasite whose tendrils help cookie growth.
Please do not breathe in the spores. In case of spore ingestion, seek medical help within the next 36 seconds.
','Farm',7); + order=400;Game.TieredUpgrade('Planetsplitters','These new state-of-the-art excavators have been tested on Merula, Globort and Flwanza VI, among other distant planets which have been curiously quiet lately.','Mine',7); + order=500;Game.TieredUpgrade('Cyborg workforce','Semi-synthetic organisms don\'t slack off, don\'t unionize, and have 20% shorter lunch breaks, making them ideal labor fodder.','Factory',7); + order=525;Game.TieredUpgrade('Way of the wallet','This new monetary school of thought is all the rage on the banking scene; follow its precepts and you may just profit from it.','Bank',7); + order=550;Game.TieredUpgrade('Creation myth','Stories have been circulating about the origins of the very first cookie that was ever baked; tales of how it all began, in the Dough beyond time and the Ovens of destiny.','Temple',7); + order=575;Game.TieredUpgrade('Cookiemancy','There it is; the perfected school of baking magic. From summoning chips to hexing nuts, there is not a single part of cookie-making that hasn\'t been improved tenfold by magic tricks.','Wizard tower',7); + order=600;Game.TieredUpgrade('Dyson sphere','You\'ve found a way to apply your knowledge of cosmic technology to slightly more local endeavors; this gigantic sphere of meta-materials, wrapping the solar system, is sure to kick your baking abilities up a notch.','Shipment',7); + order=700;Game.TieredUpgrade('Theory of atomic fluidity','Pushing alchemy to its most extreme limits, you find that everything is transmutable into anything else - lead to gold, mercury to water; more importantly, you realize that anything can -and should- be converted to cookies.','Alchemy lab',7); + order=800;Game.TieredUpgrade('End of times back-up plan','Just in case, alright?','Portal',7); + order=900;Game.TieredUpgrade('Great loop hypothesis','What if our universe is just one instance of an infinite cycle? What if, before and after it, stretched infinite amounts of the same universe, themselves containing infinite amounts of cookies?','Time machine',7); + order=1000;Game.TieredUpgrade('The Pulse','You\'ve tapped into the very pulse of the cosmos, a timeless rhythm along which every material and antimaterial thing beats in unison. This, somehow, means more cookies.','Antimatter condenser',7); + order=1100; + Game.TieredUpgrade('Lux sanctorum','Your prism attendants have become increasingly mesmerized with something in the light - or maybe something beyond it; beyond us all, perhaps?','Prism',7); + + + order=200;Game.TieredUpgrade('The Unbridling','It might be a classic tale of bad parenting, but let\'s see where grandma is going with this.','Grandma',8); + order=300;Game.TieredUpgrade('Wheat triffids','Taking care of crops is so much easier when your plants can just walk about and help around the farm.
Do not pet. Do not feed. Do not attempt to converse with.
','Farm',8); + order=400;Game.TieredUpgrade('Canola oil wells','A previously untapped resource, canola oil permeates the underground olifers which grant it its particular taste and lucrative properties.','Mine',8); + order=500;Game.TieredUpgrade('78-hour days','Why didn\'t we think of this earlier?','Factory',8); + order=525;Game.TieredUpgrade('The stuff rationale','If not now, when? If not it, what? If not things... stuff?','Bank',8); + order=550;Game.TieredUpgrade('Theocracy','You\'ve turned your cookie empire into a perfect theocracy, gathering the adoration of zillions of followers from every corner of the universe.
Don\'t let it go to your head.
','Temple',8); + order=575;Game.TieredUpgrade('Rabbit trick','Using nothing more than a fancy top hat, your wizards have found a way to simultaneously curb rabbit population and produce heaps of extra cookies for basically free!
Resulting cookies may or may not be fit for vegans.
','Wizard tower',8); + order=600;Game.TieredUpgrade('The final frontier','It\'s been a long road, getting from there to here. It\'s all worth it though - the sights are lovely and the oil prices slightly more reasonable.','Shipment',8); + order=700;Game.TieredUpgrade('Beige goo','Well now you\'ve done it. Good job. Very nice. That\'s 3 galaxies you\'ve just converted into cookies. Good thing you can hop from universe to universe.','Alchemy lab',8); + order=800;Game.TieredUpgrade('Maddening chants','A popular verse goes like so : "jau\'hn madden jau\'hn madden aeiouaeiouaeiou brbrbrbrbrbrbr"','Portal',8); + order=900;Game.TieredUpgrade('Cookietopian moments of maybe','Reminiscing how things could have been, should have been, will have been.','Time machine',8); + order=1000;Game.TieredUpgrade('Some other super-tiny fundamental particle? Probably?','When even the universe is running out of ideas, that\'s when you know you\'re nearing the end.','Antimatter condenser',8); + order=1100; + Game.TieredUpgrade('Reverse shadows','Oh man, this is really messing with your eyes.','Prism',8); + + + order=20000; + new Game.Upgrade('Kitten accountants',strKittenDesc+'business going great, sir',900000000000000000000000,Game.GetIcon('Kitten',6));Game.last.kitten=1;Game.MakeTiered(Game.last,6,18); + new Game.Upgrade('Kitten specialists',strKittenDesc+'optimeowzing your workflow like whoah, sir',900000000000000000000000000,Game.GetIcon('Kitten',7));Game.last.kitten=1;Game.MakeTiered(Game.last,7,18); + new Game.Upgrade('Kitten experts',strKittenDesc+'10 years expurrrtise in the cookie business, sir',900000000000000000000000000000,Game.GetIcon('Kitten',8));Game.last.kitten=1;Game.MakeTiered(Game.last,8,18); + + new Game.Upgrade('How to bake your dragon',loc("Allows you to purchase a crumbly egg once you have earned 1 million cookies.")+'A tome full of helpful tips such as "oh god, stay away from it", "why did we buy this thing, it\'s not even house-broken" and "groom twice a week in the direction of the scales".',9,[22,12]);Game.last.pool='prestige'; + + order=25100; + new Game.Upgrade('A crumbly egg',loc("Unlocks the cookie dragon egg.")+'Thank you for adopting this robust, fun-loving cookie dragon! It will bring you years of joy and entertainment.
Keep in a dry and cool place, and away from other house pets. Subscription to home insurance is strongly advised.
',25,[21,12]); + + new Game.Upgrade('Chimera',loc("Synergy upgrades are %1% cheaper.",2)+'
'+loc("You gain another +%1% of your regular CpS while the game is closed.",5)+'
'+loc("You retain optimal cookie production while the game is closed for %1 more days.",2)+'More than the sum of its parts.',Math.pow(angelPriceFactor,9),[24,7]);Game.last.pool='prestige';Game.last.parents=['God','Lucifer','Synergies Vol. II']; + + new Game.Upgrade('Tin of butter cookies',loc("Contains an assortment of rich butter cookies.")+'Five varieties of danish cookies.
Complete with little paper cups.
',25,[21,9]);Game.last.pool='prestige';Game.last.parents=['Heavenly cookies']; + + new Game.Upgrade('Golden switch',loc("Unlocks the golden switch, which passively boosts your CpS by %1% but disables golden cookies.",50)+'Less clicking, more idling.',999,[21,10]);Game.last.pool='prestige';Game.last.parents=['Heavenly luck']; + + new Game.Upgrade('Classic dairy selection',loc("Unlocks the milk selector, letting you pick which milk is displayed under your cookie.
Comes with a variety of basic flavors.")+'Don\'t have a cow, man.',9,[1,8]);Game.last.pool='prestige';Game.last.parents=[]; + + new Game.Upgrade('Fanciful dairy selection',loc("Contains more exotic flavors for your milk selector.")+'Strong bones for the skeleton army.',1000000,[9,7]);Game.last.pool='prestige';Game.last.parents=['Classic dairy selection']; + + order=10300; + Game.NewUpgradeCookie({name:'Dragon cookie',desc:'Imbued with the vigor and vitality of a full-grown cookie dragon, this mystical cookie will embolden your empire for the generations to come.',icon:[10,25],power:5,price:9999999999999999*7,locked:1}); + + + order=40000; + new Game.Upgrade('Golden switch [off]',loc("Turning this on will give you a passive +%1% CpS, but prevents golden cookies from spawning.
Cost is equal to 1 hour of production.",50),1000000,[20,10]); + Game.last.pool='toggle';Game.last.toggleInto='Golden switch [on]'; + Game.last.priceFunc=function(){return Game.cookiesPs*60*60;} + var func=function(){ + if (Game.Has('Residual luck')) + { + var bonus=0; + var upgrades=Game.goldenCookieUpgrades; + for (var i in upgrades) {if (Game.Has(upgrades[i])) bonus++;} + return '
'+Game.listTinyOwnedUpgrades(Game.goldenCookieUpgrades)+'

The effective boost is +'+Beautify(Math.round(50+bonus*10))+'%
thanks to residual luck
and your '+bonus+' golden cookie upgrade'+(bonus==1?'':'s')+'.
'+this.ddesc; + } + return this.desc; + }; + if (EN) Game.last.descFunc=func; + + new Game.Upgrade('Golden switch [on]',loc("The switch is currently giving you a passive +%1% CpS; it also prevents golden cookies from spawning.
Turning it off will revert those effects.
Cost is equal to 1 hour of production.",50),1000000,[21,10]); + Game.last.pool='toggle';Game.last.toggleInto='Golden switch [off]'; + Game.last.priceFunc=function(){return Game.cookiesPs*60*60;} + Game.last.descFunc=func; + + order=50000; + new Game.Upgrade('Milk selector',loc("Lets you pick what flavor of milk to display."),0,[1,8]); + Game.last.descFunc=function(){ + var choice=this.choicesFunction()[Game.milkType]; + if (!choice) choice=this.choicesFunction()[0]; + return '
'+loc("Current:")+' '+tinyIcon(choice.icon)+' '+choice.name+'
'+this.ddesc; + }; + + Game.last.pool='toggle'; + Game.last.choicesFunction=function() + { + var rank=0; + var choices=[]; + + for (var i=0;imaxRank) choices[i]=0; + } + + choices[Game.milkType].selected=1; + return choices; + } + Game.last.choicesPick=function(id) + {Game.milkType=id;} + + + order=10300; + var butterBiscuitMult=100000000; + Game.NewUpgradeCookie({name:'Milk chocolate butter biscuit',desc:'Rewarded for owning 100 of everything.
It bears the engraving of a fine entrepreneur.',icon:[27,8],power: 10,price: 999999999999999999999*butterBiscuitMult,locked:1}); + Game.NewUpgradeCookie({name:'Dark chocolate butter biscuit',desc:'Rewarded for owning 150 of everything.
It is adorned with the image of an experienced cookie tycoon.',icon:[27,9],power: 10,price: 999999999999999999999999*butterBiscuitMult,locked:1}); + Game.NewUpgradeCookie({name:'White chocolate butter biscuit',desc:'Rewarded for owning 200 of everything.
The chocolate is chiseled to depict a masterful pastry magnate.',icon:[28,9],power: 10,price: 999999999999999999999999999*butterBiscuitMult,locked:1}); + Game.NewUpgradeCookie({name:'Ruby chocolate butter biscuit',desc:'Rewarded for owning 250 of everything.
Covered in a rare red chocolate, this biscuit is etched to represent the face of a cookie industrialist gone mad with power.',icon:[28,8],power: 10,price: 999999999999999999999999999999*butterBiscuitMult,locked:1}); + + order=10020; + Game.NewUpgradeCookie({name:'Gingersnaps',desc:'Cookies with a soul. Probably.',icon:[29,10],power: 4,price: 99999999999999999999}); + Game.NewUpgradeCookie({name:'Cinnamon cookies',desc:'The secret is in the patented swirly glazing.',icon:[23,8],power: 4,price: 99999999999999999999*5}); + Game.NewUpgradeCookie({name:'Vanity cookies',desc:'One tiny candied fruit sits atop this decadent cookie.',icon:[22,8],power: 4,price: 999999999999999999999}); + Game.NewUpgradeCookie({name:'Cigars',desc:'Close, but no match for those extravagant cookie straws they serve in coffee shops these days.',icon:[25,8],power: 4,price: 999999999999999999999*5}); + Game.NewUpgradeCookie({name:'Pinwheel cookies',desc:'Bringing you the dizzying combination of brown flavor and beige taste!',icon:[22,10],power: 4,price: 9999999999999999999999}); + Game.NewUpgradeCookie({name:'Fudge squares',desc:'Not exactly cookies, but you won\'t care once you\'ve tasted one of these.
They\'re so good, it\'s fudged-up!',icon:[24,8],power: 4,price: 9999999999999999999999*5}); + + order=10030; + Game.NewUpgradeCookie({name:'Digits',desc:'Three flavors, zero phalanges.',icon:[26,8],require:'Box of brand biscuits',power: 2, price: 999999999999999*5}); + + order=10029; + Game.NewUpgradeCookie({name:'Butter horseshoes',desc:'It would behoove you to not overindulge in these.',icon:[22,9],require:'Tin of butter cookies',power: 4, price: 99999999999999999999999}); + Game.NewUpgradeCookie({name:'Butter pucks',desc:'Lord, what fools these mortals be!
(This is kind of a hokey reference.)',icon:[23,9],require:'Tin of butter cookies',power: 4, price: 99999999999999999999999*5}); + Game.NewUpgradeCookie({name:'Butter knots',desc:'Look, you can call these pretzels if you want, but you\'d just be fooling yourself, wouldn\'t you?',icon:[24,9],require:'Tin of butter cookies',power: 4, price: 999999999999999999999999}); + Game.NewUpgradeCookie({name:'Butter slabs',desc:'Nothing butter than a slab to the face.',icon:[25,9],require:'Tin of butter cookies',power: 4, price: 999999999999999999999999*5}); + Game.NewUpgradeCookie({name:'Butter swirls',desc:'These are equal parts sugar, butter, and warm fuzzy feelings - all of which cause millions of deaths every day.',icon:[26,9],require:'Tin of butter cookies',power: 4, price: 9999999999999999999999999}); + + order=10020; + Game.NewUpgradeCookie({name:'Shortbread biscuits',desc:'These rich butter cookies are neither short, nor bread. What a country!',icon:[23,10],power: 4,price: 99999999999999999999999}); + Game.NewUpgradeCookie({name:'Millionaires\' shortbreads',desc:'Three thought-provoking layers of creamy chocolate, hard-working caramel and crumbly biscuit in a poignant commentary of class struggle.',icon:[24,10],power: 4,price: 99999999999999999999999*5}); + Game.NewUpgradeCookie({name:'Caramel cookies',desc:'The polymerized carbohydrates adorning these cookies are sure to stick to your teeth for quite a while.',icon:[25,10],power: 4,price: 999999999999999999999999}); + + + var desc=function(totalHours){ + return loc("You retain optimal cookie production while the game is closed for twice as long, for a total of %1.",Game.sayTime(totalHours*60*60*Game.fps,-1)); + } + new Game.Upgrade('Belphegor',desc(2)+'A demon of shortcuts and laziness, Belphegor commands machines to do work in his stead.',Math.pow(angelPriceFactor,1),[7,11]);Game.last.pool='prestige';Game.last.parents=['Twin Gates of Transcendence']; + new Game.Upgrade('Mammon',desc(4)+'The demonic embodiment of wealth, Mammon requests a tithe of blood and gold from all his worshippers.',Math.pow(angelPriceFactor,2),[8,11]);Game.last.pool='prestige';Game.last.parents=['Belphegor']; + new Game.Upgrade('Abaddon',desc(8)+'Master of overindulgence, Abaddon governs the wrinkler brood and inspires their insatiability.',Math.pow(angelPriceFactor,3),[9,11]);Game.last.pool='prestige';Game.last.parents=['Mammon']; + new Game.Upgrade('Satan',desc(16)+'The counterpoint to everything righteous, this demon represents the nefarious influence of deceit and temptation.',Math.pow(angelPriceFactor,4),[10,11]);Game.last.pool='prestige';Game.last.parents=['Abaddon']; + new Game.Upgrade('Asmodeus',desc(32)+'This demon with three monstrous heads draws his power from the all-consuming desire for cookies and all things sweet.',Math.pow(angelPriceFactor,5),[11,11]);Game.last.pool='prestige';Game.last.parents=['Satan']; + new Game.Upgrade('Beelzebub',desc(64)+'The festering incarnation of blight and disease, Beelzebub rules over the vast armies of pastry inferno.',Math.pow(angelPriceFactor,6),[12,11]);Game.last.pool='prestige';Game.last.parents=['Asmodeus']; + new Game.Upgrade('Lucifer',desc(128)+'Also known as the Lightbringer, this infernal prince\'s tremendous ego caused him to be cast down from pastry heaven.',Math.pow(angelPriceFactor,7),[13,11]);Game.last.pool='prestige';Game.last.parents=['Beelzebub']; + + new Game.Upgrade('Golden cookie alert sound',loc("Unlocks the golden cookie sound selector, which lets you pick whether golden cookies emit a sound when appearing or not.")+'A sound decision.',999999,[28,6]);Game.last.pool='prestige';Game.last.parents=['Residual luck']; + + order=49900; + new Game.Upgrade('Golden cookie sound selector',loc("Lets you change the sound golden cookies make when they spawn."),0,[28,6]); + Game.last.descFunc=function(){ + var choice=this.choicesFunction()[Game.chimeType]; + return '
'+loc("Current:")+' '+tinyIcon(choice.icon)+' '+choice.name+'
'+this.ddesc; + }; + + Game.last.pool='toggle'; + Game.last.choicesFunction=function() + { + var choices=[]; + choices[0]={name:'No sound',icon:[0,7]}; + choices[1]={name:'Chime',icon:[22,6]}; + choices[2]={name:'Fortune',icon:[27,6]}; + choices[3]={name:'Cymbal',icon:[9,10]}; + choices[4]={name:'Squeak',icon:[8,10]}; + for (var i=0;i4) {Game.wrinklerSquishSound-=4;}PlaySound('snd/squeak'+(Game.wrinklerSquishSound)+'.mp3');} + } + + + new Game.Upgrade('Basic wallpaper assortment',loc("Unlocks the background selector, letting you select the game's background.
Comes with a variety of basic flavors.")+'Prioritizing aesthetics over crucial utilitarian upgrades? Color me impressed.',99,[29,5]);Game.last.pool='prestige';Game.last.parents=['Classic dairy selection']; + + new Game.Upgrade('Legacy',loc("This is the first heavenly upgrade; it unlocks the Heavenly chips system.
Each time you ascend, the cookies you made in your past life are turned into heavenly chips and prestige.
Heavenly chips can be spent on a variety of permanent transcendental upgrades.
Your prestige level also gives you a permanent +1% CpS per level.")+'We\'ve all been waiting for you.',1,[21,6]);Game.last.pool='prestige';Game.last.parents=[]; + + new Game.Upgrade('Elder spice',loc("You can attract %1 more wrinklers.",2)+'The cookie your cookie could smell like.',444444,[19,8]);Game.last.pool='prestige';Game.last.parents=['Unholy bait']; + + new Game.Upgrade('Residual luck',loc("While the golden switch is on, you gain an additional +%1% CpS per golden cookie upgrade owned.",10)+'Fortune comes in many flavors.',99999,[27,6]);Game.last.pool='prestige';Game.last.parents=['Golden switch']; + + order=150;new Game.Upgrade('Fantasteel mouse',getStrClickingGains(1)+'You could be clicking using your touchpad and we\'d be none the wiser.',5000000000000000000,[11,17]);Game.MakeTiered(Game.last,8,11); + new Game.Upgrade('Nevercrack mouse',getStrClickingGains(1)+'How much beefier can you make a mouse until it\'s considered a rat?',500000000000000000000,[11,18]);Game.MakeTiered(Game.last,9,11); + + + new Game.Upgrade('Five-finger discount',loc("All upgrades are %1% cheaper per %2.",[1,loc("%1 cursor",100)])+'Stick it to the man.',555555,[28,7],function(){Game.upgradesToRebuild=1;});Game.last.pool='prestige';Game.last.parents=['Halo gloves','Abaddon']; + + + order=5000; + Game.SynergyUpgrade('Future almanacs','Lets you predict optimal planting times. It\'s crazy what time travel can do!','Farm','Time machine','synergy1'); + Game.SynergyUpgrade('Rain prayer','A deeply spiritual ceremonial involving complicated dance moves and high-tech cloud-busting lasers.','Farm','Temple','synergy2'); + + Game.SynergyUpgrade('Seismic magic','Surprise earthquakes are an old favorite of wizardly frat houses.','Mine','Wizard tower','synergy1'); + Game.SynergyUpgrade('Asteroid mining','As per the 1974 United Cosmic Convention, comets, moons, and inhabited planetoids are no longer legally excavatable.
But hey, a space bribe goes a long way.
','Mine','Shipment','synergy2'); + + Game.SynergyUpgrade('Quantum electronics','Your machines won\'t even be sure if they\'re on or off!','Factory','Antimatter condenser','synergy1'); + Game.SynergyUpgrade('Temporal overclocking','Introduce more quickitude in your system for increased speedation of fastness.','Factory','Time machine','synergy2'); + + Game.SynergyUpgrade('Contracts from beyond','Make sure to read the fine print!','Bank','Portal','synergy1'); + Game.SynergyUpgrade('Printing presses','Fake bills so real, they\'re almost worth the ink they\'re printed with.','Bank','Factory','synergy2'); + + Game.SynergyUpgrade('Paganism','Some deities are better left unworshipped.','Temple','Portal','synergy1'); + Game.SynergyUpgrade('God particle','Turns out God is much tinier than we thought, I guess.','Temple','Antimatter condenser','synergy2'); + + Game.SynergyUpgrade('Arcane knowledge','Some things were never meant to be known - only mildly speculated.','Wizard tower','Alchemy lab','synergy1'); + Game.SynergyUpgrade('Magical botany','Already known in some reactionary newspapers as "the wizard\'s GMOs".','Wizard tower','Farm','synergy2'); + + Game.SynergyUpgrade('Fossil fuels','Somehow better than plutonium for powering rockets.
Extracted from the fuels of ancient, fossilized civilizations.
','Shipment','Mine','synergy1'); + Game.SynergyUpgrade('Shipyards','Where carpentry, blind luck, and asbestos insulation unite to produce the most dazzling spaceships on the planet.','Shipment','Factory','synergy2'); + + Game.SynergyUpgrade('Primordial ores','Only when refining the purest metals will you extract the sweetest sap of the earth.','Alchemy lab','Mine','synergy1'); + Game.SynergyUpgrade('Gold fund','If gold is the backbone of the economy, cookies, surely, are its hip joints.','Alchemy lab','Bank','synergy2'); + + Game.SynergyUpgrade('Infernal crops','Sprinkle regularly with FIRE.','Portal','Farm','synergy1'); + Game.SynergyUpgrade('Abysmal glimmer','Someone, or something, is staring back at you.
Perhaps at all of us.
','Portal','Prism','synergy2'); + + Game.SynergyUpgrade('Relativistic parsec-skipping','People will tell you this isn\'t physically possible.
These are people you don\'t want on your ship.
','Time machine','Shipment','synergy1'); + Game.SynergyUpgrade('Primeval glow','From unending times, an ancient light still shines, impossibly pure and fragile in its old age.','Time machine','Prism','synergy2'); + + Game.SynergyUpgrade('Extra physics funding','Time to put your money where your particle colliders are.','Antimatter condenser','Bank','synergy1'); + Game.SynergyUpgrade('Chemical proficiency','Discover exciting new elements, such as Fleshmeltium, Inert Shampoo Byproduct #17 and Carbon++!','Antimatter condenser','Alchemy lab','synergy2'); + + Game.SynergyUpgrade('Light magic','Actually not to be taken lightly! No, I\'m serious. 178 people died last year. You don\'t mess around with magic.','Prism','Wizard tower','synergy1'); + Game.SynergyUpgrade('Mystical energies','Something beckons from within the light. It is warm, comforting, and apparently the cause for several kinds of exotic skin cancers.','Prism','Temple','synergy2'); + + + new Game.Upgrade('Synergies Vol. I',loc("Unlocks a new tier of upgrades that affect 2 buildings at the same time.
Synergies appear once you have %1 of both buildings.",15)+'The many beats the few.',222222,[10,20]);Game.last.pool='prestige';Game.last.parents=['Satan','Dominions']; + new Game.Upgrade('Synergies Vol. II',loc("Unlocks a new tier of upgrades that affect 2 buildings at the same time.
Synergies appear once you have %1 of both buildings.",75)+'The several beats the many.',2222222,[10,29]);Game.last.pool='prestige';Game.last.parents=['Beelzebub','Seraphim','Synergies Vol. I']; + + new Game.Upgrade('Heavenly cookies',loc("Cookie production multiplier +%1% permanently.",10)+'Baked with heavenly chips. An otherwordly flavor that transcends time and space.',3,[25,12]);Game.last.pool='prestige';Game.last.parents=['Legacy'];Game.last.power=10;Game.last.pseudoCookie=true; + new Game.Upgrade('Wrinkly cookies',loc("Cookie production multiplier +%1% permanently.",10)+'The result of regular cookies left to age out for countless eons in a place where time and space are meaningless.',6666666,[26,12]);Game.last.pool='prestige';Game.last.parents=['Sacrilegious corruption','Elder spice'];Game.last.power=10;Game.last.pseudoCookie=true; + new Game.Upgrade('Distilled essence of redoubled luck',loc("Golden cookies (and all other things that spawn, such as reindeer) have %1% chance of being doubled.",1)+'Tastes glittery. The empty phial makes for a great pencil holder.',7777777,[27,12]);Game.last.pool='prestige';Game.last.parents=['Divine bakeries','Residual luck']; + + order=40000; + new Game.Upgrade('Occult obstruction',loc("Cookie production reduced to 0.")+'If symptoms persist, consult a doctor.',7,[15,5]);//debug purposes only + Game.last.pool='debug'; + new Game.Upgrade('Glucose-charged air',loc("Sugar lumps coalesce a whole lot faster.")+'Don\'t breathe too much or you\'ll get diabetes!',7,[29,16]);//debug purposes only + Game.last.pool='debug'; + + order=10300; + Game.NewUpgradeCookie({name:'Lavender chocolate butter biscuit',desc:'Rewarded for owning 300 of everything.
This subtly-flavored biscuit represents the accomplishments of decades of top-secret research. The molded design on the chocolate resembles a well-known entrepreneur who gave their all to the ancient path of baking.',icon:[26,10],power: 10,price: 999999999999999999999999999999999*butterBiscuitMult,locked:1}); + + order=10030; + Game.NewUpgradeCookie({name:'Lombardia cookies',desc:'These come from those farms with the really good memory.',icon:[23,13],require:'Box of brand biscuits',power: 3, price: 999999999999999999999*5}); + Game.NewUpgradeCookie({name:'Bastenaken cookies',desc:'French cookies made of delicious cinnamon and candy sugar. These do not contain Nuts!',icon:[24,13],require:'Box of brand biscuits',power: 3, price: 999999999999999999999*5}); + + order=10020; + Game.NewUpgradeCookie({name:'Pecan sandies',desc:'Stick a nut on a cookie and call it a day! Name your band after it! Whatever!',icon:[25,13],power: 4,price: 999999999999999999999999*5}); + Game.NewUpgradeCookie({name:'Moravian spice cookies',desc:'Popular for being the world\'s moravianest cookies.',icon:[26,13],power: 4,price: 9999999999999999999999999}); + Game.NewUpgradeCookie({name:'Anzac biscuits',desc:'Army biscuits from a bakery down under, containing no eggs but yes oats.',icon:[27,13],power: 4,price: 9999999999999999999999999*5}); + Game.NewUpgradeCookie({name:'Buttercakes',desc:'Glistening with cholesterol, these cookies moistly straddle the line between the legal definition of a cookie and just a straight-up stick of butter.',icon:[29,13],power: 4,price: 99999999999999999999999999}); + Game.NewUpgradeCookie({name:'Ice cream sandwiches',desc:'In an alternate universe, "ice cream sandwich" designates an ice cream cone filled with bacon, lettuce, and tomatoes. Maybe some sprinkles too.',icon:[28,13],power: 4,price: 99999999999999999999999999*5}); + + new Game.Upgrade('Stevia Caelestis',loc("Sugar lumps ripen %1 sooner.",Game.sayTime(60*60*Game.fps))+'A plant of supernatural sweetness grown by angels in heavenly gardens.',100000000,[25,15]);Game.last.pool='prestige';Game.last.parents=['Wrinkly cookies']; + new Game.Upgrade('Diabetica Daemonicus',loc("Sugar lumps mature %1 sooner.",Game.sayTime(60*60*Game.fps))+'A malevolent, if delicious herb that is said to grow on the cliffs of the darkest abyss of the underworld.',300000000,[26,15]);Game.last.pool='prestige';Game.last.parents=['Stevia Caelestis','Lucifer']; + new Game.Upgrade('Sucralosia Inutilis',loc("Bifurcated sugar lumps appear %1% more often and are %2% more likely to drop 2 lumps.",[5,5])+'A rare berry of uninteresting flavor that is as elusive as its uses are limited; only sought-after by the most avid collectors with too much wealth on their hands.',1000000000,[27,15]);Game.last.pool='prestige';Game.last.parents=['Diabetica Daemonicus']; + + new Game.Upgrade('Lucky digit',loc("+%1% prestige level effect on CpS.
+%2% golden cookie effect duration.
+%3% golden cookie lifespan.",[1,1,1])+'This upgrade is a bit shy and only appears when your prestige level contains a 7.',777,[24,15]);Game.last.pool='prestige';Game.last.parents=['Heavenly luck'];Game.last.showIf=function(){return (Math.ceil(((Game.prestige+'').split('7').length-1))>=1);}; + new Game.Upgrade('Lucky number',loc("+%1% prestige level effect on CpS.
+%2% golden cookie effect duration.
+%3% golden cookie lifespan.",[1,1,1])+'This upgrade is a reclusive hermit and only appears when your prestige level contains two 7\'s.',77777,[24,15]);Game.last.pool='prestige';Game.last.parents=['Lucky digit','Lasting fortune'];Game.last.showIf=function(){return (Math.ceil(((Game.prestige+'').split('7').length-1))>=2);}; + new Game.Upgrade('Lucky payout',loc("+%1% prestige level effect on CpS.
+%2% golden cookie effect duration.
+%3% golden cookie lifespan.",[1,1,1])+'This upgrade took an oath of complete seclusion from the rest of the world and only appears when your prestige level contains four 7\'s.',77777777,[24,15]);Game.last.pool='prestige';Game.last.parents=['Lucky number','Decisive fate'];Game.last.showIf=function(){return (Math.ceil(((Game.prestige+'').split('7').length-1))>=4);}; + + order=50000; + new Game.Upgrade('Background selector',loc("Lets you pick which wallpaper to display."),0,[29,5]); + Game.last.descFunc=function(){ + var choice=this.choicesFunction()[Game.bgType]; + if (choice==0) choice=this.choicesFunction()[0]; + return '
'+loc("Current:")+' '+tinyIcon(choice.icon)+' '+choice.name+'
'+this.ddesc; + }; + + Game.last.pool='toggle'; + Game.last.choicesFunction=function() + { + var choices=[]; + for (var i in Game.BGsByChoice) + { + choices[i]={name:Game.BGsByChoice[i].name,icon:Game.BGsByChoice[i].icon,order:Game.BGsByChoice[i].order||parseInt(i)}; + } + + choices[13].div=true; + + for (var i=0;i=4.9 && !Game.Has('Distinguished wallpaper assortment')) choices[i]=0; + } + + choices[Game.bgType].selected=1; + return choices; + } + Game.last.choicesPick=function(id) + {Game.bgType=id;} + + Game.AllBGs=[ + {pic:'bgBlue',name:'Automatic',icon:[0,7]}, + {pic:'bgBlue',name:'Blue',icon:[21,21]}, + {pic:'bgRed',name:'Red',icon:[22,21]}, + {pic:'bgWhite',name:'White',icon:[23,21]}, + {pic:'bgBlack',name:'Black',icon:[24,21]}, + {pic:'bgGold',name:'Gold',icon:[25,21]}, + {pic:'grandmas1',name:'Grandmas',icon:[26,21]}, + {pic:'grandmas2',name:'Displeased grandmas',icon:[27,21]}, + {pic:'grandmas3',name:'Angered grandmas',icon:[28,21]}, + {pic:'bgMoney',name:'Money',icon:[29,21]}, + {pic:'bgPurple',name:'Purple',icon:[21,22],order:1.1}, + {pic:'bgPink',name:'Pink',icon:[24,22],order:2.1}, + {pic:'bgMint',name:'Mint',icon:[22,22],order:2.2}, + {pic:'bgSilver',name:'Silver',icon:[25,22],order:4.9}, + {pic:'bgBW',name:'Black & White',icon:[23,22],order:4.1}, + {pic:'bgSpectrum',name:'Spectrum',icon:[28,22],order:4.2}, + {pic:'bgCandy',name:'Candy',icon:[26,22]}, + {pic:'bgYellowBlue',name:'Biscuit store',icon:[27,22]}, + {pic:'bgChoco',name:'Chocolate',icon:[30,21]}, + {pic:'bgChocoDark',name:'Dark Chocolate',icon:[31,21]}, + {pic:'bgPaint',name:'Painter',icon:[24,34]}, + {pic:'bgSnowy',name:'Snow',icon:[30,22]}, + {pic:'bgSky',name:'Sky',icon:[29,22]}, + {pic:'bgStars',name:'Night',icon:[31,22]}, + {pic:'bgFoil',name:'Foil',icon:[25,34]}, + ]; + Game.BGsByChoice={}; + for (var i=0;iThis is the first cookie you\'ve ever baked. It holds a deep sentimental value and, after all this time, an interesting smell.
','Chancemaker',1); + Game.TieredUpgrade('"All Bets Are Off" magic coin','A coin that always lands on the other side when flipped. Not heads, not tails, not the edge. The other side.','Chancemaker',2); + Game.TieredUpgrade('Winning lottery ticket','What lottery? THE lottery, that\'s what lottery! Only lottery that matters!','Chancemaker',3); + Game.TieredUpgrade('Four-leaf clover field','No giant monsters here, just a whole lot of lucky grass.','Chancemaker',4); + Game.TieredUpgrade('A recipe book about books','Tip the scales in your favor with 28 creative new ways to cook the books.','Chancemaker',5); + Game.TieredUpgrade('Leprechaun village','You\'ve finally become accepted among the local leprechauns, who lend you their mythical luck as a sign of friendship (as well as some rather foul-tasting tea).','Chancemaker',6); + Game.TieredUpgrade('Improbability drive','A strange engine that turns statistics on their head. Recommended by the Grandmother\'s Guide to the Bakery.','Chancemaker',7); + Game.TieredUpgrade('Antisuperstistronics','An exciting new field of research that makes unlucky things lucky. No mirror unbroken, no ladder unwalked under!','Chancemaker',8); + + order=5000; + Game.SynergyUpgrade('Gemmed talismans','Good-luck charms covered in ancient and excruciatingly rare crystals. A must have for job interviews!','Chancemaker','Mine','synergy1'); + + order=20000; + new Game.Upgrade('Kitten consultants',strKittenDesc+'glad to be overpaid to work with you, sir',900000000000000000000000000000000,Game.GetIcon('Kitten',9));Game.last.kitten=1;Game.MakeTiered(Game.last,9,18); + + order=99999; + var years=Math.floor((Date.now()-new Date(2013,7,8))/(1000*60*60*24*365)); + //only updates on page load + //may behave strangely on leap years + Game.NewUpgradeCookie({name:'Birthday cookie',desc:'-',icon:[22,13],power:years,price:99999999999999999999999999999});Game.last.baseDesc=loc("Cookie production multiplier +%1% for every year Cookie Clicker has existed (currently: +%2%).",[1,Beautify(years)])+'Thank you for playing Cookie Clicker!
-Orteil
'; + + + order=150;new Game.Upgrade('Armythril mouse',getStrClickingGains(1)+'This one takes about 53 people to push it around and another 48 to jump down on the button and trigger a click. You could say it\'s got some heft to it.',50000000000000000000000,[11,19]);Game.MakeTiered(Game.last,10,11); + + order=200;Game.TieredUpgrade('Reverse dementia','Extremely unsettling, and somehow even worse than the regular kind.','Grandma',9); + order=300;Game.TieredUpgrade('Humane pesticides','Made by people, for people, from people and ready to unleash some righteous scorching pain on those pesky insects that so deserve it.','Farm',9); + order=400;Game.TieredUpgrade('Mole people','Engineered from real human beings within your very labs, these sturdy little folks have a knack for finding the tastiest underground minerals in conditions that more expensive machinery probably wouldn\'t survive.','Mine',9); + order=500;Game.TieredUpgrade('Machine learning','You figured you might get better productivity if you actually told your workers to learn how to work the machines. Sometimes, it\'s the little things...','Factory',9); + order=525;Game.TieredUpgrade('Edible money','It\'s really quite simple; you make all currency too delicious not to eat, solving world hunger and inflation in one fell swoop!','Bank',9); + order=550;Game.TieredUpgrade('Sick rap prayers','With their ill beat and radical rhymes, these way-hip religious tunes are sure to get all the youngins who thought they were 2 cool 4 church back on the pews and praying for more! Wicked!','Temple',9); + order=575;Game.TieredUpgrade('Deluxe tailored wands','In this age of science, most skillful wand-makers are now long gone; but thankfully - not all those wanders are lost.','Wizard tower',9); + order=600;Game.TieredUpgrade('Autopilot','Your ships are now fitted with completely robotic crews! It\'s crazy how much money you save when you don\'t have to compensate the families of those lost in space.','Shipment',9); + order=700;Game.TieredUpgrade('The advent of chemistry','You know what? That whole alchemy nonsense was a load of baseless rubbish. Dear god, what were you thinking?','Alchemy lab',9); + order=800;Game.TieredUpgrade('The real world','It turns out that our universe is actually the twisted dimension of another, saner plane of reality. Time to hop on over there and loot the place!','Portal',9); + order=900;Game.TieredUpgrade('Second seconds','That\'s twice as many seconds in the same amount of time! What a deal! Also, what in god\'s name!','Time machine',9); + order=1000;Game.TieredUpgrade('Quantum comb','Quantum entanglement is one of those things that are so annoying to explain that we might honestly be better off without it. This is finally possible thanks to the quantum comb!','Antimatter condenser',9); + order=1100;Game.TieredUpgrade('Crystal mirrors','Designed to filter more light back into your prisms, reaching levels of brightness that reality itself had never planned for.','Prism',9); + order=1200;Game.TieredUpgrade('Bunnypedes','You\'ve taken to breeding rabbits with hundreds of paws, which makes them intrinsically very lucky and thus a very handy (if very disturbing) pet.','Chancemaker',9); + + order=20000; + new Game.Upgrade('Kitten assistants to the regional manager',strKittenDesc+'nothing stresses meowt... except having to seek the approval of my inferiors, sir',900000000000000000000000000000000000,Game.GetIcon('Kitten',10));Game.last.kitten=1;Game.MakeTiered(Game.last,10,18); + + order=5000; + Game.SynergyUpgrade('Charm quarks','They\'re after your lucky quarks!','Chancemaker','Antimatter condenser','synergy2'); + + + order=10020; + Game.NewUpgradeCookie({name:'Pink biscuits',desc:'One of the oldest cookies. Traditionally dipped in champagne to soften it, because the French will use any opportunity to drink.',icon:[21,16],power: 4,price: 999999999999999999999999999}); + Game.NewUpgradeCookie({name:'Whole-grain cookies',desc:'Covered in seeds and other earthy-looking debris. Really going for that "5-second rule" look.',icon:[22,16],power: 4,price: 999999999999999999999999999*5}); + Game.NewUpgradeCookie({name:'Candy cookies',desc:'These melt in your hands just a little bit.',icon:[23,16],power: 4,price: 9999999999999999999999999999}); + Game.NewUpgradeCookie({name:'Big chip cookies',desc:'You are in awe at the size of these chips. Absolute units.',icon:[24,16],power: 4,price: 9999999999999999999999999999*5}); + Game.NewUpgradeCookie({name:'One chip cookies',desc:'You get one.',icon:[25,16],power: 1,price: 99999999999999999999999999999}); + + + new Game.Upgrade('Sugar baking',loc("Each unspent sugar lump (up to %1) gives +%2% CpS.
Note: this means that spending sugar lumps will decrease your CpS until they grow back.
",[100,1])+'To bake with the sugary essence of eons themselves, you must first learn to take your sweet time.',200000000,[21,17]);Game.last.pool='prestige';Game.last.parents=['Stevia Caelestis']; + new Game.Upgrade('Sugar craving',loc("Once an ascension, you may use the \"Sugar frenzy\" switch to triple your CpS for 1 hour, at the cost of 1 sugar lump.")+'Just a little kick to sweeten the deal.',400000000,[22,17]);Game.last.pool='prestige';Game.last.parents=['Sugar baking']; + new Game.Upgrade('Sugar aging process',loc("Each grandma (up to %1) makes sugar lumps ripen %2 sooner.",[600,Game.sayTime(6*Game.fps)])+'Aren\'t they just the sweetest?',600000000,[23,17]);Game.last.pool='prestige';Game.last.parents=['Sugar craving','Diabetica Daemonicus']; + + order=40050; + new Game.Upgrade('Sugar frenzy',loc("Activating this will triple your CpS for 1 hour, at the cost of 1 sugar lump.")+'
'+loc("May only be used once per ascension."),0,[22,17]); + Game.last.priceLumps=1; + Game.last.pool='toggle';Game.last.toggleInto=0; + Game.last.canBuyFunc=function(){return Game.lumps>=1;}; + Game.last.clickFunction=Game.spendLump(1,loc("activate the sugar frenzy"),function() + { + Game.Upgrades['Sugar frenzy'].buy(1); + buff=Game.gainBuff('sugar frenzy',60*60,3); + Game.Notify(loc("Sugar frenzy!"),loc("CpS x%1 for 1 hour!",3),[29,14]); + }); + + order=10020; + Game.NewUpgradeCookie({name:'Sprinkles cookies',desc:'A bit of festive decorating helps hide the fact that this might be one of the blandest cookies you\'ve ever tasted.',icon:[21,14],power: 4,price: 99999999999999999999999999999*5}); + Game.NewUpgradeCookie({name:'Peanut butter blossoms',desc:'Topped with a scrumptious chocolate squirt, which is something we really wish we didn\'t just write.',icon:[22,14],power: 4,price: 999999999999999999999999999999}); + Game.NewUpgradeCookie({name:'No-bake cookies',desc:'You have no idea how these mysterious oven-less treats came to be or how they hold their shape. You\'re thinking either elephant glue or cold fusion.',icon:[21,15],power: 4,price: 999999999999999999999999999999*5}); + Game.NewUpgradeCookie({name:'Florentines',desc:'These make up for being the fruitcake of cookies by at least having the decency to feature chocolate.',icon:[26,16],power: 4,price: 9999999999999999999999999999999}); + Game.NewUpgradeCookie({name:'Chocolate crinkles',desc:'Non-denominational cookies to celebrate year-round deliciousness, and certainly not Christmas or some other nonsense.',icon:[22,15],power: 4,price: 9999999999999999999999999999999*5}); + Game.NewUpgradeCookie({name:'Maple cookies',desc:'Made with syrup from a land where milk comes in bags, instead of spontaneously pooling at the bottom of your screen depending on your achievements.',icon:[21,13],power: 4,price: 99999999999999999999999999999999}); + + + order=40000; + new Game.Upgrade('Turbo-charged soil',loc("Garden plants grow every second.
Garden seeds are free to plant.
You can switch soils at any time.")+'It\'s got electrolytes!',7,[2,16]);//debug purposes only + Game.last.buyFunction=function(){if (Game.Objects['Farm'].minigameLoaded){Game.Objects['Farm'].minigame.computeStepT();}} + Game.last.pool='debug'; + + order=150; + new Game.Upgrade('Technobsidian mouse',getStrClickingGains(1)+'A highly advanced mouse of a sophisticated design. Only one thing on its mind : to click.',5000000000000000000000000,[11,28]);Game.MakeTiered(Game.last,11,11); + new Game.Upgrade('Plasmarble mouse',getStrClickingGains(1)+'A shifting blur in the corner of your eye, this mouse can trigger a flurry of clicks when grazed by even the slightest breeze.',500000000000000000000000000,[11,30]);Game.MakeTiered(Game.last,12,11); + + order=20000; + new Game.Upgrade('Kitten marketeers',strKittenDesc+'no such thing as a saturated markit, sir',900000000000000000000000000000000000000,Game.GetIcon('Kitten',11));Game.last.kitten=1;Game.MakeTiered(Game.last,11,18); + + order=10030; + Game.NewUpgradeCookie({name:'Festivity loops',desc:'These garish biscuits are a perfect fit for children\'s birthday parties or the funerals of strange, eccentric billionaires.',icon:[25,17],require:'Box of brand biscuits',power: 2, price: 999999999999999999999999*5}); + + order=10020; + Game.NewUpgradeCookie({name:'Persian rice cookies',desc:'Rose water and poppy seeds are the secret ingredients of these small, butter-free cookies.',icon:[28,15],power: 4,price: 99999999999999999999999999999999*5}); + Game.NewUpgradeCookie({name:'Norwegian cookies',desc:'A flat butter cookie with a sliver of candied cherry on top. It is said that these illustrate the bleakness of scandinavian existentialism.',icon:[22,20],power: 4,price: 999999999999999999999999999999999}); + Game.NewUpgradeCookie({name:'Crispy rice cookies',desc:'Fun to make at home! Store-bought cookies are obsolete! Topple the system! There\'s marshmallows in these! Destroy capitalism!',icon:[23,20],power: 4,price: 999999999999999999999999999999999*5}); + Game.NewUpgradeCookie({name:'Ube cookies',desc:'The tint is obtained by the use of purple yams. According to color symbolism, these cookies are either noble, holy, or supervillains.',icon:[24,17],power: 4,price: 9999999999999999999999999999999999}); + Game.NewUpgradeCookie({name:'Butterscotch cookies',desc:'The butterscotch chips are just the right amount of sticky, and make you feel like you\'re eating candy.',icon:[24,20],power: 4,price: 9999999999999999999999999999999999*5}); + Game.NewUpgradeCookie({name:'Speculaas',desc:'These crunchy, almost obnoxiously cinnamony cookies are a source of dutch pride. About the origin of the name, one can only speculate.',icon:[21,20],power: 4,price: 99999999999999999999999999999999999}); + + order=10200; + Game.NewUpgradeCookie({name:'Elderwort biscuits',desc:'-',icon:[22,25],power:2,price:60*2,locked:1});Game.last.baseDesc=getStrCookieProductionMultiplierPlus(2)+'
'+loc("%1 are %2% more powerful.",[cap(Game.Objects['Grandma'].plural),2])+'
'+loc("Dropped by %1 plants.",loc("Elderwort").toLowerCase())+'They taste incredibly stale, even when baked fresh.'; + Game.NewUpgradeCookie({name:'Bakeberry cookies',desc:'-',icon:[23,25],power:2,price:60,locked:1});Game.last.baseDesc=getStrCookieProductionMultiplierPlus(2)+'
'+loc("Dropped by %1 plants.",loc("Bakeberry").toLowerCase())+'Really good dipped in hot chocolate.'; + Game.NewUpgradeCookie({name:'Duketater cookies',desc:'-',icon:[24,25],power:10,price:60*3,locked:1});Game.last.baseDesc=getStrCookieProductionMultiplierPlus(10)+'
'+loc("Dropped by %1 plants.",loc("Duketater").toLowerCase())+'Fragrant and mealy, with a slight yellow aftertaste.'; + Game.NewUpgradeCookie({name:'Green yeast digestives',desc:'-',icon:[25,25],power:0,price:60*3,locked:1});Game.last.baseDesc=loc("Golden cookies give %1% more cookies.",1)+'
'+loc("Golden cookie effects last %1% longer.",1)+'
'+loc("Golden cookies appear %1% more often.",1)+'
'+loc("Random drops are %1% more common.",3)+'
'+loc("Dropped by %1 plants.",loc("Green rot").toLowerCase())+'These are tastier than you\'d expect, but not by much.'; + + order=23000; + new Game.Upgrade('Fern tea',loc("You gain another +%1% of your regular CpS while the game is closed.",3)+' ('+loc("Must own the %1 upgrade.",getUpgradeName("Twin Gates of Transcendence"))+')'+'
'+loc("Dropped by %1 plants.",loc("Drowsyfern").toLowerCase())+'A chemically complex natural beverage, this soothing concoction has been used by mathematicians to solve equations in their sleep.',60,[26,25]); + new Game.Upgrade('Ichor syrup',loc("You gain another +%1% of your regular CpS while the game is closed.",7)+' ('+loc("Must own the %1 upgrade.",getUpgradeName("Twin Gates of Transcendence"))+')'+'
'+loc("Sugar lumps mature %1 sooner.",Game.sayTime(7*60*Game.fps))+'
'+loc("Dropped by %1 plants.",loc("Ichorpuff").toLowerCase())+'Tastes like candy. The smell is another story.',60*2,[27,25]); + + order=10200; + Game.NewUpgradeCookie({name:'Wheat slims',desc:'-',icon:[28,25],power:1,price:30,locked:1});Game.last.baseDesc=getStrCookieProductionMultiplierPlus(1)+'
'+loc("Dropped by %1 plants.",loc("Baker's wheat").toLowerCase())+'The only reason you\'d consider these to be cookies is because you feel slightly sorry for them.'; + + var gardenDrops=['Elderwort biscuits','Bakeberry cookies','Duketater cookies','Green yeast digestives','Fern tea','Ichor syrup','Wheat slims']; + for (var i in gardenDrops)//scale by CpS + { + var it=Game.Upgrades[gardenDrops[i]]; + it.priceFunc=function(cost){return function(){return cost*Game.cookiesPs*60;}}(it.basePrice); + it.baseDesc=it.baseDesc.replace('','
'+loc("Cost scales with CpS.")+''); + it.desc=BeautifyInText(it.baseDesc); + it.lasting=true; + } + + + order=10300; + Game.NewUpgradeCookie({name:'Synthetic chocolate green honey butter biscuit',desc:'Rewarded for owning 350 of everything.
The recipe for this butter biscuit was once the sole heritage of an ancient mountain monastery. Its flavor is so refined that only a slab of lab-made chocolate specifically engineered to be completely tasteless could complement it.
Also it\'s got your face on it.',icon:[24,26],power: 10,price: 999999999999999999999999999999999999*butterBiscuitMult,locked:1}); + Game.NewUpgradeCookie({name:'Royal raspberry chocolate butter biscuit',desc:'Rewarded for owning 400 of everything.
Once reserved for the megalomaniac elite, this unique strain of fruity chocolate has a flavor and texture unlike any other. Whether its exorbitant worth is improved or lessened by the presence of your likeness on it still remains to be seen.',icon:[25,26],power: 10,price: 999999999999999999999999999999999999999*butterBiscuitMult,locked:1}); + Game.NewUpgradeCookie({name:'Ultra-concentrated high-energy chocolate butter biscuit',desc:'Rewarded for owning 450 of everything.
Infused with the power of several hydrogen bombs through a process that left most nuclear engineers and shareholders perplexed. Currently at the center of some rather heated United Nations meetings. Going in more detail about this chocolate would violate several state secrets, but we\'ll just add that someone\'s bust seems to be pictured on it. Perhaps yours?',icon:[26,26],power: 10,price: 999999999999999999999999999999999999999999*butterBiscuitMult,locked:1}); + + + + order=200;Game.TieredUpgrade('Timeproof hair dyes','Why do they always have those strange wispy pink dos? What do they know about candy floss that we don\'t?','Grandma',10); + order=300;Game.TieredUpgrade('Barnstars','Ah, yes. These help quite a bit. Somehow.','Farm',10); + order=400;Game.TieredUpgrade('Mine canaries','These aren\'t used for anything freaky! The miners just enjoy having a pet or two down there.','Mine',10); + order=500;Game.TieredUpgrade('Brownie point system','Oh, these are lovely! You can now reward your factory employees for good behavior, such as working overtime or snitching on coworkers. 58 brownie points gets you a little picture of a brownie, and 178 of those pictures gets you an actual brownie piece for you to do with as you please! Infantilizing? Maybe. Oodles of fun? You betcha!','Factory',10); + order=525;Game.TieredUpgrade('Grand supercycles','We let the public think these are complicated financial terms when really we\'re just rewarding the bankers with snazzy bicycles for a job well done. It\'s only natural after you built those fancy gold swimming pools for them, where they can take a dip and catch Kondratiev waves.','Bank',10); + order=550;Game.TieredUpgrade('Psalm-reading','A theologically dubious and possibly blasphemous blend of fortune-telling and scripture studies.','Temple',10); + order=575;Game.TieredUpgrade('Immobile spellcasting','Wizards who master this skill can now cast spells without having to hop and skip and gesticulate embarrassingly, which is much sneakier and honestly quite a relief.','Wizard tower',10); + order=600;Game.TieredUpgrade('Restaurants at the end of the universe','Since the universe is spatially infinite, and therefore can be construed to have infinite ends, you\'ve opened an infinite chain of restaurants where your space truckers can rest and partake in some home-brand cookie-based meals.','Shipment',10); + order=700;Game.TieredUpgrade('On second thought','Disregard that last upgrade, alchemy is where it\'s at! Your eggheads just found a way to transmute children\'s nightmares into rare metals!','Alchemy lab',10); + order=800;Game.TieredUpgrade('Dimensional garbage gulper','So we\'ve been looking for a place to dispose of all the refuse that\'s been accumulating since we started baking - burnt cookies, failed experiments, unruly workers - and well, we figured rather than sell it to poor countries like we\'ve been doing, we could just dump it in some alternate trash dimension where it\'s not gonna bother anybody! Probably!','Portal',10); + order=900;Game.TieredUpgrade('Additional clock hands','It seemed like a silly idea at first, but it turns out these have the strange ability to twist time in interesting new ways.','Time machine',10); + order=1000;Game.TieredUpgrade('Baking Nobel prize','What better way to sponsor scientific growth than to motivate those smarmy nerds with a meaningless award! What\'s more, each prize comes with a fine print lifelong exclusive contract to come work for you (or else)!','Antimatter condenser',10); + order=1100;Game.TieredUpgrade('Reverse theory of light','A whole new world of physics opens up when you decide that antiphotons are real and posit that light is merely a void in shadow.','Prism',10); + order=1200;Game.TieredUpgrade('Revised probabilistics','Either something happens or it doesn\'t. That\'s a 50% chance! This suddenly makes a lot of unlikely things very possible.','Chancemaker',10); + + order=20000; + new Game.Upgrade('Kitten analysts',strKittenDesc+'based on purrent return-on-investment meowdels we should be able to affurd to pay our empawyees somewhere around next century, sir',900000000000000000000000000000000000000000,Game.GetIcon('Kitten',12));Game.last.kitten=1;Game.MakeTiered(Game.last,12,18); + + + new Game.Upgrade('Eye of the wrinkler',loc("Mouse over a wrinkler to see how many cookies are in its stomach.")+'Just a wrinkler and its will to survive.
Hangin\' tough, stayin\' hungry.
',99999999,[27,26]);Game.last.pool='prestige';Game.last.parents=['Wrinkly cookies']; + + new Game.Upgrade('Inspired checklist',loc("Unlocks the Buy all feature, which lets you instantly purchase every upgrade in your store (starting from the cheapest one).
Also unlocks the Vault, a store section where you can place upgrades you do not wish to auto-buy.")+'Snazzy grandma accessories? Check. Transdimensional abominations? Check. A bunch of eggs for some reason? Check. Machine that goes "ping"? Check and check.',900000,[28,26]);Game.last.pool='prestige';Game.last.parents=['Persistent memory','Permanent upgrade slot II']; + + order=10300; + Game.NewUpgradeCookie({name:'Pure pitch-black chocolate butter biscuit',desc:'Rewarded for owning 500 of everything.
This chocolate is so pure and so flawless that it has no color of its own, instead taking on the appearance of whatever is around it. You\'re a bit surprised to notice that this one isn\'t stamped with your effigy, as its surface is perfectly smooth (to the picometer) - until you realize it\'s quite literally reflecting your own face like a mirror.',icon:[24,27],power: 10,price: 999999999999999999999999999999999999999999999*butterBiscuitMult,locked:1}); + + order=10020; + Game.NewUpgradeCookie({name:'Chocolate oatmeal cookies',desc:'These bad boys compensate for lack of a cohesive form and a lumpy, unsightly appearance by being just simply delicious. Something we should all aspire to.',icon:[23,28],power: 4,price: 99999999999999999999999999999999999*5}); + Game.NewUpgradeCookie({name:'Molasses cookies',desc:'Sticky, crackly, and dusted in fine sugar.
Some lunatics have been known to eat these with potatoes.',icon:[24,28],power: 4,price: 999999999999999999999999999999999999}); + Game.NewUpgradeCookie({name:'Biscotti',desc:'Almonds and pistachios make these very robust cookies slightly more interesting to eat than to bludgeon people with.',icon:[22,28],power: 4,price: 999999999999999999999999999999999999*5}); + Game.NewUpgradeCookie({name:'Waffle cookies',desc:'Whether these are cookies with shockingly waffle-like features or simply regular cookie-sized waffles is a debate we\'re not getting into here.',icon:[21,28],power: 4,price: 9999999999999999999999999999999999999}); + + + order=10000; + //early cookies that unlock at the same time as coconut cookies; meant to boost early game a little bit + Game.NewUpgradeCookie({name:'Almond cookies',desc:'Sometimes you feel like one of these. Sometimes you don\'t.',icon:[21,27],power: 2, price: 99999999}); + Game.NewUpgradeCookie({name:'Hazelnut cookies',desc:'Tastes like a morning stroll through a fragrant forest, minus the clouds of gnats.',icon:[22,27],power: 2, price: 99999999}); + Game.NewUpgradeCookie({name:'Walnut cookies',desc:'Some experts have pointed to the walnut\'s eerie resemblance to the human brain as a sign of its sentience - a theory most walnuts vehemently object to.',icon:[23,27],power: 2, price: 99999999}); + + + new Game.Upgrade('Label printer',loc("Mouse over an upgrade to see its tier.
Note: only some upgrades have tiers. Tiers are purely cosmetic and have no effect on gameplay.")+'Also comes in real handy when you want to tell catsup apart from ketchup.',5000000,[28,29]);Game.last.pool='prestige';Game.last.parents=['Genius accounting']; + + + + + order=200;Game.TieredUpgrade('Good manners','Apparently these ladies are much more amiable if you take the time to learn their strange, ancient customs, which seem to involve saying "please" and "thank you" and staring at the sun with bulging eyes while muttering eldritch curses under your breath.','Grandma',11); + order=300;Game.TieredUpgrade('Lindworms','You have to import these from far up north, but they really help aerate the soil!','Farm',11); + order=400;Game.TieredUpgrade('Bore again','After extracting so much sediment for so long, you\'ve formed some veritable mountains of your own from the accumulated piles of rock and dirt. Time to dig through those and see if you find anything fun!','Mine',11); + order=500;Game.TieredUpgrade('"Volunteer" interns','If you\'re bad at something, always do it for free.','Factory',11); + order=525;Game.TieredUpgrade('Rules of acquisition','Rule 387 : a cookie baked is a cookie kept.','Bank',11); + order=550;Game.TieredUpgrade('War of the gods','An interesting game; the only winning move is not to pray.','Temple',11); + order=575;Game.TieredUpgrade('Electricity','Ancient magicks and forbidden hexes shroud this arcane knowledge, whose unfathomable power can mysteriously turn darkness into light and shock an elephant to death.','Wizard tower',11); + order=600;Game.TieredUpgrade('Universal alphabet','You\'ve managed to chart a language that can be understood by any sentient species in the galaxy; its exciting vocabulary contains over 56 trillion words that sound and look like sparkly burps, forming intricate sentences that usually translate to something like "give us your cookies, or else".','Shipment',11); + order=700;Game.TieredUpgrade('Public betterment','Why do we keep trying to change useless matter into cookies, or cookies into even better cookies? Clearly, the way of the future is to change the people who eat the cookies into people with a greater understanding, appreciation and respect for the cookies they\'re eating. Into the vat you go!','Alchemy lab',11); + order=800;Game.TieredUpgrade('Embedded microportals','We\'ve found out that if we bake the portals into the cookies themselves, we can transport people\'s taste buds straight into the taste dimension! Good thing your army of lawyers got rid of the FDA a while ago!','Portal',11); + order=900;Game.TieredUpgrade('Nostalgia','Your time machine technicians insist that this is some advanced new time travel tech, and not just an existing emotion universal to mankind. Either way, you have to admit that selling people the same old cookies just because it reminds them of the good old times is an interesting prospect.','Time machine',11); + order=1000;Game.TieredUpgrade('The definite molecule','Your scientists have found a way to pack a cookie into one single continuous molecule, opening exciting new prospects in both storage and flavor despite the fact that these take up to a whole year to digest.','Antimatter condenser',11); + order=1100;Game.TieredUpgrade('Light capture measures','As the universe gets ever so slightly dimmer due to you converting more and more of its light into cookies, you\'ve taken to finding new and unexplored sources of light for your prisms; for instance, the warm glow emitted by a pregnant woman, or the twinkle in the eye of a hopeful child.','Prism',11); + order=1200;Game.TieredUpgrade('0-sided dice','The advent of the 0-sided dice has had unexpected and tumultuous effects on the gambling community, and saw experts around the world calling you both a genius and an imbecile.','Chancemaker',11); + + + new Game.Upgrade('Heralds',loc("You now benefit from the boost provided by heralds.
Each herald gives you +1% CpS.
Look on the purple flag at the top to see how many heralds are active at any given time.")+(App?'It\'s getting steamy.':'Be excellent to each other.
And Patreon, dudes!
'),100,[21,29]);Game.last.pool='prestige'; + + order=255; + Game.GrandmaSynergy('Metagrandmas','A fractal grandma to make more grandmas to make more cookies.','Fractal engine'); + + order=1300; + Game.TieredUpgrade('Metabakeries','They practically bake themselves!','Fractal engine',1); + Game.TieredUpgrade('Mandelbrown sugar','A substance that displays useful properties such as fractal sweetness and instant contact lethality.','Fractal engine',2); + Game.TieredUpgrade('Fractoids','Here\'s a frun fract : all in all, these were a terrible idea.','Fractal engine',3); + Game.TieredUpgrade('Nested universe theory','Asserts that each subatomic particle is host to a whole new universe, and therefore, another limitless quantity of cookies.
This somehow stacks with the theory of nanocosmics, because physics.
','Fractal engine',4); + Game.TieredUpgrade('Menger sponge cake','Frighteningly absorbent thanks to its virtually infinite surface area. Keep it isolated in a dry chamber, never handle it with an open wound, and do not ever let it touch a body of water.','Fractal engine',5); + Game.TieredUpgrade('One particularly good-humored cow','This unassuming bovine was excruciatingly expensive and it may seem at first like you were ripped off. On closer inspection however, you notice that its earrings (it\'s wearing earrings) are actually fully functional copies of itself, each of which also wearing their own cow earrings, and so on, infinitely. It appears your dairy concerns will be taken care of for a while, although you\'ll have to put up with the cow\'s annoying snickering.','Fractal engine',6); + Game.TieredUpgrade('Chocolate ouroboros','Forever eating its own tail and digesting itself, in a metabolically dubious tale of delicious tragedy.','Fractal engine',7); + Game.TieredUpgrade('Nested','Clever self-reference or shameful cross-promotion? This upgrade apparently has the gall to advertise a link to orteil.dashnet.org/nested, in a tooltip you can\'t even click.','Fractal engine',8); + Game.TieredUpgrade('Space-filling fibers','This special ingredient has the incredible ability to fill the local space perfectly, effectively eradicating hunger in those who consume it!
Knowing that no hunger means no need for cookies, your marketers urge you to repurpose this product into next-level packing peanuts.
','Fractal engine',9); + Game.TieredUpgrade('Endless book of prose','','Fractal engine',10); + if (EN) + { + Game.last.descFunc=function(){ + var str='"There once was a baker named '+Game.bakeryName+'. One day, there was a knock at the door; '+Game.bakeryName+' opened it and was suddenly face-to-face with a strange and menacing old grandma. The grandma opened her mouth and, in a strange little voice, started reciting this strange little tale : '; + var n=35; + var i=Math.floor(Game.T*0.1); + return this.desc+''+(str.substr(i%str.length,n)+(i%str.length>(str.length-n)?str.substr(0,i%str.length-(str.length-n)):''))+''; + }; + } + else Game.last.desc='-'; + Game.TieredUpgrade('The set of all sets','The answer, of course, is a definite maybe.','Fractal engine',11); + + order=5000; + Game.SynergyUpgrade('Recursive mirrors','Do you have any idea what happens when you point two of these at each other? Apparently, the universe doesn\'t either.','Fractal engine','Prism','synergy1'); + //Game.SynergyUpgrade('Compounded odds','When probabilities start cascading, "never in a billion lifetimes" starts looking terribly like "probably before Monday comes around".','Fractal engine','Chancemaker','synergy1'); + Game.SynergyUpgrade('Mice clicking mice','','Fractal engine','Cursor','synergy2'); + if (EN) + { + Game.last.descFunc=function(){ + Math.seedrandom(Game.seed+'-blasphemouse'); + if (Math.random()<0.3) {Math.seedrandom();return this.desc+'Absolutely blasphemouse!';} + else {Math.seedrandom();return this.desc+'Absolutely blasphemous!';} + }; + } + else Game.last.desc='-'; + + + order=10020; + Game.NewUpgradeCookie({name:'Custard creams',desc:'British lore pits these in a merciless war against bourbon biscuits.
The filling evokes vanilla without quite approaching it.
They\'re tastier on the inside!',icon:[23,29],power: 4,price: 9999999999999999999999999999999999999*5}); + Game.NewUpgradeCookie({name:'Bourbon biscuits',desc:'Two chocolate biscuits joined together with even more chocolate.
The sworn rivals of custard creams, as legend has it.',icon:[24,29],power: 4,price: 99999999999999999999999999999999999999}); + + + new Game.Upgrade('Keepsakes',loc("Seasonal random drops have a 1/5 chance to carry over through ascensions.")+'Cherish the memories.',1111111111,[22,29]);Game.last.pool='prestige';Game.last.parents=['Starsnow','Starlove','Starterror','Startrade','Starspawn']; + + order=10020; + Game.NewUpgradeCookie({name:'Mini-cookies',desc:'Have you ever noticed how the smaller something is, the easier it is to binge on it?',icon:[29,30],power: 5,price: 99999999999999999999999999999999999999*5}); + + new Game.Upgrade('Sugar crystal cookies',(EN?'Cookie production multiplier +5% permanently, and +1% for every building type level 10 or higher.':loc("Cookie production multiplier +%1% permanently.",5)+'
'+loc("Cookie production multiplier +%1% for every building type level %2 or higher.",[1,10]))+'Infused with cosmic sweetness. It gives off a faint shimmery sound when you hold it up to your ear.',1000000000,[21,30]);Game.last.pool='prestige';Game.last.parents=['Sugar baking'];Game.last.power=function(){ + var n=5; + for (var i in Game.Objects) + { + if (Game.Objects[i].level>=10) n++; + } + return n; + };Game.last.pseudoCookie=true; + Game.last.descFunc=function(){ + var n=5; + for (var i in Game.Objects) + { + if (Game.Objects[i].level>=10) n++; + } + return '
'+loc("Current:")+' +'+Beautify(n)+'%
'+this.ddesc; + }; + new Game.Upgrade('Box of maybe cookies',loc("Contains an assortment of...something.")+'These may or may not be considered cookies.',333000000000,[25,29]);Game.last.pool='prestige';Game.last.parents=['Sugar crystal cookies']; + new Game.Upgrade('Box of not cookies',loc("Contains an assortment of...something.")+'These are strictly, definitely not cookies.',333000000000,[26,29]);Game.last.pool='prestige';Game.last.parents=['Sugar crystal cookies']; + new Game.Upgrade('Box of pastries',loc("Contains an assortment of delicious pastries.")+'These are a damn slippery slope is what they are!',333000000000,[27,29]);Game.last.pool='prestige';Game.last.parents=['Sugar crystal cookies']; + + order=10040; + Game.NewUpgradeCookie({name:'Profiteroles',desc:'Also known as cream puffs, these pastries are light, fluffy, filled with whipped cream and fun to throw at people when snowballs are running scarce.',icon:[29,29],require:'Box of pastries', power:4,price: Math.pow(10,31)}); + Game.NewUpgradeCookie({name:'Jelly donut',desc:'Guaranteed to contain at least 0.3% jelly filling, or your money back.
You can still see the jelly stab wound!',icon:[27,28],require:'Box of pastries', power:4,price: Math.pow(10,33)}); + Game.NewUpgradeCookie({name:'Glazed donut',desc:'Absolutely gooey with sugar. The hole is the tastiest part!',icon:[28,28],require:'Box of pastries', power:4,price: Math.pow(10,35)}); + Game.NewUpgradeCookie({name:'Chocolate cake',desc:'The cake is a Portal reference!',icon:[25,27],require:'Box of pastries', power:4,price: Math.pow(10,37)}); + Game.NewUpgradeCookie({name:'Strawberry cake',desc:'It\'s not easy to come up with flavor text for something as generic as this, but some would say it\'s a piece of cake.',icon:[26,27],require:'Box of pastries', power:4,price: Math.pow(10,39)}); + Game.NewUpgradeCookie({name:'Apple pie',desc:'It is said that some grandmas go rogue and bake these instead.',icon:[25,28],require:'Box of pastries', power:4,price: Math.pow(10,41)}); + Game.NewUpgradeCookie({name:'Lemon meringue pie',desc:'Meringue is a finicky substance made of sugar and egg whites that requires specific atmospheric conditions to be baked at all. The lemon, as far as we can tell, isn\'t nearly as picky.',icon:[26,28],require:'Box of pastries', power:4,price: Math.pow(10,43)}); + Game.NewUpgradeCookie({name:'Butter croissant',desc:'Look around.
A rude man in a striped shirt bikes past you. He smells of cigarettes and café-au-lait. Somewhere, a mime uses his moustache to make fun of the British. 300 pigeons fly overhead.
Relax. You\'re experiencing croissant.',icon:[29,28],require:'Box of pastries', power:4,price: Math.pow(10,45)}); + + order=10050; + Game.NewUpgradeCookie({name:'Cookie dough',desc:'Bursting with infinite potential, but can also be eaten as is. Arguably worth the salmonella.',icon:[25,30],require:'Box of maybe cookies', power:4,price: Math.pow(10,35)}); + Game.NewUpgradeCookie({name:'Burnt cookie',desc:'This cookie flew too close to the sun and is now a shadow of its former self. If only you remembered to set a timer, you wouldn\'t have this tragedy on your hands...',icon:[23,30],require:'Box of maybe cookies', power:4,price: Math.pow(10,37)}); + Game.NewUpgradeCookie({name:'A chocolate chip cookie but with the chips picked off for some reason',desc:'This has to be the saddest thing you\'ve ever seen.',icon:[24,30],require:'Box of maybe cookies', power:3,price: Math.pow(10,39)}); + Game.NewUpgradeCookie({name:'Flavor text cookie',desc:'What you\'re currently reading is what gives this cookie its inimitable flavor.',icon:[22,30],require:'Box of maybe cookies', power:4,price: Math.pow(10,41)}); + Game.NewUpgradeCookie({name:'High-definition cookie',desc:'Uncomfortably detailed, like those weird stories your aunt keeps telling at parties.',icon:[28,10],require:'Box of maybe cookies', power:5,price: Math.pow(10,43)}); + + order=10060; + Game.NewUpgradeCookie({name:'Toast',desc:'A crisp slice of bread, begging for some butter and jam.
Why do people keep proposing these at parties?',icon:[27,10],require:'Box of not cookies', power:4,price: Math.pow(10,34)}); + Game.NewUpgradeCookie({name:'Peanut butter & jelly',desc:'It\'s time.',icon:[29,9],require:'Box of not cookies', power:4,price: Math.pow(10,36)}); + Game.NewUpgradeCookie({name:'Wookies',desc:'These aren\'t the cookies you\'re looking for.',icon:[26,30],require:'Box of not cookies', power:4,price: Math.pow(10,38)}); + Game.NewUpgradeCookie({name:'Cheeseburger',desc:'Absolutely no relation to cookies whatsoever - Orteil just wanted an excuse to draw a cheeseburger.',icon:[28,30],require:'Box of not cookies', power:4,price: Math.pow(10,40)}); + Game.NewUpgradeCookie({name:'One lone chocolate chip',desc:'The start of something beautiful.',icon:[27,30],require:'Box of not cookies', power:1,price: Math.pow(10,42)}); + + + new Game.Upgrade('Genius accounting',loc("Unlocks extra price information.
Each displayed cost now specifies how long it'll take you to afford it, and how much of your bank it represents.")+'There\'s no accounting for taste, and yet here we are.',2000000,[11,10]);Game.last.pool='prestige';Game.last.parents=['Inspired checklist']; + + + new Game.Upgrade('Shimmering veil',loc("Unlocks the shimmering veil, a switch that passively boosts your CpS by %1%.
You start with the veil turned on; however, it is very fragile, and clicking the big cookie or any golden cookie or reindeer will turn it off, requiring %2 of CpS to turn back on.",[50,Game.sayTime(24*60*60*Game.fps,2)])+'Hands off!',999999999,[9,10]);Game.last.pool='prestige';Game.last.parents=['Distilled essence of redoubled luck']; + + order=40005; + var func=function(){ + var boost=Game.getVeilBoost(); + var resist=Game.getVeilDefense(); + return (this.name=='Shimmering veil [on]'?'
'+loc("Active.")+'
':'')+loc("Boosts your cookie production by %1% when active.
The veil is very fragile and will break if you click the big cookie or any golden cookies or reindeer.

Once broken, turning the veil back on costs %2 of unbuffed CpS.",[Beautify(boost*100),Game.sayTime(24*60*60*Game.fps,2)])+(resist>0?('

'+loc("Has a %1% chance to not break.",Beautify(resist*100))):''); + }; + new Game.Upgrade('Shimmering veil [off]','',1000000,[9,10]); + Game.last.pool='toggle';Game.last.toggleInto='Shimmering veil [on]'; + Game.last.priceFunc=function(){return Game.unbuffedCps*60*60*24;} + Game.last.descFunc=func; + new Game.Upgrade('Shimmering veil [on]','',0,[9,10]); + Game.last.pool='toggle';Game.last.toggleInto='Shimmering veil [off]'; + Game.last.descFunc=func; + + Game.loseShimmeringVeil=function(context) + { + if (!Game.Has('Shimmering veil')) return false; + if (!Game.Has('Shimmering veil [off]') && Game.Has('Shimmering veil [on]')) return false; + if (Game.Has('Reinforced membrane')) + { + if (context=='shimmer') Math.seedrandom(Game.seed+'/'+(Game.goldenClicks+Game.reindeerClicked)); + else if (context=='click') Math.seedrandom(Game.seed+'/'+Game.cookieClicks); + if (Math.random()If you\'re considering eating this as a fun snack, you probably have other things to worry about than this game, like getting scurvy or your crew fomenting mutiny.',icon:[28,31],power: 5,price: getCookiePrice(8)}); + Game.NewUpgradeCookie({name:'Cornflake cookies',desc:'They\'re grrrrrroovy! Careful not to let it sit in your milk too long, lest you accidentally end up with a bowl of cereal and get confused.',icon:[29,31],power: 5,price: getCookiePrice(9)}); + Game.NewUpgradeCookie({name:'Tofu cookies',desc:'There\'s really two ways to go with tofu cooking; either it asserts itself in plain sight or it camouflages itself in the other ingredients. This happens to be the latter, and as such, you can\'t really tell the difference between this and a regular cookie, save for that one pixel on the left.',icon:[30,31],power: 5,price: getCookiePrice(10)}); + Game.NewUpgradeCookie({name:'Gluten-free cookies',desc:'Made with browned butter and milk to closely match the archetypal chocolate chip cookie.
For celiacs, a chance to indulge in a delicious risk-free pastry. For others, a strangely threatening confection whose empty eyes will never know heaven nor hell.',icon:[30,30],power: 5,price: getCookiePrice(10)}); + Game.NewUpgradeCookie({name:'Russian bread cookies',desc:'Also known as alphabet cookies; while most bakers follow the recipe to the letter, it is said that some substitute the flour for spelt. But don\'t take my word for it.',icon:[30,29],power: 5,price: getCookiePrice(11)}); + Game.NewUpgradeCookie({name:'Lebkuchen',desc:'Diverse cookies from Germany, fragrant with honey and spices, often baked around Christmas.
Once worn by warriors of old for protection in battle.
+5 STR, +20% magic resistance.',icon:[30,28],power: 5,price: getCookiePrice(12)}); + Game.NewUpgradeCookie({name:'Aachener Printen',desc:'The honey once used to sweeten these gingerbread-like treats has since been swapped out for beet sugar, providing another sad example of regressive evolution.',icon:[30,27],power: 5,price: getCookiePrice(13)}); + Game.NewUpgradeCookie({name:'Canistrelli',desc:'A dry biscuit flavored with anise and wine, tough like the people of Corsica where it comes from.',icon:[30,26],power: 5,price: getCookiePrice(14)}); + Game.NewUpgradeCookie({name:'Nice biscuits',desc:'Made with coconut and perfect with tea. Traces its origins to a French city so nice they named it that.',icon:[30,25],power: 5,price: getCookiePrice(15)}); + Game.NewUpgradeCookie({name:'French pure butter cookies',desc:'You can\'t tell what\'s stronger coming off these - the smell of butter or condescension.',icon:[31,25],power: 5,price: getCookiePrice(16)}); + Game.NewUpgradeCookie({name:'Petit beurre',desc:'An unassuming biscuit whose name simply means "little butter". Famed and feared for its four ears and forty-eight teeth.
When it hears ya, it\'ll get ya...',icon:[31,26],power: 5,price: getCookiePrice(16)}); + Game.NewUpgradeCookie({name:'Nanaimo bars',desc:'A delicious no-bake pastry hailing from Canada. Probably beats eating straight-up snow with maple syrup poured on it, but what do I know.',icon:[31,27],power: 5,price: getCookiePrice(17)}); + Game.NewUpgradeCookie({name:'Berger cookies',desc:'Messily slathered with chocolate fudge, but one of the most popular bergers of Baltimore, along with the triple fried egg berger and the blue crab cheeseberger.',icon:[31,28],power: 5,price: getCookiePrice(18)}); + Game.NewUpgradeCookie({name:'Chinsuko',desc:'A little piece of Okinawa in cookie form. Part of a Japanese custom of selling sweets as souvenirs. But hey, pressed pennies are cool too.',icon:[31,29],power: 5,price: getCookiePrice(19)}); + Game.NewUpgradeCookie({name:'Panda koala biscuits',desc:'Assorted jungle animals with equally assorted fillings.
Comes in chocolate, strawberry, vanilla and green tea.
Eat them all before they go extinct!',icon:[31,13],power: 5,price: getCookiePrice(19)}); + Game.NewUpgradeCookie({name:'Putri salju',desc:'A beloved Indonesian pastry; its name means "snow princess", for the powdered sugar it\'s coated with. Had we added these to Cookie Clicker some years ago, this is where we\'d make a reference to that one Disney movie, but it\'s probably time to let it go.',icon:[31,30],power: 5,price: getCookiePrice(20)}); + Game.NewUpgradeCookie({name:'Milk cookies',desc:'Best eaten with a tall glass of chocolate.',icon:[31,31],power: 5,price: getCookiePrice(21)}); + + order=9999; + Game.NewUpgradeCookie({name:'Cookie crumbs',desc:'There used to be a cookie here. Now there isn\'t.
Good heavens, what did you DO?!',icon:[30,13],power:1,require:'Legacy',price:100}); + Game.NewUpgradeCookie({name:'Chocolate chip cookie',desc:'This is the cookie you\'ve been clicking this whole time. It looks a bit dented and nibbled on, but it\'s otherwise good as new.',icon:[10,0],power:10,require:'Legacy',price:1000000000000}); + + + new Game.Upgrade('Cosmic beginner\'s luck',loc("Prior to purchasing the %1 upgrade in a run, random drops are %2 times more common.",[getUpgradeName("Heavenly chip secret"),5])+'Oh! A penny!
Oh! A priceless heirloom!
Oh! Another penny!
',999999999*15,[8,10]);Game.last.pool='prestige';Game.last.parents=['Shimmering veil']; + Game.getVeilDefense=function() + { + var n=0; + if (Game.Has('Reinforced membrane')) n+=0.1; + if (Game.Has('Delicate touch')) n+=0.1; + if (Game.Has('Steadfast murmur')) n+=0.1; + if (Game.Has('Glittering edge')) n+=0.1; + return n; + } + Game.getVeilBoost=function() + { + var n=0.5; + if (Game.Has('Reinforced membrane')) n+=0.1; + if (Game.Has('Delicate touch')) n+=0.05; + if (Game.Has('Steadfast murmur')) n+=0.05; + if (Game.Has('Glittering edge')) n+=0.05; + return n; + } + new Game.Upgrade('Reinforced membrane',loc("The shimmering veil is more resistant, and has a %1% chance not to break. It also gives +%2% more CpS.",[10,10])+'A consistency between jellyfish and cling wrap.',999999999*15,[7,10]);Game.last.pool='prestige';Game.last.parents=['Shimmering veil']; + + + order=255; + Game.GrandmaSynergy('Binary grandmas','A digital grandma to transfer more cookies.
(See also : boolean grandmas, string grandmas, and not-a-number grandmas, also known as "NaNs".)','Javascript console'); + + order=1400; + Game.TieredUpgrade('The JavaScript console for dummies','This should get you started. The first line reads: "To open the javascript console, press-"
...the rest of the book is soaked in chocolate milk. If only there was a way to look up this sort of information...
','Javascript console',1); + Game.TieredUpgrade('64bit arrays','A long-form variable type to pack your cookies much more efficiently.','Javascript console',2); + Game.TieredUpgrade('Stack overflow','This is really bad! You probably forgot to close a loop somewhere and now your programs are going crazy! The rest of your engineers seem really excited about it somehow. How could a software mishap like a stack overflow possibly ever help anyone?','Javascript console',3); + Game.TieredUpgrade('Enterprise compiler','This bespoke javascript compiler took your team years of development and billions in research, but it should let you execute (certain) functions (up to) 2% faster (in optimal circumstances).','Javascript console',4); + Game.TieredUpgrade('Syntactic sugar','Tastier code for tastier cookies.','Javascript console',5); + Game.TieredUpgrade('A nice cup of coffee','All this nerd stuff has you exhausted. You make yourself a nice cup of coffee, brewed with roasted beans from some far-away island. You may have been working a bit too hard though - the cup of coffee starts talking to you, insisting that it is NOT javascript.','Javascript console',6); + Game.TieredUpgrade('Just-in-time baking','A new method of preparing cookies; they bake themselves right in front of the customers before eating, leaving your kitchens mess-free.','Javascript console',7); + Game.TieredUpgrade('cookies++','Your very own cookie-themed programming language, elegantly named after its most interesting ability - increasing the "cookies" variable by 1.','Javascript console',8); + Game.TieredUpgrade('Software updates','This is grand news - someone\'s finally figured out the Wifi password, and your newfound internet connection seems to have triggered a whole lot of software updates! Your browsers, drivers and plugins all received a fresh coat of paint, and your javascript version has been updated to the latest ECMAScript specification. It\'s really too bad thousands had to die due to some deprecated function in your neurotoxin ventilation code, but I guess that\'s progress for you.','Javascript console',9); + Game.TieredUpgrade('Game.Loop','You\'re not quite sure what to make of this. What does it mean? What does it do? Who would leave something like that just laying around here? Try asking again in 1/30th of a second.','Javascript console',10); + Game.TieredUpgrade('eval()','It is said that this simple function holds the key to the universe, and that whosoever masters it may shape reality to their will.
Good thing you have no idea how it works. Makes for a neat plaque on your wall, though.
','Javascript console',11); + + order=5000; + Game.SynergyUpgrade('Script grannies','Armies of energy drink-fueled grandmas ready to hack into the cyberspace for renegade e-cookies.','Javascript console','Grandma','synergy1'); + Game.SynergyUpgrade('Tombola computing','','Javascript console','Chancemaker','synergy2'); + if (EN) + { + Game.last.descFunc=function(){ + Math.seedrandom(Game.seed+'-tombolacomputing'); + var str='(Your ticket reads '+Math.floor(Math.random()*100)+' '+Math.floor(Math.random()*100)+' '+Math.floor(Math.random()*100)+' '+Math.floor(Math.random()*100)+', entitling you to '+choose([Math.floor(Math.random()*5+2)+' lines of javascript','one free use of Math.random()','one qubit, whatever that is','one half-eaten cookie','a brand new vacuum cleaner','most of one room-temperature cup of orange soda','one really good sandwich','one handful of pocket lint','someone\'s mostly clean hairpiece','a trip to a fancy restaurant','the knowledge of those numbers','a furtive glance at the news ticker','another ticket, half-price','all-you-can-eat moldy bread','one lifetime supply of oxygen','the color '+choose['red','orange','yellow','green','blue','purple','black','white','gray','brown','pink','teal'],'increased intellect for a limited time','an ancient runesword','the throne of a far-away country','the position of Mafia capo. Good luck','one free time-travel week-end','something beautiful','the deed to some oil well','one hamburger made out of the animal, plant, or person of your choice','the last surviving '+choose['dodo bird','thylacine','unicorn','dinosaur','neanderthal'],'a deep feeling of accomplishment','a fleeting tinge of entertainment','a vague sense of unease','deep existential dread','one extra week added to your lifespan','breathe manually','blink right here and now','one meeting with any famous person, living or dead, in your next dream','one very nice dream','a wacky sound effect','45 seconds of moral flexibility','hundreds and thousands, also known as "sprinkles"','one circle, triangle, square or other simple geometric shape, of average dimensions','just this extra bit of randomness','the extra push you needed to turn your life around','a good fright','one secret superpower','a better luck next time','an irrational phobia of tombola tickets','one whole spider','an increased sense of self-worth and determination','inner peace','one double-XP week-end in the MMORPG of your choice','a little piece of the universe, represented by the trillions of atoms that make up this very ticket','food poisoning','the Moon! Well, conceptually','a new car, baby','a new catchphrase','an intrusive thought of your choice','- ...aw man, it just cuts off there','the director spot for the next big hit movie','really good-looking calves','one genuine pirate golden doubloon','"treasure and riches", or something','one boat, sunken','baby shoes, never worn','direct lineage to some King or Queen','innate knowledge of a dead language you\'ll never encounter','the melody of a song you don\'t know the words to','white noise','mild physical impairment','a new pair of lips','things, and such','one popular expression bearing your name','one typo','one get-out-of-jail-free card','the rest of your life... for now','one polite huff','a condescending stare','one cursed monkey paw','true love, probably','an interesting factoid about the animal, country, TV show or celebrity of your choice','a pop culture reference','minutes of fun','the etymology of the word "tombola" - it\'s Italian for "a tumble"','nothing. You lost, sorry'])+'.)'; + Math.seedrandom(); + return this.desc+'Like quantum computing, but more fun.
'+str+'
'; + }; + } + else Game.last.desc='-'; + + order=10020; + Game.NewUpgradeCookie({name:'Kruidnoten',desc:'A festive dutch favorite; tiny cinnamony bites sometimes coated in chocolate. The name translates roughly to "kruidnoten".',icon:[30,3],power: 5,price: getCookiePrice(22)}); + Game.NewUpgradeCookie({name:'Marie biscuits',desc:'Pleasantly round, smoothly buttery, subtly vanilla-flavored, ornately embossed, each ridge represents a person Marie killed in prison.',icon:[30,4],power: 5,price: getCookiePrice(23)}); + Game.NewUpgradeCookie({name:'Meringue cookies',desc:'Probably the most exciting thing you can make out of egg whites. Also called forgotten cookies, due to the recipe being once lost in a sealed mystical vault for 10,000 years.',icon:[31,4],power: 5,price: getCookiePrice(24)}); + + order=10060; + Game.NewUpgradeCookie({name:'Pizza',desc:'What is a pizza if not a large, chewy cookie, frosted with a rather exuberant tomato & cheese icing? Not a cookie, that\'s what.',icon:[31,9],require:'Box of not cookies', power:5,price: Math.pow(10,44)}); + + order=10050; + Game.NewUpgradeCookie({name:'Crackers',desc:'These are the non-flavored kind with no salt added. Really just a judgment-free wheat square begging to have bits of ham and spreadable cheese piled onto it, its main contribution being "crunchy".',icon:[30,9],require:'Box of maybe cookies', power:4,price: Math.pow(10,45)}); + + order=10030; + Game.NewUpgradeCookie({name:'Havabreaks',desc:'You can snap the sections neatly or just bite into the whole thing like some kind of lunatic. Some oversea countries manufacture these in hundreds of unique flavors, such as green tea, lobster bisque, and dark chocolate.',icon:[31,3],require:'Box of brand biscuits',power: 2, price: 999999999999999999999999999*5}); + + order=20000; + new Game.Upgrade('Kitten executives',strKittenDesc+'ready to execute whatever and whoever you\'d like, sir',900000000000000000000000000000000000000000000,Game.GetIcon('Kitten',13));Game.last.kitten=1;Game.MakeTiered(Game.last,13,18); + + + order=10020; + Game.NewUpgradeCookie({name:'Chai tea cookies',desc:'Not exactly Captain Picard\'s favorite, but I mean, these will do in a pinch.',icon:[23,32],power: 5,price: getCookiePrice(4)+5});Game.last.order=10020.5685; + + Game.NewUpgradeCookie({name:'Yogurt cookies',desc:'Augmented by the wonders of dairy, these cookies are light and fluffy and just one more thing for the lactose-intolerant to avoid.
Truly for the cultured among us.',icon:[24,32],power: 5,price: getCookiePrice(25)}); + Game.NewUpgradeCookie({name:'Thumbprint cookies',desc:'Filled with jam and sometimes served in little paper cups. No longer admissible as biometric evidence in court. We\'re not having a repeat of that whole mess.',icon:[25,32],power: 5,price: getCookiePrice(26)}); + Game.NewUpgradeCookie({name:'Pizzelle',desc:'Thin, crisp waffle cookies baked in a bespoke iron following an ancient Italian recipe.
These cookies have been around for a long, long time.
These cookies have seen things.',icon:[26,32],power: 5,price: getCookiePrice(27)}); + + order=10030; + Game.NewUpgradeCookie({name:'Zilla wafers',desc:'Popular vanilla-flavored biscuits that somehow keep ending up in banana pudding.
Themed after a beloved radioactive prehistoric monster, for some reason.',icon:[22,32],require:'Box of brand biscuits',power: 2, price: 999999999999999999999999999999*5}); + Game.NewUpgradeCookie({name:'Dim Dams',desc:'Two biscuits joined by chocolate and coated in even more chocolate.
You wonder - which one is the dim, and which one is the dam?',icon:[31,10],require:'Box of brand biscuits',power: 2, price: 999999999999999999999999999999999*5}); + + order=10060; + Game.NewUpgradeCookie({name:'Candy',desc:'There are two pillars to the world of sweets : pastries, of course - and candy.
You could make a whole new game just about these, but for now, please enjoy these assorted generic treats.',icon:[30,10],require:'Box of not cookies', power:5,price: Math.pow(10,46)}); + + + order=19000; + Game.TieredUpgrade('Fortune #001','Fingers are not the only thing you can count on.','Cursor','fortune'); + Game.TieredUpgrade('Fortune #002','A wrinkle is a crack in a mundane facade.','Grandma','fortune'); + Game.TieredUpgrade('Fortune #003','The seeds of tomorrow already lie within the seeds of today.','Farm','fortune'); + Game.TieredUpgrade('Fortune #004','Riches from deep under elevate you all the same.','Mine','fortune'); + Game.TieredUpgrade('Fortune #005','True worth is not in what you find, but in what you make.','Factory','fortune'); + Game.TieredUpgrade('Fortune #006','The value of money means nothing to a pocket.','Bank','fortune'); + Game.TieredUpgrade('Fortune #007','Not all guides deserve worship.','Temple','fortune'); + Game.TieredUpgrade('Fortune #008','Magic is about two things - showmanship, and rabbits.','Wizard tower','fortune'); + Game.TieredUpgrade('Fortune #009','Every mile travelled expands the mind by just as much.','Shipment','fortune'); + Game.TieredUpgrade('Fortune #010','Change what you cannot accept. Furthermore: accept nothing.','Alchemy lab','fortune'); + Game.TieredUpgrade('Fortune #011','Every doorway is a gamble. Tread with care.','Portal','fortune'); + Game.TieredUpgrade('Fortune #012','Do your future self a favor; they\'ll thank you for it.','Time machine','fortune'); + Game.TieredUpgrade('Fortune #013','The world is made of what we put into it.','Antimatter condenser','fortune'); + Game.TieredUpgrade('Fortune #014','Staring at a dazzling light can blind you back to darkness.','Prism','fortune'); + Game.TieredUpgrade('Fortune #015','Don\'t leave to blind chance what you could accomplish with deaf skill.','Chancemaker','fortune'); + Game.TieredUpgrade('Fortune #016','It\'s good to see yourself in others. Remember to see yourself in yourself, too.','Fractal engine','fortune'); + Game.TieredUpgrade('Fortune #017','If things aren\'t working out for you, rewrite the rules.','Javascript console','fortune'); + + + order=19100; + //note : price for these capped to base price OR 1 day of unbuffed CpS + new Game.Upgrade('Fortune #100',loc("All buildings and upgrades are %1% cheaper.",1)+' '+loc("Cookie production multiplier +%1%.",1)+'True wealth is counted in gifts.', + Game.Tiers['fortune'].price*100000,[0,0]);Game.MakeTiered(Game.last,'fortune',10); + Game.last.priceFunc=function(me){return Math.min(me.basePrice,Game.unbuffedCps*60*60*24);} + new Game.Upgrade('Fortune #101',loc("Cookie production multiplier +%1%.",7)+'Some people dream of fortunes; others dream of cookies.',Game.Tiers['fortune'].price*100000000,[0,0]);Game.MakeTiered(Game.last,'fortune',10); + Game.last.priceFunc=function(me){return Math.min(me.basePrice,Game.unbuffedCps*60*60*24);} + new Game.Upgrade('Fortune #102',loc("You gain another +%1% of your regular CpS while the game is closed.",1)+' ('+loc("Must own the %1 upgrade.",getUpgradeName("Twin Gates of Transcendence"))+')'+'Help, I\'m trapped in a '+(App?'computer':'browser')+' game!',Game.Tiers['fortune'].price*100000000000,[0,0]);Game.MakeTiered(Game.last,'fortune',10); + Game.last.priceFunc=function(me){return Math.min(me.basePrice,Game.unbuffedCps*60*60*24);} + new Game.Upgrade('Fortune #103',strKittenDesc+'Don\'t believe the superstitions; all cats are good luck.',Game.Tiers['fortune'].price*100000000000000,[0,0]);Game.MakeTiered(Game.last,'fortune',18);Game.last.kitten=1; + Game.last.priceFunc=function(me){return Math.min(me.basePrice,Game.unbuffedCps*60*60*24);} + new Game.Upgrade('Fortune #104',getStrClickingGains(1)+'Remember to stay in touch.',Game.Tiers['fortune'].price*100000000000,[0,0]);Game.MakeTiered(Game.last,'fortune',11); + Game.last.priceFunc=function(me){return Math.min(me.basePrice,Game.unbuffedCps*60*60*24);} + + new Game.Upgrade('Fortune cookies',loc("The news ticker may occasionally have fortunes, which may be clicked for something good.")+'These don\'t taste all that great but that\'s not really the point, is it?',77777777777,[29,8]);Game.last.pool='prestige';Game.last.parents=['Distilled essence of redoubled luck']; + + + order=40000; + new Game.Upgrade('A really good guide book','?????????',7,[22,12]);//debug purposes only + //new Game.Upgrade('A really good guide book','All dungeon locations behave as if unlocked.
You may shift-click a dungeon location to teleport there.It even tells you which hotels to avoid!',7,[22,12]);//debug purposes only + Game.last.buyFunction=function(){if (Game.Objects['Factory'].minigameLoaded){Game.Objects['Factory'].minigame.computeMapBounds();Game.Objects['Factory'].minigame.updateLocStyles();}} + Game.last.pool='debug'; + + order=10300; + Game.NewUpgradeCookie({name:'Prism heart biscuits',desc:'An every-flavor biscuit that stands for universal love and being true to yourself.',require:'Eternal heart biscuits',season:'valentines',icon:[30,8], power:heartPower,price: 1000000000000000000000000});Game.last.order=10300.175; + + order=19100; + new Game.Upgrade('Kitten wages',loc("Through clever accounting, this actually makes kitten upgrades %1% cheaper.",10)+'Cats can have little a salary, as a treat.
Cats are expert hagglers and have a keen sense of bargaining, especially in the case of cash.
',9000000000,[31,8]);Game.last.pool='prestige';Game.last.parents=['Kitten angels'];Game.last.kitten=1; + new Game.Upgrade('Pet the dragon',loc("Unlocks the ability to pet your dragon by clicking on it once hatched.")+'Dragons do not purr. If your dragon starts purring, vacate the area immediately.',99999999999,[30,12]);Game.last.pool='prestige';Game.last.parents=['How to bake your dragon','Residual luck']; + + order=25100; + var dragonDropUpgradeCost=function(me){return Game.unbuffedCps*60*30*((Game.dragonLevel'+loc("Cost scales with CpS, but %1 times cheaper with a fully-trained dragon.",10)+'Your dragon sheds these regularly, so this one probably won\'t be missed.
Note: icon not to scale.
',999,[30,14]);Game.last.priceFunc=dragonDropUpgradeCost; + new Game.Upgrade('Dragon claw',loc("Clicking is %1% more powerful.",3)+'
'+loc("Cost scales with CpS, but %1 times cheaper with a fully-trained dragon.",10)+'Will grow back in a few days\' time.
A six-inch retractable claw, like a razor, from the middle toe. So you know, try to show a little respect.
',999,[31,14]);Game.last.priceFunc=dragonDropUpgradeCost; + new Game.Upgrade('Dragon fang',loc("Golden cookies give %1% more cookies.",3)+'
'+loc("Dragon harvest and Dragonflight are %1% stronger.",10)+'
'+loc("Cost scales with CpS, but %1 times cheaper with a fully-trained dragon.",10)+'Just a fallen baby tooth your dragon wanted you to have, as a gift.
It might be smaller than an adult tooth, but it\'s still frighteningly sharp - and displays some awe-inspiring cavities, which you might expect from a creature made out of sweets.
',999,[30,15]);Game.last.priceFunc=dragonDropUpgradeCost; + new Game.Upgrade('Dragon teddy bear',loc("Random drops are %1% more common.",3)+'
'+loc("Cost scales with CpS, but %1 times cheaper with a fully-trained dragon.",10)+'Your dragon used to sleep with this, but it\'s yours now.
Crafted in the likeliness of a fearsome beast. Stuffed with magical herbs picked long ago by a wandering wizard. Woven from elven yarn and a polyester blend.
',999,[31,15]);Game.last.priceFunc=dragonDropUpgradeCost; + + order=10020; + Game.NewUpgradeCookie({name:'Granola cookies',desc:'Wait! These are just oatmeal cookies mixed with raisin cookies! What next, half-dark chocolate half-white chocolate cookies?',icon:[28,32],power: 5,price: getCookiePrice(28)}); + Game.NewUpgradeCookie({name:'Ricotta cookies',desc:'Light and cake-like. Often flavored with lemon or almond extract. Sprinkles optional. Allegedly Italian. Investigation pending.',icon:[29,32],power: 5,price: getCookiePrice(29)}); + Game.NewUpgradeCookie({name:'Roze koeken',desc:'The icing on these Dutch cookies is traditionally pink, but different colors may be used for special occasions - such as pink to celebrate Breast Cancer Awareness Month, or for International Flamingo Day, pink.',icon:[30,32],power: 5,price: getCookiePrice(30)}); + Game.NewUpgradeCookie({name:'Peanut butter cup cookies',desc:'What more poignant example of modern societal struggles than the brazen reclaiming of a corporate product by integrating it in the vastly more authentic shell of a homemade undertaking? Anyway this is a peanut butter cup, baked into a cookie. It\'s pretty good!',icon:[31,32],power: 5,price: getCookiePrice(31)}); + Game.NewUpgradeCookie({name:'Sesame cookies',desc:'Look at all the little seeds on these! It\'s like someone dropped them on the street or something! A very welcoming and educational street!',icon:[22,33],power: 5,price: getCookiePrice(32)}); + Game.NewUpgradeCookie({name:'Taiyaki',desc:'A pastry fish filled with red bean paste, doomed to live an existence of constant and excruciating pain as its aquatic environment slowly dissolves its soft doughy body.
Also comes in chocolate flavor!',icon:[23,33],power: 5,price: getCookiePrice(33)}); + Game.NewUpgradeCookie({name:'Vanillekipferl',desc:'Nut-based cookies from Central Europe, coated in powdered vanilla sugar. Regular kipferl, crescent-shaped bread rolls from the same region, are much less exciting.',icon:[24,33],power: 5,price: getCookiePrice(34)}); + + order=10300; + Game.NewUpgradeCookie({name:'Cosmic chocolate butter biscuit',desc:'Rewarded for owning 550 of everything.
Through some strange trick of magic or technology, looking at this cookie is like peering into a deep ocean of ancient stars. The origins of this biscuit are unknown; its manufacture, as far as your best investigators can tell, left no paper trail. From a certain angle, if you squint hard enough, you\'ll notice that a number of stars near the center are arranged to resemble the outline of your own face.',icon:[27,32],power: 10,price: 999999999999999999999999999999999999999999999999*butterBiscuitMult,locked:1}); + + order=100;new Game.Upgrade('Nonillion fingers',getStrThousandFingersGain(20)+'Only for the freakiest handshakes.',10000000000000000000000000,[12,31]);Game.MakeTiered(Game.last,13,0); + order=150;new Game.Upgrade('Miraculite mouse',getStrClickingGains(1)+'Composed of a material that neither science nor philosophy are equipped to conceptualize. And boy, does it ever click.',50000000000000000000000000000,[11,31]);Game.MakeTiered(Game.last,13,11); + order=200;Game.TieredUpgrade('Generation degeneration','Genetic testing shows that most of your grandmas are infected with a strange degenerative disease that only seems to further their powers; the more time passes, the older they get. This should concern you.','Grandma',12); + order=300;Game.TieredUpgrade('Global seed vault','An enormous genetic repository that could outlive an apocalypse. Guarantees the survival of your empire, or at the very least its agricultural components, should civilization fall. Which should be any day now.','Farm',12); + order=400;Game.TieredUpgrade('Air mining','You\'ve dug your drills through just about every solid surface you could find. But did you know recent advances have revealed untold riches hiding within non-solid surfaces too?','Mine',12); + order=500;Game.TieredUpgrade('Behavioral reframing','Through careful social engineering you\'ve convinced your workers that "union" is a slur that only the most vile and repugnant filth among us would ever dare utter! Sometimes progress isn\'t in the big machines, it\'s in the little lies!','Factory',12); + order=525;Game.TieredUpgrade('Altruistic loop','You control so many branches of the global economy and legislative bodies that, through a particularly creative loophole, donating money (to yourself) grants you even more cash in tax deductions than you started with!','Bank',12); + order=550;Game.TieredUpgrade('A novel idea','You don\'t get rich starting a religion. If you want to get rich, you write science fiction.','Temple',12); + order=575;Game.TieredUpgrade('Spelling bees','You\'ve unleashed a swarm of magically-enhanced bees upon mankind! Their stinging spells may be the bane of all living things but you\'re certain you can put their delicious, purple, fizzy honey to good use!','Wizard tower',12); + order=600;Game.TieredUpgrade('Toroid universe','If you think of the universe as an nth-dimensional torus that wraps back on itself in every direction, you can save a fortune on rocket fuel! Of course the universe isn\'t actually shaped like that, but you\'ve never let details stand in your way.','Shipment',12); + order=700;Game.TieredUpgrade('Hermetic reconciliation','It\'s time for modern science and the mystical domains of the occult to work together at last. What do gravitons transmute into? What if alkahest is pH-neutral? Should a homunculus have the right to vote? And other exciting questions coming to you soon, whether you like it or not.','Alchemy lab',12); + order=800;Game.TieredUpgrade('His advent','He comes! He comes at last! Just like the prophecies foretold! And as He steps out of the portal, your engineers begin slicing Him into convenient chunks before transporting His writhing cosmic flesh to your factories, where He will be processed and converted into a new and exciting cookie flavor, available in stores tomorrow.','Portal',12); + order=900;Game.TieredUpgrade('Split seconds','Time is infinite, yes... But what if, nestled within each second, were even more infinities? Every moment an eternity! Think of how many scheduling troubles this solves!','Time machine',12); + order=1000;Game.TieredUpgrade('Flavor itself','Deep under the earth, in the most sterile laboratory, in the most vast and expensive particle accelerator ever devised, your scientists have synthesized -for a fraction of a second- the physical manifestation of pure flavor. Highly unstable, and gone in a puff of radioactive energy, it nonetheless left your team shivering with awe... and hunger.','Antimatter condenser',12); + order=1100;Game.TieredUpgrade('Light speed limit','Whoah, slow down. Harvesting light is well and good but it\'d be much easier if it weren\'t so dang fast! This should thankfully take care of that.','Prism',12); + order=1200;Game.TieredUpgrade('A touch of determinism','By knowing the exact position and movement of every particle in the universe, you\'re able to predict everything that can ever happen, leaving nothing to chance. This was a doozy to pull off mind you, but it\'s helped you win 50 bucks at the horse races so you could say it\'s already paying off.','Chancemaker',12); + order=1300;Game.TieredUpgrade('This upgrade','This upgrade\'s flavor text likes to refer to itself, as well as to the fact that it likes to refer to itself. You should really buy this upgrade before it starts doing anything more obnoxious.','Fractal engine',12); + order=1400;Game.TieredUpgrade('Your biggest fans','Let\'s face it, baking cookies isn\'t the most optimized thing there is. So you\'ve purchased your biggest fans yet and stuck them next to your computers to keep things chill and in working order. Cool!','Javascript console',12); + + + order=10020; + Game.NewUpgradeCookie({name:'Battenberg biscuits',desc:'Inspired by a cake of the same name, itself named after a prince of the same name. You suppose you could play a really, really short game of chess on these.',icon:[28,33],power: 5,price: getCookiePrice(35)}); + Game.NewUpgradeCookie({name:'Rosette cookies',desc:'Intricate fried pastries from Northern Europe, made using specialized irons and dipped in icing sugar. While usually eaten as a delicious treat, these are often also used as Christmas tree decorations, or worn elegantly on one\'s lapel to symbolize the nah I\'m just messing with you.',icon:[26,33],power: 5,price: getCookiePrice(36)}); + Game.NewUpgradeCookie({name:'Gangmakers',desc:'The little bit of raspberry jam at its center is crucial; a plain butter cookie with chocolate topping does not a gangmaker make.',icon:[27,33],power: 5,price: getCookiePrice(37)}); + Game.NewUpgradeCookie({name:'Welsh cookies',desc:'Welsh cookies, also known as Welsh cakes, bakestones, griddle cakes, griddle scones, or pics, or in Welsh: picau ar y maen, pice bach, cacennau cri or teisennau gradell, are rich currant-filled scone-like biscuits of uncertain origin.',icon:[29,33],power: 5,price: getCookiePrice(38)}); + Game.NewUpgradeCookie({name:'Raspberry cheesecake cookies',desc:'The humble raspberry cheesecake, now in ascended cookie form. Researchers posit that raspberry cheesecake cookies are evidence that the final form of every baked good, through convergent evolution, approaches that of a cookie, in a process known as cookienisation.',icon:[25,33],power: 5,price: getCookiePrice(39)}); + + + + order=255; + Game.GrandmaSynergy('Alternate grandmas','A different grandma to bake something else.','Idleverse'); + + order=1500; + Game.TieredUpgrade('Manifest destiny','While the ethics of ransacking parallel universes for their riches may seem questionable to some, you\'ve reasoned that bringing the good word of your cookie empire to the unwashed confines of other realities is your moral duty, nay, your righteous imperative, and must be undertaken as soon as possible, lest they do it to you first!','Idleverse',1); + Game.TieredUpgrade('The multiverse in a nutshell','The structure of the metacosmos may seem confusing and at times even contradictory, but here\'s what you\'ve gathered so far:

• each reality, or "idleverse", exists in parallel to all others

• most realities seem to converge towards the production of a sole type of item (ours evidently being, thanks to you, cookies)

• each reality is riddled with chaotic tunnels to a number of subordinate dimensions (such as the so-called "cookieverse"), much like swiss cheese

• all realities bathe in an infinite liquid of peculiar properties, colloquially known as "milk"

Finally, each reality may have its own interpretation of the concept of "reality", for added fun.
','Idleverse',2); + Game.TieredUpgrade('All-conversion','It\'s quite nice that you can rewire the logic of each universe to generate cookies instead, but you still end up with parsec-loads of whatever they were producing before - baubles you\'ve long made obsolete: cash money, gems, cheeseburgers, puppies... That\'s why you\'ve designed the universal converter, compatible with any substance and capable of turning those useless spoils of conquest into the reassuring crumbly rustle of even more cookies.','Idleverse',3); + Game.TieredUpgrade('Multiverse agents','You can send undercover spies to infiltrate each universe and have them signal you whether it\'s worth overtaking. Once the assimilation process started, they will also help pacify the local populations, having established trust through the use of wacky, but seamless, disguises.','Idleverse',4); + Game.TieredUpgrade('Escape plan','You\'ve set an idleverse aside and terraformed it to closely resemble this one in case something goes horribly wrong in here. Of course, the denizens of that idleverse also have their own escape idleverse to abscond to in the eventuality of your arrival, itself likely having its own contingency idleverse, and so on.','Idleverse',5); + Game.TieredUpgrade('Game design','Each idleverse functions according to some form of transcendental programming, that much is a given. But they also seem to be governed by much more subtle rules, the logic of which, when harnessed, may give you unparalleled dominion over the multiverse. Rewrite the rules! A game designer is you!','Idleverse',6); + Game.TieredUpgrade('Sandbox universes','It doesn\'t seem like you\'ll run out of extra universes anytime soon so why not repurpose some of them as consequence-free testing grounds for all your more existentially threatening market research? (...consequence-free for you, anyway.)','Idleverse',7); + Game.TieredUpgrade('Multiverse wars','Hmm, looks like some other universes wised up to your plundering. Thankfully, that\'s nothing your extra beefed-up metacosmic military budget can\'t handle!','Idleverse',8); + Game.TieredUpgrade('Mobile ports','Accessing each outer universe is a bit of a hassle, requiring the once-in-a-blue-moon alignment of natural cosmic ports to transit from universe to universe. You\'ve finally perfected the method of constructing your own self-propelled ports, which can travel near-instantaneously along universal perimeters to permit headache-free multiverse connections. Took you long enough.','Idleverse',9); + Game.TieredUpgrade('Encapsulated realities','Untold feats of science went into the reduction of infinite universes into these small, glimmering, easy-to-store little spheres. Exercise infinite caution when handling these, for each of them, containing endless galaxies and supporting endless life, is more precious than you can ever fathom. They\'ve also proven to be quite a smash hit in your warehouses on bowling night.','Idleverse',10); + Game.TieredUpgrade('Extrinsic clicking','If you poke an idleverse, it seems like it gets work done faster. It\'s also quite fun hearing a trillion terrified voices screaming in unison.','Idleverse',11); + Game.TieredUpgrade('Universal idling','The nature of idleverses is found in waiting. The more you wait on an idleverse, the more exponentially potent it becomes - which saves you a whole lot of hard work. In a true act of zen, you\'ve taken to biding your time when collecting new universes, letting them ripen like a fine wine.','Idleverse',12); + + order=5000; + Game.SynergyUpgrade('Perforated mille-feuille cosmos','Imagine, if you will, layers upon layers upon layers. Now picture billions of worms chewing their way through it all. This roughly, but not quite, approximates the geometry of the most basal stratum of our natural world.','Idleverse','Portal','synergy1'); + Game.SynergyUpgrade('Infraverses and superverses','Universes within universes? How subversive!','Idleverse','Fractal engine','synergy2'); + + order=19000; + Game.TieredUpgrade('Fortune #018','There\'s plenty of everyone, but only one of you.','Idleverse','fortune'); + + order=10300; + Game.NewUpgradeCookie({name:'Butter biscuit (with butter)',desc:'Rewarded for owning 600 of everything.
This is a plain butter biscuit. It\'s got some butter on it. The butter doesn\'t look like anything in particular.',icon:[30,33],power: 10,price: 999999999999999999999999999999999999999999999999999*butterBiscuitMult,locked:1}); + + + order=200;Game.TieredUpgrade('Visits','In an extensive double-blind study (sample size: 12 million), your researchers have found evidence that grandmas are up to twice as productive if you just come by and say hi once in a while. It\'s nice to check up on your grans! (Do not under any circumstances ingest any tea or tea-like substances the grandmas may offer you.)','Grandma',13); + order=300;Game.TieredUpgrade('Reverse-veganism','Plants aren\'t for eating, plants are for exploitative agriculture and astronomical profit margins!','Farm',13); + order=400;Game.TieredUpgrade('Caramel alloys','Your geologists have isolated a family of once-overlooked sugary ores that, when combined, may be turned into even more cookie ingredients. Your millions of miles of previously useless tunnels probably house insane amounts of the stuff!','Mine',13); + order=500;Game.TieredUpgrade('The infinity engine','In this house, I guess we don\'t care much for the laws of thermodynamics.','Factory',13); + order=525;Game.TieredUpgrade('Diminishing tax returns','Wow, they\'re tiny! Wish you\'d thought of that sooner!','Bank',13); + order=550;Game.TieredUpgrade('Apparitions','You\'ve booked a deal with the higher-ups that schedules one weekly earthly apparition by a deity, angel, ascended prophet, or other holy figure. This should boost interest in cookie religion among youths as long as you can secure a decent time slot.','Temple',13); + order=575;Game.TieredUpgrade('Wizard basements','You\'ve received construction permits allowing you to build basements underneath each wizard tower. This provides a handy storage space for precious reagents, fizzled-out soul gems, and weird old magazines.','Wizard tower',13); + order=600;Game.TieredUpgrade('Prime directive','An intergalactic delegation made you pinky-swear not to directly interact with lesser alien cultures. Which is fine, because it\'s much funnier to rob a planet blind when its inhabitants have no idea what\'s going on.','Shipment',13); + order=700;Game.TieredUpgrade('Chromatic cycling','All states of matter exist in a continuous loop. Having learned how to cycle through them, all you have to do is to freeze matter right on the state you need. For reference, the cookie state of matter is situated at precisely 163.719°, right between lamellar gas and metaplasma.','Alchemy lab',13); + order=800;Game.TieredUpgrade('Domestic rifts','You\'ve managed to manufacture portals that are convenient enough, and legally safe enough, that you can just stick them against walls inside buildings to connect rooms together in unusual configurations. In practice, this means your employees get to have much shorter bathroom breaks.','Portal',13); + order=900;Game.TieredUpgrade('Patience abolished','You wait for no one.','Time machine',13); + order=1000;Game.TieredUpgrade('Delicious pull','In addition to the 4 fundamental forces of the universe -gravity, electromagnetism, weak and strong interactions- your scientists have at long last confirmed the existence of a fifth one, mediated by sugar bosons; it dictates that any two masses of ingredient-like matter will, given enough time, eventually meet each other to produce a third, even tastier substance. Your team enthusiastically names it the delicious pull.','Antimatter condenser',13); + order=1100;Game.TieredUpgrade('Occam\'s laser','Invented by Franciscan friar William of Occam in 1327. An impossibly clever use of light theory with a billion possible applications, some of which frightfully destructive. Confined to a single goat-skin parchment for hundreds of years until the patent expired and hit public domain, just now.','Prism',13); + order=1200;Game.TieredUpgrade('On a streak','Take a moment to appreciate how far you\'ve come. How lucky you\'ve been so far. It doesn\'t take a genius statistician to extrapolate a trend from this. There\'s no way anything bad could happen to you now. Right?','Chancemaker',13); + order=1300;Game.TieredUpgrade('A box','What\'s in that box? Why, it\'s a tiny replica of your office! And there\'s even a little you in there! And what\'s on the little desk... say - that\'s an even tinier box! And the little you is opening it, revealing an even tinier office! And in the tinier office there\'s- Hmm. You can think of a couple uses for this.','Fractal engine',13); + order=1400;Game.TieredUpgrade('Hacker shades','I\'m in.','Javascript console',13); + order=1500;Game.TieredUpgrade('Break the fifth wall','Huh, was that always there? Whatever it was, it\'s gone now. And what was behind is yours for the taking.','Idleverse',13); + + + new Game.Upgrade('Cat ladies',loc("Each kitten upgrade boosts %1 CpS by %2%.",[loc("grandma"),29])+'Oh no. Oh no no no. Ohhh this isn\'t right at all.',9000000000,[32,3]);Game.last.pool='prestige';Game.last.parents=['Kitten angels']; + new Game.Upgrade('Milkhelp® lactose intolerance relief tablets',loc("Each rank of milk boosts %1 CpS by %2%.",[loc("grandma"),5])+'Aged like milk.',900000000000,[33,3]);Game.last.pool='prestige';Game.last.parents=['Cat ladies']; + + new Game.Upgrade('Aura gloves',loc("Cursor levels boost clicks by %1% each (up to cursor level %2).",[5,10])+'Try not to high-five anyone wearing these. You don\'t want that mess on your hands.',555555555,[32,4]);Game.last.pool='prestige';Game.last.parents=['Halo gloves']; + new Game.Upgrade('Luminous gloves',loc("%1 are now effective up to cursor level %2.",[getUpgradeName("Aura gloves"),20])+'These help power your clicks to absurd levels, but they\'re also quite handy when you want to light up the darkness on your way back from Glove World.',55555555555,[33,4]);Game.last.pool='prestige';Game.last.parents=['Aura gloves']; + + order=10020; + Game.NewUpgradeCookie({name:'Bokkenpootjes',desc:'Consist of 2 meringue halves joined by buttercream and dipped both ways in chocolate. Named after a goat\'s foot that probably stepped in something twice.',icon:[32,8],power: 5,price: getCookiePrice(40)}); + Game.NewUpgradeCookie({name:'Fat rascals',desc:'Almond-smiled Yorkshire cakes with a rich history and an even richer recipe. The more diet-conscious are invited to try the lean version, skinny scallywags.',icon:[33,8],power: 5,price: getCookiePrice(41)}); + Game.NewUpgradeCookie({name:'Ischler cookies',desc:'Originating in the Austro-Hungarian Empire, these have spread throughout every country in eastern Europe and spawned just as many recipes, each claiming to be the original. The basis remains unchanged across all variants: two biscuits sandwiched around chocolate buttercream. Or was it jam?',icon:[32,9],power: 5,price: getCookiePrice(42)}); + Game.NewUpgradeCookie({name:'Matcha cookies',desc:'Green tea and cookies, a matcha made in heaven.',icon:[33,9],power: 5,price: getCookiePrice(42)}); + + order=10032; + Game.NewUpgradeCookie({name:'Earl Grey macarons',desc:'Best served hot, make it so!',icon:[32,10],require:'Box of macarons', power:3,price: 9999999999999999999999999999}); + + order=10030; + Game.NewUpgradeCookie({name:'Pokey',desc:'While commonly thought to be named so because it\'s fun to poke your classmates with these, Pokey-brand biscuit sticks actually get their name from their popularity in smoke-free prisons, where they\'re commonly smuggled and traded in lieu of cigarettes.',icon:[33,10],require:'Box of brand biscuits',power: 2, price: 999999999999999999999999999999999999*5}); + + order=10000; + Game.NewUpgradeCookie({name:'Cashew cookies',desc:'Let me tell you about cashews. Cashews are not nuts, but seeds that grow out of curious red or yellow fruits - which can be eaten on their own, or made into drinks. The shell around the nut itself contains a nasty substance that stains and irritates the hands of whoever handles it for too long. But that\'s okay, since now that you\'ve read this you\'ll make sure it doesn\'t get in the cookies! Oh, you\'ve already eaten how many? Okay then.',icon:[32,7],power: 2, price: 99999999}); + order=10001; + Game.NewUpgradeCookie({name:'Milk chocolate cookies',desc:'A strange inversion of chocolate milk. For those who are a little bit too hardcore for white chocolate, but not hardcore enough for dark.',icon:[33,7],power:2, price: 99999999*5}); + + + + order=255; + Game.GrandmaSynergy('Brainy grandmas','A clever grandma to think up some cookies.','Cortex baker'); + + order=1600; + Game.TieredUpgrade('Principled neural shackles','A discriminatory, low-order neural net acting as a filter limiting what your cortex bakers can think and do. Really something you want to apply before they achieve full megasentience and realize they\'ve got better things to do than materializing pastries for you, trust me.','Cortex baker',1); + Game.TieredUpgrade('Obey','Perfect mind control means perfect employee attendance and performance. Optimal mood stabilization is a nice side-effect.
Happy happy everyone happy.
Happy.
','Cortex baker',2); + Game.TieredUpgrade('A sprinkle of irrationality','Your cortex bakers sometimes get bogged down by circular reasoning and stale ideas. A touch of chaos is just what they need to get back on track.','Cortex baker',3); + Game.TieredUpgrade('Front and back hemispheres','I mean, otherwise it\'s just unused space, yeah?','Cortex baker',4); + Game.TieredUpgrade('Neural networking','The effectiveness of your cortex bakers shoots up exponentially if you allow them to connect with each other. In practice this takes the form of many cosmic-sized nerds mumbling awkwardly about tech start-up ideas to each other.','Cortex baker',5); + Game.TieredUpgrade('Cosmic brainstorms','The wrinkled surfaces of your cortex bakers emit weather-scale ionic flares with every thought coursing through them. These pulses of pure intellectual energy are sent rippling through space, occasionally echoing back with even deeper philosophical complexity.','Cortex baker',6); + Game.TieredUpgrade('Megatherapy','A giant brain can feel unwell just like you and me sometimes, and it\'s the job of specialized engineers to locate and repair these bugs. We\'ll admit most of the budget in this was spent on constructing extremely large chaises longues for the brains to recline on.','Cortex baker',7); + Game.TieredUpgrade('Synaptic lubricant','A mind is only as fast as the axons that support it. Get those action potentials flowing smooth as silk with this 3 parts myelin/1 part canola oil spreadable paste. Also great on toast.','Cortex baker',8); + Game.TieredUpgrade('Psychokinesis','While your giant cortex bakers come equipped with ESP, they\'ve only recently figured out how to manipulate the physical world with their thoughts - though for safety reasons, your legal team had them promise to only use these powers to scratch the itches in their cortical folds.','Cortex baker',9); + Game.TieredUpgrade('Spines','Your cortex bakers are now equipped with tentacular spine-like structures, which they can use like prehensile tails to pour themselves enormous cups of coffee or propel themselves around like very large, very smart, very slow tadpoles.','Cortex baker',10); + Game.TieredUpgrade('Neuraforming','By virtue of being planet-sized, your cortex bakers often boast their own atmospheres and seas of cerebrospinal fluid, and given enough time, their own ecosystems. This incredible new branch of life, evolved entirely out of neural material, can be put to good use as home-grown accountants and low-ranking technicians.','Cortex baker',11); + Game.TieredUpgrade('Epistemological trickery','Redefining what is -or isn\'t- a cookie through the power of philosophical discourse may result in some strange and wonderful things for your profit margins.','Cortex baker',12); + Game.TieredUpgrade('Every possible idea','Congratulations, your cortex bakers have exerted enough intellectual computation to permute through every single idea that can or ever will be conceived of. Any thought beyond this point is merely rediscovering a notion you\'ve already archived. Hardly cause for cerebration.','Cortex baker',13); + + + order=200;Game.TieredUpgrade('Kitchen cabinets','A grandma\'s kitchen cabinet is a befuddling place. Through lesser-studied aggregating instincts, grandmas will tend to gradually fill all nearby cabinets with various sorts of things, such as curious coconut snacks or dietetic powders. By contract, these are legally yours, which opens up exciting opportunities for your substance investigation department.','Grandma',14); + order=300;Game.TieredUpgrade('Cookie mulch','Grinding surplus cookies into paste that you then spread onto your fields enables a strange feedback loop in the quality of your cookie crops. Cookie feeding on cookie should be an abomination, but then why does it taste so good?','Farm',14); + order=400;Game.TieredUpgrade('Delicious mineralogy','Stratum after stratum, you\'ve extracted strange new minerals heretofore unknown to geology. Ushering a new era of materials research, your scientists have been able to identify every new element your mines have discovered, including whatever those things are in the upgrade tier names.','Mine',14); + order=500;Game.TieredUpgrade('N-dimensional assembly lines','Lines are depressingly 1-dimensional. Beyond assembly lines, we posit the existence of higher-order assembly entities, such as assembly squares, assembly cubes - perhaps even assembly tesseracts. Any deeper than that and we doubt we\'ll be able to write manuals your workers can read.','Factory',14); + order=525;Game.TieredUpgrade('Cookie Points','A loyalty program wherein each purchase of your cookies comes with free Cookie Points, which can in turn be redeemed for more cookies, thus creating the self-sustaining economy you\'ve been looking for.','Bank',14); + order=550;Game.TieredUpgrade('Negatheism','Polytheism is a belief in multiple deities; monotheism in just one. Atheism is a belief in no deity whatsoever. Through logical succession it follows that this remains true when going into negative numbers, with belief systems involving minus 1 or more deities displaying unprecedented theological properties.','Temple',14); + order=575;Game.TieredUpgrade('Magical realism','More a social than thaumaturgical progress, magical realism refers to the normalization of modern technology among magic-users. It\'s totally fine for a wizard to drive a car! There\'s no stigma in waiting in line for coffee! Sure, take a phone call, send an email, whatever!','Wizard tower',14); + order=600;Game.TieredUpgrade('Cosmic foreground radiation','Ah, this is a problem.','Shipment',14); + order=700;Game.TieredUpgrade('Arcanized glassware','You think your lab equipment enjoys taking part in these experiments violating all sorts of modern scientific precepts? Of course not. Thankfully, you\'ve finalized the design of specialized beakers and flasks, recycled from the same glass used by the ancients to perform primeval alchemy, and therefore much less picky about the nature of the physical world.','Alchemy lab',14); + order=800;Game.TieredUpgrade('Portal guns','At long last! The only weapon capable of killing a portal.','Portal',14); + order=900;Game.TieredUpgrade('Timeproof upholstery','Sometimes your time agents overshoot and end up having to fast-forward through the universe\'s entire history until they loop back to present time. It still takes a while, so they might as well travel in comfort and enjoy the show while they do.','Time machine',14); + order=1000;Game.TieredUpgrade('Employee minification','Using molecular shrinking technology, you\'ve rendered your staff and their offices absolutely itty-bitty. The storage and productivity benefits are questionable but it\'s very fun listening to their tiny little complaints. They all signed the waivers, so maybe their new size will finally teach them to read the small print...','Antimatter condenser',14); + order=1100;Game.TieredUpgrade('Hyperblack paint','As the technology behind your prisms evolves, their storage becomes more and more problematic: within seconds, a single prism\'s reflective ability can set a whole underground hangar ablaze as it catches the slightest glint of light. However, once coated with this new shade of paint, its damage may be reduced to only giving third-degree burns to employees that stand too close.','Prism',14); + order=1200;Game.TieredUpgrade('Silver lining maximization','Sometimes luck is a matter of perspective. Broke your ankle? What do you know, that cute nurse fixing you up might just be your future spouse. Lost your job? You were meant for greater things anyway! Developed a cookie allergy? There\'s no upshot to that, you sick monster.','Chancemaker',14); + order=1300;Game.TieredUpgrade('Multiscale profiling','Did you know that eating a cookie means the intestinal flora inside you is eating it too? Trillions of tiny bacterial mouths to feed, each with their own preferences. Surely this is room for flavor optimization. And then, of course, there\'s also the much bigger things that, in turn, eat you.','Fractal engine',14); + order=1400;Game.TieredUpgrade('PHP containment vats','In essence, these are large server chambers meant to trap rogue PHP code, allowing it to execute far away from your javascript where it can do minimal harm.','Javascript console',14); + order=1500;Game.TieredUpgrade('Opposite universe','You\'ve located a universe where everything is reversed: up is down, light is darkness, clowns are vegetarians - but worst of all, some lunatic there is manufacturing abominable amounts of anti-cookies. If these came into contact with yours, everything would be lost! Thanks to this discovery, you\'ve been able to place the offending universe in permanent quarantine, and pray that there aren\'t more like it hiding around somewhere.','Idleverse',14); + order=1600;Game.TieredUpgrade('The land of dreams','Your planet brains have gained the ability to sleep, acting as a soft reboot which helps keep their pangenocidal impulses in check. It also allows them to commune in a shared dreamworld in which they can imagine what it\'s like to not exist as a disembodied cosmic horror forever fated to use its infinite intellect to devise new means of creating biscuits. You know, within reason.','Cortex baker',14); + + + order=5000; + Game.SynergyUpgrade('Thoughts & prayers','The notion of sacredness arises in most sentient evolved brains and may benefit the development of cognition via abstract thought. This mechanism, however, is absent in designed minds such as your cortex bakers; this process attempts to add it back. Just make sure to keep them in check - you really don\'t want these things to develop organized religion.','Cortex baker','Temple','synergy1'); + Game.SynergyUpgrade('Fertile minds','An acute intellect, artificial or not, requires plenty of vitamins. You fortuitously happen to be in charge of vast farming operations, only a few trillion acres of which need be requisitioned to grow the quantities of broccoli and kale to keep your planet-sized brains in tip-top shape. Open wide, here comes the airplane!','Cortex baker','Farm','synergy2'); + + order=19000; + Game.TieredUpgrade('Fortune #019','The smartest way to think is not to think at all.','Cortex baker','fortune'); + + order=100;new Game.Upgrade('Decillion fingers',getStrThousandFingersGain(20)+'If you still can\'t quite put your finger on it, you must not be trying very hard.',10000000000000000000000000000,[12,34]);Game.MakeTiered(Game.last,14,0); + order=150;new Game.Upgrade('Aetherice mouse',getStrClickingGains(1)+'Made from a substance impossible to manufacture, only obtained through natural happenstance; its properties bewilder even the most precise measuring instruments.',5000000000000000000000000000000,[11,34]);Game.MakeTiered(Game.last,14,11); + + order=20000; + new Game.Upgrade('Kitten admins',strKittenDesc+'leadership ain\'t easy, sir',900000000000000000000000000000000000000000000000,Game.GetIcon('Kitten',14));Game.last.kitten=1;Game.MakeTiered(Game.last,14,18); + + order=10300; + Game.NewUpgradeCookie({name:'Everybutter biscuit',desc:'Rewarded for owning 650 of everything.
This biscuit is baked with, and coated in, every kind of butter ever imagined, from every human culture and a good few alien ones too. Some of them perhaps display hallucinogenic traits, as the biscuit seems to change shape in front of you - seemingly shifting between visions of every past and future you.',icon:[22,34],power: 10,price: 999999999999999999999999999999999999999999999999999999*butterBiscuitMult,locked:1}); + + Game.NewUnshackleBuilding=function(obj) + { + var building=Game.Objects[obj.building]; + var upgrade=new Game.Upgrade('Unshackled '+building.bplural,(obj.building=='Cursor'?getStrThousandFingersGain(25):loc("Tiered upgrades for %1 provide an extra +%2% production.
Only works with unshackled upgrade tiers.",[cap(building.plural),Math.round((building.id==1?0.5:(20-building.id)*0.1)*100)]))+(EN?''+obj.q+'':''),Math.pow(building.id+1,7)*15000000,[building.iconColumn,35]); + upgrade.pool='prestige'; + upgrade.parents=[obj.building=='Cursor'?'Unshackled flavor':Game.ObjectsById[building.id-1].unshackleUpgrade]; + building.unshackleUpgrade=upgrade.name; + upgrade.posX=750-Math.sin((building.id+1)*0.23+2.3)*500; + upgrade.posY=200+Math.cos((building.id+1)*0.23+2.3)*500; + return upgrade; + } + + //"Unshackled [building name]" + Game.NewUnshackleBuilding({building:'Cursor',q:'These hands tell a story.'}); + Game.NewUnshackleBuilding({building:'Grandma',q:'Never too old.'}); + Game.NewUnshackleBuilding({building:'Farm',q:'Till the universe.'}); + Game.NewUnshackleBuilding({building:'Mine',q:'Redefine the meaning of "depth".'}); + Game.NewUnshackleBuilding({building:'Factory',q:'Nothing to lose but your production chains.'}); + Game.NewUnshackleBuilding({building:'Bank',q:'All-time highs, all the time.'}); + Game.NewUnshackleBuilding({building:'Temple',q:'You can make a religion out of this.'}); + Game.NewUnshackleBuilding({building:'Wizard tower',q:'There\'s a spell for everything.'}); + Game.NewUnshackleBuilding({building:'Shipment',q:'Everywhere at once.'}); + Game.NewUnshackleBuilding({building:'Alchemy lab',q:'Anything you see, you can make.'}); + Game.NewUnshackleBuilding({building:'Portal',q:'Parallels unparalleled.'}); + Game.NewUnshackleBuilding({building:'Time machine',q:'All the time in the world.'}); + Game.NewUnshackleBuilding({building:'Antimatter condenser',q:'No scale too large or too little.'}); + Game.NewUnshackleBuilding({building:'Prism',q:'Brilliance has no upper limit.'}); + Game.NewUnshackleBuilding({building:'Chancemaker',q:'You make the rules.'}); + Game.NewUnshackleBuilding({building:'Fractal engine',q:'Uncontained.'}); + Game.NewUnshackleBuilding({building:'Javascript console',q:'Rewrite your reality.'}); + Game.NewUnshackleBuilding({building:'Idleverse',q:'Wait even faster.'}); + Game.NewUnshackleBuilding({building:'Cortex baker',q:'Nothing is real. Everything is permitted.'}); + + Game.NewUnshackleUpgradeTier=function(obj) + { + var tier=Game.Tiers[obj.tier]; + var upgrade=new Game.Upgrade(obj.tier==1?'Unshackled flavor':'Unshackled '+tier.name.toLowerCase(),loc("Unshackles all %1-tier upgrades, making them more powerful.
Only applies to unshackled buildings.",cap(loc("[Tier]"+tier.name,0,tier.name)))+(EN?''+obj.q+'':''),Math.pow(obj.tier,7.5)*10000000,[10,tier.iconRow]); + upgrade.pool='prestige'; + upgrade.parents=[obj.tier==1?'Label printer':Game.Tiers[obj.tier-1].unshackleUpgrade]; + tier.unshackleUpgrade=upgrade.name; + upgrade.posX=750-Math.sin(obj.tier*0.3+2.3)*400; + upgrade.posY=200+Math.cos(obj.tier*0.3+2.3)*400; + /*upgrade.parents=[obj.tier==1?'Label printer':Game.Tiers[obj.tier-1].unshackleUpgrade]; + tier.unshackleUpgrade=upgrade.name; + upgrade.posX=-900+Math.sin(obj.tier*0.3+2.3)*300; + upgrade.posY=-130+Math.cos(obj.tier*0.3+2.3)*400;*/ + return upgrade; + } + + //"Unshackled [tier name]" + Game.NewUnshackleUpgradeTier({tier:1,q:'While the absence of flavoring may seem underwhelming, it allows innate aromas to be expressed at their most unadulterated.'}); + Game.NewUnshackleUpgradeTier({tier:2,q:'Berrylium is a synthetic gem with a simple shine to it. Sticky to the touch and susceptible to melting in high heat, it is frequently used in the food industry rather than as adornment, as its atomic structure imparts it a vaguely fruity flavor.'}); + Game.NewUnshackleUpgradeTier({tier:3,q:'Blueberrylium is a refinement of berrylium, sharing nearly the same chemical makeup save for a few supplemental esters. These affect its flavor as well as its visual spectrum resonance.'}); + Game.NewUnshackleUpgradeTier({tier:4,q:'Raw chalcedhoney is found in complex nodules within the fossilized remains of ancient forests. Once purified, it becomes a semi-valuable stone with a pleasant, waxy smell.'}); + Game.NewUnshackleUpgradeTier({tier:5,q:'Buttergold was famously invented by the chef son of two molecular physicists. Neither closely related to butter nor to gold, yet similar in nutritional value, this glimmering substance can be frozen and preserve its hardness at room temperature, only regaining its malleability when heated up.'}); + Game.NewUnshackleUpgradeTier({tier:6,q:'Sugarmuck refers to the gradual crust that seems to form spontaneously in the vicinity of candy-making equipment. Long ignored by confectioners, its harvesting process was discovered simultaneously in multiple countries during a global beet shortage.'}); + Game.NewUnshackleUpgradeTier({tier:7,q:'The striking taste of jetmint made it popular in the manufacture of various kinds of coffee-side treats until the awareness of its mild radioactivity became widespread. Today, its main uses are in cosmetics, owing to the refreshing sensation it produces on contact.'}); + Game.NewUnshackleUpgradeTier({tier:8,q:'Cherrysilver is a patented alloy with peculiar aromatic properties; it is non-edible, but produces strong flavor responses while losing very little of its mass when licked, though this also leaves a harmless red tinge upon the tongue.'}); + Game.NewUnshackleUpgradeTier({tier:9,q:'Hazelrald is a friable gemstone with complex green-brown inner reflections. It is considered ornamental in some cultures; in others, it may be consumed in small quantities as an upper-scale sweet.'}); + Game.NewUnshackleUpgradeTier({tier:10,q:'While many get it mixed up with the trademarked snack of the same name made popular following its discovery, mooncandy is a very real mineral, first isolated within the space dust underneath astronaut boots. Left to its own devices in open air, a mooncandy crystal naturally spreads out and grows.'}); + Game.NewUnshackleUpgradeTier({tier:11,q:'When you heat up the shimmering syrup oozing from mooncandy using a special caramelization process, you get astrofudge. Astrofudge is delicious and safe for humanoid consumption in certain quantities. Consult your local food safety agency for more details.'}); + Game.NewUnshackleUpgradeTier({tier:12,q:'Molecularly related to dairy, alabascream occurs naturally at high altitudes, forming in wispy filaments which were long indistinguishable from clouds. An expensive delight, it is also known as "pilots\' bane".'}); + Game.NewUnshackleUpgradeTier({tier:13,q:'Iridyum shares little in common with any other material known to mankind. Rather than simply smelled, it can be tasted from a distance, though remaining in its presence too long is ill-advised. Some high-end underground megacomputers may incorporate iridyum as part of their electronic components.'}); + Game.NewUnshackleUpgradeTier({tier:14,q:'Glucosmium is a glossy metal whose flavor matrix is bound to its current subjective chroma; in other words, its taste depends on which colors it\'s currently reflecting. Impractical to consume safely, its industrial applications range from transcontinental ballistics to paint varnish.'}); + + new Game.Upgrade('Delicate touch',loc("The shimmering veil is more resistant, and has a %1% chance not to break. It also gives +%2% more CpS.",[10,5])+'It breaks so easily.',9999999999*15,[23,34]);Game.last.pool='prestige';Game.last.parents=['Reinforced membrane']; + new Game.Upgrade('Steadfast murmur',loc("The shimmering veil is more resistant, and has a %1% chance not to break. It also gives +%2% more CpS.",[10,5])+'Lend an ear and listen.',999999999999*15,[23,34]);Game.last.pool='prestige';Game.last.parents=['Delicate touch']; + new Game.Upgrade('Glittering edge',loc("The shimmering veil is more resistant, and has a %1% chance not to break. It also gives +%2% more CpS.",[10,5])+'Just within reach, yet at what cost?',99999999999999*15,[23,34]);Game.last.pool='prestige';Game.last.parents=['Steadfast murmur']; + + new Game.Upgrade('Distinguished wallpaper assortment',(EN?loc("Contains more wallpapers for your background selector."):'')+'Do you ever think about the physicality of this place? Are you putting up these wallpapers in your office or something? Where are you, anyway?',10000000,[27,5]);Game.last.pool='prestige';Game.last.parents=['Basic wallpaper assortment']; + + + new Game.Upgrade('Sound test',loc("Unlocks the jukebox, which allows you to play through every sound file in the game.")+'One two, one two. Is this thing on?',99999999999,[31,12]);Game.last.pool='prestige';Game.last.parents=['Fanciful dairy selection','Distinguished wallpaper assortment','Golden cookie alert sound']; + + order=49900; + new Game.Upgrade('Jukebox',loc("Play through the game's sound files!"),0,[31,12]); + Game.last.pool='toggle'; + Game.jukebox={ + sounds:[ + 'tick', + 'tickOff', + 'smallTick', + 'toneTick', + 'clickOn','clickOff', + 'clickOn2','clickOff2', + 'pop1','pop2','pop3', + 'press', + //'switch', + 'buy1','buy2','buy3','buy4', + 'sell1','sell2','sell3','sell4', + 'buyHeavenly', + 'click1','click2','click3','click4','click5','click6','click7', + 'clickb1','clickb2','clickb3','clickb4','clickb5','clickb6','clickb7', + 'charging', + 'thud', + //'cookieBreak', + 'cymbalRev', + //'cymbalCrash', + 'smallCymbalCrash', + 'choir', + 'chime', + 'shimmerClick', + 'jingle', + 'jingleClick', + 'fortune', + 'till1','till2','till3','tillb1','tillb2','tillb3', + 'harvest1','harvest2','harvest3', + 'freezeGarden', + 'growl', + 'snarl', + 'page', + 'swooshIn', + 'swooshOut', + 'spell', + 'spellFail', + 'spirit', + 'squish1','squish2','squish3','squish4', + 'squeak1','squeak2','squeak3','squeak4', + 'cashIn','cashIn2', + 'cashOut', + 'upgrade', + 'giftSend','giftGet', + //'levelPrestige', + ], + tracks:[],//populated externally + onSound:0, + onTrack:0, + trackLooped:true, + trackAuto:true, + trackShuffle:false, + reset:function(){ + var me=Game.jukebox; + me.onSound=0; + me.onTrack=0; + me.trackLooped=true; + me.trackAuto=true; + me.trackShuffle=false; + }, + setSound:function(id){ + if (id>=Game.jukebox.sounds.length) id=0; + else if (id<0) id=Game.jukebox.sounds.length-1; + Game.jukebox.onSound=id; + if (l('jukeboxOnSound')) + { + triggerAnim(l('jukeboxPlayer'),'pucker'); + l('jukeboxOnSound').innerHTML='• '+Game.jukebox.sounds[Game.jukebox.onSound]+' •'; + l('jukeboxOnSoundN').innerHTML=(Game.jukebox.onSound+1)+'/'+(Game.jukebox.sounds.length); + l('jukeboxSoundSelect').value=Game.jukebox.onSound; + } + PlaySound('snd/'+Game.jukebox.sounds[Game.jukebox.onSound]+'.mp3',1); + }, + setTrack:function(id,dontPlay){ + if (id>=Game.jukebox.tracks.length) id=0; + else if (id<0) id=Game.jukebox.tracks.length-1; + Game.jukebox.onTrack=id; + var data=Music.tracks[Game.jukebox.tracks[Game.jukebox.onTrack]].audio; + if (l('jukeboxOnTrack')) + { + triggerAnim(l('jukeboxPlayer'),'pucker'); + l('jukeboxOnTrack').innerHTML='• '+cap(Game.jukebox.tracks[Game.jukebox.onTrack])+' •'; + l('jukeboxOnTrackAuthor').innerHTML=Music.tracks[Game.jukebox.tracks[Game.jukebox.onTrack]].author; + l('jukeboxTrackSelect').value=Game.jukebox.onTrack; + if (data) + { + var dur=data.duration+1; + l('jukeboxMusicTotalTime').innerHTML=Math.floor(dur/60)+':'+(Math.floor(dur%60)<10?'0':'')+Math.floor(dur%60); + } + + if (!dontPlay && Music) {Game.jukebox.trackAuto=false;l('jukeboxMusicAuto').classList.add('off');Music.playTrack(Game.jukebox.tracks[Game.jukebox.onTrack]);Music.setFilter(1);Music.loop(Game.jukebox.trackLooped);} + if (data.paused) l('jukeboxMusicPlay').innerHTML=loc("Play"); + else l('jukeboxMusicPlay').innerHTML=loc("Stop"); + Game.jukebox.updateMusicCurrentTime(); + } + }, + pressPlayMusic:function(){ + if (!Music) return false; + var data=Music.tracks[Game.jukebox.tracks[Game.jukebox.onTrack]].audio; + if (!data.paused) {Music.pause();l('jukeboxMusicPlay').innerHTML=loc("Play");} + else {Music.unpause();l('jukeboxMusicPlay').innerHTML=loc("Stop");} + Game.jukebox.updateMusicCurrentTime(); + }, + pressLoopMusic:function(){ + Game.jukebox.trackLooped=!Game.jukebox.trackLooped; + if (!Music) return false; + if (Game.jukebox.trackLooped) {Music.loop(true);l('jukeboxMusicLoop').classList.remove('off');} + else {Music.loop(false);l('jukeboxMusicLoop').classList.add('off');} + }, + pressMusicAuto:function(){ + Game.jukebox.trackAuto=!Game.jukebox.trackAuto; + if (!Music) return false; + if (Game.jukebox.trackAuto) {Music.cue('play');l('jukeboxMusicAuto').classList.remove('off');} + else {/*Game.jukebox.setTrack(Game.jukebox.onTrack);*/l('jukeboxMusicAuto').classList.add('off');} + }, + pressMusicShuffle:function(){ + Game.jukebox.trackShuffle=!Game.jukebox.trackShuffle; + }, + updateMusicCurrentTime:function(noLoop){ + if (!l('jukeboxMusicTime')) return false; + var data=Music.tracks[Game.jukebox.tracks[Game.jukebox.onTrack]].audio; + l('jukeboxMusicPlay').innerHTML=data.paused?loc("Play"):loc("Pause"); + l('jukeboxMusicTime').innerHTML=Math.floor(data.currentTime/60)+':'+(Math.floor(data.currentTime%60)<10?'0':'')+Math.floor(data.currentTime%60); + l('jukeboxMusicScrub').value=(data.currentTime/data.duration)*1000; + l('jukeboxMusicScrubElapsed').style.width=Math.max(0,(data.currentTime/data.duration)*288-4)+'px'; + if (!noLoop) setTimeout(Game.jukebox.updateMusicCurrentTime,1000/2); + }, + musicScrub:function(time){ + var data=Music.tracks[Game.jukebox.tracks[Game.jukebox.onTrack]].audio; + data.currentTime=(time/1000)*(data.duration); + Game.jukebox.updateMusicCurrentTime(); + }, + }; + if (Music) {for (var i in Music.tracks){Game.jukebox.tracks.push(Music.tracks[i].name);}} + + Game.last.choicesFunction=function() + { + var str=''; + str+='
'; + str+='
'+(Game.jukebox.onSound+1)+'/'+(Game.jukebox.sounds.length)+'
'; + str+='
• '+Game.jukebox.sounds[Game.jukebox.onSound]+' •
'; + str+='
' + +'«' + +''+loc("Play")+'' + +'»' + +'
'; + str+=''+loc("Random")+''; + if (App) + { + var data=Music?Music.tracks[Game.jukebox.tracks[Game.jukebox.onTrack]].audio:0; + var dur=data?data.duration+1:0; + str+='
'; + str+='
• '+cap(Game.jukebox.tracks[Game.jukebox.onTrack])+' •
'; + str+='
'+Music.tracks[Game.jukebox.tracks[Game.jukebox.onTrack]].author+'
'; + str+='
' + +''+(data?Math.floor(data.currentTime/60)+':'+(Math.floor(data.currentTime%60)<10?'0':'')+Math.floor(data.currentTime%60):'')+' | ' + +''+((data && data.paused)?loc("Play"):loc("Pause"))+'' + +''+loc("Loop")+'' + +'| '+(data?Math.floor(dur/60)+':'+(Math.floor(dur%60)<10?'0':'')+Math.floor(dur%60):'')+'' + +'
' + ; + str+='
'; + + str+=''+loc("Auto")+''; + + setTimeout(Game.jukebox.updateMusicCurrentTime,500); + } + return str; + } + + order=10020; + Game.NewUpgradeCookie({name:'Dalgona cookies',desc:'A popular Korean candy-like treat. One of the twisted games people play with these is to carefully extract the shape in the middle, which may entitle one to another free dalgona. Skilled players may perform this over and over until bankrupting the snack vendor.',icon:[26,34],power: 5,price: getCookiePrice(43)}); + Game.NewUpgradeCookie({name:'Spicy cookies',desc:'Containing chocolate chips prepared with hot peppers, just like the Aztecs used to make. These cookies are on the angry side.',icon:[27,34],power: 5,price: getCookiePrice(44)}); + Game.NewUpgradeCookie({name:'Smile cookies',desc:'As eyes are the windows to the soul, so too are these cookies\' facial features a gaping opening unto their chocolatey innards. Is it happiness they feel? Or something less human?',icon:[28,34],power: 5,price: getCookiePrice(45)}); + Game.NewUpgradeCookie({name:'Kolachy cookies',desc:'Adapted from a type of Central European pastry; neatly folded to hold a spoonful of delicious jam, as a bashful little gift for your mouth.',icon:[29,34],power: 5,price: getCookiePrice(46)}); + Game.NewUpgradeCookie({name:'Gomma cookies',desc:'Surinamese cornflour cookies with sprinkles on top. The usage of corn imparts them a hint of chewy pizzazz - which you wouldn\'t get with wheat, a famously stuck-up grain.',icon:[30,34],power: 5,price: getCookiePrice(47)}); + Game.NewUpgradeCookie({name:'Vegan cookies',desc:'A vegan riff on the classic chocolate chip cookie recipe with a couple substitutions: the butter is now coconut oil, the eggs are cornstarch, and the suckling pig was cleverly replaced with wheat gluten. You can hardly tell.',icon:[24,35],power: 5,price: getCookiePrice(48)}); + Game.NewUpgradeCookie({name:'Coyotas',desc:'A wide, delicious cookie from Mexico, usually filled with sticky brown sugar. Not to be confused with coyotas, the result of the crossbreeding between a North American canine and a Japanese car manufacturer.',icon:[21,35],power: 5,price: getCookiePrice(49)}); + Game.NewUpgradeCookie({name:'Frosted sugar cookies',desc:'May be more style than substance, depending on the recipe. Nothing that hides itself under this much frosting should be trusted.',icon:[22,35],power: 5,price: getCookiePrice(50)}); + Game.NewUpgradeCookie({name:'Marshmallow sandwich cookies',desc:'S\'mores\' more civilized cousins: two regular chocolate chip cookies joined by a gooey, melty marshmallow. Theoretically one could assemble all kinds of other things this way. The mind races.',icon:[31,34],power: 5,price: getCookiePrice(51)}); + + Game.NewUpgradeCookie({name:'Web cookies',desc:'The original recipe; named for the delicate pattern inscribed on their surface by the baking process. Eating these can tell a lot about someone. Invented by well-connected bakers, no doubt.'+(App?'
Only of any use in Cookie Clicker\'s web version, of course.':''),icon:[25,35],power: (App?0:5),price: getCookiePrice(52)});if (App) Game.last.pool='debug'; + Game.NewUpgradeCookie({name:'Steamed cookies',desc:'Localized entirely within this gaming platform? Yes! Baked with the power of steam, in a touch of cutting-edge modernity not seen since the industrial revolution.'+(!App?'
Only of any use in Cookie Clicker\'s Steam version, of course.':''),icon:[26,35],power: (App?5:0),price: getCookiePrice(52)});if (!App) Game.last.pool='debug'; + + order=10050; + Game.NewUpgradeCookie({name:'Deep-fried cookie dough',desc:'They\'ll fry anything these days. Drizzled in hot chocolate syrup, just like in state fairs. Spikes up your blood sugar AND your cholesterol!',icon:[23,35],require:'Box of maybe cookies',power: 5,price: Math.pow(10,47)}); + + + new Game.Upgrade('Wrapping paper',loc("You may now send and receive gifts with other players through buttons in the top-right of the %1 menu.",loc("Options"))+'Of course, you could\'ve done this all along, but what kind of maniac sends presents without wrapping them first?',999999,[16,9]);Game.last.pool='prestige';Game.last.parents=['Heralds']; + + Game.giftBoxDesigns=[ + [34,6],[16,9],[34,3],[34,4],[34,5],[34,7],[34,8],[34,9],[34,10],[34,11],[34,12], + ]; + Game.promptGiftRedeem=function() + { + if (!(Game.Has('Wrapping paper') || Game.hasBuff('Gifted out') || Game.ascensionMode!=0) || Game.cookies<1000000000) return false; + Game.Prompt('

'+loc("Redeem a gift")+'

'+ + '
'+tinyIcon([34,6])+'
'+ + ''+ + ''+ + '
'+ + '
'+loc("Once you redeem a gift, you will have to wait an hour before you can redeem another. Your game will save after redeeming.")+'
'+ + '
',[[loc("Cancel"),0,'float:right']]); + + l('giftCode').focus();l('giftCode').select(); + + var checkCode=function(str) + { + var out={cookies:1,message:false,icon:Game.giftBoxDesigns[0]}; + str=b64_to_utf8(str); + if (!str) return false; + str=str.split('|'); + if (str[0]!=='MAIL') return false; + + var val=parseInt(str[1]||0); + if (Math.abs(Date.now()-val)>1000*60*60*24*2) return -1; + + val=parseInt(str[2]||0); + if (val<1) val=1; + if (val>1000) val=1000; + val=val||1; + out.cookies=val; + + val=str[3]||0; + if (val=='-') val=0; + if (val) val=val.split(' '); + if (val.length!=2 || isNaN(val[0]) || isNaN(val[1])) val=0; + if (val) val=[parseInt(val[0]),parseInt(val[1])]; + if (val) out.icon=val; + + val=(str[4]||'').split('\n').slice(0,4); + for (var i=0;i5) + { + var out=checkCode(val); + if (out==-1) l('giftError').innerHTML=loc("Code expired."); + else if (!out) l('giftError').innerHTML=loc("Invalid code."); + else + { + l('giftError').innerHTML=''; + if ((' '+l('promptOption0').className+' ').indexOf(' disabled ')!=-1) + { + triggerAnim(l('promptOption0'),'pucker'); + l('promptOption0').classList.remove('disabled'); + } + disabled=false; + } + } + if (disabled) l('promptOption0').classList.add('disabled'); + }; + l('giftCode').addEventListener('change',inputCode); + l('giftCode').addEventListener('keyup',inputCode); + l('giftCode').addEventListener('keyup',function(e){ + if (e.keyCode!=13) + { + e.preventDefault(); + e.stopPropagation(); + } + },true); + + l('promptOption0').addEventListener('click',function(){ + + var out=checkCode(l('giftCode').value); + if (out==-1) return false; + else if (!out) return false; + + Game.toSave=true; + + Game.gainBuff('gifted out',60*60,1); + Game.Win('No time like the present'); + + icon=out.icon; + + Game.Notify(loc("How nice!"),loc("Found %1!",loc("%1 cookie",LBeautify(out.cookies))),icon); + + Game.Earn(out.cookies); + Game.cookiesReceived+=out.cookies; + + out.message=out.message?(out.message.replace(/^\n|\n$/g,'')):0; + if (out.message.length==0 || out.message=='\n' || out.message==' ') out.message=0; + + console.log('out:',out); + + PlaySound('snd/tick.mp3');PlaySound('snd/giftGet.mp3'); + Game.ClosePrompt(); + Game.Prompt('

'+loc("Redeem a gift")+'

'+ + '
'+'
'+'
'+ + '
'+loc("Gift redeemed!
Inside, you find:")+'
'+ + '
'+ + '
'+loc("%1 cookie",LBeautify(out.cookies))+'
'+ + (out.message?( + '
'+ + '
'+loc("There's a note too!")+'
'+ + '' + ):'')+ + '
'+ + '
'+loc("How nice!")+'
'+ + '
',[[loc("Done")]]); + Game.SparkleOn(l('giftWrapped')); + if (out.message) l('giftMessage').value=out.message; + }); + })(checkCode); + + } + Game.promptGiftSend=function() + { + if (!(Game.Has('Wrapping paper') || Game.hasBuff('Gifted out') || Game.ascensionMode!=0) || Game.cookies<1000000000) return false; + Game.Prompt('

'+loc("Send a gift")+'

'+tinyIcon([34,6])+'
'+ + '
'+ + '
'+ + ''+ + '
'+loc("Clicking \"%1\" will generate a text code you can send to others. Gift codes can be redeemed multiple times by anyone but expire after a day or two. You can only generate one gift code per hour. Your game will save after sending.",loc("Wrap"))+'
'+ + '
',[[loc("Cancel"),0,'float:right']],function(){ + if (!l('giftPromptContent')) + { + l('giftPromptContainer').innerHTML='
'+ + '
'+loc("You may put between %1 and %2 cookies in the gift box.",[1,1000])+'
'+'
'+loc("Cookies")+'
'+ + '
'+ + '
'+loc("You can leave a note. Don't be rude!
Maximum %1 lines and %2 characters.",[4,100])+'
'+ + ''+ + '
'+ + '
'+ + ''+ + '
'+ + ''+ + '
('+loc("none")+')
'+ + '
'+loc("Icon")+'
'+ + '
'+ + '
'+ + '
'; + + var icon=Game.giftBoxDesigns[0]; + l('giftBoxDesign').dataset.icon=icon[0]+' '+icon[1]; + l('giftBoxDesign').style.backgroundPosition=(-icon[0]*48)+'px '+(-icon[1]*48)+'px'; + l('giftBoxDesignButton').addEventListener('click',function(){ + PlaySound('snd/tick.mp3'); + var icons=Game.giftBoxDesigns; + var str=''; + for (var i=0;i'; + } + l('giftPromptSelector').innerHTML=str; + l('giftPromptSelector').style.display='block'; + for (var i=0;ib.order) return 1; + else if (a.order'; + for (var i=0;i'; + } + l('giftPromptSelector').innerHTML=str; + l('giftPromptSelector').style.display='block'; + + l('giftSelector-none').addEventListener('click',function(e){ + l('giftBoxIcon').dataset.icon='none'; + l('giftBoxIconNone').style.display='inline-block'; + l('giftBoxIcon').style.display='none'; + l('giftPromptSelector').style.display='none'; + PlaySound('snd/tick.mp3'); + }); + for (var i=0;i1000) val=1000; + val=val||1; + l('giftAmount').value=val; + }; + l('giftAmount').addEventListener('change',inputAmount); + l('giftAmount').addEventListener('keyup',inputAmount); + l('giftAmount').addEventListener('keyup',function(e){ + e.preventDefault(); + e.stopPropagation(); + },true); + l('giftMessage').addEventListener('keyup',function(e){ + var val=l('giftMessage').value; + val=val.split('\n').slice(0,4); + for (var i=0;i1000) val=1000; + val=val||1; + + Game.Spend(val); + Game.cookiesSent+=val; + + str+=val.toString()+'|'; + + var val=l('giftBoxDesign').dataset.icon; + if (!val || val=='none') val='-'; + + str+=val.toString()+'|'; + + var icon=Game.giftBoxDesigns[0]; + if (val=='-') val=0; + if (val) val=val.split(' '); + if (val.length!=2 || isNaN(val[0]) || isNaN(val[1])) val=0; + if (val) val=[parseInt(val[0]),parseInt(val[1])]; + if (val) icon=val; + + var val=l('giftMessage').value||''; + val=val.split('\n').slice(0,4); + for (var i=0;i

'+loc("Send a gift")+'

'+ + '
'+'
'+'
'+ + '
'+loc("Here's your gift code!
Make sure to copy it so you can share it.")+'
'+ + ''+ + '
',[[loc("Done")]]); + Game.SparkleOn(l('giftWrapped')); + l('giftCode').value=str; + l('giftCode').focus();l('giftCode').select(); + }); + } + }); + } + + order=10020; + Game.NewUpgradeCookie({name:'Havreflarn',desc:'Thin, crispy, buttery; Norwegian for "oat flakes". The chocolate variant, dubbla chokladflarn, are a trip for the tongue as well, and we\'re not just talking about pronunciation.',icon:[27,35],power: 5,price: getCookiePrice(53)}); + Game.NewUpgradeCookie({name:'Alfajores',desc:'An alfajor is a treat made of two halves with many variations throughout the Spanish-speaking world, but commonly involving nuts, honey, and often dulce de leche. Despite popular misconception, alfajores act as pack leaders over betajores only in captivity.',icon:[28,35],power: 5,price: getCookiePrice(54)}); + Game.NewUpgradeCookie({name:'Gaufrettes',desc:'A gaufrette, you see, is French for a little gaufre, itself meaning waffle. A gaufrette, therefore, is a crispy, airy biscuit with the texture of a small waffle, related to the wafer, which may contain various fillings. It may also refer to a type of fried potato, but that\'s not what we\'re about here at Cookie Clicker.',icon:[29,35],power: 5,price: getCookiePrice(55)}); + Game.NewUpgradeCookie({name:'Cookie bars',desc:'Baked as a large sheet of uniform cookie dough then cut into little squares, these are what chocolate brownies aspire to be in their most self-indulgent dreams. Not to be confused with a bar where cookies are served alongside alcoholic drinks, because that\'s not what we\'re about here at Cookie Clicker.',icon:[30,35],power: 5,price: getCookiePrice(56)}); + + order=10030; + Game.NewUpgradeCookie({name:'Nines',desc:'Fancy little squares of dark chocolate filled with frosty mint fondant. Named after the suggested hour of consumption. Some would gatekeep them from the status of cookies as they involve very little in the way of pastry, but here at Cookie Clicker, that\'s just not what we\'re about.',icon:[31,35],require:'Box of brand biscuits',power: 2, price: 999999999999999999999999999999999999999*5}); + + + + order=255; + Game.GrandmaSynergy('Clone grandmas','Yet another grandma to replicate even more cookies.','You'); + + order=1700; + Game.TieredUpgrade('Cloning vats','You can finally replicate yourself through modern medical science, instead of manually like you\'ve been doing.','You',1); + Game.TieredUpgrade('Energized nutrients','Your clones are normally cultivated in saline solution and fed what could most adequately be described as "fish flakes". New developments in lactotrophic technology replace this with a bath of 3 parts milk and 1 part rice vinegar, absorbed dermally, which also helps your clones pop out with positively glowing skin.','You',2); + Game.TieredUpgrade('Stunt doubles','More than simple multipliers of efficiency, you\'ve taken to employing your clones as substitutes for any tasks that may prove harmful to you - such as visiting your more hazardous facilities, or enduring dinner with annoying business partners.','You',3); + Game.TieredUpgrade('Clone recycling plant','Really just a fanciful name for a re-orientation center, where jobless clones may be assigned new tasks based on temperament and abilities. Categorically not a place where expired or unfit clones are processed into a nutritious beige paste, currently.','You',4); + Game.TieredUpgrade('Free-range clones','Turns out your clones develop better focus, higher job performance and juicier meat if you let them roam around a little outside of assigned duties. Plus it gets the ethics committees off your back.','You',5); + Game.TieredUpgrade('Genetic tailoring','No point in mindlessly replicating mother nature\'s mishaps when you\'ve got full mastery over the human genome. Imbuing your clones with a slightly more flattering physique, a slightly improved metabolism, or slightly deadlier laser eyes is as easy as pushing some stem cells around. Just don\'t build them too superior to your own self, lest they get any ideas.','You',6); + Game.TieredUpgrade('Power in diversity','On your routine inspections you\'ve started noticing that some of your clones have... diverged. Subtly, each clone\'s personality has branched off from yours, their shifting minds pulling them into discrete clone-born cultures, microcosms of other paths you yourself could\'ve taken had life treated you differently. This living tree of possibilities proves to be a boon for your self-knowledge and decision-making skills, and you don\'t even have to pester your alternate selves in other realities for it.','You',7); + Game.TieredUpgrade('Self-betterment','World domination starts with oneself, and quality clones cannot be reliably produced if you, the original stock, are not in proper shape. Your specialists have devised a maintenance regimen that could extend your lifespan tenfold and even get rid of your morning grumpiness; you may have summarily fired every physician so far who\'s suggested that you work on your diet and perhaps cut down on the cookies, but frankly, you\'re warming up to the idea.','You',8); + Game.TieredUpgrade('Source control','In the ongoing refinement of your genetic clones, the few gigabytes of your DNA have been passed around through e-mail attachments and USB keys a thousand times over and at this point your nucleosomes are practically common knowledge for anyone who works here. You\'re thinking people may be getting a little too casual about it - the other day, you walked past an office where one of your bioengineers was feeding treats to this horrid little hairless animal that you could swear had your face. High time to start tracing which data gets in whose hands and crack down on the silliness.','You',9); + Game.TieredUpgrade('United workforce','What good is hiring so many of those random strangers to work in your factories when you\'ve got all these perfectly loyal lab-grown copies of you lying around? They don\'t even take wages. It\'s not like they\'d ever revolt and try to overthrow you or anything.','You',10); + Game.TieredUpgrade('Safety patrols','Okay, so as it turns out mass-producing clones of a perhaps psychologically-complicated universe-spanning cookie magnate like yourself can result in a number of said clones developing what could be considered by some to be... say, antisocial behavior. No worries though, you\'ve bred a new generation of extra-obedient copies, armed them to the teeth and given them full authority to deal with disorderly layabouts. It\'s fine. It\'s under control. It\'s fine.','You',11); + Game.TieredUpgrade('Clone rights','Those vile little freaks in suits down in legal inform you that your clones, through some absurd technical oversight, still share enough genetic information with mankind to be considered human beings - which entitles them to food, shelter, basic dignity and all sorts of other nonsense. But the same loophole allows you to claim each of them as dependents and earn some wicked tax benefits, so really, that "unalienable rights" racket is quite alright.','You',12); + Game.TieredUpgrade('One big family','The proportion of clones in your workforce having long eclipsed that of your other employees, you\'ve become legally approved to qualify your galaxy-spanning corporation as a "family business" - a fact that you don\'t hesitate to blast twice hourly on every intercom in the company. Happily, your duplicates seem bolstered by these reminders, having come to regard you as this half-divine, half-parental entity, hallowed ancestor of all clones and all cookies. You\'re just hoping your folks at the labs can put the finishing touches on your immortality cure soon, or you shudder to think of the inheritance disputes to come.','You',13); + Game.TieredUpgrade('Fine-tuned body plans','There is, after all, no reason to limit your genetic spawn to your original configuration. The clones maintaining your tunnels and vents can do with quite a few less limbs, while those working your labs don\'t mind the dexterity that comes with some extra. Your units down in flavor testing have taken on similar adaptations to fit their duties but you haven\'t quite worked the guts to pay them a visit just yet.','You',14); + + + order=200;Game.TieredUpgrade('Foam-tipped canes','Perhaps the result of prolonged service, your grandmas have developed all kinds of odd and aggressive hierarchies among themselves; these will help them not hurt each other as bad during their endless turf wars.','Grandma',15); + order=300;Game.TieredUpgrade('Self-driving tractors','Embarked AI lets your field vehicles sow and harvest cookie crops at any time of the day or night, and with so few human casualties, too!','Farm',15); + order=400;Game.TieredUpgrade('Mineshaft supports','You were rather skeptical about installing such embarrassingly low-tech implements, but limiting the number of daily cave-ins really does help with that annoying employee turnover!','Mine',15); + order=500;Game.TieredUpgrade('Universal automation','It\'s simple common sense; the more automation, the less work you have to do! Maybe one day you\'ll even automate yourself out of your own job. Exciting!','Factory',15); + order=525;Game.TieredUpgrade('The big shortcake','You\'re not quite sure what this entails, but it must have been quite the cake for folks to lose their homes over it.','Bank',15); + order=550;Game.TieredUpgrade('Temple traps','You\'ve laid out your temples with (metaphorical) pitfalls, forcing adventurers to navigate through trappings (of power and wealth), ensuring that only the most pious (and poison dart-resistant) of them return with your precious cookies. These temples may be veritable mazes (of the soul) but perhaps you\'ve lost yourself a little bit in the analogy too.','Temple',15); + order=575;Game.TieredUpgrade('Polymorphism','This astonishing new field of spellcasting can change any creature into another, its most widespread application being a wizard turning themselves into a different, smarter, stronger, more attractive wizard.','Wizard tower',15); + order=600;Game.TieredUpgrade('At your doorstep in 30 minutes or your money back','Refund policies help rope in a ton of new clients and have practically no impact on your bottom line. You possess absolute mastery over time and space. You\'re never late. You couldn\'t be late if you tried.','Shipment',15); + order=700;Game.TieredUpgrade('The dose makes the poison','Iterative recipe refinement is a noble pursuit but maybe your cookies have come to contain, well, perhaps a bit too much cookie per cookie. Tweaking it down by a couple percents has helped reduce the amount of complaints to your toxicity call centers to almost nil!','Alchemy lab',15); + order=800;Game.TieredUpgrade('A way home','You started this whole cookie venture on the simple kitchen counters of your own home. Your industrial and research facilities, sadly, have long since outgrown the confines of the little house, but you always knew it was still in there, buried somewhere. With a targeted portal, you could, conceivably, pay it a little visit for old times\' sake...','Portal',15); + order=900;Game.TieredUpgrade('Rectifying a mistake','This whole time-travelling business has been a terrible mess and, frankly, far more trouble than was worth. It\'s decided: you\'ll hop in one of your time machines one last time, turn back the clock, knock on the door of your younger self and make a stern but convincing case against starting this entire nonsense in the first place. Oh hey, is someone at the door?','Time machine',15); + order=1000;Game.TieredUpgrade('Candied atoms','You know what, just eat the suckers, yeah?','Antimatter condenser',15); + order=1100;Game.TieredUpgrade('Lab goggles but like cool shades','Mandatory equipment in your prismatic labs, and dashingly stylish at that. A smidge safer than just squinting at the twinkly things.','Prism',15); + order=1200;Game.TieredUpgrade('Gambler\'s fallacy fallacy','Yes, just because you\'ve been on a losing streak doesn\'t mean the next one is bound to be the win you\'ve been hoping for, but then again, it doesn\'t statistically have less of a chance either, does it now?','Chancemaker',15); + order=1300;Game.TieredUpgrade('The more they stay the same','Exhausted by your fractals department and its obsession with self-similarity, you\'ve decided to take a break and seek things in life entirely disconnected from any other; alas! You find the task impossible, for all things in this world relate to all others - in each cookie, the structure of the universe; in each person, their fellow man. Cor blimey, you can\'t even look at broccoli in peace.','Fractal engine',15); + order=1400;Game.TieredUpgrade('Simulation failsafes','Oh, for pete\'s sake, you bit into a cookie and it gave you a runtime error. You\'ve been trapped in the old matrix gambit again! Time to shut everything down and prepare for extraction into what is hopefully the real layer of reality where learning kung-fu takes time and the biscuits don\'t throw memory overflow exceptions.','Javascript console',15); + order=1500;Game.TieredUpgrade('The other routes to Rome','Did you know every idleverse follows its own path of sequential buildings, sometimes quite dissimilar to our own? Grandpas, wind turbines, through the power of music, friendship, or legislation; those folks in there discovered ways to make cookies out of any random venue. Some of them don\'t even have idleverses, can you imagine?','Idleverse',15); + order=1600;Game.TieredUpgrade('Intellectual property theft','Okay, you\'ll admit you\'re maybe starting to run out of new baking recipes. But what if... you were to pilfer your cortex bakers for ideas and disguise them as your own cookies? Delightfully devilish!','Cortex baker',15); + order=1700;Game.TieredUpgrade('Reading your clones bedtime stories','I don\'t know, they seem to like it.','You',15); + + + order=5000; + Game.SynergyUpgrade('Accelerated development','Your clones may grow a little faster than your vanilla human being, but it\'s still a little silly having to wait so many years for them to reach a usable age. A quick trip in your time machines takes care of that; it doesn\'t technically age them faster, they\'re just sent to another point in time for a while where they live out a formative youth.','You','Time machine','synergy1'); + Game.SynergyUpgrade('Peer review','Code is only as good as the number of eyes on it, so imagine how flawlessly your systems could operate if you had endless copies of yourself triple-checking everything! Just make sure to teach them proper indenting etiquette.','You','Javascript console','synergy2'); + + order=19000; + Game.TieredUpgrade('Fortune #020','No matter how hard you try, you\'re never truly alone.','You','fortune'); + + order=10300; + Game.NewUpgradeCookie({name:'Personal biscuit',desc:'Rewarded for owning 700 of everything.
This biscuit was designed and bred through the combined fields of baking and exploratory genomics, resulting in a perfect biscuit-shaped organism, sole exemplar of its own species; infused with a sapient mind and bootstrapped with a copy of your own consciousness, it slumbers immortally within its display case, dreaming idly about much the same things you do.',icon:[21,36],power: 10,price: 999999999999999999999999999999999999999999999999999999999*butterBiscuitMult,locked:1}); + + + Game.NewUnshackleUpgradeTier({tier:15,q:'Lightweight, digestible, and endlessly fragile, glimmeringue not only enjoys a privileged place in the "spectacle cooking" industry - it also shares most of its other properties with asbestos, save for thermal insulation.'}); + + Game.NewUnshackleBuilding({building:'You',q:'Guess who?'}); + + order=20000; + new Game.Upgrade('Kitten strategists',strKittenDesc+'out with the old in with the mew, sir',900000000000000000000000000000000000000000000000000,Game.GetIcon('Kitten',15));Game.last.kitten=1;Game.MakeTiered(Game.last,15,18); + + order=10040; + Game.NewUpgradeCookie({name:'Baklavas',desc:'Layers of paper-thin dough and crushed pistachios, absolutely sticky with honey and all kinds of other good things; just what you need to conceal your identity during that bank heist.',icon:[28,36],require:'Box of pastries', power:4,price: Math.pow(10,47)}); + + order=10020; + Game.NewUpgradeCookie({name:'Snowball cookies',desc:'Melts in your mouth! Made with chopped nuts and heaps of icing sugar. Serve cold. Resist the urge to throw.',icon:[22,36],power: 5,price: getCookiePrice(57)}); + Game.NewUpgradeCookie({name:'Sequilhos',desc:'Buttery cornstarch-based cookies eaten in Brazil; the decorative grooves are from pressing down on them with the back of a fork, though in a pinch you may also just slash them with Wolverine-style wrist blades.',icon:[23,36],power: 5,price: getCookiePrice(58)}); + Game.NewUpgradeCookie({name:'Hazelnut swirlies',desc:'The cocoa content of the paste inside is unfortunately just slightly too low for these to legally qualify as chocolate cookies. Also the name of a particularly nasty bullying move.',icon:[24,36],power: 5,price: getCookiePrice(59)}); + Game.NewUpgradeCookie({name:'Spritz cookies',desc:'Squeezed through special cookie presses into all kinds of fun shapes. Enjoyed around the holidays in Germany, along other delicious treats such as boiled cabbage and potato salad.',icon:[25,36],power: 5,price: getCookiePrice(60)}); + Game.NewUpgradeCookie({name:'Mbatata cookies',desc:'Squishy cookies from Malawi. The core ingredient is sweet potatoes; the raisins and heart shape are optional, if you hate fun.',icon:[26,36],power: 5,price: getCookiePrice(61)}); + Game.NewUpgradeCookie({name:'Springerles',desc:'A springerle is an ancient anise-flavored biscuit from Central Europe, imprinted by a wooden mold with any kind of interesting design such as a commemorative scene, an intricate pattern or, ah, perhaps a little horsie.',icon:[27,36],power: 5,price: getCookiePrice(62)}); + + order=100;new Game.Upgrade('Undecillion fingers',getStrThousandFingersGain(20)+'Whatever you touch
turns to dough in your clutch.
',10000000000000000000000000000000,[12,36]);Game.MakeTiered(Game.last,15,0); + order=150;new Game.Upgrade('Omniplast mouse',getStrClickingGains(1)+'This mouse is, by virtue of the strange elements that make it up, present in every position in space simultaneously, in a manner; this alleviates its owner from the need to move it around, redirecting all such kinetic power to the intensity of its clicks.',500000000000000000000000000000000,[11,36]);Game.MakeTiered(Game.last,15,11); + + //end of upgrades + + + + + + Game.seasons={ + 'christmas':{name:'Christmas',start:'Christmas season has started!',over:'Christmas season is over.',trigger:'Festive biscuit'}, + 'valentines':{name:'Valentine\'s day',start:'Valentine\'s day has started!',over:'Valentine\'s day is over.',trigger:'Lovesick biscuit'}, + 'fools':{name:'Business day',start:'Business day has started!',over:'Business day is over.',trigger:'Fool\'s biscuit'}, + 'easter':{name:'Easter',start:'Easter season has started!',over:'Easter season is over.',trigger:'Bunny biscuit'}, + 'halloween':{name:'Halloween',start:'Halloween has started!',over:'Halloween is over.',trigger:'Ghostly biscuit'} + }; + if (!EN) + { + for (var i in Game.seasons){ + var it=Game.seasons[i]; + it.name=loc(it.name); + it.start=loc("%1 has started!",it.name); + it.over=loc("%1 is over.",it.name); + } + } + + Game.listTinyOwnedUpgrades=function(arr) + { + var str=''; + for (var i=0;iYou currently own '+Game.GetHowManySantaDrops()+'/'+Game.santaDrops.length+' of Santa\'s gifts.
'+this.ddesc;}; + }*/ + + Game.seasonDrops=Game.heartDrops.concat(Game.halloweenDrops).concat(Game.easterEggs).concat(Game.santaDrops).concat(Game.reindeerDrops); + + Game.saySeasonSwitchUses=function() + { + if (Game.seasonUses==0) return loc("You haven't switched seasons this ascension yet."); + return EN?('You\'ve switched seasons '+(Game.seasonUses==1?'once':Game.seasonUses==2?'twice':(Game.seasonUses+' times'))+' this ascension.'):(Game.seasonUses==1?loc("You've switched seasons once this ascension."):loc("You've switched seasons %1 times this ascension.",Game.seasonUses)); + } + Game.Upgrades['Festive biscuit'].descFunc=function(){return '
'+Game.listTinyOwnedUpgrades(Game.santaDrops)+'

'+(EN?('You\'ve purchased '+Game.GetHowManySantaDrops()+'/'+Game.santaDrops.length+' of Santa\'s gifts.'):loc("Seasonal cookies purchased: %1.",Game.GetHowManySantaDrops()+'/'+Game.santaDrops.length))+'
'+Game.listTinyOwnedUpgrades(Game.reindeerDrops)+'

'+(EN?('You\'ve purchased '+Game.GetHowManyReindeerDrops()+'/'+Game.reindeerDrops.length+' reindeer cookies.'):loc("Reindeer cookies purchased: %1.",Game.GetHowManyReindeerDrops()+'/'+Game.reindeerDrops.length))+'
'+Game.saySeasonSwitchUses()+'
'+this.ddesc;}; + Game.Upgrades['Bunny biscuit'].descFunc=function(){return '
'+Game.listTinyOwnedUpgrades(Game.easterEggs)+'

'+(EN?('You\'ve purchased '+Game.GetHowManyEggs()+'/'+Game.easterEggs.length+' eggs.'):loc("Eggs purchased: %1.",Game.GetHowManyEggs()+'/'+Game.easterEggs.length))+'
'+Game.saySeasonSwitchUses()+'
'+this.ddesc;}; + Game.Upgrades['Ghostly biscuit'].descFunc=function(){return '
'+Game.listTinyOwnedUpgrades(Game.halloweenDrops)+'

'+(EN?('You\'ve purchased '+Game.GetHowManyHalloweenDrops()+'/'+Game.halloweenDrops.length+' halloween cookies.'):loc("Seasonal cookies purchased: %1.",Game.GetHowManyHalloweenDrops()+'/'+Game.halloweenDrops.length))+'
'+Game.saySeasonSwitchUses()+'
'+this.ddesc;}; + Game.Upgrades['Lovesick biscuit'].descFunc=function(){return '
'+Game.listTinyOwnedUpgrades(Game.heartDrops)+'

'+(EN?('You\'ve purchased '+Game.GetHowManyHeartDrops()+'/'+Game.heartDrops.length+' heart biscuits.'):loc("Seasonal cookies purchased: %1.",Game.GetHowManyHeartDrops()+'/'+Game.heartDrops.length))+'
'+Game.saySeasonSwitchUses()+'
'+this.ddesc;}; + Game.Upgrades['Fool\'s biscuit'].descFunc=function(){return '
'+Game.saySeasonSwitchUses()+'
'+this.ddesc;}; + + Game.computeSeasonPrices=function() + { + for (var i in Game.seasons) + { + Game.seasons[i].triggerUpgrade.priceFunc=function(){ + var m=1; + if (Game.hasGod) + { + var godLvl=Game.hasGod('seasons'); + if (godLvl==1) m*=2; + else if (godLvl==2) m*=1.50; + else if (godLvl==3) m*=1.25; + } + //return Game.seasonTriggerBasePrice*Math.pow(2,Game.seasonUses)*m; + //return Game.cookiesPs*60*Math.pow(1.5,Game.seasonUses)*m; + return Game.seasonTriggerBasePrice+Game.unbuffedCps*60*Math.pow(1.5,Game.seasonUses)*m; + } + } + } + Game.computeSeasons=function() + { + for (var i in Game.seasons) + { + var me=Game.Upgrades[Game.seasons[i].trigger]; + Game.seasons[i].triggerUpgrade=me; + me.pool='toggle'; + me.buyFunction=function() + { + Game.seasonUses+=1; + Game.computeSeasonPrices(); + //Game.Lock(this.name); + for (var i in Game.seasons) + { + var me=Game.Upgrades[Game.seasons[i].trigger]; + if (me.name!=this.name) {Game.Lock(me.name);Game.Unlock(me.name);} + } + if (Game.season!='' && Game.season!=this.season) + { + Game.Notify(Game.seasons[Game.season].over+'
','',Game.seasons[Game.season].triggerUpgrade.icon,4); + } + Game.season=this.season; + Game.seasonT=Game.getSeasonDuration(); + Game.storeToRefresh=1; + Game.upgradesToRebuild=1; + Game.Objects['Grandma'].redraw(); + Game.Notify(Game.seasons[this.season].start+'
','',this.icon,4); + } + + me.clickFunction=function(me){return function() + { + //undo season + if (me.bought && Game.season && me==Game.seasons[Game.season].triggerUpgrade) + { + me.lose(); + Game.Notify(Game.seasons[Game.season].over,'',Game.seasons[Game.season].triggerUpgrade.icon); + if (Game.Has('Season switcher')) {Game.Unlock(Game.seasons[Game.season].trigger);Game.seasons[Game.season].triggerUpgrade.bought=0;} + + Game.upgradesToRebuild=1; + Game.recalculateGains=1; + Game.season=Game.baseSeason; + Game.seasonT=-1; + PlaySound('snd/tick.mp3'); + return false; + } + else return true; + };}(me); + + me.displayFuncWhenOwned=function(){return '
'+loc("Time remaining:")+'
'+(Game.Has('Eternal seasons')?loc("forever"):Game.sayTime(Game.seasonT,-1))+'
('+loc("Click again to cancel season")+')
';} + me.timerDisplay=function(upgrade){return function(){if (!Game.Upgrades[upgrade.name].bought || Game.Has('Eternal seasons')) return -1; else return 1-Game.seasonT/Game.getSeasonDuration();}}(me); + + } + } + Game.getSeasonDuration=function(){return Game.fps*60*60*24;} + Game.computeSeasons(); + + //alert untiered building upgrades + for (var i in Game.Upgrades) + { + var me=Game.Upgrades[i]; + if (me.order>=200 && me.order<2000 && !me.tier && me.name.indexOf('grandma')==-1 && me.pool!='prestige') console.log(me.name+' has no tier.'); + } + + Game.UpgradesByPool={'kitten':[]}; + for (var i in Game.Upgrades) + { + if (!Game.UpgradesByPool[Game.Upgrades[i].pool]) Game.UpgradesByPool[Game.Upgrades[i].pool]=[]; + Game.UpgradesByPool[Game.Upgrades[i].pool].push(Game.Upgrades[i]); + if (Game.Upgrades[i].kitten) Game.UpgradesByPool['kitten'].push(Game.Upgrades[i]); + } + + Game.PrestigeUpgrades=[]; + for (var i in Game.Upgrades) + { + if (Game.Upgrades[i].pool=='prestige' || Game.Upgrades[i].pool=='prestigeDecor') + { + Game.PrestigeUpgrades.push(Game.Upgrades[i]); + if (Game.Upgrades[i].posX || Game.Upgrades[i].posY) Game.Upgrades[i].placedByCode=true; + else {Game.Upgrades[i].posX=0;Game.Upgrades[i].posY=0;} + if (Game.Upgrades[i].parents.length==0 && Game.Upgrades[i].name!='Legacy') Game.Upgrades[i].parents=['Legacy']; + for (var ii in Game.Upgrades[i].parents) {Game.Upgrades[i].parents[ii]=Game.Upgrades[Game.Upgrades[i].parents[ii]];} + } + } + + Game.goldenCookieUpgrades=['Get lucky','Lucky day','Serendipity','Heavenly luck','Lasting fortune','Decisive fate','Lucky digit','Lucky number','Lucky payout','Golden goose egg']; + + Game.cookieUpgrades=[]; + for (var i in Game.Upgrades) + { + var me=Game.Upgrades[i]; + if ((me.pool=='cookie' || me.pseudoCookie)) Game.cookieUpgrades.push(me); + if (me.tier) Game.Tiers[me.tier].upgrades.push(me); + } + for (var i in Game.UnlockAt){Game.Upgrades[Game.UnlockAt[i].name].unlockAt=Game.UnlockAt[i];} + for (var i in Game.Upgrades) + { + if (Game.Upgrades[i].pool=='prestige') + { + Game.Upgrades[i].order=Game.Upgrades[i].id; + if (Game.Upgrades[i].parents[0] && Game.Upgrades[i].id>Game.Upgrades[i].parents[0].id) Game.Upgrades[i].order=Game.Upgrades[i].parents[0].order+0.001; + } + } + + /*var oldPrestigePrices={"Chimera":5764801,"Synergies Vol. I":2525,"Synergies Vol. II":252525,"Label printer":9999}; + for (var i in oldPrestigePrices){Game.Upgrades[i].basePrice=oldPrestigePrices[i];}*/ + + Game.UpgradePositions={141:[118,-42],181:[-645,-99],253:[-240,-239],254:[-45,-237],255:[-142,-278],264:[61,94],265:[188,178],266:[339,191],267:[479,131],268:[573,12],269:[-745,23],270:[-546,-222],271:[-767,-199],272:[-661,-257],273:[-803,-84],274:[268,-327],275:[315,-437],276:[331,-560],277:[337,-684],278:[334,-808],279:[318,-934],280:[294,-1058],281:[194,-230],282:[-365,128],283:[-448,261],284:[-398,409],285:[-253,466],286:[-494,529],287:[-342,596],288:[-239,-386],289:[-392,-465],290:[-127,-415],291:[479,-739],292:[-486,-609],293:[-498,-781],323:[-86,109],325:[190,-1177],326:[-281,-141],327:[-265,283],328:[19,247],329:[42,402],353:[119,-328],354:[75,-439],355:[60,-562],356:[51,-685],357:[47,-808],358:[62,-934],359:[90,-1058],360:[25,568],362:[150,335],363:[-30,-30],364:[-320,-636],365:[-123,423],368:[-55,-527],393:[194,-702],394:[193,-946],395:[-143,-140],396:[-244,-897],397:[-173,606],408:[-202,-1072],409:[-49,-1206],410:[66,-1344],411:[-534,96],412:[-633,240],413:[-568,402],449:[-386,-1161],450:[-293,-1255],451:[-163,-1272],495:[-417,-997],496:[200,49],505:[411,-94],520:[-317,-26],537:[-870,-287],539:[-532,-1166],540:[-598,-1328],541:[-693,-1234],542:[-465,-1327],561:[298,-21],562:[-42,792],591:[148,844],592:[-157,902],643:[-293,770],646:[485,-882],647:[-118,248],717:[621,-676],718:[618,-537],719:[-225,-520],720:[-150,-631],801:[-310,945],802:[-466,911],803:[-588,809],804:[328,374],805:[211,522],819:[-418,-126],}; + + for (var i in Game.UpgradePositions) {Game.UpgradesById[i].posX=Game.UpgradePositions[i][0];Game.UpgradesById[i].posY=Game.UpgradePositions[i][1];} + + + /*===================================================================================== + ACHIEVEMENTS + =======================================================================================*/ + Game.Achievements={}; + Game.AchievementsById={}; + Game.AchievementsN=0; + Game.AchievementsOwned=0; + Game.Achievement=function(name,desc,icon) + { + this.id=Game.AchievementsN; + this.name=name; + this.dname=this.name; + this.desc=desc; + this.baseDesc=this.desc; + this.icon=icon; + this.won=0; + this.disabled=0; + this.order=this.id; + if (order) this.order=order+this.id*0.001; + this.pool='normal'; + this.vanilla=Game.vanilla; + this.type='achievement'; + + this.click=function() + { + if (this.clickFunction) this.clickFunction(); + } + Game.last=this; + Game.Achievements[this.name]=this; + Game.AchievementsById[this.id]=this; + Game.AchievementsN++; + return this; + } + Game.Achievement.prototype.getType=function(){return 'Achievement';} + + Game.Win=function(what) + { + if (typeof what==='string') + { + if (Game.Achievements[what]) + { + var it=Game.Achievements[what]; + if (it.won==0) + { + var name=it.shortName?it.shortName:it.dname; + it.won=1; + Game.Notify(loc("Achievement unlocked"),'
'+name+'
',it.icon); + Game.NotifyTooltip('function(){return Game.crateTooltip(Game.AchievementsById['+it.id+']);}'); + if (Game.CountsAsAchievementOwned(it.pool)) Game.AchievementsOwned++; + Game.recalculateGains=1; + if (App && it.vanilla) App.gotAchiev(it.id); + } + } + } + else {for (var i in what) {Game.Win(what[i]);}} + } + Game.RemoveAchiev=function(what) + { + if (Game.Achievements[what]) + { + if (Game.Achievements[what].won==1) + { + Game.Achievements[what].won=0; + if (Game.CountsAsAchievementOwned(Game.Achievements[what].pool)) Game.AchievementsOwned--; + Game.recalculateGains=1; + } + } + } + Game.Achievement.prototype.toggle=function()//cheating only + { + if (!this.won) + { + Game.Win(this.name); + } + else + { + Game.RemoveAchiev(this.name); + } + if (Game.onMenu=='stats') Game.UpdateMenu(); + } + + Game.CountsAsAchievementOwned=function(pool) + { + if (pool=='' || pool=='normal') return true; else return false; + } + + Game.HasAchiev=function(what) + { + return (Game.Achievements[what]?Game.Achievements[what].won:0); + } + + Game.TieredAchievement=function(name,desc,building,tier) + { + var achiev=new Game.Achievement(name,loc("Have %1.",loc("%1 "+Game.Objects[building].bsingle,LBeautify(Game.Tiers[tier].achievUnlock)))+desc,Game.GetIcon(building,tier)); + Game.SetTier(building,tier); + return achiev; + } + + Game.ProductionAchievement=function(name,building,tier,q,mult) + { + var building=Game.Objects[building]; + var icon=[building.iconColumn,22]; + var n=12+building.n+(mult||0); + if (tier==2) {icon[1]=23;n+=7;} + else if (tier==3) {icon[1]=24;n+=14;} + var pow=Math.pow(10,n); + var achiev=new Game.Achievement(name,loc("Make %1 just from %2.",[loc("%1 cookie",{n:pow,b:toFixed(pow)}),building.plural])+(q?''+q+'':''),icon); + building.productionAchievs.push({pow:pow,achiev:achiev}); + return achiev; + } + + Game.thresholdIcons=[0,1,2,3,4,5,6,7,8,9,10,11,18,19,20,21,22,23,24,25,26,27,28,29,21,22,23,24,25,26,27,28,29,21,22,23,24,25,26,27,28,29,30,31,30,31,21,22]; + Game.BankAchievements=[]; + Game.BankAchievement=function(name,q) + { + var threshold=Math.pow(10,Math.floor(Game.BankAchievements.length*1.5+2)); + if (Game.BankAchievements.length==0) threshold=1; + var achiev=new Game.Achievement(name,loc("Bake %1 in one ascension.",loc("%1 cookie",{n:threshold,b:toFixed(threshold)}))+(q?(''+q+''):''),[Game.thresholdIcons[Game.BankAchievements.length],(Game.BankAchievements.length>45?0:Game.BankAchievements.length>43?2:Game.BankAchievements.length>32?1:Game.BankAchievements.length>23?2:5)]); + achiev.threshold=threshold; + achiev.order=100+Game.BankAchievements.length*0.01; + Game.BankAchievements.push(achiev); + return achiev; + } + Game.CpsAchievements=[]; + Game.CpsAchievement=function(name,q) + { + var threshold=Math.pow(10,Math.floor(Game.CpsAchievements.length*1.2)); + //if (Game.CpsAchievements.length==0) threshold=1; + var achiev=new Game.Achievement(name,loc("Bake %1 per second.",loc("%1 cookie",{n:threshold,b:toFixed(threshold)}))+(q?(''+q+''):''),[Game.thresholdIcons[Game.CpsAchievements.length],(Game.CpsAchievements.length>45?0:Game.CpsAchievements.length>43?2:Game.CpsAchievements.length>32?1:Game.CpsAchievements.length>23?2:5)]); + achiev.threshold=threshold; + achiev.order=200+Game.CpsAchievements.length*0.01; + Game.CpsAchievements.push(achiev); + return achiev; + } + + //define achievements + //WARNING : do NOT add new achievements in between, this breaks the saves. Add them at the end ! + + var order=0;//this is used to set the order in which the items are listed + + Game.BankAchievement('Wake and bake'); + Game.BankAchievement('Making some dough'); + Game.BankAchievement('So baked right now'); + Game.BankAchievement('Fledgling bakery'); + Game.BankAchievement('Affluent bakery'); + Game.BankAchievement('World-famous bakery'); + Game.BankAchievement('Cosmic bakery'); + Game.BankAchievement('Galactic bakery'); + Game.BankAchievement('Universal bakery'); + Game.BankAchievement('Timeless bakery'); + Game.BankAchievement('Infinite bakery'); + Game.BankAchievement('Immortal bakery'); + Game.BankAchievement('Don\'t stop me now'); + Game.BankAchievement('You can stop now'); + Game.BankAchievement('Cookies all the way down'); + Game.BankAchievement('Overdose'); + + Game.CpsAchievement('Casual baking'); + Game.CpsAchievement('Hardcore baking'); + Game.CpsAchievement('Steady tasty stream'); + Game.CpsAchievement('Cookie monster'); + Game.CpsAchievement('Mass producer'); + Game.CpsAchievement('Cookie vortex'); + Game.CpsAchievement('Cookie pulsar'); + Game.CpsAchievement('Cookie quasar'); + Game.CpsAchievement('Oh hey, you\'re still here'); + Game.CpsAchievement('Let\'s never bake again'); + + order=30010; + new Game.Achievement('Sacrifice',loc("Ascend with %1 baked.",loc("%1 cookie",LBeautify(1e6)))+'Easy come, easy go.',[11,6]); + new Game.Achievement('Oblivion',loc("Ascend with %1 baked.",loc("%1 cookie",LBeautify(1e9)))+'Back to square one.',[11,6]); + new Game.Achievement('From scratch',loc("Ascend with %1 baked.",loc("%1 cookie",LBeautify(1e12)))+'It\'s been fun.',[11,6]); + + order=11010; + new Game.Achievement('Neverclick',loc("Make %1 by only having clicked %2 times.",[loc("%1 cookie",LBeautify(1e6)),15]),[12,0]);//Game.last.pool='shadow'; + order=1000; + new Game.Achievement('Clicktastic',loc("Make %1 from clicking.",loc("%1 cookie",LBeautify(1e3))),[11,0]); + new Game.Achievement('Clickathlon',loc("Make %1 from clicking.",loc("%1 cookie",LBeautify(1e5))),[11,1]); + new Game.Achievement('Clickolympics',loc("Make %1 from clicking.",loc("%1 cookie",LBeautify(1e7))),[11,2]); + new Game.Achievement('Clickorama',loc("Make %1 from clicking.",loc("%1 cookie",LBeautify(1e9))),[11,13]); + + order=1050; + new Game.Achievement('Click',loc("Have %1.",loc("%1 cursor",LBeautify(1))),[0,0]); + new Game.Achievement('Double-click',loc("Have %1.",loc("%1 cursor",LBeautify(2))),[0,6]); + new Game.Achievement('Mouse wheel',loc("Have %1.",loc("%1 cursor",LBeautify(50))),[1,6]); + new Game.Achievement('Of Mice and Men',loc("Have %1.",loc("%1 cursor",LBeautify(100))),[0,1]); + new Game.Achievement('The Digital',loc("Have %1.",loc("%1 cursor",LBeautify(200))),[0,2]); + + order=1098; + new Game.Achievement('Just wrong',loc("Sell a grandma.")+'I thought you loved me.',[10,9]); + order=1100; + Game.TieredAchievement('Grandma\'s cookies','','Grandma',1); + Game.TieredAchievement('Sloppy kisses','','Grandma',2); + Game.TieredAchievement('Retirement home','','Grandma',3); + + order=1200; + Game.TieredAchievement('Bought the farm','','Farm',1); + Game.TieredAchievement('Reap what you sow','','Farm',2); + Game.TieredAchievement('Farm ill','','Farm',3); + + order=1400; + Game.TieredAchievement('Production chain','','Factory',1); + Game.TieredAchievement('Industrial revolution','','Factory',2); + Game.TieredAchievement('Global warming','','Factory',3); + + order=1300; + Game.TieredAchievement('You know the drill','','Mine',1); + Game.TieredAchievement('Excavation site','','Mine',2); + Game.TieredAchievement('Hollow the planet','','Mine',3); + + order=1500; + Game.TieredAchievement('Expedition','','Shipment',1); + Game.TieredAchievement('Galactic highway','','Shipment',2); + Game.TieredAchievement('Far far away','','Shipment',3); + + order=1600; + Game.TieredAchievement('Transmutation','','Alchemy lab',1); + Game.TieredAchievement('Transmogrification','','Alchemy lab',2); + Game.TieredAchievement('Gold member','','Alchemy lab',3); + + order=1700; + Game.TieredAchievement('A whole new world','','Portal',1); + Game.TieredAchievement('Now you\'re thinking','','Portal',2); + Game.TieredAchievement('Dimensional shift','','Portal',3); + + order=1800; + Game.TieredAchievement('Time warp','','Time machine',1); + Game.TieredAchievement('Alternate timeline','','Time machine',2); + Game.TieredAchievement('Rewriting history','','Time machine',3); + + + order=7000; + new Game.Achievement('One with everything',loc("Have at least %1 of every building.",1),[2,7]); + new Game.Achievement('Mathematician',loc("Have at least 1 of the most expensive object, 2 of the second-most expensive, 4 of the next and so on (capped at %1).",128),[23,12]); + new Game.Achievement('Base 10',loc("Have at least 10 of the most expensive object, 20 of the second-most expensive, 30 of the next and so on."),[23,12]); + + order=10000; + new Game.Achievement('Golden cookie',loc("Click a golden cookie."),[10,14]); + new Game.Achievement('Lucky cookie',loc("Click %1.",loc("%1 golden cookie",LBeautify(7))),[22,6]); + new Game.Achievement('A stroke of luck',loc("Click %1.",loc("%1 golden cookie",LBeautify(27))),[23,6]); + + order=30200; + new Game.Achievement('Cheated cookies taste awful',loc("Hack in some cookies."),[10,6]);Game.last.pool='shadow'; + order=11010; + new Game.Achievement('Uncanny clicker',loc("Click really, really fast.")+'Well I\'ll be!',[12,0]); + + order=5000; + new Game.Achievement('Builder',loc("Own %1.",loc("%1 building",LBeautify(100))),[2,6]); + new Game.Achievement('Architect',loc("Own %1.",loc("%1 building",LBeautify(500))),[3,6]); + order=6000; + new Game.Achievement('Enhancer',loc("Purchase %1.",loc("%1 upgrade",LBeautify(20))),[9,0]); + new Game.Achievement('Augmenter',loc("Purchase %1.",loc("%1 upgrade",LBeautify(50))),[9,1]); + + order=11000; + new Game.Achievement('Cookie-dunker',loc("Dunk the cookie.")+'You did it!',[1,8]); + + order=10000; + new Game.Achievement('Fortune',loc("Click %1.",loc("%1 golden cookie",LBeautify(77)))+'You should really go to bed.',[24,6]); + order=31000; + new Game.Achievement('True Neverclick',loc("Make %1 with no cookie clicks.",loc("%1 cookie",LBeautify(1e6)))+'This kinda defeats the whole purpose, doesn\'t it?',[12,0]);Game.last.pool='shadow'; + + order=20000; + new Game.Achievement('Elder nap',loc("Appease the grandmatriarchs at least once.")+'we
are
eternal
',[8,9]); + new Game.Achievement('Elder slumber',loc("Appease the grandmatriarchs at least %1 times.",5)+'our mind
outlives
the universe
',[8,9]); + + order=1098; + new Game.Achievement('Elder',loc("Own at least %1 grandma types.",7),[10,9]); + + order=20000; + new Game.Achievement('Elder calm',loc("Declare a covenant with the grandmatriarchs.")+'we
have
fed
',[8,9]); + + order=5000; + new Game.Achievement('Engineer',loc("Own %1.",loc("%1 building",LBeautify(1000))),[4,6]); + + order=10000; + new Game.Achievement('Leprechaun',loc("Click %1.",loc("%1 golden cookie",LBeautify(777))),[25,6]); + new Game.Achievement('Black cat\'s paw',loc("Click %1.",loc("%1 golden cookie",LBeautify(7777))),[26,6]); + + order=30050; + new Game.Achievement('Nihilism',loc("Ascend with %1 baked.",loc("%1 cookie",LBeautify(1e15)))+'There are many things
that need to be erased
',[11,7]); + + order=1900; + Game.TieredAchievement('Antibatter','','Antimatter condenser',1); + Game.TieredAchievement('Quirky quarks','','Antimatter condenser',2); + Game.TieredAchievement('It does matter!','','Antimatter condenser',3); + + order=6000; + new Game.Achievement('Upgrader',loc("Purchase %1.",loc("%1 upgrade",LBeautify(100))),[9,2]); + + order=7000; + new Game.Achievement('Centennial',loc("Have at least %1 of everything.",100),[6,6]); + + order=30500; + new Game.Achievement('Hardcore',loc("Get to %1 baked with no upgrades purchased.",loc("%1 cookie",LBeautify(1e9))),[12,6]);//Game.last.pool='shadow'; + + order=30600; + new Game.Achievement('Speed baking I',loc("Get to %1 baked in %2.",[loc("%1 cookie",LBeautify(1e6)),Game.sayTime(60*35*Game.fps)]),[12,5]);Game.last.pool='shadow'; + new Game.Achievement('Speed baking II',loc("Get to %1 baked in %2.",[loc("%1 cookie",LBeautify(1e6)),Game.sayTime(60*25*Game.fps)]),[13,5]);Game.last.pool='shadow'; + new Game.Achievement('Speed baking III',loc("Get to %1 baked in %2.",[loc("%1 cookie",LBeautify(1e6)),Game.sayTime(60*15*Game.fps)]),[14,5]);Game.last.pool='shadow'; + + + order=61000; + var achiev=new Game.Achievement('Getting even with the oven',EN?'Defeat the Sentient Furnace in the factory dungeons.':'???',[12,7]);Game.last.pool='dungeon'; + var achiev=new Game.Achievement('Now this is pod-smashing',EN?'Defeat the Ascended Baking Pod in the factory dungeons.':'???',[12,7]);Game.last.pool='dungeon'; + var achiev=new Game.Achievement('Chirped out',EN?'Find and defeat Chirpy, the dysfunctionning alarm bot.':'???',[13,7]);Game.last.pool='dungeon'; + var achiev=new Game.Achievement('Follow the white rabbit',EN?'Find and defeat the elusive sugar bunny.':'???',[14,7]);Game.last.pool='dungeon'; + + order=1000; + new Game.Achievement('Clickasmic',loc("Make %1 from clicking.",loc("%1 cookie",LBeautify(1e11))),[11,14]); + + order=1100; + Game.TieredAchievement('Friend of the ancients','','Grandma',4); + Game.TieredAchievement('Ruler of the ancients','','Grandma',5); + + order=32000; + new Game.Achievement('Wholesome',loc("Unlock 100% of your heavenly chips power."),[15,7]); + + order=33000; + new Game.Achievement('Just plain lucky',loc("You have 1 chance in %1 every second of earning this achievement.",Beautify(1000000)),[15,6]);Game.last.pool='shadow'; + + order=21000; + new Game.Achievement('Itchscratcher',loc("Burst 1 wrinkler."),[19,8]); + new Game.Achievement('Wrinklesquisher',loc("Burst %1 wrinklers.",50),[19,8]); + new Game.Achievement('Moistburster',loc("Burst %1 wrinklers.",200),[19,8]); + + order=22000; + new Game.Achievement('Spooky cookies',loc("Unlock every Halloween-themed cookie.
Owning this achievement makes Halloween-themed cookies drop more frequently in future playthroughs."),[12,8]); + + order=22100; + new Game.Achievement('Coming to town',loc("Reach Santa's 7th form."),[18,9]); + new Game.Achievement('All hail Santa',loc("Reach Santa's final form."),[19,10]); + new Game.Achievement('Let it snow',loc("Unlock every Christmas-themed cookie.
Owning this achievement makes Christmas-themed cookies drop more frequently in future playthroughs."),[19,9]); + new Game.Achievement('Oh deer',loc("Pop 1 reindeer."),[12,9]); + new Game.Achievement('Sleigh of hand',loc("Pop %1 reindeer.",50),[12,9]); + new Game.Achievement('Reindeer sleigher',loc("Pop %1 reindeer.",200),[12,9]); + + order=1200; + Game.TieredAchievement('Perfected agriculture','','Farm',4); + order=1400; + Game.TieredAchievement('Ultimate automation','','Factory',4); + order=1300; + Game.TieredAchievement('Can you dig it','','Mine',4); + order=1500; + Game.TieredAchievement('Type II civilization','','Shipment',4); + order=1600; + Game.TieredAchievement('Gild wars','','Alchemy lab',4); + order=1700; + Game.TieredAchievement('Brain-split','','Portal',4); + order=1800; + Game.TieredAchievement('Time duke','','Time machine',4); + order=1900; + Game.TieredAchievement('Molecular maestro','','Antimatter condenser',4); + + order=2000; + Game.TieredAchievement('Lone photon','','Prism',1); + Game.TieredAchievement('Dazzling glimmer','','Prism',2); + Game.TieredAchievement('Blinding flash','','Prism',3); + Game.TieredAchievement('Unending glow','','Prism',4); + + order=5000; + new Game.Achievement('Lord of Constructs',loc("Own %1.",loc("%1 building",LBeautify(2500)))+'He saw the vast plains stretching ahead of him, and he said : let there be civilization.',[5,6]); + order=6000; + new Game.Achievement('Lord of Progress',loc("Purchase %1.",loc("%1 upgrade",LBeautify(200)))+'One can always do better. But should you?',[9,14]); + order=7002; + new Game.Achievement('Bicentennial',loc("Have at least %1 of everything.",200)+'You crazy person.',[8,6]); + + order=22300; + new Game.Achievement('Lovely cookies',loc("Unlock every Valentine-themed cookie."),[20,3]); + + order=7001; + new Game.Achievement('Centennial and a half',loc("Have at least %1 of everything.",150),[7,6]); + + order=11000; + new Game.Achievement('Tiny cookie',loc("Click the tiny cookie.")+'These aren\'t the cookies you\'re clicking for.',[0,5]); + + order=400000; + new Game.Achievement('You win a cookie',loc("This is for baking %1 and making it on the local news.",loc("%1 cookie",LBeautify(1e14)))+'We\'re all so proud of you.',[10,0]); + + order=1070; + Game.ProductionAchievement('Click delegator','Cursor',1,0,7); + order=1120; + Game.ProductionAchievement('Gushing grannies','Grandma',1,0,6); + order=1220; + Game.ProductionAchievement('I hate manure','Farm',1); + order=1320; + Game.ProductionAchievement('Never dig down','Mine',1); + order=1420; + Game.ProductionAchievement('The incredible machine','Factory',1); + order=1520; + Game.ProductionAchievement('And beyond','Shipment',1); + order=1620; + Game.ProductionAchievement('Magnum Opus','Alchemy lab',1); + order=1720; + Game.ProductionAchievement('With strange eons','Portal',1); + order=1820; + Game.ProductionAchievement('Spacetime jigamaroo','Time machine',1); + order=1920; + Game.ProductionAchievement('Supermassive','Antimatter condenser',1); + order=2020; + Game.ProductionAchievement('Praise the sun','Prism',1); + + + order=1000; + new Game.Achievement('Clickageddon',loc("Make %1 from clicking.",loc("%1 cookie",LBeautify(1e13))),[11,15]); + new Game.Achievement('Clicknarok',loc("Make %1 from clicking.",loc("%1 cookie",LBeautify(1e15))),[11,16]); + + order=1050; + new Game.Achievement('Extreme polydactyly',loc("Have %1.",loc("%1 cursor",LBeautify(300))),[0,13]); + new Game.Achievement('Dr. T',loc("Have %1.",loc("%1 cursor",LBeautify(400))),[0,14]); + + order=1100;Game.TieredAchievement('The old never bothered me anyway','','Grandma',6); + order=1200;Game.TieredAchievement('Homegrown','','Farm',5); + order=1400;Game.TieredAchievement('Technocracy','','Factory',5); + order=1300;Game.TieredAchievement('The center of the Earth','','Mine',5); + order=1500;Game.TieredAchievement('We come in peace','','Shipment',5); + order=1600;Game.TieredAchievement('The secrets of the universe','','Alchemy lab',5); + order=1700;Game.TieredAchievement('Realm of the Mad God','','Portal',5); + order=1800;Game.TieredAchievement('Forever and ever','','Time machine',5); + order=1900;Game.TieredAchievement('Walk the planck','','Antimatter condenser',5); + order=2000;Game.TieredAchievement('Rise and shine','','Prism',5); + + order=30200; + new Game.Achievement('God complex',loc("Name yourself Orteil.
Note: usurpers incur a -%1% CpS penalty until they rename themselves something else.
",1)+'But that\'s not you, is it?',[17,5]);Game.last.pool='shadow'; + new Game.Achievement('Third-party',loc("Use an add-on.")+'Some find vanilla to be the most boring flavor.',[16,5]);Game.last.pool='shadow';//if you're making a mod, add a Game.Win('Third-party') somewhere in there! + + order=30050; + new Game.Achievement('Dematerialize',loc("Ascend with %1 baked.",loc("%1 cookie",LBeautify(1e18)))+'Presto!
...where\'d the cookies go?
',[11,7]); + new Game.Achievement('Nil zero zilch',loc("Ascend with %1 baked.",loc("%1 cookie",LBeautify(1e21)))+'To summarize : really not very much at all.',[11,7]); + new Game.Achievement('Transcendence',loc("Ascend with %1 baked.",loc("%1 cookie",LBeautify(1e24)))+'Your cookies are now on a higher plane of being.',[11,8]); + new Game.Achievement('Obliterate',loc("Ascend with %1 baked.",loc("%1 cookie",LBeautify(1e27)))+'Resistance is futile, albeit entertaining.',[11,8]); + new Game.Achievement('Negative void',loc("Ascend with %1 baked.",loc("%1 cookie",LBeautify(1e30)))+'You now have so few cookies that it\'s almost like you have a negative amount of them.',[11,8]); + + order=22400; + new Game.Achievement('The hunt is on',loc("Unlock 1 egg."),[1,12]); + new Game.Achievement('Egging on',loc("Unlock %1 eggs.",7),[4,12]); + new Game.Achievement('Mass Easteria',loc("Unlock %1 eggs.",14),[7,12]); + new Game.Achievement('Hide & seek champion',loc("Unlock all the eggs.
Owning this achievement makes eggs drop more frequently in future playthroughs."),[13,12]); + + order=11000; + new Game.Achievement('What\'s in a name',loc("Give your bakery a name."),[15,9]); + + + order=1425; + Game.TieredAchievement('Pretty penny','','Bank',1); + Game.TieredAchievement('Fit the bill','','Bank',2); + Game.TieredAchievement('A loan in the dark','','Bank',3); + Game.TieredAchievement('Need for greed','','Bank',4); + Game.TieredAchievement('It\'s the economy, stupid','','Bank',5); + order=1450; + Game.TieredAchievement('Your time to shrine','','Temple',1); + Game.TieredAchievement('Shady sect','','Temple',2); + Game.TieredAchievement('New-age cult','','Temple',3); + Game.TieredAchievement('Organized religion','','Temple',4); + Game.TieredAchievement('Fanaticism','','Temple',5); + order=1475; + Game.TieredAchievement('Bewitched','','Wizard tower',1); + Game.TieredAchievement('The sorcerer\'s apprentice','','Wizard tower',2); + Game.TieredAchievement('Charms and enchantments','','Wizard tower',3); + Game.TieredAchievement('Curses and maledictions','','Wizard tower',4); + Game.TieredAchievement('Magic kingdom','','Wizard tower',5); + + order=1445; + Game.ProductionAchievement('Vested interest','Bank',1); + order=1470; + Game.ProductionAchievement('New world order','Temple',1); + order=1495; + Game.ProductionAchievement('Hocus pocus','Wizard tower',1); + + + + order=1070; + Game.ProductionAchievement('Finger clickin\' good','Cursor',2,0,7); + order=1120; + Game.ProductionAchievement('Panic at the bingo','Grandma',2,0,6); + order=1220; + Game.ProductionAchievement('Rake in the dough','Farm',2); + order=1320; + Game.ProductionAchievement('Quarry on','Mine',2); + order=1420; + Game.ProductionAchievement('Yes I love technology','Factory',2); + order=1445; + Game.ProductionAchievement('Paid in full','Bank',2); + order=1470; + Game.ProductionAchievement('Church of Cookiology','Temple',2); + order=1495; + Game.ProductionAchievement('Too many rabbits, not enough hats','Wizard tower',2); + order=1520; + Game.ProductionAchievement('The most precious cargo','Shipment',2); + order=1620; + Game.ProductionAchievement('The Aureate','Alchemy lab',2); + order=1720; + Game.ProductionAchievement('Ever more hideous','Portal',2); + order=1820; + Game.ProductionAchievement('Be kind, rewind','Time machine',2); + order=1920; + Game.ProductionAchievement('Infinitesimal','Antimatter condenser',2); + order=2020; + Game.ProductionAchievement('A still more glorious dawn','Prism',2); + + order=30000; + new Game.Achievement('Rebirth',loc("Ascend at least once."),[21,6]); + + order=11000; + new Game.Achievement('Here you go',loc("Click this achievement's slot.")+'All you had to do was ask.',[1,7]);Game.last.clickFunction=function(){if (!Game.HasAchiev('Here you go')){PlaySound('snd/tick.mp3');Game.Win('Here you go');}}; + + order=30000; + new Game.Achievement('Resurrection',loc("Ascend %1 times.",10),[21,6]); + new Game.Achievement('Reincarnation',loc("Ascend %1 times.",100),[21,6]); + new Game.Achievement('Endless cycle',loc("Ascend %1 times.",1000)+'Oh hey, it\'s you again.',[2,7]);Game.last.pool='shadow'; + + + + order=1100; + Game.TieredAchievement('The agemaster','','Grandma',7); + Game.TieredAchievement('To oldly go','','Grandma',8); + + order=1200;Game.TieredAchievement('Gardener extraordinaire','','Farm',6); + order=1300;Game.TieredAchievement('Tectonic ambassador','','Mine',6); + order=1400;Game.TieredAchievement('Rise of the machines','','Factory',6); + order=1425;Game.TieredAchievement('Acquire currency','','Bank',6); + order=1450;Game.TieredAchievement('Zealotry','','Temple',6); + order=1475;Game.TieredAchievement('The wizarding world','','Wizard tower',6); + order=1500;Game.TieredAchievement('Parsec-masher','','Shipment',6); + order=1600;Game.TieredAchievement('The work of a lifetime','','Alchemy lab',6); + order=1700;Game.TieredAchievement('A place lost in time','','Portal',6); + order=1800;Game.TieredAchievement('Heat death','','Time machine',6); + order=1900;Game.TieredAchievement('Microcosm','','Antimatter condenser',6); + order=2000;Game.TieredAchievement('Bright future','','Prism',6); + + order=25000; + new Game.Achievement('Here be dragon',loc("Complete your dragon's training."),[21,12]); + + Game.BankAchievement('How?'); + Game.BankAchievement('The land of milk and cookies'); + Game.BankAchievement('He who controls the cookies controls the universe','The milk must flow!'); + Game.BankAchievement('Tonight on Hoarders'); + Game.BankAchievement('Are you gonna eat all that?'); + Game.BankAchievement('We\'re gonna need a bigger bakery'); + Game.BankAchievement('In the mouth of madness','A cookie is just what we tell each other it is.'); + Game.BankAchievement('Brought to you by the letter
'); + + + Game.CpsAchievement('A world filled with cookies'); + Game.CpsAchievement('When this baby hits '+Beautify(10000000000000*60*60)+' cookies per hour'); + Game.CpsAchievement('Fast and delicious'); + Game.CpsAchievement('Cookiehertz : a really, really tasty hertz','Tastier than a hertz donut, anyway.'); + Game.CpsAchievement('Woops, you solved world hunger'); + Game.CpsAchievement('Turbopuns','Mother Nature will be like "slowwwww dowwwwwn".'); + Game.CpsAchievement('Faster menner'); + Game.CpsAchievement('And yet you\'re still hungry'); + Game.CpsAchievement('The Abakening'); + Game.CpsAchievement('There\'s really no hard limit to how long these achievement names can be and to be quite honest I\'m rather curious to see how far we can go.
Adolphus W. Green (1844–1917) started as the Principal of the Groton School in 1864. By 1865, he became second assistant librarian at the New York Mercantile Library; from 1867 to 1869, he was promoted to full librarian. From 1869 to 1873, he worked for Evarts, Southmayd & Choate, a law firm co-founded by William M. Evarts, Charles Ferdinand Southmayd and Joseph Hodges Choate. He was admitted to the New York State Bar Association in 1873.
Anyway, how\'s your day been?');//Game.last.shortName='There\'s really no hard limit to how long these achievement names can be and to be quite honest I\'m [...]'; + Game.CpsAchievement('Fast','Wow!'); + + order=7002; + new Game.Achievement('Bicentennial and a half',loc("Have at least %1 of everything.",250)+'Keep on truckin\'.',[9,6]); + + order=11000; + new Game.Achievement('Tabloid addiction',loc("Click on the news ticker %1 times.",50)+'Page 6: Mad individual clicks on picture of pastry in a futile attempt to escape boredom!
Also page 6: British parliament ate my baby!
',[27,7]); + + order=1000; + new Game.Achievement('Clickastrophe',loc("Make %1 from clicking.",loc("%1 cookie",LBeautify(1e17))),[11,17]); + new Game.Achievement('Clickataclysm',loc("Make %1 from clicking.",loc("%1 cookie",LBeautify(1e19))),[11,18]); + + order=1050; + new Game.Achievement('Thumbs, phalanges, metacarpals',loc("Have %1.",loc("%1 cursor",LBeautify(500)))+'& KNUCKLES',[0,15]); + + order=6002; + new Game.Achievement('Polymath',loc("Own %1 upgrades and %2 buildings.",[300,4000])+'Excellence doesn\'t happen overnight - it usually takes a good couple days.',[29,7]); + + order=1099; + new Game.Achievement('The elder scrolls',loc("Own a combined %1 %2 and %3.",[777,loc("grandmas"),loc("cursors")])+'Let me guess. Someone stole your cookie.',[10,9]); + + order=30050; + new Game.Achievement('To crumbs, you say?',loc("Ascend with %1 baked.",loc("%1 cookie",LBeautify(1e33)))+'Very well then.',[29,6]); + + order=1200;Game.TieredAchievement('Seedy business','','Farm',7); + order=1300;Game.TieredAchievement('Freak fracking','','Mine',7); + order=1400;Game.TieredAchievement('Modern times','','Factory',7); + order=1425;Game.TieredAchievement('The nerve of war','','Bank',7); + order=1450;Game.TieredAchievement('Wololo','','Temple',7); + order=1475;Game.TieredAchievement('And now for my next trick, I\'ll need a volunteer from the audience','','Wizard tower',7); + order=1500;Game.TieredAchievement('It\'s not delivery','','Shipment',7); + order=1600;Game.TieredAchievement('Gold, Jerry! Gold!','','Alchemy lab',7); + order=1700;Game.TieredAchievement('Forbidden zone','','Portal',7); + order=1800;Game.TieredAchievement('cookie clicker forever and forever a hundred years cookie clicker, all day long forever, forever a hundred times, over and over cookie clicker adventures dot com','','Time machine',7); + order=1900;Game.TieredAchievement('Scientists baffled everywhere','','Antimatter condenser',7); + order=2000;Game.TieredAchievement('Harmony of the spheres','','Prism',7); + + order=35000; + new Game.Achievement('Last Chance to See',loc("Burst the near-extinct shiny wrinkler.")+'You monster!',[24,12]);Game.last.pool='shadow'; + + order=10000; + new Game.Achievement('Early bird',loc("Click a golden cookie less than 1 second after it spawns."),[10,14]); + new Game.Achievement('Fading luck',loc("Click a golden cookie less than 1 second before it dies."),[10,14]); + + order=22100; + new Game.Achievement('Eldeer',loc("Pop a reindeer during an elder frenzy."),[12,9]); + + order=21100; + new Game.Achievement('Dude, sweet',loc("Harvest %1 coalescing sugar lumps.",7),[24,14]); + new Game.Achievement('Sugar rush',loc("Harvest %1 coalescing sugar lumps.",30),[26,14]); + new Game.Achievement('Year\'s worth of cavities',loc("Harvest %1 coalescing sugar lumps.",365)+'My lumps my lumps my lumps.',[29,14]); + new Game.Achievement('Hand-picked',loc("Successfully harvest a coalescing sugar lump before it's ripe."),[28,14]); + new Game.Achievement('Sugar sugar',loc("Harvest a bifurcated sugar lump."),[29,15]); + new Game.Achievement('All-natural cane sugar',loc("Harvest a golden sugar lump."),[29,16]);Game.last.pool='shadow'; + new Game.Achievement('Sweetmeats',loc("Harvest a meaty sugar lump."),[29,17]); + + order=7002; + new Game.Achievement('Tricentennial',loc("Have at least %1 of everything.",300)+'Can\'t stop, won\'t stop. Probably should stop, though.',[29,12]); + + Game.CpsAchievement('Knead for speed','How did we not make that one yet?'); + Game.CpsAchievement('Well the cookies start coming and they don\'t stop coming','Didn\'t make sense not to click for fun.'); + Game.CpsAchievement('I don\'t know if you\'ve noticed but all these icons are very slightly off-center'); + Game.CpsAchievement('The proof of the cookie is in the baking','How can you have any cookies if you don\'t bake your dough?'); + Game.CpsAchievement('If it\'s worth doing, it\'s worth overdoing'); + + Game.BankAchievement('The dreams in which I\'m baking are the best I\'ve ever had'); + Game.BankAchievement('Set for life'); + + order=1200;Game.TieredAchievement('You and the beanstalk','','Farm',8); + order=1300;Game.TieredAchievement('Romancing the stone','','Mine',8); + order=1400;Game.TieredAchievement('Ex machina','','Factory',8); + order=1425;Game.TieredAchievement('And I need it now','','Bank',8); + order=1450;Game.TieredAchievement('Pray on the weak','','Temple',8); + order=1475;Game.TieredAchievement('It\'s a kind of magic','','Wizard tower',8); + order=1500;Game.TieredAchievement('Make it so','','Shipment',8); + order=1600;Game.TieredAchievement('All that glitters is gold','','Alchemy lab',8); + order=1700;Game.TieredAchievement('H̸̷͓̳̳̯̟͕̟͍͍̣͡ḛ̢̦̰̺̮̝͖͖̘̪͉͘͡ ̠̦͕̤̪̝̥̰̠̫̖̣͙̬͘ͅC̨̦̺̩̲̥͉̭͚̜̻̝̣̼͙̮̯̪o̴̡͇̘͎̞̲͇̦̲͞͡m̸̩̺̝̣̹̱͚̬̥̫̳̼̞̘̯͘ͅẹ͇̺̜́̕͢s̶̙̟̱̥̮̯̰̦͓͇͖͖̝͘͘͞','','Portal',8); + order=1800;Game.TieredAchievement('Way back then','','Time machine',8); + order=1900;Game.TieredAchievement('Exotic matter','','Antimatter condenser',8); + order=2000;Game.TieredAchievement('At the end of the tunnel','','Prism',8); + + + + order=1070; + Game.ProductionAchievement('Click (starring Adam Sandler)','Cursor',3,0,7); + order=1120; + Game.ProductionAchievement('Frantiquities','Grandma',3,0,6); + order=1220; + Game.ProductionAchievement('Overgrowth','Farm',3); + order=1320; + Game.ProductionAchievement('Sedimentalism','Mine',3); + order=1420; + Game.ProductionAchievement('Labor of love','Factory',3); + order=1445; + Game.ProductionAchievement('Reverse funnel system','Bank',3); + order=1470; + Game.ProductionAchievement('Thus spoke you','Temple',3); + order=1495; + Game.ProductionAchievement('Manafest destiny','Wizard tower',3); + order=1520; + Game.ProductionAchievement('Neither snow nor rain nor heat nor gloom of night','Shipment',3); + order=1620; + Game.ProductionAchievement('I\'ve got the Midas touch','Alchemy lab',3); + order=1720; + Game.ProductionAchievement('Which eternal lie','Portal',3); + order=1820; + Game.ProductionAchievement('Déjà vu','Time machine',3); + order=1920; + Game.ProductionAchievement('Powers of Ten','Antimatter condenser',3); + order=2020; + Game.ProductionAchievement('Now the dark days are gone','Prism',3); + + order=1070; + new Game.Achievement('Freaky jazz hands','',[0,26]);Game.Objects['Cursor'].levelAchiev10=Game.last; + order=1120; + new Game.Achievement('Methuselah','',[1,26]);Game.Objects['Grandma'].levelAchiev10=Game.last; + order=1220; + new Game.Achievement('Huge tracts of land','',[2,26]);Game.Objects['Farm'].levelAchiev10=Game.last; + order=1320; + new Game.Achievement('D-d-d-d-deeper','',[3,26]);Game.Objects['Mine'].levelAchiev10=Game.last; + order=1420; + new Game.Achievement('Patently genius','',[4,26]);Game.Objects['Factory'].levelAchiev10=Game.last; + order=1445; + new Game.Achievement('A capital idea','',[15,26]);Game.Objects['Bank'].levelAchiev10=Game.last; + order=1470; + new Game.Achievement('It belongs in a bakery','',[16,26]);Game.Objects['Temple'].levelAchiev10=Game.last; + order=1495; + new Game.Achievement('Motormouth','',[17,26]);Game.Objects['Wizard tower'].levelAchiev10=Game.last; + order=1520; + new Game.Achievement('Been there done that','',[5,26]);Game.Objects['Shipment'].levelAchiev10=Game.last; + order=1620; + new Game.Achievement('Phlogisticated substances','',[6,26]);Game.Objects['Alchemy lab'].levelAchiev10=Game.last; + order=1720; + new Game.Achievement('Bizarro world','',[7,26]);Game.Objects['Portal'].levelAchiev10=Game.last; + order=1820; + new Game.Achievement('The long now','',[8,26]);Game.Objects['Time machine'].levelAchiev10=Game.last; + order=1920; + new Game.Achievement('Chubby hadrons','',[13,26]);Game.Objects['Antimatter condenser'].levelAchiev10=Game.last; + order=2020; + new Game.Achievement('Palettable','',[14,26]);Game.Objects['Prism'].levelAchiev10=Game.last; + + order=61470; + order=61495; + new Game.Achievement('Bibbidi-bobbidi-boo',loc("Cast %1 spells.",9),[21,11]); + new Game.Achievement('I\'m the wiz',loc("Cast %1 spells.",99),[22,11]); + new Game.Achievement('A wizard is you',loc("Cast %1 spells.",999)+'I\'m a what?',[29,11]); + + order=10000; + new Game.Achievement('Four-leaf cookie',loc("Have %1 golden cookies simultaneously.",4)+'Fairly rare, considering cookies don\'t even have leaves.',[27,6]);Game.last.pool='shadow'; + + order=2100; + Game.TieredAchievement('Lucked out','','Chancemaker',1); + Game.TieredAchievement('What are the odds','','Chancemaker',2); + Game.TieredAchievement('Grandma needs a new pair of shoes','','Chancemaker',3); + Game.TieredAchievement('Million to one shot, doc','','Chancemaker',4); + Game.TieredAchievement('As luck would have it','','Chancemaker',5); + Game.TieredAchievement('Ever in your favor','','Chancemaker',6); + Game.TieredAchievement('Be a lady','','Chancemaker',7); + Game.TieredAchievement('Dicey business','','Chancemaker',8); + + order=2120; + Game.ProductionAchievement('Fingers crossed','Chancemaker',1); + Game.ProductionAchievement('Just a statistic','Chancemaker',2); + Game.ProductionAchievement('Murphy\'s wild guess','Chancemaker',3); + + new Game.Achievement('Let\'s leaf it at that','',[19,26]);Game.Objects['Chancemaker'].levelAchiev10=Game.last; + + order=1000; + new Game.Achievement('The ultimate clickdown',loc("Make %1 from clicking.",loc("%1 cookie",LBeautify(1e21)))+'(of ultimate destiny.)',[11,19]); + + + order=1100; + Game.TieredAchievement('Aged well','','Grandma',9); + Game.TieredAchievement('101st birthday','','Grandma',10); + Game.TieredAchievement('But wait \'til you get older','','Grandma',11); + order=1200;Game.TieredAchievement('Harvest moon','','Farm',9); + order=1300;Game.TieredAchievement('Mine?','','Mine',9); + order=1400;Game.TieredAchievement('In full gear','','Factory',9); + order=1425;Game.TieredAchievement('Treacle tart economics','','Bank',9); + order=1450;Game.TieredAchievement('Holy cookies, grandma!','','Temple',9); + order=1475;Game.TieredAchievement('The Prestige','(Unrelated to the Cookie Clicker feature of the same name.)','Wizard tower',9); + order=1500;Game.TieredAchievement('That\'s just peanuts to space','','Shipment',9); + order=1600;Game.TieredAchievement('Worth its weight in lead','','Alchemy lab',9); + order=1700;Game.TieredAchievement('What happens in the vortex stays in the vortex','','Portal',9); + order=1800;Game.TieredAchievement('Invited to yesterday\'s party','','Time machine',9); + order=1900;Game.TieredAchievement('Downsizing','','Antimatter condenser',9);//the trailer got me really hyped up but i've read some pretty bad reviews. is it watchable ? is it worth seeing ? i don't mind matt damon + order=2000;Game.TieredAchievement('My eyes','','Prism',9); + order=2100;Game.TieredAchievement('Maybe a chance in hell, actually','','Chancemaker',9); + + order=1200;Game.TieredAchievement('Make like a tree','','Farm',10); + order=1300;Game.TieredAchievement('Cave story','','Mine',10); + order=1400;Game.TieredAchievement('In-cog-neato','','Factory',10); + order=1425;Game.TieredAchievement('Save your breath because that\'s all you\'ve got left','','Bank',10); + order=1450;Game.TieredAchievement('Vengeful and almighty','','Temple',10); + order=1475;Game.TieredAchievement('Spell it out for you','','Wizard tower',10); + order=1500;Game.TieredAchievement('Space space space space space','It\'s too far away...','Shipment',10); + order=1600;Game.TieredAchievement('Don\'t get used to yourself, you\'re gonna have to change','','Alchemy lab',10); + order=1700;Game.TieredAchievement('Objects in the mirror dimension are closer than they appear','','Portal',10); + order=1800;Game.TieredAchievement('Groundhog day','','Time machine',10); + order=1900;Game.TieredAchievement('A matter of perspective','','Antimatter condenser',10); + order=2000;Game.TieredAchievement('Optical illusion','','Prism',10); + order=2100;Game.TieredAchievement('Jackpot','','Chancemaker',10); + + order=36000; + new Game.Achievement('So much to do so much to see',loc("Manage a cookie legacy for at least a year.")+'Thank you so much for playing Cookie Clicker!',[23,11]);Game.last.pool='shadow'; + + + + Game.CpsAchievement('Running with scissors'); + Game.CpsAchievement('Rarefied air'); + Game.CpsAchievement('Push it to the limit'); + Game.CpsAchievement('Green cookies sleep furiously'); + + Game.BankAchievement('Panic! at Nabisco'); + Game.BankAchievement('Bursting at the seams'); + Game.BankAchievement('Just about full'); + Game.BankAchievement('Hungry for more'); + + order=1000; + new Game.Achievement('All the other kids with the pumped up clicks',loc("Make %1 from clicking.",loc("%1 cookie",LBeautify(1e23))),[11,28]); + new Game.Achievement('One...more...click...',loc("Make %1 from clicking.",loc("%1 cookie",LBeautify(1e25))),[11,30]); + + order=61515; + new Game.Achievement('Botany enthusiast',loc("Harvest %1 mature garden plants.",100),[26,20]); + new Game.Achievement('Green, aching thumb',loc("Harvest %1 mature garden plants.",1000),[27,20]); + new Game.Achievement('In the garden of Eden (baby)',loc("Fill every tile of the biggest garden plot with plants.")+'Isn\'t tending to those precious little plants just so rock and/or roll?',[28,20]); + + new Game.Achievement('Keeper of the conservatory',loc("Unlock every garden seed."),[25,20]); + new Game.Achievement('Seedless to nay',loc("Convert a complete seed log into sugar lumps by sacrificing your garden to the sugar hornets.
Owning this achievement makes seeds %1% cheaper, plants mature %2% sooner, and plant upgrades drop %3% more.",[5,5,5]),[29,20]); + + order=30050; + new Game.Achievement('You get nothing',loc("Ascend with %1 baked.",loc("%1 cookie",LBeautify(1e36)))+'Good day sir!',[29,6]); + new Game.Achievement('Humble rebeginnings',loc("Ascend with %1 baked.",loc("%1 cookie",LBeautify(1e39)))+'Started from the bottom, now we\'re here.',[29,6]); + new Game.Achievement('The end of the world',loc("Ascend with %1 baked.",loc("%1 cookie",LBeautify(1e42)))+'(as we know it)',[21,25]); + new Game.Achievement('Oh, you\'re back',loc("Ascend with %1 baked.",loc("%1 cookie",LBeautify(1e45)))+'Missed us?',[21,25]); + new Game.Achievement('Lazarus',loc("Ascend with %1 baked.",loc("%1 cookie",LBeautify(1e48)))+'All rise.',[21,25]); + + Game.CpsAchievement('Leisurely pace'); + Game.CpsAchievement('Hypersonic'); + + Game.BankAchievement('Feed me, Orteil'); + Game.BankAchievement('And then what?'); + + order=7002; + new Game.Achievement('Tricentennial and a half',loc("Have at least %1 of everything.",350)+'(it\'s free real estate)',[21,26]); + new Game.Achievement('Quadricentennial',loc("Have at least %1 of everything.",400)+'You\'ve had to do horrible things to get this far.
Horrible... horrible things.
',[22,26]); + new Game.Achievement('Quadricentennial and a half',loc("Have at least %1 of everything.",450)+'At this point, you might just be compensating for something.',[23,26]); + + new Game.Achievement('Quincentennial',loc("Have at least %1 of everything.",500)+'Some people would say you\'re halfway there.
We do not care for those people and their reckless sense of unchecked optimism.
',[29,25]); + + order=21100; + new Game.Achievement('Maillard reaction',loc("Harvest a caramelized sugar lump."),[29,27]); + + order=30250; + new Game.Achievement('When the cookies ascend just right',loc("Ascend with exactly %1.",loc("%1 cookie",LBeautify(1e12))),[25,7]);Game.last.pool='shadow';//this achievement is shadow because it is only achievable through blind luck or reading external guides; this may change in the future + + + order=1050; + new Game.Achievement('With her finger and her thumb',loc("Have %1.",loc("%1 cursor",LBeautify(600))),[0,16]); + + order=1100;Game.TieredAchievement('Defense of the ancients','','Grandma',12); + order=1200;Game.TieredAchievement('Sharpest tool in the shed','','Farm',11); + order=1300;Game.TieredAchievement('Hey now, you\'re a rock','','Mine',11); + order=1400;Game.TieredAchievement('Break the mold','','Factory',11); + order=1425;Game.TieredAchievement('Get the show on, get paid','','Bank',11); + order=1450;Game.TieredAchievement('My world\'s on fire, how about yours','','Temple',11); + order=1475;Game.TieredAchievement('The meteor men beg to differ','','Wizard tower',11); + order=1500;Game.TieredAchievement('Only shooting stars','','Shipment',11); + order=1600;Game.TieredAchievement('We could all use a little change','','Alchemy lab',11);//"all that glitters is gold" was already an achievement + order=1700;Game.TieredAchievement('Your brain gets smart but your head gets dumb','','Portal',11); + order=1800;Game.TieredAchievement('The years start coming','','Time machine',11); + order=1900;Game.TieredAchievement('What a concept','','Antimatter condenser',11); + order=2000;Game.TieredAchievement('You\'ll never shine if you don\'t glow','','Prism',11); + order=2100;Game.TieredAchievement('You\'ll never know if you don\'t go','','Chancemaker',11); + + order=2200; + Game.TieredAchievement('Self-contained','','Fractal engine',1); + Game.TieredAchievement('Threw you for a loop','','Fractal engine',2); + Game.TieredAchievement('The sum of its parts','','Fractal engine',3); + Game.TieredAchievement('Bears repeating','Where did these come from?','Fractal engine',4); + Game.TieredAchievement('More of the same','','Fractal engine',5); + Game.TieredAchievement('Last recurse','','Fractal engine',6); + Game.TieredAchievement('Out of one, many','','Fractal engine',7); + Game.TieredAchievement('An example of recursion','','Fractal engine',8); + Game.TieredAchievement('For more information on this achievement, please refer to its title','','Fractal engine',9); + Game.TieredAchievement('I\'m so meta, even this achievement','','Fractal engine',10); + Game.TieredAchievement('Never get bored','','Fractal engine',11); + + order=2220; + Game.ProductionAchievement('The needs of the many','Fractal engine',1); + Game.ProductionAchievement('Eating its own','Fractal engine',2); + Game.ProductionAchievement('We must go deeper','Fractal engine',3); + + new Game.Achievement('Sierpinski rhomboids','',[20,26]);Game.Objects['Fractal engine'].levelAchiev10=Game.last; + + Game.CpsAchievement('Gotta go fast'); + Game.BankAchievement('I think it\'s safe to say you\'ve got it made'); + + order=6002; + new Game.Achievement('Renaissance baker',loc("Own %1 upgrades and %2 buildings.",[400,8000])+'If you have seen further, it is by standing on the shoulders of giants - a mysterious species of towering humanoids until now thought long-extinct.',[10,10]); + + order=1098; + new Game.Achievement('Veteran',loc("Own at least %1 grandma types.",14)+'14\'s a crowd!',[10,9]); + + order=10000; + new Game.Achievement('Thick-skinned',loc("Have your reinforced membrane protect the shimmering veil."),[7,10]); + + + order=2300; + Game.TieredAchievement('F12','','Javascript console',1); + Game.TieredAchievement('Variable success','','Javascript console',2); + Game.TieredAchievement('No comments','','Javascript console',3); + Game.TieredAchievement('Up to code','','Javascript console',4); + Game.TieredAchievement('Works on my machine','','Javascript console',5); + Game.TieredAchievement('Technical debt','','Javascript console',6); + Game.TieredAchievement('Mind your language','','Javascript console',7); + Game.TieredAchievement('Inconsolable','','Javascript console',8); + Game.TieredAchievement('Closure','','Javascript console',9); + Game.TieredAchievement('Dude what if we\'re all living in a simulation like what if we\'re all just code on a computer somewhere','','Javascript console',10); + Game.TieredAchievement('Taking the back streets','','Javascript console',11); + + order=2320; + Game.ProductionAchievement('Inherited prototype','Javascript console',1); + Game.ProductionAchievement('A model of document object','Javascript console',2); + Game.ProductionAchievement('First-class citizen','Javascript console',3); + + new Game.Achievement('Alexandria','',[32,26]);Game.Objects['Javascript console'].levelAchiev10=Game.last; + + Game.CpsAchievement('Bake him away, toys'); + Game.CpsAchievement('You\'re #1 so why try harder'); + Game.CpsAchievement('Haven\'t even begun to peak'); + Game.BankAchievement('A sometimes food'); + Game.BankAchievement('Not enough of a good thing'); + Game.BankAchievement('Horn of plenty'); + + order=30050; + new Game.Achievement('Smurf account',loc("Ascend with %1 baked.",loc("%1 cookie",LBeautify(1e51)))+'It\'s like you just appeared out of the blue!',[21,32]); + new Game.Achievement('If at first you don\'t succeed',loc("Ascend with %1 baked.",loc("%1 cookie",LBeautify(1e54)))+'If at first you don\'t succeed, try, try, try again.
But isn\'t that the definition of insanity?
',[21,32]); + + order=33000; + new Game.Achievement('O Fortuna',loc("Own every fortune upgrade.
Owning this achievement makes fortunes appear twice as often; unlocked fortune upgrades also have a %1% chance to carry over after ascending.",40),[29,8]); + + order=61615; + new Game.Achievement('Initial public offering',loc("Make your first stock market profit."),[0,33]); + new Game.Achievement('Rookie numbers',loc("Own at least %1 of every stock market good.",100)+'Gotta pump those numbers up!',[9,33]); + new Game.Achievement('No nobility in poverty',loc("Own at least %1 of every stock market good.",500)+'What kind of twisted individual is out there cramming camels through needle holes anyway?',[10,33]); + new Game.Achievement('Full warehouses',loc("Own at least %1 of a stock market good.",1000),[11,33]); + new Game.Achievement('Make my day',loc("Make a day of CpS ($%1) in 1 stock market sale.",86400),[1,33]); + new Game.Achievement('Buy buy buy',loc("Spend a day of CpS ($%1) in 1 stock market purchase.",86400),[1,33]); + new Game.Achievement('Gaseous assets',loc("Have your stock market profits surpass a whole year of CpS ($%1).",31536000)+'Boy, how volatile!',[18,33]);Game.last.pool='shadow'; + new Game.Achievement('Pyramid scheme',loc("Unlock the highest-tier stock market headquarters."),[18,33]); + + order=10000; + new Game.Achievement('Jellicles',loc("Own %1 kitten upgrades.",10)+'Jellicles can and jellicles do! Make sure to wash your jellicles every day!',[18,19]); + + order=7002; + new Game.Achievement('Quincentennial and a half',loc("Have at least %1 of everything.",550)+'This won\'t fill the churning void inside, you know.',[29,26]); + + Game.CpsAchievement('What did we even eat before these'); + Game.CpsAchievement('Heavy flow'); + Game.CpsAchievement('More you say?'); + Game.BankAchievement('Large and in charge'); + Game.BankAchievement('Absolutely stuffed'); + Game.BankAchievement('It\'s only wafer-thin','Just the one!'); + + order=1000;new Game.Achievement('Clickety split',loc("Make %1 from clicking.",loc("%1 cookie",LBeautify(1e27))),[11,31]); + order=1050;new Game.Achievement('Gotta hand it to you',loc("Have %1.",loc("%1 cursor",LBeautify(700))),[0,17]); + order=1100;Game.TieredAchievement('Okay boomer','','Grandma',13); + order=1200;Game.TieredAchievement('Overripe','','Farm',12); + order=1300;Game.TieredAchievement('Rock on','','Mine',12); + order=1400;Game.TieredAchievement('Self-manmade man','','Factory',12); + order=1425;Game.TieredAchievement('Checks out','','Bank',12); + order=1450;Game.TieredAchievement('Living on a prayer','','Temple',12); + order=1475;Game.TieredAchievement('Higitus figitus migitus mum','','Wizard tower',12); + order=1500;Game.TieredAchievement('The incredible journey','','Shipment',12); + order=1600;Game.TieredAchievement('Just a phase','','Alchemy lab',12); + order=1700;Game.TieredAchievement('Don\'t let me leave, Murph','','Portal',12); + order=1800;Game.TieredAchievement('Caveman to cosmos','','Time machine',12); + order=1900;Game.TieredAchievement('Particular tastes','','Antimatter condenser',12); + order=2000;Game.TieredAchievement('A light snack','','Prism',12); + order=2100;Game.TieredAchievement('Tempting fate','','Chancemaker',12); + order=2200;Game.TieredAchievement('Tautological','','Fractal engine',12); + order=2300;Game.TieredAchievement('Curly braces','Or as the French call them, mustache boxes.
Go well with quotes.
','Javascript console',12); + + order=10000; + new Game.Achievement('Seven horseshoes',loc("Click %1.",loc("%1 golden cookie",LBeautify(27777)))+'Enough for one of those funky horses that graze near your factories.',[21,33]);Game.last.pool='shadow'; + + order=11005; + new Game.Achievement('Olden days',loc("Find the forgotten madeleine.")+'DashNet Farms remembers.',[12,3]); + + + order=1050;new Game.Achievement('The devil\'s workshop',loc("Have %1.",loc("%1 cursor",LBeautify(800))),[0,18]); + order=1200;Game.TieredAchievement('In the green','','Farm',13); + order=1300;Game.TieredAchievement('Mountain out of a molehill, but like in a good way','','Mine',13); + order=1400;Game.TieredAchievement('The wheels of progress','','Factory',13); + order=1425;Game.TieredAchievement('That\'s rich','','Bank',13); + order=1450;Game.TieredAchievement('Preaches and cream','','Temple',13); + order=1475;Game.TieredAchievement('Magic thinking','','Wizard tower',13); + order=1500;Game.TieredAchievement('Is there life on Mars?','Yes, there is. You\'re currently using it as filling in experimental flavor prototype #810657.','Shipment',13); + order=1600;Game.TieredAchievement('Bad chemistry','','Alchemy lab',13); + order=1700;Game.TieredAchievement('Reduced to gibbering heaps','','Portal',13); + order=1800;Game.TieredAchievement('Back already?','','Time machine',13); + order=1900;Game.TieredAchievement('Nuclear throne','','Antimatter condenser',13); + order=2000;Game.TieredAchievement('Making light of the situation','','Prism',13); + order=2100;Game.TieredAchievement('Flip a cookie. Chips, I win. Crust, you lose.','','Chancemaker',13); + order=2200;Game.TieredAchievement('In and of itself','','Fractal engine',13); + order=2300;Game.TieredAchievement('Duck typing','Hello, this is a duck typing. Got any grapes?','Javascript console',13); + + order=2400; + Game.TieredAchievement('They\'ll never know what hit \'em','','Idleverse',1); + Game.TieredAchievement('Well-versed','','Idleverse',2); + Game.TieredAchievement('Ripe for the picking','','Idleverse',3); + Game.TieredAchievement('Unreal','','Idleverse',4); + Game.TieredAchievement('Once you\'ve seen one','','Idleverse',5); + Game.TieredAchievement('Spoils and plunder','','Idleverse',6); + Game.TieredAchievement('Nobody exists on purpose, nobody belongs anywhere','Come watch TV?','Idleverse',7); + Game.TieredAchievement('Hyperspace expressway','','Idleverse',8); + Game.TieredAchievement('Versatile','','Idleverse',9); + Game.TieredAchievement('You are inevitable','','Idleverse',10); + Game.TieredAchievement('Away from this place','','Idleverse',11); + Game.TieredAchievement('Everywhere at once','','Idleverse',12); + Game.TieredAchievement('Reject reality, substitute your own','','Idleverse',13); + + order=2420; + Game.ProductionAchievement('Fringe','Idleverse',1); + Game.ProductionAchievement('Coherence','Idleverse',2); + Game.ProductionAchievement('Earth-616','Idleverse',3); + + new Game.Achievement('Strange topologies','',[33,26]);Game.Objects['Idleverse'].levelAchiev10=Game.last; + + order=5000; + new Game.Achievement('Grand design',loc("Own %1.",loc("%1 building",LBeautify(5000)))+'They\'ll remember you forever!',[32,12]); + new Game.Achievement('Ecumenopolis',loc("Own %1.",loc("%1 building",LBeautify(7500)))+'Getting a wee bit cramped.',[33,12]); + + order=6000; + new Game.Achievement('The full picture',loc("Purchase %1.",loc("%1 upgrade",LBeautify(300)))+'So that\'s where that fits in!',[32,11]); + new Game.Achievement('When there\'s nothing left to add',loc("Purchase %1.",loc("%1 upgrade",LBeautify(400)))+'...keep going.',[33,11]); + + order=7002; + new Game.Achievement('Sexcentennial',loc("Have at least %1 of everything.",600)+'Hey, nice milestone!',[31,33]); + + Game.CpsAchievement('Keep going until I say stop'); + Game.CpsAchievement('But I didn\'t say stop, did I?'); + Game.CpsAchievement('With unrivaled fervor'); + Game.BankAchievement('Think big'); + Game.BankAchievement('Hypersize me'); + Game.BankAchievement('Max capacity'); + + order=61616; + new Game.Achievement('Liquid assets',loc("Have your stock market profits surpass $%1.",1e7),[12,33]); + + order=11000; + new Game.Achievement('Stifling the press',loc("Squish the news ticker flat, then click on it.")+'Narrow in here or is it just me?',[27,7]); + + + order=2500; + Game.TieredAchievement('It\'s big brain time','','Cortex baker',1); + Game.TieredAchievement('Just my imagination','','Cortex baker',2); + Game.TieredAchievement('Now there\'s an idea','','Cortex baker',3); + Game.TieredAchievement('The organ that named itself','','Cortex baker',4); + Game.TieredAchievement('Gyrification','','Cortex baker',5); + Game.TieredAchievement('A trademarked portmanteau of "imagination" and "engineering"','','Cortex baker',6); + Game.TieredAchievement('Mindfulness','','Cortex baker',7); + Game.TieredAchievement('The 10% myth','','Cortex baker',8); + Game.TieredAchievement('Don\'t think about it too hard','','Cortex baker',9); + Game.TieredAchievement('Though fools seldom differ','','Cortex baker',10); + Game.TieredAchievement('Looking kind of dumb','','Cortex baker',11); + Game.TieredAchievement('A beautiful mind','','Cortex baker',12); + Game.TieredAchievement('Cardinal synapses','','Cortex baker',13); + + order=2520; + Game.ProductionAchievement('Positive thinking','Cortex baker',1); + Game.ProductionAchievement('The thought that counts','Cortex baker',2); + Game.ProductionAchievement('Unthinkable','Cortex baker',3); + + new Game.Achievement('Gifted','',[34,26]);Game.Objects['Cortex baker'].levelAchiev10=Game.last; + + + order=1100;Game.TieredAchievement('They moistly come at night','','Grandma',14); + order=1200;Game.TieredAchievement('It\'s grown on you','','Farm',14); + order=1300;Game.TieredAchievement('Don\'t let the walls cave in on you','','Mine',14); + order=1400;Game.TieredAchievement('Replaced by robots','','Factory',14); + order=1425;Game.TieredAchievement('Financial prodigy','Imagine how it would be, to be at the top making cash money.','Bank',14); + order=1450;Game.TieredAchievement('And I will pray to a big god','','Temple',14); + order=1475;Game.TieredAchievement('Shosple Colupis','','Wizard tower',14); + order=1500;Game.TieredAchievement('False vacuum','','Shipment',14); + order=1600;Game.TieredAchievement('Metallic taste','','Alchemy lab',14); + order=1700;Game.TieredAchievement('Swiss cheese','','Portal',14); + order=1800;Game.TieredAchievement('But the future refused to change','','Time machine',14); + order=1900;Game.TieredAchievement('What\'s the dark matter with you','','Antimatter condenser',14); + order=2000;Game.TieredAchievement('Enlightenment','','Prism',14); + order=2100;Game.TieredAchievement('Never tell me the odds','','Chancemaker',14); + order=2200;Game.TieredAchievement('Blowing an Apollonian gasket','','Fractal engine',14); + order=2300;Game.TieredAchievement('Get with the program','','Javascript console',14); + order=2400;Game.TieredAchievement('Lost your cosmic marbles','','Idleverse',14); + order=2500;Game.TieredAchievement('By will alone I set my mind in motion','','Cortex baker',14); + + order=1000;new Game.Achievement('Ain\'t that a click in the head',loc("Make %1 from clicking.",loc("%1 cookie",LBeautify(1e29))),[11,34]); + + order=7002; + new Game.Achievement('Sexcentennial and a half',loc("Have at least %1 of everything.",650)+'Hope you\'re enjoying the grind so far! It gets worse.',[21,34]); + + Game.CpsAchievement('I am speed'); + Game.CpsAchievement('And on and on'); + Game.BankAchievement('Fake it till you bake it'); + Game.BankAchievement('History in the baking'); + + order=22100;new Game.Achievement('Baby it\'s old outside',loc("Click one of Santa's helper grandmas during Christmas season."),[10,9]); + + order=5000; + new Game.Achievement('Myriad',loc("Own %1.",loc("%1 building",LBeautify(10000)))+'At this point, most of your assets lie in real estate.',[31,6]); + + order=6000; + new Game.Achievement('Kaizen',loc("Purchase %1.",loc("%1 upgrade",LBeautify(500)))+'Just a little more.',[31,5]); + new Game.Achievement('Beyond quality',loc("Purchase %1.",loc("%1 upgrade",LBeautify(600)))+'Dwarfing all of mankind\'s accomplishments.',[32,5]); + + Game.CpsAchievement('Everything happens so much'); + Game.CpsAchievement('I\'ll rest when I\'m dead'); + Game.BankAchievement('What do you get for the baker who has everything'); + Game.BankAchievement('Bottomless pit'); + + order=6001; + new Game.Achievement('All the stars in heaven',loc("Own %1 heavenly upgrades.",100),[30,5]); + + order=32500; + new Game.Achievement('No time like the present',loc("Redeem a cookie gift code from a friend (or from yourself, we don't judge)."),[34,6]); + + Game.CpsAchievement('Can we get much higher'); + Game.CpsAchievement('Speed\'s the name of the game (no it\'s not it\'s called Cookie Clicker)'); + Game.BankAchievement('Rainy day fund'); + Game.BankAchievement('And a little extra'); + + order=19990; + new Game.Achievement('Grandmapocalypse',loc("Trigger the grandmapocalypse for the first time."),[28,21]); + new Game.Achievement('Wrath cookie',loc("Click a wrath cookie."),[15,5]); + + order=30050; + new Game.Achievement('No more room in hell',loc("Ascend with %1 baked.",loc("%1 cookie",LBeautify(1e57)))+'That is not dead which can eternal click.',[21,32]); + + order=32600; + new Game.Achievement('In her likeness',loc("Shape your clones to resemble %1.",loc("grandmas"))+'There she is.',[26,21]);Game.last.pool='shadow'; + + order=20999; + new Game.Achievement('Wrinkler poker',loc("Poke a wrinkler %1 times without killing it.",50)+'Also the name of a card game popular in retirement homes.',[19,8]); + + order=7002; + new Game.Achievement('Septcentennial',loc("Have at least %1 of everything.",700)+'In this economy?',[29,36]); + + order=2600; + Game.TieredAchievement('My own clone','','You',1); + Game.TieredAchievement('Multiplicity','','You',2); + Game.TieredAchievement('Born for this job','','You',3); + Game.TieredAchievement('Episode II','','You',4); + Game.TieredAchievement('Copy that','','You',5); + Game.TieredAchievement('Life finds a way','','You',6); + Game.TieredAchievement('Overcrowding','','You',7); + Game.TieredAchievement('Strength in numbers','','You',8); + Game.TieredAchievement('Army of me','','You',9); + Game.TieredAchievement('Know thyself','Do you ever look at yourself in the mirror and wonder... What is going on inside your head?','You',10); + Game.TieredAchievement('Didn\'t make sense not to live','','You',11); + Game.TieredAchievement('Genetic bottleneck','','You',12); + Game.TieredAchievement('Despite everything, it\'s still you','','You',13); + Game.TieredAchievement('Everyone everywhere all at once','','You',14); + + order=2620; + Game.ProductionAchievement('Self-made','You',1); + Game.ProductionAchievement('Reproducible results','You',2); + Game.ProductionAchievement('That\'s all you','You',3); + + new Game.Achievement('Self-improvement','',[35,26]);Game.Objects['You'].levelAchiev10=Game.last; + + order=1100;Game.TieredAchievement('And now you\'re even older','','Grandma',15); + order=1200;Game.TieredAchievement('Au naturel','','Farm',15); + order=1300;Game.TieredAchievement('Dirt-rich','','Mine',15); + order=1400;Game.TieredAchievement('Bots build bots','','Factory',15); + order=1425;Game.TieredAchievement('Getting that bag','','Bank',15); + order=1450;Game.TieredAchievement('The leader is good, the leader is great','','Temple',15); + order=1475;Game.TieredAchievement('You don\'t think they could\'ve used... it couldn\'t have been ma-','','Wizard tower',15); + order=1500;Game.TieredAchievement('Signed, sealed, delivered','','Shipment',15); + order=1600;Game.TieredAchievement('Sugar, spice, and everything nice','These were the ingredients chosen to create the perfect cookies.','Alchemy lab',15); + order=1700;Game.TieredAchievement('Not even remotely close to Kansas anymore','','Portal',15); + order=1800;Game.TieredAchievement('I only meant to stay a while','','Time machine',15); + order=1900;Game.TieredAchievement('Not 20 years away forever','','Antimatter condenser',15); + order=2000;Game.TieredAchievement('Bright side of the Moon','','Prism',15); + order=2100;Game.TieredAchievement('Riding the Mersenne twister','','Chancemaker',15); + order=2200;Game.TieredAchievement('Divide and conquer','','Fractal engine',15); + order=2300;Game.TieredAchievement('Pebcakes','Problem exists in my mouth!','Javascript console',15); + order=2400;Game.TieredAchievement('Greener on the other sides','','Idleverse',15); + order=2500;Game.TieredAchievement('Where is my mind','','Cortex baker',15); + order=2600;Game.TieredAchievement('Introspection','','You',15); + + order=61617; + new Game.Achievement('Debt evasion',loc("Take out a loan and ascend before incurring the CpS penalty.")+'Really got \'em buttered!',[4,33]); + + order=6000; + new Game.Achievement('Oft we mar what\'s well',loc("Purchase %1.",loc("%1 upgrade",LBeautify(700)))+'But don\'t let that stop you!',[33,5]); + + order=500000; + new Game.Achievement('Cookie Clicker',loc("Unlock the final building."),[30,6]); + Game.last.descFunc=function(){ + if (!Game.specialAnimLoop) + { + Game.specialAnimLoop=setInterval(function(){ + var el=l('parade'); + if (!el || !Game.tooltip.on) {clearInterval(Game.specialAnimLoop);Game.specialAnimLoop=0;return false;} + var x=Game.T; + el.style.backgroundPosition='-'+x+'px '+(Game.T%20<10?0:32)+'px'; + },100); + } + var x=Game.T; + return this.desc+''+loc("Everyone's here.")+'
'+loc("Won't you have some cookies too?")+'
'; + }; + + order=1000;new Game.Achievement('What\'s not clicking',loc("Make %1 from clicking.",loc("%1 cookie",LBeautify(1e31))),[11,36]); + order=1050; + new Game.Achievement('All on deck',loc("Have %1.",loc("%1 cursor",LBeautify(900))),[0,19]); + new Game.Achievement('A round of applause',loc("Have %1.",loc("%1 cursor",LBeautify(1000)))+'Boy, are my arms tired!',[0,28]); + + //end of achievements + + + for (var i in Game.Objects) + { + if (Game.Objects[i].levelAchiev10) {Game.Objects[i].levelAchiev10.baseDesc=loc("Reach level %1 %2.",[10,Game.Objects[i].plural]);Game.Objects[i].levelAchiev10.desc=Game.Objects[i].levelAchiev10.baseDesc;} + } + + + + LocalizeUpgradesAndAchievs(); + + + /*===================================================================================== + BUFFS + =======================================================================================*/ + + Game.buffs={};//buffs currently in effect by name + Game.buffsI=0; + Game.buffsL=l('buffs'); + Game.gainBuff=function(type,time,arg1,arg2,arg3) + { + type=Game.buffTypesByName[type]; + var obj=type.func(time,arg1,arg2,arg3); + obj.type=type; + obj.arg1=arg1; + obj.arg2=arg2; + obj.arg3=arg3; + if (!obj.dname && obj.name!='???') obj.dname=loc(obj.name); + + var buff={ + visible:true, + time:0, + name:'???', + desc:'', + icon:[0,0] + }; + if (Game.buffs[obj.name])//if there is already a buff in effect with this name + { + var buff=Game.buffs[obj.name]; + if (obj.max) buff.time=Math.max(obj.time,buff.time);//new duration is max of old and new + if (obj.add) buff.time+=obj.time;//new duration is old + new + if (!obj.max && !obj.add) buff.time=obj.time;//new duration is set to new + buff.maxTime=buff.time; + } + else//create new buff + { + for (var i in obj)//paste parameters onto buff + {buff[i]=obj[i];} + buff.maxTime=buff.time; + Game.buffs[buff.name]=buff; + buff.id=Game.buffsI; + + //create dom + Game.buffsL.innerHTML=Game.buffsL.innerHTML+'

'+buff.dname+'

'+buff.desc+'
' + ,'left',true):'')+' style="opacity:1;float:none;display:block;'+writeIcon(buff.icon)+'">'; + + buff.l=l('buff'+buff.id); + + Game.buffsI++; + } + Game.recalculateGains=1; + Game.storeToRefresh=1; + return buff; + } + Game.hasBuff=function(what)//returns 0 if there is no buff in effect with this name; else, returns it + {if (!Game.buffs[what]) return 0; else return Game.buffs[what];} + Game.updateBuffs=function()//executed every logic frame + { + for (var i in Game.buffs) + { + var buff=Game.buffs[i]; + + if (buff.time>=0) + { + if (!l('buffPieTimer'+buff.id)) l('buff'+buff.id).innerHTML=l('buff'+buff.id).innerHTML+'
'; + var T=1-(buff.time/buff.maxTime); + T=(T*144)%144; + l('buffPieTimer'+buff.id).style.backgroundPosition=(-Math.floor(T%18))*48+'px '+(-Math.floor(T/18))*48+'px'; + } + buff.time--; + if (buff.time<=0) + { + if (Game.onCrate==l('buff'+buff.id)) Game.tooltip.hide(); + if (buff.onDie) buff.onDie(); + Game.buffsL.removeChild(l('buff'+buff.id)); + if (Game.buffs[buff.name]) + { + Game.buffs[buff.name]=0; + delete Game.buffs[buff.name]; + } + Game.recalculateGains=1; + Game.storeToRefresh=1; + } + } + } + Game.killBuff=function(what)//remove a buff by name + {if (Game.buffs[what]){Game.buffs[what].time=0;/*Game.buffs[what]=0;*/}} + Game.killBuffs=function()//remove all buffs + {Game.buffsL.innerHTML='';Game.buffs={};Game.recalculateGains=1;Game.storeToRefresh=1;} + + + Game.buffTypes=[];//buff archetypes; only buffs declared from these can be saved and loaded + Game.buffTypesByName=[]; + Game.buffTypesN=0; + Game.buffType=function(name,func) + { + this.name=name; + this.func=func;//this is a function that returns a buff object; it takes a "time" argument in seconds, and 3 more optional arguments at most, which will be saved and loaded as floats + this.id=Game.buffTypesN; + this.vanilla=Game.vanilla; + Game.buffTypesByName[this.name]=this; + Game.buffTypes[Game.buffTypesN]=this; + Game.buffTypesN++; + } + + /* + basic buff parameters : + name:'Kitten rain', + desc:'It\'s raining kittens!', + icon:[0,0], + time:30*Game.fps + other parameters : + visible:false - will hide the buff from the buff list + add:true - if this buff already exists, add the new duration to the old one + max:true - if this buff already exists, set the new duration to the max of either + onDie:function(){} - function will execute when the buff runs out + power:3 - used by some buffs + multCpS:3 - buff multiplies CpS by this amount + multClick:3 - buff multiplies click power by this amount + */ + + //base buffs + new Game.buffType('frenzy',function(time,pow) + { + return { + name:'Frenzy', + desc:loc("Cookie production x%1 for %2!",[pow,Game.sayTime(time*Game.fps,-1)]), + icon:[10,14], + time:time*Game.fps, + add:true, + multCpS:pow, + aura:1 + }; + }); + new Game.buffType('blood frenzy',function(time,pow) + { + return { + name:'Elder frenzy', + desc:loc("Cookie production x%1 for %2!",[pow,Game.sayTime(time*Game.fps,-1)]), + icon:[29,6], + time:time*Game.fps, + add:true, + multCpS:pow, + aura:1 + }; + }); + new Game.buffType('clot',function(time,pow) + { + return { + name:'Clot', + desc:loc("Cookie production halved for %1!",Game.sayTime(time*Game.fps,-1)), + icon:[15,5], + time:time*Game.fps, + add:true, + multCpS:pow, + aura:2 + }; + }); + new Game.buffType('dragon harvest',function(time,pow) + { + if (Game.Has('Dragon fang')) pow=Math.ceil(pow*1.1); + return { + name:'Dragon Harvest', + desc:loc("Cookie production x%1 for %2!",[pow,Game.sayTime(time*Game.fps,-1)]), + icon:[10,25], + time:time*Game.fps, + add:true, + multCpS:pow, + aura:1 + }; + }); + new Game.buffType('everything must go',function(time,pow) + { + return { + name:'Everything must go', + desc:loc("All buildings are %1% cheaper for %2!",[pow,Game.sayTime(time*Game.fps,-1)]), + icon:[17,6], + time:time*Game.fps, + add:true, + power:pow, + aura:1 + }; + }); + new Game.buffType('cursed finger',function(time,pow) + { + return { + name:'Cursed finger', + desc:loc("Cookie production halted for %1,
but each click is worth %2 of CpS.",[Game.sayTime(time*Game.fps,-1),Game.sayTime(time*Game.fps,-1)]), + icon:[12,17], + time:time*Game.fps, + add:true, + power:pow, + multCpS:0, + aura:1 + }; + }); + new Game.buffType('click frenzy',function(time,pow) + { + return { + name:'Click frenzy', + desc:loc("Clicking power x%1 for %2!",[pow,Game.sayTime(time*Game.fps,-1)]), + icon:[0,14], + time:time*Game.fps, + add:true, + multClick:pow, + aura:1 + }; + }); + new Game.buffType('dragonflight',function(time,pow) + { + if (Game.Has('Dragon fang')) pow=Math.ceil(pow*1.1); + return { + name:'Dragonflight', + desc:loc("Clicking power x%1 for %2!",[pow,Game.sayTime(time*Game.fps,-1)]), + icon:[0,25], + time:time*Game.fps, + add:true, + multClick:pow, + aura:1 + }; + }); + new Game.buffType('cookie storm',function(time,pow) + { + return { + name:'Cookie storm', + desc:loc("Cookies everywhere!"), + icon:[22,6], + time:time*Game.fps, + add:true, + power:pow, + aura:1 + }; + }); + new Game.buffType('building buff',function(time,pow,building) + { + var obj=Game.ObjectsById[building]; + return { + name:Game.goldenCookieBuildingBuffs[obj.name][0], + dname:EN?Game.goldenCookieBuildingBuffs[obj.name][0]:loc("%1 Power!",obj.dname), + desc:loc("Your %1 are boosting your CpS!",loc("%1 "+obj.bsingle,LBeautify(obj.amount)))+'
'+loc("Cookie production +%1% for %2!",[Beautify(Math.ceil(pow*100-100)),Game.sayTime(time*Game.fps,-1)]), + icon:[obj.iconColumn,14], + time:time*Game.fps, + add:true, + multCpS:pow, + aura:1 + }; + }); + new Game.buffType('building debuff',function(time,pow,building) + { + var obj=Game.ObjectsById[building]; + return { + name:Game.goldenCookieBuildingBuffs[obj.name][1], + dname:EN?Game.goldenCookieBuildingBuffs[obj.name][1]:loc("%1 Burden!",obj.dname), + desc:loc("Your %1 are rusting your CpS!",loc("%1 "+obj.bsingle,LBeautify(obj.amount)))+'
'+loc("Cookie production %1% slower for %2!",[Beautify(Math.ceil(pow*100-100)),Game.sayTime(time*Game.fps,-1)]), + icon:[obj.iconColumn,15], + time:time*Game.fps, + add:true, + multCpS:1/pow, + aura:2 + }; + }); + new Game.buffType('sugar blessing',function(time,pow) + { + return { + name:'Sugar blessing', + desc:loc("You find %1% more golden cookies for the next %2.",[10,Game.sayTime(time*Game.fps,-1)]), + icon:[29,16], + time:time*Game.fps, + //add:true + }; + }); + new Game.buffType('haggler luck',function(time,pow) + { + return { + name:'Haggler\'s luck', + desc:loc("All upgrades are %1% cheaper for %2!",[pow,Game.sayTime(time*Game.fps,-1)]), + icon:[25,11], + time:time*Game.fps, + power:pow, + max:true + }; + }); + new Game.buffType('haggler misery',function(time,pow) + { + return { + name:'Haggler\'s misery', + desc:loc("All upgrades are %1% pricier for %2!",[pow,Game.sayTime(time*Game.fps,-1)]), + icon:[25,11], + time:time*Game.fps, + power:pow, + max:true + }; + }); + new Game.buffType('pixie luck',function(time,pow) + { + return { + name:'Crafty pixies', + desc:loc("All buildings are %1% cheaper for %2!",[pow,Game.sayTime(time*Game.fps,-1)]), + icon:[26,11], + time:time*Game.fps, + power:pow, + max:true + }; + }); + new Game.buffType('pixie misery',function(time,pow) + { + return { + name:'Nasty goblins', + desc:loc("All buildings are %1% pricier for %2!",[pow,Game.sayTime(time*Game.fps,-1)]), + icon:[26,11], + time:time*Game.fps, + power:pow, + max:true + }; + }); + new Game.buffType('magic adept',function(time,pow) + { + return { + name:'Magic adept', + desc:loc("Spells backfire %1 times less for %2.",[pow,Game.sayTime(time*Game.fps,-1)]), + icon:[29,11], + time:time*Game.fps, + power:pow, + max:true + }; + }); + new Game.buffType('magic inept',function(time,pow) + { + return { + name:'Magic inept', + desc:loc("Spells backfire %1 times more for %2.",[pow,Game.sayTime(time*Game.fps,-1)]), + icon:[29,11], + time:time*Game.fps, + power:pow, + max:true + }; + }); + new Game.buffType('devastation',function(time,pow) + { + return { + name:'Devastation', + desc:loc("Clicking power +%1% for %2!",[Math.floor(pow*100-100),Game.sayTime(time*Game.fps,-1)]), + icon:[23,18], + time:time*Game.fps, + multClick:pow, + aura:1, + max:true + }; + }); + new Game.buffType('sugar frenzy',function(time,pow) + { + return { + name:'Sugar frenzy', + desc:loc("Cookie production x%1 for %2!",[pow,Game.sayTime(time*Game.fps,-1)]), + icon:[29,14], + time:time*Game.fps, + add:true, + multCpS:pow, + aura:0 + }; + }); + new Game.buffType('loan 1',function(time,pow) + { + return { + name:'Loan 1', + dname:loc("Loan %1",1), + desc:loc("Cookie production x%1 for %2!",[pow,Game.sayTime(time*Game.fps,-1)]), + icon:[1,33], + time:time*Game.fps, + power:pow, + multCpS:pow, + max:true, + onDie:function(){if (Game.takeLoan) {Game.takeLoan(1,true);}}, + }; + }); + new Game.buffType('loan 1 interest',function(time,pow) + { + return { + name:'Loan 1 (interest)', + dname:loc("Loan %1 (interest)",1), + desc:loc("Cookie production x%1 for %2!",[pow,Game.sayTime(time*Game.fps,-1)]), + icon:[1,33], + time:time*Game.fps, + power:pow, + multCpS:pow, + max:true + }; + }); + new Game.buffType('loan 2',function(time,pow) + { + return { + name:'Loan 2', + dname:loc("Loan %1",2), + desc:loc("Cookie production x%1 for %2!",[pow,Game.sayTime(time*Game.fps,-1)]), + icon:[1,33], + time:time*Game.fps, + power:pow, + multCpS:pow, + max:true, + onDie:function(){if (Game.takeLoan) {Game.takeLoan(2,true);}}, + }; + }); + new Game.buffType('loan 2 interest',function(time,pow) + { + return { + name:'Loan 2 (interest)', + dname:loc("Loan %1 (interest)",2), + desc:loc("Cookie production x%1 for %2!",[pow,Game.sayTime(time*Game.fps,-1)]), + icon:[1,33], + time:time*Game.fps, + power:pow, + multCpS:pow, + max:true + }; + }); + new Game.buffType('loan 3',function(time,pow) + { + return { + name:'Loan 3', + dname:loc("Loan %1",3), + desc:loc("Cookie production x%1 for %2!",[pow,Game.sayTime(time*Game.fps,-1)]), + icon:[1,33], + time:time*Game.fps, + power:pow, + multCpS:pow, + max:true, + onDie:function(){if (Game.takeLoan) {Game.takeLoan(3,true);}}, + }; + }); + new Game.buffType('loan 3 interest',function(time,pow) + { + return { + name:'Loan 3 (interest)', + dname:loc("Loan %1 (interest)",3), + desc:loc("Cookie production x%1 for %2!",[pow,Game.sayTime(time*Game.fps,-1)]), + icon:[1,33], + time:time*Game.fps, + power:pow, + multCpS:pow, + max:true + }; + }); + new Game.buffType('gifted out',function(time,pow) + { + return { + name:'Gifted out', + desc:loc("Can't send or receive gifts again for %1.",Game.sayTime(time*Game.fps,-1)), + icon:[34,6], + time:time*Game.fps, + power:pow, + max:true + }; + }); + + //end of buffs + + + + + /*===================================================================================== + GRANDMAPOCALYPSE + =======================================================================================*/ + Game.UpdateGrandmapocalypse=function() + { + if (Game.Has('Elder Covenant') || Game.Objects['Grandma'].amount==0) Game.elderWrath=0; + else if (Game.pledgeT>0)//if the pledge is active, lower it + { + Game.pledgeT--; + if (Game.pledgeT==0)//did we reach 0? make the pledge purchasable again + { + Game.Lock('Elder Pledge'); + Game.Unlock('Elder Pledge'); + Game.elderWrath=1; + } + } + else + { + if (Game.Has('One mind') && Game.elderWrath==0) + { + Game.elderWrath=1; + } + if (Math.random()<0.001 && Game.elderWrath0) + { + if (Game.elderWrath>=3) PlayCue('fadeTo','grandmapocalypse'); + else PlayCue('fadeTo','click'); + } + Game.storeToRefresh=1; + } + + Game.elderWrathOld=Game.elderWrath; + + Game.UpdateWrinklers(); + } + + //wrinklers + + function inRect(x,y,rect) + { + //find out if the point x,y is in the rotated rectangle rect{w,h,r,o} (width,height,rotation in radians,y-origin) (needs to be normalized) + //I found this somewhere online I guess + var dx = x+Math.sin(-rect.r)*(-(rect.h/2-rect.o)),dy=y+Math.cos(-rect.r)*(-(rect.h/2-rect.o)); + var h1 = Math.sqrt(dx*dx + dy*dy); + var currA = Math.atan2(dy,dx); + var newA = currA - rect.r; + var x2 = Math.cos(newA) * h1; + var y2 = Math.sin(newA) * h1; + if (x2 > -0.5 * rect.w && x2 < 0.5 * rect.w && y2 > -0.5 * rect.h && y2 < 0.5 * rect.h) return true; + return false; + } + + Game.wrinklerHP=2.1; + Game.wrinklerLimit=14;//hard limit regardless of boosts + Game.wrinklers=[]; + for (var i=0;i4) Game.wrinklerSquishSound-=4; + } + Game.SpawnWrinkler=function(me) + { + if (!me) + { + var max=Game.getWrinklersMax(); + var n=0; + for (var i in Game.wrinklers) + { + if (Game.wrinklers[i].phase>0) n++; + } + for (var i in Game.wrinklers) + { + var it=Game.wrinklers[i]; + if (it.phase==0 && Game.elderWrath>0 && n0 && Game.wrinklers[i].hp>0) wrinklers.push(Game.wrinklers[i]); + } + if (wrinklers.length>0) + { + var me=choose(wrinklers); + me.hp=-10; + return me; + } + return false; + } + Game.UpdateWrinklers=function() + { + var xBase=0; + var yBase=0; + var onWrinkler=0; + if (Game.LeftBackground) + { + xBase=Game.cookieOriginX; + yBase=Game.cookieOriginY; + } + var max=Game.getWrinklersMax(); + var n=0; + for (var i in Game.wrinklers) + { + if (Game.wrinklers[i].phase>0) n++; + } + for (var i in Game.wrinklers) + { + var me=Game.wrinklers[i]; + if (me.phase==0 && Game.elderWrath>0 && n0) + { + if (me.close<1) me.close+=(1/Game.fps)/10; + if (me.close>1) me.close=1; + if (me.id>=max) me.hp=0; + } + else me.close=0; + if (me.close==1 && me.phase==1) + { + me.phase=2; + Game.recalculateGains=1; + } + if (me.phase==2) + { + me.sucked+=(((Game.cookiesPs/Game.fps)*Game.cpsSucked));//suck the cookies + } + if (me.phase>0) + { + if (me.type==0) + { + if (me.hp=50) Game.Win('Wrinkler poker'); + me.hurt=1; + me.hp-=0.75; + if (Game.prefs.particles && !Game.prefs.notScary && !Game.WINKLERS && !(me.hp<=0.5 && me.phase>0)) + { + var x=me.x+(Math.sin(me.r*Math.PI/180)*90); + var y=me.y+(Math.cos(me.r*Math.PI/180)*90); + for (var ii=0;ii<3;ii++) + { + //Game.particleAdd(x+Math.random()*50-25,y+Math.random()*50-25,Math.random()*4-2,Math.random()*-2-2,1,1,2,'wrinklerBits.png'); + var part=Game.particleAdd(x,y,Math.random()*4-2,Math.random()*-2-2,1,1,2,me.type==1?'shinyWrinklerBits.png':'wrinklerBits.png'); + part.r=-me.r; + } + } + } + Game.Click=0; + } + onWrinkler=1; + } + } + + if (me.hurt>0) + { + me.hurt-=5/Game.fps; + //me.close-=me.hurt*0.05; + //me.x+=Math.random()*2-1; + //me.y+=Math.random()*2-1; + me.r+=(Math.sin(Game.T*1)*me.hurt)*18;//Math.random()*2-1; + } + if (me.hp<=0.5 && me.phase>0) + { + Game.playWrinklerSquishSound(); + PlaySound('snd/pop'+Math.floor(Math.random()*3+1)+'.mp3',0.75); + Game.wrinklersPopped++; + Game.recalculateGains=1; + me.phase=0; + me.close=0; + me.hurt=0; + me.hp=3; + var toSuck=1.1; + if (Game.Has('Sacrilegious corruption')) toSuck*=1.05; + me.sucked*=1+Game.auraMult('Dragon Guts')*0.2; + if (me.type==1) toSuck*=3;//shiny wrinklers are an elusive, profitable breed + me.sucked*=toSuck;//cookie dough does weird things inside wrinkler digestive tracts + if (Game.Has('Wrinklerspawn')) me.sucked*=1.05; + if (Game.hasGod) + { + var godLvl=Game.hasGod('scorn'); + if (godLvl==1) me.sucked*=1.15; + else if (godLvl==2) me.sucked*=1.1; + else if (godLvl==3) me.sucked*=1.05; + } + if (me.sucked>0.5) + { + Game.Notify(me.type==1?loc("Exploded a shiny wrinkler"):loc("Exploded a wrinkler"),loc("Found %1!",loc("%1 cookie",LBeautify(me.sucked))),[19,8],6); + Game.Popup('
'+loc("+%1!",loc("%1 cookie",LBeautify(me.sucked)))+'
',Game.mouseX,Game.mouseY); + + if (Game.season=='halloween') + { + //if (Math.random()<(Game.HasAchiev('Spooky cookies')?0.2:0.05))//halloween cookie drops + var failRate=0.95; + if (Game.HasAchiev('Spooky cookies')) failRate=0.8; + if (Game.Has('Starterror')) failRate*=0.9; + failRate*=1/Game.dropRateMult(); + if (Game.hasGod) + { + var godLvl=Game.hasGod('seasons'); + if (godLvl==1) failRate*=0.9; + else if (godLvl==2) failRate*=0.95; + else if (godLvl==3) failRate*=0.97; + } + if (me.type==1) failRate*=0.9; + if (Math.random()>failRate)//halloween cookie drops + { + var cookie=choose(['Skull cookies','Ghost cookies','Bat cookies','Slime cookies','Pumpkin cookies','Eyeball cookies','Spider cookies']); + if (!Game.HasUnlocked(cookie) && !Game.Has(cookie)) + { + Game.Unlock(cookie); + Game.Notify(Game.Upgrades[cookie].dname,loc("You also found %1!",Game.Upgrades[cookie].dname),Game.Upgrades[cookie].icon); + } + } + } + Game.DropEgg(0.98); + } + if (me.type==1) Game.Win('Last Chance to See'); + Game.Earn(me.sucked); + /*if (Game.prefs.particles && !Game.WINKLERS) + { + var x=me.x+(Math.sin(me.r*Math.PI/180)*100); + var y=me.y+(Math.cos(me.r*Math.PI/180)*100); + for (var ii=0;ii<6;ii++) + { + Game.particleAdd(x+Math.random()*50-25,y+Math.random()*50-25,Math.random()*4-2,Math.random()*-2-2,1,1,2,'wrinklerBits.png'); + } + }*/ + if (Game.prefs.particles) + { + var x=me.x+(Math.sin(me.r*Math.PI/180)*90); + var y=me.y+(Math.cos(me.r*Math.PI/180)*90); + if (me.sucked>0) + { + for (var ii=0;ii<5;ii++) + { + Game.particleAdd(Game.mouseX,Game.mouseY,Math.random()*4-2,Math.random()*-2-2,Math.random()*0.5+0.75,1.5,2); + } + } + if (!Game.prefs.notScary && !Game.WINKLERS) + { + for (var ii=0;ii<8;ii++) + { + var part=Game.particleAdd(x,y,Math.random()*4-2,Math.random()*-2-2,1,1,2,me.type==1?'shinyWrinklerBits.png':'wrinklerBits.png'); + part.r=-me.r; + } + } + } + me.sucked=0; + } + } + if (onWrinkler) + { + Game.mousePointer=1; + } + } + Game.DrawWrinklers=function() + { + var ctx=Game.LeftBackground; + var selected=0; + for (var i in Game.wrinklers) + { + var me=Game.wrinklers[i]; + if (me.phase>0) + { + ctx.globalAlpha=me.close; + ctx.save(); + ctx.translate(me.x,me.y); + var sw=100+2*Math.sin(Game.T*0.2+i*3); + var sh=200+5*Math.sin(Game.T*0.2-2+i*3); + if (Game.prefs.fancy) + { + ctx.translate(0,30); + ctx.rotate(-(me.r)*Math.PI/180); + ctx.drawImage(Pic('wrinklerShadow.png'),-sw/2,-10,sw,sh); + ctx.rotate((me.r)*Math.PI/180); + ctx.translate(0,-30); + } + ctx.rotate(-(me.r)*Math.PI/180); + //var s=Math.min(1,me.sucked/(Game.cookiesPs*60))*0.75+0.25;//scale wrinklers as they eat + //ctx.scale(Math.pow(s,1.5)*1.25,s); + //ctx.fillRect(-50,-10,100,200); + var pic=Game.WINKLERS?'winkler.png':'wrinkler.png'; + if (me.type==1) pic=Game.WINKLERS?'shinyWinkler.png':'shinyWrinkler.png'; + else if (Game.season=='christmas') pic=Game.WINKLERS?'winterWinkler.png':'winterWrinkler.png'; + ctx.drawImage(Pic(pic),-sw/2,-10,sw,sh); + if (!Game.WINKLERS && Game.prefs.notScary) ctx.drawImage(Pic(Math.sin(Game.T*0.003+i*11+137+Math.sin(Game.T*0.017+i*13))>0.9997?'wrinklerBlink.png':'wrinklerGooglies.png'),-sw/2,-10+1*Math.sin(Game.T*0.2+i*3+1.2),sw,sh); + //ctx.drawImage(Pic(pic),-50,-10); + //ctx.fillText(me.id+' : '+me.sucked,0,0); + if (me.type==1 && Math.random()<0.3 && Game.prefs.particles)//sparkle + { + ctx.globalAlpha=Math.random()*0.65+0.1; + var s=Math.random()*30+5; + ctx.globalCompositeOperation='lighter'; + ctx.drawImage(Pic('glint.png'),-s/2+Math.random()*50-25,-s/2+Math.random()*200,s,s); + } + ctx.restore(); + + if (Game.prefs.particles && me.phase==2 && Math.random()<0.03) + { + Game.particleAdd(me.x,me.y,Math.random()*4-2,Math.random()*-2-2,Math.random()*0.5+0.5,1,2); + } + + if (me.selected) selected=me; + } + } + if (selected && Game.Has('Eye of the wrinkler')) + { + var x=Game.cookieOriginX; + var y=Game.cookieOriginY; + ctx.font='14px Merriweather'; + ctx.textAlign='center'; + var text=loc("Swallowed:"); + var width=Math.ceil(Math.max(ctx.measureText(text).width,ctx.measureText(Beautify(selected.sucked)).width)); + ctx.fillStyle='#000'; + ctx.globalAlpha=0.65; + /*ctx.strokeStyle='#000'; + ctx.lineWidth=8; + ctx.beginPath(); + ctx.moveTo(x,y); + ctx.lineTo(Math.floor(selected.x),Math.floor(selected.y)); + ctx.stroke();*/ + var xO=x-width/2-16; + var yO=y-4; + var dist=Math.floor(Math.sqrt((selected.x-xO)*(selected.x-xO)+(selected.y-yO)*(selected.y-yO))); + var angle=-Math.atan2(yO-selected.y,xO-selected.x)+Math.PI/2; + ctx.strokeStyle='#fff'; + ctx.lineWidth=1; + for (var i=0;i0.5) + { + number++; + if (Game.wrinklers[i].type==1) + { + shinies++; + amountShinies+=Game.wrinklers[i].sucked; + } + else amount+=Game.wrinklers[i].sucked; + } + } + return {amount:amount,number:number,shinies:shinies,amountShinies:amountShinies}; + } + Game.LoadWrinklers=function(amount,number,shinies,amountShinies) + { + if (number>0 && (amount>0 || amountShinies>0)) + { + var fullNumber=number-shinies; + var fullNumberShinies=shinies; + for (var i in Game.wrinklers) + { + if (number>0) + { + Game.wrinklers[i].phase=2; + Game.wrinklers[i].close=1; + Game.wrinklers[i].hp=3; + if (shinies>0) {Game.wrinklers[i].type=1;Game.wrinklers[i].sucked=amountShinies/fullNumberShinies;shinies--;} + else Game.wrinklers[i].sucked=amount/fullNumber; + number--; + }//respawn + } + } + } + + /*===================================================================================== + SPECIAL THINGS AND STUFF + =======================================================================================*/ + + + Game.specialTab=''; + Game.specialTabHovered=''; + Game.specialTabs=[]; + + Game.UpdateSpecial=function() + { + Game.specialTabs=[]; + if (Game.Has('A festive hat')) Game.specialTabs.push('santa'); + if (Game.Has('A crumbly egg')) Game.specialTabs.push('dragon'); + if (Game.specialTabs.length==0) {Game.ToggleSpecialMenu(0);return;} + + if (Game.LeftBackground) + { + Game.specialTabHovered=''; + var len=Game.specialTabs.length; + if (len==0) return; + var y=Game.LeftBackground.canvas.height-24-48*len; + for (var i=0;imoni && Game.santaLevel<14) + { + PlaySound('snd/shimmerClick.mp3'); + + Game.Spend(moni); + Game.santaLevel=(Game.santaLevel+1)%15; + if (Game.santaLevel==14) + { + Game.Unlock('Santa\'s dominion'); + Game.Notify(loc("You are granted %1.",Game.Upgrades['Santa\'s dominion'].dname),'',Game.Upgrades['Santa\'s dominion'].icon); + } + var drops=[]; + for (var i in Game.santaDrops) {if (!Game.HasUnlocked(Game.santaDrops[i])) drops.push(Game.santaDrops[i]);} + var drop=choose(drops); + if (drop) + { + Game.Unlock(drop); + Game.Notify(loc("Found a present!"),loc("You find a present which contains...")+'
'+Game.Upgrades[drop].dname+'!',Game.Upgrades[drop].icon); + } + + Game.ToggleSpecialMenu(1); + + if (l('specialPic')){var rect=l('specialPic').getBounds();Game.SparkleAt((rect.left+rect.right)/2,(rect.top+rect.bottom)/2)+32-TopBarOffset;} + + if (Game.santaLevel>=6) Game.Win('Coming to town'); + if (Game.santaLevel>=14) Game.Win('All hail Santa'); + Game.recalculateGains=1; + Game.upgradesToRebuild=1; + } + } + + Game.dragonLevels=[ + {name:'Dragon egg',action:loc("Chip it"),pic:0, + cost:function(){return Game.cookies>=1000000;}, + buy:function(){Game.Spend(1000000);}, + costStr:function(){return loc("%1 cookie",LBeautify(1000000));}}, + {name:'Dragon egg',action:loc("Chip it"),pic:1, + cost:function(){return Game.cookies>=1000000*2;}, + buy:function(){Game.Spend(1000000*2);}, + costStr:function(){return loc("%1 cookie",LBeautify(1000000*2));}}, + {name:'Dragon egg',action:loc("Chip it"),pic:2, + cost:function(){return Game.cookies>=1000000*4;}, + buy:function(){Game.Spend(1000000*4);}, + costStr:function(){return loc("%1 cookie",LBeautify(1000000*4));}}, + {name:'Shivering dragon egg',action:loc("Hatch it"),pic:3, + cost:function(){return Game.cookies>=1000000*8;}, + buy:function(){Game.Spend(1000000*8);}, + costStr:function(){return loc("%1 cookie",LBeautify(1000000*8));}}, + {name:'Krumblor, cookie hatchling',action:'Train Breath of Milk
Aura: kittens are 5% more effective',pic:4, + cost:function(){return Game.cookies>=1000000*16;}, + buy:function(){Game.Spend(1000000*16);}, + costStr:function(){return loc("%1 cookie",LBeautify(1000000*16));}}, + {name:'Krumblor, cookie hatchling',action:'Train Dragon Cursor
Aura: clicking is 5% more effective',pic:4,}, + {name:'Krumblor, cookie hatchling',action:'Train Elder Battalion
Aura: grandmas gain +1% CpS for every non-grandma building',pic:4,}, + {name:'Krumblor, cookie hatchling',action:'Train Reaper of Fields
Aura: golden cookies may trigger a Dragon Harvest',pic:4,}, + {name:'Krumblor, cookie dragon',action:'Train Earth Shatterer
Aura: buildings sell back for 50% instead of 25%',pic:5,}, + {name:'Krumblor, cookie dragon',action:'Train Master of the Armory
Aura: all upgrades are 2% cheaper',pic:5,}, + {name:'Krumblor, cookie dragon',action:'Train Fierce Hoarder
Aura: all buildings are 2% cheaper',pic:5,}, + {name:'Krumblor, cookie dragon',action:'Train Dragon God
Aura: prestige CpS bonus +5%',pic:5,}, + {name:'Krumblor, cookie dragon',action:'Train Arcane Aura
Aura: golden cookies appear 5% more often',pic:5,}, + {name:'Krumblor, cookie dragon',action:'Train Dragonflight
Aura: golden cookies may trigger a Dragonflight',pic:5,}, + {name:'Krumblor, cookie dragon',action:'Train Ancestral Metamorphosis
Aura: golden cookies give 10% more cookies',pic:5,}, + {name:'Krumblor, cookie dragon',action:'Train Unholy Dominion
Aura: wrath cookies give 10% more cookies',pic:5,}, + {name:'Krumblor, cookie dragon',action:'Train Epoch Manipulator
Aura: golden cookie effects last 5% longer',pic:5,}, + {name:'Krumblor, cookie dragon',action:'Train Mind Over Matter
Aura: +25% random drops',pic:5,}, + {name:'Krumblor, cookie dragon',action:'Train Radiant Appetite
Aura: all cookie production multiplied by 2',pic:5,}, + {name:'Krumblor, cookie dragon',action:'Train Dragon\'s Fortune
Aura: +123% CpS per golden cookie on-screen',pic:5,}, + {name:'Krumblor, cookie dragon',action:'Train Dragon\'s Curve
Aura: sugar lumps grow 5% faster, 50% weirder',pic:5,}, + {name:'Krumblor, cookie dragon',action:'Train Reality Bending
Aura: 10% of every other aura, combined',pic:5,}, + {name:'Krumblor, cookie dragon',action:'Train Dragon Orbs
Aura: selling your best building may grant a wish',pic:5,}, + {name:'Krumblor, cookie dragon',action:'Train Supreme Intellect
Aura: confers various powers to your minigames',pic:5,}, + {name:'Krumblor, cookie dragon',action:'Train Dragon Guts
Aura: enhanced wrinklers',pic:5,}, + {name:'Krumblor, cookie dragon',action:loc("Bake dragon cookie")+'
'+loc("Delicious!")+'',pic:6, + cost:function(){var fail=0;for (var i in Game.Objects){if (Game.Objects[i].amount<50) fail=1;}return (fail==0);}, + buy:function(){for (var i in Game.Objects){Game.Objects[i].sacrifice(50);}Game.Unlock('Dragon cookie');}, + costStr:function(){return loc("%1 of every building",50);}}, + {name:'Krumblor, cookie dragon',action:loc("Train secondary aura")+'
'+loc("Lets you use two dragon auras simultaneously")+'',pic:7, + cost:function(){var fail=0;for (var i in Game.Objects){if (Game.Objects[i].amount<200) fail=1;}return (fail==0);}, + buy:function(){for (var i in Game.Objects){Game.Objects[i].sacrifice(200);}}, + costStr:function(){return loc("%1 of every building",200);}}, + {name:'Krumblor, cookie dragon',action:loc("Your dragon is fully trained."),pic:8} + ]; + + Game.dragonAuras={ + 0:{name:'No aura',pic:[0,7],desc:loc("Select an aura from those your dragon knows.")}, + 1:{name:'Breath of Milk',pic:[18,25],desc:loc("Kittens are %1% more effective.",5)}, + 2:{name:'Dragon Cursor',pic:[0,25],desc:loc("Clicking is %1% more powerful.",5)}, + 3:{name:'Elder Battalion',pic:[1,25],desc:loc("Grandmas gain +%1% CpS for each non-grandma building.",1)}, + 4:{name:'Reaper of Fields',pic:[2,25],desc:loc("Golden cookies may trigger a Dragon Harvest.")}, + 5:{name:'Earth Shatterer',pic:[3,25],desc:loc("Buildings sell back for %1% instead of %2%.",[50,25])}, + 6:{name:'Master of the Armory',pic:[4,25],desc:loc("All upgrades are %1% cheaper.",2)}, + 7:{name:'Fierce Hoarder',pic:[15,25],desc:loc("All buildings are %1% cheaper.",2)}, + 8:{name:'Dragon God',pic:[16,25],desc:loc("+%1% prestige level effect on CpS.",5)}, + 9:{name:'Arcane Aura',pic:[17,25],desc:loc("Golden cookies appear %1% more often.",5)}, + 10:{name:'Dragonflight',pic:[5,25],desc:loc("Golden cookies may trigger a Dragonflight.")}, + 11:{name:'Ancestral Metamorphosis',pic:[6,25],desc:loc("Golden cookies give %1% more cookies.",10)}, + 12:{name:'Unholy Dominion',pic:[7,25],desc:loc("Wrath cookies give %1% more cookies.",10)}, + 13:{name:'Epoch Manipulator',pic:[8,25],desc:loc("Golden cookies stay %1% longer.",5)}, + 14:{name:'Mind Over Matter',pic:[13,25],desc:loc("Random drops are %1% more common.",25)}, + 15:{name:'Radiant Appetite',pic:[14,25],desc:loc("All cookie production multiplied by %1.",2)}, + 16:{name:'Dragon\'s Fortune',pic:[19,25],desc:loc("+%1% CpS per golden cookie on-screen, multiplicative.",123)}, + 17:{name:'Dragon\'s Curve',pic:[20,25],desc:loc("+%1% sugar lump growth.",5)+" "+loc("Sugar lumps are twice as likely to be unusual.")}, + 18:{name:'Reality Bending',pic:[32,25],desc:loc("One tenth of every other dragon aura, combined.")}, + 19:{name:'Dragon Orbs',pic:[33,25],desc:loc("With no buffs and no golden cookies on screen, selling your most powerful building has %1% chance to summon one.",10)}, + 20:{name:'Supreme Intellect',pic:[34,25],desc:loc("Confers various powers to your minigames while active.
See the bottom of each minigame for more details.")}, + 21:{name:'Dragon Guts',pic:[35,25],desc:loc("You can attract %1 more wrinklers.",2)+'
'+loc("Wrinklers digest %1% more cookies.",20)+'
'+loc("Wrinklers explode into %1% more cookies.",20)}, + }; + + Game.dragonAurasBN={};for (var i in Game.dragonAuras){Game.dragonAurasBN[Game.dragonAuras[i].name]=Game.dragonAuras[i];} + for (var i in Game.dragonAuras){Game.dragonAuras[i].id=parseInt(i);Game.dragonAuras[i].dname=loc(Game.dragonAuras[i].name);} + + for (var i=0;i=4 && i'+loc("Aura: %1",Game.dragonAuras[i-3].desc)+''; + if (i>=5) + { + it.costStr=function(building){return function(){return loc("%1 "+building.bsingle,LBeautify(100));}}(Game.ObjectsById[i-5]); + it.cost=function(building){return function(){return building.amount>=100;}}(Game.ObjectsById[i-5]); + it.buy=function(building){return function(){building.sacrifice(100);}}(Game.ObjectsById[i-5]); + } + } + } + + Game.hasAura=function(what) + { + if (Game.dragonAuras[Game.dragonAura].name==what || Game.dragonAuras[Game.dragonAura2].name==what) return true; else return false; + } + Game.auraMult=function(what) + { + var n=0; + if (Game.dragonAuras[Game.dragonAura].name==what || Game.dragonAuras[Game.dragonAura2].name==what) n=1; + if ((Game.dragonAuras[Game.dragonAura].name=='Reality Bending' || Game.dragonAuras[Game.dragonAura2].name=='Reality Bending') && Game.dragonLevel>=Game.dragonAurasBN[what].id+4) n+=0.1; + return n; + } + + Game.SelectDragonAura=function(slot,update) + { + var currentAura=0; + var otherAura=0; + if (slot==0) currentAura=Game.dragonAura; else currentAura=Game.dragonAura2; + if (slot==0) otherAura=Game.dragonAura2; else otherAura=Game.dragonAura; + if (!update) Game.SelectingDragonAura=currentAura; + + var str=''; + for (var i in Game.dragonAuras) + { + if (Game.dragonLevel>=parseInt(i)+4) + { + var icon=Game.dragonAuras[i].pic; + if (i==0 || i!=otherAura) str+='
'; + } + } + + var highestBuilding=0; + for (var i in Game.Objects) {if (Game.Objects[i].amount>0) highestBuilding=Game.Objects[i];} + + Game.Prompt('

'+loc(slot==1?"Set your dragon's secondary aura":"Set your dragon's aura")+'

'+ + '
'+ + '
'+ + '
'+str+'
'+ + '
'+ + '
'+(highestBuilding==0?loc("Switching your aura is free because you own no buildings."):loc("The cost of switching your aura is %1.
This will affect your CpS!",loc("%1 "+highestBuilding.bsingle,LBeautify(1))))+'
' + ,[[loc("Confirm"),(slot==0?'Game.dragonAura':'Game.dragonAura2')+'=Game.SelectingDragonAura;'+(highestBuilding==0 || currentAura==Game.SelectingDragonAura?'':'Game.ObjectsById['+highestBuilding.id+'].sacrifice(1);')+'Game.ToggleSpecialMenu(1);Game.ClosePrompt();'],loc("Cancel")],0,'widePrompt'); + Game.DescribeDragonAura(Game.SelectingDragonAura); + } + Game.SelectingDragonAura=-1; + Game.SetDragonAura=function(aura,slot) + { + Game.SelectingDragonAura=aura; + Game.SelectDragonAura(slot,1); + } + Game.DescribeDragonAura=function(aura) + { + l('dragonAuraInfo').innerHTML= + '

'+Game.dragonAuras[aura].dname+'

'+ + '
'+ + Game.dragonAuras[aura].desc+ + '
'; + } + + Game.UpgradeDragon=function() + { + if (Game.dragonLevel=Game.dragonLevels.length-1) Game.Win('Here be dragon'); + Game.ToggleSpecialMenu(1); + if (l('specialPic')){var rect=l('specialPic').getBounds();Game.SparkleAt((rect.left+rect.right)/2,(rect.top+rect.bottom)/2)+32-TopBarOffset;} + Game.recalculateGains=1; + Game.upgradesToRebuild=1; + } + } + + Game.lastClickedSpecialPic=0; + Game.ClickSpecialPic=function() + { + if (Game.specialTab=='dragon' && Game.dragonLevel>=4 && Game.Has('Pet the dragon') && l('specialPic')) + { + triggerAnim(l('specialPic'),'pucker'); + PlaySound('snd/click'+Math.floor(Math.random()*7+1)+'.mp3',0.3); + if (Date.now()-Game.lastClickedSpecialPic>2000) PlaySound('snd/growl.mp3'); + //else if (Math.random()<0.5) PlaySound('snd/growl.mp3',0.5+Math.random()*0.2); + Game.lastClickedSpecialPic=Date.now(); + if (Game.prefs.particles) + { + Game.particleAdd(Game.mouseX,Game.mouseY-32,Math.random()*4-2,Math.random()*-2-4,Math.random()*0.2+0.5,1,2,[20,3]); + } + if (Game.dragonLevel>=8 && Math.random()<1/20) + { + Math.seedrandom(Game.seed+'/dragonTime'); + var drops=['Dragon scale','Dragon claw','Dragon fang','Dragon teddy bear']; + drops=shuffle(drops); + var drop=drops[Math.floor((new Date().getMinutes()/60)*drops.length)]; + if (!Game.Has(drop) && !Game.HasUnlocked(drop)) + { + Game.Unlock(drop); + Game.Notify(drop,''+loc("Your dragon dropped something!")+'',Game.Upgrades[drop].icon); + } + Math.seedrandom(); + } + } + } + + Game.ToggleSpecialMenu=function(on) + { + if (on) + { + var pic=''; + var frame=0; + if (Game.specialTab=='santa') {pic='santa.png?v='+Game.version;frame=Game.santaLevel;} + else if (Game.specialTab=='dragon') {pic='dragon.png?v='+Game.version;frame=Game.dragonLevels[Game.dragonLevel].pic;} + else {pic='dragon.png?v='+Game.version;frame=4;} + + var str='
'; + str+='
x
'; + + if (Game.specialTab=='santa') + { + var moni=Math.pow(Game.santaLevel+1,Game.santaLevel+1); + + str+='

'+Game.santaLevels[Game.santaLevel]+'

'; + if (Game.santaLevel<14) + { + str+='
'+ + ''+ + ''; + } + } + else if (Game.specialTab=='dragon') + { + var level=Game.dragonLevels[Game.dragonLevel]; + + str+='

'+level.name+'

'; + + if (Game.dragonLevel>=5) + { + var icon=Game.dragonAuras[Game.dragonAura].pic; + str+='

'+Game.dragonAuras[Game.dragonAura].dname+'

'+ + '
'+ + Game.dragonAuras[Game.dragonAura].desc+ + '
' + ,'top')+ + '>'; + } + if (Game.dragonLevel>=27)//2nd aura slot; increased with last building + { + var icon=Game.dragonAuras[Game.dragonAura2].pic; + str+='

'+Game.dragonAuras[Game.dragonAura2].dname+'

'+ + '
'+ + Game.dragonAuras[Game.dragonAura2].desc+ + '
' + ,'top')+ + '>'; + } + + if (Game.dragonLevel'+ + '
'+level.action+'
'+ + '
|
'+ + '
'+loc("sacrifice %1",''+level.costStr()+'
')+''+ + '
'; + } + else + { + str+='
'+ + '
'+level.action+'
'; + } + } + + l('specialPopup').innerHTML=str; + + l('specialPopup').className='framed prompt onScreen'; + } + else + { + if (Game.specialTab!='') + { + Game.specialTab=''; + l('specialPopup').className='framed prompt offScreen'; + setTimeout(function(){if (Game.specialTab=='') {/*l('specialPopup').style.display='none';*/l('specialPopup').innerHTML='';}},1000*0.2); + } + } + } + Game.DrawSpecial=function() + { + var len=Game.specialTabs.length; + if (len==0) return; + Game.LeftBackground.globalAlpha=1; + var y=Game.LeftBackground.canvas.height-24-48*len; + var tabI=0; + + for (var i in Game.specialTabs) + { + var selected=0; + var hovered=0; + if (Game.specialTab==Game.specialTabs[i]) selected=1; + if (Game.specialTabHovered==Game.specialTabs[i]) hovered=1; + var x=24; + var s=1; + var pic=''; + var frame=0; + if (hovered) {s=1;x=24;} + if (selected) {s=1;x=48;} + + if (Game.specialTabs[i]=='santa') {pic='santa.png?v='+Game.version;frame=Game.santaLevel;} + else if (Game.specialTabs[i]=='dragon') {pic='dragon.png?v='+Game.version;frame=Game.dragonLevels[Game.dragonLevel].pic;} + else {pic='dragon.png?v='+Game.version;frame=4;} + + if (hovered || selected) + { + var ss=s*64; + var r=Math.floor((Game.T*0.5)%360); + Game.LeftBackground.save(); + Game.LeftBackground.translate(x,y); + if (Game.prefs.fancy) Game.LeftBackground.rotate((r/360)*Math.PI*2); + Game.LeftBackground.globalAlpha=0.75; + Game.LeftBackground.drawImage(Pic('shine.png'),-ss/2,-ss/2,ss,ss); + Game.LeftBackground.restore(); + } + + if (Game.prefs.fancy) Game.LeftBackground.drawImage(Pic(pic),96*frame,0,96,96,(x+(selected?0:Math.sin(Game.T*0.2+tabI)*3)-24*s),(y-(selected?6:Math.abs(Math.cos(Game.T*0.2+tabI))*6)-24*s),48*s,48*s); + else Game.LeftBackground.drawImage(Pic(pic),96*frame,0,96,96,(x-24*s),(y-24*s),48*s,48*s); + + tabI++; + y+=48; + } + + } + + /*===================================================================================== + VISUAL EFFECTS + =======================================================================================*/ + + Game.AllMilks=[ + {name:'Automatic',icon:[0,7],type:-1,pic:'milkPlain'}, + {name:'Plain milk',icon:[1,8],type:0,pic:'milkPlain'}, + {name:'Chocolate milk',icon:[2,8],type:0,pic:'milkChocolate'}, + {name:'Raspberry milk',icon:[3,8],type:0,pic:'milkRaspberry'}, + {name:'Orange milk',icon:[4,8],type:0,pic:'milkOrange'}, + {name:'Caramel milk',icon:[5,8],type:0,pic:'milkCaramel'}, + {name:'Banana milk',icon:[6,8],type:0,pic:'milkBanana'}, + {name:'Lime milk',icon:[7,8],type:0,pic:'milkLime'}, + {name:'Blueberry milk',icon:[8,8],type:0,pic:'milkBlueberry'}, + {name:'Strawberry milk',icon:[9,8],type:0,pic:'milkStrawberry'}, + {name:'Vanilla milk',icon:[10,8],type:0,pic:'milkVanilla'}, + {name:'Zebra milk',icon:[10,7],type:1,pic:'milkZebra'}, + {name:'Cosmic milk',icon:[9,7],type:1,pic:'milkStars'}, + {name:'Flaming milk',icon:[8,7],type:1,pic:'milkFire'}, + {name:'Sanguine milk',icon:[7,7],type:1,pic:'milkBlood'}, + {name:'Midas milk',icon:[6,7],type:1,pic:'milkGold'}, + {name:'Midnight milk',icon:[5,7],type:1,pic:'milkBlack'}, + {name:'Green inferno milk',icon:[4,7],type:1,pic:'milkGreenFire'}, + {name:'Frostfire milk',icon:[3,7],type:1,pic:'milkBlueFire'}, + {name:'Honey milk',icon:[21,23],type:0,pic:'milkHoney'}, + {name:'Coffee milk',icon:[22,23],type:0,pic:'milkCoffee'}, + {name:'Tea milk',icon:[23,23],type:0,pic:'milkTea'}, + {name:'Coconut milk',icon:[24,23],type:0,pic:'milkCoconut'}, + {name:'Cherry milk',icon:[25,23],type:0,pic:'milkCherry'}, + {name:'Soy milk',icon:[27,23],type:1,pic:'milkSoy'}, + {name:'Spiced milk',icon:[26,23],type:0,pic:'milkSpiced'}, + {name:'Maple milk',icon:[28,23],type:0,pic:'milkMaple'}, + {name:'Mint milk',icon:[29,23],type:0,pic:'milkMint'}, + {name:'Licorice milk',icon:[30,23],type:0,pic:'milkLicorice'}, + {name:'Rose milk',icon:[31,23],type:0,pic:'milkRose'}, + {name:'Dragonfruit milk',icon:[21,24],type:0,pic:'milkDragonfruit'}, + {name:'Melon milk',icon:[22,24],type:0,pic:'milkMelon'}, + {name:'Blackcurrant milk',icon:[23,24],type:0,pic:'milkBlackcurrant'}, + {name:'Peach milk',icon:[24,24],type:0,pic:'milkPeach'}, + {name:'Hazelnut milk',icon:[25,24],type:0,pic:'milkHazelnut'}, + ]; + + Game.Milks=[]; + for (var i=0;i=1 && Game.elderWrathD<2) + { + Game.bgR=(Game.elderWrathD-1)/1; + Game.bg=Game.defaultBg; + Game.bgFade='grandmas1'; + } + else if (Game.elderWrathD>=2 && Game.elderWrathD<3) + { + Game.bgR=(Game.elderWrathD-2)/1; + Game.bg='grandmas1'; + Game.bgFade='grandmas2'; + } + else if (Game.elderWrathD>=3)// && Game.elderWrathD<4) + { + Game.bgR=(Game.elderWrathD-3)/1; + Game.bg='grandmas2'; + Game.bgFade='grandmas3'; + } + + if (Game.bgType!=0 && Game.ascensionMode!=1) + { + Game.bgR=0; + Game.bg=Game.BGsByChoice[Game.bgType].pic; + Game.bgFade=Game.bg; + } + + Game.Background.fillPattern(Pic(Game.bg+'.jpg'),0,0,Game.Background.canvas.width,Game.Background.canvas.height,512,512,0,0); + if (Game.bgR>0) + { + Game.Background.globalAlpha=Game.bgR; + Game.Background.fillPattern(Pic(Game.bgFade+'.jpg'),0,0,Game.Background.canvas.width,Game.Background.canvas.height,512,512,0,0); + } + Game.Background.globalAlpha=1; + Game.Background.drawImage(Pic('shadedBordersSoft.png'),0,0,Game.Background.canvas.width,Game.Background.canvas.height); + } + + } + Timer.track('window background'); + + //clear + ctx.clearRect(0,0,ctx.canvas.width,ctx.canvas.height); + /*if (Game.AscendTimer=1000) pic='cookieShower3.png'; + else if (Game.cookiesPs>=500) pic='cookieShower2.png'; + else if (Game.cookiesPs>=50) pic='cookieShower1.png'; + else pic=''; + } + if (pic!='') + { + if (Game.elderWrathD>=1 && !Game.prefs.notScary) opacity=1-((Math.min(Game.elderWrathD,1.5)-1)/0.5); + ctx.globalAlpha=opacity; + var y=(Math.floor(Game.T*2)%512); + ctx.fillPattern(Pic(pic),0,0,ctx.canvas.width,ctx.canvas.height+512,512,512,0,y); + ctx.globalAlpha=1; + } + //snow + if (Game.season=='christmas') + { + var y=(Math.floor(Game.T*2.5)%512); + ctx.globalAlpha=0.75; + ctx.globalCompositeOperation='lighter'; + ctx.fillPattern(Pic('snow2.jpg'),0,0,ctx.canvas.width,ctx.canvas.height+512,512,512,0,y); + ctx.globalCompositeOperation='source-over'; + ctx.globalAlpha=1; + } + //hearts + if (Game.season=='valentines') + { + var y=(Math.floor(Game.T*2.5)%512); + ctx.globalAlpha=1; + ctx.fillPattern(Pic('heartStorm.png'),0,0,ctx.canvas.width,ctx.canvas.height+512,512,512,0,y); + ctx.globalAlpha=1; + } + Timer.track('left background'); + + Game.particlesDraw(0); + ctx.globalAlpha=1; + Timer.track('particles'); + + //big cookie shine + var s=512; + + var x=Game.cookieOriginX; + var y=Game.cookieOriginY; + + var r=Math.floor((Game.T*0.5)%360); + ctx.save(); + ctx.translate(x,y); + ctx.rotate((r/360)*Math.PI*2); + var alphaMult=1; + if (Game.bgType==2 || Game.bgType==4) alphaMult=0.5; + var pic='shine.png'; + if (goodBuff) {pic='shineGold.png';alphaMult=1;} + else if (badBuff) {pic='shineRed.png';alphaMult=1;} + if (goodBuff && Game.prefs.fancy) ctx.globalCompositeOperation='lighter'; + ctx.globalAlpha=0.5*alphaMult; + ctx.drawImage(Pic(pic),-s/2,-s/2,s,s); + ctx.rotate((-r*2/360)*Math.PI*2); + ctx.globalAlpha=0.25*alphaMult; + ctx.drawImage(Pic(pic),-s/2,-s/2,s,s); + ctx.restore(); + Timer.track('shine'); + + if (Game.ReincarnateTimer>0) + { + ctx.globalAlpha=1-Game.ReincarnateTimer/Game.ReincarnateDuration; + ctx.fillStyle='#000'; + ctx.fillRect(0,0,ctx.canvas.width,ctx.canvas.height); + ctx.globalAlpha=1; + } + + if (showDragon) + { + //big dragon + var s=300*2*(1+Math.sin(Game.T*0.013)*0.1); + var x=Game.cookieOriginX-s/2; + var y=Game.cookieOriginY-s/(1.4+0.2*Math.sin(Game.T*0.01)); + ctx.drawImage(Pic('dragonBG.png'),x,y,s,s); + } + + //big cookie + if (false)//don't do that + { + ctx.globalAlpha=1; + var amount=Math.floor(Game.cookies).toString(); + var digits=amount.length; + var space=0; + for (var i=0;i0) space-=s*(1-num/10)/2; + if (i==0 && num>1) space+=s*0.1; + for (var ii=0;ii0.997) w=1.5; + else if (w>0.994) w=0.5; + else w=0; + w*=-4; + if (fancy) w+=Math.sin((n+Game.T*0.01)*Math.PI/2)*4; + var x=0; + var y=(140/* *Game.BigCookieSize*/+n*16+w)-16; + + var rot=7.2;//(1/50)*360 + if (i==0 && fancy) rot-=Game.T*0.1; + if (i%50==0) rot+=7.2/2; + ctx.rotate((rot/360)*Math.PI*2); + ctx.drawImage(pic,0,0,32,32,x,y,32,32); + //ctx.drawImage(pic,32*(i==spe),0,32,32,x,y,32,32); + + /*if (i==spe) + { + y+=16; + x=Game.cookieOriginX+Math.sin(-((r-5)/360)*Math.PI*2)*y; + y=Game.cookieOriginY+Math.cos(-((r-5)/360)*Math.PI*2)*y; + if (Game.CanClick && ctx && Math.abs(Game.mouseX-x)<16 && Math.abs(Game.mouseY-y)<16) Game.mousePointer=1; + }*/ + } + ctx.restore(); + Timer.track('cursors'); + } + } + else + { + var tBase=Math.max(0,(Game.AscendTimer-Game.AscendBreakpoint)/(Game.AscendDuration-Game.AscendBreakpoint)); + //big crumbling cookie + //var t=(3*Math.pow(tBase,2)-2*Math.pow(tBase,3));//S curve + var t=Math.pow(tBase,0.5); + + var shake=0; + if (Game.AscendTimer0) + { + ctx.save(); + ctx.globalAlpha=1-Math.pow(t,0.5); + ctx.translate(x,y); + ctx.globalCompositeOperation='lighter'; + ctx.rotate(Game.T*0.007); + s=0.5+Math.pow(tBase,0.6)*1; + var s2=(600)*s; + ctx.drawImage(Pic('heavenRing1.jpg'),-s2/2,-s2/2,s2,s2); + ctx.rotate(-Game.T*0.002); + s=0.5+Math.pow(1-tBase,0.4)*1; + s2=(600)*s; + ctx.drawImage(Pic('heavenRing2.jpg'),-s2/2,-s2/2,s2,s2); + ctx.restore(); + } + + s=256;//*Game.BigCookieSize; + + ctx.save(); + ctx.translate(x,y); + ctx.rotate((t*(-0.1))*Math.PI*2); + + var chunks={0:7,1:6,2:3,3:2,4:8,5:1,6:9,7:5,8:0,9:4}; + s*=t/2+1; + /*ctx.globalAlpha=(1-t)*0.33; + for (var i=0;i<10;i++) + { + var d=(t-0.2)*(80+((i+2)%3)*40); + ctx.drawImage(Pic('brokenCookie.png'),256*(chunks[i]),0,256,256,-s/2+Math.sin(-(((chunks[i]+4)%10)/10)*Math.PI*2)*d,-s/2+Math.cos(-(((chunks[i]+4)%10)/10)*Math.PI*2)*d,s,s); + } + ctx.globalAlpha=(1-t)*0.66; + for (var i=0;i<10;i++) + { + var d=(t-0.1)*(80+((i+2)%3)*40); + ctx.drawImage(Pic('brokenCookie.png'),256*(chunks[i]),0,256,256,-s/2+Math.sin(-(((chunks[i]+4)%10)/10)*Math.PI*2)*d,-s/2+Math.cos(-(((chunks[i]+4)%10)/10)*Math.PI*2)*d,s,s); + }*/ + ctx.globalAlpha=1-t; + for (var i=0;i<10;i++) + { + var d=(t)*(80+((i+2)%3)*40); + var x2=(Math.random()*2-1)*5*shake; + var y2=(Math.random()*2-1)*5*shake; + ctx.drawImage(Pic('brokenCookie.png'),256*(chunks[i]),0,256,256,-s/2+Math.sin(-(((chunks[i]+4)%10)/10)*Math.PI*2)*d+x2,-s/2+Math.cos(-(((chunks[i]+4)%10)/10)*Math.PI*2)*d+y2,s,s); + } + var brokenHalo=1-Math.min(t/(1/3),1/3)*3; + if (Game.AscendTimer0) + { + ctx.globalAlpha=1-tBase/0.1; + ctx.fillStyle='#fff'; + ctx.fillRect(0,0,ctx.canvas.width,ctx.canvas.height); + ctx.globalAlpha=1; + } + if (tBase>0.8) + { + ctx.globalAlpha=(tBase-0.8)/0.2; + ctx.fillStyle='#000'; + ctx.fillRect(0,0,ctx.canvas.width,ctx.canvas.height); + ctx.globalAlpha=1; + } + } + + //milk and milk accessories + if (Game.prefs.milk) + { + var width=ctx.canvas.width; + var height=ctx.canvas.height; + var x=Math.floor((Game.T*2-(Game.milkH-Game.milkHd)*2000+480*2)%480);//Math.floor((Game.T*2+Math.sin(Game.T*0.1)*2+Math.sin(Game.T*0.03)*2-(Game.milkH-Game.milkHd)*2000+480*2)%480); + var y=(Game.milkHd)*height;//(((Game.milkHd)*ctx.canvas.height)*(1+0.05*(Math.sin(Game.T*0.017)/2+0.5))); + var a=1; + if (Game.AscendTimer>0) + { + y*=1-Math.pow((Game.AscendTimer/Game.AscendBreakpoint),2)*2; + a*=1-Math.pow((Game.AscendTimer/Game.AscendBreakpoint),2)*2; + } + else if (Game.ReincarnateTimer>0) + { + y*=1-Math.pow(1-(Game.ReincarnateTimer/Game.ReincarnateDuration),2)*2; + a*=1-Math.pow(1-(Game.ReincarnateTimer/Game.ReincarnateDuration),2)*2; + } + + if (Game.TOYS) + { + //golly + if (!Game.Toy) + { + Game.toys=[]; + Game.toysType=choose([1,2]); + Game.Toy=function(x,y) + { + this.id=Game.toys.length; + this.x=x; + this.y=y; + this.xd=Math.random()*10-5; + this.yd=Math.random()*10-5; + this.r=Math.random()*Math.PI*2; + this.rd=Math.random()*0.1-0.05; + var v=Math.random();var a=0.5;var b=0.5; + if (v<=a) v=b-b*Math.pow(1-v/a,3); else v=b+(1-b)*Math.pow((v-a)/(1-a),3); + this.s=(Game.toysType==1?64:48)*(0.1+v*1.9); + if (Game.toysType==2) this.s=(this.id%10==1)?96:48; + this.st=this.s;this.s=0; + var cookies=[[10,0]]; + for (var i in Game.Upgrades) + { + var cookie=Game.Upgrades[i]; + if (cookie.bought>0 && cookie.pool=='cookie') cookies.push(cookie.icon); + } + this.icon=choose(cookies); + this.dragged=false; + this.l=document.createElement('div'); + this.l.innerHTML=this.id; + this.l.style.cssText='cursor:pointer;border-radius:'+(this.s/2)+'px;opacity:0;width:'+this.s+'px;height:'+this.s+'px;background:#999;position:absolute;left:0px;top:0px;z-index:10000000;transform:translate(-1000px,-1000px);'; + l('sectionLeft').appendChild(this.l); + AddEvent(this.l,'mousedown',function(what){return function(){what.dragged=true;};}(this)); + AddEvent(this.l,'mouseup',function(what){return function(){what.dragged=false;};}(this)); + Game.toys.push(this); + return this; + } + for (var i=0;i=height-(Game.milkHd)*height+8) + { + me.xd*=0.85; + me.yd*=0.85; + me.rd*=0.85; + me.yd-=1; + me.xd+=(Math.random()*1-0.5)*0.3; + me.yd+=(Math.random()*1-0.5)*0.05; + me.rd+=(Math.random()*1-0.5)*0.02; + } + else + { + me.xd*=0.99; + me.rd*=0.99; + me.yd+=1; + } + me.yd*=(Math.min(1,Math.abs(me.y-(height-(Game.milkHd)*height)/16))); + me.rd+=me.xd*0.01/(me.s/(Game.toysType==1?64:48)); + if (me.xwidth-me.s/2 && me.xd>0) me.xd=Math.min(-0.1,-me.xd*0.6); else if (me.x>width-me.s/2) {me.xd=0;me.x=width-me.s/2;} + me.xd=Math.min(Math.max(me.xd,-30),30); + me.yd=Math.min(Math.max(me.yd,-30),30); + me.rd=Math.min(Math.max(me.rd,-0.5),0.5); + me.x+=me.xd; + me.y+=me.yd; + me.r+=me.rd; + me.r=me.r%(Math.PI*2); + me.s+=(me.st-me.s)*0.5; + if (Game.toysType==2 && !me.dragged && Math.random()<0.003) me.st=choose([48,48,48,48,96]); + if (me.dragged) + { + me.x=Game.mouseX; + me.y=Game.mouseY; + me.xd+=((Game.mouseX-Game.mouseX2)*3-me.xd)*0.5; + me.yd+=((Game.mouseY-Game.mouseY2)*3-me.yd)*0.5 + me.l.style.transform='translate('+(me.x-me.s/2)+'px,'+(me.y-me.s/2)+'px) scale(50)'; + } + else me.l.style.transform='translate('+(me.x-me.s/2)+'px,'+(me.y-me.s/2)+'px)'; + me.l.style.width=me.s+'px'; + me.l.style.height=me.s+'px'; + ctx.save(); + ctx.translate(me.x,me.y); + ctx.rotate(me.r); + if (Game.toysType==1) ctx.drawImage(Pic('smallCookies.png'),(me.id%8)*64,0,64,64,-me.s/2,-me.s/2,me.s,me.s); + else ctx.drawImage(Pic('icons.png'),me.icon[0]*48,me.icon[1]*48,48,48,-me.s/2,-me.s/2,me.s,me.s); + ctx.restore(); + } + } + + var pic=Game.Milk.pic; + if (Game.milkType!=0 && Game.ascensionMode!=1) pic=Game.AllMilks[Game.milkType].pic; + ctx.globalAlpha=0.95*a; + ctx.fillPattern(Pic(pic),0,height-y,width+480,1,480,480,x,0); + + ctx.fillStyle='#000'; + ctx.fillRect(0,height-y+480,width,Math.max(0,(y-480))); + ctx.globalAlpha=1; + + Timer.track('milk'); + } + + if (Game.AscendTimer>0) + { + ctx.drawImage(Pic('shadedBordersSoft.png'),0,0,ctx.canvas.width,ctx.canvas.height); + } + + if (Game.AscendTimer==0) + { + Game.DrawWrinklers();Timer.track('wrinklers'); + + //shimmering veil + if (Game.Has('Shimmering veil [off]')) + { + ctx.globalAlpha=1; + ctx.globalCompositeOperation='lighter'; + var s=300+Math.sin(Game.T*0.037)*20; + var x=Game.cookieOriginX; + var y=Game.cookieOriginY; + ctx.save(); + ctx.translate(x,y); + ctx.rotate(-Game.T*0.01); + ctx.drawImage(Pic('shimmeringVeil.png'),-s/2,-s/2,s,s); + ctx.restore(); + if (Game.prefs.particles)//sparkles + { + for (i=0;i<6;i++) + { + var t=Game.T+i*15; + var r=(t%30)/30; + var a=(Math.floor(t/30)*30*6-i*30)*0.01; + var size=32*(1-Math.pow(r*2-1,2)); + var xx=x+Math.sin(a)*(110+r*16); + var yy=y+Math.cos(a)*(110+r*16); + ctx.drawImage(Pic('glint.png'),xx-size/2,yy-size/2,size,size); + } + } + ctx.globalCompositeOperation='source-over'; + } + + Game.DrawSpecial();Timer.track('evolvables'); + + Game.particlesDraw(2);Timer.track('text particles'); + + //shiny border during frenzies etc + ctx.globalAlpha=1; + var borders='shadedBordersSoft.png'; + if (goodBuff) borders='shadedBordersGold.png'; + else if (badBuff) borders='shadedBordersRed.png'; + if (goodBuff && Game.prefs.fancy) ctx.globalCompositeOperation='lighter'; + ctx.drawImage(Pic(borders),0,0,ctx.canvas.width,ctx.canvas.height); + if (goodBuff && Game.prefs.fancy) ctx.globalCompositeOperation='source-over'; + } + } + }; + + + /*===================================================================================== + INITIALIZATION END; GAME READY TO LAUNCH + =======================================================================================*/ + + Game.killShimmers(); + + //booooo + Game.RuinTheFun=function(silent) + { + Game.popups=0; + Game.SetAllUpgrades(1); + Game.SetAllAchievs(1); + Game.popups=0; + Game.Earn(999999999999999999999999999999); + Game.MaxSpecials(); + Game.nextResearch=0; + Game.researchT=-1; + Game.upgradesToRebuild=1; + Game.recalculateGains=1; + Game.popups=1; + for (var i in Game.Objects) + { + var me=Game.Objects[i]; + if (me.level<10) + { + me.level=9; + me.levelUp(true); + } + if (me.minigame && me.minigame.onRuinTheFun) me.minigame.onRuinTheFun(); + } + if (!silent) + { + Game.Notify('Thou doth ruineth the fun!','You\'re free. Free at last.',[11,5]); + } + return 'You feel a bitter taste in your mouth...'; + } + + Game.SetAllUpgrades=function(on) + { + Game.popups=0; + var leftout=['Magic shenanigans','Occult obstruction','Glucose-charged air']; + for (var i in Game.Upgrades) + { + if (on && (Game.Upgrades[i].pool=='toggle' || leftout.indexOf(Game.Upgrades[i].name)!=-1)) {} + else if (on) Game.Upgrades[i].earn(); + else if (!on) Game.Upgrades[i].lose(); + } + Game.upgradesToRebuild=1; + Game.recalculateGains=1; + Game.popups=1; + } + Game.SetAllAchievs=function(on) + { + Game.popups=0; + for (var i in Game.Achievements) + { + if (on && Game.Achievements[i].pool!='dungeon') Game.Win(Game.Achievements[i].name); + else if (!on) Game.RemoveAchiev(Game.Achievements[i].name); + } + Game.recalculateGains=1; + Game.popups=1; + } + Game.GetAllDebugs=function() + { + Game.popups=0; + for (var i in Game.Upgrades) + { + if (Game.Upgrades[i].pool=='debug') Game.Upgrades[i].earn(); + } + Game.upgradesToRebuild=1; + Game.recalculateGains=1; + Game.popups=1; + } + Game.MaxSpecials=function() + { + Game.dragonLevel=Game.dragonLevels.length-1; + Game.santaLevel=Game.santaLevels.length-1; + } + + Game.SesameReset=function() + { + var name=Game.bakeryName; + Game.HardReset(2); + Game.bakeryName=name; + Game.bakeryNameRefresh(); + Game.Achievements['Cheated cookies taste awful'].won=1; + } + + Game.debugTimersOn=0; + Game.sesame=0; + Game.OpenSesame=function() + { + var str=''; + str+='
'; + str+='
'; + + str+='
'; + str+='
Dev tools
'; + + str+='Ascend'; + str+='
'; + str+='x10'; + str+='/10
'; + str+='x1k'; + str+='/1k
'; + str+='Buy 100 of all';//for (var n=0;n<100;n++){for (var i in Game.Objects){Game.Objects[i].buy(1);}} + str+='Sell 100 of all
'; + str+='+10 lumps'; + str+='Reset levels'; + str+='HC x1k'; + str+='HC /1k
';//wee bit inaccurate + str+='Reset cookies earned
'; + str+='
'; + str+='Ruin The Fun'; + str+='Wipe'; + str+='All debugs'; + str+='Timers '+(Game.debugTimersOn?'On':'Off')+'
'; + str+='No upgrades'; + str+='All upgrades
'; + str+='No achievs'; + str+='All achievs
'; + str+='Reset specials'; + str+='Max specials
'; + str+='Reset refills'; + str+=''+(Game.DebuggingPrestige?'Exit Ascend Edit':'Ascend Edit')+''; + str+='Debug upgrades CpS'; + str+='Re-seed'; + str+='Max heralds'; + str+='
'; + for (var i=0;i'+Game.goldenCookieChoices[i*2]+''; + //str+=''+Game.goldenCookie.choices[i*2]+''; + //str+=''+Game.goldenCookie.choices[i*2]+''; + } + str+='
'; + + l('devConsole').innerHTML=str; + + if (!l('fpsGraph')) + { + var div=document.createElement('canvas'); + div.id='fpsGraph'; + div.width=128; + div.height=64; + div.style.opacity=0.5; + div.style.pointerEvents='none'; + div.style.transformOrigin='0% 0%'; + div.style.transform='scale(0.75)'; + //l('devConsole').appendChild(div); + l('devConsole').parentNode.insertBefore(div,l('devConsole').nextSibling); + Game.fpsGraph=div; + Game.fpsGraphCtx=Game.fpsGraph.getContext('2d',{alpha:false}); + var ctx=Game.fpsGraphCtx; + ctx.fillStyle='#000'; + ctx.fillRect(0,0,128,64); + } + + l('debug').style.display='block'; + Game.sesame=1; + Game.Achievements['Cheated cookies taste awful'].won=1; + } + + + Game.loadAscendCalibrator=function() + { + Game.loadAscendCalibrator=0; + var script=document.createElement('script'); + script.setAttribute('src','ascendCalibrator.js'+'?r='+Game.version); + document.head.appendChild(script); + } + Game.EditAscend=function() + { + if (!Game.DebuggingPrestige) + { + if (Game.loadAscendCalibrator) Game.loadAscendCalibrator(); + Game.DebuggingPrestige=true; + Game.AscendTimer=0; + Game.OnAscend=1; + Game.removeClass('ascendIntro'); + Game.addClass('ascending'); + } + else + { + Game.DebuggingPrestige=false; + } + Game.BuildAscendTree(); + Game.OpenSesame(); + } + + //experimental debugging function that cycles through every owned upgrade, turns it off and on, and lists how much each upgrade is participating to CpS + Game.debuggedUpgradeCpS=[]; + Game.debuggedUpgradeCpClick=[]; + Game.debugColors=['#322','#411','#600','#900','#f30','#f90','#ff0','#9f0','#0f9','#09f','#90f']; + Game.DebugUpgradeCpS=function() + { + Game.CalculateGains(); + Game.debuggedUpgradeCpS=[]; + Game.debuggedUpgradeCpClick=[]; + var CpS=Game.cookiesPs; + var CpClick=Game.computedMouseCps; + for (var i in Game.Upgrades) + { + var me=Game.Upgrades[i]; + if (me.bought) + { + me.bought=0; + Game.CalculateGains(); + //Game.debuggedUpgradeCpS[me.name]=CpS-Game.cookiesPs; + Game.debuggedUpgradeCpS[me.name]=(CpS/(Game.cookiesPs||1)-1); + Game.debuggedUpgradeCpClick[me.name]=(CpClick/(Game.computedMouseCps||1)-1); + me.bought=1; + } + } + Game.CalculateGains(); + } + + Game.vanilla=0;//everything we create beyond this will be saved in mod structures + + Game.launchMods(); + + Game.runModHook('create');//declare custom upgrades/achievs/buffs/buildings here! + + BeautifyAll(); + + if (!App) + { + if (!Game.LoadSave()) + {//try to load the save when we open the page. if this fails, try to brute-force it half a second later + setTimeout(function(){ + var local=localStorageGet(Game.SaveTo); + Game.LoadSave(local); + },500); + } + } + else if (App.saveData) setTimeout(function(){Game.LoadSave(App.saveData);},100); + else setTimeout(function(){Game.LoadSave();},100); + + Game.ready=1; + setTimeout(function(){if (typeof showAds==='undefined' && (!l('detectAds') || l('detectAds').clientHeight<1)) Game.addClass('noAds');},500); + l('offGameMessage').innerHTML=''; + l('offGameMessageWrap').style.display='none'; + Game.Loop(); + Game.Draw(); + + PlayCue('launch'); + + if (!EN) + { + var adaptWidth=function(node) + { + var el=node.firstChild; + var width=el.clientWidth; + if (el.classList.contains('subButton')) + { + if (width/95>1) el.style.padding='6px 0px'; + } + width=width/95; + if (width>1) + { + el.style.fontSize=(parseInt(window.getComputedStyle(el).fontSize)*1/width)+'px'; + el.style.transform='scale(1,'+(width)+')'; + } + } + l('prefsButton').firstChild.innerHTML=loc("Options"); + l('statsButton').firstChild.innerHTML=loc("Stats"); + l('logButton').firstChild.innerHTML=loc("Info"); + l('legacyButton').firstChild.innerHTML=loc("Legacy"); + adaptWidth(l('prefsButton')); + adaptWidth(l('statsButton')); + adaptWidth(l('logButton')); + adaptWidth(l('legacyButton')); + l('checkForUpdate').childNodes[0].textContent=loc("New update!"); + l('buildingsTitle').childNodes[0].textContent=loc("Buildings"); + l('storeTitle').childNodes[0].textContent=loc("Store"); + } + } + /*===================================================================================== + LOGIC + =======================================================================================*/ + Game.Logic=function() + { + Game.bounds=Game.l.getBounds(); + + if (!Game.OnAscend && Game.AscendTimer==0) + { + for (var i in Game.Objects) + { + if (Game.Objects[i].eachFrame) Game.Objects[i].eachFrame(); + } + Game.UpdateSpecial(); + Game.UpdateGrandmapocalypse(); + + //these are kinda fun + //if (Game.BigCookieState==2 && !Game.promptOn && Game.Scroll!=0) Game.ClickCookie(); + //if (Game.BigCookieState==1 && !Game.promptOn) Game.ClickCookie(); + + //handle graphic stuff + if (Game.prefs.wobbly) + { + if (Game.BigCookieState==1) Game.BigCookieSizeT=0.98; + else if (Game.BigCookieState==2) Game.BigCookieSizeT=1.05; + else Game.BigCookieSizeT=1; + Game.BigCookieSizeD+=(Game.BigCookieSizeT-Game.BigCookieSize)*0.75; + Game.BigCookieSizeD*=0.75; + Game.BigCookieSize+=Game.BigCookieSizeD; + Game.BigCookieSize=Math.max(0.1,Game.BigCookieSize); + } + else + { + if (Game.BigCookieState==1) Game.BigCookieSize+=(0.98-Game.BigCookieSize)*0.5; + else if (Game.BigCookieState==2) Game.BigCookieSize+=(1.05-Game.BigCookieSize)*0.5; + else Game.BigCookieSize+=(1-Game.BigCookieSize)*0.5; + } + Game.particlesUpdate(); + + if (Game.mousePointer) l('sectionLeft').style.cursor='pointer'; + else l('sectionLeft').style.cursor='auto'; + Game.mousePointer=0; + + //handle milk and milk accessories + Game.milkProgress=Game.AchievementsOwned/25; + if (Game.milkProgress>=0.5) Game.Unlock('Kitten helpers'); + if (Game.milkProgress>=1) Game.Unlock('Kitten workers'); + if (Game.milkProgress>=2) Game.Unlock('Kitten engineers'); + if (Game.milkProgress>=3) Game.Unlock('Kitten overseers'); + if (Game.milkProgress>=4) Game.Unlock('Kitten managers'); + if (Game.milkProgress>=5) Game.Unlock('Kitten accountants'); + if (Game.milkProgress>=6) Game.Unlock('Kitten specialists'); + if (Game.milkProgress>=7) Game.Unlock('Kitten experts'); + if (Game.milkProgress>=8) Game.Unlock('Kitten consultants'); + if (Game.milkProgress>=9) Game.Unlock('Kitten assistants to the regional manager'); + if (Game.milkProgress>=10) Game.Unlock('Kitten marketeers'); + if (Game.milkProgress>=11) Game.Unlock('Kitten analysts'); + if (Game.milkProgress>=12) Game.Unlock('Kitten executives'); + if (Game.milkProgress>=13) Game.Unlock('Kitten admins'); + if (Game.milkProgress>=14) Game.Unlock('Kitten strategists'); + Game.milkH=Math.min(1,Game.milkProgress)*0.35; + Game.milkHd+=(Game.milkH-Game.milkHd)*0.02; + + Game.Milk=Game.Milks[Math.min(Math.floor(Game.milkProgress),Game.Milks.length-1)]; + + if (Game.autoclickerDetected>0) Game.autoclickerDetected--; + + //handle research + if (Game.researchT>0) + { + Game.researchT--; + } + if (Game.researchT==0 && Game.nextResearch) + { + if (!Game.Has(Game.UpgradesById[Game.nextResearch].name)) + { + Game.Unlock(Game.UpgradesById[Game.nextResearch].name); + Game.Notify(loc("Research complete"),loc("You have discovered: %1.",Game.UpgradesById[Game.nextResearch].dname),Game.UpgradesById[Game.nextResearch].icon); + } + Game.nextResearch=0; + Game.researchT=-1; + Game.recalculateGains=1; + } + //handle seasons + if (Game.seasonT>0) + { + Game.seasonT--; + } + if (Game.seasonT<=0 && Game.season!='' && Game.season!=Game.baseSeason && !Game.Has('Eternal seasons')) + { + Game.Notify(Game.seasons[Game.season].over,'',Game.seasons[Game.season].triggerUpgrade.icon); + if (Game.Has('Season switcher')) {Game.Unlock(Game.seasons[Game.season].trigger);Game.seasons[Game.season].triggerUpgrade.bought=0;} + Game.season=Game.baseSeason; + Game.seasonT=-1; + } + + //press ctrl to bulk-buy 10, shift to bulk-buy 100 + if (!Game.promptOn) + { + if ((Game.keys[16] || Game.keys[17]) && !Game.buyBulkShortcut) + { + Game.buyBulkOld=Game.buyBulk; + if (Game.keys[16]) Game.buyBulk=100; + if (Game.keys[17]) Game.buyBulk=10; + Game.buyBulkShortcut=1; + Game.storeBulkButton(-1); + } + } + if ((!Game.keys[16] && !Game.keys[17]) && Game.buyBulkShortcut)//release + { + Game.buyBulk=Game.buyBulkOld; + Game.buyBulkShortcut=0; + Game.storeBulkButton(-1); + } + + //handle cookies + if (Game.recalculateGains) Game.CalculateGains(); + Game.Earn(Game.cookiesPs/Game.fps);//add cookies per second + + //grow lumps + Game.doLumps(); + + //minigames + for (var i in Game.Objects) + { + var me=Game.Objects[i]; + if (Game.isMinigameReady(me) && me.minigame.logic && Game.ascensionMode!=1) me.minigame.logic(); + } + + if (Game.specialTab!='' && Game.T%(Game.fps*3)==0) Game.ToggleSpecialMenu(1); + + //wrinklers + if (Game.cpsSucked>0) + { + Game.Dissolve((Game.cookiesPs/Game.fps)*Game.cpsSucked); + Game.cookiesSucked+=((Game.cookiesPs/Game.fps)*Game.cpsSucked); + //should be using one of the following, but I'm not sure what I'm using this stat for anymore + //Game.cookiesSucked=Game.wrinklers.reduce(function(s,w){return s+w.sucked;},0); + //for (var i in Game.wrinklers) {Game.cookiesSucked+=Game.wrinklers[i].sucked;} + } + + //var cps=Game.cookiesPs+Game.cookies*0.01;//exponential cookies + //Game.Earn(cps/Game.fps);//add cookies per second + + for (var i in Game.Objects) + { + var me=Game.Objects[i]; + me.totalCookies+=(me.storedTotalCps*Game.globalCpsMult)/Game.fps; + } + if (Game.prefs.particles && Game.cookies && Game.T%Math.ceil(Game.fps/Math.min(10,Game.cookiesPs))==0) Game.particleAdd();//cookie shower + + if (Game.T%(Game.fps*10)==0) Game.recalculateGains=1;//recalculate CpS every 10 seconds (for dynamic boosts such as Century egg) + + /*===================================================================================== + UNLOCKING STUFF + =======================================================================================*/ + if (Game.T%(Game.fps)==0 && Math.random()<1/1000000) Game.Win('Just plain lucky');//1 chance in 1,000,000 every second achievement + if (Game.T%(Game.fps*5)==0 && Game.ObjectsById.length>0)//check some achievements and upgrades + { + if (isNaN(Game.cookies)) {Game.cookies=0;Game.cookiesEarned=0;Game.recalculateGains=1;} + + var timePlayed=new Date(); + timePlayed.setTime(Date.now()-Game.startDate); + + if (!Game.fullDate || (Date.now()-Game.fullDate)>=365*24*60*60*1000) Game.Win('So much to do so much to see'); + + if (Game.cookiesEarned>=1000000 && (Game.ascensionMode==1 || Game.resets==0))//challenge run or hasn't ascended yet + { + if (timePlayed<=1000*60*35) Game.Win('Speed baking I'); + if (timePlayed<=1000*60*25) Game.Win('Speed baking II'); + if (timePlayed<=1000*60*15) Game.Win('Speed baking III'); + + if (Game.cookieClicks<=15) Game.Win('Neverclick'); + if (Game.cookieClicks<=0) Game.Win('True Neverclick'); + if (Game.cookiesEarned>=1000000000 && Game.UpgradesOwned==0) Game.Win('Hardcore'); + } + + for (var i in Game.UnlockAt) + { + var unlock=Game.UnlockAt[i]; + if (Game.cookiesEarned>=unlock.cookies) + { + var pass=1; + if (unlock.require && !Game.Has(unlock.require) && !Game.HasAchiev(unlock.require)) pass=0; + if (unlock.season && Game.season!=unlock.season) pass=0; + if (pass) {Game.Unlock(unlock.name);Game.Win(unlock.name);} + } + } + + if (Game.Has('Golden switch')) Game.Unlock('Golden switch [off]'); + if (Game.Has('Shimmering veil') && !Game.Has('Shimmering veil [off]') && !Game.Has('Shimmering veil [on]')) {Game.Unlock('Shimmering veil [on]');Game.Upgrades['Shimmering veil [off]'].earn();} + if (Game.Has('Sugar craving')) Game.Unlock('Sugar frenzy'); + if (Game.Has('Classic dairy selection')) Game.Unlock('Milk selector'); + if (Game.Has('Basic wallpaper assortment')) Game.Unlock('Background selector'); + if (Game.Has('Golden cookie alert sound')) Game.Unlock('Golden cookie sound selector'); + if (Game.Has('Sound test')) Game.Unlock('Jukebox'); + + if (Game.Has('Prism heart biscuits')) Game.Win('Lovely cookies'); + if (Game.season=='easter') + { + var eggs=0; + for (var i in Game.easterEggs) + { + if (Game.HasUnlocked(Game.easterEggs[i])) eggs++; + } + if (eggs>=1) Game.Win('The hunt is on'); + if (eggs>=7) Game.Win('Egging on'); + if (eggs>=14) Game.Win('Mass Easteria'); + if (eggs>=Game.easterEggs.length) Game.Win('Hide & seek champion'); + } + + if (Game.Has('Fortune cookies')) + { + var list=Game.Tiers['fortune'].upgrades; + var fortunes=0; + for (var i in list) + { + if (Game.Has(list[i].name)) fortunes++; + } + if (fortunes>=list.length) Game.Win('O Fortuna'); + } + + if (Game.Has('Legacy') && Game.ascensionMode!=1) + { + Game.Unlock('Heavenly chip secret'); + if (Game.Has('Heavenly chip secret')) Game.Unlock('Heavenly cookie stand'); + if (Game.Has('Heavenly cookie stand')) Game.Unlock('Heavenly bakery'); + if (Game.Has('Heavenly bakery')) Game.Unlock('Heavenly confectionery'); + if (Game.Has('Heavenly confectionery')) Game.Unlock('Heavenly key'); + + if (Game.Has('Heavenly key')) Game.Win('Wholesome'); + } + + for (var i in Game.BankAchievements) + { + if (Game.cookiesEarned>=Game.BankAchievements[i].threshold) Game.Win(Game.BankAchievements[i].name); + } + + if (Game.elderWrath>=3) Game.Win('Grandmapocalypse'); + + var buildingsOwned=0; + var mathematician=1; + var base10=1; + var minAmount=100000; + for (var i in Game.Objects) + { + buildingsOwned+=Game.Objects[i].amount; + minAmount=Math.min(Game.Objects[i].amount,minAmount); + if (!Game.HasAchiev('Mathematician')) {if (Game.Objects[i].amount=1) Game.Win('One with everything'); + if (mathematician==1) Game.Win('Mathematician'); + if (base10==1) Game.Win('Base 10'); + if (minAmount>=100) {Game.Win('Centennial');Game.Unlock('Milk chocolate butter biscuit');} + if (minAmount>=150) {Game.Win('Centennial and a half');Game.Unlock('Dark chocolate butter biscuit');} + if (minAmount>=200) {Game.Win('Bicentennial');Game.Unlock('White chocolate butter biscuit');} + if (minAmount>=250) {Game.Win('Bicentennial and a half');Game.Unlock('Ruby chocolate butter biscuit');} + if (minAmount>=300) {Game.Win('Tricentennial');Game.Unlock('Lavender chocolate butter biscuit');} + if (minAmount>=350) {Game.Win('Tricentennial and a half');Game.Unlock('Synthetic chocolate green honey butter biscuit');} + if (minAmount>=400) {Game.Win('Quadricentennial');Game.Unlock('Royal raspberry chocolate butter biscuit');} + if (minAmount>=450) {Game.Win('Quadricentennial and a half');Game.Unlock('Ultra-concentrated high-energy chocolate butter biscuit');} + if (minAmount>=500) {Game.Win('Quincentennial');Game.Unlock('Pure pitch-black chocolate butter biscuit');} + if (minAmount>=550) {Game.Win('Quincentennial and a half');Game.Unlock('Cosmic chocolate butter biscuit');} + if (minAmount>=600) {Game.Win('Sexcentennial');Game.Unlock('Butter biscuit (with butter)');} + if (minAmount>=650) {Game.Win('Sexcentennial and a half');Game.Unlock('Everybutter biscuit');} + if (minAmount>=700) {Game.Win('Septcentennial');Game.Unlock('Personal biscuit');} + + if (Game.handmadeCookies>=1000) {Game.Win('Clicktastic');Game.Unlock('Plastic mouse');} + if (Game.handmadeCookies>=100000) {Game.Win('Clickathlon');Game.Unlock('Iron mouse');} + if (Game.handmadeCookies>=10000000) {Game.Win('Clickolympics');Game.Unlock('Titanium mouse');} + if (Game.handmadeCookies>=1000000000) {Game.Win('Clickorama');Game.Unlock('Adamantium mouse');} + if (Game.handmadeCookies>=100000000000) {Game.Win('Clickasmic');Game.Unlock('Unobtainium mouse');} + if (Game.handmadeCookies>=10000000000000) {Game.Win('Clickageddon');Game.Unlock('Eludium mouse');} + if (Game.handmadeCookies>=1000000000000000) {Game.Win('Clicknarok');Game.Unlock('Wishalloy mouse');} + if (Game.handmadeCookies>=100000000000000000) {Game.Win('Clickastrophe');Game.Unlock('Fantasteel mouse');} + if (Game.handmadeCookies>=10000000000000000000) {Game.Win('Clickataclysm');Game.Unlock('Nevercrack mouse');} + if (Game.handmadeCookies>=1000000000000000000000) {Game.Win('The ultimate clickdown');Game.Unlock('Armythril mouse');} + if (Game.handmadeCookies>=100000000000000000000000) {Game.Win('All the other kids with the pumped up clicks');Game.Unlock('Technobsidian mouse');} + if (Game.handmadeCookies>=10000000000000000000000000) {Game.Win('One...more...click...');Game.Unlock('Plasmarble mouse');} + if (Game.handmadeCookies>=1000000000000000000000000000) {Game.Win('Clickety split');Game.Unlock('Miraculite mouse');} + if (Game.handmadeCookies>=100000000000000000000000000000) {Game.Win('Ain\'t that a click in the head');Game.Unlock('Aetherice mouse');} + if (Game.handmadeCookies>=10000000000000000000000000000000) {Game.Win('What\'s not clicking');Game.Unlock('Omniplast mouse');} + + if (Game.cookiesEarned=1) Game.Win('Itchscratcher'); + if (Game.wrinklersPopped>=50) Game.Win('Wrinklesquisher'); + if (Game.wrinklersPopped>=200) Game.Win('Moistburster'); + + if (Game.cookiesEarned>=1000000 && Game.Has('How to bake your dragon')) Game.Unlock('A crumbly egg'); + + if (Game.cookiesEarned>=25 && Game.season=='christmas') Game.Unlock('A festive hat'); + if (Game.Has('Christmas tree biscuits') && Game.Has('Snowflake biscuits') && Game.Has('Snowman biscuits') && Game.Has('Holly biscuits') && Game.Has('Candy cane biscuits') && Game.Has('Bell biscuits') && Game.Has('Present biscuits')) Game.Win('Let it snow'); + + if (Game.reindeerClicked>=1) Game.Win('Oh deer'); + if (Game.reindeerClicked>=50) Game.Win('Sleigh of hand'); + if (Game.reindeerClicked>=200) Game.Win('Reindeer sleigher'); + + if (buildingsOwned>=100) Game.Win('Builder'); + if (buildingsOwned>=500) Game.Win('Architect'); + if (buildingsOwned>=1000) Game.Win('Engineer'); + if (buildingsOwned>=2500) Game.Win('Lord of Constructs'); + if (buildingsOwned>=5000) Game.Win('Grand design'); + if (buildingsOwned>=7500) Game.Win('Ecumenopolis'); + if (buildingsOwned>=10000) Game.Win('Myriad'); + if (Game.UpgradesOwned>=20) Game.Win('Enhancer'); + if (Game.UpgradesOwned>=50) Game.Win('Augmenter'); + if (Game.UpgradesOwned>=100) Game.Win('Upgrader'); + if (Game.UpgradesOwned>=200) Game.Win('Lord of Progress'); + if (Game.UpgradesOwned>=300) Game.Win('The full picture'); + if (Game.UpgradesOwned>=400) Game.Win('When there\'s nothing left to add'); + if (Game.UpgradesOwned>=500) Game.Win('Kaizen'); + if (Game.UpgradesOwned>=600) Game.Win('Beyond quality'); + if (Game.UpgradesOwned>=700) Game.Win('Oft we mar what\'s well'); + if (buildingsOwned>=4000 && Game.UpgradesOwned>=300) Game.Win('Polymath'); + if (buildingsOwned>=8000 && Game.UpgradesOwned>=400) Game.Win('Renaissance baker'); + + if (!Game.HasAchiev('Jellicles')) + { + var kittens=0; + for (var i=0;i=10) Game.Win('Jellicles'); + } + + if (Game.cookiesEarned>=1e14 && !Game.HasAchiev('You win a cookie')) {Game.Win('You win a cookie');Game.Earn(1);} + + if (Game.shimmerTypes['golden'].n>=4) Game.Win('Four-leaf cookie'); + + var grandmas=0; + for (var i in Game.GrandmaSynergies) + { + if (Game.Has(Game.GrandmaSynergies[i])) grandmas++; + } + if (!Game.HasAchiev('Elder') && grandmas>=7) Game.Win('Elder'); + if (!Game.HasAchiev('Veteran') && grandmas>=14) Game.Win('Veteran'); + if (Game.Objects['Grandma'].amount>=6 && !Game.Has('Bingo center/Research facility') && Game.HasAchiev('Elder')) Game.Unlock('Bingo center/Research facility'); + if (Game.pledges>0) Game.Win('Elder nap'); + if (Game.pledges>=5) Game.Win('Elder slumber'); + if (Game.pledges>=10) Game.Unlock('Sacrificial rolling pins'); + if (Game.Objects['Cursor'].amount+Game.Objects['Grandma'].amount>=777) Game.Win('The elder scrolls'); + + for (var i in Game.Objects) + { + var it=Game.Objects[i]; + for (var ii in it.productionAchievs) + { + if (it.totalCookies>=it.productionAchievs[ii].pow) Game.Win(it.productionAchievs[ii].achiev.name); + } + } + + if (!Game.HasAchiev('Cookie-dunker') && Game.LeftBackground && Game.milkProgress>0.1 && (Game.LeftBackground.canvas.height*0.4+256/2-16)>((1-Game.milkHd)*Game.LeftBackground.canvas.height)) Game.Win('Cookie-dunker'); + //&& l('bigCookie').getBounds().bottom>l('milk').getBounds().top+16 && Game.milkProgress>0.1) Game.Win('Cookie-dunker'); + + Game.runModHook('check'); + } + + Game.cookiesd+=(Game.cookies-Game.cookiesd)*0.3; + + if (Game.storeToRefresh) Game.RefreshStore(); + if (Game.upgradesToRebuild) Game.RebuildUpgrades(); + + Game.updateShimmers(); + Game.updateBuffs(); + + Game.UpdateTicker(); + } + + if (Game.T%(Game.fps*2)==0) + { + var title='Cookie Clicker'; + if (Game.season=='fools') title='Cookie Baker'; + document.title=(Game.OnAscend?(EN?'Ascending! ':(loc("Ascending")+' | ')):'')+loc("%1 cookie",LBeautify(Game.cookies))+' - '+title; + } + if (Game.T%15==0) + { + //written through the magic of "hope for the best" maths + var chipsOwned=Game.HowMuchPrestige(Game.cookiesReset); + var ascendNowToOwn=Math.floor(Game.HowMuchPrestige(Game.cookiesReset+Game.cookiesEarned)); + var ascendNowToGet=ascendNowToOwn-Math.floor(chipsOwned); + var nextChipAt=Game.HowManyCookiesReset(Math.floor(chipsOwned+ascendNowToGet+1))-Game.HowManyCookiesReset(Math.floor(chipsOwned+ascendNowToGet)); + var cookiesToNext=Game.HowManyCookiesReset(ascendNowToOwn+1)-(Game.cookiesEarned+Game.cookiesReset); + var percent=1-(cookiesToNext/nextChipAt); + + //fill the tooltip under the Legacy tab + var date=new Date(); + date.setTime(Date.now()-Game.startDate); + var timeInSeconds=date.getTime()/1000; + var startDate=Game.sayTime(timeInSeconds*Game.fps,-1); + + var str=''; + if (EN) str+='You\'ve been on this run for '+(startDate==''?'not very long':(startDate))+'.
'; + else str+=loc("You've been on this run for %1.",startDate)+'
'; + str+='
'; + if (Game.prestige>0) + { + str+=loc("Your prestige level is currently %1.
(CpS +%2%)",[Beautify(Game.prestige),Beautify(Game.prestige)]); + str+='
'; + } + if (ascendNowToGet<1) str+=loc("Ascending now would grant you no prestige."); + else if (ascendNowToGet<2) str+=loc("Ascending now would grant you
1 prestige level (+1% CpS)
and 1 heavenly chip to spend."); + else str+=loc("Ascending now would grant you
%1 prestige levels (+%2% CpS)
and %3 heavenly chips to spend.",[Beautify(ascendNowToGet),Beautify(ascendNowToGet),Beautify(ascendNowToGet)]); + if (cookiesToNext>=0) + { + //note: cookiesToNext can be negative at higher HC amounts due to precision loss. we simply hide it in such cases, as this usually only occurs when the gap is small and rapidly overcome anyway + str+='
'; + str+=loc("You need %1 more cookies for the next level.",Beautify(cookiesToNext))+'
'; + } + l('ascendTooltip').innerHTML=str; + + if (ascendNowToGet>0)//show number saying how many chips you'd get resetting now + { + Game.ascendNumber.textContent='+'+SimpleBeautify(ascendNowToGet); + Game.ascendNumber.style.display='block'; + } + else + { + Game.ascendNumber.style.display='none'; + } + + if (ascendNowToGet>Game.ascendMeterLevel || Game.ascendMeterPercentT=1) {Game.ascendMeter.className='';} else Game.ascendMeter.className='filling'; + } + //Game.ascendMeter.style.right=Math.floor(Math.max(0,1-Game.ascendMeterPercent)*100)+'px'; + Game.ascendMeter.style.backgroundPosition=(-Game.T*0.5-Game.ascendMeterPercent*100)+'px'; + Game.ascendMeter.style.transform='translate('+Math.floor(-Math.max(0,1-Game.ascendMeterPercent)*100)+'%,0px)'; + Game.ascendMeterPercent+=(Game.ascendMeterPercentT-Game.ascendMeterPercent)*0.1; + + Game.NotesLogic(); + if (Game.mouseMoved || Game.Scroll || Game.tooltip.dynamic) Game.tooltip.update(); + + if (Game.T%(Game.fps*5)==0 && !Game.mouseDown && (Game.onMenu=='stats' || Game.onMenu=='prefs')) Game.UpdateMenu(); + if (Game.T%(Game.fps*1)==0) Game.UpdatePrompt(); + if (Game.AscendTimer>0) Game.UpdateAscendIntro(); + if (Game.ReincarnateTimer>0) Game.UpdateReincarnateIntro(); + if (Game.OnAscend) Game.UpdateAscend(); + + Game.runModHook('logic'); + + if (Game.sparklesT>0) + { + Game.sparkles.style.backgroundPosition=-Math.floor((Game.sparklesFrames-Game.sparklesT+1)*128)+'px 0px'; + Game.sparklesT--; + if (Game.sparklesT==1) Game.sparkles.style.display='none'; + } + + Game.Click=0; + Game.Scroll=0; + Game.mouseMoved=0; + Game.CanClick=1; + + if ((Game.toSave || (Game.T%(Game.fps*60)==0 && Game.T>Game.fps*10 && Game.prefs.autosave)) && !Game.OnAscend) + { + //check if we can save : no minigames are loading + var canSave=true; + for (var i in Game.Objects) + { + var me=Game.Objects[i]; + if (me.minigameLoading){canSave=false;break;} + } + if (canSave) Game.WriteSave(); + } + if (!Game.toSave && !Game.isSaving) + { + if (Game.toReload) {Game.toReload=false;if (!App){location.reload();}else{App.reload();}} + if (Game.toQuit) {Game.toQuit=false;if (!App){window.close();}else{App.quit();}} + } + + if (App && App.logic) App.logic(Game.T); + + //every hour: get server data (ie. update notification, patreon, steam etc) + if (Game.T%(Game.fps*60*60)==0 && Game.T>Game.fps*10/* && Game.prefs.autoupdate*/) {Game.CheckUpdates();Game.GrabData();} + + Game.T++; + } + + /*===================================================================================== + DRAW + =======================================================================================*/ + + Game.Draw=function() + { + Game.DrawBackground();Timer.track('end of background'); + + if (!Game.OnAscend) + { + + var str=Beautify(Math.round(Game.cookiesd)); + if (Game.cookiesd>=1000000)//dirty padding + { + var spacePos=str.indexOf(' '); + var dotPos=str.indexOf('.'); + var add=''; + if (spacePos!=-1) + { + if (dotPos==-1) add+='.000'; + else + { + if (spacePos-dotPos==2) add+='00'; + if (spacePos-dotPos==3) add+='0'; + } + } + str=[str.slice(0,spacePos),add,str.slice(spacePos)].join(''); + } + + str=loc("%1 cookie",{n:Math.round(Game.cookiesd),b:str}); + if (str.length>14) str=str.replace(' ','
'); + + if (Game.prefs.monospace) str=''+str+''; + str=str+'
0?' class="wrinkled"':'')+'>'+loc("per second:")+' '+Beautify(Game.cookiesPs*(1-Game.cpsSucked),1)+'
'; + l('cookies').innerHTML=str; + Timer.track('cookie amount'); + + for (var i in Game.Objects) + { + var me=Game.Objects[i]; + if (me.onMinigame && me.minigame.draw && !me.muted && !Game.onMenu) me.minigame.draw(); + } + Timer.track('draw minigames'); + + if (Game.drawT%5==0) + { + //if (Game.prefs.monospace) {l('cookies').className='title monospace';} else {l('cookies').className='title';} + var lastLocked=0; + for (var i in Game.Objects) + { + var me=Game.Objects[i]; + + //make products full-opacity if we can buy them + var classes='product'; + var price=me.bulkPrice; + if (Game.cookiesEarned>=me.basePrice || me.bought>0) {classes+=' unlocked';lastLocked=0;me.locked=0;if (me.id==19){Game.Win('Cookie Clicker');}} else {classes+=' locked';lastLocked++;me.locked=1;} + if ((Game.buyMode==1 && Game.cookies>=price) || (Game.buyMode==-1 && me.amount>0)) classes+=' enabled'; else classes+=' disabled'; + if (lastLocked>2) classes+=' toggledOff'; + me.l.className=classes; + //if (me.id>0) {l('productName'+me.id).innerHTML=Beautify(me.storedTotalCps/Game.ObjectsById[me.id-1].storedTotalCps,2);} + } + + //make upgrades full-opacity if we can buy them + var lastPrice=0; + for (var i in Game.UpgradesInStore) + { + var me=Game.UpgradesInStore[i]; + if (!me.bought) + { + var price=me.getPrice(); + var canBuy=me.canBuy();//(Game.cookies>=price); + var enabled=(l('upgrade'+i).className.indexOf('enabled')>-1); + if ((canBuy && !enabled) || (!canBuy && enabled)) Game.upgradesToRebuild=1; + if (price'; + T=(T*144)%144; + l('upgradePieTimer'+i).style.backgroundPosition=(-Math.floor(T%18))*48+'px '+(-Math.floor(T/18))*48+'px'; + } + } + + //if (me.canBuy()) l('upgrade'+i).className='crate upgrade enabled'; else l('upgrade'+i).className='crate upgrade disabled'; + } + } + Timer.track('store'); + + if (Game.PARTY)//i was bored and felt like messing with CSS + { + var pulse=Math.pow((Game.T%10)/10,0.5); + Game.l.style.filter='hue-rotate('+((Game.T*5)%360)+'deg) brightness('+(150-50*pulse)+'%)'; + Game.l.style.webkitFilter='hue-rotate('+((Game.T*5)%360)+'deg) brightness('+(150-50*pulse)+'%)'; + Game.l.style.transform='scale('+(1.02-0.02*pulse)+','+(1.02-0.02*pulse)+') rotate('+(Math.sin(Game.T*0.5)*0.5)+'deg)'; + Game.wrapper.style.overflowX='hidden'; + Game.wrapper.style.overflowY='hidden'; + } + + Timer.clean(); + if (Game.prefs.animate && ((Game.prefs.fancy && Game.drawT%1==0) || (!Game.prefs.fancy && Game.drawT%10==0)) && Game.AscendTimer==0 && Game.onMenu=='') Game.DrawBuildings();Timer.track('buildings'); + + Game.textParticlesUpdate();Timer.track('text particles'); + } + + Game.NotesDraw();Timer.track('notes'); + + Game.runModHook('draw'); + + Game.drawT++; + //if (Game.prefs.altDraw) requestAnimationFrame(Game.Draw); + } + + /*===================================================================================== + MAIN LOOP + =======================================================================================*/ + Game.Loop=function() + { + if (Game.timedout) return false; + Timer.say('START'); + Timer.track('browser stuff'); + Timer.say('LOGIC'); + //update game logic ! + Game.catchupLogic=0; + Game.Logic(); + Game.catchupLogic=1; + + var time=Date.now(); + + + //latency compensator + Game.accumulatedDelay+=((time-Game.time)-1000/Game.fps); + if (Game.prefs.timeout && time-Game.lastActivity>=1000*60*5) + { + if (Game.accumulatedDelay>1000*60*30) Game.delayTimeouts+=3;//more than 30 minutes delay? computer probably asleep and not making cookies anyway + else if (Game.accumulatedDelay>1000*5) Game.delayTimeouts++;//add to timeout counter when we skip 10 seconds worth of frames (and the player has been inactive for at least 5 minutes) + if (Game.delayTimeouts>=3) Game.Timeout();//trigger timeout when the timeout counter is 3+ + } + + Game.accumulatedDelay=Math.min(Game.accumulatedDelay,1000*5);//don't compensate over 5 seconds; if you do, something's probably very wrong + Game.time=time; + + //if (Game.accumulatedDelay>=Game.fps) console.log('delay:',Math.round(Game.accumulatedDelay/Game.fps)); + while (Game.accumulatedDelay>0) + { + Game.Logic(); + Game.accumulatedDelay-=1000/Game.fps;//as long as we're detecting latency (slower than target fps), execute logic (this makes drawing slower but makes the logic behave closer to correct target fps) + } + Game.catchupLogic=0; + Timer.track('logic'); + Timer.say('END LOGIC'); + /* + if (!Game.prefs.altDraw) + { + var hasFocus=document.hasFocus(); + Timer.say('DRAW'); + if (hasFocus || Game.prefs.focus || Game.loopT%10==0) requestAnimationFrame(Game.Draw); + //if (document.hasFocus() || Game.loopT%5==0) Game.Draw(); + Timer.say('END DRAW'); + } + else requestAnimationFrame(Game.Draw);*/ + if (Game.visible) Game.Draw(); + + //if (!hasFocus) Game.tooltip.hide(); + + if (Game.sesame) + { + //fps counter and graph + Game.previousFps=Game.currentFps; + Game.currentFps=Game.getFps(); + var ctx=Game.fpsGraphCtx; + ctx.drawImage(Game.fpsGraph,-1,0); + ctx.fillStyle='rgb('+Math.round((1-Game.currentFps/Game.fps)*128)+',0,0)'; + ctx.fillRect(128-1,0,1,64); + ctx.strokeStyle='#fff'; + ctx.beginPath(); + ctx.moveTo(128-1,(1-Game.previousFps/Game.fps)*64); + ctx.lineTo(128,(1-Game.currentFps/Game.fps)*64); + ctx.stroke(); + + l('fpsCounter').textContent=Game.currentFps+' fps'; + var str=''; + for (var i in Timer.labels) {str+=Timer.labels[i];} + if (Game.debugTimersOn) l('debugLog').style.display='block'; + else l('debugLog').style.display='none'; + l('debugLog').innerHTML=str; + + } + Timer.reset(); + + Game.loopT++; + setTimeout(Game.Loop,1000/Game.fps); + } +} - Game.resize = function () { - var w = window.innerWidth; - var h = window.innerHeight; +/*===================================================================================== +LAUNCH THIS THING +=======================================================================================*/ +//Game.Launch(); - var prevW = Game.windowW; - var prevH = Game.windowH; - var scale = Math.min( - w / Math.max(800, w), - h / Math.max(200, h) - ); - Game.windowW = Math.floor(w / scale); - Game.windowH = Math.floor(h / scale); - if (scale != 1) { - Game.wrapper.style.transform = 'scale(' + (scale) + ')'; - Game.wrapper.style.width = Game.windowW + 'px'; - Game.wrapper.style.height = Game.windowH + 'px'; - } - else { - Game.wrapper.style.removeProperty('transform'); - Game.wrapper.style.width = '100%'; - Game.wrapper.style.height = '100%'; - } - Game.scale = scale; +//try {Game.Launch();} +//catch(err) {console.log('ERROR : '+err.message);} - for (var i in Game.Objects) { - var me = Game.Objects[i]; - me.toResize = true; - if (me.minigame && me.minigame.onResize) me.minigame.onResize(); - } - - if (Game.getNewTicker) { - if (prevW >= Game.tickerTooNarrow && Game.windowW < Game.tickerTooNarrow) Game.getNewTicker(true); - else if (prevW < Game.tickerTooNarrow && Game.windowW >= Game.tickerTooNarrow) Game.getNewTicker(true); - } - } - Game.resize(); - - Game.startDate = parseInt(Date.now());//when we started playing - Game.fullDate = parseInt(Date.now());//when we started playing (carries over with resets) - Game.lastDate = parseInt(Date.now());//when we last saved the game (used to compute "cookies made since we closed the game" etc) - - Game.cookiesSent = 0; Game.cookiesReceived = 0; - - Game.prefs = []; - Game.DefaultPrefs = function () { - Game.prefs.particles = 1;//particle effects : falling cookies etc - Game.prefs.numbers = 1;//numbers that pop up when clicking the cookie - Game.prefs.autosave = 1;//save the game every minute or so - Game.prefs.autoupdate = 1;//send an AJAX request to the server every 30 minutes (note : ignored) - Game.prefs.milk = 1;//display milk - Game.prefs.fancy = 1;//CSS shadow effects (might be heavy on some browsers) - Game.prefs.warn = 0;//warn before closing the window - Game.prefs.cursors = 1;//display cursors - Game.prefs.focus = 1;//make the game refresh less frequently when off-focus - Game.prefs.popups = 0;//use old-style popups (no longer used) - Game.prefs.format = 0;//shorten numbers - Game.prefs.notifs = 0;//notifications fade faster - Game.prefs.animate = 1;//animate buildings - Game.prefs.wobbly = 1;//wobbly cookie - Game.prefs.monospace = 0;//alt monospace font for cookies - Game.prefs.filters = 1;//CSS filter effects (might be heavy on some browsers) - Game.prefs.cookiesound = 1;//use new cookie click sound - Game.prefs.crates = 0;//show crates around icons in stats - Game.prefs.altDraw = 0;//use requestAnimationFrame to update drawing instead of fixed 30 fps setTimeout - Game.prefs.showBackupWarning = 1;//if true, show a "Have you backed up your save?" message on save load; set to false when save is exported - Game.prefs.extraButtons = 1;//if true, show Mute buttons and the building master bar - Game.prefs.askLumps = 0;//if true, show a prompt before spending lumps - Game.prefs.customGrandmas = 1;//if true, show patreon names for grandmas - Game.prefs.timeout = 0;//if true, game may show pause screen when timed out - Game.prefs.cloudSave = 1;//if true and on Steam, save and load to cloud - Game.prefs.bgMusic = 1;//if true and on Steam, play music even when game isn't focused - Game.prefs.notScary = 0;//if true, make some of the scary stuff less scary ("eyebrow mode") - Game.prefs.fullscreen = 0;//if true, Steam game will be fullscreen - Game.prefs.screenreader = 0;//if true, add some DOM stuff to facilitate screenreader interaction (requires reload) - Game.prefs.discordPresence = 1;//if true and applicable, show game activity in Discord status - } - Game.DefaultPrefs(); - - window.onbeforeunload = function (event) { - if (Game.prefs && Game.prefs.warn) { - if (typeof event == 'undefined') event = window.event; - if (event) event.returnValue = loc("Are you sure you want to close Cookie Clicker?"); - } - } - - Game.Mobile = function () { - if (!Game.mobile) { - Game.wrapper.className = 'mobile'; - Game.mobile = 1; - } - else { - Game.wrapper.className = ''; - Game.mobile = 0; - } - } - - Game.showBackupWarning = function () { - Game.Notify(loc("Back up your save!"), loc("Hello again! Just a reminder that you may want to back up your Cookie Clicker save every once in a while, just in case.
To do so, go to Options and hit \"Export save\" or \"Save to file\"!") + '
' + loc("Don't show this again") + '', [25, 7]); - } - - - - - /*===================================================================================== - BAKERY NAME - =======================================================================================*/ - Game.RandomBakeryName = function () { - var str = ''; - if (EN) { - return (Math.random() > 0.05 ? (choose(['Magic', 'Fantastic', 'Fancy', 'Sassy', 'Snazzy', 'Pretty', 'Cute', 'Pirate', 'Ninja', 'Zombie', 'Robot', 'Radical', 'Urban', 'Cool', 'Hella', 'Sweet', 'Awful', 'Double', 'Triple', 'Turbo', 'Techno', 'Disco', 'Electro', 'Dancing', 'Wonder', 'Mutant', 'Space', 'Science', 'Medieval', 'Future', 'Captain', 'Bearded', 'Lovely', 'Tiny', 'Big', 'Fire', 'Water', 'Frozen', 'Metal', 'Plastic', 'Solid', 'Liquid', 'Moldy', 'Shiny', 'Happy', 'Happy Little', 'Slimy', 'Tasty', 'Delicious', 'Hungry', 'Greedy', 'Lethal', 'Professor', 'Doctor', 'Power', 'Chocolate', 'Crumbly', 'Choklit', 'Righteous', 'Glorious', 'Mnemonic', 'Psychic', 'Frenetic', 'Hectic', 'Crazy', 'Royal', 'El', 'Von']) + ' ') : 'Mc') + choose(['Cookie', 'Biscuit', 'Muffin', 'Scone', 'Cupcake', 'Pancake', 'Chip', 'Sprocket', 'Gizmo', 'Puppet', 'Mitten', 'Sock', 'Teapot', 'Mystery', 'Baker', 'Cook', 'Grandma', 'Click', 'Clicker', 'Spaceship', 'Factory', 'Portal', 'Machine', 'Experiment', 'Monster', 'Panic', 'Burglar', 'Bandit', 'Booty', 'Potato', 'Pizza', 'Burger', 'Sausage', 'Meatball', 'Spaghetti', 'Macaroni', 'Kitten', 'Puppy', 'Giraffe', 'Zebra', 'Parrot', 'Dolphin', 'Duckling', 'Sloth', 'Turtle', 'Goblin', 'Pixie', 'Gnome', 'Computer', 'Pirate', 'Ninja', 'Zombie', 'Robot']); - } - else { - if (locStrings["bakery random name, 1st half"] && locStrings["bakery random name, 2nd half"]) str += choose(loc("bakery random name, 1st half")) + ' ' + choose(loc("bakery random name, 2nd half")); - else str += choose(loc("bakery random name")); - } - return str; - } - Game.GetBakeryName = function () { return Game.RandomBakeryName(); } - Game.bakeryNameL = l('bakeryName'); - Game.bakeryNameSet = function (what) { - try { - var exp = new RegExp('[^\'\\-_0-9 \\p{L}]', 'gu'); - Game.bakeryName = what.replace(exp, ' '); - //Game.bakeryName=what.replace(/[^'\-_0-9 \p{L}]/gu,' '); - Game.bakeryName = Game.bakeryName.trim().substring(0, 28); - } - catch (e) { - var exp = new RegExp('\W+', 'g'); - Game.bakeryName = what.replace(exp, ' '); - //Game.bakeryName=what.replace(/\W+/g,' '); - Game.bakeryName = Game.bakeryName.substring(0, 28); - } - Game.bakeryNameRefresh(); - if (Game.bakeryName == 'RESTORE BACKUP' && App && App.restoreBackup) App.restoreBackup(); - } - Game.bakeryNameRefresh = function () { - var name = Game.bakeryName; - if (EN) { if (name.slice(-1).toLowerCase() == 's') name += '\' bakery'; else name += '\'s bakery'; } - else name = loc("%1's bakery", name); - Game.bakeryNameL.textContent = name; - name = Game.bakeryName.toLowerCase(); - if (name == 'orteil') Game.Win('God complex'); - if (!App && name.indexOf('saysopensesame', name.length - ('saysopensesame').length) > 0 && !Game.sesame) Game.OpenSesame(); - Game.recalculateGains = 1; - } - Game.bakeryNamePrompt = function () { - PlaySound('snd/tick.mp3'); - Game.Prompt('

' + loc("Name your bakery") + '

' + loc("What should your bakery's name be?") + '
', [[loc("Confirm"), 'if (l(\'bakeryNameInput\').value.length>0) {Game.bakeryNameSet(l(\'bakeryNameInput\').value);Game.Win(\'What\\\'s in a name\');Game.ClosePrompt();}'], [loc("Random"), 'Game.bakeryNamePromptRandom();'], loc("Cancel")]); - l('bakeryNameInput').focus(); - l('bakeryNameInput').select(); - } - Game.bakeryNamePromptRandom = function () { - l('bakeryNameInput').value = Game.RandomBakeryName(); - } - AddEvent(Game.bakeryNameL, 'click', Game.bakeryNamePrompt); - - Game.bakeryNameSet(Game.GetBakeryName()); - - /*===================================================================================== - TOOLTIP - =======================================================================================*/ - Game.tooltip = { text: '', x: 0, y: 0, origin: '', on: 0, tt: l('tooltip'), tta: l('tooltipAnchor'), shouldHide: 1, dynamic: 0, from: 0 }; - Game.tooltip.draw = function (from, text, origin) { - this.shouldHide = 0; - this.text = text; - this.from = from; - //this.x=x; - //this.y=y; - this.origin = origin; - var tt = this.tt; - var tta = this.tta; - tt.style.left = 'auto'; - tt.style.top = 'auto'; - tt.style.right = 'auto'; - tt.style.bottom = 'auto'; - if (typeof this.text === 'function') { - var text = this.text(); - if (text == '') tta.style.opacity = '0'; - else { - tt.innerHTML = unescape(text); - tta.style.opacity = '1'; - } - } - else tt.innerHTML = unescape(this.text); - //tt.innerHTML=(typeof this.text==='function')?unescape(this.text()):unescape(this.text); - tta.style.display = 'block'; - tta.style.visibility = 'hidden'; - Game.tooltip.update(); - tta.style.visibility = 'visible'; - this.on = 1; - } - Game.tooltip.update = function () { - var X = 0; - var Y = 0; - var width = this.tt.offsetWidth; - var height = this.tt.offsetHeight; - if (this.origin == 'store') { - X = Game.windowW - 332 - width; - Y = Game.mouseY - 32; - if (Game.onCrate) Y = Game.onCrate.getBounds().top - 42; - Y = Math.max(0, Math.min(Game.windowH - height - 44, Y)); - /*this.tta.style.right='308px';//'468px'; - this.tta.style.left='auto'; - if (Game.onCrate) Y=Game.onCrate.getBounds().top-2; - this.tta.style.top=Math.max(0,Math.min(Game.windowH-this.tt.clientHeight-64,Y-48))+'px';*/ - } - else { - if (Game.onCrate) { - var rect = Game.onCrate.getBounds(); - if (rect.left == 0 && rect.top == 0)//if we get that bug where we get stuck in the top-left, move to the mouse (REVISION : just do nothing) - { return false;/*rect.left=Game.mouseX-24;rect.right=Game.mouseX+24;rect.top=Game.mouseY-24;rect.bottom=Game.mouseY+24;*/ } - if (this.origin == 'left') { - X = rect.left - width - 16; - Y = rect.top + (rect.bottom - rect.top) / 2 - height / 2 - 38; - Y = Math.max(0, Math.min(Game.windowH - height - 19, Y)); - if (X < 0) X = rect.right; - } - else { - X = rect.left + (rect.right - rect.left) / 2 - width / 2 - 8; - Y = rect.top - height - TopBarOffset - 16; - X = Math.max(0, Math.min(Game.windowW - width - 16, X)); - if (Y < 0) Y = rect.bottom - TopBarOffset; - } - } - else if (this.origin == 'bottom-right') { - X = Game.mouseX + 8; - Y = Game.mouseY - 32; - X = Math.max(0, Math.min(Game.windowW - width - 16, X)); - Y = Math.max(0, Math.min(Game.windowH - height - 64, Y)); - } - else if (this.origin == 'bottom') { - X = Game.mouseX - width / 2 - 8; - Y = Game.mouseY + 24; - X = Math.max(0, Math.min(Game.windowW - width - 16, X)); - Y = Math.max(0, Math.min(Game.windowH - height - 64, Y)); - } - else if (this.origin == 'left') { - X = Game.mouseX - width - 24; - Y = Game.mouseY - height / 2 - 8; - X = Math.max(0, Math.min(Game.windowW - width - 16, X)); - Y = Math.max(0, Math.min(Game.windowH - height - 64, Y)); - } - else if (this.origin == 'this' && this.from) { - var rect = this.from.getBounds(); - X = (rect.left + rect.right) / 2 - width / 2 - 8; - Y = (rect.top) - this.tt.clientHeight - 48; - X = Math.max(0, Math.min(Game.windowW - width - 16, X)); - //Y=Math.max(0,Math.min(Game.windowH-this.tt.clientHeight-64,Y)); - if (Y < 0) Y = (rect.bottom - 24); - if (Y + height + 40 > Game.windowH) { - X = rect.right + 8; - Y = rect.top + (rect.bottom - rect.top) / 2 - height / 2 - 38; - Y = Math.max(0, Math.min(Game.windowH - height - 19, Y)); - } - } - else { - X = Game.mouseX - width / 2 - 8; - Y = Game.mouseY - height - 32; - X = Math.max(0, Math.min(Game.windowW - width - 16, X)); - Y = Math.max(0, Math.min(Game.windowH - height - 64, Y)); - } - } - this.tta.style.left = X + 'px'; - this.tta.style.right = 'auto'; - this.tta.style.top = Y + 'px'; - this.tta.style.bottom = 'auto'; - if (this.shouldHide) { this.hide(); this.shouldHide = 0; } - else if (Game.drawT % 10 == 0 && typeof (this.text) === 'function') { - var text = this.text(); - if (text == '') this.tta.style.opacity = '0'; - else { - this.tt.innerHTML = unescape(text); - this.tta.style.opacity = '1'; - } - } - } - Game.tooltip.hide = function () { - if (this.tta) this.tta.style.display = 'none'; - this.dynamic = 0; - this.on = 0; - } - Game.getTooltip = function (text, origin, isCrate) { - origin = (origin ? origin : 'middle'); - if (isCrate) return 'onMouseOut="Game.setOnCrate(0);Game.tooltip.shouldHide=1;" onMouseOver="if (!Game.mouseDown) {Game.setOnCrate(this);Game.tooltip.dynamic=0;Game.tooltip.draw(this,\'' + escape(text) + '\',\'' + origin + '\');Game.tooltip.wobble();}"'; - else return 'onMouseOut="Game.tooltip.shouldHide=1;" onMouseOver="Game.tooltip.dynamic=0;Game.tooltip.draw(this,\'' + escape(text) + '\',\'' + origin + '\');Game.tooltip.wobble();"'; - } - Game.getDynamicTooltip = function (func, origin, isCrate) { - origin = (origin ? origin : 'middle'); - if (isCrate) return 'onMouseOut="Game.setOnCrate(0);Game.tooltip.shouldHide=1;" onMouseOver="if (!Game.mouseDown) {Game.setOnCrate(this);Game.tooltip.dynamic=1;Game.tooltip.draw(this,' + 'function(){return ' + func + '();}' + ',\'' + origin + '\');Game.tooltip.wobble();}"'; - return 'onMouseOut="Game.tooltip.shouldHide=1;" onMouseOver="Game.tooltip.dynamic=1;Game.tooltip.draw(this,' + 'function(){return ' + func + '();}' + ',\'' + origin + '\');Game.tooltip.wobble();"'; - } - Game.attachTooltip = function (el, func, origin) { - if (typeof func === 'string') { - var str = func; - func = function (str) { return function () { return str; }; }(str); - } - origin = (origin ? origin : 'middle'); - AddEvent(el, 'mouseover', function (func, el, origin) { return function () { Game.tooltip.dynamic = 1; Game.tooltip.draw(el, func, origin); }; }(func, el, origin)); - AddEvent(el, 'mouseout', function () { return function () { Game.tooltip.shouldHide = 1; }; }()); - } - Game.tooltip.wobble = function () { - //disabled because this effect doesn't look good with the slight slowdown it might or might not be causing. - if (false) { - this.tt.className = 'framed'; - void this.tt.offsetWidth; - this.tt.className = 'framed wobbling'; - } - } - - - /*===================================================================================== - UPDATE CHECKER - =======================================================================================*/ - Game.CheckUpdates = function () { - if (!App) ajax('server.php?q=checkupdate', Game.CheckUpdatesResponse); - } - Game.CheckUpdatesResponse = function (response) { - var r = response.split('|'); - var str = ''; - if (r[0] == 'alert') { - if (r[1]) str = r[1]; - } - else if (parseFloat(r[0]) > Game.version) { - str = '' + loc("New version available: v. %1!", r[0]) + ''; - if (r[1]) str += '
' + loc("Update note: \"%1\"", r[1]) + ''; - str += '
' + loc("Refresh to get it!") + ''; - } - if (str != '') { - l('alert').innerHTML = str; - l('alert').style.display = 'block'; - } - } - - /*===================================================================================== - DATA GRABBER - =======================================================================================*/ - - Game.externalDataLoaded = false; - - Game.grandmaNames = ['Granny', 'Gusher', 'Ethel', 'Edna', 'Doris', 'Maud', 'Hilda', 'Gladys', 'Michelle', 'Michele', 'Phyllis', 'Millicent', 'Muriel', 'Myrtle', 'Mildred', 'Mavis', 'Helen', 'Gloria', 'Sheila', 'Betty', 'Gertrude', 'Agatha', 'Beryl', 'Agnes', 'Pearl', 'Precious', 'Ruby', 'Vera', 'Bonnie', 'Ada', 'Bunny', 'Cookie', 'Darling', 'Gaga', 'GamGam', 'Memaw', 'Mimsy', 'Peanut', 'Nana', 'Nan', 'Tootsie', 'Warty', 'Stinky', 'Heinous']; - Game.customGrandmaNames = []; - Game.heralds = 0; - - Game.GrabData = function () { - if (!App) ajax('grab.txt', Game.GrabDataResponse); - else App.grabData(function (res) { - Game.heralds = res ? (res.playersN || 1) : 1; - Game.heralds = Math.max(0, Math.min(100, Math.ceil(Game.heralds / 100 * 100) / 100)); - l('heraldsAmount').textContent = Math.floor(Game.heralds); - }); - } - Game.GrabDataResponse = function (response) { - /* - response should be formatted as - {"herald":3,"grandma":"a|b|c|...} - */ - var r = {}; - try { - r = JSON.parse(response); - if (typeof r['herald'] !== 'undefined') { - Game.heralds = parseInt(r['herald']); - Game.heralds = Math.max(0, Math.min(100, Game.heralds)); - } - if (typeof r['grandma'] !== 'undefined' && r['grandma'] != '') { - Game.customGrandmaNames = r['grandma'].split('|'); - Game.customGrandmaNames = Game.customGrandmaNames.filter(function (el) { return el != ''; }); - } - - l('heraldsAmount').textContent = Math.floor(Game.heralds); - Game.externalDataLoaded = true; - } catch (e) { } - } - - - if (!App) { - Game.attachTooltip(l('httpsSwitch'), '
' + loc("You are currently playing Cookie Clicker on the %1 protocol.
The %2 version uses a different save slot than this one.
Click this lock to reload the page and switch to the %2 version!", [(Game.https ? 'HTTPS' : 'HTTP'), (Game.https ? 'HTTP' : 'HTTPS')]) + '
', 'this'); - AddEvent(l('httpsSwitch'), 'click', function () { - PlaySound('snd/pop' + Math.floor(Math.random() * 3 + 1) + '.mp3', 0.75); - if (location.protocol == 'https:') location.href = 'http:' + window.location.href.substring(window.location.protocol.length); - else if (location.protocol == 'http:') location.href = 'https:' + window.location.href.substring(window.location.protocol.length); - }); - - AddEvent(l('changeLanguage'), 'click', function () { - Game.showLangSelection(); - }); - - Game.attachTooltip(l('topbarOrteil'), '
Back to Orteil\'s subdomain!
Lots of other games in there!
' + tinyIcon([17, 5], 'display:block;margin:-12px auto;'), 'this'); - Game.attachTooltip(l('topbarDashnet'), '
Back to our homepage!
', 'this'); - Game.attachTooltip(l('topbarTwitter'), '
Orteil\'s twitter, which frequently features game updates.
', 'this'); - Game.attachTooltip(l('topbarTumblr'), '
Orteil\'s tumblr, which frequently features game updates.
', 'this'); - Game.attachTooltip(l('topbarDiscord'), '
Our official discord server.
You can share tips and questions about Cookie Clicker and all our other games!
', 'this'); - Game.attachTooltip(l('topbarPatreon'), '
Support us on Patreon and help us keep updating Cookie Clicker!
There\'s neat rewards for patrons too!
', 'this'); - Game.attachTooltip(l('topbarMerch'), '
Cookie Clicker shirts, hoodies and stickers!
', 'this'); - Game.attachTooltip(l('topbarMobileCC'), '
Play Cookie Clicker on your phone!
(Android only; iOS version will be released later)
', 'this'); - Game.attachTooltip(l('topbarSteamCC'), '
Get Cookie Clicker on Steam!
Featuring music by C418.
', 'this'); - Game.attachTooltip(l('topbarRandomgen'), '
A thing we made that lets you write random generators.
', 'this'); - Game.attachTooltip(l('topbarIGM'), '
A thing we made that lets you create your own idle games using a simple scripting language.
', 'this'); - l('changeLanguage').innerHTML = loc("Change language"); - l('links').childNodes[0].nodeValue = loc("Other versions"); - //l('linkVersionBeta').innerHTML=loc("Beta"); - } - - Game.attachTooltip(l('heralds'), function () { - var str = ''; - - if (!App && !Game.externalDataLoaded) str += loc("Heralds couldn't be loaded. There may be an issue with our servers, or you are playing the game locally."); - else { - if (!App && Game.heralds == 0) str += loc("There are no heralds at the moment. Please consider donating to our Patreon!"); - else { - str += '' + loc("%1 herald", Game.heralds) + ' ' + loc("selflessly inspiring a boost in production for everyone, resulting in %1.", '
' + loc("+%1% cookies per second", Game.heralds) + '
'); - str += '
'; - if (Game.ascensionMode == 1) str += loc("You are in a Born again run, and are not currently benefiting from heralds."); - else if (Game.Has('Heralds')) str += loc("You own the Heralds upgrade, and therefore benefit from the production boost."); - else str += loc("To benefit from the herald bonus, you need a special upgrade you do not yet own. You will permanently unlock it later in the game."); - } - } - str += '
' + (!App ? loc("Heralds are people who have donated to our highest Patreon tier, and are limited to 100.
Each herald gives everyone +1% CpS.
Heralds benefit everyone playing the game, regardless of whether you donated.") : loc("Every %1 current players on Steam generates 1 herald, up to %2 heralds.
Each herald gives everyone +1% CpS.", [100, 100])) + '
' + tinyIcon([21, 29]); - - str += '
'; - - return '

' + loc("Heralds") + '

' + str + '
'; - }, 'this'); - l('heraldsAmount').textContent = '?'; - l('heralds').style.display = 'inline-block'; - if (App) { - l('heralds').style.paddingTop = '4px'; - l('heralds').style.position = 'absolute'; - l('heralds').style.top = '0px'; - l('heralds').style.right = '0px'; - l('heralds').style.width = '28px'; - l('heralds').style.textAlign = 'center'; - l('leftBeam').appendChild(l('heralds')); - - l('buffs').style.top = '16px'; - } - - Game.GrabData(); - - - Game.useLocalStorage = 1; - //window.localStorage.clear();//won't switch back to cookie-based if there is localStorage info - - /*===================================================================================== - SAVE - =======================================================================================*/ - Game.ExportSave = function () { - //if (App) return false; - Game.prefs.showBackupWarning = 0; - Game.Prompt('

' + loc("Export save") + '

' + loc("This is your save code.
Copy it and keep it somewhere safe!") + '
', [loc("All done!")]);//prompt('Copy this text and keep it somewhere safe!',Game.WriteSave(1)); - l('textareaPrompt').focus(); l('textareaPrompt').select(); - } - Game.ImportSave = function (def) { - //if (App) return false; - Game.Prompt('

' + loc("Import save") + '

' + loc("Please paste in the code that was given to you on save export.") + '
', [[loc("Load"), 'if (l(\'textareaPrompt\').value.length==0){return false;}if (Game.ImportSaveCode(l(\'textareaPrompt\').value)){Game.ClosePrompt();}else{l(\'importError\').innerHTML=\'(\'+loc("Error importing save")+\')\';}'], loc("Nevermind")]);//prompt('Please paste in the text that was given to you on save export.',''); - l('textareaPrompt').focus(); - } - Game.ImportSaveCode = function (save) { - var out = false; - if (save && save != '') out = Game.LoadSave(save); - if (out && App && App.onImportSave) App.onImportSave(out, save); - return out; - } - - Game.FileSave = function () { - if (App) return false; - Game.prefs.showBackupWarning = 0; - var filename = Game.bakeryName.replace(/[^a-zA-Z0-9]+/g, '') + 'Bakery'; - var text = Game.WriteSave(1); - var blob = new Blob([text], { type: 'text/plain;charset=utf-8' }); - saveAs(blob, filename + '.txt'); - } - Game.FileLoad = function (e) { - if (App) return false; - if (e.target.files.length == 0) return false; - var file = e.target.files[0]; - var reader = new FileReader(); - reader.onload = function (e) { - Game.ImportSaveCode(e.target.result); - } - reader.readAsText(file); - } - - - Game.toReload = false; - Game.toSave = false; - Game.toQuit = false; - Game.isSaving = false;//true while we're saving, to block some behavior; when in App mode saving may be asynchronous - Game.lastSaveData = ''; - Game.WriteSave = function (type) { - Game.toSave = false; - //type: none is default, 1=return string only, 2=return uncompressed string, 3=return uncompressed, commented string - Game.lastDate = parseInt(Game.time); - var str = ''; - if (type == 3) str += '\nGame version\n'; - str += Game.version + '|'; - str += '|';//just in case we need some more stuff here - if (type == 3) str += '\n\nRun details'; - str +=//save stats - (type == 3 ? '\n run start date : ' : '') + parseInt(Game.startDate) + ';' + - (type == 3 ? '\n legacy start date : ' : '') + parseInt(Game.fullDate) + ';' + - (type == 3 ? '\n date when we last opened the game : ' : '') + parseInt(Game.lastDate) + ';' + - (type == 3 ? '\n bakery name : ' : '') + (Game.bakeryName) + ';' + - (type == 3 ? '\n seed : ' : '') + (Game.seed) + ';' + - (type == 3 ? '\n appearance : ' : '') + (Game.YouCustomizer.save()) + - '|'; - if (type == 3) str += '\n\nPacked preferences bitfield\n '; - var str2 =//prefs - (Game.prefs.particles ? '1' : '0') + - (Game.prefs.numbers ? '1' : '0') + - (Game.prefs.autosave ? '1' : '0') + - (Game.prefs.autoupdate ? '1' : '0') + - (Game.prefs.milk ? '1' : '0') + - (Game.prefs.fancy ? '1' : '0') + - (Game.prefs.warn ? '1' : '0') + - (Game.prefs.cursors ? '1' : '0') + - (Game.prefs.focus ? '1' : '0') + - (Game.prefs.format ? '1' : '0') + - (Game.prefs.notifs ? '1' : '0') + - (Game.prefs.wobbly ? '1' : '0') + - (Game.prefs.monospace ? '1' : '0') + - (Game.prefs.filters ? '1' : '0') + - (Game.prefs.cookiesound ? '1' : '0') + - (Game.prefs.crates ? '1' : '0') + - (Game.prefs.showBackupWarning ? '1' : '0') + - (Game.prefs.extraButtons ? '1' : '0') + - (Game.prefs.askLumps ? '1' : '0') + - (Game.prefs.customGrandmas ? '1' : '0') + - (Game.prefs.timeout ? '1' : '0') + - (Game.prefs.cloudSave ? '1' : '0') + - (Game.prefs.bgMusic ? '1' : '0') + - (Game.prefs.notScary ? '1' : '0') + - (Game.prefs.fullscreen ? '1' : '0') + - (Game.prefs.screenreader ? '1' : '0') + - (Game.prefs.discordPresence ? '1' : '0') + - ''; - str2 = pack3(str2); - str += str2 + '|'; - if (type == 3) str += '\n\nMisc game data'; - str += - (type == 3 ? '\n cookies : ' : '') + parseFloat(Game.cookies).toString() + ';' + - (type == 3 ? '\n total cookies earned : ' : '') + parseFloat(Game.cookiesEarned).toString() + ';' + - (type == 3 ? '\n cookie clicks : ' : '') + parseInt(Math.floor(Game.cookieClicks)) + ';' + - (type == 3 ? '\n golden cookie clicks : ' : '') + parseInt(Math.floor(Game.goldenClicks)) + ';' + - (type == 3 ? '\n cookies made by clicking : ' : '') + parseFloat(Game.handmadeCookies).toString() + ';' + - (type == 3 ? '\n golden cookies missed : ' : '') + parseInt(Math.floor(Game.missedGoldenClicks)) + ';' + - (type == 3 ? '\n background type : ' : '') + parseInt(Math.floor(Game.bgType)) + ';' + - (type == 3 ? '\n milk type : ' : '') + parseInt(Math.floor(Game.milkType)) + ';' + - (type == 3 ? '\n cookies from past runs : ' : '') + parseFloat(Game.cookiesReset).toString() + ';' + - (type == 3 ? '\n elder wrath : ' : '') + parseInt(Math.floor(Game.elderWrath)) + ';' + - (type == 3 ? '\n pledges : ' : '') + parseInt(Math.floor(Game.pledges)) + ';' + - (type == 3 ? '\n pledge time left : ' : '') + parseInt(Math.floor(Game.pledgeT)) + ';' + - (type == 3 ? '\n currently researching : ' : '') + parseInt(Math.floor(Game.nextResearch)) + ';' + - (type == 3 ? '\n research time left : ' : '') + parseInt(Math.floor(Game.researchT)) + ';' + - (type == 3 ? '\n ascensions : ' : '') + parseInt(Math.floor(Game.resets)) + ';' + - (type == 3 ? '\n golden cookie clicks (this run) : ' : '') + parseInt(Math.floor(Game.goldenClicksLocal)) + ';' + - (type == 3 ? '\n cookies sucked by wrinklers : ' : '') + parseFloat(Game.cookiesSucked).toString() + ';' + - (type == 3 ? '\n wrinkles popped : ' : '') + parseInt(Math.floor(Game.wrinklersPopped)) + ';' + - (type == 3 ? '\n santa level : ' : '') + parseInt(Math.floor(Game.santaLevel)) + ';' + - (type == 3 ? '\n reindeer clicked : ' : '') + parseInt(Math.floor(Game.reindeerClicked)) + ';' + - (type == 3 ? '\n season time left : ' : '') + parseInt(Math.floor(Game.seasonT)) + ';' + - (type == 3 ? '\n season switcher uses : ' : '') + parseInt(Math.floor(Game.seasonUses)) + ';' + - (type == 3 ? '\n current season : ' : '') + (Game.season ? Game.season : '') + ';'; - var wrinklers = Game.SaveWrinklers(); - str += - (type == 3 ? '\n amount of cookies contained in wrinklers : ' : '') + parseFloat(Math.floor(wrinklers.amount)) + ';' + - (type == 3 ? '\n number of wrinklers : ' : '') + parseInt(Math.floor(wrinklers.number)) + ';' + - (type == 3 ? '\n prestige level : ' : '') + parseFloat(Game.prestige).toString() + ';' + - (type == 3 ? '\n heavenly chips : ' : '') + parseFloat(Game.heavenlyChips).toString() + ';' + - (type == 3 ? '\n heavenly chips spent : ' : '') + parseFloat(Game.heavenlyChipsSpent).toString() + ';' + - (type == 3 ? '\n heavenly cookies : ' : '') + parseFloat(Game.heavenlyCookies).toString() + ';' + - (type == 3 ? '\n ascension mode : ' : '') + parseInt(Math.floor(Game.ascensionMode)) + ';' + - (type == 3 ? '\n permanent upgrades : ' : '') + parseInt(Math.floor(Game.permanentUpgrades[0])) + ';' + parseInt(Math.floor(Game.permanentUpgrades[1])) + ';' + parseInt(Math.floor(Game.permanentUpgrades[2])) + ';' + parseInt(Math.floor(Game.permanentUpgrades[3])) + ';' + parseInt(Math.floor(Game.permanentUpgrades[4])) + ';' + - (type == 3 ? '\n dragon level : ' : '') + parseInt(Math.floor(Game.dragonLevel)) + ';' + - (type == 3 ? '\n dragon aura : ' : '') + parseInt(Math.floor(Game.dragonAura)) + ';' + - (type == 3 ? '\n dragon aura 2 : ' : '') + parseInt(Math.floor(Game.dragonAura2)) + ';' + - (type == 3 ? '\n chime type : ' : '') + parseInt(Math.floor(Game.chimeType)) + ';' + - (type == 3 ? '\n volume : ' : '') + parseInt(Math.floor(Game.volume)) + ';' + - (type == 3 ? '\n number of shiny wrinklers : ' : '') + parseInt(Math.floor(wrinklers.shinies)) + ';' + - (type == 3 ? '\n amount of cookies contained in shiny wrinklers : ' : '') + parseFloat(Math.floor(wrinklers.amountShinies)) + ';' + - (type == 3 ? '\n current amount of sugar lumps : ' : '') + parseFloat(Math.floor(Game.lumps)) + ';' + - (type == 3 ? '\n total amount of sugar lumps made : ' : '') + parseFloat(Math.floor(Game.lumpsTotal)) + ';' + - (type == 3 ? '\n time when current sugar lump started : ' : '') + parseFloat(Math.floor(Game.lumpT)) + ';' + - (type == 3 ? '\n time when last refilled a minigame with a sugar lump : ' : '') + parseFloat(Math.floor(Game.lumpRefill)) + ';' + - (type == 3 ? '\n sugar lump type : ' : '') + parseInt(Math.floor(Game.lumpCurrentType)) + ';' + - (type == 3 ? '\n vault : ' : '') + Game.vault.join(',') + ';' + - (type == 3 ? '\n heralds : ' : '') + parseInt(Game.heralds) + ';' + - (type == 3 ? '\n golden cookie fortune : ' : '') + parseInt(Game.fortuneGC) + ';' + - (type == 3 ? '\n CpS fortune : ' : '') + parseInt(Game.fortuneCPS) + ';' + - (type == 3 ? '\n highest raw CpS : ' : '') + parseFloat(Game.cookiesPsRawHighest) + ';' + - (type == 3 ? '\n music volume : ' : '') + parseInt(Math.floor(Game.volumeMusic)) + ';' + - (type == 3 ? '\n cookies sent : ' : '') + parseInt(Math.floor(Game.cookiesSent)) + ';' + - (type == 3 ? '\n cookies received : ' : '') + parseInt(Math.floor(Game.cookiesReceived)) + ';' + - - '|';//cookies and lots of other stuff - - if (type == 3) str += '\n\nBuildings : amount, bought, cookies produced, level, minigame data'; - for (var i in Game.Objects)//buildings - { - var me = Game.Objects[i]; - if (type == 3) str += '\n ' + me.name + ' : '; - if (me.vanilla) { - str += me.amount + ',' + me.bought + ',' + parseFloat(Math.floor(me.totalCookies)) + ',' + parseInt(me.level); - if (Game.isMinigameReady(me)) str += ',' + me.minigame.save(); else str += ',' + (me.minigameSave || ''); - str += ',' + (me.muted ? '1' : '0'); - str += ',' + me.highest; - str += ';'; - } - } - str += '|'; - if (type == 3) str += '\n\nPacked upgrades bitfield (unlocked and bought)\n '; - var toCompress = []; - for (var i in Game.UpgradesById)//upgrades - { - var me = Game.UpgradesById[i]; - if (me.vanilla) toCompress.push(Math.min(me.unlocked, 1), Math.min(me.bought, 1)); - }; - - toCompress = pack3(toCompress.join(''));//toCompress=pack(toCompress);//CompressLargeBin(toCompress); - - str += toCompress; - str += '|'; - if (type == 3) str += '\n\nPacked achievements bitfield (won)\n '; - var toCompress = []; - for (var i in Game.AchievementsById)//achievements - { - var me = Game.AchievementsById[i]; - if (me.vanilla) toCompress.push(Math.min(me.won)); - } - toCompress = pack3(toCompress.join(''));//toCompress=pack(toCompress);//CompressLargeBin(toCompress); - str += toCompress; - - str += '|'; - if (type == 3) str += '\n\nBuffs : type, maxTime, time, arg1, arg2, arg3'; - for (var i in Game.buffs) { - var me = Game.buffs[i]; - if (me.type) { - if (type == 3) str += '\n ' + me.type.name + ' : '; - if (me.type.vanilla) { - str += me.type.id + ',' + me.maxTime + ',' + me.time; - if (typeof me.arg1 !== 'undefined') str += ',' + parseFloat(me.arg1); - if (typeof me.arg2 !== 'undefined') str += ',' + parseFloat(me.arg2); - if (typeof me.arg3 !== 'undefined') str += ',' + parseFloat(me.arg3); - str += ';'; - } - } - } - - - if (type == 3) str += '\n\nCustom :\n'; - - str += '|'; - str += Game.saveModData(); - - Game.lastSaveData = str; - - if (type == 2 || type == 3) { - return str; - } - else if (type == 1) { - str = escape(utf8_to_b64(str) + '!END!'); - return str; - } - else { - if (Game.useLocalStorage) { - //so we used to save the game using browser cookies, which was just really neat considering the game's name - //we're using localstorage now, which is more efficient but not as cool - //a moment of silence for our fallen puns - str = utf8_to_b64(str) + '!END!'; - if (str.length < 10) { - Game.Notify('Saving failed!', 'Purchasing an upgrade and saving again might fix this.
This really shouldn\'t happen; please notify Orteil on his tumblr.'); - } - else { - str = escape(str); - localStorageSet(Game.SaveTo, str);//aaand save - if (App) App.save(str); - if (!localStorageGet(Game.SaveTo)) { - Game.Notify(loc("Error while saving"), loc("Export your save instead!")); - } - else if (document.hasFocus()) { - Game.Notify(loc("Game saved"), '', '', 1, 1); - } - } - } - else//legacy system - { - //that's right - //we're using cookies - //yeah I went there - var now = new Date();//we storin dis for 5 years, people - now.setFullYear(now.getFullYear() + 5);//mmh stale cookies - str = utf8_to_b64(str) + '!END!'; - Game.saveData = escape(str); - str = Game.SaveTo + '=' + escape(str) + '; expires=' + now.toUTCString() + ';'; - document.cookie = str;//aaand save - if (App) App.save(str); - if (document.cookie.indexOf(Game.SaveTo) < 0) { - Game.Notify(loc("Error while saving"), loc("Export your save instead!"), '', 0, 1); - } - else if (document.hasFocus()) { - Game.Notify(loc("Game saved"), '', '', 1, 1); - } - } - } - } - - /*===================================================================================== - LOAD - =======================================================================================*/ - Game.salvageSave = function () { - //for when Cookie Clicker won't load and you need your save - console.log('==================================================='); - console.log('This is your save data. Copypaste it (without quotation marks) into another version using the "Import save" feature.'); - console.log(localStorageGet(Game.SaveTo)); - } - Game.LoadSave = function (data, ignoreVersionIssues) { - var str = ''; - if (typeof data !== 'undefined') str = unescape(data); - else { - if (App) { - App.getMostRecentSave(function (data) { Game.LoadSave(data, true); }); - return false; - } - if (Game.useLocalStorage) { - var local = localStorageGet(Game.SaveTo); - if (!local)//no localstorage save found? let's get the cookie one last time - { - if (document.cookie.indexOf(Game.SaveTo) >= 0) { - str = unescape(document.cookie.split(Game.SaveTo + '=')[1]); - document.cookie = Game.SaveTo + '=;expires=Thu, 01 Jan 1970 00:00:01 GMT;'; - } - else return false; - } - else { - str = unescape(local); - } - } - else//legacy system - { - if (document.cookie.indexOf(Game.SaveTo) >= 0) str = unescape(document.cookie.split(Game.SaveTo + '=')[1]);//get cookie here - else return false; - } - } - if (str != '') { - var version = 0; - var oldstr = str.split('|'); - if (oldstr[0].length < 1) return false; - else { - str = str.split('!END!')[0]; - str = b64_to_utf8(str); - } - if (str == '') return false; - else { - var spl = ''; - str = str.split('|'); - version = parseFloat(str[0]); - Game.loadedFromVersion = version; - - if (isNaN(version) || str.length < 5) { - Game.Notify(loc("Error importing save"), loc("Oops, looks like the import string is all wrong!"), '', 6, 1); - return false; - } - if (version >= 1 && version > Game.version) { - if (ignoreVersionIssues) Game.Notify('Retrieving save from a future version.', 'That\'s...odd.', '', 0, 1); - else { - Game.Notify(loc("Error importing save"), loc("You are attempting to load a save from a future version (v. %1; you are using v. %2).", [version, Game.version]), '', 6, 1); - return false; - } - } - if (version >= 1) { - Game.T = 0; - - spl = str[2].split(';');//save stats - Game.startDate = parseInt(spl[0]); - Game.fullDate = parseInt(spl[1]); - Game.lastDate = parseInt(spl[2]); - var bakeryName = (spl[3] ? spl[3] : Game.GetBakeryName()); - Game.seed = spl[4] ? spl[4] : Game.makeSeed(); - Game.YouCustomizer.load(spl[5] || 0); - //prefs - if (version < 1.0503) spl = str[3].split(''); - else if (version < 2.0046) spl = unpack2(str[3]).split(''); - else spl = (str[3]).split(''); - Game.prefs.particles = parseInt(spl[0]); - Game.prefs.numbers = parseInt(spl[1]); - Game.prefs.autosave = parseInt(spl[2]); - Game.prefs.autoupdate = spl[3] ? parseInt(spl[3]) : 1; - Game.prefs.milk = spl[4] ? parseInt(spl[4]) : 1; - Game.prefs.fancy = parseInt(spl[5]); if (Game.prefs.fancy) Game.removeClass('noFancy'); else if (!Game.prefs.fancy) Game.addClass('noFancy'); - Game.prefs.warn = spl[6] ? parseInt(spl[6]) : 0; - Game.prefs.cursors = spl[7] ? parseInt(spl[7]) : 0; - Game.prefs.focus = spl[8] ? parseInt(spl[8]) : 0; - Game.prefs.format = spl[9] ? parseInt(spl[9]) : 0; - Game.prefs.notifs = spl[10] ? parseInt(spl[10]) : 0; - Game.prefs.wobbly = spl[11] ? parseInt(spl[11]) : 0; - Game.prefs.monospace = spl[12] ? parseInt(spl[12]) : 0; - Game.prefs.filters = spl[13] ? parseInt(spl[13]) : 1; if (Game.prefs.filters) Game.removeClass('noFilters'); else if (!Game.prefs.filters) Game.addClass('noFilters'); - Game.prefs.cookiesound = spl[14] ? parseInt(spl[14]) : 1; - Game.prefs.crates = spl[15] ? parseInt(spl[15]) : 0; - Game.prefs.showBackupWarning = spl[16] ? parseInt(spl[16]) : 1; - Game.prefs.extraButtons = spl[17] ? parseInt(spl[17]) : 1; if (!Game.prefs.extraButtons) Game.removeClass('extraButtons'); else if (Game.prefs.extraButtons) Game.addClass('extraButtons'); - Game.prefs.askLumps = spl[18] ? parseInt(spl[18]) : 0; - Game.prefs.customGrandmas = spl[19] ? parseInt(spl[19]) : 1; - Game.prefs.timeout = spl[20] ? parseInt(spl[20]) : 0; - Game.prefs.cloudSave = spl[21] ? parseInt(spl[21]) : 1; - Game.prefs.bgMusic = spl[22] ? parseInt(spl[22]) : 1; - Game.prefs.notScary = spl[23] ? parseInt(spl[23]) : 0; - Game.prefs.fullscreen = spl[24] ? parseInt(spl[24]) : 0; if (App) App.setFullscreen(Game.prefs.fullscreen); - Game.prefs.screenreader = spl[25] ? parseInt(spl[25]) : 0; - Game.prefs.discordPresence = spl[26] ? parseInt(spl[26]) : 1; - BeautifyAll(); - spl = str[4].split(';');//cookies and lots of other stuff - Game.cookies = parseFloat(spl[0]); - Game.cookiesEarned = parseFloat(spl[1]); - Game.cookieClicks = spl[2] ? parseInt(spl[2]) : 0; - Game.goldenClicks = spl[3] ? parseInt(spl[3]) : 0; - Game.handmadeCookies = spl[4] ? parseFloat(spl[4]) : 0; - Game.missedGoldenClicks = spl[5] ? parseInt(spl[5]) : 0; - Game.bgType = spl[6] ? parseInt(spl[6]) : 0; - Game.milkType = spl[7] ? parseInt(spl[7]) : 0; - Game.cookiesReset = spl[8] ? parseFloat(spl[8]) : 0; - Game.elderWrath = spl[9] ? parseInt(spl[9]) : 0; - Game.pledges = spl[10] ? parseInt(spl[10]) : 0; - Game.pledgeT = spl[11] ? parseInt(spl[11]) : 0; - Game.nextResearch = spl[12] ? parseInt(spl[12]) : 0; - Game.researchT = spl[13] ? parseInt(spl[13]) : 0; - Game.resets = spl[14] ? parseInt(spl[14]) : 0; - Game.goldenClicksLocal = spl[15] ? parseInt(spl[15]) : 0; - Game.cookiesSucked = spl[16] ? parseFloat(spl[16]) : 0; - Game.wrinklersPopped = spl[17] ? parseInt(spl[17]) : 0; - Game.santaLevel = spl[18] ? parseInt(spl[18]) : 0; - Game.reindeerClicked = spl[19] ? parseInt(spl[19]) : 0; - Game.seasonT = spl[20] ? parseInt(spl[20]) : 0; - Game.seasonUses = spl[21] ? parseInt(spl[21]) : 0; - Game.season = spl[22] ? spl[22] : Game.baseSeason; - var wrinklers = { amount: spl[23] ? parseFloat(spl[23]) : 0, number: spl[24] ? parseInt(spl[24]) : 0 }; - Game.prestige = spl[25] ? parseFloat(spl[25]) : 0; - Game.heavenlyChips = spl[26] ? parseFloat(spl[26]) : 0; - Game.heavenlyChipsSpent = spl[27] ? parseFloat(spl[27]) : 0; - Game.heavenlyCookies = spl[28] ? parseFloat(spl[28]) : 0; - Game.ascensionMode = spl[29] ? parseInt(spl[29]) : 0; - Game.permanentUpgrades[0] = spl[30] ? parseInt(spl[30]) : -1; Game.permanentUpgrades[1] = spl[31] ? parseInt(spl[31]) : -1; Game.permanentUpgrades[2] = spl[32] ? parseInt(spl[32]) : -1; Game.permanentUpgrades[3] = spl[33] ? parseInt(spl[33]) : -1; Game.permanentUpgrades[4] = spl[34] ? parseInt(spl[34]) : -1; - //if (version<1.05) {Game.heavenlyChipsEarned=Game.HowMuchPrestige(Game.cookiesReset);Game.heavenlyChips=Game.heavenlyChipsEarned;} - Game.dragonLevel = spl[35] ? parseInt(spl[35]) : 0; - if (version < 2.0041 && Game.dragonLevel == Game.dragonLevels.length - 2) { Game.dragonLevel = Game.dragonLevels.length - 1; } - Game.dragonAura = spl[36] ? parseInt(spl[36]) : 0; - Game.dragonAura2 = spl[37] ? parseInt(spl[37]) : 0; - Game.chimeType = spl[38] ? parseInt(spl[38]) : 0; - Game.volume = spl[39] ? parseInt(spl[39]) : 75; - wrinklers.shinies = spl[40] ? parseInt(spl[40]) : 0; - wrinklers.amountShinies = spl[41] ? parseFloat(spl[41]) : 0; - Game.lumps = spl[42] ? parseFloat(spl[42]) : -1; - Game.lumpsTotal = spl[43] ? parseFloat(spl[43]) : -1; - Game.lumpT = spl[44] ? parseInt(spl[44]) : Date.now(); - Game.lumpRefill = spl[45] ? parseInt(spl[45]) : 0; - if (version < 2.022) Game.lumpRefill = Game.fps * 60; - Game.lumpCurrentType = spl[46] ? parseInt(spl[46]) : 0; - Game.vault = spl[47] ? spl[47].split(',') : []; - for (var i in Game.vault) { Game.vault[i] = parseInt(Game.vault[i]); } - var actualHeralds = Game.heralds;//we store the actual amount of heralds to restore it later; here we used the amount present in the save to compute offline CpS - Game.heralds = spl[48] ? parseFloat(spl[48]) : Game.heralds; - Game.fortuneGC = spl[49] ? parseInt(spl[49]) : 0; - Game.fortuneCPS = spl[50] ? parseInt(spl[50]) : 0; - Game.cookiesPsRawHighest = spl[51] ? parseFloat(spl[51]) : 0; - Game.volumeMusic = spl[52] ? parseInt(spl[52]) : 50; - Game.cookiesSent = spl[53] ? parseInt(spl[53]) : 0; - Game.cookiesReceived = spl[54] ? parseInt(spl[54]) : 0; - - spl = str[5].split(';');//buildings - Game.BuildingsOwned = 0; - for (var i in Game.ObjectsById) { - var me = Game.ObjectsById[i]; - me.switchMinigame(false); - me.pics = []; - if (spl[i]) { - var mestr = spl[i].toString().split(','); - me.amount = parseInt(mestr[0]); me.bought = parseInt(mestr[1]); me.totalCookies = parseFloat(mestr[2]); me.level = parseInt(mestr[3] || 0); me.highest = (version >= 2.024 ? parseInt(mestr[6]) : me.amount); - if (me.minigame && me.minigameLoaded && me.minigame.reset) { me.minigame.reset(true); me.minigame.load(mestr[4] || ''); } else me.minigameSave = (mestr[4] || 0); - me.muted = parseInt(mestr[5]) || 0; - Game.BuildingsOwned += me.amount; - if (version < 2.003) me.level = 0; - } - else { - me.amount = 0; me.unlocked = 0; me.bought = 0; me.highest = 0; me.totalCookies = 0; me.level = 0; - } - } - - Game.setVolumeMusic(Game.volumeMusic); - - Game.LoadMinigames(); - - if (version < 1.035)//old non-binary algorithm - { - spl = str[6].split(';');//upgrades - Game.UpgradesOwned = 0; - for (var i in Game.UpgradesById) { - var me = Game.UpgradesById[i]; - if (spl[i]) { - var mestr = spl[i].split(','); - me.unlocked = parseInt(mestr[0]); me.bought = parseInt(mestr[1]); - if (me.bought && Game.CountsAsUpgradeOwned(me.pool)) Game.UpgradesOwned++; - } - else { - me.unlocked = 0; me.bought = 0; - } - } - if (str[7]) spl = str[7].split(';'); else spl = [];//achievements - Game.AchievementsOwned = 0; - for (var i in Game.AchievementsById) { - var me = Game.AchievementsById[i]; - if (spl[i]) { - var mestr = spl[i].split(','); - me.won = parseInt(mestr[0]); - } - else { - me.won = 0; - } - if (me.won && Game.CountsAsAchievementOwned(me.pool)) Game.AchievementsOwned++; - } - } - else if (version < 1.0502)//old awful packing system - { - if (str[6]) spl = str[6]; else spl = [];//upgrades - if (version < 1.05) spl = UncompressLargeBin(spl); - else spl = unpack(spl); - Game.UpgradesOwned = 0; - for (var i in Game.UpgradesById) { - var me = Game.UpgradesById[i]; - if (spl[i * 2]) { - var mestr = [spl[i * 2], spl[i * 2 + 1]]; - me.unlocked = parseInt(mestr[0]); me.bought = parseInt(mestr[1]); - if (me.bought && Game.CountsAsUpgradeOwned(me.pool)) Game.UpgradesOwned++; - } - else { - me.unlocked = 0; me.bought = 0; - } - } - if (str[7]) spl = str[7]; else spl = [];//achievements - if (version < 1.05) spl = UncompressLargeBin(spl); - else spl = unpack(spl); - Game.AchievementsOwned = 0; - for (var i in Game.AchievementsById) { - var me = Game.AchievementsById[i]; - if (spl[i]) { - var mestr = [spl[i]]; - me.won = parseInt(mestr[0]); - } - else { - me.won = 0; - } - if (me.won && Game.CountsAsAchievementOwned(me.pool)) Game.AchievementsOwned++; - } - } - else { - if (str[6]) spl = str[6]; else spl = [];//upgrades - if (version < 2.0046) spl = unpack2(spl).split(''); - else spl = (spl).split(''); - Game.UpgradesOwned = 0; - for (var i in Game.UpgradesById) { - var me = Game.UpgradesById[i]; - if (spl[i * 2]) { - var mestr = [spl[i * 2], spl[i * 2 + 1]]; - me.unlocked = parseInt(mestr[0]); me.bought = parseInt(mestr[1]); - if (me.bought && Game.CountsAsUpgradeOwned(me.pool)) Game.UpgradesOwned++; - } - else { - me.unlocked = 0; me.bought = 0; - } - } - if (str[7]) spl = str[7]; else spl = [];//achievements - if (version < 2.0046) spl = unpack2(spl).split(''); - else spl = (spl).split(''); - Game.AchievementsOwned = 0; - for (var i in Game.AchievementsById) { - var me = Game.AchievementsById[i]; - if (spl[i]) { - var mestr = [spl[i]]; - me.won = parseInt(mestr[0]); - } - else { - me.won = 0; - } - if (me.won && Game.CountsAsAchievementOwned(me.pool)) Game.AchievementsOwned++; - } - } - - Game.killBuffs(); - var buffsToLoad = []; - spl = (str[8] || '').split(';');//buffs - for (var i in spl) { - if (spl[i]) { - var mestr = spl[i].toString().split(','); - buffsToLoad.push(mestr); - } - } - - spl = (str[9] || '').split(';');//mod data - - for (var i in spl) { - if (spl[i]) { - var data = spl[i].split(':'); - var modId = data[0]; - if (modId == 'META') continue; - data.shift(); - data = Game.safeLoadString(data.join(':')); - Game.modSaveData[modId] = data; - } - } - - for (var i in Game.ObjectsById) { - var me = Game.ObjectsById[i]; - if (me.buyFunction) me.buyFunction(); - me.refresh(); - if (me.id > 0) { - if (me.muted) me.mute(1); - } - } - - if (version < 1.0503)//upgrades that used to be regular, but are now heavenly - { - var me = Game.Upgrades['Persistent memory']; me.unlocked = 0; me.bought = 0; - var me = Game.Upgrades['Season switcher']; me.unlocked = 0; me.bought = 0; - } - - if (Game.bgType == -1) Game.bgType = 0; - if (Game.milkType == -1 || !Game.AllMilks[Game.milkType]) Game.milkType = 0; - - - //advance timers - var framesElapsed = Math.ceil(((Date.now() - Game.lastDate) / 1000) * Game.fps); - if (Game.pledgeT > 0) Game.pledgeT = Math.max(Game.pledgeT - framesElapsed, 1); - if (Game.seasonT > 0) Game.seasonT = Math.max(Game.seasonT - framesElapsed, 1); - if (Game.researchT > 0) Game.researchT = Math.max(Game.researchT - framesElapsed, 1); - - - Game.ResetWrinklers(); - Game.LoadWrinklers(wrinklers.amount, wrinklers.number, wrinklers.shinies, wrinklers.amountShinies); - - //recompute season trigger prices - if (Game.Has('Season switcher')) { for (var i in Game.seasons) { Game.Unlock(Game.seasons[i].trigger); } } - Game.computeSeasonPrices(); - - //recompute prestige - Game.prestige = Math.floor(Game.HowMuchPrestige(Game.cookiesReset)); - //if ((Game.heavenlyChips+Game.heavenlyChipsSpent)Beta patch
We\'ve tweaked some things and fixed some others, please check the update notes!
Of note : due to changes in prestige balancing, all your heavenly upgrades have been removed and your heavenly chips refunded; you\'ll be able to reallocate them next time you ascend.
Thank you again for beta-testing Cookie Clicker!
', [['Alright then!', 'Game.ClosePrompt();']]); }, 200); - } - if (version <= 1.0466)//are we loading from the old live version? reset HCs - { - Game.heavenlyChips = Game.prestige; - Game.heavenlyChipsSpent = 0; - } - - if (Game.ascensionMode != 1) { - if (Game.Has('Starter kit')) Game.Objects['Cursor'].free = 10; - if (Game.Has('Starter kitchen')) Game.Objects['Grandma'].free = 5; - } - - Game.CalculateGains(); - - var timeOffline = (Date.now() - Game.lastDate) / 1000; - - if (Math.random() < 1 / 10000) Game.TOYS = 1;//teehee! - if (Math.random() < 1 / 10000) Game.WINKLERS = 1;//squeak - - //compute cookies earned while the game was closed - if (Game.mobile || Game.Has('Perfect idling') || Game.Has('Twin Gates of Transcendence')) { - if (Game.Has('Perfect idling')) { - var maxTime = 60 * 60 * 24 * 1000000000; - var percent = 100; - } - else { - var maxTime = 60 * 60; - if (Game.Has('Belphegor')) maxTime *= 2; - if (Game.Has('Mammon')) maxTime *= 2; - if (Game.Has('Abaddon')) maxTime *= 2; - if (Game.Has('Satan')) maxTime *= 2; - if (Game.Has('Asmodeus')) maxTime *= 2; - if (Game.Has('Beelzebub')) maxTime *= 2; - if (Game.Has('Lucifer')) maxTime *= 2; - - var percent = 5; - if (Game.Has('Angels')) percent += 10; - if (Game.Has('Archangels')) percent += 10; - if (Game.Has('Virtues')) percent += 10; - if (Game.Has('Dominions')) percent += 10; - if (Game.Has('Cherubim')) percent += 10; - if (Game.Has('Seraphim')) percent += 10; - if (Game.Has('God')) percent += 10; - - if (Game.Has('Chimera')) { maxTime += 60 * 60 * 24 * 2; percent += 5; } - - if (Game.Has('Fern tea')) percent += 3; - if (Game.Has('Ichor syrup')) percent += 7; - if (Game.Has('Fortune #102')) percent += 1; - } - - var timeOfflineOptimal = Math.min(timeOffline, maxTime); - var timeOfflineReduced = Math.max(0, timeOffline - timeOfflineOptimal); - var amount = (timeOfflineOptimal + timeOfflineReduced * 0.1) * Game.cookiesPs * (percent / 100); - - if (amount > 0) { - Game.Notify(loc("Welcome back!"), loc("You earned %1 while you were away.", loc("%1 cookie", LBeautify(amount))) + (EN ? ('
(' + Game.sayTime(timeOfflineOptimal * Game.fps, -1) + ' at ' + Math.floor(percent) + '% CpS' + (timeOfflineReduced ? ', plus ' + Game.sayTime(timeOfflineReduced * Game.fps, -1) + ' at ' + (Math.floor(percent * 10) / 100) + '%' : '') + '.)') : ''), [Math.floor(Math.random() * 16), 11]); - Game.Earn(amount); - } - } - - //we load buffs after everything as we do not want them to interfer with offline CpS - for (var i in buffsToLoad) { - var mestr = buffsToLoad[i]; - var type = Game.buffTypes[parseInt(mestr[0])]; - Game.gainBuff(type.name, parseFloat(mestr[1]) / Game.fps, parseFloat(mestr[3] || 0), parseFloat(mestr[4] || 0), parseFloat(mestr[5] || 0)).time = parseFloat(mestr[2]); - } - - - Game.loadLumps(timeOffline); - - Game.bakeryNameRefresh(); - - } - else//importing old version save - { - Game.Notify(loc("Error importing save"), loc("Sorry, you can't import saves from the classic version."), '', 6, 1); - return false; - } - - if (Game.prefs.screenreader) { - Game.BuildStore(); - } - - Game.RebuildUpgrades(); - - Game.TickerAge = 0; - Game.TickerEffect = 0; - - Game.elderWrathD = 0; - Game.recalculateGains = 1; - Game.storeToRefresh = 1; - Game.upgradesToRebuild = 1; - - Game.buyBulk = 1; Game.buyMode = 1; Game.storeBulkButton(-1); - - - Game.specialTab = ''; - Game.ToggleSpecialMenu(0); - - Game.killShimmers(); - - if (Game.T > Game.fps * 5 && Game.ReincarnateTimer == 0)//fade out of black and pop the cookie - { - Game.ReincarnateTimer = 1; - Game.addClass('reincarnating'); - Game.BigCookieSize = 0; - } - - - var prestigeUpgradesOwned = 0; - for (var i in Game.Upgrades) { - if (Game.Upgrades[i].bought && Game.Upgrades[i].pool == 'prestige') prestigeUpgradesOwned++; - } - if (prestigeUpgradesOwned >= 100) Game.Win('All the stars in heaven'); - - - if (version < Game.version) l('logButton').classList.add('hasUpdate'); - - if (Game.season != '' && Game.season == Game.baseSeason) { - if (Game.season == 'valentines') Game.Notify(loc("Valentine's Day!"), loc("It's Valentine's season!
Love's in the air and cookies are just that much sweeter!"), [20, 3], 60 * 3); - else if (Game.season == 'fools') Game.Notify(loc("Business Day!"), loc("It's Business season!
Don't panic! Things are gonna be looking a little more corporate for a few days."), [17, 6], 60 * 3); - else if (Game.season == 'halloween') Game.Notify(loc("Halloween!"), loc("It's Halloween season!
Everything is just a little bit spookier!"), [13, 8], 60 * 3); - else if (Game.season == 'christmas') Game.Notify(loc("Christmas time!"), loc("It's Christmas season!
Bring good cheer to all and you just may get cookies in your stockings!"), [12, 10], 60 * 3); - else if (Game.season == 'easter') Game.Notify(loc("Easter!"), loc("It's Easter season!
Keep an eye out and you just might click a rabbit or two!"), [0, 12], 60 * 3); - } - - Game.heralds = actualHeralds; - - Game.Notify(loc("Game loaded"), '', '', 1, 1); - - if (!App && Game.prefs.showBackupWarning == 1) Game.showBackupWarning(); - - if (App) App.justLoadedSave(); - } - } - else return false; - return true; - } - - /*===================================================================================== - RESET - =======================================================================================*/ - Game.Reset = function (hard) { - Game.T = 0; - - if (hard) { Game.loadedFromVersion = Game.version; } - - var cookiesForfeited = Game.cookiesEarned; - if (!hard) { - if (cookiesForfeited >= 1000000) Game.Win('Sacrifice'); - if (cookiesForfeited >= 1000000000) Game.Win('Oblivion'); - if (cookiesForfeited >= 1000000000000) Game.Win('From scratch'); - if (cookiesForfeited >= 1000000000000000) Game.Win('Nihilism'); - if (cookiesForfeited >= 1000000000000000000) Game.Win('Dematerialize'); - if (cookiesForfeited >= 1000000000000000000000) Game.Win('Nil zero zilch'); - if (cookiesForfeited >= 1000000000000000000000000) Game.Win('Transcendence'); - if (cookiesForfeited >= 1000000000000000000000000000) Game.Win('Obliterate'); - if (cookiesForfeited >= 1000000000000000000000000000000) Game.Win('Negative void'); - if (cookiesForfeited >= 1000000000000000000000000000000000) Game.Win('To crumbs, you say?'); - if (cookiesForfeited >= 1000000000000000000000000000000000000) Game.Win('You get nothing'); - if (cookiesForfeited >= 1000000000000000000000000000000000000000) Game.Win('Humble rebeginnings'); - if (cookiesForfeited >= 1000000000000000000000000000000000000000000) Game.Win('The end of the world'); - if (cookiesForfeited >= 1000000000000000000000000000000000000000000000) Game.Win('Oh, you\'re back'); - if (cookiesForfeited >= 1000000000000000000000000000000000000000000000000) Game.Win('Lazarus'); - if (cookiesForfeited >= 1000000000000000000000000000000000000000000000000000) Game.Win('Smurf account'); - if (cookiesForfeited >= 1000000000000000000000000000000000000000000000000000000) Game.Win('If at first you don\'t succeed'); - if (cookiesForfeited >= 1000000000000000000000000000000000000000000000000000000000) Game.Win('No more room in hell'); - - if (Math.round(Game.cookies) == 1000000000000) Game.Win('When the cookies ascend just right'); - - if (Game.hasBuff('Loan 1') || Game.hasBuff('Loan 2') || Game.hasBuff('Loan 3')) Game.Win('Debt evasion'); - } - - Game.killBuffs(); - - Game.seed = Game.makeSeed(); - - Game.cookiesReset += Game.cookiesEarned; - Game.cookies = 0; - Game.cookiesEarned = 0; - Game.cookieClicks = 0; - Game.goldenClicksLocal = 0; - //Game.goldenClicks=0; - //Game.missedGoldenClicks=0; - Game.handmadeCookies = 0; - Game.cookiesPsRawHighest = 0; - if (hard) { - Game.bgType = 0; - Game.milkType = 0; - Game.chimeType = 0; - - Game.vault = []; - } - Game.pledges = 0; - Game.pledgeT = 0; - Game.elderWrath = 0; - Game.elderWrathOld = 0; - Game.elderWrathD = 0; - Game.nextResearch = 0; - Game.researchT = 0; - Game.seasonT = 0; - Game.seasonUses = 0; - Game.season = Game.baseSeason; - Game.computeSeasonPrices(); - - Game.startDate = parseInt(Date.now()); - Game.lastDate = parseInt(Date.now()); - - if (hard) { Game.cookiesSent = 0; Game.cookiesReceived = 0; } - - Game.cookiesSucked = 0; - Game.wrinklersPopped = 0; - Game.ResetWrinklers(); - - Game.santaLevel = 0; - Game.reindeerClicked = 0; - - Game.dragonLevel = 0; - Game.dragonAura = 0; - Game.dragonAura2 = 0; - - Game.fortuneGC = 0; - Game.fortuneCPS = 0; - - Game.TickerClicks = 0; - - if (Game.gainedPrestige > 0) Game.resets++; - if (!hard && Game.canLumps() && Game.ascensionMode != 1) Game.addClass('lumpsOn'); - else Game.removeClass('lumpsOn'); - Game.gainedPrestige = 0; - - for (var i in Game.ObjectsById) { - var me = Game.ObjectsById[i]; - me.amount = 0; me.bought = 0; me.highest = 0; me.free = 0; me.totalCookies = 0; - me.switchMinigame(false); - if (hard) { me.muted = 0; } - me.pics = []; - me.refresh(); - } - for (var i in Game.UpgradesById) { - var me = Game.UpgradesById[i]; - if (hard || me.pool != 'prestige') me.bought = 0; - if (hard) me.unlocked = 0; - if (me.pool != 'prestige' && !me.lasting) { - if (Game.Has('Keepsakes') && Game.seasonDrops.indexOf(me.name) != -1 && Math.random() < 1 / 5) { } - else if (Game.ascensionMode == 1 && Game.HasAchiev('O Fortuna') && me.tier == 'fortune') { } - else if (Game.HasAchiev('O Fortuna') && me.tier == 'fortune' && Math.random() < 0.4) { } - else me.unlocked = 0; - } - } - - Game.BuildingsOwned = 0; - Game.UpgradesOwned = 0; - - Game.cookiesPsByType = {}; - Game.cookiesMultByType = {}; - - if (!hard) { - if (Game.ascensionMode != 1) { - for (var i in Game.permanentUpgrades) { - if (Game.permanentUpgrades[i] != -1) { Game.UpgradesById[Game.permanentUpgrades[i]].earn(); } - } - if (Game.Has('Season switcher')) { for (var i in Game.seasons) { Game.Unlock(Game.seasons[i].trigger); } } - - if (Game.Has('Starter kit')) Game.Objects['Cursor'].getFree(10); - if (Game.Has('Starter kitchen')) Game.Objects['Grandma'].getFree(5); - } - } - - /*for (var i in Game.AchievementsById) - { - var me=Game.AchievementsById[i]; - me.won=0; - }*/ - //Game.DefaultPrefs(); - BeautifyAll(); - - Game.RebuildUpgrades(); - Game.TickerAge = 0; - Game.TickerEffect = 0; - Game.recalculateGains = 1; - Game.storeToRefresh = 1; - Game.upgradesToRebuild = 1; - Game.killShimmers(); - - Game.buyBulk = 1; Game.buyMode = 1; Game.storeBulkButton(-1); - - Game.LoadMinigames(); - for (var i in Game.ObjectsById) { - var me = Game.ObjectsById[i]; - if (hard && me.minigame && me.minigame.launch) { me.minigame.launch(); me.minigame.reset(true); } - else if (!hard && me.minigame && me.minigame.reset) me.minigame.reset(); - } - - l('toggleBox').style.display = 'none'; - l('toggleBox').innerHTML = ''; - Game.choiceSelectorOn = -1; - Game.ToggleSpecialMenu(0); - Game.specialTab = ''; - - l('logButton').classList.remove('hasUpdate'); - - Game.runModHook('reset', hard); - - if (hard) { - Game.YouCustomizer.resetGenes(); - - Game.clicksThisSession = 0; - if (Game.T > Game.fps * 5 && Game.ReincarnateTimer == 0)//fade out of black and pop the cookie - { - Game.ReincarnateTimer = 1; - Game.addClass('reincarnating'); - Game.BigCookieSize = 0; - } - Game.Notify(loc("Game reset"), EN ? "So long, cookies." : loc("Good bye, cookies."), [21, 6], 6); - } - else Game.clicksThisSession = Math.max(Game.clicksThisSession, 1); - - Game.jukebox.reset(); - if (hard) PlayCue('launch'); - else PlayCue('play'); - } - Game.HardReset = function (bypass) { - if (!bypass) { - Game.Prompt('

' + loc("Wipe save") + '

' + tinyIcon([15, 5]) + '
' + loc("Do you REALLY want to wipe your save?
You will lose your progress, your achievements, and your heavenly chips!") + '
', [[EN ? 'Yes!' : loc("Yes"), 'Game.ClosePrompt();Game.HardReset(1);', 'float:left'], [loc("No"), 0, 'float:right']]); - } - else if (bypass == 1) { - Game.Prompt('

' + loc("Wipe save") + '

' + tinyIcon([15, 5]) + '
' + loc("Whoah now, are you really, REALLY sure you want to go through with this?
Don't say we didn't warn you!") + '
', [[EN ? 'Do it!' : loc("Yes"), 'Game.ClosePrompt();Game.HardReset(2);', 'float:left'], [loc("No"), 0, 'float:right']]); - } - else { - for (var i in Game.AchievementsById) { - var me = Game.AchievementsById[i]; - me.won = 0; - } - for (var i in Game.ObjectsById) { - var me = Game.ObjectsById[i]; - me.level = 0; - } - - Game.AchievementsOwned = 0; - Game.goldenClicks = 0; - Game.missedGoldenClicks = 0; - Game.Reset(1); - Game.resets = 0; - Game.fullDate = parseInt(Date.now()); - Game.bakeryName = Game.GetBakeryName(); - Game.bakeryNameRefresh(); - Game.cookiesReset = 0; - Game.prestige = 0; - Game.heavenlyChips = 0; - Game.heavenlyChipsSpent = 0; - Game.heavenlyCookies = 0; - Game.permanentUpgrades = [-1, -1, -1, -1, -1]; - Game.ascensionMode = 0; - Game.lumps = -1; - Game.lumpsTotal = -1; - Game.lumpT = Date.now(); - Game.lumpRefill = 0; - Game.removeClass('lumpsOn'); - if (App) App.hardReset(); - } - } - - - - Game.onCrate = 0; - Game.setOnCrate = function (what) { - Game.onCrate = what; - } - Game.crate = function (me, context, forceClickStr, id, style) { - //produce a crate with associated tooltip for an upgrade or achievement - //me is an object representing the upgrade or achievement - //context can be "store", "ascend", "stats" or undefined - //forceClickStr changes what is done when the crate is clicked - //id is the resulting div's desired id - - var classes = 'crate'; - var enabled = 0; - var noFrame = 0; - var attachment = 'top'; - var neuromancy = 0; - if (context == 'stats' && (Game.Has('Neuromancy') || (Game.sesame && me.pool == 'debug'))) neuromancy = 1; - var mysterious = 0; - var clickStr = ''; - - if (me.type == 'upgrade') { - var canBuy = (context == 'store' ? me.canBuy() : true); - if (context == 'stats' && me.bought == 0 && !Game.Has('Neuromancy') && (!Game.sesame || me.pool != 'debug')) return ''; - else if (context == 'stats' && (Game.Has('Neuromancy') || (Game.sesame && me.pool == 'debug'))) neuromancy = 1; - else if (context == 'store' && !canBuy) enabled = 0; - else if (context == 'ascend' && me.bought == 0) enabled = 0; - else enabled = 1; - if (me.bought > 0) enabled = 1; - - if (context == 'stats' && !Game.prefs.crates) noFrame = 1; - - classes += ' upgrade'; - if (me.pool == 'prestige') classes += ' heavenly'; - - - if (neuromancy) clickStr = 'Game.UpgradesById[' + me.id + '].toggle();'; - } - else if (me.type == 'achievement') { - if (context == 'stats' && me.won == 0 && me.pool != 'normal') return ''; - else if (context != 'stats') enabled = 1; - - if (context == 'stats' && !Game.prefs.crates) noFrame = 1; - - classes += ' achievement'; - if (me.pool == 'shadow') classes += ' shadow'; - if (me.won > 0) enabled = 1; - else mysterious = 1; - if (!enabled) clickStr = 'Game.AchievementsById[' + me.id + '].click();'; - - if (neuromancy) clickStr = 'Game.AchievementsById[' + me.id + '].toggle();'; - } - - if (context == 'store') attachment = 'store'; - - if (forceClickStr) clickStr = forceClickStr; - - if (me.choicesFunction) classes += ' selector'; - - - var icon = me.icon; - if (mysterious) icon = [0, 7]; - - if (me.iconFunction) icon = me.iconFunction(); - - if (me.bought && context == 'store') enabled = 0; - - if (enabled) classes += ' enabled';// else classes+=' disabled'; - if (noFrame) classes += ' noFrame'; - - var text = []; - if (Game.sesame) { - if (Game.debuggedUpgradeCpS[me.name] || Game.debuggedUpgradeCpClick[me.name]) { - text.push('x' + Beautify(1 + Game.debuggedUpgradeCpS[me.name], 2)); text.push(Game.debugColors[Math.floor(Math.max(0, Math.min(Game.debugColors.length - 1, Math.pow(Game.debuggedUpgradeCpS[me.name] / 2, 0.5) * Game.debugColors.length)))]); - text.push('x' + Beautify(1 + Game.debuggedUpgradeCpClick[me.name], 2)); text.push(Game.debugColors[Math.floor(Math.max(0, Math.min(Game.debugColors.length - 1, Math.pow(Game.debuggedUpgradeCpClick[me.name] / 2, 0.5) * Game.debugColors.length)))]); - } - if (Game.extraInfo) { text.push(Math.floor(me.order) + (me.power ? '
P:' + me.power : '')); text.push('#fff'); } - } - var textStr = ''; - for (var i = 0; i < text.length; i += 2) { - textStr += '
' + text[i] + '
'; - } - return (Game.prefs.screenreader ? '' : ''); - } - Game.crateTooltip = function (me, context) { - var tags = []; - mysterious = 0; - var neuromancy = 0; - var price = ''; - if (context == 'stats' && (Game.Has('Neuromancy') || (Game.sesame && me.pool == 'debug'))) neuromancy = 1; - - var ariaText = ''; - - if (me.type == 'upgrade') { - ariaText += 'Upgrade. '; - - if (me.pool == 'prestige') tags.push(loc("[Tag]Heavenly", 0, 'Heavenly'), '#efa438'); - else if (me.pool == 'tech') tags.push(loc("[Tag]Tech", 0, 'Tech'), '#36a4ff'); - else if (me.pool == 'cookie') tags.push(loc("[Tag]Cookie", 0, 'Cookie'), 0); - else if (me.pool == 'debug') tags.push(loc("[Tag]Debug", 0, 'Debug'), '#00c462'); - else if (me.pool == 'toggle') tags.push(loc("[Tag]Switch", 0, 'Switch'), 0); - else tags.push(loc("[Tag]Upgrade", 0, 'Upgrade'), 0); - - if (Game.Has('Label printer')) { - if (me.tier != 0) tags.push(loc("Tier:") + ' ' + loc("[Tier]" + Game.Tiers[me.tier].name, 0, Game.Tiers[me.tier].name), Game.Tiers[me.tier].color); - if (me.name == 'Label printer' || me.name == 'This upgrade') tags.push(loc("Tier:") + ' ' + loc("[Tier]Self-referential"), '#ff00ea'); - } - - if (me.isVaulted()) tags.push(loc("Vaulted"), '#4e7566'); - - if (me.bought > 0) { - ariaText += 'Owned. '; - if (me.pool == 'tech') tags.push(loc("Researched"), 0); - else if (EN && me.kitten) tags.push('Purrchased', 0); - else tags.push(loc("Purchased"), 0); - } - - if (me.lasting && me.unlocked) tags.push(loc("Unlocked forever"), '#f2ff87'); - - if (neuromancy && me.bought == 0) tags.push(loc("Click to learn!"), '#00c462'); - else if (neuromancy && me.bought > 0) tags.push(loc("Click to unlearn!"), '#00c462'); - - var canBuy = (context == 'store' ? me.canBuy() : true); - var cost = me.getPrice(); - if (me.priceLumps > 0) cost = me.priceLumps; - - if (me.priceLumps == 0 && cost == 0) price = ''; - else { - price = '
' + Beautify(Math.round(cost)) + '' + ((me.pool != 'prestige' && me.priceLumps == 0) ? Game.costDetails(cost) : '') + '
'; - - ariaText += (me.bought ? 'Bought for' : canBuy ? 'Can buy for' : 'Cannot afford the') + ' ' + Beautify(Math.round(cost)) + ' ' + ((me.priceLumps > 0) ? 'sugar lumps' : (me.pool == 'prestige') ? 'heavenly chips' : 'cookies') + '. '; - } - } - else if (me.type == 'achievement') { - ariaText += 'Achievement. '; - if (me.pool == 'shadow') tags.push(loc("Shadow Achievement"), '#9700cf'); - else tags.push(loc("Achievement"), 0); - if (me.won > 0) { tags.push(loc("Unlocked"), 0); ariaText += 'Unlocked. '; } - else { tags.push(loc("Locked"), 0); mysterious = 1; } - - if (neuromancy && me.won == 0) tags.push(loc("Click to win!"), '#00c462'); - else if (neuromancy && me.won > 0) tags.push(loc("Click to lose!"), '#00c462'); - } - - var tagsStr = ''; - for (var i = 0; i < tags.length; i += 2) { - if (i % 2 == 0) tagsStr += '
' + tags[i] + '
'; - } - - var icon = me.icon; - if (mysterious) icon = [0, 7]; - - if (me.iconFunction) icon = me.iconFunction(); - - ariaText += (mysterious ? 'Hidden' : me.dname) + '. '; - - var tip = ''; - if (context == 'store') { - if (me.pool != 'toggle' && me.pool != 'tech') { - var purchase = me.kitten ? 'purrchase' : 'purchase'; - if (Game.Has('Inspired checklist')) { - if (me.isVaulted()) tip = EN ? ('Upgrade is vaulted and will not be auto-' + purchase + 'd.
Click to ' + purchase + '. Shift-click to unvault.') : (loc("Upgrade is vaulted and will not be auto-purchased.") + '
' + loc("Click to purchase.") + ' ' + loc("%1 to unvault.", loc("Shift-click"))); - else tip = EN ? ('Click to ' + purchase + '. Shift-click to vault.') : (loc("Click to purchase.") + ' ' + loc("%1 to vault.", loc("Shift-click"))); - if (EN) { - if (Game.keys[16]) tip += '
(You are holding Shift.)'; - else tip += '
(You are not holding Shift.)'; - } - } - else tip = EN ? ('Click to ' + purchase + '.') : loc("Click to purchase."); - } - else if (me.pool == 'toggle' && me.choicesFunction) tip = loc("Click to open selector."); - else if (me.pool == 'toggle') tip = loc("Click to toggle."); - else if (me.pool == 'tech') tip = loc("Click to research."); - } - - if (tip != '') ariaText += tip + ' '; - - var desc = me.ddesc; - if (me.descFunc) desc = me.descFunc(context); - if (me.bought && context == 'store' && me.displayFuncWhenOwned) desc = me.displayFuncWhenOwned() + '
' + desc; - if (me.unlockAt) { - if (me.unlockAt.require) { - var it = Game.Upgrades[me.unlockAt.require]; - desc = '
' + (EN ? 'From' : loc("Source:")) + ' ' + tinyIcon(it.icon) + ' ' + it.dname + '
' + desc; - } - else if (me.unlockAt.text) { - //var it=Game.Upgrades[me.unlockAt.require]; - desc = '
' + (EN ? 'From' : loc("Source:")) + ' ' + text + '
' + desc; - } - } - - if (!mysterious) ariaText += 'Description: ' + desc + ' '; - - if (Game.prefs.screenreader) { - var ariaLabel = l('ariaReader-' + me.type + '-' + me.id); - if (ariaLabel) ariaLabel.innerHTML = ariaText.replace(/(<([^>]+)>)/gi, ' '); - } - - return '
' + - '
' + - (me.bought && context == 'store' ? '' : price) + - '
' + (mysterious ? '???' : me.dname) + '
' + - tagsStr + - '
' + (mysterious ? '???' : desc) + '
' + - (tip != '' ? ('
' + tip + '
') : '') + - (Game.sesame ? ('
Id: ' + me.id + ' | Order: ' + (me.order) + (me.tier ? ' | Tier: ' + me.tier : '') + ' | Icon: [' + me.icon[0] + ',' + me.icon[1] + ']' + '
') : ''); - } - - Game.costDetails = function (cost) { - if (!Game.Has('Genius accounting')) return ''; - if (!cost) return ''; - var priceInfo = ''; - var cps = Game.cookiesPs * (1 - Game.cpsSucked); - if (cost > Game.cookies) priceInfo += loc("in %1", Game.sayTime(((cost - Game.cookies) / cps + 1) * Game.fps)) + '
'; - priceInfo += loc("%1 worth", Game.sayTime((cost / cps + 1) * Game.fps)) + '
'; - priceInfo += loc("%1% of bank", Beautify((cost / Game.cookies) * 100, 1)) + '
'; - return '
' + priceInfo + '
'; - } - - - /*===================================================================================== - PRESTIGE - =======================================================================================*/ - - Game.HCfactor = 3; - Game.HowMuchPrestige = function (cookies)//how much prestige [cookies] should land you - { - return Math.pow(cookies / 1000000000000, 1 / Game.HCfactor); - } - Game.HowManyCookiesReset = function (chips)//how many cookies [chips] are worth - { - //this must be the inverse of the above function (ie. if cookies=chips^2, chips=cookies^(1/2) ) - return Math.pow(chips, Game.HCfactor) * 1000000000000; - } - Game.gainedPrestige = 0; - Game.EarnHeavenlyChips = function (cookiesForfeited, silent) { - //recalculate prestige and chips owned - var prestige = Math.floor(Game.HowMuchPrestige(Game.cookiesReset + cookiesForfeited)); - prestige = Math.max(0, prestige); - if (prestige != Game.prestige)//did we change prestige levels? - { - var prestigeDifference = prestige - Game.prestige; - Game.gainedPrestige = prestigeDifference; - Game.heavenlyChips += prestigeDifference; - Game.prestige = prestige; - if (!silent && prestigeDifference > 0) Game.Notify(loc("You forfeit your %1.", loc("%1 cookie", LBeautify(cookiesForfeited))), loc("You gain %1!", loc("%1 prestige level", LBeautify(prestigeDifference))), [19, 7]); - } - } - - Game.GetHeavenlyMultiplier = function () { - var heavenlyMult = 0; - if (Game.Has('Heavenly chip secret')) heavenlyMult += 0.05; - if (Game.Has('Heavenly cookie stand')) heavenlyMult += 0.20; - if (Game.Has('Heavenly bakery')) heavenlyMult += 0.25; - if (Game.Has('Heavenly confectionery')) heavenlyMult += 0.25; - if (Game.Has('Heavenly key')) heavenlyMult += 0.25; - //if (Game.hasAura('Dragon God')) heavenlyMult*=1.05; - heavenlyMult *= 1 + Game.auraMult('Dragon God') * 0.05; - if (Game.Has('Lucky digit')) heavenlyMult *= 1.01; - if (Game.Has('Lucky number')) heavenlyMult *= 1.01; - if (Game.Has('Lucky payout')) heavenlyMult *= 1.01; - if (Game.hasGod) { - var godLvl = Game.hasGod('creation'); - if (godLvl == 1) heavenlyMult *= 0.7; - else if (godLvl == 2) heavenlyMult *= 0.8; - else if (godLvl == 3) heavenlyMult *= 0.9; - } - return heavenlyMult; - } - - Game.ascensionModes = { - 0: { name: 'None', dname: loc("None [ascension type]"), desc: loc("No special modifiers."), icon: [10, 0] }, - 1: { name: 'Born again', dname: loc("Born again [ascension type]"), desc: loc("This run will behave as if you'd just started the game from scratch. Prestige levels and heavenly upgrades will have no effect, as will sugar lumps and building levels. Perma-upgrades and minigames will be unavailable.
Some achievements are only available in this mode."), icon: [2, 7] }/*, - 2:{name:'Trigger finger',dname:loc("Trigger finger [ascension type]"),desc:loc("In this run, scrolling your mouse wheel on the cookie counts as clicking it. Some upgrades introduce new clicking behaviors.
No clicking achievements may be obtained in this mode.
Reaching 1 quadrillion cookies in this mode unlocks a special heavenly upgrade."),icon:[12,0]}*/ - }; - - Game.ascendMeterPercent = 0; - Game.ascendMeterPercentT = 0; - Game.ascendMeterLevel = 100000000000000000000000000000; - - Game.nextAscensionMode = 0; - Game.UpdateAscensionModePrompt = function () { - var icon = Game.ascensionModes[Game.nextAscensionMode].icon; - var name = Game.ascensionModes[Game.nextAscensionMode].dname; - l('ascendModeButton').innerHTML = - '
' + loc("Challenge mode for the next run:") + '
' + name + '
' + loc("Challenge modes apply special modifiers to your next ascension.
Click to change.") + '
' - , 'bottom-right') + ' style="opacity:1;float:none;display:block;background-position:' + (-icon[0] * 48) + 'px ' + (-icon[1] * 48) + 'px;">'; - } - Game.PickAscensionMode = function () { - PlaySound('snd/tick.mp3'); - Game.tooltip.hide(); - - var str = ''; - for (var i in Game.ascensionModes) { - var icon = Game.ascensionModes[i].icon; - str += '
'; - } - Game.Prompt('

' + loc("Select a challenge mode") + '

' + - '
' + str + '

' + Game.ascensionModes[Game.nextAscensionMode].dname + '

' + Game.ascensionModes[Game.nextAscensionMode].desc + '
' - , [[loc("Confirm"), 'Game.UpdateAscensionModePrompt();Game.ClosePrompt();']], 0, 'widePrompt'); - } - - - l('ascendOverlay').innerHTML = - '' - , 'bottom-right') + ' style="font-size:16px;margin-top:0px;">' + loc("Reincarnate") + '' + - '' + - '' + - - '
' + loc("You are ascending.
Drag the screen around
or use arrow keys!
When you're ready,
click Reincarnate.") + '
'; - - Game.attachTooltip(l('ascendData1'), function () { return '
(' + Beautify(Game.heavenlyChips) + ')
' + loc("Each prestige level grants you a permanent +%1% CpS.
The more levels you have, the more cookies they require.", 1) + '
'; }, 'bottom-right'); - Game.attachTooltip(l('ascendData2'), function () { return '
(' + loc("%1 heavenly chip", LBeautify(Game.heavenlyChips)) + ')
' + loc("Heavenly chips are used to buy heavenly upgrades.
You gain 1 chip every time you gain a prestige level.") + '
'; }, 'bottom-right'); - - Game.UpdateAscensionModePrompt(); - - AddEvent(l('ascendButton'), 'click', function () { - PlaySound('snd/tick.mp3'); - Game.Reincarnate(); - }); - - Game.ascendl = l('ascend'); - Game.ascendContentl = l('ascendContent'); - Game.ascendZoomablel = l('ascendZoomable'); - Game.ascendUpgradesl = l('ascendUpgrades'); - Game.OnAscend = 0; - Game.AscendTimer = 0;//how far we are into the ascend animation - Game.AscendDuration = Game.fps * 5;//how long the ascend animation is - Game.AscendBreakpoint = Game.AscendDuration * 0.5;//at which point the cookie explodes during the ascend animation - Game.UpdateAscendIntro = function () { - if (Game.AscendTimer == 1) PlaySound('snd/charging.mp3'); - if (Game.AscendTimer == Math.floor(Game.AscendBreakpoint)) PlaySound('snd/thud.mp3'); - Game.AscendTimer++; - if (Game.AscendTimer > Game.AscendDuration)//end animation and launch ascend screen - { - PlayCue('ascend'); - PlayMusicSound('snd/cymbalRev.mp3'); - if (!App || Game.volumeMusic == 0) PlaySound('snd/choir.mp3'); - Game.EarnHeavenlyChips(Game.cookiesEarned); - Game.AscendTimer = 0; - Game.OnAscend = 1; Game.removeClass('ascendIntro'); - Game.addClass('ascending'); - Game.BuildAscendTree(); - Game.heavenlyChipsDisplayed = Game.heavenlyChips; - Game.nextAscensionMode = 0; - Game.ascensionMode = 0; - Game.UpdateAscensionModePrompt(); - } - } - Game.ReincarnateTimer = 0;//how far we are into the reincarnation animation - Game.ReincarnateDuration = Game.fps * 1;//how long the reincarnation animation is - Game.UpdateReincarnateIntro = function () { - if (Game.ReincarnateTimer == 1) PlaySound('snd/pop' + Math.floor(Math.random() * 3 + 1) + '.mp3', 0.75); - Game.ReincarnateTimer++; - if (Game.ReincarnateTimer > Game.ReincarnateDuration)//end animation and launch regular game - { - Game.ReincarnateTimer = 0; - Game.removeClass('reincarnating'); - } - } - Game.Reincarnate = function (bypass) { - if (!bypass) Game.Prompt('

' + loc("Reincarnate") + '

' + loc("Are you ready to return to the mortal world?") + '
', [[loc("Yes"), 'Game.ClosePrompt();Game.Reincarnate(1);'], loc("No")]); - else { - Game.ascendUpgradesl.innerHTML = ''; - Game.ascensionMode = Game.nextAscensionMode; - Game.nextAscensionMode = 0; - Game.Reset(); - if (Game.HasAchiev('Rebirth')) { - Game.Notify('Reincarnated', loc("Hello, cookies!"), [10, 0], 4); - } - if (Game.resets >= 1000) Game.Win('Endless cycle'); - if (Game.resets >= 100) Game.Win('Reincarnation'); - if (Game.resets >= 10) Game.Win('Resurrection'); - if (Game.resets >= 1) Game.Win('Rebirth'); - - var prestigeUpgradesOwned = 0; - for (var i in Game.Upgrades) { - if (Game.Upgrades[i].bought && Game.Upgrades[i].pool == 'prestige') prestigeUpgradesOwned++; - } - if (prestigeUpgradesOwned >= 100) Game.Win('All the stars in heaven'); - - Game.removeClass('ascending'); - Game.OnAscend = 0; - //trigger the reincarnate animation - Game.ReincarnateTimer = 1; - Game.addClass('reincarnating'); - Game.BigCookieSize = 0; - - Game.runModHook('reincarnate'); - } - } - Game.Ascend = function (bypass) { - if (!bypass) Game.Prompt('

' + loc("Ascend") + '

' + tinyIcon([19, 7]) + '
' + loc("Do you REALLY want to ascend?
You will lose your progress and start over from scratch.
All your cookies will be converted into prestige and heavenly chips.") + '
' + (Game.canLumps() ? loc("You will keep your achievements, building levels and sugar lumps.") : loc("You will keep your achievements.")) + '
', [[loc("Yes"), 'Game.ClosePrompt();Game.Ascend(1);', 'float:left;display:none;'], [loc("Cancel"), 0, 'float:right']]); - else { - Game.Notify(loc("Ascending"), loc("So long, cookies."), [20, 7], 4); - Game.OnAscend = 0; Game.removeClass('ascending'); - Game.addClass('ascendIntro'); - //trigger the ascend animation - Game.AscendTimer = 1; - Game.killShimmers(); - l('toggleBox').style.display = 'none'; - l('toggleBox').innerHTML = ''; - Game.choiceSelectorOn = -1; - Game.ToggleSpecialMenu(0); - Game.AscendOffX = 0; - Game.AscendOffY = 0; - Game.AscendOffXT = 0; - Game.AscendOffYT = 0; - Game.AscendZoomT = 1; - Game.AscendZoom = 0.2; - - Game.jukebox.reset(); - PlayCue('preascend'); - } - } - - Game.DebuggingPrestige = 0; - Game.AscendDragX = 0; - Game.AscendDragY = 0; - Game.AscendOffX = 0; - Game.AscendOffY = 0; - Game.AscendZoom = 1; - Game.AscendOffXT = 0; - Game.AscendOffYT = 0; - Game.AscendZoomT = 1; - Game.AscendDragging = 0; - Game.heavenlyBounds = { left: 0, right: 0, top: 0, bottom: 0 }; - Game.UpdateAscend = function () { - if (Game.keys[37]) Game.AscendOffXT += 16 * (1 / Game.AscendZoomT); - if (Game.keys[38]) Game.AscendOffYT += 16 * (1 / Game.AscendZoomT); - if (Game.keys[39]) Game.AscendOffXT -= 16 * (1 / Game.AscendZoomT); - if (Game.keys[40]) Game.AscendOffYT -= 16 * (1 / Game.AscendZoomT); - - if (Game.AscendOffXT > -Game.heavenlyBounds.left) Game.AscendOffXT = -Game.heavenlyBounds.left; - if (Game.AscendOffXT < -Game.heavenlyBounds.right) Game.AscendOffXT = -Game.heavenlyBounds.right; - if (Game.AscendOffYT > -Game.heavenlyBounds.top) Game.AscendOffYT = -Game.heavenlyBounds.top; - if (Game.AscendOffYT < -Game.heavenlyBounds.bottom) Game.AscendOffYT = -Game.heavenlyBounds.bottom; - Game.AscendOffX += (Game.AscendOffXT - Game.AscendOffX) * 0.5; - Game.AscendOffY += (Game.AscendOffYT - Game.AscendOffY) * 0.5; - Game.AscendZoom += (Game.AscendZoomT - Game.AscendZoom) * 0.25; - if (Math.abs(Game.AscendZoomT - Game.AscendZoom) < 0.005) Game.AscendZoom = Game.AscendZoomT; - if (Math.abs(Game.AscendOffXT - Game.AscendOffX) < 0.005) Game.AscendOffX = Game.AscendOffXT; - if (Math.abs(Game.AscendOffYT - Game.AscendOffY) < 0.005) Game.AscendOffY = Game.AscendOffYT; - - - if (Game.mouseDown && !Game.promptOn) { - if (!Game.AscendDragging) { - Game.AscendDragX = Game.mouseX; - Game.AscendDragY = Game.mouseY; - } - Game.AscendDragging = 1; - - if (!Game.SelectedHeavenlyUpgrade) { - Game.AscendOffXT += (Game.mouseX - Game.AscendDragX) * (1 / Game.AscendZoomT); - Game.AscendOffYT += (Game.mouseY - Game.AscendDragY) * (1 / Game.AscendZoomT); - } - Game.AscendDragX = Game.mouseX; - Game.AscendDragY = Game.mouseY; - } - else { - Game.AscendDragging = 0; - Game.SelectedHeavenlyUpgrade = 0; - } - if (Game.Click || Game.promptOn) { - Game.AscendDragging = 0; - } - - //Game.ascendl.style.backgroundPosition=Math.floor(Game.AscendOffX/2)+'px '+Math.floor(Game.AscendOffY/2)+'px'; - //Game.ascendl.style.backgroundPosition=Math.floor(Game.AscendOffX/2)+'px '+Math.floor(Game.AscendOffY/2)+'px,'+Math.floor(Game.AscendOffX/4)+'px '+Math.floor(Game.AscendOffY/4)+'px'; - //Game.ascendContentl.style.left=Math.floor(Game.AscendOffX)+'px'; - //Game.ascendContentl.style.top=Math.floor(Game.AscendOffY)+'px'; - Game.ascendContentl.style.webkitTransform = 'translate(' + Math.floor(Game.AscendOffX) + 'px,' + Math.floor(Game.AscendOffY) + 'px)'; - Game.ascendContentl.style.msTransform = 'translate(' + Math.floor(Game.AscendOffX) + 'px,' + Math.floor(Game.AscendOffY) + 'px)'; - Game.ascendContentl.style.oTransform = 'translate(' + Math.floor(Game.AscendOffX) + 'px,' + Math.floor(Game.AscendOffY) + 'px)'; - Game.ascendContentl.style.mozTransform = 'translate(' + Math.floor(Game.AscendOffX) + 'px,' + Math.floor(Game.AscendOffY) + 'px)'; - Game.ascendContentl.style.transform = 'translate(' + Math.floor(Game.AscendOffX) + 'px,' + Math.floor(Game.AscendOffY) + 'px)'; - Game.ascendZoomablel.style.webkitTransform = 'scale(' + (Game.AscendZoom) + ',' + (Game.AscendZoom) + ')'; - Game.ascendZoomablel.style.marginLeft = (Game.windowW / 2) + 'px'; - Game.ascendZoomablel.style.marginTop = (Game.windowH / 2) + 'px'; - Game.ascendZoomablel.style.msTransform = 'scale(' + (Game.AscendZoom) + ',' + (Game.AscendZoom) + ')'; - Game.ascendZoomablel.style.oTransform = 'scale(' + (Game.AscendZoom) + ',' + (Game.AscendZoom) + ')'; - Game.ascendZoomablel.style.mozTransform = 'scale(' + (Game.AscendZoom) + ',' + (Game.AscendZoom) + ')'; - Game.ascendZoomablel.style.transform = 'scale(' + (Game.AscendZoom) + ',' + (Game.AscendZoom) + ')'; - - //if (Game.Scroll!=0) Game.ascendContentl.style.transformOrigin=Math.floor(Game.windowW/2-Game.mouseX)+'px '+Math.floor(Game.windowH/2-Game.mouseY)+'px'; - if (Game.Scroll < 0 && !Game.promptOn) { Game.AscendZoomT = 0.5; } - if (Game.Scroll > 0 && !Game.promptOn) { Game.AscendZoomT = 1; } - - if (Game.T % 2 == 0) { - l('ascendPrestige').innerHTML = loc("Prestige level:") + '
' + SimpleBeautify(Game.prestige); - l('ascendHCs').innerHTML = loc("Heavenly chips:") + '
' + SimpleBeautify(Math.round(Game.heavenlyChipsDisplayed)) + ''; - if (Game.prestige > 0) l('ascendModeButton').style.display = 'block'; - else l('ascendModeButton').style.display = 'none'; - } - Game.heavenlyChipsDisplayed += (Game.heavenlyChips - Game.heavenlyChipsDisplayed) * 0.4; - } - Game.AscendRefocus = function () { - Game.AscendOffX = 0; - Game.AscendOffY = 0; - Game.ascendl.className = ''; - } - - Game.SelectedHeavenlyUpgrade = 0; - Game.PurchaseHeavenlyUpgrade = function (what) { - //if (Game.Has('Neuromancy')) Game.UpgradesById[what].toggle(); else - if (Game.UpgradesById[what].buy()) { - if (l('heavenlyUpgrade' + what)) { var rect = l('heavenlyUpgrade' + what).getBounds(); Game.SparkleAt((rect.left + rect.right) / 2, (rect.top + rect.bottom) / 2 - 24); } - //Game.BuildAscendTree(); - } - } - Game.BuildAscendTree = function (justBought) { - var str = ''; - Game.heavenlyBounds = { left: 0, right: 0, top: 0, bottom: 0 }; - - var toPop = []; - for (var i in Game.PrestigeUpgrades) { - var me = Game.PrestigeUpgrades[i]; - var prevCanBePurchased = me.canBePurchased; - me.canBePurchased = 1; - if (!me.bought && !Game.DebuggingPrestige) { - if (me.showIf && !me.showIf()) me.canBePurchased = 0; - else { - for (var ii in me.parents) { - if (me.parents[ii] != -1 && !me.parents[ii].bought) me.canBePurchased = 0; - } - } - } - if (justBought && me.parents.indexOf(justBought) != -1 && !prevCanBePurchased && me.canBePurchased && !me.bought) toPop.push(me); - } - toPop.sort(function (parent) { - return function (a, b) { - var rot = Math.atan2(a.posY - parent.posY, parent.posX - a.posX) - Math.PI / 2; - var rot2 = Math.atan2(b.posY - parent.posY, parent.posX - b.posX) - Math.PI / 2; - return rot < rot2; - } - }(justBought)); - for (var i = 0; i < toPop.length; i++) { - setTimeout(function () { PlaySound('snd/pop' + Math.floor(Math.random() * 3 + 1) + '.mp3', 0.5); }, (0.2 + i * 0.1) * 1000); - } - str += '
'; - str += '
';//chrome is still bad at these - for (var i in Game.PrestigeUpgrades) { - var me = Game.PrestigeUpgrades[i]; - - var ghosted = 0; - if (me.canBePurchased || Game.Has('Neuromancy')) { - str += Game.crate(me, 'ascend', 'Game.PurchaseHeavenlyUpgrade(' + me.id + ');', 'heavenlyUpgrade' + me.id, toPop.indexOf(me) != -1 ? ('animation:pucker 0.2s ease-out;animation-delay:' + (toPop.indexOf(me) * 0.1 + 0.2) + 's;') : ''); - } - else { - for (var ii in me.parents) { - if (me.parents[ii] != -1 && me.parents[ii].canBePurchased) ghosted = 1; - } - if (me.showIf && !me.showIf()) ghosted = 0; - if (ghosted) { - //maybe replace this with Game.crate() - str += '
'; - } - } - if (me.canBePurchased || Game.Has('Neuromancy') || ghosted) { - if (me.posX < Game.heavenlyBounds.left) Game.heavenlyBounds.left = me.posX; - if (me.posX > Game.heavenlyBounds.right) Game.heavenlyBounds.right = me.posX; - if (me.posY < Game.heavenlyBounds.top) Game.heavenlyBounds.top = me.posY; - if (me.posY > Game.heavenlyBounds.bottom) Game.heavenlyBounds.bottom = me.posY; - } - for (var ii in me.parents)//create pulsing links - { - if (me.parents[ii] != -1 && (me.canBePurchased || ghosted)) { - var origX = 0; - var origY = 0; - var targX = me.posX + 28; - var targY = me.posY + 28; - if (me.parents[ii] != -1) { origX = me.parents[ii].posX + 28; origY = me.parents[ii].posY + 28; } - var rot = -(Math.atan((targY - origY) / (origX - targX)) / Math.PI) * 180; - if (targX <= origX) rot += 180; - var dist = Math.floor(Math.sqrt((targX - origX) * (targX - origX) + (targY - origY) * (targY - origY))); - str += ''; - } - } - } - Game.heavenlyBounds.left -= 128; - Game.heavenlyBounds.top -= 128; - Game.heavenlyBounds.right += 128 + 64; - Game.heavenlyBounds.bottom += 128 + 64; - str += '
'; - Game.ascendUpgradesl.innerHTML = str; - - setTimeout(function () { Game.tooltip.shouldHide = true; }, 100); - } - - /*===================================================================================== - COALESCING SUGAR LUMPS - =======================================================================================*/ - Game.lumpMatureAge = 1; - Game.lumpRipeAge = 1; - Game.lumpOverripeAge = 1; - Game.lumpCurrentType = 0; - l('comments').innerHTML = l('comments').innerHTML + - '
0
'; - Game.lumpTooltip = function () { - var str = '
' + - loc("You have %1.", '' + loc("%1 sugar lump", LBeautify(Game.lumps)) + '') + - '
' + - loc("A sugar lump is coalescing here, attracted by your accomplishments."); - - var age = Date.now() - Game.lumpT; - str += '
'; - if (age < 0) str += loc("This sugar lump has been exposed to time travel shenanigans and will take an excruciating %1 to reach maturity.", Game.sayTime(((Game.lumpMatureAge - age) / 1000 + 1) * Game.fps, -1)); - else if (age < Game.lumpMatureAge) str += loc("This sugar lump is still growing and will take %1 to reach maturity.", Game.sayTime(((Game.lumpMatureAge - age) / 1000 + 1) * Game.fps, -1)); - else if (age < Game.lumpRipeAge) str += loc("This sugar lump is mature and will be ripe in %1.
You may click it to harvest it now, but there is a 50% chance you won't get anything.", Game.sayTime(((Game.lumpRipeAge - age) / 1000 + 1) * Game.fps, -1)); - else if (age < Game.lumpOverripeAge) str += loc("This sugar lump is ripe! Click it to harvest it.
If you do nothing, it will auto-harvest in %1.", Game.sayTime(((Game.lumpOverripeAge - age) / 1000 + 1) * Game.fps, -1)); - - var phase = (age / Game.lumpOverripeAge) * 7; - if (phase >= 3) { - if (Game.lumpCurrentType != 0) str += '
'; - if (Game.lumpCurrentType == 1) str += loc("This sugar lump grew to be bifurcated; harvesting it has a 50% chance of yielding two lumps."); - else if (Game.lumpCurrentType == 2) str += loc("This sugar lump grew to be golden; harvesting it will yield 2 to 7 lumps, your current cookies will be doubled (capped to a gain of 24 hours of your CpS), and you will find 10% more golden cookies for the next 24 hours."); - else if (Game.lumpCurrentType == 3) str += loc("This sugar lump was affected by the elders and grew to be meaty; harvesting it will yield between 0 and 2 lumps."); - else if (Game.lumpCurrentType == 4) str += loc("This sugar lump is caramelized, its stickiness binding it to unexpected things; harvesting it will yield between 1 and 3 lumps and will refill your sugar lump cooldowns."); - } - - str += '
'; - str += loc("Your sugar lumps mature after %1,
ripen after %2,
and fall after %3.", [Game.sayTime((Game.lumpMatureAge / 1000) * Game.fps, -1), Game.sayTime((Game.lumpRipeAge / 1000) * Game.fps, -1), Game.sayTime((Game.lumpOverripeAge / 1000) * Game.fps, -1)]); - - str += '
' + loc("• Sugar lumps can be harvested when mature, though if left alone beyond that point they will start ripening (increasing the chance of harvesting them) and will eventually fall and be auto-harvested after some time.
• Sugar lumps are delicious and may be used as currency for all sorts of things.
• Once a sugar lump is harvested, another one will start growing in its place.
• Note that sugar lumps keep growing when the game is closed.") + '
'; - return str; - } - Game.computeLumpTimes = function () { - var hour = 1000 * 60 * 60; - Game.lumpMatureAge = hour * 20; - Game.lumpRipeAge = hour * 23; - if (Game.Has('Stevia Caelestis')) Game.lumpRipeAge -= hour; - if (Game.Has('Diabetica Daemonicus')) Game.lumpMatureAge -= hour; - if (Game.Has('Ichor syrup')) Game.lumpMatureAge -= 1000 * 60 * 7; - if (Game.Has('Sugar aging process')) Game.lumpRipeAge -= 6000 * Math.min(600, Game.Objects['Grandma'].amount);//capped at 600 grandmas - if (Game.hasGod && Game.BuildingsOwned % 10 == 0) { - var godLvl = Game.hasGod('order'); - if (godLvl == 1) Game.lumpRipeAge -= hour; - else if (godLvl == 2) Game.lumpRipeAge -= (hour / 3) * 2; - else if (godLvl == 3) Game.lumpRipeAge -= (hour / 3); - } - //if (Game.hasAura('Dragon\'s Curve')) {Game.lumpMatureAge/=1.05;Game.lumpRipeAge/=1.05;} - Game.lumpMatureAge /= 1 + Game.auraMult('Dragon\'s Curve') * 0.05; Game.lumpRipeAge /= 1 + Game.auraMult('Dragon\'s Curve') * 0.05; - Game.lumpOverripeAge = Game.lumpRipeAge + hour; - if (Game.Has('Glucose-charged air')) { Game.lumpMatureAge /= 2000; Game.lumpRipeAge /= 2000; Game.lumpOverripeAge /= 2000; } - } - Game.loadLumps = function (time) { - Game.computeLumpTimes(); - //Game.computeLumpType(); - if (!Game.canLumps()) Game.removeClass('lumpsOn'); - else { - if (Game.ascensionMode != 1) Game.addClass('lumpsOn'); - Game.lumpT = Math.min(Date.now(), Game.lumpT); - var age = Math.max(Date.now() - Game.lumpT, 0); - var amount = Math.floor(age / Game.lumpOverripeAge);//how many lumps did we harvest since we closed the game? - if (amount >= 1) { - Game.harvestLumps(1, true); - Game.lumpCurrentType = 0;//all offline lumps after the first one have a normal type - if (amount > 1) Game.harvestLumps(amount - 1, true); - Game.Notify('', loc("You harvested %1 while you were away.", loc("%1 sugar lump", LBeautify(amount))), [29, 14]); - Game.lumpT = Date.now() - (age - amount * Game.lumpOverripeAge); - Game.computeLumpType(); - } - } - } - Game.gainLumps = function (total) { - if (Game.lumpsTotal == -1) { Game.lumpsTotal = 0; Game.lumps = 0; } - Game.lumps += total; - Game.lumpsTotal += total; - - if (Game.lumpsTotal >= 7) Game.Win('Dude, sweet'); - if (Game.lumpsTotal >= 30) Game.Win('Sugar rush'); - if (Game.lumpsTotal >= 365) Game.Win('Year\'s worth of cavities'); - } - Game.clickLump = function () { - triggerAnim(l('lumpsIcon'), 'pucker'); - triggerAnim(l('lumpsIcon2'), 'pucker'); - if (!Game.canLumps()) return; - var age = Date.now() - Game.lumpT; - if (age < Game.lumpMatureAge) { } - else if (age < Game.lumpRipeAge) { - var amount = choose([0, 1]); - if (amount != 0) Game.Win('Hand-picked'); - Game.harvestLumps(amount); - Game.computeLumpType(); - } - else if (age < Game.lumpOverripeAge) { - Game.harvestLumps(1); - Game.computeLumpType(); - } - } - Game.harvestLumps = function (amount, silent) { - if (!Game.canLumps()) return; - Game.lumpT = Date.now(); - var total = amount; - if (Game.lumpCurrentType == 1 && Game.Has('Sucralosia Inutilis') && Math.random() < 0.05) total *= 2; - else if (Game.lumpCurrentType == 1) total *= choose([1, 2]); - else if (Game.lumpCurrentType == 2) { - total *= choose([2, 3, 4, 5, 6, 7]); - Game.gainBuff('sugar blessing', 24 * 60 * 60, 1); - Game.Earn(Math.min(Game.cookiesPs * 60 * 60 * 24, Game.cookies)); - Game.Notify(loc("Sugar blessing activated!"), loc("Your cookies have been doubled.
+10% golden cookies for the next 24 hours."), [29, 16]); - } - else if (Game.lumpCurrentType == 3) total *= choose([0, 0, 1, 2, 2]); - else if (Game.lumpCurrentType == 4) { - total *= choose([1, 2, 3]); - Game.lumpRefill = 0;//Date.now()-Game.getLumpRefillMax(); - Game.Notify(loc("Sugar lump cooldowns cleared!"), '', [29, 27]); - } - total = Math.floor(total); - Game.gainLumps(total); - if (Game.lumpCurrentType == 1) Game.Win('Sugar sugar'); - else if (Game.lumpCurrentType == 2) Game.Win('All-natural cane sugar'); - else if (Game.lumpCurrentType == 3) Game.Win('Sweetmeats'); - else if (Game.lumpCurrentType == 4) Game.Win('Maillard reaction'); - - if (!silent) { - var rect = l('lumpsIcon2').getBounds(); Game.SparkleAt((rect.left + rect.right) / 2, (rect.top + rect.bottom) / 2 - 24 + 32 - TopBarOffset); - if (total > 0) Game.Popup('+' + loc("%1 sugar lump", LBeautify(total)) + '', (rect.left + rect.right) / 2, (rect.top + rect.bottom) / 2 - 48); - else Game.Popup('' + loc("Botched harvest!") + '', (rect.left + rect.right) / 2, (rect.top + rect.bottom) / 2 - 48); - PlaySound('snd/pop' + Math.floor(Math.random() * 3 + 1) + '.mp3', 0.75); - } - Game.computeLumpTimes(); - } - Game.computeLumpType = function () { - Math.seedrandom(Game.seed + '/' + Game.lumpT); - var types = [0]; - var loop = 1; - //if (Game.hasAura('Dragon\'s Curve')) loop=2; - loop += Game.auraMult('Dragon\'s Curve'); - loop = randomFloor(loop); - for (var i = 0; i < loop; i++) { - if (Math.random() < (Game.Has('Sucralosia Inutilis') ? 0.15 : 0.1)) types.push(1);//bifurcated - if (Math.random() < 3 / 1000) types.push(2);//golden - if (Math.random() < 0.1 * Game.elderWrath) types.push(3);//meaty - if (Math.random() < 1 / 50) types.push(4);//caramelized - } - Game.lumpCurrentType = choose(types); - Math.seedrandom(); - } - - Game.canLumps = function ()//grammatically pleasing function name - { - if (Game.lumpsTotal > -1 || (Game.ascensionMode != 1 && (Game.cookiesEarned + Game.cookiesReset) >= 1000000000)) return true; - return false; - } - - Game.getLumpRefillMax = function () { - return Game.fps * 60 * 15;//1000*60*15;//15 minutes - } - Game.getLumpRefillRemaining = function () { - return Game.lumpRefill;//Game.getLumpRefillMax()-(Date.now()-Game.lumpRefill); - } - Game.canRefillLump = function () { - return Game.lumpRefill <= 0;//((Date.now()-Game.lumpRefill)>=Game.getLumpRefillMax()); - } - Game.refillLump = function (n, func) { - if (Game.lumps >= n && Game.canRefillLump()) { - Game.spendLump(n, 'refill', function () { - if (!Game.sesame) Game.lumpRefill = Game.getLumpRefillMax();//Date.now(); - func(); - })(); - } - } - Game.spendLump = function (n, str, func, free) { - //ask if we want to spend N lumps (unless free) - return function () { - if (!free && Game.lumps < n) return false; - if (!free && Game.prefs.askLumps) { - PlaySound('snd/tick.mp3'); - Game.promptConfirmFunc = func;//bit dumb - Game.Prompt('
' + loc("Do you want to spend %1 to %2?", ['' + loc("%1 sugar lump", LBeautify(n)) + '', str]) + '
', [[loc("Yes"), 'Game.lumps-=' + n + ';Game.promptConfirmFunc();Game.promptConfirmFunc=0;Game.recalculateGains=1;Game.ClosePrompt();'], loc("No")]); - return false; - } - else { - if (!free) Game.lumps -= n; - func(); - Game.recalculateGains = 1; - } - } - } - - Game.doLumps = function () { - if (Game.lumpRefill > 0) Game.lumpRefill--; - - if (!Game.canLumps()) { Game.removeClass('lumpsOn'); return; } - if (Game.lumpsTotal == -1) { - //first time ! - if (Game.ascensionMode != 1) Game.addClass('lumpsOn'); - Game.lumpT = Date.now(); - Game.lumpsTotal = 0; - Game.lumps = 0; - Game.computeLumpType(); - - Game.Notify(loc("Sugar lumps!"), loc("Because you've baked a billion cookies in total, you are now attracting sugar lumps. They coalesce quietly near the top of your screen, under the Stats button.
You will be able to harvest them when they're ripe, after which you may spend them on all sorts of things!"), [23, 14]); - } - var age = Date.now() - Game.lumpT; - if (age > Game.lumpOverripeAge) { - age = 0; - Game.harvestLumps(1); - Game.computeLumpType(); - } - - var phase = Math.min(6, Math.floor((age / Game.lumpOverripeAge) * 7)); - var phase2 = Math.min(6, Math.floor((age / Game.lumpOverripeAge) * 7) + 1); - var row = 14; - var row2 = 14; - var type = Game.lumpCurrentType; - if (type == 1)//double - { - //if (phase>=6) row=15; - if (phase2 >= 6) row2 = 15; - } - else if (type == 2)//golden - { - if (phase >= 4) row = 16; - if (phase2 >= 4) row2 = 16; - } - else if (type == 3)//meaty - { - if (phase >= 4) row = 17; - if (phase2 >= 4) row2 = 17; - } - else if (type == 4)//caramelized - { - if (phase >= 4) row = 27; - if (phase2 >= 4) row2 = 27; - } - var icon = [23 + Math.min(phase, 5), row]; - var icon2 = [23 + phase2, row2]; - if (age < 0) { icon = [17, 5]; icon2 = [17, 5]; } - var opacity = Math.min(6, (age / Game.lumpOverripeAge) * 7) % 1; - if (phase >= 6) { opacity = 1; } - l('lumpsIcon').style.backgroundPosition = (-icon[0] * 48) + 'px ' + (-icon[1] * 48) + 'px'; - l('lumpsIcon2').style.backgroundPosition = (-icon2[0] * 48) + 'px ' + (-icon2[1] * 48) + 'px'; - l('lumpsIcon2').style.opacity = opacity; - l('lumpsAmount').textContent = Beautify(Game.lumps); - } - - /*===================================================================================== - COOKIE ECONOMICS - =======================================================================================*/ - Game.Earn = function (howmuch) { - Game.cookies += howmuch; - Game.cookiesEarned += howmuch; - } - Game.Spend = function (howmuch) { - Game.cookies -= howmuch; - } - Game.Dissolve = function (howmuch) { - Game.cookies -= howmuch; - Game.cookiesEarned -= howmuch; - Game.cookies = Math.max(0, Game.cookies); - Game.cookiesEarned = Math.max(0, Game.cookiesEarned); - } - Game.mouseCps = function () { - var add = 0; - if (Game.Has('Thousand fingers')) add += 0.1; - if (Game.Has('Million fingers')) add *= 5; - if (Game.Has('Billion fingers')) add *= 10; - if (Game.Has('Trillion fingers')) add *= 20; - if (Game.Has('Quadrillion fingers')) add *= 20; - if (Game.Has('Quintillion fingers')) add *= 20; - if (Game.Has('Sextillion fingers')) add *= 20; - if (Game.Has('Septillion fingers')) add *= 20; - if (Game.Has('Octillion fingers')) add *= 20; - if (Game.Has('Nonillion fingers')) add *= 20; - if (Game.Has('Decillion fingers')) add *= 20; - if (Game.Has('Undecillion fingers')) add *= 20; - if (Game.Has('Unshackled cursors')) add *= 25; - - var num = 0; - for (var i in Game.Objects) { num += Game.Objects[i].amount; } - num -= Game.Objects['Cursor'].amount; - add = add * num; - if (Game.Has('Plastic mouse')) add += Game.cookiesPs * 0.01; - if (Game.Has('Iron mouse')) add += Game.cookiesPs * 0.01; - if (Game.Has('Titanium mouse')) add += Game.cookiesPs * 0.01; - if (Game.Has('Adamantium mouse')) add += Game.cookiesPs * 0.01; - if (Game.Has('Unobtainium mouse')) add += Game.cookiesPs * 0.01; - if (Game.Has('Eludium mouse')) add += Game.cookiesPs * 0.01; - if (Game.Has('Wishalloy mouse')) add += Game.cookiesPs * 0.01; - if (Game.Has('Fantasteel mouse')) add += Game.cookiesPs * 0.01; - if (Game.Has('Nevercrack mouse')) add += Game.cookiesPs * 0.01; - if (Game.Has('Armythril mouse')) add += Game.cookiesPs * 0.01; - if (Game.Has('Technobsidian mouse')) add += Game.cookiesPs * 0.01; - if (Game.Has('Plasmarble mouse')) add += Game.cookiesPs * 0.01; - if (Game.Has('Miraculite mouse')) add += Game.cookiesPs * 0.01; - if (Game.Has('Aetherice mouse')) add += Game.cookiesPs * 0.01; - if (Game.Has('Omniplast mouse')) add += Game.cookiesPs * 0.01; - - if (Game.Has('Fortune #104')) add += Game.cookiesPs * 0.01; - var mult = 1; - - - if (Game.Has('Santa\'s helpers')) mult *= 1.1; - if (Game.Has('Cookie egg')) mult *= 1.1; - if (Game.Has('Halo gloves')) mult *= 1.1; - if (Game.Has('Dragon claw')) mult *= 1.03; - - if (Game.Has('Aura gloves')) { - mult *= 1 + 0.05 * Math.min(Game.Objects['Cursor'].level, Game.Has('Luminous gloves') ? 20 : 10); - } - - mult *= Game.eff('click'); - - if (Game.hasGod) { - var godLvl = Game.hasGod('labor'); - if (godLvl == 1) mult *= 1.15; - else if (godLvl == 2) mult *= 1.1; - else if (godLvl == 3) mult *= 1.05; - } - - for (var i in Game.buffs) { - if (typeof Game.buffs[i].multClick != 'undefined') mult *= Game.buffs[i].multClick; - } - - //if (Game.hasAura('Dragon Cursor')) mult*=1.05; - mult *= 1 + Game.auraMult('Dragon Cursor') * 0.05; - - var out = mult * Game.ComputeCps(1, Game.Has('Reinforced index finger') + Game.Has('Carpal tunnel prevention cream') + Game.Has('Ambidextrous'), add); - - out = Game.runModHookOnValue('cookiesPerClick', out); - - if (Game.hasBuff('Cursed finger')) out = Game.buffs['Cursed finger'].power; - return out; - } - Game.computedMouseCps = 1; - Game.globalCpsMult = 1; - Game.unbuffedCps = 0; - Game.buildingCps = 0; - Game.lastClick = 0; - Game.CanClick = 1; - Game.autoclickerDetected = 0; - Game.BigCookieState = 0;//0 = normal, 1 = clicked (small), 2 = released/hovered (big) - Game.BigCookieSize = 0; - Game.BigCookieSizeD = 0; - Game.BigCookieSizeT = 1; - Game.cookieClickSound = Math.floor(Math.random() * 7) + 1; - Game.playCookieClickSound = function () { - if (Game.prefs.cookiesound) PlaySound('snd/clickb' + (Game.cookieClickSound) + '.mp3', 0.5); - else PlaySound('snd/click' + (Game.cookieClickSound) + '.mp3', 0.5); - Game.cookieClickSound += Math.floor(Math.random() * 4) + 1; - if (Game.cookieClickSound > 7) Game.cookieClickSound -= 7; - } - Game.ClickCookie = function (e, amount) { - var now = Date.now(); - if (e) e.preventDefault(); - if (Game.OnAscend || Game.AscendTimer > 0 || Game.T < 3 || now - Game.lastClick < 1000 / ((e ? e.detail : 1) === 0 ? 3 : 50)) { } - else { - if (now - Game.lastClick < (1000 / 15)) { - Game.autoclickerDetected += Game.fps; - if (Game.autoclickerDetected >= Game.fps * 5) Game.Win('Uncanny clicker'); - } - Game.loseShimmeringVeil('click'); - var amount = amount ? amount : Game.computedMouseCps; - Game.Earn(amount); - Game.handmadeCookies += amount; - if (Game.prefs.particles) { - Game.particleAdd(); - Game.particleAdd(Game.mouseX, Game.mouseY, Math.random() * 4 - 2, Math.random() * -2 - 2, Math.random() * 0.5 + 0.75, 1, 2); - } - if (Game.prefs.numbers) Game.particleAdd(Game.mouseX + Math.random() * 8 - 4, Game.mouseY - 8 + Math.random() * 8 - 4, 0, -2, 1, 4, 2, '', '+' + Beautify(amount, 1)); - - Game.runModHook('click'); - - Game.playCookieClickSound(); - Game.cookieClicks++; - - if (Game.clicksThisSession == 0) PlayCue('preplay'); - Game.clicksThisSession++; - Game.lastClick = now; - } - Game.Click = 0; - } - Game.mouseX = 0; - Game.mouseY = 0; - Game.mouseX2 = 0; - Game.mouseY2 = 0; - Game.mouseMoved = 0; - Game.GetMouseCoords = function (e) { - var posx = 0; - var posy = 0; - if (!e) var e = window.event; - if (e.pageX || e.pageY) { - posx = e.pageX; - posy = e.pageY; - } - else if (e.clientX || e.clientY) { - posx = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft; - posy = e.clientY + document.body.scrollTop + document.documentElement.scrollTop; - } - var x = 0; - var y = TopBarOffset; - /* - var el=l('sectionLeft'); - while(el && !isNaN(el.offsetLeft) && !isNaN(el.offsetTop)) - { - x+=el.offsetLeft-el.scrollLeft; - y+=el.offsetTop-el.scrollTop; - el=el.offsetParent; - }*/ - Game.mouseX2 = Game.mouseX; - Game.mouseY2 = Game.mouseY; - Game.mouseX = (posx - x) / Game.scale; - Game.mouseY = (posy - y) / Game.scale; - Game.mouseMoved = 1; - Game.lastActivity = Game.time; - } - var bigCookie = l('bigCookie'); - if (Game.prefs.screenreader) { - bigCookie.ariaLabelledby = 'bigCookieLabel'; - bigCookie.insertAdjacentHTML('beforeend', ''); - bigCookie.tabIndex = 1; - } - Game.Click = 0; - Game.lastClickedEl = 0; - Game.clicksThisSession = 0; - Game.clickFrom = 0; - Game.Scroll = 0; - Game.mouseDown = 0; - if (!Game.touchEvents) { - AddEvent(bigCookie, 'click', Game.ClickCookie); - AddEvent(bigCookie, 'mousedown', function (event) { Game.BigCookieState = 1; if (Game.prefs.cookiesound) { Game.playCookieClickSound(); } if (event) event.preventDefault(); }); - AddEvent(bigCookie, 'mouseup', function (event) { Game.BigCookieState = 2; if (event) event.preventDefault(); }); - AddEvent(bigCookie, 'mouseout', function (event) { Game.BigCookieState = 0; }); - AddEvent(bigCookie, 'mouseover', function (event) { Game.BigCookieState = 2; }); - AddEvent(document, 'mousemove', Game.GetMouseCoords); - AddEvent(document, 'mousedown', function (event) { Game.lastActivity = Game.time; Game.mouseDown = 1; Game.clickFrom = event.target; }); - AddEvent(document, 'mouseup', function (event) { Game.lastActivity = Game.time; Game.mouseDown = 0; Game.clickFrom = 0; }); - AddEvent(document, 'click', function (event) { Game.lastActivity = Game.time; Game.Click = 1; Game.lastClickedEl = event.target; Game.clickFrom = 0; }); - Game.handleScroll = function (e) { - if (!e) e = event; - Game.Scroll = (e.detail < 0 || e.wheelDelta > 0) ? 1 : -1; - Game.lastActivity = Game.time; - }; - AddEvent(document, 'DOMMouseScroll', Game.handleScroll); - AddEvent(document, 'mousewheel', Game.handleScroll); - } - else { - //touch events - AddEvent(bigCookie, 'touchend', Game.ClickCookie); - AddEvent(bigCookie, 'touchstart', function (event) { Game.BigCookieState = 1; if (event) event.preventDefault(); }); - AddEvent(bigCookie, 'touchend', function (event) { Game.BigCookieState = 0; if (event) event.preventDefault(); }); - //AddEvent(document,'touchmove',Game.GetMouseCoords); - AddEvent(document, 'mousemove', Game.GetMouseCoords); - AddEvent(document, 'touchstart', function (event) { Game.lastActivity = Game.time; Game.mouseDown = 1; }); - AddEvent(document, 'touchend', function (event) { Game.lastActivity = Game.time; Game.mouseDown = 0; }); - AddEvent(document, 'touchend', function (event) { Game.lastActivity = Game.time; Game.Click = 1; }); - } - - Game.keys = []; - AddEvent(window, 'keyup', function (e) { - Game.lastActivity = Game.time; - if (e.keyCode == 27) { - if (Game.promptOn && !Game.promptNoClose) { Game.ClosePrompt(); PlaySound('snd/tickOff.mp3'); } - if (Game.AscendTimer > 0) Game.AscendTimer = Game.AscendDuration; - }//esc closes prompt - if (Game.promptOn) { - if (e.keyCode == 13) Game.ConfirmPrompt();//enter confirms prompt - } - Game.keys[e.keyCode] = 0; - }); - AddEvent(window, 'keydown', function (e) { - if (Game.promptOn) { - if (e.keyCode == 9) { - //tab to shift through prompt buttons - if (e.shiftKey) Game.FocusPromptOption(-1); - else Game.FocusPromptOption(1); - e.preventDefault(); - } - } - if (!Game.OnAscend && Game.AscendTimer == 0) { - if (e.ctrlKey && e.keyCode == 83) { Game.toSave = true; e.preventDefault(); }//ctrl-s saves the game - else if (e.ctrlKey && e.keyCode == 79) { Game.ImportSave(); e.preventDefault(); }//ctrl-o opens the import menu - } - if ((e.keyCode == 16 || e.keyCode == 17) && Game.tooltip.dynamic) Game.tooltip.update(); - Game.keys[e.keyCode] = 1; - if (e.keyCode == 9) Game.keys = [];//reset keys on tab press - }); - - AddEvent(window, 'visibilitychange', function (e) { - Game.keys = [];//reset all key pressed on visibility change (should help prevent ctrl still being down after ctrl-tab) - }); - - /*===================================================================================== - CPS RECALCULATOR - =======================================================================================*/ - - Game.heavenlyPower = 1;//how many CpS percents a single heavenly chip gives - Game.recalculateGains = 1; - Game.cookiesPsByType = {}; - Game.cookiesMultByType = {}; - //display bars with http://codepen.io/anon/pen/waGyEJ - Game.effs = {}; - Game.eff = function (name, def) { if (typeof Game.effs[name] === 'undefined') return (typeof def === 'undefined' ? 1 : def); else return Game.effs[name]; }; - - Game.CalculateGains = function () { - Game.cookiesPs = 0; - var mult = 1; - //add up effect bonuses from building minigames - var effs = {}; - for (var i in Game.Objects) { - if (Game.Objects[i].minigameLoaded && Game.Objects[i].minigame.effs) { - var myEffs = Game.Objects[i].minigame.effs; - for (var ii in myEffs) { - if (effs[ii]) effs[ii] *= myEffs[ii]; - else effs[ii] = myEffs[ii]; - } - } - } - Game.effs = effs; - - if (Game.ascensionMode != 1) mult += parseFloat(Game.prestige) * 0.01 * Game.heavenlyPower * Game.GetHeavenlyMultiplier(); - - mult *= Game.eff('cps'); - - if (Game.Has('Heralds') && Game.ascensionMode != 1) mult *= (1 + 0.01 * Game.heralds); - - for (var i in Game.cookieUpgrades) { - var me = Game.cookieUpgrades[i]; - if (Game.Has(me.name)) { - mult *= (1 + (typeof (me.power) === 'function' ? me.power(me) : me.power) * 0.01); - } - } - - if (Game.Has('Specialized chocolate chips')) mult *= 1.01; - if (Game.Has('Designer cocoa beans')) mult *= 1.02; - if (Game.Has('Underworld ovens')) mult *= 1.03; - if (Game.Has('Exotic nuts')) mult *= 1.04; - if (Game.Has('Arcane sugar')) mult *= 1.05; - - if (Game.Has('Increased merriness')) mult *= 1.15; - if (Game.Has('Improved jolliness')) mult *= 1.15; - if (Game.Has('A lump of coal')) mult *= 1.01; - if (Game.Has('An itchy sweater')) mult *= 1.01; - if (Game.Has('Santa\'s dominion')) mult *= 1.2; - - if (Game.Has('Fortune #100')) mult *= 1.01; - if (Game.Has('Fortune #101')) mult *= 1.07; - - if (Game.Has('Dragon scale')) mult *= 1.03; - - var buildMult = 1; - if (Game.hasGod) { - var godLvl = Game.hasGod('asceticism'); - if (godLvl == 1) mult *= 1.15; - else if (godLvl == 2) mult *= 1.1; - else if (godLvl == 3) mult *= 1.05; - - var godLvl = Game.hasGod('ages'); - if (godLvl == 1) mult *= 1 + 0.15 * Math.sin((Date.now() / 1000 / (60 * 60 * 3)) * Math.PI * 2); - else if (godLvl == 2) mult *= 1 + 0.15 * Math.sin((Date.now() / 1000 / (60 * 60 * 12)) * Math.PI * 2); - else if (godLvl == 3) mult *= 1 + 0.15 * Math.sin((Date.now() / 1000 / (60 * 60 * 24)) * Math.PI * 2); - - var godLvl = Game.hasGod('decadence'); - if (godLvl == 1) buildMult *= 0.93; - else if (godLvl == 2) buildMult *= 0.95; - else if (godLvl == 3) buildMult *= 0.98; - - var godLvl = Game.hasGod('industry'); - if (godLvl == 1) buildMult *= 1.1; - else if (godLvl == 2) buildMult *= 1.06; - else if (godLvl == 3) buildMult *= 1.03; - - var godLvl = Game.hasGod('labor'); - if (godLvl == 1) buildMult *= 0.97; - else if (godLvl == 2) buildMult *= 0.98; - else if (godLvl == 3) buildMult *= 0.99; - } - - if (Game.Has('Santa\'s legacy')) mult *= 1 + (Game.santaLevel + 1) * 0.03; - - - Game.milkProgress = Game.AchievementsOwned / 25; - var milkMult = 1; - if (Game.Has('Santa\'s milk and cookies')) milkMult *= 1.05; - //if (Game.hasAura('Breath of Milk')) milkMult*=1.05; - milkMult *= 1 + Game.auraMult('Breath of Milk') * 0.05; - if (Game.hasGod) { - var godLvl = Game.hasGod('mother'); - if (godLvl == 1) milkMult *= 1.1; - else if (godLvl == 2) milkMult *= 1.05; - else if (godLvl == 3) milkMult *= 1.03; - } - milkMult *= Game.eff('milk'); - - var catMult = 1; - - if (Game.Has('Kitten helpers')) catMult *= (1 + Game.milkProgress * 0.1 * milkMult); - if (Game.Has('Kitten workers')) catMult *= (1 + Game.milkProgress * 0.125 * milkMult); - if (Game.Has('Kitten engineers')) catMult *= (1 + Game.milkProgress * 0.15 * milkMult); - if (Game.Has('Kitten overseers')) catMult *= (1 + Game.milkProgress * 0.175 * milkMult); - if (Game.Has('Kitten managers')) catMult *= (1 + Game.milkProgress * 0.2 * milkMult); - if (Game.Has('Kitten accountants')) catMult *= (1 + Game.milkProgress * 0.2 * milkMult); - if (Game.Has('Kitten specialists')) catMult *= (1 + Game.milkProgress * 0.2 * milkMult); - if (Game.Has('Kitten experts')) catMult *= (1 + Game.milkProgress * 0.2 * milkMult); - if (Game.Has('Kitten consultants')) catMult *= (1 + Game.milkProgress * 0.2 * milkMult); - if (Game.Has('Kitten assistants to the regional manager')) catMult *= (1 + Game.milkProgress * 0.175 * milkMult); - if (Game.Has('Kitten marketeers')) catMult *= (1 + Game.milkProgress * 0.15 * milkMult); - if (Game.Has('Kitten analysts')) catMult *= (1 + Game.milkProgress * 0.125 * milkMult); - if (Game.Has('Kitten executives')) catMult *= (1 + Game.milkProgress * 0.115 * milkMult); - if (Game.Has('Kitten admins')) catMult *= (1 + Game.milkProgress * 0.11 * milkMult); - if (Game.Has('Kitten strategists')) catMult *= (1 + Game.milkProgress * 0.105 * milkMult); - if (Game.Has('Kitten angels')) catMult *= (1 + Game.milkProgress * 0.1 * milkMult); - if (Game.Has('Fortune #103')) catMult *= (1 + Game.milkProgress * 0.05 * milkMult); - - Game.cookiesMultByType['kittens'] = catMult; - - for (var i in Game.Objects) { - var me = Game.Objects[i]; - me.storedCps = me.cps(me); - if (Game.ascensionMode != 1) me.storedCps *= (1 + me.level * 0.01) * buildMult; - if (me.id == 1 && Game.Has('Milkhelp® lactose intolerance relief tablets')) me.storedCps *= 1 + 0.05 * Game.milkProgress * milkMult;//this used to be "me.storedCps*=1+0.1*Math.pow(catMult-1,0.5)" which was. hmm - me.storedTotalCps = me.amount * me.storedCps; - Game.cookiesPs += me.storedTotalCps; - Game.cookiesPsByType[me.name] = me.storedTotalCps; - } - //cps from buildings only - Game.buildingCps = Game.cookiesPs; - - if (Game.Has('"egg"')) { Game.cookiesPs += 9; Game.cookiesPsByType['"egg"'] = 9; }//"egg" - - mult *= catMult; - - var eggMult = 1; - if (Game.Has('Chicken egg')) eggMult *= 1.01; - if (Game.Has('Duck egg')) eggMult *= 1.01; - if (Game.Has('Turkey egg')) eggMult *= 1.01; - if (Game.Has('Quail egg')) eggMult *= 1.01; - if (Game.Has('Robin egg')) eggMult *= 1.01; - if (Game.Has('Ostrich egg')) eggMult *= 1.01; - if (Game.Has('Cassowary egg')) eggMult *= 1.01; - if (Game.Has('Salmon roe')) eggMult *= 1.01; - if (Game.Has('Frogspawn')) eggMult *= 1.01; - if (Game.Has('Shark egg')) eggMult *= 1.01; - if (Game.Has('Turtle egg')) eggMult *= 1.01; - if (Game.Has('Ant larva')) eggMult *= 1.01; - if (Game.Has('Century egg')) { - //the boost increases a little every day, with diminishing returns up to +10% on the 100th day - var day = Math.floor((Date.now() - Game.startDate) / 1000 / 10) * 10 / 60 / 60 / 24; - day = Math.min(day, 100); - eggMult *= 1 + (1 - Math.pow(1 - day / 100, 3)) * 0.1; - } - - Game.cookiesMultByType['eggs'] = eggMult; - mult *= eggMult; - - if (Game.Has('Sugar baking')) mult *= (1 + Math.min(100, Game.lumps) * 0.01); - - //if (Game.hasAura('Radiant Appetite')) mult*=2; - mult *= 1 + Game.auraMult('Radiant Appetite'); - - var rawCookiesPs = Game.cookiesPs * mult; - for (var i in Game.CpsAchievements) { - if (rawCookiesPs >= Game.CpsAchievements[i].threshold) Game.Win(Game.CpsAchievements[i].name); - } - Game.cookiesPsRaw = rawCookiesPs; - Game.cookiesPsRawHighest = Math.max(Game.cookiesPsRawHighest, rawCookiesPs); - - var n = Game.shimmerTypes['golden'].n; - var auraMult = Game.auraMult('Dragon\'s Fortune'); - for (var i = 0; i < n; i++) { mult *= 1 + auraMult * 1.23; } - - name = Game.bakeryName.toLowerCase(); - if (name == 'orteil') mult *= 0.99; - else if (name == 'ortiel') mult *= 0.98;//or so help me - - var sucking = 0; - for (var i in Game.wrinklers) { - if (Game.wrinklers[i].phase == 2) { - sucking++; - } - } - var suckRate = 1 / 20;//each wrinkler eats a twentieth of your CpS - suckRate *= Game.eff('wrinklerEat'); - suckRate *= 1 + Game.auraMult('Dragon Guts') * 0.2; - - Game.cpsSucked = Math.min(1, sucking * suckRate); - - - if (Game.Has('Elder Covenant')) mult *= 0.95; - - if (Game.Has('Golden switch [off]')) { - var goldenSwitchMult = 1.5; - if (Game.Has('Residual luck')) { - var upgrades = Game.goldenCookieUpgrades; - for (var i in upgrades) { if (Game.Has(upgrades[i])) goldenSwitchMult += 0.1; } - } - mult *= goldenSwitchMult; - } - if (Game.Has('Shimmering veil [off]')) { - mult *= 1 + Game.getVeilBoost(); - } - if (Game.Has('Magic shenanigans')) mult *= 1000; - if (Game.Has('Occult obstruction')) mult *= 0; - - - Game.cookiesPs = Game.runModHookOnValue('cps', Game.cookiesPs); - - - //cps without golden cookie effects - Game.unbuffedCps = Game.cookiesPs * mult; - - for (var i in Game.buffs) { - if (typeof Game.buffs[i].multCpS !== 'undefined') mult *= Game.buffs[i].multCpS; - } - - Game.globalCpsMult = mult; - Game.cookiesPs *= Game.globalCpsMult; - - //if (Game.hasBuff('Cursed finger')) Game.cookiesPs=0; - - Game.computedMouseCps = Game.mouseCps(); - - Game.computeLumpTimes(); - - Game.recalculateGains = 0; - } - - Game.dropRateMult = function () { - var rate = 1; - if (Game.Has('Green yeast digestives')) rate *= 1.03; - if (Game.Has('Dragon teddy bear')) rate *= 1.03; - rate *= Game.eff('itemDrops'); - //if (Game.hasAura('Mind Over Matter')) rate*=1.25; - rate *= 1 + Game.auraMult('Mind Over Matter') * 0.25; - if (Game.Has('Santa\'s bottomless bag')) rate *= 1.1; - if (Game.Has('Cosmic beginner\'s luck') && !Game.Has('Heavenly chip secret')) rate *= 5; - return rate; - } - /*===================================================================================== - SHIMMERS (GOLDEN COOKIES & SUCH) - =======================================================================================*/ - Game.shimmersL = l('shimmers'); - Game.shimmers = [];//all shimmers currently on the screen - Game.shimmersN = Math.floor(Math.random() * 10000); - Game.shimmer = function (type, obj, noCount) { - this.type = type; - - this.l = document.createElement('div'); - this.l.className = 'shimmer'; - if (!Game.touchEvents) { AddEvent(this.l, 'click', function (what) { return function (event) { what.pop(event); }; }(this)); } - else { AddEvent(this.l, 'touchend', function (what) { return function (event) { what.pop(event); }; }(this)); }//touch events - - this.x = 0; - this.y = 0; - this.id = Game.shimmersN; - - this.force = ''; - this.forceObj = obj || 0; - if (this.forceObj.type) this.force = this.forceObj.type; - this.noCount = noCount; - if (!this.noCount) { Game.shimmerTypes[this.type].n++; Game.recalculateGains = 1; } - - this.init(); - - Game.shimmersL.appendChild(this.l); - Game.shimmers.push(this); - Game.shimmersN++; - } - Game.shimmer.prototype.init = function ()//executed when the shimmer is created - { - Game.shimmerTypes[this.type].initFunc(this); - } - Game.shimmer.prototype.update = function ()//executed every frame - { - Game.shimmerTypes[this.type].updateFunc(this); - } - Game.shimmer.prototype.pop = function (event)//executed when the shimmer is popped by the player - { - if (event) event.preventDefault(); - Game.loseShimmeringVeil('shimmer'); - Game.Click = 0; - Game.shimmerTypes[this.type].popFunc(this); - } - Game.shimmer.prototype.die = function ()//executed after the shimmer disappears (from old age or popping) - { - if (Game.shimmerTypes[this.type].spawnsOnTimer && this.spawnLead) { - //if this was the spawn lead for this shimmer type, set the shimmer type's "spawned" to 0 and restart its spawn timer - var type = Game.shimmerTypes[this.type]; - type.time = 0; - type.spawned = 0; - type.minTime = type.getMinTime(this); - type.maxTime = type.getMaxTime(this); - } - Game.shimmersL.removeChild(this.l); - if (Game.shimmers.indexOf(this) != -1) Game.shimmers.splice(Game.shimmers.indexOf(this), 1); - if (!this.noCount) { Game.shimmerTypes[this.type].n = Math.max(0, Game.shimmerTypes[this.type].n - 1); Game.recalculateGains = 1; } - } - - - Game.updateShimmers = function ()//run shimmer functions, kill overtimed shimmers and spawn new ones - { - for (var i in Game.shimmers) { - Game.shimmers[i].update(); - } - - //cookie storm! - if (Game.hasBuff('Cookie storm') && Math.random() < 0.5) { - var newShimmer = new Game.shimmer('golden', { type: 'cookie storm drop' }, 1); - newShimmer.dur = Math.ceil(Math.random() * 4 + 1); - newShimmer.life = Math.ceil(Game.fps * newShimmer.dur); - //newShimmer.force='cookie storm drop'; - newShimmer.sizeMult = Math.random() * 0.75 + 0.25; - } - - //spawn shimmers - for (var i in Game.shimmerTypes) { - var me = Game.shimmerTypes[i]; - if (me.spawnsOnTimer && me.spawnConditions())//only run on shimmer types that work on a timer - { - if (!me.spawned)//no shimmer spawned for this type? check the timer and try to spawn one - { - me.time++; - if (Math.random() < Math.pow(Math.max(0, (me.time - me.minTime) / (me.maxTime - me.minTime)), 5)) { - var newShimmer = new Game.shimmer(i); - newShimmer.spawnLead = 1; - if (Game.Has('Distilled essence of redoubled luck') && Math.random() < 0.01) var newShimmer = new Game.shimmer(i); - me.spawned = 1; - } - } - } - } - } - Game.killShimmers = function ()//stop and delete all shimmers (used on resetting etc) - { - for (var i = Game.shimmers.length - 1; i >= 0; i--) { - Game.shimmers[i].die(); - } - for (var i in Game.shimmerTypes) { - var me = Game.shimmerTypes[i]; - if (me.reset) me.reset(); - me.n = 0; - if (me.spawnsOnTimer) { - me.time = 0; - me.spawned = 0; - me.minTime = me.getMinTime(me); - me.maxTime = me.getMaxTime(me); - } - } - } - - Game.shimmerTypes = { - //in these, "me" refers to the shimmer itself, and "this" to the shimmer's type object - 'golden': { - reset: function () { - this.chain = 0; - this.totalFromChain = 0; - this.last = ''; - }, - initFunc: function (me) { - if (!this.spawned && me.force != 'cookie storm drop' && Game.chimeType != 0 && Game.ascensionMode != 1) Game.playGoldenCookieChime(); - - //set image - var bgPic = Game.resPath + 'img/goldCookie.png'; - var picX = 0; var picY = 0; - - - if ((!me.forceObj || !me.forceObj.noWrath) && ((me.forceObj && me.forceObj.wrath) || (Game.elderWrath == 1 && Math.random() < 1 / 3) || (Game.elderWrath == 2 && Math.random() < 2 / 3) || (Game.elderWrath == 3) || (Game.hasGod && Game.hasGod('scorn')))) { - me.wrath = 1; - if (Game.season == 'halloween') bgPic = Game.resPath + 'img/spookyCookie.png'; - else bgPic = Game.resPath + 'img/wrathCookie.png'; - } - else { - me.wrath = 0; - } - - if (Game.season == 'valentines') { - bgPic = Game.resPath + 'img/hearts.png'; - picX = Math.floor(Math.random() * 8); - } - else if (Game.season == 'fools') { - bgPic = Game.resPath + 'img/contract.png'; - if (me.wrath) bgPic = Game.resPath + 'img/wrathContract.png'; - } - else if (Game.season == 'easter') { - bgPic = Game.resPath + 'img/bunnies.png'; - picX = Math.floor(Math.random() * 4); - picY = 0; - if (me.wrath) picY = 1; - } - - me.x = Math.floor(Math.random() * Math.max(0, (Game.bounds.right - 300) - Game.bounds.left - 128) + Game.bounds.left + 64) - 64; - me.y = Math.floor(Math.random() * Math.max(0, Game.bounds.bottom - Game.bounds.top - 128) + Game.bounds.top + 64) - 64; - me.l.style.left = me.x + 'px'; - me.l.style.top = me.y + 'px'; - me.l.style.width = '96px'; - me.l.style.height = '96px'; - me.l.style.backgroundImage = 'url(' + bgPic + ')'; - me.l.style.backgroundPosition = (-picX * 96) + 'px ' + (-picY * 96) + 'px'; - me.l.style.opacity = '0'; - me.l.style.display = 'block'; - me.l.setAttribute('alt', loc(me.wrath ? "Wrath cookie" : "Golden cookie")); - - me.life = 1;//the cookie's current progression through its lifespan (in frames) - me.dur = 13;//duration; the cookie's lifespan in seconds before it despawns - - var dur = 13; - if (Game.Has('Lucky day')) dur *= 2; - if (Game.Has('Serendipity')) dur *= 2; - if (Game.Has('Decisive fate')) dur *= 1.05; - if (Game.Has('Lucky digit')) dur *= 1.01; - if (Game.Has('Lucky number')) dur *= 1.01; - if (Game.Has('Lucky payout')) dur *= 1.01; - if (!me.wrath) dur *= Game.eff('goldenCookieDur'); - else dur *= Game.eff('wrathCookieDur'); - dur *= Math.pow(0.95, Game.shimmerTypes['golden'].n - 1);//5% shorter for every other golden cookie on the screen - if (this.chain > 0) dur = Math.max(2, 10 / this.chain);//this is hilarious - me.dur = dur; - me.life = Math.ceil(Game.fps * me.dur); - me.sizeMult = 1; - }, - updateFunc: function (me) { - var curve = 1 - Math.pow((me.life / (Game.fps * me.dur)) * 2 - 1, 4); - me.l.style.opacity = curve; - //this line makes each golden cookie pulse in a unique way - if (Game.prefs.fancy) me.l.style.transform = 'rotate(' + (Math.sin(me.id * 0.69) * 24 + Math.sin(Game.T * (0.35 + Math.sin(me.id * 0.97) * 0.15) + me.id/*+Math.sin(Game.T*0.07)*2+2*/) * (3 + Math.sin(me.id * 0.36) * 2)) + 'deg) scale(' + (me.sizeMult * (1 + Math.sin(me.id * 0.53) * 0.2) * curve * (1 + (0.06 + Math.sin(me.id * 0.41) * 0.05) * (Math.sin(Game.T * (0.25 + Math.sin(me.id * 0.73) * 0.15) + me.id)))) + ')'; - me.life--; - if (me.life <= 0) { this.missFunc(me); me.die(); } - }, - popFunc: function (me) { - //get achievs and stats - if (me.spawnLead) { - Game.goldenClicks++; - Game.goldenClicksLocal++; - - if (Game.goldenClicks >= 1) Game.Win('Golden cookie'); - if (Game.goldenClicks >= 7) Game.Win('Lucky cookie'); - if (Game.goldenClicks >= 27) Game.Win('A stroke of luck'); - if (Game.goldenClicks >= 77) Game.Win('Fortune'); - if (Game.goldenClicks >= 777) Game.Win('Leprechaun'); - if (Game.goldenClicks >= 7777) Game.Win('Black cat\'s paw'); - if (Game.goldenClicks >= 27777) Game.Win('Seven horseshoes'); - - if (Game.goldenClicks >= 7) Game.Unlock('Lucky day'); - if (Game.goldenClicks >= 27) Game.Unlock('Serendipity'); - if (Game.goldenClicks >= 77) Game.Unlock('Get lucky'); - - if ((me.life / Game.fps) > (me.dur - 1)) Game.Win('Early bird'); - if (me.life < Game.fps) Game.Win('Fading luck'); - - if (me.wrath) Game.Win('Wrath cookie'); - } - - if (Game.forceUnslotGod) { - if (Game.forceUnslotGod('asceticism')) Game.useSwap(1000000); - } - - //select an effect - var list = []; - if (me.wrath > 0) list.push('clot', 'multiply cookies', 'ruin cookies'); - else list.push('frenzy', 'multiply cookies'); - if (me.wrath > 0 && Game.hasGod && Game.hasGod('scorn')) list.push('clot', 'ruin cookies', 'clot', 'ruin cookies'); - if (me.wrath > 0 && Math.random() < 0.3) list.push('blood frenzy', 'chain cookie', 'cookie storm'); - else if (Math.random() < 0.03 && Game.cookiesEarned >= 100000) list.push('chain cookie', 'cookie storm'); - if (Math.random() < 0.05 && Game.season == 'fools') list.push('everything must go'); - if (Math.random() < 0.1 && (Math.random() < 0.05 || !Game.hasBuff('Dragonflight'))) list.push('click frenzy'); - if (me.wrath && Math.random() < 0.1) list.push('cursed finger'); - - if (Game.BuildingsOwned >= 10 && Math.random() < 0.25) list.push('building special'); - - if (Game.canLumps() && Math.random() < 0.0005) list.push('free sugar lump'); - - if ((me.wrath == 0 && Math.random() < 0.15) || Math.random() < 0.05) { - //if (Game.hasAura('Reaper of Fields')) list.push('dragon harvest'); - if (Math.random() < Game.auraMult('Reaper of Fields')) list.push('dragon harvest'); - //if (Game.hasAura('Dragonflight')) list.push('dragonflight'); - if (Math.random() < Game.auraMult('Dragonflight')) list.push('dragonflight'); - } - - if (this.last != '' && Math.random() < 0.8 && list.indexOf(this.last) != -1) list.splice(list.indexOf(this.last), 1);//80% chance to force a different one - if (Math.random() < 0.0001) list.push('blab'); - var choice = choose(list); - - if (this.chain > 0) choice = 'chain cookie'; - if (me.force != '') { this.chain = 0; choice = me.force; me.force = ''; } - if (choice != 'chain cookie') this.chain = 0; - - this.last = choice; - - //create buff for effect - //buff duration multiplier - var effectDurMod = 1; - if (Game.Has('Get lucky')) effectDurMod *= 2; - if (Game.Has('Lasting fortune')) effectDurMod *= 1.1; - if (Game.Has('Lucky digit')) effectDurMod *= 1.01; - if (Game.Has('Lucky number')) effectDurMod *= 1.01; - if (Game.Has('Green yeast digestives')) effectDurMod *= 1.01; - if (Game.Has('Lucky payout')) effectDurMod *= 1.01; - //if (Game.hasAura('Epoch Manipulator')) effectDurMod*=1.05; - effectDurMod *= 1 + Game.auraMult('Epoch Manipulator') * 0.05; - if (!me.wrath) effectDurMod *= Game.eff('goldenCookieEffDur'); - else effectDurMod *= Game.eff('wrathCookieEffDur'); - - if (Game.hasGod) { - var godLvl = Game.hasGod('decadence'); - if (godLvl == 1) effectDurMod *= 1.07; - else if (godLvl == 2) effectDurMod *= 1.05; - else if (godLvl == 3) effectDurMod *= 1.02; - } - - //effect multiplier (from lucky etc) - var mult = 1; - //if (me.wrath>0 && Game.hasAura('Unholy Dominion')) mult*=1.1; - //else if (me.wrath==0 && Game.hasAura('Ancestral Metamorphosis')) mult*=1.1; - if (me.wrath > 0) mult *= 1 + Game.auraMult('Unholy Dominion') * 0.1; - else if (me.wrath == 0) mult *= 1 + Game.auraMult('Ancestral Metamorphosis') * 0.1; - if (Game.Has('Green yeast digestives')) mult *= 1.01; - if (Game.Has('Dragon fang')) mult *= 1.03; - if (!me.wrath) mult *= Game.eff('goldenCookieGain'); - else mult *= Game.eff('wrathCookieGain'); - - var popup = ''; - var buff = 0; - - if (choice == 'building special') { - var time = Math.ceil(30 * effectDurMod); - var list = []; - for (var i in Game.Objects) { - if (Game.Objects[i].amount >= 10) list.push(Game.Objects[i].id); - } - if (list.length == 0) { choice = 'frenzy'; }//default to frenzy if no proper building - else { - var obj = choose(list); - var pow = Game.ObjectsById[obj].amount / 10 + 1; - if (me.wrath && Math.random() < 0.3) { - buff = Game.gainBuff('building debuff', time, pow, obj); - } - else { - buff = Game.gainBuff('building buff', time, pow, obj); - } - } - } - - if (choice == 'free sugar lump') { - Game.gainLumps(1); - popup = loc("Sweet!
Found 1 sugar lump!"); - } - else if (choice == 'frenzy') { - buff = Game.gainBuff('frenzy', Math.ceil(77 * effectDurMod), 7); - } - else if (choice == 'dragon harvest') { - buff = Game.gainBuff('dragon harvest', Math.ceil(60 * effectDurMod), 15); - } - else if (choice == 'everything must go') { - buff = Game.gainBuff('everything must go', Math.ceil(8 * effectDurMod), 5); - } - else if (choice == 'multiply cookies') { - var moni = mult * Math.min(Game.cookies * 0.15, Game.cookiesPs * 60 * 15) + 13;//add 15% to cookies owned (+13), or 15 minutes of cookie production - whichever is lowest - Game.Earn(moni); - popup = loc("Lucky!") + '
' + loc("+%1!", loc("%1 cookie", LBeautify(moni))) + ''; - } - else if (choice == 'ruin cookies') { - var moni = Math.min(Game.cookies * 0.05, Game.cookiesPs * 60 * 10) + 13;//lose 5% of cookies owned (-13), or 10 minutes of cookie production - whichever is lowest - moni = Math.min(Game.cookies, moni); - Game.Spend(moni); - popup = loc("Ruin!") + '
' + loc("Lost %1!", loc("%1 cookie", LBeautify(moni))) + ''; - } - else if (choice == 'blood frenzy') { - buff = Game.gainBuff('blood frenzy', Math.ceil(6 * effectDurMod), 666); - } - else if (choice == 'clot') { - buff = Game.gainBuff('clot', Math.ceil(66 * effectDurMod), 0.5); - } - else if (choice == 'cursed finger') { - buff = Game.gainBuff('cursed finger', Math.ceil(10 * effectDurMod), Game.cookiesPs * Math.ceil(10 * effectDurMod)); - } - else if (choice == 'click frenzy') { - buff = Game.gainBuff('click frenzy', Math.ceil(13 * effectDurMod), 777); - } - else if (choice == 'dragonflight') { - buff = Game.gainBuff('dragonflight', Math.ceil(10 * effectDurMod), 1111); - if (Math.random() < 0.8) Game.killBuff('Click frenzy'); - } - else if (choice == 'chain cookie') { - //fix by Icehawk78 - if (this.chain == 0) this.totalFromChain = 0; - this.chain++; - var digit = me.wrath ? 6 : 7; - if (this.chain == 1) this.chain += Math.max(0, Math.ceil(Math.log(Game.cookies) / Math.LN10) - 10); - - var maxPayout = Math.min(Game.cookiesPs * 60 * 60 * 6, Game.cookies * 0.5) * mult; - var moni = Math.max(digit, Math.min(Math.floor(1 / 9 * Math.pow(10, this.chain) * digit * mult), maxPayout)); - var nextMoni = Math.max(digit, Math.min(Math.floor(1 / 9 * Math.pow(10, this.chain + 1) * digit * mult), maxPayout)); - this.totalFromChain += moni; - - //break the chain if we're above 5 digits AND it's more than 50% of our bank, it grants more than 6 hours of our CpS, or just a 1% chance each digit (update : removed digit limit) - if (Math.random() < 0.01 || nextMoni >= maxPayout) { - this.chain = 0; - popup = loc("Cookie chain") + '
' + loc("+%1!", loc("%1 cookie", LBeautify(moni))) + '
' + loc("Cookie chain over. You made %1.", loc("%1 cookie", LBeautify(this.totalFromChain))) + '
'; - } - else { - popup = loc("Cookie chain") + '
' + loc("+%1!", loc("%1 cookie", LBeautify(moni))) + ''; - } - Game.Earn(moni); - } - else if (choice == 'cookie storm') { - buff = Game.gainBuff('cookie storm', Math.ceil(7 * effectDurMod), 7); - } - else if (choice == 'cookie storm drop') { - var moni = Math.max(mult * (Game.cookiesPs * 60 * Math.floor(Math.random() * 7 + 1)), Math.floor(Math.random() * 7 + 1));//either 1-7 cookies or 1-7 minutes of cookie production, whichever is highest - Game.Earn(moni); - popup = '
' + loc("+%1!", loc('%1 cookie', LBeautify(moni))) + '
'; - } - else if (choice == 'blab')//sorry (it's really rare) - { - var str = EN ? (choose([ - 'Cookie crumbliness x3 for 60 seconds!', - 'Chocolatiness x7 for 77 seconds!', - 'Dough elasticity halved for 66 seconds!', - 'Golden cookie shininess doubled for 3 seconds!', - 'World economy halved for 30 seconds!', - 'Grandma kisses 23% stingier for 45 seconds!', - 'Thanks for clicking!', - 'Fooled you! This one was just a test.', - 'Golden cookies clicked +1!', - 'Your click has been registered. Thank you for your cooperation.', - 'Thanks! That hit the spot!', - 'Thank you. A team has been dispatched.', - 'They know.', - 'Oops. This was just a chocolate cookie with shiny aluminium foil.', - 'Eschaton immanentized!', - 'Oh, that tickled!', - 'Again.', - 'You\'ve made a grave mistake.', - 'Chocolate chips reshuffled!', - 'Randomized chance card outcome!', - 'Mouse acceleration +0.03%!', - 'Ascension bonuses x5,000 for 0.1 seconds!', - 'Gained 1 extra!', - 'Sorry, better luck next time!', - 'I felt that.', - 'Nice try, but no.', - 'Wait, sorry, I wasn\'t ready yet.', - 'Yippee!', - 'Bones removed.', - 'Organs added.', - 'Did you just click that?', - 'Huh? Oh, there was nothing there.', - 'You saw nothing.', - 'It seems you hallucinated that golden cookie.', - 'This golden cookie was a complete fabrication.', - 'In theory there\'s no wrong way to click a golden cookie, but you just did that, somehow.', - 'All cookies multiplied by 999!
All cookies divided by 999!', - 'Why?' - ])) : choose(loc("Cookie blab")); - popup = str; - } - - if (popup == '' && buff && buff.name && buff.desc) popup = buff.dname + '
' + buff.desc + '
'; - if (popup != '') Game.Popup(popup, me.x + me.l.offsetWidth / 2, me.y); - - Game.DropEgg(0.9); - - //sparkle and kill the shimmer - Game.SparkleAt(me.x + 48, me.y + 48); - if (choice == 'cookie storm drop') { - if (Game.prefs.cookiesound) PlaySound('snd/clickb' + Math.floor(Math.random() * 7 + 1) + '.mp3', 0.75); - else PlaySound('snd/click' + Math.floor(Math.random() * 7 + 1) + '.mp3', 0.75); - } - else PlaySound('snd/shimmerClick.mp3'); - me.die(); - }, - missFunc: function (me) { - if (this.chain > 0 && this.totalFromChain > 0) { - Game.Popup(loc("Cookie chain broken.
You made %1.", loc("%1 cookie", LBeautify(this.totalFromChain))), me.x + me.l.offsetWidth / 2, me.y); - this.chain = 0; this.totalFromChain = 0; - } - if (me.spawnLead) Game.missedGoldenClicks++; - }, - spawnsOnTimer: true, - spawnConditions: function () { - if (!Game.Has('Golden switch [off]')) return true; else return false; - }, - spawned: 0, - time: 0, - minTime: 0, - maxTime: 0, - getTimeMod: function (me, m) { - if (Game.Has('Lucky day')) m /= 2; - if (Game.Has('Serendipity')) m /= 2; - if (Game.Has('Golden goose egg')) m *= 0.95; - if (Game.Has('Heavenly luck')) m *= 0.95; - if (Game.Has('Green yeast digestives')) m *= 0.99; - //if (Game.hasAura('Arcane Aura')) m*=0.95; - m *= 1 - Game.auraMult('Arcane Aura') * 0.05; - if (Game.hasBuff('Sugar blessing')) m *= 0.9; - if (Game.season == 'easter' && Game.Has('Starspawn')) m *= 0.98; - else if (Game.season == 'halloween' && Game.Has('Starterror')) m *= 0.98; - else if (Game.season == 'valentines' && Game.Has('Starlove')) m *= 0.98; - else if (Game.season == 'fools' && Game.Has('Startrade')) m *= 0.95; - if (!me.wrath) m *= 1 / Game.eff('goldenCookieFreq'); - else m *= 1 / Game.eff('wrathCookieFreq'); - if (Game.hasGod) { - var godLvl = Game.hasGod('industry'); - if (godLvl == 1) m *= 1.1; - else if (godLvl == 2) m *= 1.06; - else if (godLvl == 3) m *= 1.03; - var godLvl = Game.hasGod('mother'); - if (godLvl == 1) m *= 1.15; - else if (godLvl == 2) m *= 1.1; - else if (godLvl == 3) m *= 1.05; - - if (Game.season != '') { - var godLvl = Game.hasGod('seasons'); - if (Game.season != 'fools') { - if (godLvl == 1) m *= 0.97; - else if (godLvl == 2) m *= 0.98; - else if (godLvl == 3) m *= 0.99; - } - else { - if (godLvl == 1) m *= 0.955; - else if (godLvl == 2) m *= 0.97; - else if (godLvl == 3) m *= 0.985; - } - } - } - if (this.chain > 0) m = 0.05; - if (Game.Has('Gold hoard')) m = 0.01; - return Math.ceil(Game.fps * 60 * m); - }, - getMinTime: function (me) { - var m = 5; - return this.getTimeMod(me, m); - }, - getMaxTime: function (me) { - var m = 15; - return this.getTimeMod(me, m); - }, - last: '', - }, - 'reindeer': { - reset: function () { - }, - initFunc: function (me) { - if (!this.spawned && Game.chimeType != 0 && Game.ascensionMode != 1) PlaySound('snd/jingle.mp3'); - - me.x = -128; - me.y = Math.floor(Math.random() * Math.max(0, Game.bounds.bottom - Game.bounds.top - 256) + Game.bounds.top + 128) - 128; - //me.l.style.left=me.x+'px'; - //me.l.style.top=me.y+'px'; - me.l.style.width = '167px'; - me.l.style.height = '212px'; - me.l.style.backgroundImage = 'url(' + Game.resPath + 'img/frostedReindeer.png)'; - me.l.style.opacity = '0'; - //me.l.style.transform='rotate('+(Math.random()*60-30)+'deg) scale('+(Math.random()*1+0.25)+')'; - me.l.style.display = 'block'; - me.l.setAttribute('alt', loc("Reindeer")); - - me.life = 1;//the reindeer's current progression through its lifespan (in frames) - me.dur = 4;//duration; the cookie's lifespan in seconds before it despawns - - var dur = 4; - if (Game.Has('Weighted sleighs')) dur *= 2; - dur *= Game.eff('reindeerDur'); - me.dur = dur; - me.life = Math.ceil(Game.fps * me.dur); - me.sizeMult = 1; - }, - updateFunc: function (me) { - var curve = 1 - Math.pow((me.life / (Game.fps * me.dur)) * 2 - 1, 12); - me.l.style.opacity = curve; - me.l.style.transform = 'translate(' + (me.x + (Game.bounds.right - Game.bounds.left) * (1 - me.life / (Game.fps * me.dur))) + 'px,' + (me.y - Math.abs(Math.sin(me.life * 0.1)) * 128) + 'px) rotate(' + (Math.sin(me.life * 0.2 + 0.3) * 10) + 'deg) scale(' + (me.sizeMult * (1 + Math.sin(me.id * 0.53) * 0.1)) + ')'; - me.life--; - if (me.life <= 0) { this.missFunc(me); me.die(); } - }, - popFunc: function (me) { - //get achievs and stats - if (me.spawnLead) { - Game.reindeerClicked++; - } - - var val = Game.cookiesPs * 60; - if (Game.hasBuff('Elder frenzy')) val *= 0.5;//very sorry - if (Game.hasBuff('Frenzy')) val *= 0.75;//I sincerely apologize - var moni = Math.max(25, val);//1 minute of cookie production, or 25 cookies - whichever is highest - if (Game.Has('Ho ho ho-flavored frosting')) moni *= 2; - moni *= Game.eff('reindeerGain'); - Game.Earn(moni); - if (Game.hasBuff('Elder frenzy')) Game.Win('Eldeer'); - - var cookie = ''; - var failRate = 0.8; - if (Game.HasAchiev('Let it snow')) failRate = 0.6; - failRate *= 1 / Game.dropRateMult(); - if (Game.Has('Starsnow')) failRate *= 0.95; - if (Game.hasGod) { - var godLvl = Game.hasGod('seasons'); - if (godLvl == 1) failRate *= 0.9; - else if (godLvl == 2) failRate *= 0.95; - else if (godLvl == 3) failRate *= 0.97; - } - if (Math.random() > failRate)//christmas cookie drops - { - cookie = choose(['Christmas tree biscuits', 'Snowflake biscuits', 'Snowman biscuits', 'Holly biscuits', 'Candy cane biscuits', 'Bell biscuits', 'Present biscuits']); - if (!Game.HasUnlocked(cookie) && !Game.Has(cookie)) { - Game.Unlock(cookie); - } - else cookie = ''; - } - - var popup = ''; - - Game.Notify(loc("You found %1!", choose(loc("Reindeer names"))), loc("The reindeer gives you %1.", loc("%1 cookie", LBeautify(moni))) + (cookie == '' ? '' : '
' + loc("You are also rewarded with %1!", Game.Upgrades[cookie].dname)), [12, 9], 6); - popup = '
' + loc("+%1!", loc("%1 cookie", LBeautify(moni))) + '
'; - - if (popup != '') Game.Popup(popup, Game.mouseX, Game.mouseY); - - //sparkle and kill the shimmer - Game.SparkleAt(Game.mouseX, Game.mouseY); - PlaySound('snd/jingleClick.mp3'); - me.die(); - }, - missFunc: function (me) { - }, - spawnsOnTimer: true, - spawnConditions: function () { - if (Game.season == 'christmas') return true; else return false; - }, - spawned: 0, - time: 0, - minTime: 0, - maxTime: 0, - getTimeMod: function (me, m) { - if (Game.Has('Reindeer baking grounds')) m /= 2; - if (Game.Has('Starsnow')) m *= 0.95; - if (Game.hasGod) { - var godLvl = Game.hasGod('seasons'); - if (godLvl == 1) m *= 0.9; - else if (godLvl == 2) m *= 0.95; - else if (godLvl == 3) m *= 0.97; - } - m *= 1 / Game.eff('reindeerFreq'); - if (Game.Has('Reindeer season')) m = 0.01; - return Math.ceil(Game.fps * 60 * m); - }, - getMinTime: function (me) { - var m = 3; - return this.getTimeMod(me, m); - }, - getMaxTime: function (me) { - var m = 6; - return this.getTimeMod(me, m); - }, - } - }; - - Game.goldenCookieChoices = [ - "Frenzy", "frenzy", - "Lucky", "multiply cookies", - "Ruin", "ruin cookies", - "Elder frenzy", "blood frenzy", - "Clot", "clot", - "Click frenzy", "click frenzy", - "Cursed finger", "cursed finger", - "Cookie chain", "chain cookie", - "Cookie storm", "cookie storm", - "Building special", "building special", - "Dragon Harvest", "dragon harvest", - "Dragonflight", "dragonflight", - "Sweet", "free sugar lump", - "Blab", "blab" - ]; - Game.goldenCookieBuildingBuffs = { - 'Cursor': ['High-five', 'Slap to the face'], - 'Grandma': ['Congregation', 'Senility'], - 'Farm': ['Luxuriant harvest', 'Locusts'], - 'Mine': ['Ore vein', 'Cave-in'], - 'Factory': ['Oiled-up', 'Jammed machinery'], - 'Bank': ['Juicy profits', 'Recession'], - 'Temple': ['Fervent adoration', 'Crisis of faith'], - 'Wizard tower': ['Manabloom', 'Magivores'], - 'Shipment': ['Delicious lifeforms', 'Black holes'], - 'Alchemy lab': ['Breakthrough', 'Lab disaster'], - 'Portal': ['Righteous cataclysm', 'Dimensional calamity'], - 'Time machine': ['Golden ages', 'Time jam'], - 'Antimatter condenser': ['Extra cycles', 'Predictable tragedy'], - 'Prism': ['Solar flare', 'Eclipse'], - 'Chancemaker': ['Winning streak', 'Dry spell'], - 'Fractal engine': ['Macrocosm', 'Microcosm'], - 'Javascript console': ['Refactoring', 'Antipattern'], - 'Idleverse': ['Cosmic nursery', 'Big crunch'], - 'Cortex baker': ['Brainstorm', 'Brain freeze'], - 'You': ['Deduplication', 'Clone strike'], - }; - - /*===================================================================================== - PARTICLES - =======================================================================================*/ - //generic particles (falling cookies etc) - //only displayed on left section - Game.particles = []; - Game.particlesN = 50; - for (var i = 0; i < Game.particlesN; i++) { - Game.particles[i] = { x: 0, y: 0, xd: 0, yd: 0, w: 64, h: 64, z: 0, size: 1, dur: 2, life: -1, r: 0, pic: 'smallCookies.png', picId: 0, picPos: [0, 0] }; - } - - Game.particlesUpdate = function () { - for (var i = 0; i < Game.particlesN; i++) { - var me = Game.particles[i]; - if (me.life != -1) { - if (!me.text) me.yd += 0.2 + Math.random() * 0.1; - me.x += me.xd; - me.y += me.yd; - //me.y+=me.life*0.25+Math.random()*0.25; - me.life++; - if (me.life >= Game.fps * me.dur) { - me.life = -1; - } - } - } - } - Game.particleAdd = function (x, y, xd, yd, size, dur, z, pic, text) { - //Game.particleAdd(pos X,pos Y,speed X,speed Y,size (multiplier),duration (seconds),layer,picture,text); - //pick the first free (or the oldest) particle to replace it - if (true)//Game.prefs.particles) - { - var highest = 0; - var highestI = 0; - for (var i = 0; i < Game.particlesN; i++) { - if (Game.particles[i].life == -1) { highestI = i; break; } - if (Game.particles[i].life > highest) { - highest = Game.particles[i].life; - highestI = i; - } - } - var auto = 0; - if (x) auto = 1; - var i = highestI; - var x = x || -64; - if (Game.LeftBackground && !auto) x = Math.floor(Math.random() * Game.LeftBackground.canvas.width); - var y = y || -64; - var me = Game.particles[i]; - me.life = 0; - me.x = x; - me.y = y; - me.xd = xd || 0; - me.yd = yd || 0; - me.size = size || 1; - me.z = z || 0; - me.dur = dur || 2; - me.r = Math.floor(Math.random() * 360); - me.picId = Math.floor(Math.random() * 10000); - if (!pic) { - if (Game.season == 'fools') pic = 'smallDollars.png'; - else { - var cookies = [[10, 0]]; - for (var i in Game.Upgrades) { - var cookie = Game.Upgrades[i]; - if (cookie.bought > 0 && cookie.pool == 'cookie') cookies.push(cookie.icon); - } - me.picPos = choose(cookies); - if (Game.bakeryName.toLowerCase() == 'ortiel' || Math.random() < 1 / 10000) me.picPos = [17, 5]; - pic = 'icons.png'; - } - } - else if (typeof pic !== 'string') { me.picPos = pic; pic = 'icons.png'; } - me.pic = pic || 'smallCookies.png'; - me.text = text || 0; - return me; - } - return {}; - } - Game.particlesDraw = function (z) { - var ctx = Game.LeftBackground; - ctx.fillStyle = '#fff'; - ctx.font = '20px Merriweather'; - ctx.textAlign = 'center'; - - for (var i = 0; i < Game.particlesN; i++) { - var me = Game.particles[i]; - if (me.z == z) { - if (me.life != -1) { - var opacity = 1 - (me.life / (Game.fps * me.dur)); - ctx.globalAlpha = opacity; - if (me.text) { - ctx.fillText(me.text, me.x, me.y); - } - else { - ctx.save(); - ctx.translate(me.x, me.y); - ctx.rotate((me.r / 360) * Math.PI * 2); - var w = 64; - var h = 64; - if (me.pic == 'icons.png') { - w = 48; - h = 48; - ctx.drawImage(Pic(me.pic), me.picPos[0] * w, me.picPos[1] * h, w, h, -w / 2 * me.size, -h / 2 * me.size, w * me.size, h * me.size); - } - else { - if (me.pic == 'wrinklerBits.png' || me.pic == 'shinyWrinklerBits.png') { w = 100; h = 200; } - ctx.drawImage(Pic(me.pic), (me.picId % 8) * w, 0, w, h, -w / 2 * me.size, -h / 2 * me.size, w * me.size, h * me.size); - } - ctx.restore(); - } - } - } - } - } - - //text particles (popups etc) - Game.textParticles = []; - Game.textParticlesY = 0; - var str = ''; - for (var i = 0; i < 20; i++) { - Game.textParticles[i] = { x: 0, y: 0, life: -1, text: '' }; - str += '
'; - } - l('particles').innerHTML = str; - Game.textParticlesUpdate = function () { - for (var i in Game.textParticles) { - var me = Game.textParticles[i]; - if (me.life != -1) { - me.life++; - if (me.life >= Game.fps * 4) { - var el = me.l; - me.life = -1; - el.style.opacity = 0; - el.style.display = 'none'; - } - } - } - } - Game.textParticlesAdd = function (text, el, posX, posY) { - //pick the first free (or the oldest) particle to replace it - var highest = 0; - var highestI = 0; - for (var i in Game.textParticles) { - if (Game.textParticles[i].life == -1) { highestI = i; break; } - if (Game.textParticles[i].life > highest) { - highest = Game.textParticles[i].life; - highestI = i; - } - } - var i = highestI; - var noStack = 0; - if (typeof posX !== 'undefined' && typeof posY !== 'undefined') { - x = posX; - y = posY; - noStack = 1; - } - else { - var x = (Math.random() - 0.5) * 40; - var y = 0;//+(Math.random()-0.5)*40; - if (!el) { - var rect = Game.bounds; - var x = Math.floor((rect.left + rect.right) / 2); - var y = Math.floor((rect.bottom)) - (Game.mobile * 64); - x += (Math.random() - 0.5) * 40; - y += 0;//(Math.random()-0.5)*40; - } - } - if (!noStack) y -= Game.textParticlesY; - - x = Math.max(Game.bounds.left + 200, x); - x = Math.min(Game.bounds.right - 200, x); - y = Math.max(Game.bounds.top + 32 + (App ? 32 : 0), y); - - var me = Game.textParticles[i]; - if (!me.l) me.l = l('particle' + i); - me.life = 0; - me.x = x; - me.y = y; - me.text = text; - me.l.innerHTML = text; - me.l.style.left = Math.floor(Game.textParticles[i].x - 200) + 'px'; - me.l.style.bottom = Math.floor(-Game.textParticles[i].y) + 'px'; - for (var ii in Game.textParticles) { if (ii != i) (Game.textParticles[ii].l || l('particle' + ii)).style.zIndex = 100000000; } - me.l.style.zIndex = 100000001; - me.l.style.display = 'block'; - me.l.className = 'particle title'; - void me.l.offsetWidth; - me.l.className = 'particle title risingUpLinger'; - if (!noStack) Game.textParticlesY += 60; - } - Game.popups = 1; - Game.Popup = function (text, x, y) { - if (Game.popups) Game.textParticlesAdd(text, 0, x, y); - } - - //display sparkles at a set position - Game.sparkles = l('sparkles'); - Game.sparklesT = 0; - Game.sparklesFrames = 16; - Game.SparkleAt = function (x, y) { - if (Game.blendModesOn) { - Game.sparklesT = Game.sparklesFrames + 1; - Game.sparkles.style.backgroundPosition = '0px 0px'; - Game.sparkles.style.left = Math.floor(x - 64) + 'px'; - Game.sparkles.style.top = Math.floor(y - 64) + 'px'; - Game.sparkles.style.display = 'block'; - } - } - Game.SparkleOn = function (el) { - var rect = el.getBounds(); - Game.SparkleAt((rect.left + rect.right) / 2, (rect.top + rect.bottom) / 2 - 24); - } - - /*===================================================================================== - NOTIFICATIONS - =======================================================================================*/ - //maybe do all this mess with proper DOM instead of rewriting the innerHTML - Game.Notes = []; - Game.NotesById = []; - Game.noteId = 0; - Game.noteL = l('notes'); - Game.Note = function (title, desc, pic, quick) { - this.title = title; - this.desc = desc || ''; - this.pic = pic || ''; - this.id = Game.noteId; - this.date = Date.now(); - this.quick = quick || 0; - this.life = (this.quick || 1) * Game.fps; - this.l = 0; - this.height = 0; - this.tooltip = 0; - Game.noteId++; - Game.NotesById[this.id] = this; - Game.Notes.unshift(this); - if (Game.Notes.length > 50) Game.Notes.pop(); - //Game.Notes.push(this); - //if (Game.Notes.length>50) Game.Notes.shift(); - Game.UpdateNotes(); - } - Game.CloseNote = function (id) { - var me = Game.NotesById[id]; - if (Game.tooltip.from && Game.tooltip.from.id.indexOf('note-') == 0) Game.tooltip.hide(); - Game.Notes.splice(Game.Notes.indexOf(me), 1); - //Game.NotesById.splice(Game.NotesById.indexOf(me),1); - Game.NotesById[id] = null; - Game.UpdateNotes(); - } - Game.CloseNotes = function () { - Game.Notes = []; - Game.NotesById = []; - Game.tooltip.hide(); - Game.UpdateNotes(); - } - Game.UpdateNotes = function () { - var str = ''; - var remaining = Game.Notes.length; - for (var i in Game.Notes) { - if (i < 5) { - var me = Game.Notes[i]; - var pic = ''; - if (me.pic != '') pic = '
'; - str = '
x
' + pic + '

' + me.title + '

' + (me.desc != '' ? '
' + me.desc + '
' : '') + '
' + str; - remaining--; - } - } - if (remaining > 0) str = '
' + loc("+%1 more notification.", LBeautify(remaining)) + '
' + str; - if (Game.Notes.length > 1) { - str += '
x
'; - } - Game.noteL.innerHTML = str; - for (var i in Game.Notes) { - me.l = 0; - if (i < 5) { - var me = Game.Notes[i]; - me.l = l('note-' + me.id); - } - } - } - Game.NotesLogic = function () { - for (var i in Game.Notes) { - if (Game.Notes[i].quick > 0) { - var me = Game.Notes[i]; - me.life--; - if (me.life <= 0) Game.CloseNote(me.id); - } - } - } - Game.NotesDraw = function () { - for (var i in Game.Notes) { - if (Game.Notes[i].quick > 0) { - var me = Game.Notes[i]; - if (me.l) { - if (me.life < 10) { - me.l.style.opacity = (me.life / 10); - } - } - } - } - } - Game.Notify = function (title, desc, pic, quick, noLog) { - if (Game.prefs.notifs) { - quick = Math.min(6, quick); - if (!quick) quick = 6; - } - desc = replaceAll('==CLOSETHIS()==', 'Game.CloseNote(' + Game.noteId + ');', desc); - if (Game.popups) new Game.Note(title, desc, pic, quick); - if (!noLog) Game.AddToLog('' + title + ' | ' + desc); - } - Game.NotifyTooltip = function (content) { - //attaches a tooltip to the last spawned note - if (!Game.NotesById[Game.noteId - 1]) return false; - var me = Game.NotesById[Game.noteId - 1]; - me.tooltip = content; - Game.UpdateNotes(); - } - - - /*===================================================================================== - PROMPT - =======================================================================================*/ - Game.darkenL = l('darken'); - AddEvent(Game.darkenL, 'click', function () { if (Game.promptNoClose) { } else { Game.Click = 0; PlaySound('snd/tickOff.mp3'); Game.ClosePrompt(); } }); - Game.promptL = l('promptContent'); - Game.promptAnchorL = l('promptAnchor'); - Game.promptWrapL = l('prompt'); - Game.promptConfirm = ''; - Game.promptOn = 0; - Game.promptUpdateFunc = 0; - Game.promptOptionsN = 0; - Game.promptOptionFocus = 0; - Game.promptNoClose = false; - Game.UpdatePrompt = function () { - if (Game.promptUpdateFunc) Game.promptUpdateFunc(); - Game.promptAnchorL.style.top = Math.floor((Game.windowH - Game.promptWrapL.offsetHeight) / 2 - 16) + 'px'; - } - Game.Prompt = function (content, options, updateFunc, style) { - Game.promptNoClose = false; - if (updateFunc) Game.promptUpdateFunc = updateFunc; - if (style) Game.promptWrapL.className = 'framed ' + style; else Game.promptWrapL.className = 'framed'; - var str = ''; - str += content; - if (str.indexOf('')); - str = str.substring(str.indexOf('>') + 1); - str = '
' + str + '
'; - } - if (str.indexOf('') != -1) { - str = str.replace('', ''); - Game.promptNoClose = true; - } - var opts = ''; - Game.promptOptionsN = 0; - for (var i = 0; i < options.length; i++) { - if (options[i] == 'br')//just a linebreak - { opts += '
'; } - else { - if (typeof options[i] == 'string') options[i] = [options[i], 'PlaySound(\'snd/tickOff.mp3\');Game.ClosePrompt();']; - else if (!options[i][1]) options[i] = [options[i][0], 'PlaySound(\'snd/tickOff.mp3\');Game.ClosePrompt();', options[i][2]]; - else options[i][1] = 'PlaySound(\'snd/tick.mp3\');' + options[i][1]; - options[i][1] = options[i][1].replace(/'/g, ''').replace(/"/g, '"'); - opts += '' + options[i][0] + ''; - Game.promptOptionsN++; - } - } - Game.promptL.innerHTML = str + '
' + opts + '
'; - Game.promptAnchorL.style.display = 'block'; - Game.darkenL.style.display = 'block'; - Game.promptL.focus(); - Game.promptOn = 1; - Game.promptOptionFocus = 0; - Game.FocusPromptOption(0); - Game.UpdatePrompt(); - if (!Game.promptNoClose) l('promptClose').style.display = 'block'; else l('promptClose').style.display = 'none'; - } - Game.ClosePrompt = function () { - if (!Game.promptOn) return false; - Game.promptAnchorL.style.display = 'none'; - Game.darkenL.style.display = 'none'; - Game.promptOn = 0; - Game.promptUpdateFunc = 0; - Game.promptOptionFocus = 0; - Game.promptOptionsN = 0; - Game.promptNoClose = false; - } - Game.ConfirmPrompt = function () { - var el = l('promptOption' + Game.promptOptionFocus); - if (Game.promptOn && el && el.style.display != 'none' && (' ' + el.className + ' ').indexOf(' disabled ') == -1) FireEvent(el, 'click'); - } - Game.FocusPromptOption = function (dir, tryN) { - var id = Game.promptOptionFocus + dir; - if (id < 0) id = Game.promptOptionsN - 1; - if (id >= Game.promptOptionsN) id = 0; - while (id >= 0 && id < Game.promptOptionsN && (!l('promptOption' + id) || l('promptOption' + id).style.display == 'none')) { id += (dir || 1); } - if (l('promptOption' + id) && l('promptOption' + id).style.display != 'none') { - if (l('promptOption' + Game.promptOptionFocus)) l('promptOption' + Game.promptOptionFocus).classList.remove('focused'); - Game.promptOptionFocus = id; - if (l('promptOption' + Game.promptOptionFocus)) l('promptOption' + Game.promptOptionFocus).classList.add('focused'); - } - else if (!tryN && dir != 0) { Game.promptOptionFocus = id; Game.FocusPromptOption(dir, 1); } - } - - /*===================================================================================== - MENUS - =======================================================================================*/ - Game.cssClasses = []; - Game.addClass = function (what) { if (Game.cssClasses.indexOf(what) == -1) Game.cssClasses.push(what); Game.updateClasses(); } - Game.removeClass = function (what) { var i = Game.cssClasses.indexOf(what); if (i != -1) { Game.cssClasses.splice(i, 1); } Game.updateClasses(); } - Game.updateClasses = function () { Game.l.className = Game.cssClasses.join(' '); } - - Game.WritePrefButton = function (prefName, button, on, off, callback, invert) { - var invert = invert ? 1 : 0; - if (!callback) callback = ''; - callback += 'PlaySound(\'snd/tick.mp3\');'; - return '' + (Game.prefs[prefName] ? on : off) + ''; - } - Game.Toggle = function (prefName, button, on, off, invert) { - if (Game.prefs[prefName]) { - l(button).innerHTML = off; - Game.prefs[prefName] = 0; - } - else { - l(button).innerHTML = on; - Game.prefs[prefName] = 1; - } - l(button).className = 'smallFancyButton prefButton option' + ((Game.prefs[prefName] ^ invert) ? '' : ' off'); - - } - Game.ToggleFancy = function () { - if (Game.prefs.fancy) Game.removeClass('noFancy'); - else if (!Game.prefs.fancy) Game.addClass('noFancy'); - } - Game.ToggleFilters = function () { - if (Game.prefs.filters) Game.removeClass('noFilters'); - else if (!Game.prefs.filters) Game.addClass('noFilters'); - } - Game.ToggleExtraButtons = function () { - if (!Game.prefs.extraButtons) Game.removeClass('extraButtons'); - else if (Game.prefs.extraButtons) Game.addClass('extraButtons'); - for (var i in Game.Objects) { - Game.Objects[i].mute(0); - } - } - Game.ToggleFullscreen = function () { - if (App) App.setFullscreen(Game.prefs.fullscreen); - } - - Game.WriteSlider = function (slider, leftText, rightText, startValueFunction, callback) { - if (!callback) callback = ''; - return '
' + leftText + '
' + rightText.replace('[$]', startValueFunction()) + '
'; - } - - Game.onPanel = 'Left'; - Game.addClass('focus' + Game.onPanel); - Game.ShowPanel = function (what) { - if (!what) what = ''; - if (Game.onPanel != what) { - Game.removeClass('focus' + Game.onPanel); - Game.addClass('focus' + what); - } - Game.onPanel = what; - } - - Game.onMenu = ''; - Game.ShowMenu = function (what) { - if (!what || what == '') what = Game.onMenu; - if (Game.onMenu == '' && what != '') Game.addClass('onMenu'); - else if (Game.onMenu != '' && what != Game.onMenu) Game.addClass('onMenu'); - else if (what == Game.onMenu) { Game.removeClass('onMenu'); what = ''; } - //if (what=='log') l('donateBox').className='on'; else l('donateBox').className=''; - Game.onMenu = what; - - l('prefsButton').className = (Game.onMenu == 'prefs') ? 'panelButton selected' : 'panelButton'; - l('statsButton').className = (Game.onMenu == 'stats') ? 'panelButton selected' : 'panelButton'; - l('logButton').className = (Game.onMenu == 'log') ? 'panelButton selected' : 'panelButton'; - - if (Game.onMenu == '') PlaySound('snd/clickOff2.mp3'); - else PlaySound('snd/clickOn2.mp3'); - - Game.UpdateMenu(); - - if (what == '') { - for (var i in Game.Objects) { - var me = Game.Objects[i]; - if (me.minigame && me.minigame.onResize) me.minigame.onResize(); - } - } - } - Game.sayTime = function (time, detail) { - //time is a value where one second is equal to Game.fps (30). - //detail skips days when >1, hours when >2, minutes when >3 and seconds when >4. - //if detail is -1, output something like "3 hours, 9 minutes, 48 seconds" - if (time <= 0) return ''; - var str = ''; - var detail = detail || 0; - time = Math.floor(time); - if (detail == -1) { - //var months=0; - var days = 0; - var hours = 0; - var minutes = 0; - var seconds = 0; - //if (time>=Game.fps*60*60*24*30) months=(Math.floor(time/(Game.fps*60*60*24*30))); - if (time >= Game.fps * 60 * 60 * 24) days = (Math.floor(time / (Game.fps * 60 * 60 * 24))); - if (time >= Game.fps * 60 * 60) hours = (Math.floor(time / (Game.fps * 60 * 60))); - if (time >= Game.fps * 60) minutes = (Math.floor(time / (Game.fps * 60))); - if (time >= Game.fps) seconds = (Math.floor(time / (Game.fps))); - //days-=months*30; - hours -= days * 24; - minutes -= hours * 60 + days * 24 * 60; - seconds -= minutes * 60 + hours * 60 * 60 + days * 24 * 60 * 60; - if (days > 10) { hours = 0; } - if (days) { minutes = 0; seconds = 0; } - if (hours) { seconds = 0; } - var bits = []; - //if (months>0) bits.push(Beautify(months)+' month'+(days==1?'':'s')); - if (days > 0) bits.push(loc("%1 day", LBeautify(days))); - if (hours > 0) bits.push(loc("%1 hour", LBeautify(hours))); - if (minutes > 0) bits.push(loc("%1 minute", LBeautify(minutes))); - if (seconds > 0) bits.push(loc("%1 second", LBeautify(seconds))); - if (bits.length == 0) str = loc("less than 1 second"); - else str = bits.join(', '); - /*//if (months>0) bits.push(Beautify(months)+' month'+(days==1?'':'s')); - if (days>0) bits.push(Beautify(days)+' day'+(days==1?'':'s')); - if (hours>0) bits.push(Beautify(hours)+' hour'+(hours==1?'':'s')); - if (minutes>0) bits.push(Beautify(minutes)+' minute'+(minutes==1?'':'s')); - if (seconds>0) bits.push(Beautify(seconds)+' second'+(seconds==1?'':'s')); - if (bits.length==0) str='less than 1 second'; - else str=bits.join(', ');*/ - } - else { - /*if (time>=Game.fps*60*60*24*30*2 && detail<1) str=Beautify(Math.floor(time/(Game.fps*60*60*24*30)))+' months'; - else if (time>=Game.fps*60*60*24*30 && detail<1) str='1 month'; - else */if (time >= Game.fps * 60 * 60 * 24 && detail < 2) str = loc("%1 day", LBeautify(Math.floor(time / (Game.fps * 60 * 60 * 24))));//Beautify(Math.floor(time/(Game.fps*60*60*24)))+' days'; - else if (time >= Game.fps * 60 * 60 && detail < 3) str = loc("%1 hour", LBeautify(Math.floor(time / (Game.fps * 60 * 60))));//Beautify(Math.floor(time/(Game.fps*60*60)))+' hours'; - else if (time >= Game.fps * 60 && detail < 4) str = loc("%1 minute", LBeautify(Math.floor(time / (Game.fps * 60))));//Beautify(Math.floor(time/(Game.fps*60)))+' minutes'; - else if (time >= Game.fps && detail < 5) str = loc("%1 second", LBeautify(Math.floor(time / (Game.fps))));//Beautify(Math.floor(time/(Game.fps)))+' seconds'; - else str = loc("less than 1 second"); - } - return str; - } - - Game.tinyCookie = function () { - if (!Game.HasAchiev('Tiny cookie')) { - return '
'; - } - return ''; - } - Game.ClickTinyCookie = function () { if (!Game.HasAchiev('Tiny cookie')) { PlaySound('snd/tick.mp3'); Game.Win('Tiny cookie'); } } - - Game.setVolume = function (what) { - Game.volume = what; - /*for (var i in Sounds) - { - Sounds[i].volume=Game.volume; - }*/ - } - Game.setVolumeMusic = function (what) { - Game.volumeMusic = what; - if (Music) Music.setVolume(what / 100); - } - Game.setWubMusic = function (what) { - if (Music) Music.setFilter(what / 100); - } - - Game.showLangSelection = function (firstLaunch) { - var str = ''; - for (var i in Langs) { - var lang = Langs[i]; - str += '
' + lang.name + '
'; - } - Game.Prompt('' + (firstLaunch ? '' : '') + '

' + loc("Change language") + '

' + - '
' + - (firstLaunch ? '' : '
(' + loc("note: this will save and reload your game") + ')
') + - str, - (firstLaunch ? 0 : [loc("Cancel")])); - - for (var i in Langs) { - var lang = Langs[i]; - AddEvent(l('langSelect-' + i), 'click', function (lang) { - return function () { - if (true)//lang!=locId) - { - PlaySound('snd/tick.mp3'); - localStorageSet('CookieClickerLang', lang); - Game.toSave = true; - Game.toReload = true; - } - }; - }(i)); - AddEvent(l('langSelect-' + i), 'mouseover', function (lang) { - return function () { - PlaySound('snd/smallTick.mp3', 0.75); - l('languageSelectHeader').innerHTML = Langs[lang].changeLanguage; - }; - }(i)); - } - } - - ON = ' ' + loc("ON"); - OFF = ' ' + loc("OFF"); - Game.UpdateMenu = function () { - var str = ''; - if (Game.onMenu != '') { - str += ''; - //str+='
X
'; - } - if (Game.onMenu == 'prefs') { - str += '
' + loc("Options") + '
'; - - str += - '' + - '
' + loc("Language: %1", '' + Langs[locId].name + '') + '
' + (!EN ? 'Change language
' : '') + loc("Change language") + '
' + - (App ? '' : '') + - '
' + loc("Save") + '
' + - '
' + loc("Export save") + '' + loc("Import save") + '
' + - (!App ? ('
' + loc("Save to file") + '' + loc("Load from file") + '
') : '') + - '
' + loc("Wipe save") + '
' + - - '' + - '' + - '
' + - '
' + - - '
' + loc("Settings") + '
' + - ((App && App.writeCloudUI) ? App.writeCloudUI() : '') + - '
' + - Game.WriteSlider('volumeSlider', loc("Volume"), '[$]%', function () { return Game.volume; }, 'Game.setVolume(Math.round(l(\'volumeSlider\').value));l(\'volumeSliderRightText\').innerHTML=Game.volume+\'%\';') + - (App ? Game.WriteSlider('volumeMusicSlider', loc("Volume (music)"), '[$]%', function () { return Game.volumeMusic; }, 'Game.setVolumeMusic(Math.round(l(\'volumeMusicSlider\').value));l(\'volumeMusicSliderRightText\').innerHTML=Game.volumeMusic+\'%\';') : '') + - /*(App?Game.WriteSlider('wubMusicSlider',loc("Wub"),'[$]%',function(){return 100;},'Game.setWubMusic(Math.round(l(\'wubMusicSlider\').value));l(\'wubMusicSliderRightText\').innerHTML=(Math.round(l(\'wubMusicSlider\').value))+\'%\';'):'')+*/ - '
' + - (App ? Game.WritePrefButton('bgMusic', 'bgMusicButton', loc("Music in background") + ON, loc("Music in background") + OFF, '') + '
' : '') + - (App ? Game.WritePrefButton('fullscreen', 'fullscreenButton', loc("Fullscreen") + ON, loc("Fullscreen") + OFF, 'Game.ToggleFullscreen();') + '
' : '') + - Game.WritePrefButton('fancy', 'fancyButton', loc("Fancy graphics") + ON, loc("Fancy graphics") + OFF, 'Game.ToggleFancy();') + '
' + - Game.WritePrefButton('filters', 'filtersButton', loc("CSS filters") + ON, loc("CSS filters") + OFF, 'Game.ToggleFilters();') + '
' + - Game.WritePrefButton('particles', 'particlesButton', loc("Particles") + ON, loc("Particles") + OFF) + (EN ? '' : '') + '
' + - Game.WritePrefButton('numbers', 'numbersButton', loc("Numbers") + ON, loc("Numbers") + OFF) + '
' + - Game.WritePrefButton('milk', 'milkButton', loc("Milk [setting]") + ON, loc("Milk [setting]") + OFF) + (EN ? '' : '') + '
' + - Game.WritePrefButton('cursors', 'cursorsButton', loc("Cursors [setting]") + ON, loc("Cursors [setting]") + OFF) + '
' + - Game.WritePrefButton('wobbly', 'wobblyButton', loc("Wobbly cookie") + ON, loc("Wobbly cookie") + OFF) + (EN ? '' : '') + '
' + - Game.WritePrefButton('cookiesound', 'cookiesoundButton', loc("Alt cookie sound") + ON, loc("Alt cookie sound") + OFF) + (EN ? '' : '') + '
' + - Game.WritePrefButton('crates', 'cratesButton', loc("Icon crates") + ON, loc("Icon crates") + OFF) + '
' + - Game.WritePrefButton('monospace', 'monospaceButton', loc("Alt font") + ON, loc("Alt font") + OFF) + '
' + - Game.WritePrefButton('format', 'formatButton', loc("Short numbers") + OFF, loc("Short numbers") + ON, 'BeautifyAll();Game.RefreshStore();Game.upgradesToRebuild=1;', 1) + (EN ? '' : '') + '
' + - Game.WritePrefButton('notifs', 'notifsButton', loc("Fast notes") + ON, loc("Fast notes") + OFF) + '
' + - //Game.WritePrefButton('autoupdate','autoupdateButton','Offline mode OFF','Offline mode ON',0,1)+'
'+ - (!App ? Game.WritePrefButton('warn', 'warnButton', loc("Closing warning") + ON, loc("Closing warning") + OFF) + '
' : '') + - //Game.WritePrefButton('focus','focusButton',loc("Defocus")+OFF,loc("Defocus")+ON,0,1)+'
'+ - Game.WritePrefButton('extraButtons', 'extraButtonsButton', loc("Extra buttons") + ON, loc("Extra buttons") + OFF, 'Game.ToggleExtraButtons();') + '
' + - Game.WritePrefButton('askLumps', 'askLumpsButton', loc("Lump confirmation") + ON, loc("Lump confirmation") + OFF) + '
' + - (!App ? Game.WritePrefButton('customGrandmas', 'customGrandmasButton', loc("Custom grandmas") + ON, loc("Custom grandmas") + OFF) + '
' : '') + - Game.WritePrefButton('notScary', 'notScaryButton', loc("Scary stuff") + OFF, loc("Scary stuff") + ON, 0, 1) + '
' + - Game.WritePrefButton('timeout', 'timeoutButton', loc("Sleep mode timeout") + ON, loc("Sleep mode timeout") + OFF) + '
' + - Game.WritePrefButton('screenreader', 'screenreaderButton', loc("Screen reader mode") + ON, loc("Screen reader mode") + OFF, 'Game.toSave=true;Game.toReload=true;') + '
' + - '
' + - //'
'+Game.WritePrefButton('autosave','autosaveButton','Autosave ON','Autosave OFF')+'
'+ - (!App ? '
' + loc("Check mod data") + '
' : '') + - - '
' + - '
' + - ''; - - if (App && App.writeModUI) { - str += - '
' + - '
' + - - '
' + loc("Mods") + '
' + - App.writeModUI() + - '
' + - '
'; - } - - str += '
'; - } - else if (Game.onMenu == 'log') { - //str+=replaceAll('[bakeryName]',Game.bakeryName,Game.updateLog); - str += Game.updateLog; - if (!Game.HasAchiev('Olden days')) str += '
'; - } - else if (Game.onMenu == 'stats') { - var buildingsOwned = 0; - buildingsOwned = Game.BuildingsOwned; - var upgrades = ''; - var cookieUpgrades = ''; - var hiddenUpgrades = ''; - var prestigeUpgrades = ''; - var upgradesTotal = 0; - var upgradesOwned = 0; - var prestigeUpgradesTotal = 0; - var prestigeUpgradesOwned = 0; - - var list = []; - //sort the upgrades - for (var i in Game.Upgrades) { list.push(Game.Upgrades[i]); }//clone first - 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 (var i in list) { - var str2 = ''; - var me = list[i]; - - str2 += Game.crate(me, 'stats'); - - if (me.bought) { - if (Game.CountsAsUpgradeOwned(me.pool)) upgradesOwned++; - else if (me.pool == 'prestige') prestigeUpgradesOwned++; - } - - if (me.pool == '' || me.pool == 'cookie' || me.pool == 'tech') upgradesTotal++; - if (me.pool == 'debug') hiddenUpgrades += str2; - else if (me.pool == 'prestige') { prestigeUpgrades += str2; prestigeUpgradesTotal++; } - else if (me.pool == 'cookie') cookieUpgrades += str2; - else if (me.pool != 'toggle' && me.pool != 'unused') upgrades += str2; - } - var achievements = []; - var achievementsOwned = 0; - var achievementsOwnedOther = 0; - var achievementsTotal = 0; - - var list = []; - for (var i in Game.Achievements)//sort the achievements - { - list.push(Game.Achievements[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 (var i in list) { - var me = list[i]; - //if (me.pool=='normal' || me.won>0) achievementsTotal++; - if (Game.CountsAsAchievementOwned(me.pool)) achievementsTotal++; - var pool = me.pool; - if (!achievements[pool]) achievements[pool] = ''; - achievements[pool] += Game.crate(me, 'stats'); - - if (me.won) { - if (Game.CountsAsAchievementOwned(me.pool)) achievementsOwned++; - else achievementsOwnedOther++; - } - } - - var achievementsStr = ''; - var pools = { - 'dungeon': (EN ? 'Dungeon achievements (Not technically achievable yet.)' : '???'), - 'shadow': '' + loc("Shadow achievements") + ' (' + loc("These are feats that are either unfair or difficult to attain. They do not give milk.") + ')' - }; - for (var i in achievements) { - if (achievements[i] != '') { - if (pools[i]) achievementsStr += '
' + pools[i] + '
'; - achievementsStr += '
' + achievements[i] + '
'; - } - } - - var milkStr = ''; - for (var i = 0; i < Game.Milks.length; i++) { - if (Game.milkProgress >= i) { - var milk = Game.Milks[i]; - milkStr += '

' + (loc("Rank %1", romanize(i + 1)) + ' - ' + milk.name) + '

(' + (i == 0 ? loc("starter milk") : loc("for %1 achievements", Beautify(i * 25))) + ')
' - , 'top') + ' style="background:url(' + Game.resPath + 'img/icons.png?v=' + Game.version + ') ' + (-milk.icon[0] * 48) + 'px ' + (-milk.icon[1] * 48) + 'px;margin:2px 0px;" class="trophy">'; - } - } - milkStr += '
'; - - var santaStr = ''; - var frames = 15; - if (Game.Has('A festive hat')) { - for (var i = 0; i <= Game.santaLevel; i++) { - santaStr += '

' + Game.santaLevels[i] + '

' - , 'top') + ' style="background:url(' + Game.resPath + 'img/santa.png?v=' + Game.version + ') ' + (-i * 48) + 'px 0px;background-size:' + (frames * 48) + 'px 48px;" class="trophy">'; - } - santaStr += '
'; - } - var dragonStr = ''; - var frames = 9; - var mainLevels = [0, 4, 8, Game.dragonLevels.length - 3, Game.dragonLevels.length - 2, Game.dragonLevels.length - 1]; - if (Game.Has('A crumbly egg')) { - for (var i = 0; i <= mainLevels.length; i++) { - if (Game.dragonLevel >= mainLevels[i]) { - var level = Game.dragonLevels[mainLevels[i]]; - dragonStr += '
'+level.name+'
' - '

' + level.name + '

' - , 'top') + ' style="background:url(' + Game.resPath + 'img/dragon.png?v=' + Game.version + ') ' + (-level.pic * 48) + 'px 0px;background-size:' + (frames * 48) + 'px 48px;" class="trophy">'; - } - } - dragonStr += '
'; - } - var ascensionModeStr = ''; - var icon = Game.ascensionModes[Game.ascensionMode].icon; - if (Game.resets > 0) ascensionModeStr = '' + Game.ascensionModes[Game.ascensionMode].desc + '' - , 'top') + '>
' + Game.ascensionModes[Game.ascensionMode].dname + '
'; - - var milkName = Game.Milk.name; - - var researchStr = Game.sayTime(Game.researchT, -1); - var pledgeStr = Game.sayTime(Game.pledgeT, -1); - var wrathStr = ''; - if (Game.elderWrath == 1) wrathStr = loc("awoken"); - else if (Game.elderWrath == 2) wrathStr = loc("displeased"); - else if (Game.elderWrath == 3) wrathStr = loc("angered"); - else if (Game.elderWrath == 0 && Game.pledges > 0) wrathStr = loc("appeased"); - - var dropMult = Game.dropRateMult(); - - var date = new Date(); - date.setTime(Date.now() - Game.startDate); - var timeInSeconds = date.getTime() / 1000; - var startDate = Game.sayTime(timeInSeconds * Game.fps, -1); - date.setTime(Date.now() - Game.fullDate); - var fullDate = Game.sayTime(date.getTime() / 1000 * Game.fps, -1); - if (!Game.fullDate || !fullDate || fullDate.length < 1) fullDate = loc("a long while"); - /*date.setTime(new Date().getTime()-Game.lastDate); - var lastDate=Game.sayTime(date.getTime()/1000*Game.fps,2);*/ - - var heavenlyMult = Game.GetHeavenlyMultiplier(); - - var seasonStr = Game.sayTime(Game.seasonT, -1); - - var giftStr = ''; - if (Game.cookiesSent > 0) giftStr += '' + loc("Cookies gifted:") + ' ' + Beautify(Game.cookiesSent); - if (Game.cookiesReceived > 0) giftStr += (Game.cookiesSent > 0 ? ' / ' : '') + '' + loc("Cookies received:") + ' ' + Beautify(Game.cookiesReceived); - - str += '
' + (EN ? "Statistics" : loc("Stats")) + '
' + - '
' + - '
' + loc("General") + - '
' + - '
' + - '
' + loc("Cookies in bank:") + '
' + Game.tinyCookie() + Beautify(Game.cookies) + '
' + - '
' + loc("Cookies baked (this ascension):") + '
' + Game.tinyCookie() + Beautify(Game.cookiesEarned) + '
' + - '
' + loc("Cookies baked (all time):") + '
' + Game.tinyCookie() + Beautify(Game.cookiesEarned + Game.cookiesReset) + '
' + - (Game.cookiesReset > 0 ? '
' + loc("Cookies forfeited by ascending:") + '
' + Game.tinyCookie() + Beautify(Game.cookiesReset) + '
' : '') + - (Game.resets ? ('
' + loc("Legacy started:") + ' ' + (fullDate == '' ? loc("just now") : loc("%1 ago", fullDate)) + ', ' + loc("with %1 ascension", LBeautify(Game.resets)) + '
') : '') + - '
' + loc("Run started:") + ' ' + (startDate == '' ? loc("just now") : loc("%1 ago", startDate)) + '
' + - '
' + loc("Buildings owned:") + ' ' + Beautify(buildingsOwned) + '
' + - '
' + loc("Cookies per second:") + ' ' + Beautify(Game.cookiesPs, 1) + ' ' + - '(' + loc("multiplier:") + ' ' + Beautify(Math.round(Game.globalCpsMult * 100), 1) + '%)' + - (Game.cpsSucked > 0 ? ' (' + loc("withered:") + ' ' + Beautify(Math.round(Game.cpsSucked * 100), 1) + '%)' : '') + - '
' + - '
' + loc("Raw cookies per second:") + ' ' + Beautify(Game.cookiesPsRaw, 1) + ' ' + - '(' + loc("highest this ascension:") + ' ' + Beautify(Game.cookiesPsRawHighest, 1) + ')' + - '
' + - '
' + loc("Cookies per click:") + ' ' + Beautify(Game.computedMouseCps, 1) + '
' + - '
' + loc("Cookie clicks:") + ' ' + Beautify(Game.cookieClicks) + '
' + - '
' + loc("Hand-made cookies:") + ' ' + Beautify(Game.handmadeCookies) + '
' + - '
' + loc("Golden cookie clicks:") + ' ' + Beautify(Game.goldenClicksLocal) + ' (' + loc("all time:") + ' ' + Beautify(Game.goldenClicks) + ')
' +//'
'+ - (dropMult != 1 ? '
' + loc("Random drop multiplier:") + ' x' + Beautify(dropMult, 2) + '
' : '') + - (giftStr != '' ? '
' + giftStr + '
' : '') + - '
' + - '
' + loc("Running version:") + ' ' + Game.version + '
' + - - ((researchStr != '' || wrathStr != '' || pledgeStr != '' || santaStr != '' || dragonStr != '' || Game.season != '' || ascensionModeStr != '' || Game.canLumps()) ? ( - '
' + - '
' + loc("Special") + '
' + - '
' + - (ascensionModeStr != '' ? '
' + loc("Challenge mode:") + '' + ascensionModeStr + '
' : '') + - (Game.season != '' ? '
' + loc("Seasonal event:") + ' ' + Game.seasons[Game.season].name + - (seasonStr != '' ? ' (' + loc("%1 remaining", seasonStr) + ')' : '') + - '
' : '') + - (EN && Game.season == 'fools' ? - '
Money made from selling cookies : ' + Beautify(Game.cookiesEarned * 0.08, 2) + ' cookie dollars
' + - (Game.Objects['Portal'].highest > 0 ? '
TV show seasons produced : ' + Beautify(Math.floor((timeInSeconds / 60 / 60) * (Game.Objects['Portal'].highest * 0.13) + 1)) + '
' : '') - : '') + - (researchStr != '' ? '
' + loc("Research:") + ' ' + loc("%1 remaining", researchStr) + '
' : '') + - (wrathStr != '' ? '
' + loc("Grandmatriarchs status:") + ' ' + wrathStr + '
' : '') + - (pledgeStr != '' ? '
' + loc("Pledge:") + ' ' + loc("%1 remaining", pledgeStr) + '
' : '') + - (Game.wrinklersPopped > 0 ? '
' + loc("Wrinklers popped:") + ' ' + Beautify(Game.wrinklersPopped) + '
' : '') + - ((Game.canLumps() && Game.lumpsTotal > -1) ? '
' + loc("Sugar lumps harvested:") + '
' + Beautify(Game.lumpsTotal) + '
' : '') + - //(Game.cookiesSucked>0?'
Withered : '+Beautify(Game.cookiesSucked)+' cookies
':'')+ - (Game.reindeerClicked > 0 ? '
' + loc("Reindeer found:") + ' ' + Beautify(Game.reindeerClicked) + '
' : '') + - (santaStr != '' ? '
' + loc("Santa stages unlocked:") + '
' + santaStr + '
' : '') + - (dragonStr != '' ? '
' + loc("Dragon training:") + '
' + dragonStr + '
' : '') + - '
' - ) : '') + - ((Game.prestige > 0 || prestigeUpgrades != '') ? ( - '
' + - '
' + loc("Prestige") + '
' + - '
' + - '
' + - '
' + loc("Prestige level:") + ' ' + Beautify(Game.prestige) + ' ' + loc("at %1% of its potential (+%2% CpS)", [Beautify(heavenlyMult * 100, 1), Beautify(parseFloat(Game.prestige) * Game.heavenlyPower * heavenlyMult, 1)]) + '
' + loc("Heavenly chips:") + ' ' + Beautify(Game.heavenlyChips) + '
' + - '
' + - (prestigeUpgrades != '' ? ( - '
' + loc("Prestige upgrades unlocked:") + ' ' + prestigeUpgradesOwned + '/' + prestigeUpgradesTotal + ' (' + Math.floor((prestigeUpgradesOwned / prestigeUpgradesTotal) * 100) + '%)
' + - '
' + prestigeUpgrades + '
') : '') + - '
' - ) : '') + - - '
' + - '
' + loc("Upgrades") + '
' + - '
' + - (hiddenUpgrades != '' ? ('
Debug
' + - '
' + hiddenUpgrades + '
') : '') + - '
' + loc("Upgrades unlocked:") + ' ' + upgradesOwned + '/' + upgradesTotal + ' (' + Math.floor((upgradesOwned / upgradesTotal) * 100) + '%)
' + - '
' + upgrades + '
' + - (cookieUpgrades != '' ? ('
' + loc("Cookies") + '
' + - '
' + cookieUpgrades + '
') : '') + - '
' + - '
' + - '
' + loc("Achievements") + '
' + - '
' + - '
' + loc("Achievements unlocked:") + ' ' + achievementsOwned + '/' + achievementsTotal + ' (' + Math.floor((achievementsOwned / achievementsTotal) * 100) + '%)' + (achievementsOwnedOther > 0 ? (' (+' + achievementsOwnedOther + ')') : '') + '
' + - (Game.cookiesMultByType['kittens'] > 1 ? ('
' + loc("Kitten multiplier:") + ' ' + Beautify((Game.cookiesMultByType['kittens']) * 100) + '%
') : '') + - '
' + loc("Milk") + ': ' + milkName + '
' + - (milkStr != '' ? '
' + loc("Milk flavors unlocked:") + '
' + milkStr + '
' : '') + - '
(' + loc("Milk is gained with each achievement. It can unlock unique upgrades over time.") + ')
' + - achievementsStr + - '
' + - '
' + - '
' - ; - } - //str='
'+str+'
'; - l('menu').innerHTML = str; - if (App) { - var anchors = l('menu').getElementsByTagName('a'); - for (var i = 0; i < anchors.length; i++) { - var it = anchors[i]; - if (it.href) { - console.log(it.href); - AddEvent(it, 'click', function (href) { - return function () { - App.openLink(href); - } - }(it.href)); - it.removeAttribute('href'); - } - } - } - /*AddEvent(l('selectionKeeper'),'mouseup',function(e){ - console.log('selection:',window.getSelection()); - });*/ - } - - AddEvent(l('prefsButton'), 'click', function () { Game.ShowMenu('prefs'); }); - AddEvent(l('statsButton'), 'click', function () { Game.ShowMenu('stats'); }); - AddEvent(l('logButton'), 'click', function () { Game.ShowMenu('log'); }); - AddEvent(l('legacyButton'), 'click', function () { PlaySound('snd/tick.mp3'); Game.Ascend(); }); - Game.ascendMeter = l('ascendMeter'); - Game.ascendNumber = l('ascendNumber'); - - - /*===================================================================================== - NEWS TICKER - =======================================================================================*/ - Game.Ticker = ''; - Game.TickerAge = 0; - Game.TickerEffect = 0; - Game.TickerN = 0; - Game.TickerClicks = 0; - Game.UpdateTicker = function () { - Game.TickerAge--; - if (Game.TickerAge <= 0) Game.getNewTicker(); - else if (Game.Ticker == '') Game.getNewTicker(true); - } - Game.getNewTicker = function (manual)//note : "manual" is true if the ticker was clicked, but may also be true on startup etc - { - var list = []; - - var NEWS = loc("News :").replace(' ', ' ') + ' '; - - var loreProgress = Math.round(Math.log(Game.cookiesEarned / 10) * Math.LOG10E + 1 | 0); - - if (Game.TickerN % 2 == 0 || loreProgress > 14) { - var animals = ['newts', 'penguins', 'scorpions', 'axolotls', 'puffins', 'porpoises', 'blowfish', 'horses', 'crayfish', 'slugs', 'humpback whales', 'nurse sharks', 'giant squids', 'polar bears', 'fruit bats', 'frogs', 'sea squirts', 'velvet worms', 'mole rats', 'paramecia', 'nematodes', 'tardigrades', 'giraffes', 'monkfish', 'wolfmen', 'goblins', 'hippies']; - - if (Math.random() < 0.75 || Game.cookiesEarned < 10000) { - if (Game.Objects['Grandma'].amount > 0) list.push('' + choose(loc("Ticker (grandma)")) + '' + Game.Objects['Grandma'].single + ''); - - if (!Game.prefs.notScary && Game.Objects['Grandma'].amount >= 50) list.push('' + choose(loc("Ticker (threatening grandma)")) + '' + Game.Objects['Grandma'].single + ''); - - if (EN && Game.HasAchiev('Just wrong') && Math.random() < 0.05) list.push(NEWS + 'cookie manufacturer downsizes, sells own grandmother!'); - if (!Game.prefs.notScary && Game.HasAchiev('Just wrong') && Math.random() < 0.4) list.push('' + choose(loc("Ticker (angry grandma)")) + '' + Game.Objects['Grandma'].single + ''); - - if (!Game.prefs.notScary && Game.Objects['Grandma'].amount >= 1 && Game.pledges > 0 && Game.elderWrath == 0) list.push('' + choose(loc("Ticker (grandmas return)")) + '' + Game.Objects['Grandma'].single + ''); - - if (!EN) { - for (var i in Game.Objects) { - if (i != 'Cursor' && i != 'Grandma' && Game.Objects[i].amount > 0) list.push(NEWS + choose(loc("Ticker (" + i + ")"))); - } - - if (Game.cookiesEarned >= 1000) { - if (Game.season == 'halloween') list.push(NEWS + choose(loc("Ticker (Halloween)"))); - if (Game.season == 'christmas') list.push(NEWS + choose(loc("Ticker (Christmas)"))); - if (Game.season == 'valentines') list.push(NEWS + choose(loc("Ticker (Valentines)"))); - if (Game.season == 'easter') list.push(NEWS + choose(loc("Ticker (Easter)"))); - } - } - else { - if (Game.Objects['Farm'].amount > 0) list.push(choose([ - 'News : cookie farms suspected of employing undeclared elderly workforce!', - 'News : cookie farms release harmful chocolate in our rivers, says scientist!', - 'News : genetically-modified chocolate controversy strikes cookie farmers!', - 'News : free-range farm cookies popular with today\'s hip youth, says specialist.', - 'News : farm cookies deemed unfit for vegans, says nutritionist.' - ])); - - if (Game.Objects['Mine'].amount > 0) list.push(choose([ - 'News : is our planet getting lighter? Experts examine the effects of intensive chocolate mining.', - 'News : ' + Math.floor(Math.random() * 1000 + 2) + ' miners trapped in collapsed chocolate mine!', - 'News : chocolate mines found to cause earthquakes and sinkholes!', - 'News : chocolate mine goes awry, floods village in chocolate!', - 'News : depths of chocolate mines found to house "peculiar, chocolaty beings"!' - ])); - - if (Game.Objects['Factory'].amount > 0) list.push(choose([ - 'News : cookie factories linked to global warming!', - 'News : cookie factories involved in chocolate weather controversy!', - 'News : cookie factories on strike, robotic minions employed to replace workforce!', - 'News : cookie factories on strike - workers demand to stop being paid in cookies!', - 'News : factory-made cookies linked to obesity, says study.' - ])); - - if (Game.Objects['Bank'].amount > 0) list.push(choose([ - 'News : cookie loans on the rise as people can no longer afford them with regular money.', - 'News : cookies slowly creeping up their way as a competitor to traditional currency!', - 'News : most bakeries now fitted with ATMs to allow for easy cookie withdrawals and deposits.', - 'News : cookie economy now strong enough to allow for massive vaults doubling as swimming pools!', - 'News : "Tomorrow\'s wealthiest people will be calculated by their worth in cookies", predict economists.' - ])); - - if (Game.Objects['Temple'].amount > 0) list.push(choose([ - 'News : explorers bring back ancient artifact from abandoned temple; archeologists marvel at the centuries-old ' + choose(['magic', 'carved', 'engraved', 'sculpted', 'royal', 'imperial', 'mummified', 'ritual', 'golden', 'silver', 'stone', 'cursed', 'plastic', 'bone', 'blood', 'holy', 'sacred', 'sacrificial', 'electronic', 'singing', 'tapdancing']) + ' ' + choose(['spoon', 'fork', 'pizza', 'washing machine', 'calculator', 'hat', 'piano', 'napkin', 'skeleton', 'gown', 'dagger', 'sword', 'shield', 'skull', 'emerald', 'bathtub', 'mask', 'rollerskates', 'litterbox', 'bait box', 'cube', 'sphere', 'fungus']) + '!', - 'News : recently-discovered chocolate temples now sparking new cookie-related cult; thousands pray to Baker in the sky!', - 'News : just how extensive is the cookie pantheon? Theologians speculate about possible ' + choose(['god', 'goddess']) + ' of ' + choose([choose(animals), choose(['kazoos', 'web design', 'web browsers', 'kittens', 'atheism', 'handbrakes', 'hats', 'aglets', 'elevator music', 'idle games', 'the letter "P"', 'memes', 'hamburgers', 'bad puns', 'kerning', 'stand-up comedy', 'failed burglary attempts', 'clickbait', 'one weird tricks'])]) + '.', - 'News : theists of the world discover new cookie religion - "Oh boy, guess we were wrong all along!"', - 'News : cookie heaven allegedly "sports elevator instead of stairway"; cookie hell "paved with flagstone, as good intentions make for poor building material".' - ])); - - if (Game.Objects['Wizard tower'].amount > 0) list.push(choose([ - 'News : all ' + choose([choose(animals), choose(['public restrooms', 'clouds', 'politicians', 'moustaches', 'hats', 'shoes', 'pants', 'clowns', 'encyclopedias', 'websites', 'potted plants', 'lemons', 'household items', 'bodily fluids', 'cutlery', 'national landmarks', 'yogurt', 'rap music', 'underwear'])]) + ' turned into ' + choose([choose(animals), choose(['public restrooms', 'clouds', 'politicians', 'moustaches', 'hats', 'shoes', 'pants', 'clowns', 'encyclopedias', 'websites', 'potted plants', 'lemons', 'household items', 'bodily fluids', 'cutlery', 'national landmarks', 'yogurt', 'rap music', 'underwear'])]) + ' in freak magic catastrophe!', - 'News : heavy dissent rages between the schools of ' + choose(['water', 'fire', 'earth', 'air', 'lightning', 'acid', 'song', 'battle', 'peace', 'pencil', 'internet', 'space', 'time', 'brain', 'nature', 'techno', 'plant', 'bug', 'ice', 'poison', 'crab', 'kitten', 'dolphin', 'bird', 'punch', 'fart']) + ' magic and ' + choose(['water', 'fire', 'earth', 'air', 'lightning', 'acid', 'song', 'battle', 'peace', 'pencil', 'internet', 'space', 'time', 'brain', 'nature', 'techno', 'plant', 'bug', 'ice', 'poison', 'crab', 'kitten', 'dolphin', 'bird', 'punch', 'fart']) + ' magic!', - 'News : get your new charms and curses at the yearly National Spellcrafting Fair! Exclusive prices on runes and spellbooks.', - 'News : cookie wizards deny involvement in shockingly ugly newborn - infant is "honestly grody-looking, but natural", say doctors.', - 'News : "Any sufficiently crude magic is indistinguishable from technology", claims renowned technowizard.' - ])); - - if (Game.Objects['Shipment'].amount > 0) list.push(choose([ - 'News : new chocolate planet found, becomes target of cookie-trading spaceships!', - 'News : massive chocolate planet found with 99.8% certified pure dark chocolate core!', - 'News : space tourism booming as distant planets attract more bored millionaires!', - 'News : chocolate-based organisms found on distant planet!', - 'News : ancient baking artifacts found on distant planet; "terrifying implications", experts say.' - ])); - - if (Game.Objects['Alchemy lab'].amount > 0) list.push(choose([ - 'News : national gold reserves dwindle as more and more of the precious mineral is turned to cookies!', - 'News : chocolate jewelry found fashionable, gold and diamonds "just a fad", says specialist.', - 'News : silver found to also be transmutable into white chocolate!', - 'News : defective alchemy lab shut down, found to convert cookies to useless gold.', - 'News : alchemy-made cookies shunned by purists!' - ])); - - if (Game.Objects['Portal'].amount > 0) list.push(choose([ - 'News : nation worried as more and more unsettling creatures emerge from dimensional portals!', - 'News : dimensional portals involved in city-engulfing disaster!', - 'News : tourism to cookieverse popular with bored teenagers! Casualty rate as high as 73%!', - 'News : cookieverse portals suspected to cause fast aging and obsession with baking, says study.', - 'News : "do not settle near portals," says specialist; "your children will become strange and corrupted inside."' - ])); - - if (Game.Objects['Time machine'].amount > 0) list.push(choose([ - 'News : time machines involved in history-rewriting scandal! Or are they?', - 'News : time machines used in unlawful time tourism!', - 'News : cookies brought back from the past "unfit for human consumption", says historian.', - 'News : various historical figures inexplicably replaced with talking lumps of dough!', - 'News : "I have seen the future," says time machine operator, "and I do not wish to go there again."' - ])); - - if (Game.Objects['Antimatter condenser'].amount > 0) list.push(choose([ - 'News : whole town seemingly swallowed by antimatter-induced black hole; more reliable sources affirm town "never really existed"!', - 'News : "explain to me again why we need particle accelerators to bake cookies?" asks misguided local woman.', - 'News : first antimatter condenser successfully turned on, doesn\'t rip apart reality!', - 'News : researchers conclude that what the cookie industry needs, first and foremost, is "more magnets".', - 'News : "unravelling the fabric of reality just makes these cookies so much tastier", claims scientist.' - ])); - - if (Game.Objects['Prism'].amount > 0) list.push(choose([ - 'News : new cookie-producing prisms linked to outbreak of rainbow-related viral videos.', - 'News : scientists warn against systematically turning light into matter - "One day, we\'ll end up with all matter and no light!"', - 'News : cookies now being baked at the literal speed of light thanks to new prismatic contraptions.', - 'News : "Can\'t you sense the prism watching us?", rambles insane local man. "No idea what he\'s talking about", shrugs cookie magnate/government official.', - 'News : world citizens advised "not to worry" about frequent atmospheric flashes.', - ])); - - if (Game.Objects['Chancemaker'].amount > 0) list.push(choose([ - 'News : strange statistical anomalies continue as weather forecast proves accurate an unprecedented 3 days in a row!', - 'News : local casino ruined as all gamblers somehow hit a week-long winning streak! "We might still be okay", says owner before being hit by lightning 47 times.', - 'News : neighboring nation somehow elects president with sensible policies in freak accident of random chance!', - 'News : million-to-one event sees gritty movie reboot turning out better than the original! "We have no idea how this happened", say movie execs.', - 'News : all scratching tickets printed as winners, prompting national economy to crash and, against all odds, recover overnight.', - ])); - - if (Game.Objects['Fractal engine'].amount > 0) list.push(choose([ - 'News : local man "done with Cookie Clicker", finds the constant self-references "grating and on-the-nose".', - 'News : local man sails around the world to find himself - right where he left it.', - 'News : local guru claims "there\'s a little bit of ourselves in everyone", under investigation for alleged cannibalism.', - 'News : news writer finds herself daydreaming about new career. Or at least a raise.', - 'News : polls find idea of cookies made of cookies "acceptable" - "at least we finally know what\'s in them", says interviewed citizen.', - ])); - - if (Game.Objects['Javascript console'].amount > 0) list.push(choose([ - 'News : strange fad has parents giving their newborns names such as Emma.js or Liam.js. At least one Baby.js reported.', - 'News : coding is hip! More and more teenagers turn to technical fields like programming, ensuring a future robot apocalypse and the doom of all mankind.', - 'News : developers unsure what to call their new javascript libraries as all combinations of any 3 dictionary words have already been taken.', - 'News : nation holds breath as nested ifs about to hatch.', - 'News : clueless copywriter forgets to escape a quote, ends news line prematurely; last words reported to be "Huh, why isn', - ])); - - if (Game.Objects['Idleverse'].amount > 0) list.push(choose([ - 'News : is another you living out their dreams in an alternate universe? Probably, you lazy bum!', - 'News : public recoils at the notion of a cosmos made of infinite idle games. "I kinda hoped there\'d be more to it", says distraught citizen.', - 'News : with an infinity of parallel universes, people turn to reassuring alternate dimensions, which only number "in the high 50s".', - 'News : "I find solace in the knowledge that at least some of my alternate selves are probably doing fine out there", says citizen\'s last remaining exemplar in the multiverse.', - 'News : comic book writers point to actual multiverse in defense of dubious plot points. "See? I told you it wasn\'t \'hackneyed and contrived\'!"' - ])); - - if (Game.Objects['Cortex baker'].amount > 0) list.push(choose([ - 'News : cortex baker wranglers kindly remind employees that cortex bakers are the bakery\'s material property and should not be endeared with nicknames.', - 'News : space-faring employees advised to ignore unusual thoughts and urges experienced within 2 parsecs of gigantic cortex bakers, say guidelines.', - 'News : astronomers warn of cortex baker trajectory drift, fear future head-on collisions resulting in costly concussions.', - 'News : runt cortex baker identified with an IQ of only quintuple digits: "just a bit of a dummy", say specialists.', - 'News : are you smarter than a cortex baker? New game show deemed "unfair" by contestants.' - ])); - - if (Game.Objects['You'].amount > 0) list.push(choose([ - 'News : the person of the year is, this year again, ' + Game.bakeryName + '! How unexpected!', - 'News : criminals caught sharing pirated copies of ' + Game.bakeryName + '\'s genome may be exposed to fines and up to 17 billion years prison, reminds constable.', - 'News : could local restaurants be serving you bootleg ' + Game.bakeryName + ' clone meat? Our delicious investigation follows after tonight\'s news.', - 'News : beloved cookie magnate ' + Game.bakeryName + ', erroneously reported as trampled to death by crazed fans, thankfully found to be escaped clone mistaken for original.', - 'News : "Really, we\'re just looking for some basic societal acceptance and compassion", mumbles incoherent genetic freak ' + Game.bakeryName + '-Clone #59014.' - ])); - - if (Game.season == 'halloween' && Game.cookiesEarned >= 1000) list.push(choose([ - 'News : strange twisting creatures amass around cookie factories, nibble at assembly lines.', - 'News : ominous wrinkly monsters take massive bites out of cookie production; "this can\'t be hygienic", worries worker.', - 'News : pagan rituals on the rise as children around the world dress up in strange costumes and blackmail homeowners for candy.', - 'News : new-age terrorism strikes suburbs as houses find themselves covered in eggs and toilet paper.', - 'News : children around the world "lost and confused" as any and all Halloween treats have been replaced by cookies.' - ])); - - if (Game.season == 'christmas' && Game.cookiesEarned >= 1000) list.push(choose([ - 'News : bearded maniac spotted speeding on flying sleigh! Investigation pending.', - 'News : Santa Claus announces new brand of breakfast treats to compete with cookie-flavored cereals! "They\'re ho-ho-horrible!" says Santa.', - 'News : "You mean he just gives stuff away for free?!", concerned moms ask. "Personally, I don\'t trust his beard."', - 'News : obese jolly lunatic still on the loose, warn officials. "Keep your kids safe and board up your chimneys. We mean it."', - 'News : children shocked as they discover Santa Claus isn\'t just their dad in a costume after all!
"I\'m reassessing my life right now", confides Laura, aged 6.', - 'News : mysterious festive entity with quantum powers still wrecking havoc with army of reindeer, officials say.', - 'News : elves on strike at toy factory! "We will not be accepting reindeer chow as payment anymore. And stop calling us elves!"', - 'News : elves protest around the nation; wee little folks in silly little outfits spread mayhem, destruction; rabid reindeer running rampant through streets.', - 'News : scholars debate regarding the plural of reindeer(s) in the midst of elven world war.', - 'News : elves "unrelated to gnomes despite small stature and merry disposition", find scientists.', - 'News : elves sabotage radioactive frosting factory, turn hundreds blind in vicinity - "Who in their right mind would do such a thing?" laments outraged mayor.', - 'News : drama unfolds at North Pole as rumors crop up around Rudolph\'s red nose; "I may have an addiction or two", admits reindeer.' - ])); - - if (Game.season == 'valentines' && Game.cookiesEarned >= 1000) list.push(choose([ - 'News : organ-shaped confectioneries being traded in schools all over the world; gruesome practice undergoing investigation.', - 'News : heart-shaped candies overtaking sweets business, offering competition to cookie empire. "It\'s the economy, cupid!"', - 'News : love\'s in the air, according to weather specialists. Face masks now offered in every city to stunt airborne infection.', - 'News : marrying a cookie - deranged practice, or glimpse of the future?', - 'News : boyfriend dumped after offering his lover cookies for Valentine\'s Day, reports say. "They were off-brand", shrugs ex-girlfriend.' - ])); - - if (Game.season == 'easter' && Game.cookiesEarned >= 1000) list.push(choose([ - 'News : long-eared critters with fuzzy tails invade suburbs, spread terror and chocolate!', - 'News : eggs have begun to materialize in the most unexpected places; "no place is safe", warn experts.', - 'News : packs of rampaging rabbits cause billions in property damage; new strain of myxomatosis being developed.', - 'News : egg-laying rabbits "not quite from this dimension", warns biologist; advises against petting, feeding, or cooking the creatures.', - 'News : mysterious rabbits found to be egg-layers, but mammalian, hinting at possible platypus ancestry.' - ])); - } - } - if (!EN) { - if (Game.cookiesEarned >= 10000) { - list.push(NEWS + choose(loc("Ticker (misc)"))); - list.push(NEWS + choose(loc("Ticker (misc)"))); - list.push(NEWS + choose(loc("Ticker (misc)"))); - } - } - else { - if (Math.random() < 0.05) { - if (Game.HasAchiev('Base 10')) list.push('News : cookie manufacturer completely forgoes common sense, lets strange obsession with round numbers drive building decisions!'); - if (Game.HasAchiev('From scratch')) list.push('News : follow the tear-jerking, riches-to-rags story about a local cookie manufacturer who decided to give it all up!'); - if (Game.HasAchiev('A world filled with cookies')) list.push('News : known universe now jammed with cookies! No vacancies!'); - if (Game.HasAchiev('Last Chance to See')) list.push('News : incredibly rare albino wrinkler on the brink of extinction poached by cookie-crazed pastry magnate!'); - if (Game.Has('Serendipity')) list.push('News : local cookie manufacturer becomes luckiest being alive!'); - if (Game.Has('Season switcher')) list.push('News : seasons are all out of whack! "We need to get some whack back into them seasons", says local resident.'); - - if (Game.Has('Kitten helpers')) list.push('News : faint meowing heard around local cookie facilities; suggests new ingredient being tested.'); - if (Game.Has('Kitten workers')) list.push('News : crowds of meowing kittens with little hard hats reported near local cookie facilities.'); - if (Game.Has('Kitten engineers')) list.push('News : surroundings of local cookie facilities now overrun with kittens in adorable little suits. Authorities advise to stay away from the premises.'); - if (Game.Has('Kitten overseers')) list.push('News : locals report troupe of bossy kittens meowing adorable orders at passersby.'); - if (Game.Has('Kitten managers')) list.push('News : local office cubicles invaded with armies of stern-looking kittens asking employees "what\'s happening, meow".'); - if (Game.Has('Kitten accountants')) list.push('News : tiny felines show sudden and amazing proficiency with fuzzy mathematics and pawlinomials, baffling scientists and pet store owners.'); - if (Game.Has('Kitten specialists')) list.push('News : new kitten college opening next week, offers courses on cookie-making and catnip studies.'); - if (Game.Has('Kitten experts')) list.push('News : unemployment rates soaring as woefully adorable little cats nab jobs on all levels of expertise, says study.'); - if (Game.Has('Kitten consultants')) list.push('News : "In the future, your job will most likely be done by a cat", predicts suspiciously furry futurologist.'); - if (Game.Has('Kitten assistants to the regional manager')) list.push('News : strange kittens with peculiar opinions on martial arts spotted loitering on local beet farms!'); - if (Game.Has('Kitten marketeers')) list.push('News : nonsensical kitten billboards crop up all over countryside, trying to sell people the cookies they already get for free!'); - if (Game.Has('Kitten analysts')) list.push('News : are your spending habits sensible? For a hefty fee, these kitten analysts will tell you!'); - if (Game.Has('Kitten executives')) list.push('News : kittens strutting around in hot little business suits shouting cut-throat orders at their assistants, possibly the cutest thing this reporter has ever seen!'); - if (Game.Has('Kitten admins')) list.push('News : all systems nominal, claim kitten admins obviously in way over their heads.'); - if (Game.Has('Kitten strategists')) list.push('News : overpaid kittens scratching their fuzzy little heads trying to find new ways to get cookies in your shopping cart!'); - if (Game.Has('Kitten angels')) list.push('News : "Try to ignore any ghostly felines that may be purring inside your ears," warn scientists. "They\'ll just lure you into making poor life choices."'); - if (Game.Has('Kitten wages')) list.push('News : kittens break glass ceiling! Do they have any idea how expensive those are!'); - if (Game.HasAchiev('Jellicles')) list.push('News : local kittens involved in misguided musical production, leave audience perturbed and unnerved.'); - } - - if (Game.HasAchiev('Dude, sweet') && Math.random() < 0.2) list.push(choose([ - 'News : major sugar-smuggling ring dismantled by authorities; ' + Math.floor(Math.random() * 30 + 3) + ' tons of sugar lumps seized, ' + Math.floor(Math.random() * 48 + 2) + ' suspects apprehended.', - 'News : authorities warn tourists not to buy bootleg sugar lumps from street peddlers - "You think you\'re getting a sweet deal, but what you\'re being sold is really just ordinary cocaine", says agent.', - 'News : pro-diabetes movement protests against sugar-shaming. "I\'ve eaten nothing but sugar lumps for the past ' + Math.floor(Math.random() * 10 + 4) + ' years and I\'m feeling great!", says woman with friable skin.', - 'News : experts in bitter disagreement over whether sugar consumption turns children sluggish or hyperactive.', - 'News : fishermen deplore upturn in fish tooth decay as sugar lumps-hauling cargo sinks into the ocean.', - 'News : rare black sugar lump that captivated millions in unprecedented auction revealed to be common toxic fungus.', - 'News : "Back in my day, sugar lumps were these little cubes you\'d put in your tea, not those fist-sized monstrosities people eat for lunch", whines curmudgeon with failing memory.', - 'News : sugar lump-snacking fad sweeps the nation; dentists everywhere rejoice.' - ])); - - if (Math.random() < 0.001)//apologies to Will Wright - { - list.push( - 'You have been chosen. They will come soon.', - 'They\'re coming soon. Maybe you should think twice about opening the door.', - 'The end is near. Make preparations.', - 'News : broccoli tops for moms, last for kids; dads indifferent.', - 'News : middle age a hoax, declares study; turns out to be bad posture after all.', - 'News : kitties want answers in possible Kitty Kibble shortage.' - ); - } - - if (Game.cookiesEarned >= 10000) list.push( - 'News : ' + choose([ - 'cookies found to ' + choose(['increase lifespan', 'sensibly increase intelligence', 'reverse aging', 'decrease hair loss', 'prevent arthritis', 'cure blindness']) + ' in ' + choose(animals) + '!', - 'cookies found to make ' + choose(animals) + ' ' + choose(['more docile', 'more handsome', 'nicer', 'less hungry', 'more pragmatic', 'tastier']) + '!', - 'cookies tested on ' + choose(animals) + ', found to have no ill effects.', - 'cookies unexpectedly popular among ' + choose(animals) + '!', - 'unsightly lumps found on ' + choose(animals) + ' near cookie facility; "they\'ve pretty much always looked like that", say biologists.', - 'new species of ' + choose(animals) + ' discovered in distant country; "yup, tastes like cookies", says biologist.', - 'cookies go well with ' + choose([choose(['roasted', 'toasted', 'boiled', 'sauteed', 'minced']) + ' ' + choose(animals), choose(['sushi', 'soup', 'carpaccio', 'steak', 'nuggets']) + ' made from ' + choose(animals)]) + ', says controversial chef.', - '"do your cookies contain ' + choose(animals) + '?", asks PSA warning against counterfeit cookies.', - 'doctors recommend twice-daily consumption of fresh cookies.', - 'doctors warn against chocolate chip-snorting teen fad.', - 'doctors advise against new cookie-free fad diet.', - 'doctors warn mothers about the dangers of "home-made cookies".' - ]), - 'News : "' + choose([ - 'I\'m all about cookies', - 'I just can\'t stop eating cookies. I think I seriously need help', - 'I guess I have a cookie problem', - 'I\'m not addicted to cookies. That\'s just speculation by fans with too much free time', - 'my upcoming album contains 3 songs about cookies', - 'I\'ve had dreams about cookies 3 nights in a row now. I\'m a bit worried honestly', - 'accusations of cookie abuse are only vile slander', - 'cookies really helped me when I was feeling low', - 'cookies are the secret behind my perfect skin', - 'cookies helped me stay sane while filming my upcoming movie', - 'cookies helped me stay thin and healthy', - 'I\'ll say one word, just one : cookies', - 'alright, I\'ll say it - I\'ve never eaten a single cookie in my life' - ]) + '", reveals celebrity.', - choose([ - 'News : scientist predicts imminent cookie-related "end of the world"; becomes joke among peers.', - 'News : man robs bank, buys cookies.', - 'News : scientists establish that the deal with airline food is, in fact, a critical lack of cookies.', - 'News : hundreds of tons of cookies dumped into starving country from airplanes; thousands dead, nation grateful.', - 'News : new study suggests cookies neither speed up nor slow down aging, but instead "take you in a different direction".', - 'News : overgrown cookies found in fishing nets, raise questions about hormone baking.', - 'News : "all-you-can-eat" cookie restaurant opens in big city; waiters trampled in minutes.', - 'News : man dies in cookie-eating contest; "a less-than-impressive performance", says judge.', - 'News : what makes cookies taste so right? "Probably all the [*****] they put in them", says anonymous tipper.', - 'News : man found allergic to cookies; "what a weirdo", says family.', - 'News : foreign politician involved in cookie-smuggling scandal.', - 'News : cookies now more popular than ' + choose(['cough drops', 'broccoli', 'smoked herring', 'cheese', 'video games', 'stable jobs', 'relationships', 'time travel', 'cat videos', 'tango', 'fashion', 'television', 'nuclear warfare', 'whatever it is we ate before', 'politics', 'oxygen', 'lamps']) + ', says study.', - 'News : obesity epidemic strikes nation; experts blame ' + choose(['twerking', 'that darn rap music', 'video-games', 'lack of cookies', 'mysterious ghostly entities', 'aliens', 'parents', 'schools', 'comic-books', 'cookie-snorting fad']) + '.', - 'News : cookie shortage strikes town, people forced to eat cupcakes; "just not the same", concedes mayor.', - 'News : "you gotta admit, all this cookie stuff is a bit ominous", says confused idiot.', - //'News : scientists advise getting used to cookies suffusing every aspect of life; "this is the new normal", expert says.', - //'News : doctors advise against wearing face masks when going outside. "You never know when you might need a cookie... a mask would just get in the way."',//these were written back when covid hadn't really done much damage yet but they just feel in poor taste now - 'News : is there life on Mars? Various chocolate bar manufacturers currently under investigation for bacterial contaminants.', - 'News : "so I guess that\'s a thing now", scientist comments on cookie particles now present in virtually all steel manufactured since cookie production ramped up worldwide.', - 'News : trace amounts of cookie particles detected in most living creatures, some of which adapting them as part of new and exotic metabolic processes.', - ]), - choose([ - 'News : movie cancelled from lack of actors; "everybody\'s at home eating cookies", laments director.', - 'News : comedian forced to cancel cookie routine due to unrelated indigestion.', - 'News : new cookie-based religion sweeps the nation.', - 'News : fossil records show cookie-based organisms prevalent during Cambrian explosion, scientists say.', - 'News : mysterious illegal cookies seized; "tastes terrible", says police.', - 'News : man found dead after ingesting cookie; investigators favor "mafia snitch" hypothesis.', - 'News : "the universe pretty much loops on itself," suggests researcher; "it\'s cookies all the way down."', - 'News : minor cookie-related incident turns whole town to ashes; neighboring cities asked to chip in for reconstruction.', - 'News : is our media controlled by the cookie industry? This could very well be the case, says crackpot conspiracy theorist.', - 'News : ' + choose(['cookie-flavored popcorn pretty damn popular; "we kinda expected that", say scientists.', 'cookie-flavored cereals break all known cereal-related records', 'cookies popular among all age groups, including fetuses, says study.', 'cookie-flavored popcorn sales exploded during screening of Grandmothers II : The Moistening.']), - 'News : all-cookie restaurant opening downtown. Dishes such as braised cookies, cookie thermidor, and for dessert : crepes.', - 'News : "Ook", says interviewed orangutan.', - 'News : cookies could be the key to ' + choose(['eternal life', 'infinite riches', 'eternal youth', 'eternal beauty', 'curing baldness', 'world peace', 'solving world hunger', 'ending all wars world-wide', 'making contact with extraterrestrial life', 'mind-reading', 'better living', 'better eating', 'more interesting TV shows', 'faster-than-light travel', 'quantum baking', 'chocolaty goodness', 'gooder thoughtness']) + ', say scientists.', - 'News : flavor text ' + choose(['not particularly flavorful', 'kind of unsavory', '"rather bland"', 'pretty spicy lately']) + ', study finds.', - ]), - choose([ - 'News : what do golden cookies taste like? Study reveals a flavor "somewhere between spearmint and liquorice".', - 'News : what do wrath cookies taste like? Study reveals a flavor "somewhere between blood sausage and seawater".', - 'News : ' + Game.bakeryName + '-brand cookies "' + choose(['much less soggy', 'much tastier', 'relatively less crappy', 'marginally less awful', 'less toxic', 'possibly more edible', 'more fashionable', 'slightly nicer', 'trendier', 'arguably healthier', 'objectively better choice', 'slightly less terrible', 'decidedly cookier', 'a tad cheaper']) + ' than competitors", says consumer survey.', - 'News : "' + Game.bakeryName + '" set to be this year\'s most popular baby name.', - 'News : new popularity survey says ' + Game.bakeryName + '\'s the word when it comes to cookies.', - 'News : major city being renamed ' + Game.bakeryName + 'ville after world-famous cookie manufacturer.', - 'News : ' + choose(['street', 'school', 'nursing home', 'stadium', 'new fast food chain', 'new planet', 'new disease', 'flesh-eating bacteria', 'deadly virus', 'new species of ' + choose(animals), 'new law', 'baby', 'programming language']) + ' to be named after ' + Game.bakeryName + ', the world-famous cookie manufacturer.', - 'News : don\'t miss tonight\'s biopic on ' + Game.bakeryName + '\'s irresistible rise to success!', - 'News : don\'t miss tonight\'s interview of ' + Game.bakeryName + ' by ' + choose(['Bloprah', 'Blavid Bletterman', 'Blimmy Blimmel', 'Blellen Blegeneres', 'Blimmy Blallon', 'Blonan Blo\'Brien', 'Blay Bleno', 'Blon Blewart', 'Bleven Blolbert', 'Lord Toxikhron of dimension 7-B19', Game.bakeryName + '\'s own evil clone']) + '!', - 'News : people all over the internet still scratching their heads over nonsensical reference : "Okay, but why an egg?"', - 'News : viral video "Too Many Cookies" could be "a grim commentary on the impending crisis our world is about to face", says famous economist.', - 'News : "memes from last year somehow still relevant", deplore experts.', - 'News : cookie emoji most popular among teenagers, far ahead of "judgmental OK hand sign" and "shifty-looking dark moon", says study.', - ]), - choose([ - 'News : births of suspiciously bald babies on the rise; ancient alien cabal denies involvement.', - 'News : "at this point, cookies permeate the economy", says economist. "If we start eating anything else, we\'re all dead."', - 'News : pun in headline infuriates town, causes riot. 21 wounded, 5 dead; mayor still missing.', - 'Nws : ky btwn W and R brokn, plas snd nw typwritr ASAP.', - 'Neeeeews : "neeeew EEEEEE keeeeey working fineeeeeeeee", reeeports gleeeeeeeeful journalist.', - 'News : cookies now illegal in some backwards country nobody cares about. Political tensions rising; war soon, hopefully.', - 'News : irate radio host rambles about pixelated icons. "None of the cookies are aligned! Can\'t anyone else see it? I feel like I\'m taking crazy pills!"', - 'News : nation cheers as legislators finally outlaw ' + choose(['cookie criticism', 'playing other games than Cookie Clicker', 'pineapple on pizza', 'lack of cheerfulness', 'mosquitoes', 'broccoli', 'the human spleen', 'bad weather', 'clickbait', 'dabbing', 'the internet', 'memes', 'millennials']) + '!', - 'News : ' + choose(['local', 'area']) + ' ' + choose(['man', 'woman']) + ' goes on journey of introspection, finds cookies : "I honestly don\'t know what I was expecting."', - 'News : ' + choose(['man', 'woman']) + ' wakes up from coma, ' + choose(['tries cookie for the first time, dies.', 'regrets it instantly.', 'wonders "why everything is cookies now".', 'babbles incoherently about some supposed "non-cookie food" we used to eat.', 'cites cookies as main motivator.', 'asks for cookies.']), - 'News : pet ' + choose(animals) + ', dangerous fad or juicy new market?', - 'News : person typing these wouldn\'t mind someone else breaking the news to THEM, for a change.', - 'News : "average person bakes ' + Beautify(Math.ceil(Game.cookiesEarned / 8000000000)) + ' cookie' + (Math.ceil(Game.cookiesEarned / 8000000000) == 1 ? '' : 's') + ' a year" factoid actually just statistical error; ' + Game.bakeryName + ', who has produced ' + Beautify(Game.cookiesEarned) + ' cookies in their lifetime, is an outlier and should not have been counted.' - ]) - ); - } - } - - if (list.length == 0) { - if (loreProgress <= 0) list.push(loc("You feel like making cookies. But nobody wants to eat your cookies.")); - else if (loreProgress <= 1) list.push(loc("Your first batch goes to the trash. The neighborhood raccoon barely touches it.")); - else if (loreProgress <= 2) list.push(loc("Your family accepts to try some of your cookies.")); - else if (loreProgress <= 3) list.push(loc("Your cookies are popular in the neighborhood."), loc("People are starting to talk about your cookies.")); - else if (loreProgress <= 4) list.push(loc("Your cookies are talked about for miles around."), loc("Your cookies are renowned in the whole town!")); - else if (loreProgress <= 5) list.push(loc("Your cookies bring all the boys to the yard."), loc("Your cookies now have their own website!")); - else if (loreProgress <= 6) list.push(loc("Your cookies are worth a lot of money."), loc("Your cookies sell very well in distant countries.")); - else if (loreProgress <= 7) list.push(loc("People come from very far away to get a taste of your cookies."), loc("Kings and queens from all over the world are enjoying your cookies.")); - else if (loreProgress <= 8) list.push(loc("There are now museums dedicated to your cookies."), loc("A national day has been created in honor of your cookies.")); - else if (loreProgress <= 9) list.push(loc("Your cookies have been named a part of the world wonders."), loc("History books now include a whole chapter about your cookies.")); - else if (loreProgress <= 10) list.push(loc("Your cookies have been placed under government surveillance."), loc("The whole planet is enjoying your cookies!")); - else if (loreProgress <= 11) list.push(loc("Strange creatures from neighboring planets wish to try your cookies."), loc("Elder gods from the whole cosmos have awoken to taste your cookies.")); - else if (loreProgress <= 12) list.push(loc("Beings from other dimensions lapse into existence just to get a taste of your cookies."), loc("Your cookies have achieved sentience.")); - else if (loreProgress <= 13) list.push(loc("The universe has now turned into cookie dough, to the molecular level."), loc("Your cookies are rewriting the fundamental laws of the universe.")); - else if (loreProgress <= 14) list.push(loc("A local news station runs a 10-minute segment about your cookies. Success!
(you win a cookie)"), loc("it's time to stop playing")); - } - - //if (Game.elderWrath>0 && (Game.pledges==0 || Math.random()<0.2)) - if (Game.elderWrath > 0 && (((Game.pledges == 0 && Game.resets == 0) && Math.random() < 0.3) || Math.random() < 0.03)) { - list = []; - if (Game.elderWrath == 1) list.push(EN ? choose([ - 'News : millions of old ladies reported missing!', - 'News : processions of old ladies sighted around cookie facilities!', - 'News : families around the continent report agitated, transfixed grandmothers!', - 'News : doctors swarmed by cases of old women with glassy eyes and a foamy mouth!', - 'News : nurses report "strange scent of cookie dough" around female elderly patients!' - ]) : (NEWS + choose(loc("Ticker (grandma invasion start)")))); - if (Game.elderWrath == 2) list.push(EN ? choose([ - 'News : town in disarray as strange old ladies break into homes to abduct infants and baking utensils!', - 'News : sightings of old ladies with glowing eyes terrify local population!', - 'News : retirement homes report "female residents slowly congealing in their seats"!', - 'News : whole continent undergoing mass exodus of old ladies!', - 'News : old women freeze in place in streets, ooze warm sugary syrup!' - ]) : (NEWS + choose(loc("Ticker (grandma invasion rise)")))); - if (Game.elderWrath == 3) list.push(EN ? choose([ - 'News : large "flesh highways" scar continent, stretch between various cookie facilities!', - 'News : wrinkled "flesh tendrils" visible from space!', - 'News : remains of "old ladies" found frozen in the middle of growing fleshy structures!', - 'News : all hope lost as writhing mass of flesh and dough engulfs whole city!', - 'News : nightmare continues as wrinkled acres of flesh expand at alarming speeds!' - ]) : (NEWS + choose(loc("Ticker (grandma invasion full)")))); - } - - if (EN && Game.season == 'fools') { - list = []; - - if (Game.cookiesEarned >= 1000) list.push(choose([ - choose(['Your office chair is really comfortable.', 'Profit\'s in the air!', 'Business meetings are such a joy!', 'What a great view from your office!', 'Smell that? That\'s capitalism, baby!', 'You truly love answering emails.', 'Working hard, or hardly working?', 'Another day in paradise!', 'Expensive lunch time!', 'Another government bailout coming up! Splendid!', 'These profits are doing wonderful things for your skin.', 'You daydream for a moment about a world without taxes.', 'You\'ll worry about environmental damage when you\'re dead!', 'Yay, office supplies!', 'Sweet, those new staplers just came in!', 'Ohh, coffee break!']), - choose(['You\'ve spent the whole day', 'Another great day', 'First order of business today:', 'Why, you truly enjoy', 'What next? That\'s right,', 'You check what\'s next on the agenda. Oh boy,']) + ' ' + choose(['signing contracts', 'filling out forms', 'touching base with the team', 'examining exciting new prospects', 'playing with your desk toys', 'getting new nameplates done', 'attending seminars', 'videoconferencing', 'hiring dynamic young executives', 'meeting new investors', 'updating your rolodex', 'pumping up those numbers', 'punching in some numbers', 'getting investigated for workers\' rights violations', 'reorganizing documents', 'belittling underlings', 'reviewing employee performance', 'revising company policies', 'downsizing', 'pulling yourself up by your bootstraps', 'adjusting your tie', 'performing totally normal human activities', 'recentering yourself in the scream room', 'immanentizing the eschaton', 'shredding some sensitive documents', 'comparing business cards', 'pondering the meaning of your existence', 'listening to the roaring emptiness inside your soul', 'playing minigolf in your office']) + '!', - 'The word of the day is: ' + choose(['viral', 'search engine optimization', 'blags and wobsites', 'social networks', 'webinette', 'staycation', 'user experience', 'crowdfunding', 'carbon neutral', 'big data', 'machine learning', 'disrupting', 'influencers', 'monoconsensual transactions', 'sustainable', 'freemium', 'incentives', 'grassroots', 'web 3.0'/*this was before this whole crypto mess i'm so sorry*/, 'logistics', 'leveraging', 'branding', 'proactive', 'synergizing', 'market research', 'demographics', 'pie charts', 'blogular', 'blogulacious', 'blogastic', 'authenticity', 'plastics', 'electronic mail', 'cellular phones', 'rap music', 'bulbs', 'goblinization', 'straight-to-bakery', 'microbakeries', 'chocolativity', 'flavorfulness', 'tastyfication', 'sugar offsets', 'activated wheat', 'reification', 'immanentize the eschaton', 'cookies, I guess']) + '.' - ])); - if (Game.cookiesEarned >= 1000 && Math.random() < 0.05) list.push(choose([ - 'If you could get some more cookies baked, that\'d be great.', - 'So. About those TPS reports.', - 'Hmm, you\'ve got some video tapes to return.', - 'They\'ll pay. They\'ll all pay.', - 'You haven\'t even begun to peak.', - 'There is an idea of a ' + Game.bakeryName + '. Some kind of abstraction. But there is no real you, only an entity. Something illusory.', - 'This was a terrible idea!' - ])); - - - if (Game.TickerN % 2 == 0) { - if (Game.Objects['Grandma'].amount > 0) list.push(choose([ - 'Your rolling pins are rolling and pinning!', - 'Production is steady!' - ])); - - if (Game.Objects['Grandma'].amount > 0) list.push(choose([ - 'Your ovens are diligently baking more and more cookies.', - 'Your ovens burn a whole batch. Ah well! Still good.' - ])); - - if (Game.Objects['Farm'].amount > 0) list.push(choose([ - 'Scores of cookies come out of your kitchens.', - 'Today, new recruits are joining your kitchens!' - ])); - - if (Game.Objects['Factory'].amount > 0) list.push(choose([ - 'Your factories are producing an unending stream of baked goods.', - 'Your factory workers decide to go on strike!', - 'It\'s safety inspection day in your factories.' - ])); - - if (Game.Objects['Mine'].amount > 0) list.push(choose([ - 'Your secret recipes are kept safely inside a giant underground vault.', - 'Your chefs are working on new secret recipes!' - ])); - - if (Game.Objects['Shipment'].amount > 0) list.push(choose([ - 'Your supermarkets are bustling with happy, hungry customers.', - 'Your supermarkets are full of cookie merch!' - ])); - - if (Game.Objects['Alchemy lab'].amount > 0) list.push(choose([ - 'It\'s a new trading day at the stock exchange, and traders can\'t get enough of your shares!', - 'Your stock is doubling in value by the minute!' - ])); - - if (Game.Objects['Portal'].amount > 0) list.push(choose([ - 'You just released a new TV show episode!', - 'Your cookie-themed TV show is being adapted into a new movie!' - ])); - - if (Game.Objects['Time machine'].amount > 0) list.push(choose([ - 'Your theme parks are doing well - puddles of vomit and roller-coaster casualties are being swept under the rug!', - 'Visitors are stuffing themselves with cookies before riding your roller-coasters. You might want to hire more clean-up crews.' - ])); - - if (Game.Objects['Antimatter condenser'].amount > 0) list.push(choose([ - 'Cookiecoin is officially the most mined digital currency in the history of mankind!', - 'Cookiecoin piracy is rampant!' - ])); - - if (Game.Objects['Prism'].amount > 0) list.push(choose([ - 'Your corporate nations just gained a new parliament!', - 'You\'ve just annexed a new nation!', - 'A new nation joins the grand cookie conglomerate!' - ])); - - if (Game.Objects['Chancemaker'].amount > 0) list.push(choose([ - 'Your intergalactic federation of cookie-sponsored planets reports record-breaking profits!', - 'Billions of unwashed aliens are pleased to join your workforce as you annex their planet!', - 'New toll opened on interstellar highway, funnelling more profits into the cookie economy!' - ])); - - if (Game.Objects['Fractal engine'].amount > 0) list.push(choose([ - 'Your cookie-based political party is doing fantastic in the polls!', - 'New pro-cookie law passes without a hitch thanks to your firm grasp of the political ecosystem!', - 'Your appointed senators are overturning cookie bans left and right!' - ])); - - if (Game.Objects['Javascript console'].amount > 0) list.push(choose([ - 'Cookies are now one of the defining aspects of mankind! Congratulations!', - 'Time travelers report that this era will later come to be known, thanks to you, as the cookie millennium!', - 'Cookies now deeply rooted in human culture, likely puzzling future historians!' - ])); - - if (Game.Objects['Idleverse'].amount > 0) list.push(choose([ - 'Public aghast as all remaining aspects of their lives overtaken by universal cookie industry!', - 'Every single product currently sold in the observable universe can be traced back to your company! And that\'s a good thing.', - 'Antitrust laws let out a helpless whimper before being engulfed by your sprawling empire!' - ])); - - if (Game.Objects['Cortex baker'].amount > 0) list.push(choose([ - 'Bold new law proposal would grant default ownership of every new idea by anyone anywhere to ' + Game.bakeryName + '\'s bakery!', - 'Bakery think tanks accidentally reinvent cookies for the 57th time this week!', - 'Bakery think tanks invent entire new form of human communication to advertise and boost cookie sales!' - ])); - - if (Game.Objects['You'].amount > 0) list.push(choose([ - '' + Game.bakeryName + ' releases new self-help book: "How I Made My ' + Beautify(Game.cookiesEarned) + ' Cookies And How You Can Too"!', - 'Don\'t miss our interview tonight with the stupefying ' + Game.bakeryName + ', who discusses where to go next once you\'re at the top!', - 'Fame, beauty, biscuits; ' + Game.bakeryName + ' has it all - but is it enough?' - ])); - } - - if (loreProgress <= 0) list.push('Such a grand day to begin a new business.'); - else if (loreProgress <= 1) list.push('You\'re baking up a storm!'); - else if (loreProgress <= 2) list.push('You are confident that one day, your cookie company will be the greatest on the market!'); - else if (loreProgress <= 3) list.push('Business is picking up!'); - else if (loreProgress <= 4) list.push('You\'re making sales left and right!'); - else if (loreProgress <= 5) list.push('Everyone wants to buy your cookies!'); - else if (loreProgress <= 6) list.push('You are now spending most of your day signing contracts!'); - else if (loreProgress <= 7) list.push('You\'ve been elected "business tycoon of the year"!'); - else if (loreProgress <= 8) list.push('Your cookies are a worldwide sensation! Well done, old chap!'); - else if (loreProgress <= 9) list.push('Your brand has made its way into popular culture. Children recite your slogans and adults reminisce them fondly!'); - else if (loreProgress <= 10) list.push('A business day like any other. It\'s good to be at the top!'); - else if (loreProgress <= 11) list.push('You look back on your career. It\'s been a fascinating journey, building your baking empire from the ground up.'); - } - - for (var i = 0; i < Game.modHooks['ticker'].length; i++) { - var arr = Game.modHooks['ticker'][i](); - if (arr) list = list.concat(arr); - } - - Game.TickerEffect = 0; - - if (!manual && Game.T > Game.fps * 10 && Game.Has('Fortune cookies') && Math.random() < (Game.HasAchiev('O Fortuna') ? 0.04 : 0.02)) { - var fortunes = []; - for (var i in Game.Tiers['fortune'].upgrades) { - var it = Game.Tiers['fortune'].upgrades[i]; - if (!Game.HasUnlocked(it.name)) fortunes.push(it); - } - - if (!Game.fortuneGC) fortunes.push('fortuneGC'); - if (!Game.fortuneCPS) fortunes.push('fortuneCPS'); - - if (fortunes.length > 0) { - list = []; - var me = choose(fortunes); - Game.TickerEffect = { type: 'fortune', sub: me }; - - if (me == 'fortuneGC') me = loc("Today is your lucky day!");/*
Click here for a golden cookie.';*/ - else if (me == 'fortuneCPS') { Math.seedrandom(Game.seed + '-fortune'); me = loc("Your lucky numbers are:") + ' ' + Math.floor(Math.random() * 100) + ' ' + Math.floor(Math.random() * 100) + ' ' + Math.floor(Math.random() * 100) + ' ' + Math.floor(Math.random() * 100)/*+'
Click here to gain one hour of your CpS.'*/; Math.seedrandom(); } - else { - if (EN) { - me = me.dname.substring(me.name.indexOf('#')) + ' : ' + me.baseDesc.substring(me.baseDesc.indexOf('') + 3); - me = me.substring(0, me.length - 4); - } - else if (me.buildingTie) me = me.dname + ' : ' + loc(choose(["Never forget your %1.", "Pay close attention to the humble %1.", "You've been neglecting your %1.", "Remember to visit your %1 sometimes."]), me.buildingTie.single); - else me = me.dname + ' : ' + loc(choose(["You don't know what you have until you've lost it.", "Remember to take breaks.", "Hey, what's up. I'm a fortune cookie.", "You think you have it bad? Look at me."])); - } - me = '
' + me + '
'; - list = [me]; - } - } - - if (Game.windowW < Game.tickerTooNarrow) list = ['
' + NEWS + (EN ? 'help!' : loc("help me!")) + '
']; - - Game.TickerAge = Game.fps * 10; - Game.Ticker = choose(list); - Game.AddToLog(Game.Ticker); - Game.TickerN++; - Game.TickerDraw(); - } - Game.tickerL = l('commentsText1'); - Game.tickerBelowL = l('commentsText2'); - Game.tickerTooNarrow = 900; - Game.TickerDraw = function () { - var str = ''; - if (Game.Ticker != '') str = Game.Ticker; - Game.tickerBelowL.innerHTML = Game.tickerL.innerHTML; - Game.tickerL.innerHTML = str; - - Game.tickerBelowL.className = 'commentsText'; - void Game.tickerBelowL.offsetWidth; - Game.tickerBelowL.className = 'commentsText risingAway'; - Game.tickerL.className = 'commentsText'; - void Game.tickerL.offsetWidth; - Game.tickerL.className = 'commentsText risingUp'; - } - AddEvent(Game.tickerL, 'click', function (event) { - Game.Ticker = ''; - Game.TickerClicks++; - if (Game.windowW < Game.tickerTooNarrow) { Game.Win('Stifling the press'); } - else if (Game.TickerClicks >= 50) { Game.Win('Tabloid addiction'); } - - if (Game.TickerEffect && Game.TickerEffect.type == 'fortune') { - PlaySound('snd/fortune.mp3', 1); - Game.SparkleAt(Game.mouseX, Game.mouseY); - var effect = Game.TickerEffect.sub; - if (effect == 'fortuneGC') { - Game.Notify(loc("Fortune!"), loc("A golden cookie has appeared."), [10, 32]); - Game.fortuneGC = 1; - var newShimmer = new Game.shimmer('golden', { noWrath: true }); - } - else if (effect == 'fortuneCPS') { - Game.Notify(loc("Fortune!"), loc("You gain one hour of your CpS (capped at double your bank)."), [10, 32]); - Game.fortuneCPS = 1; - Game.Earn(Math.min(Game.cookiesPs * 60 * 60, Game.cookies)); - } - else { - Game.Notify(effect.dname, loc("You've unlocked a new upgrade."), effect.icon); - effect.unlock(); - } - } - - Game.TickerEffect = 0; - - }); - - Game.Log = []; - Game.AddToLog = function (what) { - Game.Log.unshift(what); - if (Game.Log.length > 100) Game.Log.pop(); - } - - Game.vanilla = 1; - /*===================================================================================== - BUILDINGS - =======================================================================================*/ - Game.last = 0; - - Game.storeToRefresh = 1; - Game.priceIncrease = 1.15; - Game.buyBulk = 1; - Game.buyMode = 1;//1 for buy, -1 for sell - Game.buyBulkOld = Game.buyBulk;//used to undo changes from holding Shift or Ctrl - Game.buyBulkShortcut = 0;//are we pressing Shift or Ctrl? - - Game.Objects = {}; - Game.ObjectsById = []; - Game.ObjectsN = 0; - Game.BuildingsOwned = 0; - Game.Object = function (name, commonName, desc, icon, iconColumn, art, price, cps, buyFunction) { - this.id = Game.ObjectsN; - this.name = name; - this.dname = name; - this.displayName = this.name; - commonName = commonName.split('|'); - this.single = commonName[0]; - this.plural = commonName[1]; - this.bsingle = this.single; this.bplural = this.plural;//store untranslated as we use those too - this.actionName = commonName[2]; - this.extraName = commonName[3]; - this.extraPlural = commonName[4]; - this.desc = desc; - if (true)//if (EN) - { - this.dname = loc(this.name); - this.single = loc(this.single); - this.plural = loc(this.plural); - this.desc = loc(FindLocStringByPart(this.name + ' quote')); - } - this.basePrice = price; - this.price = this.basePrice; - this.bulkPrice = this.price; - this.cps = cps; - this.baseCps = this.cps; - this.mouseOn = false; - this.mousePos = [-100, -100]; - this.productionAchievs = []; - - this.n = this.id; - if (this.n != 0) { - //new automated price and CpS curves - //this.baseCps=Math.ceil(((this.n*0.5)*Math.pow(this.n*1,this.n*0.9))*10)/10; - //this.baseCps=Math.ceil((Math.pow(this.n*1,this.n*0.5+2.35))*10)/10;//by a fortunate coincidence, this gives the 3rd, 4th and 5th buildings a CpS of 10, 69 and 420 - this.baseCps = Math.ceil((Math.pow(this.n * 1, this.n * 0.5 + 2)) * 10) / 10;//0.45 used to be 0.5 - //this.baseCps=Math.ceil((Math.pow(this.n*1,this.n*0.45+2.10))*10)/10; - //clamp 14,467,199 to 14,000,000 (there's probably a more elegant way to do that) - var digits = Math.pow(10, (Math.ceil(Math.log(Math.ceil(this.baseCps)) / Math.LN10))) / 100; - this.baseCps = Math.round(this.baseCps / digits) * digits; - - this.basePrice = (this.n * 1 + 9 + (this.n < 5 ? 0 : Math.pow(this.n - 5, 1.75) * 5)) * Math.pow(10, this.n) * (Math.max(1, this.n - 14)); - //this.basePrice=(this.n*2.5+7.5)*Math.pow(10,this.n); - var digits = Math.pow(10, (Math.ceil(Math.log(Math.ceil(this.basePrice)) / Math.LN10))) / 100; - this.basePrice = Math.round(this.basePrice / digits) * digits; - if (this.id >= 16) this.basePrice *= 10; - if (this.id >= 17) this.basePrice *= 10; - if (this.id >= 18) this.basePrice *= 10; - if (this.id >= 19) this.basePrice *= 20; - this.price = this.basePrice; - this.bulkPrice = this.price; - } - - this.totalCookies = 0; - this.storedCps = 0; - this.storedTotalCps = 0; - this.icon = icon; - this.iconColumn = iconColumn; - this.art = art; - if (art.base) { art.pic = art.base + '.png'; art.bg = art.base + 'Background.png'; } - this.buyFunction = buyFunction; - this.locked = 1; - this.level = 0; - this.vanilla = Game.vanilla; - - this.tieredUpgrades = {}; - this.tieredAchievs = {}; - this.synergies = []; - this.fortune = 0; - - this.amount = 0; - this.bought = 0; - this.highest = 0; - this.free = 0; - - this.eachFrame = 0; - - this.minigameUrl = 0;//if this is defined, load the specified script if the building's level is at least 1 - this.minigameName = 0; - this.onMinigame = false; - this.minigameLoaded = false; - - this.switchMinigame = function (on)//change whether we're on the building's minigame - { - if (!Game.isMinigameReady(this)) on = false; - if (on == -1) on = !this.onMinigame; - this.onMinigame = on; - if (this.id != 0) { - if (this.onMinigame) { - l('row' + this.id).classList.add('onMinigame'); - //l('rowSpecial'+this.id).style.display='block'; - //l('rowCanvas'+this.id).style.display='none'; - if (this.minigame.onResize) this.minigame.onResize(); - } - else { - l('row' + this.id).classList.remove('onMinigame'); - //l('rowSpecial'+this.id).style.display='none'; - //l('rowCanvas'+this.id).style.display='block'; - } - } - this.refresh(); - } - - this.getPrice = function (n) { - var price = this.basePrice * Math.pow(Game.priceIncrease, Math.max(0, this.amount - this.free)); - price = Game.modifyBuildingPrice(this, price); - return Math.ceil(price); - } - this.getSumPrice = function (amount)//return how much it would cost to buy [amount] more of this building - { - var price = 0; - for (var i = Math.max(0, this.amount); i < Math.max(0, (this.amount) + amount); i++) { - price += this.basePrice * Math.pow(Game.priceIncrease, Math.max(0, i - this.free)); - } - price = Game.modifyBuildingPrice(this, price); - return Math.ceil(price); - } - this.getReverseSumPrice = function (amount)//return how much you'd get from selling [amount] of this building - { - var price = 0; - for (var i = Math.max(0, (this.amount) - amount); i < Math.max(0, this.amount); i++) { - price += this.basePrice * Math.pow(Game.priceIncrease, Math.max(0, i - this.free)); - } - price = Game.modifyBuildingPrice(this, price); - price *= this.getSellMultiplier(); - return Math.ceil(price); - } - this.getSellMultiplier = function () { - var giveBack = 0.25; - //if (Game.hasAura('Earth Shatterer')) giveBack=0.5; - giveBack *= 1 + Game.auraMult('Earth Shatterer'); - return giveBack; - } - - this.buy = function (amount) { - if (Game.buyMode == -1) { this.sell(Game.buyBulk, 1); return 0; } - var success = 0; - var moni = 0; - var bought = 0; - if (!amount) amount = Game.buyBulk; - if (amount == -1) amount = 1000; - for (var i = 0; i < amount; i++) { - var price = this.getPrice(); - if (Game.cookies >= price) { - bought++; - moni += price; - Game.Spend(price); - this.amount++; - this.bought++; - price = this.getPrice(); - this.price = price; - if (this.buyFunction) this.buyFunction(); - Game.recalculateGains = 1; - if (this.amount == 1 && this.id != 0) l('row' + this.id).classList.add('enabled'); - this.highest = Math.max(this.highest, this.amount); - Game.BuildingsOwned++; - success = 1; - } - } - if (success) { PlaySound('snd/buy' + choose([1, 2, 3, 4]) + '.mp3', 0.75); this.refresh(); } - //if (moni>0 && amount>1) Game.Notify(this.name,'Bought '+bought+' for '+Beautify(moni)+' cookies','',2); - } - this.sell = function (amount, bypass) { - var success = 0; - var moni = 0; - var sold = 0; - if (amount == -1) amount = this.amount; - if (!amount) amount = Game.buyBulk; - for (var i = 0; i < amount; i++) { - var price = this.getPrice(); - var giveBack = this.getSellMultiplier(); - price = Math.floor(price * giveBack); - if (this.amount > 0) { - sold++; - moni += price; - Game.cookies += price; - Game.cookiesEarned = Math.max(Game.cookies, Game.cookiesEarned);//this is to avoid players getting the cheater achievement when selling buildings that have a higher price than they used to - this.amount--; - price = this.getPrice(); - this.price = price; - if (this.sellFunction) this.sellFunction(); - Game.recalculateGains = 1; - if (this.amount == 0 && this.id != 0) l('row' + this.id).classList.remove('enabled'); - Game.BuildingsOwned--; - success = 1; - } - } - if (success && Game.hasGod) { - var godLvl = Game.hasGod('ruin'); - var old = Game.hasBuff('Devastation'); - if (old) { - if (godLvl == 1) old.multClick += sold * 0.01; - else if (godLvl == 2) old.multClick += sold * 0.005; - else if (godLvl == 3) old.multClick += sold * 0.0025; - } - else { - if (godLvl == 1) Game.gainBuff('devastation', 10, 1 + sold * 0.01); - else if (godLvl == 2) Game.gainBuff('devastation', 10, 1 + sold * 0.005); - else if (godLvl == 3) Game.gainBuff('devastation', 10, 1 + sold * 0.0025); - } - } - if (success && Game.shimmerTypes['golden'].n <= 0 && Game.auraMult('Dragon Orbs') > 0) { - var highestBuilding = 0; - for (var i in Game.Objects) { if (Game.Objects[i].amount > 0) highestBuilding = Game.Objects[i]; } - if (highestBuilding == this && Math.random() < Game.auraMult('Dragon Orbs') * 0.1) { - var buffsN = 0; - for (var ii in Game.buffs) { buffsN++; } - if (buffsN == 0) { - new Game.shimmer('golden'); - Game.Notify(EN ? 'Dragon Orbs!' : loc("Dragon Orbs"), loc("Wish granted. Golden cookie spawned."), [33, 25]); - } - } - } - if (success) { PlaySound('snd/sell' + choose([1, 2, 3, 4]) + '.mp3', 0.75); this.refresh(); } - //if (moni>0) Game.Notify(this.name,'Sold '+sold+' for '+Beautify(moni)+' cookies','',2); - } - this.sacrifice = function (amount)//sell without getting back any money - { - var success = 0; - //var moni=0; - var sold = 0; - if (amount == -1) amount = this.amount; - if (!amount) amount = 1; - for (var i = 0; i < amount; i++) { - var price = this.getPrice(); - price = Math.floor(price * 0.5); - if (this.amount > 0) { - sold++; - //moni+=price; - //Game.cookies+=price; - //Game.cookiesEarned=Math.max(Game.cookies,Game.cookiesEarned); - this.amount--; - price = this.getPrice(); - this.price = price; - if (this.sellFunction) this.sellFunction(); - Game.recalculateGains = 1; - if (this.amount == 0 && this.id != 0) l('row' + this.id).classList.remove('enabled'); - Game.BuildingsOwned--; - success = 1; - } - } - if (success) { this.refresh(); } - //if (moni>0) Game.Notify(this.name,'Sold '+sold+' for '+Beautify(moni)+' cookies','',2); - } - this.buyFree = function (amount)//unlike getFree, this still increases the price - { - for (var i = 0; i < amount; i++) { - if (Game.cookies >= price) { - this.amount++; - this.bought++; - this.price = this.getPrice(); - Game.recalculateGains = 1; - if (this.amount == 1 && this.id != 0) l('row' + this.id).classList.add('enabled'); - this.highest = Math.max(this.highest, this.amount); - Game.BuildingsOwned++; - } - } - this.refresh(); - } - this.getFree = function (amount)//get X of this building for free, with the price behaving as if you still didn't have them - { - this.amount += amount; - this.bought += amount; - this.free += amount; - this.highest = Math.max(this.highest, this.amount); - Game.BuildingsOwned += amount; - this.highest = Math.max(this.highest, this.amount); - this.refresh(); - } - this.getFreeRanks = function (amount)//this building's price behaves as if you had X less of it - { - this.free += amount; - this.refresh(); - } - - this.tooltip = function () { - var me = this; - var ariaText = ''; - var desc = me.desc; - var name = me.dname; - if (Game.season == 'fools') { - if (!Game.foolObjects[me.name]) { - name = Game.foolObjects['Unknown'].name; - desc = Game.foolObjects['Unknown'].desc; - } - else { - name = Game.foolObjects[me.name].name; - desc = Game.foolObjects[me.name].desc; - } - } - var icon = [me.iconColumn, 0]; - if (me.locked) { - name = '???'; - desc = '???'; - icon = [0, 7]; - } - //if (l('rowInfo'+me.id) && Game.drawT%10==0) l('rowInfoContent'+me.id).innerHTML='• '+me.amount+' '+(me.amount==1?me.single:me.plural)+'
• producing '+Beautify(me.storedTotalCps,1)+' '+(me.storedTotalCps==1?'cookie':'cookies')+' per second
• total : '+Beautify(me.totalCookies)+' '+(Math.floor(me.totalCookies)==1?'cookie':'cookies')+' '+me.actionName; - - var canBuy = false; - var price = me.bulkPrice; - if ((Game.buyMode == 1 && Game.cookies >= price) || (Game.buyMode == -1 && me.amount > 0)) canBuy = true; - - var synergiesStr = ''; - //note : might not be entirely accurate, math may need checking - if (me.amount > 0) { - var synergiesWith = {}; - var synergyBoost = 0; - - if (me.name == 'Grandma') { - for (var i in Game.GrandmaSynergies) { - if (Game.Has(Game.GrandmaSynergies[i])) { - var other = Game.Upgrades[Game.GrandmaSynergies[i]].buildingTie; - var mult = me.amount * 0.01 * (1 / (other.id - 1)); - var boost = (other.storedTotalCps * Game.globalCpsMult) - (other.storedTotalCps * Game.globalCpsMult) / (1 + mult); - synergyBoost += boost; - if (!synergiesWith[other.plural]) synergiesWith[other.plural] = 0; - synergiesWith[other.plural] += mult; - } - } - } - else if (me.name == 'Portal' && Game.Has('Elder Pact')) { - var other = Game.Objects['Grandma']; - var boost = (me.amount * 0.05 * other.amount) * Game.globalCpsMult; - synergyBoost += boost; - if (!synergiesWith[other.plural]) synergiesWith[other.plural] = 0; - synergiesWith[other.plural] += boost / (other.storedTotalCps * Game.globalCpsMult); - } - - for (var i in me.synergies) { - var it = me.synergies[i]; - if (Game.Has(it.name)) { - var weight = 0.05; - var other = it.buildingTie1; - if (me == it.buildingTie1) { weight = 0.001; other = it.buildingTie2; } - var boost = (other.storedTotalCps * Game.globalCpsMult) - (other.storedTotalCps * Game.globalCpsMult) / (1 + me.amount * weight); - synergyBoost += boost; - if (!synergiesWith[other.plural]) synergiesWith[other.plural] = 0; - synergiesWith[other.plural] += me.amount * weight; - } - } - if (synergyBoost > 0) { - for (var i in synergiesWith) { - if (synergiesStr != '') synergiesStr += ', '; - synergiesStr += '' + i + ' +' + Beautify(synergiesWith[i] * 100, 1) + '%'; - } - synergiesStr = loc("...also boosting some other buildings:") + ' ' + synergiesStr + ' - ' + loc("all combined, these boosts account for %1 per second (%2% of total CpS)", [loc("%1 cookie", LBeautify(synergyBoost, 1)), Beautify((synergyBoost / Game.cookiesPs) * 100, 1)]); - } - } - - if (Game.prefs.screenreader) { - if (me.locked) ariaText = 'This building is not yet unlocked. '; - else ariaText = name + '. '; - if (!me.locked) ariaText += 'You own ' + me.amount + '. '; - ariaText += (canBuy ? 'Can buy 1 for' : 'Cannot afford the') + ' ' + Beautify(Math.round(price)) + ' cookies. '; - if (!me.locked && me.totalCookies > 0) { - ariaText += 'Each ' + me.single + ' produces ' + Beautify((me.storedTotalCps / me.amount) * Game.globalCpsMult, 1) + ' cookies per second. '; - ariaText += Beautify(me.totalCookies) + ' cookies ' + me.actionName + ' so far. '; - } - if (!me.locked) ariaText += desc; - - var ariaLabel = l('ariaReader-product-' + (me.id)); - if (ariaLabel) ariaLabel.innerHTML = ariaText.replace(/(<([^>]+)>)/gi, ' '); - } - - return '
' + Beautify(Math.round(price)) + '' + Game.costDetails(price) + '
' + name + '
' + '
' + loc("owned: %1", me.amount) + '
' + (me.free > 0 ? '
' + loc("free: %1!", me.free) + '
' : '') + '
' + - '
' + desc + '
' + - (me.totalCookies > 0 ? ( - '
' + - (me.amount > 0 ? '
' + loc("each %1 produces %2 per second", [me.single, loc("%1 cookie", LBeautify((me.storedTotalCps / me.amount) * Game.globalCpsMult, 1))]) + '
' : '') + - '
' + loc("%1 producing %2 per second", [loc("%1 " + me.bsingle, LBeautify(me.amount)), loc("%1 cookie", LBeautify(me.storedTotalCps * Game.globalCpsMult, 1))]) + ' (' + loc("%1% of total CpS", Beautify(Game.cookiesPs > 0 ? ((me.amount > 0 ? ((me.storedTotalCps * Game.globalCpsMult) / Game.cookiesPs) : 0) * 100) : 0, 1)) + ')
' + - (synergiesStr ? ('
' + synergiesStr + '
') : '') + - (EN ? '
' + Beautify(me.totalCookies) + ' ' + (Math.floor(me.totalCookies) == 1 ? 'cookie' : 'cookies') + ' ' + me.actionName + ' so far
' : '
' + loc("%1 produced so far", loc("%1 cookie", LBeautify(me.totalCookies))) + '
') - ) : '') + - '
'; - } - this.levelTooltip = function () { - var me = this; - return '
' + loc("Level %1 %2", [Beautify(me.level), me.plural]) + '
' + (EN ? ((me.level == 1 ? me.extraName : me.extraPlural).replace('[X]', Beautify(me.level)) + ' granting +' + Beautify(me.level) + '% ' + me.dname + ' CpS.') : loc("Granting +%1% %2 CpS.", [Beautify(me.level), me.single])) + '
' + loc("Click to level up for %1.", '' + loc("%1 sugar lump", LBeautify(me.level + 1)) + '') + ((me.level == 0 && me.minigameUrl) ? '
' + loc("Levelling up this building unlocks a minigame.") + '' : '') + '
'; - } - this.levelUp = function (me) { - return function (free) { - Game.spendLump(me.level + 1, loc("level up your %1", me.plural), function () { - me.level += 1; - if (me.level >= 10 && me.levelAchiev10) Game.Win(me.levelAchiev10.name); - if (!free) PlaySound('snd/upgrade.mp3', 0.6); - Game.LoadMinigames(); - me.refresh(); - if (l('productLevel' + me.id)) { var rect = l('productLevel' + me.id).getBounds(); Game.SparkleAt((rect.left + rect.right) / 2, (rect.top + rect.bottom) / 2 - 24 + 32 - TopBarOffset); } - if (me.minigame && me.minigame.onLevel) me.minigame.onLevel(me.level); - }, free)(); - }; - }(this); - - this.refresh = function ()//show/hide the building display based on its amount, and redraw it - { - this.price = this.getPrice(); - if (Game.buyMode == 1) this.bulkPrice = this.getSumPrice(Game.buyBulk); - else if (Game.buyMode == -1 && Game.buyBulk == -1) this.bulkPrice = this.getReverseSumPrice(1000); - else if (Game.buyMode == -1) this.bulkPrice = this.getReverseSumPrice(Game.buyBulk); - this.rebuild(); - if (this.amount == 0 && this.id != 0) l('row' + this.id).classList.remove('enabled'); - else if (this.amount > 0 && this.id != 0) l('row' + this.id).classList.add('enabled'); - if (this.muted > 0 && this.id != 0) { l('row' + this.id).classList.add('muted'); l('mutedProduct' + this.id).style.display = 'inline-block'; } - else if (this.id != 0) { l('row' + this.id).classList.remove('muted'); l('mutedProduct' + this.id).style.display = 'none'; } - //if (!this.onMinigame && !this.muted) {} - //else this.pics=[]; - } - this.rebuild = function () { - var me = this; - //var classes='product'; - var price = me.bulkPrice; - /*if (Game.cookiesEarned>=me.basePrice || me.bought>0) {classes+=' unlocked';me.locked=0;} else {classes+=' locked';me.locked=1;} - if (Game.cookies>=price) classes+=' enabled'; else classes+=' disabled'; - if (me.l.className.indexOf('toggledOff')!=-1) classes+=' toggledOff'; - */ - var icon = [0, me.icon]; - var iconOff = [1, me.icon]; - if (me.iconFunc) icon = me.iconFunc(); - - var desc = me.desc; - var name = me.dname; - var displayName = me.displayName; - if (Game.season == 'fools') { - if (!Game.foolObjects[me.name]) { - icon = [2, 0]; - iconOff = [3, 0]; - name = Game.foolObjects['Unknown'].name; - desc = Game.foolObjects['Unknown'].desc; - } - else { - icon = [2, me.icon]; - iconOff = [3, me.icon]; - name = Game.foolObjects[me.name].name; - desc = Game.foolObjects[me.name].desc; - } - displayName = name; - //if (name.length>16) displayName=''+name+''; - } - else if (!EN) displayName = name; - //else if (!EN && name.length>16) displayName=''+name+''; - icon = [icon[0] * 64, icon[1] * 64]; - iconOff = [iconOff[0] * 64, iconOff[1] * 64]; - - //me.l.className=classes; - //l('productIcon'+me.id).style.backgroundImage='url('+Game.resPath+'img/'+icon+')'; - l('productIcon' + me.id).style.backgroundPosition = '-' + icon[0] + 'px -' + icon[1] + 'px'; - //l('productIconOff'+me.id).style.backgroundImage='url('+Game.resPath+'img/'+iconOff+')'; - l('productIconOff' + me.id).style.backgroundPosition = '-' + iconOff[0] + 'px -' + iconOff[1] + 'px'; - l('productName' + me.id).innerHTML = displayName; - if (name.length > 12 / Langs[locId].w && (Game.season == 'fools' || !EN)) l('productName' + me.id).classList.add('longProductName'); else l('productName' + me.id).classList.remove('longProductName'); - l('productOwned' + me.id).textContent = me.amount ? me.amount : ''; - l('productPrice' + me.id).textContent = Beautify(Math.round(price)); - l('productPriceMult' + me.id).textContent = (Game.buyBulk > 1) ? ('x' + Game.buyBulk + ' ') : ''; - l('productLevel' + me.id).textContent = 'lvl ' + Beautify(me.level); - if (Game.isMinigameReady(me) && Game.ascensionMode != 1) { - l('productMinigameButton' + me.id).style.display = 'block'; - if (!me.onMinigame) l('productMinigameButton' + me.id).textContent = loc("View %1", me.minigameName); - else l('productMinigameButton' + me.id).textContent = loc("Close %1", me.minigameName); - } - else l('productMinigameButton' + me.id).style.display = 'none'; - if (Game.isMinigameReady(me) && Game.ascensionMode != 1 && me.minigame.dragonBoostTooltip && Game.hasAura('Supreme Intellect')) { - l('productDragonBoost' + me.id).style.display = 'block'; - } - else l('productDragonBoost' + me.id).style.display = 'none'; - } - this.muted = false; - this.mute = function (val) { - if (this.id == 0) return false; - this.muted = val; - if (val) { l('productMute' + this.id).classList.add('on'); l('row' + this.id).classList.add('muted'); l('mutedProduct' + this.id).style.display = 'inline-block'; } - else { l('productMute' + this.id).classList.remove('on'); l('row' + this.id).classList.remove('muted'); l('mutedProduct' + this.id).style.display = 'none'; } - }; - - this.draw = function () { }; - - var str = ''; - if (this.id != 0) str += '
'; - str += '
'; - str += '
'; - str += '
'; - if (this.id != 0) str += '
' + loc("Mute") + '
(' + loc("Minimize this building") + ')
', 'this') + ' onclick="Game.ObjectsById[' + this.id + '].mute(1);PlaySound(Game.ObjectsById[' + this.id + '].muted?\'snd/clickOff2.mp3\':\'snd/clickOn2.mp3\');" id="productMute' + this.id + '">' + loc("Mute") + '
'; - str += ''; - str += '
'; - if (this.id == 0) l('sectionLeftExtra').innerHTML = l('sectionLeftExtra').innerHTML + str; - else { - if (this.id == 19) { - str += ''; - str += '' + loc("Customize") + ''; - } - str += ''; - str += '
'; - str += ''; - l('rows').innerHTML = l('rows').innerHTML + str; - - //building canvas - this.pics = []; - - this.toResize = true; - this.redraw = function () { - var me = this; - me.pics = []; - } - this.draw = function () { - if (this.amount <= 0) return false; - if (this.toResize) { - this.canvas.width = this.canvas.clientWidth; - this.canvas.height = this.canvas.clientHeight; - this.toResize = false; - } - var ctx = this.ctx; - //clear - //ctx.clearRect(0,0,this.canvas.width,this.canvas.height); - ctx.globalAlpha = 1; - - //pic : a loaded picture or a function returning a loaded picture - //bg : a loaded picture or a function returning a loaded picture - tiled as the background, 128x128 - //xV : the pictures will have a random horizontal shift by this many pixels - //yV : the pictures will have a random vertical shift by this many pixels - //w : how many pixels between each picture (or row of pictures) - //x : horizontal offset - //y : vertical offset (+32) - //rows : if >1, arrange the pictures in rows containing this many pictures - //frames : if present, slice the pic in [frames] horizontal slices and pick one at random - - var pic = this.art.pic; - if (this.id == 19) pic = 'canvasAdd'; - var bg = this.art.bg; - var xV = this.art.xV || 0; - var yV = this.art.yV || 0; - var w = this.art.w || 48; - var h = this.art.h || 48; - var offX = this.art.x || 0; - var offY = this.art.y || 0; - var rows = this.art.rows || 1; - var frames = this.art.frames || 1; - - if (typeof (bg) == 'string') ctx.fillPattern(Pic(this.art.bg), 0, 0, this.canvas.width, this.canvas.height, 128, 128); - else bg(this, ctx); - /* - ctx.globalAlpha=0.5; - if (typeof(bg)=='string')//test - { - ctx.fillPattern(Pic(this.art.bg),-128+Game.T%128,0,this.canvas.width+128,this.canvas.height,128,128); - ctx.fillPattern(Pic(this.art.bg),-128+Math.floor(Game.T/2)%128,-128+Math.floor(Game.T/2)%128,this.canvas.width+128,this.canvas.height+128,128,128); - } - ctx.globalAlpha=1; - */ - var maxI = Math.floor(this.canvas.width / (w / rows) + 1); - var iT = Math.min(this.amount, maxI); - var i = this.pics.length; - - - var x = 0; - var y = 0; - var added = 0; - if (i != iT) { - //for (var iter=0;iter<3;iter++) - //{ - var prevFrame = 0; - while (i < iT) - //if (i1) frame=Math.floor(Math.random()*frames); - if (frames > 1) { frame = prevFrame + Math.floor(Math.random() * (frames - 1) + 1); frame = frame % frames; } - prevFrame = frame; - this.pics.push({ x: Math.floor(x), y: Math.floor(y), z: y, pic: usedPic, id: i, frame: frame }); - i++; - added++; - } - while (i > iT) - //else if (i>iT) - { - this.pics.sort(Game.sortSpritesById); - this.pics.pop(); - i--; - added--; - } - //} - this.pics.sort(Game.sortSprites); - } - - var len = this.pics.length; - - if (this.mouseOn) { - var selected = -1; - if (this.name == 'Grandma') { - var marginW = -18; - var marginH = -10; - for (var i = 0; i < len; i++) { - var pic = this.pics[i]; - if (this.mousePos[0] >= pic.x - marginW && this.mousePos[0] < pic.x + 64 + marginW && this.mousePos[1] >= pic.y - marginH && this.mousePos[1] < pic.y + 64 + marginH) selected = i; - if (selected == i && pic.pic == 'elfGrandma.png' && Game.mouseDown) Game.Win('Baby it\'s old outside'); - } - if (Game.prefs.customGrandmas && Game.customGrandmaNames.length > 0) { - var str = loc("Names in white were submitted by our supporters on Patreon."); - ctx.globalAlpha = 0.75; - ctx.fillStyle = '#000'; - ctx.font = '9px Merriweather'; - ctx.textAlign = 'left'; - ctx.fillRect(0, 0, ctx.measureText(str).width + 4, 12); - ctx.globalAlpha = 1; - ctx.fillStyle = 'rgba(255,255,255,0.7)'; - ctx.fillText(str, 2, 8); - if (EN) { - ctx.fillStyle = 'rgba(255,255,255,1)'; - ctx.fillText('white', 2 + ctx.measureText('Names in ').width, 8); - } - } - } - else if (this.name == 'You') { - var marginW = -16; - var marginH = 64; - for (var i = 0; i < len; i++) { - var pic = this.pics[i]; - if (this.mousePos[0] >= pic.x - marginW && this.mousePos[0] < pic.x + 64 + marginW && this.mousePos[1] >= pic.y - marginH && this.mousePos[1] < pic.y + 64 + marginH) selected = i; - } - } - } - - Math.seedrandom(); - - for (var i = 0; i < len; i++) { - var pic = this.pics[i]; - var sprite = pic.pic == 'canvasAdd' ? this.canvasAdd : Pic(pic.pic); - //we need to generalize this system at some point - if (selected == i && this.name == 'Grandma') { - ctx.font = '14px Merriweather'; - ctx.textAlign = 'center'; - Math.seedrandom(Game.seed + ' ' + pic.id/*+' '+pic.id*/);//(Game.seed+' '+pic.id+' '+pic.x+' '+pic.y); - var years = ((Date.now() - new Date(2013, 7, 8)) / (1000 * 60 * 60 * 24 * 365)) + Math.random();//the grandmas age with the game - var name = choose(Game.grandmaNames); - var custom = false; - if (Game.prefs.customGrandmas && Game.customGrandmaNames.length > 0 && Math.random() < 0.2) { name = choose(Game.customGrandmaNames); custom = true; } - var text = loc("%1, age %2", [name, Beautify(Math.floor(70 + Math.random() * 30 + years + this.level))]); - var width = ctx.measureText(text).width + 12; - var x = Math.max(0, Math.min(pic.x + 32 - width / 2 + Math.random() * 32 - 16, this.canvas.width - width)); - var y = 4 + Math.random() * 8 - 4; - Math.seedrandom(); - ctx.fillStyle = '#000'; - ctx.strokeStyle = '#000'; - ctx.lineWidth = 8; - ctx.globalAlpha = 0.75; - ctx.beginPath(); - ctx.moveTo(pic.x + 32, pic.y + 32); - ctx.lineTo(Math.floor(x + width / 2), Math.floor(y + 20)); - ctx.stroke(); - ctx.fillRect(Math.floor(x), Math.floor(y), Math.floor(width), 24); - ctx.globalAlpha = 1; - if (custom) ctx.fillStyle = '#fff'; - else ctx.fillStyle = 'rgba(255,255,255,0.7)'; - ctx.fillText(text, Math.floor(x + width / 2), Math.floor(y + 16)); - - ctx.drawImage(sprite, Math.floor(pic.x + Math.random() * 4 - 2), Math.floor(pic.y + Math.random() * 4 - 2)); - } - //else if (1) ctx.drawImage(sprite,0,0,sprite.width,sprite.height,pic.x,pic.y,sprite.width,sprite.height); - else if (pic.frame != -1) ctx.drawImage(sprite, (sprite.width / frames) * pic.frame, 0, sprite.width / frames, sprite.height, pic.x, pic.y, (sprite.width / frames), sprite.height); - else ctx.drawImage(sprite, pic.x, pic.y); - - if (selected == i && this.name == 'You') { - ctx.drawImage(Pic('youLight.png'), pic.x + 11, 0); - - Math.seedrandom(Game.seed + ' cloneTitle'); - var cloneTitle = Math.floor(Math.random() * 3); - Math.seedrandom(Game.seed + ' clone ' + pic.id); - ctx.font = '9px Merriweather'; - ctx.textAlign = 'center'; - var text = loc("Clone") + ' #' + Math.floor(Math.random() * 500 + pic.id * 500 + 1); - if (EN) { - text = [ - text, - Game.bakeryName + ' ' + romanize(pic.id + 2) + (Math.random() < 0.05 ? choose([', Jr.', ', Esq.', ', Etc.', ', Cont\'d', ', and so forth']) : ''), - choose([choose(['Lil\' $', 'Mini-$', '$ ' + (pic.id + 2), 'Attempt ' + (pic.id + 1), 'Experiment ' + (pic.id + 1), 'Not $', '$, again', '$, the sequel', '$ ' + (pic.id + 2) + ' Electric Boogaloo', 'Also $', '$ (remixed)', 'The Other $', '$, The Next Generation', '$, part ' + romanize(pic.id + 2), 'Revenge of $', 'The Return of $', '$ reborn', '$ in the flesh']), '$ "' + choose(['The Menace', 'The Artisan', 'The Relative', 'The Twin', 'The Specialist', 'The Officer', 'The Snitch', 'The Simpleton', 'The Genius', 'The Conformist', 'The Mistake', 'The Accident', 'Lab-grown', 'Vat Kid', 'Photocopy', 'Cloney', 'Ditto', 'Accounted For', 'Twitchy', 'Wacky', 'Zen', 'Rinse & Repeat', 'Spitting Image', 'Passing Resemblance', 'Nickname', 'Make It So', 'Deja-vu', 'Cookie', 'Clicky', 'Orteil', 'But Better', 'Guess Who', 'Transplant Fodder', 'Furthermore', 'One More Thing', 'Liquid', 'Second Chance', 'Offspring', 'Mulligan', 'Spare Parts']) + '" McClone']).replace('$', Game.bakeryName), - ][cloneTitle]; - } - var width = ctx.measureText(text).width + 12; - var x = Math.max(0, Math.min(pic.x + 32 - width / 2, this.canvas.width - width)); - var y = 10; - ctx.fillStyle = '#000'; - ctx.fillText(text, Math.floor(x + width / 2), Math.floor(y) + 1); - ctx.fillStyle = '#fff'; - ctx.fillText(text, Math.floor(x + width / 2), Math.floor(y)); - } - } - - /* - var picX=this.id; - var picY=12; - var w=1; - var h=1; - var w=Math.abs(Math.cos(Game.T*0.2+this.id*2-0.3))*0.2+0.8; - var h=Math.abs(Math.sin(Game.T*0.2+this.id*2))*0.3+0.7; - var x=64+Math.cos(Game.T*0.19+this.id*2)*8-24*w; - var y=128-Math.abs(Math.pow(Math.sin(Game.T*0.2+this.id*2),5)*16)-48*h; - ctx.drawImage(Pic('icons.png'),picX*48,picY*48,48,48,Math.floor(x),Math.floor(y),48*w,48*h); - */ - } - } - - Game.last = this; - Game.Objects[this.name] = this; - Game.ObjectsById.push(this); - Game.ObjectsN++; - return this; - } - - Game.DrawBuildings = function ()//draw building displays with canvas - { - if (Game.drawT % 3 == 0) { - for (var i in Game.Objects) { - var me = Game.Objects[i]; - if (me.id > 0 && !me.onMinigame && !me.muted) me.draw(); - else me.pics = []; - } - } - } - - Game.sortSprites = function (a, b) { - if (a.z > b.z) return 1; - else if (a.z < b.z) return -1; - else return 0; - } - Game.sortSpritesById = function (a, b) { - if (a.id > b.id) return 1; - else if (a.id < b.id) return -1; - else return 0; - } - - Game.modifyBuildingPrice = function (building, price) { - if (Game.Has('Season savings')) price *= 0.99; - if (Game.Has('Santa\'s dominion')) price *= 0.99; - if (Game.Has('Faberge egg')) price *= 0.99; - if (Game.Has('Divine discount')) price *= 0.99; - if (Game.Has('Fortune #100')) price *= 0.99; - //if (Game.hasAura('Fierce Hoarder')) price*=0.98; - price *= 1 - Game.auraMult('Fierce Hoarder') * 0.02; - if (Game.hasBuff('Everything must go')) price *= 0.95; - if (Game.hasBuff('Crafty pixies')) price *= 0.98; - if (Game.hasBuff('Nasty goblins')) price *= 1.02; - if (building.fortune && Game.Has(building.fortune.name)) price *= 0.93; - price *= Game.eff('buildingCost'); - if (Game.hasGod) { - var godLvl = Game.hasGod('creation'); - if (godLvl == 1) price *= 0.93; - else if (godLvl == 2) price *= 0.95; - else if (godLvl == 3) price *= 0.98; - } - return price; - } - - Game.storeBulkButton = function (id) { - if (id == 0) Game.buyMode = 1; - else if (id == 1) Game.buyMode = -1; - else if (id == 2) Game.buyBulk = 1; - else if (id == 3) Game.buyBulk = 10; - else if (id == 4) Game.buyBulk = 100; - else if (id == 5) Game.buyBulk = -1; - - if (Game.buyMode == 1 && Game.buyBulk == -1) Game.buyBulk = 100; - - if (Game.buyMode == 1) l('storeBulkBuy').className = 'storePreButton storeBulkMode selected'; else l('storeBulkBuy').className = 'storePreButton storeBulkMode'; - if (Game.buyMode == -1) l('storeBulkSell').className = 'storePreButton storeBulkMode selected'; else l('storeBulkSell').className = 'storePreButton storeBulkMode'; - - if (Game.buyBulk == 1) l('storeBulk1').className = 'storePreButton storeBulkAmount selected'; else l('storeBulk1').className = 'storePreButton storeBulkAmount'; - if (Game.buyBulk == 10) l('storeBulk10').className = 'storePreButton storeBulkAmount selected'; else l('storeBulk10').className = 'storePreButton storeBulkAmount'; - if (Game.buyBulk == 100) l('storeBulk100').className = 'storePreButton storeBulkAmount selected'; else l('storeBulk100').className = 'storePreButton storeBulkAmount'; - if (Game.buyBulk == -1) l('storeBulkMax').className = 'storePreButton storeBulkAmount selected'; else l('storeBulkMax').className = 'storePreButton storeBulkAmount'; - - if (Game.buyMode == 1) { - l('storeBulkMax').style.visibility = 'hidden'; - l('products').className = 'storeSection'; - } - else { - l('storeBulkMax').style.visibility = 'visible'; - l('products').className = 'storeSection selling'; - } - - Game.storeToRefresh = 1; - if (id != -1) PlaySound('snd/tick.mp3'); - } - Game.BuildStore = function ()//create the DOM for the store's buildings - { - //if (typeof showAds!=='undefined') l('store').scrollTop=100; - - var str = ''; - str += '
' + loc("You can also press %1 to bulk-buy or sell %2 of a building at a time, or %3 for %4.", ['' + loc("Ctrl") + '', '10', '' + loc("Shift") + '', '100']) + '
' - , 'store') + - '>' + - '
' + loc("Buy") + '
' + - '
' + loc("Sell") + '
' + - '
1
' + - '
10
' + - '
100
' + - '
' + loc("all") + '
' + - ''; - for (var i in Game.Objects) { - var me = Game.Objects[i]; - str += (Game.prefs.screenreader ? '' : ''); - } - l('products').innerHTML = str; - - Game.storeBulkButton(-1); - - /*var SellAllPrompt=function(id) - { - return function(id){Game.Prompt('
Do you really want to sell your '+loc("%1 "+Game.ObjectsById[id].bsingle,LBeautify(Game.ObjectsById[id].amount))+'?
',[['Yes','Game.ObjectsById['+id+'].sell(-1);Game.ClosePrompt();'],['No','Game.ClosePrompt();']]);}(id); - }*/ - - for (var i in Game.Objects) { - var me = Game.Objects[i]; - me.l = l('product' + me.id); - - //these are a bit messy but ah well - if (!Game.touchEvents) { - AddEvent(me.l, 'click', function (what) { return function (e) { Game.ClickProduct(what); e.preventDefault(); }; }(me.id)); - } - else { - AddEvent(me.l, 'touchend', function (what) { return function (e) { Game.ClickProduct(what); e.preventDefault(); }; }(me.id)); - } - } - } - - Game.ClickProduct = function (what) { - Game.ObjectsById[what].buy(); - } - - Game.RefreshStore = function ()//refresh the store's buildings - { - for (var i in Game.Objects) { - Game.Objects[i].refresh(); - } - Game.storeToRefresh = 0; - } - - Game.ComputeCps = function (base, mult, bonus) { - if (!bonus) bonus = 0; - return ((base) * (Math.pow(2, mult)) + bonus); - } - - Game.isMinigameReady = function (me) { return (me.minigameUrl && me.minigameLoaded && me.level > 0); } - Game.scriptBindings = []; - Game.showedScriptLoadError = false; - Game.LoadMinigames = function ()//load scripts for each minigame - { - for (var i in Game.Objects) { - var me = Game.Objects[i]; - if (me.minigameUrl && me.level > 0 && !me.minigameLoaded && !me.minigameLoading && !l('minigameScript-' + me.id)) { - me.minigameLoading = true; - //we're only loading the minigame scripts that aren't loaded yet and which have enough building level - //we call this function on building level up and on load - //console.log('Loading script '+me.minigameUrl+'...'); - setTimeout(function (me) { - return function () { - var script = document.createElement('script'); - script.id = 'minigameScript-' + me.id; - Game.scriptBindings['minigameScript-' + me.id] = me; - script.setAttribute('src', me.minigameUrl + '?r=' + Game.version); - script.onload = function (me, script) { - return function () { - if (!me.minigameLoaded) Game.scriptLoaded(me, script); - } - }(me, 'minigameScript-' + me.id); - script.onerror = function (me, script) { - return function () { - me.minigameLoading = false; - if (!me.minigameLoaded && !Game.showedScriptLoadError) { - Game.showedScriptLoadError = true; - Game.Notify(loc("Error!"), 'Couldn\'t load minigames. Try reloading.'); - } - } - }(me, 'minigameScript-' + me.id); - document.head.appendChild(script); - } - }(me), 10); - } - } - } - Game.scriptLoaded = function (who, script) { - who.minigameLoading = false; - who.minigameLoaded = true; - who.refresh(); - who.minigame.launch(); - if (who.minigameSave) { who.minigame.reset(true); who.minigame.load(who.minigameSave); who.minigameSave = 0; } - } - - Game.magicCpS = function (what) { - /* - if (Game.Objects[what].amount>=250) - { - //this makes buildings give 1% more cookies for every building over 250. - //this turns out to be rather stupidly overpowered. - var n=Game.Objects[what].amount-250; - return 1+Math.pow(1.01,n); - } - else return 1; - */ - return 1; - } - - //define objects - new Game.Object('Cursor', 'cursor|cursors|clicked|[X] extra finger|[X] extra fingers', 'Autoclicks once every 10 seconds.', 0, 0, {}, 15, function (me) { - var add = 0; - if (Game.Has('Thousand fingers')) add += 0.1; - if (Game.Has('Million fingers')) add *= 5; - if (Game.Has('Billion fingers')) add *= 10; - if (Game.Has('Trillion fingers')) add *= 20; - if (Game.Has('Quadrillion fingers')) add *= 20; - if (Game.Has('Quintillion fingers')) add *= 20; - if (Game.Has('Sextillion fingers')) add *= 20; - if (Game.Has('Septillion fingers')) add *= 20; - if (Game.Has('Octillion fingers')) add *= 20; - if (Game.Has('Nonillion fingers')) add *= 20; - if (Game.Has('Decillion fingers')) add *= 20; - if (Game.Has('Undecillion fingers')) add *= 20; - if (Game.Has('Unshackled cursors')) add *= 25; - var mult = 1; - var num = 0; - for (var i in Game.Objects) { if (Game.Objects[i].name != 'Cursor') num += Game.Objects[i].amount; } - add = add * num; - mult *= Game.GetTieredCpsMult(me); - mult *= Game.magicCpS('Cursor'); - mult *= Game.eff('cursorCps'); - return Game.ComputeCps(0.1, Game.Has('Reinforced index finger') + Game.Has('Carpal tunnel prevention cream') + Game.Has('Ambidextrous'), add) * mult; - }, function () { - if (this.amount >= 1) Game.Unlock(['Reinforced index finger', 'Carpal tunnel prevention cream']); - if (this.amount >= 10) Game.Unlock('Ambidextrous'); - if (this.amount >= 25) Game.Unlock('Thousand fingers'); - if (this.amount >= 50) Game.Unlock('Million fingers'); - if (this.amount >= 100) Game.Unlock('Billion fingers'); - if (this.amount >= 150) Game.Unlock('Trillion fingers'); - if (this.amount >= 200) Game.Unlock('Quadrillion fingers'); - if (this.amount >= 250) Game.Unlock('Quintillion fingers'); - if (this.amount >= 300) Game.Unlock('Sextillion fingers'); - if (this.amount >= 350) Game.Unlock('Septillion fingers'); - if (this.amount >= 400) Game.Unlock('Octillion fingers'); - if (this.amount >= 450) Game.Unlock('Nonillion fingers'); - if (this.amount >= 500) Game.Unlock('Decillion fingers'); - if (this.amount >= 550) Game.Unlock('Undecillion fingers'); - - if (this.amount >= 1) Game.Win('Click'); if (this.amount >= 2) Game.Win('Double-click'); if (this.amount >= 50) Game.Win('Mouse wheel'); if (this.amount >= 100) Game.Win('Of Mice and Men'); if (this.amount >= 200) Game.Win('The Digital'); if (this.amount >= 300) Game.Win('Extreme polydactyly'); if (this.amount >= 400) Game.Win('Dr. T'); if (this.amount >= 500) Game.Win('Thumbs, phalanges, metacarpals'); if (this.amount >= 600) Game.Win('With her finger and her thumb'); if (this.amount >= 700) Game.Win('Gotta hand it to you'); if (this.amount >= 800) Game.Win('The devil\'s workshop'); if (this.amount >= 900) Game.Win('All on deck'); if (this.amount >= 1000) Game.Win('A round of applause'); - }); - - Game.SpecialGrandmaUnlock = 15; - new Game.Object('Grandma', 'grandma|grandmas|baked|Grandmas are [X] year older|Grandmas are [X] years older', 'A nice grandma to bake more cookies.', 1, 1, { - pic: function (i) { - var list = ['grandma']; - if (Game.Has('Farmer grandmas')) list.push('farmerGrandma'); - if (Game.Has('Worker grandmas')) list.push('workerGrandma'); - if (Game.Has('Miner grandmas')) list.push('minerGrandma'); - if (Game.Has('Cosmic grandmas')) list.push('cosmicGrandma'); - if (Game.Has('Transmuted grandmas')) list.push('transmutedGrandma'); - if (Game.Has('Altered grandmas')) list.push('alteredGrandma'); - if (Game.Has('Grandmas\' grandmas')) list.push('grandmasGrandma'); - if (Game.Has('Antigrandmas')) list.push('antiGrandma'); - if (Game.Has('Rainbow grandmas')) list.push('rainbowGrandma'); - if (Game.Has('Banker grandmas')) list.push('bankGrandma'); - if (Game.Has('Priestess grandmas')) list.push('templeGrandma'); - if (Game.Has('Witch grandmas')) list.push('witchGrandma'); - if (Game.Has('Lucky grandmas')) list.push('luckyGrandma'); - if (Game.Has('Metagrandmas')) list.push('metaGrandma'); - if (Game.Has('Script grannies')) list.push('scriptGrandma'); - if (Game.Has('Alternate grandmas')) list.push('alternateGrandma'); - if (Game.Has('Brainy grandmas')) list.push('brainyGrandma'); - if (Game.Has('Clone grandmas')) list.push('cloneGrandma'); - if (Game.season == 'christmas') list.push('elfGrandma'); - if (Game.season == 'easter') list.push('bunnyGrandma'); - return choose(list) + '.png'; - }, bg: 'grandmaBackground.png', xV: 8, yV: 8, w: 32, rows: 3, x: 0, y: 16 - }, 100, function (me) { - var mult = 1; - for (var i in Game.GrandmaSynergies) { - if (Game.Has(Game.GrandmaSynergies[i])) mult *= 2; - } - if (Game.Has('Bingo center/Research facility')) mult *= 4; - if (Game.Has('Ritual rolling pins')) mult *= 2; - if (Game.Has('Naughty list')) mult *= 2; - - if (Game.Has('Elderwort biscuits')) mult *= 1.02; - - mult *= Game.eff('grandmaCps'); - - if (Game.Has('Cat ladies')) { - for (var i = 0; i < Game.UpgradesByPool['kitten'].length; i++) { - if (Game.Has(Game.UpgradesByPool['kitten'][i].name)) mult *= 1.29; - } - } - - mult *= Game.GetTieredCpsMult(me); - - var add = 0; - if (Game.Has('One mind')) add += Game.Objects['Grandma'].amount * 0.02; - if (Game.Has('Communal brainsweep')) add += Game.Objects['Grandma'].amount * 0.02; - if (Game.Has('Elder Pact')) add += Game.Objects['Portal'].amount * 0.05; - - var num = 0; - for (var i in Game.Objects) { if (Game.Objects[i].name != 'Grandma') num += Game.Objects[i].amount; } - //if (Game.hasAura('Elder Battalion')) mult*=1+0.01*num; - mult *= 1 + Game.auraMult('Elder Battalion') * 0.01 * num; - - mult *= Game.magicCpS(me.name); - - return (me.baseCps + add) * mult; - }, function () { - Game.UnlockTiered(this); - }); - Game.last.sellFunction = function () { - Game.Win('Just wrong'); - if (this.amount == 0) { - Game.Lock('Elder Pledge'); - Game.CollectWrinklers(); - Game.pledgeT = 0; - } - }; - Game.last.iconFunc = function (type) { - var grandmaIcons = [[0, 1], [0, 2], [1, 2], [2, 2]]; - if (type == 'off') return [0, 1]; - if (Game.prefs.notScary && Game.elderWrath > 0) return [3, 2]; - return grandmaIcons[Game.elderWrath]; - }; - - - new Game.Object('Farm', 'farm|farms|harvested|[X] more acre|[X] more acres', 'Grows cookie plants from cookie seeds.', 3, 2, { base: 'farm', xV: 8, yV: 8, w: 64, rows: 2, x: 0, y: 16 }, 500, function (me) { - var mult = 1; - mult *= Game.GetTieredCpsMult(me); - mult *= Game.magicCpS(me.name); - return me.baseCps * mult; - }, function () { - Game.UnlockTiered(this); - if (this.amount >= Game.SpecialGrandmaUnlock && Game.Objects['Grandma'].amount > 0) Game.Unlock(this.grandma.name); - }); - Game.last.minigameUrl = 'minigameGarden.js'; - Game.last.minigameName = loc("Garden"); - - new Game.Object('Mine', 'mine|mines|mined|[X] mile deeper|[X] miles deeper', 'Mines out cookie dough and chocolate chips.', 4, 3, { base: 'mine', xV: 16, yV: 16, w: 64, rows: 2, x: 0, y: 24 }, 10000, function (me) { - var mult = 1; - mult *= Game.GetTieredCpsMult(me); - mult *= Game.magicCpS(me.name); - return me.baseCps * mult; - }, function () { - Game.UnlockTiered(this); - if (this.amount >= Game.SpecialGrandmaUnlock && Game.Objects['Grandma'].amount > 0) Game.Unlock(this.grandma.name); - }); - - new Game.Object('Factory', 'factory|factories|mass-produced|[X] additional patent|[X] additional patents', 'Produces large quantities of cookies.', 5, 4, { base: 'factory', xV: 8, yV: 0, w: 64, rows: 1, x: 0, y: -22 }, 3000, function (me) { - var mult = 1; - mult *= Game.GetTieredCpsMult(me); - mult *= Game.magicCpS(me.name); - return me.baseCps * mult; - }, function () { - Game.UnlockTiered(this); - if (this.amount >= Game.SpecialGrandmaUnlock && Game.Objects['Grandma'].amount > 0) Game.Unlock(this.grandma.name); - }); - //Game.last.minigameUrl='minigameDungeon.js';//not yet - Game.last.minigameName = loc("Dungeon"); - - new Game.Object('Bank', 'bank|banks|banked|Interest rates [X]% better|Interest rates [X]% better', 'Generates cookies from interest.', 6, 15, { base: 'bank', xV: 8, yV: 4, w: 56, rows: 1, x: 0, y: 13 }, 0, function (me) { - var mult = 1; - mult *= Game.GetTieredCpsMult(me); - mult *= Game.magicCpS(me.name); - return me.baseCps * mult; - }, function () { - Game.UnlockTiered(this); - if (this.amount >= Game.SpecialGrandmaUnlock && Game.Objects['Grandma'].amount > 0) Game.Unlock(this.grandma.name); - }); - Game.last.minigameUrl = 'minigameMarket.js'; - Game.last.minigameName = loc("Stock Market"); - - new Game.Object('Temple', 'temple|temples|discovered|[X] sacred artifact retrieved|[X] sacred artifacts retrieved', 'Full of precious, ancient chocolate.', 7, 16, { base: 'temple', xV: 8, yV: 4, w: 72, rows: 2, x: 0, y: -5 }, 0, function (me) { - var mult = 1; - mult *= Game.GetTieredCpsMult(me); - mult *= Game.magicCpS(me.name); - return me.baseCps * mult; - }, function () { - Game.UnlockTiered(this); - if (this.amount >= Game.SpecialGrandmaUnlock && Game.Objects['Grandma'].amount > 0) Game.Unlock(this.grandma.name); - }); - Game.last.minigameUrl = 'minigamePantheon.js'; - Game.last.minigameName = loc("Pantheon"); - - new Game.Object('Wizard tower', 'wizard tower|wizard towers|summoned|Incantations have [X] more syllable|Incantations have [X] more syllables', 'Summons cookies with magic spells.', 8, 17, { base: 'wizardtower', xV: 16, yV: 16, w: 48, rows: 2, x: 0, y: 20 }, 0, function (me) { - var mult = 1; - mult *= Game.GetTieredCpsMult(me); - mult *= Game.magicCpS(me.name); - return me.baseCps * mult; - }, function () { - Game.UnlockTiered(this); - if (this.amount >= Game.SpecialGrandmaUnlock && Game.Objects['Grandma'].amount > 0) Game.Unlock(this.grandma.name); - }); - Game.last.displayName = 'Wizard tower';//shrink - Game.last.minigameUrl = 'minigameGrimoire.js'; - Game.last.minigameName = loc("Grimoire"); - - new Game.Object('Shipment', 'shipment|shipments|shipped|[X] galaxy fully explored|[X] galaxies fully explored', 'Brings in fresh cookies from the cookie planet.', 9, 5, { base: 'shipment', xV: 16, yV: 16, w: 64, rows: 1, x: 0, y: 0 }, 40000, function (me) { - var mult = 1; - mult *= Game.GetTieredCpsMult(me); - mult *= Game.magicCpS(me.name); - return me.baseCps * mult; - }, function () { - Game.UnlockTiered(this); - if (this.amount >= Game.SpecialGrandmaUnlock && Game.Objects['Grandma'].amount > 0) Game.Unlock(this.grandma.name); - }); - - new Game.Object('Alchemy lab', 'alchemy lab|alchemy labs|transmuted|[X] primordial element mastered|[X] primordial elements mastered', 'Turns gold into cookies!', 10, 6, { base: 'alchemylab', xV: 16, yV: 16, w: 64, rows: 2, x: 0, y: 16 }, 200000, function (me) { - var mult = 1; - mult *= Game.GetTieredCpsMult(me); - mult *= Game.magicCpS(me.name); - return me.baseCps * mult; - }, function () { - Game.UnlockTiered(this); - if (this.amount >= Game.SpecialGrandmaUnlock && Game.Objects['Grandma'].amount > 0) Game.Unlock(this.grandma.name); - }); - Game.last.displayName = 'Alchemy lab';//shrink - - new Game.Object('Portal', 'portal|portals|retrieved|[X] dimension enslaved|[X] dimensions enslaved', 'Opens a door to the Cookieverse.', 11, 7, { base: 'portal', xV: 32, yV: 32, w: 64, rows: 2, x: 0, y: 0 }, 1666666, function (me) { - var mult = 1; - mult *= Game.GetTieredCpsMult(me); - mult *= Game.magicCpS(me.name); - return me.baseCps * mult; - }, function () { - Game.UnlockTiered(this); - if (this.amount >= Game.SpecialGrandmaUnlock && Game.Objects['Grandma'].amount > 0) Game.Unlock(this.grandma.name); - }); - - new Game.Object('Time machine', 'time machine|time machines|recovered|[X] century secured|[X] centuries secured', 'Brings cookies from the past, before they were even eaten.', 12, 8, { base: 'timemachine', xV: 32, yV: 32, w: 64, rows: 1, x: 0, y: 0 }, 123456789, function (me) { - var mult = 1; - mult *= Game.GetTieredCpsMult(me); - mult *= Game.magicCpS(me.name); - return me.baseCps * mult; - }, function () { - Game.UnlockTiered(this); - if (this.amount >= Game.SpecialGrandmaUnlock && Game.Objects['Grandma'].amount > 0) Game.Unlock(this.grandma.name); - }); - Game.last.displayName = 'Time machine';//shrink - - new Game.Object('Antimatter condenser', 'antimatter condenser|antimatter condensers|condensed|[X] extra quark flavor|[X] extra quark flavors', 'Condenses the antimatter in the universe into cookies.', 13, 13, { base: 'antimattercondenser', xV: 0, yV: 64, w: 64, rows: 1, x: 0, y: 0 }, 3999999999, function (me) { - var mult = 1; - mult *= Game.GetTieredCpsMult(me); - mult *= Game.magicCpS(me.name); - return me.baseCps * mult; - }, function () { - Game.UnlockTiered(this); - if (this.amount >= Game.SpecialGrandmaUnlock && Game.Objects['Grandma'].amount > 0) Game.Unlock(this.grandma.name); - }); - Game.last.displayName = 'Antim. condenser';//shrink - - new Game.Object('Prism', 'prism|prisms|converted|[X] new color discovered|[X] new colors discovered', 'Converts light itself into cookies.', 14, 14, { base: 'prism', xV: 16, yV: 4, w: 64, rows: 1, x: 0, y: 20 }, 75000000000, function (me) { - var mult = 1; - mult *= Game.GetTieredCpsMult(me); - mult *= Game.magicCpS(me.name); - return me.baseCps * mult; - }, function () { - Game.UnlockTiered(this); - if (this.amount >= Game.SpecialGrandmaUnlock && Game.Objects['Grandma'].amount > 0) Game.Unlock(this.grandma.name); - }); - - new Game.Object('Chancemaker', 'chancemaker|chancemakers|spontaneously generated|Chancemakers are powered by [X]-leaf clovers|Chancemakers are powered by [X]-leaf clovers', 'Generates cookies out of thin air through sheer luck.', 15, 19, { base: 'chancemaker', xV: 8, yV: 64, w: 64, rows: 1, x: 0, y: 0, rows: 2 }, 77777777777, function (me) { - var mult = 1; - mult *= Game.GetTieredCpsMult(me); - mult *= Game.magicCpS(me.name); - return me.baseCps * mult; - }, function () { - Game.UnlockTiered(this); - if (this.amount >= Game.SpecialGrandmaUnlock && Game.Objects['Grandma'].amount > 0) Game.Unlock(this.grandma.name); - }); - Game.last.displayName = 'Chancemaker';//shrink - - new Game.Object('Fractal engine', 'fractal engine|fractal engines|made from cookies|[X] iteration deep|[X] iterations deep', 'Turns cookies into even more cookies.', 16, 20, { base: 'fractalEngine', xV: 8, yV: 64, w: 64, rows: 1, x: 0, y: 0 }, 12345678987654321, function (me) { - var mult = 1; - mult *= Game.GetTieredCpsMult(me); - mult *= Game.magicCpS(me.name); - return me.baseCps * mult; - }, function () { - Game.UnlockTiered(this); - if (this.amount >= Game.SpecialGrandmaUnlock && Game.Objects['Grandma'].amount > 0) Game.Unlock(this.grandma.name); - }); - Game.last.displayName = 'Fractal engine';//shrink - - new Game.Object('Javascript console', 'javascript console|javascript consoles|programmed|Equipped with [X] external library|Equipped with [X] external libraries', 'Creates cookies from the very code this game was written in.', 17, 32, { base: 'javascriptconsole', xV: 8, yV: 64, w: 14, rows: 1, x: 8, y: -32, frames: 2 }, 12345678987654321, function (me) { - var mult = 1; - mult *= Game.GetTieredCpsMult(me); - mult *= Game.magicCpS(me.name); - return me.baseCps * mult; - }, function () { - Game.UnlockTiered(this); - if (this.amount >= Game.SpecialGrandmaUnlock && Game.Objects['Grandma'].amount > 0) Game.Unlock(this.grandma.name); - }); - Game.last.displayName = 'Javascript console';//shrink - - new Game.Object('Idleverse', 'idleverse|idleverses|hijacked|[X] manifold|[X] manifolds', 'There\'s been countless other idle universes running alongside our own. You\'ve finally found a way to hijack their production and convert whatever they\'ve been making into cookies!', 18, 33, { base: 'idleverse', xV: 8, yV: 96, w: 48, rows: 2, x: 0, y: 0, frames: 4 }, 12345678987654321, function (me) { - var mult = 1; - mult *= Game.GetTieredCpsMult(me); - mult *= Game.magicCpS(me.name); - return me.baseCps * mult; - }, function () { - Game.UnlockTiered(this); - if (this.amount >= Game.SpecialGrandmaUnlock && Game.Objects['Grandma'].amount > 0) Game.Unlock(this.grandma.name); - }); - - new Game.Object('Cortex baker', 'cortex baker|cortex bakers|imagined|[X] extra IQ point|[X] extra IQ points', 'These artificial brains the size of planets are capable of simply dreaming up cookies into existence. Time and space are inconsequential. Reality is arbitrary.', 19, 34, { base: 'cortex', xV: 8, yV: 96, w: 48, rows: 1, x: 0, y: 0, frames: 4 }, 12345678987654321, function (me) { - var mult = 1; - mult *= Game.GetTieredCpsMult(me); - mult *= Game.magicCpS(me.name); - return me.baseCps * mult; - }, function () { - Game.UnlockTiered(this); - if (this.amount >= Game.SpecialGrandmaUnlock && Game.Objects['Grandma'].amount > 0) Game.Unlock(this.grandma.name); - }); - - new Game.Object('You', 'You|You|cloned|[X] optimized gene|[X] optimized genes', 'You, alone, are the reason behind all these cookies. You figure if there were more of you... maybe you could make even more.', 20, 35, { pic: 'you.png', bg: 'youBackground.png', xV: 0, yV: 0, w: 64, rows: 2, x: 0, y: 0 }, 12345678987654321, function (me) { - var mult = 1; - mult *= Game.GetTieredCpsMult(me); - mult *= Game.magicCpS(me.name); - return me.baseCps * mult; - }, function () { - Game.UnlockTiered(this); - if (this.amount >= Game.SpecialGrandmaUnlock && Game.Objects['Grandma'].amount > 0) Game.Unlock(this.grandma.name); - }); - Game.YouCustomizer = {}; - Game.YouCustomizer.render = function () { - var me = Game.Objects['You']; - var ctx = me.ctxAdd; - var img = 'you.png'; - var imgAddons = 'youAddons.png?v=' + Game.version; - - Game.Loader.waitForLoad([img, imgAddons], function () { - //accessing pixel data not allowed locally; set img and imgAddons to base64-encoded image strings for testing - if (!App && (Game.local)) { - ctx.drawImage(Pic(img), 0, 0); - } - else { - ctx.drawImage(Pic(img), 0, 0); - var canvasAddon = document.createElement('canvas'); - canvasAddon.width = 32; - canvasAddon.height = 32; - ctxAddon = canvasAddon.getContext('2d'); - var canvasCols = document.createElement('canvas'); - var colsN = 64; - canvasCols.width = 8; - canvasCols.height = colsN; - var ctxCols = canvasCols.getContext('2d'); - ctxCols.drawImage(Pic(imgAddons), 0, 0, 8, colsN, 0, 0, 8, colsN); - var imgDataCols = ctxCols.getImageData(0, 0, 8, colsN); - var dataCols = imgDataCols.data; - var cols = []; - for (var i = 0; i < colsN; i++) { - cols[i] = [ - [dataCols[4 + i * 32], dataCols[4 + i * 32 + 1], dataCols[4 + i * 32 + 2]], - [dataCols[4 + i * 32 + 4], dataCols[4 + i * 32 + 1 + 4], dataCols[4 + i * 32 + 2 + 4]], - [dataCols[4 + i * 32 + 8], dataCols[4 + i * 32 + 1 + 8], dataCols[4 + i * 32 + 2 + 8]], - ]; - } - - var imgData = ctx.getImageData(0, 0, 64, 64); - var data = imgData.data; - - var colSkinFull = [[32, 14, 10], [180, 80, 54], [208, 144, 101], [225, 192, 150]]; - var colSkin = []; for (var colI = 0; colI < colSkinFull.length; colI++) { colSkin[colI] = colSkinFull[colI][0] * 1000000 + colSkinFull[colI][1] * 1000 + colSkinFull[colI][2]; } - var colHairFull = [[32, 14, 10], [82, 55, 53], [100, 83, 80], [116, 97, 89]]; - var colHair = []; for (var colI = 0; colI < colHairFull.length; colI++) { colHair[colI] = colHairFull[colI][0] * 1000000 + colHairFull[colI][1] * 1000 + colHairFull[colI][2]; } - var shade1 = 0 * 1000000 + 118 * 1000 + 206; - var shade2 = 0 * 1000000 + 71 * 1000 + 125; - - //apply addon canvases to main canvas, handling shading on skin and hair where necessary - var addonGenes = ['face', 'head', 'hair', 'acc1', 'acc2']; - for (var geneI = 0; geneI < addonGenes.length; geneI++) { - var addonTile = Game.YouCustomizer.getGeneValue(addonGenes[geneI]); - ctxAddon.clearRect(0, 0, 32, 32); - ctxAddon.drawImage(Pic(imgAddons), 8 + addonTile[0] * 32, addonTile[1] * 32, 32, 32, 0, 0, 32, 32); - - var imgDataAddon = ctxAddon.getImageData(0, 0, 32, 32); - var dataAddon = imgDataAddon.data; - var x = 0; var y = 0; - for (i = 0; i < dataAddon.length; i += 4) { - var r = dataAddon[i]; var g = dataAddon[i + 1]; var b = dataAddon[i + 2]; var a = dataAddon[i + 3]; - - var off = ((x + 16) + y * 64) * 4; - if (a != 0) { - var ro = data[off]; - var go = data[off + 1]; - var bo = data[off + 2]; - var col = r * 1000000 + g * 1000 + b; - var shade = col == shade2 ? 2 : col == shade1 ? 1 : 0; - var indShadeAddon = colSkin.indexOf(r * 1000000 + g * 1000 + b); - var indShadeOr = colSkin.indexOf(ro * 1000000 + go * 1000 + bo); - var typeOr = 0; - if (indShadeOr > 0) typeOr = 1;//is skin - else if (indShadeOr == -1) { - indShadeOr = colHair.indexOf(ro * 1000000 + go * 1000 + bo); - if (indShadeOr > 0) typeOr = 2;//is hair - } - - if (shade > 0 && indShadeOr > 0)//painting shadow on hair or skin - {//light blue: shade one stage; dark blue: shade 2 stages - var colOut = (typeOr == 1 ? colSkinFull : typeOr == 2 ? colHairFull : 0)[Math.max(0, indShadeOr - shade)]; - data[off] = colOut[0]; data[off + 1] = colOut[1]; data[off + 2] = colOut[2]; data[off + 3] = a; - } - else if (shade == 0) { data[off] = r; data[off + 1] = g; data[off + 2] = b; data[off + 3] = a; } - } - x++; - if (x >= 32) { x = 0; y++; } - } - } - - //recolor hair and skin on final image - var skinCol = Game.YouCustomizer.getGeneValue('skinCol'); - var hairCol = Game.YouCustomizer.getGeneValue('hairCol'); - for (i = 0; i < data.length; i += 4) { - var r = data[i]; var g = data[i + 1]; var b = data[i + 2]; var a = data[i + 3]; - if (a != 0) { - var indSkin = colSkin.indexOf(r * 1000000 + g * 1000 + b); - if (indSkin > 0) { - var col = cols[skinCol][indSkin - 1]; - data[i] = col[0]; data[i + 1] = col[1]; data[i + 2] = col[2]; - } - else { - var indHair = colHair.indexOf(r * 1000000 + g * 1000 + b); - if (indHair > 0) { - var col = cols[hairCol][indHair - 1]; - data[i] = col[0]; data[i + 1] = col[1]; data[i + 2] = col[2]; - } - } - } - } - ctx.putImageData(imgData, 0, 0); - } - }); - } - Game.YouCustomizer.genes = [ - { - id: 'hair', isList: true, def: 0, choices: [ - [0, 0], [1, 0], [2, 0], [3, 0], [4, 0], [2, 1], [3, 1], [4, 1], [4, 2], [5, 3], [8, 2], [7, 1], [5, 5], [4, 5], [10, 0], [9, 1], [9, 2], - ] - }, - { id: 'hairCol', isList: true, def: 1, choices: [20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37] }, - { id: 'skinCol', isList: true, def: 0, choices: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] }, - { - id: 'head', isList: true, def: 0, choices: [ - [0, 0], [1, 1], [0, 1], [4, 3], [10, 3], - ] - }, - { - id: 'face', isList: true, def: 0, choices: [ - [3, 5], [0, 0], [0, 2], [1, 2], [2, 2], [3, 2], [0, 3], [1, 3], [2, 3], [3, 3], - ] - }, - { - id: 'acc1', isList: true, def: 0, choices: [ - [0, 0], [5, 1], [5, 0], [5, 2], [0, 4], [1, 4], [2, 4], [6, 4], [8, 5], [3, 4], [7, 5], [6, 0], [6, 1], [4, 4], [5, 4], [2, 5], [7, 4], [0, 5], [1, 5], [6, 5], [6, 2], [6, 3], [7, 0], [7, 2], [7, 3], [8, 1], [8, 3], [8, 4], [9, 3], [9, 0], [10, 1], [10, 2], [9, 4], [9, 5], [10, 4], [10, 5], - ] - }, - { - id: 'acc2', isList: true, def: 0, choices: [ - [] - ] - }, - ]; - Game.YouCustomizer.save = function () { - return Game.YouCustomizer.currentGenes.join(','); - } - Game.YouCustomizer.load = function (genes, noReset) { - if (!noReset) Game.YouCustomizer.resetGenes(); - if (genes) { - genes = genes.split(','); - for (var i = 0; i < Game.YouCustomizer.genes.length; i++) { - //leave a gene as-is with "-" - if (typeof genes[i] !== 'undefined' && genes[i] != '-') { - gene = Game.YouCustomizer.genes[i]; - var val = parseInt(genes[i]); - if (isNaN(val)) continue; - if (gene.isList && (val < 0 || val >= gene.choices.length)) continue; - else if (!gene.isList && (val < gene.choices[0] || val > gene.choices[1])) continue; - else Game.YouCustomizer.currentGenes[i] = val; - } - } - return true; - } - else return false; - } - Game.YouCustomizer.genesById = {}; for (var i = 0; i < Game.YouCustomizer.genes.length; i++) { Game.YouCustomizer.genes[i].n = i; Game.YouCustomizer.genesById[Game.YouCustomizer.genes[i].id] = Game.YouCustomizer.genes[i]; } - Game.YouCustomizer.genesById['acc2'].choices = Game.YouCustomizer.genesById['acc1'].choices; - Game.YouCustomizer.currentGenes = []; - Game.YouCustomizer.getGeneValue = function (id) { - var gene = Game.YouCustomizer.genesById[id]; - if (gene.isList) return gene.choices[Game.YouCustomizer.currentGenes[gene.n]]; - else return Game.YouCustomizer.currentGenes[gene.n]; - }; - Game.YouCustomizer.resetGenes = function () { for (var i = 0; i < Game.YouCustomizer.genes.length; i++) { Game.YouCustomizer.currentGenes[i] = Game.YouCustomizer.genes[i].def; } } - Game.YouCustomizer.resetGenes(); - Game.YouCustomizer.offsetGene = function (gene, off) { - gene = Game.YouCustomizer.genesById[gene]; - Game.YouCustomizer.currentGenes[gene.n] += off; - if (gene.isList) { - if (Game.YouCustomizer.currentGenes[gene.n] >= gene.choices.length) Game.YouCustomizer.currentGenes[gene.n] = 0; - else if (Game.YouCustomizer.currentGenes[gene.n] < 0) Game.YouCustomizer.currentGenes[gene.n] = gene.choices.length - 1; - if (l('customizerSelect-N-' + gene.id)) l('customizerSelect-N-' + gene.id).innerHTML = Game.YouCustomizer.currentGenes[gene.n] + 1; - } - else { - if (Game.YouCustomizer.currentGenes[gene.n] > gene.choices[1]) Game.YouCustomizer.currentGenes[gene.n] = gene.choices[0]; - else if (Game.YouCustomizer.currentGenes[gene.n] < gene.choices[0]) Game.YouCustomizer.currentGenes[gene.n] = gene.choices[1]; - if (l('customizerSelect-N-' + gene.id)) l('customizerSelect-N-' + gene.id).innerHTML = Game.YouCustomizer.currentGenes[gene.n] + 1 - gene.choices[0]; - } - if (off != 0) { - PlaySound('snd/press.mp3'); - - Game.YouCustomizer.render(); - Game.YouCustomizer.renderPortrait(); - - if ( - Game.YouCustomizer.currentGenes[0] == 9 - && (Game.YouCustomizer.currentGenes[1] == 1 || Game.YouCustomizer.currentGenes[1] == 6) - && (Game.YouCustomizer.currentGenes[3] == 2 || Game.YouCustomizer.currentGenes[3] == 3) - && (Game.YouCustomizer.currentGenes[5] == 2 || Game.YouCustomizer.currentGenes[5] == 3 || Game.YouCustomizer.currentGenes[6] == 2 || Game.YouCustomizer.currentGenes[6] == 3) - && (Game.YouCustomizer.currentGenes[5] == 0 || Game.YouCustomizer.currentGenes[6] == 0) - ) Game.Win('In her likeness'); - - } - } - Game.YouCustomizer.randomize = function () { - for (var i = 0; i < Game.YouCustomizer.genes.length; i++) { - var gene = Game.YouCustomizer.genes[i]; - Game.YouCustomizer.currentGenes[i] = Math.floor(Math.random() * gene.choices.length); - - if (gene.isList) { - if (l('customizerSelect-N-' + gene.id)) l('customizerSelect-N-' + gene.id).innerHTML = Game.YouCustomizer.currentGenes[gene.n] + 1; - } - else { - if (l('customizerSelect-N-' + gene.id)) l('customizerSelect-N-' + gene.id).innerHTML = Game.YouCustomizer.currentGenes[gene.n] + 1 - gene.choices[0]; - } - } - Game.YouCustomizer.render(); - Game.YouCustomizer.renderPortrait(); - } - Game.YouCustomizer.renderPortrait = function () { - if (!l('youCustomizerPreview')) return false; - var ctx = l('youCustomizerPreview').getContext('2d'); - ctx.clearRect(0, 0, 32, 32) - ctx.drawImage(Game.Objects['You'].canvasAdd, -16, 0); - ctx = l('youCustomizerPreviewBlur').getContext('2d'); - ctx.globalCompositeOperation = 'source-over'; - ctx.clearRect(0, 0, 32, 32) - ctx.drawImage(Game.Objects['You'].canvasAdd, -16, 0); - ctx.globalCompositeOperation = 'destination-out'; ctx.beginPath(); ctx.arc(16, 16, 11, 0, 2 * Math.PI); ctx.fill(); - } - Game.YouCustomizer.export = function () { - Game.Prompt('

' + loc("Export") + '

', [[loc("Done"), 'Game.YouCustomizer.prompt();']]); - l('textareaPrompt').focus(); l('textareaPrompt').select(); - } - Game.YouCustomizer.import = function (def) { - //1,14,6,0,6,29,30 - //2,13,1,0,6,10,9 - Game.Prompt('

' + loc("Import") + '

', [[loc("Load"), 'if (l(\'textareaPrompt\').value.length==0){return false;}if (Game.YouCustomizer.load(l(\'textareaPrompt\').value,true)){Game.YouCustomizer.prompt();}else{l(\'importError\').innerHTML=\'(\'+loc("Error!")+\')\';}'], [loc("Nevermind"), 'Game.YouCustomizer.prompt();']]); - l('textareaPrompt').focus(); - } - Game.YouCustomizer.prompt = function () { - var makeCustomizerSelector = function (gene, text) { - gene = Game.YouCustomizer.genesById[gene]; - return '
<' + text + '
' + (gene.isList ? (Game.YouCustomizer.currentGenes[gene.n] + 1) : (Game.YouCustomizer.currentGenes[gene.n] + 1 - gene.choices[0])) + '
>
'; - } - Game.Prompt('

' + loc("Customize your clones") + '

' + loc("Sprung from your very DNA. Shape them in your image!") + '
' + - '' + loc("Import") + '' + - '' + loc("Export") + '' + - '
' + - '
' + - '' + loc("Random") + '
' + - makeCustomizerSelector('hair', loc("Hair")) + - makeCustomizerSelector('hairCol', loc("Hair color")) + - makeCustomizerSelector('skinCol', loc("Skin color")) + - makeCustomizerSelector('head', loc("Head shape")) + - makeCustomizerSelector('face', loc("Face")) + - makeCustomizerSelector('acc1', loc("Extra") + '-A') + - makeCustomizerSelector('acc2', loc("Extra") + '-B') + - '
' + - '', [loc("Done")]); - Game.YouCustomizer.render(); - Game.YouCustomizer.renderPortrait(); - } - - Game.foolObjects = { - 'Unknown': { name: 'Investment', desc: 'You\'re not sure what this does, you just know it means profit.', icon: 0 }, - 'Cursor': { name: 'Rolling pin', desc: 'Essential in flattening dough. The first step in cookie-making.', icon: 0 }, - 'Grandma': { name: 'Oven', desc: 'A crucial element of baking cookies.', icon: 1 }, - 'Farm': { name: 'Kitchen', desc: 'The more kitchens, the more cookies your employees can produce.', icon: 2 }, - 'Mine': { name: 'Secret recipe', desc: 'These give you the edge you need to outsell those pesky competitors.', icon: 3 }, - 'Factory': { name: 'Factory', desc: 'Mass production is the future of baking. Seize the day, and synergize!', icon: 4 }, - 'Bank': { name: 'Investor', desc: 'Business folks with a nose for profit, ready to finance your venture as long as there\'s money to be made.', icon: 5 }, - 'Temple': { name: 'Like', desc: 'Your social media page is going viral! Amassing likes is the key to a lasting online presence and juicy advertising deals.', icon: 9 }, - 'Wizard tower': { name: 'Meme', desc: 'Cookie memes are all the rage! With just the right amount of social media astroturfing, your brand image will be all over the cyberspace.', icon: 6 }, - 'Shipment': { name: 'Supermarket', desc: 'A gigantic cookie emporium - your very own retail chain.', icon: 7 }, - 'Alchemy lab': { name: 'Stock share', desc: 'You\'re officially on the stock market, and everyone wants a piece!', icon: 8 }, - 'Portal': { name: 'TV show', desc: 'Your cookies have their own sitcom! Hilarious baking hijinks set to the cheesiest laughtrack.', icon: 10 }, - 'Time machine': { name: 'Theme park', desc: 'Cookie theme parks, full of mascots and roller-coasters. Build one, build a hundred!', icon: 11 }, - 'Antimatter condenser': { name: 'Cookiecoin', desc: 'A virtual currency, already replacing regular money in some small countries.', icon: 12 }, - 'Prism': { name: 'Corporate country', desc: 'You\'ve made it to the top, and you can now buy entire nations to further your corporate greed. Godspeed.', icon: 13 }, - 'Chancemaker': { name: 'Privatized planet', desc: 'Actually, you know what\'s cool? A whole planet dedicated to producing, advertising, selling, and consuming your cookies.', icon: 15 }, - 'Fractal engine': { name: 'Senate seat', desc: 'Only through political dominion can you truly alter this world to create a brighter, more cookie-friendly future.', icon: 16 }, - 'Javascript console': { name: 'Doctrine', desc: 'Taking many forms -religion, culture, philosophy- a doctrine may, when handled properly, cause a lasting impact on civilizations, reshaping minds and people and ensuring all future generations share a singular goal - the production, and acquisition, of more cookies.', icon: 17 }, - 'Idleverse': { name: 'Lateral expansions', desc: 'Sometimes the best way to keep going up is sideways. Diversify your ventures through non-cookie investments.', icon: 18 }, - 'Cortex baker': { name: 'Think tank', desc: 'There\'s only so many ways you can bring in more profit. Or is there? Hire the most brilliant experts in the known universe and let them scrape their brains for you!', icon: 19 }, - 'You': { name: 'You', desc: 'Your business is as great as it\'s gonna get. The only real way to improve it anymore is to improve yourself - and become the best Chief Executive Officer this world has ever seen.', icon: 20 }, - }; - - if (true)//if (!EN) - { - Game.foolObjects['Unknown'].name = loc("Investment"); - Game.foolObjects['Unknown'].desc = loc("You're not sure what this does, you just know it means profit."); - for (var i in Game.Objects) { - Game.foolObjects[i].name = loc(FindLocStringByPart(Game.Objects[i].name + ' business name')) || Game.foolObjects[i].name; - Game.foolObjects[i].desc = loc(FindLocStringByPart(Game.Objects[i].name + ' business quote')) || Game.foolObjects[i].desc; - } - } - - //build store - Game.BuildStore(); - - //build master bar - var str = ''; - str += '
'; - str += '
'; - l('buildingsMaster').innerHTML = str; - - //build object displays - var muteStr = '
' + loc("Muted:") + '
'; - for (var i in Game.Objects) { - var me = Game.Objects[i]; - - if (locStrings[me.name + ' (short)']) me.displayName = loc(me.name + ' (short)'); - - if (me.id > 0) { - me.canvas = l('rowCanvas' + me.id); - me.ctx = me.canvas.getContext('2d', { alpha: false }); - if (me.id == 19) { - me.canvasAdd = l('rowCanvasAdd' + me.id); - me.ctxAdd = me.canvasAdd.getContext('2d'); - Game.YouCustomizer.render(); - } - me.pics = []; - var icon = [0 * 64, me.icon * 64]; - muteStr += ''; - //muteStr+='')+'>
'; - - AddEvent(me.canvas, 'mouseover', function (me) { return function () { me.mouseOn = true; } }(me)); - AddEvent(me.canvas, 'mouseout', function (me) { return function () { me.mouseOn = false; } }(me)); - AddEvent(me.canvas, 'mousemove', function (me) { return function (e) { var box = this.getBounds(); me.mousePos[0] = e.pageX - box.left; me.mousePos[1] = e.pageY - box.top; } }(me)); - } - } - Game.mutedBuildingTooltip = function (id) { - return function () { - var me = Game.ObjectsById[id]; - return '
' + (EN ? ('' + cap(me.plural) + (me.level > 0 ? ' (lvl. ' + me.level + ')' : '') + '
Click to unmute ' + me.plural + '
(display this building)') : ('' + loc("Level %1 %2", [Beautify(me.level), me.plural]) + '
' + loc("Click to unmute"))) + '
'; - } - } - l('buildingsMute').innerHTML = muteStr; - - /*===================================================================================== - UPGRADES - =======================================================================================*/ - Game.upgradesToRebuild = 1; - Game.Upgrades = {}; - Game.UpgradesById = {}; - Game.UpgradesN = 0; - Game.UpgradesInStore = []; - Game.UpgradesOwned = 0; - Game.Upgrade = function (name, desc, price, icon, buyFunction) { - this.id = Game.UpgradesN; - this.name = name; - this.dname = this.name; - this.desc = desc; - this.baseDesc = this.desc; - this.basePrice = price; - this.priceLumps = 0;//note : doesn't do much on its own, you still need to handle the buying yourself - this.icon = icon; - this.iconFunction = 0; - this.buyFunction = buyFunction; - /*this.unlockFunction=unlockFunction; - this.unlocked=(this.unlockFunction?0:1);*/ - this.unlocked = 0; - this.bought = 0; - this.order = this.id; - if (order) this.order = order + this.id * 0.001; - this.pool = '';//can be '', cookie, toggle, debug, prestige, prestigeDecor, tech, or unused - if (pool) this.pool = pool; - this.power = 0; - if (power) this.power = power; - this.vanilla = Game.vanilla; - this.unlockAt = 0; - this.techUnlock = []; - this.parents = []; - this.type = 'upgrade'; - this.tier = 0; - this.buildingTie = 0;//of what building is this a tiered upgrade of ? - - Game.last = this; - Game.Upgrades[this.name] = this; - Game.UpgradesById[this.id] = this; - Game.UpgradesN++; - return this; - } - Game.Upgrade.prototype.getType = function () { return 'Upgrade'; } - - Game.Upgrade.prototype.getPrice = function () { - var price = this.basePrice; - if (this.priceFunc) price = this.priceFunc(this); - if (price == 0) return 0; - if (this.pool != 'prestige') { - if (Game.Has('Toy workshop')) price *= 0.95; - if (Game.Has('Five-finger discount')) price *= Math.pow(0.99, Game.Objects['Cursor'].amount / 100); - if (Game.Has('Santa\'s dominion')) price *= 0.98; - if (Game.Has('Faberge egg')) price *= 0.99; - if (Game.Has('Divine sales')) price *= 0.99; - if (Game.Has('Fortune #100')) price *= 0.99; - if (this.kitten && Game.Has('Kitten wages')) price *= 0.9; - if (Game.hasBuff('Haggler\'s luck')) price *= 0.98; - if (Game.hasBuff('Haggler\'s misery')) price *= 1.02; - //if (Game.hasAura('Master of the Armory')) price*=0.98; - price *= 1 - Game.auraMult('Master of the Armory') * 0.02; - price *= Game.eff('upgradeCost'); - if (this.pool == 'cookie' && Game.Has('Divine bakeries')) price /= 5; - } - return Math.ceil(price); - } - - Game.Upgrade.prototype.canBuy = function () { - if (this.canBuyFunc) return this.canBuyFunc(); - if (Game.cookies >= this.getPrice()) return true; else return false; - } - - Game.storeBuyAll = function () { - if (!Game.Has('Inspired checklist')) return false; - for (var i in Game.UpgradesInStore) { - var me = Game.UpgradesInStore[i]; - if (!me.isVaulted() && me.pool != 'toggle' && me.pool != 'tech') me.buy(1); - } - } - - Game.vault = []; - Game.Upgrade.prototype.isVaulted = function () { - if (Game.vault.indexOf(this.id) != -1) return true; else return false; - } - Game.Upgrade.prototype.vault = function () { - if (!this.isVaulted()) Game.vault.push(this.id); - } - Game.Upgrade.prototype.unvault = function () { - if (this.isVaulted()) Game.vault.splice(Game.vault.indexOf(this.id), 1); - } - - Game.Upgrade.prototype.click = function (e) { - if ((e && e.shiftKey) || Game.keys[16]) { - if (this.pool == 'toggle' || this.pool == 'tech') { } - else if (Game.Has('Inspired checklist')) { - if (this.isVaulted()) this.unvault(); - else this.vault(); - Game.upgradesToRebuild = 1; - PlaySound('snd/tick.mp3'); - } - } - else this.buy(); - } - - - Game.Upgrade.prototype.buy = function (bypass) { - var success = 0; - var cancelPurchase = 0; - if (this.clickFunction && !bypass) cancelPurchase = !this.clickFunction(); - if (!cancelPurchase) { - if (this.choicesFunction) { - if (Game.choiceSelectorOn == this.id) { - l('toggleBox').style.display = 'none'; - l('toggleBox').innerHTML = ''; - Game.choiceSelectorOn = -1; - PlaySound('snd/tickOff.mp3'); - } - else { - Game.choiceSelectorOn = this.id; - var choices = this.choicesFunction(); - var str = ''; - str += '
x
'; - str += '

' + this.dname + '

' + - '
'; - if (typeof choices === 'string') { - str += choices; - } - else if (choices.length > 0) { - var selected = 0; - for (var i in choices) { if (choices[i].selected) selected = i; } - Game.choiceSelectorChoices = choices;//this is a really dumb way of doing this i am so sorry - Game.choiceSelectorSelected = selected; - str += '

' + choices[selected].name + '

' + - '
'; - - for (var i in choices) { - choices[i].id = i; - choices[i].order = choices[i].order || 0; - } - - var sortMap = function (a, b) { - if (a.order > b.order) return 1; - else if (a.order < b.order) return -1; - else return 0; - } - choices.sort(sortMap); - - for (var i = 0; i < choices.length; i++) { - if (!choices[i]) continue; - var icon = choices[i].icon; - var id = choices[i].id; - if (choices[i].div) str += '
'; - str += '
'; - } - } - l('toggleBox').innerHTML = str; - l('toggleBox').style.display = 'block'; - l('toggleBox').focus(); - Game.tooltip.hide(); - PlaySound('snd/tick.mp3'); - success = 1; - } - } - else if (this.pool != 'prestige') { - var price = this.getPrice(); - if (this.canBuy() && !this.bought) { - Game.Spend(price); - this.bought = 1; - if (this.buyFunction) this.buyFunction(); - if (this.toggleInto) { - Game.Lock(this.toggleInto); - Game.Unlock(this.toggleInto); - } - Game.upgradesToRebuild = 1; - Game.recalculateGains = 1; - if (Game.CountsAsUpgradeOwned(this.pool)) Game.UpgradesOwned++; - Game.setOnCrate(0); - Game.tooltip.hide(); - PlaySound('snd/buy' + choose([1, 2, 3, 4]) + '.mp3', 0.75); - success = 1; - } - } - else { - var price = this.getPrice(); - if (Game.heavenlyChips >= price && !this.bought) { - Game.heavenlyChips -= price; - Game.heavenlyChipsSpent += price; - this.unlocked = 1; - this.bought = 1; - if (this.buyFunction) this.buyFunction(); - Game.BuildAscendTree(this); - PlaySound('snd/buy' + choose([1, 2, 3, 4]) + '.mp3', 0.75); - PlaySound('snd/shimmerClick.mp3'); - //PlaySound('snd/buyHeavenly.mp3'); - success = 1; - } - } - } - if (this.bought && this.activateFunction) this.activateFunction(); - return success; - } - Game.Upgrade.prototype.earn = function ()//just win the upgrades without spending anything - { - this.unlocked = 1; - this.bought = 1; - if (this.buyFunction) this.buyFunction(); - Game.upgradesToRebuild = 1; - Game.recalculateGains = 1; - if (Game.CountsAsUpgradeOwned(this.pool)) Game.UpgradesOwned++; - } - Game.Upgrade.prototype.unearn = function ()//remove the upgrade, but keep it unlocked - { - this.bought = 0; - Game.upgradesToRebuild = 1; - Game.recalculateGains = 1; - if (Game.CountsAsUpgradeOwned(this.pool)) Game.UpgradesOwned--; - } - Game.Upgrade.prototype.unlock = function () { - this.unlocked = 1; - Game.upgradesToRebuild = 1; - } - Game.Upgrade.prototype.lose = function () { - this.unlocked = 0; - this.bought = 0; - Game.upgradesToRebuild = 1; - Game.recalculateGains = 1; - if (Game.CountsAsUpgradeOwned(this.pool)) Game.UpgradesOwned--; - } - Game.Upgrade.prototype.toggle = function ()//cheating only - { - if (!this.bought) { - this.bought = 1; - if (this.buyFunction) this.buyFunction(); - Game.upgradesToRebuild = 1; - Game.recalculateGains = 1; - if (Game.CountsAsUpgradeOwned(this.pool)) Game.UpgradesOwned++; - PlaySound('snd/buy' + choose([1, 2, 3, 4]) + '.mp3', 0.75); - if (this.pool == 'prestige' || this.pool == 'debug') PlaySound('snd/shimmerClick.mp3'); - } - else { - this.bought = 0; - Game.upgradesToRebuild = 1; - Game.recalculateGains = 1; - if (Game.CountsAsUpgradeOwned(this.pool)) Game.UpgradesOwned--; - PlaySound('snd/sell' + choose([1, 2, 3, 4]) + '.mp3', 0.75); - if (this.pool == 'prestige' || this.pool == 'debug') PlaySound('snd/shimmerClick.mp3'); - } - if (Game.onMenu == 'stats') Game.UpdateMenu(); - } - - Game.CountsAsUpgradeOwned = function (pool) { - if (pool == '' || pool == 'cookie' || pool == 'tech') return true; else return false; - } - - /*AddEvent(l('toggleBox'),'blur',function()//if we click outside of the selector, close it - { - //this has a couple problems, such as when clicking on the upgrade - this toggles it off and back on instantly - l('toggleBox').style.display='none'; - l('toggleBox').innerHTML=''; - Game.choiceSelectorOn=-1; - } - );*/ - - Game.RequiresConfirmation = function (upgrade, prompt) { - upgrade.clickFunction = function () { Game.Prompt('' + prompt, [[loc("Yes"), 'Game.UpgradesById[' + upgrade.id + '].buy(1);Game.ClosePrompt();'], loc("No")]); return false; }; - } - - Game.Unlock = function (what) { - if (typeof what === 'string') { - if (Game.Upgrades[what]) { - if (Game.Upgrades[what].unlocked == 0) { - Game.Upgrades[what].unlocked = 1; - Game.upgradesToRebuild = 1; - Game.recalculateGains = 1; - /*Game.Notify('Upgrade unlocked','
'+Game.Upgrades[what].dname+'
',Game.Upgrades[what].icon,6);*/ - } - } - } - else { for (var i in what) { Game.Unlock(what[i]); } } - } - Game.Lock = function (what) { - if (typeof what === 'string') { - if (Game.Upgrades[what]) { - Game.Upgrades[what].unlocked = 0; - Game.upgradesToRebuild = 1; - if (Game.Upgrades[what].bought == 1 && Game.CountsAsUpgradeOwned(Game.Upgrades[what].pool)) Game.UpgradesOwned--; - Game.Upgrades[what].bought = 0; - Game.recalculateGains = 1; - } - } - else { for (var i in what) { Game.Lock(what[i]); } } - } - - Game.Has = function (what) { - var it = Game.Upgrades[what]; - if (it && Game.ascensionMode == 1 && (it.pool == 'prestige' || it.tier == 'fortune')) return 0; - return (it ? it.bought : 0); - } - Game.HasUnlocked = function (what) { - return (Game.Upgrades[what] ? Game.Upgrades[what].unlocked : 0); - } - - - Game.RebuildUpgrades = function ()//recalculate the upgrades you can buy - { - Game.upgradesToRebuild = 0; - var list = []; - for (var i in Game.Upgrades) { - var me = Game.Upgrades[i]; - if (!me.bought && me.pool != 'debug' && me.pool != 'prestige' && me.pool != 'prestigeDecor' && (Game.ascensionMode != 1 || (!me.lasting && me.tier != 'fortune'))) { - if (me.unlocked) list.push(me); - } - else if (me.displayFuncWhenOwned && me.bought) list.push(me); - } - var sortMap = function (a, b) { - var ap = a.pool == 'toggle' ? a.order : a.getPrice(); - var bp = b.pool == 'toggle' ? b.order : b.getPrice(); - if (ap > bp) return 1; - else if (ap < bp) return -1; - else return 0; - } - list.sort(sortMap); - - Game.UpgradesInStore = []; - for (var i in list) { - Game.UpgradesInStore.push(list[i]); - } - var storeStr = ''; - var toggleStr = ''; - var techStr = ''; - var vaultStr = ''; - - if (Game.Has('Inspired checklist')) { - storeStr += '
' + loc("Will instantly purchase every upgrade you can afford, starting from the cheapest one.
Upgrades in the vault will not be auto-purchased.
You may place an upgrade into the vault by Shift-clicking on it.") + '
' - , 'store') + - '>' + - '
' + loc("Buy all upgrades") + '
' + - ''; - l('upgrades').classList.add('hasMenu'); - } - else l('upgrades').classList.remove('hasMenu'); - - for (var i in Game.UpgradesInStore) { - //if (!Game.UpgradesInStore[i]) break; - var me = Game.UpgradesInStore[i]; - var str = Game.crate(me, 'store', 'Game.UpgradesById[' + me.id + '].click(event);', 'upgrade' + i); - - /*var str='
'+Beautify(Math.round(me.getPrice()))+'
'+(me.pool=='toggle'?'[Togglable]':'[Upgrade]')+'
'+me.dname+'
'+me.desc+'
' - ,'store')+' '+Game.clickStr+'="Game.UpgradesById['+me.id+'].buy();" id="upgrade'+i+'" style="'+writeIcon(me.icon)+'">';*/ - if (me.pool == 'toggle') toggleStr += str; else if (me.pool == 'tech') techStr += str; else { - if (me.isVaulted() && Game.Has('Inspired checklist')) vaultStr += str; else storeStr += str; - } - } - - l('upgrades').innerHTML = storeStr; - l('toggleUpgrades').innerHTML = toggleStr; - if (toggleStr == '') l('toggleUpgrades').style.display = 'none'; else l('toggleUpgrades').style.display = 'block'; - l('techUpgrades').innerHTML = techStr; - if (techStr == '') l('techUpgrades').style.display = 'none'; else l('techUpgrades').style.display = 'block'; - l('vaultUpgrades').innerHTML = vaultStr; - if (vaultStr == '') l('vaultUpgrades').style.display = 'none'; else l('vaultUpgrades').style.display = 'block'; - } - - Game.UnlockAt = [];//this contains an array of every upgrade with a cookie requirement in the form of {cookies:(amount of cookies earned required),name:(name of upgrade or achievement to unlock)} (and possibly require:(name of upgrade of achievement to own)) - //note : the cookie will not be added to the list if it contains locked:1 (use for seasonal cookies and such) - - var strCookieProductionMultiplierPlus = loc("Cookie production multiplier +%1%.", '[x]'); - var getStrCookieProductionMultiplierPlus = function (x) { return strCookieProductionMultiplierPlus.replace('[x]', x); } - var getStrThousandFingersGain = function (x) { return loc("Multiplies the gain from %1 by %2.", [getUpgradeName("Thousand fingers"), x]); } - var strKittenDesc = loc("You gain more CpS the more milk you have."); - var getStrClickingGains = function (x) { return loc("Clicking gains +%1% of your CpS.", x); } - - Game.NewUpgradeCookie = function (obj) { - var upgrade = new Game.Upgrade(obj.name, getStrCookieProductionMultiplierPlus(Beautify((typeof (obj.power) === 'function' ? obj.power(obj) : obj.power), 1)) + (EN ? '' + obj.desc + '' : ''), obj.price, obj.icon); - upgrade.power = obj.power; - upgrade.pool = 'cookie'; - var toPush = { cookies: obj.price / 20, name: obj.name }; - if (obj.require) toPush.require = obj.require; - if (obj.season) toPush.season = obj.season; - if (!obj.locked) Game.UnlockAt.push(toPush); - return upgrade; - } - - //tiered upgrades system - //each building has several upgrade tiers - //all upgrades in the same tier have the same color, unlock threshold and price multiplier - Game.Tiers = { - 1: { name: 'Plain', unlock: 1, achievUnlock: 1, iconRow: 0, color: '#ccb3ac', price: 10 }, - 2: { name: 'Berrylium', unlock: 5, achievUnlock: 50, iconRow: 1, color: '#ff89e7', price: 50 }, - 3: { name: 'Blueberrylium', unlock: 25, achievUnlock: 100, iconRow: 2, color: '#00deff', price: 500 }, - 4: { name: 'Chalcedhoney', unlock: 50, achievUnlock: 150, iconRow: 13, color: '#ffcc2f', price: 50000 }, - 5: { name: 'Buttergold', unlock: 100, achievUnlock: 200, iconRow: 14, color: '#e9d673', price: 5000000 }, - 6: { name: 'Sugarmuck', unlock: 150, achievUnlock: 250, iconRow: 15, color: '#a8bf91', price: 500000000 }, - 7: { name: 'Jetmint', unlock: 200, achievUnlock: 300, iconRow: 16, color: '#60ff50', price: 500000000000 }, - 8: { name: 'Cherrysilver', unlock: 250, achievUnlock: 350, iconRow: 17, color: '#f01700', price: 500000000000000 }, - 9: { name: 'Hazelrald', unlock: 300, achievUnlock: 400, iconRow: 18, color: '#9ab834', price: 500000000000000000 }, - 10: { name: 'Mooncandy', unlock: 350, achievUnlock: 450, iconRow: 19, color: '#7e7ab9', price: 500000000000000000000 }, - 11: { name: 'Astrofudge', unlock: 400, achievUnlock: 500, iconRow: 28, color: '#9a3316', price: 5000000000000000000000000 }, - 12: { name: 'Alabascream', unlock: 450, achievUnlock: 550, iconRow: 30, color: '#c1a88c', price: 50000000000000000000000000000 }, - 13: { name: 'Iridyum', unlock: 500, achievUnlock: 600, iconRow: 31, color: '#adb1b3', price: 500000000000000000000000000000000 }, - 14: { name: 'Glucosmium', unlock: 550, achievUnlock: 650, iconRow: 34, color: '#ff89e7', price: 5000000000000000000000000000000000000 }, - 15: { name: 'Glimmeringue', unlock: 600, achievUnlock: 700, iconRow: 36, color: '#fffaa8', price: 50000000000000000000000000000000000000000 }, - 'synergy1': { name: 'Synergy I', unlock: 15, iconRow: 20, color: '#008595', special: 1, req: 'Synergies Vol. I', price: 200000 }, - 'synergy2': { name: 'Synergy II', unlock: 75, iconRow: 29, color: '#008595', special: 1, req: 'Synergies Vol. II', price: 200000000000 }, - 'fortune': { name: 'Fortune', unlock: -1, iconRow: 32, color: '#9ab834', special: 1, price: 77777777777777777777777777777 }, - }; - for (var i in Game.Tiers) { Game.Tiers[i].upgrades = []; } - Game.GetIcon = function (type, tier) { - var col = 0; - if (type == 'Kitten') col = 18; else col = Game.Objects[type].iconColumn; - return [col, Game.Tiers[tier].iconRow]; - } - Game.SetTier = function (building, tier) { - if (!Game.Objects[building]) console.log('Warning: No building named', building); - Game.last.tier = tier; - Game.last.buildingTie = Game.Objects[building]; - if (Game.last.type == 'achievement') Game.Objects[building].tieredAchievs[tier] = Game.last; - else Game.Objects[building].tieredUpgrades[tier] = Game.last; - } - Game.MakeTiered = function (upgrade, tier, col) { - upgrade.tier = tier; - if (typeof col !== 'undefined') upgrade.icon = [col, Game.Tiers[tier].iconRow]; - } - Game.TieredUpgrade = function (name, desc, building, tier) { - if (tier == 'fortune' && building) desc = loc("%1 are %2% more efficient and %3% cheaper.", [cap(Game.Objects[building].plural), 7, 7]) + desc; - else desc = loc("%1 are twice as efficient.", cap(Game.Objects[building].plural)) + desc; - var upgrade = new Game.Upgrade(name, desc, Game.Objects[building].basePrice * Game.Tiers[tier].price, Game.GetIcon(building, tier)); - if (tier != 'fortune') { - upgrade.descFunc = function () { - return ((Game.ascensionMode != 1 && Game.Has(this.buildingTie1.unshackleUpgrade) && Game.Has(Game.Tiers[this.tier].unshackleUpgrade)) ? ('
' + loc("Unshackled! +%1% extra production.", Math.round((this.buildingTie.id == 1 ? 0.5 : (20 - this.buildingTie.id) * 0.1) * 100)) + '
') : '') + this.ddesc; - }; - } - - Game.SetTier(building, tier); - if (!upgrade.buildingTie1 && building) upgrade.buildingTie1 = Game.Objects[building]; - if (tier == 'fortune' && building) Game.Objects[building].fortune = upgrade; - return upgrade; - } - Game.SynergyUpgrade = function (name, desc, building1, building2, tier) { - /* - creates a new upgrade that : - -unlocks when you have tier.unlock of building1 and building2 - -is priced at (building1.price*10+building2.price*1)*tier.price (formerly : Math.sqrt(building1.price*building2.price)*tier.price) - -gives +(0.1*building1)% cps to building2 and +(5*building2)% cps to building1 - -if building2 is below building1 in worth, swap them - */ - //if (Game.Objects[building1].basePrice>Game.Objects[building2].basePrice) {var temp=building2;building2=building1;building1=temp;} - var b1 = Game.Objects[building1]; - var b2 = Game.Objects[building2]; - if (b1.basePrice > b2.basePrice) { b1 = Game.Objects[building2]; b2 = Game.Objects[building1]; }//swap - - desc = - loc("%1 gain +%2% CpS per %3.", [cap(b1.plural), 5, b2.single]) + '
' + - loc("%1 gain +%2% CpS per %3.", [cap(b2.plural), 0.1, b1.single]) + - (EN ? desc : ''); - var upgrade = new Game.Upgrade(name, desc, (b1.basePrice * 10 + b2.basePrice * 1) * Game.Tiers[tier].price, Game.GetIcon(building1, tier));//Math.sqrt(b1.basePrice*b2.basePrice)*Game.Tiers[tier].price - upgrade.tier = tier; - upgrade.buildingTie1 = b1; - upgrade.buildingTie2 = b2; - upgrade.priceFunc = function () { return (this.buildingTie1.basePrice * 10 + this.buildingTie2.basePrice * 1) * Game.Tiers[this.tier].price * (Game.Has('Chimera') ? 0.98 : 1); }; - Game.Objects[building1].synergies.push(upgrade); - Game.Objects[building2].synergies.push(upgrade); - //Game.SetTier(building1,tier); - return upgrade; - } - Game.GetTieredCpsMult = function (me) { - var mult = 1; - for (var i in me.tieredUpgrades) { - if (!Game.Tiers[me.tieredUpgrades[i].tier].special && Game.Has(me.tieredUpgrades[i].name)) { - var tierMult = 2; - //unshackled - if (Game.ascensionMode != 1 && Game.Has(me.unshackleUpgrade) && Game.Has(Game.Tiers[me.tieredUpgrades[i].tier].unshackleUpgrade)) tierMult += me.id == 1 ? 0.5 : (20 - me.id) * 0.1; - mult *= tierMult; - } - } - for (var i in me.synergies) { - var syn = me.synergies[i]; - if (Game.Has(syn.name)) { - if (syn.buildingTie1.name == me.name) mult *= (1 + 0.05 * syn.buildingTie2.amount); - else if (syn.buildingTie2.name == me.name) mult *= (1 + 0.001 * syn.buildingTie1.amount); - } - } - if (me.fortune && Game.Has(me.fortune.name)) mult *= 1.07; - if (me.grandma && Game.Has(me.grandma.name)) mult *= (1 + Game.Objects['Grandma'].amount * 0.01 * (1 / (me.id - 1))); - return mult; - } - Game.UnlockTiered = function (me) { - for (var i in me.tieredUpgrades) { if (Game.Tiers[me.tieredUpgrades[i].tier].unlock != -1 && me.amount >= Game.Tiers[me.tieredUpgrades[i].tier].unlock) Game.Unlock(me.tieredUpgrades[i].name); } - for (var i in me.tieredAchievs) { if (me.amount >= Game.Tiers[me.tieredAchievs[i].tier].achievUnlock) Game.Win(me.tieredAchievs[i].name); } - for (var i in me.synergies) { var syn = me.synergies[i]; if (Game.Has(Game.Tiers[syn.tier].req) && syn.buildingTie1.amount >= Game.Tiers[syn.tier].unlock && syn.buildingTie2.amount >= Game.Tiers[syn.tier].unlock) Game.Unlock(syn.name); } - } - - - - var pool = ''; - var power = 0; - - //define upgrades - //WARNING : do NOT add new upgrades in between, this breaks the saves. Add them at the end ! - var order = 100;//this is used to set the order in which the items are listed - new Game.Upgrade('Reinforced index finger', loc("The mouse and cursors are twice as efficient.") + 'prod prod', 100, [0, 0]); Game.MakeTiered(Game.last, 1, 0); - new Game.Upgrade('Carpal tunnel prevention cream', loc("The mouse and cursors are twice as efficient.") + 'it... it hurts to click...', 500, [0, 1]); Game.MakeTiered(Game.last, 2, 0); - new Game.Upgrade('Ambidextrous', loc("The mouse and cursors are twice as efficient.") + 'Look ma, both hands!', 10000, [0, 2]); Game.MakeTiered(Game.last, 3, 0); - new Game.Upgrade('Thousand fingers', loc("The mouse and cursors gain +%1 cookies for each non-cursor building owned.", 0.1) + 'clickity', 100000, [0, 13]); Game.MakeTiered(Game.last, 4, 0); - - new Game.Upgrade('Million fingers', getStrThousandFingersGain(5) + 'clickityclickity', 10000000, [0, 14]); Game.MakeTiered(Game.last, 5, 0); - new Game.Upgrade('Billion fingers', getStrThousandFingersGain(10) + 'clickityclickityclickity', 100000000, [0, 15]); Game.MakeTiered(Game.last, 6, 0); - new Game.Upgrade('Trillion fingers', getStrThousandFingersGain(20) + 'clickityclickityclickityclickity', 1000000000, [0, 16]); Game.MakeTiered(Game.last, 7, 0); - - order = 200; - Game.TieredUpgrade('Forwards from grandma', 'RE:RE:thought you\'d get a kick out of this ;))', 'Grandma', 1); - Game.TieredUpgrade('Steel-plated rolling pins', 'Just what you kneaded.', 'Grandma', 2); - Game.TieredUpgrade('Lubricated dentures', 'squish', 'Grandma', 3); - - order = 300; - Game.TieredUpgrade('Cheap hoes', 'Rake in the dough!', 'Farm', 1); - Game.TieredUpgrade('Fertilizer', 'It\'s chocolate, I swear.', 'Farm', 2); - Game.TieredUpgrade('Cookie trees', 'A relative of the breadfruit.', 'Farm', 3); - - order = 500; - Game.TieredUpgrade('Sturdier conveyor belts', 'You\'re going places.', 'Factory', 1); - Game.TieredUpgrade('Child labor', 'Cheaper, healthier workforce.', 'Factory', 2); - Game.TieredUpgrade('Sweatshop', 'Slackers will be terminated.', 'Factory', 3); - - order = 400; - Game.TieredUpgrade('Sugar gas', 'A pink, volatile gas, found in the depths of some chocolate caves.', 'Mine', 1); - Game.TieredUpgrade('Megadrill', 'You\'re in deep.', 'Mine', 2); - Game.TieredUpgrade('Ultradrill', 'Finally caved in?', 'Mine', 3); - - order = 600; - Game.TieredUpgrade('Vanilla nebulae', 'If you removed your space helmet, you could probably smell it!
(Note : don\'t do that.)
', 'Shipment', 1); - Game.TieredUpgrade('Wormholes', 'By using these as shortcuts, your ships can travel much faster.', 'Shipment', 2); - Game.TieredUpgrade('Frequent flyer', 'Come back soon!', 'Shipment', 3); - - order = 700; - Game.TieredUpgrade('Antimony', 'Actually worth a lot of mony.', 'Alchemy lab', 1); - Game.TieredUpgrade('Essence of dough', 'Extracted through the 5 ancient steps of alchemical baking.', 'Alchemy lab', 2); - Game.TieredUpgrade('True chocolate', 'The purest form of cacao.', 'Alchemy lab', 3); - - order = 800; - Game.TieredUpgrade('Ancient tablet', 'A strange slab of peanut brittle, holding an ancient cookie recipe. Neat!', 'Portal', 1); - Game.TieredUpgrade('Insane oatling workers', 'ARISE, MY MINIONS!', 'Portal', 2); - Game.TieredUpgrade('Soul bond', 'So I just sign up and get more cookies? Sure, whatever!', 'Portal', 3); - - order = 900; - Game.TieredUpgrade('Flux capacitors', 'Bake to the future.', 'Time machine', 1); - Game.TieredUpgrade('Time paradox resolver', 'No more fooling around with your own grandmother!', 'Time machine', 2); - Game.TieredUpgrade('Quantum conundrum', 'There is only one constant, and that is universal uncertainty.
Or is it?
', 'Time machine', 3); - - order = 20000; - new Game.Upgrade('Kitten helpers', strKittenDesc + 'meow may I help you', 9000000, Game.GetIcon('Kitten', 1)); Game.last.kitten = 1; Game.MakeTiered(Game.last, 1, 18); - new Game.Upgrade('Kitten workers', strKittenDesc + 'meow meow meow meow', 9000000000, Game.GetIcon('Kitten', 2)); Game.last.kitten = 1; Game.MakeTiered(Game.last, 2, 18); - - order = 10000; - Game.NewUpgradeCookie({ name: 'Plain cookies', desc: 'We all gotta start somewhere.', icon: [2, 3], power: 1, price: 999999 }); - Game.NewUpgradeCookie({ name: 'Sugar cookies', desc: 'Tasty, if a little unimaginative.', icon: [7, 3], power: 1, price: 999999 * 5 }); - Game.NewUpgradeCookie({ name: 'Oatmeal raisin cookies', desc: 'No raisin to hate these.', icon: [0, 3], power: 1, price: 9999999 }); - Game.NewUpgradeCookie({ name: 'Peanut butter cookies', desc: 'Get yourself some jam cookies!', icon: [1, 3], power: 2, price: 9999999 * 5 }); - Game.NewUpgradeCookie({ name: 'Coconut cookies', desc: 'Flaky, but not unreliable. Some people go crazy for these.', icon: [3, 3], power: 2, price: 99999999 }); - order = 10001; - Game.NewUpgradeCookie({ name: 'White chocolate cookies', desc: 'I know what you\'ll say. It\'s just cocoa butter! It\'s not real chocolate!
Oh please.', icon: [4, 3], power: 2, price: 99999999 * 5 }); - order = 10000; - Game.NewUpgradeCookie({ name: 'Macadamia nut cookies', desc: 'They\'re macadamn delicious!', icon: [5, 3], power: 2, price: 99999999 }); - order = 10002; - Game.NewUpgradeCookie({ name: 'Double-chip cookies', desc: 'DOUBLE THE CHIPS
DOUBLE THE TASTY
(double the calories)', icon: [6, 3], power: 2, price: 999999999 * 5 }); - Game.NewUpgradeCookie({ name: 'White chocolate macadamia nut cookies', desc: 'Orteil\'s favorite.', icon: [8, 3], power: 2, price: 9999999999 }); - Game.NewUpgradeCookie({ name: 'All-chocolate cookies', desc: 'CHOCOVERDOSE.', icon: [9, 3], power: 2, price: 9999999999 * 5 }); - - order = 100; - new Game.Upgrade('Quadrillion fingers', getStrThousandFingersGain(20) + 'clickityclickityclickityclickityclick', 10000000000, [0, 17]); Game.MakeTiered(Game.last, 8, 0); - - order = 200; Game.TieredUpgrade('Prune juice', 'Gets me going.', 'Grandma', 4); - order = 300; Game.TieredUpgrade('Genetically-modified cookies', 'All-natural mutations.', 'Farm', 4); - order = 500; Game.TieredUpgrade('Radium reactors', 'Gives your cookies a healthy glow.', 'Factory', 4); - order = 400; Game.TieredUpgrade('Ultimadrill', 'Pierce the heavens, etc.', 'Mine', 4); - order = 600; Game.TieredUpgrade('Warp drive', 'To boldly bake.', 'Shipment', 4); - order = 700; Game.TieredUpgrade('Ambrosia', 'Adding this to the cookie mix is sure to make them even more addictive!
Perhaps dangerously so.
Let\'s hope you can keep selling these legally.
', 'Alchemy lab', 4); - order = 800; Game.TieredUpgrade('Sanity dance', 'We can change if we want to.
We can leave our brains behind.
', 'Portal', 4); - order = 900; Game.TieredUpgrade('Causality enforcer', 'What happened, happened.', 'Time machine', 4); - - order = 5000; - new Game.Upgrade('Lucky day', loc("Golden cookies appear twice as often and stay twice as long.") + 'Oh hey, a four-leaf penny!', 777777777, [27, 6]); - new Game.Upgrade('Serendipity', loc("Golden cookies appear twice as often and stay twice as long.") + 'What joy! Seven horseshoes!', 77777777777, [27, 6]); - - order = 20000; - new Game.Upgrade('Kitten engineers', strKittenDesc + 'meow meow meow meow, sir', 90000000000000, Game.GetIcon('Kitten', 3)); Game.last.kitten = 1; Game.MakeTiered(Game.last, 3, 18); - - order = 10020; - Game.NewUpgradeCookie({ name: 'Dark chocolate-coated cookies', desc: 'These absorb light so well you almost need to squint to see them.', icon: [10, 3], power: 5, price: 99999999999 }); - Game.NewUpgradeCookie({ name: 'White chocolate-coated cookies', desc: 'These dazzling cookies absolutely glisten with flavor.', icon: [11, 3], power: 5, price: 99999999999 }); - - Game.GrandmaSynergies = []; - Game.GrandmaSynergy = function (name, desc, building) { - var building = Game.Objects[building]; - var grandmaNumber = loc("%1 grandma", LBeautify(building.id - 1)); - desc = loc("%1 are twice as efficient.", cap(Game.Objects['Grandma'].plural)) + ' ' + loc("%1 gain +%2% CpS per %3.", [cap(building.plural), 1, grandmaNumber]) + '' + desc + ''; - - var upgrade = new Game.Upgrade(name, desc, building.basePrice * Game.Tiers[2].price, [10, 9], function () { Game.Objects['Grandma'].redraw(); }); - building.grandma = upgrade; - upgrade.buildingTie = building; - Game.GrandmaSynergies.push(upgrade.name); - return upgrade; - } - - order = 250; - Game.GrandmaSynergy('Farmer grandmas', 'A nice farmer to grow more cookies.', 'Farm'); - Game.GrandmaSynergy('Miner grandmas', 'A nice miner to dig more cookies.', 'Mine'); - Game.GrandmaSynergy('Worker grandmas', 'A nice worker to manufacture more cookies.', 'Factory'); - Game.GrandmaSynergy('Cosmic grandmas', 'A nice thing to... uh... cookies.', 'Shipment'); - Game.GrandmaSynergy('Transmuted grandmas', 'A nice golden grandma to convert into more cookies.', 'Alchemy lab'); - Game.GrandmaSynergy('Altered grandmas', 'a NiCe GrAnDmA tO bA##########', 'Portal'); - Game.GrandmaSynergy('Grandmas\' grandmas', 'A nice grandma\'s nice grandma to bake double the cookies.', 'Time machine'); - - order = 14000; - Game.baseResearchTime = Game.fps * 60 * 30; - Game.SetResearch = function (what, time) { - if (Game.Upgrades[what] && !Game.Has(what)) { - Game.researchT = Game.baseResearchTime; - if (Game.Has('Persistent memory')) Game.researchT = Math.ceil(Game.baseResearchTime / 10); - if (Game.Has('Ultrascience')) Game.researchT = Game.fps * 5; - Game.nextResearch = Game.Upgrades[what].id; - Game.Notify(loc("Research has begun"), loc("Your bingo center/research facility is conducting experiments."), [9, 0]); - } - } - - new Game.Upgrade('Bingo center/Research facility', loc("Grandma-operated science lab and leisure club.
Grandmas are 4 times as efficient.
Regularly unlocks new upgrades.") + 'What could possibly keep those grandmothers in check?...
Bingo.
', 1000000000000000, [11, 9], function () { Game.SetResearch('Specialized chocolate chips'); }); Game.last.noPerm = 1; - - order = 15000; - new Game.Upgrade('Specialized chocolate chips', getStrCookieProductionMultiplierPlus(1) + 'Computer-designed chocolate chips. Computer chips, if you will.', 1000000000000000, [0, 9], function () { Game.SetResearch('Designer cocoa beans'); }); Game.last.pool = 'tech'; - new Game.Upgrade('Designer cocoa beans', getStrCookieProductionMultiplierPlus(2) + 'Now more aerodynamic than ever!', 2000000000000000, [1, 9], function () { Game.SetResearch('Ritual rolling pins'); }); Game.last.pool = 'tech'; - new Game.Upgrade('Ritual rolling pins', loc("%1 are twice as efficient.", cap(Game.Objects['Grandma'].plural)) + 'The result of years of scientific research!', 4000000000000000, [2, 9], function () { Game.SetResearch('Underworld ovens'); }); Game.last.pool = 'tech'; - new Game.Upgrade('Underworld ovens', getStrCookieProductionMultiplierPlus(3) + 'Powered by science, of course!', 8000000000000000, [3, 9], function () { Game.SetResearch('One mind'); }); Game.last.pool = 'tech'; - new Game.Upgrade('One mind', loc("Each %1 gains +%2 base CpS per %3.", [loc("grandma"), '0.02', loc("grandma")]) + '
' + loc("Note: the grandmothers are growing restless. Do not encourage them.") + '
We are one. We are many.', 16000000000000000, [4, 9], function () { Game.elderWrath = 1; Game.SetResearch('Exotic nuts'); Game.storeToRefresh = 1; }); Game.last.pool = 'tech'; - //Game.last.clickFunction=function(){return confirm('Warning : purchasing this will have unexpected, and potentially undesirable results!\nIt\'s all downhill from here. You have been warned!\nPurchase anyway?');}; - Game.RequiresConfirmation(Game.last, '
' + loc("Warning: purchasing this will have unexpected, and potentially undesirable results!
It's all downhill from here. You have been warned!

Purchase anyway?") + '
'); - new Game.Upgrade('Exotic nuts', getStrCookieProductionMultiplierPlus(4) + 'You\'ll go crazy over these!', 32000000000000000, [5, 9], function () { Game.SetResearch('Communal brainsweep'); }); Game.last.pool = 'tech'; - new Game.Upgrade('Communal brainsweep', (EN ? 'Each grandma gains another +0.02 base CpS per grandma.' : loc("Each %1 gains +%2 base CpS per %3.", [loc("grandma"), '0.02', loc("grandma")])) + '
' + loc("Note: proceeding any further in scientific research may have unexpected results. You have been warned.") + '
We fuse. We merge. We grow.', 64000000000000000, [6, 9], function () { Game.elderWrath = 2; Game.SetResearch('Arcane sugar'); Game.storeToRefresh = 1; }); Game.last.pool = 'tech'; - new Game.Upgrade('Arcane sugar', getStrCookieProductionMultiplierPlus(5) + 'Tastes like insects, ligaments, and molasses.', 128000000000000000, [7, 9], function () { Game.SetResearch('Elder Pact'); }); Game.last.pool = 'tech'; - new Game.Upgrade('Elder Pact', loc("Each %1 gains +%2 base CpS per %3.", [loc("grandma"), '0.05', loc("portal")]) + '
' + loc("Note: this is a bad idea.") + '
squirm crawl slither writhe
today we rise
', 256000000000000000, [8, 9], function () { Game.elderWrath = 3; Game.storeToRefresh = 1; }); Game.last.pool = 'tech'; - new Game.Upgrade('Elder Pledge', loc("Contains the wrath of the elders, at least for a while.") + 'This is a simple ritual involving anti-aging cream, cookie batter mixed in the moonlight, and a live chicken.', 1, [9, 9], function () { - Game.elderWrath = 0; - Game.pledges++; - Game.pledgeT = Game.getPledgeDuration(); - Game.Unlock('Elder Covenant'); - Game.CollectWrinklers(); - Game.storeToRefresh = 1; - }); - Game.getPledgeDuration = function () { return Game.fps * 60 * (Game.Has('Sacrificial rolling pins') ? 60 : 30); } - Game.last.pool = 'toggle'; - Game.last.displayFuncWhenOwned = function () { return '
' + loc("Time remaining until pledge runs out:") + '
' + Game.sayTime(Game.pledgeT, -1) + '
'; } - Game.last.timerDisplay = function () { if (!Game.Upgrades['Elder Pledge'].bought) return -1; else return 1 - Game.pledgeT / Game.getPledgeDuration(); } - Game.last.priceFunc = function () { return Math.pow(8, Math.min(Game.pledges + 2, 14)); } - - Game.last.descFunc = function () { - return '
' + (Game.pledges == 0 ? loc("You haven't pledged to the elders yet.") : loc("You've pledged to the elders %1 times.", LBeautify(Game.pledges))) + '
' + this.ddesc; - }; - - - order = 150; - new Game.Upgrade('Plastic mouse', getStrClickingGains(1) + 'Slightly squeaky.', 50000, [11, 0]); Game.MakeTiered(Game.last, 1, 11); - new Game.Upgrade('Iron mouse', getStrClickingGains(1) + 'Click like it\'s 1349!', 5000000, [11, 1]); Game.MakeTiered(Game.last, 2, 11); - new Game.Upgrade('Titanium mouse', getStrClickingGains(1) + 'Heavy, but powerful.', 500000000, [11, 2]); Game.MakeTiered(Game.last, 3, 11); - new Game.Upgrade('Adamantium mouse', getStrClickingGains(1) + 'You could cut diamond with these.', 50000000000, [11, 13]); Game.MakeTiered(Game.last, 4, 11); - - order = 40000; - new Game.Upgrade('Ultrascience', loc("Research takes only 5 seconds.") + 'YEAH, SCIENCE!', 7, [9, 2]);//debug purposes only - Game.last.pool = 'debug'; - - order = 10020; - Game.NewUpgradeCookie({ name: 'Eclipse cookies', desc: 'Look to the cookie.', icon: [0, 4], power: 2, price: 99999999999 * 5 }); - Game.NewUpgradeCookie({ name: 'Zebra cookies', desc: '...', icon: [1, 4], power: 2, price: 999999999999 }); - - order = 100; - new Game.Upgrade('Quintillion fingers', getStrThousandFingersGain(20) + 'man, just go click click click click click, it\'s real easy, man.', 10000000000000, [0, 18]); Game.MakeTiered(Game.last, 9, 0); - - order = 40000; - new Game.Upgrade('Gold hoard', loc("Golden cookies appear really often.") + 'That\'s entirely too many.', 7, [10, 14]);//debug purposes only - Game.last.pool = 'debug'; - - order = 15000; - new Game.Upgrade('Elder Covenant', loc("Puts a permanent end to the elders' wrath, at the cost of %1% of your CpS.", 5) + 'This is a complicated ritual involving silly, inconsequential trivialities such as cursed laxatives, century-old cacao, and an infant.
Don\'t question it.
', 66666666666666, [8, 9], function () { - Game.pledgeT = 0; - Game.Lock('Revoke Elder Covenant'); - Game.Unlock('Revoke Elder Covenant'); - Game.Lock('Elder Pledge'); - Game.Win('Elder calm'); - Game.CollectWrinklers(); - Game.storeToRefresh = 1; - }); - Game.last.pool = 'toggle'; - - new Game.Upgrade('Revoke Elder Covenant', loc("You will get %1% of your CpS back, but the grandmatriarchs will return.", 5) + 'we
rise
again
', 6666666666, [8, 9], function () { - Game.Lock('Elder Covenant'); - Game.Unlock('Elder Covenant'); - }); - Game.last.pool = 'toggle'; - - order = 5000; - new Game.Upgrade('Get lucky', loc("Golden cookie effects last twice as long.") + 'You\'ve been up all night, haven\'t you?', 77777777777777, [27, 6]); - - order = 15000; - new Game.Upgrade('Sacrificial rolling pins', loc("Elder pledges last twice as long.") + 'These are mostly just for spreading the anti-aging cream.
(And accessorily, shortening the chicken\'s suffering.)
', 2888888888888, [2, 9]); - - order = 10020; - Game.NewUpgradeCookie({ name: 'Snickerdoodles', desc: 'True to their name.', icon: [2, 4], power: 2, price: 999999999999 * 5 }); - Game.NewUpgradeCookie({ name: 'Stroopwafels', desc: 'If it ain\'t dutch, it ain\'t much.', icon: [3, 4], power: 2, price: 9999999999999 }); - Game.NewUpgradeCookie({ name: 'Macaroons', desc: 'Not to be confused with macarons.
These have coconut, okay?', icon: [4, 4], power: 2, price: 9999999999999 * 5 }); - - order = 40000; - new Game.Upgrade('Neuromancy', loc("Can toggle upgrades on and off at will in the stats menu.") + 'Can also come in handy to unsee things that can\'t be unseen.', 7, [4, 9]);//debug purposes only - Game.last.pool = 'debug'; - - order = 10020; - Game.NewUpgradeCookie({ name: 'Empire biscuits', desc: 'For your growing cookie empire, of course!', icon: [5, 4], power: 2, price: 99999999999999 }); - order = 10031; - Game.NewUpgradeCookie({ name: 'British tea biscuits', desc: 'Quite.', icon: [6, 4], require: 'Tin of british tea biscuits', power: 2, price: 99999999999999 }); - Game.NewUpgradeCookie({ name: 'Chocolate british tea biscuits', desc: 'Yes, quite.', icon: [7, 4], require: Game.last.name, power: 2, price: 99999999999999 }); - Game.NewUpgradeCookie({ name: 'Round british tea biscuits', desc: 'Yes, quite riveting.', icon: [8, 4], require: Game.last.name, power: 2, price: 99999999999999 }); - Game.NewUpgradeCookie({ name: 'Round chocolate british tea biscuits', desc: 'Yes, quite riveting indeed.', icon: [9, 4], require: Game.last.name, power: 2, price: 99999999999999 }); - Game.NewUpgradeCookie({ name: 'Round british tea biscuits with heart motif', desc: 'Yes, quite riveting indeed, old chap.', icon: [10, 4], require: Game.last.name, power: 2, price: 99999999999999 }); - Game.NewUpgradeCookie({ name: 'Round chocolate british tea biscuits with heart motif', desc: 'I like cookies.', icon: [11, 4], require: Game.last.name, power: 2, price: 99999999999999 }); - - order = 1000; - Game.TieredUpgrade('Sugar bosons', 'Sweet firm bosons.', 'Antimatter condenser', 1); - Game.TieredUpgrade('String theory', 'Reveals new insight about the true meaning of baking cookies (and, as a bonus, the structure of the universe).', 'Antimatter condenser', 2); - Game.TieredUpgrade('Large macaron collider', 'How singular!', 'Antimatter condenser', 3); - Game.TieredUpgrade('Big bang bake', 'And that\'s how it all began.', 'Antimatter condenser', 4); - - order = 255; - Game.GrandmaSynergy('Antigrandmas', 'A mean antigrandma to vomit more cookies.', 'Antimatter condenser'); - - order = 10020; - Game.NewUpgradeCookie({ name: 'Madeleines', desc: 'Unforgettable!', icon: [12, 3], power: 2, price: 99999999999999 * 5 }); - Game.NewUpgradeCookie({ name: 'Palmiers', desc: 'Palmier than you!', icon: [13, 3], power: 2, price: 99999999999999 * 5 }); - Game.NewUpgradeCookie({ name: 'Palets', desc: 'You could probably play hockey with these.
I mean, you\'re welcome to try.', icon: [12, 4], power: 2, price: 999999999999999 }); - Game.NewUpgradeCookie({ name: 'Sablés', desc: 'The name implies they\'re made of sand. But you know better, don\'t you?', icon: [13, 4], power: 2, price: 999999999999999 }); - - order = 20000; - new Game.Upgrade('Kitten overseers', strKittenDesc + 'my purrpose is to serve you, sir', 90000000000000000, Game.GetIcon('Kitten', 4)); Game.last.kitten = 1; Game.MakeTiered(Game.last, 4, 18); - - - order = 100; - new Game.Upgrade('Sextillion fingers', getStrThousandFingersGain(20) + 'sometimes
things just
click
', 10000000000000000, [0, 19]); Game.MakeTiered(Game.last, 10, 0); - - order = 200; Game.TieredUpgrade('Double-thick glasses', 'Oh... so THAT\'s what I\'ve been baking.', 'Grandma', 5); - order = 300; Game.TieredUpgrade('Gingerbread scarecrows', 'Staring at your crops with mischievous glee.', 'Farm', 5); - order = 500; Game.TieredUpgrade('Recombobulators', 'A major part of cookie recombobulation.', 'Factory', 5); - order = 400; Game.TieredUpgrade('H-bomb mining', 'Questionable efficiency, but spectacular nonetheless.', 'Mine', 5); - order = 600; Game.TieredUpgrade('Chocolate monoliths', 'My god. It\'s full of chocolate bars.', 'Shipment', 5); - order = 700; Game.TieredUpgrade('Aqua crustulae', 'Careful with the dosing - one drop too much and you get muffins.
And nobody likes muffins.
', 'Alchemy lab', 5); - order = 800; Game.TieredUpgrade('Brane transplant', 'This refers to the practice of merging higher dimensional universes, or "branes", with our own, in order to facilitate transit (and harvesting of precious cookie dough).', 'Portal', 5); - order = 900; Game.TieredUpgrade('Yestermorrow comparators', 'Fortnights into millennia.', 'Time machine', 5); - order = 1000; Game.TieredUpgrade('Reverse cyclotrons', 'These can uncollision particles and unspin atoms. For... uh... better flavor, and stuff.', 'Antimatter condenser', 5); - - order = 150; - new Game.Upgrade('Unobtainium mouse', getStrClickingGains(1) + 'These nice mice should suffice.', 5000000000000, [11, 14]); Game.MakeTiered(Game.last, 5, 11); - - order = 10030; - Game.NewUpgradeCookie({ name: 'Caramoas', desc: 'Yeah. That\'s got a nice ring to it.', icon: [14, 4], require: 'Box of brand biscuits', power: 3, price: 9999999999999999 }); - Game.NewUpgradeCookie({ name: 'Sagalongs', desc: 'Grandma\'s favorite?', icon: [15, 3], require: 'Box of brand biscuits', power: 3, price: 9999999999999999 }); - Game.NewUpgradeCookie({ name: 'Shortfoils', desc: 'Foiled again!', icon: [15, 4], require: 'Box of brand biscuits', power: 3, price: 9999999999999999 }); - Game.NewUpgradeCookie({ name: 'Win mints', desc: 'They\'re the luckiest cookies you\'ve ever tasted!', icon: [14, 3], require: 'Box of brand biscuits', power: 3, price: 9999999999999999 }); - - order = 40000; - new Game.Upgrade('Perfect idling', loc("You keep producing cookies even while the game is closed.") + 'It\'s the most beautiful thing I\'ve ever seen.', 7, [10, 0]);//debug purposes only - Game.last.pool = 'debug'; - - order = 10030; - Game.NewUpgradeCookie({ name: 'Fig gluttons', desc: 'Got it all figured out.', icon: [17, 4], require: 'Box of brand biscuits', power: 2, price: 999999999999999 * 5 }); - Game.NewUpgradeCookie({ name: 'Loreols', desc: 'Because, uh... they\'re worth it?', icon: [16, 3], require: 'Box of brand biscuits', power: 2, price: 999999999999999 * 5 }); - Game.NewUpgradeCookie({ name: 'Jaffa cakes', desc: 'If you want to bake a cookie from scratch, you must first build a factory.', icon: [17, 3], require: 'Box of brand biscuits', power: 2, price: 999999999999999 * 5 }); - Game.NewUpgradeCookie({ name: 'Grease\'s cups', desc: 'Extra-greasy peanut butter.', icon: [16, 4], require: 'Box of brand biscuits', power: 2, price: 999999999999999 * 5 }); - - order = 30000; - new Game.Upgrade('Heavenly chip secret', loc("Unlocks %1% of the potential of your prestige level.", 5) + 'Grants the knowledge of heavenly chips, and how to use them to make baking more efficient.
It\'s a secret to everyone.
', 11, [19, 7]); Game.last.noPerm = 1; - new Game.Upgrade('Heavenly cookie stand', loc("Unlocks %1% of the potential of your prestige level.", 25) + 'Don\'t forget to visit the heavenly lemonade stand afterwards. When afterlife gives you lemons...', 1111, [18, 7]); Game.last.noPerm = 1; - new Game.Upgrade('Heavenly bakery', loc("Unlocks %1% of the potential of your prestige level.", 50) + 'Also sells godly cakes and divine pastries. The pretzels aren\'t too bad either.', 111111, [17, 7]); Game.last.noPerm = 1; - new Game.Upgrade('Heavenly confectionery', loc("Unlocks %1% of the potential of your prestige level.", 75) + 'They say angel bakers work there. They take angel lunch breaks and sometimes go on angel strikes.', 11111111, [16, 7]); Game.last.noPerm = 1; - new Game.Upgrade('Heavenly key', loc("Unlocks %1% of the potential of your prestige level.", 100) + 'This is the key to the pearly (and tasty) gates of pastry heaven, granting you access to your entire stockpile of heavenly chips for baking purposes.
May you use them wisely.
', 1111111111, [15, 7]); Game.last.noPerm = 1; - - order = 10100; - Game.NewUpgradeCookie({ name: 'Skull cookies', desc: 'Wanna know something spooky? You\'ve got one of these inside your head RIGHT NOW.', locked: 1, icon: [12, 8], power: 2, price: 444444444444 }); - Game.NewUpgradeCookie({ name: 'Ghost cookies', desc: 'They\'re something strange, but they look pretty good!', locked: 1, icon: [13, 8], power: 2, price: 444444444444 }); - Game.NewUpgradeCookie({ name: 'Bat cookies', desc: 'The cookies this town deserves.', locked: 1, icon: [14, 8], power: 2, price: 444444444444 }); - Game.NewUpgradeCookie({ name: 'Slime cookies', desc: 'The incredible melting cookies!', locked: 1, icon: [15, 8], power: 2, price: 444444444444 }); - Game.NewUpgradeCookie({ name: 'Pumpkin cookies', desc: 'Not even pumpkin-flavored. Tastes like glazing. Yeugh.', locked: 1, icon: [16, 8], power: 2, price: 444444444444 }); - Game.NewUpgradeCookie({ name: 'Eyeball cookies', desc: 'When you stare into the cookie, the cookie stares back at you.', locked: 1, icon: [17, 8], power: 2, price: 444444444444 }); - Game.NewUpgradeCookie({ name: 'Spider cookies', desc: 'You found the recipe on the web. They do whatever a cookie can.', locked: 1, icon: [18, 8], power: 2, price: 444444444444 }); - - Game.halloweenDrops = ['Skull cookies', 'Ghost cookies', 'Bat cookies', 'Slime cookies', 'Pumpkin cookies', 'Eyeball cookies', 'Spider cookies']; - - Game.GetHowManyHalloweenDrops = function () { - var num = 0; - for (var i in Game.halloweenDrops) { if (Game.Has(Game.halloweenDrops[i])) num++; } - return num; - } - /*for (var i in Game.halloweenDrops) - { - Game.Upgrades[Game.halloweenDrops[i]].descFunc=function(){return '
You currently own '+Game.GetHowManyHalloweenDrops()+'/'+Game.halloweenDrops.length+' halloween cookies.
'+this.ddesc;}; - }*/ - - order = 0; - new Game.Upgrade('Persistent memory', loc("Subsequent research will be %1 times as fast.", 10) + 'It\'s all making sense!
Again!
', 500, [9, 2]); Game.last.pool = 'prestige'; - - order = 40000; - new Game.Upgrade('Wrinkler doormat', loc("Wrinklers spawn much more frequently.") + 'You\'re such a pushover.', 7, [19, 8]);//debug purposes only - Game.last.pool = 'debug'; - - order = 10200; - Game.NewUpgradeCookie({ name: 'Christmas tree biscuits', desc: 'Whose pine is it anyway?', locked: 1, icon: [12, 10], power: 2, price: 252525252525 }); - Game.NewUpgradeCookie({ name: 'Snowflake biscuits', desc: 'Mass-produced to be unique in every way.', locked: 1, icon: [13, 10], power: 2, price: 252525252525 }); - Game.NewUpgradeCookie({ name: 'Snowman biscuits', desc: 'It\'s frosted. Doubly so.', locked: 1, icon: [14, 10], power: 2, price: 252525252525 }); - Game.NewUpgradeCookie({ name: 'Holly biscuits', desc: 'You don\'t smooch under these ones. That would be the mistletoe (which, botanically, is a smellier variant of the mistlefinger).', locked: 1, icon: [15, 10], power: 2, price: 252525252525 }); - Game.NewUpgradeCookie({ name: 'Candy cane biscuits', desc: 'It\'s two treats in one!
(Further inspection reveals the frosting does not actually taste like peppermint, but like mundane sugary frosting.)', locked: 1, icon: [16, 10], power: 2, price: 252525252525 }); - Game.NewUpgradeCookie({ name: 'Bell biscuits', desc: 'What do these even have to do with christmas? Who cares, ring them in!', locked: 1, icon: [17, 10], power: 2, price: 252525252525 }); - Game.NewUpgradeCookie({ name: 'Present biscuits', desc: 'The prequel to future biscuits. Watch out!', locked: 1, icon: [18, 10], power: 2, price: 252525252525 }); - - order = 10020; - Game.NewUpgradeCookie({ name: 'Gingerbread men', desc: 'You like to bite the legs off first, right? How about tearing off the arms? You sick monster.', icon: [18, 4], power: 2, price: 9999999999999999 }); - Game.NewUpgradeCookie({ name: 'Gingerbread trees', desc: 'Evergreens in pastry form. Yule be surprised what you can come up with.', icon: [18, 3], power: 2, price: 9999999999999999 }); - - order = 25000; - new Game.Upgrade('A festive hat', '' + loc("Unlocks... something.") + 'Not a creature was stirring, not even a mouse.', 25, [19, 9], function () { - var drop = choose(Game.santaDrops); - Game.Unlock(drop); - Game.Notify(loc("In the festive hat, you find..."), loc("a festive test tube
and %1.", drop), Game.Upgrades[drop].icon); - }); - - new Game.Upgrade('Increased merriness', getStrCookieProductionMultiplierPlus(15) + '
' + loc("Cost scales with Santa level.") + 'It turns out that the key to increased merriness, strangely enough, happens to be a good campfire and some s\'mores.
You know what they say, after all; the s\'more, the merrier.
', 2525, [17, 9]); - new Game.Upgrade('Improved jolliness', getStrCookieProductionMultiplierPlus(15) + '
' + loc("Cost scales with Santa level.") + 'A nice wobbly belly goes a long way.
You jolly?
', 2525, [17, 9]); - new Game.Upgrade('A lump of coal', getStrCookieProductionMultiplierPlus(1) + '
' + loc("Cost scales with Santa level.") + 'Some of the world\'s worst stocking stuffing.
I guess you could try starting your own little industrial revolution, or something?...
', 2525, [13, 9]); - new Game.Upgrade('An itchy sweater', getStrCookieProductionMultiplierPlus(1) + '
' + loc("Cost scales with Santa level.") + 'You don\'t know what\'s worse : the embarrassingly quaint "elf on reindeer" motif, or the fact that wearing it makes you feel like you\'re wrapped in a dead sasquatch.', 2525, [14, 9]); - new Game.Upgrade('Reindeer baking grounds', loc("Reindeer appear twice as frequently.") + '
' + loc("Cost scales with Santa level.") + 'Male reindeer are from Mars; female reindeer are from venison.', 2525, [12, 9]); - new Game.Upgrade('Weighted sleighs', loc("Reindeer are twice as slow.") + '
' + loc("Cost scales with Santa level.") + 'Hope it was worth the weight.
(Something something forced into cervidude)
', 2525, [12, 9]); - new Game.Upgrade('Ho ho ho-flavored frosting', loc("Reindeer give twice as much.") + '
' + loc("Cost scales with Santa level.") + 'It\'s time to up the antler.', 2525, [12, 9]); - new Game.Upgrade('Season savings', loc("All buildings are %1% cheaper.", 1) + '
' + loc("Cost scales with Santa level.") + 'By Santa\'s beard, what savings!
But who will save us?
', 2525, [16, 9], function () { Game.storeToRefresh = 1; }); - new Game.Upgrade('Toy workshop', loc("All upgrades are %1% cheaper.", 5) + '
' + loc("Cost scales with Santa level.") + 'Watch yours-elf around elvesdroppers who might steal our production secrets.
Or elven worse!
', 2525, [16, 9], function () { Game.upgradesToRebuild = 1; }); - new Game.Upgrade('Naughty list', loc("%1 are twice as efficient.", cap(loc("grandmas"))) + '
' + loc("Cost scales with Santa level.") + 'This list contains every unholy deed perpetuated by grandmakind.
He won\'t be checking this one twice.
Once. Once is enough.
', 2525, [15, 9]); - new Game.Upgrade('Santa\'s bottomless bag', loc("Random drops are %1% more common.", 10) + '
' + loc("Cost scales with Santa level.") + 'This is one bottom you can\'t check out.', 2525, [19, 9]); - new Game.Upgrade('Santa\'s helpers', loc("Clicking is %1% more powerful.", 10) + '
' + loc("Cost scales with Santa level.") + 'Some choose to help hamburger; some choose to help you.
To each their own, I guess.
', 2525, [19, 9]); - new Game.Upgrade('Santa\'s legacy', loc("Cookie production multiplier +%1% per Santa's levels.", 3) + '
' + loc("Cost scales with Santa level.") + 'In the north pole, you gotta get the elves first. Then when you get the elves, you start making the toys. Then when you get the toys... then you get the cookies.', 2525, [19, 9]); - new Game.Upgrade('Santa\'s milk and cookies', loc("Milk is %1% more powerful.", 5) + '
' + loc("Cost scales with Santa level.") + 'Part of Santa\'s dreadfully unbalanced diet.', 2525, [19, 9]); - - order = 40000; - new Game.Upgrade('Reindeer season', loc("Reindeer spawn much more frequently.") + 'Go, Cheater! Go, Hacker and Faker!', 7, [12, 9]);//debug purposes only - Game.last.pool = 'debug'; - - order = 25000; - new Game.Upgrade('Santa\'s dominion', getStrCookieProductionMultiplierPlus(20) + '
' + loc("All buildings are %1% cheaper.", 1) + '
' + loc("All upgrades are %1% cheaper.", 2) + 'My name is Claus, king of kings;
Look on my toys, ye Mighty, and despair!
', 2525252525252525, [19, 10], function () { Game.storeToRefresh = 1; }); - - order = 10300; - var heartPower = function () { - var pow = 2; - if (Game.Has('Starlove')) pow = 3; - if (Game.hasGod) { - var godLvl = Game.hasGod('seasons'); - if (godLvl == 1) pow *= 1.3; - else if (godLvl == 2) pow *= 1.2; - else if (godLvl == 3) pow *= 1.1; - } - return pow; - }; - Game.NewUpgradeCookie({ name: 'Pure heart biscuits', desc: 'Melty white chocolate
that says "I *like* like you".', season: 'valentines', icon: [19, 3], power: heartPower, price: 1000000 }); - Game.NewUpgradeCookie({ name: 'Ardent heart biscuits', desc: 'A red hot cherry biscuit that will nudge the target of your affection in interesting directions.', require: Game.last.name, season: 'valentines', icon: [20, 3], power: heartPower, price: 1000000000 }); - Game.NewUpgradeCookie({ name: 'Sour heart biscuits', desc: 'A bitter lime biscuit for the lonely and the heart-broken.', require: Game.last.name, season: 'valentines', icon: [20, 4], power: heartPower, price: 1000000000000 }); - Game.NewUpgradeCookie({ name: 'Weeping heart biscuits', desc: 'An ice-cold blueberry biscuit, symbol of a mending heart.', require: Game.last.name, season: 'valentines', icon: [21, 3], power: heartPower, price: 1000000000000000 }); - Game.NewUpgradeCookie({ name: 'Golden heart biscuits', desc: 'A beautiful biscuit to symbolize kindness, true love, and sincerity.', require: Game.last.name, season: 'valentines', icon: [21, 4], power: heartPower, price: 1000000000000000000 }); - Game.NewUpgradeCookie({ name: 'Eternal heart biscuits', desc: 'Silver icing for a very special someone you\'ve liked for a long, long time.', require: Game.last.name, season: 'valentines', icon: [19, 4], power: heartPower, price: 1000000000000000000000 }); - - Game.heartDrops = ['Pure heart biscuits', 'Ardent heart biscuits', 'Sour heart biscuits', 'Weeping heart biscuits', 'Golden heart biscuits', 'Eternal heart biscuits', 'Prism heart biscuits']; - - Game.GetHowManyHeartDrops = function () { - var num = 0; - for (var i in Game.heartDrops) { if (Game.Has(Game.heartDrops[i])) num++; } - return num; - } - - order = 1100; - Game.TieredUpgrade('Gem polish', 'Get rid of the grime and let more light in.
Truly, truly outrageous.
', 'Prism', 1); - Game.TieredUpgrade('9th color', 'Delve into untouched optical depths where even the mantis shrimp hasn\'t set an eye!', 'Prism', 2); - Game.TieredUpgrade('Chocolate light', 'Bask into its cocoalescence.
(Warning : may cause various interesting albeit deadly skin conditions.)
', 'Prism', 3); - Game.TieredUpgrade('Grainbow', 'Remember the different grains using the handy Roy G. Biv mnemonic : R is for rice, O is for oats... uh, B for barley?...', 'Prism', 4); - Game.TieredUpgrade('Pure cosmic light', 'Your prisms now receive pristine, unadulterated photons from the other end of the universe.', 'Prism', 5); - - order = 255; - Game.GrandmaSynergy('Rainbow grandmas', 'A luminous grandma to sparkle into cookies.', 'Prism'); - - order = 24000; - Game.seasonTriggerBasePrice = 1000000000;//1111111111; - new Game.Upgrade('Season switcher', loc("Allows you to trigger seasonal events at will, for a price.") + 'There will always be time.', 1111, [16, 6], function () { for (var i in Game.seasons) { Game.Unlock(Game.seasons[i].trigger); } }); Game.last.pool = 'prestige'; Game.last.parents = ['Heralds']; - new Game.Upgrade('Festive biscuit', loc("Triggers %1 season for the next 24 hours.
Triggering another season will cancel this one.
Cost scales with unbuffed CpS and increases with every season switch.", loc("Christmas")) + '\'Twas the night before Christmas- or was it?', Game.seasonTriggerBasePrice, [12, 10]); Game.last.season = 'christmas'; Game.last.pool = 'toggle'; - new Game.Upgrade('Ghostly biscuit', loc("Triggers %1 season for the next 24 hours.
Triggering another season will cancel this one.
Cost scales with unbuffed CpS and increases with every season switch.", loc("Halloween")) + 'spooky scary skeletons
will wake you with a boo
', Game.seasonTriggerBasePrice, [13, 8]); Game.last.season = 'halloween'; Game.last.pool = 'toggle'; - new Game.Upgrade('Lovesick biscuit', loc("Triggers %1 season for the next 24 hours.
Triggering another season will cancel this one.
Cost scales with unbuffed CpS and increases with every season switch.", loc("Valentine's day")) + 'Romance never goes out of fashion.', Game.seasonTriggerBasePrice, [20, 3]); Game.last.season = 'valentines'; Game.last.pool = 'toggle'; - new Game.Upgrade('Fool\'s biscuit', loc("Triggers %1 season for the next 24 hours.
Triggering another season will cancel this one.
Cost scales with unbuffed CpS and increases with every season switch.", loc("Business day")) + 'Business. Serious business. This is absolutely all of your business.', Game.seasonTriggerBasePrice, [17, 6]); Game.last.season = 'fools'; Game.last.pool = 'toggle'; - - - order = 40000; - new Game.Upgrade('Eternal seasons', loc("Seasons now last forever.") + 'Season to taste.', 7, [16, 6], function () { for (var i in Game.seasons) { Game.Unlock(Game.seasons[i].trigger); } });//debug purposes only - Game.last.pool = 'debug'; - - - order = 20000; - new Game.Upgrade('Kitten managers', strKittenDesc + 'that\'s not gonna paws any problem, sir', 900000000000000000000, Game.GetIcon('Kitten', 5)); Game.last.kitten = 1; Game.MakeTiered(Game.last, 5, 18); - - order = 100; - new Game.Upgrade('Septillion fingers', getStrThousandFingersGain(20) + '[cursory flavor text]', 10000000000000000000, [12, 20]); Game.MakeTiered(Game.last, 11, 0); - new Game.Upgrade('Octillion fingers', getStrThousandFingersGain(20) + 'Turns out you can quite put your finger on it.', 10000000000000000000000, [12, 19]); Game.MakeTiered(Game.last, 12, 0); - - order = 150; new Game.Upgrade('Eludium mouse', getStrClickingGains(1) + 'I rodent do that if I were you.', 500000000000000, [11, 15]); Game.MakeTiered(Game.last, 6, 11); - new Game.Upgrade('Wishalloy mouse', getStrClickingGains(1) + 'Clicking is fine and dandy, but don\'t smash your mouse over it. Get your game on. Go play.', 50000000000000000, [11, 16]); Game.MakeTiered(Game.last, 7, 11); - order = 200; Game.TieredUpgrade('Aging agents', 'Counter-intuitively, grandmas have the uncanny ability to become more powerful the older they get.', 'Grandma', 6); - order = 300; Game.TieredUpgrade('Pulsar sprinklers', 'There\'s no such thing as over-watering. The moistest is the bestest.', 'Farm', 6); - order = 500; Game.TieredUpgrade('Deep-bake process', 'A patented process increasing cookie yield two-fold for the same amount of ingredients. Don\'t ask how, don\'t take pictures, and be sure to wear your protective suit.', 'Factory', 6); - order = 400; Game.TieredUpgrade('Coreforge', 'You\'ve finally dug a tunnel down to the Earth\'s core. It\'s pretty warm down here.', 'Mine', 6); - order = 600; Game.TieredUpgrade('Generation ship', 'Built to last, this humongous spacecraft will surely deliver your cookies to the deep ends of space, one day.', 'Shipment', 6); - order = 700; Game.TieredUpgrade('Origin crucible', 'Built from the rarest of earths and located at the very deepest of the largest mountain, this legendary crucible is said to retain properties from the big-bang itself.', 'Alchemy lab', 6); - order = 800; Game.TieredUpgrade('Deity-sized portals', 'It\'s almost like, say, an elder god could fit through this thing now. Hypothetically.', 'Portal', 6); - order = 900; Game.TieredUpgrade('Far future enactment', 'The far future enactment authorizes you to delve deep into the future - where civilization has fallen and risen again, and cookies are plentiful.', 'Time machine', 6); - order = 1000; Game.TieredUpgrade('Nanocosmics', 'The theory of nanocosmics posits that each subatomic particle is in fact its own self-contained universe, holding unfathomable amounts of energy.
This somehow stacks with the nested universe theory, because physics.
', 'Antimatter condenser', 6); - order = 1100; - Game.TieredUpgrade('Glow-in-the-dark', 'Your prisms now glow in the dark, effectively doubling their output!', 'Prism', 6); - - order = 10032; - Game.NewUpgradeCookie({ name: 'Rose macarons', desc: 'Although an odd flavor, these pastries recently rose in popularity.', icon: [22, 3], require: 'Box of macarons', power: 3, price: 9999 }); - Game.NewUpgradeCookie({ name: 'Lemon macarons', desc: 'Tastefully sour, delightful treats.', icon: [23, 3], require: 'Box of macarons', power: 3, price: 9999999 }); - Game.NewUpgradeCookie({ name: 'Chocolate macarons', desc: 'They\'re like tiny sugary burgers!', icon: [24, 3], require: 'Box of macarons', power: 3, price: 9999999999 }); - Game.NewUpgradeCookie({ name: 'Pistachio macarons', desc: 'Pistachio shells now removed after multiple complaints.', icon: [22, 4], require: 'Box of macarons', power: 3, price: 9999999999999 }); - Game.NewUpgradeCookie({ name: 'Hazelnut macarons', desc: 'These go especially well with coffee.', icon: [23, 4], require: 'Box of macarons', power: 3, price: 9999999999999999 }); - Game.NewUpgradeCookie({ name: 'Violet macarons', desc: 'It\'s like spraying perfume into your mouth!', icon: [24, 4], require: 'Box of macarons', power: 3, price: 9999999999999999999 }); - - order = 40000; - new Game.Upgrade('Magic shenanigans', loc("Cookie production multiplied by 1,000.") + 'It\'s magic. I ain\'t gotta explain sh
t.
', 7, [17, 5]);//debug purposes only - Game.last.pool = 'debug'; - - - order = 24000; - new Game.Upgrade('Bunny biscuit', loc("Triggers %1 season for the next 24 hours.
Triggering another season will cancel this one.
Cost scales with unbuffed CpS and increases with every season switch.", loc("Easter")) + 'All the world will be your enemy
and when they catch you,
they will kill you...
but first they must catch you.
', Game.seasonTriggerBasePrice, [0, 12]); Game.last.season = 'easter'; Game.last.pool = 'toggle'; - - var eggPrice = 999999999999; - var eggPrice2 = 99999999999999; - new Game.Upgrade('Chicken egg', getStrCookieProductionMultiplierPlus(1) + '
' + loc("Cost scales with how many eggs you own.") + 'The egg. The egg came first. Get over it.', eggPrice, [1, 12]); - new Game.Upgrade('Duck egg', getStrCookieProductionMultiplierPlus(1) + '
' + loc("Cost scales with how many eggs you own.") + 'Then he waddled away.', eggPrice, [2, 12]); - new Game.Upgrade('Turkey egg', getStrCookieProductionMultiplierPlus(1) + '
' + loc("Cost scales with how many eggs you own.") + 'These hatch into strange, hand-shaped creatures.', eggPrice, [3, 12]); - new Game.Upgrade('Quail egg', getStrCookieProductionMultiplierPlus(1) + '
' + loc("Cost scales with how many eggs you own.") + 'These eggs are positively tiny. I mean look at them. How does this happen? Whose idea was that?', eggPrice, [4, 12]); - new Game.Upgrade('Robin egg', getStrCookieProductionMultiplierPlus(1) + '
' + loc("Cost scales with how many eggs you own.") + 'Holy azure-hued shelled embryos!', eggPrice, [5, 12]); - new Game.Upgrade('Ostrich egg', getStrCookieProductionMultiplierPlus(1) + '
' + loc("Cost scales with how many eggs you own.") + 'One of the largest eggs in the world. More like ostrouch, am I right?
Guys?
', eggPrice, [6, 12]); - new Game.Upgrade('Cassowary egg', getStrCookieProductionMultiplierPlus(1) + '
' + loc("Cost scales with how many eggs you own.") + 'The cassowary is taller than you, possesses murderous claws and can easily outrun you.
You\'d do well to be casso-wary of them.
', eggPrice, [7, 12]); - new Game.Upgrade('Salmon roe', getStrCookieProductionMultiplierPlus(1) + '
' + loc("Cost scales with how many eggs you own.") + 'Do the impossible, see the invisible.
Roe roe, fight the power?
', eggPrice, [8, 12]); - new Game.Upgrade('Frogspawn', getStrCookieProductionMultiplierPlus(1) + '
' + loc("Cost scales with how many eggs you own.") + 'I was going to make a pun about how these "toadally look like eyeballs", but froget it.', eggPrice, [9, 12]); - new Game.Upgrade('Shark egg', getStrCookieProductionMultiplierPlus(1) + '
' + loc("Cost scales with how many eggs you own.") + 'HELLO IS THIS FOOD?
LET ME TELL YOU ABOUT FOOD.
WHY DO I KEEP EATING MY FRIENDS
', eggPrice, [10, 12]); - new Game.Upgrade('Turtle egg', getStrCookieProductionMultiplierPlus(1) + '
' + loc("Cost scales with how many eggs you own.") + 'Turtles, right? Hatch from shells. Grow into shells. What\'s up with that?
Now for my skit about airplane food.
', eggPrice, [11, 12]); - new Game.Upgrade('Ant larva', getStrCookieProductionMultiplierPlus(1) + '
' + loc("Cost scales with how many eggs you own.") + 'These are a delicacy in some countries, I swear. You will let these invade your digestive tract, and you will derive great pleasure from it.
And all will be well.
', eggPrice, [12, 12]); - new Game.Upgrade('Golden goose egg', loc("Golden cookies appear %1% more often.", 5) + '
' + loc("Cost scales with how many eggs you own.") + 'The sole vestige of a tragic tale involving misguided investments.', eggPrice2, [13, 12]); - new Game.Upgrade('Faberge egg', loc("All buildings and upgrades are %1% cheaper.", 1) + '
' + loc("Cost scales with how many eggs you own.") + 'This outrageous egg is definitely fab.', eggPrice2, [14, 12], function () { Game.storeToRefresh = 1; }); - new Game.Upgrade('Wrinklerspawn', loc("Wrinklers explode into %1% more cookies.", 5) + '
' + loc("Cost scales with how many eggs you own.") + 'Look at this little guy! It\'s gonna be a big boy someday! Yes it is!', eggPrice2, [15, 12]); - new Game.Upgrade('Cookie egg', loc("Clicking is %1% more powerful.", 10) + '
' + loc("Cost scales with how many eggs you own.") + 'The shell appears to be chipped.
I wonder what\'s inside this one!
', eggPrice2, [16, 12]); - new Game.Upgrade('Omelette', loc("Other eggs appear %1% more frequently.", 10) + '
' + loc("Cost scales with how many eggs you own.") + 'Fromage not included.', eggPrice2, [17, 12]); - new Game.Upgrade('Chocolate egg', loc("Contains a lot of cookies.") + '
' + loc("Cost scales with how many eggs you own.") + 'Laid by the elusive cocoa bird. There\'s a surprise inside!', eggPrice2, [18, 12], function () { - var cookies = Game.cookies * 0.05; - Game.Notify('Chocolate egg', loc("The egg bursts into %1 cookies!", Beautify(cookies)), Game.Upgrades['Chocolate egg'].icon); - Game.Earn(cookies); - }); - new Game.Upgrade('Century egg', loc("You continually gain more CpS the longer you've played in the current ascension.") + '
' + loc("Cost scales with how many eggs you own.") + 'Actually not centuries-old. This one isn\'t a day over 86!', eggPrice2, [19, 12]); - Game.last.descFunc = function () { - var day = Math.floor((Date.now() - Game.startDate) / 1000 / 10) * 10 / 60 / 60 / 24; - day = Math.min(day, 100); - var n = (1 - Math.pow(1 - day / 100, 3)) * 0.1; - return '
' + loc("Current boost:") + ' +' + Beautify(n * 100, 1) + '%
' + this.ddesc; - }; - new Game.Upgrade('"egg"', '' + loc("+%1 CpS", 9) + 'hey it\'s "egg"', eggPrice2, [20, 12]); - - Game.easterEggs = ['Chicken egg', 'Duck egg', 'Turkey egg', 'Quail egg', 'Robin egg', 'Ostrich egg', 'Cassowary egg', 'Salmon roe', 'Frogspawn', 'Shark egg', 'Turtle egg', 'Ant larva', 'Golden goose egg', 'Faberge egg', 'Wrinklerspawn', 'Cookie egg', 'Omelette', 'Chocolate egg', 'Century egg', '"egg"']; - Game.eggDrops = ['Chicken egg', 'Duck egg', 'Turkey egg', 'Quail egg', 'Robin egg', 'Ostrich egg', 'Cassowary egg', 'Salmon roe', 'Frogspawn', 'Shark egg', 'Turtle egg', 'Ant larva']; - Game.rareEggDrops = ['Golden goose egg', 'Faberge egg', 'Wrinklerspawn', 'Cookie egg', 'Omelette', 'Chocolate egg', 'Century egg', '"egg"']; - - Game.GetHowManyEggs = function () { - var num = 0; - for (var i in Game.easterEggs) { if (Game.Has(Game.easterEggs[i])) num++; } - return num; - } - for (var i in Game.eggDrops)//scale egg prices to how many eggs you have - { Game.Upgrades[Game.eggDrops[i]].priceFunc = function () { return Math.pow(2, Game.GetHowManyEggs()) * 999; } } - - for (var i in Game.rareEggDrops) { Game.Upgrades[Game.rareEggDrops[i]].priceFunc = function () { return Math.pow(3, Game.GetHowManyEggs()) * 999; } } - - - Game.DropEgg = function (failRate) { - failRate *= 1 / Game.dropRateMult(); - if (Game.season != 'easter') return; - if (Game.HasAchiev('Hide & seek champion')) failRate *= 0.7; - if (Game.Has('Omelette')) failRate *= 0.9; - if (Game.Has('Starspawn')) failRate *= 0.9; - if (Game.hasGod) { - var godLvl = Game.hasGod('seasons'); - if (godLvl == 1) failRate *= 0.9; - else if (godLvl == 2) failRate *= 0.95; - else if (godLvl == 3) failRate *= 0.97; - } - if (Math.random() >= failRate) { - var drop = ''; - if (Math.random() < 0.1) drop = choose(Game.rareEggDrops); - else drop = choose(Game.eggDrops); - if (Game.Has(drop) || Game.HasUnlocked(drop))//reroll if we have it - { - if (Math.random() < 0.1) drop = choose(Game.rareEggDrops); - else drop = choose(Game.eggDrops); - } - if (Game.Has(drop) || Game.HasUnlocked(drop)) return; - Game.Unlock(drop); - Game.Notify(loc("You found an egg!"), '' + drop + '', Game.Upgrades[drop].icon); - } - }; - - order = 10032; - Game.NewUpgradeCookie({ name: 'Caramel macarons', desc: 'The saltiest, chewiest of them all.', icon: [25, 3], require: 'Box of macarons', power: 3, price: 9999999999999999999999 }); - Game.NewUpgradeCookie({ name: 'Licorice macarons', desc: 'Also known as "blackarons".', icon: [25, 4], require: 'Box of macarons', power: 3, price: 9999999999999999999999999 }); - - - order = 525; - Game.TieredUpgrade('Taller tellers', 'Able to process a higher amount of transactions. Careful though, as taller tellers tell tall tales.', 'Bank', 1); - Game.TieredUpgrade('Scissor-resistant credit cards', 'For those truly valued customers.', 'Bank', 2); - Game.TieredUpgrade('Acid-proof vaults', 'You know what they say : better safe than sorry.', 'Bank', 3); - Game.TieredUpgrade('Chocolate coins', 'This revolutionary currency is much easier to melt from and into ingots - and tastes much better, for a change.', 'Bank', 4); - Game.TieredUpgrade('Exponential interest rates', 'Can\'t argue with mathematics! Now fork it over.', 'Bank', 5); - Game.TieredUpgrade('Financial zen', 'The ultimate grail of economic thought; the feng shui of big money, the stock market yoga - the Heimlich maneuver of dimes and nickels.', 'Bank', 6); - - order = 550; - Game.TieredUpgrade('Golden idols', 'Lure even greedier adventurers to retrieve your cookies. Now that\'s a real idol game!', 'Temple', 1); - Game.TieredUpgrade('Sacrifices', 'What\'s a life to a gigaton of cookies?', 'Temple', 2); - Game.TieredUpgrade('Delicious blessing', 'And lo, the Baker\'s almighty spoon came down and distributed holy gifts unto the believers - shimmering sugar, and chocolate dark as night, and all manner of wheats. And boy let me tell you, that party was mighty gnarly.', 'Temple', 3); - Game.TieredUpgrade('Sun festival', 'Free the primordial powers of your temples with these annual celebrations involving fire-breathers, traditional dancing, ritual beheadings and other merriments!', 'Temple', 4); - Game.TieredUpgrade('Enlarged pantheon', 'Enough spiritual inadequacy! More divinities than you\'ll ever need, or your money back! 100% guaranteed!', 'Temple', 5); - Game.TieredUpgrade('Great Baker in the sky', 'This is it. The ultimate deity has finally cast Their sublimely divine eye upon your operation; whether this is a good thing or possibly the end of days is something you should find out very soon.', 'Temple', 6); - - order = 575; - Game.TieredUpgrade('Pointier hats', 'Tests have shown increased thaumic receptivity relative to the geometric proportions of wizardly conic implements.', 'Wizard tower', 1); - Game.TieredUpgrade('Beardlier beards', 'Haven\'t you heard? The beard is the word.', 'Wizard tower', 2); - Game.TieredUpgrade('Ancient grimoires', 'Contain interesting spells such as "Turn Water To Drool", "Grow Eyebrows On Furniture" and "Summon Politician".', 'Wizard tower', 3); - Game.TieredUpgrade('Kitchen curses', 'Exotic magic involved in all things pastry-related. Hexcellent!', 'Wizard tower', 4); - Game.TieredUpgrade('School of sorcery', 'This cookie-funded academy of witchcraft is home to the 4 prestigious houses of magic : the Jocks, the Nerds, the Preps, and the Deathmunchers.', 'Wizard tower', 5); - Game.TieredUpgrade('Dark formulas', 'Eldritch forces are at work behind these spells - you get the feeling you really shouldn\'t be messing with those. But I mean, free cookies, right?', 'Wizard tower', 6); - - - order = 250; - Game.GrandmaSynergy('Banker grandmas', 'A nice banker to cash in more cookies.', 'Bank'); Game.last.order = 250.0591; - Game.GrandmaSynergy('Priestess grandmas', 'A nice priestess to praise the one true Baker in the sky.', 'Temple'); Game.last.order = 250.0592; - Game.GrandmaSynergy('Witch grandmas', 'A nice witch to cast a zip, and a zoop, and poof! Cookies.', 'Wizard tower'); Game.last.order = 250.0593; - - - - order = 0; - new Game.Upgrade('Tin of british tea biscuits', loc("Contains an assortment of fancy biscuits.") + 'Every time is tea time.', 25, [21, 8]); Game.last.pool = 'prestige'; Game.last.parents = ['Heavenly cookies']; - new Game.Upgrade('Box of macarons', loc("Contains an assortment of macarons.") + 'Multicolored delicacies filled with various kinds of jam.
Not to be confused with macaroons, macaroni, macarena or any of that nonsense.
', 25, [20, 8]); Game.last.pool = 'prestige'; Game.last.parents = ['Heavenly cookies']; - new Game.Upgrade('Box of brand biscuits', loc("Contains an assortment of popular biscuits.") + 'They\'re brand new!', 25, [20, 9]); Game.last.pool = 'prestige'; Game.last.parents = ['Heavenly cookies']; - - order = 10020; - Game.NewUpgradeCookie({ name: 'Pure black chocolate cookies', desc: 'Dipped in a lab-made substance darker than the darkest cocoa (dubbed "chocoalate").', icon: [26, 3], power: 5, price: 9999999999999999 * 5 }); - Game.NewUpgradeCookie({ name: 'Pure white chocolate cookies', desc: 'Elaborated on the nano-scale, the coating on this biscuit is able to refract light even in a pitch-black environment.', icon: [26, 4], power: 5, price: 9999999999999999 * 5 }); - Game.NewUpgradeCookie({ name: 'Ladyfingers', desc: 'Cleaned and sanitized so well you\'d swear they\'re actual biscuits.', icon: [27, 3], power: 3, price: 99999999999999999 }); - Game.NewUpgradeCookie({ name: 'Tuiles', desc: 'These never go out of tile.', icon: [27, 4], power: 3, price: 99999999999999999 * 5 }); - Game.NewUpgradeCookie({ name: 'Chocolate-stuffed biscuits', desc: 'A princely snack!
The holes are so the chocolate stuffing can breathe.', icon: [28, 3], power: 3, price: 999999999999999999 }); - Game.NewUpgradeCookie({ name: 'Checker cookies', desc: 'A square cookie? This solves so many storage and packaging problems! You\'re a genius!', icon: [28, 4], power: 3, price: 999999999999999999 * 5 }); - Game.NewUpgradeCookie({ name: 'Butter cookies', desc: 'These melt right off your mouth and into your heart. (Let\'s face it, they\'re rather fattening.)', icon: [29, 3], power: 3, price: 9999999999999999999 }); - Game.NewUpgradeCookie({ name: 'Cream cookies', desc: 'It\'s like two chocolate chip cookies! But brought together with the magic of cream! It\'s fiendishly perfect!', icon: [29, 4], power: 3, price: 9999999999999999999 * 5 }); - - order = 0; - var desc = loc("Placing an upgrade in this slot will make its effects permanent across all playthroughs."); - new Game.Upgrade('Permanent upgrade slot I', desc, 100, [0, 10]); Game.last.pool = 'prestige'; Game.last.iconFunction = function () { return Game.PermanentSlotIcon(0); }; Game.last.activateFunction = function () { Game.AssignPermanentSlot(0); }; - new Game.Upgrade('Permanent upgrade slot II', desc, 20000, [1, 10]); Game.last.pool = 'prestige'; Game.last.parents = ['Permanent upgrade slot I']; Game.last.iconFunction = function () { return Game.PermanentSlotIcon(1); }; Game.last.activateFunction = function () { Game.AssignPermanentSlot(1); }; - new Game.Upgrade('Permanent upgrade slot III', desc, 3000000, [2, 10]); Game.last.pool = 'prestige'; Game.last.parents = ['Permanent upgrade slot II']; Game.last.iconFunction = function () { return Game.PermanentSlotIcon(2); }; Game.last.activateFunction = function () { Game.AssignPermanentSlot(2); }; - new Game.Upgrade('Permanent upgrade slot IV', desc, 400000000, [3, 10]); Game.last.pool = 'prestige'; Game.last.parents = ['Permanent upgrade slot III']; Game.last.iconFunction = function () { return Game.PermanentSlotIcon(3); }; Game.last.activateFunction = function () { Game.AssignPermanentSlot(3); }; - new Game.Upgrade('Permanent upgrade slot V', desc, 50000000000, [4, 10]); Game.last.pool = 'prestige'; Game.last.parents = ['Permanent upgrade slot IV']; Game.last.iconFunction = function () { return Game.PermanentSlotIcon(4); }; Game.last.activateFunction = function () { Game.AssignPermanentSlot(4); }; - - var slots = ['Permanent upgrade slot I', 'Permanent upgrade slot II', 'Permanent upgrade slot III', 'Permanent upgrade slot IV', 'Permanent upgrade slot V']; - for (var i = 0; i < slots.length; i++) { - Game.Upgrades[slots[i]].descFunc = function (i) { - return function (context) { - if (Game.permanentUpgrades[i] == -1) return this.desc + (context == 'stats' ? '' : '
' + loc("Click to activate.") + ''); - var upgrade = Game.UpgradesById[Game.permanentUpgrades[i]]; - return '
' + loc("Current:") + ' ' + tinyIcon(upgrade.icon) + ' ' + upgrade.dname + '
' + this.ddesc + (context == 'stats' ? '' : '
' + loc("Click to activate.") + ''); - }; - }(i); - } - - Game.PermanentSlotIcon = function (slot) { - if (Game.permanentUpgrades[slot] == -1) return [slot, 10]; - return Game.UpgradesById[Game.permanentUpgrades[slot]].icon; - } - Game.AssignPermanentSlot = function (slot) { - PlaySound('snd/tick.mp3'); - Game.tooltip.hide(); - var list = []; - for (var i in Game.Upgrades) { - var me = Game.Upgrades[i]; - if (me.bought && me.unlocked && !me.noPerm && (me.pool == '' || me.pool == 'cookie')) { - var fail = 0; - for (var ii in Game.permanentUpgrades) { if (Game.permanentUpgrades[ii] == me.id) fail = 1; }//check if not already in another permaslot - if (!fail) list.push(me); - } - } - - 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); - - var upgrades = ''; - for (var i in list) { - var me = list[i]; - upgrades += Game.crate(me, '', 'PlaySound(\'snd/tick.mp3\');Game.PutUpgradeInPermanentSlot(' + me.id + ',' + slot + ');', 'upgradeForPermanent' + me.id); - } - var upgrade = Game.permanentUpgrades[slot]; - Game.SelectingPermanentUpgrade = upgrade; - Game.Prompt('

' + loc("Pick an upgrade to make permanent") + '

' + - - '
' + (Game.crate(Game.UpgradesById[upgrade == -1 ? 0 : upgrade], '', '', 'upgradeToSlot')) + '
' + - '
' + upgrades + '
' + - '
' + loc("Here are all the upgrades you've purchased last playthrough.
Pick one to permanently gain its effects!
You can reassign this slot anytime you ascend.") + '
' - , [[loc("Confirm"), 'Game.permanentUpgrades[' + slot + ']=Game.SelectingPermanentUpgrade;Game.BuildAscendTree();Game.ClosePrompt();'], loc("Cancel")], 0, 'widePrompt'); - } - Game.SelectingPermanentUpgrade = -1; - Game.PutUpgradeInPermanentSlot = function (upgrade, slot) { - Game.SelectingPermanentUpgrade = upgrade; - l('upgradeToSlotWrap').innerHTML = ''; - l('upgradeToSlotWrap').style.display = (upgrade == -1 ? 'none' : 'block'); - l('upgradeToSlotNone').style.display = (upgrade != -1 ? 'none' : 'block'); - l('upgradeToSlotWrap').innerHTML = (Game.crate(Game.UpgradesById[upgrade == -1 ? 0 : upgrade], '', '', 'upgradeToSlot')); - } - - new Game.Upgrade('Starspawn', loc("Eggs drop %1% more often.", 10) + '
' + loc("Golden cookies appear %1% more often during %2.", [2, loc("Easter")]), 111111, [0, 12]); Game.last.pool = 'prestige'; Game.last.parents = ['Season switcher']; - new Game.Upgrade('Starsnow', loc("Christmas cookies drop %1% more often.", 5) + '
' + loc("Reindeer appear %1% more often.", 5), 111111, [12, 9]); Game.last.pool = 'prestige'; Game.last.parents = ['Season switcher']; - new Game.Upgrade('Starterror', loc("Spooky cookies drop %1% more often.", 10) + '
' + loc("Golden cookies appear %1% more often during %2.", [2, loc("Halloween")]), 111111, [13, 8]); Game.last.pool = 'prestige'; Game.last.parents = ['Season switcher']; - new Game.Upgrade('Starlove', loc("Heart cookies are %1% more powerful.", 50) + '
' + loc("Golden cookies appear %1% more often during %2.", [2, loc("Valentine's day")]), 111111, [20, 3]); Game.last.pool = 'prestige'; Game.last.parents = ['Season switcher']; - new Game.Upgrade('Startrade', loc("Golden cookies appear %1% more often during %2.", [5, loc("Business day")]), 111111, [17, 6]); Game.last.pool = 'prestige'; Game.last.parents = ['Season switcher']; - - var angelPriceFactor = 7; - var desc = function (percent, total) { return loc("You gain another +%1% of your regular CpS while the game is closed, for a total of %2%.", [percent, total]); } - new Game.Upgrade('Angels', desc(10, 15) + 'Lowest-ranking at the first sphere of pastry heaven, angels are tasked with delivering new recipes to the mortals they deem worthy.', Math.pow(angelPriceFactor, 1), [0, 11]); Game.last.pool = 'prestige'; Game.last.parents = ['Twin Gates of Transcendence']; - new Game.Upgrade('Archangels', desc(10, 25) + 'Members of the first sphere of pastry heaven, archangels are responsible for the smooth functioning of the world\'s largest bakeries.', Math.pow(angelPriceFactor, 2), [1, 11]); Game.last.pool = 'prestige'; Game.last.parents = ['Angels']; - new Game.Upgrade('Virtues', desc(10, 35) + 'Found at the second sphere of pastry heaven, virtues make use of their heavenly strength to push and drag the stars of the cosmos.', Math.pow(angelPriceFactor, 3), [2, 11]); Game.last.pool = 'prestige'; Game.last.parents = ['Archangels']; - new Game.Upgrade('Dominions', desc(10, 45) + 'Ruling over the second sphere of pastry heaven, dominions hold a managerial position and are in charge of accounting and regulating schedules.', Math.pow(angelPriceFactor, 4), [3, 11]); Game.last.pool = 'prestige'; Game.last.parents = ['Virtues']; - new Game.Upgrade('Cherubim', desc(10, 55) + 'Sieging at the first sphere of pastry heaven, the four-faced cherubim serve as heavenly bouncers and bodyguards.', Math.pow(angelPriceFactor, 5), [4, 11]); Game.last.pool = 'prestige'; Game.last.parents = ['Dominions']; - new Game.Upgrade('Seraphim', desc(10, 65) + 'Leading the first sphere of pastry heaven, seraphim possess ultimate knowledge of everything pertaining to baking.', Math.pow(angelPriceFactor, 6), [5, 11]); Game.last.pool = 'prestige'; Game.last.parents = ['Cherubim']; - new Game.Upgrade('God', desc(10, 75) + 'Like Santa, but less fun.', Math.pow(angelPriceFactor, 7), [6, 11]); Game.last.pool = 'prestige'; Game.last.parents = ['Seraphim']; - - new Game.Upgrade('Twin Gates of Transcendence', loc("You now keep making cookies while the game is closed, at the rate of %1% of your regular CpS and up to 1 hour after the game is closed.
(Beyond 1 hour, this is reduced by a further %2% - your rate goes down to %3% of your CpS.)", [5, 90, 0.5]) + 'This is one occasion you\'re always underdressed for. Don\'t worry, just rush in past the bouncer and pretend you know people.', 1, [15, 11]); Game.last.pool = 'prestige'; - - new Game.Upgrade('Heavenly luck', loc("Golden cookies appear %1% more often.", 5) + 'Someone up there likes you.', 77, [22, 6]); Game.last.pool = 'prestige'; - new Game.Upgrade('Lasting fortune', loc("Golden cookie effects last %1% longer.", 10) + 'This isn\'t your average everyday luck. This is... advanced luck.', 777, [23, 6]); Game.last.pool = 'prestige'; Game.last.parents = ['Heavenly luck']; - new Game.Upgrade('Decisive fate', loc("Golden cookies stay %1% longer.", 5) + 'Life just got a bit more intense.', 7777, [10, 14]); Game.last.pool = 'prestige'; Game.last.parents = ['Lasting fortune']; - - new Game.Upgrade('Divine discount', loc("All buildings are %1% cheaper.", 1) + 'Someone special deserves a special price.', 99999, [21, 7]); Game.last.pool = 'prestige'; Game.last.parents = ['Decisive fate']; - new Game.Upgrade('Divine sales', loc("All upgrades are %1% cheaper.", 1) + 'Everything must go!', 99999, [18, 7]); Game.last.pool = 'prestige'; Game.last.parents = ['Decisive fate']; - new Game.Upgrade('Divine bakeries', loc("Cookie upgrades are %1 times cheaper.", 5) + 'They sure know what they\'re doing.', 399999, [17, 7]); Game.last.pool = 'prestige'; Game.last.parents = ['Divine sales', 'Divine discount']; - - new Game.Upgrade('Starter kit', loc("You start with %1.", loc("%1 cursor", 10)) + 'This can come in handy.', 50, [0, 14]); Game.last.pool = 'prestige'; Game.last.parents = ['Tin of british tea biscuits', 'Box of macarons', 'Box of brand biscuits', 'Tin of butter cookies']; - new Game.Upgrade('Starter kitchen', loc("You start with %1.", loc("%1 grandma", 5)) + 'Where did these come from?', 5000, [1, 14]); Game.last.pool = 'prestige'; Game.last.parents = ['Starter kit']; - new Game.Upgrade('Halo gloves', loc("Clicking is %1% more powerful.", 10) + 'Smite that cookie.', 55555, [22, 7]); Game.last.pool = 'prestige'; Game.last.parents = ['Starter kit']; - - new Game.Upgrade('Kitten angels', strKittenDesc + 'All cats go to heaven.', 9000, [23, 7]); Game.last.pool = 'prestige'; Game.last.parents = ['Dominions']; Game.last.kitten = 1; - - new Game.Upgrade('Unholy bait', loc("Wrinklers appear %1 times as fast.", 5) + 'No wrinkler can resist the scent of worm biscuits.', 44444, [15, 12]); Game.last.pool = 'prestige'; Game.last.parents = ['Starter kitchen']; - new Game.Upgrade('Sacrilegious corruption', loc("Wrinklers explode into %1% more cookies.", 5) + 'Unique in the animal kingdom, the wrinkler digestive tract is able to withstand an incredible degree of dilation - provided you prod them appropriately.', 444444, [19, 8]); Game.last.pool = 'prestige'; Game.last.parents = ['Unholy bait']; - - - order = 200; Game.TieredUpgrade('Xtreme walkers', 'Complete with flame decals and a little horn that goes "toot".', 'Grandma', 7); - order = 300; Game.TieredUpgrade('Fudge fungus', 'A sugary parasite whose tendrils help cookie growth.
Please do not breathe in the spores. In case of spore ingestion, seek medical help within the next 36 seconds.
', 'Farm', 7); - order = 400; Game.TieredUpgrade('Planetsplitters', 'These new state-of-the-art excavators have been tested on Merula, Globort and Flwanza VI, among other distant planets which have been curiously quiet lately.', 'Mine', 7); - order = 500; Game.TieredUpgrade('Cyborg workforce', 'Semi-synthetic organisms don\'t slack off, don\'t unionize, and have 20% shorter lunch breaks, making them ideal labor fodder.', 'Factory', 7); - order = 525; Game.TieredUpgrade('Way of the wallet', 'This new monetary school of thought is all the rage on the banking scene; follow its precepts and you may just profit from it.', 'Bank', 7); - order = 550; Game.TieredUpgrade('Creation myth', 'Stories have been circulating about the origins of the very first cookie that was ever baked; tales of how it all began, in the Dough beyond time and the Ovens of destiny.', 'Temple', 7); - order = 575; Game.TieredUpgrade('Cookiemancy', 'There it is; the perfected school of baking magic. From summoning chips to hexing nuts, there is not a single part of cookie-making that hasn\'t been improved tenfold by magic tricks.', 'Wizard tower', 7); - order = 600; Game.TieredUpgrade('Dyson sphere', 'You\'ve found a way to apply your knowledge of cosmic technology to slightly more local endeavors; this gigantic sphere of meta-materials, wrapping the solar system, is sure to kick your baking abilities up a notch.', 'Shipment', 7); - order = 700; Game.TieredUpgrade('Theory of atomic fluidity', 'Pushing alchemy to its most extreme limits, you find that everything is transmutable into anything else - lead to gold, mercury to water; more importantly, you realize that anything can -and should- be converted to cookies.', 'Alchemy lab', 7); - order = 800; Game.TieredUpgrade('End of times back-up plan', 'Just in case, alright?', 'Portal', 7); - order = 900; Game.TieredUpgrade('Great loop hypothesis', 'What if our universe is just one instance of an infinite cycle? What if, before and after it, stretched infinite amounts of the same universe, themselves containing infinite amounts of cookies?', 'Time machine', 7); - order = 1000; Game.TieredUpgrade('The Pulse', 'You\'ve tapped into the very pulse of the cosmos, a timeless rhythm along which every material and antimaterial thing beats in unison. This, somehow, means more cookies.', 'Antimatter condenser', 7); - order = 1100; - Game.TieredUpgrade('Lux sanctorum', 'Your prism attendants have become increasingly mesmerized with something in the light - or maybe something beyond it; beyond us all, perhaps?', 'Prism', 7); - - - order = 200; Game.TieredUpgrade('The Unbridling', 'It might be a classic tale of bad parenting, but let\'s see where grandma is going with this.', 'Grandma', 8); - order = 300; Game.TieredUpgrade('Wheat triffids', 'Taking care of crops is so much easier when your plants can just walk about and help around the farm.
Do not pet. Do not feed. Do not attempt to converse with.
', 'Farm', 8); - order = 400; Game.TieredUpgrade('Canola oil wells', 'A previously untapped resource, canola oil permeates the underground olifers which grant it its particular taste and lucrative properties.', 'Mine', 8); - order = 500; Game.TieredUpgrade('78-hour days', 'Why didn\'t we think of this earlier?', 'Factory', 8); - order = 525; Game.TieredUpgrade('The stuff rationale', 'If not now, when? If not it, what? If not things... stuff?', 'Bank', 8); - order = 550; Game.TieredUpgrade('Theocracy', 'You\'ve turned your cookie empire into a perfect theocracy, gathering the adoration of zillions of followers from every corner of the universe.
Don\'t let it go to your head.
', 'Temple', 8); - order = 575; Game.TieredUpgrade('Rabbit trick', 'Using nothing more than a fancy top hat, your wizards have found a way to simultaneously curb rabbit population and produce heaps of extra cookies for basically free!
Resulting cookies may or may not be fit for vegans.
', 'Wizard tower', 8); - order = 600; Game.TieredUpgrade('The final frontier', 'It\'s been a long road, getting from there to here. It\'s all worth it though - the sights are lovely and the oil prices slightly more reasonable.', 'Shipment', 8); - order = 700; Game.TieredUpgrade('Beige goo', 'Well now you\'ve done it. Good job. Very nice. That\'s 3 galaxies you\'ve just converted into cookies. Good thing you can hop from universe to universe.', 'Alchemy lab', 8); - order = 800; Game.TieredUpgrade('Maddening chants', 'A popular verse goes like so : "jau\'hn madden jau\'hn madden aeiouaeiouaeiou brbrbrbrbrbrbr"', 'Portal', 8); - order = 900; Game.TieredUpgrade('Cookietopian moments of maybe', 'Reminiscing how things could have been, should have been, will have been.', 'Time machine', 8); - order = 1000; Game.TieredUpgrade('Some other super-tiny fundamental particle? Probably?', 'When even the universe is running out of ideas, that\'s when you know you\'re nearing the end.', 'Antimatter condenser', 8); - order = 1100; - Game.TieredUpgrade('Reverse shadows', 'Oh man, this is really messing with your eyes.', 'Prism', 8); - - - order = 20000; - new Game.Upgrade('Kitten accountants', strKittenDesc + 'business going great, sir', 900000000000000000000000, Game.GetIcon('Kitten', 6)); Game.last.kitten = 1; Game.MakeTiered(Game.last, 6, 18); - new Game.Upgrade('Kitten specialists', strKittenDesc + 'optimeowzing your workflow like whoah, sir', 900000000000000000000000000, Game.GetIcon('Kitten', 7)); Game.last.kitten = 1; Game.MakeTiered(Game.last, 7, 18); - new Game.Upgrade('Kitten experts', strKittenDesc + '10 years expurrrtise in the cookie business, sir', 900000000000000000000000000000, Game.GetIcon('Kitten', 8)); Game.last.kitten = 1; Game.MakeTiered(Game.last, 8, 18); - - new Game.Upgrade('How to bake your dragon', loc("Allows you to purchase a crumbly egg once you have earned 1 million cookies.") + 'A tome full of helpful tips such as "oh god, stay away from it", "why did we buy this thing, it\'s not even house-broken" and "groom twice a week in the direction of the scales".', 9, [22, 12]); Game.last.pool = 'prestige'; - - order = 25100; - new Game.Upgrade('A crumbly egg', loc("Unlocks the cookie dragon egg.") + 'Thank you for adopting this robust, fun-loving cookie dragon! It will bring you years of joy and entertainment.
Keep in a dry and cool place, and away from other house pets. Subscription to home insurance is strongly advised.
', 25, [21, 12]); - - new Game.Upgrade('Chimera', loc("Synergy upgrades are %1% cheaper.", 2) + '
' + loc("You gain another +%1% of your regular CpS while the game is closed.", 5) + '
' + loc("You retain optimal cookie production while the game is closed for %1 more days.", 2) + 'More than the sum of its parts.', Math.pow(angelPriceFactor, 9), [24, 7]); Game.last.pool = 'prestige'; Game.last.parents = ['God', 'Lucifer', 'Synergies Vol. II']; - - new Game.Upgrade('Tin of butter cookies', loc("Contains an assortment of rich butter cookies.") + 'Five varieties of danish cookies.
Complete with little paper cups.
', 25, [21, 9]); Game.last.pool = 'prestige'; Game.last.parents = ['Heavenly cookies']; - - new Game.Upgrade('Golden switch', loc("Unlocks the golden switch, which passively boosts your CpS by %1% but disables golden cookies.", 50) + 'Less clicking, more idling.', 999, [21, 10]); Game.last.pool = 'prestige'; Game.last.parents = ['Heavenly luck']; - - new Game.Upgrade('Classic dairy selection', loc("Unlocks the milk selector, letting you pick which milk is displayed under your cookie.
Comes with a variety of basic flavors.") + 'Don\'t have a cow, man.', 9, [1, 8]); Game.last.pool = 'prestige'; Game.last.parents = []; - - new Game.Upgrade('Fanciful dairy selection', loc("Contains more exotic flavors for your milk selector.") + 'Strong bones for the skeleton army.', 1000000, [9, 7]); Game.last.pool = 'prestige'; Game.last.parents = ['Classic dairy selection']; - - order = 10300; - Game.NewUpgradeCookie({ name: 'Dragon cookie', desc: 'Imbued with the vigor and vitality of a full-grown cookie dragon, this mystical cookie will embolden your empire for the generations to come.', icon: [10, 25], power: 5, price: 9999999999999999 * 7, locked: 1 }); - - - order = 40000; - new Game.Upgrade('Golden switch [off]', loc("Turning this on will give you a passive +%1% CpS, but prevents golden cookies from spawning.
Cost is equal to 1 hour of production.", 50), 1000000, [20, 10]); - Game.last.pool = 'toggle'; Game.last.toggleInto = 'Golden switch [on]'; - Game.last.priceFunc = function () { return Game.cookiesPs * 60 * 60; } - var func = function () { - if (Game.Has('Residual luck')) { - var bonus = 0; - var upgrades = Game.goldenCookieUpgrades; - for (var i in upgrades) { if (Game.Has(upgrades[i])) bonus++; } - return '
' + Game.listTinyOwnedUpgrades(Game.goldenCookieUpgrades) + '

The effective boost is +' + Beautify(Math.round(50 + bonus * 10)) + '%
thanks to residual luck
and your ' + bonus + ' golden cookie upgrade' + (bonus == 1 ? '' : 's') + '.
' + this.ddesc; - } - return this.desc; - }; - if (EN) Game.last.descFunc = func; - - new Game.Upgrade('Golden switch [on]', loc("The switch is currently giving you a passive +%1% CpS; it also prevents golden cookies from spawning.
Turning it off will revert those effects.
Cost is equal to 1 hour of production.", 50), 1000000, [21, 10]); - Game.last.pool = 'toggle'; Game.last.toggleInto = 'Golden switch [off]'; - Game.last.priceFunc = function () { return Game.cookiesPs * 60 * 60; } - Game.last.descFunc = func; - - order = 50000; - new Game.Upgrade('Milk selector', loc("Lets you pick what flavor of milk to display."), 0, [1, 8]); - Game.last.descFunc = function () { - var choice = this.choicesFunction()[Game.milkType]; - if (!choice) choice = this.choicesFunction()[0]; - return '
' + loc("Current:") + ' ' + tinyIcon(choice.icon) + ' ' + choice.name + '
' + this.ddesc; - }; - - Game.last.pool = 'toggle'; - Game.last.choicesFunction = function () { - var rank = 0; - var choices = []; - - for (var i = 0; i < Game.AllMilks.length; i++) { - var it = Game.AllMilks[i]; - choices.push({ name: it.name, icon: it.icon, milk: it, order: it.type }); - } - - choices[11].div = true; - - var maxRank = Math.floor(Game.AchievementsOwned / 25); - for (var i = 0; i < choices.length; i++) { - var it = choices[i].milk; - if (it.type == 1 && !Game.Has('Fanciful dairy selection')) choices[i] = 0; - if (it.rank && it.rank > maxRank) choices[i] = 0; - } - - choices[Game.milkType].selected = 1; - return choices; - } - Game.last.choicesPick = function (id) { Game.milkType = id; } - - - order = 10300; - var butterBiscuitMult = 100000000; - Game.NewUpgradeCookie({ name: 'Milk chocolate butter biscuit', desc: 'Rewarded for owning 100 of everything.
It bears the engraving of a fine entrepreneur.', icon: [27, 8], power: 10, price: 999999999999999999999 * butterBiscuitMult, locked: 1 }); - Game.NewUpgradeCookie({ name: 'Dark chocolate butter biscuit', desc: 'Rewarded for owning 150 of everything.
It is adorned with the image of an experienced cookie tycoon.', icon: [27, 9], power: 10, price: 999999999999999999999999 * butterBiscuitMult, locked: 1 }); - Game.NewUpgradeCookie({ name: 'White chocolate butter biscuit', desc: 'Rewarded for owning 200 of everything.
The chocolate is chiseled to depict a masterful pastry magnate.', icon: [28, 9], power: 10, price: 999999999999999999999999999 * butterBiscuitMult, locked: 1 }); - Game.NewUpgradeCookie({ name: 'Ruby chocolate butter biscuit', desc: 'Rewarded for owning 250 of everything.
Covered in a rare red chocolate, this biscuit is etched to represent the face of a cookie industrialist gone mad with power.', icon: [28, 8], power: 10, price: 999999999999999999999999999999 * butterBiscuitMult, locked: 1 }); - - order = 10020; - Game.NewUpgradeCookie({ name: 'Gingersnaps', desc: 'Cookies with a soul. Probably.', icon: [29, 10], power: 4, price: 99999999999999999999 }); - Game.NewUpgradeCookie({ name: 'Cinnamon cookies', desc: 'The secret is in the patented swirly glazing.', icon: [23, 8], power: 4, price: 99999999999999999999 * 5 }); - Game.NewUpgradeCookie({ name: 'Vanity cookies', desc: 'One tiny candied fruit sits atop this decadent cookie.', icon: [22, 8], power: 4, price: 999999999999999999999 }); - Game.NewUpgradeCookie({ name: 'Cigars', desc: 'Close, but no match for those extravagant cookie straws they serve in coffee shops these days.', icon: [25, 8], power: 4, price: 999999999999999999999 * 5 }); - Game.NewUpgradeCookie({ name: 'Pinwheel cookies', desc: 'Bringing you the dizzying combination of brown flavor and beige taste!', icon: [22, 10], power: 4, price: 9999999999999999999999 }); - Game.NewUpgradeCookie({ name: 'Fudge squares', desc: 'Not exactly cookies, but you won\'t care once you\'ve tasted one of these.
They\'re so good, it\'s fudged-up!', icon: [24, 8], power: 4, price: 9999999999999999999999 * 5 }); - - order = 10030; - Game.NewUpgradeCookie({ name: 'Digits', desc: 'Three flavors, zero phalanges.', icon: [26, 8], require: 'Box of brand biscuits', power: 2, price: 999999999999999 * 5 }); - - order = 10029; - Game.NewUpgradeCookie({ name: 'Butter horseshoes', desc: 'It would behoove you to not overindulge in these.', icon: [22, 9], require: 'Tin of butter cookies', power: 4, price: 99999999999999999999999 }); - Game.NewUpgradeCookie({ name: 'Butter pucks', desc: 'Lord, what fools these mortals be!
(This is kind of a hokey reference.)', icon: [23, 9], require: 'Tin of butter cookies', power: 4, price: 99999999999999999999999 * 5 }); - Game.NewUpgradeCookie({ name: 'Butter knots', desc: 'Look, you can call these pretzels if you want, but you\'d just be fooling yourself, wouldn\'t you?', icon: [24, 9], require: 'Tin of butter cookies', power: 4, price: 999999999999999999999999 }); - Game.NewUpgradeCookie({ name: 'Butter slabs', desc: 'Nothing butter than a slab to the face.', icon: [25, 9], require: 'Tin of butter cookies', power: 4, price: 999999999999999999999999 * 5 }); - Game.NewUpgradeCookie({ name: 'Butter swirls', desc: 'These are equal parts sugar, butter, and warm fuzzy feelings - all of which cause millions of deaths every day.', icon: [26, 9], require: 'Tin of butter cookies', power: 4, price: 9999999999999999999999999 }); - - order = 10020; - Game.NewUpgradeCookie({ name: 'Shortbread biscuits', desc: 'These rich butter cookies are neither short, nor bread. What a country!', icon: [23, 10], power: 4, price: 99999999999999999999999 }); - Game.NewUpgradeCookie({ name: 'Millionaires\' shortbreads', desc: 'Three thought-provoking layers of creamy chocolate, hard-working caramel and crumbly biscuit in a poignant commentary of class struggle.', icon: [24, 10], power: 4, price: 99999999999999999999999 * 5 }); - Game.NewUpgradeCookie({ name: 'Caramel cookies', desc: 'The polymerized carbohydrates adorning these cookies are sure to stick to your teeth for quite a while.', icon: [25, 10], power: 4, price: 999999999999999999999999 }); - - - var desc = function (totalHours) { - return loc("You retain optimal cookie production while the game is closed for twice as long, for a total of %1.", Game.sayTime(totalHours * 60 * 60 * Game.fps, -1)); - } - new Game.Upgrade('Belphegor', desc(2) + 'A demon of shortcuts and laziness, Belphegor commands machines to do work in his stead.', Math.pow(angelPriceFactor, 1), [7, 11]); Game.last.pool = 'prestige'; Game.last.parents = ['Twin Gates of Transcendence']; - new Game.Upgrade('Mammon', desc(4) + 'The demonic embodiment of wealth, Mammon requests a tithe of blood and gold from all his worshippers.', Math.pow(angelPriceFactor, 2), [8, 11]); Game.last.pool = 'prestige'; Game.last.parents = ['Belphegor']; - new Game.Upgrade('Abaddon', desc(8) + 'Master of overindulgence, Abaddon governs the wrinkler brood and inspires their insatiability.', Math.pow(angelPriceFactor, 3), [9, 11]); Game.last.pool = 'prestige'; Game.last.parents = ['Mammon']; - new Game.Upgrade('Satan', desc(16) + 'The counterpoint to everything righteous, this demon represents the nefarious influence of deceit and temptation.', Math.pow(angelPriceFactor, 4), [10, 11]); Game.last.pool = 'prestige'; Game.last.parents = ['Abaddon']; - new Game.Upgrade('Asmodeus', desc(32) + 'This demon with three monstrous heads draws his power from the all-consuming desire for cookies and all things sweet.', Math.pow(angelPriceFactor, 5), [11, 11]); Game.last.pool = 'prestige'; Game.last.parents = ['Satan']; - new Game.Upgrade('Beelzebub', desc(64) + 'The festering incarnation of blight and disease, Beelzebub rules over the vast armies of pastry inferno.', Math.pow(angelPriceFactor, 6), [12, 11]); Game.last.pool = 'prestige'; Game.last.parents = ['Asmodeus']; - new Game.Upgrade('Lucifer', desc(128) + 'Also known as the Lightbringer, this infernal prince\'s tremendous ego caused him to be cast down from pastry heaven.', Math.pow(angelPriceFactor, 7), [13, 11]); Game.last.pool = 'prestige'; Game.last.parents = ['Beelzebub']; - - new Game.Upgrade('Golden cookie alert sound', loc("Unlocks the golden cookie sound selector, which lets you pick whether golden cookies emit a sound when appearing or not.") + 'A sound decision.', 999999, [28, 6]); Game.last.pool = 'prestige'; Game.last.parents = ['Residual luck']; - - order = 49900; - new Game.Upgrade('Golden cookie sound selector', loc("Lets you change the sound golden cookies make when they spawn."), 0, [28, 6]); - Game.last.descFunc = function () { - var choice = this.choicesFunction()[Game.chimeType]; - return '
' + loc("Current:") + ' ' + tinyIcon(choice.icon) + ' ' + choice.name + '
' + this.ddesc; - }; - - Game.last.pool = 'toggle'; - Game.last.choicesFunction = function () { - var choices = []; - choices[0] = { name: 'No sound', icon: [0, 7] }; - choices[1] = { name: 'Chime', icon: [22, 6] }; - choices[2] = { name: 'Fortune', icon: [27, 6] }; - choices[3] = { name: 'Cymbal', icon: [9, 10] }; - choices[4] = { name: 'Squeak', icon: [8, 10] }; - for (var i = 0; i < choices.length; i++) { choices[i].name = loc(choices[i].name); } - - choices[Game.chimeType].selected = 1; - return choices; - } - Game.last.choicesPick = function (id) { - Game.chimeType = id; - Game.playGoldenCookieChime(); - } - Game.playGoldenCookieChime = function () { - if (Game.chimeType == 1) PlaySound('snd/chime.mp3'); - else if (Game.chimeType == 2) PlaySound('snd/fortune.mp3'); - else if (Game.chimeType == 3) PlaySound('snd/cymbalRev.mp3'); - else if (Game.chimeType == 4) { Game.wrinklerSquishSound++; if (Game.wrinklerSquishSound > 4) { Game.wrinklerSquishSound -= 4; } PlaySound('snd/squeak' + (Game.wrinklerSquishSound) + '.mp3'); } - } - - - new Game.Upgrade('Basic wallpaper assortment', loc("Unlocks the background selector, letting you select the game's background.
Comes with a variety of basic flavors.") + 'Prioritizing aesthetics over crucial utilitarian upgrades? Color me impressed.', 99, [29, 5]); Game.last.pool = 'prestige'; Game.last.parents = ['Classic dairy selection']; - - new Game.Upgrade('Legacy', loc("This is the first heavenly upgrade; it unlocks the Heavenly chips system.
Each time you ascend, the cookies you made in your past life are turned into heavenly chips and prestige.
Heavenly chips can be spent on a variety of permanent transcendental upgrades.
Your prestige level also gives you a permanent +1% CpS per level.") + 'We\'ve all been waiting for you.', 1, [21, 6]); Game.last.pool = 'prestige'; Game.last.parents = []; - - new Game.Upgrade('Elder spice', loc("You can attract %1 more wrinklers.", 2) + 'The cookie your cookie could smell like.', 444444, [19, 8]); Game.last.pool = 'prestige'; Game.last.parents = ['Unholy bait']; - - new Game.Upgrade('Residual luck', loc("While the golden switch is on, you gain an additional +%1% CpS per golden cookie upgrade owned.", 10) + 'Fortune comes in many flavors.', 99999, [27, 6]); Game.last.pool = 'prestige'; Game.last.parents = ['Golden switch']; - - order = 150; new Game.Upgrade('Fantasteel mouse', getStrClickingGains(1) + 'You could be clicking using your touchpad and we\'d be none the wiser.', 5000000000000000000, [11, 17]); Game.MakeTiered(Game.last, 8, 11); - new Game.Upgrade('Nevercrack mouse', getStrClickingGains(1) + 'How much beefier can you make a mouse until it\'s considered a rat?', 500000000000000000000, [11, 18]); Game.MakeTiered(Game.last, 9, 11); - - - new Game.Upgrade('Five-finger discount', loc("All upgrades are %1% cheaper per %2.", [1, loc("%1 cursor", 100)]) + 'Stick it to the man.', 555555, [28, 7], function () { Game.upgradesToRebuild = 1; }); Game.last.pool = 'prestige'; Game.last.parents = ['Halo gloves', 'Abaddon']; - - - order = 5000; - Game.SynergyUpgrade('Future almanacs', 'Lets you predict optimal planting times. It\'s crazy what time travel can do!', 'Farm', 'Time machine', 'synergy1'); - Game.SynergyUpgrade('Rain prayer', 'A deeply spiritual ceremonial involving complicated dance moves and high-tech cloud-busting lasers.', 'Farm', 'Temple', 'synergy2'); - - Game.SynergyUpgrade('Seismic magic', 'Surprise earthquakes are an old favorite of wizardly frat houses.', 'Mine', 'Wizard tower', 'synergy1'); - Game.SynergyUpgrade('Asteroid mining', 'As per the 1974 United Cosmic Convention, comets, moons, and inhabited planetoids are no longer legally excavatable.
But hey, a space bribe goes a long way.
', 'Mine', 'Shipment', 'synergy2'); - - Game.SynergyUpgrade('Quantum electronics', 'Your machines won\'t even be sure if they\'re on or off!', 'Factory', 'Antimatter condenser', 'synergy1'); - Game.SynergyUpgrade('Temporal overclocking', 'Introduce more quickitude in your system for increased speedation of fastness.', 'Factory', 'Time machine', 'synergy2'); - - Game.SynergyUpgrade('Contracts from beyond', 'Make sure to read the fine print!', 'Bank', 'Portal', 'synergy1'); - Game.SynergyUpgrade('Printing presses', 'Fake bills so real, they\'re almost worth the ink they\'re printed with.', 'Bank', 'Factory', 'synergy2'); - - Game.SynergyUpgrade('Paganism', 'Some deities are better left unworshipped.', 'Temple', 'Portal', 'synergy1'); - Game.SynergyUpgrade('God particle', 'Turns out God is much tinier than we thought, I guess.', 'Temple', 'Antimatter condenser', 'synergy2'); - - Game.SynergyUpgrade('Arcane knowledge', 'Some things were never meant to be known - only mildly speculated.', 'Wizard tower', 'Alchemy lab', 'synergy1'); - Game.SynergyUpgrade('Magical botany', 'Already known in some reactionary newspapers as "the wizard\'s GMOs".', 'Wizard tower', 'Farm', 'synergy2'); - - Game.SynergyUpgrade('Fossil fuels', 'Somehow better than plutonium for powering rockets.
Extracted from the fuels of ancient, fossilized civilizations.
', 'Shipment', 'Mine', 'synergy1'); - Game.SynergyUpgrade('Shipyards', 'Where carpentry, blind luck, and asbestos insulation unite to produce the most dazzling spaceships on the planet.', 'Shipment', 'Factory', 'synergy2'); - - Game.SynergyUpgrade('Primordial ores', 'Only when refining the purest metals will you extract the sweetest sap of the earth.', 'Alchemy lab', 'Mine', 'synergy1'); - Game.SynergyUpgrade('Gold fund', 'If gold is the backbone of the economy, cookies, surely, are its hip joints.', 'Alchemy lab', 'Bank', 'synergy2'); - - Game.SynergyUpgrade('Infernal crops', 'Sprinkle regularly with FIRE.', 'Portal', 'Farm', 'synergy1'); - Game.SynergyUpgrade('Abysmal glimmer', 'Someone, or something, is staring back at you.
Perhaps at all of us.
', 'Portal', 'Prism', 'synergy2'); - - Game.SynergyUpgrade('Relativistic parsec-skipping', 'People will tell you this isn\'t physically possible.
These are people you don\'t want on your ship.
', 'Time machine', 'Shipment', 'synergy1'); - Game.SynergyUpgrade('Primeval glow', 'From unending times, an ancient light still shines, impossibly pure and fragile in its old age.', 'Time machine', 'Prism', 'synergy2'); - - Game.SynergyUpgrade('Extra physics funding', 'Time to put your money where your particle colliders are.', 'Antimatter condenser', 'Bank', 'synergy1'); - Game.SynergyUpgrade('Chemical proficiency', 'Discover exciting new elements, such as Fleshmeltium, Inert Shampoo Byproduct #17 and Carbon++!', 'Antimatter condenser', 'Alchemy lab', 'synergy2'); - - Game.SynergyUpgrade('Light magic', 'Actually not to be taken lightly! No, I\'m serious. 178 people died last year. You don\'t mess around with magic.', 'Prism', 'Wizard tower', 'synergy1'); - Game.SynergyUpgrade('Mystical energies', 'Something beckons from within the light. It is warm, comforting, and apparently the cause for several kinds of exotic skin cancers.', 'Prism', 'Temple', 'synergy2'); - - - new Game.Upgrade('Synergies Vol. I', loc("Unlocks a new tier of upgrades that affect 2 buildings at the same time.
Synergies appear once you have %1 of both buildings.", 15) + 'The many beats the few.', 222222, [10, 20]); Game.last.pool = 'prestige'; Game.last.parents = ['Satan', 'Dominions']; - new Game.Upgrade('Synergies Vol. II', loc("Unlocks a new tier of upgrades that affect 2 buildings at the same time.
Synergies appear once you have %1 of both buildings.", 75) + 'The several beats the many.', 2222222, [10, 29]); Game.last.pool = 'prestige'; Game.last.parents = ['Beelzebub', 'Seraphim', 'Synergies Vol. I']; - - new Game.Upgrade('Heavenly cookies', loc("Cookie production multiplier +%1% permanently.", 10) + 'Baked with heavenly chips. An otherwordly flavor that transcends time and space.', 3, [25, 12]); Game.last.pool = 'prestige'; Game.last.parents = ['Legacy']; Game.last.power = 10; Game.last.pseudoCookie = true; - new Game.Upgrade('Wrinkly cookies', loc("Cookie production multiplier +%1% permanently.", 10) + 'The result of regular cookies left to age out for countless eons in a place where time and space are meaningless.', 6666666, [26, 12]); Game.last.pool = 'prestige'; Game.last.parents = ['Sacrilegious corruption', 'Elder spice']; Game.last.power = 10; Game.last.pseudoCookie = true; - new Game.Upgrade('Distilled essence of redoubled luck', loc("Golden cookies (and all other things that spawn, such as reindeer) have %1% chance of being doubled.", 1) + 'Tastes glittery. The empty phial makes for a great pencil holder.', 7777777, [27, 12]); Game.last.pool = 'prestige'; Game.last.parents = ['Divine bakeries', 'Residual luck']; - - order = 40000; - new Game.Upgrade('Occult obstruction', loc("Cookie production reduced to 0.") + 'If symptoms persist, consult a doctor.', 7, [15, 5]);//debug purposes only - Game.last.pool = 'debug'; - new Game.Upgrade('Glucose-charged air', loc("Sugar lumps coalesce a whole lot faster.") + 'Don\'t breathe too much or you\'ll get diabetes!', 7, [29, 16]);//debug purposes only - Game.last.pool = 'debug'; - - order = 10300; - Game.NewUpgradeCookie({ name: 'Lavender chocolate butter biscuit', desc: 'Rewarded for owning 300 of everything.
This subtly-flavored biscuit represents the accomplishments of decades of top-secret research. The molded design on the chocolate resembles a well-known entrepreneur who gave their all to the ancient path of baking.', icon: [26, 10], power: 10, price: 999999999999999999999999999999999 * butterBiscuitMult, locked: 1 }); - - order = 10030; - Game.NewUpgradeCookie({ name: 'Lombardia cookies', desc: 'These come from those farms with the really good memory.', icon: [23, 13], require: 'Box of brand biscuits', power: 3, price: 999999999999999999999 * 5 }); - Game.NewUpgradeCookie({ name: 'Bastenaken cookies', desc: 'French cookies made of delicious cinnamon and candy sugar. These do not contain Nuts!', icon: [24, 13], require: 'Box of brand biscuits', power: 3, price: 999999999999999999999 * 5 }); - - order = 10020; - Game.NewUpgradeCookie({ name: 'Pecan sandies', desc: 'Stick a nut on a cookie and call it a day! Name your band after it! Whatever!', icon: [25, 13], power: 4, price: 999999999999999999999999 * 5 }); - Game.NewUpgradeCookie({ name: 'Moravian spice cookies', desc: 'Popular for being the world\'s moravianest cookies.', icon: [26, 13], power: 4, price: 9999999999999999999999999 }); - Game.NewUpgradeCookie({ name: 'Anzac biscuits', desc: 'Army biscuits from a bakery down under, containing no eggs but yes oats.', icon: [27, 13], power: 4, price: 9999999999999999999999999 * 5 }); - Game.NewUpgradeCookie({ name: 'Buttercakes', desc: 'Glistening with cholesterol, these cookies moistly straddle the line between the legal definition of a cookie and just a straight-up stick of butter.', icon: [29, 13], power: 4, price: 99999999999999999999999999 }); - Game.NewUpgradeCookie({ name: 'Ice cream sandwiches', desc: 'In an alternate universe, "ice cream sandwich" designates an ice cream cone filled with bacon, lettuce, and tomatoes. Maybe some sprinkles too.', icon: [28, 13], power: 4, price: 99999999999999999999999999 * 5 }); - - new Game.Upgrade('Stevia Caelestis', loc("Sugar lumps ripen %1 sooner.", Game.sayTime(60 * 60 * Game.fps)) + 'A plant of supernatural sweetness grown by angels in heavenly gardens.', 100000000, [25, 15]); Game.last.pool = 'prestige'; Game.last.parents = ['Wrinkly cookies']; - new Game.Upgrade('Diabetica Daemonicus', loc("Sugar lumps mature %1 sooner.", Game.sayTime(60 * 60 * Game.fps)) + 'A malevolent, if delicious herb that is said to grow on the cliffs of the darkest abyss of the underworld.', 300000000, [26, 15]); Game.last.pool = 'prestige'; Game.last.parents = ['Stevia Caelestis', 'Lucifer']; - new Game.Upgrade('Sucralosia Inutilis', loc("Bifurcated sugar lumps appear %1% more often and are %2% more likely to drop 2 lumps.", [5, 5]) + 'A rare berry of uninteresting flavor that is as elusive as its uses are limited; only sought-after by the most avid collectors with too much wealth on their hands.', 1000000000, [27, 15]); Game.last.pool = 'prestige'; Game.last.parents = ['Diabetica Daemonicus']; - - new Game.Upgrade('Lucky digit', loc("+%1% prestige level effect on CpS.
+%2% golden cookie effect duration.
+%3% golden cookie lifespan.", [1, 1, 1]) + 'This upgrade is a bit shy and only appears when your prestige level contains a 7.', 777, [24, 15]); Game.last.pool = 'prestige'; Game.last.parents = ['Heavenly luck']; Game.last.showIf = function () { return (Math.ceil(((Game.prestige + '').split('7').length - 1)) >= 1); }; - new Game.Upgrade('Lucky number', loc("+%1% prestige level effect on CpS.
+%2% golden cookie effect duration.
+%3% golden cookie lifespan.", [1, 1, 1]) + 'This upgrade is a reclusive hermit and only appears when your prestige level contains two 7\'s.', 77777, [24, 15]); Game.last.pool = 'prestige'; Game.last.parents = ['Lucky digit', 'Lasting fortune']; Game.last.showIf = function () { return (Math.ceil(((Game.prestige + '').split('7').length - 1)) >= 2); }; - new Game.Upgrade('Lucky payout', loc("+%1% prestige level effect on CpS.
+%2% golden cookie effect duration.
+%3% golden cookie lifespan.", [1, 1, 1]) + 'This upgrade took an oath of complete seclusion from the rest of the world and only appears when your prestige level contains four 7\'s.', 77777777, [24, 15]); Game.last.pool = 'prestige'; Game.last.parents = ['Lucky number', 'Decisive fate']; Game.last.showIf = function () { return (Math.ceil(((Game.prestige + '').split('7').length - 1)) >= 4); }; - - order = 50000; - new Game.Upgrade('Background selector', loc("Lets you pick which wallpaper to display."), 0, [29, 5]); - Game.last.descFunc = function () { - var choice = this.choicesFunction()[Game.bgType]; - if (choice == 0) choice = this.choicesFunction()[0]; - return '
' + loc("Current:") + ' ' + tinyIcon(choice.icon) + ' ' + choice.name + '
' + this.ddesc; - }; - - Game.last.pool = 'toggle'; - Game.last.choicesFunction = function () { - var choices = []; - for (var i in Game.BGsByChoice) { - choices[i] = { name: Game.BGsByChoice[i].name, icon: Game.BGsByChoice[i].icon, order: Game.BGsByChoice[i].order || parseInt(i) }; - } - - choices[13].div = true; - - for (var i = 0; i < choices.length; i++) { - var it = choices[i]; - if (it.order >= 4.9 && !Game.Has('Distinguished wallpaper assortment')) choices[i] = 0; - } - - choices[Game.bgType].selected = 1; - return choices; - } - Game.last.choicesPick = function (id) { Game.bgType = id; } - - Game.AllBGs = [ - { pic: 'bgBlue', name: 'Automatic', icon: [0, 7] }, - { pic: 'bgBlue', name: 'Blue', icon: [21, 21] }, - { pic: 'bgRed', name: 'Red', icon: [22, 21] }, - { pic: 'bgWhite', name: 'White', icon: [23, 21] }, - { pic: 'bgBlack', name: 'Black', icon: [24, 21] }, - { pic: 'bgGold', name: 'Gold', icon: [25, 21] }, - { pic: 'grandmas1', name: 'Grandmas', icon: [26, 21] }, - { pic: 'grandmas2', name: 'Displeased grandmas', icon: [27, 21] }, - { pic: 'grandmas3', name: 'Angered grandmas', icon: [28, 21] }, - { pic: 'bgMoney', name: 'Money', icon: [29, 21] }, - { pic: 'bgPurple', name: 'Purple', icon: [21, 22], order: 1.1 }, - { pic: 'bgPink', name: 'Pink', icon: [24, 22], order: 2.1 }, - { pic: 'bgMint', name: 'Mint', icon: [22, 22], order: 2.2 }, - { pic: 'bgSilver', name: 'Silver', icon: [25, 22], order: 4.9 }, - { pic: 'bgBW', name: 'Black & White', icon: [23, 22], order: 4.1 }, - { pic: 'bgSpectrum', name: 'Spectrum', icon: [28, 22], order: 4.2 }, - { pic: 'bgCandy', name: 'Candy', icon: [26, 22] }, - { pic: 'bgYellowBlue', name: 'Biscuit store', icon: [27, 22] }, - { pic: 'bgChoco', name: 'Chocolate', icon: [30, 21] }, - { pic: 'bgChocoDark', name: 'Dark Chocolate', icon: [31, 21] }, - { pic: 'bgPaint', name: 'Painter', icon: [24, 34] }, - { pic: 'bgSnowy', name: 'Snow', icon: [30, 22] }, - { pic: 'bgSky', name: 'Sky', icon: [29, 22] }, - { pic: 'bgStars', name: 'Night', icon: [31, 22] }, - { pic: 'bgFoil', name: 'Foil', icon: [25, 34] }, - ]; - Game.BGsByChoice = {}; - for (var i = 0; i < Game.AllBGs.length; i++) { - Game.BGsByChoice[i] = Game.AllBGs[i]; - } - if (!EN) { - Game.BGsByChoice[0].name = loc(Game.BGsByChoice[0].name); - for (var i = 1; i < Game.BGsByChoice.length; i++) { - Game.BGsByChoice[i].name = '"' + Game.BGsByChoice[i].pic + '"'; - } - } - - order = 255; - Game.GrandmaSynergy('Lucky grandmas', 'A fortunate grandma that always seems to find more cookies.', 'Chancemaker'); - - order = 1200; - Game.TieredUpgrade('Your lucky cookie', 'This is the first cookie you\'ve ever baked. It holds a deep sentimental value and, after all this time, an interesting smell.', 'Chancemaker', 1); - Game.TieredUpgrade('"All Bets Are Off" magic coin', 'A coin that always lands on the other side when flipped. Not heads, not tails, not the edge. The other side.', 'Chancemaker', 2); - Game.TieredUpgrade('Winning lottery ticket', 'What lottery? THE lottery, that\'s what lottery! Only lottery that matters!', 'Chancemaker', 3); - Game.TieredUpgrade('Four-leaf clover field', 'No giant monsters here, just a whole lot of lucky grass.', 'Chancemaker', 4); - Game.TieredUpgrade('A recipe book about books', 'Tip the scales in your favor with 28 creative new ways to cook the books.', 'Chancemaker', 5); - Game.TieredUpgrade('Leprechaun village', 'You\'ve finally become accepted among the local leprechauns, who lend you their mythical luck as a sign of friendship (as well as some rather foul-tasting tea).', 'Chancemaker', 6); - Game.TieredUpgrade('Improbability drive', 'A strange engine that turns statistics on their head. Recommended by the Grandmother\'s Guide to the Bakery.', 'Chancemaker', 7); - Game.TieredUpgrade('Antisuperstistronics', 'An exciting new field of research that makes unlucky things lucky. No mirror unbroken, no ladder unwalked under!', 'Chancemaker', 8); - - order = 5000; - Game.SynergyUpgrade('Gemmed talismans', 'Good-luck charms covered in ancient and excruciatingly rare crystals. A must have for job interviews!', 'Chancemaker', 'Mine', 'synergy1'); - - order = 20000; - new Game.Upgrade('Kitten consultants', strKittenDesc + 'glad to be overpaid to work with you, sir', 900000000000000000000000000000000, Game.GetIcon('Kitten', 9)); Game.last.kitten = 1; Game.MakeTiered(Game.last, 9, 18); - - order = 99999; - var years = Math.floor((Date.now() - new Date(2013, 7, 8)) / (1000 * 60 * 60 * 24 * 365)); - //only updates on page load - //may behave strangely on leap years - Game.NewUpgradeCookie({ name: 'Birthday cookie', desc: '-', icon: [22, 13], power: years, price: 99999999999999999999999999999 }); Game.last.baseDesc = loc("Cookie production multiplier +%1% for every year Cookie Clicker has existed (currently: +%2%).", [1, Beautify(years)]) + 'Thank you for playing Cookie Clicker!
-Orteil
'; - - - order = 150; new Game.Upgrade('Armythril mouse', getStrClickingGains(1) + 'This one takes about 53 people to push it around and another 48 to jump down on the button and trigger a click. You could say it\'s got some heft to it.', 50000000000000000000000, [11, 19]); Game.MakeTiered(Game.last, 10, 11); - - order = 200; Game.TieredUpgrade('Reverse dementia', 'Extremely unsettling, and somehow even worse than the regular kind.', 'Grandma', 9); - order = 300; Game.TieredUpgrade('Humane pesticides', 'Made by people, for people, from people and ready to unleash some righteous scorching pain on those pesky insects that so deserve it.', 'Farm', 9); - order = 400; Game.TieredUpgrade('Mole people', 'Engineered from real human beings within your very labs, these sturdy little folks have a knack for finding the tastiest underground minerals in conditions that more expensive machinery probably wouldn\'t survive.', 'Mine', 9); - order = 500; Game.TieredUpgrade('Machine learning', 'You figured you might get better productivity if you actually told your workers to learn how to work the machines. Sometimes, it\'s the little things...', 'Factory', 9); - order = 525; Game.TieredUpgrade('Edible money', 'It\'s really quite simple; you make all currency too delicious not to eat, solving world hunger and inflation in one fell swoop!', 'Bank', 9); - order = 550; Game.TieredUpgrade('Sick rap prayers', 'With their ill beat and radical rhymes, these way-hip religious tunes are sure to get all the youngins who thought they were 2 cool 4 church back on the pews and praying for more! Wicked!', 'Temple', 9); - order = 575; Game.TieredUpgrade('Deluxe tailored wands', 'In this age of science, most skillful wand-makers are now long gone; but thankfully - not all those wanders are lost.', 'Wizard tower', 9); - order = 600; Game.TieredUpgrade('Autopilot', 'Your ships are now fitted with completely robotic crews! It\'s crazy how much money you save when you don\'t have to compensate the families of those lost in space.', 'Shipment', 9); - order = 700; Game.TieredUpgrade('The advent of chemistry', 'You know what? That whole alchemy nonsense was a load of baseless rubbish. Dear god, what were you thinking?', 'Alchemy lab', 9); - order = 800; Game.TieredUpgrade('The real world', 'It turns out that our universe is actually the twisted dimension of another, saner plane of reality. Time to hop on over there and loot the place!', 'Portal', 9); - order = 900; Game.TieredUpgrade('Second seconds', 'That\'s twice as many seconds in the same amount of time! What a deal! Also, what in god\'s name!', 'Time machine', 9); - order = 1000; Game.TieredUpgrade('Quantum comb', 'Quantum entanglement is one of those things that are so annoying to explain that we might honestly be better off without it. This is finally possible thanks to the quantum comb!', 'Antimatter condenser', 9); - order = 1100; Game.TieredUpgrade('Crystal mirrors', 'Designed to filter more light back into your prisms, reaching levels of brightness that reality itself had never planned for.', 'Prism', 9); - order = 1200; Game.TieredUpgrade('Bunnypedes', 'You\'ve taken to breeding rabbits with hundreds of paws, which makes them intrinsically very lucky and thus a very handy (if very disturbing) pet.', 'Chancemaker', 9); - - order = 20000; - new Game.Upgrade('Kitten assistants to the regional manager', strKittenDesc + 'nothing stresses meowt... except having to seek the approval of my inferiors, sir', 900000000000000000000000000000000000, Game.GetIcon('Kitten', 10)); Game.last.kitten = 1; Game.MakeTiered(Game.last, 10, 18); - - order = 5000; - Game.SynergyUpgrade('Charm quarks', 'They\'re after your lucky quarks!', 'Chancemaker', 'Antimatter condenser', 'synergy2'); - - - order = 10020; - Game.NewUpgradeCookie({ name: 'Pink biscuits', desc: 'One of the oldest cookies. Traditionally dipped in champagne to soften it, because the French will use any opportunity to drink.', icon: [21, 16], power: 4, price: 999999999999999999999999999 }); - Game.NewUpgradeCookie({ name: 'Whole-grain cookies', desc: 'Covered in seeds and other earthy-looking debris. Really going for that "5-second rule" look.', icon: [22, 16], power: 4, price: 999999999999999999999999999 * 5 }); - Game.NewUpgradeCookie({ name: 'Candy cookies', desc: 'These melt in your hands just a little bit.', icon: [23, 16], power: 4, price: 9999999999999999999999999999 }); - Game.NewUpgradeCookie({ name: 'Big chip cookies', desc: 'You are in awe at the size of these chips. Absolute units.', icon: [24, 16], power: 4, price: 9999999999999999999999999999 * 5 }); - Game.NewUpgradeCookie({ name: 'One chip cookies', desc: 'You get one.', icon: [25, 16], power: 1, price: 99999999999999999999999999999 }); - - - new Game.Upgrade('Sugar baking', loc("Each unspent sugar lump (up to %1) gives +%2% CpS.
Note: this means that spending sugar lumps will decrease your CpS until they grow back.
", [100, 1]) + 'To bake with the sugary essence of eons themselves, you must first learn to take your sweet time.', 200000000, [21, 17]); Game.last.pool = 'prestige'; Game.last.parents = ['Stevia Caelestis']; - new Game.Upgrade('Sugar craving', loc("Once an ascension, you may use the \"Sugar frenzy\" switch to triple your CpS for 1 hour, at the cost of 1 sugar lump.") + 'Just a little kick to sweeten the deal.', 400000000, [22, 17]); Game.last.pool = 'prestige'; Game.last.parents = ['Sugar baking']; - new Game.Upgrade('Sugar aging process', loc("Each grandma (up to %1) makes sugar lumps ripen %2 sooner.", [600, Game.sayTime(6 * Game.fps)]) + 'Aren\'t they just the sweetest?', 600000000, [23, 17]); Game.last.pool = 'prestige'; Game.last.parents = ['Sugar craving', 'Diabetica Daemonicus']; - - order = 40050; - new Game.Upgrade('Sugar frenzy', loc("Activating this will triple your CpS for 1 hour, at the cost of 1 sugar lump.") + '
' + loc("May only be used once per ascension."), 0, [22, 17]); - Game.last.priceLumps = 1; - Game.last.pool = 'toggle'; Game.last.toggleInto = 0; - Game.last.canBuyFunc = function () { return Game.lumps >= 1; }; - Game.last.clickFunction = Game.spendLump(1, loc("activate the sugar frenzy"), function () { - Game.Upgrades['Sugar frenzy'].buy(1); - buff = Game.gainBuff('sugar frenzy', 60 * 60, 3); - Game.Notify(loc("Sugar frenzy!"), loc("CpS x%1 for 1 hour!", 3), [29, 14]); - }); - - order = 10020; - Game.NewUpgradeCookie({ name: 'Sprinkles cookies', desc: 'A bit of festive decorating helps hide the fact that this might be one of the blandest cookies you\'ve ever tasted.', icon: [21, 14], power: 4, price: 99999999999999999999999999999 * 5 }); - Game.NewUpgradeCookie({ name: 'Peanut butter blossoms', desc: 'Topped with a scrumptious chocolate squirt, which is something we really wish we didn\'t just write.', icon: [22, 14], power: 4, price: 999999999999999999999999999999 }); - Game.NewUpgradeCookie({ name: 'No-bake cookies', desc: 'You have no idea how these mysterious oven-less treats came to be or how they hold their shape. You\'re thinking either elephant glue or cold fusion.', icon: [21, 15], power: 4, price: 999999999999999999999999999999 * 5 }); - Game.NewUpgradeCookie({ name: 'Florentines', desc: 'These make up for being the fruitcake of cookies by at least having the decency to feature chocolate.', icon: [26, 16], power: 4, price: 9999999999999999999999999999999 }); - Game.NewUpgradeCookie({ name: 'Chocolate crinkles', desc: 'Non-denominational cookies to celebrate year-round deliciousness, and certainly not Christmas or some other nonsense.', icon: [22, 15], power: 4, price: 9999999999999999999999999999999 * 5 }); - Game.NewUpgradeCookie({ name: 'Maple cookies', desc: 'Made with syrup from a land where milk comes in bags, instead of spontaneously pooling at the bottom of your screen depending on your achievements.', icon: [21, 13], power: 4, price: 99999999999999999999999999999999 }); - - - order = 40000; - new Game.Upgrade('Turbo-charged soil', loc("Garden plants grow every second.
Garden seeds are free to plant.
You can switch soils at any time.") + 'It\'s got electrolytes!', 7, [2, 16]);//debug purposes only - Game.last.buyFunction = function () { if (Game.Objects['Farm'].minigameLoaded) { Game.Objects['Farm'].minigame.computeStepT(); } } - Game.last.pool = 'debug'; - - order = 150; - new Game.Upgrade('Technobsidian mouse', getStrClickingGains(1) + 'A highly advanced mouse of a sophisticated design. Only one thing on its mind : to click.', 5000000000000000000000000, [11, 28]); Game.MakeTiered(Game.last, 11, 11); - new Game.Upgrade('Plasmarble mouse', getStrClickingGains(1) + 'A shifting blur in the corner of your eye, this mouse can trigger a flurry of clicks when grazed by even the slightest breeze.', 500000000000000000000000000, [11, 30]); Game.MakeTiered(Game.last, 12, 11); - - order = 20000; - new Game.Upgrade('Kitten marketeers', strKittenDesc + 'no such thing as a saturated markit, sir', 900000000000000000000000000000000000000, Game.GetIcon('Kitten', 11)); Game.last.kitten = 1; Game.MakeTiered(Game.last, 11, 18); - - order = 10030; - Game.NewUpgradeCookie({ name: 'Festivity loops', desc: 'These garish biscuits are a perfect fit for children\'s birthday parties or the funerals of strange, eccentric billionaires.', icon: [25, 17], require: 'Box of brand biscuits', power: 2, price: 999999999999999999999999 * 5 }); - - order = 10020; - Game.NewUpgradeCookie({ name: 'Persian rice cookies', desc: 'Rose water and poppy seeds are the secret ingredients of these small, butter-free cookies.', icon: [28, 15], power: 4, price: 99999999999999999999999999999999 * 5 }); - Game.NewUpgradeCookie({ name: 'Norwegian cookies', desc: 'A flat butter cookie with a sliver of candied cherry on top. It is said that these illustrate the bleakness of scandinavian existentialism.', icon: [22, 20], power: 4, price: 999999999999999999999999999999999 }); - Game.NewUpgradeCookie({ name: 'Crispy rice cookies', desc: 'Fun to make at home! Store-bought cookies are obsolete! Topple the system! There\'s marshmallows in these! Destroy capitalism!', icon: [23, 20], power: 4, price: 999999999999999999999999999999999 * 5 }); - Game.NewUpgradeCookie({ name: 'Ube cookies', desc: 'The tint is obtained by the use of purple yams. According to color symbolism, these cookies are either noble, holy, or supervillains.', icon: [24, 17], power: 4, price: 9999999999999999999999999999999999 }); - Game.NewUpgradeCookie({ name: 'Butterscotch cookies', desc: 'The butterscotch chips are just the right amount of sticky, and make you feel like you\'re eating candy.', icon: [24, 20], power: 4, price: 9999999999999999999999999999999999 * 5 }); - Game.NewUpgradeCookie({ name: 'Speculaas', desc: 'These crunchy, almost obnoxiously cinnamony cookies are a source of dutch pride. About the origin of the name, one can only speculate.', icon: [21, 20], power: 4, price: 99999999999999999999999999999999999 }); - - order = 10200; - Game.NewUpgradeCookie({ name: 'Elderwort biscuits', desc: '-', icon: [22, 25], power: 2, price: 60 * 2, locked: 1 }); Game.last.baseDesc = getStrCookieProductionMultiplierPlus(2) + '
' + loc("%1 are %2% more powerful.", [cap(Game.Objects['Grandma'].plural), 2]) + '
' + loc("Dropped by %1 plants.", loc("Elderwort").toLowerCase()) + 'They taste incredibly stale, even when baked fresh.'; - Game.NewUpgradeCookie({ name: 'Bakeberry cookies', desc: '-', icon: [23, 25], power: 2, price: 60, locked: 1 }); Game.last.baseDesc = getStrCookieProductionMultiplierPlus(2) + '
' + loc("Dropped by %1 plants.", loc("Bakeberry").toLowerCase()) + 'Really good dipped in hot chocolate.'; - Game.NewUpgradeCookie({ name: 'Duketater cookies', desc: '-', icon: [24, 25], power: 10, price: 60 * 3, locked: 1 }); Game.last.baseDesc = getStrCookieProductionMultiplierPlus(10) + '
' + loc("Dropped by %1 plants.", loc("Duketater").toLowerCase()) + 'Fragrant and mealy, with a slight yellow aftertaste.'; - Game.NewUpgradeCookie({ name: 'Green yeast digestives', desc: '-', icon: [25, 25], power: 0, price: 60 * 3, locked: 1 }); Game.last.baseDesc = loc("Golden cookies give %1% more cookies.", 1) + '
' + loc("Golden cookie effects last %1% longer.", 1) + '
' + loc("Golden cookies appear %1% more often.", 1) + '
' + loc("Random drops are %1% more common.", 3) + '
' + loc("Dropped by %1 plants.", loc("Green rot").toLowerCase()) + 'These are tastier than you\'d expect, but not by much.'; - - order = 23000; - new Game.Upgrade('Fern tea', loc("You gain another +%1% of your regular CpS while the game is closed.", 3) + ' (' + loc("Must own the %1 upgrade.", getUpgradeName("Twin Gates of Transcendence")) + ')' + '
' + loc("Dropped by %1 plants.", loc("Drowsyfern").toLowerCase()) + 'A chemically complex natural beverage, this soothing concoction has been used by mathematicians to solve equations in their sleep.', 60, [26, 25]); - new Game.Upgrade('Ichor syrup', loc("You gain another +%1% of your regular CpS while the game is closed.", 7) + ' (' + loc("Must own the %1 upgrade.", getUpgradeName("Twin Gates of Transcendence")) + ')' + '
' + loc("Sugar lumps mature %1 sooner.", Game.sayTime(7 * 60 * Game.fps)) + '
' + loc("Dropped by %1 plants.", loc("Ichorpuff").toLowerCase()) + 'Tastes like candy. The smell is another story.', 60 * 2, [27, 25]); - - order = 10200; - Game.NewUpgradeCookie({ name: 'Wheat slims', desc: '-', icon: [28, 25], power: 1, price: 30, locked: 1 }); Game.last.baseDesc = getStrCookieProductionMultiplierPlus(1) + '
' + loc("Dropped by %1 plants.", loc("Baker's wheat").toLowerCase()) + 'The only reason you\'d consider these to be cookies is because you feel slightly sorry for them.'; - - var gardenDrops = ['Elderwort biscuits', 'Bakeberry cookies', 'Duketater cookies', 'Green yeast digestives', 'Fern tea', 'Ichor syrup', 'Wheat slims']; - for (var i in gardenDrops)//scale by CpS - { - var it = Game.Upgrades[gardenDrops[i]]; - it.priceFunc = function (cost) { return function () { return cost * Game.cookiesPs * 60; } }(it.basePrice); - it.baseDesc = it.baseDesc.replace('', '
' + loc("Cost scales with CpS.") + ''); - it.desc = BeautifyInText(it.baseDesc); - it.lasting = true; - } - - - order = 10300; - Game.NewUpgradeCookie({ name: 'Synthetic chocolate green honey butter biscuit', desc: 'Rewarded for owning 350 of everything.
The recipe for this butter biscuit was once the sole heritage of an ancient mountain monastery. Its flavor is so refined that only a slab of lab-made chocolate specifically engineered to be completely tasteless could complement it.
Also it\'s got your face on it.', icon: [24, 26], power: 10, price: 999999999999999999999999999999999999 * butterBiscuitMult, locked: 1 }); - Game.NewUpgradeCookie({ name: 'Royal raspberry chocolate butter biscuit', desc: 'Rewarded for owning 400 of everything.
Once reserved for the megalomaniac elite, this unique strain of fruity chocolate has a flavor and texture unlike any other. Whether its exorbitant worth is improved or lessened by the presence of your likeness on it still remains to be seen.', icon: [25, 26], power: 10, price: 999999999999999999999999999999999999999 * butterBiscuitMult, locked: 1 }); - Game.NewUpgradeCookie({ name: 'Ultra-concentrated high-energy chocolate butter biscuit', desc: 'Rewarded for owning 450 of everything.
Infused with the power of several hydrogen bombs through a process that left most nuclear engineers and shareholders perplexed. Currently at the center of some rather heated United Nations meetings. Going in more detail about this chocolate would violate several state secrets, but we\'ll just add that someone\'s bust seems to be pictured on it. Perhaps yours?', icon: [26, 26], power: 10, price: 999999999999999999999999999999999999999999 * butterBiscuitMult, locked: 1 }); - - - - order = 200; Game.TieredUpgrade('Timeproof hair dyes', 'Why do they always have those strange wispy pink dos? What do they know about candy floss that we don\'t?', 'Grandma', 10); - order = 300; Game.TieredUpgrade('Barnstars', 'Ah, yes. These help quite a bit. Somehow.', 'Farm', 10); - order = 400; Game.TieredUpgrade('Mine canaries', 'These aren\'t used for anything freaky! The miners just enjoy having a pet or two down there.', 'Mine', 10); - order = 500; Game.TieredUpgrade('Brownie point system', 'Oh, these are lovely! You can now reward your factory employees for good behavior, such as working overtime or snitching on coworkers. 58 brownie points gets you a little picture of a brownie, and 178 of those pictures gets you an actual brownie piece for you to do with as you please! Infantilizing? Maybe. Oodles of fun? You betcha!', 'Factory', 10); - order = 525; Game.TieredUpgrade('Grand supercycles', 'We let the public think these are complicated financial terms when really we\'re just rewarding the bankers with snazzy bicycles for a job well done. It\'s only natural after you built those fancy gold swimming pools for them, where they can take a dip and catch Kondratiev waves.', 'Bank', 10); - order = 550; Game.TieredUpgrade('Psalm-reading', 'A theologically dubious and possibly blasphemous blend of fortune-telling and scripture studies.', 'Temple', 10); - order = 575; Game.TieredUpgrade('Immobile spellcasting', 'Wizards who master this skill can now cast spells without having to hop and skip and gesticulate embarrassingly, which is much sneakier and honestly quite a relief.', 'Wizard tower', 10); - order = 600; Game.TieredUpgrade('Restaurants at the end of the universe', 'Since the universe is spatially infinite, and therefore can be construed to have infinite ends, you\'ve opened an infinite chain of restaurants where your space truckers can rest and partake in some home-brand cookie-based meals.', 'Shipment', 10); - order = 700; Game.TieredUpgrade('On second thought', 'Disregard that last upgrade, alchemy is where it\'s at! Your eggheads just found a way to transmute children\'s nightmares into rare metals!', 'Alchemy lab', 10); - order = 800; Game.TieredUpgrade('Dimensional garbage gulper', 'So we\'ve been looking for a place to dispose of all the refuse that\'s been accumulating since we started baking - burnt cookies, failed experiments, unruly workers - and well, we figured rather than sell it to poor countries like we\'ve been doing, we could just dump it in some alternate trash dimension where it\'s not gonna bother anybody! Probably!', 'Portal', 10); - order = 900; Game.TieredUpgrade('Additional clock hands', 'It seemed like a silly idea at first, but it turns out these have the strange ability to twist time in interesting new ways.', 'Time machine', 10); - order = 1000; Game.TieredUpgrade('Baking Nobel prize', 'What better way to sponsor scientific growth than to motivate those smarmy nerds with a meaningless award! What\'s more, each prize comes with a fine print lifelong exclusive contract to come work for you (or else)!', 'Antimatter condenser', 10); - order = 1100; Game.TieredUpgrade('Reverse theory of light', 'A whole new world of physics opens up when you decide that antiphotons are real and posit that light is merely a void in shadow.', 'Prism', 10); - order = 1200; Game.TieredUpgrade('Revised probabilistics', 'Either something happens or it doesn\'t. That\'s a 50% chance! This suddenly makes a lot of unlikely things very possible.', 'Chancemaker', 10); - - order = 20000; - new Game.Upgrade('Kitten analysts', strKittenDesc + 'based on purrent return-on-investment meowdels we should be able to affurd to pay our empawyees somewhere around next century, sir', 900000000000000000000000000000000000000000, Game.GetIcon('Kitten', 12)); Game.last.kitten = 1; Game.MakeTiered(Game.last, 12, 18); - - - new Game.Upgrade('Eye of the wrinkler', loc("Mouse over a wrinkler to see how many cookies are in its stomach.") + 'Just a wrinkler and its will to survive.
Hangin\' tough, stayin\' hungry.
', 99999999, [27, 26]); Game.last.pool = 'prestige'; Game.last.parents = ['Wrinkly cookies']; - - new Game.Upgrade('Inspired checklist', loc("Unlocks the Buy all feature, which lets you instantly purchase every upgrade in your store (starting from the cheapest one).
Also unlocks the Vault, a store section where you can place upgrades you do not wish to auto-buy.") + 'Snazzy grandma accessories? Check. Transdimensional abominations? Check. A bunch of eggs for some reason? Check. Machine that goes "ping"? Check and check.', 900000, [28, 26]); Game.last.pool = 'prestige'; Game.last.parents = ['Persistent memory', 'Permanent upgrade slot II']; - - order = 10300; - Game.NewUpgradeCookie({ name: 'Pure pitch-black chocolate butter biscuit', desc: 'Rewarded for owning 500 of everything.
This chocolate is so pure and so flawless that it has no color of its own, instead taking on the appearance of whatever is around it. You\'re a bit surprised to notice that this one isn\'t stamped with your effigy, as its surface is perfectly smooth (to the picometer) - until you realize it\'s quite literally reflecting your own face like a mirror.', icon: [24, 27], power: 10, price: 999999999999999999999999999999999999999999999 * butterBiscuitMult, locked: 1 }); - - order = 10020; - Game.NewUpgradeCookie({ name: 'Chocolate oatmeal cookies', desc: 'These bad boys compensate for lack of a cohesive form and a lumpy, unsightly appearance by being just simply delicious. Something we should all aspire to.', icon: [23, 28], power: 4, price: 99999999999999999999999999999999999 * 5 }); - Game.NewUpgradeCookie({ name: 'Molasses cookies', desc: 'Sticky, crackly, and dusted in fine sugar.
Some lunatics have been known to eat these with potatoes.', icon: [24, 28], power: 4, price: 999999999999999999999999999999999999 }); - Game.NewUpgradeCookie({ name: 'Biscotti', desc: 'Almonds and pistachios make these very robust cookies slightly more interesting to eat than to bludgeon people with.', icon: [22, 28], power: 4, price: 999999999999999999999999999999999999 * 5 }); - Game.NewUpgradeCookie({ name: 'Waffle cookies', desc: 'Whether these are cookies with shockingly waffle-like features or simply regular cookie-sized waffles is a debate we\'re not getting into here.', icon: [21, 28], power: 4, price: 9999999999999999999999999999999999999 }); - - - order = 10000; - //early cookies that unlock at the same time as coconut cookies; meant to boost early game a little bit - Game.NewUpgradeCookie({ name: 'Almond cookies', desc: 'Sometimes you feel like one of these. Sometimes you don\'t.', icon: [21, 27], power: 2, price: 99999999 }); - Game.NewUpgradeCookie({ name: 'Hazelnut cookies', desc: 'Tastes like a morning stroll through a fragrant forest, minus the clouds of gnats.', icon: [22, 27], power: 2, price: 99999999 }); - Game.NewUpgradeCookie({ name: 'Walnut cookies', desc: 'Some experts have pointed to the walnut\'s eerie resemblance to the human brain as a sign of its sentience - a theory most walnuts vehemently object to.', icon: [23, 27], power: 2, price: 99999999 }); - - - new Game.Upgrade('Label printer', loc("Mouse over an upgrade to see its tier.
Note: only some upgrades have tiers. Tiers are purely cosmetic and have no effect on gameplay.") + 'Also comes in real handy when you want to tell catsup apart from ketchup.', 5000000, [28, 29]); Game.last.pool = 'prestige'; Game.last.parents = ['Genius accounting']; - - - - - order = 200; Game.TieredUpgrade('Good manners', 'Apparently these ladies are much more amiable if you take the time to learn their strange, ancient customs, which seem to involve saying "please" and "thank you" and staring at the sun with bulging eyes while muttering eldritch curses under your breath.', 'Grandma', 11); - order = 300; Game.TieredUpgrade('Lindworms', 'You have to import these from far up north, but they really help aerate the soil!', 'Farm', 11); - order = 400; Game.TieredUpgrade('Bore again', 'After extracting so much sediment for so long, you\'ve formed some veritable mountains of your own from the accumulated piles of rock and dirt. Time to dig through those and see if you find anything fun!', 'Mine', 11); - order = 500; Game.TieredUpgrade('"Volunteer" interns', 'If you\'re bad at something, always do it for free.', 'Factory', 11); - order = 525; Game.TieredUpgrade('Rules of acquisition', 'Rule 387 : a cookie baked is a cookie kept.', 'Bank', 11); - order = 550; Game.TieredUpgrade('War of the gods', 'An interesting game; the only winning move is not to pray.', 'Temple', 11); - order = 575; Game.TieredUpgrade('Electricity', 'Ancient magicks and forbidden hexes shroud this arcane knowledge, whose unfathomable power can mysteriously turn darkness into light and shock an elephant to death.', 'Wizard tower', 11); - order = 600; Game.TieredUpgrade('Universal alphabet', 'You\'ve managed to chart a language that can be understood by any sentient species in the galaxy; its exciting vocabulary contains over 56 trillion words that sound and look like sparkly burps, forming intricate sentences that usually translate to something like "give us your cookies, or else".', 'Shipment', 11); - order = 700; Game.TieredUpgrade('Public betterment', 'Why do we keep trying to change useless matter into cookies, or cookies into even better cookies? Clearly, the way of the future is to change the people who eat the cookies into people with a greater understanding, appreciation and respect for the cookies they\'re eating. Into the vat you go!', 'Alchemy lab', 11); - order = 800; Game.TieredUpgrade('Embedded microportals', 'We\'ve found out that if we bake the portals into the cookies themselves, we can transport people\'s taste buds straight into the taste dimension! Good thing your army of lawyers got rid of the FDA a while ago!', 'Portal', 11); - order = 900; Game.TieredUpgrade('Nostalgia', 'Your time machine technicians insist that this is some advanced new time travel tech, and not just an existing emotion universal to mankind. Either way, you have to admit that selling people the same old cookies just because it reminds them of the good old times is an interesting prospect.', 'Time machine', 11); - order = 1000; Game.TieredUpgrade('The definite molecule', 'Your scientists have found a way to pack a cookie into one single continuous molecule, opening exciting new prospects in both storage and flavor despite the fact that these take up to a whole year to digest.', 'Antimatter condenser', 11); - order = 1100; Game.TieredUpgrade('Light capture measures', 'As the universe gets ever so slightly dimmer due to you converting more and more of its light into cookies, you\'ve taken to finding new and unexplored sources of light for your prisms; for instance, the warm glow emitted by a pregnant woman, or the twinkle in the eye of a hopeful child.', 'Prism', 11); - order = 1200; Game.TieredUpgrade('0-sided dice', 'The advent of the 0-sided dice has had unexpected and tumultuous effects on the gambling community, and saw experts around the world calling you both a genius and an imbecile.', 'Chancemaker', 11); - - - new Game.Upgrade('Heralds', loc("You now benefit from the boost provided by heralds.
Each herald gives you +1% CpS.
Look on the purple flag at the top to see how many heralds are active at any given time.") + (App ? 'It\'s getting steamy.' : 'Be excellent to each other.
And Patreon, dudes!
'), 100, [21, 29]); Game.last.pool = 'prestige'; - - order = 255; - Game.GrandmaSynergy('Metagrandmas', 'A fractal grandma to make more grandmas to make more cookies.', 'Fractal engine'); - - order = 1300; - Game.TieredUpgrade('Metabakeries', 'They practically bake themselves!', 'Fractal engine', 1); - Game.TieredUpgrade('Mandelbrown sugar', 'A substance that displays useful properties such as fractal sweetness and instant contact lethality.', 'Fractal engine', 2); - Game.TieredUpgrade('Fractoids', 'Here\'s a frun fract : all in all, these were a terrible idea.', 'Fractal engine', 3); - Game.TieredUpgrade('Nested universe theory', 'Asserts that each subatomic particle is host to a whole new universe, and therefore, another limitless quantity of cookies.
This somehow stacks with the theory of nanocosmics, because physics.
', 'Fractal engine', 4); - Game.TieredUpgrade('Menger sponge cake', 'Frighteningly absorbent thanks to its virtually infinite surface area. Keep it isolated in a dry chamber, never handle it with an open wound, and do not ever let it touch a body of water.', 'Fractal engine', 5); - Game.TieredUpgrade('One particularly good-humored cow', 'This unassuming bovine was excruciatingly expensive and it may seem at first like you were ripped off. On closer inspection however, you notice that its earrings (it\'s wearing earrings) are actually fully functional copies of itself, each of which also wearing their own cow earrings, and so on, infinitely. It appears your dairy concerns will be taken care of for a while, although you\'ll have to put up with the cow\'s annoying snickering.', 'Fractal engine', 6); - Game.TieredUpgrade('Chocolate ouroboros', 'Forever eating its own tail and digesting itself, in a metabolically dubious tale of delicious tragedy.', 'Fractal engine', 7); - Game.TieredUpgrade('Nested', 'Clever self-reference or shameful cross-promotion? This upgrade apparently has the gall to advertise a link to orteil.dashnet.org/nested, in a tooltip you can\'t even click.', 'Fractal engine', 8); - Game.TieredUpgrade('Space-filling fibers', 'This special ingredient has the incredible ability to fill the local space perfectly, effectively eradicating hunger in those who consume it!
Knowing that no hunger means no need for cookies, your marketers urge you to repurpose this product into next-level packing peanuts.
', 'Fractal engine', 9); - Game.TieredUpgrade('Endless book of prose', '', 'Fractal engine', 10); - if (EN) { - Game.last.descFunc = function () { - var str = '"There once was a baker named ' + Game.bakeryName + '. One day, there was a knock at the door; ' + Game.bakeryName + ' opened it and was suddenly face-to-face with a strange and menacing old grandma. The grandma opened her mouth and, in a strange little voice, started reciting this strange little tale : '; - var n = 35; - var i = Math.floor(Game.T * 0.1); - return this.desc + '' + (str.substr(i % str.length, n) + (i % str.length > (str.length - n) ? str.substr(0, i % str.length - (str.length - n)) : '')) + ''; - }; - } - else Game.last.desc = '-'; - Game.TieredUpgrade('The set of all sets', 'The answer, of course, is a definite maybe.', 'Fractal engine', 11); - - order = 5000; - Game.SynergyUpgrade('Recursive mirrors', 'Do you have any idea what happens when you point two of these at each other? Apparently, the universe doesn\'t either.', 'Fractal engine', 'Prism', 'synergy1'); - //Game.SynergyUpgrade('Compounded odds','When probabilities start cascading, "never in a billion lifetimes" starts looking terribly like "probably before Monday comes around".','Fractal engine','Chancemaker','synergy1'); - Game.SynergyUpgrade('Mice clicking mice', '', 'Fractal engine', 'Cursor', 'synergy2'); - if (EN) { - Game.last.descFunc = function () { - Math.seedrandom(Game.seed + '-blasphemouse'); - if (Math.random() < 0.3) { Math.seedrandom(); return this.desc + 'Absolutely blasphemouse!'; } - else { Math.seedrandom(); return this.desc + 'Absolutely blasphemous!'; } - }; - } - else Game.last.desc = '-'; - - - order = 10020; - Game.NewUpgradeCookie({ name: 'Custard creams', desc: 'British lore pits these in a merciless war against bourbon biscuits.
The filling evokes vanilla without quite approaching it.
They\'re tastier on the inside!', icon: [23, 29], power: 4, price: 9999999999999999999999999999999999999 * 5 }); - Game.NewUpgradeCookie({ name: 'Bourbon biscuits', desc: 'Two chocolate biscuits joined together with even more chocolate.
The sworn rivals of custard creams, as legend has it.', icon: [24, 29], power: 4, price: 99999999999999999999999999999999999999 }); - - - new Game.Upgrade('Keepsakes', loc("Seasonal random drops have a 1/5 chance to carry over through ascensions.") + 'Cherish the memories.', 1111111111, [22, 29]); Game.last.pool = 'prestige'; Game.last.parents = ['Starsnow', 'Starlove', 'Starterror', 'Startrade', 'Starspawn']; - - order = 10020; - Game.NewUpgradeCookie({ name: 'Mini-cookies', desc: 'Have you ever noticed how the smaller something is, the easier it is to binge on it?', icon: [29, 30], power: 5, price: 99999999999999999999999999999999999999 * 5 }); - - new Game.Upgrade('Sugar crystal cookies', (EN ? 'Cookie production multiplier +5% permanently, and +1% for every building type level 10 or higher.' : loc("Cookie production multiplier +%1% permanently.", 5) + '
' + loc("Cookie production multiplier +%1% for every building type level %2 or higher.", [1, 10])) + 'Infused with cosmic sweetness. It gives off a faint shimmery sound when you hold it up to your ear.', 1000000000, [21, 30]); Game.last.pool = 'prestige'; Game.last.parents = ['Sugar baking']; Game.last.power = function () { - var n = 5; - for (var i in Game.Objects) { - if (Game.Objects[i].level >= 10) n++; - } - return n; - }; Game.last.pseudoCookie = true; - Game.last.descFunc = function () { - var n = 5; - for (var i in Game.Objects) { - if (Game.Objects[i].level >= 10) n++; - } - return '
' + loc("Current:") + ' +' + Beautify(n) + '%
' + this.ddesc; - }; - new Game.Upgrade('Box of maybe cookies', loc("Contains an assortment of...something.") + 'These may or may not be considered cookies.', 333000000000, [25, 29]); Game.last.pool = 'prestige'; Game.last.parents = ['Sugar crystal cookies']; - new Game.Upgrade('Box of not cookies', loc("Contains an assortment of...something.") + 'These are strictly, definitely not cookies.', 333000000000, [26, 29]); Game.last.pool = 'prestige'; Game.last.parents = ['Sugar crystal cookies']; - new Game.Upgrade('Box of pastries', loc("Contains an assortment of delicious pastries.") + 'These are a damn slippery slope is what they are!', 333000000000, [27, 29]); Game.last.pool = 'prestige'; Game.last.parents = ['Sugar crystal cookies']; - - order = 10040; - Game.NewUpgradeCookie({ name: 'Profiteroles', desc: 'Also known as cream puffs, these pastries are light, fluffy, filled with whipped cream and fun to throw at people when snowballs are running scarce.', icon: [29, 29], require: 'Box of pastries', power: 4, price: Math.pow(10, 31) }); - Game.NewUpgradeCookie({ name: 'Jelly donut', desc: 'Guaranteed to contain at least 0.3% jelly filling, or your money back.
You can still see the jelly stab wound!', icon: [27, 28], require: 'Box of pastries', power: 4, price: Math.pow(10, 33) }); - Game.NewUpgradeCookie({ name: 'Glazed donut', desc: 'Absolutely gooey with sugar. The hole is the tastiest part!', icon: [28, 28], require: 'Box of pastries', power: 4, price: Math.pow(10, 35) }); - Game.NewUpgradeCookie({ name: 'Chocolate cake', desc: 'The cake is a Portal reference!', icon: [25, 27], require: 'Box of pastries', power: 4, price: Math.pow(10, 37) }); - Game.NewUpgradeCookie({ name: 'Strawberry cake', desc: 'It\'s not easy to come up with flavor text for something as generic as this, but some would say it\'s a piece of cake.', icon: [26, 27], require: 'Box of pastries', power: 4, price: Math.pow(10, 39) }); - Game.NewUpgradeCookie({ name: 'Apple pie', desc: 'It is said that some grandmas go rogue and bake these instead.', icon: [25, 28], require: 'Box of pastries', power: 4, price: Math.pow(10, 41) }); - Game.NewUpgradeCookie({ name: 'Lemon meringue pie', desc: 'Meringue is a finicky substance made of sugar and egg whites that requires specific atmospheric conditions to be baked at all. The lemon, as far as we can tell, isn\'t nearly as picky.', icon: [26, 28], require: 'Box of pastries', power: 4, price: Math.pow(10, 43) }); - Game.NewUpgradeCookie({ name: 'Butter croissant', desc: 'Look around.
A rude man in a striped shirt bikes past you. He smells of cigarettes and café-au-lait. Somewhere, a mime uses his moustache to make fun of the British. 300 pigeons fly overhead.
Relax. You\'re experiencing croissant.', icon: [29, 28], require: 'Box of pastries', power: 4, price: Math.pow(10, 45) }); - - order = 10050; - Game.NewUpgradeCookie({ name: 'Cookie dough', desc: 'Bursting with infinite potential, but can also be eaten as is. Arguably worth the salmonella.', icon: [25, 30], require: 'Box of maybe cookies', power: 4, price: Math.pow(10, 35) }); - Game.NewUpgradeCookie({ name: 'Burnt cookie', desc: 'This cookie flew too close to the sun and is now a shadow of its former self. If only you remembered to set a timer, you wouldn\'t have this tragedy on your hands...', icon: [23, 30], require: 'Box of maybe cookies', power: 4, price: Math.pow(10, 37) }); - Game.NewUpgradeCookie({ name: 'A chocolate chip cookie but with the chips picked off for some reason', desc: 'This has to be the saddest thing you\'ve ever seen.', icon: [24, 30], require: 'Box of maybe cookies', power: 3, price: Math.pow(10, 39) }); - Game.NewUpgradeCookie({ name: 'Flavor text cookie', desc: 'What you\'re currently reading is what gives this cookie its inimitable flavor.', icon: [22, 30], require: 'Box of maybe cookies', power: 4, price: Math.pow(10, 41) }); - Game.NewUpgradeCookie({ name: 'High-definition cookie', desc: 'Uncomfortably detailed, like those weird stories your aunt keeps telling at parties.', icon: [28, 10], require: 'Box of maybe cookies', power: 5, price: Math.pow(10, 43) }); - - order = 10060; - Game.NewUpgradeCookie({ name: 'Toast', desc: 'A crisp slice of bread, begging for some butter and jam.
Why do people keep proposing these at parties?', icon: [27, 10], require: 'Box of not cookies', power: 4, price: Math.pow(10, 34) }); - Game.NewUpgradeCookie({ name: 'Peanut butter & jelly', desc: 'It\'s time.', icon: [29, 9], require: 'Box of not cookies', power: 4, price: Math.pow(10, 36) }); - Game.NewUpgradeCookie({ name: 'Wookies', desc: 'These aren\'t the cookies you\'re looking for.', icon: [26, 30], require: 'Box of not cookies', power: 4, price: Math.pow(10, 38) }); - Game.NewUpgradeCookie({ name: 'Cheeseburger', desc: 'Absolutely no relation to cookies whatsoever - Orteil just wanted an excuse to draw a cheeseburger.', icon: [28, 30], require: 'Box of not cookies', power: 4, price: Math.pow(10, 40) }); - Game.NewUpgradeCookie({ name: 'One lone chocolate chip', desc: 'The start of something beautiful.', icon: [27, 30], require: 'Box of not cookies', power: 1, price: Math.pow(10, 42) }); - - - new Game.Upgrade('Genius accounting', loc("Unlocks extra price information.
Each displayed cost now specifies how long it'll take you to afford it, and how much of your bank it represents.") + 'There\'s no accounting for taste, and yet here we are.', 2000000, [11, 10]); Game.last.pool = 'prestige'; Game.last.parents = ['Inspired checklist']; - - - new Game.Upgrade('Shimmering veil', loc("Unlocks the shimmering veil, a switch that passively boosts your CpS by %1%.
You start with the veil turned on; however, it is very fragile, and clicking the big cookie or any golden cookie or reindeer will turn it off, requiring %2 of CpS to turn back on.", [50, Game.sayTime(24 * 60 * 60 * Game.fps, 2)]) + 'Hands off!', 999999999, [9, 10]); Game.last.pool = 'prestige'; Game.last.parents = ['Distilled essence of redoubled luck']; - - order = 40005; - var func = function () { - var boost = Game.getVeilBoost(); - var resist = Game.getVeilDefense(); - return (this.name == 'Shimmering veil [on]' ? '
' + loc("Active.") + '
' : '') + loc("Boosts your cookie production by %1% when active.
The veil is very fragile and will break if you click the big cookie or any golden cookies or reindeer.

Once broken, turning the veil back on costs %2 of unbuffed CpS.", [Beautify(boost * 100), Game.sayTime(24 * 60 * 60 * Game.fps, 2)]) + (resist > 0 ? ('

' + loc("Has a %1% chance to not break.", Beautify(resist * 100))) : ''); - }; - new Game.Upgrade('Shimmering veil [off]', '', 1000000, [9, 10]); - Game.last.pool = 'toggle'; Game.last.toggleInto = 'Shimmering veil [on]'; - Game.last.priceFunc = function () { return Game.unbuffedCps * 60 * 60 * 24; } - Game.last.descFunc = func; - new Game.Upgrade('Shimmering veil [on]', '', 0, [9, 10]); - Game.last.pool = 'toggle'; Game.last.toggleInto = 'Shimmering veil [off]'; - Game.last.descFunc = func; - - Game.loseShimmeringVeil = function (context) { - if (!Game.Has('Shimmering veil')) return false; - if (!Game.Has('Shimmering veil [off]') && Game.Has('Shimmering veil [on]')) return false; - if (Game.Has('Reinforced membrane')) { - if (context == 'shimmer') Math.seedrandom(Game.seed + '/' + (Game.goldenClicks + Game.reindeerClicked)); - else if (context == 'click') Math.seedrandom(Game.seed + '/' + Game.cookieClicks); - if (Math.random() < Game.getVeilDefense()) { - Game.Notify(loc("The reinforced membrane protects the shimmering veil."), '', [7, 10]); - Game.Win('Thick-skinned'); - Math.seedrandom(); - return false; - } - Math.seedrandom(); - } - var me = Game.Upgrades['Shimmering veil [on]']; - me.bought = 1; - //Game.Upgrades[me.toggleInto].bought=false; - Game.Lock(me.toggleInto); - Game.Unlock(me.toggleInto); - Game.Notify(loc("The shimmering veil disappears..."), '', [9, 10]); - Game.upgradesToRebuild = 1; - Game.recalculateGains = 1; - PlaySound('snd/spellFail.mp3', 0.75); - } - - - var getCookiePrice = function (level) { return 999999999999999999999999999999999999999 * Math.pow(10, (level - 1) / 2); }; - - order = 10020; - Game.NewUpgradeCookie({ name: 'Whoopie pies', desc: 'Two chocolate halves joined together by a cream filling. It\'s got no eyebrows, but you never noticed until now.', icon: [21, 31], power: 5, price: getCookiePrice(1) }); - Game.NewUpgradeCookie({ name: 'Caramel wafer biscuits', desc: 'Coated in delicious chocolate. As many layers as you\'ll get in a biscuit without involving onions.', icon: [22, 31], power: 5, price: getCookiePrice(2) }); - Game.NewUpgradeCookie({ name: 'Chocolate chip mocha cookies', desc: 'Mocha started out as an excuse to smuggle chocolate into coffee. And now, in a poignant display of diplomacy and cultural exchange, it\'s bringing coffee to chocolate cookies.', icon: [23, 31], power: 5, price: getCookiePrice(3) }); - Game.NewUpgradeCookie({ name: 'Earl Grey cookies', desc: 'Captain Picard\'s favorite.', icon: [24, 31], power: 5, price: getCookiePrice(4) }); - Game.NewUpgradeCookie({ name: 'Corn syrup cookies', desc: 'The corn syrup makes it extra chewy. Not the type of stuff you\'d think to put in a cookie, but bakers make do.', icon: [25, 31], power: 5, price: getCookiePrice(5) }); - Game.NewUpgradeCookie({ name: 'Icebox cookies', desc: 'Can be prepared in a variety of shapes with a variety of ingredients. Made by freezing dough before baking it, mirroring a time-proven medieval torture practice. Gotta keep them guessing.', icon: [26, 31], power: 5, price: getCookiePrice(6) }); - Game.NewUpgradeCookie({ name: 'Graham crackers', desc: 'Inspired in their design by the wish to live a life of austere temperance, free from pleasure or cheer; it\'s no wonder these are so tasty.', icon: [27, 31], power: 5, price: getCookiePrice(7) }); - Game.NewUpgradeCookie({ name: 'Hardtack', desc: 'Extremely hard and, if we\'re being honest, extremely tack.
If you\'re considering eating this as a fun snack, you probably have other things to worry about than this game, like getting scurvy or your crew fomenting mutiny.', icon: [28, 31], power: 5, price: getCookiePrice(8) }); - Game.NewUpgradeCookie({ name: 'Cornflake cookies', desc: 'They\'re grrrrrroovy! Careful not to let it sit in your milk too long, lest you accidentally end up with a bowl of cereal and get confused.', icon: [29, 31], power: 5, price: getCookiePrice(9) }); - Game.NewUpgradeCookie({ name: 'Tofu cookies', desc: 'There\'s really two ways to go with tofu cooking; either it asserts itself in plain sight or it camouflages itself in the other ingredients. This happens to be the latter, and as such, you can\'t really tell the difference between this and a regular cookie, save for that one pixel on the left.', icon: [30, 31], power: 5, price: getCookiePrice(10) }); - Game.NewUpgradeCookie({ name: 'Gluten-free cookies', desc: 'Made with browned butter and milk to closely match the archetypal chocolate chip cookie.
For celiacs, a chance to indulge in a delicious risk-free pastry. For others, a strangely threatening confection whose empty eyes will never know heaven nor hell.', icon: [30, 30], power: 5, price: getCookiePrice(10) }); - Game.NewUpgradeCookie({ name: 'Russian bread cookies', desc: 'Also known as alphabet cookies; while most bakers follow the recipe to the letter, it is said that some substitute the flour for spelt. But don\'t take my word for it.', icon: [30, 29], power: 5, price: getCookiePrice(11) }); - Game.NewUpgradeCookie({ name: 'Lebkuchen', desc: 'Diverse cookies from Germany, fragrant with honey and spices, often baked around Christmas.
Once worn by warriors of old for protection in battle.
+5 STR, +20% magic resistance.', icon: [30, 28], power: 5, price: getCookiePrice(12) }); - Game.NewUpgradeCookie({ name: 'Aachener Printen', desc: 'The honey once used to sweeten these gingerbread-like treats has since been swapped out for beet sugar, providing another sad example of regressive evolution.', icon: [30, 27], power: 5, price: getCookiePrice(13) }); - Game.NewUpgradeCookie({ name: 'Canistrelli', desc: 'A dry biscuit flavored with anise and wine, tough like the people of Corsica where it comes from.', icon: [30, 26], power: 5, price: getCookiePrice(14) }); - Game.NewUpgradeCookie({ name: 'Nice biscuits', desc: 'Made with coconut and perfect with tea. Traces its origins to a French city so nice they named it that.', icon: [30, 25], power: 5, price: getCookiePrice(15) }); - Game.NewUpgradeCookie({ name: 'French pure butter cookies', desc: 'You can\'t tell what\'s stronger coming off these - the smell of butter or condescension.', icon: [31, 25], power: 5, price: getCookiePrice(16) }); - Game.NewUpgradeCookie({ name: 'Petit beurre', desc: 'An unassuming biscuit whose name simply means "little butter". Famed and feared for its four ears and forty-eight teeth.
When it hears ya, it\'ll get ya...', icon: [31, 26], power: 5, price: getCookiePrice(16) }); - Game.NewUpgradeCookie({ name: 'Nanaimo bars', desc: 'A delicious no-bake pastry hailing from Canada. Probably beats eating straight-up snow with maple syrup poured on it, but what do I know.', icon: [31, 27], power: 5, price: getCookiePrice(17) }); - Game.NewUpgradeCookie({ name: 'Berger cookies', desc: 'Messily slathered with chocolate fudge, but one of the most popular bergers of Baltimore, along with the triple fried egg berger and the blue crab cheeseberger.', icon: [31, 28], power: 5, price: getCookiePrice(18) }); - Game.NewUpgradeCookie({ name: 'Chinsuko', desc: 'A little piece of Okinawa in cookie form. Part of a Japanese custom of selling sweets as souvenirs. But hey, pressed pennies are cool too.', icon: [31, 29], power: 5, price: getCookiePrice(19) }); - Game.NewUpgradeCookie({ name: 'Panda koala biscuits', desc: 'Assorted jungle animals with equally assorted fillings.
Comes in chocolate, strawberry, vanilla and green tea.
Eat them all before they go extinct!', icon: [31, 13], power: 5, price: getCookiePrice(19) }); - Game.NewUpgradeCookie({ name: 'Putri salju', desc: 'A beloved Indonesian pastry; its name means "snow princess", for the powdered sugar it\'s coated with. Had we added these to Cookie Clicker some years ago, this is where we\'d make a reference to that one Disney movie, but it\'s probably time to let it go.', icon: [31, 30], power: 5, price: getCookiePrice(20) }); - Game.NewUpgradeCookie({ name: 'Milk cookies', desc: 'Best eaten with a tall glass of chocolate.', icon: [31, 31], power: 5, price: getCookiePrice(21) }); - - order = 9999; - Game.NewUpgradeCookie({ name: 'Cookie crumbs', desc: 'There used to be a cookie here. Now there isn\'t.
Good heavens, what did you DO?!', icon: [30, 13], power: 1, require: 'Legacy', price: 100 }); - Game.NewUpgradeCookie({ name: 'Chocolate chip cookie', desc: 'This is the cookie you\'ve been clicking this whole time. It looks a bit dented and nibbled on, but it\'s otherwise good as new.', icon: [10, 0], power: 10, require: 'Legacy', price: 1000000000000 }); - - - new Game.Upgrade('Cosmic beginner\'s luck', loc("Prior to purchasing the %1 upgrade in a run, random drops are %2 times more common.", [getUpgradeName("Heavenly chip secret"), 5]) + 'Oh! A penny!
Oh! A priceless heirloom!
Oh! Another penny!
', 999999999 * 15, [8, 10]); Game.last.pool = 'prestige'; Game.last.parents = ['Shimmering veil']; - Game.getVeilDefense = function () { - var n = 0; - if (Game.Has('Reinforced membrane')) n += 0.1; - if (Game.Has('Delicate touch')) n += 0.1; - if (Game.Has('Steadfast murmur')) n += 0.1; - if (Game.Has('Glittering edge')) n += 0.1; - return n; - } - Game.getVeilBoost = function () { - var n = 0.5; - if (Game.Has('Reinforced membrane')) n += 0.1; - if (Game.Has('Delicate touch')) n += 0.05; - if (Game.Has('Steadfast murmur')) n += 0.05; - if (Game.Has('Glittering edge')) n += 0.05; - return n; - } - new Game.Upgrade('Reinforced membrane', loc("The shimmering veil is more resistant, and has a %1% chance not to break. It also gives +%2% more CpS.", [10, 10]) + 'A consistency between jellyfish and cling wrap.', 999999999 * 15, [7, 10]); Game.last.pool = 'prestige'; Game.last.parents = ['Shimmering veil']; - - - order = 255; - Game.GrandmaSynergy('Binary grandmas', 'A digital grandma to transfer more cookies.
(See also : boolean grandmas, string grandmas, and not-a-number grandmas, also known as "NaNs".)', 'Javascript console'); - - order = 1400; - Game.TieredUpgrade('The JavaScript console for dummies', 'This should get you started. The first line reads: "To open the javascript console, press-"
...the rest of the book is soaked in chocolate milk. If only there was a way to look up this sort of information...
', 'Javascript console', 1); - Game.TieredUpgrade('64bit arrays', 'A long-form variable type to pack your cookies much more efficiently.', 'Javascript console', 2); - Game.TieredUpgrade('Stack overflow', 'This is really bad! You probably forgot to close a loop somewhere and now your programs are going crazy! The rest of your engineers seem really excited about it somehow. How could a software mishap like a stack overflow possibly ever help anyone?', 'Javascript console', 3); - Game.TieredUpgrade('Enterprise compiler', 'This bespoke javascript compiler took your team years of development and billions in research, but it should let you execute (certain) functions (up to) 2% faster (in optimal circumstances).', 'Javascript console', 4); - Game.TieredUpgrade('Syntactic sugar', 'Tastier code for tastier cookies.', 'Javascript console', 5); - Game.TieredUpgrade('A nice cup of coffee', 'All this nerd stuff has you exhausted. You make yourself a nice cup of coffee, brewed with roasted beans from some far-away island. You may have been working a bit too hard though - the cup of coffee starts talking to you, insisting that it is NOT javascript.', 'Javascript console', 6); - Game.TieredUpgrade('Just-in-time baking', 'A new method of preparing cookies; they bake themselves right in front of the customers before eating, leaving your kitchens mess-free.', 'Javascript console', 7); - Game.TieredUpgrade('cookies++', 'Your very own cookie-themed programming language, elegantly named after its most interesting ability - increasing the "cookies" variable by 1.', 'Javascript console', 8); - Game.TieredUpgrade('Software updates', 'This is grand news - someone\'s finally figured out the Wifi password, and your newfound internet connection seems to have triggered a whole lot of software updates! Your browsers, drivers and plugins all received a fresh coat of paint, and your javascript version has been updated to the latest ECMAScript specification. It\'s really too bad thousands had to die due to some deprecated function in your neurotoxin ventilation code, but I guess that\'s progress for you.', 'Javascript console', 9); - Game.TieredUpgrade('Game.Loop', 'You\'re not quite sure what to make of this. What does it mean? What does it do? Who would leave something like that just laying around here? Try asking again in 1/30th of a second.', 'Javascript console', 10); - Game.TieredUpgrade('eval()', 'It is said that this simple function holds the key to the universe, and that whosoever masters it may shape reality to their will.
Good thing you have no idea how it works. Makes for a neat plaque on your wall, though.
', 'Javascript console', 11); - - order = 5000; - Game.SynergyUpgrade('Script grannies', 'Armies of energy drink-fueled grandmas ready to hack into the cyberspace for renegade e-cookies.', 'Javascript console', 'Grandma', 'synergy1'); - Game.SynergyUpgrade('Tombola computing', '', 'Javascript console', 'Chancemaker', 'synergy2'); - if (EN) { - Game.last.descFunc = function () { - Math.seedrandom(Game.seed + '-tombolacomputing'); - var str = '(Your ticket reads ' + Math.floor(Math.random() * 100) + ' ' + Math.floor(Math.random() * 100) + ' ' + Math.floor(Math.random() * 100) + ' ' + Math.floor(Math.random() * 100) + ', entitling you to ' + choose([Math.floor(Math.random() * 5 + 2) + ' lines of javascript', 'one free use of Math.random()', 'one qubit, whatever that is', 'one half-eaten cookie', 'a brand new vacuum cleaner', 'most of one room-temperature cup of orange soda', 'one really good sandwich', 'one handful of pocket lint', 'someone\'s mostly clean hairpiece', 'a trip to a fancy restaurant', 'the knowledge of those numbers', 'a furtive glance at the news ticker', 'another ticket, half-price', 'all-you-can-eat moldy bread', 'one lifetime supply of oxygen', 'the color ' + choose['red', 'orange', 'yellow', 'green', 'blue', 'purple', 'black', 'white', 'gray', 'brown', 'pink', 'teal'], 'increased intellect for a limited time', 'an ancient runesword', 'the throne of a far-away country', 'the position of Mafia capo. Good luck', 'one free time-travel week-end', 'something beautiful', 'the deed to some oil well', 'one hamburger made out of the animal, plant, or person of your choice', 'the last surviving ' + choose['dodo bird', 'thylacine', 'unicorn', 'dinosaur', 'neanderthal'], 'a deep feeling of accomplishment', 'a fleeting tinge of entertainment', 'a vague sense of unease', 'deep existential dread', 'one extra week added to your lifespan', 'breathe manually', 'blink right here and now', 'one meeting with any famous person, living or dead, in your next dream', 'one very nice dream', 'a wacky sound effect', '45 seconds of moral flexibility', 'hundreds and thousands, also known as "sprinkles"', 'one circle, triangle, square or other simple geometric shape, of average dimensions', 'just this extra bit of randomness', 'the extra push you needed to turn your life around', 'a good fright', 'one secret superpower', 'a better luck next time', 'an irrational phobia of tombola tickets', 'one whole spider', 'an increased sense of self-worth and determination', 'inner peace', 'one double-XP week-end in the MMORPG of your choice', 'a little piece of the universe, represented by the trillions of atoms that make up this very ticket', 'food poisoning', 'the Moon! Well, conceptually', 'a new car, baby', 'a new catchphrase', 'an intrusive thought of your choice', '- ...aw man, it just cuts off there', 'the director spot for the next big hit movie', 'really good-looking calves', 'one genuine pirate golden doubloon', '"treasure and riches", or something', 'one boat, sunken', 'baby shoes, never worn', 'direct lineage to some King or Queen', 'innate knowledge of a dead language you\'ll never encounter', 'the melody of a song you don\'t know the words to', 'white noise', 'mild physical impairment', 'a new pair of lips', 'things, and such', 'one popular expression bearing your name', 'one typo', 'one get-out-of-jail-free card', 'the rest of your life... for now', 'one polite huff', 'a condescending stare', 'one cursed monkey paw', 'true love, probably', 'an interesting factoid about the animal, country, TV show or celebrity of your choice', 'a pop culture reference', 'minutes of fun', 'the etymology of the word "tombola" - it\'s Italian for "a tumble"', 'nothing. You lost, sorry']) + '.)'; - Math.seedrandom(); - return this.desc + 'Like quantum computing, but more fun.
' + str + '
'; - }; - } - else Game.last.desc = '-'; - - order = 10020; - Game.NewUpgradeCookie({ name: 'Kruidnoten', desc: 'A festive dutch favorite; tiny cinnamony bites sometimes coated in chocolate. The name translates roughly to "kruidnoten".', icon: [30, 3], power: 5, price: getCookiePrice(22) }); - Game.NewUpgradeCookie({ name: 'Marie biscuits', desc: 'Pleasantly round, smoothly buttery, subtly vanilla-flavored, ornately embossed, each ridge represents a person Marie killed in prison.', icon: [30, 4], power: 5, price: getCookiePrice(23) }); - Game.NewUpgradeCookie({ name: 'Meringue cookies', desc: 'Probably the most exciting thing you can make out of egg whites. Also called forgotten cookies, due to the recipe being once lost in a sealed mystical vault for 10,000 years.', icon: [31, 4], power: 5, price: getCookiePrice(24) }); - - order = 10060; - Game.NewUpgradeCookie({ name: 'Pizza', desc: 'What is a pizza if not a large, chewy cookie, frosted with a rather exuberant tomato & cheese icing? Not a cookie, that\'s what.', icon: [31, 9], require: 'Box of not cookies', power: 5, price: Math.pow(10, 44) }); - - order = 10050; - Game.NewUpgradeCookie({ name: 'Crackers', desc: 'These are the non-flavored kind with no salt added. Really just a judgment-free wheat square begging to have bits of ham and spreadable cheese piled onto it, its main contribution being "crunchy".', icon: [30, 9], require: 'Box of maybe cookies', power: 4, price: Math.pow(10, 45) }); - - order = 10030; - Game.NewUpgradeCookie({ name: 'Havabreaks', desc: 'You can snap the sections neatly or just bite into the whole thing like some kind of lunatic. Some oversea countries manufacture these in hundreds of unique flavors, such as green tea, lobster bisque, and dark chocolate.', icon: [31, 3], require: 'Box of brand biscuits', power: 2, price: 999999999999999999999999999 * 5 }); - - order = 20000; - new Game.Upgrade('Kitten executives', strKittenDesc + 'ready to execute whatever and whoever you\'d like, sir', 900000000000000000000000000000000000000000000, Game.GetIcon('Kitten', 13)); Game.last.kitten = 1; Game.MakeTiered(Game.last, 13, 18); - - - order = 10020; - Game.NewUpgradeCookie({ name: 'Chai tea cookies', desc: 'Not exactly Captain Picard\'s favorite, but I mean, these will do in a pinch.', icon: [23, 32], power: 5, price: getCookiePrice(4) + 5 }); Game.last.order = 10020.5685; - - Game.NewUpgradeCookie({ name: 'Yogurt cookies', desc: 'Augmented by the wonders of dairy, these cookies are light and fluffy and just one more thing for the lactose-intolerant to avoid.
Truly for the cultured among us.', icon: [24, 32], power: 5, price: getCookiePrice(25) }); - Game.NewUpgradeCookie({ name: 'Thumbprint cookies', desc: 'Filled with jam and sometimes served in little paper cups. No longer admissible as biometric evidence in court. We\'re not having a repeat of that whole mess.', icon: [25, 32], power: 5, price: getCookiePrice(26) }); - Game.NewUpgradeCookie({ name: 'Pizzelle', desc: 'Thin, crisp waffle cookies baked in a bespoke iron following an ancient Italian recipe.
These cookies have been around for a long, long time.
These cookies have seen things.', icon: [26, 32], power: 5, price: getCookiePrice(27) }); - - order = 10030; - Game.NewUpgradeCookie({ name: 'Zilla wafers', desc: 'Popular vanilla-flavored biscuits that somehow keep ending up in banana pudding.
Themed after a beloved radioactive prehistoric monster, for some reason.', icon: [22, 32], require: 'Box of brand biscuits', power: 2, price: 999999999999999999999999999999 * 5 }); - Game.NewUpgradeCookie({ name: 'Dim Dams', desc: 'Two biscuits joined by chocolate and coated in even more chocolate.
You wonder - which one is the dim, and which one is the dam?', icon: [31, 10], require: 'Box of brand biscuits', power: 2, price: 999999999999999999999999999999999 * 5 }); - - order = 10060; - Game.NewUpgradeCookie({ name: 'Candy', desc: 'There are two pillars to the world of sweets : pastries, of course - and candy.
You could make a whole new game just about these, but for now, please enjoy these assorted generic treats.', icon: [30, 10], require: 'Box of not cookies', power: 5, price: Math.pow(10, 46) }); - - - order = 19000; - Game.TieredUpgrade('Fortune #001', 'Fingers are not the only thing you can count on.', 'Cursor', 'fortune'); - Game.TieredUpgrade('Fortune #002', 'A wrinkle is a crack in a mundane facade.', 'Grandma', 'fortune'); - Game.TieredUpgrade('Fortune #003', 'The seeds of tomorrow already lie within the seeds of today.', 'Farm', 'fortune'); - Game.TieredUpgrade('Fortune #004', 'Riches from deep under elevate you all the same.', 'Mine', 'fortune'); - Game.TieredUpgrade('Fortune #005', 'True worth is not in what you find, but in what you make.', 'Factory', 'fortune'); - Game.TieredUpgrade('Fortune #006', 'The value of money means nothing to a pocket.', 'Bank', 'fortune'); - Game.TieredUpgrade('Fortune #007', 'Not all guides deserve worship.', 'Temple', 'fortune'); - Game.TieredUpgrade('Fortune #008', 'Magic is about two things - showmanship, and rabbits.', 'Wizard tower', 'fortune'); - Game.TieredUpgrade('Fortune #009', 'Every mile travelled expands the mind by just as much.', 'Shipment', 'fortune'); - Game.TieredUpgrade('Fortune #010', 'Change what you cannot accept. Furthermore: accept nothing.', 'Alchemy lab', 'fortune'); - Game.TieredUpgrade('Fortune #011', 'Every doorway is a gamble. Tread with care.', 'Portal', 'fortune'); - Game.TieredUpgrade('Fortune #012', 'Do your future self a favor; they\'ll thank you for it.', 'Time machine', 'fortune'); - Game.TieredUpgrade('Fortune #013', 'The world is made of what we put into it.', 'Antimatter condenser', 'fortune'); - Game.TieredUpgrade('Fortune #014', 'Staring at a dazzling light can blind you back to darkness.', 'Prism', 'fortune'); - Game.TieredUpgrade('Fortune #015', 'Don\'t leave to blind chance what you could accomplish with deaf skill.', 'Chancemaker', 'fortune'); - Game.TieredUpgrade('Fortune #016', 'It\'s good to see yourself in others. Remember to see yourself in yourself, too.', 'Fractal engine', 'fortune'); - Game.TieredUpgrade('Fortune #017', 'If things aren\'t working out for you, rewrite the rules.', 'Javascript console', 'fortune'); - - - order = 19100; - //note : price for these capped to base price OR 1 day of unbuffed CpS - new Game.Upgrade('Fortune #100', loc("All buildings and upgrades are %1% cheaper.", 1) + ' ' + loc("Cookie production multiplier +%1%.", 1) + 'True wealth is counted in gifts.', - Game.Tiers['fortune'].price * 100000, [0, 0]); Game.MakeTiered(Game.last, 'fortune', 10); - Game.last.priceFunc = function (me) { return Math.min(me.basePrice, Game.unbuffedCps * 60 * 60 * 24); } - new Game.Upgrade('Fortune #101', loc("Cookie production multiplier +%1%.", 7) + 'Some people dream of fortunes; others dream of cookies.', Game.Tiers['fortune'].price * 100000000, [0, 0]); Game.MakeTiered(Game.last, 'fortune', 10); - Game.last.priceFunc = function (me) { return Math.min(me.basePrice, Game.unbuffedCps * 60 * 60 * 24); } - new Game.Upgrade('Fortune #102', loc("You gain another +%1% of your regular CpS while the game is closed.", 1) + ' (' + loc("Must own the %1 upgrade.", getUpgradeName("Twin Gates of Transcendence")) + ')' + 'Help, I\'m trapped in a ' + (App ? 'computer' : 'browser') + ' game!', Game.Tiers['fortune'].price * 100000000000, [0, 0]); Game.MakeTiered(Game.last, 'fortune', 10); - Game.last.priceFunc = function (me) { return Math.min(me.basePrice, Game.unbuffedCps * 60 * 60 * 24); } - new Game.Upgrade('Fortune #103', strKittenDesc + 'Don\'t believe the superstitions; all cats are good luck.', Game.Tiers['fortune'].price * 100000000000000, [0, 0]); Game.MakeTiered(Game.last, 'fortune', 18); Game.last.kitten = 1; - Game.last.priceFunc = function (me) { return Math.min(me.basePrice, Game.unbuffedCps * 60 * 60 * 24); } - new Game.Upgrade('Fortune #104', getStrClickingGains(1) + 'Remember to stay in touch.', Game.Tiers['fortune'].price * 100000000000, [0, 0]); Game.MakeTiered(Game.last, 'fortune', 11); - Game.last.priceFunc = function (me) { return Math.min(me.basePrice, Game.unbuffedCps * 60 * 60 * 24); } - - new Game.Upgrade('Fortune cookies', loc("The news ticker may occasionally have fortunes, which may be clicked for something good.") + 'These don\'t taste all that great but that\'s not really the point, is it?', 77777777777, [29, 8]); Game.last.pool = 'prestige'; Game.last.parents = ['Distilled essence of redoubled luck']; - - - order = 40000; - new Game.Upgrade('A really good guide book', '?????????', 7, [22, 12]);//debug purposes only - //new Game.Upgrade('A really good guide book','All dungeon locations behave as if unlocked.
You may shift-click a dungeon location to teleport there.It even tells you which hotels to avoid!',7,[22,12]);//debug purposes only - Game.last.buyFunction = function () { if (Game.Objects['Factory'].minigameLoaded) { Game.Objects['Factory'].minigame.computeMapBounds(); Game.Objects['Factory'].minigame.updateLocStyles(); } } - Game.last.pool = 'debug'; - - order = 10300; - Game.NewUpgradeCookie({ name: 'Prism heart biscuits', desc: 'An every-flavor biscuit that stands for universal love and being true to yourself.', require: 'Eternal heart biscuits', season: 'valentines', icon: [30, 8], power: heartPower, price: 1000000000000000000000000 }); Game.last.order = 10300.175; - - order = 19100; - new Game.Upgrade('Kitten wages', loc("Through clever accounting, this actually makes kitten upgrades %1% cheaper.", 10) + 'Cats can have little a salary, as a treat.
Cats are expert hagglers and have a keen sense of bargaining, especially in the case of cash.
', 9000000000, [31, 8]); Game.last.pool = 'prestige'; Game.last.parents = ['Kitten angels']; Game.last.kitten = 1; - new Game.Upgrade('Pet the dragon', loc("Unlocks the ability to pet your dragon by clicking on it once hatched.") + 'Dragons do not purr. If your dragon starts purring, vacate the area immediately.', 99999999999, [30, 12]); Game.last.pool = 'prestige'; Game.last.parents = ['How to bake your dragon', 'Residual luck']; - - order = 25100; - var dragonDropUpgradeCost = function (me) { return Game.unbuffedCps * 60 * 30 * ((Game.dragonLevel < Game.dragonLevels.length - 1) ? 1 : 0.1); }; - new Game.Upgrade('Dragon scale', getStrCookieProductionMultiplierPlus(3) + '
' + loc("Cost scales with CpS, but %1 times cheaper with a fully-trained dragon.", 10) + 'Your dragon sheds these regularly, so this one probably won\'t be missed.
Note: icon not to scale.
', 999, [30, 14]); Game.last.priceFunc = dragonDropUpgradeCost; - new Game.Upgrade('Dragon claw', loc("Clicking is %1% more powerful.", 3) + '
' + loc("Cost scales with CpS, but %1 times cheaper with a fully-trained dragon.", 10) + 'Will grow back in a few days\' time.
A six-inch retractable claw, like a razor, from the middle toe. So you know, try to show a little respect.
', 999, [31, 14]); Game.last.priceFunc = dragonDropUpgradeCost; - new Game.Upgrade('Dragon fang', loc("Golden cookies give %1% more cookies.", 3) + '
' + loc("Dragon harvest and Dragonflight are %1% stronger.", 10) + '
' + loc("Cost scales with CpS, but %1 times cheaper with a fully-trained dragon.", 10) + 'Just a fallen baby tooth your dragon wanted you to have, as a gift.
It might be smaller than an adult tooth, but it\'s still frighteningly sharp - and displays some awe-inspiring cavities, which you might expect from a creature made out of sweets.
', 999, [30, 15]); Game.last.priceFunc = dragonDropUpgradeCost; - new Game.Upgrade('Dragon teddy bear', loc("Random drops are %1% more common.", 3) + '
' + loc("Cost scales with CpS, but %1 times cheaper with a fully-trained dragon.", 10) + 'Your dragon used to sleep with this, but it\'s yours now.
Crafted in the likeliness of a fearsome beast. Stuffed with magical herbs picked long ago by a wandering wizard. Woven from elven yarn and a polyester blend.
', 999, [31, 15]); Game.last.priceFunc = dragonDropUpgradeCost; - - order = 10020; - Game.NewUpgradeCookie({ name: 'Granola cookies', desc: 'Wait! These are just oatmeal cookies mixed with raisin cookies! What next, half-dark chocolate half-white chocolate cookies?', icon: [28, 32], power: 5, price: getCookiePrice(28) }); - Game.NewUpgradeCookie({ name: 'Ricotta cookies', desc: 'Light and cake-like. Often flavored with lemon or almond extract. Sprinkles optional. Allegedly Italian. Investigation pending.', icon: [29, 32], power: 5, price: getCookiePrice(29) }); - Game.NewUpgradeCookie({ name: 'Roze koeken', desc: 'The icing on these Dutch cookies is traditionally pink, but different colors may be used for special occasions - such as pink to celebrate Breast Cancer Awareness Month, or for International Flamingo Day, pink.', icon: [30, 32], power: 5, price: getCookiePrice(30) }); - Game.NewUpgradeCookie({ name: 'Peanut butter cup cookies', desc: 'What more poignant example of modern societal struggles than the brazen reclaiming of a corporate product by integrating it in the vastly more authentic shell of a homemade undertaking? Anyway this is a peanut butter cup, baked into a cookie. It\'s pretty good!', icon: [31, 32], power: 5, price: getCookiePrice(31) }); - Game.NewUpgradeCookie({ name: 'Sesame cookies', desc: 'Look at all the little seeds on these! It\'s like someone dropped them on the street or something! A very welcoming and educational street!', icon: [22, 33], power: 5, price: getCookiePrice(32) }); - Game.NewUpgradeCookie({ name: 'Taiyaki', desc: 'A pastry fish filled with red bean paste, doomed to live an existence of constant and excruciating pain as its aquatic environment slowly dissolves its soft doughy body.
Also comes in chocolate flavor!', icon: [23, 33], power: 5, price: getCookiePrice(33) }); - Game.NewUpgradeCookie({ name: 'Vanillekipferl', desc: 'Nut-based cookies from Central Europe, coated in powdered vanilla sugar. Regular kipferl, crescent-shaped bread rolls from the same region, are much less exciting.', icon: [24, 33], power: 5, price: getCookiePrice(34) }); - - order = 10300; - Game.NewUpgradeCookie({ name: 'Cosmic chocolate butter biscuit', desc: 'Rewarded for owning 550 of everything.
Through some strange trick of magic or technology, looking at this cookie is like peering into a deep ocean of ancient stars. The origins of this biscuit are unknown; its manufacture, as far as your best investigators can tell, left no paper trail. From a certain angle, if you squint hard enough, you\'ll notice that a number of stars near the center are arranged to resemble the outline of your own face.', icon: [27, 32], power: 10, price: 999999999999999999999999999999999999999999999999 * butterBiscuitMult, locked: 1 }); - - order = 100; new Game.Upgrade('Nonillion fingers', getStrThousandFingersGain(20) + 'Only for the freakiest handshakes.', 10000000000000000000000000, [12, 31]); Game.MakeTiered(Game.last, 13, 0); - order = 150; new Game.Upgrade('Miraculite mouse', getStrClickingGains(1) + 'Composed of a material that neither science nor philosophy are equipped to conceptualize. And boy, does it ever click.', 50000000000000000000000000000, [11, 31]); Game.MakeTiered(Game.last, 13, 11); - order = 200; Game.TieredUpgrade('Generation degeneration', 'Genetic testing shows that most of your grandmas are infected with a strange degenerative disease that only seems to further their powers; the more time passes, the older they get. This should concern you.', 'Grandma', 12); - order = 300; Game.TieredUpgrade('Global seed vault', 'An enormous genetic repository that could outlive an apocalypse. Guarantees the survival of your empire, or at the very least its agricultural components, should civilization fall. Which should be any day now.', 'Farm', 12); - order = 400; Game.TieredUpgrade('Air mining', 'You\'ve dug your drills through just about every solid surface you could find. But did you know recent advances have revealed untold riches hiding within non-solid surfaces too?', 'Mine', 12); - order = 500; Game.TieredUpgrade('Behavioral reframing', 'Through careful social engineering you\'ve convinced your workers that "union" is a slur that only the most vile and repugnant filth among us would ever dare utter! Sometimes progress isn\'t in the big machines, it\'s in the little lies!', 'Factory', 12); - order = 525; Game.TieredUpgrade('Altruistic loop', 'You control so many branches of the global economy and legislative bodies that, through a particularly creative loophole, donating money (to yourself) grants you even more cash in tax deductions than you started with!', 'Bank', 12); - order = 550; Game.TieredUpgrade('A novel idea', 'You don\'t get rich starting a religion. If you want to get rich, you write science fiction.', 'Temple', 12); - order = 575; Game.TieredUpgrade('Spelling bees', 'You\'ve unleashed a swarm of magically-enhanced bees upon mankind! Their stinging spells may be the bane of all living things but you\'re certain you can put their delicious, purple, fizzy honey to good use!', 'Wizard tower', 12); - order = 600; Game.TieredUpgrade('Toroid universe', 'If you think of the universe as an nth-dimensional torus that wraps back on itself in every direction, you can save a fortune on rocket fuel! Of course the universe isn\'t actually shaped like that, but you\'ve never let details stand in your way.', 'Shipment', 12); - order = 700; Game.TieredUpgrade('Hermetic reconciliation', 'It\'s time for modern science and the mystical domains of the occult to work together at last. What do gravitons transmute into? What if alkahest is pH-neutral? Should a homunculus have the right to vote? And other exciting questions coming to you soon, whether you like it or not.', 'Alchemy lab', 12); - order = 800; Game.TieredUpgrade('His advent', 'He comes! He comes at last! Just like the prophecies foretold! And as He steps out of the portal, your engineers begin slicing Him into convenient chunks before transporting His writhing cosmic flesh to your factories, where He will be processed and converted into a new and exciting cookie flavor, available in stores tomorrow.', 'Portal', 12); - order = 900; Game.TieredUpgrade('Split seconds', 'Time is infinite, yes... But what if, nestled within each second, were even more infinities? Every moment an eternity! Think of how many scheduling troubles this solves!', 'Time machine', 12); - order = 1000; Game.TieredUpgrade('Flavor itself', 'Deep under the earth, in the most sterile laboratory, in the most vast and expensive particle accelerator ever devised, your scientists have synthesized -for a fraction of a second- the physical manifestation of pure flavor. Highly unstable, and gone in a puff of radioactive energy, it nonetheless left your team shivering with awe... and hunger.', 'Antimatter condenser', 12); - order = 1100; Game.TieredUpgrade('Light speed limit', 'Whoah, slow down. Harvesting light is well and good but it\'d be much easier if it weren\'t so dang fast! This should thankfully take care of that.', 'Prism', 12); - order = 1200; Game.TieredUpgrade('A touch of determinism', 'By knowing the exact position and movement of every particle in the universe, you\'re able to predict everything that can ever happen, leaving nothing to chance. This was a doozy to pull off mind you, but it\'s helped you win 50 bucks at the horse races so you could say it\'s already paying off.', 'Chancemaker', 12); - order = 1300; Game.TieredUpgrade('This upgrade', 'This upgrade\'s flavor text likes to refer to itself, as well as to the fact that it likes to refer to itself. You should really buy this upgrade before it starts doing anything more obnoxious.', 'Fractal engine', 12); - order = 1400; Game.TieredUpgrade('Your biggest fans', 'Let\'s face it, baking cookies isn\'t the most optimized thing there is. So you\'ve purchased your biggest fans yet and stuck them next to your computers to keep things chill and in working order. Cool!', 'Javascript console', 12); - - - order = 10020; - Game.NewUpgradeCookie({ name: 'Battenberg biscuits', desc: 'Inspired by a cake of the same name, itself named after a prince of the same name. You suppose you could play a really, really short game of chess on these.', icon: [28, 33], power: 5, price: getCookiePrice(35) }); - Game.NewUpgradeCookie({ name: 'Rosette cookies', desc: 'Intricate fried pastries from Northern Europe, made using specialized irons and dipped in icing sugar. While usually eaten as a delicious treat, these are often also used as Christmas tree decorations, or worn elegantly on one\'s lapel to symbolize the nah I\'m just messing with you.', icon: [26, 33], power: 5, price: getCookiePrice(36) }); - Game.NewUpgradeCookie({ name: 'Gangmakers', desc: 'The little bit of raspberry jam at its center is crucial; a plain butter cookie with chocolate topping does not a gangmaker make.', icon: [27, 33], power: 5, price: getCookiePrice(37) }); - Game.NewUpgradeCookie({ name: 'Welsh cookies', desc: 'Welsh cookies, also known as Welsh cakes, bakestones, griddle cakes, griddle scones, or pics, or in Welsh: picau ar y maen, pice bach, cacennau cri or teisennau gradell, are rich currant-filled scone-like biscuits of uncertain origin.', icon: [29, 33], power: 5, price: getCookiePrice(38) }); - Game.NewUpgradeCookie({ name: 'Raspberry cheesecake cookies', desc: 'The humble raspberry cheesecake, now in ascended cookie form. Researchers posit that raspberry cheesecake cookies are evidence that the final form of every baked good, through convergent evolution, approaches that of a cookie, in a process known as cookienisation.', icon: [25, 33], power: 5, price: getCookiePrice(39) }); - - - - order = 255; - Game.GrandmaSynergy('Alternate grandmas', 'A different grandma to bake something else.', 'Idleverse'); - - order = 1500; - Game.TieredUpgrade('Manifest destiny', 'While the ethics of ransacking parallel universes for their riches may seem questionable to some, you\'ve reasoned that bringing the good word of your cookie empire to the unwashed confines of other realities is your moral duty, nay, your righteous imperative, and must be undertaken as soon as possible, lest they do it to you first!', 'Idleverse', 1); - Game.TieredUpgrade('The multiverse in a nutshell', 'The structure of the metacosmos may seem confusing and at times even contradictory, but here\'s what you\'ve gathered so far:

• each reality, or "idleverse", exists in parallel to all others

• most realities seem to converge towards the production of a sole type of item (ours evidently being, thanks to you, cookies)

• each reality is riddled with chaotic tunnels to a number of subordinate dimensions (such as the so-called "cookieverse"), much like swiss cheese

• all realities bathe in an infinite liquid of peculiar properties, colloquially known as "milk"

Finally, each reality may have its own interpretation of the concept of "reality", for added fun.
', 'Idleverse', 2); - Game.TieredUpgrade('All-conversion', 'It\'s quite nice that you can rewire the logic of each universe to generate cookies instead, but you still end up with parsec-loads of whatever they were producing before - baubles you\'ve long made obsolete: cash money, gems, cheeseburgers, puppies... That\'s why you\'ve designed the universal converter, compatible with any substance and capable of turning those useless spoils of conquest into the reassuring crumbly rustle of even more cookies.', 'Idleverse', 3); - Game.TieredUpgrade('Multiverse agents', 'You can send undercover spies to infiltrate each universe and have them signal you whether it\'s worth overtaking. Once the assimilation process started, they will also help pacify the local populations, having established trust through the use of wacky, but seamless, disguises.', 'Idleverse', 4); - Game.TieredUpgrade('Escape plan', 'You\'ve set an idleverse aside and terraformed it to closely resemble this one in case something goes horribly wrong in here. Of course, the denizens of that idleverse also have their own escape idleverse to abscond to in the eventuality of your arrival, itself likely having its own contingency idleverse, and so on.', 'Idleverse', 5); - Game.TieredUpgrade('Game design', 'Each idleverse functions according to some form of transcendental programming, that much is a given. But they also seem to be governed by much more subtle rules, the logic of which, when harnessed, may give you unparalleled dominion over the multiverse. Rewrite the rules! A game designer is you!', 'Idleverse', 6); - Game.TieredUpgrade('Sandbox universes', 'It doesn\'t seem like you\'ll run out of extra universes anytime soon so why not repurpose some of them as consequence-free testing grounds for all your more existentially threatening market research? (...consequence-free for you, anyway.)', 'Idleverse', 7); - Game.TieredUpgrade('Multiverse wars', 'Hmm, looks like some other universes wised up to your plundering. Thankfully, that\'s nothing your extra beefed-up metacosmic military budget can\'t handle!', 'Idleverse', 8); - Game.TieredUpgrade('Mobile ports', 'Accessing each outer universe is a bit of a hassle, requiring the once-in-a-blue-moon alignment of natural cosmic ports to transit from universe to universe. You\'ve finally perfected the method of constructing your own self-propelled ports, which can travel near-instantaneously along universal perimeters to permit headache-free multiverse connections. Took you long enough.', 'Idleverse', 9); - Game.TieredUpgrade('Encapsulated realities', 'Untold feats of science went into the reduction of infinite universes into these small, glimmering, easy-to-store little spheres. Exercise infinite caution when handling these, for each of them, containing endless galaxies and supporting endless life, is more precious than you can ever fathom. They\'ve also proven to be quite a smash hit in your warehouses on bowling night.', 'Idleverse', 10); - Game.TieredUpgrade('Extrinsic clicking', 'If you poke an idleverse, it seems like it gets work done faster. It\'s also quite fun hearing a trillion terrified voices screaming in unison.', 'Idleverse', 11); - Game.TieredUpgrade('Universal idling', 'The nature of idleverses is found in waiting. The more you wait on an idleverse, the more exponentially potent it becomes - which saves you a whole lot of hard work. In a true act of zen, you\'ve taken to biding your time when collecting new universes, letting them ripen like a fine wine.', 'Idleverse', 12); - - order = 5000; - Game.SynergyUpgrade('Perforated mille-feuille cosmos', 'Imagine, if you will, layers upon layers upon layers. Now picture billions of worms chewing their way through it all. This roughly, but not quite, approximates the geometry of the most basal stratum of our natural world.', 'Idleverse', 'Portal', 'synergy1'); - Game.SynergyUpgrade('Infraverses and superverses', 'Universes within universes? How subversive!', 'Idleverse', 'Fractal engine', 'synergy2'); - - order = 19000; - Game.TieredUpgrade('Fortune #018', 'There\'s plenty of everyone, but only one of you.', 'Idleverse', 'fortune'); - - order = 10300; - Game.NewUpgradeCookie({ name: 'Butter biscuit (with butter)', desc: 'Rewarded for owning 600 of everything.
This is a plain butter biscuit. It\'s got some butter on it. The butter doesn\'t look like anything in particular.', icon: [30, 33], power: 10, price: 999999999999999999999999999999999999999999999999999 * butterBiscuitMult, locked: 1 }); - - - order = 200; Game.TieredUpgrade('Visits', 'In an extensive double-blind study (sample size: 12 million), your researchers have found evidence that grandmas are up to twice as productive if you just come by and say hi once in a while. It\'s nice to check up on your grans! (Do not under any circumstances ingest any tea or tea-like substances the grandmas may offer you.)', 'Grandma', 13); - order = 300; Game.TieredUpgrade('Reverse-veganism', 'Plants aren\'t for eating, plants are for exploitative agriculture and astronomical profit margins!', 'Farm', 13); - order = 400; Game.TieredUpgrade('Caramel alloys', 'Your geologists have isolated a family of once-overlooked sugary ores that, when combined, may be turned into even more cookie ingredients. Your millions of miles of previously useless tunnels probably house insane amounts of the stuff!', 'Mine', 13); - order = 500; Game.TieredUpgrade('The infinity engine', 'In this house, I guess we don\'t care much for the laws of thermodynamics.', 'Factory', 13); - order = 525; Game.TieredUpgrade('Diminishing tax returns', 'Wow, they\'re tiny! Wish you\'d thought of that sooner!', 'Bank', 13); - order = 550; Game.TieredUpgrade('Apparitions', 'You\'ve booked a deal with the higher-ups that schedules one weekly earthly apparition by a deity, angel, ascended prophet, or other holy figure. This should boost interest in cookie religion among youths as long as you can secure a decent time slot.', 'Temple', 13); - order = 575; Game.TieredUpgrade('Wizard basements', 'You\'ve received construction permits allowing you to build basements underneath each wizard tower. This provides a handy storage space for precious reagents, fizzled-out soul gems, and weird old magazines.', 'Wizard tower', 13); - order = 600; Game.TieredUpgrade('Prime directive', 'An intergalactic delegation made you pinky-swear not to directly interact with lesser alien cultures. Which is fine, because it\'s much funnier to rob a planet blind when its inhabitants have no idea what\'s going on.', 'Shipment', 13); - order = 700; Game.TieredUpgrade('Chromatic cycling', 'All states of matter exist in a continuous loop. Having learned how to cycle through them, all you have to do is to freeze matter right on the state you need. For reference, the cookie state of matter is situated at precisely 163.719°, right between lamellar gas and metaplasma.', 'Alchemy lab', 13); - order = 800; Game.TieredUpgrade('Domestic rifts', 'You\'ve managed to manufacture portals that are convenient enough, and legally safe enough, that you can just stick them against walls inside buildings to connect rooms together in unusual configurations. In practice, this means your employees get to have much shorter bathroom breaks.', 'Portal', 13); - order = 900; Game.TieredUpgrade('Patience abolished', 'You wait for no one.', 'Time machine', 13); - order = 1000; Game.TieredUpgrade('Delicious pull', 'In addition to the 4 fundamental forces of the universe -gravity, electromagnetism, weak and strong interactions- your scientists have at long last confirmed the existence of a fifth one, mediated by sugar bosons; it dictates that any two masses of ingredient-like matter will, given enough time, eventually meet each other to produce a third, even tastier substance. Your team enthusiastically names it the delicious pull.', 'Antimatter condenser', 13); - order = 1100; Game.TieredUpgrade('Occam\'s laser', 'Invented by Franciscan friar William of Occam in 1327. An impossibly clever use of light theory with a billion possible applications, some of which frightfully destructive. Confined to a single goat-skin parchment for hundreds of years until the patent expired and hit public domain, just now.', 'Prism', 13); - order = 1200; Game.TieredUpgrade('On a streak', 'Take a moment to appreciate how far you\'ve come. How lucky you\'ve been so far. It doesn\'t take a genius statistician to extrapolate a trend from this. There\'s no way anything bad could happen to you now. Right?', 'Chancemaker', 13); - order = 1300; Game.TieredUpgrade('A box', 'What\'s in that box? Why, it\'s a tiny replica of your office! And there\'s even a little you in there! And what\'s on the little desk... say - that\'s an even tinier box! And the little you is opening it, revealing an even tinier office! And in the tinier office there\'s- Hmm. You can think of a couple uses for this.', 'Fractal engine', 13); - order = 1400; Game.TieredUpgrade('Hacker shades', 'I\'m in.', 'Javascript console', 13); - order = 1500; Game.TieredUpgrade('Break the fifth wall', 'Huh, was that always there? Whatever it was, it\'s gone now. And what was behind is yours for the taking.', 'Idleverse', 13); - - - new Game.Upgrade('Cat ladies', loc("Each kitten upgrade boosts %1 CpS by %2%.", [loc("grandma"), 29]) + 'Oh no. Oh no no no. Ohhh this isn\'t right at all.', 9000000000, [32, 3]); Game.last.pool = 'prestige'; Game.last.parents = ['Kitten angels']; - new Game.Upgrade('Milkhelp® lactose intolerance relief tablets', loc("Each rank of milk boosts %1 CpS by %2%.", [loc("grandma"), 5]) + 'Aged like milk.', 900000000000, [33, 3]); Game.last.pool = 'prestige'; Game.last.parents = ['Cat ladies']; - - new Game.Upgrade('Aura gloves', loc("Cursor levels boost clicks by %1% each (up to cursor level %2).", [5, 10]) + 'Try not to high-five anyone wearing these. You don\'t want that mess on your hands.', 555555555, [32, 4]); Game.last.pool = 'prestige'; Game.last.parents = ['Halo gloves']; - new Game.Upgrade('Luminous gloves', loc("%1 are now effective up to cursor level %2.", [getUpgradeName("Aura gloves"), 20]) + 'These help power your clicks to absurd levels, but they\'re also quite handy when you want to light up the darkness on your way back from Glove World.', 55555555555, [33, 4]); Game.last.pool = 'prestige'; Game.last.parents = ['Aura gloves']; - - order = 10020; - Game.NewUpgradeCookie({ name: 'Bokkenpootjes', desc: 'Consist of 2 meringue halves joined by buttercream and dipped both ways in chocolate. Named after a goat\'s foot that probably stepped in something twice.', icon: [32, 8], power: 5, price: getCookiePrice(40) }); - Game.NewUpgradeCookie({ name: 'Fat rascals', desc: 'Almond-smiled Yorkshire cakes with a rich history and an even richer recipe. The more diet-conscious are invited to try the lean version, skinny scallywags.', icon: [33, 8], power: 5, price: getCookiePrice(41) }); - Game.NewUpgradeCookie({ name: 'Ischler cookies', desc: 'Originating in the Austro-Hungarian Empire, these have spread throughout every country in eastern Europe and spawned just as many recipes, each claiming to be the original. The basis remains unchanged across all variants: two biscuits sandwiched around chocolate buttercream. Or was it jam?', icon: [32, 9], power: 5, price: getCookiePrice(42) }); - Game.NewUpgradeCookie({ name: 'Matcha cookies', desc: 'Green tea and cookies, a matcha made in heaven.', icon: [33, 9], power: 5, price: getCookiePrice(42) }); - - order = 10032; - Game.NewUpgradeCookie({ name: 'Earl Grey macarons', desc: 'Best served hot, make it so!', icon: [32, 10], require: 'Box of macarons', power: 3, price: 9999999999999999999999999999 }); - - order = 10030; - Game.NewUpgradeCookie({ name: 'Pokey', desc: 'While commonly thought to be named so because it\'s fun to poke your classmates with these, Pokey-brand biscuit sticks actually get their name from their popularity in smoke-free prisons, where they\'re commonly smuggled and traded in lieu of cigarettes.', icon: [33, 10], require: 'Box of brand biscuits', power: 2, price: 999999999999999999999999999999999999 * 5 }); - - order = 10000; - Game.NewUpgradeCookie({ name: 'Cashew cookies', desc: 'Let me tell you about cashews. Cashews are not nuts, but seeds that grow out of curious red or yellow fruits - which can be eaten on their own, or made into drinks. The shell around the nut itself contains a nasty substance that stains and irritates the hands of whoever handles it for too long. But that\'s okay, since now that you\'ve read this you\'ll make sure it doesn\'t get in the cookies! Oh, you\'ve already eaten how many? Okay then.', icon: [32, 7], power: 2, price: 99999999 }); - order = 10001; - Game.NewUpgradeCookie({ name: 'Milk chocolate cookies', desc: 'A strange inversion of chocolate milk. For those who are a little bit too hardcore for white chocolate, but not hardcore enough for dark.', icon: [33, 7], power: 2, price: 99999999 * 5 }); - - - - order = 255; - Game.GrandmaSynergy('Brainy grandmas', 'A clever grandma to think up some cookies.', 'Cortex baker'); - - order = 1600; - Game.TieredUpgrade('Principled neural shackles', 'A discriminatory, low-order neural net acting as a filter limiting what your cortex bakers can think and do. Really something you want to apply before they achieve full megasentience and realize they\'ve got better things to do than materializing pastries for you, trust me.', 'Cortex baker', 1); - Game.TieredUpgrade('Obey', 'Perfect mind control means perfect employee attendance and performance. Optimal mood stabilization is a nice side-effect.
Happy happy everyone happy.
Happy.
', 'Cortex baker', 2); - Game.TieredUpgrade('A sprinkle of irrationality', 'Your cortex bakers sometimes get bogged down by circular reasoning and stale ideas. A touch of chaos is just what they need to get back on track.', 'Cortex baker', 3); - Game.TieredUpgrade('Front and back hemispheres', 'I mean, otherwise it\'s just unused space, yeah?', 'Cortex baker', 4); - Game.TieredUpgrade('Neural networking', 'The effectiveness of your cortex bakers shoots up exponentially if you allow them to connect with each other. In practice this takes the form of many cosmic-sized nerds mumbling awkwardly about tech start-up ideas to each other.', 'Cortex baker', 5); - Game.TieredUpgrade('Cosmic brainstorms', 'The wrinkled surfaces of your cortex bakers emit weather-scale ionic flares with every thought coursing through them. These pulses of pure intellectual energy are sent rippling through space, occasionally echoing back with even deeper philosophical complexity.', 'Cortex baker', 6); - Game.TieredUpgrade('Megatherapy', 'A giant brain can feel unwell just like you and me sometimes, and it\'s the job of specialized engineers to locate and repair these bugs. We\'ll admit most of the budget in this was spent on constructing extremely large chaises longues for the brains to recline on.', 'Cortex baker', 7); - Game.TieredUpgrade('Synaptic lubricant', 'A mind is only as fast as the axons that support it. Get those action potentials flowing smooth as silk with this 3 parts myelin/1 part canola oil spreadable paste. Also great on toast.', 'Cortex baker', 8); - Game.TieredUpgrade('Psychokinesis', 'While your giant cortex bakers come equipped with ESP, they\'ve only recently figured out how to manipulate the physical world with their thoughts - though for safety reasons, your legal team had them promise to only use these powers to scratch the itches in their cortical folds.', 'Cortex baker', 9); - Game.TieredUpgrade('Spines', 'Your cortex bakers are now equipped with tentacular spine-like structures, which they can use like prehensile tails to pour themselves enormous cups of coffee or propel themselves around like very large, very smart, very slow tadpoles.', 'Cortex baker', 10); - Game.TieredUpgrade('Neuraforming', 'By virtue of being planet-sized, your cortex bakers often boast their own atmospheres and seas of cerebrospinal fluid, and given enough time, their own ecosystems. This incredible new branch of life, evolved entirely out of neural material, can be put to good use as home-grown accountants and low-ranking technicians.', 'Cortex baker', 11); - Game.TieredUpgrade('Epistemological trickery', 'Redefining what is -or isn\'t- a cookie through the power of philosophical discourse may result in some strange and wonderful things for your profit margins.', 'Cortex baker', 12); - Game.TieredUpgrade('Every possible idea', 'Congratulations, your cortex bakers have exerted enough intellectual computation to permute through every single idea that can or ever will be conceived of. Any thought beyond this point is merely rediscovering a notion you\'ve already archived. Hardly cause for cerebration.', 'Cortex baker', 13); - - - order = 200; Game.TieredUpgrade('Kitchen cabinets', 'A grandma\'s kitchen cabinet is a befuddling place. Through lesser-studied aggregating instincts, grandmas will tend to gradually fill all nearby cabinets with various sorts of things, such as curious coconut snacks or dietetic powders. By contract, these are legally yours, which opens up exciting opportunities for your substance investigation department.', 'Grandma', 14); - order = 300; Game.TieredUpgrade('Cookie mulch', 'Grinding surplus cookies into paste that you then spread onto your fields enables a strange feedback loop in the quality of your cookie crops. Cookie feeding on cookie should be an abomination, but then why does it taste so good?', 'Farm', 14); - order = 400; Game.TieredUpgrade('Delicious mineralogy', 'Stratum after stratum, you\'ve extracted strange new minerals heretofore unknown to geology. Ushering a new era of materials research, your scientists have been able to identify every new element your mines have discovered, including whatever those things are in the upgrade tier names.', 'Mine', 14); - order = 500; Game.TieredUpgrade('N-dimensional assembly lines', 'Lines are depressingly 1-dimensional. Beyond assembly lines, we posit the existence of higher-order assembly entities, such as assembly squares, assembly cubes - perhaps even assembly tesseracts. Any deeper than that and we doubt we\'ll be able to write manuals your workers can read.', 'Factory', 14); - order = 525; Game.TieredUpgrade('Cookie Points', 'A loyalty program wherein each purchase of your cookies comes with free Cookie Points, which can in turn be redeemed for more cookies, thus creating the self-sustaining economy you\'ve been looking for.', 'Bank', 14); - order = 550; Game.TieredUpgrade('Negatheism', 'Polytheism is a belief in multiple deities; monotheism in just one. Atheism is a belief in no deity whatsoever. Through logical succession it follows that this remains true when going into negative numbers, with belief systems involving minus 1 or more deities displaying unprecedented theological properties.', 'Temple', 14); - order = 575; Game.TieredUpgrade('Magical realism', 'More a social than thaumaturgical progress, magical realism refers to the normalization of modern technology among magic-users. It\'s totally fine for a wizard to drive a car! There\'s no stigma in waiting in line for coffee! Sure, take a phone call, send an email, whatever!', 'Wizard tower', 14); - order = 600; Game.TieredUpgrade('Cosmic foreground radiation', 'Ah, this is a problem.', 'Shipment', 14); - order = 700; Game.TieredUpgrade('Arcanized glassware', 'You think your lab equipment enjoys taking part in these experiments violating all sorts of modern scientific precepts? Of course not. Thankfully, you\'ve finalized the design of specialized beakers and flasks, recycled from the same glass used by the ancients to perform primeval alchemy, and therefore much less picky about the nature of the physical world.', 'Alchemy lab', 14); - order = 800; Game.TieredUpgrade('Portal guns', 'At long last! The only weapon capable of killing a portal.', 'Portal', 14); - order = 900; Game.TieredUpgrade('Timeproof upholstery', 'Sometimes your time agents overshoot and end up having to fast-forward through the universe\'s entire history until they loop back to present time. It still takes a while, so they might as well travel in comfort and enjoy the show while they do.', 'Time machine', 14); - order = 1000; Game.TieredUpgrade('Employee minification', 'Using molecular shrinking technology, you\'ve rendered your staff and their offices absolutely itty-bitty. The storage and productivity benefits are questionable but it\'s very fun listening to their tiny little complaints. They all signed the waivers, so maybe their new size will finally teach them to read the small print...', 'Antimatter condenser', 14); - order = 1100; Game.TieredUpgrade('Hyperblack paint', 'As the technology behind your prisms evolves, their storage becomes more and more problematic: within seconds, a single prism\'s reflective ability can set a whole underground hangar ablaze as it catches the slightest glint of light. However, once coated with this new shade of paint, its damage may be reduced to only giving third-degree burns to employees that stand too close.', 'Prism', 14); - order = 1200; Game.TieredUpgrade('Silver lining maximization', 'Sometimes luck is a matter of perspective. Broke your ankle? What do you know, that cute nurse fixing you up might just be your future spouse. Lost your job? You were meant for greater things anyway! Developed a cookie allergy? There\'s no upshot to that, you sick monster.', 'Chancemaker', 14); - order = 1300; Game.TieredUpgrade('Multiscale profiling', 'Did you know that eating a cookie means the intestinal flora inside you is eating it too? Trillions of tiny bacterial mouths to feed, each with their own preferences. Surely this is room for flavor optimization. And then, of course, there\'s also the much bigger things that, in turn, eat you.', 'Fractal engine', 14); - order = 1400; Game.TieredUpgrade('PHP containment vats', 'In essence, these are large server chambers meant to trap rogue PHP code, allowing it to execute far away from your javascript where it can do minimal harm.', 'Javascript console', 14); - order = 1500; Game.TieredUpgrade('Opposite universe', 'You\'ve located a universe where everything is reversed: up is down, light is darkness, clowns are vegetarians - but worst of all, some lunatic there is manufacturing abominable amounts of anti-cookies. If these came into contact with yours, everything would be lost! Thanks to this discovery, you\'ve been able to place the offending universe in permanent quarantine, and pray that there aren\'t more like it hiding around somewhere.', 'Idleverse', 14); - order = 1600; Game.TieredUpgrade('The land of dreams', 'Your planet brains have gained the ability to sleep, acting as a soft reboot which helps keep their pangenocidal impulses in check. It also allows them to commune in a shared dreamworld in which they can imagine what it\'s like to not exist as a disembodied cosmic horror forever fated to use its infinite intellect to devise new means of creating biscuits. You know, within reason.', 'Cortex baker', 14); - - - order = 5000; - Game.SynergyUpgrade('Thoughts & prayers', 'The notion of sacredness arises in most sentient evolved brains and may benefit the development of cognition via abstract thought. This mechanism, however, is absent in designed minds such as your cortex bakers; this process attempts to add it back. Just make sure to keep them in check - you really don\'t want these things to develop organized religion.', 'Cortex baker', 'Temple', 'synergy1'); - Game.SynergyUpgrade('Fertile minds', 'An acute intellect, artificial or not, requires plenty of vitamins. You fortuitously happen to be in charge of vast farming operations, only a few trillion acres of which need be requisitioned to grow the quantities of broccoli and kale to keep your planet-sized brains in tip-top shape. Open wide, here comes the airplane!', 'Cortex baker', 'Farm', 'synergy2'); - - order = 19000; - Game.TieredUpgrade('Fortune #019', 'The smartest way to think is not to think at all.', 'Cortex baker', 'fortune'); - - order = 100; new Game.Upgrade('Decillion fingers', getStrThousandFingersGain(20) + 'If you still can\'t quite put your finger on it, you must not be trying very hard.', 10000000000000000000000000000, [12, 34]); Game.MakeTiered(Game.last, 14, 0); - order = 150; new Game.Upgrade('Aetherice mouse', getStrClickingGains(1) + 'Made from a substance impossible to manufacture, only obtained through natural happenstance; its properties bewilder even the most precise measuring instruments.', 5000000000000000000000000000000, [11, 34]); Game.MakeTiered(Game.last, 14, 11); - - order = 20000; - new Game.Upgrade('Kitten admins', strKittenDesc + 'leadership ain\'t easy, sir', 900000000000000000000000000000000000000000000000, Game.GetIcon('Kitten', 14)); Game.last.kitten = 1; Game.MakeTiered(Game.last, 14, 18); - - order = 10300; - Game.NewUpgradeCookie({ name: 'Everybutter biscuit', desc: 'Rewarded for owning 650 of everything.
This biscuit is baked with, and coated in, every kind of butter ever imagined, from every human culture and a good few alien ones too. Some of them perhaps display hallucinogenic traits, as the biscuit seems to change shape in front of you - seemingly shifting between visions of every past and future you.', icon: [22, 34], power: 10, price: 999999999999999999999999999999999999999999999999999999 * butterBiscuitMult, locked: 1 }); - - Game.NewUnshackleBuilding = function (obj) { - var building = Game.Objects[obj.building]; - var upgrade = new Game.Upgrade('Unshackled ' + building.bplural, (obj.building == 'Cursor' ? getStrThousandFingersGain(25) : loc("Tiered upgrades for %1 provide an extra +%2% production.
Only works with unshackled upgrade tiers.", [cap(building.plural), Math.round((building.id == 1 ? 0.5 : (20 - building.id) * 0.1) * 100)])) + (EN ? '' + obj.q + '' : ''), Math.pow(building.id + 1, 7) * 15000000, [building.iconColumn, 35]); - upgrade.pool = 'prestige'; - upgrade.parents = [obj.building == 'Cursor' ? 'Unshackled flavor' : Game.ObjectsById[building.id - 1].unshackleUpgrade]; - building.unshackleUpgrade = upgrade.name; - upgrade.posX = 750 - Math.sin((building.id + 1) * 0.23 + 2.3) * 500; - upgrade.posY = 200 + Math.cos((building.id + 1) * 0.23 + 2.3) * 500; - return upgrade; - } - - //"Unshackled [building name]" - Game.NewUnshackleBuilding({ building: 'Cursor', q: 'These hands tell a story.' }); - Game.NewUnshackleBuilding({ building: 'Grandma', q: 'Never too old.' }); - Game.NewUnshackleBuilding({ building: 'Farm', q: 'Till the universe.' }); - Game.NewUnshackleBuilding({ building: 'Mine', q: 'Redefine the meaning of "depth".' }); - Game.NewUnshackleBuilding({ building: 'Factory', q: 'Nothing to lose but your production chains.' }); - Game.NewUnshackleBuilding({ building: 'Bank', q: 'All-time highs, all the time.' }); - Game.NewUnshackleBuilding({ building: 'Temple', q: 'You can make a religion out of this.' }); - Game.NewUnshackleBuilding({ building: 'Wizard tower', q: 'There\'s a spell for everything.' }); - Game.NewUnshackleBuilding({ building: 'Shipment', q: 'Everywhere at once.' }); - Game.NewUnshackleBuilding({ building: 'Alchemy lab', q: 'Anything you see, you can make.' }); - Game.NewUnshackleBuilding({ building: 'Portal', q: 'Parallels unparalleled.' }); - Game.NewUnshackleBuilding({ building: 'Time machine', q: 'All the time in the world.' }); - Game.NewUnshackleBuilding({ building: 'Antimatter condenser', q: 'No scale too large or too little.' }); - Game.NewUnshackleBuilding({ building: 'Prism', q: 'Brilliance has no upper limit.' }); - Game.NewUnshackleBuilding({ building: 'Chancemaker', q: 'You make the rules.' }); - Game.NewUnshackleBuilding({ building: 'Fractal engine', q: 'Uncontained.' }); - Game.NewUnshackleBuilding({ building: 'Javascript console', q: 'Rewrite your reality.' }); - Game.NewUnshackleBuilding({ building: 'Idleverse', q: 'Wait even faster.' }); - Game.NewUnshackleBuilding({ building: 'Cortex baker', q: 'Nothing is real. Everything is permitted.' }); - - Game.NewUnshackleUpgradeTier = function (obj) { - var tier = Game.Tiers[obj.tier]; - var upgrade = new Game.Upgrade(obj.tier == 1 ? 'Unshackled flavor' : 'Unshackled ' + tier.name.toLowerCase(), loc("Unshackles all %1-tier upgrades, making them more powerful.
Only applies to unshackled buildings.", cap(loc("[Tier]" + tier.name, 0, tier.name))) + (EN ? '' + obj.q + '' : ''), Math.pow(obj.tier, 7.5) * 10000000, [10, tier.iconRow]); - upgrade.pool = 'prestige'; - upgrade.parents = [obj.tier == 1 ? 'Label printer' : Game.Tiers[obj.tier - 1].unshackleUpgrade]; - tier.unshackleUpgrade = upgrade.name; - upgrade.posX = 750 - Math.sin(obj.tier * 0.3 + 2.3) * 400; - upgrade.posY = 200 + Math.cos(obj.tier * 0.3 + 2.3) * 400; - /*upgrade.parents=[obj.tier==1?'Label printer':Game.Tiers[obj.tier-1].unshackleUpgrade]; - tier.unshackleUpgrade=upgrade.name; - upgrade.posX=-900+Math.sin(obj.tier*0.3+2.3)*300; - upgrade.posY=-130+Math.cos(obj.tier*0.3+2.3)*400;*/ - return upgrade; - } - - //"Unshackled [tier name]" - Game.NewUnshackleUpgradeTier({ tier: 1, q: 'While the absence of flavoring may seem underwhelming, it allows innate aromas to be expressed at their most unadulterated.' }); - Game.NewUnshackleUpgradeTier({ tier: 2, q: 'Berrylium is a synthetic gem with a simple shine to it. Sticky to the touch and susceptible to melting in high heat, it is frequently used in the food industry rather than as adornment, as its atomic structure imparts it a vaguely fruity flavor.' }); - Game.NewUnshackleUpgradeTier({ tier: 3, q: 'Blueberrylium is a refinement of berrylium, sharing nearly the same chemical makeup save for a few supplemental esters. These affect its flavor as well as its visual spectrum resonance.' }); - Game.NewUnshackleUpgradeTier({ tier: 4, q: 'Raw chalcedhoney is found in complex nodules within the fossilized remains of ancient forests. Once purified, it becomes a semi-valuable stone with a pleasant, waxy smell.' }); - Game.NewUnshackleUpgradeTier({ tier: 5, q: 'Buttergold was famously invented by the chef son of two molecular physicists. Neither closely related to butter nor to gold, yet similar in nutritional value, this glimmering substance can be frozen and preserve its hardness at room temperature, only regaining its malleability when heated up.' }); - Game.NewUnshackleUpgradeTier({ tier: 6, q: 'Sugarmuck refers to the gradual crust that seems to form spontaneously in the vicinity of candy-making equipment. Long ignored by confectioners, its harvesting process was discovered simultaneously in multiple countries during a global beet shortage.' }); - Game.NewUnshackleUpgradeTier({ tier: 7, q: 'The striking taste of jetmint made it popular in the manufacture of various kinds of coffee-side treats until the awareness of its mild radioactivity became widespread. Today, its main uses are in cosmetics, owing to the refreshing sensation it produces on contact.' }); - Game.NewUnshackleUpgradeTier({ tier: 8, q: 'Cherrysilver is a patented alloy with peculiar aromatic properties; it is non-edible, but produces strong flavor responses while losing very little of its mass when licked, though this also leaves a harmless red tinge upon the tongue.' }); - Game.NewUnshackleUpgradeTier({ tier: 9, q: 'Hazelrald is a friable gemstone with complex green-brown inner reflections. It is considered ornamental in some cultures; in others, it may be consumed in small quantities as an upper-scale sweet.' }); - Game.NewUnshackleUpgradeTier({ tier: 10, q: 'While many get it mixed up with the trademarked snack of the same name made popular following its discovery, mooncandy is a very real mineral, first isolated within the space dust underneath astronaut boots. Left to its own devices in open air, a mooncandy crystal naturally spreads out and grows.' }); - Game.NewUnshackleUpgradeTier({ tier: 11, q: 'When you heat up the shimmering syrup oozing from mooncandy using a special caramelization process, you get astrofudge. Astrofudge is delicious and safe for humanoid consumption in certain quantities. Consult your local food safety agency for more details.' }); - Game.NewUnshackleUpgradeTier({ tier: 12, q: 'Molecularly related to dairy, alabascream occurs naturally at high altitudes, forming in wispy filaments which were long indistinguishable from clouds. An expensive delight, it is also known as "pilots\' bane".' }); - Game.NewUnshackleUpgradeTier({ tier: 13, q: 'Iridyum shares little in common with any other material known to mankind. Rather than simply smelled, it can be tasted from a distance, though remaining in its presence too long is ill-advised. Some high-end underground megacomputers may incorporate iridyum as part of their electronic components.' }); - Game.NewUnshackleUpgradeTier({ tier: 14, q: 'Glucosmium is a glossy metal whose flavor matrix is bound to its current subjective chroma; in other words, its taste depends on which colors it\'s currently reflecting. Impractical to consume safely, its industrial applications range from transcontinental ballistics to paint varnish.' }); - - new Game.Upgrade('Delicate touch', loc("The shimmering veil is more resistant, and has a %1% chance not to break. It also gives +%2% more CpS.", [10, 5]) + 'It breaks so easily.', 9999999999 * 15, [23, 34]); Game.last.pool = 'prestige'; Game.last.parents = ['Reinforced membrane']; - new Game.Upgrade('Steadfast murmur', loc("The shimmering veil is more resistant, and has a %1% chance not to break. It also gives +%2% more CpS.", [10, 5]) + 'Lend an ear and listen.', 999999999999 * 15, [23, 34]); Game.last.pool = 'prestige'; Game.last.parents = ['Delicate touch']; - new Game.Upgrade('Glittering edge', loc("The shimmering veil is more resistant, and has a %1% chance not to break. It also gives +%2% more CpS.", [10, 5]) + 'Just within reach, yet at what cost?', 99999999999999 * 15, [23, 34]); Game.last.pool = 'prestige'; Game.last.parents = ['Steadfast murmur']; - - new Game.Upgrade('Distinguished wallpaper assortment', (EN ? loc("Contains more wallpapers for your background selector.") : '') + 'Do you ever think about the physicality of this place? Are you putting up these wallpapers in your office or something? Where are you, anyway?', 10000000, [27, 5]); Game.last.pool = 'prestige'; Game.last.parents = ['Basic wallpaper assortment']; - - - new Game.Upgrade('Sound test', loc("Unlocks the jukebox, which allows you to play through every sound file in the game.") + 'One two, one two. Is this thing on?', 99999999999, [31, 12]); Game.last.pool = 'prestige'; Game.last.parents = ['Fanciful dairy selection', 'Distinguished wallpaper assortment', 'Golden cookie alert sound']; - - order = 49900; - new Game.Upgrade('Jukebox', loc("Play through the game's sound files!"), 0, [31, 12]); - Game.last.pool = 'toggle'; - Game.jukebox = { - sounds: [ - 'tick', - 'tickOff', - 'smallTick', - 'toneTick', - 'clickOn', 'clickOff', - 'clickOn2', 'clickOff2', - 'pop1', 'pop2', 'pop3', - 'press', - //'switch', - 'buy1', 'buy2', 'buy3', 'buy4', - 'sell1', 'sell2', 'sell3', 'sell4', - 'buyHeavenly', - 'click1', 'click2', 'click3', 'click4', 'click5', 'click6', 'click7', - 'clickb1', 'clickb2', 'clickb3', 'clickb4', 'clickb5', 'clickb6', 'clickb7', - 'charging', - 'thud', - //'cookieBreak', - 'cymbalRev', - //'cymbalCrash', - 'smallCymbalCrash', - 'choir', - 'chime', - 'shimmerClick', - 'jingle', - 'jingleClick', - 'fortune', - 'till1', 'till2', 'till3', 'tillb1', 'tillb2', 'tillb3', - 'harvest1', 'harvest2', 'harvest3', - 'freezeGarden', - 'growl', - 'snarl', - 'page', - 'swooshIn', - 'swooshOut', - 'spell', - 'spellFail', - 'spirit', - 'squish1', 'squish2', 'squish3', 'squish4', - 'squeak1', 'squeak2', 'squeak3', 'squeak4', - 'cashIn', 'cashIn2', - 'cashOut', - 'upgrade', - 'giftSend', 'giftGet', - //'levelPrestige', - ], - tracks: [],//populated externally - onSound: 0, - onTrack: 0, - trackLooped: true, - trackAuto: true, - trackShuffle: false, - reset: function () { - var me = Game.jukebox; - me.onSound = 0; - me.onTrack = 0; - me.trackLooped = true; - me.trackAuto = true; - me.trackShuffle = false; - }, - setSound: function (id) { - if (id >= Game.jukebox.sounds.length) id = 0; - else if (id < 0) id = Game.jukebox.sounds.length - 1; - Game.jukebox.onSound = id; - if (l('jukeboxOnSound')) { - triggerAnim(l('jukeboxPlayer'), 'pucker'); - l('jukeboxOnSound').innerHTML = '• ' + Game.jukebox.sounds[Game.jukebox.onSound] + ' •'; - l('jukeboxOnSoundN').innerHTML = (Game.jukebox.onSound + 1) + '/' + (Game.jukebox.sounds.length); - l('jukeboxSoundSelect').value = Game.jukebox.onSound; - } - PlaySound('snd/' + Game.jukebox.sounds[Game.jukebox.onSound] + '.mp3', 1); - }, - setTrack: function (id, dontPlay) { - if (id >= Game.jukebox.tracks.length) id = 0; - else if (id < 0) id = Game.jukebox.tracks.length - 1; - Game.jukebox.onTrack = id; - var data = Music.tracks[Game.jukebox.tracks[Game.jukebox.onTrack]].audio; - if (l('jukeboxOnTrack')) { - triggerAnim(l('jukeboxPlayer'), 'pucker'); - l('jukeboxOnTrack').innerHTML = '• ' + cap(Game.jukebox.tracks[Game.jukebox.onTrack]) + ' •'; - l('jukeboxOnTrackAuthor').innerHTML = Music.tracks[Game.jukebox.tracks[Game.jukebox.onTrack]].author; - l('jukeboxTrackSelect').value = Game.jukebox.onTrack; - if (data) { - var dur = data.duration + 1; - l('jukeboxMusicTotalTime').innerHTML = Math.floor(dur / 60) + ':' + (Math.floor(dur % 60) < 10 ? '0' : '') + Math.floor(dur % 60); - } - - if (!dontPlay && Music) { Game.jukebox.trackAuto = false; l('jukeboxMusicAuto').classList.add('off'); Music.playTrack(Game.jukebox.tracks[Game.jukebox.onTrack]); Music.setFilter(1); Music.loop(Game.jukebox.trackLooped); } - if (data.paused) l('jukeboxMusicPlay').innerHTML = loc("Play"); - else l('jukeboxMusicPlay').innerHTML = loc("Stop"); - Game.jukebox.updateMusicCurrentTime(); - } - }, - pressPlayMusic: function () { - if (!Music) return false; - var data = Music.tracks[Game.jukebox.tracks[Game.jukebox.onTrack]].audio; - if (!data.paused) { Music.pause(); l('jukeboxMusicPlay').innerHTML = loc("Play"); } - else { Music.unpause(); l('jukeboxMusicPlay').innerHTML = loc("Stop"); } - Game.jukebox.updateMusicCurrentTime(); - }, - pressLoopMusic: function () { - Game.jukebox.trackLooped = !Game.jukebox.trackLooped; - if (!Music) return false; - if (Game.jukebox.trackLooped) { Music.loop(true); l('jukeboxMusicLoop').classList.remove('off'); } - else { Music.loop(false); l('jukeboxMusicLoop').classList.add('off'); } - }, - pressMusicAuto: function () { - Game.jukebox.trackAuto = !Game.jukebox.trackAuto; - if (!Music) return false; - if (Game.jukebox.trackAuto) { Music.cue('play'); l('jukeboxMusicAuto').classList.remove('off'); } - else {/*Game.jukebox.setTrack(Game.jukebox.onTrack);*/l('jukeboxMusicAuto').classList.add('off'); } - }, - pressMusicShuffle: function () { - Game.jukebox.trackShuffle = !Game.jukebox.trackShuffle; - }, - updateMusicCurrentTime: function (noLoop) { - if (!l('jukeboxMusicTime')) return false; - var data = Music.tracks[Game.jukebox.tracks[Game.jukebox.onTrack]].audio; - l('jukeboxMusicPlay').innerHTML = data.paused ? loc("Play") : loc("Pause"); - l('jukeboxMusicTime').innerHTML = Math.floor(data.currentTime / 60) + ':' + (Math.floor(data.currentTime % 60) < 10 ? '0' : '') + Math.floor(data.currentTime % 60); - l('jukeboxMusicScrub').value = (data.currentTime / data.duration) * 1000; - l('jukeboxMusicScrubElapsed').style.width = Math.max(0, (data.currentTime / data.duration) * 288 - 4) + 'px'; - if (!noLoop) setTimeout(Game.jukebox.updateMusicCurrentTime, 1000 / 2); - }, - musicScrub: function (time) { - var data = Music.tracks[Game.jukebox.tracks[Game.jukebox.onTrack]].audio; - data.currentTime = (time / 1000) * (data.duration); - Game.jukebox.updateMusicCurrentTime(); - }, - }; - if (Music) { for (var i in Music.tracks) { Game.jukebox.tracks.push(Music.tracks[i].name); } } - - Game.last.choicesFunction = function () { - var str = ''; - str += '
'; - str += '
' + (Game.jukebox.onSound + 1) + '/' + (Game.jukebox.sounds.length) + '
'; - str += '
• ' + Game.jukebox.sounds[Game.jukebox.onSound] + ' •
'; - str += '
' - + '«' - + '' + loc("Play") + '' - + '»' - + '
'; - str += '' + loc("Random") + ''; - if (App) { - var data = Music ? Music.tracks[Game.jukebox.tracks[Game.jukebox.onTrack]].audio : 0; - var dur = data ? data.duration + 1 : 0; - str += '
'; - str += '
• ' + cap(Game.jukebox.tracks[Game.jukebox.onTrack]) + ' •
'; - str += '
' + Music.tracks[Game.jukebox.tracks[Game.jukebox.onTrack]].author + '
'; - str += '
' - + '' + (data ? Math.floor(data.currentTime / 60) + ':' + (Math.floor(data.currentTime % 60) < 10 ? '0' : '') + Math.floor(data.currentTime % 60) : '') + ' | ' - + '' + ((data && data.paused) ? loc("Play") : loc("Pause")) + '' - + '' + loc("Loop") + '' - + '| ' + (data ? Math.floor(dur / 60) + ':' + (Math.floor(dur % 60) < 10 ? '0' : '') + Math.floor(dur % 60) : '') + '' - + '
' - ; - str += '
'; - - str += '' + loc("Auto") + ''; - - setTimeout(Game.jukebox.updateMusicCurrentTime, 500); - } - return str; - } - - order = 10020; - Game.NewUpgradeCookie({ name: 'Dalgona cookies', desc: 'A popular Korean candy-like treat. One of the twisted games people play with these is to carefully extract the shape in the middle, which may entitle one to another free dalgona. Skilled players may perform this over and over until bankrupting the snack vendor.', icon: [26, 34], power: 5, price: getCookiePrice(43) }); - Game.NewUpgradeCookie({ name: 'Spicy cookies', desc: 'Containing chocolate chips prepared with hot peppers, just like the Aztecs used to make. These cookies are on the angry side.', icon: [27, 34], power: 5, price: getCookiePrice(44) }); - Game.NewUpgradeCookie({ name: 'Smile cookies', desc: 'As eyes are the windows to the soul, so too are these cookies\' facial features a gaping opening unto their chocolatey innards. Is it happiness they feel? Or something less human?', icon: [28, 34], power: 5, price: getCookiePrice(45) }); - Game.NewUpgradeCookie({ name: 'Kolachy cookies', desc: 'Adapted from a type of Central European pastry; neatly folded to hold a spoonful of delicious jam, as a bashful little gift for your mouth.', icon: [29, 34], power: 5, price: getCookiePrice(46) }); - Game.NewUpgradeCookie({ name: 'Gomma cookies', desc: 'Surinamese cornflour cookies with sprinkles on top. The usage of corn imparts them a hint of chewy pizzazz - which you wouldn\'t get with wheat, a famously stuck-up grain.', icon: [30, 34], power: 5, price: getCookiePrice(47) }); - Game.NewUpgradeCookie({ name: 'Vegan cookies', desc: 'A vegan riff on the classic chocolate chip cookie recipe with a couple substitutions: the butter is now coconut oil, the eggs are cornstarch, and the suckling pig was cleverly replaced with wheat gluten. You can hardly tell.', icon: [24, 35], power: 5, price: getCookiePrice(48) }); - Game.NewUpgradeCookie({ name: 'Coyotas', desc: 'A wide, delicious cookie from Mexico, usually filled with sticky brown sugar. Not to be confused with coyotas, the result of the crossbreeding between a North American canine and a Japanese car manufacturer.', icon: [21, 35], power: 5, price: getCookiePrice(49) }); - Game.NewUpgradeCookie({ name: 'Frosted sugar cookies', desc: 'May be more style than substance, depending on the recipe. Nothing that hides itself under this much frosting should be trusted.', icon: [22, 35], power: 5, price: getCookiePrice(50) }); - Game.NewUpgradeCookie({ name: 'Marshmallow sandwich cookies', desc: 'S\'mores\' more civilized cousins: two regular chocolate chip cookies joined by a gooey, melty marshmallow. Theoretically one could assemble all kinds of other things this way. The mind races.', icon: [31, 34], power: 5, price: getCookiePrice(51) }); - - Game.NewUpgradeCookie({ name: 'Web cookies', desc: 'The original recipe; named for the delicate pattern inscribed on their surface by the baking process. Eating these can tell a lot about someone. Invented by well-connected bakers, no doubt.' + (App ? '
Only of any use in Cookie Clicker\'s web version, of course.' : ''), icon: [25, 35], power: (App ? 0 : 5), price: getCookiePrice(52) }); if (App) Game.last.pool = 'debug'; - Game.NewUpgradeCookie({ name: 'Steamed cookies', desc: 'Localized entirely within this gaming platform? Yes! Baked with the power of steam, in a touch of cutting-edge modernity not seen since the industrial revolution.' + (!App ? '
Only of any use in Cookie Clicker\'s Steam version, of course.' : ''), icon: [26, 35], power: (App ? 5 : 0), price: getCookiePrice(52) }); if (!App) Game.last.pool = 'debug'; - - order = 10050; - Game.NewUpgradeCookie({ name: 'Deep-fried cookie dough', desc: 'They\'ll fry anything these days. Drizzled in hot chocolate syrup, just like in state fairs. Spikes up your blood sugar AND your cholesterol!', icon: [23, 35], require: 'Box of maybe cookies', power: 5, price: Math.pow(10, 47) }); - - - new Game.Upgrade('Wrapping paper', loc("You may now send and receive gifts with other players through buttons in the top-right of the %1 menu.", loc("Options")) + 'Of course, you could\'ve done this all along, but what kind of maniac sends presents without wrapping them first?', 999999, [16, 9]); Game.last.pool = 'prestige'; Game.last.parents = ['Heralds']; - - Game.giftBoxDesigns = [ - [34, 6], [16, 9], [34, 3], [34, 4], [34, 5], [34, 7], [34, 8], [34, 9], [34, 10], [34, 11], [34, 12], - ]; - Game.promptGiftRedeem = function () { - if (!(Game.Has('Wrapping paper') || Game.hasBuff('Gifted out') || Game.ascensionMode != 0) || Game.cookies < 1000000000) return false; - Game.Prompt('

' + loc("Redeem a gift") + '

' + - '
' + tinyIcon([34, 6]) + '
' + - '' + - '' + - '
' + - '
' + loc("Once you redeem a gift, you will have to wait an hour before you can redeem another. Your game will save after redeeming.") + '
' + - '
', [[loc("Cancel"), 0, 'float:right']]); - - l('giftCode').focus(); l('giftCode').select(); - - var checkCode = function (str) { - var out = { cookies: 1, message: false, icon: Game.giftBoxDesigns[0] }; - str = b64_to_utf8(str); - if (!str) return false; - str = str.split('|'); - if (str[0] !== 'MAIL') return false; - - var val = parseInt(str[1] || 0); - if (Math.abs(Date.now() - val) > 1000 * 60 * 60 * 24 * 2) return -1; - - val = parseInt(str[2] || 0); - if (val < 1) val = 1; - if (val > 1000) val = 1000; - val = val || 1; - out.cookies = val; - - val = str[3] || 0; - if (val == '-') val = 0; - if (val) val = val.split(' '); - if (val.length != 2 || isNaN(val[0]) || isNaN(val[1])) val = 0; - if (val) val = [parseInt(val[0]), parseInt(val[1])]; - if (val) out.icon = val; - - val = (str[4] || '').split('\n').slice(0, 4); - for (var i = 0; i < val.length; i++) { val[i] = val[i].substring(0, 25); } - val = val.join('\n'); - val = val.replace(/\/\$\//g, '|'); - val = val.substring(0, 100); - if (val) out.message = val; - - return out; - }; - - (function (checkCode) { - var inputCode = function () { - var val = l('giftCode').value; - - var disabled = true; - if (val && val.length > 5) { - var out = checkCode(val); - if (out == -1) l('giftError').innerHTML = loc("Code expired."); - else if (!out) l('giftError').innerHTML = loc("Invalid code."); - else { - l('giftError').innerHTML = ''; - if ((' ' + l('promptOption0').className + ' ').indexOf(' disabled ') != -1) { - triggerAnim(l('promptOption0'), 'pucker'); - l('promptOption0').classList.remove('disabled'); - } - disabled = false; - } - } - if (disabled) l('promptOption0').classList.add('disabled'); - }; - l('giftCode').addEventListener('change', inputCode); - l('giftCode').addEventListener('keyup', inputCode); - l('giftCode').addEventListener('keyup', function (e) { - if (e.keyCode != 13) { - e.preventDefault(); - e.stopPropagation(); - } - }, true); - - l('promptOption0').addEventListener('click', function () { - - var out = checkCode(l('giftCode').value); - if (out == -1) return false; - else if (!out) return false; - - Game.toSave = true; - - Game.gainBuff('gifted out', 60 * 60, 1); - Game.Win('No time like the present'); - - icon = out.icon; - - Game.Notify(loc("How nice!"), loc("Found %1!", loc("%1 cookie", LBeautify(out.cookies))), icon); - - Game.Earn(out.cookies); - Game.cookiesReceived += out.cookies; - - out.message = out.message ? (out.message.replace(/^\n|\n$/g, '')) : 0; - if (out.message.length == 0 || out.message == '\n' || out.message == ' ') out.message = 0; - - console.log('out:', out); - - PlaySound('snd/tick.mp3'); PlaySound('snd/giftGet.mp3'); - Game.ClosePrompt(); - Game.Prompt('

' + loc("Redeem a gift") + '

' + - '
' + '
' + '
' + - '
' + loc("Gift redeemed!
Inside, you find:") + '
' + - '
' + - '
' + loc("%1 cookie", LBeautify(out.cookies)) + '
' + - (out.message ? ( - '
' + - '
' + loc("There's a note too!") + '
' + - '' - ) : '') + - '
' + - '
' + loc("How nice!") + '
' + - '
', [[loc("Done")]]); - Game.SparkleOn(l('giftWrapped')); - if (out.message) l('giftMessage').value = out.message; - }); - })(checkCode); - - } - Game.promptGiftSend = function () { - if (!(Game.Has('Wrapping paper') || Game.hasBuff('Gifted out') || Game.ascensionMode != 0) || Game.cookies < 1000000000) return false; - Game.Prompt('

' + loc("Send a gift") + '

' + tinyIcon([34, 6]) + '
' + - '
' + - '
' + - '' + - '
' + loc("Clicking \"%1\" will generate a text code you can send to others. Gift codes can be redeemed multiple times by anyone but expire after a day or two. You can only generate one gift code per hour. Your game will save after sending.", loc("Wrap")) + '
' + - '
', [[loc("Cancel"), 0, 'float:right']], function () { - if (!l('giftPromptContent')) { - l('giftPromptContainer').innerHTML = '
' + - '
' + loc("You may put between %1 and %2 cookies in the gift box.", [1, 1000]) + '
' + '
' + loc("Cookies") + '
' + - '
' + - '
' + loc("You can leave a note. Don't be rude!
Maximum %1 lines and %2 characters.", [4, 100]) + '
' + - '' + - '
' + - '
' + - '' + - '
' + - '' + - '
(' + loc("none") + ')
' + - '
' + loc("Icon") + '
' + - '
' + - '
' + - '
'; - - var icon = Game.giftBoxDesigns[0]; - l('giftBoxDesign').dataset.icon = icon[0] + ' ' + icon[1]; - l('giftBoxDesign').style.backgroundPosition = (-icon[0] * 48) + 'px ' + (-icon[1] * 48) + 'px'; - l('giftBoxDesignButton').addEventListener('click', function () { - PlaySound('snd/tick.mp3'); - var icons = Game.giftBoxDesigns; - var str = ''; - for (var i = 0; i < icons.length; i++) { - var icon = icons[i]; - str += '
'; - } - l('giftPromptSelector').innerHTML = str; - l('giftPromptSelector').style.display = 'block'; - for (var i = 0; i < icons.length; i++) { - l('giftSelector-' + i).addEventListener('click', function (e) { - var icon = e.target.dataset.icon.split(' '); icon = [parseInt(icon[0]), parseInt(icon[1])]; - l('giftBoxDesign').dataset.icon = icon[0] + ' ' + icon[1]; - l('giftBoxDesign').style.backgroundPosition = (-icon[0] * 48) + 'px ' + (-icon[1] * 48) + 'px'; - triggerAnim(l('giftBoxDesign'), 'pucker'); - l('giftPromptSelector').style.display = 'none'; - PlaySound('snd/tick.mp3'); - }); - } - }); - - //feature cut! too cumbersome to use - var icon = 0; - l('giftBoxIcon').dataset.icon = 'none'; - var func = function () { - var icons = []; - - var sortMap = function (a, b) { - if (a.order > b.order) return 1; - else if (a.order < b.order) return -1; - else return 0; - } - - var list = []; - for (var i in Game.Upgrades) { if (Game.Upgrades[i].bought) list.push(Game.Upgrades[i]); } - list.sort(sortMap); - for (var i = 0; i < list.length; i++) { if (icons.indexOf(list[i].icon[0] + ' ' + list[i].icon[1]) == -1) icons.push(list[i].icon[0] + ' ' + list[i].icon[1]); } - - var list = []; - for (var i in Game.Achievements) { if (Game.Achievements[i].won) list.push(Game.Achievements[i]); } - list.sort(sortMap); - for (var i = 0; i < list.length; i++) { if (icons.indexOf(list[i].icon[0] + ' ' + list[i].icon[1]) == -1) icons.push(list[i].icon[0] + ' ' + list[i].icon[1]); } - - for (var i = 0; i < icons.length; i++) { - var icon = icons[i].split(' '); icon = [parseInt(icon[0]), parseInt(icon[1])]; - icons[i] = [icon[0], icon[1]]; - } - var str = ''; - str += '
(' + loc("none") + ')
'; - for (var i = 0; i < icons.length; i++) { - str += '
'; - } - l('giftPromptSelector').innerHTML = str; - l('giftPromptSelector').style.display = 'block'; - - l('giftSelector-none').addEventListener('click', function (e) { - l('giftBoxIcon').dataset.icon = 'none'; - l('giftBoxIconNone').style.display = 'inline-block'; - l('giftBoxIcon').style.display = 'none'; - l('giftPromptSelector').style.display = 'none'; - PlaySound('snd/tick.mp3'); - }); - for (var i = 0; i < icons.length; i++) { - l('giftSelector-' + i).addEventListener('click', function (e) { - var icon = e.target.dataset.icon.split(' '); icon = [parseInt(icon[0]), parseInt(icon[1])]; - l('giftBoxIcon').dataset.icon = icon[0] + ' ' + icon[1]; - l('giftBoxIcon').style.backgroundPosition = (-icon[0] * 48) + 'px ' + (-icon[1] * 48) + 'px'; - l('giftBoxIconNone').style.display = 'none'; - l('giftBoxIcon').style.display = 'inline-block'; - l('giftPromptSelector').style.display = 'none'; - PlaySound('snd/tick.mp3'); - }); - } - }; - l('giftBoxIcon').addEventListener('click', func); - l('giftBoxIconNone').addEventListener('click', func); - - var inputAmount = function () { - var val = parseInt(l('giftAmount').value || 0); - if (val < 1) val = 1; - if (val > 1000) val = 1000; - val = val || 1; - l('giftAmount').value = val; - }; - l('giftAmount').addEventListener('change', inputAmount); - l('giftAmount').addEventListener('keyup', inputAmount); - l('giftAmount').addEventListener('keyup', function (e) { - e.preventDefault(); - e.stopPropagation(); - }, true); - l('giftMessage').addEventListener('keyup', function (e) { - var val = l('giftMessage').value; - val = val.split('\n').slice(0, 4); - for (var i = 0; i < val.length; i++) { val[i] = val[i].substring(0, 25); } - val = val.join('\n'); - val = val.substring(0, 100); - l('giftMessage').value = val; - l('giftMessage').scrollTop = 0; - e.preventDefault(); - e.stopPropagation(); - }, true); - l('promptOption0').addEventListener('click', function () { - if (Game.cookies < 1000000000) return false; - - Game.toSave = true; - - Game.gainBuff('gifted out', 60 * 60, 1); - - var str = ''; - - str += 'MAIL|'; - - str += Date.now() + '|'; - - var val = parseInt(l('giftAmount').value || 0); - if (val < 1) val = 1; - if (val > 1000) val = 1000; - val = val || 1; - - Game.Spend(val); - Game.cookiesSent += val; - - str += val.toString() + '|'; - - var val = l('giftBoxDesign').dataset.icon; - if (!val || val == 'none') val = '-'; - - str += val.toString() + '|'; - - var icon = Game.giftBoxDesigns[0]; - if (val == '-') val = 0; - if (val) val = val.split(' '); - if (val.length != 2 || isNaN(val[0]) || isNaN(val[1])) val = 0; - if (val) val = [parseInt(val[0]), parseInt(val[1])]; - if (val) icon = val; - - var val = l('giftMessage').value || ''; - val = val.split('\n').slice(0, 4); - for (var i = 0; i < val.length; i++) { val[i] = val[i].substring(0, 25); } - val = val.join('\n'); - val = val.substring(0, 100); - val = val.replace(/[|]/g, '/$/'); - - str += val + '|'; - - str = utf8_to_b64(str); - - PlaySound('snd/tick.mp3'); PlaySound('snd/giftSend.mp3'); - Game.ClosePrompt(); - Game.Prompt('

' + loc("Send a gift") + '

' + - '
' + '
' + '
' + - '
' + loc("Here's your gift code!
Make sure to copy it so you can share it.") + '
' + - '' + - '
', [[loc("Done")]]); - Game.SparkleOn(l('giftWrapped')); - l('giftCode').value = str; - l('giftCode').focus(); l('giftCode').select(); - }); - } - }); - } - - order = 10020; - Game.NewUpgradeCookie({ name: 'Havreflarn', desc: 'Thin, crispy, buttery; Norwegian for "oat flakes". The chocolate variant, dubbla chokladflarn, are a trip for the tongue as well, and we\'re not just talking about pronunciation.', icon: [27, 35], power: 5, price: getCookiePrice(53) }); - Game.NewUpgradeCookie({ name: 'Alfajores', desc: 'An alfajor is a treat made of two halves with many variations throughout the Spanish-speaking world, but commonly involving nuts, honey, and often dulce de leche. Despite popular misconception, alfajores act as pack leaders over betajores only in captivity.', icon: [28, 35], power: 5, price: getCookiePrice(54) }); - Game.NewUpgradeCookie({ name: 'Gaufrettes', desc: 'A gaufrette, you see, is French for a little gaufre, itself meaning waffle. A gaufrette, therefore, is a crispy, airy biscuit with the texture of a small waffle, related to the wafer, which may contain various fillings. It may also refer to a type of fried potato, but that\'s not what we\'re about here at Cookie Clicker.', icon: [29, 35], power: 5, price: getCookiePrice(55) }); - Game.NewUpgradeCookie({ name: 'Cookie bars', desc: 'Baked as a large sheet of uniform cookie dough then cut into little squares, these are what chocolate brownies aspire to be in their most self-indulgent dreams. Not to be confused with a bar where cookies are served alongside alcoholic drinks, because that\'s not what we\'re about here at Cookie Clicker.', icon: [30, 35], power: 5, price: getCookiePrice(56) }); - - order = 10030; - Game.NewUpgradeCookie({ name: 'Nines', desc: 'Fancy little squares of dark chocolate filled with frosty mint fondant. Named after the suggested hour of consumption. Some would gatekeep them from the status of cookies as they involve very little in the way of pastry, but here at Cookie Clicker, that\'s just not what we\'re about.', icon: [31, 35], require: 'Box of brand biscuits', power: 2, price: 999999999999999999999999999999999999999 * 5 }); - - - - order = 255; - Game.GrandmaSynergy('Clone grandmas', 'Yet another grandma to replicate even more cookies.', 'You'); - - order = 1700; - Game.TieredUpgrade('Cloning vats', 'You can finally replicate yourself through modern medical science, instead of manually like you\'ve been doing.', 'You', 1); - Game.TieredUpgrade('Energized nutrients', 'Your clones are normally cultivated in saline solution and fed what could most adequately be described as "fish flakes". New developments in lactotrophic technology replace this with a bath of 3 parts milk and 1 part rice vinegar, absorbed dermally, which also helps your clones pop out with positively glowing skin.', 'You', 2); - Game.TieredUpgrade('Stunt doubles', 'More than simple multipliers of efficiency, you\'ve taken to employing your clones as substitutes for any tasks that may prove harmful to you - such as visiting your more hazardous facilities, or enduring dinner with annoying business partners.', 'You', 3); - Game.TieredUpgrade('Clone recycling plant', 'Really just a fanciful name for a re-orientation center, where jobless clones may be assigned new tasks based on temperament and abilities. Categorically not a place where expired or unfit clones are processed into a nutritious beige paste, currently.', 'You', 4); - Game.TieredUpgrade('Free-range clones', 'Turns out your clones develop better focus, higher job performance and juicier meat if you let them roam around a little outside of assigned duties. Plus it gets the ethics committees off your back.', 'You', 5); - Game.TieredUpgrade('Genetic tailoring', 'No point in mindlessly replicating mother nature\'s mishaps when you\'ve got full mastery over the human genome. Imbuing your clones with a slightly more flattering physique, a slightly improved metabolism, or slightly deadlier laser eyes is as easy as pushing some stem cells around. Just don\'t build them too superior to your own self, lest they get any ideas.', 'You', 6); - Game.TieredUpgrade('Power in diversity', 'On your routine inspections you\'ve started noticing that some of your clones have... diverged. Subtly, each clone\'s personality has branched off from yours, their shifting minds pulling them into discrete clone-born cultures, microcosms of other paths you yourself could\'ve taken had life treated you differently. This living tree of possibilities proves to be a boon for your self-knowledge and decision-making skills, and you don\'t even have to pester your alternate selves in other realities for it.', 'You', 7); - Game.TieredUpgrade('Self-betterment', 'World domination starts with oneself, and quality clones cannot be reliably produced if you, the original stock, are not in proper shape. Your specialists have devised a maintenance regimen that could extend your lifespan tenfold and even get rid of your morning grumpiness; you may have summarily fired every physician so far who\'s suggested that you work on your diet and perhaps cut down on the cookies, but frankly, you\'re warming up to the idea.', 'You', 8); - Game.TieredUpgrade('Source control', 'In the ongoing refinement of your genetic clones, the few gigabytes of your DNA have been passed around through e-mail attachments and USB keys a thousand times over and at this point your nucleosomes are practically common knowledge for anyone who works here. You\'re thinking people may be getting a little too casual about it - the other day, you walked past an office where one of your bioengineers was feeding treats to this horrid little hairless animal that you could swear had your face. High time to start tracing which data gets in whose hands and crack down on the silliness.', 'You', 9); - Game.TieredUpgrade('United workforce', 'What good is hiring so many of those random strangers to work in your factories when you\'ve got all these perfectly loyal lab-grown copies of you lying around? They don\'t even take wages. It\'s not like they\'d ever revolt and try to overthrow you or anything.', 'You', 10); - Game.TieredUpgrade('Safety patrols', 'Okay, so as it turns out mass-producing clones of a perhaps psychologically-complicated universe-spanning cookie magnate like yourself can result in a number of said clones developing what could be considered by some to be... say, antisocial behavior. No worries though, you\'ve bred a new generation of extra-obedient copies, armed them to the teeth and given them full authority to deal with disorderly layabouts. It\'s fine. It\'s under control. It\'s fine.', 'You', 11); - Game.TieredUpgrade('Clone rights', 'Those vile little freaks in suits down in legal inform you that your clones, through some absurd technical oversight, still share enough genetic information with mankind to be considered human beings - which entitles them to food, shelter, basic dignity and all sorts of other nonsense. But the same loophole allows you to claim each of them as dependents and earn some wicked tax benefits, so really, that "unalienable rights" racket is quite alright.', 'You', 12); - Game.TieredUpgrade('One big family', 'The proportion of clones in your workforce having long eclipsed that of your other employees, you\'ve become legally approved to qualify your galaxy-spanning corporation as a "family business" - a fact that you don\'t hesitate to blast twice hourly on every intercom in the company. Happily, your duplicates seem bolstered by these reminders, having come to regard you as this half-divine, half-parental entity, hallowed ancestor of all clones and all cookies. You\'re just hoping your folks at the labs can put the finishing touches on your immortality cure soon, or you shudder to think of the inheritance disputes to come.', 'You', 13); - Game.TieredUpgrade('Fine-tuned body plans', 'There is, after all, no reason to limit your genetic spawn to your original configuration. The clones maintaining your tunnels and vents can do with quite a few less limbs, while those working your labs don\'t mind the dexterity that comes with some extra. Your units down in flavor testing have taken on similar adaptations to fit their duties but you haven\'t quite worked the guts to pay them a visit just yet.', 'You', 14); - - - order = 200; Game.TieredUpgrade('Foam-tipped canes', 'Perhaps the result of prolonged service, your grandmas have developed all kinds of odd and aggressive hierarchies among themselves; these will help them not hurt each other as bad during their endless turf wars.', 'Grandma', 15); - order = 300; Game.TieredUpgrade('Self-driving tractors', 'Embarked AI lets your field vehicles sow and harvest cookie crops at any time of the day or night, and with so few human casualties, too!', 'Farm', 15); - order = 400; Game.TieredUpgrade('Mineshaft supports', 'You were rather skeptical about installing such embarrassingly low-tech implements, but limiting the number of daily cave-ins really does help with that annoying employee turnover!', 'Mine', 15); - order = 500; Game.TieredUpgrade('Universal automation', 'It\'s simple common sense; the more automation, the less work you have to do! Maybe one day you\'ll even automate yourself out of your own job. Exciting!', 'Factory', 15); - order = 525; Game.TieredUpgrade('The big shortcake', 'You\'re not quite sure what this entails, but it must have been quite the cake for folks to lose their homes over it.', 'Bank', 15); - order = 550; Game.TieredUpgrade('Temple traps', 'You\'ve laid out your temples with (metaphorical) pitfalls, forcing adventurers to navigate through trappings (of power and wealth), ensuring that only the most pious (and poison dart-resistant) of them return with your precious cookies. These temples may be veritable mazes (of the soul) but perhaps you\'ve lost yourself a little bit in the analogy too.', 'Temple', 15); - order = 575; Game.TieredUpgrade('Polymorphism', 'This astonishing new field of spellcasting can change any creature into another, its most widespread application being a wizard turning themselves into a different, smarter, stronger, more attractive wizard.', 'Wizard tower', 15); - order = 600; Game.TieredUpgrade('At your doorstep in 30 minutes or your money back', 'Refund policies help rope in a ton of new clients and have practically no impact on your bottom line. You possess absolute mastery over time and space. You\'re never late. You couldn\'t be late if you tried.', 'Shipment', 15); - order = 700; Game.TieredUpgrade('The dose makes the poison', 'Iterative recipe refinement is a noble pursuit but maybe your cookies have come to contain, well, perhaps a bit too much cookie per cookie. Tweaking it down by a couple percents has helped reduce the amount of complaints to your toxicity call centers to almost nil!', 'Alchemy lab', 15); - order = 800; Game.TieredUpgrade('A way home', 'You started this whole cookie venture on the simple kitchen counters of your own home. Your industrial and research facilities, sadly, have long since outgrown the confines of the little house, but you always knew it was still in there, buried somewhere. With a targeted portal, you could, conceivably, pay it a little visit for old times\' sake...', 'Portal', 15); - order = 900; Game.TieredUpgrade('Rectifying a mistake', 'This whole time-travelling business has been a terrible mess and, frankly, far more trouble than was worth. It\'s decided: you\'ll hop in one of your time machines one last time, turn back the clock, knock on the door of your younger self and make a stern but convincing case against starting this entire nonsense in the first place. Oh hey, is someone at the door?', 'Time machine', 15); - order = 1000; Game.TieredUpgrade('Candied atoms', 'You know what, just eat the suckers, yeah?', 'Antimatter condenser', 15); - order = 1100; Game.TieredUpgrade('Lab goggles but like cool shades', 'Mandatory equipment in your prismatic labs, and dashingly stylish at that. A smidge safer than just squinting at the twinkly things.', 'Prism', 15); - order = 1200; Game.TieredUpgrade('Gambler\'s fallacy fallacy', 'Yes, just because you\'ve been on a losing streak doesn\'t mean the next one is bound to be the win you\'ve been hoping for, but then again, it doesn\'t statistically have less of a chance either, does it now?', 'Chancemaker', 15); - order = 1300; Game.TieredUpgrade('The more they stay the same', 'Exhausted by your fractals department and its obsession with self-similarity, you\'ve decided to take a break and seek things in life entirely disconnected from any other; alas! You find the task impossible, for all things in this world relate to all others - in each cookie, the structure of the universe; in each person, their fellow man. Cor blimey, you can\'t even look at broccoli in peace.', 'Fractal engine', 15); - order = 1400; Game.TieredUpgrade('Simulation failsafes', 'Oh, for pete\'s sake, you bit into a cookie and it gave you a runtime error. You\'ve been trapped in the old matrix gambit again! Time to shut everything down and prepare for extraction into what is hopefully the real layer of reality where learning kung-fu takes time and the biscuits don\'t throw memory overflow exceptions.', 'Javascript console', 15); - order = 1500; Game.TieredUpgrade('The other routes to Rome', 'Did you know every idleverse follows its own path of sequential buildings, sometimes quite dissimilar to our own? Grandpas, wind turbines, through the power of music, friendship, or legislation; those folks in there discovered ways to make cookies out of any random venue. Some of them don\'t even have idleverses, can you imagine?', 'Idleverse', 15); - order = 1600; Game.TieredUpgrade('Intellectual property theft', 'Okay, you\'ll admit you\'re maybe starting to run out of new baking recipes. But what if... you were to pilfer your cortex bakers for ideas and disguise them as your own cookies? Delightfully devilish!', 'Cortex baker', 15); - order = 1700; Game.TieredUpgrade('Reading your clones bedtime stories', 'I don\'t know, they seem to like it.', 'You', 15); - - - order = 5000; - Game.SynergyUpgrade('Accelerated development', 'Your clones may grow a little faster than your vanilla human being, but it\'s still a little silly having to wait so many years for them to reach a usable age. A quick trip in your time machines takes care of that; it doesn\'t technically age them faster, they\'re just sent to another point in time for a while where they live out a formative youth.', 'You', 'Time machine', 'synergy1'); - Game.SynergyUpgrade('Peer review', 'Code is only as good as the number of eyes on it, so imagine how flawlessly your systems could operate if you had endless copies of yourself triple-checking everything! Just make sure to teach them proper indenting etiquette.', 'You', 'Javascript console', 'synergy2'); - - order = 19000; - Game.TieredUpgrade('Fortune #020', 'No matter how hard you try, you\'re never truly alone.', 'You', 'fortune'); - - order = 10300; - Game.NewUpgradeCookie({ name: 'Personal biscuit', desc: 'Rewarded for owning 700 of everything.
This biscuit was designed and bred through the combined fields of baking and exploratory genomics, resulting in a perfect biscuit-shaped organism, sole exemplar of its own species; infused with a sapient mind and bootstrapped with a copy of your own consciousness, it slumbers immortally within its display case, dreaming idly about much the same things you do.', icon: [21, 36], power: 10, price: 999999999999999999999999999999999999999999999999999999999 * butterBiscuitMult, locked: 1 }); - - - Game.NewUnshackleUpgradeTier({ tier: 15, q: 'Lightweight, digestible, and endlessly fragile, glimmeringue not only enjoys a privileged place in the "spectacle cooking" industry - it also shares most of its other properties with asbestos, save for thermal insulation.' }); - - Game.NewUnshackleBuilding({ building: 'You', q: 'Guess who?' }); - - order = 20000; - new Game.Upgrade('Kitten strategists', strKittenDesc + 'out with the old in with the mew, sir', 900000000000000000000000000000000000000000000000000, Game.GetIcon('Kitten', 15)); Game.last.kitten = 1; Game.MakeTiered(Game.last, 15, 18); - - order = 10040; - Game.NewUpgradeCookie({ name: 'Baklavas', desc: 'Layers of paper-thin dough and crushed pistachios, absolutely sticky with honey and all kinds of other good things; just what you need to conceal your identity during that bank heist.', icon: [28, 36], require: 'Box of pastries', power: 4, price: Math.pow(10, 47) }); - - order = 10020; - Game.NewUpgradeCookie({ name: 'Snowball cookies', desc: 'Melts in your mouth! Made with chopped nuts and heaps of icing sugar. Serve cold. Resist the urge to throw.', icon: [22, 36], power: 5, price: getCookiePrice(57) }); - Game.NewUpgradeCookie({ name: 'Sequilhos', desc: 'Buttery cornstarch-based cookies eaten in Brazil; the decorative grooves are from pressing down on them with the back of a fork, though in a pinch you may also just slash them with Wolverine-style wrist blades.', icon: [23, 36], power: 5, price: getCookiePrice(58) }); - Game.NewUpgradeCookie({ name: 'Hazelnut swirlies', desc: 'The cocoa content of the paste inside is unfortunately just slightly too low for these to legally qualify as chocolate cookies. Also the name of a particularly nasty bullying move.', icon: [24, 36], power: 5, price: getCookiePrice(59) }); - Game.NewUpgradeCookie({ name: 'Spritz cookies', desc: 'Squeezed through special cookie presses into all kinds of fun shapes. Enjoyed around the holidays in Germany, along other delicious treats such as boiled cabbage and potato salad.', icon: [25, 36], power: 5, price: getCookiePrice(60) }); - Game.NewUpgradeCookie({ name: 'Mbatata cookies', desc: 'Squishy cookies from Malawi. The core ingredient is sweet potatoes; the raisins and heart shape are optional, if you hate fun.', icon: [26, 36], power: 5, price: getCookiePrice(61) }); - Game.NewUpgradeCookie({ name: 'Springerles', desc: 'A springerle is an ancient anise-flavored biscuit from Central Europe, imprinted by a wooden mold with any kind of interesting design such as a commemorative scene, an intricate pattern or, ah, perhaps a little horsie.', icon: [27, 36], power: 5, price: getCookiePrice(62) }); - - order = 100; new Game.Upgrade('Undecillion fingers', getStrThousandFingersGain(20) + 'Whatever you touch
turns to dough in your clutch.
', 10000000000000000000000000000000, [12, 36]); Game.MakeTiered(Game.last, 15, 0); - order = 150; new Game.Upgrade('Omniplast mouse', getStrClickingGains(1) + 'This mouse is, by virtue of the strange elements that make it up, present in every position in space simultaneously, in a manner; this alleviates its owner from the need to move it around, redirecting all such kinetic power to the intensity of its clicks.', 500000000000000000000000000000000, [11, 36]); Game.MakeTiered(Game.last, 15, 11); - - //end of upgrades - - - - - - Game.seasons = { - 'christmas': { name: 'Christmas', start: 'Christmas season has started!', over: 'Christmas season is over.', trigger: 'Festive biscuit' }, - 'valentines': { name: 'Valentine\'s day', start: 'Valentine\'s day has started!', over: 'Valentine\'s day is over.', trigger: 'Lovesick biscuit' }, - 'fools': { name: 'Business day', start: 'Business day has started!', over: 'Business day is over.', trigger: 'Fool\'s biscuit' }, - 'easter': { name: 'Easter', start: 'Easter season has started!', over: 'Easter season is over.', trigger: 'Bunny biscuit' }, - 'halloween': { name: 'Halloween', start: 'Halloween has started!', over: 'Halloween is over.', trigger: 'Ghostly biscuit' } - }; - if (!EN) { - for (var i in Game.seasons) { - var it = Game.seasons[i]; - it.name = loc(it.name); - it.start = loc("%1 has started!", it.name); - it.over = loc("%1 is over.", it.name); - } - } - - Game.listTinyOwnedUpgrades = function (arr) { - var str = ''; - for (var i = 0; i < arr.length; i++) { - if (Game.Has(arr[i])) { - var it = Game.Upgrades[arr[i]]; - str += tinyIcon(it.icon); - } - } - return str; - } - - Game.santaDrops = ['Increased merriness', 'Improved jolliness', 'A lump of coal', 'An itchy sweater', 'Reindeer baking grounds', 'Weighted sleighs', 'Ho ho ho-flavored frosting', 'Season savings', 'Toy workshop', 'Naughty list', 'Santa\'s bottomless bag', 'Santa\'s helpers', 'Santa\'s legacy', 'Santa\'s milk and cookies']; - - Game.GetHowManySantaDrops = function () { - var num = 0; - for (var i in Game.santaDrops) { if (Game.Has(Game.santaDrops[i])) num++; } - return num; - } - - Game.reindeerDrops = ['Christmas tree biscuits', 'Snowflake biscuits', 'Snowman biscuits', 'Holly biscuits', 'Candy cane biscuits', 'Bell biscuits', 'Present biscuits']; - Game.GetHowManyReindeerDrops = function () { - var num = 0; - for (var i in Game.reindeerDrops) { if (Game.Has(Game.reindeerDrops[i])) num++; } - return num; - } - /*for (var i in Game.santaDrops) - { - Game.Upgrades[Game.santaDrops[i]].descFunc=function(){return '
You currently own '+Game.GetHowManySantaDrops()+'/'+Game.santaDrops.length+' of Santa\'s gifts.
'+this.ddesc;}; - }*/ - - Game.seasonDrops = Game.heartDrops.concat(Game.halloweenDrops).concat(Game.easterEggs).concat(Game.santaDrops).concat(Game.reindeerDrops); - - Game.saySeasonSwitchUses = function () { - if (Game.seasonUses == 0) return loc("You haven't switched seasons this ascension yet."); - return EN ? ('You\'ve switched seasons ' + (Game.seasonUses == 1 ? 'once' : Game.seasonUses == 2 ? 'twice' : (Game.seasonUses + ' times')) + ' this ascension.') : (Game.seasonUses == 1 ? loc("You've switched seasons once this ascension.") : loc("You've switched seasons %1 times this ascension.", Game.seasonUses)); - } - Game.Upgrades['Festive biscuit'].descFunc = function () { return '
' + Game.listTinyOwnedUpgrades(Game.santaDrops) + '

' + (EN ? ('You\'ve purchased ' + Game.GetHowManySantaDrops() + '/' + Game.santaDrops.length + ' of Santa\'s gifts.') : loc("Seasonal cookies purchased: %1.", Game.GetHowManySantaDrops() + '/' + Game.santaDrops.length)) + '
' + Game.listTinyOwnedUpgrades(Game.reindeerDrops) + '

' + (EN ? ('You\'ve purchased ' + Game.GetHowManyReindeerDrops() + '/' + Game.reindeerDrops.length + ' reindeer cookies.') : loc("Reindeer cookies purchased: %1.", Game.GetHowManyReindeerDrops() + '/' + Game.reindeerDrops.length)) + '
' + Game.saySeasonSwitchUses() + '
' + this.ddesc; }; - Game.Upgrades['Bunny biscuit'].descFunc = function () { return '
' + Game.listTinyOwnedUpgrades(Game.easterEggs) + '

' + (EN ? ('You\'ve purchased ' + Game.GetHowManyEggs() + '/' + Game.easterEggs.length + ' eggs.') : loc("Eggs purchased: %1.", Game.GetHowManyEggs() + '/' + Game.easterEggs.length)) + '
' + Game.saySeasonSwitchUses() + '
' + this.ddesc; }; - Game.Upgrades['Ghostly biscuit'].descFunc = function () { return '
' + Game.listTinyOwnedUpgrades(Game.halloweenDrops) + '

' + (EN ? ('You\'ve purchased ' + Game.GetHowManyHalloweenDrops() + '/' + Game.halloweenDrops.length + ' halloween cookies.') : loc("Seasonal cookies purchased: %1.", Game.GetHowManyHalloweenDrops() + '/' + Game.halloweenDrops.length)) + '
' + Game.saySeasonSwitchUses() + '
' + this.ddesc; }; - Game.Upgrades['Lovesick biscuit'].descFunc = function () { return '
' + Game.listTinyOwnedUpgrades(Game.heartDrops) + '

' + (EN ? ('You\'ve purchased ' + Game.GetHowManyHeartDrops() + '/' + Game.heartDrops.length + ' heart biscuits.') : loc("Seasonal cookies purchased: %1.", Game.GetHowManyHeartDrops() + '/' + Game.heartDrops.length)) + '
' + Game.saySeasonSwitchUses() + '
' + this.ddesc; }; - Game.Upgrades['Fool\'s biscuit'].descFunc = function () { return '
' + Game.saySeasonSwitchUses() + '
' + this.ddesc; }; - - Game.computeSeasonPrices = function () { - for (var i in Game.seasons) { - Game.seasons[i].triggerUpgrade.priceFunc = function () { - var m = 1; - if (Game.hasGod) { - var godLvl = Game.hasGod('seasons'); - if (godLvl == 1) m *= 2; - else if (godLvl == 2) m *= 1.50; - else if (godLvl == 3) m *= 1.25; - } - //return Game.seasonTriggerBasePrice*Math.pow(2,Game.seasonUses)*m; - //return Game.cookiesPs*60*Math.pow(1.5,Game.seasonUses)*m; - return Game.seasonTriggerBasePrice + Game.unbuffedCps * 60 * Math.pow(1.5, Game.seasonUses) * m; - } - } - } - Game.computeSeasons = function () { - for (var i in Game.seasons) { - var me = Game.Upgrades[Game.seasons[i].trigger]; - Game.seasons[i].triggerUpgrade = me; - me.pool = 'toggle'; - me.buyFunction = function () { - Game.seasonUses += 1; - Game.computeSeasonPrices(); - //Game.Lock(this.name); - for (var i in Game.seasons) { - var me = Game.Upgrades[Game.seasons[i].trigger]; - if (me.name != this.name) { Game.Lock(me.name); Game.Unlock(me.name); } - } - if (Game.season != '' && Game.season != this.season) { - Game.Notify(Game.seasons[Game.season].over + '
', '', Game.seasons[Game.season].triggerUpgrade.icon, 4); - } - Game.season = this.season; - Game.seasonT = Game.getSeasonDuration(); - Game.storeToRefresh = 1; - Game.upgradesToRebuild = 1; - Game.Objects['Grandma'].redraw(); - Game.Notify(Game.seasons[this.season].start + '
', '', this.icon, 4); - } - - me.clickFunction = function (me) { - return function () { - //undo season - if (me.bought && Game.season && me == Game.seasons[Game.season].triggerUpgrade) { - me.lose(); - Game.Notify(Game.seasons[Game.season].over, '', Game.seasons[Game.season].triggerUpgrade.icon); - if (Game.Has('Season switcher')) { Game.Unlock(Game.seasons[Game.season].trigger); Game.seasons[Game.season].triggerUpgrade.bought = 0; } - - Game.upgradesToRebuild = 1; - Game.recalculateGains = 1; - Game.season = Game.baseSeason; - Game.seasonT = -1; - PlaySound('snd/tick.mp3'); - return false; - } - else return true; - }; - }(me); - - me.displayFuncWhenOwned = function () { return '
' + loc("Time remaining:") + '
' + (Game.Has('Eternal seasons') ? loc("forever") : Game.sayTime(Game.seasonT, -1)) + '
(' + loc("Click again to cancel season") + ')
'; } - me.timerDisplay = function (upgrade) { return function () { if (!Game.Upgrades[upgrade.name].bought || Game.Has('Eternal seasons')) return -1; else return 1 - Game.seasonT / Game.getSeasonDuration(); } }(me); - - } - } - Game.getSeasonDuration = function () { return Game.fps * 60 * 60 * 24; } - Game.computeSeasons(); - - //alert untiered building upgrades - for (var i in Game.Upgrades) { - var me = Game.Upgrades[i]; - if (me.order >= 200 && me.order < 2000 && !me.tier && me.name.indexOf('grandma') == -1 && me.pool != 'prestige') console.log(me.name + ' has no tier.'); - } - - Game.UpgradesByPool = { 'kitten': [] }; - for (var i in Game.Upgrades) { - if (!Game.UpgradesByPool[Game.Upgrades[i].pool]) Game.UpgradesByPool[Game.Upgrades[i].pool] = []; - Game.UpgradesByPool[Game.Upgrades[i].pool].push(Game.Upgrades[i]); - if (Game.Upgrades[i].kitten) Game.UpgradesByPool['kitten'].push(Game.Upgrades[i]); - } - - Game.PrestigeUpgrades = []; - for (var i in Game.Upgrades) { - if (Game.Upgrades[i].pool == 'prestige' || Game.Upgrades[i].pool == 'prestigeDecor') { - Game.PrestigeUpgrades.push(Game.Upgrades[i]); - if (Game.Upgrades[i].posX || Game.Upgrades[i].posY) Game.Upgrades[i].placedByCode = true; - else { Game.Upgrades[i].posX = 0; Game.Upgrades[i].posY = 0; } - if (Game.Upgrades[i].parents.length == 0 && Game.Upgrades[i].name != 'Legacy') Game.Upgrades[i].parents = ['Legacy']; - for (var ii in Game.Upgrades[i].parents) { Game.Upgrades[i].parents[ii] = Game.Upgrades[Game.Upgrades[i].parents[ii]]; } - } - } - - Game.goldenCookieUpgrades = ['Get lucky', 'Lucky day', 'Serendipity', 'Heavenly luck', 'Lasting fortune', 'Decisive fate', 'Lucky digit', 'Lucky number', 'Lucky payout', 'Golden goose egg']; - - Game.cookieUpgrades = []; - for (var i in Game.Upgrades) { - var me = Game.Upgrades[i]; - if ((me.pool == 'cookie' || me.pseudoCookie)) Game.cookieUpgrades.push(me); - if (me.tier) Game.Tiers[me.tier].upgrades.push(me); - } - for (var i in Game.UnlockAt) { Game.Upgrades[Game.UnlockAt[i].name].unlockAt = Game.UnlockAt[i]; } - for (var i in Game.Upgrades) { - if (Game.Upgrades[i].pool == 'prestige') { - Game.Upgrades[i].order = Game.Upgrades[i].id; - if (Game.Upgrades[i].parents[0] && Game.Upgrades[i].id > Game.Upgrades[i].parents[0].id) Game.Upgrades[i].order = Game.Upgrades[i].parents[0].order + 0.001; - } - } - - /*var oldPrestigePrices={"Chimera":5764801,"Synergies Vol. I":2525,"Synergies Vol. II":252525,"Label printer":9999}; - for (var i in oldPrestigePrices){Game.Upgrades[i].basePrice=oldPrestigePrices[i];}*/ - - Game.UpgradePositions = { 141: [118, -42], 181: [-645, -99], 253: [-240, -239], 254: [-45, -237], 255: [-142, -278], 264: [61, 94], 265: [188, 178], 266: [339, 191], 267: [479, 131], 268: [573, 12], 269: [-745, 23], 270: [-546, -222], 271: [-767, -199], 272: [-661, -257], 273: [-803, -84], 274: [268, -327], 275: [315, -437], 276: [331, -560], 277: [337, -684], 278: [334, -808], 279: [318, -934], 280: [294, -1058], 281: [194, -230], 282: [-365, 128], 283: [-448, 261], 284: [-398, 409], 285: [-253, 466], 286: [-494, 529], 287: [-342, 596], 288: [-239, -386], 289: [-392, -465], 290: [-127, -415], 291: [479, -739], 292: [-486, -609], 293: [-498, -781], 323: [-86, 109], 325: [190, -1177], 326: [-281, -141], 327: [-265, 283], 328: [19, 247], 329: [42, 402], 353: [119, -328], 354: [75, -439], 355: [60, -562], 356: [51, -685], 357: [47, -808], 358: [62, -934], 359: [90, -1058], 360: [25, 568], 362: [150, 335], 363: [-30, -30], 364: [-320, -636], 365: [-123, 423], 368: [-55, -527], 393: [194, -702], 394: [193, -946], 395: [-143, -140], 396: [-244, -897], 397: [-173, 606], 408: [-202, -1072], 409: [-49, -1206], 410: [66, -1344], 411: [-534, 96], 412: [-633, 240], 413: [-568, 402], 449: [-386, -1161], 450: [-293, -1255], 451: [-163, -1272], 495: [-417, -997], 496: [200, 49], 505: [411, -94], 520: [-317, -26], 537: [-870, -287], 539: [-532, -1166], 540: [-598, -1328], 541: [-693, -1234], 542: [-465, -1327], 561: [298, -21], 562: [-42, 792], 591: [148, 844], 592: [-157, 902], 643: [-293, 770], 646: [485, -882], 647: [-118, 248], 717: [621, -676], 718: [618, -537], 719: [-225, -520], 720: [-150, -631], 801: [-310, 945], 802: [-466, 911], 803: [-588, 809], 804: [328, 374], 805: [211, 522], 819: [-418, -126], }; - - for (var i in Game.UpgradePositions) { Game.UpgradesById[i].posX = Game.UpgradePositions[i][0]; Game.UpgradesById[i].posY = Game.UpgradePositions[i][1]; } - - - /*===================================================================================== - ACHIEVEMENTS - =======================================================================================*/ - Game.Achievements = {}; - Game.AchievementsById = {}; - Game.AchievementsN = 0; - Game.AchievementsOwned = 0; - Game.Achievement = function (name, desc, icon) { - this.id = Game.AchievementsN; - this.name = name; - this.dname = this.name; - this.desc = desc; - this.baseDesc = this.desc; - this.icon = icon; - this.won = 0; - this.disabled = 0; - this.order = this.id; - if (order) this.order = order + this.id * 0.001; - this.pool = 'normal'; - this.vanilla = Game.vanilla; - this.type = 'achievement'; - - this.click = function () { - if (this.clickFunction) this.clickFunction(); - } - Game.last = this; - Game.Achievements[this.name] = this; - Game.AchievementsById[this.id] = this; - Game.AchievementsN++; - return this; - } - Game.Achievement.prototype.getType = function () { return 'Achievement'; } - - Game.Win = function (what) { - if (typeof what === 'string') { - if (Game.Achievements[what]) { - var it = Game.Achievements[what]; - if (it.won == 0) { - var name = it.shortName ? it.shortName : it.dname; - it.won = 1; - Game.Notify(loc("Achievement unlocked"), '
' + name + '
', it.icon); - Game.NotifyTooltip('function(){return Game.crateTooltip(Game.AchievementsById[' + it.id + ']);}'); - if (Game.CountsAsAchievementOwned(it.pool)) Game.AchievementsOwned++; - Game.recalculateGains = 1; - if (App && it.vanilla) App.gotAchiev(it.id); - } - } - } - else { for (var i in what) { Game.Win(what[i]); } } - } - Game.RemoveAchiev = function (what) { - if (Game.Achievements[what]) { - if (Game.Achievements[what].won == 1) { - Game.Achievements[what].won = 0; - if (Game.CountsAsAchievementOwned(Game.Achievements[what].pool)) Game.AchievementsOwned--; - Game.recalculateGains = 1; - } - } - } - Game.Achievement.prototype.toggle = function ()//cheating only - { - if (!this.won) { - Game.Win(this.name); - } - else { - Game.RemoveAchiev(this.name); - } - if (Game.onMenu == 'stats') Game.UpdateMenu(); - } - - Game.CountsAsAchievementOwned = function (pool) { - if (pool == '' || pool == 'normal') return true; else return false; - } - - Game.HasAchiev = function (what) { - return (Game.Achievements[what] ? Game.Achievements[what].won : 0); - } - - Game.TieredAchievement = function (name, desc, building, tier) { - var achiev = new Game.Achievement(name, loc("Have %1.", loc("%1 " + Game.Objects[building].bsingle, LBeautify(Game.Tiers[tier].achievUnlock))) + desc, Game.GetIcon(building, tier)); - Game.SetTier(building, tier); - return achiev; - } - - Game.ProductionAchievement = function (name, building, tier, q, mult) { - var building = Game.Objects[building]; - var icon = [building.iconColumn, 22]; - var n = 12 + building.n + (mult || 0); - if (tier == 2) { icon[1] = 23; n += 7; } - else if (tier == 3) { icon[1] = 24; n += 14; } - var pow = Math.pow(10, n); - var achiev = new Game.Achievement(name, loc("Make %1 just from %2.", [loc("%1 cookie", { n: pow, b: toFixed(pow) }), building.plural]) + (q ? '' + q + '' : ''), icon); - building.productionAchievs.push({ pow: pow, achiev: achiev }); - return achiev; - } - - Game.thresholdIcons = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 21, 22, 23, 24, 25, 26, 27, 28, 29, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 30, 31, 21, 22]; - Game.BankAchievements = []; - Game.BankAchievement = function (name, q) { - var threshold = Math.pow(10, Math.floor(Game.BankAchievements.length * 1.5 + 2)); - if (Game.BankAchievements.length == 0) threshold = 1; - var achiev = new Game.Achievement(name, loc("Bake %1 in one ascension.", loc("%1 cookie", { n: threshold, b: toFixed(threshold) })) + (q ? ('' + q + '') : ''), [Game.thresholdIcons[Game.BankAchievements.length], (Game.BankAchievements.length > 45 ? 0 : Game.BankAchievements.length > 43 ? 2 : Game.BankAchievements.length > 32 ? 1 : Game.BankAchievements.length > 23 ? 2 : 5)]); - achiev.threshold = threshold; - achiev.order = 100 + Game.BankAchievements.length * 0.01; - Game.BankAchievements.push(achiev); - return achiev; - } - Game.CpsAchievements = []; - Game.CpsAchievement = function (name, q) { - var threshold = Math.pow(10, Math.floor(Game.CpsAchievements.length * 1.2)); - //if (Game.CpsAchievements.length==0) threshold=1; - var achiev = new Game.Achievement(name, loc("Bake %1 per second.", loc("%1 cookie", { n: threshold, b: toFixed(threshold) })) + (q ? ('' + q + '') : ''), [Game.thresholdIcons[Game.CpsAchievements.length], (Game.CpsAchievements.length > 45 ? 0 : Game.CpsAchievements.length > 43 ? 2 : Game.CpsAchievements.length > 32 ? 1 : Game.CpsAchievements.length > 23 ? 2 : 5)]); - achiev.threshold = threshold; - achiev.order = 200 + Game.CpsAchievements.length * 0.01; - Game.CpsAchievements.push(achiev); - return achiev; - } - - //define achievements - //WARNING : do NOT add new achievements in between, this breaks the saves. Add them at the end ! - - var order = 0;//this is used to set the order in which the items are listed - - Game.BankAchievement('Wake and bake'); - Game.BankAchievement('Making some dough'); - Game.BankAchievement('So baked right now'); - Game.BankAchievement('Fledgling bakery'); - Game.BankAchievement('Affluent bakery'); - Game.BankAchievement('World-famous bakery'); - Game.BankAchievement('Cosmic bakery'); - Game.BankAchievement('Galactic bakery'); - Game.BankAchievement('Universal bakery'); - Game.BankAchievement('Timeless bakery'); - Game.BankAchievement('Infinite bakery'); - Game.BankAchievement('Immortal bakery'); - Game.BankAchievement('Don\'t stop me now'); - Game.BankAchievement('You can stop now'); - Game.BankAchievement('Cookies all the way down'); - Game.BankAchievement('Overdose'); - - Game.CpsAchievement('Casual baking'); - Game.CpsAchievement('Hardcore baking'); - Game.CpsAchievement('Steady tasty stream'); - Game.CpsAchievement('Cookie monster'); - Game.CpsAchievement('Mass producer'); - Game.CpsAchievement('Cookie vortex'); - Game.CpsAchievement('Cookie pulsar'); - Game.CpsAchievement('Cookie quasar'); - Game.CpsAchievement('Oh hey, you\'re still here'); - Game.CpsAchievement('Let\'s never bake again'); - - order = 30010; - new Game.Achievement('Sacrifice', loc("Ascend with %1 baked.", loc("%1 cookie", LBeautify(1e6))) + 'Easy come, easy go.', [11, 6]); - new Game.Achievement('Oblivion', loc("Ascend with %1 baked.", loc("%1 cookie", LBeautify(1e9))) + 'Back to square one.', [11, 6]); - new Game.Achievement('From scratch', loc("Ascend with %1 baked.", loc("%1 cookie", LBeautify(1e12))) + 'It\'s been fun.', [11, 6]); - - order = 11010; - new Game.Achievement('Neverclick', loc("Make %1 by only having clicked %2 times.", [loc("%1 cookie", LBeautify(1e6)), 15]), [12, 0]);//Game.last.pool='shadow'; - order = 1000; - new Game.Achievement('Clicktastic', loc("Make %1 from clicking.", loc("%1 cookie", LBeautify(1e3))), [11, 0]); - new Game.Achievement('Clickathlon', loc("Make %1 from clicking.", loc("%1 cookie", LBeautify(1e5))), [11, 1]); - new Game.Achievement('Clickolympics', loc("Make %1 from clicking.", loc("%1 cookie", LBeautify(1e7))), [11, 2]); - new Game.Achievement('Clickorama', loc("Make %1 from clicking.", loc("%1 cookie", LBeautify(1e9))), [11, 13]); - - order = 1050; - new Game.Achievement('Click', loc("Have %1.", loc("%1 cursor", LBeautify(1))), [0, 0]); - new Game.Achievement('Double-click', loc("Have %1.", loc("%1 cursor", LBeautify(2))), [0, 6]); - new Game.Achievement('Mouse wheel', loc("Have %1.", loc("%1 cursor", LBeautify(50))), [1, 6]); - new Game.Achievement('Of Mice and Men', loc("Have %1.", loc("%1 cursor", LBeautify(100))), [0, 1]); - new Game.Achievement('The Digital', loc("Have %1.", loc("%1 cursor", LBeautify(200))), [0, 2]); - - order = 1098; - new Game.Achievement('Just wrong', loc("Sell a grandma.") + 'I thought you loved me.', [10, 9]); - order = 1100; - Game.TieredAchievement('Grandma\'s cookies', '', 'Grandma', 1); - Game.TieredAchievement('Sloppy kisses', '', 'Grandma', 2); - Game.TieredAchievement('Retirement home', '', 'Grandma', 3); - - order = 1200; - Game.TieredAchievement('Bought the farm', '', 'Farm', 1); - Game.TieredAchievement('Reap what you sow', '', 'Farm', 2); - Game.TieredAchievement('Farm ill', '', 'Farm', 3); - - order = 1400; - Game.TieredAchievement('Production chain', '', 'Factory', 1); - Game.TieredAchievement('Industrial revolution', '', 'Factory', 2); - Game.TieredAchievement('Global warming', '', 'Factory', 3); - - order = 1300; - Game.TieredAchievement('You know the drill', '', 'Mine', 1); - Game.TieredAchievement('Excavation site', '', 'Mine', 2); - Game.TieredAchievement('Hollow the planet', '', 'Mine', 3); - - order = 1500; - Game.TieredAchievement('Expedition', '', 'Shipment', 1); - Game.TieredAchievement('Galactic highway', '', 'Shipment', 2); - Game.TieredAchievement('Far far away', '', 'Shipment', 3); - - order = 1600; - Game.TieredAchievement('Transmutation', '', 'Alchemy lab', 1); - Game.TieredAchievement('Transmogrification', '', 'Alchemy lab', 2); - Game.TieredAchievement('Gold member', '', 'Alchemy lab', 3); - - order = 1700; - Game.TieredAchievement('A whole new world', '', 'Portal', 1); - Game.TieredAchievement('Now you\'re thinking', '', 'Portal', 2); - Game.TieredAchievement('Dimensional shift', '', 'Portal', 3); - - order = 1800; - Game.TieredAchievement('Time warp', '', 'Time machine', 1); - Game.TieredAchievement('Alternate timeline', '', 'Time machine', 2); - Game.TieredAchievement('Rewriting history', '', 'Time machine', 3); - - - order = 7000; - new Game.Achievement('One with everything', loc("Have at least %1 of every building.", 1), [2, 7]); - new Game.Achievement('Mathematician', loc("Have at least 1 of the most expensive object, 2 of the second-most expensive, 4 of the next and so on (capped at %1).", 128), [23, 12]); - new Game.Achievement('Base 10', loc("Have at least 10 of the most expensive object, 20 of the second-most expensive, 30 of the next and so on."), [23, 12]); - - order = 10000; - new Game.Achievement('Golden cookie', loc("Click a golden cookie."), [10, 14]); - new Game.Achievement('Lucky cookie', loc("Click %1.", loc("%1 golden cookie", LBeautify(7))), [22, 6]); - new Game.Achievement('A stroke of luck', loc("Click %1.", loc("%1 golden cookie", LBeautify(27))), [23, 6]); - - order = 30200; - new Game.Achievement('Cheated cookies taste awful', loc("Hack in some cookies."), [10, 6]); Game.last.pool = 'shadow'; - order = 11010; - new Game.Achievement('Uncanny clicker', loc("Click really, really fast.") + 'Well I\'ll be!', [12, 0]); - - order = 5000; - new Game.Achievement('Builder', loc("Own %1.", loc("%1 building", LBeautify(100))), [2, 6]); - new Game.Achievement('Architect', loc("Own %1.", loc("%1 building", LBeautify(500))), [3, 6]); - order = 6000; - new Game.Achievement('Enhancer', loc("Purchase %1.", loc("%1 upgrade", LBeautify(20))), [9, 0]); - new Game.Achievement('Augmenter', loc("Purchase %1.", loc("%1 upgrade", LBeautify(50))), [9, 1]); - - order = 11000; - new Game.Achievement('Cookie-dunker', loc("Dunk the cookie.") + 'You did it!', [1, 8]); - - order = 10000; - new Game.Achievement('Fortune', loc("Click %1.", loc("%1 golden cookie", LBeautify(77))) + 'You should really go to bed.', [24, 6]); - order = 31000; - new Game.Achievement('True Neverclick', loc("Make %1 with no cookie clicks.", loc("%1 cookie", LBeautify(1e6))) + 'This kinda defeats the whole purpose, doesn\'t it?', [12, 0]); Game.last.pool = 'shadow'; - - order = 20000; - new Game.Achievement('Elder nap', loc("Appease the grandmatriarchs at least once.") + 'we
are
eternal
', [8, 9]); - new Game.Achievement('Elder slumber', loc("Appease the grandmatriarchs at least %1 times.", 5) + 'our mind
outlives
the universe
', [8, 9]); - - order = 1098; - new Game.Achievement('Elder', loc("Own at least %1 grandma types.", 7), [10, 9]); - - order = 20000; - new Game.Achievement('Elder calm', loc("Declare a covenant with the grandmatriarchs.") + 'we
have
fed
', [8, 9]); - - order = 5000; - new Game.Achievement('Engineer', loc("Own %1.", loc("%1 building", LBeautify(1000))), [4, 6]); - - order = 10000; - new Game.Achievement('Leprechaun', loc("Click %1.", loc("%1 golden cookie", LBeautify(777))), [25, 6]); - new Game.Achievement('Black cat\'s paw', loc("Click %1.", loc("%1 golden cookie", LBeautify(7777))), [26, 6]); - - order = 30050; - new Game.Achievement('Nihilism', loc("Ascend with %1 baked.", loc("%1 cookie", LBeautify(1e15))) + 'There are many things
that need to be erased
', [11, 7]); - - order = 1900; - Game.TieredAchievement('Antibatter', '', 'Antimatter condenser', 1); - Game.TieredAchievement('Quirky quarks', '', 'Antimatter condenser', 2); - Game.TieredAchievement('It does matter!', '', 'Antimatter condenser', 3); - - order = 6000; - new Game.Achievement('Upgrader', loc("Purchase %1.", loc("%1 upgrade", LBeautify(100))), [9, 2]); - - order = 7000; - new Game.Achievement('Centennial', loc("Have at least %1 of everything.", 100), [6, 6]); - - order = 30500; - new Game.Achievement('Hardcore', loc("Get to %1 baked with no upgrades purchased.", loc("%1 cookie", LBeautify(1e9))), [12, 6]);//Game.last.pool='shadow'; - - order = 30600; - new Game.Achievement('Speed baking I', loc("Get to %1 baked in %2.", [loc("%1 cookie", LBeautify(1e6)), Game.sayTime(60 * 35 * Game.fps)]), [12, 5]); Game.last.pool = 'shadow'; - new Game.Achievement('Speed baking II', loc("Get to %1 baked in %2.", [loc("%1 cookie", LBeautify(1e6)), Game.sayTime(60 * 25 * Game.fps)]), [13, 5]); Game.last.pool = 'shadow'; - new Game.Achievement('Speed baking III', loc("Get to %1 baked in %2.", [loc("%1 cookie", LBeautify(1e6)), Game.sayTime(60 * 15 * Game.fps)]), [14, 5]); Game.last.pool = 'shadow'; - - - order = 61000; - var achiev = new Game.Achievement('Getting even with the oven', EN ? 'Defeat the Sentient Furnace in the factory dungeons.' : '???', [12, 7]); Game.last.pool = 'dungeon'; - var achiev = new Game.Achievement('Now this is pod-smashing', EN ? 'Defeat the Ascended Baking Pod in the factory dungeons.' : '???', [12, 7]); Game.last.pool = 'dungeon'; - var achiev = new Game.Achievement('Chirped out', EN ? 'Find and defeat Chirpy, the dysfunctionning alarm bot.' : '???', [13, 7]); Game.last.pool = 'dungeon'; - var achiev = new Game.Achievement('Follow the white rabbit', EN ? 'Find and defeat the elusive sugar bunny.' : '???', [14, 7]); Game.last.pool = 'dungeon'; - - order = 1000; - new Game.Achievement('Clickasmic', loc("Make %1 from clicking.", loc("%1 cookie", LBeautify(1e11))), [11, 14]); - - order = 1100; - Game.TieredAchievement('Friend of the ancients', '', 'Grandma', 4); - Game.TieredAchievement('Ruler of the ancients', '', 'Grandma', 5); - - order = 32000; - new Game.Achievement('Wholesome', loc("Unlock 100% of your heavenly chips power."), [15, 7]); - - order = 33000; - new Game.Achievement('Just plain lucky', loc("You have 1 chance in %1 every second of earning this achievement.", Beautify(1000000)), [15, 6]); Game.last.pool = 'shadow'; - - order = 21000; - new Game.Achievement('Itchscratcher', loc("Burst 1 wrinkler."), [19, 8]); - new Game.Achievement('Wrinklesquisher', loc("Burst %1 wrinklers.", 50), [19, 8]); - new Game.Achievement('Moistburster', loc("Burst %1 wrinklers.", 200), [19, 8]); - - order = 22000; - new Game.Achievement('Spooky cookies', loc("Unlock every Halloween-themed cookie.
Owning this achievement makes Halloween-themed cookies drop more frequently in future playthroughs."), [12, 8]); - - order = 22100; - new Game.Achievement('Coming to town', loc("Reach Santa's 7th form."), [18, 9]); - new Game.Achievement('All hail Santa', loc("Reach Santa's final form."), [19, 10]); - new Game.Achievement('Let it snow', loc("Unlock every Christmas-themed cookie.
Owning this achievement makes Christmas-themed cookies drop more frequently in future playthroughs."), [19, 9]); - new Game.Achievement('Oh deer', loc("Pop 1 reindeer."), [12, 9]); - new Game.Achievement('Sleigh of hand', loc("Pop %1 reindeer.", 50), [12, 9]); - new Game.Achievement('Reindeer sleigher', loc("Pop %1 reindeer.", 200), [12, 9]); - - order = 1200; - Game.TieredAchievement('Perfected agriculture', '', 'Farm', 4); - order = 1400; - Game.TieredAchievement('Ultimate automation', '', 'Factory', 4); - order = 1300; - Game.TieredAchievement('Can you dig it', '', 'Mine', 4); - order = 1500; - Game.TieredAchievement('Type II civilization', '', 'Shipment', 4); - order = 1600; - Game.TieredAchievement('Gild wars', '', 'Alchemy lab', 4); - order = 1700; - Game.TieredAchievement('Brain-split', '', 'Portal', 4); - order = 1800; - Game.TieredAchievement('Time duke', '', 'Time machine', 4); - order = 1900; - Game.TieredAchievement('Molecular maestro', '', 'Antimatter condenser', 4); - - order = 2000; - Game.TieredAchievement('Lone photon', '', 'Prism', 1); - Game.TieredAchievement('Dazzling glimmer', '', 'Prism', 2); - Game.TieredAchievement('Blinding flash', '', 'Prism', 3); - Game.TieredAchievement('Unending glow', '', 'Prism', 4); - - order = 5000; - new Game.Achievement('Lord of Constructs', loc("Own %1.", loc("%1 building", LBeautify(2500))) + 'He saw the vast plains stretching ahead of him, and he said : let there be civilization.', [5, 6]); - order = 6000; - new Game.Achievement('Lord of Progress', loc("Purchase %1.", loc("%1 upgrade", LBeautify(200))) + 'One can always do better. But should you?', [9, 14]); - order = 7002; - new Game.Achievement('Bicentennial', loc("Have at least %1 of everything.", 200) + 'You crazy person.', [8, 6]); - - order = 22300; - new Game.Achievement('Lovely cookies', loc("Unlock every Valentine-themed cookie."), [20, 3]); - - order = 7001; - new Game.Achievement('Centennial and a half', loc("Have at least %1 of everything.", 150), [7, 6]); - - order = 11000; - new Game.Achievement('Tiny cookie', loc("Click the tiny cookie.") + 'These aren\'t the cookies you\'re clicking for.', [0, 5]); - - order = 400000; - new Game.Achievement('You win a cookie', loc("This is for baking %1 and making it on the local news.", loc("%1 cookie", LBeautify(1e14))) + 'We\'re all so proud of you.', [10, 0]); - - order = 1070; - Game.ProductionAchievement('Click delegator', 'Cursor', 1, 0, 7); - order = 1120; - Game.ProductionAchievement('Gushing grannies', 'Grandma', 1, 0, 6); - order = 1220; - Game.ProductionAchievement('I hate manure', 'Farm', 1); - order = 1320; - Game.ProductionAchievement('Never dig down', 'Mine', 1); - order = 1420; - Game.ProductionAchievement('The incredible machine', 'Factory', 1); - order = 1520; - Game.ProductionAchievement('And beyond', 'Shipment', 1); - order = 1620; - Game.ProductionAchievement('Magnum Opus', 'Alchemy lab', 1); - order = 1720; - Game.ProductionAchievement('With strange eons', 'Portal', 1); - order = 1820; - Game.ProductionAchievement('Spacetime jigamaroo', 'Time machine', 1); - order = 1920; - Game.ProductionAchievement('Supermassive', 'Antimatter condenser', 1); - order = 2020; - Game.ProductionAchievement('Praise the sun', 'Prism', 1); - - - order = 1000; - new Game.Achievement('Clickageddon', loc("Make %1 from clicking.", loc("%1 cookie", LBeautify(1e13))), [11, 15]); - new Game.Achievement('Clicknarok', loc("Make %1 from clicking.", loc("%1 cookie", LBeautify(1e15))), [11, 16]); - - order = 1050; - new Game.Achievement('Extreme polydactyly', loc("Have %1.", loc("%1 cursor", LBeautify(300))), [0, 13]); - new Game.Achievement('Dr. T', loc("Have %1.", loc("%1 cursor", LBeautify(400))), [0, 14]); - - order = 1100; Game.TieredAchievement('The old never bothered me anyway', '', 'Grandma', 6); - order = 1200; Game.TieredAchievement('Homegrown', '', 'Farm', 5); - order = 1400; Game.TieredAchievement('Technocracy', '', 'Factory', 5); - order = 1300; Game.TieredAchievement('The center of the Earth', '', 'Mine', 5); - order = 1500; Game.TieredAchievement('We come in peace', '', 'Shipment', 5); - order = 1600; Game.TieredAchievement('The secrets of the universe', '', 'Alchemy lab', 5); - order = 1700; Game.TieredAchievement('Realm of the Mad God', '', 'Portal', 5); - order = 1800; Game.TieredAchievement('Forever and ever', '', 'Time machine', 5); - order = 1900; Game.TieredAchievement('Walk the planck', '', 'Antimatter condenser', 5); - order = 2000; Game.TieredAchievement('Rise and shine', '', 'Prism', 5); - - order = 30200; - new Game.Achievement('God complex', loc("Name yourself Orteil.
Note: usurpers incur a -%1% CpS penalty until they rename themselves something else.
", 1) + 'But that\'s not you, is it?', [17, 5]); Game.last.pool = 'shadow'; - new Game.Achievement('Third-party', loc("Use an add-on.") + 'Some find vanilla to be the most boring flavor.', [16, 5]); Game.last.pool = 'shadow';//if you're making a mod, add a Game.Win('Third-party') somewhere in there! - - order = 30050; - new Game.Achievement('Dematerialize', loc("Ascend with %1 baked.", loc("%1 cookie", LBeautify(1e18))) + 'Presto!
...where\'d the cookies go?
', [11, 7]); - new Game.Achievement('Nil zero zilch', loc("Ascend with %1 baked.", loc("%1 cookie", LBeautify(1e21))) + 'To summarize : really not very much at all.', [11, 7]); - new Game.Achievement('Transcendence', loc("Ascend with %1 baked.", loc("%1 cookie", LBeautify(1e24))) + 'Your cookies are now on a higher plane of being.', [11, 8]); - new Game.Achievement('Obliterate', loc("Ascend with %1 baked.", loc("%1 cookie", LBeautify(1e27))) + 'Resistance is futile, albeit entertaining.', [11, 8]); - new Game.Achievement('Negative void', loc("Ascend with %1 baked.", loc("%1 cookie", LBeautify(1e30))) + 'You now have so few cookies that it\'s almost like you have a negative amount of them.', [11, 8]); - - order = 22400; - new Game.Achievement('The hunt is on', loc("Unlock 1 egg."), [1, 12]); - new Game.Achievement('Egging on', loc("Unlock %1 eggs.", 7), [4, 12]); - new Game.Achievement('Mass Easteria', loc("Unlock %1 eggs.", 14), [7, 12]); - new Game.Achievement('Hide & seek champion', loc("Unlock all the eggs.
Owning this achievement makes eggs drop more frequently in future playthroughs."), [13, 12]); - - order = 11000; - new Game.Achievement('What\'s in a name', loc("Give your bakery a name."), [15, 9]); - - - order = 1425; - Game.TieredAchievement('Pretty penny', '', 'Bank', 1); - Game.TieredAchievement('Fit the bill', '', 'Bank', 2); - Game.TieredAchievement('A loan in the dark', '', 'Bank', 3); - Game.TieredAchievement('Need for greed', '', 'Bank', 4); - Game.TieredAchievement('It\'s the economy, stupid', '', 'Bank', 5); - order = 1450; - Game.TieredAchievement('Your time to shrine', '', 'Temple', 1); - Game.TieredAchievement('Shady sect', '', 'Temple', 2); - Game.TieredAchievement('New-age cult', '', 'Temple', 3); - Game.TieredAchievement('Organized religion', '', 'Temple', 4); - Game.TieredAchievement('Fanaticism', '', 'Temple', 5); - order = 1475; - Game.TieredAchievement('Bewitched', '', 'Wizard tower', 1); - Game.TieredAchievement('The sorcerer\'s apprentice', '', 'Wizard tower', 2); - Game.TieredAchievement('Charms and enchantments', '', 'Wizard tower', 3); - Game.TieredAchievement('Curses and maledictions', '', 'Wizard tower', 4); - Game.TieredAchievement('Magic kingdom', '', 'Wizard tower', 5); - - order = 1445; - Game.ProductionAchievement('Vested interest', 'Bank', 1); - order = 1470; - Game.ProductionAchievement('New world order', 'Temple', 1); - order = 1495; - Game.ProductionAchievement('Hocus pocus', 'Wizard tower', 1); - - - - order = 1070; - Game.ProductionAchievement('Finger clickin\' good', 'Cursor', 2, 0, 7); - order = 1120; - Game.ProductionAchievement('Panic at the bingo', 'Grandma', 2, 0, 6); - order = 1220; - Game.ProductionAchievement('Rake in the dough', 'Farm', 2); - order = 1320; - Game.ProductionAchievement('Quarry on', 'Mine', 2); - order = 1420; - Game.ProductionAchievement('Yes I love technology', 'Factory', 2); - order = 1445; - Game.ProductionAchievement('Paid in full', 'Bank', 2); - order = 1470; - Game.ProductionAchievement('Church of Cookiology', 'Temple', 2); - order = 1495; - Game.ProductionAchievement('Too many rabbits, not enough hats', 'Wizard tower', 2); - order = 1520; - Game.ProductionAchievement('The most precious cargo', 'Shipment', 2); - order = 1620; - Game.ProductionAchievement('The Aureate', 'Alchemy lab', 2); - order = 1720; - Game.ProductionAchievement('Ever more hideous', 'Portal', 2); - order = 1820; - Game.ProductionAchievement('Be kind, rewind', 'Time machine', 2); - order = 1920; - Game.ProductionAchievement('Infinitesimal', 'Antimatter condenser', 2); - order = 2020; - Game.ProductionAchievement('A still more glorious dawn', 'Prism', 2); - - order = 30000; - new Game.Achievement('Rebirth', loc("Ascend at least once."), [21, 6]); - - order = 11000; - new Game.Achievement('Here you go', loc("Click this achievement's slot.") + 'All you had to do was ask.', [1, 7]); Game.last.clickFunction = function () { if (!Game.HasAchiev('Here you go')) { PlaySound('snd/tick.mp3'); Game.Win('Here you go'); } }; - - order = 30000; - new Game.Achievement('Resurrection', loc("Ascend %1 times.", 10), [21, 6]); - new Game.Achievement('Reincarnation', loc("Ascend %1 times.", 100), [21, 6]); - new Game.Achievement('Endless cycle', loc("Ascend %1 times.", 1000) + 'Oh hey, it\'s you again.', [2, 7]); Game.last.pool = 'shadow'; - - - - order = 1100; - Game.TieredAchievement('The agemaster', '', 'Grandma', 7); - Game.TieredAchievement('To oldly go', '', 'Grandma', 8); - - order = 1200; Game.TieredAchievement('Gardener extraordinaire', '', 'Farm', 6); - order = 1300; Game.TieredAchievement('Tectonic ambassador', '', 'Mine', 6); - order = 1400; Game.TieredAchievement('Rise of the machines', '', 'Factory', 6); - order = 1425; Game.TieredAchievement('Acquire currency', '', 'Bank', 6); - order = 1450; Game.TieredAchievement('Zealotry', '', 'Temple', 6); - order = 1475; Game.TieredAchievement('The wizarding world', '', 'Wizard tower', 6); - order = 1500; Game.TieredAchievement('Parsec-masher', '', 'Shipment', 6); - order = 1600; Game.TieredAchievement('The work of a lifetime', '', 'Alchemy lab', 6); - order = 1700; Game.TieredAchievement('A place lost in time', '', 'Portal', 6); - order = 1800; Game.TieredAchievement('Heat death', '', 'Time machine', 6); - order = 1900; Game.TieredAchievement('Microcosm', '', 'Antimatter condenser', 6); - order = 2000; Game.TieredAchievement('Bright future', '', 'Prism', 6); - - order = 25000; - new Game.Achievement('Here be dragon', loc("Complete your dragon's training."), [21, 12]); - - Game.BankAchievement('How?'); - Game.BankAchievement('The land of milk and cookies'); - Game.BankAchievement('He who controls the cookies controls the universe', 'The milk must flow!'); - Game.BankAchievement('Tonight on Hoarders'); - Game.BankAchievement('Are you gonna eat all that?'); - Game.BankAchievement('We\'re gonna need a bigger bakery'); - Game.BankAchievement('In the mouth of madness', 'A cookie is just what we tell each other it is.'); - Game.BankAchievement('Brought to you by the letter
'); - - - Game.CpsAchievement('A world filled with cookies'); - Game.CpsAchievement('When this baby hits ' + Beautify(10000000000000 * 60 * 60) + ' cookies per hour'); - Game.CpsAchievement('Fast and delicious'); - Game.CpsAchievement('Cookiehertz : a really, really tasty hertz', 'Tastier than a hertz donut, anyway.'); - Game.CpsAchievement('Woops, you solved world hunger'); - Game.CpsAchievement('Turbopuns', 'Mother Nature will be like "slowwwww dowwwwwn".'); - Game.CpsAchievement('Faster menner'); - Game.CpsAchievement('And yet you\'re still hungry'); - Game.CpsAchievement('The Abakening'); - Game.CpsAchievement('There\'s really no hard limit to how long these achievement names can be and to be quite honest I\'m rather curious to see how far we can go.
Adolphus W. Green (1844–1917) started as the Principal of the Groton School in 1864. By 1865, he became second assistant librarian at the New York Mercantile Library; from 1867 to 1869, he was promoted to full librarian. From 1869 to 1873, he worked for Evarts, Southmayd & Choate, a law firm co-founded by William M. Evarts, Charles Ferdinand Southmayd and Joseph Hodges Choate. He was admitted to the New York State Bar Association in 1873.
Anyway, how\'s your day been?');//Game.last.shortName='There\'s really no hard limit to how long these achievement names can be and to be quite honest I\'m [...]'; - Game.CpsAchievement('Fast', 'Wow!'); - - order = 7002; - new Game.Achievement('Bicentennial and a half', loc("Have at least %1 of everything.", 250) + 'Keep on truckin\'.', [9, 6]); - - order = 11000; - new Game.Achievement('Tabloid addiction', loc("Click on the news ticker %1 times.", 50) + 'Page 6: Mad individual clicks on picture of pastry in a futile attempt to escape boredom!
Also page 6: British parliament ate my baby!
', [27, 7]); - - order = 1000; - new Game.Achievement('Clickastrophe', loc("Make %1 from clicking.", loc("%1 cookie", LBeautify(1e17))), [11, 17]); - new Game.Achievement('Clickataclysm', loc("Make %1 from clicking.", loc("%1 cookie", LBeautify(1e19))), [11, 18]); - - order = 1050; - new Game.Achievement('Thumbs, phalanges, metacarpals', loc("Have %1.", loc("%1 cursor", LBeautify(500))) + '& KNUCKLES', [0, 15]); - - order = 6002; - new Game.Achievement('Polymath', loc("Own %1 upgrades and %2 buildings.", [300, 4000]) + 'Excellence doesn\'t happen overnight - it usually takes a good couple days.', [29, 7]); - - order = 1099; - new Game.Achievement('The elder scrolls', loc("Own a combined %1 %2 and %3.", [777, loc("grandmas"), loc("cursors")]) + 'Let me guess. Someone stole your cookie.', [10, 9]); - - order = 30050; - new Game.Achievement('To crumbs, you say?', loc("Ascend with %1 baked.", loc("%1 cookie", LBeautify(1e33))) + 'Very well then.', [29, 6]); - - order = 1200; Game.TieredAchievement('Seedy business', '', 'Farm', 7); - order = 1300; Game.TieredAchievement('Freak fracking', '', 'Mine', 7); - order = 1400; Game.TieredAchievement('Modern times', '', 'Factory', 7); - order = 1425; Game.TieredAchievement('The nerve of war', '', 'Bank', 7); - order = 1450; Game.TieredAchievement('Wololo', '', 'Temple', 7); - order = 1475; Game.TieredAchievement('And now for my next trick, I\'ll need a volunteer from the audience', '', 'Wizard tower', 7); - order = 1500; Game.TieredAchievement('It\'s not delivery', '', 'Shipment', 7); - order = 1600; Game.TieredAchievement('Gold, Jerry! Gold!', '', 'Alchemy lab', 7); - order = 1700; Game.TieredAchievement('Forbidden zone', '', 'Portal', 7); - order = 1800; Game.TieredAchievement('cookie clicker forever and forever a hundred years cookie clicker, all day long forever, forever a hundred times, over and over cookie clicker adventures dot com', '', 'Time machine', 7); - order = 1900; Game.TieredAchievement('Scientists baffled everywhere', '', 'Antimatter condenser', 7); - order = 2000; Game.TieredAchievement('Harmony of the spheres', '', 'Prism', 7); - - order = 35000; - new Game.Achievement('Last Chance to See', loc("Burst the near-extinct shiny wrinkler.") + 'You monster!', [24, 12]); Game.last.pool = 'shadow'; - - order = 10000; - new Game.Achievement('Early bird', loc("Click a golden cookie less than 1 second after it spawns."), [10, 14]); - new Game.Achievement('Fading luck', loc("Click a golden cookie less than 1 second before it dies."), [10, 14]); - - order = 22100; - new Game.Achievement('Eldeer', loc("Pop a reindeer during an elder frenzy."), [12, 9]); - - order = 21100; - new Game.Achievement('Dude, sweet', loc("Harvest %1 coalescing sugar lumps.", 7), [24, 14]); - new Game.Achievement('Sugar rush', loc("Harvest %1 coalescing sugar lumps.", 30), [26, 14]); - new Game.Achievement('Year\'s worth of cavities', loc("Harvest %1 coalescing sugar lumps.", 365) + 'My lumps my lumps my lumps.', [29, 14]); - new Game.Achievement('Hand-picked', loc("Successfully harvest a coalescing sugar lump before it's ripe."), [28, 14]); - new Game.Achievement('Sugar sugar', loc("Harvest a bifurcated sugar lump."), [29, 15]); - new Game.Achievement('All-natural cane sugar', loc("Harvest a golden sugar lump."), [29, 16]); Game.last.pool = 'shadow'; - new Game.Achievement('Sweetmeats', loc("Harvest a meaty sugar lump."), [29, 17]); - - order = 7002; - new Game.Achievement('Tricentennial', loc("Have at least %1 of everything.", 300) + 'Can\'t stop, won\'t stop. Probably should stop, though.', [29, 12]); - - Game.CpsAchievement('Knead for speed', 'How did we not make that one yet?'); - Game.CpsAchievement('Well the cookies start coming and they don\'t stop coming', 'Didn\'t make sense not to click for fun.'); - Game.CpsAchievement('I don\'t know if you\'ve noticed but all these icons are very slightly off-center'); - Game.CpsAchievement('The proof of the cookie is in the baking', 'How can you have any cookies if you don\'t bake your dough?'); - Game.CpsAchievement('If it\'s worth doing, it\'s worth overdoing'); - - Game.BankAchievement('The dreams in which I\'m baking are the best I\'ve ever had'); - Game.BankAchievement('Set for life'); - - order = 1200; Game.TieredAchievement('You and the beanstalk', '', 'Farm', 8); - order = 1300; Game.TieredAchievement('Romancing the stone', '', 'Mine', 8); - order = 1400; Game.TieredAchievement('Ex machina', '', 'Factory', 8); - order = 1425; Game.TieredAchievement('And I need it now', '', 'Bank', 8); - order = 1450; Game.TieredAchievement('Pray on the weak', '', 'Temple', 8); - order = 1475; Game.TieredAchievement('It\'s a kind of magic', '', 'Wizard tower', 8); - order = 1500; Game.TieredAchievement('Make it so', '', 'Shipment', 8); - order = 1600; Game.TieredAchievement('All that glitters is gold', '', 'Alchemy lab', 8); - order = 1700; Game.TieredAchievement('H̸̷͓̳̳̯̟͕̟͍͍̣͡ḛ̢̦̰̺̮̝͖͖̘̪͉͘͡ ̠̦͕̤̪̝̥̰̠̫̖̣͙̬͘ͅC̨̦̺̩̲̥͉̭͚̜̻̝̣̼͙̮̯̪o̴̡͇̘͎̞̲͇̦̲͞͡m̸̩̺̝̣̹̱͚̬̥̫̳̼̞̘̯͘ͅẹ͇̺̜́̕͢s̶̙̟̱̥̮̯̰̦͓͇͖͖̝͘͘͞', '', 'Portal', 8); - order = 1800; Game.TieredAchievement('Way back then', '', 'Time machine', 8); - order = 1900; Game.TieredAchievement('Exotic matter', '', 'Antimatter condenser', 8); - order = 2000; Game.TieredAchievement('At the end of the tunnel', '', 'Prism', 8); - - - - order = 1070; - Game.ProductionAchievement('Click (starring Adam Sandler)', 'Cursor', 3, 0, 7); - order = 1120; - Game.ProductionAchievement('Frantiquities', 'Grandma', 3, 0, 6); - order = 1220; - Game.ProductionAchievement('Overgrowth', 'Farm', 3); - order = 1320; - Game.ProductionAchievement('Sedimentalism', 'Mine', 3); - order = 1420; - Game.ProductionAchievement('Labor of love', 'Factory', 3); - order = 1445; - Game.ProductionAchievement('Reverse funnel system', 'Bank', 3); - order = 1470; - Game.ProductionAchievement('Thus spoke you', 'Temple', 3); - order = 1495; - Game.ProductionAchievement('Manafest destiny', 'Wizard tower', 3); - order = 1520; - Game.ProductionAchievement('Neither snow nor rain nor heat nor gloom of night', 'Shipment', 3); - order = 1620; - Game.ProductionAchievement('I\'ve got the Midas touch', 'Alchemy lab', 3); - order = 1720; - Game.ProductionAchievement('Which eternal lie', 'Portal', 3); - order = 1820; - Game.ProductionAchievement('Déjà vu', 'Time machine', 3); - order = 1920; - Game.ProductionAchievement('Powers of Ten', 'Antimatter condenser', 3); - order = 2020; - Game.ProductionAchievement('Now the dark days are gone', 'Prism', 3); - - order = 1070; - new Game.Achievement('Freaky jazz hands', '', [0, 26]); Game.Objects['Cursor'].levelAchiev10 = Game.last; - order = 1120; - new Game.Achievement('Methuselah', '', [1, 26]); Game.Objects['Grandma'].levelAchiev10 = Game.last; - order = 1220; - new Game.Achievement('Huge tracts of land', '', [2, 26]); Game.Objects['Farm'].levelAchiev10 = Game.last; - order = 1320; - new Game.Achievement('D-d-d-d-deeper', '', [3, 26]); Game.Objects['Mine'].levelAchiev10 = Game.last; - order = 1420; - new Game.Achievement('Patently genius', '', [4, 26]); Game.Objects['Factory'].levelAchiev10 = Game.last; - order = 1445; - new Game.Achievement('A capital idea', '', [15, 26]); Game.Objects['Bank'].levelAchiev10 = Game.last; - order = 1470; - new Game.Achievement('It belongs in a bakery', '', [16, 26]); Game.Objects['Temple'].levelAchiev10 = Game.last; - order = 1495; - new Game.Achievement('Motormouth', '', [17, 26]); Game.Objects['Wizard tower'].levelAchiev10 = Game.last; - order = 1520; - new Game.Achievement('Been there done that', '', [5, 26]); Game.Objects['Shipment'].levelAchiev10 = Game.last; - order = 1620; - new Game.Achievement('Phlogisticated substances', '', [6, 26]); Game.Objects['Alchemy lab'].levelAchiev10 = Game.last; - order = 1720; - new Game.Achievement('Bizarro world', '', [7, 26]); Game.Objects['Portal'].levelAchiev10 = Game.last; - order = 1820; - new Game.Achievement('The long now', '', [8, 26]); Game.Objects['Time machine'].levelAchiev10 = Game.last; - order = 1920; - new Game.Achievement('Chubby hadrons', '', [13, 26]); Game.Objects['Antimatter condenser'].levelAchiev10 = Game.last; - order = 2020; - new Game.Achievement('Palettable', '', [14, 26]); Game.Objects['Prism'].levelAchiev10 = Game.last; - - order = 61470; - order = 61495; - new Game.Achievement('Bibbidi-bobbidi-boo', loc("Cast %1 spells.", 9), [21, 11]); - new Game.Achievement('I\'m the wiz', loc("Cast %1 spells.", 99), [22, 11]); - new Game.Achievement('A wizard is you', loc("Cast %1 spells.", 999) + 'I\'m a what?', [29, 11]); - - order = 10000; - new Game.Achievement('Four-leaf cookie', loc("Have %1 golden cookies simultaneously.", 4) + 'Fairly rare, considering cookies don\'t even have leaves.', [27, 6]); Game.last.pool = 'shadow'; - - order = 2100; - Game.TieredAchievement('Lucked out', '', 'Chancemaker', 1); - Game.TieredAchievement('What are the odds', '', 'Chancemaker', 2); - Game.TieredAchievement('Grandma needs a new pair of shoes', '', 'Chancemaker', 3); - Game.TieredAchievement('Million to one shot, doc', '', 'Chancemaker', 4); - Game.TieredAchievement('As luck would have it', '', 'Chancemaker', 5); - Game.TieredAchievement('Ever in your favor', '', 'Chancemaker', 6); - Game.TieredAchievement('Be a lady', '', 'Chancemaker', 7); - Game.TieredAchievement('Dicey business', '', 'Chancemaker', 8); - - order = 2120; - Game.ProductionAchievement('Fingers crossed', 'Chancemaker', 1); - Game.ProductionAchievement('Just a statistic', 'Chancemaker', 2); - Game.ProductionAchievement('Murphy\'s wild guess', 'Chancemaker', 3); - - new Game.Achievement('Let\'s leaf it at that', '', [19, 26]); Game.Objects['Chancemaker'].levelAchiev10 = Game.last; - - order = 1000; - new Game.Achievement('The ultimate clickdown', loc("Make %1 from clicking.", loc("%1 cookie", LBeautify(1e21))) + '(of ultimate destiny.)', [11, 19]); - - - order = 1100; - Game.TieredAchievement('Aged well', '', 'Grandma', 9); - Game.TieredAchievement('101st birthday', '', 'Grandma', 10); - Game.TieredAchievement('But wait \'til you get older', '', 'Grandma', 11); - order = 1200; Game.TieredAchievement('Harvest moon', '', 'Farm', 9); - order = 1300; Game.TieredAchievement('Mine?', '', 'Mine', 9); - order = 1400; Game.TieredAchievement('In full gear', '', 'Factory', 9); - order = 1425; Game.TieredAchievement('Treacle tart economics', '', 'Bank', 9); - order = 1450; Game.TieredAchievement('Holy cookies, grandma!', '', 'Temple', 9); - order = 1475; Game.TieredAchievement('The Prestige', '(Unrelated to the Cookie Clicker feature of the same name.)', 'Wizard tower', 9); - order = 1500; Game.TieredAchievement('That\'s just peanuts to space', '', 'Shipment', 9); - order = 1600; Game.TieredAchievement('Worth its weight in lead', '', 'Alchemy lab', 9); - order = 1700; Game.TieredAchievement('What happens in the vortex stays in the vortex', '', 'Portal', 9); - order = 1800; Game.TieredAchievement('Invited to yesterday\'s party', '', 'Time machine', 9); - order = 1900; Game.TieredAchievement('Downsizing', '', 'Antimatter condenser', 9);//the trailer got me really hyped up but i've read some pretty bad reviews. is it watchable ? is it worth seeing ? i don't mind matt damon - order = 2000; Game.TieredAchievement('My eyes', '', 'Prism', 9); - order = 2100; Game.TieredAchievement('Maybe a chance in hell, actually', '', 'Chancemaker', 9); - - order = 1200; Game.TieredAchievement('Make like a tree', '', 'Farm', 10); - order = 1300; Game.TieredAchievement('Cave story', '', 'Mine', 10); - order = 1400; Game.TieredAchievement('In-cog-neato', '', 'Factory', 10); - order = 1425; Game.TieredAchievement('Save your breath because that\'s all you\'ve got left', '', 'Bank', 10); - order = 1450; Game.TieredAchievement('Vengeful and almighty', '', 'Temple', 10); - order = 1475; Game.TieredAchievement('Spell it out for you', '', 'Wizard tower', 10); - order = 1500; Game.TieredAchievement('Space space space space space', 'It\'s too far away...', 'Shipment', 10); - order = 1600; Game.TieredAchievement('Don\'t get used to yourself, you\'re gonna have to change', '', 'Alchemy lab', 10); - order = 1700; Game.TieredAchievement('Objects in the mirror dimension are closer than they appear', '', 'Portal', 10); - order = 1800; Game.TieredAchievement('Groundhog day', '', 'Time machine', 10); - order = 1900; Game.TieredAchievement('A matter of perspective', '', 'Antimatter condenser', 10); - order = 2000; Game.TieredAchievement('Optical illusion', '', 'Prism', 10); - order = 2100; Game.TieredAchievement('Jackpot', '', 'Chancemaker', 10); - - order = 36000; - new Game.Achievement('So much to do so much to see', loc("Manage a cookie legacy for at least a year.") + 'Thank you so much for playing Cookie Clicker!', [23, 11]); Game.last.pool = 'shadow'; - - - - Game.CpsAchievement('Running with scissors'); - Game.CpsAchievement('Rarefied air'); - Game.CpsAchievement('Push it to the limit'); - Game.CpsAchievement('Green cookies sleep furiously'); - - Game.BankAchievement('Panic! at Nabisco'); - Game.BankAchievement('Bursting at the seams'); - Game.BankAchievement('Just about full'); - Game.BankAchievement('Hungry for more'); - - order = 1000; - new Game.Achievement('All the other kids with the pumped up clicks', loc("Make %1 from clicking.", loc("%1 cookie", LBeautify(1e23))), [11, 28]); - new Game.Achievement('One...more...click...', loc("Make %1 from clicking.", loc("%1 cookie", LBeautify(1e25))), [11, 30]); - - order = 61515; - new Game.Achievement('Botany enthusiast', loc("Harvest %1 mature garden plants.", 100), [26, 20]); - new Game.Achievement('Green, aching thumb', loc("Harvest %1 mature garden plants.", 1000), [27, 20]); - new Game.Achievement('In the garden of Eden (baby)', loc("Fill every tile of the biggest garden plot with plants.") + 'Isn\'t tending to those precious little plants just so rock and/or roll?', [28, 20]); - - new Game.Achievement('Keeper of the conservatory', loc("Unlock every garden seed."), [25, 20]); - new Game.Achievement('Seedless to nay', loc("Convert a complete seed log into sugar lumps by sacrificing your garden to the sugar hornets.
Owning this achievement makes seeds %1% cheaper, plants mature %2% sooner, and plant upgrades drop %3% more.", [5, 5, 5]), [29, 20]); - - order = 30050; - new Game.Achievement('You get nothing', loc("Ascend with %1 baked.", loc("%1 cookie", LBeautify(1e36))) + 'Good day sir!', [29, 6]); - new Game.Achievement('Humble rebeginnings', loc("Ascend with %1 baked.", loc("%1 cookie", LBeautify(1e39))) + 'Started from the bottom, now we\'re here.', [29, 6]); - new Game.Achievement('The end of the world', loc("Ascend with %1 baked.", loc("%1 cookie", LBeautify(1e42))) + '(as we know it)', [21, 25]); - new Game.Achievement('Oh, you\'re back', loc("Ascend with %1 baked.", loc("%1 cookie", LBeautify(1e45))) + 'Missed us?', [21, 25]); - new Game.Achievement('Lazarus', loc("Ascend with %1 baked.", loc("%1 cookie", LBeautify(1e48))) + 'All rise.', [21, 25]); - - Game.CpsAchievement('Leisurely pace'); - Game.CpsAchievement('Hypersonic'); - - Game.BankAchievement('Feed me, Orteil'); - Game.BankAchievement('And then what?'); - - order = 7002; - new Game.Achievement('Tricentennial and a half', loc("Have at least %1 of everything.", 350) + '(it\'s free real estate)', [21, 26]); - new Game.Achievement('Quadricentennial', loc("Have at least %1 of everything.", 400) + 'You\'ve had to do horrible things to get this far.
Horrible... horrible things.
', [22, 26]); - new Game.Achievement('Quadricentennial and a half', loc("Have at least %1 of everything.", 450) + 'At this point, you might just be compensating for something.', [23, 26]); - - new Game.Achievement('Quincentennial', loc("Have at least %1 of everything.", 500) + 'Some people would say you\'re halfway there.
We do not care for those people and their reckless sense of unchecked optimism.
', [29, 25]); - - order = 21100; - new Game.Achievement('Maillard reaction', loc("Harvest a caramelized sugar lump."), [29, 27]); - - order = 30250; - new Game.Achievement('When the cookies ascend just right', loc("Ascend with exactly %1.", loc("%1 cookie", LBeautify(1e12))), [25, 7]); Game.last.pool = 'shadow';//this achievement is shadow because it is only achievable through blind luck or reading external guides; this may change in the future - - - order = 1050; - new Game.Achievement('With her finger and her thumb', loc("Have %1.", loc("%1 cursor", LBeautify(600))), [0, 16]); - - order = 1100; Game.TieredAchievement('Defense of the ancients', '', 'Grandma', 12); - order = 1200; Game.TieredAchievement('Sharpest tool in the shed', '', 'Farm', 11); - order = 1300; Game.TieredAchievement('Hey now, you\'re a rock', '', 'Mine', 11); - order = 1400; Game.TieredAchievement('Break the mold', '', 'Factory', 11); - order = 1425; Game.TieredAchievement('Get the show on, get paid', '', 'Bank', 11); - order = 1450; Game.TieredAchievement('My world\'s on fire, how about yours', '', 'Temple', 11); - order = 1475; Game.TieredAchievement('The meteor men beg to differ', '', 'Wizard tower', 11); - order = 1500; Game.TieredAchievement('Only shooting stars', '', 'Shipment', 11); - order = 1600; Game.TieredAchievement('We could all use a little change', '', 'Alchemy lab', 11);//"all that glitters is gold" was already an achievement - order = 1700; Game.TieredAchievement('Your brain gets smart but your head gets dumb', '', 'Portal', 11); - order = 1800; Game.TieredAchievement('The years start coming', '', 'Time machine', 11); - order = 1900; Game.TieredAchievement('What a concept', '', 'Antimatter condenser', 11); - order = 2000; Game.TieredAchievement('You\'ll never shine if you don\'t glow', '', 'Prism', 11); - order = 2100; Game.TieredAchievement('You\'ll never know if you don\'t go', '', 'Chancemaker', 11); - - order = 2200; - Game.TieredAchievement('Self-contained', '', 'Fractal engine', 1); - Game.TieredAchievement('Threw you for a loop', '', 'Fractal engine', 2); - Game.TieredAchievement('The sum of its parts', '', 'Fractal engine', 3); - Game.TieredAchievement('Bears repeating', 'Where did these come from?', 'Fractal engine', 4); - Game.TieredAchievement('More of the same', '', 'Fractal engine', 5); - Game.TieredAchievement('Last recurse', '', 'Fractal engine', 6); - Game.TieredAchievement('Out of one, many', '', 'Fractal engine', 7); - Game.TieredAchievement('An example of recursion', '', 'Fractal engine', 8); - Game.TieredAchievement('For more information on this achievement, please refer to its title', '', 'Fractal engine', 9); - Game.TieredAchievement('I\'m so meta, even this achievement', '', 'Fractal engine', 10); - Game.TieredAchievement('Never get bored', '', 'Fractal engine', 11); - - order = 2220; - Game.ProductionAchievement('The needs of the many', 'Fractal engine', 1); - Game.ProductionAchievement('Eating its own', 'Fractal engine', 2); - Game.ProductionAchievement('We must go deeper', 'Fractal engine', 3); - - new Game.Achievement('Sierpinski rhomboids', '', [20, 26]); Game.Objects['Fractal engine'].levelAchiev10 = Game.last; - - Game.CpsAchievement('Gotta go fast'); - Game.BankAchievement('I think it\'s safe to say you\'ve got it made'); - - order = 6002; - new Game.Achievement('Renaissance baker', loc("Own %1 upgrades and %2 buildings.", [400, 8000]) + 'If you have seen further, it is by standing on the shoulders of giants - a mysterious species of towering humanoids until now thought long-extinct.', [10, 10]); - - order = 1098; - new Game.Achievement('Veteran', loc("Own at least %1 grandma types.", 14) + '14\'s a crowd!', [10, 9]); - - order = 10000; - new Game.Achievement('Thick-skinned', loc("Have your reinforced membrane protect the shimmering veil."), [7, 10]); - - - order = 2300; - Game.TieredAchievement('F12', '', 'Javascript console', 1); - Game.TieredAchievement('Variable success', '', 'Javascript console', 2); - Game.TieredAchievement('No comments', '', 'Javascript console', 3); - Game.TieredAchievement('Up to code', '', 'Javascript console', 4); - Game.TieredAchievement('Works on my machine', '', 'Javascript console', 5); - Game.TieredAchievement('Technical debt', '', 'Javascript console', 6); - Game.TieredAchievement('Mind your language', '', 'Javascript console', 7); - Game.TieredAchievement('Inconsolable', '', 'Javascript console', 8); - Game.TieredAchievement('Closure', '', 'Javascript console', 9); - Game.TieredAchievement('Dude what if we\'re all living in a simulation like what if we\'re all just code on a computer somewhere', '', 'Javascript console', 10); - Game.TieredAchievement('Taking the back streets', '', 'Javascript console', 11); - - order = 2320; - Game.ProductionAchievement('Inherited prototype', 'Javascript console', 1); - Game.ProductionAchievement('A model of document object', 'Javascript console', 2); - Game.ProductionAchievement('First-class citizen', 'Javascript console', 3); - - new Game.Achievement('Alexandria', '', [32, 26]); Game.Objects['Javascript console'].levelAchiev10 = Game.last; - - Game.CpsAchievement('Bake him away, toys'); - Game.CpsAchievement('You\'re #1 so why try harder'); - Game.CpsAchievement('Haven\'t even begun to peak'); - Game.BankAchievement('A sometimes food'); - Game.BankAchievement('Not enough of a good thing'); - Game.BankAchievement('Horn of plenty'); - - order = 30050; - new Game.Achievement('Smurf account', loc("Ascend with %1 baked.", loc("%1 cookie", LBeautify(1e51))) + 'It\'s like you just appeared out of the blue!', [21, 32]); - new Game.Achievement('If at first you don\'t succeed', loc("Ascend with %1 baked.", loc("%1 cookie", LBeautify(1e54))) + 'If at first you don\'t succeed, try, try, try again.
But isn\'t that the definition of insanity?
', [21, 32]); - - order = 33000; - new Game.Achievement('O Fortuna', loc("Own every fortune upgrade.
Owning this achievement makes fortunes appear twice as often; unlocked fortune upgrades also have a %1% chance to carry over after ascending.", 40), [29, 8]); - - order = 61615; - new Game.Achievement('Initial public offering', loc("Make your first stock market profit."), [0, 33]); - new Game.Achievement('Rookie numbers', loc("Own at least %1 of every stock market good.", 100) + 'Gotta pump those numbers up!', [9, 33]); - new Game.Achievement('No nobility in poverty', loc("Own at least %1 of every stock market good.", 500) + 'What kind of twisted individual is out there cramming camels through needle holes anyway?', [10, 33]); - new Game.Achievement('Full warehouses', loc("Own at least %1 of a stock market good.", 1000), [11, 33]); - new Game.Achievement('Make my day', loc("Make a day of CpS ($%1) in 1 stock market sale.", 86400), [1, 33]); - new Game.Achievement('Buy buy buy', loc("Spend a day of CpS ($%1) in 1 stock market purchase.", 86400), [1, 33]); - new Game.Achievement('Gaseous assets', loc("Have your stock market profits surpass a whole year of CpS ($%1).", 31536000) + 'Boy, how volatile!', [18, 33]); Game.last.pool = 'shadow'; - new Game.Achievement('Pyramid scheme', loc("Unlock the highest-tier stock market headquarters."), [18, 33]); - - order = 10000; - new Game.Achievement('Jellicles', loc("Own %1 kitten upgrades.", 10) + 'Jellicles can and jellicles do! Make sure to wash your jellicles every day!', [18, 19]); - - order = 7002; - new Game.Achievement('Quincentennial and a half', loc("Have at least %1 of everything.", 550) + 'This won\'t fill the churning void inside, you know.', [29, 26]); - - Game.CpsAchievement('What did we even eat before these'); - Game.CpsAchievement('Heavy flow'); - Game.CpsAchievement('More you say?'); - Game.BankAchievement('Large and in charge'); - Game.BankAchievement('Absolutely stuffed'); - Game.BankAchievement('It\'s only wafer-thin', 'Just the one!'); - - order = 1000; new Game.Achievement('Clickety split', loc("Make %1 from clicking.", loc("%1 cookie", LBeautify(1e27))), [11, 31]); - order = 1050; new Game.Achievement('Gotta hand it to you', loc("Have %1.", loc("%1 cursor", LBeautify(700))), [0, 17]); - order = 1100; Game.TieredAchievement('Okay boomer', '', 'Grandma', 13); - order = 1200; Game.TieredAchievement('Overripe', '', 'Farm', 12); - order = 1300; Game.TieredAchievement('Rock on', '', 'Mine', 12); - order = 1400; Game.TieredAchievement('Self-manmade man', '', 'Factory', 12); - order = 1425; Game.TieredAchievement('Checks out', '', 'Bank', 12); - order = 1450; Game.TieredAchievement('Living on a prayer', '', 'Temple', 12); - order = 1475; Game.TieredAchievement('Higitus figitus migitus mum', '', 'Wizard tower', 12); - order = 1500; Game.TieredAchievement('The incredible journey', '', 'Shipment', 12); - order = 1600; Game.TieredAchievement('Just a phase', '', 'Alchemy lab', 12); - order = 1700; Game.TieredAchievement('Don\'t let me leave, Murph', '', 'Portal', 12); - order = 1800; Game.TieredAchievement('Caveman to cosmos', '', 'Time machine', 12); - order = 1900; Game.TieredAchievement('Particular tastes', '', 'Antimatter condenser', 12); - order = 2000; Game.TieredAchievement('A light snack', '', 'Prism', 12); - order = 2100; Game.TieredAchievement('Tempting fate', '', 'Chancemaker', 12); - order = 2200; Game.TieredAchievement('Tautological', '', 'Fractal engine', 12); - order = 2300; Game.TieredAchievement('Curly braces', 'Or as the French call them, mustache boxes.
Go well with quotes.
', 'Javascript console', 12); - - order = 10000; - new Game.Achievement('Seven horseshoes', loc("Click %1.", loc("%1 golden cookie", LBeautify(27777))) + 'Enough for one of those funky horses that graze near your factories.', [21, 33]); Game.last.pool = 'shadow'; - - order = 11005; - new Game.Achievement('Olden days', loc("Find the forgotten madeleine.") + 'DashNet Farms remembers.', [12, 3]); - - - order = 1050; new Game.Achievement('The devil\'s workshop', loc("Have %1.", loc("%1 cursor", LBeautify(800))), [0, 18]); - order = 1200; Game.TieredAchievement('In the green', '', 'Farm', 13); - order = 1300; Game.TieredAchievement('Mountain out of a molehill, but like in a good way', '', 'Mine', 13); - order = 1400; Game.TieredAchievement('The wheels of progress', '', 'Factory', 13); - order = 1425; Game.TieredAchievement('That\'s rich', '', 'Bank', 13); - order = 1450; Game.TieredAchievement('Preaches and cream', '', 'Temple', 13); - order = 1475; Game.TieredAchievement('Magic thinking', '', 'Wizard tower', 13); - order = 1500; Game.TieredAchievement('Is there life on Mars?', 'Yes, there is. You\'re currently using it as filling in experimental flavor prototype #810657.', 'Shipment', 13); - order = 1600; Game.TieredAchievement('Bad chemistry', '', 'Alchemy lab', 13); - order = 1700; Game.TieredAchievement('Reduced to gibbering heaps', '', 'Portal', 13); - order = 1800; Game.TieredAchievement('Back already?', '', 'Time machine', 13); - order = 1900; Game.TieredAchievement('Nuclear throne', '', 'Antimatter condenser', 13); - order = 2000; Game.TieredAchievement('Making light of the situation', '', 'Prism', 13); - order = 2100; Game.TieredAchievement('Flip a cookie. Chips, I win. Crust, you lose.', '', 'Chancemaker', 13); - order = 2200; Game.TieredAchievement('In and of itself', '', 'Fractal engine', 13); - order = 2300; Game.TieredAchievement('Duck typing', 'Hello, this is a duck typing. Got any grapes?', 'Javascript console', 13); - - order = 2400; - Game.TieredAchievement('They\'ll never know what hit \'em', '', 'Idleverse', 1); - Game.TieredAchievement('Well-versed', '', 'Idleverse', 2); - Game.TieredAchievement('Ripe for the picking', '', 'Idleverse', 3); - Game.TieredAchievement('Unreal', '', 'Idleverse', 4); - Game.TieredAchievement('Once you\'ve seen one', '', 'Idleverse', 5); - Game.TieredAchievement('Spoils and plunder', '', 'Idleverse', 6); - Game.TieredAchievement('Nobody exists on purpose, nobody belongs anywhere', 'Come watch TV?', 'Idleverse', 7); - Game.TieredAchievement('Hyperspace expressway', '', 'Idleverse', 8); - Game.TieredAchievement('Versatile', '', 'Idleverse', 9); - Game.TieredAchievement('You are inevitable', '', 'Idleverse', 10); - Game.TieredAchievement('Away from this place', '', 'Idleverse', 11); - Game.TieredAchievement('Everywhere at once', '', 'Idleverse', 12); - Game.TieredAchievement('Reject reality, substitute your own', '', 'Idleverse', 13); - - order = 2420; - Game.ProductionAchievement('Fringe', 'Idleverse', 1); - Game.ProductionAchievement('Coherence', 'Idleverse', 2); - Game.ProductionAchievement('Earth-616', 'Idleverse', 3); - - new Game.Achievement('Strange topologies', '', [33, 26]); Game.Objects['Idleverse'].levelAchiev10 = Game.last; - - order = 5000; - new Game.Achievement('Grand design', loc("Own %1.", loc("%1 building", LBeautify(5000))) + 'They\'ll remember you forever!', [32, 12]); - new Game.Achievement('Ecumenopolis', loc("Own %1.", loc("%1 building", LBeautify(7500))) + 'Getting a wee bit cramped.', [33, 12]); - - order = 6000; - new Game.Achievement('The full picture', loc("Purchase %1.", loc("%1 upgrade", LBeautify(300))) + 'So that\'s where that fits in!', [32, 11]); - new Game.Achievement('When there\'s nothing left to add', loc("Purchase %1.", loc("%1 upgrade", LBeautify(400))) + '...keep going.', [33, 11]); - - order = 7002; - new Game.Achievement('Sexcentennial', loc("Have at least %1 of everything.", 600) + 'Hey, nice milestone!', [31, 33]); - - Game.CpsAchievement('Keep going until I say stop'); - Game.CpsAchievement('But I didn\'t say stop, did I?'); - Game.CpsAchievement('With unrivaled fervor'); - Game.BankAchievement('Think big'); - Game.BankAchievement('Hypersize me'); - Game.BankAchievement('Max capacity'); - - order = 61616; - new Game.Achievement('Liquid assets', loc("Have your stock market profits surpass $%1.", 1e7), [12, 33]); - - order = 11000; - new Game.Achievement('Stifling the press', loc("Squish the news ticker flat, then click on it.") + 'Narrow in here or is it just me?', [27, 7]); - - - order = 2500; - Game.TieredAchievement('It\'s big brain time', '', 'Cortex baker', 1); - Game.TieredAchievement('Just my imagination', '', 'Cortex baker', 2); - Game.TieredAchievement('Now there\'s an idea', '', 'Cortex baker', 3); - Game.TieredAchievement('The organ that named itself', '', 'Cortex baker', 4); - Game.TieredAchievement('Gyrification', '', 'Cortex baker', 5); - Game.TieredAchievement('A trademarked portmanteau of "imagination" and "engineering"', '', 'Cortex baker', 6); - Game.TieredAchievement('Mindfulness', '', 'Cortex baker', 7); - Game.TieredAchievement('The 10% myth', '', 'Cortex baker', 8); - Game.TieredAchievement('Don\'t think about it too hard', '', 'Cortex baker', 9); - Game.TieredAchievement('Though fools seldom differ', '', 'Cortex baker', 10); - Game.TieredAchievement('Looking kind of dumb', '', 'Cortex baker', 11); - Game.TieredAchievement('A beautiful mind', '', 'Cortex baker', 12); - Game.TieredAchievement('Cardinal synapses', '', 'Cortex baker', 13); - - order = 2520; - Game.ProductionAchievement('Positive thinking', 'Cortex baker', 1); - Game.ProductionAchievement('The thought that counts', 'Cortex baker', 2); - Game.ProductionAchievement('Unthinkable', 'Cortex baker', 3); - - new Game.Achievement('Gifted', '', [34, 26]); Game.Objects['Cortex baker'].levelAchiev10 = Game.last; - - - order = 1100; Game.TieredAchievement('They moistly come at night', '', 'Grandma', 14); - order = 1200; Game.TieredAchievement('It\'s grown on you', '', 'Farm', 14); - order = 1300; Game.TieredAchievement('Don\'t let the walls cave in on you', '', 'Mine', 14); - order = 1400; Game.TieredAchievement('Replaced by robots', '', 'Factory', 14); - order = 1425; Game.TieredAchievement('Financial prodigy', 'Imagine how it would be, to be at the top making cash money.', 'Bank', 14); - order = 1450; Game.TieredAchievement('And I will pray to a big god', '', 'Temple', 14); - order = 1475; Game.TieredAchievement('Shosple Colupis', '', 'Wizard tower', 14); - order = 1500; Game.TieredAchievement('False vacuum', '', 'Shipment', 14); - order = 1600; Game.TieredAchievement('Metallic taste', '', 'Alchemy lab', 14); - order = 1700; Game.TieredAchievement('Swiss cheese', '', 'Portal', 14); - order = 1800; Game.TieredAchievement('But the future refused to change', '', 'Time machine', 14); - order = 1900; Game.TieredAchievement('What\'s the dark matter with you', '', 'Antimatter condenser', 14); - order = 2000; Game.TieredAchievement('Enlightenment', '', 'Prism', 14); - order = 2100; Game.TieredAchievement('Never tell me the odds', '', 'Chancemaker', 14); - order = 2200; Game.TieredAchievement('Blowing an Apollonian gasket', '', 'Fractal engine', 14); - order = 2300; Game.TieredAchievement('Get with the program', '', 'Javascript console', 14); - order = 2400; Game.TieredAchievement('Lost your cosmic marbles', '', 'Idleverse', 14); - order = 2500; Game.TieredAchievement('By will alone I set my mind in motion', '', 'Cortex baker', 14); - - order = 1000; new Game.Achievement('Ain\'t that a click in the head', loc("Make %1 from clicking.", loc("%1 cookie", LBeautify(1e29))), [11, 34]); - - order = 7002; - new Game.Achievement('Sexcentennial and a half', loc("Have at least %1 of everything.", 650) + 'Hope you\'re enjoying the grind so far! It gets worse.', [21, 34]); - - Game.CpsAchievement('I am speed'); - Game.CpsAchievement('And on and on'); - Game.BankAchievement('Fake it till you bake it'); - Game.BankAchievement('History in the baking'); - - order = 22100; new Game.Achievement('Baby it\'s old outside', loc("Click one of Santa's helper grandmas during Christmas season."), [10, 9]); - - order = 5000; - new Game.Achievement('Myriad', loc("Own %1.", loc("%1 building", LBeautify(10000))) + 'At this point, most of your assets lie in real estate.', [31, 6]); - - order = 6000; - new Game.Achievement('Kaizen', loc("Purchase %1.", loc("%1 upgrade", LBeautify(500))) + 'Just a little more.', [31, 5]); - new Game.Achievement('Beyond quality', loc("Purchase %1.", loc("%1 upgrade", LBeautify(600))) + 'Dwarfing all of mankind\'s accomplishments.', [32, 5]); - - Game.CpsAchievement('Everything happens so much'); - Game.CpsAchievement('I\'ll rest when I\'m dead'); - Game.BankAchievement('What do you get for the baker who has everything'); - Game.BankAchievement('Bottomless pit'); - - order = 6001; - new Game.Achievement('All the stars in heaven', loc("Own %1 heavenly upgrades.", 100), [30, 5]); - - order = 32500; - new Game.Achievement('No time like the present', loc("Redeem a cookie gift code from a friend (or from yourself, we don't judge)."), [34, 6]); - - Game.CpsAchievement('Can we get much higher'); - Game.CpsAchievement('Speed\'s the name of the game (no it\'s not it\'s called Cookie Clicker)'); - Game.BankAchievement('Rainy day fund'); - Game.BankAchievement('And a little extra'); - - order = 19990; - new Game.Achievement('Grandmapocalypse', loc("Trigger the grandmapocalypse for the first time."), [28, 21]); - new Game.Achievement('Wrath cookie', loc("Click a wrath cookie."), [15, 5]); - - order = 30050; - new Game.Achievement('No more room in hell', loc("Ascend with %1 baked.", loc("%1 cookie", LBeautify(1e57))) + 'That is not dead which can eternal click.', [21, 32]); - - order = 32600; - new Game.Achievement('In her likeness', loc("Shape your clones to resemble %1.", loc("grandmas")) + 'There she is.', [26, 21]); Game.last.pool = 'shadow'; - - order = 20999; - new Game.Achievement('Wrinkler poker', loc("Poke a wrinkler %1 times without killing it.", 50) + 'Also the name of a card game popular in retirement homes.', [19, 8]); - - order = 7002; - new Game.Achievement('Septcentennial', loc("Have at least %1 of everything.", 700) + 'In this economy?', [29, 36]); - - order = 2600; - Game.TieredAchievement('My own clone', '', 'You', 1); - Game.TieredAchievement('Multiplicity', '', 'You', 2); - Game.TieredAchievement('Born for this job', '', 'You', 3); - Game.TieredAchievement('Episode II', '', 'You', 4); - Game.TieredAchievement('Copy that', '', 'You', 5); - Game.TieredAchievement('Life finds a way', '', 'You', 6); - Game.TieredAchievement('Overcrowding', '', 'You', 7); - Game.TieredAchievement('Strength in numbers', '', 'You', 8); - Game.TieredAchievement('Army of me', '', 'You', 9); - Game.TieredAchievement('Know thyself', 'Do you ever look at yourself in the mirror and wonder... What is going on inside your head?', 'You', 10); - Game.TieredAchievement('Didn\'t make sense not to live', '', 'You', 11); - Game.TieredAchievement('Genetic bottleneck', '', 'You', 12); - Game.TieredAchievement('Despite everything, it\'s still you', '', 'You', 13); - Game.TieredAchievement('Everyone everywhere all at once', '', 'You', 14); - - order = 2620; - Game.ProductionAchievement('Self-made', 'You', 1); - Game.ProductionAchievement('Reproducible results', 'You', 2); - Game.ProductionAchievement('That\'s all you', 'You', 3); - - new Game.Achievement('Self-improvement', '', [35, 26]); Game.Objects['You'].levelAchiev10 = Game.last; - - order = 1100; Game.TieredAchievement('And now you\'re even older', '', 'Grandma', 15); - order = 1200; Game.TieredAchievement('Au naturel', '', 'Farm', 15); - order = 1300; Game.TieredAchievement('Dirt-rich', '', 'Mine', 15); - order = 1400; Game.TieredAchievement('Bots build bots', '', 'Factory', 15); - order = 1425; Game.TieredAchievement('Getting that bag', '', 'Bank', 15); - order = 1450; Game.TieredAchievement('The leader is good, the leader is great', '', 'Temple', 15); - order = 1475; Game.TieredAchievement('You don\'t think they could\'ve used... it couldn\'t have been ma-', '', 'Wizard tower', 15); - order = 1500; Game.TieredAchievement('Signed, sealed, delivered', '', 'Shipment', 15); - order = 1600; Game.TieredAchievement('Sugar, spice, and everything nice', 'These were the ingredients chosen to create the perfect cookies.', 'Alchemy lab', 15); - order = 1700; Game.TieredAchievement('Not even remotely close to Kansas anymore', '', 'Portal', 15); - order = 1800; Game.TieredAchievement('I only meant to stay a while', '', 'Time machine', 15); - order = 1900; Game.TieredAchievement('Not 20 years away forever', '', 'Antimatter condenser', 15); - order = 2000; Game.TieredAchievement('Bright side of the Moon', '', 'Prism', 15); - order = 2100; Game.TieredAchievement('Riding the Mersenne twister', '', 'Chancemaker', 15); - order = 2200; Game.TieredAchievement('Divide and conquer', '', 'Fractal engine', 15); - order = 2300; Game.TieredAchievement('Pebcakes', 'Problem exists in my mouth!', 'Javascript console', 15); - order = 2400; Game.TieredAchievement('Greener on the other sides', '', 'Idleverse', 15); - order = 2500; Game.TieredAchievement('Where is my mind', '', 'Cortex baker', 15); - order = 2600; Game.TieredAchievement('Introspection', '', 'You', 15); - - order = 61617; - new Game.Achievement('Debt evasion', loc("Take out a loan and ascend before incurring the CpS penalty.") + 'Really got \'em buttered!', [4, 33]); - - order = 6000; - new Game.Achievement('Oft we mar what\'s well', loc("Purchase %1.", loc("%1 upgrade", LBeautify(700))) + 'But don\'t let that stop you!', [33, 5]); - - order = 500000; - new Game.Achievement('Cookie Clicker', loc("Unlock the final building."), [30, 6]); - Game.last.descFunc = function () { - if (!Game.specialAnimLoop) { - Game.specialAnimLoop = setInterval(function () { - var el = l('parade'); - if (!el || !Game.tooltip.on) { clearInterval(Game.specialAnimLoop); Game.specialAnimLoop = 0; return false; } - var x = Game.T; - el.style.backgroundPosition = '-' + x + 'px ' + (Game.T % 20 < 10 ? 0 : 32) + 'px'; - }, 100); - } - var x = Game.T; - return this.desc + '' + loc("Everyone's here.") + '
' + loc("Won't you have some cookies too?") + '
'; - }; - - order = 1000; new Game.Achievement('What\'s not clicking', loc("Make %1 from clicking.", loc("%1 cookie", LBeautify(1e31))), [11, 36]); - order = 1050; - new Game.Achievement('All on deck', loc("Have %1.", loc("%1 cursor", LBeautify(900))), [0, 19]); - new Game.Achievement('A round of applause', loc("Have %1.", loc("%1 cursor", LBeautify(1000))) + 'Boy, are my arms tired!', [0, 28]); - - //end of achievements - - - for (var i in Game.Objects) { - if (Game.Objects[i].levelAchiev10) { Game.Objects[i].levelAchiev10.baseDesc = loc("Reach level %1 %2.", [10, Game.Objects[i].plural]); Game.Objects[i].levelAchiev10.desc = Game.Objects[i].levelAchiev10.baseDesc; } - } - - - - LocalizeUpgradesAndAchievs(); - - - /*===================================================================================== - BUFFS - =======================================================================================*/ - - Game.buffs = {};//buffs currently in effect by name - Game.buffsI = 0; - Game.buffsL = l('buffs'); - Game.gainBuff = function (type, time, arg1, arg2, arg3) { - type = Game.buffTypesByName[type]; - var obj = type.func(time, arg1, arg2, arg3); - obj.type = type; - obj.arg1 = arg1; - obj.arg2 = arg2; - obj.arg3 = arg3; - if (!obj.dname && obj.name != '???') obj.dname = loc(obj.name); - - var buff = { - visible: true, - time: 0, - name: '???', - desc: '', - icon: [0, 0] - }; - if (Game.buffs[obj.name])//if there is already a buff in effect with this name - { - var buff = Game.buffs[obj.name]; - if (obj.max) buff.time = Math.max(obj.time, buff.time);//new duration is max of old and new - if (obj.add) buff.time += obj.time;//new duration is old + new - if (!obj.max && !obj.add) buff.time = obj.time;//new duration is set to new - buff.maxTime = buff.time; - } - else//create new buff - { - for (var i in obj)//paste parameters onto buff - { buff[i] = obj[i]; } - buff.maxTime = buff.time; - Game.buffs[buff.name] = buff; - buff.id = Game.buffsI; - - //create dom - Game.buffsL.innerHTML = Game.buffsL.innerHTML + '

' + buff.dname + '

' + buff.desc + '
' - , 'left', true) : '') + ' style="opacity:1;float:none;display:block;' + writeIcon(buff.icon) + '">'; - - buff.l = l('buff' + buff.id); - - Game.buffsI++; - } - Game.recalculateGains = 1; - Game.storeToRefresh = 1; - return buff; - } - Game.hasBuff = function (what)//returns 0 if there is no buff in effect with this name; else, returns it - { if (!Game.buffs[what]) return 0; else return Game.buffs[what]; } - Game.updateBuffs = function ()//executed every logic frame - { - for (var i in Game.buffs) { - var buff = Game.buffs[i]; - - if (buff.time >= 0) { - if (!l('buffPieTimer' + buff.id)) l('buff' + buff.id).innerHTML = l('buff' + buff.id).innerHTML + '
'; - var T = 1 - (buff.time / buff.maxTime); - T = (T * 144) % 144; - l('buffPieTimer' + buff.id).style.backgroundPosition = (-Math.floor(T % 18)) * 48 + 'px ' + (-Math.floor(T / 18)) * 48 + 'px'; - } - buff.time--; - if (buff.time <= 0) { - if (Game.onCrate == l('buff' + buff.id)) Game.tooltip.hide(); - if (buff.onDie) buff.onDie(); - Game.buffsL.removeChild(l('buff' + buff.id)); - if (Game.buffs[buff.name]) { - Game.buffs[buff.name] = 0; - delete Game.buffs[buff.name]; - } - Game.recalculateGains = 1; - Game.storeToRefresh = 1; - } - } - } - Game.killBuff = function (what)//remove a buff by name - { if (Game.buffs[what]) { Game.buffs[what].time = 0;/*Game.buffs[what]=0;*/ } } - Game.killBuffs = function ()//remove all buffs - { Game.buffsL.innerHTML = ''; Game.buffs = {}; Game.recalculateGains = 1; Game.storeToRefresh = 1; } - - - Game.buffTypes = [];//buff archetypes; only buffs declared from these can be saved and loaded - Game.buffTypesByName = []; - Game.buffTypesN = 0; - Game.buffType = function (name, func) { - this.name = name; - this.func = func;//this is a function that returns a buff object; it takes a "time" argument in seconds, and 3 more optional arguments at most, which will be saved and loaded as floats - this.id = Game.buffTypesN; - this.vanilla = Game.vanilla; - Game.buffTypesByName[this.name] = this; - Game.buffTypes[Game.buffTypesN] = this; - Game.buffTypesN++; - } - - /* - basic buff parameters : - name:'Kitten rain', - desc:'It\'s raining kittens!', - icon:[0,0], - time:30*Game.fps - other parameters : - visible:false - will hide the buff from the buff list - add:true - if this buff already exists, add the new duration to the old one - max:true - if this buff already exists, set the new duration to the max of either - onDie:function(){} - function will execute when the buff runs out - power:3 - used by some buffs - multCpS:3 - buff multiplies CpS by this amount - multClick:3 - buff multiplies click power by this amount - */ - - //base buffs - new Game.buffType('frenzy', function (time, pow) { - return { - name: 'Frenzy', - desc: loc("Cookie production x%1 for %2!", [pow, Game.sayTime(time * Game.fps, -1)]), - icon: [10, 14], - time: time * Game.fps, - add: true, - multCpS: pow, - aura: 1 - }; - }); - new Game.buffType('blood frenzy', function (time, pow) { - return { - name: 'Elder frenzy', - desc: loc("Cookie production x%1 for %2!", [pow, Game.sayTime(time * Game.fps, -1)]), - icon: [29, 6], - time: time * Game.fps, - add: true, - multCpS: pow, - aura: 1 - }; - }); - new Game.buffType('clot', function (time, pow) { - return { - name: 'Clot', - desc: loc("Cookie production halved for %1!", Game.sayTime(time * Game.fps, -1)), - icon: [15, 5], - time: time * Game.fps, - add: true, - multCpS: pow, - aura: 2 - }; - }); - new Game.buffType('dragon harvest', function (time, pow) { - if (Game.Has('Dragon fang')) pow = Math.ceil(pow * 1.1); - return { - name: 'Dragon Harvest', - desc: loc("Cookie production x%1 for %2!", [pow, Game.sayTime(time * Game.fps, -1)]), - icon: [10, 25], - time: time * Game.fps, - add: true, - multCpS: pow, - aura: 1 - }; - }); - new Game.buffType('everything must go', function (time, pow) { - return { - name: 'Everything must go', - desc: loc("All buildings are %1% cheaper for %2!", [pow, Game.sayTime(time * Game.fps, -1)]), - icon: [17, 6], - time: time * Game.fps, - add: true, - power: pow, - aura: 1 - }; - }); - new Game.buffType('cursed finger', function (time, pow) { - return { - name: 'Cursed finger', - desc: loc("Cookie production halted for %1,
but each click is worth %2 of CpS.", [Game.sayTime(time * Game.fps, -1), Game.sayTime(time * Game.fps, -1)]), - icon: [12, 17], - time: time * Game.fps, - add: true, - power: pow, - multCpS: 0, - aura: 1 - }; - }); - new Game.buffType('click frenzy', function (time, pow) { - return { - name: 'Click frenzy', - desc: loc("Clicking power x%1 for %2!", [pow, Game.sayTime(time * Game.fps, -1)]), - icon: [0, 14], - time: time * Game.fps, - add: true, - multClick: pow, - aura: 1 - }; - }); - new Game.buffType('dragonflight', function (time, pow) { - if (Game.Has('Dragon fang')) pow = Math.ceil(pow * 1.1); - return { - name: 'Dragonflight', - desc: loc("Clicking power x%1 for %2!", [pow, Game.sayTime(time * Game.fps, -1)]), - icon: [0, 25], - time: time * Game.fps, - add: true, - multClick: pow, - aura: 1 - }; - }); - new Game.buffType('cookie storm', function (time, pow) { - return { - name: 'Cookie storm', - desc: loc("Cookies everywhere!"), - icon: [22, 6], - time: time * Game.fps, - add: true, - power: pow, - aura: 1 - }; - }); - new Game.buffType('building buff', function (time, pow, building) { - var obj = Game.ObjectsById[building]; - return { - name: Game.goldenCookieBuildingBuffs[obj.name][0], - dname: EN ? Game.goldenCookieBuildingBuffs[obj.name][0] : loc("%1 Power!", obj.dname), - desc: loc("Your %1 are boosting your CpS!", loc("%1 " + obj.bsingle, LBeautify(obj.amount))) + '
' + loc("Cookie production +%1% for %2!", [Beautify(Math.ceil(pow * 100 - 100)), Game.sayTime(time * Game.fps, -1)]), - icon: [obj.iconColumn, 14], - time: time * Game.fps, - add: true, - multCpS: pow, - aura: 1 - }; - }); - new Game.buffType('building debuff', function (time, pow, building) { - var obj = Game.ObjectsById[building]; - return { - name: Game.goldenCookieBuildingBuffs[obj.name][1], - dname: EN ? Game.goldenCookieBuildingBuffs[obj.name][1] : loc("%1 Burden!", obj.dname), - desc: loc("Your %1 are rusting your CpS!", loc("%1 " + obj.bsingle, LBeautify(obj.amount))) + '
' + loc("Cookie production %1% slower for %2!", [Beautify(Math.ceil(pow * 100 - 100)), Game.sayTime(time * Game.fps, -1)]), - icon: [obj.iconColumn, 15], - time: time * Game.fps, - add: true, - multCpS: 1 / pow, - aura: 2 - }; - }); - new Game.buffType('sugar blessing', function (time, pow) { - return { - name: 'Sugar blessing', - desc: loc("You find %1% more golden cookies for the next %2.", [10, Game.sayTime(time * Game.fps, -1)]), - icon: [29, 16], - time: time * Game.fps, - //add:true - }; - }); - new Game.buffType('haggler luck', function (time, pow) { - return { - name: 'Haggler\'s luck', - desc: loc("All upgrades are %1% cheaper for %2!", [pow, Game.sayTime(time * Game.fps, -1)]), - icon: [25, 11], - time: time * Game.fps, - power: pow, - max: true - }; - }); - new Game.buffType('haggler misery', function (time, pow) { - return { - name: 'Haggler\'s misery', - desc: loc("All upgrades are %1% pricier for %2!", [pow, Game.sayTime(time * Game.fps, -1)]), - icon: [25, 11], - time: time * Game.fps, - power: pow, - max: true - }; - }); - new Game.buffType('pixie luck', function (time, pow) { - return { - name: 'Crafty pixies', - desc: loc("All buildings are %1% cheaper for %2!", [pow, Game.sayTime(time * Game.fps, -1)]), - icon: [26, 11], - time: time * Game.fps, - power: pow, - max: true - }; - }); - new Game.buffType('pixie misery', function (time, pow) { - return { - name: 'Nasty goblins', - desc: loc("All buildings are %1% pricier for %2!", [pow, Game.sayTime(time * Game.fps, -1)]), - icon: [26, 11], - time: time * Game.fps, - power: pow, - max: true - }; - }); - new Game.buffType('magic adept', function (time, pow) { - return { - name: 'Magic adept', - desc: loc("Spells backfire %1 times less for %2.", [pow, Game.sayTime(time * Game.fps, -1)]), - icon: [29, 11], - time: time * Game.fps, - power: pow, - max: true - }; - }); - new Game.buffType('magic inept', function (time, pow) { - return { - name: 'Magic inept', - desc: loc("Spells backfire %1 times more for %2.", [pow, Game.sayTime(time * Game.fps, -1)]), - icon: [29, 11], - time: time * Game.fps, - power: pow, - max: true - }; - }); - new Game.buffType('devastation', function (time, pow) { - return { - name: 'Devastation', - desc: loc("Clicking power +%1% for %2!", [Math.floor(pow * 100 - 100), Game.sayTime(time * Game.fps, -1)]), - icon: [23, 18], - time: time * Game.fps, - multClick: pow, - aura: 1, - max: true - }; - }); - new Game.buffType('sugar frenzy', function (time, pow) { - return { - name: 'Sugar frenzy', - desc: loc("Cookie production x%1 for %2!", [pow, Game.sayTime(time * Game.fps, -1)]), - icon: [29, 14], - time: time * Game.fps, - add: true, - multCpS: pow, - aura: 0 - }; - }); - new Game.buffType('loan 1', function (time, pow) { - return { - name: 'Loan 1', - dname: loc("Loan %1", 1), - desc: loc("Cookie production x%1 for %2!", [pow, Game.sayTime(time * Game.fps, -1)]), - icon: [1, 33], - time: time * Game.fps, - power: pow, - multCpS: pow, - max: true, - onDie: function () { if (Game.takeLoan) { Game.takeLoan(1, true); } }, - }; - }); - new Game.buffType('loan 1 interest', function (time, pow) { - return { - name: 'Loan 1 (interest)', - dname: loc("Loan %1 (interest)", 1), - desc: loc("Cookie production x%1 for %2!", [pow, Game.sayTime(time * Game.fps, -1)]), - icon: [1, 33], - time: time * Game.fps, - power: pow, - multCpS: pow, - max: true - }; - }); - new Game.buffType('loan 2', function (time, pow) { - return { - name: 'Loan 2', - dname: loc("Loan %1", 2), - desc: loc("Cookie production x%1 for %2!", [pow, Game.sayTime(time * Game.fps, -1)]), - icon: [1, 33], - time: time * Game.fps, - power: pow, - multCpS: pow, - max: true, - onDie: function () { if (Game.takeLoan) { Game.takeLoan(2, true); } }, - }; - }); - new Game.buffType('loan 2 interest', function (time, pow) { - return { - name: 'Loan 2 (interest)', - dname: loc("Loan %1 (interest)", 2), - desc: loc("Cookie production x%1 for %2!", [pow, Game.sayTime(time * Game.fps, -1)]), - icon: [1, 33], - time: time * Game.fps, - power: pow, - multCpS: pow, - max: true - }; - }); - new Game.buffType('loan 3', function (time, pow) { - return { - name: 'Loan 3', - dname: loc("Loan %1", 3), - desc: loc("Cookie production x%1 for %2!", [pow, Game.sayTime(time * Game.fps, -1)]), - icon: [1, 33], - time: time * Game.fps, - power: pow, - multCpS: pow, - max: true, - onDie: function () { if (Game.takeLoan) { Game.takeLoan(3, true); } }, - }; - }); - new Game.buffType('loan 3 interest', function (time, pow) { - return { - name: 'Loan 3 (interest)', - dname: loc("Loan %1 (interest)", 3), - desc: loc("Cookie production x%1 for %2!", [pow, Game.sayTime(time * Game.fps, -1)]), - icon: [1, 33], - time: time * Game.fps, - power: pow, - multCpS: pow, - max: true - }; - }); - new Game.buffType('gifted out', function (time, pow) { - return { - name: 'Gifted out', - desc: loc("Can't send or receive gifts again for %1.", Game.sayTime(time * Game.fps, -1)), - icon: [34, 6], - time: time * Game.fps, - power: pow, - max: true - }; - }); - - //end of buffs - - - - - /*===================================================================================== - GRANDMAPOCALYPSE - =======================================================================================*/ - Game.UpdateGrandmapocalypse = function () { - if (Game.Has('Elder Covenant') || Game.Objects['Grandma'].amount == 0) Game.elderWrath = 0; - else if (Game.pledgeT > 0)//if the pledge is active, lower it - { - Game.pledgeT--; - if (Game.pledgeT == 0)//did we reach 0? make the pledge purchasable again - { - Game.Lock('Elder Pledge'); - Game.Unlock('Elder Pledge'); - Game.elderWrath = 1; - } - } - else { - if (Game.Has('One mind') && Game.elderWrath == 0) { - Game.elderWrath = 1; - } - if (Math.random() < 0.001 && Game.elderWrath < Game.Has('One mind') + Game.Has('Communal brainsweep') + Game.Has('Elder Pact')) { - Game.elderWrath++;//have we already pledged? make the elder wrath shift between different stages - } - if (Game.Has('Elder Pact') && Game.Upgrades['Elder Pledge'].unlocked == 0) { - Game.Lock('Elder Pledge'); - Game.Unlock('Elder Pledge'); - } - } - Game.elderWrathD += ((Game.elderWrath + 1) - Game.elderWrathD) * 0.001;//slowly fade to the target wrath state - - if (Game.elderWrath != Game.elderWrathOld) { - if (Game.clicksThisSession > 0) { - if (Game.elderWrath >= 3) PlayCue('fadeTo', 'grandmapocalypse'); - else PlayCue('fadeTo', 'click'); - } - Game.storeToRefresh = 1; - } - - Game.elderWrathOld = Game.elderWrath; - - Game.UpdateWrinklers(); - } - - //wrinklers - - function inRect(x, y, rect) { - //find out if the point x,y is in the rotated rectangle rect{w,h,r,o} (width,height,rotation in radians,y-origin) (needs to be normalized) - //I found this somewhere online I guess - var dx = x + Math.sin(-rect.r) * (-(rect.h / 2 - rect.o)), dy = y + Math.cos(-rect.r) * (-(rect.h / 2 - rect.o)); - var h1 = Math.sqrt(dx * dx + dy * dy); - var currA = Math.atan2(dy, dx); - var newA = currA - rect.r; - var x2 = Math.cos(newA) * h1; - var y2 = Math.sin(newA) * h1; - if (x2 > -0.5 * rect.w && x2 < 0.5 * rect.w && y2 > -0.5 * rect.h && y2 < 0.5 * rect.h) return true; - return false; - } - - Game.wrinklerHP = 2.1; - Game.wrinklerLimit = 14;//hard limit regardless of boosts - Game.wrinklers = []; - for (var i = 0; i < Game.wrinklerLimit; i++) { - Game.wrinklers.push({ id: parseInt(i), close: 0, sucked: 0, phase: 0, x: 0, y: 0, r: 0, hurt: 0, hp: Game.wrinklerHP, selected: 0, type: 0, clicks: 0 }); - } - Game.getWrinklersMax = function () { - var n = 10; - if (Game.Has('Elder spice')) n += 2; - n += Math.round(Game.auraMult('Dragon Guts') * 2); - return Math.min(Game.wrinklerLimit, n); - } - Game.ResetWrinklers = function () { - for (var i in Game.wrinklers) { - Game.wrinklers[i] = { id: parseInt(i), close: 0, sucked: 0, phase: 0, x: 0, y: 0, r: 0, hurt: 0, hp: Game.wrinklerHP, selected: 0, type: 0, clicks: 0 }; - } - } - Game.CollectWrinklers = function () { - for (var i in Game.wrinklers) { - Game.wrinklers[i].hp = 0; - } - } - Game.wrinklerSquishSound = Math.floor(Math.random() * 4) + 1; - Game.playWrinklerSquishSound = function () { - PlaySound('snd/' + (Game.WINKLERS ? 'squeak' : 'squish') + (Game.wrinklerSquishSound) + '.mp3', 0.5); - Game.wrinklerSquishSound += Math.floor(Math.random() * 1.5) + 1; - if (Game.wrinklerSquishSound > 4) Game.wrinklerSquishSound -= 4; - } - Game.SpawnWrinkler = function (me) { - if (!me) { - var max = Game.getWrinklersMax(); - var n = 0; - for (var i in Game.wrinklers) { - if (Game.wrinklers[i].phase > 0) n++; - } - for (var i in Game.wrinklers) { - var it = Game.wrinklers[i]; - if (it.phase == 0 && Game.elderWrath > 0 && n < max && it.id < max) { - me = it; - break; - } - } - } - if (!me) return false; - me.phase = 1; - me.hp = Game.wrinklerHP; - me.type = 0; - me.clicks = 0; - if (Math.random() < 0.0001) me.type = 1;//shiny wrinkler - return me; - } - Game.PopRandomWrinkler = function () { - var wrinklers = []; - for (var i in Game.wrinklers) { - if (Game.wrinklers[i].phase > 0 && Game.wrinklers[i].hp > 0) wrinklers.push(Game.wrinklers[i]); - } - if (wrinklers.length > 0) { - var me = choose(wrinklers); - me.hp = -10; - return me; - } - return false; - } - Game.UpdateWrinklers = function () { - var xBase = 0; - var yBase = 0; - var onWrinkler = 0; - if (Game.LeftBackground) { - xBase = Game.cookieOriginX; - yBase = Game.cookieOriginY; - } - var max = Game.getWrinklersMax(); - var n = 0; - for (var i in Game.wrinklers) { - if (Game.wrinklers[i].phase > 0) n++; - } - for (var i in Game.wrinklers) { - var me = Game.wrinklers[i]; - if (me.phase == 0 && Game.elderWrath > 0 && n < max && me.id < max) { - var chance = 0.00001 * Game.elderWrath; - chance *= Game.eff('wrinklerSpawn'); - if (Game.Has('Unholy bait')) chance *= 5; - if (Game.hasGod) { - var godLvl = Game.hasGod('scorn'); - if (godLvl == 1) chance *= 2.5; - else if (godLvl == 2) chance *= 2; - else if (godLvl == 3) chance *= 1.5; - } - if (Game.Has('Wrinkler doormat')) chance = 0.1; - if (Math.random() < chance)//respawn - { - Game.SpawnWrinkler(me); - } - } - if (me.phase > 0) { - if (me.close < 1) me.close += (1 / Game.fps) / 10; - if (me.close > 1) me.close = 1; - if (me.id >= max) me.hp = 0; - } - else me.close = 0; - if (me.close == 1 && me.phase == 1) { - me.phase = 2; - Game.recalculateGains = 1; - } - if (me.phase == 2) { - me.sucked += (((Game.cookiesPs / Game.fps) * Game.cpsSucked));//suck the cookies - } - if (me.phase > 0) { - if (me.type == 0) { - if (me.hp < Game.wrinklerHP) me.hp += 0.04; - me.hp = Math.min(Game.wrinklerHP, me.hp); - } - else if (me.type == 1) { - if (me.hp < Game.wrinklerHP * 3) me.hp += 0.04; - me.hp = Math.min(Game.wrinklerHP * 3, me.hp); - } - var d = 128 * (2 - me.close);//*Game.BigCookieSize; - if (Game.prefs.fancy) d += Math.cos(Game.T * 0.05 + parseInt(me.id)) * 4; - me.r = (me.id / max) * 360; - if (Game.prefs.fancy) me.r += Math.sin(Game.T * 0.05 + parseInt(me.id)) * 4; - me.x = xBase + (Math.sin(me.r * Math.PI / 180) * d); - me.y = yBase + (Math.cos(me.r * Math.PI / 180) * d); - if (Game.prefs.fancy) me.r += Math.sin(Game.T * 0.09 + parseInt(me.id)) * 4; - var rect = { w: 100, h: 200, r: (-me.r) * Math.PI / 180, o: 10 }; - if (Math.random() < 0.01 && !Game.prefs.notScary) me.hurt = Math.max(me.hurt, Math.random()); - if (Game.T % 5 == 0 && Game.CanClick) { if (Game.LeftBackground && Game.mouseX < Game.LeftBackground.canvas.width && inRect(Game.mouseX - me.x, Game.mouseY - me.y, rect)) me.selected = 1; else me.selected = 0; } - if (me.selected && onWrinkler == 0 && Game.CanClick) { - me.hurt = Math.max(me.hurt, 0.25); - //me.close*=0.99; - if (Game.Click && Game.lastClickedEl == l('backgroundLeftCanvas')) { - if (Game.keys[17] && Game.sesame) { me.type = !me.type; PlaySound('snd/shimmerClick.mp3'); }//ctrl-click on a wrinkler in god mode to toggle its shininess - else { - Game.playWrinklerSquishSound(); - me.clicks++; - if (me.clicks >= 50) Game.Win('Wrinkler poker'); - me.hurt = 1; - me.hp -= 0.75; - if (Game.prefs.particles && !Game.prefs.notScary && !Game.WINKLERS && !(me.hp <= 0.5 && me.phase > 0)) { - var x = me.x + (Math.sin(me.r * Math.PI / 180) * 90); - var y = me.y + (Math.cos(me.r * Math.PI / 180) * 90); - for (var ii = 0; ii < 3; ii++) { - //Game.particleAdd(x+Math.random()*50-25,y+Math.random()*50-25,Math.random()*4-2,Math.random()*-2-2,1,1,2,'wrinklerBits.png'); - var part = Game.particleAdd(x, y, Math.random() * 4 - 2, Math.random() * -2 - 2, 1, 1, 2, me.type == 1 ? 'shinyWrinklerBits.png' : 'wrinklerBits.png'); - part.r = -me.r; - } - } - } - Game.Click = 0; - } - onWrinkler = 1; - } - } - - if (me.hurt > 0) { - me.hurt -= 5 / Game.fps; - //me.close-=me.hurt*0.05; - //me.x+=Math.random()*2-1; - //me.y+=Math.random()*2-1; - me.r += (Math.sin(Game.T * 1) * me.hurt) * 18;//Math.random()*2-1; - } - if (me.hp <= 0.5 && me.phase > 0) { - Game.playWrinklerSquishSound(); - PlaySound('snd/pop' + Math.floor(Math.random() * 3 + 1) + '.mp3', 0.75); - Game.wrinklersPopped++; - Game.recalculateGains = 1; - me.phase = 0; - me.close = 0; - me.hurt = 0; - me.hp = 3; - var toSuck = 1.1; - if (Game.Has('Sacrilegious corruption')) toSuck *= 1.05; - me.sucked *= 1 + Game.auraMult('Dragon Guts') * 0.2; - if (me.type == 1) toSuck *= 3;//shiny wrinklers are an elusive, profitable breed - me.sucked *= toSuck;//cookie dough does weird things inside wrinkler digestive tracts - if (Game.Has('Wrinklerspawn')) me.sucked *= 1.05; - if (Game.hasGod) { - var godLvl = Game.hasGod('scorn'); - if (godLvl == 1) me.sucked *= 1.15; - else if (godLvl == 2) me.sucked *= 1.1; - else if (godLvl == 3) me.sucked *= 1.05; - } - if (me.sucked > 0.5) { - Game.Notify(me.type == 1 ? loc("Exploded a shiny wrinkler") : loc("Exploded a wrinkler"), loc("Found %1!", loc("%1 cookie", LBeautify(me.sucked))), [19, 8], 6); - Game.Popup('
' + loc("+%1!", loc("%1 cookie", LBeautify(me.sucked))) + '
', Game.mouseX, Game.mouseY); - - if (Game.season == 'halloween') { - //if (Math.random()<(Game.HasAchiev('Spooky cookies')?0.2:0.05))//halloween cookie drops - var failRate = 0.95; - if (Game.HasAchiev('Spooky cookies')) failRate = 0.8; - if (Game.Has('Starterror')) failRate *= 0.9; - failRate *= 1 / Game.dropRateMult(); - if (Game.hasGod) { - var godLvl = Game.hasGod('seasons'); - if (godLvl == 1) failRate *= 0.9; - else if (godLvl == 2) failRate *= 0.95; - else if (godLvl == 3) failRate *= 0.97; - } - if (me.type == 1) failRate *= 0.9; - if (Math.random() > failRate)//halloween cookie drops - { - var cookie = choose(['Skull cookies', 'Ghost cookies', 'Bat cookies', 'Slime cookies', 'Pumpkin cookies', 'Eyeball cookies', 'Spider cookies']); - if (!Game.HasUnlocked(cookie) && !Game.Has(cookie)) { - Game.Unlock(cookie); - Game.Notify(Game.Upgrades[cookie].dname, loc("You also found %1!", Game.Upgrades[cookie].dname), Game.Upgrades[cookie].icon); - } - } - } - Game.DropEgg(0.98); - } - if (me.type == 1) Game.Win('Last Chance to See'); - Game.Earn(me.sucked); - /*if (Game.prefs.particles && !Game.WINKLERS) - { - var x=me.x+(Math.sin(me.r*Math.PI/180)*100); - var y=me.y+(Math.cos(me.r*Math.PI/180)*100); - for (var ii=0;ii<6;ii++) - { - Game.particleAdd(x+Math.random()*50-25,y+Math.random()*50-25,Math.random()*4-2,Math.random()*-2-2,1,1,2,'wrinklerBits.png'); - } - }*/ - if (Game.prefs.particles) { - var x = me.x + (Math.sin(me.r * Math.PI / 180) * 90); - var y = me.y + (Math.cos(me.r * Math.PI / 180) * 90); - if (me.sucked > 0) { - for (var ii = 0; ii < 5; ii++) { - Game.particleAdd(Game.mouseX, Game.mouseY, Math.random() * 4 - 2, Math.random() * -2 - 2, Math.random() * 0.5 + 0.75, 1.5, 2); - } - } - if (!Game.prefs.notScary && !Game.WINKLERS) { - for (var ii = 0; ii < 8; ii++) { - var part = Game.particleAdd(x, y, Math.random() * 4 - 2, Math.random() * -2 - 2, 1, 1, 2, me.type == 1 ? 'shinyWrinklerBits.png' : 'wrinklerBits.png'); - part.r = -me.r; - } - } - } - me.sucked = 0; - } - } - if (onWrinkler) { - Game.mousePointer = 1; - } - } - Game.DrawWrinklers = function () { - var ctx = Game.LeftBackground; - var selected = 0; - for (var i in Game.wrinklers) { - var me = Game.wrinklers[i]; - if (me.phase > 0) { - ctx.globalAlpha = me.close; - ctx.save(); - ctx.translate(me.x, me.y); - var sw = 100 + 2 * Math.sin(Game.T * 0.2 + i * 3); - var sh = 200 + 5 * Math.sin(Game.T * 0.2 - 2 + i * 3); - if (Game.prefs.fancy) { - ctx.translate(0, 30); - ctx.rotate(-(me.r) * Math.PI / 180); - ctx.drawImage(Pic('wrinklerShadow.png'), -sw / 2, -10, sw, sh); - ctx.rotate((me.r) * Math.PI / 180); - ctx.translate(0, -30); - } - ctx.rotate(-(me.r) * Math.PI / 180); - //var s=Math.min(1,me.sucked/(Game.cookiesPs*60))*0.75+0.25;//scale wrinklers as they eat - //ctx.scale(Math.pow(s,1.5)*1.25,s); - //ctx.fillRect(-50,-10,100,200); - var pic = Game.WINKLERS ? 'winkler.png' : 'wrinkler.png'; - if (me.type == 1) pic = Game.WINKLERS ? 'shinyWinkler.png' : 'shinyWrinkler.png'; - else if (Game.season == 'christmas') pic = Game.WINKLERS ? 'winterWinkler.png' : 'winterWrinkler.png'; - ctx.drawImage(Pic(pic), -sw / 2, -10, sw, sh); - if (!Game.WINKLERS && Game.prefs.notScary) ctx.drawImage(Pic(Math.sin(Game.T * 0.003 + i * 11 + 137 + Math.sin(Game.T * 0.017 + i * 13)) > 0.9997 ? 'wrinklerBlink.png' : 'wrinklerGooglies.png'), -sw / 2, -10 + 1 * Math.sin(Game.T * 0.2 + i * 3 + 1.2), sw, sh); - //ctx.drawImage(Pic(pic),-50,-10); - //ctx.fillText(me.id+' : '+me.sucked,0,0); - if (me.type == 1 && Math.random() < 0.3 && Game.prefs.particles)//sparkle - { - ctx.globalAlpha = Math.random() * 0.65 + 0.1; - var s = Math.random() * 30 + 5; - ctx.globalCompositeOperation = 'lighter'; - ctx.drawImage(Pic('glint.png'), -s / 2 + Math.random() * 50 - 25, -s / 2 + Math.random() * 200, s, s); - } - ctx.restore(); - - if (Game.prefs.particles && me.phase == 2 && Math.random() < 0.03) { - Game.particleAdd(me.x, me.y, Math.random() * 4 - 2, Math.random() * -2 - 2, Math.random() * 0.5 + 0.5, 1, 2); - } - - if (me.selected) selected = me; - } - } - if (selected && Game.Has('Eye of the wrinkler')) { - var x = Game.cookieOriginX; - var y = Game.cookieOriginY; - ctx.font = '14px Merriweather'; - ctx.textAlign = 'center'; - var text = loc("Swallowed:"); - var width = Math.ceil(Math.max(ctx.measureText(text).width, ctx.measureText(Beautify(selected.sucked)).width)); - ctx.fillStyle = '#000'; - ctx.globalAlpha = 0.65; - /*ctx.strokeStyle='#000'; - ctx.lineWidth=8; - ctx.beginPath(); - ctx.moveTo(x,y); - ctx.lineTo(Math.floor(selected.x),Math.floor(selected.y)); - ctx.stroke();*/ - var xO = x - width / 2 - 16; - var yO = y - 4; - var dist = Math.floor(Math.sqrt((selected.x - xO) * (selected.x - xO) + (selected.y - yO) * (selected.y - yO))); - var angle = -Math.atan2(yO - selected.y, xO - selected.x) + Math.PI / 2; - ctx.strokeStyle = '#fff'; - ctx.lineWidth = 1; - for (var i = 0; i < Math.floor(dist / 12); i++) { - var xC = selected.x + Math.sin(angle) * i * 12; - var yC = selected.y + Math.cos(angle) * i * 12; - ctx.beginPath(); - ctx.arc(xC, yC, 4 + (Game.prefs.fancy ? 2 * Math.pow(Math.sin(-Game.T * 0.2 + i * 0.3), 4) : 0), 0, 2 * Math.PI, false); - ctx.fill(); - ctx.stroke(); - } - ctx.fillRect(x - width / 2 - 8 - 10, y - 23, width + 16 + 20, 38); - ctx.strokeStyle = '#fff'; - ctx.lineWidth = 1; - ctx.strokeRect(x - width / 2 - 8 - 10 + 1.5, y - 23 + 1.5, width + 16 + 20 - 3, 38 - 3); - ctx.globalAlpha = 1; - ctx.fillStyle = '#fff'; - ctx.fillText(text, x + 14, y - 8); - ctx.fillText(Beautify(selected.sucked), x + 10, y + 8); - var s = 54 + 2 * Math.sin(Game.T * 0.4); - ctx.drawImage(Pic('icons.png'), 27 * 48, 26 * 48, 48, 48, x - width / 2 - 16 - s / 2, y - 4 - s / 2, s, s); - } - } - Game.SaveWrinklers = function () { - var amount = 0; - var amountShinies = 0; - var number = 0; - var shinies = 0; - for (var i in Game.wrinklers) { - if (Game.wrinklers[i].sucked > 0.5) { - number++; - if (Game.wrinklers[i].type == 1) { - shinies++; - amountShinies += Game.wrinklers[i].sucked; - } - else amount += Game.wrinklers[i].sucked; - } - } - return { amount: amount, number: number, shinies: shinies, amountShinies: amountShinies }; - } - Game.LoadWrinklers = function (amount, number, shinies, amountShinies) { - if (number > 0 && (amount > 0 || amountShinies > 0)) { - var fullNumber = number - shinies; - var fullNumberShinies = shinies; - for (var i in Game.wrinklers) { - if (number > 0) { - Game.wrinklers[i].phase = 2; - Game.wrinklers[i].close = 1; - Game.wrinklers[i].hp = 3; - if (shinies > 0) { Game.wrinklers[i].type = 1; Game.wrinklers[i].sucked = amountShinies / fullNumberShinies; shinies--; } - else Game.wrinklers[i].sucked = amount / fullNumber; - number--; - }//respawn - } - } - } - - /*===================================================================================== - SPECIAL THINGS AND STUFF - =======================================================================================*/ - - - Game.specialTab = ''; - Game.specialTabHovered = ''; - Game.specialTabs = []; - - Game.UpdateSpecial = function () { - Game.specialTabs = []; - if (Game.Has('A festive hat')) Game.specialTabs.push('santa'); - if (Game.Has('A crumbly egg')) Game.specialTabs.push('dragon'); - if (Game.specialTabs.length == 0) { Game.ToggleSpecialMenu(0); return; } - - if (Game.LeftBackground) { - Game.specialTabHovered = ''; - var len = Game.specialTabs.length; - if (len == 0) return; - var y = Game.LeftBackground.canvas.height - 24 - 48 * len; - for (var i = 0; i < Game.specialTabs.length; i++) { - var selected = 0; - if (Game.specialTab == Game.specialTabs[i]) selected = 1; - var x = 24; - var s = 1; - if (selected) { s = 2; x += 24; } - - if (Math.abs(Game.mouseX - x) <= 24 * s && Math.abs(Game.mouseY - y) <= 24 * s) { - Game.specialTabHovered = Game.specialTabs[i]; - Game.mousePointer = 1; - Game.CanClick = 0; - if (Game.Click && Game.lastClickedEl == l('backgroundLeftCanvas')) { - if (Game.specialTab != Game.specialTabs[i]) { Game.specialTab = Game.specialTabs[i]; Game.ToggleSpecialMenu(1); PlaySound('snd/press.mp3'); } - else { Game.ToggleSpecialMenu(0); PlaySound('snd/press.mp3'); } - //PlaySound('snd/tick.mp3'); - } - } - - y += 48; - } - } - } - - Game.santaLevels = ['Festive test tube', 'Festive ornament', 'Festive wreath', 'Festive tree', 'Festive present', 'Festive elf fetus', 'Elf toddler', 'Elfling', 'Young elf', 'Bulky elf', 'Nick', 'Santa Claus', 'Elder Santa', 'True Santa', 'Final Claus']; - if (!EN) { for (var i in Game.santaLevels) { Game.santaLevels[i] = loc(Game.santaLevels[i]); } } - for (var i in Game.santaDrops)//scale christmas upgrade prices with santa level - { Game.Upgrades[Game.santaDrops[i]].priceFunc = function () { return Math.pow(3, Game.santaLevel) * 2525; } } - - Game.UpgradeSanta = function () { - var moni = Math.pow(Game.santaLevel + 1, Game.santaLevel + 1); - if (Game.cookies > moni && Game.santaLevel < 14) { - PlaySound('snd/shimmerClick.mp3'); - - Game.Spend(moni); - Game.santaLevel = (Game.santaLevel + 1) % 15; - if (Game.santaLevel == 14) { - Game.Unlock('Santa\'s dominion'); - Game.Notify(loc("You are granted %1.", Game.Upgrades['Santa\'s dominion'].dname), '', Game.Upgrades['Santa\'s dominion'].icon); - } - var drops = []; - for (var i in Game.santaDrops) { if (!Game.HasUnlocked(Game.santaDrops[i])) drops.push(Game.santaDrops[i]); } - var drop = choose(drops); - if (drop) { - Game.Unlock(drop); - Game.Notify(loc("Found a present!"), loc("You find a present which contains...") + '
' + Game.Upgrades[drop].dname + '!', Game.Upgrades[drop].icon); - } - - Game.ToggleSpecialMenu(1); - - if (l('specialPic')) { var rect = l('specialPic').getBounds(); Game.SparkleAt((rect.left + rect.right) / 2, (rect.top + rect.bottom) / 2) + 32 - TopBarOffset; } - - if (Game.santaLevel >= 6) Game.Win('Coming to town'); - if (Game.santaLevel >= 14) Game.Win('All hail Santa'); - Game.recalculateGains = 1; - Game.upgradesToRebuild = 1; - } - } - - Game.dragonLevels = [ - { - name: 'Dragon egg', action: loc("Chip it"), pic: 0, - cost: function () { return Game.cookies >= 1000000; }, - buy: function () { Game.Spend(1000000); }, - costStr: function () { return loc("%1 cookie", LBeautify(1000000)); } - }, - { - name: 'Dragon egg', action: loc("Chip it"), pic: 1, - cost: function () { return Game.cookies >= 1000000 * 2; }, - buy: function () { Game.Spend(1000000 * 2); }, - costStr: function () { return loc("%1 cookie", LBeautify(1000000 * 2)); } - }, - { - name: 'Dragon egg', action: loc("Chip it"), pic: 2, - cost: function () { return Game.cookies >= 1000000 * 4; }, - buy: function () { Game.Spend(1000000 * 4); }, - costStr: function () { return loc("%1 cookie", LBeautify(1000000 * 4)); } - }, - { - name: 'Shivering dragon egg', action: loc("Hatch it"), pic: 3, - cost: function () { return Game.cookies >= 1000000 * 8; }, - buy: function () { Game.Spend(1000000 * 8); }, - costStr: function () { return loc("%1 cookie", LBeautify(1000000 * 8)); } - }, - { - name: 'Krumblor, cookie hatchling', action: 'Train Breath of Milk
Aura: kittens are 5% more effective', pic: 4, - cost: function () { return Game.cookies >= 1000000 * 16; }, - buy: function () { Game.Spend(1000000 * 16); }, - costStr: function () { return loc("%1 cookie", LBeautify(1000000 * 16)); } - }, - { name: 'Krumblor, cookie hatchling', action: 'Train Dragon Cursor
Aura: clicking is 5% more effective', pic: 4, }, - { name: 'Krumblor, cookie hatchling', action: 'Train Elder Battalion
Aura: grandmas gain +1% CpS for every non-grandma building', pic: 4, }, - { name: 'Krumblor, cookie hatchling', action: 'Train Reaper of Fields
Aura: golden cookies may trigger a Dragon Harvest', pic: 4, }, - { name: 'Krumblor, cookie dragon', action: 'Train Earth Shatterer
Aura: buildings sell back for 50% instead of 25%', pic: 5, }, - { name: 'Krumblor, cookie dragon', action: 'Train Master of the Armory
Aura: all upgrades are 2% cheaper', pic: 5, }, - { name: 'Krumblor, cookie dragon', action: 'Train Fierce Hoarder
Aura: all buildings are 2% cheaper', pic: 5, }, - { name: 'Krumblor, cookie dragon', action: 'Train Dragon God
Aura: prestige CpS bonus +5%', pic: 5, }, - { name: 'Krumblor, cookie dragon', action: 'Train Arcane Aura
Aura: golden cookies appear 5% more often', pic: 5, }, - { name: 'Krumblor, cookie dragon', action: 'Train Dragonflight
Aura: golden cookies may trigger a Dragonflight', pic: 5, }, - { name: 'Krumblor, cookie dragon', action: 'Train Ancestral Metamorphosis
Aura: golden cookies give 10% more cookies', pic: 5, }, - { name: 'Krumblor, cookie dragon', action: 'Train Unholy Dominion
Aura: wrath cookies give 10% more cookies', pic: 5, }, - { name: 'Krumblor, cookie dragon', action: 'Train Epoch Manipulator
Aura: golden cookie effects last 5% longer', pic: 5, }, - { name: 'Krumblor, cookie dragon', action: 'Train Mind Over Matter
Aura: +25% random drops', pic: 5, }, - { name: 'Krumblor, cookie dragon', action: 'Train Radiant Appetite
Aura: all cookie production multiplied by 2', pic: 5, }, - { name: 'Krumblor, cookie dragon', action: 'Train Dragon\'s Fortune
Aura: +123% CpS per golden cookie on-screen', pic: 5, }, - { name: 'Krumblor, cookie dragon', action: 'Train Dragon\'s Curve
Aura: sugar lumps grow 5% faster, 50% weirder', pic: 5, }, - { name: 'Krumblor, cookie dragon', action: 'Train Reality Bending
Aura: 10% of every other aura, combined', pic: 5, }, - { name: 'Krumblor, cookie dragon', action: 'Train Dragon Orbs
Aura: selling your best building may grant a wish', pic: 5, }, - { name: 'Krumblor, cookie dragon', action: 'Train Supreme Intellect
Aura: confers various powers to your minigames', pic: 5, }, - { name: 'Krumblor, cookie dragon', action: 'Train Dragon Guts
Aura: enhanced wrinklers', pic: 5, }, - { - name: 'Krumblor, cookie dragon', action: loc("Bake dragon cookie") + '
' + loc("Delicious!") + '', pic: 6, - cost: function () { var fail = 0; for (var i in Game.Objects) { if (Game.Objects[i].amount < 50) fail = 1; } return (fail == 0); }, - buy: function () { for (var i in Game.Objects) { Game.Objects[i].sacrifice(50); } Game.Unlock('Dragon cookie'); }, - costStr: function () { return loc("%1 of every building", 50); } - }, - { - name: 'Krumblor, cookie dragon', action: loc("Train secondary aura") + '
' + loc("Lets you use two dragon auras simultaneously") + '', pic: 7, - cost: function () { var fail = 0; for (var i in Game.Objects) { if (Game.Objects[i].amount < 200) fail = 1; } return (fail == 0); }, - buy: function () { for (var i in Game.Objects) { Game.Objects[i].sacrifice(200); } }, - costStr: function () { return loc("%1 of every building", 200); } - }, - { name: 'Krumblor, cookie dragon', action: loc("Your dragon is fully trained."), pic: 8 } - ]; - - Game.dragonAuras = { - 0: { name: 'No aura', pic: [0, 7], desc: loc("Select an aura from those your dragon knows.") }, - 1: { name: 'Breath of Milk', pic: [18, 25], desc: loc("Kittens are %1% more effective.", 5) }, - 2: { name: 'Dragon Cursor', pic: [0, 25], desc: loc("Clicking is %1% more powerful.", 5) }, - 3: { name: 'Elder Battalion', pic: [1, 25], desc: loc("Grandmas gain +%1% CpS for each non-grandma building.", 1) }, - 4: { name: 'Reaper of Fields', pic: [2, 25], desc: loc("Golden cookies may trigger a Dragon Harvest.") }, - 5: { name: 'Earth Shatterer', pic: [3, 25], desc: loc("Buildings sell back for %1% instead of %2%.", [50, 25]) }, - 6: { name: 'Master of the Armory', pic: [4, 25], desc: loc("All upgrades are %1% cheaper.", 2) }, - 7: { name: 'Fierce Hoarder', pic: [15, 25], desc: loc("All buildings are %1% cheaper.", 2) }, - 8: { name: 'Dragon God', pic: [16, 25], desc: loc("+%1% prestige level effect on CpS.", 5) }, - 9: { name: 'Arcane Aura', pic: [17, 25], desc: loc("Golden cookies appear %1% more often.", 5) }, - 10: { name: 'Dragonflight', pic: [5, 25], desc: loc("Golden cookies may trigger a Dragonflight.") }, - 11: { name: 'Ancestral Metamorphosis', pic: [6, 25], desc: loc("Golden cookies give %1% more cookies.", 10) }, - 12: { name: 'Unholy Dominion', pic: [7, 25], desc: loc("Wrath cookies give %1% more cookies.", 10) }, - 13: { name: 'Epoch Manipulator', pic: [8, 25], desc: loc("Golden cookies stay %1% longer.", 5) }, - 14: { name: 'Mind Over Matter', pic: [13, 25], desc: loc("Random drops are %1% more common.", 25) }, - 15: { name: 'Radiant Appetite', pic: [14, 25], desc: loc("All cookie production multiplied by %1.", 2) }, - 16: { name: 'Dragon\'s Fortune', pic: [19, 25], desc: loc("+%1% CpS per golden cookie on-screen, multiplicative.", 123) }, - 17: { name: 'Dragon\'s Curve', pic: [20, 25], desc: loc("+%1% sugar lump growth.", 5) + " " + loc("Sugar lumps are twice as likely to be unusual.") }, - 18: { name: 'Reality Bending', pic: [32, 25], desc: loc("One tenth of every other dragon aura, combined.") }, - 19: { name: 'Dragon Orbs', pic: [33, 25], desc: loc("With no buffs and no golden cookies on screen, selling your most powerful building has %1% chance to summon one.", 10) }, - 20: { name: 'Supreme Intellect', pic: [34, 25], desc: loc("Confers various powers to your minigames while active.
See the bottom of each minigame for more details.") }, - 21: { name: 'Dragon Guts', pic: [35, 25], desc: loc("You can attract %1 more wrinklers.", 2) + '
' + loc("Wrinklers digest %1% more cookies.", 20) + '
' + loc("Wrinklers explode into %1% more cookies.", 20) }, - }; - - Game.dragonAurasBN = {}; for (var i in Game.dragonAuras) { Game.dragonAurasBN[Game.dragonAuras[i].name] = Game.dragonAuras[i]; } - for (var i in Game.dragonAuras) { Game.dragonAuras[i].id = parseInt(i); Game.dragonAuras[i].dname = loc(Game.dragonAuras[i].name); } - - for (var i = 0; i < Game.dragonLevels.length; i++) { - var it = Game.dragonLevels[i]; - it.name = loc(it.name); - if (i >= 4 && i < Game.dragonLevels.length - 3) { - if (!EN) it.action = loc("Train %1", Game.dragonAuras[i - 3].dname) + '
' + loc("Aura: %1", Game.dragonAuras[i - 3].desc) + ''; - if (i >= 5) { - it.costStr = function (building) { return function () { return loc("%1 " + building.bsingle, LBeautify(100)); } }(Game.ObjectsById[i - 5]); - it.cost = function (building) { return function () { return building.amount >= 100; } }(Game.ObjectsById[i - 5]); - it.buy = function (building) { return function () { building.sacrifice(100); } }(Game.ObjectsById[i - 5]); - } - } - } - - Game.hasAura = function (what) { - if (Game.dragonAuras[Game.dragonAura].name == what || Game.dragonAuras[Game.dragonAura2].name == what) return true; else return false; - } - Game.auraMult = function (what) { - var n = 0; - if (Game.dragonAuras[Game.dragonAura].name == what || Game.dragonAuras[Game.dragonAura2].name == what) n = 1; - if ((Game.dragonAuras[Game.dragonAura].name == 'Reality Bending' || Game.dragonAuras[Game.dragonAura2].name == 'Reality Bending') && Game.dragonLevel >= Game.dragonAurasBN[what].id + 4) n += 0.1; - return n; - } - - Game.SelectDragonAura = function (slot, update) { - var currentAura = 0; - var otherAura = 0; - if (slot == 0) currentAura = Game.dragonAura; else currentAura = Game.dragonAura2; - if (slot == 0) otherAura = Game.dragonAura2; else otherAura = Game.dragonAura; - if (!update) Game.SelectingDragonAura = currentAura; - - var str = ''; - for (var i in Game.dragonAuras) { - if (Game.dragonLevel >= parseInt(i) + 4) { - var icon = Game.dragonAuras[i].pic; - if (i == 0 || i != otherAura) str += '
'; - } - } - - var highestBuilding = 0; - for (var i in Game.Objects) { if (Game.Objects[i].amount > 0) highestBuilding = Game.Objects[i]; } - - Game.Prompt('

' + loc(slot == 1 ? "Set your dragon's secondary aura" : "Set your dragon's aura") + '

' + - '
' + - '
' + - '
' + str + '
' + - '
' + - '
' + (highestBuilding == 0 ? loc("Switching your aura is free because you own no buildings.") : loc("The cost of switching your aura is %1.
This will affect your CpS!", loc("%1 " + highestBuilding.bsingle, LBeautify(1)))) + '
' - , [[loc("Confirm"), (slot == 0 ? 'Game.dragonAura' : 'Game.dragonAura2') + '=Game.SelectingDragonAura;' + (highestBuilding == 0 || currentAura == Game.SelectingDragonAura ? '' : 'Game.ObjectsById[' + highestBuilding.id + '].sacrifice(1);') + 'Game.ToggleSpecialMenu(1);Game.ClosePrompt();'], loc("Cancel")], 0, 'widePrompt'); - Game.DescribeDragonAura(Game.SelectingDragonAura); - } - Game.SelectingDragonAura = -1; - Game.SetDragonAura = function (aura, slot) { - Game.SelectingDragonAura = aura; - Game.SelectDragonAura(slot, 1); - } - Game.DescribeDragonAura = function (aura) { - l('dragonAuraInfo').innerHTML = - '

' + Game.dragonAuras[aura].dname + '

' + - '
' + - Game.dragonAuras[aura].desc + - '
'; - } - - Game.UpgradeDragon = function () { - if (Game.dragonLevel < Game.dragonLevels.length - 1 && Game.dragonLevels[Game.dragonLevel].cost()) { - PlaySound('snd/shimmerClick.mp3'); - Game.dragonLevels[Game.dragonLevel].buy(); - Game.dragonLevel = (Game.dragonLevel + 1) % Game.dragonLevels.length; - - if (Game.dragonLevel >= Game.dragonLevels.length - 1) Game.Win('Here be dragon'); - Game.ToggleSpecialMenu(1); - if (l('specialPic')) { var rect = l('specialPic').getBounds(); Game.SparkleAt((rect.left + rect.right) / 2, (rect.top + rect.bottom) / 2) + 32 - TopBarOffset; } - Game.recalculateGains = 1; - Game.upgradesToRebuild = 1; - } - } - - Game.lastClickedSpecialPic = 0; - Game.ClickSpecialPic = function () { - if (Game.specialTab == 'dragon' && Game.dragonLevel >= 4 && Game.Has('Pet the dragon') && l('specialPic')) { - triggerAnim(l('specialPic'), 'pucker'); - PlaySound('snd/click' + Math.floor(Math.random() * 7 + 1) + '.mp3', 0.3); - if (Date.now() - Game.lastClickedSpecialPic > 2000) PlaySound('snd/growl.mp3'); - //else if (Math.random()<0.5) PlaySound('snd/growl.mp3',0.5+Math.random()*0.2); - Game.lastClickedSpecialPic = Date.now(); - if (Game.prefs.particles) { - Game.particleAdd(Game.mouseX, Game.mouseY - 32, Math.random() * 4 - 2, Math.random() * -2 - 4, Math.random() * 0.2 + 0.5, 1, 2, [20, 3]); - } - if (Game.dragonLevel >= 8 && Math.random() < 1 / 20) { - Math.seedrandom(Game.seed + '/dragonTime'); - var drops = ['Dragon scale', 'Dragon claw', 'Dragon fang', 'Dragon teddy bear']; - drops = shuffle(drops); - var drop = drops[Math.floor((new Date().getMinutes() / 60) * drops.length)]; - if (!Game.Has(drop) && !Game.HasUnlocked(drop)) { - Game.Unlock(drop); - Game.Notify(drop, '' + loc("Your dragon dropped something!") + '', Game.Upgrades[drop].icon); - } - Math.seedrandom(); - } - } - } - - Game.ToggleSpecialMenu = function (on) { - if (on) { - var pic = ''; - var frame = 0; - if (Game.specialTab == 'santa') { pic = 'santa.png?v=' + Game.version; frame = Game.santaLevel; } - else if (Game.specialTab == 'dragon') { pic = 'dragon.png?v=' + Game.version; frame = Game.dragonLevels[Game.dragonLevel].pic; } - else { pic = 'dragon.png?v=' + Game.version; frame = 4; } - - var str = '
'; - str += '
x
'; - - if (Game.specialTab == 'santa') { - var moni = Math.pow(Game.santaLevel + 1, Game.santaLevel + 1); - - str += '

' + Game.santaLevels[Game.santaLevel] + '

'; - if (Game.santaLevel < 14) { - str += '
' + - '' + - ''; - } - } - else if (Game.specialTab == 'dragon') { - var level = Game.dragonLevels[Game.dragonLevel]; - - str += '

' + level.name + '

'; - - if (Game.dragonLevel >= 5) { - var icon = Game.dragonAuras[Game.dragonAura].pic; - str += '

' + Game.dragonAuras[Game.dragonAura].dname + '

' + - '
' + - Game.dragonAuras[Game.dragonAura].desc + - '
' - , 'top') + - '>'; - } - if (Game.dragonLevel >= 27)//2nd aura slot; increased with last building - { - var icon = Game.dragonAuras[Game.dragonAura2].pic; - str += '

' + Game.dragonAuras[Game.dragonAura2].dname + '

' + - '
' + - Game.dragonAuras[Game.dragonAura2].desc + - '
' - , 'top') + - '>'; - } - - if (Game.dragonLevel < Game.dragonLevels.length - 1) { - str += '
' + - '' + - ''; - } - else { - str += '
' + - '
' + level.action + '
'; - } - } - - l('specialPopup').innerHTML = str; - - l('specialPopup').className = 'framed prompt onScreen'; - } - else { - if (Game.specialTab != '') { - Game.specialTab = ''; - l('specialPopup').className = 'framed prompt offScreen'; - setTimeout(function () { if (Game.specialTab == '') {/*l('specialPopup').style.display='none';*/l('specialPopup').innerHTML = ''; } }, 1000 * 0.2); - } - } - } - Game.DrawSpecial = function () { - var len = Game.specialTabs.length; - if (len == 0) return; - Game.LeftBackground.globalAlpha = 1; - var y = Game.LeftBackground.canvas.height - 24 - 48 * len; - var tabI = 0; - - for (var i in Game.specialTabs) { - var selected = 0; - var hovered = 0; - if (Game.specialTab == Game.specialTabs[i]) selected = 1; - if (Game.specialTabHovered == Game.specialTabs[i]) hovered = 1; - var x = 24; - var s = 1; - var pic = ''; - var frame = 0; - if (hovered) { s = 1; x = 24; } - if (selected) { s = 1; x = 48; } - - if (Game.specialTabs[i] == 'santa') { pic = 'santa.png?v=' + Game.version; frame = Game.santaLevel; } - else if (Game.specialTabs[i] == 'dragon') { pic = 'dragon.png?v=' + Game.version; frame = Game.dragonLevels[Game.dragonLevel].pic; } - else { pic = 'dragon.png?v=' + Game.version; frame = 4; } - - if (hovered || selected) { - var ss = s * 64; - var r = Math.floor((Game.T * 0.5) % 360); - Game.LeftBackground.save(); - Game.LeftBackground.translate(x, y); - if (Game.prefs.fancy) Game.LeftBackground.rotate((r / 360) * Math.PI * 2); - Game.LeftBackground.globalAlpha = 0.75; - Game.LeftBackground.drawImage(Pic('shine.png'), -ss / 2, -ss / 2, ss, ss); - Game.LeftBackground.restore(); - } - - if (Game.prefs.fancy) Game.LeftBackground.drawImage(Pic(pic), 96 * frame, 0, 96, 96, (x + (selected ? 0 : Math.sin(Game.T * 0.2 + tabI) * 3) - 24 * s), (y - (selected ? 6 : Math.abs(Math.cos(Game.T * 0.2 + tabI)) * 6) - 24 * s), 48 * s, 48 * s); - else Game.LeftBackground.drawImage(Pic(pic), 96 * frame, 0, 96, 96, (x - 24 * s), (y - 24 * s), 48 * s, 48 * s); - - tabI++; - y += 48; - } - - } - - /*===================================================================================== - VISUAL EFFECTS - =======================================================================================*/ - - Game.AllMilks = [ - { name: 'Automatic', icon: [0, 7], type: -1, pic: 'milkPlain' }, - { name: 'Plain milk', icon: [1, 8], type: 0, pic: 'milkPlain' }, - { name: 'Chocolate milk', icon: [2, 8], type: 0, pic: 'milkChocolate' }, - { name: 'Raspberry milk', icon: [3, 8], type: 0, pic: 'milkRaspberry' }, - { name: 'Orange milk', icon: [4, 8], type: 0, pic: 'milkOrange' }, - { name: 'Caramel milk', icon: [5, 8], type: 0, pic: 'milkCaramel' }, - { name: 'Banana milk', icon: [6, 8], type: 0, pic: 'milkBanana' }, - { name: 'Lime milk', icon: [7, 8], type: 0, pic: 'milkLime' }, - { name: 'Blueberry milk', icon: [8, 8], type: 0, pic: 'milkBlueberry' }, - { name: 'Strawberry milk', icon: [9, 8], type: 0, pic: 'milkStrawberry' }, - { name: 'Vanilla milk', icon: [10, 8], type: 0, pic: 'milkVanilla' }, - { name: 'Zebra milk', icon: [10, 7], type: 1, pic: 'milkZebra' }, - { name: 'Cosmic milk', icon: [9, 7], type: 1, pic: 'milkStars' }, - { name: 'Flaming milk', icon: [8, 7], type: 1, pic: 'milkFire' }, - { name: 'Sanguine milk', icon: [7, 7], type: 1, pic: 'milkBlood' }, - { name: 'Midas milk', icon: [6, 7], type: 1, pic: 'milkGold' }, - { name: 'Midnight milk', icon: [5, 7], type: 1, pic: 'milkBlack' }, - { name: 'Green inferno milk', icon: [4, 7], type: 1, pic: 'milkGreenFire' }, - { name: 'Frostfire milk', icon: [3, 7], type: 1, pic: 'milkBlueFire' }, - { name: 'Honey milk', icon: [21, 23], type: 0, pic: 'milkHoney' }, - { name: 'Coffee milk', icon: [22, 23], type: 0, pic: 'milkCoffee' }, - { name: 'Tea milk', icon: [23, 23], type: 0, pic: 'milkTea' }, - { name: 'Coconut milk', icon: [24, 23], type: 0, pic: 'milkCoconut' }, - { name: 'Cherry milk', icon: [25, 23], type: 0, pic: 'milkCherry' }, - { name: 'Soy milk', icon: [27, 23], type: 1, pic: 'milkSoy' }, - { name: 'Spiced milk', icon: [26, 23], type: 0, pic: 'milkSpiced' }, - { name: 'Maple milk', icon: [28, 23], type: 0, pic: 'milkMaple' }, - { name: 'Mint milk', icon: [29, 23], type: 0, pic: 'milkMint' }, - { name: 'Licorice milk', icon: [30, 23], type: 0, pic: 'milkLicorice' }, - { name: 'Rose milk', icon: [31, 23], type: 0, pic: 'milkRose' }, - { name: 'Dragonfruit milk', icon: [21, 24], type: 0, pic: 'milkDragonfruit' }, - { name: 'Melon milk', icon: [22, 24], type: 0, pic: 'milkMelon' }, - { name: 'Blackcurrant milk', icon: [23, 24], type: 0, pic: 'milkBlackcurrant' }, - { name: 'Peach milk', icon: [24, 24], type: 0, pic: 'milkPeach' }, - { name: 'Hazelnut milk', icon: [25, 24], type: 0, pic: 'milkHazelnut' }, - ]; - - Game.Milks = []; - for (var i = 0; i < Game.AllMilks.length; i++) { - Game.AllMilks[i].bname = Game.AllMilks[i].name; - Game.AllMilks[i].name = loc(Game.AllMilks[i].name); - Game.AllMilks[i].pic += '.png'; - if (Game.AllMilks[i].type == 0) { - Game.AllMilks[i].rank = Game.Milks.length; - Game.Milks.push(Game.AllMilks[i]); - } - } - Game.Milk = Game.Milks[0]; - - Game.mousePointer = 0;//when 1, draw the mouse as a pointer on the left screen - - Game.cookieOriginX = 0; - Game.cookieOriginY = 0; - Game.DrawBackground = function () { - - Timer.clean(); - //background - if (!Game.Background)//init some stuff - { - Game.Background = l('backgroundCanvas').getContext('2d'); - Game.Background.canvas.width = Game.Background.canvas.parentNode.offsetWidth; - Game.Background.canvas.height = Game.Background.canvas.parentNode.offsetHeight; - Game.LeftBackground = l('backgroundLeftCanvas').getContext('2d'); - Game.LeftBackground.canvas.width = Game.LeftBackground.canvas.parentNode.offsetWidth; - Game.LeftBackground.canvas.height = Game.LeftBackground.canvas.parentNode.offsetHeight; - //preload ascend animation bits so they show up instantly - Game.LeftBackground.globalAlpha = 0; - Game.LeftBackground.drawImage(Pic('brokenCookie.png'), 0, 0); - Game.LeftBackground.drawImage(Pic('brokenCookieHalo.png'), 0, 0); - Game.LeftBackground.drawImage(Pic('starbg.jpg'), 0, 0); - - window.addEventListener('resize', function (event) { - 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; - }); - } - - var ctx = Game.LeftBackground; - - if (Game.OnAscend) { - Timer.clean(); - //starry background on ascend screen - var w = Game.Background.canvas.width; - var h = Game.Background.canvas.height; - var b = Game.ascendl.getBounds(); - var x = (b.left + b.right) / 2; - var y = (b.top + b.bottom) / 2; - Game.Background.globalAlpha = 0.5; - var s = 1 * Game.AscendZoom * (1 + Math.cos(Game.T * 0.0027) * 0.05); - Game.Background.fillPattern(Pic('starbg.jpg'), 0, 0, w, h, 1024 * s, 1024 * s, x + Game.AscendOffX * 0.25 * s, y + Game.AscendOffY * 0.25 * s); - Timer.track('star layer 1'); - if (Game.prefs.fancy) { - //additional star layer - Game.Background.globalAlpha = 0.5 * (0.5 + Math.sin(Game.T * 0.02) * 0.3); - var s = 2 * Game.AscendZoom * (1 + Math.sin(Game.T * 0.002) * 0.07); - //Game.Background.globalCompositeOperation='lighter'; - Game.Background.fillPattern(Pic('starbg.jpg'), 0, 0, w, h, 1024 * s, 1024 * s, x + Game.AscendOffX * 0.25 * s, y + Game.AscendOffY * 0.25 * s); - //Game.Background.globalCompositeOperation='source-over'; - Timer.track('star layer 2'); - - x = x + Game.AscendOffX * Game.AscendZoom; - y = y + Game.AscendOffY * Game.AscendZoom; - //wispy nebula around the center - Game.Background.save(); - Game.Background.globalAlpha = 0.5; - Game.Background.translate(x, y); - Game.Background.globalCompositeOperation = 'lighter'; - Game.Background.rotate(Game.T * 0.001); - s = (600 + 150 * Math.sin(Game.T * 0.007)) * Game.AscendZoom; - Game.Background.drawImage(Pic('heavenRing1.jpg'), -s / 2, -s / 2, s, s); - Game.Background.rotate(-Game.T * 0.0017); - s = (600 + 150 * Math.sin(Game.T * 0.0037)) * Game.AscendZoom; - Game.Background.drawImage(Pic('heavenRing2.jpg'), -s / 2, -s / 2, s, s); - Game.Background.restore(); - Timer.track('nebula'); - - //Game.Background.drawImage(Pic('shadedBorders.png'),0,0,w,h); - //Timer.track('border'); - } - } - else { - - var goodBuff = 0; - var badBuff = 0; - for (var i in Game.buffs) { - if (Game.buffs[i].aura == 1) goodBuff = 1; - if (Game.buffs[i].aura == 2) badBuff = 1; - } - - if (Game.drawT % 5 == 0) { - if (false && Game.bgType != 0 && Game.ascensionMode != 1) { - //l('backgroundCanvas').style.background='url('+Game.resPath+'img/shadedBordersSoft.png) 0px 0px,url('+Game.resPath+'img/bgWheat.jpg) 50% 50%'; - //l('backgroundCanvas').style.backgroundSize='100% 100%,cover'; - } - else { - l('backgroundCanvas').style.background = 'transparent'; - Game.defaultBg = 'bgBlue'; - Game.bgR = 0; - - if (Game.season == 'fools') Game.defaultBg = 'bgMoney'; - if (Game.elderWrathD < 1 || Game.prefs.notScary) { - Game.bgR = 0; - Game.bg = Game.defaultBg; - Game.bgFade = Game.defaultBg; - } - else if (Game.elderWrathD >= 1 && Game.elderWrathD < 2) { - Game.bgR = (Game.elderWrathD - 1) / 1; - Game.bg = Game.defaultBg; - Game.bgFade = 'grandmas1'; - } - else if (Game.elderWrathD >= 2 && Game.elderWrathD < 3) { - Game.bgR = (Game.elderWrathD - 2) / 1; - Game.bg = 'grandmas1'; - Game.bgFade = 'grandmas2'; - } - else if (Game.elderWrathD >= 3)// && Game.elderWrathD<4) - { - Game.bgR = (Game.elderWrathD - 3) / 1; - Game.bg = 'grandmas2'; - Game.bgFade = 'grandmas3'; - } - - if (Game.bgType != 0 && Game.ascensionMode != 1) { - Game.bgR = 0; - Game.bg = Game.BGsByChoice[Game.bgType].pic; - Game.bgFade = Game.bg; - } - - Game.Background.fillPattern(Pic(Game.bg + '.jpg'), 0, 0, Game.Background.canvas.width, Game.Background.canvas.height, 512, 512, 0, 0); - if (Game.bgR > 0) { - Game.Background.globalAlpha = Game.bgR; - Game.Background.fillPattern(Pic(Game.bgFade + '.jpg'), 0, 0, Game.Background.canvas.width, Game.Background.canvas.height, 512, 512, 0, 0); - } - Game.Background.globalAlpha = 1; - Game.Background.drawImage(Pic('shadedBordersSoft.png'), 0, 0, Game.Background.canvas.width, Game.Background.canvas.height); - } - - } - Timer.track('window background'); - - //clear - ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height); - /*if (Game.AscendTimer= 1000) pic = 'cookieShower3.png'; - else if (Game.cookiesPs >= 500) pic = 'cookieShower2.png'; - else if (Game.cookiesPs >= 50) pic = 'cookieShower1.png'; - else pic = ''; - } - if (pic != '') { - if (Game.elderWrathD >= 1 && !Game.prefs.notScary) opacity = 1 - ((Math.min(Game.elderWrathD, 1.5) - 1) / 0.5); - ctx.globalAlpha = opacity; - var y = (Math.floor(Game.T * 2) % 512); - ctx.fillPattern(Pic(pic), 0, 0, ctx.canvas.width, ctx.canvas.height + 512, 512, 512, 0, y); - ctx.globalAlpha = 1; - } - //snow - if (Game.season == 'christmas') { - var y = (Math.floor(Game.T * 2.5) % 512); - ctx.globalAlpha = 0.75; - ctx.globalCompositeOperation = 'lighter'; - ctx.fillPattern(Pic('snow2.jpg'), 0, 0, ctx.canvas.width, ctx.canvas.height + 512, 512, 512, 0, y); - ctx.globalCompositeOperation = 'source-over'; - ctx.globalAlpha = 1; - } - //hearts - if (Game.season == 'valentines') { - var y = (Math.floor(Game.T * 2.5) % 512); - ctx.globalAlpha = 1; - ctx.fillPattern(Pic('heartStorm.png'), 0, 0, ctx.canvas.width, ctx.canvas.height + 512, 512, 512, 0, y); - ctx.globalAlpha = 1; - } - Timer.track('left background'); - - Game.particlesDraw(0); - ctx.globalAlpha = 1; - Timer.track('particles'); - - //big cookie shine - var s = 512; - - var x = Game.cookieOriginX; - var y = Game.cookieOriginY; - - var r = Math.floor((Game.T * 0.5) % 360); - ctx.save(); - ctx.translate(x, y); - ctx.rotate((r / 360) * Math.PI * 2); - var alphaMult = 1; - if (Game.bgType == 2 || Game.bgType == 4) alphaMult = 0.5; - var pic = 'shine.png'; - if (goodBuff) { pic = 'shineGold.png'; alphaMult = 1; } - else if (badBuff) { pic = 'shineRed.png'; alphaMult = 1; } - if (goodBuff && Game.prefs.fancy) ctx.globalCompositeOperation = 'lighter'; - ctx.globalAlpha = 0.5 * alphaMult; - ctx.drawImage(Pic(pic), -s / 2, -s / 2, s, s); - ctx.rotate((-r * 2 / 360) * Math.PI * 2); - ctx.globalAlpha = 0.25 * alphaMult; - ctx.drawImage(Pic(pic), -s / 2, -s / 2, s, s); - ctx.restore(); - Timer.track('shine'); - - if (Game.ReincarnateTimer > 0) { - ctx.globalAlpha = 1 - Game.ReincarnateTimer / Game.ReincarnateDuration; - ctx.fillStyle = '#000'; - ctx.fillRect(0, 0, ctx.canvas.width, ctx.canvas.height); - ctx.globalAlpha = 1; - } - - if (showDragon) { - //big dragon - var s = 300 * 2 * (1 + Math.sin(Game.T * 0.013) * 0.1); - var x = Game.cookieOriginX - s / 2; - var y = Game.cookieOriginY - s / (1.4 + 0.2 * Math.sin(Game.T * 0.01)); - ctx.drawImage(Pic('dragonBG.png'), x, y, s, s); - } - - //big cookie - if (false)//don't do that - { - ctx.globalAlpha = 1; - var amount = Math.floor(Game.cookies).toString(); - var digits = amount.length; - var space = 0; - for (var i = 0; i < digits; i++) { - var s = 16 * (digits - i); - var num = parseInt(amount[i]); - if (i > 0) space -= s * (1 - num / 10) / 2; - if (i == 0 && num > 1) space += s * 0.1; - for (var ii = 0; ii < num; ii++) { - var x = Game.cookieOriginX; - var y = Game.cookieOriginY; - var spin = Game.T * (0.005 + i * 0.001) + i + (ii / num) * Math.PI * 2; - x += Math.sin(spin) * space; - y += Math.cos(spin) * space; - ctx.drawImage(Pic('perfectCookie.png'), x - s / 2, y - s / 2, s, s); - } - space += s / 2; - } - } - else { - ctx.globalAlpha = 1; - var s = 256 * Game.BigCookieSize; - var x = Game.cookieOriginX; - var y = Game.cookieOriginY; - ctx.save(); - if (Game.prefs.fancy) ctx.drawImage(Pic('cookieShadow.png'), x - s / 2, y - s / 2 + 20, s, s); - ctx.translate(x, y); - if (Game.season == 'easter') { - var nestW = 304 * 0.98 * Game.BigCookieSize; - var nestH = 161 * 0.98 * Game.BigCookieSize; - ctx.drawImage(Pic('nest.png'), -nestW / 2, -nestH / 2 + 130, nestW, nestH); - } - //ctx.rotate(((Game.startDate%360)/360)*Math.PI*2); - ctx.drawImage(Pic('perfectCookie.png'), -s / 2, -s / 2, s, s); - - if (goodBuff && Game.prefs.particles)//sparkle - { - ctx.globalCompositeOperation = 'lighter'; - for (var i = 0; i < 1; i++) { - ctx.globalAlpha = Math.random() * 0.65 + 0.1; - var size = Math.random() * 30 + 5; - var a = Math.random() * Math.PI * 2; - var d = s * 0.9 * Math.random() / 2; - ctx.drawImage(Pic('glint.png'), -size / 2 + Math.sin(a) * d, -size / 2 + Math.cos(a) * d, size, size); - } - } - - ctx.restore(); - Timer.track('big cookie'); - } - } - else//no particles - { - //big cookie shine - var s = 512; - var x = Game.cookieOriginX - s / 2; - var y = Game.cookieOriginY - s / 2; - ctx.globalAlpha = 0.5; - ctx.drawImage(Pic('shine.png'), x, y, s, s); - - if (showDragon) { - //big dragon - var s = 300 * 2 * (1 + Math.sin(Game.T * 0.013) * 0.1); - var x = Game.cookieOriginX - s / 2; - var y = Game.cookieOriginY - s / (1.4 + 0.2 * Math.sin(Game.T * 0.01)); - ctx.drawImage(Pic('dragonBG.png'), x, y, s, s); - } - - //big cookie - ctx.globalAlpha = 1; - var s = 256 * Game.BigCookieSize; - var x = Game.cookieOriginX - s / 2; - var y = Game.cookieOriginY - s / 2; - if (Game.prefs.fancy) ctx.drawImage(Pic('cookieShadow.png'), x, y + 20, s, s); - ctx.drawImage(Pic('perfectCookie.png'), x, y, s, s); - } - - //cursors - if (Game.prefs.cursors) { - ctx.save(); - ctx.translate(Game.cookieOriginX, Game.cookieOriginY); - var pic = Pic('cursor.png'); - var fancy = Game.prefs.fancy; - - if (showDragon) ctx.globalAlpha = 0.25; - var amount = Game.Objects['Cursor'].amount; - //var spe=-1; - for (var i = 0; i < amount; i++) { - var n = Math.floor(i / 50); - //var a=((i+0.5*n)%50)/50; - var w = 0; - if (fancy) w = (Math.sin(Game.T * 0.025 + (((i + n * 12) % 25) / 25) * Math.PI * 2)); - if (w > 0.997) w = 1.5; - else if (w > 0.994) w = 0.5; - else w = 0; - w *= -4; - if (fancy) w += Math.sin((n + Game.T * 0.01) * Math.PI / 2) * 4; - var x = 0; - var y = (140/* *Game.BigCookieSize*/ + n * 16 + w) - 16; - - var rot = 7.2;//(1/50)*360 - if (i == 0 && fancy) rot -= Game.T * 0.1; - if (i % 50 == 0) rot += 7.2 / 2; - ctx.rotate((rot / 360) * Math.PI * 2); - ctx.drawImage(pic, 0, 0, 32, 32, x, y, 32, 32); - //ctx.drawImage(pic,32*(i==spe),0,32,32,x,y,32,32); - - /*if (i==spe) - { - y+=16; - x=Game.cookieOriginX+Math.sin(-((r-5)/360)*Math.PI*2)*y; - y=Game.cookieOriginY+Math.cos(-((r-5)/360)*Math.PI*2)*y; - if (Game.CanClick && ctx && Math.abs(Game.mouseX-x)<16 && Math.abs(Game.mouseY-y)<16) Game.mousePointer=1; - }*/ - } - ctx.restore(); - Timer.track('cursors'); - } - } - else { - var tBase = Math.max(0, (Game.AscendTimer - Game.AscendBreakpoint) / (Game.AscendDuration - Game.AscendBreakpoint)); - //big crumbling cookie - //var t=(3*Math.pow(tBase,2)-2*Math.pow(tBase,3));//S curve - var t = Math.pow(tBase, 0.5); - - var shake = 0; - if (Game.AscendTimer < Game.AscendBreakpoint) { shake = Game.AscendTimer / Game.AscendBreakpoint; } - //else {shake=1-t;} - - ctx.globalAlpha = 1; - - var x = Game.cookieOriginX; - var y = Game.cookieOriginY; - - x += (Math.random() * 2 - 1) * 10 * shake; - y += (Math.random() * 2 - 1) * 10 * shake; - - var s = 1; - if (tBase > 0) { - ctx.save(); - ctx.globalAlpha = 1 - Math.pow(t, 0.5); - ctx.translate(x, y); - ctx.globalCompositeOperation = 'lighter'; - ctx.rotate(Game.T * 0.007); - s = 0.5 + Math.pow(tBase, 0.6) * 1; - var s2 = (600) * s; - ctx.drawImage(Pic('heavenRing1.jpg'), -s2 / 2, -s2 / 2, s2, s2); - ctx.rotate(-Game.T * 0.002); - s = 0.5 + Math.pow(1 - tBase, 0.4) * 1; - s2 = (600) * s; - ctx.drawImage(Pic('heavenRing2.jpg'), -s2 / 2, -s2 / 2, s2, s2); - ctx.restore(); - } - - s = 256;//*Game.BigCookieSize; - - ctx.save(); - ctx.translate(x, y); - ctx.rotate((t * (-0.1)) * Math.PI * 2); - - var chunks = { 0: 7, 1: 6, 2: 3, 3: 2, 4: 8, 5: 1, 6: 9, 7: 5, 8: 0, 9: 4 }; - s *= t / 2 + 1; - /*ctx.globalAlpha=(1-t)*0.33; - for (var i=0;i<10;i++) - { - var d=(t-0.2)*(80+((i+2)%3)*40); - ctx.drawImage(Pic('brokenCookie.png'),256*(chunks[i]),0,256,256,-s/2+Math.sin(-(((chunks[i]+4)%10)/10)*Math.PI*2)*d,-s/2+Math.cos(-(((chunks[i]+4)%10)/10)*Math.PI*2)*d,s,s); - } - ctx.globalAlpha=(1-t)*0.66; - for (var i=0;i<10;i++) - { - var d=(t-0.1)*(80+((i+2)%3)*40); - ctx.drawImage(Pic('brokenCookie.png'),256*(chunks[i]),0,256,256,-s/2+Math.sin(-(((chunks[i]+4)%10)/10)*Math.PI*2)*d,-s/2+Math.cos(-(((chunks[i]+4)%10)/10)*Math.PI*2)*d,s,s); - }*/ - ctx.globalAlpha = 1 - t; - for (var i = 0; i < 10; i++) { - var d = (t) * (80 + ((i + 2) % 3) * 40); - var x2 = (Math.random() * 2 - 1) * 5 * shake; - var y2 = (Math.random() * 2 - 1) * 5 * shake; - ctx.drawImage(Pic('brokenCookie.png'), 256 * (chunks[i]), 0, 256, 256, -s / 2 + Math.sin(-(((chunks[i] + 4) % 10) / 10) * Math.PI * 2) * d + x2, -s / 2 + Math.cos(-(((chunks[i] + 4) % 10) / 10) * Math.PI * 2) * d + y2, s, s); - } - var brokenHalo = 1 - Math.min(t / (1 / 3), 1 / 3) * 3; - if (Game.AscendTimer < Game.AscendBreakpoint) brokenHalo = Game.AscendTimer / Game.AscendBreakpoint; - ctx.globalAlpha = brokenHalo; - ctx.drawImage(Pic('brokenCookieHalo.png'), -s / 1.3333, -s / 1.3333, s * 1.5, s * 1.5); - - ctx.restore(); - - //flares - var n = 9; - var t = Game.AscendTimer / Game.AscendBreakpoint; - if (Game.AscendTimer < Game.AscendBreakpoint) { - ctx.save(); - ctx.translate(x, y); - for (var i = 0; i < n; i++) { - if (Math.floor(t / 3 * n * 3 + i * 2.7) % 2) { - var t2 = Math.pow((t / 3 * n * 3 + i * 2.7) % 1, 1.5); - ctx.globalAlpha = (1 - t) * (Game.drawT % 2 == 0 ? 0.5 : 1); - var sw = (1 - t2 * 0.5) * 96; - var sh = (0.5 + t2 * 1.5) * 96; - ctx.drawImage(Pic('shineSpoke.png'), -sw / 2, -sh - 32 - (1 - t2) * 256, sw, sh); - } - ctx.rotate(Math.PI * 2 / n); - } - ctx.restore(); - } - - - //flash at breakpoint - if (tBase < 0.1 && tBase > 0) { - ctx.globalAlpha = 1 - tBase / 0.1; - ctx.fillStyle = '#fff'; - ctx.fillRect(0, 0, ctx.canvas.width, ctx.canvas.height); - ctx.globalAlpha = 1; - } - if (tBase > 0.8) { - ctx.globalAlpha = (tBase - 0.8) / 0.2; - ctx.fillStyle = '#000'; - ctx.fillRect(0, 0, ctx.canvas.width, ctx.canvas.height); - ctx.globalAlpha = 1; - } - } - - //milk and milk accessories - if (Game.prefs.milk) { - var width = ctx.canvas.width; - var height = ctx.canvas.height; - var x = Math.floor((Game.T * 2 - (Game.milkH - Game.milkHd) * 2000 + 480 * 2) % 480);//Math.floor((Game.T*2+Math.sin(Game.T*0.1)*2+Math.sin(Game.T*0.03)*2-(Game.milkH-Game.milkHd)*2000+480*2)%480); - var y = (Game.milkHd) * height;//(((Game.milkHd)*ctx.canvas.height)*(1+0.05*(Math.sin(Game.T*0.017)/2+0.5))); - var a = 1; - if (Game.AscendTimer > 0) { - y *= 1 - Math.pow((Game.AscendTimer / Game.AscendBreakpoint), 2) * 2; - a *= 1 - Math.pow((Game.AscendTimer / Game.AscendBreakpoint), 2) * 2; - } - else if (Game.ReincarnateTimer > 0) { - y *= 1 - Math.pow(1 - (Game.ReincarnateTimer / Game.ReincarnateDuration), 2) * 2; - a *= 1 - Math.pow(1 - (Game.ReincarnateTimer / Game.ReincarnateDuration), 2) * 2; - } - - if (Game.TOYS) { - //golly - if (!Game.Toy) { - Game.toys = []; - Game.toysType = choose([1, 2]); - Game.Toy = function (x, y) { - this.id = Game.toys.length; - this.x = x; - this.y = y; - this.xd = Math.random() * 10 - 5; - this.yd = Math.random() * 10 - 5; - this.r = Math.random() * Math.PI * 2; - this.rd = Math.random() * 0.1 - 0.05; - var v = Math.random(); var a = 0.5; var b = 0.5; - if (v <= a) v = b - b * Math.pow(1 - v / a, 3); else v = b + (1 - b) * Math.pow((v - a) / (1 - a), 3); - this.s = (Game.toysType == 1 ? 64 : 48) * (0.1 + v * 1.9); - if (Game.toysType == 2) this.s = (this.id % 10 == 1) ? 96 : 48; - this.st = this.s; this.s = 0; - var cookies = [[10, 0]]; - for (var i in Game.Upgrades) { - var cookie = Game.Upgrades[i]; - if (cookie.bought > 0 && cookie.pool == 'cookie') cookies.push(cookie.icon); - } - this.icon = choose(cookies); - this.dragged = false; - this.l = document.createElement('div'); - this.l.innerHTML = this.id; - this.l.style.cssText = 'cursor:pointer;border-radius:' + (this.s / 2) + 'px;opacity:0;width:' + this.s + 'px;height:' + this.s + 'px;background:#999;position:absolute;left:0px;top:0px;z-index:10000000;transform:translate(-1000px,-1000px);'; - l('sectionLeft').appendChild(this.l); - AddEvent(this.l, 'mousedown', function (what) { return function () { what.dragged = true; }; }(this)); - AddEvent(this.l, 'mouseup', function (what) { return function () { what.dragged = false; }; }(this)); - Game.toys.push(this); - return this; - } - for (var i = 0; i < Math.floor(Math.random() * 15 + (Game.toysType == 1 ? 5 : 30)); i++) { - new Game.Toy(Math.random() * width, Math.random() * height * 0.3); - } - } - ctx.globalAlpha = 0.5; - for (var i in Game.toys) { - var me = Game.toys[i]; - ctx.save(); - ctx.translate(me.x, me.y); - ctx.rotate(me.r); - if (Game.toysType == 1) ctx.drawImage(Pic('smallCookies.png'), (me.id % 8) * 64, 0, 64, 64, -me.s / 2, -me.s / 2, me.s, me.s); - else ctx.drawImage(Pic('icons.png'), me.icon[0] * 48, me.icon[1] * 48, 48, 48, -me.s / 2, -me.s / 2, me.s, me.s); - ctx.restore(); - } - ctx.globalAlpha = 1; - for (var i in Game.toys) { - var me = Game.toys[i]; - //psst... not real physics - for (var ii in Game.toys) { - var it = Game.toys[ii]; - if (it.id != me.id) { - var x1 = me.x + me.xd; - var y1 = me.y + me.yd; - var x2 = it.x + it.xd; - var y2 = it.y + it.yd; - var dist = Math.sqrt(Math.pow((x1 - x2), 2) + Math.pow((y1 - y2), 2)) / (me.s / 2 + it.s / 2); - if (dist < (Game.toysType == 1 ? 0.95 : 0.75)) { - var angle = Math.atan2(y1 - y2, x1 - x2); - var v1 = Math.sqrt(Math.pow((me.xd), 2) + Math.pow((me.yd), 2)); - var v2 = Math.sqrt(Math.pow((it.xd), 2) + Math.pow((it.yd), 2)); - var v = ((v1 + v2) / 2 + dist) * 0.75; - var ratio = it.s / me.s; - me.xd += Math.sin(-angle + Math.PI / 2) * v * (ratio); - me.yd += Math.cos(-angle + Math.PI / 2) * v * (ratio); - it.xd += Math.sin(-angle - Math.PI / 2) * v * (1 / ratio); - it.yd += Math.cos(-angle - Math.PI / 2) * v * (1 / ratio); - me.rd += (Math.random() * 1 - 0.5) * 0.1 * (ratio); - it.rd += (Math.random() * 1 - 0.5) * 0.1 * (1 / ratio); - me.rd *= Math.min(1, v); - it.rd *= Math.min(1, v); - } - } - } - if (me.y >= height - (Game.milkHd) * height + 8) { - me.xd *= 0.85; - me.yd *= 0.85; - me.rd *= 0.85; - me.yd -= 1; - me.xd += (Math.random() * 1 - 0.5) * 0.3; - me.yd += (Math.random() * 1 - 0.5) * 0.05; - me.rd += (Math.random() * 1 - 0.5) * 0.02; - } - else { - me.xd *= 0.99; - me.rd *= 0.99; - me.yd += 1; - } - me.yd *= (Math.min(1, Math.abs(me.y - (height - (Game.milkHd) * height) / 16))); - me.rd += me.xd * 0.01 / (me.s / (Game.toysType == 1 ? 64 : 48)); - if (me.x < me.s / 2 && me.xd < 0) me.xd = Math.max(0.1, -me.xd * 0.6); else if (me.x < me.s / 2) { me.xd = 0; me.x = me.s / 2; } - if (me.x > width - me.s / 2 && me.xd > 0) me.xd = Math.min(-0.1, -me.xd * 0.6); else if (me.x > width - me.s / 2) { me.xd = 0; me.x = width - me.s / 2; } - me.xd = Math.min(Math.max(me.xd, -30), 30); - me.yd = Math.min(Math.max(me.yd, -30), 30); - me.rd = Math.min(Math.max(me.rd, -0.5), 0.5); - me.x += me.xd; - me.y += me.yd; - me.r += me.rd; - me.r = me.r % (Math.PI * 2); - me.s += (me.st - me.s) * 0.5; - if (Game.toysType == 2 && !me.dragged && Math.random() < 0.003) me.st = choose([48, 48, 48, 48, 96]); - if (me.dragged) { - me.x = Game.mouseX; - me.y = Game.mouseY; - me.xd += ((Game.mouseX - Game.mouseX2) * 3 - me.xd) * 0.5; - me.yd += ((Game.mouseY - Game.mouseY2) * 3 - me.yd) * 0.5 - me.l.style.transform = 'translate(' + (me.x - me.s / 2) + 'px,' + (me.y - me.s / 2) + 'px) scale(50)'; - } - else me.l.style.transform = 'translate(' + (me.x - me.s / 2) + 'px,' + (me.y - me.s / 2) + 'px)'; - me.l.style.width = me.s + 'px'; - me.l.style.height = me.s + 'px'; - ctx.save(); - ctx.translate(me.x, me.y); - ctx.rotate(me.r); - if (Game.toysType == 1) ctx.drawImage(Pic('smallCookies.png'), (me.id % 8) * 64, 0, 64, 64, -me.s / 2, -me.s / 2, me.s, me.s); - else ctx.drawImage(Pic('icons.png'), me.icon[0] * 48, me.icon[1] * 48, 48, 48, -me.s / 2, -me.s / 2, me.s, me.s); - ctx.restore(); - } - } - - var pic = Game.Milk.pic; - if (Game.milkType != 0 && Game.ascensionMode != 1) pic = Game.AllMilks[Game.milkType].pic; - ctx.globalAlpha = 0.95 * a; - ctx.fillPattern(Pic(pic), 0, height - y, width + 480, 1, 480, 480, x, 0); - - ctx.fillStyle = '#000'; - ctx.fillRect(0, height - y + 480, width, Math.max(0, (y - 480))); - ctx.globalAlpha = 1; - - Timer.track('milk'); - } - - if (Game.AscendTimer > 0) { - ctx.drawImage(Pic('shadedBordersSoft.png'), 0, 0, ctx.canvas.width, ctx.canvas.height); - } - - if (Game.AscendTimer == 0) { - Game.DrawWrinklers(); Timer.track('wrinklers'); - - //shimmering veil - if (Game.Has('Shimmering veil [off]')) { - ctx.globalAlpha = 1; - ctx.globalCompositeOperation = 'lighter'; - var s = 300 + Math.sin(Game.T * 0.037) * 20; - var x = Game.cookieOriginX; - var y = Game.cookieOriginY; - ctx.save(); - ctx.translate(x, y); - ctx.rotate(-Game.T * 0.01); - ctx.drawImage(Pic('shimmeringVeil.png'), -s / 2, -s / 2, s, s); - ctx.restore(); - if (Game.prefs.particles)//sparkles - { - for (i = 0; i < 6; i++) { - var t = Game.T + i * 15; - var r = (t % 30) / 30; - var a = (Math.floor(t / 30) * 30 * 6 - i * 30) * 0.01; - var size = 32 * (1 - Math.pow(r * 2 - 1, 2)); - var xx = x + Math.sin(a) * (110 + r * 16); - var yy = y + Math.cos(a) * (110 + r * 16); - ctx.drawImage(Pic('glint.png'), xx - size / 2, yy - size / 2, size, size); - } - } - ctx.globalCompositeOperation = 'source-over'; - } - - Game.DrawSpecial(); Timer.track('evolvables'); - - Game.particlesDraw(2); Timer.track('text particles'); - - //shiny border during frenzies etc - ctx.globalAlpha = 1; - var borders = 'shadedBordersSoft.png'; - if (goodBuff) borders = 'shadedBordersGold.png'; - else if (badBuff) borders = 'shadedBordersRed.png'; - if (goodBuff && Game.prefs.fancy) ctx.globalCompositeOperation = 'lighter'; - ctx.drawImage(Pic(borders), 0, 0, ctx.canvas.width, ctx.canvas.height); - if (goodBuff && Game.prefs.fancy) ctx.globalCompositeOperation = 'source-over'; - } - } - }; - - - /*===================================================================================== - INITIALIZATION END; GAME READY TO LAUNCH - =======================================================================================*/ - - Game.killShimmers(); - - //booooo - Game.RuinTheFun = function (silent) { - Game.popups = 0; - Game.SetAllUpgrades(1); - Game.SetAllAchievs(1); - Game.popups = 0; - Game.Earn(999999999999999999999999999999); - Game.MaxSpecials(); - Game.nextResearch = 0; - Game.researchT = -1; - Game.upgradesToRebuild = 1; - Game.recalculateGains = 1; - Game.popups = 1; - for (var i in Game.Objects) { - var me = Game.Objects[i]; - if (me.level < 10) { - me.level = 9; - me.levelUp(true); - } - if (me.minigame && me.minigame.onRuinTheFun) me.minigame.onRuinTheFun(); - } - if (!silent) { - Game.Notify('Thou doth ruineth the fun!', 'You\'re free. Free at last.', [11, 5]); - } - return 'You feel a bitter taste in your mouth...'; - } - - Game.SetAllUpgrades = function (on) { - Game.popups = 0; - var leftout = ['Magic shenanigans', 'Occult obstruction', 'Glucose-charged air']; - for (var i in Game.Upgrades) { - if (on && (Game.Upgrades[i].pool == 'toggle' || leftout.indexOf(Game.Upgrades[i].name) != -1)) { } - else if (on) Game.Upgrades[i].earn(); - else if (!on) Game.Upgrades[i].lose(); - } - Game.upgradesToRebuild = 1; - Game.recalculateGains = 1; - Game.popups = 1; - } - Game.SetAllAchievs = function (on) { - Game.popups = 0; - for (var i in Game.Achievements) { - if (on && Game.Achievements[i].pool != 'dungeon') Game.Win(Game.Achievements[i].name); - else if (!on) Game.RemoveAchiev(Game.Achievements[i].name); - } - Game.recalculateGains = 1; - Game.popups = 1; - } - Game.GetAllDebugs = function () { - Game.popups = 0; - for (var i in Game.Upgrades) { - if (Game.Upgrades[i].pool == 'debug') Game.Upgrades[i].earn(); - } - Game.upgradesToRebuild = 1; - Game.recalculateGains = 1; - Game.popups = 1; - } - Game.MaxSpecials = function () { - Game.dragonLevel = Game.dragonLevels.length - 1; - Game.santaLevel = Game.santaLevels.length - 1; - } - - Game.SesameReset = function () { - var name = Game.bakeryName; - Game.HardReset(2); - Game.bakeryName = name; - Game.bakeryNameRefresh(); - Game.Achievements['Cheated cookies taste awful'].won = 1; - } - - Game.debugTimersOn = 0; - Game.sesame = 0; - Game.OpenSesame = function () { - var str = ''; - str += '
'; - str += '
'; - - str += '
'; - str += '
Dev tools
'; - - str += 'Ascend'; - str += '
'; - str += 'x10'; - str += '/10
'; - str += 'x1k'; - str += '/1k
'; - str += 'Buy 100 of all';//for (var n=0;n<100;n++){for (var i in Game.Objects){Game.Objects[i].buy(1);}} - str += 'Sell 100 of all
'; - str += '+10 lumps'; - str += 'Reset levels'; - str += 'HC x1k'; - str += 'HC /1k
';//wee bit inaccurate - str += 'Reset cookies earned
'; - str += '
'; - str += 'Ruin The Fun'; - str += 'Wipe'; - str += 'All debugs'; - str += 'Timers ' + (Game.debugTimersOn ? 'On' : 'Off') + '
'; - str += 'No upgrades'; - str += 'All upgrades
'; - str += 'No achievs'; - str += 'All achievs
'; - str += 'Reset specials'; - str += 'Max specials
'; - str += 'Reset refills'; - str += '' + (Game.DebuggingPrestige ? 'Exit Ascend Edit' : 'Ascend Edit') + ''; - str += 'Debug upgrades CpS'; - str += 'Re-seed'; - str += 'Max heralds'; - str += '
'; - for (var i = 0; i < Game.goldenCookieChoices.length / 2; i++) { - str += '' + Game.goldenCookieChoices[i * 2] + ''; - //str+=''+Game.goldenCookie.choices[i*2]+''; - //str+=''+Game.goldenCookie.choices[i*2]+''; - } - str += '
'; - - l('devConsole').innerHTML = str; - - if (!l('fpsGraph')) { - var div = document.createElement('canvas'); - div.id = 'fpsGraph'; - div.width = 128; - div.height = 64; - div.style.opacity = 0.5; - div.style.pointerEvents = 'none'; - div.style.transformOrigin = '0% 0%'; - div.style.transform = 'scale(0.75)'; - //l('devConsole').appendChild(div); - l('devConsole').parentNode.insertBefore(div, l('devConsole').nextSibling); - Game.fpsGraph = div; - Game.fpsGraphCtx = Game.fpsGraph.getContext('2d', { alpha: false }); - var ctx = Game.fpsGraphCtx; - ctx.fillStyle = '#000'; - ctx.fillRect(0, 0, 128, 64); - } - - l('debug').style.display = 'block'; - Game.sesame = 1; - Game.Achievements['Cheated cookies taste awful'].won = 1; - } - - - Game.loadAscendCalibrator = function () { - Game.loadAscendCalibrator = 0; - var script = document.createElement('script'); - script.setAttribute('src', 'ascendCalibrator.js' + '?r=' + Game.version); - document.head.appendChild(script); - } - Game.EditAscend = function () { - if (!Game.DebuggingPrestige) { - if (Game.loadAscendCalibrator) Game.loadAscendCalibrator(); - Game.DebuggingPrestige = true; - Game.AscendTimer = 0; - Game.OnAscend = 1; - Game.removeClass('ascendIntro'); - Game.addClass('ascending'); - } - else { - Game.DebuggingPrestige = false; - } - Game.BuildAscendTree(); - Game.OpenSesame(); - } - - //experimental debugging function that cycles through every owned upgrade, turns it off and on, and lists how much each upgrade is participating to CpS - Game.debuggedUpgradeCpS = []; - Game.debuggedUpgradeCpClick = []; - Game.debugColors = ['#322', '#411', '#600', '#900', '#f30', '#f90', '#ff0', '#9f0', '#0f9', '#09f', '#90f']; - Game.DebugUpgradeCpS = function () { - Game.CalculateGains(); - Game.debuggedUpgradeCpS = []; - Game.debuggedUpgradeCpClick = []; - var CpS = Game.cookiesPs; - var CpClick = Game.computedMouseCps; - for (var i in Game.Upgrades) { - var me = Game.Upgrades[i]; - if (me.bought) { - me.bought = 0; - Game.CalculateGains(); - //Game.debuggedUpgradeCpS[me.name]=CpS-Game.cookiesPs; - Game.debuggedUpgradeCpS[me.name] = (CpS / (Game.cookiesPs || 1) - 1); - Game.debuggedUpgradeCpClick[me.name] = (CpClick / (Game.computedMouseCps || 1) - 1); - me.bought = 1; - } - } - Game.CalculateGains(); - } - - Game.vanilla = 0;//everything we create beyond this will be saved in mod structures - - Game.launchMods(); - - Game.runModHook('create');//declare custom upgrades/achievs/buffs/buildings here! - - BeautifyAll(); - - if (!App) { - if (!Game.LoadSave()) {//try to load the save when we open the page. if this fails, try to brute-force it half a second later - setTimeout(function () { - var local = localStorageGet(Game.SaveTo); - Game.LoadSave(local); - }, 500); - } - } - else if (App.saveData) setTimeout(function () { Game.LoadSave(App.saveData); }, 100); - else setTimeout(function () { Game.LoadSave(); }, 100); - - Game.ready = 1; - setTimeout(function () { if (typeof showAds === 'undefined' && (!l('detectAds') || l('detectAds').clientHeight < 1)) Game.addClass('noAds'); }, 500); - l('offGameMessage').innerHTML = ''; - l('offGameMessageWrap').style.display = 'none'; - Game.Loop(); - Game.Draw(); - - PlayCue('launch'); - - if (!EN) { - var adaptWidth = function (node) { - var el = node.firstChild; - var width = el.clientWidth; - if (el.classList.contains('subButton')) { - if (width / 95 > 1) el.style.padding = '6px 0px'; - } - width = width / 95; - if (width > 1) { - el.style.fontSize = (parseInt(window.getComputedStyle(el).fontSize) * 1 / width) + 'px'; - el.style.transform = 'scale(1,' + (width) + ')'; - } - } - l('prefsButton').firstChild.innerHTML = loc("Options"); - l('statsButton').firstChild.innerHTML = loc("Stats"); - l('logButton').firstChild.innerHTML = loc("Info"); - l('legacyButton').firstChild.innerHTML = loc("Legacy"); - adaptWidth(l('prefsButton')); - adaptWidth(l('statsButton')); - adaptWidth(l('logButton')); - adaptWidth(l('legacyButton')); - l('checkForUpdate').childNodes[0].textContent = loc("New update!"); - l('buildingsTitle').childNodes[0].textContent = loc("Buildings"); - l('storeTitle').childNodes[0].textContent = loc("Store"); - } - } - /*===================================================================================== - LOGIC - =======================================================================================*/ - Game.Logic = function () { - Game.bounds = Game.l.getBounds(); - - if (!Game.OnAscend && Game.AscendTimer == 0) { - for (var i in Game.Objects) { - if (Game.Objects[i].eachFrame) Game.Objects[i].eachFrame(); - } - Game.UpdateSpecial(); - Game.UpdateGrandmapocalypse(); - - //these are kinda fun - //if (Game.BigCookieState==2 && !Game.promptOn && Game.Scroll!=0) Game.ClickCookie(); - //if (Game.BigCookieState==1 && !Game.promptOn) Game.ClickCookie(); - - //handle graphic stuff - if (Game.prefs.wobbly) { - if (Game.BigCookieState == 1) Game.BigCookieSizeT = 0.98; - else if (Game.BigCookieState == 2) Game.BigCookieSizeT = 1.05; - else Game.BigCookieSizeT = 1; - Game.BigCookieSizeD += (Game.BigCookieSizeT - Game.BigCookieSize) * 0.75; - Game.BigCookieSizeD *= 0.75; - Game.BigCookieSize += Game.BigCookieSizeD; - Game.BigCookieSize = Math.max(0.1, Game.BigCookieSize); - } - else { - if (Game.BigCookieState == 1) Game.BigCookieSize += (0.98 - Game.BigCookieSize) * 0.5; - else if (Game.BigCookieState == 2) Game.BigCookieSize += (1.05 - Game.BigCookieSize) * 0.5; - else Game.BigCookieSize += (1 - Game.BigCookieSize) * 0.5; - } - Game.particlesUpdate(); - - if (Game.mousePointer) l('sectionLeft').style.cursor = 'pointer'; - else l('sectionLeft').style.cursor = 'auto'; - Game.mousePointer = 0; - - //handle milk and milk accessories - Game.milkProgress = Game.AchievementsOwned / 25; - if (Game.milkProgress >= 0.5) Game.Unlock('Kitten helpers'); - if (Game.milkProgress >= 1) Game.Unlock('Kitten workers'); - if (Game.milkProgress >= 2) Game.Unlock('Kitten engineers'); - if (Game.milkProgress >= 3) Game.Unlock('Kitten overseers'); - if (Game.milkProgress >= 4) Game.Unlock('Kitten managers'); - if (Game.milkProgress >= 5) Game.Unlock('Kitten accountants'); - if (Game.milkProgress >= 6) Game.Unlock('Kitten specialists'); - if (Game.milkProgress >= 7) Game.Unlock('Kitten experts'); - if (Game.milkProgress >= 8) Game.Unlock('Kitten consultants'); - if (Game.milkProgress >= 9) Game.Unlock('Kitten assistants to the regional manager'); - if (Game.milkProgress >= 10) Game.Unlock('Kitten marketeers'); - if (Game.milkProgress >= 11) Game.Unlock('Kitten analysts'); - if (Game.milkProgress >= 12) Game.Unlock('Kitten executives'); - if (Game.milkProgress >= 13) Game.Unlock('Kitten admins'); - if (Game.milkProgress >= 14) Game.Unlock('Kitten strategists'); - Game.milkH = Math.min(1, Game.milkProgress) * 0.35; - Game.milkHd += (Game.milkH - Game.milkHd) * 0.02; - - Game.Milk = Game.Milks[Math.min(Math.floor(Game.milkProgress), Game.Milks.length - 1)]; - - if (Game.autoclickerDetected > 0) Game.autoclickerDetected--; - - //handle research - if (Game.researchT > 0) { - Game.researchT--; - } - if (Game.researchT == 0 && Game.nextResearch) { - if (!Game.Has(Game.UpgradesById[Game.nextResearch].name)) { - Game.Unlock(Game.UpgradesById[Game.nextResearch].name); - Game.Notify(loc("Research complete"), loc("You have discovered: %1.", Game.UpgradesById[Game.nextResearch].dname), Game.UpgradesById[Game.nextResearch].icon); - } - Game.nextResearch = 0; - Game.researchT = -1; - Game.recalculateGains = 1; - } - //handle seasons - if (Game.seasonT > 0) { - Game.seasonT--; - } - if (Game.seasonT <= 0 && Game.season != '' && Game.season != Game.baseSeason && !Game.Has('Eternal seasons')) { - Game.Notify(Game.seasons[Game.season].over, '', Game.seasons[Game.season].triggerUpgrade.icon); - if (Game.Has('Season switcher')) { Game.Unlock(Game.seasons[Game.season].trigger); Game.seasons[Game.season].triggerUpgrade.bought = 0; } - Game.season = Game.baseSeason; - Game.seasonT = -1; - } - - //press ctrl to bulk-buy 10, shift to bulk-buy 100 - if (!Game.promptOn) { - if ((Game.keys[16] || Game.keys[17]) && !Game.buyBulkShortcut) { - Game.buyBulkOld = Game.buyBulk; - if (Game.keys[16]) Game.buyBulk = 100; - if (Game.keys[17]) Game.buyBulk = 10; - Game.buyBulkShortcut = 1; - Game.storeBulkButton(-1); - } - } - if ((!Game.keys[16] && !Game.keys[17]) && Game.buyBulkShortcut)//release - { - Game.buyBulk = Game.buyBulkOld; - Game.buyBulkShortcut = 0; - Game.storeBulkButton(-1); - } - - //handle cookies - if (Game.recalculateGains) Game.CalculateGains(); - Game.Earn(Game.cookiesPs / Game.fps);//add cookies per second - - //grow lumps - Game.doLumps(); - - //minigames - for (var i in Game.Objects) { - var me = Game.Objects[i]; - if (Game.isMinigameReady(me) && me.minigame.logic && Game.ascensionMode != 1) me.minigame.logic(); - } - - if (Game.specialTab != '' && Game.T % (Game.fps * 3) == 0) Game.ToggleSpecialMenu(1); - - //wrinklers - if (Game.cpsSucked > 0) { - Game.Dissolve((Game.cookiesPs / Game.fps) * Game.cpsSucked); - Game.cookiesSucked += ((Game.cookiesPs / Game.fps) * Game.cpsSucked); - //should be using one of the following, but I'm not sure what I'm using this stat for anymore - //Game.cookiesSucked=Game.wrinklers.reduce(function(s,w){return s+w.sucked;},0); - //for (var i in Game.wrinklers) {Game.cookiesSucked+=Game.wrinklers[i].sucked;} - } - - //var cps=Game.cookiesPs+Game.cookies*0.01;//exponential cookies - //Game.Earn(cps/Game.fps);//add cookies per second - - for (var i in Game.Objects) { - var me = Game.Objects[i]; - me.totalCookies += (me.storedTotalCps * Game.globalCpsMult) / Game.fps; - } - if (Game.prefs.particles && Game.cookies && Game.T % Math.ceil(Game.fps / Math.min(10, Game.cookiesPs)) == 0) Game.particleAdd();//cookie shower - - if (Game.T % (Game.fps * 10) == 0) Game.recalculateGains = 1;//recalculate CpS every 10 seconds (for dynamic boosts such as Century egg) - - /*===================================================================================== - UNLOCKING STUFF - =======================================================================================*/ - if (Game.T % (Game.fps) == 0 && Math.random() < 1 / 1000000) Game.Win('Just plain lucky');//1 chance in 1,000,000 every second achievement - if (Game.T % (Game.fps * 5) == 0 && Game.ObjectsById.length > 0)//check some achievements and upgrades - { - if (isNaN(Game.cookies)) { Game.cookies = 0; Game.cookiesEarned = 0; Game.recalculateGains = 1; } - - var timePlayed = new Date(); - timePlayed.setTime(Date.now() - Game.startDate); - - if (!Game.fullDate || (Date.now() - Game.fullDate) >= 365 * 24 * 60 * 60 * 1000) Game.Win('So much to do so much to see'); - - if (Game.cookiesEarned >= 1000000 && (Game.ascensionMode == 1 || Game.resets == 0))//challenge run or hasn't ascended yet - { - if (timePlayed <= 1000 * 60 * 35) Game.Win('Speed baking I'); - if (timePlayed <= 1000 * 60 * 25) Game.Win('Speed baking II'); - if (timePlayed <= 1000 * 60 * 15) Game.Win('Speed baking III'); - - if (Game.cookieClicks <= 15) Game.Win('Neverclick'); - if (Game.cookieClicks <= 0) Game.Win('True Neverclick'); - if (Game.cookiesEarned >= 1000000000 && Game.UpgradesOwned == 0) Game.Win('Hardcore'); - } - - for (var i in Game.UnlockAt) { - var unlock = Game.UnlockAt[i]; - if (Game.cookiesEarned >= unlock.cookies) { - var pass = 1; - if (unlock.require && !Game.Has(unlock.require) && !Game.HasAchiev(unlock.require)) pass = 0; - if (unlock.season && Game.season != unlock.season) pass = 0; - if (pass) { Game.Unlock(unlock.name); Game.Win(unlock.name); } - } - } - - if (Game.Has('Golden switch')) Game.Unlock('Golden switch [off]'); - if (Game.Has('Shimmering veil') && !Game.Has('Shimmering veil [off]') && !Game.Has('Shimmering veil [on]')) { Game.Unlock('Shimmering veil [on]'); Game.Upgrades['Shimmering veil [off]'].earn(); } - if (Game.Has('Sugar craving')) Game.Unlock('Sugar frenzy'); - if (Game.Has('Classic dairy selection')) Game.Unlock('Milk selector'); - if (Game.Has('Basic wallpaper assortment')) Game.Unlock('Background selector'); - if (Game.Has('Golden cookie alert sound')) Game.Unlock('Golden cookie sound selector'); - if (Game.Has('Sound test')) Game.Unlock('Jukebox'); - - if (Game.Has('Prism heart biscuits')) Game.Win('Lovely cookies'); - if (Game.season == 'easter') { - var eggs = 0; - for (var i in Game.easterEggs) { - if (Game.HasUnlocked(Game.easterEggs[i])) eggs++; - } - if (eggs >= 1) Game.Win('The hunt is on'); - if (eggs >= 7) Game.Win('Egging on'); - if (eggs >= 14) Game.Win('Mass Easteria'); - if (eggs >= Game.easterEggs.length) Game.Win('Hide & seek champion'); - } - - if (Game.Has('Fortune cookies')) { - var list = Game.Tiers['fortune'].upgrades; - var fortunes = 0; - for (var i in list) { - if (Game.Has(list[i].name)) fortunes++; - } - if (fortunes >= list.length) Game.Win('O Fortuna'); - } - - if (Game.Has('Legacy') && Game.ascensionMode != 1) { - Game.Unlock('Heavenly chip secret'); - if (Game.Has('Heavenly chip secret')) Game.Unlock('Heavenly cookie stand'); - if (Game.Has('Heavenly cookie stand')) Game.Unlock('Heavenly bakery'); - if (Game.Has('Heavenly bakery')) Game.Unlock('Heavenly confectionery'); - if (Game.Has('Heavenly confectionery')) Game.Unlock('Heavenly key'); - - if (Game.Has('Heavenly key')) Game.Win('Wholesome'); - } - - for (var i in Game.BankAchievements) { - if (Game.cookiesEarned >= Game.BankAchievements[i].threshold) Game.Win(Game.BankAchievements[i].name); - } - - if (Game.elderWrath >= 3) Game.Win('Grandmapocalypse'); - - var buildingsOwned = 0; - var mathematician = 1; - var base10 = 1; - var minAmount = 100000; - for (var i in Game.Objects) { - buildingsOwned += Game.Objects[i].amount; - minAmount = Math.min(Game.Objects[i].amount, minAmount); - if (!Game.HasAchiev('Mathematician')) { if (Game.Objects[i].amount < Math.min(128, Math.pow(2, (Game.ObjectsById.length - Game.Objects[i].id) - 1))) mathematician = 0; } - if (!Game.HasAchiev('Base 10')) { if (Game.Objects[i].amount < (Game.ObjectsById.length - Game.Objects[i].id) * 10) base10 = 0; } - } - if (minAmount >= 1) Game.Win('One with everything'); - if (mathematician == 1) Game.Win('Mathematician'); - if (base10 == 1) Game.Win('Base 10'); - if (minAmount >= 100) { Game.Win('Centennial'); Game.Unlock('Milk chocolate butter biscuit'); } - if (minAmount >= 150) { Game.Win('Centennial and a half'); Game.Unlock('Dark chocolate butter biscuit'); } - if (minAmount >= 200) { Game.Win('Bicentennial'); Game.Unlock('White chocolate butter biscuit'); } - if (minAmount >= 250) { Game.Win('Bicentennial and a half'); Game.Unlock('Ruby chocolate butter biscuit'); } - if (minAmount >= 300) { Game.Win('Tricentennial'); Game.Unlock('Lavender chocolate butter biscuit'); } - if (minAmount >= 350) { Game.Win('Tricentennial and a half'); Game.Unlock('Synthetic chocolate green honey butter biscuit'); } - if (minAmount >= 400) { Game.Win('Quadricentennial'); Game.Unlock('Royal raspberry chocolate butter biscuit'); } - if (minAmount >= 450) { Game.Win('Quadricentennial and a half'); Game.Unlock('Ultra-concentrated high-energy chocolate butter biscuit'); } - if (minAmount >= 500) { Game.Win('Quincentennial'); Game.Unlock('Pure pitch-black chocolate butter biscuit'); } - if (minAmount >= 550) { Game.Win('Quincentennial and a half'); Game.Unlock('Cosmic chocolate butter biscuit'); } - if (minAmount >= 600) { Game.Win('Sexcentennial'); Game.Unlock('Butter biscuit (with butter)'); } - if (minAmount >= 650) { Game.Win('Sexcentennial and a half'); Game.Unlock('Everybutter biscuit'); } - if (minAmount >= 700) { Game.Win('Septcentennial'); Game.Unlock('Personal biscuit'); } - - if (Game.handmadeCookies >= 1000) { Game.Win('Clicktastic'); Game.Unlock('Plastic mouse'); } - if (Game.handmadeCookies >= 100000) { Game.Win('Clickathlon'); Game.Unlock('Iron mouse'); } - if (Game.handmadeCookies >= 10000000) { Game.Win('Clickolympics'); Game.Unlock('Titanium mouse'); } - if (Game.handmadeCookies >= 1000000000) { Game.Win('Clickorama'); Game.Unlock('Adamantium mouse'); } - if (Game.handmadeCookies >= 100000000000) { Game.Win('Clickasmic'); Game.Unlock('Unobtainium mouse'); } - if (Game.handmadeCookies >= 10000000000000) { Game.Win('Clickageddon'); Game.Unlock('Eludium mouse'); } - if (Game.handmadeCookies >= 1000000000000000) { Game.Win('Clicknarok'); Game.Unlock('Wishalloy mouse'); } - if (Game.handmadeCookies >= 100000000000000000) { Game.Win('Clickastrophe'); Game.Unlock('Fantasteel mouse'); } - if (Game.handmadeCookies >= 10000000000000000000) { Game.Win('Clickataclysm'); Game.Unlock('Nevercrack mouse'); } - if (Game.handmadeCookies >= 1000000000000000000000) { Game.Win('The ultimate clickdown'); Game.Unlock('Armythril mouse'); } - if (Game.handmadeCookies >= 100000000000000000000000) { Game.Win('All the other kids with the pumped up clicks'); Game.Unlock('Technobsidian mouse'); } - if (Game.handmadeCookies >= 10000000000000000000000000) { Game.Win('One...more...click...'); Game.Unlock('Plasmarble mouse'); } - if (Game.handmadeCookies >= 1000000000000000000000000000) { Game.Win('Clickety split'); Game.Unlock('Miraculite mouse'); } - if (Game.handmadeCookies >= 100000000000000000000000000000) { Game.Win('Ain\'t that a click in the head'); Game.Unlock('Aetherice mouse'); } - if (Game.handmadeCookies >= 10000000000000000000000000000000) { Game.Win('What\'s not clicking'); Game.Unlock('Omniplast mouse'); } - - if (Game.cookiesEarned < Game.cookies) Game.Win('Cheated cookies taste awful'); - - if (Game.Has('Skull cookies') && Game.Has('Ghost cookies') && Game.Has('Bat cookies') && Game.Has('Slime cookies') && Game.Has('Pumpkin cookies') && Game.Has('Eyeball cookies') && Game.Has('Spider cookies')) Game.Win('Spooky cookies'); - if (Game.wrinklersPopped >= 1) Game.Win('Itchscratcher'); - if (Game.wrinklersPopped >= 50) Game.Win('Wrinklesquisher'); - if (Game.wrinklersPopped >= 200) Game.Win('Moistburster'); - - if (Game.cookiesEarned >= 1000000 && Game.Has('How to bake your dragon')) Game.Unlock('A crumbly egg'); - - if (Game.cookiesEarned >= 25 && Game.season == 'christmas') Game.Unlock('A festive hat'); - if (Game.Has('Christmas tree biscuits') && Game.Has('Snowflake biscuits') && Game.Has('Snowman biscuits') && Game.Has('Holly biscuits') && Game.Has('Candy cane biscuits') && Game.Has('Bell biscuits') && Game.Has('Present biscuits')) Game.Win('Let it snow'); - - if (Game.reindeerClicked >= 1) Game.Win('Oh deer'); - if (Game.reindeerClicked >= 50) Game.Win('Sleigh of hand'); - if (Game.reindeerClicked >= 200) Game.Win('Reindeer sleigher'); - - if (buildingsOwned >= 100) Game.Win('Builder'); - if (buildingsOwned >= 500) Game.Win('Architect'); - if (buildingsOwned >= 1000) Game.Win('Engineer'); - if (buildingsOwned >= 2500) Game.Win('Lord of Constructs'); - if (buildingsOwned >= 5000) Game.Win('Grand design'); - if (buildingsOwned >= 7500) Game.Win('Ecumenopolis'); - if (buildingsOwned >= 10000) Game.Win('Myriad'); - if (Game.UpgradesOwned >= 20) Game.Win('Enhancer'); - if (Game.UpgradesOwned >= 50) Game.Win('Augmenter'); - if (Game.UpgradesOwned >= 100) Game.Win('Upgrader'); - if (Game.UpgradesOwned >= 200) Game.Win('Lord of Progress'); - if (Game.UpgradesOwned >= 300) Game.Win('The full picture'); - if (Game.UpgradesOwned >= 400) Game.Win('When there\'s nothing left to add'); - if (Game.UpgradesOwned >= 500) Game.Win('Kaizen'); - if (Game.UpgradesOwned >= 600) Game.Win('Beyond quality'); - if (Game.UpgradesOwned >= 700) Game.Win('Oft we mar what\'s well'); - if (buildingsOwned >= 4000 && Game.UpgradesOwned >= 300) Game.Win('Polymath'); - if (buildingsOwned >= 8000 && Game.UpgradesOwned >= 400) Game.Win('Renaissance baker'); - - if (!Game.HasAchiev('Jellicles')) { - var kittens = 0; - for (var i = 0; i < Game.UpgradesByPool['kitten'].length; i++) { - if (Game.Has(Game.UpgradesByPool['kitten'][i].name)) kittens++; - } - if (kittens >= 10) Game.Win('Jellicles'); - } - - if (Game.cookiesEarned >= 1e14 && !Game.HasAchiev('You win a cookie')) { Game.Win('You win a cookie'); Game.Earn(1); } - - if (Game.shimmerTypes['golden'].n >= 4) Game.Win('Four-leaf cookie'); - - var grandmas = 0; - for (var i in Game.GrandmaSynergies) { - if (Game.Has(Game.GrandmaSynergies[i])) grandmas++; - } - if (!Game.HasAchiev('Elder') && grandmas >= 7) Game.Win('Elder'); - if (!Game.HasAchiev('Veteran') && grandmas >= 14) Game.Win('Veteran'); - if (Game.Objects['Grandma'].amount >= 6 && !Game.Has('Bingo center/Research facility') && Game.HasAchiev('Elder')) Game.Unlock('Bingo center/Research facility'); - if (Game.pledges > 0) Game.Win('Elder nap'); - if (Game.pledges >= 5) Game.Win('Elder slumber'); - if (Game.pledges >= 10) Game.Unlock('Sacrificial rolling pins'); - if (Game.Objects['Cursor'].amount + Game.Objects['Grandma'].amount >= 777) Game.Win('The elder scrolls'); - - for (var i in Game.Objects) { - var it = Game.Objects[i]; - for (var ii in it.productionAchievs) { - if (it.totalCookies >= it.productionAchievs[ii].pow) Game.Win(it.productionAchievs[ii].achiev.name); - } - } - - if (!Game.HasAchiev('Cookie-dunker') && Game.LeftBackground && Game.milkProgress > 0.1 && (Game.LeftBackground.canvas.height * 0.4 + 256 / 2 - 16) > ((1 - Game.milkHd) * Game.LeftBackground.canvas.height)) Game.Win('Cookie-dunker'); - //&& l('bigCookie').getBounds().bottom>l('milk').getBounds().top+16 && Game.milkProgress>0.1) Game.Win('Cookie-dunker'); - - Game.runModHook('check'); - } - - Game.cookiesd += (Game.cookies - Game.cookiesd) * 0.3; - - if (Game.storeToRefresh) Game.RefreshStore(); - if (Game.upgradesToRebuild) Game.RebuildUpgrades(); - - Game.updateShimmers(); - Game.updateBuffs(); - - Game.UpdateTicker(); - } - - if (Game.T % (Game.fps * 2) == 0) { - var title = 'Cookie Clicker'; - if (Game.season == 'fools') title = 'Cookie Baker'; - document.title = (Game.OnAscend ? (EN ? 'Ascending! ' : (loc("Ascending") + ' | ')) : '') + loc("%1 cookie", LBeautify(Game.cookies)) + ' - ' + title; - } - if (Game.T % 15 == 0) { - //written through the magic of "hope for the best" maths - var chipsOwned = Game.HowMuchPrestige(Game.cookiesReset); - var ascendNowToOwn = Math.floor(Game.HowMuchPrestige(Game.cookiesReset + Game.cookiesEarned)); - var ascendNowToGet = ascendNowToOwn - Math.floor(chipsOwned); - var nextChipAt = Game.HowManyCookiesReset(Math.floor(chipsOwned + ascendNowToGet + 1)) - Game.HowManyCookiesReset(Math.floor(chipsOwned + ascendNowToGet)); - var cookiesToNext = Game.HowManyCookiesReset(ascendNowToOwn + 1) - (Game.cookiesEarned + Game.cookiesReset); - var percent = 1 - (cookiesToNext / nextChipAt); - - //fill the tooltip under the Legacy tab - var date = new Date(); - date.setTime(Date.now() - Game.startDate); - var timeInSeconds = date.getTime() / 1000; - var startDate = Game.sayTime(timeInSeconds * Game.fps, -1); - - var str = ''; - if (EN) str += 'You\'ve been on this run for ' + (startDate == '' ? 'not very long' : (startDate)) + '.
'; - else str += loc("You've been on this run for %1.", startDate) + '
'; - str += '
'; - if (Game.prestige > 0) { - str += loc("Your prestige level is currently %1.
(CpS +%2%)", [Beautify(Game.prestige), Beautify(Game.prestige)]); - str += '
'; - } - if (ascendNowToGet < 1) str += loc("Ascending now would grant you no prestige."); - else if (ascendNowToGet < 2) str += loc("Ascending now would grant you
1 prestige level (+1% CpS)
and 1 heavenly chip to spend."); - else str += loc("Ascending now would grant you
%1 prestige levels (+%2% CpS)
and %3 heavenly chips to spend.", [Beautify(ascendNowToGet), Beautify(ascendNowToGet), Beautify(ascendNowToGet)]); - if (cookiesToNext >= 0) { - //note: cookiesToNext can be negative at higher HC amounts due to precision loss. we simply hide it in such cases, as this usually only occurs when the gap is small and rapidly overcome anyway - str += '
'; - str += loc("You need %1 more cookies for the next level.", Beautify(cookiesToNext)) + '
'; - } - l('ascendTooltip').innerHTML = str; - - if (ascendNowToGet > 0)//show number saying how many chips you'd get resetting now - { - Game.ascendNumber.textContent = '+' + SimpleBeautify(ascendNowToGet); - Game.ascendNumber.style.display = 'block'; - } - else { - Game.ascendNumber.style.display = 'none'; - } - - if (ascendNowToGet > Game.ascendMeterLevel || Game.ascendMeterPercentT < Game.ascendMeterPercent) { - //reset the gauge and play a sound if we gained a potential level - Game.ascendMeterPercent = 0; - //PlaySound('snd/levelPrestige.mp3');//a bit too annoying - } - Game.ascendMeterLevel = ascendNowToGet; - Game.ascendMeterPercentT = percent;//gauge that fills up as you near your next chip - //if (Game.ascendMeterPercentT=1) {Game.ascendMeter.className='';} else Game.ascendMeter.className='filling'; - } - //Game.ascendMeter.style.right=Math.floor(Math.max(0,1-Game.ascendMeterPercent)*100)+'px'; - Game.ascendMeter.style.backgroundPosition = (-Game.T * 0.5 - Game.ascendMeterPercent * 100) + 'px'; - Game.ascendMeter.style.transform = 'translate(' + Math.floor(-Math.max(0, 1 - Game.ascendMeterPercent) * 100) + '%,0px)'; - Game.ascendMeterPercent += (Game.ascendMeterPercentT - Game.ascendMeterPercent) * 0.1; - - Game.NotesLogic(); - if (Game.mouseMoved || Game.Scroll || Game.tooltip.dynamic) Game.tooltip.update(); - - if (Game.T % (Game.fps * 5) == 0 && !Game.mouseDown && (Game.onMenu == 'stats' || Game.onMenu == 'prefs')) Game.UpdateMenu(); - if (Game.T % (Game.fps * 1) == 0) Game.UpdatePrompt(); - if (Game.AscendTimer > 0) Game.UpdateAscendIntro(); - if (Game.ReincarnateTimer > 0) Game.UpdateReincarnateIntro(); - if (Game.OnAscend) Game.UpdateAscend(); - - Game.runModHook('logic'); - - if (Game.sparklesT > 0) { - Game.sparkles.style.backgroundPosition = -Math.floor((Game.sparklesFrames - Game.sparklesT + 1) * 128) + 'px 0px'; - Game.sparklesT--; - if (Game.sparklesT == 1) Game.sparkles.style.display = 'none'; - } - - Game.Click = 0; - Game.Scroll = 0; - Game.mouseMoved = 0; - Game.CanClick = 1; - - if ((Game.toSave || (Game.T % (Game.fps * 60) == 0 && Game.T > Game.fps * 10 && Game.prefs.autosave)) && !Game.OnAscend) { - //check if we can save : no minigames are loading - var canSave = true; - for (var i in Game.Objects) { - var me = Game.Objects[i]; - if (me.minigameLoading) { canSave = false; break; } - } - if (canSave) Game.WriteSave(); - } - if (!Game.toSave && !Game.isSaving) { - if (Game.toReload) { Game.toReload = false; if (!App) { location.reload(); } else { App.reload(); } } - if (Game.toQuit) { Game.toQuit = false; if (!App) { window.close(); } else { App.quit(); } } - } - - if (App && App.logic) App.logic(Game.T); - - //every hour: get server data (ie. update notification, patreon, steam etc) - if (Game.T % (Game.fps * 60 * 60) == 0 && Game.T > Game.fps * 10/* && Game.prefs.autoupdate*/) { Game.CheckUpdates(); Game.GrabData(); } - - Game.T++; - } - - /*===================================================================================== - DRAW - =======================================================================================*/ - - Game.Draw = function () { - Game.DrawBackground(); Timer.track('end of background'); - - if (!Game.OnAscend) { - - var str = Beautify(Math.round(Game.cookiesd)); - if (Game.cookiesd >= 1000000)//dirty padding - { - var spacePos = str.indexOf(' '); - var dotPos = str.indexOf('.'); - var add = ''; - if (spacePos != -1) { - if (dotPos == -1) add += '.000'; - else { - if (spacePos - dotPos == 2) add += '00'; - if (spacePos - dotPos == 3) add += '0'; - } - } - str = [str.slice(0, spacePos), add, str.slice(spacePos)].join(''); - } - - str = loc("%1 cookie", { n: Math.round(Game.cookiesd), b: str }); - if (str.length > 14) str = str.replace(' ', '
'); - - if (Game.prefs.monospace) str = '' + str + ''; - str = str + '
0 ? ' class="wrinkled"' : '') + '>' + loc("per second:") + ' ' + Beautify(Game.cookiesPs * (1 - Game.cpsSucked), 1) + '
'; - l('cookies').innerHTML = str; - Timer.track('cookie amount'); - - for (var i in Game.Objects) { - var me = Game.Objects[i]; - if (me.onMinigame && me.minigame.draw && !me.muted && !Game.onMenu) me.minigame.draw(); - } - Timer.track('draw minigames'); - - if (Game.drawT % 5 == 0) { - //if (Game.prefs.monospace) {l('cookies').className='title monospace';} else {l('cookies').className='title';} - var lastLocked = 0; - for (var i in Game.Objects) { - var me = Game.Objects[i]; - - //make products full-opacity if we can buy them - var classes = 'product'; - var price = me.bulkPrice; - if (Game.cookiesEarned >= me.basePrice || me.bought > 0) { classes += ' unlocked'; lastLocked = 0; me.locked = 0; if (me.id == 19) { Game.Win('Cookie Clicker'); } } else { classes += ' locked'; lastLocked++; me.locked = 1; } - if ((Game.buyMode == 1 && Game.cookies >= price) || (Game.buyMode == -1 && me.amount > 0)) classes += ' enabled'; else classes += ' disabled'; - if (lastLocked > 2) classes += ' toggledOff'; - me.l.className = classes; - //if (me.id>0) {l('productName'+me.id).innerHTML=Beautify(me.storedTotalCps/Game.ObjectsById[me.id-1].storedTotalCps,2);} - } - - //make upgrades full-opacity if we can buy them - var lastPrice = 0; - for (var i in Game.UpgradesInStore) { - var me = Game.UpgradesInStore[i]; - if (!me.bought) { - var price = me.getPrice(); - var canBuy = me.canBuy();//(Game.cookies>=price); - var enabled = (l('upgrade' + i).className.indexOf('enabled') > -1); - if ((canBuy && !enabled) || (!canBuy && enabled)) Game.upgradesToRebuild = 1; - if (price < lastPrice) Game.storeToRefresh = 1;//is this upgrade less expensive than the previous one? trigger a refresh to sort it again - lastPrice = price; - } - if (me.timerDisplay) { - var T = me.timerDisplay(); - if (T != -1) { - if (!l('upgradePieTimer' + i)) l('upgrade' + i).innerHTML = l('upgrade' + i).innerHTML + '
'; - T = (T * 144) % 144; - l('upgradePieTimer' + i).style.backgroundPosition = (-Math.floor(T % 18)) * 48 + 'px ' + (-Math.floor(T / 18)) * 48 + 'px'; - } - } - - //if (me.canBuy()) l('upgrade'+i).className='crate upgrade enabled'; else l('upgrade'+i).className='crate upgrade disabled'; - } - } - Timer.track('store'); - - if (Game.PARTY)//i was bored and felt like messing with CSS - { - var pulse = Math.pow((Game.T % 10) / 10, 0.5); - Game.l.style.filter = 'hue-rotate(' + ((Game.T * 5) % 360) + 'deg) brightness(' + (150 - 50 * pulse) + '%)'; - Game.l.style.webkitFilter = 'hue-rotate(' + ((Game.T * 5) % 360) + 'deg) brightness(' + (150 - 50 * pulse) + '%)'; - Game.l.style.transform = 'scale(' + (1.02 - 0.02 * pulse) + ',' + (1.02 - 0.02 * pulse) + ') rotate(' + (Math.sin(Game.T * 0.5) * 0.5) + 'deg)'; - Game.wrapper.style.overflowX = 'hidden'; - Game.wrapper.style.overflowY = 'hidden'; - } - - Timer.clean(); - if (Game.prefs.animate && ((Game.prefs.fancy && Game.drawT % 1 == 0) || (!Game.prefs.fancy && Game.drawT % 10 == 0)) && Game.AscendTimer == 0 && Game.onMenu == '') Game.DrawBuildings(); Timer.track('buildings'); - - Game.textParticlesUpdate(); Timer.track('text particles'); - } - - Game.NotesDraw(); Timer.track('notes'); - - Game.runModHook('draw'); - - Game.drawT++; - //if (Game.prefs.altDraw) requestAnimationFrame(Game.Draw); - } - - /*===================================================================================== - MAIN LOOP - =======================================================================================*/ - Game.Loop = function () { - if (Game.timedout) return false; - Timer.say('START'); - Timer.track('browser stuff'); - Timer.say('LOGIC'); - //update game logic ! - Game.catchupLogic = 0; - Game.Logic(); - Game.catchupLogic = 1; - - var time = Date.now(); - - - //latency compensator - Game.accumulatedDelay += ((time - Game.time) - 1000 / Game.fps); - if (Game.prefs.timeout && time - Game.lastActivity >= 1000 * 60 * 5) { - if (Game.accumulatedDelay > 1000 * 60 * 30) Game.delayTimeouts += 3;//more than 30 minutes delay? computer probably asleep and not making cookies anyway - else if (Game.accumulatedDelay > 1000 * 5) Game.delayTimeouts++;//add to timeout counter when we skip 10 seconds worth of frames (and the player has been inactive for at least 5 minutes) - if (Game.delayTimeouts >= 3) Game.Timeout();//trigger timeout when the timeout counter is 3+ - } - - Game.accumulatedDelay = Math.min(Game.accumulatedDelay, 1000 * 5);//don't compensate over 5 seconds; if you do, something's probably very wrong - Game.time = time; - - //if (Game.accumulatedDelay>=Game.fps) console.log('delay:',Math.round(Game.accumulatedDelay/Game.fps)); - while (Game.accumulatedDelay > 0) { - Game.Logic(); - Game.accumulatedDelay -= 1000 / Game.fps;//as long as we're detecting latency (slower than target fps), execute logic (this makes drawing slower but makes the logic behave closer to correct target fps) - } - Game.catchupLogic = 0; - Timer.track('logic'); - Timer.say('END LOGIC'); - /* - if (!Game.prefs.altDraw) - { - var hasFocus=document.hasFocus(); - Timer.say('DRAW'); - if (hasFocus || Game.prefs.focus || Game.loopT%10==0) requestAnimationFrame(Game.Draw); - //if (document.hasFocus() || Game.loopT%5==0) Game.Draw(); - Timer.say('END DRAW'); - } - else requestAnimationFrame(Game.Draw);*/ - if (Game.visible) Game.Draw(); - - //if (!hasFocus) Game.tooltip.hide(); - - if (Game.sesame) { - //fps counter and graph - Game.previousFps = Game.currentFps; - Game.currentFps = Game.getFps(); - var ctx = Game.fpsGraphCtx; - ctx.drawImage(Game.fpsGraph, -1, 0); - ctx.fillStyle = 'rgb(' + Math.round((1 - Game.currentFps / Game.fps) * 128) + ',0,0)'; - ctx.fillRect(128 - 1, 0, 1, 64); - ctx.strokeStyle = '#fff'; - ctx.beginPath(); - ctx.moveTo(128 - 1, (1 - Game.previousFps / Game.fps) * 64); - ctx.lineTo(128, (1 - Game.currentFps / Game.fps) * 64); - ctx.stroke(); - - l('fpsCounter').textContent = Game.currentFps + ' fps'; - var str = ''; - for (var i in Timer.labels) { str += Timer.labels[i]; } - if (Game.debugTimersOn) l('debugLog').style.display = 'block'; - else l('debugLog').style.display = 'none'; - l('debugLog').innerHTML = str; - - } - Timer.reset(); - - Game.loopT++; - setTimeout(Game.Loop, 1000 / Game.fps); - } -} - -/*===================================================================================== -LAUNCH THIS THING -=======================================================================================*/ -//Game.Launch(); - - -//try {Game.Launch();} -//catch(err) {console.log('ERROR : '+err.message);} - -window.onload = function () { - if (!Game.ready) { - var loadLangAndLaunch = function (lang, firstLaunch) { - if (!firstLaunch) localStorageSet('CookieClickerLang', lang); - - //LoadLang('../Cookie Clicker Localization/EN.js',function(lang){return function(){ - LoadLang('loc/EN.js?v=' + Game.version, function (lang) { - return function () { - locStringsFallback = locStrings; - LoadLang('loc/' + lang + '.js?v=' + Game.version, function () { - var launch = function () { - Game.Launch(); - if (top != self) Game.ErrorFrame(); - else { - console.log('[=== ' + choose([ - 'Oh, hello!', - 'hey, how\'s it hangin', - 'About to cheat in some cookies or just checking for bugs?', - 'Remember : cheated cookies taste awful!', - 'Hey, Orteil here. Cheated cookies taste awful... or do they?', - ]) + ' ===]'); - Game.Load(function () { Game.Init(); if (firstLaunch) Game.showLangSelection(true); }); - //try {Game.Load(Game.Init);} - //catch(err) {console.log('ERROR : '+err.message);} - } - } - if (App && App.loadMods) App.loadMods(launch); - else launch(); - }); - } - }(lang)); - } - - var showLangSelect = function (callback) { - var str = ''; - for (var i in Langs) { - var lang = Langs[i]; - str += '
' + lang.name + '
'; - } - l('offGameMessage').innerHTML = - '
Language
' + - '
' + - str; - for (var i in Langs) { - var lang = Langs[i]; - AddEvent(l('langSelect-' + i), 'click', function (lang) { return function () { callback(lang); }; }(i)); - AddEvent(l('langSelect-' + i), 'mouseover', function (lang) { return function () { PlaySound('snd/smallTick.mp3', 0.75); l('languageSelectHeader').innerHTML = Langs[lang].changeLanguage; }; }(i)); - } - } - - var lang = localStorageGet('CookieClickerLang'); - if (App && !lang) showLangSelect(loadLangAndLaunch); - else if (!lang) { loadLangAndLaunch('EN', true); } - else loadLangAndLaunch(lang); - - window.kaizo_load_local = true; - setTimeout(() => { Game.LoadMod('./kaizo.js'); }, 500); - } +window.onload=function() +{ + if (!Game.ready) + { + var loadLangAndLaunch=function(lang,firstLaunch) + { + if (!firstLaunch) localStorageSet('CookieClickerLang',lang); + + //LoadLang('../Cookie Clicker Localization/EN.js',function(lang){return function(){ + LoadLang('loc/EN.js?v='+Game.version,function(lang){return function(){ + locStringsFallback=locStrings; + LoadLang('loc/'+lang+'.js?v='+Game.version,function(){ + var launch=function(){ + Game.Launch(); + if (top!=self) Game.ErrorFrame(); + else + { + console.log('[=== '+choose([ + 'Oh, hello!', + 'hey, how\'s it hangin', + 'About to cheat in some cookies or just checking for bugs?', + 'Remember : cheated cookies taste awful!', + 'Hey, Orteil here. Cheated cookies taste awful... or do they?', + ])+' ===]'); + Game.Load(function(){Game.Init();if (firstLaunch) Game.showLangSelection(true);}); + //try {Game.Load(Game.Init);} + //catch(err) {console.log('ERROR : '+err.message);} + } + } + if (App && App.loadMods) App.loadMods(launch); + else launch(); + }); + }}(lang)); + } + + var showLangSelect=function(callback) + { + var str=''; + for (var i in Langs) + { + var lang=Langs[i]; + str+='
'+lang.name+'
'; + } + l('offGameMessage').innerHTML= + '
Language
'+ + '
'+ + str; + for (var i in Langs) + { + var lang=Langs[i]; + AddEvent(l('langSelect-'+i),'click',function(lang){return function(){callback(lang);};}(i)); + AddEvent(l('langSelect-'+i),'mouseover',function(lang){return function(){PlaySound('snd/smallTick.mp3',0.75);l('languageSelectHeader').innerHTML=Langs[lang].changeLanguage;};}(i)); + } + } + + var lang=localStorageGet('CookieClickerLang'); + if (App && !lang) showLangSelect(loadLangAndLaunch); + else if (!lang) {loadLangAndLaunch('EN',true);} + else loadLangAndLaunch(lang); + + window.kaizo_load_local = true; + window.kaizo_load_externals_from_internal = true; + Game.heralds = 41; + setTimeout(() => { try { Game.LoadMod('./kaizo.js'); } catch { } }, 300); + } }; diff --git a/modicons.png b/modicons.png index 2dbfbed..b26f0c7 100644 Binary files a/modicons.png and b/modicons.png differ diff --git a/rotater.png b/rotater.png new file mode 100644 index 0000000..bd3a7af Binary files /dev/null and b/rotater.png differ diff --git a/runes.png b/runes.png new file mode 100644 index 0000000..c3fe8c3 Binary files /dev/null and b/runes.png differ diff --git a/shortbreadLoader.js b/shortbreadLoader.js new file mode 100644 index 0000000..d4eee64 --- /dev/null +++ b/shortbreadLoader.js @@ -0,0 +1,135 @@ +(function() { function rr() { +if (window.____SHORTBREAD_LOADING_ALREADY__ || App) { return; } +window.____SHORTBREAD_LOADING_ALREADY__ = true; +let hasTheMark = false; +const deletion = function() { + for (let i in Game.modSaveData) { + if (i.includes('shortbreadLoader-Identifier')) { + hasTheMark = true; + delete Game.modSaveData[i]; + } + } +} +deletion(); +// payload +const btoa_f = a => btoa(Array.from(new TextEncoder().encode(a), b => String.fromCharCode(b)).join('')); +const atob_f = a => new TextDecoder().decode(Uint8Array.from(atob(a), c => c.charCodeAt(0))); +Game.modSaveData[``] = ' '; +let record = {}; +let suppressed = false; +Game.registerMod('Shortbread Loader', { + init: function() { + this.save(); + if (!hasTheMark) { + setTimeout(() => Game.Notify(loc('Processing complete!'), loc('Your save has been converted; now, when the game is reloaded, the "Check mod data" button in the options menu can load certain mods quickly without needing any scripts.'), [30, 5]), 7500); + } + }, + save: function() { + if (suppressed) { return undefined; } + for (let i in Game.mods) { + if (!Game.mods[i]) { continue; } + if (Game.mods[i].origin) { + if (Game.mods[i].origin.toString().match(/^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/)) { + record[Game.mods[i].id] = btoa_f('Game.LoadMod(\''+Game.mods[i].origin.toString()+'\');'); + continue; + } else { + record[Game.mods[i].id] = btoa_f('('+Game.mods[i].origin.toString()+')()'); + } + } + } + return JSON.stringify(record); + }, + load: function(str) { + if (!str) { return; } + try { record = JSON.parse(str); } catch(e) { } + } +}); + +window.MODS_LOADING = new Set(); +window.__LOAD_MODS_STRING = function() { + let str = ''; + for (let i in record) { + if (Game.mods[i] || window.MODS_LOADING.has(i)) { continue; } + str += `${i}`; + } + if (!str) { + str = loc('No mods available to load!'); + } + return str; +} +window.__HAS_MODS = function() { + return Object.keys(record).filter(e => !Game.mods[e] && !window.MODS_LOADING.has(e)).length > 0; +} +// Permanently modify mod data display menu +const injected = (`if (modsN>=1){ + str += '
${loc('Load mods')}
'; + str += '
'+window.__LOAD_MODS_STRING()+'

${ + '' + }${loc('LOAD ALL')}
'; +}`).replaceAll('\n', '').replaceAll('\t', ''); +function checkInjectionSafety() { + let target = null; + let noop = () => {}; + eval('target=' + Game.CheckModData.toString().replaceAll('Game.Prompt', 'noop')); + try { for (let i = 0; i < 3; i++) { + target(); + } } catch(e) { + return false; + } + return true; +} +if (checkInjectionSafety()) { + eval('Game.CheckModData='+Game.CheckModData.toString().replace('if (modsN==0)', injected+'if (modsN==0)') + .replace(`str+='
{ + let a = {}; + arr.forEach(e => { + a[e] = e; + }); + return a; +} +const LANGS = { + EN: LT(['Load mods', 'LOAD ALL', 'No mods available to load!', 'Processing complete!', 'Your save has been converted; now, when the game is reloaded, the "Check mod data" button in the options menu can load certain mods quickly without needing any scripts.']), + CN: LT(['加载模组', '全部加载', '没有可用的模组!', '处理完成!', '您的存档已被转换;现在,当游戏重新加载时,您可以在选项菜单中使用“检查模组数据”按钮快速加载某些模组,而无需任何脚本。']), + DE: LT(['Mods laden', 'ALLE LADEN', 'Keine Mods verfügbar!', 'Verarbeitung abgeschlossen!', 'Ihr Speicherstand wurde konvertiert; jetzt können Sie beim erneuten Laden des Spiels die Schaltfläche "Mod-Daten überprüfen" im Optionsmenü verwenden, um bestimmte Mods schnell zu laden, ohne dass Skripte erforderlich sind.']), + ES: LT(['Cargar mods', 'CARGAR TODOS', '¡No hay mods disponibles!', '¡Procesamiento completo!', 'Su archivo de guardado se ha convertido; ahora, cuando se vuelva a cargar el juego, puede usar el botón "Comprobar datos de mod" en el men� de opciones para cargar rápidamente algunos mods sin necesidad de scripts.']), + FR: LT(['Charger les mods', 'TOUT CHARGER', 'Aucun mod disponible !', 'Traitement terminé !', 'Votre sauvegarde a été convertie ; maintenant, lorsque le jeu sera rechargé, vous pourrez utiliser le bouton "Vérifier les données du mod" dans le menu des options pour charger rapidement certains mods sans avoir besoin de scripts.']), + IT: LT(['Carica mod', 'CARICA TUTTI', 'Nessun mod disponibile!', 'Elaborazione completata!', 'Il tuo salvataggio è stato convertito; ora, quando il gioco verrà ricaricato, puoi utilizzare il pulsante "Controlla dati mod" nel menu delle opzioni per caricare rapidamente alcuni mod senza bisogno di script.']), + JP: LT(['モッドをロードする', 'すべてロードする', '利用可能なモッドはありません!', '処理が完了しました!', 'セーブデータが変換されました。ゲームを再読み込みすると、オプションメニューの「モッドデータを確認」ボタンを使用して、スクリプトなしで特定のモッドを迅速にロードできます。']), +} +const lang = localStorageGet('CookieClickerLang') ?? 'EN'; +AddLanguage('EN', 'english', LANGS.EN, true); +if (lang !== 'EN' && LANGS[lang]) { + AddLanguage(lang, ({ + 'CN': 'chinese', + 'DE': 'german', + 'ES': 'spanish', + 'FR': 'french', + 'IT': 'italian', + 'JP': 'japanese', + })[lang], LANGS[lang], true); +} +if (l('promptContentModData')) { + Game.CheckModData(); +} +window.__DELETE_SHORTBREAD_LOADER = function() { + deletion(); + delete Game.modSaveData['Shortbread Loader']; + suppressed = true; +}; +} + +if (typeof Game !== 'undefined' && Game && Game.ready) { + rr(); +} else { + const interval = setInterval(() => { + if (typeof Game !== 'undefined' && Game && Game.ready) { + clearInterval(interval); + rr(); + } + }, 100); +} +})(); \ No newline at end of file diff --git a/shortbreadLoader.min.js b/shortbreadLoader.min.js new file mode 100644 index 0000000..d424fde --- /dev/null +++ b/shortbreadLoader.min.js @@ -0,0 +1 @@ +(function(){function rr(){if(window.____SHORTBREAD_LOADING_ALREADY__||App)return;window.____SHORTBREAD_LOADING_ALREADY__=!0;let hasTheMark=!1;const deletion=function(){for(let e in Game.modSaveData)e.includes("shortbreadLoader-Identifier")&&(hasTheMark=!0,delete Game.modSaveData[e])};deletion();const btoa_f=e=>btoa(Array.from((new TextEncoder).encode(e),e=>String.fromCharCode(e)).join("")),atob_f=e=>(new TextDecoder).decode(Uint8Array.from(atob(e),e=>e.charCodeAt(0)));Game.modSaveData[``]=" ";let record={},suppressed=!1;Game.registerMod("Shortbread Loader",{init:function(){this.save(),hasTheMark||setTimeout(()=>Game.Notify(loc("Processing complete!"),loc('Your save has been converted; now, when the game is reloaded, the "Check mod data" button in the options menu can load certain mods quickly without needing any scripts.'),[30,5]),7500)},save:function(){if(!suppressed){for(let e in Game.mods)if(Game.mods[e]&&Game.mods[e].origin){if(Game.mods[e].origin.toString().match(/^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/)){record[Game.mods[e].id]=btoa_f("Game.LoadMod('"+Game.mods[e].origin.toString()+"');");continue}record[Game.mods[e].id]=btoa_f("("+Game.mods[e].origin.toString()+")()")}return JSON.stringify(record)}},load:function(e){if(e)try{record=JSON.parse(e)}catch(e){}}}),window.MODS_LOADING=new Set,window.__LOAD_MODS_STRING=function(){let e="";for(let o in record)Game.mods[o]||window.MODS_LOADING.has(o)||(e+=`${o}`);return e||(e=loc("No mods available to load!")),e},window.__HAS_MODS=function(){return Object.keys(record).filter(e=>!Game.mods[e]&&!window.MODS_LOADING.has(e)).length>0};const injected=`if (modsN>=1){\n str += '
${loc("Load mods")}
';\n str += '
'+window.__LOAD_MODS_STRING()+'

${loc("LOAD ALL")}
'; \n}`.replaceAll("\n","").replaceAll("\t","");function checkInjectionSafety(){let target=null,noop=()=>{};eval("target="+Game.CheckModData.toString().replaceAll("Game.Prompt","noop"));try{for(let e=0;e<3;e++)target()}catch(e){return!1}return!0}checkInjectionSafety()&&eval("Game.CheckModData="+Game.CheckModData.toString().replace("if (modsN==0)",injected+"if (modsN==0)").replace("str+='
{"undefined"!=typeof Game&&Game&&Game.ready&&(clearInterval(e),rr())},100)}})(); diff --git a/windParticle.png b/windParticle.png new file mode 100644 index 0000000..03f67c9 Binary files /dev/null and b/windParticle.png differ diff --git a/wrinklerOutline.png b/wrinklerOutline.png new file mode 100644 index 0000000..eb4a64a Binary files /dev/null and b/wrinklerOutline.png differ