G_lander

Brain tank 2

Mar 17th, 2020
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (function(a,b){"object"==typeof exports&&"undefined"!=typeof module?module.exports=b():"function"==typeof define&&define.amd?define(b):(a=a||self,a.Cppkies=b())})(this,function(){'use strict';function a(a){return a instanceof Function?a():a}function b(a){return a.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1")}function c(c,d,e,f){var g,h=c.toString(),i=null===d;i||(d=a(d),g=new RegExp(b(d),"g")),e=a(e);var j=/(\)[^{]*{)/,k=/}?$/;switch(i||g.test(h)||console.warn("Nothing to inject."),f){case"before":h=i?h.replace(j,"$1"+e):h.replace(g,""+e+d);break;case"replace":h=i?""+e:h.replace(g,""+e);break;case"after":h=i?h.replace(k,e+"$1"):h.replace(g,""+d+e);break;default:throw new Error("where Parameter must be \"before\", \"replace\" or \"after\"");}var m=new Function("return ("+h+")")();return m.prototype=c.prototype,m}function d(a,c){function b(){this.constructor=a}e(a,c),a.prototype=null===c?Object.create(c):(b.prototype=c.prototype,new b)}var e=function(a,c){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,c){a.__proto__=c}||function(a,c){for(var b in c)c.hasOwnProperty(b)&&(a[b]=c[b])},e(a,c)},f=function(a){function b(b,c,d,e,f,g,h,j,k){var m=a.call(this,b,c,d,e[0],e[1],f,0,g,h)||this,n=Cppkies.buildingLink+"",o=Cppkies.iconLink+"";j&&(Game.foolObjects[b]=j),k&&(Game.goldenCookieBuildingBuffs[b]=k),o&&Cppkies.buildingHooksById[m.id].tooltip.push(function(a,b){return this.locked?b:b.replace("background-position","background-image:url("+o+");background-position")}),Game.BuildStore(),n&&Cppkies.hooks.postBuildStore.push(function(){l("productIcon"+m.id).style.backgroundImage="url("+n+")",l("productIconOff"+m.id).style.backgroundImage="url("+n+")"}),Game.BuildStore(),m.canvas=l("rowCanvas"+m.id),m.ctx=m.canvas.getContext("2d"),m.context=m.ctx,m.pics=[];var p=document.createElement("div");p.className="tinyProductIcon",p.id="mutedProduct"+m.id,p.style.display="none",n&&(p.style.backgroundImage="url("+n+")"),p.style.backgroundPositionX="-"+e[0]+"px",p.style.backgroundPositionY="-"+e[1]+"px",p.addEventListener("click",function(){m.mute(0),PlaySound(m.muted?"snd/clickOff.mp3":"snd/clickOn.mp3")}),AddEvent(m.canvas,"mouseover",function(){m.mouseOn=!0}),AddEvent(m.canvas,"mouseout",function(){m.mouseOn=!1}),AddEvent(m.canvas,"mousemove",function(a){var b=m.canvas.getBoundingClientRect();m.mousePos[0]=a.pageX-b.left,m.mousePos[1]=a.pageY-b.top}),l("buildingsMute").appendChild(p),Game.recalculateGains=1;var q=function(a){if(0<parseInt(a)){var b=Game.ObjectsById[a];b.canvas=l("rowCanvas"+a),b.ctx=b.canvas.getContext("2d"),AddEvent(b.canvas,"mouseover",function(){b.mouseOn=!0}),AddEvent(b.canvas,"mouseout",function(){b.mouseOn=!1}),AddEvent(b.canvas,"mousemove",function(a){var c=b.canvas.getBoundingClientRect();b.mousePos[0]=a.pageX-c.left,b.mousePos[1]=a.pageY-c.top})}};for(var r in Game.ObjectsById)q(r);return m}return d(b,a),b}(Game.Object);if(window.Cppkies)throw new Error("Duplicate Cppkies import");(function(){return new Promise(function(a){var b=function(){return function(a,b,c){this.value=a,this.defValue=b,this.func=c}}(),d={},e=[new b("customMenu",[],function(){window.Game.UpdateMenu=c(window.Game.UpdateMenu,null,"\n\t\t\t\t\t// Cppkies injection\n\t\t\t\t\tswitch (Game.onMenu) {\n\t\t\t\t\t\tcase \"prefs\":\n\t\t\t\t\t\t\tfor(const i in Cppkies.hooks.customOptionsMenu) Cppkies.hooks.customOptionsMenu[i]();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"stats\":\n\t\t\t\t\t\t\tfor(const i in Cppkies.hooks.customStatsMenu) Cppkies.hooks.customStatsMenu[i]();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"log\":\n\t\t\t\t\t\t\tfor(const i in Cppkies.hooks.customInfoMenu) Cppkies.hooks.customInfoMenu[i]();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tfor(const i in Cppkies.hooks.customMenu) Cppkies.hooks.customMenu[i]();\n\t\t\t\t\t","before")}),new b("customOptionsMenu",[]),new b("customStatsMenu",[]),new b("customInfoMenu",[]),new b("customLoad",[],function(){window.Game.LoadSave=c(window.Game.LoadSave,"if (Game.prefs.showBackupWarning==1)","\n\t\t\t\t\t// Cppkies injection\n\t\t\t\t\tfor(const i in Cppkies.hooks.customLoad) Cppkies.hooks.customLoad[i](); \n\t\t\t\t\t","before")}),new b("customReset",[],function(){window.Game.Reset=c(window.Game.Reset,null,"\n\t\t\t\t\t// Cppkies injection\n\t\t\t\t\tfor(const i in Cppkies.hooks.customReset) Cppkies.hooks.customReset[i](hard);\n\t\t\t\t\t","before")}),new b("customBeautify",[],function(){window.Beautify=c(window.Beautify,"return negative?'-'+output:output+decimal;","\n\t\t\t\t\t// Cppkies injection\n\t\t\t\t\tlet ret = negative?'-'+output:output+decimal;\n\t\t\t\t\tfor(const i in Cppkies.hooks.customBeautify) {\n\t\t\t\t\t\tlet returnedValue = Cppkies.hooks.customBeautify[i](value, floats, ret)\n\t\t\t\t\t\tret = returnedValue ? returnedValue : ret\n\t\t\t\t\t};\n\t\t\t\t\treturn ret;\n\t\t\t\t\t","replace")}),new b("customTooltipDraw",[],function(){window.Game.tooltip.draw=c(window.Game.tooltip.draw,null,"\n\t\t\t\t\t// Cppkies injection\n\t\t\t\t\tfor(const i in Cppkies.hooks.customTooltipDraw) Cppkies.hooks.customTooltipDraw[i](from, text, origin);\n\t\t\t\t\t","before")}),new b("customTooltipUpdate",[],function(){window.Game.tooltip.update=c(window.Game.tooltip.update,null,"\n\t\t\t\t\t// Cppkies injection\n\t\t\t\t\tfor(const i in Cppkies.hooks.customTooltipUpdate) Cppkies.hooks.customTooltipUpdate[i]();\n\t\t\t\t\t","before")}),new b("customHowMuchPrestige",[],function(){window.Game.HowMuchPrestige=c(c(window.Game.HowMuchPrestige,"return","let ret =","replace"),";","\n\t\t\t\t\t// Cppkies injection\n\t\t\t\t\tfor(const i in Cppkies.hooks.customHowManyCookiesReset){ \n\t\t\t\t\t\treturnedValue = Cppkies.hooks.customHowManyCookiesReset[i](chips, ret);\n\t\t\t\t\t\tret = returnedValue ? returnedValue : ret\n\t\t\t\t\t}\n\t\t\t\t\treturn ret;\n\t\t\t\t\t","after")}),new b("customHeavenlyMultiplier",[]),new b("UpdateAscensionModePrompt",[]),new b("customReincarnate",[]),new b("customAscend",[]),new b("customUpdateAscend",[]),new b("customBuildAscendTree",[]),new b("customAscend",[]),new b("customGrandmaPic",[],function(){window.Game.Objects.Grandma.art.pic=c(window.Game.Objects.Grandma.art.pic,"return choose(list)+'.png'","// Cppkies injection\n\t\t\t\t\tlist = list.concat(Cppkies.hooks.customGrandmaPic.map(val=>val() || null).filter(val=>val !== null))\n\t\t\t\t\t","before")}),new b("postBuildStore",[],function(){var a=window.Game.BuildStore.toString();window.Game.BuildStore=new Proxy(window.Game.BuildStore,{apply:function(a,b,c){for(var d in a.apply(b,c),window.Cppkies.hooks.postBuildStore)window.Cppkies.hooks.postBuildStore[d]()}}),window.Game.BuildStore.toString=function(){return a}})];e.forEach(function(a){d[a.value]=a.defValue,a.func&&a.func()}),window.Game.Loader.Load=c(window.Game.Loader.Load,"img.src=this.domain","img.src=(assets[i].indexOf('http') !== -1 ? \"\" : this.domain)","replace"),a(d)})})().then(function(a){window.Cppkies.hooks=a,window.Game.Note.call({},"Cppkies loaded!","",[32,17],!0),window.Game.Win("Third-party"),window.Cppkies.onLoad.forEach(function(a){return a()})});return{hooks:{},injectCode:c,iconLink:"",buildingLink:"",buildingHooks:{},buildingHooksById:[],Building:f,onLoad:[]}});
  2. //# sourceMappingURL=index.js.map
  3. Cppkies.onLoad.push(() => {
  4.     Cppkies.buildingLink =
  5.         "https://cdn.discordapp.com/attachments/412371320232345624/689539985531338803/A8lDHubS9ctKAAAAAElFTkSuQmCC.png"
  6.     const brain = new Cppkies.Building(
  7.         "Think tank ",
  8.         "think tank|think tanks|thought about|[X] extra neural pathway|[X] extra neural pathways",
  9.         "Generates cookies by thinking really, really hard about them.",
  10.         [0, 1],
  11.         {
  12.             bg:
  13.                 "https://cdn.discordapp.com/attachments/686129558180724747/686354049423114273/Background.png",
  14.             pic:
  15.                 "https://cdn.discordapp.com/attachments/686129558180724747/686354387504726022/BRain_Building.png",
  16.             yV: 64,
  17.             xV: 16,
  18.         },
  19.         function(me) {
  20.             let mult = 1
  21.             mult *= Game.GetTieredCpsMult(me)
  22.             mult *= Game.magicCpS(me.name)
  23.             return me.baseCps * mult
  24.         },
  25.         function() {
  26.             Game.UnlockTiered(this)
  27.             if (
  28.                 this.amount >= Game.SpecialGrandmaUnlock &&
  29.                 Game.Objects["Grandma"].amount > 0
  30.             )
  31.                 Game.Unlock(this.grandma.name)
  32.         },
  33.         { name: "Brain", desc: "Brain", icon: [1, 0] },
  34.         ["Brainstorm", "Brain fart"]
  35.     )
  36.     Game.GrandmaSynergy("Brainy Grandmas", "Hello hello no desc yet", brain.name)
  37.     Cppkies.hooks.customGrandmaPic.push(() =>
  38.         Game.Has("Brainy Grandmas")
  39.             ? "https://cdn.discordapp.com/attachments/686129558180724747/686379750591299586/Elder_Brain"
  40.             : null
  41.     )
  42. })
Advertisement
Add Comment
Please, Sign In to add comment