// ==UserScript== // @name Cookie Clicker upgrade suggester // @namespace http://azzurite.tv // @version 1.0.3 // @description Clears the top bar and instead displays suggestions for next buy there // @author Azzurite // @match http://orteil.dashnet.org/cookieclicker/ // @grant none // @require https://code.jquery.com/jquery-3.3.1.slim.min.js // @downloadURL https://update.greasyfork.icu/scripts/389700/Cookie%20Clicker%20upgrade%20suggester.user.js // @updateURL https://update.greasyfork.icu/scripts/389700/Cookie%20Clicker%20upgrade%20suggester.meta.js // ==/UserScript== var myWindow = { skeleton: `
`}; myWindow.location = window.location; myWindow.document = window.document; var myDiv = window.document.createElement('div'); myDiv.innerHTML = myWindow.skeleton; window.document.body.appendChild(myDiv); $('#topBar').children().each((idx, child) => { var $child = $(child); if (idx !== 0 && $child.attr('id') !== 'heralds') { $child.css('display', 'none'); } }); var prevCookiesPS = null; setInterval(() => { if (!window.Game || !window.Game.cookiesPs || !window.Game.WriteSave) return; if (window.Game.cookiesPs !== prevCookiesPS) { console.log('Recommended update triggered'); prevCookiesPS = window.Game.cookiesPs; myWindow.Game.importSave(window.Game.WriteSave(1)); } }, 100); /* global Base64 */ /* eslint no-unused-vars: ["error", {"vars": "local"}] */ function utf8_to_b64(str) { try { return Base64.encode(unescape(encodeURIComponent(str))); } catch (err) { return ""; } } function b64_to_utf8(str) { try { return decodeURIComponent(escape(Base64.decode(str))); } catch (err) { // alert("There was a problem while decrypting from base64. (" + err + ")"); console.error(err); return ""; } } function UncompressBin(num) { //uncompress a number like 54 to a sequence like [0, 1, 1, 0, 1, 0]. return num.toString(2).slice(1, -1).split("").reverse(); } function UncompressLargeBin(arr) { var arr2 = arr.split(";"); var bits = []; for (var i in arr2) { bits.push(UncompressBin(parseInt(arr2[i], 10))); } arr2 = []; for (i in bits) { for (var ii in bits[i]) { arr2.push(bits[i][ii]); } } return arr2; } function unpack(str) { var bytes = []; var len = str.length; for (var i = 0, n = len; i < n; i++) { var char = str.charCodeAt(i); bytes.push(char >>> 8, char & 0xFF); } return bytes; } //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); var packed = ""; for (var i = 0; i < chunks.length; i++) { var chunk = chunks[i]; //add dummy data to prevent packing to "|" if (chunk === "111100") { chunk += "00"; } packed += String.fromCharCode(parseInt("1" + chunk, 2)); } return packed; } // function pack3(values) { // //too many save corruptions, darn it to heck // return values; // } function unpack2(/* string */ packed) { var values = ""; for (var i = 0; i < packed.length; i++) { values += packed.charCodeAt(i).toString(2).substring(1); } return values; } //like str.split("|") but works around game's pack2() potentially outputting a "|", // by skipping over first pipe character of a pair in fields where pack2 is used // (the second field is intentionally empty as of this writing so still have to split that) function splitSave(str) { var arr = []; do { var index = str.indexOf("|"); if (index > -1 && arr.length > 2 && str.charAt(index + 1) === "|") { index++; } arr.push(str.slice(0, index > -1 ? index : undefined)); str = str.slice(index + 1); } while (index > -1); return arr; } function decodeSave(str) { return b64_to_utf8(unescape(str).split("!END!")[0]); } function encodeSave(str) { return escape(utf8_to_b64(str) + "!END!"); } myWindow.byId = function byId(id) { const elementById = document.getElementById(id); if (!elementById) { console.log('ID not found:', id) } return elementById; }; //seeded random function, courtesy of http://davidbau.com/archives/2010/01/30/random_seeds_coded_hints_and_quintillions.html //out of IIFE because strict mode //eslint-disable-next-line (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) })(window, [], Math, 256, 6, 52); (function(window, $) { "use strict"; var document = window.document; var byId = window.byId; //#region definitions var Game = { version: 2.019, mainJS: "2.054", beta: window.location.href.indexOf("/beta") > -1, firstRun: true, fps: 30, ObjectPriceIncrease: 1.15, //price increase factor for buildings SpecialGrandmaUnlock: 15, //when farmer/worker/miner/etc. grandmas upgrades unlock maxClicksPs: 250, //maximum clicks per second Objects: {}, //buildings ObjectsById: [], ObjectsByGroup: {}, ObjectsOwned: 0, Upgrades: {}, UpgradesById: [], UpgradesByPool: {}, UpgradesByGroup: {}, UpgradesOwned: 0, numCountedUpgrades: 0, maxCountedUpgrades: 0, UpgradeOrder: [], //list of upgrades sorted by current settings Achievements: {}, AchievementsById: [], AchievementsByPool: {}, AchievementsByGroup: {}, AchievementsOwned: 0, AchievementsTotal: 0, defaultSeason: "", season: "", seasons: {}, seasonTriggerBasePrice: 1000000000, seasonUses: 0, pledges: 0, ascensionMode: 0, sellMultiplier: 0.5, startDate: Date.now(), //used for calculating Century egg stuff CenturyEggBoost: 1, objectGodMult: 1, numGoldenCookies: 0, ObjectPriceMultArray: [], //used for Object price caches UpgradePriceMultArray: [], heralds: 0, heavenlyPower: 1, //% cps bonus per prestige level cookiesPs: 0, cookiesPerClick: 0, cookiesPsPlusClicks: 0, globalCpsMult: 1, rawCookiesPs: 0, unbuffedCookiesPs: 0, prestige: 0, cookiesBaked: 0, buildingBuyInterval: 1, santa: {}, santaLevel: 0, 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" ], dragonLevel: 0, dragonAura: 0, dragonAura2: 0, maxWrinklers: 10, minCumulative: 0, //minimum cookies needed for everything (see getMinCumulative method) minCumulativeOffset: 0, //used to try to prevent minCumulative from being excessively wrong large due to saves from old game versions permanentUpgrades: [-1, -1, -1, -1, -1], //used for calculating min cumulative includeDragonSacrifices: true, //whether to include the cost of sacrificing buildings to train Krumblor (if relevant) Buffs: {}, BuffTypes: [], BuffTypesByName: {}, lumps: 0, effs: {}, pantheon: { gods: {}, godsById: [], slot: [-1, -1, -1], slotNames: ["Diamond", "Ruby", "Jade"] }, garden: { plants: {}, plantsById: [], numPlants: 0, seedSelected: -1, soils: {}, soilsById: [], plot: [], plotBoost: [], plotLimits: [], effs: {}, effsData: {}, tileSize: 40, stepT: 1, soil: 0 }, Milks: [ { name: "Rank I - Plain milk", icon: [1, 8] }, { name: "Rank II - Chocolate milk", icon: [2, 8] }, { name: "Rank III - Raspberry milk", icon: [3, 8] }, { name: "Rank IV - Orange milk", icon: [4, 8] }, { name: "Rank V - Caramel milk", icon: [5, 8] }, { name: "Rank VI - Banana milk", icon: [6, 8] }, { name: "Rank VII - Lime milk", icon: [7, 8] }, { name: "Rank VIII - Blueberry milk", icon: [8, 8] }, { name: "Rank IX - Strawberry milk", icon: [9, 8] }, { name: "Rank X - Vanilla milk", icon: [10, 8] }, { name: "Rank XI - Honey milk", icon: [21, 23] }, { name: "Rank XII - Coffee milk", icon: [22, 23] }, { name: "Rank XIII - Tea with a spot of milk", icon: [23, 23] }, { name: "Rank XIV - Coconut milk", icon: [24, 23] }, { name: "Rank XV - Cherry milk", icon: [25, 23] }, { name: "Rank XVI - Spiced milk", icon: [26, 23] }, { name: "Rank XVII - Maple milk", icon: [28, 23] } ], temp: { ObjectsOwned: 0, UpgradesOwned: 0, UpgradesToCheck: [], kittensOwned: 0, AchievementsOwned: 0, LockedAchievements: [], cpsObj: {}, prestige: 0, cookiesBaked: 0, santaLevel: 0, dragonAura: 0, dragonAura2: 0 }, storedImport: null, maxRecommend: 1, maxLookahead: 20, abbrOn: true, //whether to abbreviate with letters/words or with commas/exponential notation lockChecked: false, //sets behavior when clicking on upgrades, controlled by various checkboxes on the page predictiveMode: false, //prevents predictive calculations overwriting current state by changing which properties are read/written showDebug: false, //whether to always show debug upgrades altMode: false }; window.Game = Game; Game.santaMax = Game.santaLevels.length - 1; Game.lastUpdateTime = Game.startDate; if (Game.beta) { document.title += " Beta"; } //#endregion definitions //#region methods Game.choose = function(arr) { return arr[Math.floor(Math.random() * arr.length)]; }; Game.makeSeed = function() { var chars = "abcdefghijklmnopqrstuvwxyz".split(""); var str = ""; for (var i = 0; i < 5; i++) { str += Game.choose(chars); } return str; }; Game.setSeed = function(seed) { Game.seed = seed || Game.makeSeed(); //each run has its own seed, used for deterministic random stuff }; //sets obj[key] to an array if it is not already and pushes value to it Game.ArrayPush = function(obj, key, value) { if (!Array.isArray(obj[key])) { obj[key] = []; } obj[key].push(value); }; //checks event for keys for alt mode Game.checkEventAltMode = function(event) { return event.shiftKey || event.ctrlKey || event.altKey || event.metaKey; }; var Abbreviations = [ { short: "", long: "" }, { short: "k", long: "thousand" }, { short: "M", long: "million" }, { short: "B", long: "billion" }, { short: "T", long: "trillion" }, { short: "Qa", long: "quadrillion" }, { short: "Qi", long: "quintillion" }, { short: "Sx", long: "sextillion" }, { short: "Sp", long: "septillion" }, { short: "Oc", long: "octillion" }, { short: "No", long: "nonillion" } ]; var longPrefixes = ["", "un", "duo", "tre", "quattuor", "quin", "sex", "septen", "octo", "novem"]; var longSuffixes = [ "decillion", "vigintillion", "trigintillion", "quadragintillion", "quinquagintillion", "sexagintillion", "septuagintillion", "octogintillion", "nonagintillion" ]; var shortPrefixes = ["", "Un", "Do", "Tr", "Qa", "Qi", "Sx", "Sp", "Oc", "No"]; var shortSuffixes = ["D", "V", "T", "Qa", "Qi", "Sx", "Sp", "O", "N"]; for (var i = 0; i < longSuffixes.length; i++) { for (var j = 0; j < longPrefixes.length; j++) { Abbreviations.push({ short: shortPrefixes[j] + shortSuffixes[i], long: longPrefixes[j] + longSuffixes[i] }); } } Abbreviations[11].short = "Dc"; var AbbreviationsMax = Abbreviations.length - 1; for (i = 1; i <= AbbreviationsMax; i++) { var abbr = Abbreviations[i]; abbr.shortRgx = new RegExp("(\\-?[\\d\\.]+)\\s*(" + abbr.short + ")\\s*$", "i"); abbr.longRgx = new RegExp("(\\-?[\\d\\.]+)\\s*(" + abbr.long + ")\\s*$", "i"); } var commaRgx = /\B(?=(\d{3})+(?!\d))/g; Game.addCommas = function(what) { var x = what.toString().split("."); x[0] = x[0].replace(commaRgx, ","); return x.join("."); }; Game.Beautify = function(what, floats) { //turns 9999999 into 9,999,999 if (what === "---") { return what; } if (!isFinite(what)) { return "Infinity"; } var absWhat = Math.abs(what); if (absWhat > 1 && what.toString().indexOf("e") > -1) { return what.toString(); } floats = absWhat < 1000 && floats > 0 ? Math.pow(10, floats) : 1; what = Math.round(what * floats) / floats; return Game.addCommas(what); }; Game.shortenNumber = function(value) { //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 (value >= 1000000 && isFinite(value)) { var num = value.toString(); var ind = num.indexOf("e+"); if (ind == -1) { return value; } 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 value; }; //abbreviates numbers Game.abbreviateNumber = function(num, floats, abbrlong) { if (num === "---") { return num; } if (!isFinite(num)) { return "Infinity"; } if (Math.abs(num) < 1000000) { return Game.Beautify(num, floats); } num = Number(num).toExponential().split("e+"); var pow = Math.floor(num[1] / 3); if (pow > AbbreviationsMax) { num[0] = Math.round(num[0] * 1000) / 1000; return num.join("e+"); } num[0] *= Math.pow(10, num[1] % 3); num[0] = Math.round(num[0] * 1000) / 1000; if (Math.abs(num[0]) >= 1000 && pow < AbbreviationsMax) { pow += 1; num[0] /= 1000; } else { num[0] = Game.addCommas(num[0]); } num[1] = Abbreviations[Math.min(pow, AbbreviationsMax)][abbrlong ? "long" : "short"]; return num.join(" "); }; Game.BeautifyAbbr = function(what, floats, abbrlong) { return Game.abbrOn ? Game.abbreviateNumber(what, floats, abbrlong) : Game.Beautify(what, floats); }; Game.formatNumber = function(num, floats, abbrlong, extraStr, extraTitle) { var beaut = Game.Beautify(num, floats); var abbr = Game.abbreviateNumber(num, floats, abbrlong); var text = extraStr || ""; var title = text + (extraTitle || ""); if (beaut === abbr) { text = beaut + text; } else { text = (Game.abbrOn ? abbr : beaut) + text; var aLong = abbrlong || abbr === beaut ? abbr : Game.abbreviateNumber(num, floats, true); title = (Game.abbrOn ? beaut : aLong) + title; } return ("' : ">") + text + ""); }; Game.formatTime = function(seconds) { if (isNaN(seconds) || !isFinite(seconds) || seconds <= 0) { return "---"; } seconds = Math.ceil(seconds); var hours = Math.floor(seconds / 3600); if (hours > 0) { hours = Game.BeautifyAbbr(hours) + (hours >= 1e7 ? " " : "") + "h "; } else { hours = ""; } seconds %= 3600; var minutes = Math.floor(seconds / 60); minutes = minutes > 0 ? minutes + "m " : ""; seconds %= 60; seconds = seconds > 0 ? seconds + "s" : ""; return (hours + minutes + seconds).trim(); }; Game.getPlural = function(amount, singular, plural) { singular = singular || ""; plural = plural || (singular + "s"); return amount === 1 ? singular : plural; }; 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 = ""; 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(Game.Beautify(months) + Game.getPlural(months, " month")); } if (days > 0) { bits.push(Game.Beautify(days) + Game.getPlural(days, " day")); } if (hours > 0) { bits.push(Game.Beautify(hours) + Game.getPlural(hours, " hour")); } if (minutes > 0) { bits.push(Game.Beautify(minutes) + Game.getPlural(minutes, " minute")); } if (seconds > 0) { bits.push(Game.Beautify(seconds) + Game.getPlural(seconds, " second")); } 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 = Game.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 * 2 && detail < 2) { str = Game.Beautify(Math.floor(time / (Game.fps * 60 * 60 * 24))) + " days"; } else if (time >= Game.fps * 60 * 60 * 24 && detail < 2) { str = "1 day"; } else if (time >= Game.fps * 60 * 60 * 2 && detail < 3) { str = Game.Beautify(Math.floor(time / (Game.fps * 60 * 60))) + " hours"; } else if (time >= Game.fps * 60 * 60 && detail < 3) { str = "1 hour"; } else if (time >= Game.fps * 60 * 2 && detail < 4) { str = Game.Beautify(Math.floor(time / (Game.fps * 60))) + " minutes"; } else if (time >= Game.fps * 60 && detail < 4) { str = "1 minute"; } else if (time >= Game.fps * 2 && detail < 5) { str = Game.Beautify(Math.floor(time / (Game.fps))) + " seconds"; } else if (time >= Game.fps && detail < 5) { str = "1 second"; } else { str = "less than 1 second"; } } return str; }; Game.costDetails = function(cost, force) { if (!force && !Game.HasUpgrade("Genius accounting")) { return ""; } if (!cost || !isFinite(cost)) { return ""; } var priceInfo = ""; var cps = Game.cookiesPs * (1 - Game.cpsSucked); if (!cps) { return ""; } // if (cost > Game.cookies) { priceInfo += "in " + Game.sayTime(((cost - Game.cookies) / cps + 1) * Game.fps) + "" + obj.desc + ""; } var upgrade = new Game.Upgrade(obj.name, desc, obj.price, obj.icon, { power: obj.power, pool: "cookie", groups: (obj.groups || "") + "|plus" }); if (!obj.locked) { upgrade.require = getCookiesBakedRequireFunc(obj, obj.price / 20); } if (typeof obj.require === "function") { upgrade.require = obj.require; } else if (obj.require) { upgrade.requiredUpgrade = obj.require; } 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 }, "synergy1": { name: "Synergy I", unlock: 15, iconRow: 20, color: "#008595", special: true, require: "Synergies Vol. I", price: 200000 }, "synergy2": { name: "Synergy II", unlock: 75, iconRow: 29, color: "#008595", special: true, require: "Synergies Vol. II", price: 200000000000 } }; Game.GetIcon = function(type, tier) { var col = type === "Kitten" ? 18 : Game.Objects[type].iconColumn; return [col, Game.Tiers[tier].iconRow]; }; Game.SetTier = function(building, tier) { if (!Game.Objects[building]) { alert("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.TieredUpgrade = function(name, desc, buildingName, tier) { var building = Game.Objects[buildingName]; var tierObj = Game.Tiers[tier]; var upgrade = new Game.Upgrade(name, desc, building.basePrice * tierObj.price, Game.GetIcon(buildingName, tier), {groups: "" + building.groupName + ":" + tierObj.unlock}); Game.SetTier(buildingName, tier); return upgrade; }; var synPriceFunc = function() { return (this.basePrice * (Game.HasUpgrade("Chimera") ? 0.98 : 1)); }; var synRequireFunc = function(check) { var tier = Game.Tiers[this.tier]; var amount1 = this.buildingTie1.getAmount(); amount1 = Math.min(amount1, check) || amount1; var amount2 = this.buildingTie2.getAmount(); amount2 = Math.min(amount2, check) || amount2; return Game.HasUpgrade(tier.require) && amount1 >= tier.unlock && amount2 >= tier.unlock; }; //creates a new upgrade that : //- unlocks when you have tier.unlock of building1 and building2 //- is priced at (building1.price * 10 + building2.price) * 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 Game.SynergyUpgrade = function(name, desc, building1, building2, tier) { var b1 = Game.Objects[building1]; var b2 = Game.Objects[building2]; if (b1.basePrice > b2.basePrice) { //swap b1 = Game.Objects[building2]; b2 = Game.Objects[building1]; } var tierObj = Game.Tiers[tier]; desc = b1.pluralCapital + " gain +5% CpS per " + b2.name.toLowerCase() + ".
" + desc + ""; var upgrade = new Game.Upgrade(name, desc, building.basePrice * Game.Tiers[2].price, [10, 9], { groups: "grandmaSynergy|grandma|" + building.groupName, require: grandmaSynergyRequireFunc }); building.grandmaSynergy = upgrade; upgrade.grandmaBuilding = building; return upgrade; }; var getNumAllObjectsRequireFunc = function(amount) { return function() { for (var i = Game.ObjectsById.length - 1; i >= 0; i--) { if (Game.ObjectsById[i].getAmount() < amount) { return false; } } return true; }; }; //start defining Upgrades order = 100; //this is used to set the order in which the items are listed new Game.Upgrade("Reinforced index finger", "The mouse and cursors are twice as efficient.
prod prod", 100, [0, 0], { tier: 1, col: 0, groups: "cursor:1|click" }); new Game.Upgrade("Carpal tunnel prevention cream", "The mouse and cursors are twice as efficient.
it... it hurts to click...", 500, [0, 1], { tier: 2, col: 0, groups: "cursor:1|click" }); new Game.Upgrade("Ambidextrous", "The mouse and cursors are twice as efficient.
Look ma, both hands!", 10000, [0, 2], { tier: 3, col: 0, groups: "cursor:10|click" }); new Game.Upgrade("Thousand fingers", "The mouse and cursors gain +0.1 cookies for each non-cursor object owned.
clickity", 100000, [0, 13], { tier: 4, col: 0, groups: "cursor:25|click" }); new Game.Upgrade("Million fingers", "The mouse and cursors gain +0.5 cookies for each non-cursor object owned.
clickityclickity", 10000000, [0, 14], { tier: 5, col: 0, groups: "cursor:50|click" }); new Game.Upgrade("Billion fingers", "The mouse and cursors gain +5 cookies for each non-cursor object owned.
clickityclickityclickity", 100000000, [0, 15], { tier: 6, col: 0, groups: "cursor:100|click" }); new Game.Upgrade("Trillion fingers", "The mouse and cursors gain +50 cookies for each non-cursor object owned.
clickityclickityclickityclickity", 1000000000, [0, 16], { tier: 7, col: 0, groups: "cursor:150|click" }); order = 200; Game.TieredUpgrade("Forwards from grandma", "Grandmas are twice as efficient.
RE:RE:thought you'd get a kick out of this ;))", "Grandma", 1); Game.TieredUpgrade("Steel-plated rolling pins", "Grandmas are twice as efficient.
Just what you kneaded.", "Grandma", 2); Game.TieredUpgrade("Lubricated dentures", "Grandmas are twice as efficient.
squish", "Grandma", 3); order = 300; Game.TieredUpgrade("Cheap hoes", "Farms are twice as efficient.
Rake in the dough!", "Farm", 1); Game.TieredUpgrade("Fertilizer", "Farms are twice as efficient.
It's chocolate, I swear.", "Farm", 2); Game.TieredUpgrade("Cookie trees", "Farms are twice as efficient.
A relative of the breadfruit.", "Farm", 3); order = 500; Game.TieredUpgrade("Sturdier conveyor belts", "Factories are twice as efficient.
You're going places.", "Factory", 1); Game.TieredUpgrade("Child labor", "Factories are twice as efficient.
Cheaper, healthier workforce.", "Factory", 2); Game.TieredUpgrade("Sweatshop", "Factories are twice as efficient.
Slackers will be terminated.", "Factory", 3); order = 400; Game.TieredUpgrade("Sugar gas", "Mines are twice as efficient.
A pink, volatile gas, found in the depths of some chocolate caves.", "Mine", 1); Game.TieredUpgrade("Megadrill", "Mines are twice as efficient.
You're in deep.", "Mine", 2); Game.TieredUpgrade("Ultradrill", "Mines are twice as efficient.
Finally caved in?", "Mine", 3); order = 600; Game.TieredUpgrade("Vanilla nebulae", "Shipments are twice as efficient.
If you removed your space helmet, you could probably smell it!", "Shipment", 1); Game.TieredUpgrade("Wormholes", "Shipments are twice as efficient.
(Note : don't do that.)
By using these as shortcuts, your ships can travel much faster.", "Shipment", 2); Game.TieredUpgrade("Frequent flyer", "Shipments are twice as efficient.
Come back soon!", "Shipment", 3); order = 700; Game.TieredUpgrade("Antimony", "Alchemy labs are twice as efficient.
Actually worth a lot of mony.", "Alchemy lab", 1); Game.TieredUpgrade("Essence of dough", "Alchemy labs are twice as efficient.
Extracted through the 5 ancient steps of alchemical baking.", "Alchemy lab", 2); Game.TieredUpgrade("True chocolate", "Alchemy labs are twice as efficient.
The purest form of cacao.", "Alchemy lab", 3); order = 800; Game.TieredUpgrade("Ancient tablet", "Portals are twice as efficient.
A strange slab of peanut brittle, holding an ancient cookie recipe. Neat!", "Portal", 1); Game.TieredUpgrade("Insane oatling workers", "Portals are twice as efficient.
ARISE, MY MINIONS!", "Portal", 2); Game.TieredUpgrade("Soul bond", "Portals are twice as efficient.
So I just sign up and get more cookies? Sure, whatever!", "Portal", 3); order = 900; Game.TieredUpgrade("Flux capacitors", "Time machines are twice as efficient.
Bake to the future.", "Time machine", 1); Game.TieredUpgrade("Time paradox resolver", "Time machines are twice as efficient.
No more fooling around with your own grandmother!", "Time machine", 2); Game.TieredUpgrade("Quantum conundrum", "Time machines are twice as efficient.
There is only one constant, and that is universal uncertainty.", "Time machine", 3); order = 20000; new Game.Upgrade("Kitten helpers", "You gain more CpS the more milk you have.
Or is it?
meow may I help you", 9000000, Game.GetIcon("Kitten", 1), { tier: 1, groups: "bonus|kitten:0.5" }); new Game.Upgrade("Kitten workers", "You gain more CpS the more milk you have.
meow meow meow meow", 9000000000, Game.GetIcon("Kitten", 2), { tier: 2, groups: "bonus|kitten:1" }); order = 10000; Game.CookieUpgrade({ name: "Plain cookies", desc: "We all gotta start somewhere.", icon: [2, 3], power: 1, price: 999999 }); Game.CookieUpgrade({ name: "Sugar cookies", desc: "Tasty, if a little unimaginative.", icon: [7, 3], power: 1, price: 999999 * 5 }); Game.CookieUpgrade({ name: "Oatmeal raisin cookies", desc: "No raisin to hate these.", icon: [0, 3], power: 1, price: 9999999 }); Game.CookieUpgrade({ name: "Peanut butter cookies", desc: "Get yourself some jam cookies!", icon: [1, 3], power: 1, price: 9999999 * 5 }); Game.CookieUpgrade({ name: "Coconut cookies", desc: "Flaky, but not unreliable. Some people go crazy for these.", icon: [3, 3], power: 2, price: 99999999 }); order = 10001; Game.CookieUpgrade({ name: "White chocolate cookies", desc: "I know what you'll say. It's just cocoa butter! It's not real chocolate!
clickityclickityclickityclickityclick", 10000000000, [0, 17], { tier: 8, col: 0, groups: "cursor:200|click" }); order = 200; Game.TieredUpgrade("Prune juice", "Grandmas are twice as efficient.
Gets me going.", "Grandma", 4); order = 300; Game.TieredUpgrade("Genetically-modified cookies", "Farms are twice as efficient.
All-natural mutations.", "Farm", 4); order = 500; Game.TieredUpgrade("Radium reactors", "Factories are twice as efficient.
Gives your cookies a healthy glow.", "Factory", 4); order = 400; Game.TieredUpgrade("Ultimadrill", "Mines are twice as efficient.
Pierce the heavens, etc.", "Mine", 4); order = 600; Game.TieredUpgrade("Warp drive", "Shipments are twice as efficient.
To boldly bake.", "Shipment", 4); order = 700; Game.TieredUpgrade("Ambrosia", "Alchemy labs are twice as efficient.
Adding this to the cookie mix is sure to make them even more addictive!", "Alchemy lab", 4); order = 800; Game.TieredUpgrade("Sanity dance", "Portals are twice as efficient.
Perhaps dangerously so.
Let's hope you can keep selling these legally.
We can change if we want to.", "Portal", 4); order = 900; Game.TieredUpgrade("Causality enforcer", "Time machines are twice as efficient.
We can leave our brains behind.
What happened, happened.", "Time machine", 4); order = 5000; new Game.Upgrade("Lucky day", "Golden cookies appear twice as often and stay twice as long.
Oh hey, a four-leaf penny!", 777777777, [27, 6], {groups: "goldCookie|goldSwitchMult"}); new Game.Upgrade("Serendipity", "Golden cookies appear twice as often and stay twice as long.
What joy! Seven horseshoes!", 77777777777, [27, 6], {groups: "goldCookie|goldSwitchMult"}); order = 20000; new Game.Upgrade("Kitten engineers", "You gain more CpS the more milk you have.
meow meow meow meow, sir", 90000000000000, Game.GetIcon("Kitten", 3), { tier: 3, groups: "bonus|kitten:2" }); order = 10020; Game.CookieUpgrade({ name: "Dark chocolate-coated cookies", desc: "These absorb light so well you almost need to squint to see them.", icon: [10, 3], power: 4, price: 99999999999 }); Game.CookieUpgrade({ name: "White chocolate-coated cookies", desc: "These dazzling cookies absolutely glisten with flavor.", icon: [11, 3], power: 4, price: 99999999999 }); 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; new Game.Upgrade("Bingo center/Research facility", "Grandma-operated science lab and leisure club.
What could possibly keep those grandmothers in check?...", 1000000000000000, [11, 9], { groups: "grandma|grandmapocalypse", require: function() { var elder = Game.GetAchiev("Elder"); return Game.Objects["Grandma"].getAmount() >= 6 && (elder.getWon() || elder.require()); //ah order of execution } }); order = 15000; new Game.Upgrade("Specialized chocolate chips", "Cookie production multiplier +1%.
Bingo.
Computer-designed chocolate chips. Computer chips, if you will.", 1000000000000000, [0, 9], { pool: "tech", groups: "plus:1.01|grandmapocalypse" }); new Game.Upgrade("Designer cocoa beans", "Cookie production multiplier +2%.
Now more aerodynamic than ever!", 2000000000000000, [1, 9], { pool: "tech", groups: "plus:1.02|grandmapocalypse" }); new Game.Upgrade("Ritual rolling pins", "Grandmas are twice as efficient.
The result of years of scientific research!", 4000000000000000, [2, 9], { pool: "tech", groups: "grandma|grandmapocalypse" }); new Game.Upgrade("Underworld ovens", "Cookie production multiplier +3%.
Powered by science, of course!", 8000000000000000, [3, 9], { pool: "tech", groups: "plus:1.03|grandmapocalypse" }); new Game.Upgrade("One mind", 'Each grandma gains +0.02 base CpS per grandma.
We are one. We are many.', 16000000000000000, [4, 9], { pool: "tech", groups: "grandma|grandmapocalypse" }); new Game.Upgrade("Exotic nuts", "Cookie production multiplier +4%.
You'll go crazy over these!", 32000000000000000, [5, 9], { pool: "tech", groups: "plus:1.04|grandmapocalypse" }); new Game.Upgrade("Communal brainsweep", 'Each grandma gains another +0.02 base CpS per grandma.
We fuse. We merge. We grow.', 64000000000000000, [6, 9], { pool: "tech", groups: "grandma|grandmapocalypse" }); new Game.Upgrade("Arcane sugar", "Cookie production multiplier +5%.
Tastes like insects, ligaments, and molasses.", 128000000000000000, [7, 9], { pool: "tech", groups: "plus:1.05|grandmapocalypse" }); new Game.Upgrade("Elder Pact", 'Each grandma gains +0.05 base CpS per portal.
squirm crawl slither writhe', 256000000000000000, [8, 9], { pool: "tech", groups: "grandma|grandmapocalypse" }); new Game.Upgrade("Elder Pledge", "Contains the wrath of the elders, at least for a while.
today we rise
This is a simple ritual involving anti-aging cream, cookie batter mixed in the moonlight, and a live chicken.", 1, [9, 9], { pool: "toggle", groups: "grandmapocalypse", priceFunc: function(pledges) { if (isNaN(pledges)) { pledges = Game.pledges; } return Math.pow(8, Math.min(pledges + 2, 14)); }, descFunc: function() { return ('
Slightly squeaky.", 50000, [11, 0], { tier: 1, col: 11, groups: "click|onlyClick|clickPercent", recommend: clickRecFunc }); new Game.Upgrade("Iron mouse", "Clicking gains +1% of your CpS.
Click like it's 1349!", 5000000, [11, 1], { tier: 2, col: 11, groups: "click|onlyClick|clickPercent", recommend: clickRecFunc }); new Game.Upgrade("Titanium mouse", "Clicking gains +1% of your CpS.
Heavy, but powerful.", 500000000, [11, 2], { tier: 3, col: 11, groups: "click|onlyClick|clickPercent", recommend: clickRecFunc }); new Game.Upgrade("Adamantium mouse", "Clicking gains +1% of your CpS.
You could cut diamond with these.", 50000000000, [11, 13], { tier: 4, col: 11, groups: "click|onlyClick|clickPercent", recommend: clickRecFunc }); order = 40000; new Game.Upgrade("Ultrascience", "Research takes only 5 seconds.
YEAH, SCIENCE!", 7, [9, 2], { pool: "debug", groups: "grandmapocalypse|misc" }); //debug purposes only order = 10020; Game.CookieUpgrade({ name: "Eclipse cookies", desc: "Look to the cookie.", icon: [0, 4], power: 2, price: 99999999999 * 5 }); Game.CookieUpgrade({ name: "Zebra cookies", desc: "...", icon: [1, 4], power: 2, price: 999999999999 }); order = 100; new Game.Upgrade("Quintillion fingers", "The mouse and cursors gain +5000 cookies for each non-cursor object owned.
man, just go click click click click click, it's real easy, man.", 10000000000000, [0, 18], { tier: 9, col: 0, groups: "cursor:250|click" }); order = 40000; new Game.Upgrade("Gold hoard", "Golden cookies appear really often.
That's entirely too many.", 7, [10, 14], { pool: "debug", groups: "goldCookie|misc" }); //debug purposes only order = 15000; new Game.Upgrade("Elder Covenant", "Puts a permanent end to the elders' wrath, at the price of 5% of your CpS.
This is a complicated ritual involving silly, inconsequential trivialities such as cursed laxatives, century-old cacao, and an infant.", 66666666666666, [8, 9], { pool: "toggle", groups: "bonus|grandmapocalypse|globalCpsMod", isParent: true, setCpsNegative: true }); var covenant = Game.last; new Game.Upgrade("Revoke Elder Covenant", "You will get 5% of your CpS back, but the grandmatriarchs will return.
Don't question it.
we", 6666666666, [8, 9], { pool: "toggle", groups: "bonus|grandmapocalypse|globalCpsMod", toggleInto: covenant, isChild: true }); covenant.toggleInto = Game.last; order = 5000; new Game.Upgrade("Get lucky", "Golden cookie effects last twice as long.
rise
again
You've been up all night, haven't you?", 77777777777777, [27, 6], {groups: "goldCookie|goldSwitchMult"}); order = 15000; new Game.Upgrade("Sacrificial rolling pins", "Elder pledges last twice as long.
These are mostly just for spreading the anti-aging cream.", 2888888888888, [2, 9], {groups: "misc|grandmapocalypse|misc"}); order = 10020; Game.CookieUpgrade({ name: "Snickerdoodles", desc: "True to their name.", icon: [2, 4], power: 2, price: 999999999999 * 5 }); Game.CookieUpgrade({ name: "Stroopwafels", desc: "If it ain't dutch, it ain't much.", icon: [3, 4], power: 2, price: 9999999999999 }); Game.CookieUpgrade({ name: "Macaroons", desc: "Not to be confused with macarons.
(And accessorily, shortening the chicken's suffering.)
Can also come in handy to unsee things that can't be unseen.", 7, [4, 9], { pool: "debug", groups: "misc", buyFunc: function() { Game.toggleShowDebug(Game.showDebug); } }); //debug purposes only order = 10031; Game.CookieUpgrade({ name: "Empire biscuits", desc: "For your growing cookie empire, of course!", icon: [5, 4], power: 2, price: 99999999999999 }); Game.CookieUpgrade({ name: "British tea biscuits", desc: "Quite.", icon: [6, 4], require: "Tin of british tea biscuits", power: 2, price: 99999999999999 }); Game.CookieUpgrade({ name: "Chocolate british tea biscuits", desc: "Yes, quite.", icon: [7, 4], require: Game.last.name, power: 2, price: 99999999999999 }); Game.CookieUpgrade({ name: "Round british tea biscuits", desc: "Yes, quite riveting.", icon: [8, 4], require: Game.last.name, power: 2, price: 99999999999999 }); Game.CookieUpgrade({ name: "Round chocolate british tea biscuits", desc: "Yes, quite riveting indeed.", icon: [9, 4], require: Game.last.name, power: 2, price: 99999999999999 }); Game.CookieUpgrade({ 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.CookieUpgrade({ 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", "Antimatter condensers are twice as efficient.
Sweet firm bosons.", "Antimatter condenser", 1); Game.TieredUpgrade("String theory", "Antimatter condensers are twice as efficient.
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", "Antimatter condensers are twice as efficient.
How singular!", "Antimatter condenser", 3); Game.TieredUpgrade("Big bang bake", "Antimatter condensers are twice as efficient.
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.CookieUpgrade({ name: "Madeleines", desc: "Unforgettable!", icon: [12, 3], power: 2, price: 99999999999999 * 5 }); Game.CookieUpgrade({ name: "Palmiers", desc: "Palmier than you!", icon: [13, 3], power: 2, price: 99999999999999 * 5 }); Game.CookieUpgrade({ name: "Palets", desc: "You could probably play hockey with these.
my purrpose is to serve you, sir", 90000000000000000, Game.GetIcon("Kitten", 4), { tier: 4, groups: "bonus|kitten:3" }); order = 100; new Game.Upgrade("Sextillion fingers", "The mouse and cursors gain +50000 cookies for each non-cursor object owned.
sometimes", 10000000000000000, [0, 19], { tier: 10, col: 0, groups: "cursor:300|click" }); order = 200; Game.TieredUpgrade("Double-thick glasses", "Grandmas are twice as efficient.
things just
click
Oh... so THAT's what I've been baking.", "Grandma", 5); order = 300; Game.TieredUpgrade("Gingerbread scarecrows", "Farms are twice as efficient.
Staring at your crops with mischievous glee.", "Farm", 5); order = 500; Game.TieredUpgrade("Recombobulators", "Factories are twice as efficient.
A major part of cookie recombobulation.", "Factory", 5); order = 400; Game.TieredUpgrade("H-bomb mining", "Mines are twice as efficient.
Questionable efficiency, but spectacular nonetheless.", "Mine", 5); order = 600; Game.TieredUpgrade("Chocolate monoliths", "Shipments are twice as efficient.
My god. It's full of chocolate bars.", "Shipment", 5); order = 700; Game.TieredUpgrade("Aqua crustulae", "Alchemy labs are twice as efficient.
Careful with the dosing - one drop too much and you get muffins.", "Alchemy lab", 5); order = 800; Game.TieredUpgrade("Brane transplant", 'Portals are twice as efficient.
And nobody likes muffins.
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", "Time machines are twice as efficient.
Fortnights into milleniums.", "Time machine", 5); order = 1000; Game.TieredUpgrade("Reverse cyclotrons", "Antimatter condensers are twice as efficient.
These can uncollision particles and unspin atoms. For... uh... better flavor, and stuff.", "Antimatter condenser", 5); order = 150; new Game.Upgrade("Unobtainium mouse", "Clicking gains +1% of your CpS.
These nice mice should suffice.", 5000000000000, [11, 14], { tier: 5, col: 11, groups: "click|onlyClick|clickPercent", recommend: clickRecFunc }); order = 10020; Game.CookieUpgrade({ 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.CookieUpgrade({ name: "Sagalongs", desc: "Grandma's favorite?", icon: [15, 3], require: "Box of brand biscuits", power: 3, price: 9999999999999999 }); Game.CookieUpgrade({ name: "Shortfoils", desc: "Foiled again!", icon: [15, 4], require: "Box of brand biscuits", power: 3, price: 9999999999999999 }); Game.CookieUpgrade({ 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", "You keep producing cookies even while the game is closed.
It's the most beautiful thing I've ever seen.", 7, [10, 0], { pool: "debug", groups: "misc" }); //debug purposes only order = 10030; Game.CookieUpgrade({ name: "Fig gluttons", desc: "Got it all figured out.", icon: [17, 4], require: "Box of brand biscuits", power: 2, price: 999999999999999 * 5 }); Game.CookieUpgrade({ name: "Loreols", desc: "Because, uh... they're worth it?", icon: [16, 3], require: "Box of brand biscuits", power: 2, price: 999999999999999 * 5 }); Game.CookieUpgrade({ 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.CookieUpgrade({ 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", "Unlocks 5% of the potential of your prestige level.
Grants the knowledge of heavenly chips, and how to use them to make baking more efficient.", 11, [19, 7], { groups: "bonus|heaven|heavenAch", require: function() { return Game.ascensionMode !== 1 && Game.prestige > 0; } }); new Game.Upgrade("Heavenly cookie stand", "Unlocks 25% of the potential of your prestige level.
It's a secret to everyone.
Don't forget to visit the heavenly lemonade stand afterwards. When afterlife gives you lemons...", 1111, [18, 7], { groups: "bonus|heaven|heavenAch", require: function() { return Game.ascensionMode !== 1 && Game.prestige > 0 && Game.HasUpgrade("Heavenly chip secret"); } }); new Game.Upgrade("Heavenly bakery", "Unlocks 50% of the potential of your prestige level.
Also sells godly cakes and divine pastries. The pretzels aren't too bad either.", 111111, [17, 7], { groups: "bonus|heaven|heavenAch", require: function() { return Game.ascensionMode !== 1 && Game.prestige > 0 && Game.HasUpgrade("Heavenly cookie stand"); } }); new Game.Upgrade("Heavenly confectionery", "Unlocks 75% of the potential of your prestige level.
They say angel bakers work there. They take angel lunch breaks and sometimes go on angel strikes.", 11111111, [16, 7], { groups: "bonus|heaven|heavenAch", require: function() { return Game.ascensionMode !== 1 && Game.prestige > 0 && Game.HasUpgrade("Heavenly bakery"); } }); new Game.Upgrade("Heavenly key", "Unlocks 100% of the potential of your prestige level.
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.", 1111111111, [15, 7], { groups: "bonus|heaven|heavenAch", require: function() { return Game.ascensionMode !== 1 && Game.prestige > 0 && Game.HasUpgrade("Heavenly confectionery"); } }); order = 10100; Game.CookieUpgrade({ name: "Skull cookies", desc: "Wanna know something spooky? You've got one of these inside your head RIGHT NOW.", locked: true, icon: [12, 8], power: 2, price: 444444444444, groups: "halloween|halloweenAch|grandmapocalypse" }); Game.CookieUpgrade({ name: "Ghost cookies", desc: "They're something strange, but they look pretty good!", locked: true, icon: [13, 8], power: 2, price: 444444444444, groups: "halloween|halloweenAch|grandmapocalypse" }); Game.CookieUpgrade({ name: "Bat cookies", desc: "The cookies this town deserves.", locked: true, icon: [14, 8], power: 2, price: 444444444444, groups: "halloween|halloweenAch|grandmapocalypse" }); Game.CookieUpgrade({ name: "Slime cookies", desc: "The incredible melting cookies!", locked: true, icon: [15, 8], power: 2, price: 444444444444, groups: "halloween|halloweenAch|grandmapocalypse" }); Game.CookieUpgrade({ name: "Pumpkin cookies", desc: "Not even pumpkin-flavored. Tastes like glazing. Yeugh.", locked: true, icon: [16, 8], power: 2, price: 444444444444, groups: "halloween|halloweenAch|grandmapocalypse" }); Game.CookieUpgrade({ name: "Eyeball cookies", desc: "When you stare into the cookie, the cookie stares back at you.", locked: true, icon: [17, 8], power: 2, price: 444444444444, groups: "halloween|halloweenAch|grandmapocalypse" }); Game.CookieUpgrade({ name: "Spider cookies", desc: "You found the recipe on the web. They do whatever a cookie can.", locked: true, icon: [18, 8], power: 2, price: 444444444444, groups: "halloween|halloweenAch|grandmapocalypse" }); order = 0; new Game.Upgrade("Persistent memory", "Subsequent research will be 10 times as fast.
May you use them wisely.
It's all making sense!", 500, [9, 2], { pool: "prestige", groups: "grandmapocalypse" }); order = 40000; new Game.Upgrade("Wrinkler doormat", "Wrinklers spawn much more frequently.
Again!
You're such a pushover.", 7, [19, 8], { pool: "debug", groups: "grandmapocalypse|misc" }); //debug purposes only order = 10200; Game.CookieUpgrade({ name: "Christmas tree biscuits", desc: "Whose pine is it anyway?", locked: true, icon: [12, 10], power: 2, price: 252525252525, groups: "christmas|christmasAch" }); Game.CookieUpgrade({ name: "Snowflake biscuits", desc: "Mass-produced to be unique in every way.", locked: true, icon: [13, 10], power: 2, price: 252525252525, groups: "christmas|christmasAch" }); Game.CookieUpgrade({ name: "Snowman biscuits", desc: "It's frosted. Doubly so.", locked: true, icon: [14, 10], power: 2, price: 252525252525, groups: "christmas|christmasAch" }); Game.CookieUpgrade({ 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: true, icon: [15, 10], power: 2, price: 252525252525, groups: "christmas|christmasAch" }); Game.CookieUpgrade({ name: "Candy cane biscuits", desc: "It's two treats in one!
Not a creature was stirring, not even a mouse.", 25, [19, 9], { groups: "christmas|misc", buyFunc: function() { if (this.bought && !Game.santa.dropEle.selectedIndex) { Game.santa.dropEle.selectedIndex = 1; } } }); Game.last.createCrate("#familiarIcons"); new Game.Upgrade("Increased merriness", "Cookie production multiplier +15%.
It turns out that the key to increased merriness, strangely enough, happens to be a good campfire and some s'mores.", 2525, [17, 9], {groups: "christmas|plus:1.15|santaDrop"}); new Game.Upgrade("Improved jolliness", "Cookie production multiplier +15%.
You know what they say, after all; the s'more, the merrier.
A nice wobbly belly goes a long way.", 2525, [17, 9], {groups: "christmas|plus:1.15|santaDrop"}); new Game.Upgrade("A lump of coal", "Cookie production multiplier +1%.
You jolly?
Some of the world's worst stocking stuffing.", 2525, [13, 9], {groups: "christmas|plus:1.01|santaDrop"}); new Game.Upgrade("An itchy sweater", 'Cookie production multiplier +1%.
I guess you could try starting your own little industrial revolution, or something?...
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], {groups: "christmas|plus:1.01|santaDrop"}); new Game.Upgrade("Reindeer baking grounds", "Reindeer appear twice as frequently.
Male reindeer are from Mars; female reindeer are from venison.", 2525, [12, 9], {groups: "christmas|misc|santaDrop"}); new Game.Upgrade("Weighted sleighs", "Reindeer are twice as slow.
Hope it was worth the weight.", 2525, [12, 9], {groups: "christmas|misc|santaDrop"}); new Game.Upgrade("Ho ho ho-flavored frosting", "Reindeer give twice as much.
(Something something forced into cervidude)
It's time to up the antler.", 2525, [12, 9], {groups: "christmas|misc|santaDrop"}); new Game.Upgrade("Season savings", "All buildings are 1% cheaper.
By Santa's beard, what savings!", 2525, [16, 9], {groups: "christmas|priceReduction|misc|santaDrop"}); new Game.Upgrade("Toy workshop", "All upgrades are 5% cheaper.
But who will save us?
Watch yours-elf around elvesdroppers who might steal our production secrets.", 2525, [16, 9], {groups: "christmas|priceReduction|misc|santaDrop"}); new Game.Upgrade("Naughty list", "Grandmas are twice as productive.
Or elven worse!
This list contains every unholy deed perpetuated by grandmakind.", 2525, [15, 9], {groups: "christmas|grandma|santaDrop"}); new Game.Upgrade("Santa's bottomless bag", "Random drops are 10% more common.
He won't be checking this one twice.
Once. Once is enough.
This is one bottom you can't check out.", 2525, [19, 9], {groups: "christmas|misc|santaDrop"}); new Game.Upgrade("Santa's helpers", "Clicking is 10% more powerful.
Some choose to help hamburger; some choose to help you.", 2525, [19, 9], {groups: "christmas|click|onlyClick|santaDrop"}); new Game.Upgrade("Santa's legacy", "Cookie production multiplier +3% per Santa's levels.
To each their own, I guess.
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], {groups: "christmas|bonus|santaDrop"}); new Game.Upgrade("Santa's milk and cookies", "Milk is 5% more powerful.
Part of Santa's dreadfully unbalanced diet.", 2525, [19, 9], {groups: "christmas|bonus|santaDrop"}); order = 40000; new Game.Upgrade("Reindeer season", "Reindeer spawn much more frequently.
Go, Cheater! Go, Hacker and Faker!", 7, [12, 9], { pool: "debug", groups: "christmas|misc" }); //debug purposes only order = 25000; new Game.Upgrade("Santa's dominion", "Cookie production multiplier +20%.
My name is Claus, king of kings;", 2525252525252525, [19, 10], {groups: "christmas|priceReduction|plus:1.2"}); order = 10300; var heartPower = function() { var pow = 2; if (Game.Has("Starlove")) { pow = 3; } 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.CookieUpgrade({ name: "Pure heart biscuits", desc: 'Melty white chocolate
Look on my toys, ye Mighty, and despair!
Get rid of the grime and let more light in.", "Prism", 1); Game.TieredUpgrade("9th color", "Prisms are twice as efficient.
Truly, truly outrageous.
Delve into untouched optical depths where even the mantis shrimp hasn't set an eye!", "Prism", 2); Game.TieredUpgrade("Chocolate light", "Prisms are twice as efficient.
Bask into its cocoalescence.", "Prism", 3); Game.TieredUpgrade("Grainbow", "Prisms are twice as efficient.
(Warning : may cause various interesting albeit deadly skin conditions.)
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", "Prisms are twice as efficient.
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; new Game.Upgrade("Season switcher", "Allows you to trigger seasonal events at will, for a price.
There will always be time.", 1111, [16, 6], { pool: "prestige", groups: "misc" }); new Game.Upgrade("Festive biscuit", "Triggers Christmas season for the next 24 hours.
'Twas the night before Christmas- or was it?", Game.seasonTriggerBasePrice, [12, 10], { pool: "toggle", groups: "seasonSwitch", season: "christmas", descFunc: function() { var santaDrops = Game.UpgradesByGroup.santaDrop; var reindeerDrops = Game.UpgradesByGroup.christmasAch; return ('
spooky scary skeletons", Game.seasonTriggerBasePrice, [13, 8], { pool: "toggle", groups: "seasonSwitch", season: "halloween", descFunc: function() { var halloweenDrops = Game.UpgradesByGroup.halloweenAch; return ('
will wake you with a boo
Romance never goes out of fashion.", Game.seasonTriggerBasePrice, [20, 3], { pool: "toggle", groups: "seasonSwitch", season: "valentines", descFunc: function() { var heartDrops = Game.UpgradesByGroup.valentinesAch; return ('
Business. Serious business. This is absolutely all of your business.", Game.seasonTriggerBasePrice, [17, 6], { pool: "toggle", groups: "seasonSwitch", season: "fools", descFunc: function() { return ('
Season to taste.", 7, [16, 6], { pool: "debug", groups: "misc" }); //debug purposes only order = 20000; new Game.Upgrade("Kitten managers", "You gain more CpS the more milk you have.
that's not gonna paws any problem, sir", 900000000000000000000, Game.GetIcon("Kitten", 5), { tier: 5, groups: "bonus|kitten:4" }); order = 100; new Game.Upgrade("Septillion fingers", "The mouse and cursors gain +500000 cookies for each non-cursor object owned.
[cursory flavor text]", 10000000000000000000, [12, 20], { tier: 11, col: 0, groups: "cursor:350|click" }); new Game.Upgrade("Octillion fingers", "The mouse and cursors gain +5000000 cookies for each non-cursor object owned.
Turns out you can quite put your finger on it.", 10000000000000000000000, [12, 19], { tier: 12, col: 0, groups: "cursor:400|click" }); order = 150; new Game.Upgrade("Eludium mouse", "Clicking gains +1% of your CpS.
I rodent do that if I were you.", 500000000000000, [11, 15], { tier: 6, col: 11, groups: "click|onlyClick|clickPercent", recommend: clickRecFunc }); new Game.Upgrade("Wishalloy mouse", "Clicking gains +1% of your CpS.
Clicking is fine and dandy, but don't smash your mouse over it. Get your game on. Go play.", 50000000000000000, [11, 16], { tier: 7, col: 11, groups: "click|onlyClick|clickPercent", recommend: clickRecFunc }); order = 200; Game.TieredUpgrade("Aging agents", "Grandmas are twice as efficient.
Counter-intuitively, grandmas have the uncanny ability to become more powerful the older they get.", "Grandma", 6); order = 300; Game.TieredUpgrade("Pulsar sprinklers", "Farms are twice as efficient.
There's no such thing as over-watering. The moistest is the bestest.", "Farm", 6); order = 500; Game.TieredUpgrade("Deep-bake process", "Factories are twice as efficient.
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", "Mines are twice as efficient.
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", "Shipments are twice as efficient.
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", "Alchemy labs are twice as efficient.
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", "Portals are twice as efficient.
It's almost like, say, an elder god could fit through this thing now. Hypothetically.", "Portal", 6); order = 900; Game.TieredUpgrade("Far future enactment", "Time machines are twice as efficient.
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", "Antimatter condensers are twice as efficient.
The theory of nanocosmics posits that each subatomic particle is in fact its own self-contained universe, holding unfathomable amounts of energy.", "Antimatter condenser", 6); order = 1100; Game.TieredUpgrade("Glow-in-the-dark", "Prisms are twice as efficient.
This somehow stacks with the nested universe theory, because physics.
Your prisms now glow in the dark, effectively doubling their output!", "Prism", 6); order = 10032; Game.CookieUpgrade({ 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.CookieUpgrade({ name: "Lemon macarons", desc: "Tastefully sour, delightful treats.", icon: [23, 3], require: "Box of macarons", power: 3, price: 9999999 }); Game.CookieUpgrade({ name: "Chocolate macarons", desc: "They're like tiny sugary burgers!", icon: [24, 3], require: "Box of macarons", power: 3, price: 9999999999 }); Game.CookieUpgrade({ name: "Pistachio macarons", desc: "Pistachio shells now removed after multiple complaints.", icon: [22, 4], require: "Box of macarons", power: 3, price: 9999999999999 }); Game.CookieUpgrade({ name: "Hazelnut macarons", desc: "These go especially well with coffee.", icon: [23, 4], require: "Box of macarons", power: 3, price: 9999999999999999 }); Game.CookieUpgrade({ 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", 'Cookie production multiplied by 1,000.
It\'s magic. I ain\'t gotta explain sht.', 7, [17, 5], { pool: "debug", groups: "bonus|globalCpsMod" }); //debug purposes only order = 24000; new Game.Upgrade("Bunny biscuit", "Triggers Easter season for the next 24 hours.
All the world will be your enemy", Game.seasonTriggerBasePrice, [0, 12], { pool: "toggle", groups: "seasonSwitch", season: "easter", descFunc: function() { var easterEggs = Game.UpgradesByGroup.egg; return ('
and when they catch you,
they will kill you...
but first they must catch you.
The egg. The egg came first. Get over it.", eggPrice, [1, 12], {groups: "easter|commonEgg|plus"}); new Game.Upgrade("Duck egg", "Cookie production multiplier +1%.
Then he waddled away.", eggPrice, [2, 12], {groups: "easter|commonEgg|plus"}); new Game.Upgrade("Turkey egg", "Cookie production multiplier +1%.
These hatch into strange, hand-shaped creatures.", eggPrice, [3, 12], {groups: "easter|commonEgg|plus"}); new Game.Upgrade("Quail egg", "Cookie production multiplier +1%.
These eggs are positively tiny. I mean look at them. How does this happen? Whose idea was that?", eggPrice, [4, 12], {groups: "easter|commonEgg|plus"}); new Game.Upgrade("Robin egg", "Cookie production multiplier +1%.
Holy azure-hued shelled embryos!", eggPrice, [5, 12], {groups: "easter|commonEgg|plus"}); new Game.Upgrade("Ostrich egg", "Cookie production multiplier +1%.
One of the largest eggs in the world. More like ostrouch, am I right?", eggPrice, [6, 12], {groups: "easter|commonEgg|plus"}); new Game.Upgrade("Cassowary egg", "Cookie production multiplier +1%.
Guys?
The cassowary is taller than you, possesses murderous claws and can easily outrun you.", eggPrice, [7, 12], {groups: "easter|commonEgg|plus"}); new Game.Upgrade("Salmon roe", "Cookie production multiplier +1%.
You'd do well to be casso-wary of them.
Do the impossible, see the invisible.", eggPrice, [8, 12], {groups: "easter|commonEgg|plus"}); new Game.Upgrade("Frogspawn", 'Cookie production multiplier +1%.
Roe roe, fight the power?
I was going to make a pun about how these "toadally look like eyeballs", but froget it.', eggPrice, [9, 12], {groups: "easter|commonEgg|plus"}); new Game.Upgrade("Shark egg", "Cookie production multiplier +1%.
HELLO IS THIS FOOD?", eggPrice, [10, 12], {groups: "easter|commonEgg|plus"}); new Game.Upgrade("Turtle egg", "Cookie production multiplier +1%.
LET ME TELL YOU ABOUT FOOD.
WHY DO I KEEP EATING MY FRIENDS
Turtles, right? Hatch from shells. Grow into shells. What's up with that?", eggPrice, [11, 12], {groups: "easter|commonEgg|plus"}); new Game.Upgrade("Ant larva", "Cookie production multiplier +1%.
Now for my skit about airplane food.
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.", eggPrice, [12, 12], {groups: "easter|commonEgg|plus"}); new Game.Upgrade("Golden goose egg", "Golden cookies appear 5% more often.
And all will be well.
The sole vestige of a tragic tale involving misguided investments.", eggPrice2, [13, 12], {groups: "easter|rareEgg|goldCookie|goldSwitchMult|misc"}); new Game.Upgrade("Faberge egg", "All buildings and upgrades are 1% cheaper.
This outrageous egg is definitely fab.", eggPrice2, [14, 12], {groups: "easter|rareEgg|priceReduction|misc"}); new Game.Upgrade("Wrinklerspawn", "Wrinklers explode into 5% more cookies.
Look at this little guy! It's gonna be a big boy someday! Yes it is!", eggPrice2, [15, 12], {groups: "easter|rareEgg|grandmapocalypse|misc"}); new Game.Upgrade("Cookie egg", "Clicking is 10% more powerful.
The shell appears to be chipped.", eggPrice2, [16, 12], {groups: "easter|rareEgg|click|onlyClick"}); new Game.Upgrade("Omelette", "Other eggs appear 10% more frequently.
I wonder what's inside this one!
Fromage not included.", eggPrice2, [17, 12], {groups: "easter|rareEgg|misc"}); new Game.Upgrade("Chocolate egg", "Contains a lot of cookies.
Laid by the elusive cocoa bird. There's a surprise inside!", eggPrice2, [18, 12], {groups: "easter|rareEgg|misc"}); new Game.Upgrade("Century egg", "You continually gain more CpS the longer you've played in the current ascension.
Actually not centuries-old. This one isn't a day over 86!", eggPrice2, [19, 12], { groups: "easter|rareEgg|bonus", descFunc: function() { return ('
hey it\'s "egg"', eggPrice2, [20, 12], {groups: "easter|rareEgg|addCps:9"}); Game.GetHowManyEggs = function(limit, includeUnlocked) { return Game.countUpgradesByGroup(Game.UpgradesByGroup.egg, limit, includeUnlocked); }; order = 10032; Game.CookieUpgrade({ name: "Caramel macarons", desc: "The saltiest, chewiest of them all.", icon: [25, 3], require: "Box of macarons", power: 3, price: 9999999999999999999999 }); Game.CookieUpgrade({ 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", "Banks are twice as efficient.
Able to process a higher amount of transactions. Careful though, as taller tellers tell tall tales.", "Bank", 1); Game.TieredUpgrade("Scissor-resistant credit cards", "Banks are twice as efficient.
For those truly valued customers.", "Bank", 2); Game.TieredUpgrade("Acid-proof vaults", "Banks are twice as efficient.
You know what they say : better safe than sorry.", "Bank", 3); Game.TieredUpgrade("Chocolate coins", "Banks are twice as efficient.
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", "Banks are twice as efficient.
Can't argue with mathematics! Now fork it over.", "Bank", 5); Game.TieredUpgrade("Financial zen", "Banks are twice as efficient.
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", "Temples are twice as efficient.
Lure even greedier adventurers to retrieve your cookies. Now that's a real idol game!", "Temple", 1); Game.TieredUpgrade("Sacrifices", "Temples are twice as efficient.
What's a life to a gigaton of cookies?", "Temple", 2); Game.TieredUpgrade("Delicious blessing", "Temples are twice as efficient.
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", "Temples are twice as efficient.
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", "Temples are twice as efficient.
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", "Temples are twice as efficient.
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", "Wizard towers are twice as efficient.
Tests have shown increased thaumic receptivity relative to the geometric proportions of wizardly conic implements.", "Wizard tower", 1); Game.TieredUpgrade("Beardlier beards", "Wizard towers are twice as efficient.
Haven't you heard? The beard is the word.", "Wizard tower", 2); Game.TieredUpgrade("Ancient grimoires", 'Wizard towers are twice as efficient.
Contain interesting spells such as "Turn Water To Drool", "Grow Eyebrows On Furniture" and "Summon Politician".', "Wizard tower", 3); Game.TieredUpgrade("Kitchen curses", "Wizard towers are twice as efficient.
Exotic magic involved in all things pastry-related. Hexcellent!", "Wizard tower", 4); Game.TieredUpgrade("School of sorcery", "Wizard towers are twice as efficient.
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", "Wizard towers are twice as efficient.
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.GrandmaSynergy("Priestess grandmas", "A nice priestess to praise the one true Baker in the sky.", "Temple"); Game.GrandmaSynergy("Witch grandmas", "A nice witch to cast a zip, and a zoop, and poof! Cookies.", "Wizard tower"); order = 0; new Game.Upgrade("Tin of british tea biscuits", "Contains an assortment of fancy biscuits.
Every time is tea time.", 25, [21, 8], { pool: "prestige", groups: "misc" }); new Game.Upgrade("Box of macarons", "Contains an assortment of macarons.
Multicolored delicacies filled with various kinds of jam.", 25, [20, 8], { pool: "prestige", groups: "misc" }); new Game.Upgrade("Box of brand biscuits", "Contains an assortment of popular biscuits.
Not to be confused with macaroons, macaroni, macarena or any of that nonsense.
They're brand new!", 25, [20, 9], { pool: "prestige", groups: "misc" }); order = 10020; Game.CookieUpgrade({ name: "Pure black chocolate cookies", desc: 'Dipped in a lab-made substance darker than the darkest cocoa (dubbed "chocoalate").', icon: [26, 3], power: 4, price: 9999999999999999 * 5 }); Game.CookieUpgrade({ 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: 4, price: 9999999999999999 * 5 }); Game.CookieUpgrade({ name: "Ladyfingers", desc: "Cleaned and sanitized so well you'd swear they're actual biscuits.", icon: [27, 3], power: 3, price: 99999999999999999 }); Game.CookieUpgrade({ name: "Tuiles", desc: "These never go out of tile.", icon: [27, 4], power: 3, price: 99999999999999999 * 5 }); Game.CookieUpgrade({ name: "Chocolate-stuffed biscuits", desc: "A princely snack!
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], { pool: "prestige", groups: "misc" }); 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], { pool: "prestige", groups: "misc" }); 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], { pool: "prestige", groups: "misc" }); 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], { pool: "prestige", groups: "misc" }); 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], { pool: "prestige", groups: "misc" }); 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], { pool: "prestige", groups: "misc" }); new Game.Upgrade("God", desc(10, 75) + "
Like Santa, but less fun.", Math.pow(angelPriceFactor, 7), [6, 11], { pool: "prestige", groups: "misc" }); new Game.Upgrade("Twin Gates of Transcendence", "You now keep making cookies while the game is closed, at the rate of 5% of your regular CpS and up to 1 hour after the game is closed.
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], { pool: "prestige", groups: "misc" }); new Game.Upgrade("Heavenly luck", "Golden cookies appear 5% more often.
Someone up there likes you.", 77, [22, 6], { pool: "prestige", groups: "goldCookie|goldSwitchMult" }); new Game.Upgrade("Lasting fortune", "Golden cookies effects last 10% longer.
This isn't your average everyday luck. This is... advanced luck.", 777, [23, 6], { pool: "prestige", groups: "goldCookie|goldSwitchMult" }); new Game.Upgrade("Decisive fate", "Golden cookies stay 5% longer.
Life just got a bit more intense.", 7777, [10, 14], { pool: "prestige", groups: "goldCookie|goldSwitchMult" }); new Game.Upgrade("Divine discount", "Buildings are 1% cheaper.
Someone special deserves a special price.", 99999, [21, 7], { pool: "prestige", groups: "priceReduction|misc" }); new Game.Upgrade("Divine sales", "Upgrades are 1% cheaper.
Everything must go!", 99999, [18, 7], { pool: "prestige", groups: "priceReduction|misc" }); new Game.Upgrade("Divine bakeries", "Cookie upgrades are 5 times cheaper.
They sure know what they're doing.", 399999, [17, 7], { pool: "prestige", groups: "priceReduction|misc" }); new Game.Upgrade("Starter kit", "You start with 10 cursors.
This can come in handy.", 50, [0, 14], { pool: "prestige", groups: "cursor|priceReduction|misc", buyFunc: function() { Game.Objects["Cursor"].free = this.bought ? 10 : 0; Game.Objects["Cursor"].priceCache = {}; } }); new Game.Upgrade("Starter kitchen", "You start with 5 grandmas.
Where did these come from?", 5000, [1, 14], { pool: "prestige", groups: "grandma|priceReduction|misc", buyFunc: function() { Game.Objects["Grandma"].free = this.bought ? 5 : 0; Game.Objects["Grandma"].priceCache = {}; } }); new Game.Upgrade("Halo gloves", "Clicks are 10% more powerful.
Smite that cookie.", 55555, [22, 7], { pool: "prestige", groups: "click|onlyClick" }); new Game.Upgrade("Kitten angels", "You gain more CpS the more milk you have.
All cats go to heaven.", 9000, [23, 7], { pool: "prestige", groups: "bonus|kitten" }); new Game.Upgrade("Unholy bait", "Wrinklers appear 5 times as fast.
No wrinkler can resist the scent of worm biscuits.", 44444, [15, 12], { pool: "prestige", groups: "grandmapocalypse|misc" }); new Game.Upgrade("Sacrilegious corruption", "Wrinklers regurgitate 5% more cookies.
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], { pool: "prestige", groups: "grandmapocalypse|misc" }); order = 200; Game.TieredUpgrade("Xtreme walkers", 'Grandmas are twice as efficient.
Complete with flame decals and a little horn that goes "toot".', "Grandma", 7); order = 300; Game.TieredUpgrade("Fudge fungus", "Farms are twice as efficient.
A sugary parasite whose tendrils help cookie growth.", "Farm", 7); order = 400; Game.TieredUpgrade("Planetsplitters", "Mines are twice as efficient.
Please do not breathe in the spores. In case of spore ingestion, seek medical help within the next 36 seconds.
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", "Factories are twice as efficient.
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", "Banks are twice as efficient.
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", "Temples are twice as efficient.
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", "Wizard towers are twice as efficient.
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", "Shipments are twice as efficient.
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", "Alchemy labs are twice as efficient.
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", "Portals are twice as efficient.
Just in case, alright?", "Portal", 7); order = 900; Game.TieredUpgrade("Great loop hypothesis", "Time machines are twice as efficient.
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", "Antimatter condensers are twice as efficient.
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", "Prisms are twice as efficient.
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", "Grandmas are twice as efficient.
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", "Farms are twice as efficient.
Taking care of crops is so much easier when your plants can just walk about and help around the farm.", "Farm", 8); order = 400; Game.TieredUpgrade("Canola oil wells", "Mines are twice as efficient.
Do not pet. Do not feed. Do not attempt to converse with.
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", "Factories are twice as efficient.
Why didn't we think of this earlier?", "Factory", 8); order = 525; Game.TieredUpgrade("The stuff rationale", "Banks are twice as efficient.
If not now, when? If not it, what? If not things... stuff?", "Bank", 8); order = 550; Game.TieredUpgrade("Theocracy", "Temples are twice as efficient.
You've turned your cookie empire into a perfect theocracy, gathering the adoration of zillions of followers from every corner of the universe.", "Temple", 8); order = 575; Game.TieredUpgrade("Rabbit trick", "Wizard towers are twice as efficient.
Don't let it go to your head.
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!", "Wizard tower", 8); order = 600; Game.TieredUpgrade("The final frontier", "Shipments are twice as efficient.
Resulting cookies may or may not be fit for vegans.
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", "Alchemy labs are twice as efficient.
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", 'Portals are twice as efficient.
A popular verse goes like so : "jau\'hn madden jau\'hn madden aeiouaeiouaeiou brbrbrbrbrbrbr"', "Portal", 8); order = 900; Game.TieredUpgrade("Cookietopian moments of maybe", "Time machines are twice as efficient.
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?", "Antimatter condensers are twice as efficient.
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", "Prisms are twice as efficient.
Oh man, this is really messing with your eyes.", "Prism", 8); order = 20000; new Game.Upgrade("Kitten accountants", "You gain more CpS the more milk you have.
business going great, sir", 900000000000000000000000, Game.GetIcon("Kitten", 6), { tier: 6, groups: "bonus|kitten:5" }); new Game.Upgrade("Kitten specialists", "You gain more CpS the more milk you have.
optimeowzing your workflow like whoah, sir", 900000000000000000000000000, Game.GetIcon("Kitten", 7), { tier: 7, groups: "bonus|kitten:6" }); new Game.Upgrade("Kitten experts", "You gain more CpS the more milk you have.
10 years expurrrtise in the cookie business, sir", 900000000000000000000000000000, Game.GetIcon("Kitten", 8), { tier: 8, groups: "bonus|kitten:7" }); new Game.Upgrade("How to bake your dragon", '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], { pool: "prestige", groups: "misc" }); order = 25100; new Game.Upgrade("A crumbly egg", "Unlocks the cookie dragon egg.
Thank you for adopting this robust, fun-loving cookie dragon! It will bring you years of joy and entertainment.", 25, [21, 12], { groups: "misc", require: getCookiesBakedRequireFunc({ price: 1000000, require: "How to bake your dragon" }) }); Game.last.createCrate("#familiarIcons"); new Game.Upgrade("Chimera", "Synergy upgrades are 2% cheaper.
Keep in a dry and cool place, and away from other house pets. Subscription to home insurance is strongly advised.
More than the sum of its parts.", Math.pow(angelPriceFactor, 9), [24, 7], { pool: "prestige", groups: "priceReduction|misc" }); new Game.Upgrade("Tin of butter cookies", "Contains an assortment of rich butter cookies.
Five varieties of danish cookies.", 25, [21, 9], { pool: "prestige", groups: "misc" }); new Game.Upgrade("Golden switch", "Unlocks the golden switch, which passively boosts your CpS by 50% but disables golden cookies.
Complete with little paper cups.
Less clicking, more idling.", 999, [21, 10], { pool: "prestige", groups: "misc" }); new Game.Upgrade("Classic dairy selection", "Unlocks the milk selector, letting you pick which milk is displayed under your cookie.
Don't have a cow, man.", 9, [1, 8], { pool: "prestige", groups: "misc" }); new Game.Upgrade("Fanciful dairy selection", "Contains more exotic flavors for your milk selector.
Strong bones for the skeleton army.", 1000000, [9, 7], { pool: "prestige", groups: "misc" }); order = 10300; Game.CookieUpgrade({ 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, require: function() { return Game.HasUpgrade("A crumbly egg") && Game.dragonLevel > 19; } }); priceFunc = function() { return Game.cookiesPs * 60 * 60; }; var descFunc = function() { if (Game.HasUpgrade("Residual luck")) { var bonus = Game.countUpgradesByGroup("goldSwitchMult"); return ('
A demon of shortcuts and laziness, Belphegor commands machines to do work in his stead.", Math.pow(angelPriceFactor, 1), [7, 11], { pool: "prestige", groups: "misc" }); 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], { pool: "prestige", groups: "misc" }); new Game.Upgrade("Abaddon", desc(8) + "
Master of overindulgence, Abaddon governs the wrinkler brood and inspires their insatiability.", Math.pow(angelPriceFactor, 3), [9, 11], { pool: "prestige", groups: "misc" }); 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], { pool: "prestige", groups: "misc" }); 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], { pool: "prestige", groups: "misc" }); 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], { pool: "prestige", groups: "misc" }); 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], { pool: "prestige", groups: "misc" }); new Game.Upgrade("Golden cookie alert sound", "Unlocks the golden cookie sound selector, which lets you pick whether golden cookies emit a sound when appearing or not.
A sound decision.", 9999, [28, 6], { pool: "prestige", groups: "misc" }); order = 49900; new Game.Upgrade("Golden cookie sound selector", "Lets you change the sound golden cookies make when they spawn.", 0, [28, 6], { pool: "toggle", noBuy: true, groups: "misc" }); new Game.Upgrade("Basic wallpaper assortment", "Unlocks the background selector, letting you select the game's background.
Prioritizing aesthetics over crucial utilitarian upgrades? Color me impressed.", 99, [29, 5], { pool: "prestige", groups: "misc" }); new Game.Upgrade("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.
We\'ve all been waiting for you.', 1, [21, 6], { pool: "prestige", groups: "misc" }); new Game.Upgrade("Elder spice", "You can attract 2 more wrinklers.
The cookie your cookie could smell like.", 444444, [19, 8], { pool: "prestige", groups: "grandmapocalypse|misc", buyFunc: function() { Game.maxWrinklers = this.bought ? 12 : 10; byId("numWrinklersIn").maxIn = Game.maxWrinklers; Game.setInput("#numWrinklersIn"); } }); new Game.Upgrade("Residual luck", "While the golden switch is on, you gain an additional +10% CpS per golden cookie upgrade owned.
Fortune comes in many flavors.", 99999, [27, 6], { pool: "prestige", groups: "goldCookie" }); order = 150; new Game.Upgrade("Fantasteel mouse", "Clicking gains +1% of your CpS.
You could be clicking using your touchpad and we'd be none the wiser.", 5000000000000000000, [11, 17], { tier: 8, col: 11, groups: "click|onlyClick|clickPercent", recommend: clickRecFunc }); new Game.Upgrade("Nevercrack mouse", "Clicking gains +1% of your CpS.
How much beefier can you make a mouse until it's considered a rat?", 500000000000000000000, [11, 18], { tier: 9, col: 11, groups: "click|onlyClick|clickPercent", recommend: clickRecFunc }); new Game.Upgrade("Five-finger discount", "All upgrades are 1% cheaper per 100 cursors.
Stick it to the man.", 555555, [28, 7], { pool: "prestige", groups: "priceReduction|misc" }); 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.", "Mine", "Shipment", "synergy2"); Game.SynergyUpgrade("Quantum electronics", "
But hey, a space bribe goes a long way.
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.", "Shipment", "Mine", "synergy1"); Game.SynergyUpgrade("Shipyards", "
Extracted from the fuels of ancient, fossilized civilizations.
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.", "Portal", "Prism", "synergy2"); Game.SynergyUpgrade("Relativistic parsec-skipping", "
Perhaps at all of us.
People will tell you this isn't physically possible.", "Time machine", "Shipment", "synergy1"); Game.SynergyUpgrade("Primeval glow", "
These are people you don't want on your ship.
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", "Unlocks a new tier of upgrades that affect 2 buildings at the same time.
The many beats the few.", 222222, [10, 20], { pool: "prestige", groups: "synergy|misc" }); new Game.Upgrade("Synergies Vol. II", "Unlocks a new tier of upgrades that affect 2 buildings at the same time.
The several beats the many.", 2222222, [10, 29], { pool: "prestige", groups: "synergy|misc" }); new Game.Upgrade("Heavenly cookies", "Cookie production multiplier +10% permanently.
Baked with heavenly chips. An otherwordly flavor that transcends time and space.", 3, [25, 12], { pool: "prestige", power: 10, pseudoCookie: true }); new Game.Upgrade("Wrinkly cookies", "Cookie production multiplier +10% permanently.
The result of regular cookies left to age out for countless eons in a place where time and space are meaningless.", 6666666, [26, 12], { pool: "prestige", power: 10, pseudoCookie: true }); new Game.Upgrade("Distilled essence of redoubled luck", "Golden cookies (and all other things that spawn, such as reindeer) have 1% chance of being doubled.
Tastes glittery. The empty phial makes for a great pencil holder.", 7777777, [27, 12], { pool: "prestige", groups: "goldCookie|misc" }); order = 40000; new Game.Upgrade("Occult obstruction", "Cookie production reduced to 0.
If symptoms persist, consult a doctor.", 7, [15, 5], { pool: "debug", groups: "bonus|globalCpsMod" }); //debug purposes only new Game.Upgrade("Glucose-charged air", "Sugar lumps coalesce a whole lot faster.
Don't breathe too much or you'll get diabetes!", 7, [29, 16], { pool: "debug", groups: "misc" }); //debug purposes only order = 10300; Game.CookieUpgrade({ name: "Lavender chocolate butter biscuit", desc: "Rewarded for owning 300 of everything.
A plant of supernatural sweetness grown by angels in heavenly gardens.", 100000000, [25, 15], { pool: "prestige", groups: "misc" }); new Game.Upgrade("Diabetica Daemonicus", "Sugar lumps mature an hour sooner.
A malevolent, if delicious herb that is said to grow on the cliffs of the darkest abyss of the underworld.", 300000000, [26, 15], { pool: "prestige", groups: "misc" }); new Game.Upgrade("Sucralosia Inutilis", "Bifurcated sugar lumps appear 5% more often and are 5% more likely to drop 2 lumps.
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], { pool: "prestige", groups: "misc" }); //note : these showIf functions stop working beyond 10 quadrillion prestige level, due to loss in precision; the solution, of course, is to // make sure 10 quadrillion is not an attainable prestige level new Game.Upgrade("Lucky digit", "+1% prestige level effect on CpS.
This upgrade is a bit shy and only appears when your prestige level ends in 7.", 777, [24, 15], { pool: "prestige", groups: "bonus|heaven|goldCookie|goldSwitchMult" }); new Game.Upgrade("Lucky number", "+1% prestige level effect on CpS.
This upgrade is a reclusive hermit and only appears when your prestige level ends in 777.", 77777, [24, 15], { pool: "prestige", groups: "bonus|heaven|goldCookie|goldSwitchMult" }); new Game.Upgrade("Lucky payout", "+1% prestige level effect on CpS.
This upgrade took an oath of complete seclusion from the rest of the world and only appears when your prestige level ends in 777777.", 77777777, [24, 15], { pool: "prestige", groups: "bonus|heaven|goldCookie|goldSwitchMult" }); order = 50000; new Game.Upgrade("Background selector", "Lets you pick which wallpaper to display.", 0, [29, 5], { pool: "toggle", noBuy: true, groups: "misc" }); order = 255; Game.GrandmaSynergy("Lucky grandmas", "A fortunate grandma that always seems to find more cookies.", "Chancemaker"); order = 1200; Game.TieredUpgrade("Your lucky cookie", "Chancemakers are twice as efficient.
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', "Chancemakers are twice as efficient.
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", "Chancemakers are twice as efficient.
What lottery? THE lottery, that's what lottery! Only lottery that matters!", "Chancemaker", 3); Game.TieredUpgrade("Four-leaf clover field", "Chancemakers are twice as efficient.
No giant monsters here, just a whole lot of lucky grass.", "Chancemaker", 4); Game.TieredUpgrade("A recipe book about books", "Chancemakers are twice as efficient.
Tip the scales in your favor with 28 creative new ways to cook the books.", "Chancemaker", 5); Game.TieredUpgrade("Leprechaun village", "Chancemakers are twice as efficient.
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", "Chancemakers are twice as efficient.
A strange engine that turns statistics on their head. Recommended by the Grandmother's Guide to the Bakery.", "Chancemaker", 7); Game.TieredUpgrade("Antisuperstistronics", "Chancemakers are twice as efficient.
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", "You gain more CpS the more milk you have.
glad to be overpaid to work with you, sir", 900000000000000000000000000000000, Game.GetIcon("Kitten", 9), { tier: 9, groups: "bonus|kitten:8" }); order = 99999; var years = Math.floor((Game.startDate - new Date(2013, 7, 8)) / (1000 * 60 * 60 * 24 * 365)); //only updates on page load //may behave strangely on leap years Game.CookieUpgrade({ name: "Birthday cookie", forceDesc: "Cookie production multiplier +1% for every year Cookie Clicker has existed (currently : +" + Game.Beautify(years) + "%).
Thank you for playing Cookie Clicker!", icon: [22, 13], power: years, price: 99999999999999999999999999999 }); order = 150; new Game.Upgrade("Armythril mouse", "Clicking gains +1% of your CpS.
-Orteil
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], { tier: 10, col: 11, groups: "click|onlyClick|clickPercent", recommend: clickRecFunc }); order = 200; Game.TieredUpgrade("Reverse dementia", "Grandmas are twice as efficient.
Extremely unsettling, and somehow even worse than the regular kind.", "Grandma", 9); order = 300; Game.TieredUpgrade("Humane pesticides", "Farms are twice as efficient.
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", "Mines are twice as efficient.
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", "Factories are twice as efficient.
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", "Banks are twice as efficient.
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", "Temples are twice as efficient.
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", "Wizard towers are twice as efficient.
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", "Shipments are twice as efficient.
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", "Alchemy labs are twice as efficient.
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", "Portals are twice as efficient.
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", "Time machines are twice as efficient.
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", "Antimatter condensers are twice as efficient.
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", "Prisms are twice as efficient.
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", "Chancemakers are twice as efficient.
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", "You gain more CpS the more milk you have.
nothing stresses meowt... except having to seek the approval of my inferiors, sir", 900000000000000000000000000000000000, Game.GetIcon("Kitten", 10), { tier: 10, groups: "bonus|kitten:9" }); order = 5000; Game.SynergyUpgrade("Charm quarks", "
They're after your lucky quarks!", "Chancemaker", "Antimatter condenser", "synergy2"); order = 10020; Game.CookieUpgrade({ 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.CookieUpgrade({ 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.CookieUpgrade({ name: "Candy cookies", desc: "These melt in your hands just a little bit.", icon: [23, 16], power: 4, price: 9999999999999999999999999999 }); Game.CookieUpgrade({ 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.CookieUpgrade({ name: "One chip cookies", desc: "You get one.", icon: [25, 16], power: 1, price: 99999999999999999999999999999 }); new Game.Upgrade("Sugar baking", 'Each unspent sugar lump (up to 100) gives +1% CpS.
To bake with the sugary essence of eons themselves, you must first learn to take your sweet time.', 200000000, [21, 17], { pool: "prestige", groups: "bonus" }); new Game.Upgrade("Sugar craving", '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], { pool: "prestige", groups: "misc" }); new Game.Upgrade("Sugar aging process", "Each grandma (up to 600) makes sugar lumps ripen 6 seconds sooner.
Aren't they just the sweetest?", 600000000, [23, 17], { pool: "prestige", groups: "misc" }); order = 40050; new Game.Upgrade("Sugar frenzy", "Activating this will triple your CpS for 1 hour, at the cost of 1 sugar lump.
It's got electrolytes!", 7, [2, 16], { pool: "debug", groups: "misc" }); //debug purposes only order = 150; new Game.Upgrade("Technobsidian mouse", "Clicking gains +1% of your CpS.
A highly advanced mouse of a sophisticated design. Only one thing on its mind : to click.", 5000000000000000000000000, [11, 28], { tier: 11, col: 11, groups: "click|onlyClick|clickPercent", recommend: clickRecFunc }); new Game.Upgrade("Plasmarble mouse", "Clicking gains +1% of your CpS.
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], { tier: 12, col: 11, groups: "click|onlyClick|clickPercent", recommend: clickRecFunc }); order = 20000; new Game.Upgrade("Kitten marketeers", "You gain more CpS the more milk you have.
no such thing as a saturated markit, sir", 900000000000000000000000000000000000000, Game.GetIcon("Kitten", 11), { tier: 11, groups: "kitten:10" }); order = 10030; Game.CookieUpgrade({ 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: 999999999999999 * 5 }); order = 10020; Game.CookieUpgrade({ 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.CookieUpgrade({ 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.CookieUpgrade({ 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.CookieUpgrade({ 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.CookieUpgrade({ 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.CookieUpgrade({ 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.CookieUpgrade({ name: "Elderwort biscuits", forceDesc: "Cookie production multiplier +2%.
They taste incredibly stale, even when baked fresh.", icon: [22, 25], power: 2, price: 60 * 2, locked: true, groups: "gardenDrop" }); Game.CookieUpgrade({ name: "Bakeberry cookies", forceDesc: "Cookie production multiplier +2%.
Really good dipped in hot chocolate.", icon: [23, 25], power: 2, price: 60, locked: true, groups: "gardenDrop" }); Game.CookieUpgrade({ name: "Duketater cookies", forceDesc: "Cookie production multiplier +10%.
Fragrant and mealy, with a slight yellow aftertaste.", icon: [24, 25], power: 10, price: 60 * 3, locked: true, groups: "gardenDrop" }); Game.CookieUpgrade({ name: "Green yeast digestives", forceDesc: "+1% golden cookie gains and effect duration.
These are tastier than you'd expect, but not by much.", icon: [25, 25], power: 0, price: 60 * 3, locked: true, groups: "gardenDrop" }); order = 23000; new Game.Upgrade("Fern tea", "You gain +3% of your regular CpS while the game is closed (provided you have the Twin Gates of Transcendence heavenly upgrade).
A chemically complex natural beverage, this soothing concoction has been used by mathematicians to solve equations in their sleep.", 60, [26, 25], {groups: "gardenDrop"}); new Game.Upgrade("Ichor syrup", "You gain +7% of your regular CpS while the game is closed (provided you have the Twin Gates of Transcendence heavenly upgrade).
Tastes like candy. The smell is another story.", 60 * 2, [27, 25], {groups: "gardenDrop"}); order = 10200; Game.CookieUpgrade({ name: "Wheat slims", forceDesc: "Cookie production multiplier +1%.
The only reason you'd consider these to be cookies is because you feel slightly sorry for them.", icon: [28, 25], power: 1, price: 30, locked: true, groups: "gardenDrop" }); order = 10300; Game.CookieUpgrade({ name: "Synthetic chocolate green honey butter biscuit", desc: "Rewarded for owning 350 of everything.
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", "Farms are twice as efficient.
Ah, yes. These help quite a bit. Somehow.", "Farm", 10); order = 400; Game.TieredUpgrade("Mine canaries", "Mines are twice as efficient.
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", "Factories are twice as efficient.
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", "Banks are twice as efficient.
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", "Temples are twice as efficient.
A theologically dubious and possibly blasphemous blend of fortune-telling and scripture studies.", "Temple", 10); order = 575; Game.TieredUpgrade("Immobile spellcasting", "Wizard towers are twice as efficient.
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", "Shipments are twice as efficient.
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", "Alchemy labs are twice as efficient.
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", "Portals are twice as efficient.
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", "Time machines are twice as efficient.
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", "Antimatter condensers are twice as efficient.
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", "Prisms are twice as efficient.
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", "Chancemakers are twice as efficient.
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", "You gain more CpS the more milk you have.
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), { tier: 12, groups: "kitten:11" }); new Game.Upgrade("Eye of the wrinkler", "Mouse over a wrinkler to see how many cookies are in its stomach.
Just a wrinkler and its will to survive.", 99999999, [27, 26], { pool: "prestige", groups: "misc" }); new Game.Upgrade("Inspired checklist", 'Unlocks the Buy all feature, which lets you instantly purchase every upgrade in your store (starting from the cheapest one).
Hangin' tough, stayin' hungry.
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], { pool: "prestige", groups: "misc" }); order = 10300; Game.CookieUpgrade({ name: "Pure pitch-black chocolate butter biscuit", desc: "Rewarded for owning 500 of everything.
Also comes in real handy when you want to tell catsup apart from ketchup.", 999999, [28, 29], { pool: "prestige", groups: "misc" }); order = 200; Game.TieredUpgrade("Good manners", 'Grandmas are twice as efficient.
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", "Farms are twice as efficient.
You have to import these from far up north, but they really help areate the soil!", "Farm", 11); order = 400; Game.TieredUpgrade("Bore again", "Mines are twice as efficient.
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', "Factories are twice as efficient.
If you're bad at something, always do it for free.", "Factory", 11); order = 525; Game.TieredUpgrade("Rules of acquisition", "Banks are twice as efficient.
Rule 387 : a cookie baked is a cookie kept.", "Bank", 11); order = 550; Game.TieredUpgrade("War of the gods", "Temples are twice as efficient.
An interesting game; the only winning move is not to pray.", "Temple", 11); order = 575; Game.TieredUpgrade("Electricity", "Wizard towers are twice as efficient.
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", 'Shipments are twice as efficient.
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", "Alchemy labs are twice as efficient.
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", "Portals are twice as efficient.
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", "Time machines are twice as efficient.
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", "Antimatter condensers are twice as efficient.
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", "Prisms are twice as efficient.
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", "Chancemakers are twice as efficient.
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", "You now benefit from the boost provided by heralds.
Be excellent to each other.", 100, [21, 29], { pool: "prestige", groups: "bonus" }); order = 255; Game.GrandmaSynergy("Metagrandmas", "A fractal grandma to make more grandmas to make more cookies.", "Fractal engine"); order = 1300; Game.TieredUpgrade("Metabakeries", "Fractal engines are twice as efficient.
And Patreon, dudes!
They practically bake themselves!", "Fractal engine", 1); Game.TieredUpgrade("Mandelbrown sugar", "Fractal engines are twice as efficient.
A substance that displays useful properties such as fractal sweetness and instant contact lethality.", "Fractal engine", 2); Game.TieredUpgrade("Fractoids", "Fractal engines are twice as efficient.
Here's a frun fract : all in all, these were a terrible idea.", "Fractal engine", 3); Game.TieredUpgrade("Nested universe theory", "Fractal engines are twice as efficient.
Asserts that each subatomic particle is host to a whole new universe, and therefore, another limitless quantity of cookies.", "Fractal engine", 4); Game.TieredUpgrade("Menger sponge cake", "Fractal engines are twice as efficient.
This somehow stacks with the theory of nanocosmics, because physics.
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", "Fractal engines are twice as efficient.
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", "Fractal engines are twice as efficient.
Forever eating its own tail and digesting itself, in a metabolically dubious tale of delicious tragedy.", "Fractal engine", 7); Game.TieredUpgrade("Nested", "Fractal engines are twice as efficient.
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", "Fractal engines are twice as efficient.
This special ingredient has the incredible ability to fill the local space perfectly, effectively eradicating hunger in those who consume it!", "Fractal engine", 9); Game.TieredUpgrade("Endless book of prose", "Fractal engines are twice as efficient.", "Fractal engine", 10); // 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 + '
Knowing that no hunger means no need for cookies, your marketers urge you to repurpose this product into next-level packing peanuts.
' + (str.substr(i % str.length, n) + (i % str.length > (str.length - n) ? str.substr(0, i % str.length - // (str.length - n)) : "")) + ""; }; Game.TieredUpgrade("The set of all sets", "Fractal engines are twice as efficient.
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("Mice clicking mice", "", "Fractal engine", "Cursor", "synergy2"); Game.last.descFunc = function() { Math.seedrandom(Game.seed + "-blacsphemouse"); if (Math.random() < 0.3) { Math.seedrandom(); return this.desc + "
Absolutely blasphemouse!"; } else { Math.seedrandom(); return this.desc + "
Absolutely blasphemous!"; } }; order = 10020; Game.CookieUpgrade({ name: "Custard creams", desc: "British lore pits these in a merciless war against bourbon biscuits.
Cherish the memories.", 1111111111, [22, 29], { pool: "prestige", groups: "misc" }); order = 10020; Game.CookieUpgrade({ 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", "Cookie production multiplier +5% permanently, and +1% for every building type level 10 or higher.
Infused with cosmic sweetness. It gives off a faint shimmery sound when you hold it up to your ear.", 1000000000, [21, 30], { pool: "prestige", pseudoCookie: true, power: function() { var n = 5; for (var i = Game.ObjectsById.length - 1; i >= 0; i--) { if (Game.ObjectsById[i].level >= 10) { n++; } } return n; }, descFunc: function() { var n = 5; for (var i = Game.ObjectsById.length - 1; i >= 0; i--) { if (Game.ObjectsById[i].level >= 10) { n++; } } return ('
These may or may not be considered cookies.", 333000000000, [25, 29], { pool: "prestige", groups: "misc" }); new Game.Upgrade("Box of not cookies", "Contains an assortment of...something.
These are strictly, definitely not cookies.", 333000000000, [26, 29], { pool: "prestige", groups: "misc" }); new Game.Upgrade("Box of pastries", "Contains an assortment of delicious pastries.
These are a damn slippery slope is what they are!", 333000000000, [27, 29], { pool: "prestige", groups: "misc" }); order = 10040; Game.CookieUpgrade({ 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.CookieUpgrade({ name: "Jelly donut", desc: "Guaranteed to contain at least 0.3% jelly filling, or your money back.
There's no accounting for taste, and yet here we are.", 2000000, [11, 10], { pool: "prestige", groups: "misc" }); new Game.Upgrade("Shimmering veil", "Unlocks the shimmering veil, a switch that passively boosts your CpS by 50%.
Hands off!", 999999999, [9, 10], { pool: "prestige", groups: "misc" }); order = 40005; descFunc = function() { var boost = 50; var resist = 0; if (Game.HasUpgrade("Reinforced membrane")) { boost += 10; resist += 10; } return ((this.name == "Shimmering veil [on]" ? '
Oh! A penny!", 999999999 * 15, [8, 10], {pool: "prestige"}); new Game.Upgrade("Reinforced membrane", "The shimmering veil is more resistant, and has a 10% chance not to break. It also gives +10% more CpS.
Oh! A priceless heirloom!
Oh! Another penny!
A consistency between jellyfish and cling wrap.", 999999999 * 15, [7, 10], {pool: "prestige"}); //cleanup defined stuff var buildRequireFunc = function(amount) { if (isNaN(amount)) { amount = this.buildingTie.getAmount(); } return amount >= this.groups[this.buildingTie.groupName]; }; Game.getUpgradeBuildChainAmount = function(chain) { var buildAmount = chain.building.getAmount(); var toAmount = Math.max(buildAmount, chain.amount); var diff = chain.amount - buildAmount; var mult = Game.buildingBuyInterval; if (diff > 0 && mult > 1) { diff = Math.ceil(diff / mult) * mult; toAmount = buildAmount + diff; } return toAmount; }; Game.getUpgradeBuildChainChangeArr = function(upgrade, chain) { var amount = Game.getUpgradeBuildChainAmount(chain); return [ { gameObj: chain.building, amount: amount }, {gameObj: upgrade} ]; }; var buildChainRequireFunc = function() { var buildAmount = this.buildingTie.getAmount(); var toAmount = Game.getUpgradeBuildChainAmount(this.chain); return (!this.buildingTie.blacklistCheckbox.checked && buildAmount < this.chain.amount && toAmount - buildAmount <= Game.maxChain && this.require(this.chain.amount)); //better safe than sorry }; var buyToggleIntoFunc = function() { if (this.bought) { this.toggleInto.setBought(false); } }; Game.UpgradesNoMisc = []; for (i = Game.UpgradesById.length - 1; i >= 0; i--) { upgrade = Game.UpgradesById[i]; var pool = upgrade.pool; Game.ArrayPush(Game.UpgradesByPool, pool, upgrade); if (Game.CountsAsUpgradeOwned(pool)) { Game.maxCountedUpgrades++; } if (!upgrade.groups.misc) { Game.UpgradesNoMisc.push(upgrade); } if (pool) { upgrade.$crateNodes.addClass(pool); } for (j in upgrade.groups) { Game.ArrayPush(Game.UpgradesByGroup, j, upgrade); var amount = upgrade.groups[j]; if (!upgrade.groups.synergy && j in Game.ObjectsByGroup && typeof amount === "number") { upgrade.buildingTie = Game.ObjectsByGroup[j]; upgrade.require = buildRequireFunc; upgrade.chain = { amount: amount, building: upgrade.buildingTie, // setArr: [{gameObj: upgrade.buildingTie, amount: amount}, {gameObj: upgrade}], require: buildChainRequireFunc.bind(upgrade) }; } } if (upgrade.pool === "prestige") { upgrade.order = upgrade.id; } if (upgrade.groups.heaven || pool === "prestige" || pool === "prestigeDecor") { Game.ArrayPush(Game.UpgradesByGroup, "allHeaven", upgrade); } if (upgrade.toggleInto) { upgrade.$crateNodes.addClass("togglePair"); upgrade.buyFunc = buyToggleIntoFunc; } } Game.sortByOrderFunc = function(a, b) { return a.order - b.order; }; Game.UpgradeOrder = Game.UpgradesById.slice(0); Game.UpgradeOrder.sort(Game.sortByOrderFunc); Game.UpgradesByOrder = Game.UpgradeOrder.slice(0); $("[data-upgrade-group]").each(function() { var upgrades = Game.UpgradesByGroup[this.dataset.upgradeGroup]; if (upgrades) { for (var i = upgrades.length - 1; i >= 0; i--) { upgrades[i].createCrate(this); } } }); var grandmaSynergyChainRequireFunc = function() { var unlock = Game.SpecialGrandmaUnlock; var building = this.grandmaBuilding; var amount = building.getAmount(); return (Game.Objects["Grandma"].getAmount() > 0 && !building.blacklistCheckbox.checked && amount < unlock && unlock - amount <= Game.maxChain); }; for (i = Game.UpgradesByGroup.grandmaSynergy.length - 1; i >= 0; i--) { upgrade = Game.UpgradesByGroup.grandmaSynergy[i]; if (upgrade.grandmaBuilding) { upgrade.chain = { amount: Game.SpecialGrandmaUnlock, building: upgrade.grandmaBuilding, require: grandmaSynergyChainRequireFunc.bind(upgrade) }; } } var runFunc = function() { this.bought = Game.season === this.season; }; requireFunc = function() { return Game.HasUpgrade("Season switcher"); }; var buyFunc = function(wasBought) { if (this.bought) { Game.setSeason(this.season); } else if (wasBought) { Game.setSeason(); } }; priceFunc = function(uses) { if (isNaN(uses)) { uses = Game.seasonUses; } var m = 1; 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, uses) * m); // return (Game.cookiesPs * 60 * Math.pow(1.5, uses) * m); return (Game.seasonTriggerBasePrice + Game.unbuffedCookiesPs * 60 * Math.pow(1.5, uses) * m); }; for (i = Game.UpgradesByGroup.seasonSwitch.length - 1; i >= 0; i--) { upgrade = Game.UpgradesByGroup.seasonSwitch[i]; Game.seasons[upgrade.season] = { season: upgrade.season, switchUpgrade: upgrade }; upgrade.runFunc = runFunc; upgrade.require = requireFunc; upgrade.buyFunc = buyFunc; upgrade.priceFunc = priceFunc; } priceFunc = function(santaLevel) { if (isNaN(santaLevel)) { santaLevel = Game.Get("santaLevel"); } return (Math.pow(3, santaLevel) * 2525); }; for (i = Game.UpgradesByGroup.santaDrop.length - 1; i >= 0; i--) { //scale christmas upgrade prices with santa level Game.UpgradesByGroup.santaDrop[i].priceFunc = priceFunc; } priceFunc = function(eggs) { return Math.pow(2, eggs || Game.GetHowManyEggs()) * 999; }; for (i = Game.UpgradesByGroup.commonEgg.length - 1; i >= 0; i--) { //scale egg prices to how many eggs you have Game.UpgradesByGroup.commonEgg[i].priceFunc = priceFunc; } priceFunc = function(eggs) { return Math.pow(3, eggs || Game.GetHowManyEggs()) * 999; }; for (i = Game.UpgradesByGroup.rareEgg.length - 1; i >= 0; i--) { Game.UpgradesByGroup.rareEgg[i].priceFunc = priceFunc; } requireFunc = function() { return Game.Get("AchievementsOwned") / 25 >= this.groups.kitten; }; for (i = Game.UpgradesByGroup.kitten.length - 1; i >= 0; i--) { upgrade = Game.UpgradesByGroup.kitten[i]; if (typeof upgrade.groups.kitten === "number") { upgrade.require = requireFunc; } } priceFunc = function(cost) { return function() { return cost * Game.cookiesPs * 60; }; }; for (i = Game.UpgradesByGroup.gardenDrop.length - 1; i >= 0; i--) { upgrade = Game.UpgradesByGroup.gardenDrop[i]; upgrade.priceFunc = priceFunc(upgrade.basePrice); upgrade.setDescription(upgrade.baseDesc.replace("
", "
Cost scales with CpS.")); upgrade.lasting = true; } var clickPercentAfterCalcCps = function() { this.cpsPrefix = Game.clicksPs ? "Second" : "Click"; if (Game.cookiesPs && !Game.clicksPs) { this.cps = this.cpsObj.cookiesPerClickDiff; this.amort = this.cps > 0 ? Math.ceil(this.price / this.cps) : 0; this.amortStr = this.amort > 0 ? Game.BeautifyAbbr(this.amort) + " clicks" : "---"; } }; var clickAfterCalcCps = function() { this.cpsPrefix = "Second"; if (!this.cpsObj.cookiesPsDiff && !Game.clicksPs) { this.cpsPrefix = "Click"; this.cps = this.cpsObj.cookiesPerClickDiff; this.amort = this.cps > 0 ? Math.ceil(this.price / this.cps) : 0; this.amortStr = this.amort > 0 ? Game.BeautifyAbbr(this.amort) + " clicks" : "---"; } }; for (i = Game.UpgradesByGroup.click.length - 1; i >= 0; i--) { upgrade = Game.UpgradesByGroup.click[i]; if (upgrade.groups.clickPercent) { upgrade.afterCalcCps = clickPercentAfterCalcCps; } else { upgrade.afterCalcCps = clickAfterCalcCps; } } //#endregion Upgrades //#region Achievements Game.CountsAsAchievementOwned = function(pool) { return pool === "" || pool === "normal"; }; Game.Achievement = function(name, desc, icon, properties) { this.type = "achievement"; this.id = Game.AchievementsById.length; this.name = name; this.icon = icon; this.iconCss = Game.getIconCss(icon); this.tinyIconStr = Game.getTinyIconStr(this.iconCss); this.iconName = this.tinyIconStr + " " + this.name; this.pool = "normal"; this.order = this.id; if (order) { this.order = order + this.id * 0.001; } this.setDescription(desc); if (properties instanceof Object) { $.extend(this, properties); } this.groups = processGroups(this.groups); this.$baseCrate = $('') .css(this.iconCss).attr("data-achievement", this.name); this.$baseCrate[0].objTie = this; this.$tooltipCrate = this.$baseCrate.clone(); this.$crateNodes = this.$baseCrate.add(this.$tooltipCrate); this.won = false; this.tempWon = false; Game.Achievements[name] = this; Game.AchievementsById.push(this); Game.last = this; }; Game.Achievement.prototype.toString = function() { return this.name; }; Game.Achievement.prototype.setDescription = function(desc) { this.baseDesc = desc; this.beautifyDesc = BeautifyInText(desc); this.abbrDesc = AbbrInText(desc); this.setCurrentDescription(); }; Game.Achievement.prototype.setCurrentDescription = function() { this.desc = Game.abbrOn ? this.abbrDesc : this.beautifyDesc; }; Game.Achievement.prototype.resetTemp = function() { this.tempWon = this.won; }; Game.Achievement.prototype.getWon = function(asNum) { var won = Game.predictiveMode ? this.tempWon : this.won; return asNum ? Number(won) : Boolean(won); }; Game.Achievement.prototype.setWon = function(toggle, temp) { var key = Game.predictiveMode || temp ? "tempWon" : "won"; toggle = typeof toggle === "undefined" ? !this[key] : Boolean(toggle); if (this.require) { toggle = toggle || this.require(); } this[key] = toggle; if (!Game.predictiveMode) { this.tempWon = toggle; this.$crateNodes.toggleClass("enabled", toggle); } return toggle; }; Game.Achievement.prototype.getTooltip = function(crate, update) { var mysterious = !this.won && byId("achHideCheck").checked; var tags = ""; if (this.pool === "shadow") { tags = makeTag("Shadow Achievement", "#9700cf"); } else { tags = makeTag("Achievement"); } tags += makeTag(this.won ? "Unlocked" : "Locked"); var $div = $('' + '"); this.$tooltipCrate.prependTo($div); $tooltipEle.empty().append($div); Game.setTooltip({ refEle: crate, isCrate: true }, update); }; var buildTierAchRequireFunc = function() { return this.buildingTie.getAmount() >= Game.Tiers[this.tier].achievUnlock; }; Game.TieredAchievement = function(name, desc, buildingName, tier) { var achieve = new Game.Achievement(name, desc, Game.GetIcon(buildingName, tier), { require: buildTierAchRequireFunc, groups: Game.Objects[buildingName].groupName }); Game.SetTier(buildingName, tier); return achieve; }; Game.ProductionAchievement = function(name, building, tier, q, mult) { building = Game.Objects[building]; var icon = [building.iconColumn, 22]; var n = 12 + building.id + (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, "Make " + Game.abbreviateNumber(pow, 0, true) + " cookies just from " + building.plural + "." + (q ? "' + (mysterious ? "???" : this.name) + '" + '' + (mysterious ? "???" : this.desc) + "" + 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, 30]; Game.BankAchievements = []; var bankRequireFunc = function(add) { return Game.getCookiesBaked(add) >= this.threshold; }; Game.BankAchievement = function(name, desc) { var threshold = Math.pow(10, Math.floor(Game.BankAchievements.length * 1.5 + 2)); if (Game.BankAchievements.length === 0) { threshold = 1; } var achieve = new Game.Achievement(name, "Bake " + Game.abbreviateNumber(threshold, 0, true) + " cookie" + (threshold === 1 ? "" : "s") + " in one ascension." + (desc || ""), [Game.thresholdIcons[Game.BankAchievements.length], Game.BankAchievements.length > 23 ? 2 : 5], { threshold: threshold, order: 100 + Game.BankAchievements.length * 0.01, groups: "bankAch", require: bankRequireFunc }); Game.BankAchievements.push(achieve); return achieve; }; Game.CpsAchievements = []; var cpsRequireFunc = function(cps) { if (isNaN(cps)) { cps = Game.Get("cookiesPs"); } return cps >= this.threshold; }; Game.CpsAchievement = function(name, desc) { var threshold = Math.pow(10, Math.floor(Game.CpsAchievements.length * 1.2)); var achieve = new Game.Achievement(name, "Bake " + Game.abbreviateNumber(threshold, 0, true) + " cookie" + (threshold == 1 ? "" : "s") + " per second." + (desc || ""), [Game.thresholdIcons[Game.CpsAchievements.length], Game.CpsAchievements.length > 23 ? 2 : 5], { threshold: threshold, order: 200 + Game.CpsAchievements.length * 0.01, groups: "cpsAch", require: cpsRequireFunc }); Game.CpsAchievements.push(achieve); return achieve; }; //define Achievements order = 0; 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", "Ascend with 1 million cookies baked.Easy come, easy go.", [11, 6]); new Game.Achievement("Oblivion", "Ascend with 1 billion cookies baked.Back to square one.", [11, 6]); new Game.Achievement("From scratch", "Ascend with 1 trillion cookies baked.It's been fun.", [11, 6]); order = 11010; new Game.Achievement("Neverclick", "Make 1 million cookies by only having clicked 15 times.", [12, 0]); order = 1000; new Game.Achievement("Clicktastic", "Make 1,000 cookies from clicking.", [11, 0]); new Game.Achievement("Clickathlon", "Make 100,000 cookies from clicking.", [11, 1]); new Game.Achievement("Clickolympics", "Make 10,000,000 cookies from clicking.", [11, 2]); new Game.Achievement("Clickorama", "Make 1,000,000,000 cookies from clicking.", [11, 13]); order = 1050; new Game.Achievement("Click", "Have 1 cursor.", [0, 0], {groups: "cursor:1"}); new Game.Achievement("Double-click", "Have 2 cursors.", [0, 6], {groups: "cursor:2"}); new Game.Achievement("Mouse wheel", "Have 50 cursors.", [1, 6], {groups: "cursor:50"}); new Game.Achievement("Of Mice and Men", "Have 100 cursors.", [0, 1], {groups: "cursor:100"}); new Game.Achievement("The Digital", "Have 200 cursors.", [0, 2], {groups: "cursor:200"}); order = 1100; new Game.Achievement("Just wrong", "Sell a grandma.I thought you loved me.", [10, 9]); Game.TieredAchievement("Grandma's cookies", "Have 1 grandma.", "Grandma", 1); Game.TieredAchievement("Sloppy kisses", "Have 50 grandmas.", "Grandma", 2); Game.TieredAchievement("Retirement home", "Have 100 grandmas.", "Grandma", 3); order = 1200; Game.TieredAchievement("My first farm", "Have 1 farm.", "Farm", 1); Game.TieredAchievement("Reap what you sow", "Have 50 farms.", "Farm", 2); Game.TieredAchievement("Farm ill", "Have 100 farms.", "Farm", 3); order = 1400; Game.TieredAchievement("Production chain", "Have 1 factory.", "Factory", 1); Game.TieredAchievement("Industrial revolution", "Have 50 factories.", "Factory", 2); Game.TieredAchievement("Global warming", "Have 100 factories.", "Factory", 3); order = 1300; Game.TieredAchievement("You know the drill", "Have 1 mine.", "Mine", 1); Game.TieredAchievement("Excavation site", "Have 50 mines.", "Mine", 2); Game.TieredAchievement("Hollow the planet", "Have 100 mines.", "Mine", 3); order = 1500; Game.TieredAchievement("Expedition", "Have 1 shipment.", "Shipment", 1); Game.TieredAchievement("Galactic highway", "Have 50 shipments.", "Shipment", 2); Game.TieredAchievement("Far far away", "Have 100 shipments.", "Shipment", 3); order = 1600; Game.TieredAchievement("Transmutation", "Have 1 alchemy lab.", "Alchemy lab", 1); Game.TieredAchievement("Transmogrification", "Have 50 alchemy labs.", "Alchemy lab", 2); Game.TieredAchievement("Gold member", "Have 100 alchemy labs.", "Alchemy lab", 3); order = 1700; Game.TieredAchievement("A whole new world", "Have 1 portal.", "Portal", 1); Game.TieredAchievement("Now you're thinking", "Have 50 portals.", "Portal", 2); Game.TieredAchievement("Dimensional shift", "Have 100 portals.", "Portal", 3); order = 1800; Game.TieredAchievement("Time warp", "Have 1 time machine.", "Time machine", 1); Game.TieredAchievement("Alternate timeline", "Have 50 time machines.", "Time machine", 2); Game.TieredAchievement("Rewriting history", "Have 100 time machines.", "Time machine", 3); order = 7000; new Game.Achievement("One with everything", "Have at least 1 of every building.", [2, 7], {require: getNumAllObjectsRequireFunc(1)}); new Game.Achievement("Mathematician", "Have at least 1 of the most expensive object, 2 of the second-most expensive, 4 of the next and so on (capped at 128).", [23, 12], { require: function() { var m = 1; for (var i = Game.ObjectsById.length - 1; i >= 0; i--) { if (Game.ObjectsById[i].getAmount() < m) { return false; } m = Math.min(m * 2, 128); } return true; } }); new Game.Achievement("Base 10", "Have at least 10 of the most expensive object, 20 of the second-most expensive, 30 of the next and so on.", [23, 12], { require: function() { var m = 10; for (var i = Game.ObjectsById.length - 1; i >= 0; i--) { if (Game.ObjectsById[i].getAmount() < m) { return false; } m += 10; } return true; } }); order = 10000; new Game.Achievement("Golden cookie", "Click a golden cookie.", [10, 14]); new Game.Achievement("Lucky cookie", "Click 7 golden cookies.", [22, 6]); new Game.Achievement("A stroke of luck", "Click 27 golden cookies.", [23, 6]); order = 30200; new Game.Achievement("Cheated cookies taste awful", "Hack in some cookies.", [10, 6], {pool: "shadow"}); order = 11010; new Game.Achievement("Uncanny clicker", "Click really, really fast.Well I'll be!", [12, 0]); order = 5000; new Game.Achievement("Builder", "Own 100 buildings.", [2, 6], {require: function() { return Game.Get("ObjectsOwned") >= 100; }}); new Game.Achievement("Architect", "Own 500 buildings.", [3, 6], {require: function() { return Game.Get("ObjectsOwned") >= 500; }}); order = 6000; new Game.Achievement("Enhancer", "Purchase 20 upgrades.", [9, 0], {require: function() { return Game.Get("UpgradesOwned") >= 20; }}); new Game.Achievement("Augmenter", "Purchase 50 upgrades.", [9, 1], {require: function() { return Game.Get("UpgradesOwned") >= 50; }}); order = 11000; new Game.Achievement("Cookie-dunker", "Dunk the cookie.You did it!", [1, 8]); order = 10000; new Game.Achievement("Fortune", "Click 77 golden cookies.You should really go to bed.", [24, 6]); order = 31000; new Game.Achievement("True Neverclick", "Make 1 million cookies with no cookie clicks.This kinda defeats the whole purpose, doesn't it?", [12, 0], {pool: "shadow"}); order = 20000; new Game.Achievement("Elder nap", "Appease the grandmatriarchs at least once.we", [8, 9]); new Game.Achievement("Elder slumber", "Appease the grandmatriarchs at least 5 times.
are
eternalour mind", [8, 9]); order = 1150; new Game.Achievement("Elder", "Own at least 7 grandma types.", [10, 9], { require: function() { var list = Game.UpgradesByGroup.grandmaSynergy; return Game.countUpgradesByGroup(list, 7) >= 7; } }); order = 20000; new Game.Achievement("Elder calm", "Declare a covenant with the grandmatriarchs.
outlives
the universewe", [8, 9]); order = 5000; new Game.Achievement("Engineer", "Own 1000 buildings.", [4, 6], {require: function() { return Game.Get("ObjectsOwned") >= 1000; }}); order = 10000; new Game.Achievement("Leprechaun", "Click 777 golden cookies.", [25, 6]); new Game.Achievement("Black cat's paw", "Click 7777 golden cookies.", [26, 6]); order = 30050; new Game.Achievement("Nihilism", "Ascend with 1 quadrillion cookies baked.
have
fedThere are many things", [11, 7]); order = 1900; Game.TieredAchievement("Antibatter", "Have 1 antimatter condenser.", "Antimatter condenser", 1); Game.TieredAchievement("Quirky quarks", "Have 50 antimatter condensers.", "Antimatter condenser", 2); Game.TieredAchievement("It does matter!", "Have 100 antimatter condensers.", "Antimatter condenser", 3); order = 6000; new Game.Achievement("Upgrader", "Purchase 100 upgrades.", [9, 2], {require: function() { return Game.Get("UpgradesOwned") >= 100; }}); order = 7000; new Game.Achievement("Centennial", "Have at least 100 of everything.", [6, 6], {require: getNumAllObjectsRequireFunc(100)}); order = 30500; new Game.Achievement("Hardcore", "Get to 1 billion cookies baked with no upgrades purchased.", [12, 6]); order = 30600; new Game.Achievement("Speed baking I", "Get to 1 million cookies baked in 35 minutes.", [12, 5], {pool: "shadow"}); new Game.Achievement("Speed baking II", "Get to 1 million cookies baked in 25 minutes.", [13, 5], {pool: "shadow"}); new Game.Achievement("Speed baking III", "Get to 1 million cookies baked in 15 minutes.", [14, 5], {pool: "shadow"}); order = 61000; new Game.Achievement("Getting even with the oven", "Defeat the Sentient Furnace in the factory dungeons.", [12, 7], {pool: "dungeon"}); new Game.Achievement("Now this is pod-smashing", "Defeat the Ascended Baking Pod in the factory dungeons.", [12, 7], {pool: "dungeon"}); new Game.Achievement("Chirped out", "Find and defeat Chirpy, the dysfunctionning alarm bot.", [13, 7], {pool: "dungeon"}); new Game.Achievement("Follow the white rabbit", "Find and defeat the elusive sugar bunny.", [14, 7], {pool: "dungeon"}); order = 1000; new Game.Achievement("Clickasmic", "Make 100,000,000,000 cookies from clicking.", [11, 14]); order = 1100; Game.TieredAchievement("Friend of the ancients", "Have 150 grandmas.", "Grandma", 4); Game.TieredAchievement("Ruler of the ancients", "Have 200 grandmas.", "Grandma", 5); order = 32000; new Game.Achievement("Wholesome", "Unlock 100% of your heavenly chips power.", [15, 7], { require: function() { if (!Game.prestige || Game.ascensionMode === 1) { return false; } var list = Game.UpgradesByGroup.heaven; return Game.countUpgradesByGroup(list) >= list.length; } }); order = 33000; new Game.Achievement("Just plain lucky", "You have 1 chance in 500,000 every second of earning this achievement.", [15, 6], {pool: "shadow"}); order = 21000; new Game.Achievement("Itchscratcher", "Burst 1 wrinkler.", [19, 8]); new Game.Achievement("Wrinklesquisher", "Burst 50 wrinklers.", [19, 8]); new Game.Achievement("Moistburster", "Burst 200 wrinklers.", [19, 8]); order = 22000; new Game.Achievement("Spooky cookies", 'Unlock every Halloween-themed cookie.Owning this achievement makes Halloween-themed cookies drop more frequently in future playthroughs.', [12, 8], { require: function() { var list = Game.UpgradesByGroup.halloweenAch; return Game.countUpgradesByGroup(list) >= list.length; } }); order = 22100; new Game.Achievement("Coming to town", "Reach Santa's 7th form.", [18, 9], {require: function() { return Game.Get("santaLevel") >= 7; }}); new Game.Achievement("All hail Santa", "Reach Santa's final form.", [19, 10], {require: function() { return Game.Get("santaLevel") >= Game.santaMax; }}); new Game.Achievement("Let it snow", 'Unlock every Christmas-themed cookie.Owning this achievement makes Christmas-themed cookies drop more frequently in future playthroughs.', [19, 9], { require: function() { var list = Game.UpgradesByGroup.christmasAch; return Game.countUpgradesByGroup(list) >= list.length; } }); new Game.Achievement("Oh deer", "Pop 1 reindeer.", [12, 9]); new Game.Achievement("Sleigh of hand", "Pop 50 reindeer.", [12, 9]); new Game.Achievement("Reindeer sleigher", "Pop 200 reindeer.", [12, 9]); order = 1200; Game.TieredAchievement("Perfected agriculture", "Have 150 farms.", "Farm", 4); order = 1400; Game.TieredAchievement("Ultimate automation", "Have 150 factories.", "Factory", 4); order = 1300; Game.TieredAchievement("Can you dig it", "Have 150 mines.", "Mine", 4); order = 1500; Game.TieredAchievement("Type II civilization", "Have 150 shipments.", "Shipment", 4); order = 1600; Game.TieredAchievement("Gild wars", "Have 150 alchemy labs.", "Alchemy lab", 4); order = 1700; Game.TieredAchievement("Brain-split", "Have 150 portals.", "Portal", 4); order = 1800; Game.TieredAchievement("Time duke", "Have 150 time machines.", "Time machine", 4); order = 1900; Game.TieredAchievement("Molecular maestro", "Have 150 antimatter condensers.", "Antimatter condenser", 4); order = 2000; Game.TieredAchievement("Lone photon", "Have 1 prism.", "Prism", 1); Game.TieredAchievement("Dazzling glimmer", "Have 50 prisms.", "Prism", 2); Game.TieredAchievement("Blinding flash", "Have 100 prisms.", "Prism", 3); Game.TieredAchievement("Unending glow", "Have 150 prisms.", "Prism", 4); order = 5000; new Game.Achievement("Lord of Constructs", "Own 2000 buildings.
that need to be erasedHe saw the vast plains stretching ahead of him, and he said : let there be civilization.", [5, 6], {require: function() { return Game.Get("ObjectsOwned") >= 2000; }}); order = 6000; new Game.Achievement("Lord of Progress", "Purchase 200 upgrades.One can always do better. But should you?", [9, 14], {require: function() { return Game.Get("UpgradesOwned") >= 200; }}); order = 7002; new Game.Achievement("Bicentennial", "Have at least 200 of everything.You crazy person.", [8, 6], {require: getNumAllObjectsRequireFunc(200)}); order = 22300; new Game.Achievement("Lovely cookies", "Unlock every Valentine-themed cookie.", [20, 3], { require: function() { var list = Game.UpgradesByGroup.valentinesAch; return Game.countUpgradesByGroup(list) >= list.length; } }); order = 7001; new Game.Achievement("Centennial and a half", "Have at least 150 of everything.", [7, 6], {require: getNumAllObjectsRequireFunc(150)}); order = 11000; new Game.Achievement("Tiny cookie", "Click the tiny cookie.These aren't the cookies", [0, 5]); order = 400000; new Game.Achievement("You win a cookie", "This is for baking 10 trillion cookies and making it on the local news.
you're clicking for.We're all so proud of you.", [10, 0], { require: bankRequireFunc, threshold: 10000000000000 }); 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", "Make 10,000,000,000,000 cookies from clicking.", [11, 15]); new Game.Achievement("Clicknarok", "Make 1,000,000,000,000,000 cookies from clicking.", [11, 16]); order = 1050; new Game.Achievement("Extreme polydactyly", "Have 300 cursors.", [0, 13], {groups: "cursor:300"}); new Game.Achievement("Dr. T", "Have 400 cursors.", [0, 14], {groups: "cursor:400"}); order = 1100; Game.TieredAchievement("The old never bothered me anyway", "Have 250 grandmas.", "Grandma", 6); order = 1200; Game.TieredAchievement("Homegrown", "Have 200 farms.", "Farm", 5); order = 1400; Game.TieredAchievement("Technocracy", "Have 200 factories.", "Factory", 5); order = 1300; Game.TieredAchievement("The center of the Earth", "Have 200 mines.", "Mine", 5); order = 1500; Game.TieredAchievement("We come in peace", "Have 200 shipments.", "Shipment", 5); order = 1600; Game.TieredAchievement("The secrets of the universe", "Have 200 alchemy labs.", "Alchemy lab", 5); order = 1700; Game.TieredAchievement("Realm of the Mad God", "Have 200 portals.", "Portal", 5); order = 1800; Game.TieredAchievement("Forever and ever", "Have 200 time machines.", "Time machine", 5); order = 1900; Game.TieredAchievement("Walk the planck", "Have 200 antimatter condensers.", "Antimatter condenser", 5); order = 2000; Game.TieredAchievement("Rise and shine", "Have 200 prisms.", "Prism", 5); order = 30200; new Game.Achievement("God complex", 'Name yourself Orteil.Note : usurpers incur a -1% CpS penalty until they rename themselves something else.But that\'s not you, is it?', [17, 5], { pool: "shadow", require: function() { return Game.bakeryNameLowerCase === "orteil"; } }); new Game.Achievement("Third-party", "Use an add-on.Some find vanilla to be the most boring flavor.", [16, 5], {pool: "shadow"}); order = 30050; new Game.Achievement("Dematerialize", "Ascend with 1 quintillion cookies baked.Presto!", [11, 7]); new Game.Achievement("Nil zero zilch", "Ascend with 1 sextillion cookies baked.
...where'd the cookies go?To summarize : really not very much at all.", [11, 7]); new Game.Achievement("Transcendence", "Ascend with 1 septillion cookies baked.Your cookies are now on a higher plane of being.", [11, 8]); new Game.Achievement("Obliterate", "Ascend with 1 octillion cookies baked.Resistance is futile, albeit entertaining.", [11, 8]); new Game.Achievement("Negative void", "Ascend with 1 nonillion cookies baked.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", "Unlock 1 egg.", [1, 12], {require: function() { return Game.GetHowManyEggs(1, true) >= 1; }}); new Game.Achievement("Egging on", "Unlock 7 eggs.", [4, 12], {require: function() { return Game.GetHowManyEggs(7, true) >= 7; }}); new Game.Achievement("Mass Easteria", "Unlock 14 eggs.", [7, 12], {require: function() { return Game.GetHowManyEggs(14, true) >= 14; }}); new Game.Achievement("Hide & seek champion", 'Unlock all the eggs.Owning this achievement makes eggs drop more frequently in future playthroughs.', [13, 12], {require: function() { return Game.GetHowManyEggs(20, true) >= 20; }}); order = 11000; new Game.Achievement("What's in a name", "Give your bakery a name.", [15, 9]); order = 1425; Game.TieredAchievement("Pretty penny", "Have 1 bank.", "Bank", 1); Game.TieredAchievement("Fit the bill", "Have 50 banks.", "Bank", 2); Game.TieredAchievement("A loan in the dark", "Have 100 banks.", "Bank", 3); Game.TieredAchievement("Need for greed", "Have 150 banks.", "Bank", 4); Game.TieredAchievement("It's the economy, stupid", "Have 200 banks.", "Bank", 5); order = 1450; Game.TieredAchievement("Your time to shrine", "Have 1 temple.", "Temple", 1); Game.TieredAchievement("Shady sect", "Have 50 temples.", "Temple", 2); Game.TieredAchievement("New-age cult", "Have 100 temples.", "Temple", 3); Game.TieredAchievement("Organized religion", "Have 150 temples.", "Temple", 4); Game.TieredAchievement("Fanaticism", "Have 200 temples.", "Temple", 5); order = 1475; Game.TieredAchievement("Bewitched", "Have 1 wizard tower.", "Wizard tower", 1); Game.TieredAchievement("The sorcerer's apprentice", "Have 50 wizard towers.", "Wizard tower", 2); Game.TieredAchievement("Charms and enchantments", "Have 100 wizard towers.", "Wizard tower", 3); Game.TieredAchievement("Curses and maledictions", "Have 150 wizard towers.", "Wizard tower", 4); Game.TieredAchievement("Magic kingdom", "Have 200 wizard towers.", "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", "Ascend at least once.", [21, 6]); order = 11000; new Game.Achievement("Here you go", "Click this achievement's slot.All you had to do was ask.", [1, 7]); order = 30000; new Game.Achievement("Resurrection", "Ascend 10 times.", [21, 6]); new Game.Achievement("Reincarnation", "Ascend 100 times.", [21, 6]); new Game.Achievement("Endless cycle", "Ascend 1000 times.Oh hey, it's you again.", [2, 7], {pool: "shadow"}); order = 1100; Game.TieredAchievement("The agemaster", "Have 300 grandmas.", "Grandma", 7); Game.TieredAchievement("To oldly go", "Have 350 grandmas.", "Grandma", 8); order = 1200; Game.TieredAchievement("Gardener extraordinaire", "Have 250 farms.", "Farm", 6); order = 1300; Game.TieredAchievement("Tectonic ambassador", "Have 250 mines.", "Mine", 6); order = 1400; Game.TieredAchievement("Rise of the machines", "Have 250 factories.", "Factory", 6); order = 1425; Game.TieredAchievement("Acquire currency", "Have 250 banks.", "Bank", 6); order = 1450; Game.TieredAchievement("Zealotry", "Have 250 temples.", "Temple", 6); order = 1475; Game.TieredAchievement("The wizarding world", "Have 250 wizard towers.", "Wizard tower", 6); order = 1500; Game.TieredAchievement("Parsec-masher", "Have 250 shipments.", "Shipment", 6); order = 1600; Game.TieredAchievement("The work of a lifetime", "Have 250 alchemy labs.", "Alchemy lab", 6); order = 1700; Game.TieredAchievement("A place lost in time", "Have 250 portals.", "Portal", 6); order = 1800; Game.TieredAchievement("Heat death", "Have 250 time machines.", "Time machine", 6); order = 1900; Game.TieredAchievement("Microcosm", "Have 250 antimatter condensers.", "Antimatter condenser", 6); order = 2000; Game.TieredAchievement("Bright future", "Have 250 prisms.", "Prism", 6); order = 25000; new Game.Achievement("Here be dragon", "Complete your dragon's training.", [21, 12], {require: function() { return Game.HasUpgrade("A crumbly egg") && Game.dragonLevel >= Game.dragonMax; }}); 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 " + Game.abbreviateNumber(10000000000000 * 60 * 60, 0, true) + " 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.CpsAchievement("Fast", "Wow!"); order = 7002; new Game.Achievement("Bicentennial and a half", "Have at least 250 of everything.Keep on truckin'.", [9, 6], {require: getNumAllObjectsRequireFunc(250)}); order = 11000; new Game.Achievement("Tabloid addiction", "Click on the news ticker 50 times.Page 6 : Mad individual clicks on picture of pastry in a futile attempt to escape boredom!", [27, 7]); order = 1000; new Game.Achievement("Clickastrophe", "Make 100,000,000,000,000,000 cookies from clicking.", [11, 17]); new Game.Achievement("Clickataclysm", "Make 10,000,000,000,000,000,000 cookies from clicking.", [11, 18]); order = 1050; new Game.Achievement("Thumbs, phalanges, metacarpals", "Have 500 cursors.
Also page 6 : British parliament ate my baby!& KNUCKLES", [0, 15], {groups: "cursor:500"}); order = 6000; new Game.Achievement("Polymath", "Own 300 upgrades and 3000 buildings.Excellence doesn't happen overnight - it usually takes a good couple days.", [29, 7], {require: function() { return Game.Get("ObjectsOwned") >= 3000 && Game.Get("UpgradesOwned") >= 300; }}); order = 6005; new Game.Achievement("The elder scrolls", "Own a combined 777 grandmas and cursors.Let me guess. Someone stole your cookie.", [10, 9], {require: function() { return Game.Objects["Cursor"].getAmount() + Game.Objects["Grandma"].getAmount() >= 777; }}); order = 30050; new Game.Achievement("To crumbs, you say?", "Ascend with 1 decillion cookies baked.Very well then.", [29, 6]); order = 1200; Game.TieredAchievement("Seedy business", "Have 300 farms.", "Farm", 7); order = 1300; Game.TieredAchievement("Freak fracking", "Have 300 mines.", "Mine", 7); order = 1400; Game.TieredAchievement("Modern times", "Have 300 factories.", "Factory", 7); order = 1425; Game.TieredAchievement("The nerve of war", "Have 300 banks.", "Bank", 7); order = 1450; Game.TieredAchievement("Wololo", "Have 300 temples.", "Temple", 7); order = 1475; Game.TieredAchievement("And now for my next trick, I'll need a volunteer from the audience", "Have 300 wizard towers.", "Wizard tower", 7); order = 1500; Game.TieredAchievement("It's not delivery", "Have 300 shipments.", "Shipment", 7); order = 1600; Game.TieredAchievement("Gold, Jerry! Gold!", "Have 300 alchemy labs.", "Alchemy lab", 7); order = 1700; Game.TieredAchievement("Forbidden zone", "Have 300 portals.", "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", "Have 300 time machines.", "Time machine", 7); order = 1900; Game.TieredAchievement("Scientists baffled everywhere", "Have 300 antimatter condensers.", "Antimatter condenser", 7); order = 2000; Game.TieredAchievement("Harmony of the spheres", "Have 300 prisms.", "Prism", 7); order = 35000; new Game.Achievement("Last Chance to See", "Burst the near-extinct shiny wrinkler.You monster!", [24, 12], {pool: "shadow"}); order = 10000; new Game.Achievement("Early bird", "Click a golden cookie less than 1 second after it spawns.", [10, 14]); new Game.Achievement("Fading luck", "Click a golden cookie less than 1 second before it dies.", [10, 14]); order = 22100; new Game.Achievement("Eldeer", "Pop a reindeer during an elder frenzy.", [12, 9]); order = 21100; new Game.Achievement("Dude, sweet", "Harvest 7 coalescing sugar lumps.", [24, 14]); new Game.Achievement("Sugar rush", "Harvest 30 coalescing sugar lumps.", [26, 14]); new Game.Achievement("Year's worth of cavities", "Harvest 365 coalescing sugar lumps.My lumps my lumps my lumps.", [29, 14]); new Game.Achievement("Hand-picked", "Successfully harvest a coalescing sugar lump before it's ripe.", [28, 14]); new Game.Achievement("Sugar sugar", "Harvest a bifurcated sugar lump.", [29, 15]); new Game.Achievement("All-natural cane sugar", "Harvest a golden sugar lump.", [29, 16], {pool: "shadow"}); new Game.Achievement("Sweetmeats", "Harvest a meaty sugar lump.", [29, 17]); order = 7002; new Game.Achievement("Tricentennial", "Have at least 300 of everything.Can't stop, won't stop. Probably should stop, though.", [29, 12], {require: getNumAllObjectsRequireFunc(300)}); 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", "Have 350 farms.", "Farm", 8); order = 1300; Game.TieredAchievement("Romancing the stone", "Have 350 mines.", "Mine", 8); order = 1400; Game.TieredAchievement("Ex machina", "Have 350 factories.", "Factory", 8); order = 1425; Game.TieredAchievement("And I need it now", "Have 350 banks.", "Bank", 8); order = 1450; Game.TieredAchievement("Pray on the weak", "Have 350 temples.", "Temple", 8); order = 1475; Game.TieredAchievement("It's a kind of magic", "Have 350 wizard towers.", "Wizard tower", 8); order = 1500; Game.TieredAchievement("Make it so", "Have 350 shipments.", "Shipment", 8); order = 1600; Game.TieredAchievement("All that glitters is gold", "Have 350 alchemy labs.", "Alchemy lab", 8); order = 1700; Game.TieredAchievement( "H̸̷͓̳̳̯̟͕̟͍͍̣͡ḛ̢̦̰̺̮̝͖͖̘̪͉͘͡ ̠̦͕̤̪̝̥̰̠̫̖̣͙̬͘ͅC̨̦̺̩̲̥͉̭͚̜̻̝̣̼͙̮̯̪o̴̡͇̘͎̞̲͇̦̲͞͡m̸̩̺̝̣̹̱͚̬̥̫̳̼̞̘̯͘ͅẹ͇̺̜́̕͢s̶̙̟̱̥̮̯̰̦͓͇͖͖̝͘͘͞", "Have 350 portals.", "Portal", 8); order = 1800; Game.TieredAchievement("Way back then", "Have 350 time machines.", "Time machine", 8); order = 1900; Game.TieredAchievement("Exotic matter", "Have 350 antimatter condensers.", "Antimatter condenser", 8); order = 2000; Game.TieredAchievement("At the end of the tunnel", "Have 350 prisms.", "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", "Reach level 10 cursors.", [0, 26], {groups: "cursor|level10"}); order = 1120; new Game.Achievement("Methuselah", "Reach level 10 grandmas.", [1, 26], {groups: "grandma|level10"}); order = 1220; new Game.Achievement("Huge tracts of land", "Reach level 10 farms.", [2, 26], {groups: "farm|level10"}); order = 1320; new Game.Achievement("D-d-d-d-deeper", "Reach level 10 mines.", [3, 26], {groups: "mine|level10"}); order = 1420; new Game.Achievement("Patently genius", "Reach level 10 factories.", [4, 26], {groups: "factory|level10"}); order = 1445; new Game.Achievement("A capital idea", "Reach level 10 banks.", [15, 26], {groups: "bank|level10"}); order = 1470; new Game.Achievement("It belongs in a bakery", "Reach level 10 temples.", [16, 26], {groups: "temple|level10"}); order = 1495; new Game.Achievement("Motormouth", "Reach level 10 wizard towers.", [17, 26], {groups: "wizardTower|level10"}); order = 1520; new Game.Achievement("Been there done that", "Reach level 10 shipments.", [5, 26], {groups: "shipment|level10"}); order = 1620; new Game.Achievement("Phlogisticated substances", "Reach level 10 alchemy labs.", [6, 26], {groups: "alchemyLab|level10"}); order = 1720; new Game.Achievement("Bizarro world", "Reach level 10 portals.", [7, 26], {groups: "portal|level10"}); order = 1820; new Game.Achievement("The long now", "Reach level 10 time machines.", [8, 26], {groups: "timeMachine|level10"}); order = 1920; new Game.Achievement("Chubby hadrons", "Reach level 10 antimatter condensers.", [13, 26], {groups: "antimatterCondenser|level10"}); order = 2020; new Game.Achievement("Palettable", "Reach level 10 prisms.", [14, 26], {groups: "prism|level10"}); order = 61470; order = 61495; new Game.Achievement("Bibbidi-bobbidi-boo", "Cast 9 spells.", [21, 11]); new Game.Achievement("I'm the wiz", "Cast 99 spells.", [22, 11]); new Game.Achievement("A wizard is you", "Cast 999 spells.I'm a what?", [29, 11]); order = 10000; new Game.Achievement("Four-leaf cookie", "Have 4 golden cookies simultaneously.Fairly rare, considering cookies don't even have leaves.", [27, 6], {pool: "shadow"}); order = 2100; Game.TieredAchievement("Lucked out", "Have 1 chancemaker.", "Chancemaker", 1); Game.TieredAchievement("What are the odds", "Have 50 chancemakers.", "Chancemaker", 2); Game.TieredAchievement("Grandma needs a new pair of shoes", "Have 100 chancemakers.", "Chancemaker", 3); Game.TieredAchievement("Million to one shot, doc", "Have 150 chancemakers.", "Chancemaker", 4); Game.TieredAchievement("As luck would have it", "Have 200 chancemakers.", "Chancemaker", 5); Game.TieredAchievement("Ever in your favor", "Have 250 chancemakers.", "Chancemaker", 6); Game.TieredAchievement("Be a lady", "Have 300 chancemakers.", "Chancemaker", 7); Game.TieredAchievement("Dicey business", "Have 350 chancemakers.", "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", "Reach level 10 chancemakers.", [19, 26], {groups: "chancemaker|level10"}); order = 1000; new Game.Achievement("The ultimate clickdown", "Make 1,000,000,000,000,000,000,000 cookies from clicking.(of ultimate destiny.)", [11, 19]); order = 1100; Game.TieredAchievement("Aged well", "Have 400 grandmas.", "Grandma", 9); Game.TieredAchievement("101st birthday", "Have 450 grandmas.", "Grandma", 10); Game.TieredAchievement("Defense of the ancients", "Have 500 grandmas.", "Grandma", 11); order = 1200; Game.TieredAchievement("Harvest moon", "Have 400 farms.", "Farm", 9); order = 1300; Game.TieredAchievement("Mine?", "Have 400 mines.", "Mine", 9); order = 1400; Game.TieredAchievement("In full gear", "Have 400 factories.", "Factory", 9); order = 1425; Game.TieredAchievement("Treacle tart economics", "Have 400 banks.", "Bank", 9); order = 1450; Game.TieredAchievement("Holy cookies, grandma!", "Have 400 temples.", "Temple", 9); order = 1475; Game.TieredAchievement("The Prestige", "Have 400 wizard towers.(Unrelated to the Cookie Clicker feature of the same name.)", "Wizard tower", 9); order = 1500; Game.TieredAchievement("That's just peanuts to space", "Have 400 shipments.", "Shipment", 9); order = 1600; Game.TieredAchievement("Worth its weight in lead", "Have 400 alchemy labs.", "Alchemy lab", 9); order = 1700; Game.TieredAchievement("What happens in the vortex stays in the vortex", "Have 400 portals.", "Portal", 9); order = 1800; Game.TieredAchievement("Invited to yesterday's party", "Have 400 time machines.", "Time machine", 9); order = 1900; Game.TieredAchievement("Downsizing", "Have 400 antimatter condensers.", "Antimatter condenser", 9); order = 2000; Game.TieredAchievement("My eyes", "Have 400 prisms.", "Prism", 9); order = 2100; Game.TieredAchievement("Maybe a chance in hell, actually", "Have 400 chancemakers.", "Chancemaker", 9); order = 1200; Game.TieredAchievement("Make like a tree", "Have 450 farms.", "Farm", 10); order = 1300; Game.TieredAchievement("Cave story", "Have 450 mines.", "Mine", 10); order = 1400; Game.TieredAchievement("In-cog-neato", "Have 450 factories.", "Factory", 10); order = 1425; Game.TieredAchievement("Save your breath because that's all you've got left", "Have 450 banks.", "Bank", 10); order = 1450; Game.TieredAchievement("Vengeful and almighty", "Have 450 temples.", "Temple", 10); order = 1475; Game.TieredAchievement("Spell it out for you", "Have 450 wizard towers.", "Wizard tower", 10); order = 1500; Game.TieredAchievement("Space space space space space", "Have 450 shipments.It's too far away...", "Shipment", 10); order = 1600; Game.TieredAchievement("Don't get used to yourself, you're gonna have to change", "Have 450 alchemy labs.", "Alchemy lab", 10); order = 1700; Game.TieredAchievement("Objects in the mirror dimension are closer than they appear", "Have 450 portals.", "Portal", 10); order = 1800; Game.TieredAchievement("Groundhog day", "Have 450 time machines.", "Time machine", 10); order = 1900; Game.TieredAchievement("A matter of perspective", "Have 450 antimatter condensers.", "Antimatter condenser", 10); order = 2000; Game.TieredAchievement("Optical illusion", "Have 450 prisms.", "Prism", 10); order = 2100; Game.TieredAchievement("Jackpot", "Have 450 chancemakers.", "Chancemaker", 10); order = 36000; new Game.Achievement("So much to do so much to see", "Manage a cookie legacy for at least a year.Thank you so much for playing Cookie Clicker!", [23, 11], {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", "Make 100,000,000,000,000,000,000,000 cookies from clicking.", [11, 28]); new Game.Achievement("One...more...click...", "Make 10,000,000,000,000,000,000,000,000 cookies from clicking.", [11, 30]); order = 61515; new Game.Achievement("Botany enthusiast", "Harvest 100 mature garden plants.", [26, 20]); new Game.Achievement("Green, aching thumb", "Harvest 1000 mature garden plants.", [27, 20]); new Game.Achievement("In the garden of Eden (baby)", "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", "Unlock every garden seed.", [25, 20]); new Game.Achievement("Seedless to nay", 'Convert a complete seed log into sugar lumps by sacrificing your garden to the sugar hornets.Owning this achievement makes seeds 5% cheaper, plants mature 5% sooner, and plant upgrades drop 5% more.', [29, 20]); order = 30050; new Game.Achievement("You get nothing", "Ascend with 1 undecillion cookies baked.Good day sir!", [29, 6]); new Game.Achievement("Humble rebeginnings", "Ascend with 1 duodecillion cookies baked.Started from the bottom, now we're here.", [29, 6]); new Game.Achievement("The end of the world", "Ascend with 1 tredecillion cookies baked.(as we know it)", [21, 25]); new Game.Achievement("Oh, you're back", "Ascend with 1 quattuordecillion cookies baked.Missed us?", [21, 25]); new Game.Achievement("Lazarus", "Ascend with 1 quindecillion cookies baked.Try, try again.", [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", "Have at least 350 of everything.(it's free real estate)", [21, 26], {require: getNumAllObjectsRequireFunc(350)}); new Game.Achievement("Quadricentennial", "Have at least 400 of everything.You've had to do horrible things to get this far.", [22, 26], {require: getNumAllObjectsRequireFunc(400)}); new Game.Achievement("Quadricentennial and a half", "Have at least 450 of everything.
Horrible... horrible things.At this point, you might just be compensating for something.", [23, 26], {require: getNumAllObjectsRequireFunc(450)}); new Game.Achievement("Quincentennial", "Have at least 500 of everything.Some people would say you're halfway there.", [29, 25], {require: getNumAllObjectsRequireFunc(500)}); order = 21100; new Game.Achievement("Maillard reaction", "Harvest a caramelized sugar lump.", [29, 27]); order = 30250; new Game.Achievement("When the cookies ascend just right", "Ascend with exactly 1,000,000,000,000 cookies.", [25, 7], {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", "Have 600 cursors.", [0, 16], {groups: "cursor:600"}); order = 1100; Game.TieredAchievement("But wait 'til you get older", "Have 550 grandmas.", "Grandma", 12); order = 1200; Game.TieredAchievement("Sharpest tool in the shed", "Have 500 farms.", "Farm", 11); order = 1300; Game.TieredAchievement("Hey now, you're a rock", "Have 500 mines.", "Mine", 11); order = 1400; Game.TieredAchievement("Break the mold", "Have 500 factories.", "Factory", 11); order = 1425; Game.TieredAchievement("Get the show on, get paid", "Have 500 banks.", "Bank", 11); order = 1450; Game.TieredAchievement("My world's on fire, how about yours", "Have 500 temples.", "Temple", 11); order = 1475; Game.TieredAchievement("The meteor men beg to differ", "Have 500 wizard towers.", "Wizard tower", 11); order = 1500; Game.TieredAchievement("Only shooting stars", "Have 500 shipments.", "Shipment", 11); order = 1600; Game.TieredAchievement("We could all use a little change", "Have 500 alchemy labs.", "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", "Have 500 portals.", "Portal", 11); order = 1800; Game.TieredAchievement("The years start coming", "Have 500 time machines.", "Time machine", 11); order = 1900; Game.TieredAchievement("What a concept", "Have 500 antimatter condensers.", "Antimatter condenser", 11); order = 2000; Game.TieredAchievement("You'll never shine if you don't glow", "Have 500 prisms.", "Prism", 11); order = 2100; Game.TieredAchievement("You'll never know if you don't go", "Have 500 chancemakers.", "Chancemaker", 11); order = 2200; Game.TieredAchievement("Self-contained", "Have 1 fractal engine.", "Fractal engine", 1); Game.TieredAchievement("Threw you for a loop", "Have 50 fractal engines.", "Fractal engine", 2); Game.TieredAchievement("The sum of its parts", "Have 100 fractal engines.", "Fractal engine", 3); Game.TieredAchievement("Bears repeating", "Have 150 fractal engines.
We do not care for those people and their reckless sense of unchecked optimism.Where did these come from?", "Fractal engine", 4); Game.TieredAchievement("More of the same", "Have 200 fractal engines.", "Fractal engine", 5); Game.TieredAchievement("Last recurse", "Have 250 fractal engines.", "Fractal engine", 6); Game.TieredAchievement("Out of one, many", "Have 300 fractal engines.", "Fractal engine", 7); Game.TieredAchievement("An example of recursion", "Have 350 fractal engines.", "Fractal engine", 8); Game.TieredAchievement("For more information on this achievement, please refer to its title", "Have 400 fractal engines.", "Fractal engine", 9); Game.TieredAchievement("I'm so meta, even this achievement", "Have 450 fractal engines.", "Fractal engine", 10); Game.TieredAchievement("Never get bored", "Have 500 fractal engines.", "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", "Reach level 10 fractal engines.", [20, 26], {groups: "fractalEngine|level10"}); Game.CpsAchievement("Gotta go fast"); Game.BankAchievement("I think it's safe to say you've got it made"); order = 6000; new Game.Achievement("Renaissance baker", "Own 400 upgrades and 4000 buildings.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], {require: function() { return Game.Get("ObjectsOwned") >= 4000 && Game.Get("UpgradesOwned") >= 400; }}); order = 1150; new Game.Achievement("Veteran", "Own at least 14 grandma types.14's a crowd!", [10, 9], { require: function() { var list = Game.UpgradesByGroup.grandmaSynergy; return Game.countUpgradesByGroup(list, 14) >= 14; } }); order = 10000; new Game.Achievement("Thick-skinned", "Have your reinforced membrane protect the shimmering veil.", [7, 10]); Game.AchievementsByOrder = Game.AchievementsById.slice(0).sort(Game.sortByOrderFunc); var $norm = $("#achNorm"); var $shadow = $("#achShadow"); var $dungeon = $("#achDungeon"); for (i = Game.AchievementsByOrder.length - 1; i >= 0; i--) { var achieve = Game.AchievementsByOrder[i]; Game.ArrayPush(Game.AchievementsByPool, achieve.pool, achieve); if (Game.CountsAsAchievementOwned(achieve.pool)) { Game.AchievementsTotal++; } var $node = $norm; if (achieve.pool === "shadow") { $node = $shadow; achieve.$crateNodes.addClass("shadow"); } else if (achieve.pool === "dungeon") { $node = $dungeon; } $node.prepend(achieve.$baseCrate); for (j in achieve.groups) { Game.ArrayPush(Game.AchievementsByGroup, j, achieve); if (!achieve.buildingTie && j in Game.ObjectsByGroup) { achieve.buildingTie = Game.ObjectsByGroup[j]; } } } var reqFunc = function() { return Game.Objects["Cursor"].getAmount() >= this.groups.cursor; }; for (i = Game.AchievementsByGroup.cursor.length - 1; i >= 0; i--) { Game.AchievementsByGroup.cursor[i].require = reqFunc; } reqFunc = function() { return this.buildingTie.level >= 10; }; for (i = Game.AchievementsByGroup.level10.length - 1; i >= 0; i--) { Game.AchievementsByGroup.level10[i].require = reqFunc; } //#endregion Achievements //#region Buffs / Buff types 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"] }; var objectOptions = ""; for (i = 0; i < Game.ObjectsById.length; i++) { objectOptions += '"; } var buffObjectSel = '"; Game.BuffType = function(name, func, props) { 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.BuffTypes.length; $.extend(this, props); if (!this.hidden) { this.$domNode = $('Add ' + this.displayName + ' ' + '' + "").appendTo("#buffsTypesBlock"); this.domNode = this.$domNode[0]; this.domNode.objTie = this; this.$addBtn = this.$domNode.find(".buffTypeAdd"); this.$addBtn[0].objTie = this; var $node = this.$domNode.find(".buffTypeOptions"); if (this.addObjectSel) { var self = this; var $select = $(buffObjectSel).appendTo($node); $select.after(" "); self.objectSelect = $select[0]; self.objectSelect.objTie = self; var $input = $('').appendTo($node); self.objectAmountIn = $input[0]; self.objectAmountIn.minIn = 1; self.objectAmountIn.objTie = self; self.objectAmountIn.checkFunc = function() { self.updateFunc(); }; } if (this.addOptions) { this.addOptions($node); } } Game.BuffTypesByName[this.name] = this; Game.BuffTypes.push(this); }; Game.BuffType.prototype.getTime = function(setWrath) { var time = this.time; if (this.fromGoldCookie || this.fromWrathCookie) { var wrath = this.fromWrathCookie && (setWrath || !this.fromGoldCookie || byId("buffsSetWrath").checked); time = Math.ceil(time * Game.getGoldCookieDurationMod(wrath)); } return time; }; Game.BuffType.prototype.getArgs = function() { return [ this.getTime(), this.powFunc ? this.powFunc() : this.pow ]; }; Game.BuffType.prototype.updateFunc = function() { }; //base buffs new Game.BuffType("frenzy", function(time, pow) { return { name: "Frenzy", desc: "Cookie production x" + pow + " for " + Game.sayTime(time * Game.fps, -1) + "!", icon: [10, 14], time: time * Game.fps, multCpS: pow }; }, { displayName: "Frenzy", tooltipDesc: "Cookie production x7 for 1 minute 17 seconds!", fromGoldCookie: true, fromWrathCookie: true, time: 77, pow: 7 }); new Game.BuffType("blood frenzy", function(time, pow) { return { name: "Elder frenzy", desc: "Cookie production x" + pow + " for " + Game.sayTime(time * Game.fps, -1) + "!", icon: [29, 6], time: time * Game.fps, multCpS: pow }; }, { displayName: "Elder frenzy", tooltipDesc: "Cookie production x666 for 6 seconds!", fromWrathCookie: true, time: 6, pow: 666 }); new Game.BuffType("clot", function(time, pow) { return { name: "Clot", desc: "Cookie production halved for " + Game.sayTime(time * Game.fps, -1) + "!", icon: [15, 5], time: time * Game.fps, multCpS: pow }; }, { displayName: "Clot", tooltipDesc: "Cookie production x0.5 for 1 minute 6 seconds!", fromWrathCookie: true, time: 66, pow: 0.5 }); new Game.BuffType("dragon harvest", function(time, pow) { return { name: "Dragon Harvest", desc: "Cookie production x" + pow + " for " + Game.sayTime(time * Game.fps, -1) + "!", icon: [10, 25], time: time * Game.fps, multCpS: pow }; }, { displayName: "Dragon Harvest", tooltipDesc: "Cookie production x15 for 1 minute!", fromGoldCookie: true, time: 60, pow: 15 }); new Game.BuffType("everything must go", function(time, pow) { return { name: "Everything must go", desc: "All buildings are " + pow + "% cheaper for " + Game.sayTime(time * Game.fps, -1) + "!", icon: [17, 6], time: time * Game.fps, power: pow }; }, { displayName: "Everything must go", tooltipDesc: "All buildings are 5% cheaper for 8 seconds!", fromGoldCookie: true, fromWrathCookie: true, time: 8, pow: 5 }); new Game.BuffType("cursed finger", function(time, pow) { var timeStr = Game.sayTime(time * Game.fps, -1); return { name: "Cursed finger", desc: "Cookie production halted for " + timeStr + ",
but each click is worth " + timeStr + " of CpS.", icon: [12, 17], time: time * Game.fps, power: pow, multCpS: 0 }; }, { displayName: "Cursed finger", tooltipDesc: "Cookie production halted for 10 seconds,
but each click is worth 10 seconds of CpS.", fromWrathCookie: true, time: 10, powFunc: function() { return (Game.cookiesPs * this.getTime(true)); } }); new Game.BuffType("click frenzy", function(time, pow) { return { name: "Click frenzy", desc: "Clicking power x" + pow + " for " + Game.sayTime(time * Game.fps, -1) + "!", icon: [0, 14], time: time * Game.fps, multClick: pow }; }, { displayName: "Click frenzy", tooltipDesc: "Clicking power x777 for 13 seconds!", fromGoldCookie: true, fromWrathCookie: true, time: 13, pow: 777 }); new Game.BuffType("dragonflight", function(time, pow) { return { name: "Dragonflight", desc: "Clicking power x" + pow + " for " + Game.sayTime(time * Game.fps, -1) + "!", icon: [0, 25], time: time * Game.fps, add: true, multClick: pow, aura: 1 }; }, { displayName: "Dragonflight", tooltipDesc: "Clicking power x1111 for 10 seconds!", fromGoldCookie: true, time: 10, pow: 1111 }); //irrelevant new Game.BuffType("cookie storm", function(time, pow) { return { name: "Cookie storm", desc: "Cookies everywhere!", icon: [22, 6], time: time * Game.fps, add: true, power: pow, aura: 1 }; }, {hidden: true}); new Game.BuffType("building buff", function(time, pow, building, amount) { var obj = Game.ObjectsById[building]; if (isNaN(amount)) { amount = obj.getAmount(); } return { name: Game.goldenCookieBuildingBuffs[obj.name][0], desc: "Your " + amount + " " + obj.plural + " are boosting your CpS!
Cookie production +" + (Math.ceil(pow * 100 - 100)) + "% for " + Game.sayTime(time * Game.fps, -1) + "!", icon: [obj.iconColumn, 14], time: time * Game.fps, multCpS: pow }; }, { displayName: "Building buff", tooltipDesc: "Your (amount) (building) are boosting your CpS!
Cookie production +(xxx)% for 30 seconds!", fromGoldCookie: true, fromWrathCookie: true, time: 30, addObjectSel: true, addOptions: function($node) { var $random = $('Random').appendTo($node); $random.before(" "); $random[0].objTie = this; }, getArgs: function() { return [ this.getTime(), this.objectAmountIn.parsedValue / 10 + 1, this.objectSelect.value, this.objectAmountIn.parsedValue ]; } }); new Game.BuffType("building debuff", function(time, pow, building, amount) { var obj = Game.ObjectsById[building]; if (isNaN(amount)) { amount = obj.getAmount(); } return { name: Game.goldenCookieBuildingBuffs[obj.name][1], desc: "Your " + amount + " " + obj.plural + " are rusting your CpS!
Cookie production " + (Math.ceil(pow * 100 - 100)) + "% slower for " + Game.sayTime(time * Game.fps, -1) + "!", icon: [obj.iconColumn, 15], time: time * Game.fps, multCpS: 1 / pow }; }, { displayName: "Building debuff", tooltipDesc: "Your (amount) (building) are rusting your CpS!
Cookie production (xx)% slower for 30 seconds!", fromWrathCookie: true, time: 30, addObjectSel: true, addOptions: function($node) { var $random = $('Random').appendTo($node); $random.before(" "); $random[0].objTie = this; }, getArgs: function() { return [ this.getTime(), this.objectAmountIn.parsedValue / 10 + 1, this.objectSelect.value, this.objectAmountIn.parsedValue ]; } }); // irrelevant new Game.BuffType("sugar blessing", function(time) { return { name: "Sugar blessing", desc: "You find 10% more golden cookies for the next " + Game.sayTime(time * Game.fps, -1) + ".", icon: [29, 16], time: time * Game.fps }; }, {hidden: true}); new Game.BuffType("haggler luck", function(time, pow) { return { name: "Haggler's luck", desc: "All upgrades are " + pow + "% cheaper for " + Game.sayTime(time * Game.fps, -1) + "!", icon: [25, 11], time: time * Game.fps, power: pow }; }, { displayName: "Haggler's luck", tooltipDesc: "All upgrades are 2% cheaper for 1 minute!", time: 60, pow: 2, killOnGain: "Haggler's misery" }); new Game.BuffType("haggler misery", function(time, pow) { return { name: "Haggler's misery", desc: "All upgrades are " + pow + "% pricier for " + Game.sayTime(time * Game.fps, -1) + "!", icon: [25, 11], time: time * Game.fps, power: pow, max: true }; }, { displayName: "Haggler's misery", tooltipDesc: "All upgrades are 2% pricier for 1 hour!", time: 60 * 60, pow: 2, killOnGain: "Haggler's luck" }); new Game.BuffType("pixie luck", function(time, pow) { return { name: "Crafty pixies", desc: "All buildings are " + pow + "% cheaper for " + Game.sayTime(time * Game.fps, -1) + "!", icon: [26, 11], time: time * Game.fps, power: pow, max: true }; }, { displayName: "Crafty pixies", tooltipDesc: "All buildings are 2% cheaper for 1 minute!", time: 60, pow: 2, killOnGain: "Nasty goblins" }); new Game.BuffType("pixie misery", function(time, pow) { return { name: "Nasty goblins", desc: "All buildings are " + pow + "% pricier for " + Game.sayTime(time * Game.fps, -1) + "!", icon: [26, 11], time: time * Game.fps, power: pow, max: true }; }, { displayName: "Nasty goblins", tooltipDesc: "All buildings are 2% pricier for 1 hour!", time: 60 * 60, pow: 2, killOnGain: "Crafty pixies" }); // irrelevant new Game.BuffType("magic adept", function(time, pow) { return { name: "Magic adept", desc: "Spells backfire " + pow + " times less for " + Game.sayTime(time * Game.fps, -1) + ".", icon: [29, 11], time: time * Game.fps, power: pow, max: true }; }, {hidden: true}); new Game.BuffType("magic inept", function(time, pow) { return { name: "Magic inept", desc: "Spells backfire " + pow + " times more for " + Game.sayTime(time * Game.fps, -1) + ".", icon: [29, 11], time: time * Game.fps, power: pow, max: true }; }, {hidden: true}); new Game.BuffType("devastation", function(time, pow) { return { name: "Devastation", desc: function() { return "Clicking power +" + Math.floor(this.multClick * 100 - 100) + "% for " + Game.sayTime(this.time, -1) + "!"; }, // * Game.fps icon: [23, 18], time: time * Game.fps, multClick: pow }; }, { displayName: "Devastation", tooltipDesc: "Clicking power +(xxx)% for 10 seconds!", time: 10, addObjectSel: true, addOptions: function($node) { var self = this; var opts = ""; for (var i = 0; i < 3; i++) { opts += '"; } self.$gemSlotSelect = $("").appendTo($node); self.$gemSlotSelect.before(" ").after(" "); var $label = $( '').appendTo( $node); $label.after(" "); self.stackCheck = $label.find("input")[0]; self.$sellBtn = $(' ').appendTo($node).on("click", function() { var obj = Game.ObjectsById[self.objectSelect.value]; var amount = Math.min(self.objectAmountIn.parsedValue, obj.getAmount()); if (amount) { obj.sacrifice(amount); Game.gainBuff(self.name, [self.getTime(), self.powFunc(amount)]); } Game.scheduleUpdate(); }); }, powFunc: function() { var sold = this.objectAmountIn.parsedValue; var godLvl = this.$gemSlotSelect.val(); var pow = 0; if (godLvl == 1) { pow = 1 + sold * 0.01; } else if (godLvl == 2) { pow = 1 + sold * 0.005; } else if (godLvl == 3) { pow = 1 + sold * 0.0025; } return pow; }, stackFunc: function(oldBuff, newBuff) { if (this.stackCheck.checked) { newBuff.multClick = newBuff.multClick - 1 + oldBuff.multClick; } }, updateFunc: function() { var obj = Game.ObjectsById[this.objectSelect.value]; var amount = Math.min(this.objectAmountIn.parsedValue, obj.amount); this.$sellBtn.toggleClass("hidden", !amount); } }); new Game.BuffType("sugar frenzy", function(time, pow) { return { name: "Sugar frenzy", desc: "Cookie production x" + pow + " for " + Game.sayTime(time * Game.fps, -1) + "!", icon: [29, 14], time: time * Game.fps, add: true, multCpS: pow, aura: 0 }; }, { displayName: "Sugar frenzy", tooltipDesc: "Cookie production x3 for 1 hour!", time: 60 * 60, pow: 3 }); Game.gainBuff = function(type, args) { var buffType = Game.BuffTypesByName[type]; if (!buffType || !buffType.func) { throw 'Invalid buff type "' + type + '"'; } if (buffType.hidden) { throw 'Buff type "' + type + '" deemed irrelevant'; } args = args || buffType.getArgs(); var buff = buffType.func.apply(buffType, args); var oldBuff = Game.hasBuff(buff.name); if (oldBuff) { if (buffType.stackFunc) { buffType.stackFunc(oldBuff, buff); } Game.killBuff(oldBuff.name); } buff.type = type; buff.buffType = buffType; buff.icon = buff.icon || [0, 0]; buff.iconCss = Game.getIconCss(buff.icon); buff.args1 = args[1]; buff.args2 = args[2]; buff.args3 = args[3]; Game.Buffs[buff.name] = buff; buff.$crate = $('') .css(buff.iconCss).attr("data-buff", buff.name).appendTo("#buffsCurrent"); buff.$crate[0].objTie = buff; if (buffType.killOnGain) { Game.killBuff(buffType.killOnGain); } }; Game.killBuff = function(name) { var buff = Game.hasBuff(name); if (buff) { buff.$crate.remove(); delete Game.Buffs[name]; } }; Game.killBuffs = function() { for (var name in Game.Buffs) { Game.killBuff(name); } }; Game.clearBuffSelection = function() { $("#buffsCurrent .buffCrate.enabled").removeClass("enabled"); Game.updateBuffSelection(); }; Game.setBuffObjectInputs = function() { // $("#buffsBlock .buffObjectSelect").change(); }; var tabBuffsEle = byId("tabBuffs"); tabBuffsEle.onTabFunc = function() { Game.clearBuffSelection(); Game.setBuffObjectInputs(); }; tabBuffsEle.updateTabFunc = function() { var text = "Buffs"; var title = ""; var buffs = 0; // eslint-disable-next-line no-unused-vars for (var key in Game.Buffs) { buffs++; } if (buffs > 0) { text += " (" + buffs + ")"; title = buffs + " buff" + (buffs === 1 ? "" : "s") + " active"; } this.textContent = text; this.dataset.title = title; }; Game.updateBuffSelection = function() { var hasSelection = $("#buffsCurrent .buffCrate.enabled").length > 0; $("#buffsClearAll").toggleClass("hidden", $("#buffsCurrent .buffCrate").length < 1); $("#buffsClearCancel, #buffsClearSelected").toggleClass("hidden", !hasSelection); }; $("#buffsTypesBlock").on("mouseenter", ".buffTypeName", function() { var buffType = Game.BuffTypesByName[this.parentNode.dataset.bufftype]; Game.setTooltip({ html: '' + '", refEle: this }); }).on("click", ".buffTypeAdd", function() { Game.gainBuff(this.objTie.name); Game.updateBuffSelection(); Game.scheduleUpdate(); }).on("change", ".buffObjectSelect", function() { var obj = Game.ObjectsById[this.objTie.objectSelect.value]; Game.setInput(this.objTie.objectAmountIn, obj.getAmount()); }).on("click", ".buffRandomObject", function() { var n = Math.floor(Math.random() * Game.ObjectsById.length); this.objTie.objectSelect.value = n; var obj = Game.ObjectsById[n]; Game.setInput(this.objTie.objectAmountIn, obj.getAmount()); Game.scheduleUpdate(); }); $("#buffsCurrent").on("mouseenter", ".buffCrate", function() { var buff = this.objTie; var desc = typeof buff.desc === "function" ? buff.desc() : buff.desc; Game.setTooltip({ html: '' + buffType.displayName + '
' + buffType.tooltipDesc + "' + '", refEle: this }); }).on("click", ".buffCrate", function() { $(this).toggleClass("enabled"); Game.updateBuffSelection(); }); $("#buffsClearAll").on("click", function() { Game.killBuffs(); Game.updateBuffSelection(); Game.scheduleUpdate(); }); $("#buffsClearCancel").on("click", function() { Game.clearBuffSelection(); }); $("#buffsClearSelected").on("click", function() { $("#buffsCurrent .buffCrate.enabled").each(function() { Game.killBuff(this.objTie.name); }); Game.updateBuffSelection(); Game.scheduleUpdate(); }); //#endregion Buffs / Buff types //#region Dragon Auras Game.dragonLevels = [ { name: "Dragon egg", action: "Chip it", pic: 0, cost: function() { return true; }, cumuCost: function() { return 1000000; }, costStr: function() { return Game.BeautifyAbbr(1000000, 0, true) + " cookies"; } }, { name: "Dragon egg", action: "Chip it", pic: 1, cost: function() { return true; }, cumuCost: function() { return 1000000 * 2; }, costStr: function() { return Game.BeautifyAbbr(1000000 * 2, 0, true) + " cookies"; } }, { name: "Dragon egg", action: "Chip it", pic: 2, cost: function() { return true; }, cumuCost: function() { return 1000000 * 4; }, costStr: function() { return Game.BeautifyAbbr(1000000 * 4, 0, true) + " cookies"; } }, { name: "Shivering dragon egg", action: "Hatch it", pic: 3, cost: function() { return true; }, cumuCost: function() { return 1000000 * 8; }, costStr: function() { return Game.BeautifyAbbr(1000000 * 8, 0, true) + " cookies"; } }, { name: "Krumblor, cookie hatchling", action: "Train Breath of Milk", actionTitle: "Aura : kittens are 5% more effective", pic: 4, cost: function() { return true; }, cumuCost: function() { return 1000000 * 16; }, costStr: function() { return Game.BeautifyAbbr(1000000 * 16, 0, true) + " cookies"; } }, { name: "Krumblor, cookie hatchling", action: "Train Dragon Cursor", actionTitle: "Aura : clicking is 5% more effective", pic: 4, cost: function() { return Game.Objects["Cursor"].amount >= 100; }, cumuCost: function() { return Game.Objects["Cursor"].getPriceSum(0, 100); }, buy: function() { Game.Objects["Cursor"].sacrifice(100); }, costStr: function() { return "100 cursors"; } }, { name: "Krumblor, cookie hatchling", action: "Train Elder Battalion", actionTitle: "Aura : grandmas gain +1% CpS for every non-grandma building", pic: 4, cost: function() { return Game.Objects["Grandma"].amount >= 100; }, cumuCost: function() { return Game.Objects["Grandma"].getPriceSum(0, 100); }, buy: function() { Game.Objects["Grandma"].sacrifice(100); }, costStr: function() { return "100 grandmas"; } }, { name: "Krumblor, cookie hatchling", action: "Train Reaper of Fields", actionTitle: "Aura : golden cookies may trigger a Dragon Harvest", pic: 4, cost: function() { return Game.Objects["Farm"].amount >= 100; }, cumuCost: function() { return Game.Objects["Farm"].getPriceSum(0, 100); }, buy: function() { Game.Objects["Farm"].sacrifice(100); }, costStr: function() { return "100 farms"; } }, { name: "Krumblor, cookie dragon", action: "Train Earth Shatterer", actionTitle: "Aura : buildings sell back for 50% instead of 25%", pic: 5, cost: function() { return Game.Objects["Mine"].amount >= 100; }, cumuCost: function() { return Game.Objects["Mine"].getPriceSum(0, 100); }, buy: function() { Game.Objects["Mine"].sacrifice(100); }, costStr: function() { return "100 mines"; } }, { name: "Krumblor, cookie dragon", action: "Train Master of the Armory", actionTitle: "Aura : all upgrades are 2% cheaper", pic: 5, cost: function() { return Game.Objects["Factory"].amount >= 100; }, cumuCost: function() { return Game.Objects["Factory"].getPriceSum(0, 100); }, buy: function() { Game.Objects["Factory"].sacrifice(100); }, costStr: function() { return "100 factories"; } }, { name: "Krumblor, cookie dragon", action: "Train Fierce Hoarder", actionTitle: "Aura : all buildings are 2% cheaper", pic: 5, cost: function() { return Game.Objects["Bank"].amount >= 100; }, cumuCost: function() { return Game.Objects["Bank"].getPriceSum(0, 100); }, buy: function() { Game.Objects["Bank"].sacrifice(100); }, costStr: function() { return "100 banks"; } }, { name: "Krumblor, cookie dragon", action: "Train Dragon God", actionTitle: "Aura : heavenly chips bonus +5%", pic: 5, cost: function() { return Game.Objects["Temple"].amount >= 100; }, cumuCost: function() { return Game.Objects["Temple"].getPriceSum(0, 100); }, buy: function() { Game.Objects["Temple"].sacrifice(100); }, costStr: function() { return "100 temples"; } }, { name: "Krumblor, cookie dragon", action: "Train Arcane Aura", actionTitle: "Aura : golden cookies appear 5% more often", pic: 5, cost: function() { return Game.Objects["Wizard tower"].amount >= 100; }, cumuCost: function() { return Game.Objects["Wizard tower"].getPriceSum(0, 100); }, buy: function() { Game.Objects["Wizard tower"].sacrifice(100); }, costStr: function() { return "100 wizard towers"; } }, { name: "Krumblor, cookie dragon", action: "Train Dragonflight", actionTitle: "Aura : golden cookies may trigger a Dragonflight", pic: 5, cost: function() { return Game.Objects["Shipment"].amount >= 100; }, cumuCost: function() { return Game.Objects["Shipment"].getPriceSum(0, 100); }, buy: function() { Game.Objects["Shipment"].sacrifice(100); }, costStr: function() { return "100 shipments"; } }, { name: "Krumblor, cookie dragon", action: "Train Ancestral Metamorphosis", actionTitle: "Aura : golden cookies give 10% more cookies", pic: 5, cost: function() { return Game.Objects["Alchemy lab"].amount >= 100; }, cumuCost: function() { return Game.Objects["Alchemy lab"].getPriceSum(0, 100); }, buy: function() { Game.Objects["Alchemy lab"].sacrifice(100); }, costStr: function() { return "100 alchemy labs"; } }, { name: "Krumblor, cookie dragon", action: "Train Unholy Dominion", actionTitle: "Aura : wrath cookies give 10% more cookies", pic: 5, cost: function() { return Game.Objects["Portal"].amount >= 100; }, cumuCost: function() { return Game.Objects["Portal"].getPriceSum(0, 100); }, buy: function() { Game.Objects["Portal"].sacrifice(100); }, costStr: function() { return "100 portals"; } }, { name: "Krumblor, cookie dragon", action: "Train Epoch Manipulator", actionTitle: "Aura : golden cookie effects last 5% longer", pic: 5, cost: function() { return Game.Objects["Time machine"].amount >= 100; }, cumuCost: function() { return Game.Objects["Time machine"].getPriceSum(0, 100); }, buy: function() { Game.Objects["Time machine"].sacrifice(100); }, costStr: function() { return "100 time machines"; } }, { name: "Krumblor, cookie dragon", action: "Train Mind Over Matter", actionTitle: "Aura : +25% random drops", pic: 5, cost: function() { return Game.Objects["Antimatter condenser"].amount >= 100; }, buy: function() { Game.Objects["Antimatter condenser"].sacrifice(100); }, cumuCost: function() { return Game.Objects["Antimatter condenser"].getPriceSum(0, 100); }, costStr: function() { return "100 antimatter condensers"; } }, { name: "Krumblor, cookie dragon", action: "Train Radiant Appetite", actionTitle: "Aura : all cookie production multiplied by 2", pic: 5, cost: function() { return Game.Objects["Prism"].amount >= 100; }, cumuCost: function() { return Game.Objects["Prism"].getPriceSum(0, 100); }, buy: function() { Game.Objects["Prism"].sacrifice(100); }, costStr: function() { return "100 prisms"; } }, { name: "Krumblor, cookie dragon", action: "Train Dragon's Fortune", actionTitle: "Aura : +123% CpS per golden cookie on-screen", pic: 5, cost: function() { return Game.Objects["Chancemaker"].amount >= 100; }, cumuCost: function() { return Game.Objects["Chancemaker"].getPriceSum(0, 100); }, buy: function() { Game.Objects["Chancemaker"].sacrifice(100); }, costStr: function() { return "100 chancemakers"; } }, { name: "Krumblor, cookie dragon", action: "Train Dragon Curve", actionTitle: "Aura : sugar lumps grow 5% faster, 50% weirder", pic: 5, cost: function() { return Game.Objects["Fractal engine"].amount >= 100; }, cumuCost: function() { return Game.Objects["Fractal engine"].getPriceSum(0, 100); }, buy: function() { Game.Objects["Fractal engine"].sacrifice(100); }, costStr: function() { return "100 fractal engines"; } }, { name: "Krumblor, cookie dragon", action: "Bake dragon cookie", actionTitle: "Delicious!", pic: 6, cost: getNumAllObjectsRequireFunc(50), cumuCost: function() { var cumu = 0; for (var i = Game.ObjectsById.length - 1; i >= 0; i--) { cumu += Game.ObjectsById[i].getPriceSum(0, 50); } return cumu; }, buy: function() { for (var i in Game.Objects) { Game.Objects[i].sacrifice(50); } }, costStr: function() { return "50 of every building"; } }, { name: "Krumblor, cookie dragon", action: "Train secondary aura", actionTitle: "Lets you use two dragon auras simultaneously", pic: 7, cost: getNumAllObjectsRequireFunc(200), cumuCost: function() { var cumu = 0; for (var i = Game.ObjectsById.length - 1; i >= 0; i--) { cumu += Game.ObjectsById[i].getPriceSum(0, 200); } return cumu; }, buy: function() { for (var i in Game.Objects) { Game.Objects[i].sacrifice(200); } }, costStr: function() { return "200 of every building"; } }, { name: "Krumblor, cookie dragon", action: "Your dragon is fully trained.", pic: 8 } ]; Game.dragonLevelMax = Game.dragonLevels.length - 1; Game.dragonAuras = [ { name: "No aura", icon: [0, 7], desc: "Select an aura from those your dragon knows." }, { name: "Breath of Milk", icon: [18, 25], desc: "Kittens are 5% more effective." }, { name: "Dragon Cursor", icon: [0, 25], desc: "Clicking is 5% more effective." }, { name: "Elder Battalion", icon: [1, 25], desc: "Grandmas gain +1% CpS for every non-grandma building." }, { name: "Reaper of Fields", icon: [2, 25], desc: "Golden cookies may trigger a Dragon Harvest." }, { name: "Earth Shatterer", icon: [3, 25], desc: "Buildings sell back for 50% instead of 25%." }, { name: "Master of the Armory", icon: [4, 25], desc: "All upgrades are 2% cheaper." }, { name: "Fierce Hoarder", icon: [15, 25], desc: "All buildings are 2% cheaper." }, { name: "Dragon God", icon: [16, 25], desc: "Prestige CpS bonus +5%." }, { name: "Arcane Aura", icon: [17, 25], desc: "Golden cookies appear +5% more often." }, { name: "Dragonflight", icon: [5, 25], desc: "Golden cookies may trigger a Dragonflight." }, { name: "Ancestral Metamorphosis", icon: [6, 25], desc: "Golden cookies give 10% more cookies." }, { name: "Unholy Dominion", icon: [7, 25], desc: "Wrath cookies give 10% more cookies." }, { name: "Epoch Manipulator", icon: [8, 25], desc: "Golden cookies last 5% longer." }, { name: "Mind Over Matter", icon: [13, 25], desc: "Random drops are 25% more common." }, { name: "Radiant Appetite", icon: [14, 25], desc: "All cookie production multiplied by 2." }, { name: "Dragon's Fortune", icon: [19, 25], desc: "+123% CpS per golden cookie on-screen, multiplicative." }, { name: "Dragon's Curve", icon: [20, 25], desc: "+5% sugar lump growth and sugar lumps are twice as likely to be unusual." } ]; Game.dragonAurasByName = {}; for (i = 0; i < Game.dragonAuras.length; i++) { var aura = Game.dragonAuras[i]; aura.id = i; aura.iconCss = Game.getIconCss(aura.icon); aura.$crateNode = $('') .css(aura.iconCss).attr("data-aura", i).appendTo("#auraAvailable"); aura.$crateNode[0].auraObj = aura; Game.dragonAurasByName[aura.name] = aura; } Game.dragonAuras[0].$crateNode.addClass("unlocked"); Game.clearAuraSelection = function() { $("#auraBlock .aura.enabled").removeClass("enabled"); $("#auraAvailableBlock, #switchAuraFree, #switchAuraBuy").addClass("hidden"); Game.$enabledAuraSlot = null; }; byId("tabFamiliar").onTabFunc = Game.clearAuraSelection; addPlusMinusInput("#dragonLevelSpan", "dragonLevelIn", 2, true).maxIn = Game.dragonLevelMax; $("#dragonAction").on("click", function(ev) { var lvl = Game.dragonLevels[Game.dragonLevel]; var altMode = Game.checkEventAltMode(ev); if (Game.dragonLevel < Game.dragonLevelMax && lvl && (altMode || !lvl.cost || lvl.cost())) { if (lvl.buy && !altMode) { lvl.buy(); } Game.setInput("#dragonLevelIn", Game.dragonLevel + 1); Game.scheduleUpdate(); } return false; }); $("#auraCurrent").on("click", ".aura", function() { var $ele = $(this); $ele.siblings().removeClass("enabled"); $ele.toggleClass("enabled"); var isEnabled = $ele.hasClass("enabled"); $("#auraAvailableBlock").toggleClass("hidden", !isEnabled).find(".aura.enabled").removeClass("enabled"); if (isEnabled) { $('#auraAvailable .aura[data-aura="' + this.dataset.aura + '"]').addClass("enabled"); } Game.$enabledAuraSlot = isEnabled ? $ele : null; $("#switchAuraFree, #switchAuraBuy").addClass("hidden"); Game.scheduleUpdate(); }); $("#auraAvailable").on("click", ".aura", function() { var $ele = $(this); var otherId = Game.$enabledAuraSlot ? Game.$enabledAuraSlot.siblings().attr("data-aura") : null; if (!$ele.hasClass("enabled") && Game.$enabledAuraSlot && (otherId < 1 || this.dataset.aura != otherId)) { $ele.siblings().removeClass("enabled"); $ele.addClass("enabled"); Game.scheduleUpdate(); } }); $("#switchAuraCancel").click(Game.clearAuraSelection); $("#switchAuraFree").on("click", function() { var $switchAura = $("#auraAvailable .aura.enabled"); var switchId = $switchAura.attr("data-aura"); var currentId = Game.$enabledAuraSlot ? Game.$enabledAuraSlot.attr("data-aura") : null; if (Game.$enabledAuraSlot && $switchAura.length && currentId != switchId && (switchId < 1 || Game.$enabledAuraSlot.siblings().attr("data-aura") != switchId)) { Game.setAura(Game.$enabledAuraSlot.attr("data-slot"), switchId); Game.clearAuraSelection(); Game.scheduleUpdate(); } }); $("#switchAuraBuy").on("click", function() { var $switchAura = $("#auraAvailable .aura.enabled"); var switchId = $switchAura.attr("data-aura"); var currentId = Game.$enabledAuraSlot ? Game.$enabledAuraSlot.attr("data-aura") : null; if (Game.HighestBuilding && Game.$enabledAuraSlot && $switchAura.length && currentId != switchId && (switchId < 1 || Game.$enabledAuraSlot.siblings().attr("data-aura") != switchId)) { Game.HighestBuilding.sacrifice(1); Game.setAura(Game.$enabledAuraSlot.attr("data-slot"), switchId); Game.clearAuraSelection(); Game.scheduleUpdate(); } }); $("#auraBlock").on("mouseenter", ".crate.aura", function(ev) { if (this.auraObj) { Game.setTooltip({ html: '' + buff.name + '
' + desc + "", refEle: this, isCrate: true }); } ev.stopPropagation(); }); //sets the dragonAura in given slot [0, 1] to aura //aura can be either the id of the aura or the name Game.setAura = function(slot, aura) { var $slotEle = $("#auraSlot" + slot); var auraObj = Game.dragonAuras[aura] || Game.dragonAurasByName[aura]; var slotKey = slot == 1 ? "dragonAura2" : "dragonAura"; var otherSlotKey = slot == 1 ? "dragonAura" : "dragonAura2"; if (auraObj && $slotEle.length && (auraObj.id < 1 || Game[otherSlotKey] != auraObj.id)) { Game[slotKey] = auraObj.id; $slotEle.css(auraObj.iconCss).attr("data-aura", auraObj.id); $slotEle[0].auraObj = auraObj; } }; Game.setAura(0, Game.dragonAura); Game.setAura(1, Game.dragonAura2); Game.clearAuraSelection(); //#endregion Dragon Auras //Game.initMinigames(); //#region event handlers and stuff Game.registerInputs(Game, [ ["#heraldsIn", "heralds"], ["#lumpsIn", "lumps"], ["#dragonLevelIn", "dragonLevel"], ["#numGoldenCookiesIn", "numGoldenCookies"], ["#prestigeIn", "prestige"], ["#sessionStartTime", "startDate"] ]); Game.setTab = function(tab, toggle) { var $tab = $(tab); tab = $tab[0]; if (!tab || !$tab.is(".tabs > .tab")) { return; } var par = tab.parentNode; var $par = $(par); var isCurrent = $tab.hasClass("tabCurrent"); var index = $par.find(".tab").removeClass("tabCurrent").index(tab); $tab.toggleClass("tabCurrent", typeof toggle === "boolean" ? toggle : !$par.hasClass("toggleTabs") || !isCurrent); $("#" + par.dataset.tabblocks).find(".tabBlock").addClass("hidden").eq(index).toggleClass("hidden", !$tab.hasClass("tabCurrent")); if (tab.onTabFunc) { tab.onTabFunc(); } if (par.onTabFunc) { par.onTabFunc(); } }; $(".tabBlock").addClass("hidden"); $(".tabs[data-tabblocks]").each(function() { var $t = $(this); var $tabs = $t.children(".tab"); var $current = $tabs.filter(".tabCurrent").first(); var found = $current.length; if (!found) { $current = $tabs.first(); } Game.setTab($current, Boolean(!$t.hasClass("toggleTabs") || found)); }); Game.BakeryNamePrefixes = [ "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" ]; Game.BakeryNameSuffixes = [ "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" ]; Game.RandomBakeryName = function() { return (Math.random() > 0.05 ? (Game.choose(Game.BakeryNamePrefixes) + " ") : "Mc") + Game.choose(Game.BakeryNameSuffixes); }; var name = Game.RandomBakeryName(); Game.bakeryName = name; Game.bakeryNameLowerCase = name.toLowerCase(); $("#bakeryNameIn").val(Game.bakeryName).on("input", function() { var name = this.value.replace(/\W+/g, " ").substring(0, 28); var prevLower = Game.bakeryNameLowerCase; if (name !== Game.bakeryName) { Game.bakeryName = name; Game.bakeryNameLowerCase = name.toLowerCase(); if (Game.bakeryNameLowerCase !== prevLower && (Game.bakeryNameLowerCase === "orteil" || Game.bakeryNameLowerCase === "ortiel" || prevLower === "orteil" || prevLower === "ortiel")) { Game.scheduleUpdate(); } } return false; }).blur(function() { this.value = Game.bakeryName; }); $("#randomBakeryName").on("click", function() { var name = Game.RandomBakeryName(); byId("bakeryNameIn").value = name; var prevLower = Game.bakeryNameLowerCase; Game.bakeryName = name; Game.bakeryNameLowerCase = name.toLowerCase(); if (prevLower === "orteil" || prevLower === "ortiel") { Game.scheduleUpdate(); } return false; }); $("#recalcButton").on("click", function() { Game.scheduleUpdate(); }); $("select.recalc").change(function() { Game.scheduleUpdate(); return false; }); $("#importSave").on("click", function() { Game.importSave(); }); $("#reimportSave").on("click", function() { Game.importSave(Game.storedImport); }); byId("abbrCheck").clickFunc = function() { localStorage.setItem("CCalc.AbbreviateNums", this.checked ? 1 : ""); Game.abbrOn = this.checked; for (var i = Game.UpgradesById.length - 1; i >= 0; i--) { Game.UpgradesById[i].setCurrentDescription(); this.statsStr = null; } for (i = Game.AchievementsById.length - 1; i >= 0; i--) { Game.AchievementsById[i].setCurrentDescription(); } $(".exp").each(function() { Game.setInput(this); }); if (typeof Game.updateTooltip === "function") { Game.updateTooltip(); } }; $("#bankSpan").on("click", 'input[name="bank"]', function() { localStorage.setItem("CCalc.ShowBank", document.querySelector('[name="bank"]:checked').id); Game.updateRecommended(); }); $("#quantitySpan").on("click", 'input[name="quantity"]', function() { localStorage.setItem("CCalc.BuildQuantity", document.querySelector('[name="quantity"]:checked').id); Game.scheduleUpdate(); }); ele = byId("clicksPsIn"); ele.maxIn = Game.maxClicksPs; ele.focusFunc = function() { var val = this.value; if (val.length > this.getAttribute("maxlength") && val.slice(0, 2) === "0.") { this.value = val.slice(1); } }; ele.checkFunc = function() { localStorage.setItem("CCalc.Clicks", this.parsedValue); Game.scheduleUpdate(); }; Game.setInput("#sessionStartTime", Game.startDate); ele = byId("heraldsIn"); ele.maxIn = 100; byId("heraldsInLabel").setTitleFunc = function() { var str = ""; if (Game.heralds === 0) { str += 'There are no heralds at the moment. Please consider donating to DashNet\'s Patreon!'; } else { str += (Game.heralds === 1 ? '1 herald is' : '' + Game.heralds + " heralds are") + ' selflessly inspiring a boost in production for everyone, resulting in' + this.auraObj.name + "
" + '' + this.auraObj.desc + "
+' + Game.heralds + "% cookies per second." + ''; if (Game.ascensionMode == 1) { str += "You are in a Born again run, and are not currently benefiting from heralds."; } else if (Game.HasUpgrade("Heralds")) { str += "You own the Heralds upgrade, and therefore benefit from the production boost."; } else { str += "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 += 'Heralds are people who have donated to DashNet\'s 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.'; str += ''; this.dataset.title = '"; }; twinInputs("#prestigeIn", "#prestigeCurrentIn"); byId("buildTableTabs").onTabFunc = function() { $("#sellCheckSpan").toggleClass("hidden", !$("#buildTableTabPrice").hasClass("tabCurrent")); }; byId("sellCheck").clickFunc = function() { $("#buildPriceTable").toggleClass("hideSell", !this.checked); }; byId("buildChainMaxSpan").dataset.title = "Checks up to this many buildings ahead for the purchase of certain upgrades " + "and their required buildings.\n0 to disable. -1 for unlimited."; byId("buildChainMax").minIn = -1; addPlusMinusInput("#numWrinklersInSpan", "numWrinklersIn", 2, true).maxIn = Game.maxWrinklers; addPlusMinusInput("#numGoldenCookiesInSpan", "numGoldenCookiesIn", 4, true); $("#setCookiesBakedSpan").on("click", function() { if (Game.minCumulative > byId("cookiesBaked").parsedValue) { Game.setInput("#cookiesBaked", Game.minCumulative); Game.scheduleUpdate(); } return false; }); $("#setPrestigeSpan").on("click", function() { Game.setInput("#prestigeIn", Math.floor(Game.HowMuchPrestige(byId("cookiesReset").parsedValue))); Game.scheduleUpdate(); }); $("#setCookiesResetSpan").on("click", function() { Game.setInput("#cookiesReset", byId("setCookiesResetNum").setValue); Game.scheduleUpdate(); }); addPlusMinusInput("#seasonCountSpan", "seasonCountIn", true); Game.registerInput("#seasonCountIn", Game, "seasonUses"); $(".lockCheckSpan").html(' Toggle locks on click') .attr("data-title", "Ctrl-, alt-, and/or shift-click to do the opposite.") .find(".lockChecker").on("click", function(ev) { Game.lockChecked = this.checked; $(".lockChecker").prop("checked", Game.lockChecked); ev.stopPropagation(); }); $("#upgradeEnableShown").on("click", function() { $("#upgradeIcons .upgrade:not(.hidden)").each(function() { var upgrade = this.objTie; if (upgrade.pool !== "debug" && upgrade.pool !== "toggle") { upgrade.setBought(true); } }); Game.scheduleUpdate(); }); $("#upgradeEnableAll").on("click", function() { for (var i = Game.UpgradesById.length - 1; i >= 0; i--) { var upgrade = Game.UpgradesById[i]; if (upgrade.pool !== "debug" && upgrade.pool !== "toggle") { upgrade.setBought(true); } } Game.scheduleUpdate(); }); $("#upgradeDisableShown").on("click", function() { $("#upgradeIcons .upgrade:not(.hidden)").each(function() { var upgrade = this.objTie; if (upgrade.pool !== "debug" && upgrade.pool !== "toggle") { upgrade.setBought(false); } }); Game.scheduleUpdate(); }); $("#upgradeDisableAll").on("click", function() { for (var i = Game.UpgradesById.length - 1; i >= 0; i--) { var upgrade = Game.UpgradesById[i]; if (upgrade.pool !== "debug" && upgrade.pool !== "toggle") { upgrade.setBought(false); } } Game.scheduleUpdate(); }); $("#sortUpgrades").on("click", function() { // Game.sortAndFilterUpgrades(); // Have to reupdate to make sure it's correct with sorting/filtering on recommended. Probably something or other with predictiveMode // that's not completely cleared. I saw ant larvae in the recommended filter despite not even having it, so something's screwy somewhere Game.scheduleUpdate(); }); $("#setAchFilter").on("click", function() { Game.filterAchievements(); }); //would love to only set .won if !.require() so game doesn't have to re-award achs //but as usual cps achievements make life difficult $("#achReset").on("click", function() { for (var i = Game.AchievementsById.length - 1; i >= 0; i--) { var achievement = Game.AchievementsById[i]; if (achievement.require) { achievement.won = false; } } Game.scheduleUpdate(); }); //same as above $("#achDisableAll").on("click", function() { for (var i = Game.AchievementsById.length - 1; i >= 0; i--) { Game.AchievementsById[i].won = false; } Game.scheduleUpdate(); }); $("#achEnableAll").on("click", function() { for (var i = Game.AchievementsById.length - 1; i >= 0; i--) { var achieve = Game.AchievementsById[i]; if (achieve.pool !== "dungeon") { achieve.won = true; } } Game.scheduleUpdate(); }); byId("blackCheckAll").clickFunc = function() { $("#blacklistEles .blacklistEle:not(.hidden) input").prop("checked", this.checked); }; $("#blackClear").on("click", function() { var eles = $("#blacklistEles .blacklistEle.strike input"); if (eles.length) { eles.prop("checked", false); Game.scheduleUpdate(); } }); $("input:not([type])").attr("type", "text"); $('input[type="text"]:not(.text)').each(function() { if (!this.maxIn && this.hasAttribute("maxlength")) { this.maxIn = Math.pow(10, this.getAttribute("maxlength")) - 1; } if (!this.placeholder) { this.placeholder = Math.max(this.minIn, 0) || 0; } Game.setInput(this, this.value); }); $('input[type="checkbox"]').each(function() { this.manualChecked = this.checked; }); var workingIndex = 2; $("input, select, textarea, a[href]").each(function() { if (this.tabIndex) { workingIndex = Math.max(workingIndex, this.tabIndex + 1); } else { this.tabIndex = workingIndex; } }); $("#gCookiesTable tbody").on("click", "td:nth-child(n + 2):not(.noSel)", function() { var cell = Game.getGCCellFrenzyIndeces(this).join(","); var listIndex = Game.gcSelectedCells.indexOf(cell); if (listIndex > -1) { Game.gcSelectedCells.splice(listIndex, 1); } else { Game.gcSelectedCells.push(cell); } Game.updateGoldenCookiesDetails(); }); $("#gCookiesDetails").on("click", ".close", function() { if (this.gcIndex) { var listIndex = Game.gcSelectedCells.indexOf(this.gcIndex); if (listIndex > -1) { Game.gcSelectedCells.splice(listIndex, 1); Game.updateGoldenCookiesDetails(); } } }); $("#gcClearSelected").on("click", function() { Game.gcSelectedCells = []; Game.updateGoldenCookiesDetails(); }); $("#recommendedList").on("click", ".recPurchase", function(ev) { var recObj = this.recommendObj; if (!recObj) { return false; } var altMode = Game.altMode || Game.checkEventAltMode(ev); if (recObj.type === "upgrade chain") { if (Game.altMode) { recObj.buy(); } else { recObj.building.buy(Math.max(recObj.toAmount - recObj.building.amount, 0)); recObj.gameObj.buy(); } } else if (recObj.gameObj && recObj.gameObj.buy) { recObj.gameObj.buy(altMode ? 1 : recObj.toAmount - recObj.gameObj.amount); } Game.clearTooltip(); Game.scheduleUpdate(1, function() { if (!Game.HasUpgrade("Century egg") && Game.cookiesPsPlusClicks !== recObj.cpsObj.cookiesPsPlusClicks) { console.error("CpS mismatch!", Game.cookiesPsPlusClicks, recObj.cpsObj.cookiesPsPlusClicks, recObj); } }); }).on("mouseenter", ".earnedAchsSpan", function(ev) { var recObj = this.parentNode.recommendObj; if (!recObj || !recObj.earnedAchs || !recObj.earnedAchs.length) { return false; } if (!this.tooltipHtml) { var str = ""; for (var i = 0; i < recObj.earnedAchs.length; i++) { str += "Heralds
' + str + "" + recObj.earnedAchs[i].iconName + ""; } this.tooltipHtml = '' + str.replace(""; } Game.setTooltip({ html: this.tooltipHtml, refEle: this }); //, position: 'below' ev.stopPropagation(); }); $("#nextResearchSpan").on("click", function() { if (Game.nextTech) { Game.nextTech.setUnlocked(true); Game.scheduleUpdate(); } }); var getTooltipUpdateFunc = function(update) { if (this.objTie && this.objTie.getTooltip) { this.objTie.getTooltip(this, update); } }; var updateTitle = function(update) { if (this.setTitleFunc) { this.setTitleFunc(); } if (this.dataset.title || this.tooltipHTML) { Game.setTooltip({ html: '
", "") + "' + (this.dataset.title || this.tooltipHTML) + "", refEle: this, isCrate: $(this).hasClass("crate") }, update); } else { Game.clearTooltip(); } }; $(/*document.forms[0]*/null).on("mouseenter", ".buildingRow .name, .crate, #nextResearchSpan", function() { if (this.objTie && this.objTie.getTooltip) { this.objTie.getTooltip(this); Game.updateTooltip = getTooltipUpdateFunc.bind(this); } }).on("mouseenter", "[data-title]", function() { var fn = updateTitle.bind(this); fn(); Game.updateTooltip = fn; Game.tooltipAnchor = this; }).on("mouseleave", ".buildingRow .name, .crate, [data-title], .tooltipped", function() { Game.clearTooltip(); }).on("input", 'input[type="text"]:not(.text)', function() { var val = Game.parseNumber(this.value, this.minIn, this.maxIn, !$(this).hasClass("deci")); if (val !== this.parsedValue && (!this.inputfn || this.inputFn(val))) { Game.setInput(this, val); if (this.checkFunc) { this.checkFunc(); } else { Game.scheduleUpdate(); } } }).on("focusout", 'input[type="text"]:not(.text)', function() { this.value = this.displayValue || this.parsedValue; }).on("focusin", 'input[type="text"]:not(.text)', function() { if (this.value !== String(this.parsedValue)) { this.value = this.parsedValue; } if (this.focusFunc) { this.focusFunc(); } }).on("click", 'input[type="checkbox"]', function() { this.manualChecked = this.checked; if (this.clickFunc) { this.clickFunc(); } Game.scheduleUpdate(); }).on("click", ".plusminusCheck", function() { Game.scheduleUpdate(); }).on("click", ".plusminus", function(ev) { if (this.plusminusIn.disabled) { return; } var amount = 1; if (!$(this).hasClass("limited")) { if (ev.ctrlKey ^ byId("plusminus10").checked) { amount = 10; } if (ev.shiftKey ^ byId("plusminus100").checked) { amount = 100; } } var prevVal = this.plusminusIn.parsedValue; var newVal = Game.setInput(this.plusminusIn, prevVal + amount * this.plusminusMode); if (prevVal !== newVal) { if (this.plusminusIn.checkFunc) { this.plusminusIn.checkFunc(); } else { Game.scheduleUpdate(); } } }).on("click", ".crate.upgrade", function(ev) { var upgrade = this.objTie; if (!upgrade || upgrade.type !== "upgrade") { return; } var lock = Game.lockChecked ^ Game.checkEventAltMode(ev); if (upgrade.noBuy || lock) { upgrade.unlocked = !upgrade.unlocked; } else { if (upgrade.toggleInto) { Game.clearTooltip(); } var wasBought = upgrade.bought; upgrade.setBought(); if (upgrade.buyFunc) { upgrade.buyFunc(wasBought); } } Game.scheduleUpdate(); }).on("click", ".achievement", function() { var achieve = this.objTie; if (!achieve || achieve.type !== "achievement") { return; } achieve.setWon(); Game.scheduleUpdate(); }).on("click", ".setDesired", function() { if (!this.objTie || this.objTie.type !== "building") { return; } var val = this.objTie.amountInDesired.parsedValue; var newVal = Game.setInput(this.objTie.amountInDesired, this.objTie.amountInCurrent.parsedValue); if (val !== newVal) { Game.scheduleUpdate(); } }); foolsNameCheck.clickFunc = function() { Game.setObjectDisplays(); }; //#endregion event handlers and stuff // debug autosettings // byId("tabGarden").click(); Game.setSeason(Game.defaultSeason); Game.update(); Game.firstRun = false; $("form").removeClass("hidden"); $("#load").addClass("hidden"); }; })(myWindow, jQuery); (function(window, $) { "use strict"; var Game = window.Game; var byId = window.byId; Game.initMinigames = function() { var i, j; var iconCssReset = { backgroundPosition: "", backgroundImage: "" }; //#region Pantheon var M = Game.pantheon; M.parent = Game.Objects["Temple"]; M.parent.minigame = M; M.gods = { "asceticism": { name: "Holobore, Spirit of Asceticism", icon: [21, 18], desc1: '+15% base CpS.', desc2: '+10% base CpS.', desc3: '+5% base CpS.', descAfter: 'If a golden cookie is clicked, this spirit is unslotted and all worship swaps will be used up.', quote: "An immortal life spent focusing on the inner self, away from the distractions of material wealth.", }, "decadence": { name: "Vomitrax, Spirit of Decadence", icon: [22, 18], desc1: 'Golden and wrath cookie effect duration +7%, but buildings grant -7% CpS.', desc2: 'Golden and wrath cookie effect duration +5%, but buildings grant -5% CpS.', desc3: 'Golden and wrath cookie effect duration +2%, but buildings grant -2% CpS.', quote: "This sleazy spirit revels in the lust for quick easy gain and contempt for the value of steady work.", }, "ruin": { name: "Godzamok, Spirit of Ruin", icon: [23, 18], descBefore: 'Selling buildings triggers a buff boosted by how many buildings were sold.', desc1: 'Buff boosts clicks by +1% for every building sold for 10 seconds.', desc2: 'Buff boosts clicks by +0.5% for every building sold for 10 seconds.', desc3: 'Buff boosts clicks by +0.25% for every building sold for 10 seconds.', quote: "The embodiment of natural disasters. An impenetrable motive drives the devastation caused by this spirit.", }, "ages": { name: "Cyclius, Spirit of Ages", icon: [24, 18], activeDescFunc: function() { var now = Date.now(); var godLvl = Game.hasGod("ages"); var mult = 1; if (godLvl == 1) { mult *= 0.15 * Math.sin((now / 1000 / (60 * 60 * 3)) * Math.PI * 2); } else if (godLvl == 2) { mult *= 0.15 * Math.sin((now / 1000 / (60 * 60 * 12)) * Math.PI * 2); } else if (godLvl == 3) { mult *= 0.15 * Math.sin((now / 1000 / (60 * 60 * 24)) * Math.PI * 2); } return "Current bonus : " + (mult < 0 ? "-" : "+") + Game.Beautify(Math.abs(mult) * 100, 2) + "%."; }, descBefore: 'CpS bonus fluctuating between +15% and -15% over time.', desc1: "Effect cycles over 3 hours.", desc2: "Effect cycles over 12 hours.", desc3: "Effect cycles over 24 hours.", quote: "This spirit knows about everything you'll ever do, and enjoys dispensing a harsh judgement.", }, "seasons": { name: "Selebrak, Spirit of Festivities", icon: [25, 18], descBefore: 'Some seasonal effects are boosted.', desc1: 'Large boost. Switching seasons is 100% pricier.', desc2: 'Medium boost. Switching seasons is 50% pricier.', desc3: 'Small boost. Switching seasons is 25% pricier.', quote: "This is the spirit of merry getaways and regretful Monday mornings.", }, "creation": { name: "Dotjeiess, Spirit of Creation", icon: [26, 18], desc1: 'Buildings are 7% cheaper, but heavenly chips have 30% less effect.', desc2: 'Buildings are 5% cheaper, but heavenly chips have 20% less effect.', desc3: 'Buildings are 2% cheaper, but heavenly chips have 10% less effect.', quote: "All things that be and ever will be were scripted long ago by this spirit's inscrutable tendrils.", }, "labor": { name: "Muridal, Spirit of Labor", icon: [27, 18], desc1: "Clicks are 15% more powerful, but buildings produce 3% less.", desc2: "Clicks are 10% more powerful, but buildings produce 2% less.", desc3: "Clicks are 5% more powerful, but buildings produce 1% less.", quote: "This spirit enjoys a good cheese after a day of hard work.", }, "industry": { name: "Jeremy, Spirit of Industry", icon: [28, 18], desc1: 'Buildings produce 10% more cookies, but golden and wrath cookies appear 10% less.', desc2: 'Buildings produce 6% more cookies, but golden and wrath cookies appear 6% less.', desc3: 'Buildings produce 3% more cookies, but golden and wrath cookies appear 3% less.', quote: "While this spirit has many regrets, helping you rule the world through constant industrialization is not one of them.", }, "mother": { name: "Mokalsium, Mother Spirit", icon: [29, 18], desc1: 'Milk is 10% more powerful, but golden and wrath cookies appear 15% less.', desc2: 'Milk is 5% more powerful, but golden and wrath cookies appear 10% less.', desc3: 'Milk is 3% more powerful, but golden and wrath cookies appear 5% less.', quote: "A caring spirit said to contain itself, inwards infinitely.", }, "scorn": { name: "Skruuia, Spirit of Scorn", icon: [21, 19], descBefore: 'All golden cookies are wrath cookies with a greater chance of a negative effect.', desc1: 'Wrinklers appear 150% faster and digest 15% more cookies.', desc2: 'Wrinklers appear 100% faster and digest 10% more cookies.', desc3: 'Wrinklers appear 50% faster and digest 5% more cookies.', quote: "This spirit enjoys poking foul beasts and watching them squirm, but has no love for its own family.", }, "order": { name: "Rigidel, Spirit of Order", icon: [22, 19], activeDescFunc: function() { if (Game.BuildingsOwned % 10 == 0) { return "Buildings owned : " + Game.Beautify(Game.BuildingsOwned) + ".
Effect is active."; } else { return "Buildings owned : " + Game.Beautify(Game.BuildingsOwned) + ".
Effect is inactive."; } }, desc1: 'Sugar lumps ripen an hour sooner.', desc2: 'Sugar lumps ripen 40 minutes sooner.', desc3: 'Sugar lumps ripen 20 minutes sooner.', descAfter: 'Effect is only active when your total amount of buildings ends with 0.', quote: "You will find that life gets just a little bit sweeter if you can motivate this spirit with tidy numbers and properly-filled tax returns.", }, }; var n = 0; for (var key in M.gods) { var godObj = M.gods[key]; godObj.id = n; godObj.key = key; godObj.slot = -1; godObj.iconCss = Game.getIconCss(godObj.icon); godObj.iconCssStr = Game.getIconCssStr(godObj.iconCss); M.godsById[n] = godObj; n++; } //programmatic because space between elements *sigh* for (i = 0; i < 3; i++) { $('' + '' + '').appendTo("#pantheonSlots"); } for (var name in M.gods) { godObj = M.gods[name]; godObj.$ele = $('').appendTo( "#pantheonAvailable"); godObj.$iconEle = $('') .css(godObj.iconCss).appendTo(godObj.$ele); } Game.updatePantheonSelection = function() { var $godSlotSel = $("#pantheonSlots .templeGod.selected"); var $godSel = $("#pantheonAvailable .templeGod.selected"); var slotId = -1; var slottedGod = -1; var godId = -1; if ($godSlotSel.length === 1) { slotId = $godSlotSel.attr("data-slot"); slottedGod = $godSlotSel.attr("data-god"); } if ($godSel.length === 1) { godId = $godSel.attr("data-id"); } $("#pantheonClearSelection").toggleClass("hidden", slotId == -1 && godId == -1); $("#pantheonSetGod").toggleClass("hidden", slotId == -1 || godId == -1 || (slottedGod != -1 && slottedGod == godId)); $("#pantheonClearSlot").toggleClass("hidden", slotId == -1 || slottedGod == -1); }; Game.clearPantheonSelection = function() { $("#pantheonBlock .templeGod.selected").removeClass("selected"); Game.updatePantheonSelection(); }; byId("tabMinigames").onTabFunc = Game.clearPantheonSelection; Game.slotGodById = function(godId, slotId) { var godObj = Game.pantheon.godsById[godId]; return Game.slotGod(godObj, slotId); }; Game.slotGod = function(godObj, slotId) { if (godObj && godObj.key in Game.pantheon.gods && slotId in Game.pantheon.slot) { Game.clearGodSlot(slotId); Game.pantheon.slot[slotId] = godObj.id; godObj.slot = Number(slotId); godObj.$ele.addClass("hidden"); $("#pantheonSlot" + slotId).attr("data-god", godObj.id); $("#pantheonSlot" + slotId + "Icon").css(godObj.iconCss).removeClass("hidden"); } }; Game.forceUnslotGod = function(godKey) { var godObj = M.gods[godKey]; if (godObj && godObj.key in Game.pantheon.gods) { godObj.slot = -1; godObj.$ele.removeClass("hidden"); Game.clearGodSlot(godObj.slot); } }; Game.clearGodSlot = function(slotId) { if (slotId in Game.pantheon.slot) { var godObj = Game.pantheon.godsById[Game.pantheon.slot[slotId]]; if (godObj) { godObj.slot = -1; godObj.$ele.removeClass("hidden"); } Game.pantheon.slot[slotId] = -1; $("#pantheonSlot" + slotId).attr("data-god", -1); $("#pantheonSlot" + slotId + "Icon").css(iconCssReset).addClass("hidden"); } }; $("#pantheonBlock").on("click", ".templeGod", function() { var $ele = $(this); $ele.siblings().removeClass("selected"); $ele.toggleClass("selected"); Game.updatePantheonSelection(); return false; }).on("mouseenter", ".templeGod", function(event) { var godObj = Game.pantheon.godsById[this.dataset.god]; if (godObj) { Game.setTooltip({ html: '' + '' + '", refEle: this }); } event.stopPropagation(); }); $("#pantheonClearSelection").click(Game.clearPantheonSelection); $("#pantheonClearSlot").on("click", function() { Game.clearGodSlot($("#pantheonSlots .templeGod.selected").attr("data-slot")); Game.clearPantheonSelection(); Game.scheduleUpdate(); }); $("#pantheonSetGod").on("click", function() { var $godSlotSel = $("#pantheonSlots .templeGod.selected"); var $godSel = $("#pantheonAvailable .templeGod.selected"); var slotId = -1; var slottedGod = -1; var godId = -1; if ($godSlotSel.length === 1) { slotId = $godSlotSel.attr("data-slot"); slottedGod = $godSlotSel.attr("data-god"); } if ($godSel.length === 1) { godId = $godSel.attr("data-god"); } if (slotId != -1 && godId != -1 && slottedGod !== godId) { Game.slotGodById(godId, slotId); Game.clearPantheonSelection(); Game.scheduleUpdate(); } else { Game.updatePantheonSelection(); } }); M.reset = function() { for (var i = 0; i < 3; i++) { Game.clearGodSlot(i); } }; M.load = function(str) { if (!str) { return false; } var pantheonSlots = [-1, -1, -1]; var ids = (str.split(" ")[0] || "").split("/"); for (var j = 0; j < 3; j++) { pantheonSlots[j] = ids[j] || -1; } for (var i = 0; i < 3; i++) { Game.slotGodById(pantheonSlots[i], i); } }; //#endregion Pantheon //#region Garden M = Game.garden; M.parent = Game.Objects["Farm"]; M.parent.minigame = M; M.toggleFreeze = function(toggle) { if (typeof toggle === "undefined") { toggle = !this.freeze; } this.freeze = Boolean(toggle); $("#gardenFreezeTool").toggleClass("on", this.freeze); return this.freeze; }; M.plants = { "bakerWheat": { name: "Baker's wheat", icon: 0, cost: 1, costM: 30, ageTick: 7, ageTickR: 2, mature: 35, children: ["bakerWheat", "thumbcorn", "cronerice", "bakeberry", "clover", "goldenClover", "chocoroot", "tidygrass"], effsStr: "' + godObj.name + "" + 'Effects :' + (godObj.slot > -1 && godObj.activeDescFunc ? ('' + godObj.activeDescFunc() + "") : "") + (godObj.descBefore ? ('' + godObj.descBefore + "") : "") + (godObj.desc1 ? ('' + godObj.desc1 + "") : "") + (godObj.desc2 ? ('' + godObj.desc2 + "") : "") + (godObj.desc3 ? ('' + godObj.desc3 + "") : "") + (godObj.descAfter ? ('' + godObj.descAfter + "") : "") + (godObj.quote ? ("" + godObj.quote + "") : "") + "• +1% CpS", defaultUnlocked: true, q: "A plentiful crop whose hardy grain is used to make flour for pastries." }, "thumbcorn": { name: "Thumbcorn", icon: 1, cost: 5, costM: 100, ageTick: 6, ageTickR: 2, mature: 20, children: ["bakerWheat", "cronerice", "gildmillet", "glovemorel"], effsStr: "• +2% cookies per click", q: "A strangely-shaped variant of corn. The amount of strands that can sprout from one seed is usually in the single digits." }, "cronerice": { name: "Cronerice", icon: 2, cost: 15, costM: 250, ageTick: 0.4, ageTickR: 0.7, mature: 70, children: ["thumbcorn", "gildmillet", "elderwort", "wardlichen"], effsStr: "• +3% grandma CpS", q: "Not only does this wrinkly bulb look nothing like rice, it's not even related to it either; its closest extant relative is the weeping willow." }, "gildmillet": { name: "Gildmillet", icon: 3, cost: 15, costM: 1500, ageTick: 2, ageTickR: 1.5, mature: 40, children: ["clover", "goldenClover", "shimmerlily"], effsStr: "• +1% golden cookie gains• +0.1% golden cookie effect duration", q: "An ancient staple crop, famed for its golden sheen. Was once used to bake birthday cakes for kings and queens of old." }, "clover": { name: "Ordinary clover", icon: 4, cost: 25, costM: 77777, ageTick: 1, ageTickR: 1.5, mature: 35, children: ["goldenClover", "greenRot", "shimmerlily"], effsStr: "• +1% golden cookie frequency", q: "Trifolium repens, a fairly mundane variety of clover with a tendency to produce four leaves. Such instances are considered lucky by some." }, "goldenClover": { name: "Golden clover", icon: 5, cost: 125, costM: 777777777777, ageTick: 4, ageTickR: 12, mature: 50, children: [], effsStr: "• +3% golden cookie frequency", q: "A variant of the ordinary clover that traded its chlorophyll for pure organic gold. Tragically short-lived, this herb is an evolutionary dead-end - but at least it looks pretty." }, "shimmerlily": { name: "Shimmerlily", icon: 6, cost: 60, costM: 777777, ageTick: 5, ageTickR: 6, mature: 70, children: ["elderwort", "whiskerbloom", "chimerose", "cheapcap"], effsStr: "• +1% golden cookie gains• +1% golden cookie frequency• +1% random drops", q: "These little flowers are easiest to find at dawn, as the sunlight refracting in dew drops draws attention to their pure-white petals." }, "elderwort": { name: "Elderwort", icon: 7, cost: 180, costM: 100000000, ageTick: 0.3, ageTickR: 0.5, mature: 90, immortal: 1, noContam: true, detailsStr: "Immortal", children: ["everdaisy", "ichorpuff", "shriekbulb"], effsStr: "• +1% wrath cookie gains• +1% wrath cookie frequency• +1% grandma CpS• immortal• surrounding plants (3x3) age 3% faster", q: "A very old, long-forgotten subspecies of edelweiss that emits a strange, heady scent. There is some anecdotal evidence that these do not undergo molecular aging." }, "bakeberry": { name: "Bakeberry", icon: 8, cost: 45, costM: 100000000, ageTick: 1, ageTickR: 1, mature: 50, children: ["queenbeet"], harvestBonus: [30 * 60, 0.03], effsStr: "• +1% CpS• harvest when mature for +30 minutes of CpS (max. 3% of bank)", q: "A favorite among cooks, this large berry has a crunchy brown exterior and a creamy red center. Excellent in pies or chicken stews." }, "chocoroot": { name: "Chocoroot", icon: 9, cost: 15, costM: 100000, ageTick: 4, ageTickR: 0, mature: 25, detailsStr: "Predictable growth", children: ["whiteChocoroot", "drowsyfern", "queenbeet"], harvestBonus: [3 * 60, 0.03], effsStr: "• +1% CpS• harvest when mature for +3 minutes of CpS (max. 3% of bank)• predictable growth", q: "A tangly bramble coated in a sticky, sweet substance. Unknown genetic ancestry. Children often pick these from fields as-is as a snack." }, "whiteChocoroot": { name: "White chocoroot", icon: 10, cost: 15, costM: 100000, ageTick: 4, ageTickR: 0, mature: 25, detailsStr: "Predictable growth", children: ["whiskerbloom", "tidygrass"], harvestBonus: [3 * 60, 0.03], effsStr: "• +1% golden cookie gains• harvest when mature for +3 minutes of CpS (max. 3% of bank)• predictable growth", q: "A pale, even sweeter variant of the chocoroot. Often impedes travelers with its twisty branches." }, "whiteMildew": { name: "White mildew", fungus: true, icon: 26, cost: 20, costM: 9999, ageTick: 8, ageTickR: 12, mature: 70, detailsStr: "Spreads easily", children: ["brownMold", "whiteChocoroot", "wardlichen", "greenRot"], effsStr: "• +1% CpS• may spread as brown mold", q: "A common rot that infests shady plots of earth. Grows in little creamy capsules. Smells sweet, but sadly wilts quickly." }, "brownMold": { name: "Brown mold", fungus: true, icon: 27, cost: 20, costM: 9999, ageTick: 8, ageTickR: 12, mature: 70, detailsStr: "Spreads easily", children: ["whiteMildew", "chocoroot", "keenmoss", "wrinklegill"], effsStr: "• -1% CpS• may spread as white mildew", q: "A common rot that infests shady plots of earth. Grows in odd reddish clumps. Smells bitter, but thankfully wilts quickly." }, "meddleweed": { name: "Meddleweed", weed: true, icon: 29, cost: 1, costM: 10, ageTick: 10, ageTickR: 6, mature: 50, contam: 0.05, detailsStr: "Grows in empty tiles, spreads easily", children: ["meddleweed", "brownMold", "crumbspore"], effsStr: "• useless• may overtake nearby plants• may sometimes drop spores when uprooted", q: "The sign of a neglected farmland, this annoying weed spawns from unused dirt and may sometimes spread to other plants, killing them in the process." }, "whiskerbloom": { name: "Whiskerbloom", icon: 11, cost: 20, costM: 1000000, ageTick: 2, ageTickR: 2, mature: 60, children: ["chimerose", "nursetulip"], effsStr: "• +0.2% effects from milk", q: "Squeezing the translucent pods makes them excrete a milky liquid, while producing a faint squeak akin to a cat's meow." }, "chimerose": { name: "Chimerose", icon: 12, cost: 15, costM: 242424, ageTick: 1, ageTickR: 1.5, mature: 30, children: ["chimerose"], effsStr: "• +1% reindeer gains• +1% reindeer frequency", q: "Originating in the greener flanks of polar mountains, this beautiful flower with golden accents is fragrant enough to make any room feel a little bit more festive." }, "nursetulip": { name: "Nursetulip", icon: 13, cost: 40, costM: 1000000000, ageTick: 0.5, ageTickR: 2, mature: 60, children: [], effsStr: "• surrounding plants (3x3) are 20% more efficient• -2% CpS", q: "This flower grows an intricate root network that distributes nutrients throughout the surrounding soil. The reason for this seemingly altruistic behavior is still unknown." }, "drowsyfern": { name: "Drowsyfern", icon: 14, cost: 90, costM: 100000, ageTick: 0.05, ageTickR: 0.1, mature: 30, children: [], effsStr: "• +3% CpS• -5% cookies per click• -10% golden cookie frequency", q: "Traditionally used to brew a tea that guarantees a good night of sleep." }, "wardlichen": { name: "Wardlichen", icon: 15, cost: 10, costM: 10000, ageTick: 5, ageTickR: 4, mature: 65, children: ["wardlichen"], effsStr: "• 2% less wrath cookies• wrinklers spawn 15% slower", q: "The metallic stench that emanates from this organism has been known to keep insects and slugs away." }, "keenmoss": { name: "Keenmoss", icon: 16, cost: 50, costM: 1000000, ageTick: 4, ageTickR: 5, mature: 65, children: ["drowsyfern", "wardlichen", "keenmoss"], effsStr: "• +3% random drops", q: "Fuzzy to the touch and of a vibrant green. In plant symbolism, keenmoss is associated with good luck for finding lost objects." }, "queenbeet": { name: "Queenbeet", icon: 17, cost: 90, costM: 1000000000, ageTick: 1, ageTickR: 0.4, mature: 80, noContam: true, children: ["duketater", "queenbeetLump", "shriekbulb"], harvestBonus: [60 * 60, 0.06], effsStr: "• +0.3% golden cookie effect duration• -2% CpS• harvest when mature for +1 hour of CpS (max. 4% of bank)", q: "A delicious taproot used to prepare high-grade white sugar. Entire countries once went to war over these." }, "queenbeetLump": { name: "Juicy queenbeet", icon: 18, plantable: false, cost: 120, costM: 1000000000000, ageTick: 0.04, ageTickR: 0.08, mature: 85, noContam: true, children: [], effsStr: "• -10% CpS• surrounding plants (3x3) are 20% less efficient• harvest when mature for a sugar lump", q: "A delicious taproot used to prepare high-grade white sugar. Entire countries once went to war over these.
It looks like this one has grown especially sweeter and juicier from growing in close proximity to other queenbeets." }, "duketater": { name: "Duketater", icon: 19, cost: 480, costM: 1000000000000, ageTick: 0.3, ageTickR: 0.4, mature: 95, noContam: true, children: ["shriekbulb"], harvestBonus: [2 * 60 * 60, 0.08], effsStr: "• harvest when mature for +2 hours of CpS (max. 8% of bank)", q: "A rare, rich-tasting tuber fit for a whole meal, as long as its strict harvesting schedule is respected. Its starch has fascinating baking properties." }, "crumbspore": { name: "Crumbspore", fungus: true, icon: 20, cost: 10, costM: 999, ageTick: 3, ageTickR: 3, mature: 65, contam: 0.03, noContam: true, detailsStr: "Spreads easily", children: ["crumbspore", "glovemorel", "cheapcap", "doughshroom", "wrinklegill", "ichorpuff"], effsStr: "• explodes into up to 1 minute of CpS at the end of its lifecycle (max. 1% of bank)• may overtake nearby plants", q: "An archaic mold that spreads its spores to the surrounding dirt through simple pod explosion." }, "doughshroom": { name: "Doughshroom", fungus: true, icon: 24, cost: 100, costM: 100000000, ageTick: 1, ageTickR: 2, mature: 85, contam: 0.03, noContam: true, detailsStr: "Spreads easily", children: ["crumbspore", "doughshroom", "foolBolete", "shriekbulb"], harvestBonus: [5 * 60, 0.03, true, true], effsStr: "• explodes into up to 5 minutes of CpS at the end of its lifecycle (max. 3% of bank)• may overtake nearby plants", q: "Jammed full of warm spores; some forest walkers often describe the smell as similar to passing by a bakery." }, "glovemorel": { name: "Glovemorel", fungus: true, icon: 21, cost: 30, costM: 10000, ageTick: 3, ageTickR: 18, mature: 80, children: [], effsStr: "• +4% cookies per click• +1% cursor CpS• -1% CpS", q: "Touching its waxy skin reveals that the interior is hollow and uncomfortably squishy." }, "cheapcap": { name: "Cheapcap", fungus: true, icon: 22, cost: 40, costM: 100000, ageTick: 6, ageTickR: 16, mature: 40, children: [], effsStr: "• buildings and upgrades are 0.2% cheaper• cannot handle cold climates; 15% chance to die when frozen", q: "Small, tough, and good in omelettes. Some historians propose that the heads of dried cheapcaps were once used as currency in some bronze age societies." }, "foolBolete": { name: "Fool's bolete", fungus: true, icon: 23, cost: 15, costM: 10000, ageTick: 5, ageTickR: 25, mature: 50, children: [], effsStr: "• +2% golden cookie frequency• -5% golden cookie gains• -2% golden cookie duration• -2% golden cookie effect duration", q: "Named for its ability to fool mushroom pickers. The fool's bolete is not actually poisonous, it's just extremely bland." }, "wrinklegill": { name: "Wrinklegill", fungus: true, icon: 25, cost: 20, costM: 1000000, ageTick: 1, ageTickR: 3, mature: 65, children: ["elderwort", "shriekbulb"], effsStr: "• wrinklers spawn 2% faster• wrinklers eat 1% more", q: "This mushroom's odor resembles that of a well-done steak, and is said to whet the appetite - making one's stomach start gurgling within seconds." }, "greenRot": { name: "Green rot", fungus: true, icon: 28, cost: 60, costM: 1000000, ageTick: 12, ageTickR: 13, mature: 65, children: ["keenmoss", "foolBolete"], effsStr: "• +0.5% golden cookie duration• +1% golden cookie frequency• +1% random drops", q: "This short-lived mold is also known as \"emerald pebbles\", and is considered by some as a pseudo-gem that symbolizes good fortune." }, "shriekbulb": { name: "Shriekbulb", icon: 30, cost: 60, costM: 4444444444444, ageTick: 3, ageTickR: 1, mature: 60, noContam: true, detailsStr: "The unfortunate result of some plant combinations", children: ["shriekbulb"], effsStr: "• -2% CpS• surrounding plants (3x3) are 5% less efficient", q: "A nasty vegetable with a dreadful quirk : its flesh resonates with a high-pitched howl whenever it is hit at the right angle by sunlight, moonlight, or even a slight breeze." }, "tidygrass": { name: "Tidygrass", icon: 31, cost: 90, costM: 100000000000000, ageTick: 0.5, ageTickR: 0, mature: 40, children: ["everdaisy"], effsStr: "• surrounding tiles (5x5) develop no weeds or fungus", q: "The molecules this grass emits are a natural weedkiller. Its stems grow following a predictable pattern, making it an interesting -if expensive- choice for a lawn grass." }, "everdaisy": { name: "Everdaisy", icon: 32, cost: 180, costM: 100000000000000000000, ageTick: 0.3, ageTickR: 0, mature: 75, noContam: true, immortal: 1, detailsStr: "Immortal", children: [], effsStr: "• surrounding tiles (3x3) develop no weeds or fungus• immortal", q: "While promoted by some as a superfood owing to its association with longevity and intriguing geometry, this elusive flower is actually mildly toxic." }, "ichorpuff": { name: "Ichorpuff", fungus: true, icon: 33, cost: 120, costM: 987654321, ageTick: 1, ageTickR: 1.5, mature: 35, children: [], effsStr: "• surrounding plants (3x3) age half as fast• surrounding plants (3x3) are half as efficient", q: "This puffball mushroom contains sugary spores, but it never seems to mature to bursting on its own. Surrounding plants under its influence have a very slow metabolism, reducing their effects but lengthening their lifespan." } }; M.plantsById = []; M.harvestBonusPlants = []; n = 0; for (i in M.plants) { var plant = M.plants[i]; // plant.unlocked = Boolean(plant.defaultUnlocked); plant.id = n; plant.key = i; plant.matureBase = plant.mature; M.plantsById[n] = plant; if (typeof plant.plantable === "undefined") { plant.plantable = true; } plant.iconCss = []; plant.iconCssStr = []; for (j = 0; j < 5; j++) { plant.iconCss[j] = Game.getIconCss([j, plant.icon]); plant.iconCssStr[j] = Game.getIconCssStr(plant.iconCss[j]); } if (plant.harvestBonus) { plant.harvestBonusCell = row.children[1]; M.harvestBonusPlants.push(plant); } n++; } M.numPlants = M.plantsById.length; M.computeMatures = function() { var mult = 1; if (Game.HasAchiev("Seedless to nay")) { mult = 0.95; } for (var i = this.numPlants - 1; i >= 0; i--) { this.plantsById[i].mature = this.plantsById[i].matureBase * mult; } }; M.toggleGardenFillBtn = function() { $("#gardenFillAllPlots").toggleClass("hidden", this.getNewSeedAge(this.plantsById[this.seedSelected]) < 0); }; M.selectSeed = function(plant, force) { var id = -1; $("#gardenSeedBlock .gardenSeed.on").removeClass("on"); if (plant && (force || this.seedSelected !== plant.id)) { id = plant.id; plant.$seedBlock.addClass("on"); } this.seedSelected = id; $("#gardenDeselectSeed").toggleClass("invisible", id === -1); this.toggleGardenFillBtn(); }; M.toggleSeed = function(plant, toggle) { toggle = typeof toggle === "undefined" ? !plant.unlocked : Boolean(toggle); plant.unlocked = Boolean(toggle || plant.defaultUnlocked); this.updateSeedBlock(plant); return plant.unlocked; }; M.updateSeedBlock = function(plant) { if (plant && plant.$seedBlock) { plant.$seedBlock.toggleClass("locked", !plant.unlocked); } }; M.getCost = function(plant) { if (Game.HasUpgrade("Turbo-charged soil")) { return 0; } return Math.max(plant.costM, Game.cookiesPs * plant.cost * 60) * (Game.HasAchiev("Seedless to nay") ? 0.95 : 1); }; M.getPlantDesc = function(plant) { var children = ""; if (plant.children.length > 0) { children += ''; for (var i = 0; i < plant.children.length; i++) { var it = this.plants[plant.children[i]]; if (!it) { console.log("No plant named " + plant.children[i]); } if (it) { children += ''; } } children += ""; } return ('' + (!plant.immortal ? ('"); }; M.soils = { "dirt": { name: "Dirt", icon: 0, tick: 5, effMult: 1, weedMult: 1, req: 0, effsStr: 'Average lifespan : ' + Game.sayTime(((100 / (plant.ageTick + plant.ageTickR / 2)) * this.stepT) * 30, -1) + " (" + Game.Beautify(Math.ceil((100 / ((plant.ageTick + plant.ageTickR / 2))) * (1))) + " ticks)") : "") + 'Average maturation : ' + Game.sayTime(((100 / ((plant.ageTick + plant.ageTickR / 2))) * (plant.mature / 100) * this.stepT) * 30, -1) + " (" + Game.Beautify(Math.ceil((100 / ((plant.ageTick + plant.ageTickR / 2))) * (plant.mature / 100))) + " ticks)" + (plant.weed ? 'Is a weed' : "") + (plant.fungus ? 'Is a fungus' : "") + (plant.detailsStr ? ('Details : ' + plant.detailsStr + "") : "") + (children != "" ? ('Possible mutations : ' + children + "") : "") + '' + 'Effects :' + '' + plant.effsStr + "" + (plant.q ? ("" + plant.q + "") : "") + "• tick every 5 minutes', q: "Simple, regular old dirt that you'd find in nature.", }, "fertilizer": { name: "Fertilizer", icon: 1, tick: 3, effMult: 0.75, weedMult: 1.2, req: 50, effsStr: '• tick every 3 minutes• passive plant effects -25%• weeds appear 20% more', q: "Soil with a healthy helping of fresh manure. Plants grow faster but are less efficient.", }, "clay": { name: "Clay", icon: 2, tick: 15, effMult: 1.25, weedMult: 1, req: 100, effsStr: '• tick every 15 minutes• passive plant effects +25%', q: "Rich soil with very good water retention. Plants grow slower but are more efficient.", }, "pebbles": { name: "Pebbles", icon: 3, tick: 5, effMult: 0.25, weedMult: 0.1, req: 200, effsStr: '• tick every 5 minutes• passive plant effects -75%• 35% chance of collecting seeds automatically when plants expire• weeds appear 10 times less', q: "Dry soil made of small rocks tightly packed together. Not very conductive to plant health, but whatever falls off your crops will be easy to retrieve.
Useful if you're one of those farmers who just want to find new seeds without having to tend their garden too much.", }, "woodchips": { name: "Wood chips", icon: 4, tick: 5, effMult: 0.25, weedMult: 0.1, req: 300, effsStr: '• tick every 5 minutes• passive plant effects -75%• plants spread and mutate 3 times more• weeds appear 10 times less', q: "Soil made of bits and pieces of bark and sawdust. Helpful for young sprouts to develop, not so much for mature plants.", }, }; M.soilsById = []; n = 0; for (i in M.soils) { var soil = M.soils[i]; soil.id = n; soil.key = i; soil.iconCss = Game.getIconCss([soil.icon, 34]); soil.iconCssStr = Game.getIconCssStr(soil.iconCss); M.soilsById[n] = soil; soil.$soilBlock = $('' + '' + "").toggleClass("on", n === 0).appendTo("#gardenSoils"); n++; } M.soil = 0; M.resetLockedSoil = true; M.toggleSoil = function(id) { var soil = this.soilsById[id]; if (soil) { this.soil = soil.id; soil.$soilBlock.addClass("on").siblings(".gardenSoil").removeClass("on"); } }; M.computeStepT = function() { if (Game.HasUpgrade("Turbo-charged soil")) { this.stepT = 1; } else { this.stepT = this.soilsById[this.soil].tick * 60; } }; M.plot = []; for (var y = 0; y < 6; y++) { M.plot[y] = []; for (var x = 0; x < 6; x++) { M.plot[y][x] = [0, 0]; } } M.plotBoost = []; for (y = 0; y < 6; y++) { M.plotBoost[y] = []; for (x = 0; x < 6; x++) { //age mult, power mult, weed mult M.plotBoost[y][x] = [1, 1, 1]; } } // M.plotLimits = [ // [2, 2, 4, 4], // [2, 2, 5, 4], // [2, 2, 5, 5], // [1, 2, 5, 5], // [1, 1, 5, 5], // [1, 1, 6, 5], // [1, 1, 6, 6], // [0, 1, 6, 6], // [0, 0, 6, 6], // ]; // M.isTileUnlocked = function (x, y) { // var level = this.parent.level; // level = Math.max(1, Math.min(this.plotLimits.length, level)) - 1; // var limits = this.plotLimits[level]; // return (x >= limits[0] && x < limits[2] && y >= limits[1] && y < limits[3]); // }; M.getNewSeedAge = function(plant) { var age = -1; if (plant) { switch ($('[name="gardenSeedAge"]:checked').val()) { case "mature": age = plant.mature + 1; break; case "bloom": age = Math.ceil(plant.mature * 0.666); break; case "sprout": age = Math.ceil(plant.mature * 0.333); break; case "bud": age = 0; } } return age; }; M.setPlotTile = function(x, y, id, age) { if (typeof id === "undefined") { id = this.seedSelected; } var plant = this.plantsById[id]; if (plant) { id = plant.id; if (typeof age === "undefined") { age = this.getNewSeedAge(plant); } } else { id = -1; age = 0; } age = Math.max(age, 0); if (plant && plant.immortal) { age = Math.min(plant.mature + 1, age); } var changed = false; if (this.plot[y] && this.plot[y][x]) { changed = this.plot[y][x][0] !== id + 1 || this.plot[y][x][1] !== age; this.plot[y][x] = [id + 1, age]; } return changed; }; M.tileTooltip = function(x, y) { var str = ""; var boostStr = "" + (M.plotBoost[y][x][0] != 1 ? "
Aging multiplier : " + Game.Beautify(M.plotBoost[y][x][0] * 100) + "%" : "") + (M.plotBoost[y][x][1] != 1 ? "
Effect multiplier : " + Game.Beautify(M.plotBoost[y][x][1] * 100) + "%" : "") + (M.plotBoost[y][x][2] != 1 ? "
Weeds/fungus repellent : " + Game.Beautify(100 - M.plotBoost[y][x][2] * 100) + "%" : "") + ""; var tile = M.plot[y][x]; if (tile[0] == 0) { // var plant = M.plantsById[M.seedSelected]; str = '' + '"; } else { var plant = M.plantsById[tile[0] - 1]; var stage = 0; if (tile[1] >= plant.mature) { stage = 4; } else if (tile[1] >= plant.mature * 0.666) { stage = 3; } else if (tile[1] >= plant.mature * 0.333) { stage = 2; } else { stage = 1; } str = 'Empty tile' + '' + "This tile of soil is empty." + "
Pick a seed and plant something!" + boostStr + "' + '' + '"; } return str; }; M.computeBoostPlot = function() { //some plants apply effects to surrounding tiles //this function computes those effects by creating a grid in which those effects stack for (var y = 0; y < 6; y++) { for (var x = 0; x < 6; x++) { //age mult, power mult, weed mult M.plotBoost[y][x] = [1, 1, 1]; } } var effectOn = function(X, Y, s, mult) { for (var y = Math.max(0, Y - s); y < Math.min(6, Y + s + 1); y++) { for (var x = Math.max(0, X - s); x < Math.min(6, X + s + 1); x++) { if (X != x || Y != y) { for (var i = 0; i < mult.length; i++) { M.plotBoost[y][x][i] *= mult[i]; } } } } }; for (y = 0; y < 6; y++) { for (x = 0; x < 6; x++) { var tile = M.plot[y][x]; if (tile[0] > 0) { var plant = M.plantsById[tile[0] - 1]; var name = plant.key; var stage = 0; if (tile[1] >= plant.mature) { stage = 4; } else if (tile[1] >= plant.mature * 0.666) { stage = 3; } else if (tile[1] >= plant.mature * 0.333) { stage = 2; } else { stage = 1; } var soilMult = M.soilsById[M.soil].effMult; var mult = soilMult; if (stage == 1) { mult *= 0.1; } else if (stage == 2) { mult *= 0.25; } else if (stage == 3) { mult *= 0.5; } else { mult *= 1; } var ageMult = 1; var powerMult = 1; var weedMult = 1; var range = 0; if (name == "elderwort") { ageMult = 1.03; range = 1; } else if (name == "queenbeetLump") { powerMult = 0.8; range = 1; } else if (name == "nursetulip") { powerMult = 1.2; range = 1; } else if (name == "shriekbulb") { powerMult = 0.95; range = 1; } else if (name == "tidygrass") { weedMult = 0; range = 2; } else if (name == "everdaisy") { weedMult = 0; range = 1; } else if (name == "ichorpuff") { ageMult = 0.5; powerMult = 0.5; range = 1; } //by god i hope these are right if (ageMult >= 1) { ageMult = (ageMult - 1) * mult + 1; } else if (mult >= 1) { ageMult = 1 / ((1 / ageMult) * mult); } else { ageMult = 1 - (1 - ageMult) * mult; } if (powerMult >= 1) { powerMult = (powerMult - 1) * mult + 1; } else if (mult >= 1) { powerMult = 1 / ((1 / powerMult) * mult); } else { powerMult = 1 - (1 - powerMult) * mult; } if (range > 0) { effectOn(x, y, range, [ageMult, powerMult, weedMult]); } } } } }; M.effsData = { cps: {n: "CpS"}, click: {n: "cookies/click"}, cursorCps: {n: "cursor CpS"}, grandmaCps: {n: "grandma CpS"}, goldenCookieGain: {n: "golden cookie gains"}, goldenCookieFreq: {n: "golden cookie frequency"}, goldenCookieDur: {n: "golden cookie duration"}, goldenCookieEffDur: {n: "golden cookie effect duration"}, wrathCookieGain: {n: "wrath cookie gains"}, wrathCookieFreq: {n: "wrath cookie frequency"}, wrathCookieDur: {n: "wrath cookie duration"}, wrathCookieEffDur: {n: "wrath cookie effect duration"}, reindeerGain: {n: "reindeer gains"}, reindeerFreq: {n: "reindeer cookie frequency"}, reindeerDur: {n: "reindeer cookie duration"}, itemDrops: {n: "random drops"}, milk: {n: "milk effects"}, wrinklerSpawn: {n: "wrinkler spawn rate"}, wrinklerEat: {n: "wrinkler appetite"}, upgradeCost: { n: "upgrade costs", rev: true }, buildingCost: { n: "building costs", rev: true }, }; M.computeEffs = function() { var effs = {}; for (var n in this.effsData) { effs[n] = 1; } if (!this.freeze) { var soilMult = this.soilsById[this.soil].effMult; for (var y = 0; y < 6; y++) { for (var x = 0; x < 6; x++) { var tile = this.plot[y][x]; if (tile[0] > 0) { var me = this.plantsById[tile[0] - 1]; var name = me.key; var stage = 0; if (tile[1] >= me.mature) { stage = 4; } else if (tile[1] >= me.mature * 0.666) { stage = 3; } else if (tile[1] >= me.mature * 0.333) { stage = 2; } else { stage = 1; } var mult = soilMult; if (stage == 1) { mult *= 0.1; } else if (stage == 2) { mult *= 0.25; } else if (stage == 3) { mult *= 0.5; } else { mult *= 1; } mult *= this.plotBoost[y][x][1]; if (name == "bakerWheat") { effs.cps += 0.01 * mult; } else if (name == "thumbcorn") { effs.click += 0.02 * mult; } else if (name == "cronerice") { effs.grandmaCps += 0.03 * mult; } else if (name == "gildmillet") { effs.goldenCookieGain += 0.01 * mult; effs.goldenCookieEffDur += 0.001 * mult; } else if (name == "clover") { effs.goldenCookieFreq += 0.01 * mult; } else if (name == "goldenClover") { effs.goldenCookieFreq += 0.03 * mult; } else if (name == "shimmerlily") { effs.goldenCookieGain += 0.01 * mult; effs.goldenCookieFreq += 0.01 * mult; effs.itemDrops += 0.01 * mult; } else if (name == "elderwort") { effs.wrathCookieGain += 0.01 * mult; effs.wrathCookieFreq += 0.01 * mult; effs.grandmaCps += 0.01 * mult; } else if (name == "bakeberry") { effs.cps += 0.01 * mult; } else if (name == "chocoroot") { effs.cps += 0.01 * mult; } else if (name == "whiteChocoroot") { effs.goldenCookieGain += 0.01 * mult; } else if (name == "whiteMildew") { effs.cps += 0.01 * mult; } else if (name == "brownMold") { effs.cps *= 1 - 0.01 * mult; } // else if (name == "meddleweed") {} else if (name == "whiskerbloom") { effs.milk += 0.002 * mult; } else if (name == "chimerose") { effs.reindeerGain += 0.01 * mult; effs.reindeerFreq += 0.01 * mult; } else if (name == "nursetulip") { effs.cps *= 1 - 0.02 * mult; } else if (name == "drowsyfern") { effs.cps += 0.03 * mult; effs.click *= 1 - 0.05 * mult; effs.goldenCookieFreq *= 1 - 0.1 * mult; } else if (name == "wardlichen") { effs.wrinklerSpawn *= 1 - 0.15 * mult; effs.wrathCookieFreq *= 1 - 0.02 * mult; } else if (name == "keenmoss") { effs.itemDrops += 0.03 * mult; } else if (name == "queenbeet") { effs.goldenCookieEffDur += 0.003 * mult; effs.cps *= 1 - 0.02 * mult; } else if (name == "queenbeetLump") { effs.cps *= 1 - 0.1 * mult; } else if (name == "glovemorel") { effs.click += 0.04 * mult; effs.cursorCps += 0.01 * mult; effs.cps *= 1 - 0.01 * mult; } else if (name == "cheapcap") { effs.upgradeCost *= 1 - 0.002 * mult; effs.buildingCost *= 1 - 0.002 * mult; } else if (name == "foolBolete") { effs.goldenCookieFreq += 0.02 * mult; effs.goldenCookieGain *= 1 - 0.05 * mult; effs.goldenCookieDur *= 1 - 0.02 * mult; effs.goldenCookieEffDur *= 1 - 0.02 * mult; } else if (name == "wrinklegill") { effs.wrinklerSpawn += 0.02 * mult; effs.wrinklerEat += 0.01 * mult; } else if (name == "greenRot") { effs.goldenCookieDur += 0.005 * mult; effs.goldenCookieFreq += 0.01 * mult; effs.itemDrops += 0.01 * mult; } else if (name == "shriekbulb") { effs.cps *= 1 - 0.02 * mult; } } } } } this.effs = effs; }; $("#gardenInfoToolIcon").css(Game.getIconCss([3, 35])); $("#gardenFreezeToolIcon").css(Game.getIconCss([1, 35])); byId("gardenFreezeTool").dataset.title = '' + plant.name + "This plant is growing here." + '' + '' + '" + // '' + // '' + '' + '' + '' + '' + '' + "
" + "Stage : " + ["bud", "sprout", "bloom", "mature"][stage - 1] + "
" + "" + (stage == 1 ? "Plant effects : 10%" : stage == 2 ? "Plant effects : 25%" : stage == 3 ? "Plant effects : 50%" : "Plant effects : 100%; may reproduce, will drop seed when harvested") + "" + "
"; if (stage < 4) { var mature = (100 / (M.plotBoost[y][x][0] * (plant.ageTick + plant.ageTickR / 2))) * ((plant.mature - tile[1]) / 100); str += "Mature in about " + Game.sayTime((mature * M.stepT) * 30, -1) + " (" + Game.Beautify(Math.ceil(mature)) + " tick" + (Math.ceil(mature) == 1 ? "" : "s") + ")"; } else if (plant.immortal) { str += "Does not decay"; } else { var decay = (100 / (M.plotBoost[y][x][0] * (plant.ageTick + plant.ageTickR / 2))) * ((100 - tile[1]) / 100); str += "Decays in about " + Game.sayTime((decay * M.stepT) * 30, -1) + " (" + Game.Beautify(Math.ceil(decay)) + " tick" + (Math.ceil(decay) == 1 ? "" : "s") + ")"; } str += "" + boostStr + "Click to ' + (stage == 4 ? "harvest" : "unearth") + "." + '' + M.getPlantDesc(plant) + "Cryogenically preserve your garden.'; byId("gardenInfoTool").setTitleFunc = function() { var M = Game.garden; var str = ""; if (M.freeze) { str = "Your garden is frozen, providing no effects."; } else { var effStr = ""; for (var i in M.effsData) { if (M.effs[i] != 1 && M.effsData[i]) { var amount = (M.effs[i] - 1) * 100; effStr += '
Plants no longer grow, spread or die; they provide no benefits.
' + 'Soil cannot be changed.Using this will effectively pause your garden.• ' + M.effsData[i].n + ' : ' + (amount > 0 ? "+" : "-") + Game.Beautify(Math.abs(M.effs[i] - 1) * 100, 2) + "%"; } } if (effStr == "") { effStr = 'None.'; } str += "Combined effects of all your plants :" + effStr; } // str += '' + // '• You can cross-breed plants by planting them close to each other; new plants will grow in // the empty tiles next to them.' + "
• Unlock new seeds by harvesting mature plants.
• When you ascend, your garden // plants are reset, but you keep all the seeds you've unlocked." + "
• Your garden has no effect and does not grow while the // game is closed."; // this.dataset.title = '' + str + ""; this.dataset.title = str; }; M.resetPlot = function() { for (var y = 0; y < 6; y++) { for (var x = 0; x < 6; x++) { this.setPlotTile(x, y, -1, 0); } } }; M.randomizePlot = function() { for (var y = 0; y < 6; y++) { for (var x = 0; x < 6; x++) { var id = Math.floor(Math.random() * (this.numPlants + 1)); var age = 0; if (id > 0) { age = Math.floor(Math.random() * 100); } this.setPlotTile(x, y, id, age); } } Game.scheduleUpdate(); }; M.reset = function() { this.toggleSoil(0); this.toggleFreeze(false); this.resetPlot(); }; M.load = function(str) { if (!str) { return false; } var spl = str.split(" "); var spl2 = spl[0].split(":"); this.toggleSoil(parseInt(spl2[1], 10)); this.toggleFreeze(parseInt(spl2[3], 10)); var plot = spl[2] || 0; if (plot) { plot = plot.split(":"); n = 0; for (var y = 0; y < 6; y++) { for (var x = 0; x < 6; x++) { this.setPlotTile(x, y, parseInt(plot[n], 10) - 1, parseInt(plot[n + 1], 10)); n += 2; } } } }; M.updateFunc = function() { this.computeMatures(); this.computeBoostPlot(); this.computeEffs(); this.computeStepT(); }; M.updateHarvestBonus = function() { for (var i = this.harvestBonusPlants.length - 1; i >= 0; i--) { var plant = this.harvestBonusPlants[i]; var cookies = plant.harvestBonus[0] * Game.cookiesPs; var bank = cookies / plant.harvestBonus[1]; var html = Game.formatNumber(cookies) + " cookies " + (plant.harvestBonus[3] ? "max " : "") + (plant.harvestBonus[2] ? "on death" : "on harvest") + (plant.harvestBonus[3] ? " (average " + Game.formatNumber(cookies * 0.5) + ")" : "") + ", Bank " + Game.formatNumber(bank); plant.harvestBonusCell.innerHTML = html; } }; $("#gardenFreezeTool").on("click", function() { Game.garden.toggleFreeze(); Game.scheduleUpdate(); }); $("#gardenSeedBlock").on("click", ".gardenSeed", function(ev) { var lock = Game.lockChecked ^ Game.checkEventAltMode(ev); var plant = Game.garden.plantsById[this.dataset.plantId]; if (plant) { if (lock) { Game.garden.toggleSeed(plant); } else { Game.garden.selectSeed(plant); } Game.scheduleUpdate(); } }).on("mouseenter", ".gardenSeed", function(ev) { var M = Game.garden; var plant = M.plantsById[this.dataset.plantId]; if (plant) { Game.setTooltip({ html: '' + '' + '' + '' + (plant.plantable ? ('", refEle: this }); } ev.stopPropagation(); }); $("#gardenDeselectSeed").on("click", function() { Game.garden.selectSeed(null); }); $("#gardenSoilBlock").on("mouseenter", ".gardenSoil", function(ev) { var M = Game.garden; var soil = M.soilsById[this.dataset.soilId]; if (soil) { var str = 'Planting cost :") : "") + '
' + '' + Game.BeautifyAbbr(Math.round(Game.shortenNumber(M.getCost(plant)))) + "
" + "" + Game.sayTime(plant.cost * 60 * 30, -1) + " of CpS,
minimum " + Game.BeautifyAbbr(plant.costM) + " cookies" + '' + M.getPlantDesc(plant) + "' + plant.name + " seed" + (plant.plantable ? "Click to select this seed for planting." : 'This seed cannot be planted.') + "' + '' + '" + '' + '' + soil.name + "" + "" + ((M.soil == soil.id) ? "Your field is currently using this soil." : "Click to use this type of soil for your whole field.") + "' + '"; Game.setTooltip({ html: str, refEle: this }); } ev.stopPropagation(); }).on("click", ".gardenSoil", function() { var soil = Game.garden.soilsById[this.dataset.soilId]; if (soil && Game.garden.soil !== soil.id) { Game.garden.toggleSoil(soil.id); Game.scheduleUpdate(); } }); var gardenPlantMousedown = false; $("#gardenBlock").on("click", '[name="gardenSeedAge"]', function() { Game.garden.toggleGardenFillBtn(); }).on("mousedown", ".gardenTile", function(ev) { var M = Game.garden; var spl = this.id.split("-"); var x = spl[1]; var y = spl[2]; gardenPlantMousedown = false; var changed = false; var age = M.getNewSeedAge(M.plantsById[M.seedSelected]); if (age > -1) { changed = M.setPlotTile(x, y, M.seedSelected, age); gardenPlantMousedown = true; } else if (byId("gardenSeedAgeRemove").checked) { changed = M.setPlotTile(x, y, -1, 0); gardenPlantMousedown = true; } if (changed) { Game.setTooltip({ html: M.tileTooltip(x, y), refEle: this }); Game.scheduleUpdate(200); } ev.preventDefault(); }).on("mouseenter", ".gardenTile", function(ev) { var M = Game.garden; var spl = this.id.split("-"); var x = spl[1]; var y = spl[2]; var changed = false; if (gardenPlantMousedown) { var age = M.getNewSeedAge(M.plantsById[M.seedSelected]); if (age > -1) { changed = M.setPlotTile(x, y, M.seedSelected, age); } else if (byId("gardenSeedAgeRemove").checked) { changed = M.setPlotTile(x, y, -1, 0); } } if (changed) { Game.scheduleUpdate(200); } Game.setTooltip({ html: M.tileTooltip(x, y), refEle: this }); ev.preventDefault(); }).on("mouseenter", "#gardenHarvestBonusBlock .gardenHarvestBonusPlant", function(ev) { var M = Game.garden; var plant = M.plantsById[this.dataset.plantId]; if (plant) { Game.setTooltip({ html: 'Effects :' + '' + soil.effsStr + "" + (soil.q ? ("" + soil.q + "") : "") + "' + '' + '' + '' + '", refEle: this }); } ev.stopPropagation(); }); $(window).on("focusout mouseup focusin", function() { gardenPlantMousedown = false; }); $("#gardenClearAllPlots").on("click", function() { Game.garden.resetPlot(); Game.scheduleUpdate(); }); $("#gardenFillAllPlots").on("click", function() { var M = Game.garden; var age = M.getNewSeedAge(M.plantsById[M.seedSelected]); if (age > -1) { for (var y = 0; y < 6; y++) { for (var x = 0; x < 6; x++) { M.setPlotTile(x, y, Game.seedSelected, age); } } } Game.scheduleUpdate(); }); Game.clearGardenSelection = function() { Game.garden.selectSeed(null); }; byId("tabGarden").onTabFunc = Game.clearGardenSelection; M.selectSeed(null); //#endregion Garden }; })(myWindow, jQuery); myWindow.Game.init();" + '' + M.getPlantDesc(plant) + "' + plant.name + "