Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var impUns = undefined;
- Game.registerMod("improvedUnshackled",{
- init:function(){
- this.spritesheet=App?this.dir+"/img.png":"https://cdn.discordapp.com/attachments/416701488719724564/1196070242787541122/image.png"
- this.allCreations=function(){
- impUns = Game.mods.improvedUnshackled;
- this.createUpgrades();
- this.changeUpgrades();
- this.overrideUpgrades();
- this.overrideTooltips();
- this.adjust();
- }
- this.createUpgrades=function(){
- this.upgrades = [];
- this.upgrades.push(new Game.Upgrade('Unshackled synergies I',loc("Unshackles all <b>Synergies I</b> upgrades, making them more powerful.<br>Only applies to upgrades with both associated buildings unshackled.")+'<q>The Hunter Becomes the Hunted.</q>',222222222222222,[5,0, this.spritesheet]));
- this.upgrades[0].parents = [Game.UpgradesById[792]];
- this.upgrades.push(new Game.Upgrade('Unshackled synergies II',loc("Unshackles all <b>Synergies II</b> upgrades, making them more powerful.<br>Only applies to upgrades with both associated buildings unshackled.")+'<q>The Hunted Becomes the Hunter.</q>',222222222222222222,[5,1, this.spritesheet]));
- this.upgrades[1].parents = [Game.UpgradesById[798]];
- this.upgrades.push(new Game.Upgrade('Unshackled kitten',loc("Unshackles all <b>Kitten</b> upgrades, making them more powerful.<br>Only applies to kittens with its respective tier unshackled.")+'<q>mEeEeeEeEeeeeØwWWWWwwwWwwwWWWwwwW</q>', 9000000000000,[18,35]));
- this.upgrades[2].parents = [Game.UpgradesById[718],Game.UpgradesById[771]];
- this.upgrades.push(new Game.Upgrade('Unshackled mouse',loc("Unshackles all <b>Mouse</b> upgrades, making them more powerful.<br>Only applies to mouses with its respective tier unshackled."+'<q>Split the cookie open with each click.</q>'), 1500000000,[11,35]));
- this.upgrades[3].parents = [Game.UpgradesById[768]];
- this.upgrades.push(new Game.Upgrade('Unshackled cookie',loc("Unshackles all <b>Flavored cookies</b>, increasing cookie production multiplier of each by <b>1%</b>."+'<q>Gives your cookies a nice shine.</q>'), 100000000000000000,[10,35]));
- this.upgrades[4].parents = [Game.UpgradesById[863],Game.UpgradesById[864]];
- this.upgrades[0]=this.setPos(this.upgrades[0],976,24);
- this.upgrades[1]=this.setPos(this.upgrades[1],854,466);
- this.upgrades[2]=this.setPos(this.upgrades[2],788,-454);
- this.upgrades[3]=this.setPos(this.upgrades[3],380,-284);
- this.upgrades[4]=this.setPos(this.upgrades[4],430,496);
- for(let i of this.upgrades){i.pool="prestige";i.order=506;Game.PrestigeUpgrades.push(i);}
- LocalizeUpgradesAndAchievs()
- }
- this.setPos=function(upgrade,x,y) {
- Game.UpgradePositions[upgrade.id]=[x,y]; upgrade.posX = x; upgrade.posY = y;
- return upgrade;
- }
- this.overrideUpgrades=function(){
- Game.GetTieredCpsMult=function(me){
- var mult=1;
- for (var i in me.tieredUpgrades)
- {
- if (!Game.Tiers[me.tieredUpgrades[i].tier].special && Game.Has(me.tieredUpgrades[i].name))
- {
- var tierMult=2;
- //unshackled
- if (Game.ascensionMode!=1 && Game.Has(me.unshackleUpgrade) && Game.Has(Game.Tiers[me.tieredUpgrades[i].tier].unshackleUpgrade)) tierMult+=me.id==1?0.5:(20-me.id)*0.1;
- mult*=tierMult;
- }
- }
- for (var i in me.synergies)
- {
- var syn=me.synergies[i];
- if (Game.Has(syn.name))
- {
- var ti = syn.tier;
- if ((ti == "synergy1" && Game.Has("Unshackled synergies I") && Game.mods.improvedUnshackled.valid(syn.buildingTie1, syn.buildingTie2)) || (ti == "synergy2" && Game.Has("Unshackled synergies II") && Game.mods.improvedUnshackled.valid(syn.buildingTie1, syn.buildingTie2))) {
- if (syn.buildingTie1.name==me.name) mult*=(1+(0.05+0.01*(5-0.25*me.id))*syn.buildingTie2.amount);
- else if (syn.buildingTie2.name==me.name) mult*=(1+(0.001+0.01*(0.1-0.005*me.id))*syn.buildingTie1.amount);
- } else {
- if (syn.buildingTie1.name==me.name) mult*=(1+0.05*syn.buildingTie2.amount);
- else if (syn.buildingTie2.name==me.name) mult*=(1+0.001*syn.buildingTie1.amount);
- }
- }
- }
- if (me.fortune && Game.Has(me.fortune.name)) mult*=1.07;
- if (me.grandma && Game.Has(me.grandma.name)) mult*=(1+Game.Objects['Grandma'].amount*0.01*(1/(me.id-1)));
- return mult;
- }
- }
- this.overrideTooltips=function() {
- for (let j in Game.Objects) {
- let me = Game.Objects[j];
- me.tooltip=function() {
- var ariaText='';
- var desc=me.desc;
- var name=me.dname;
- if (Game.season=='fools')
- {
- if (!Game.foolObjects[me.name])
- {
- name=Game.foolObjects['Unknown'].name;
- desc=Game.foolObjects['Unknown'].desc;
- }
- else
- {
- name=Game.foolObjects[me.name].name;
- desc=Game.foolObjects[me.name].desc;
- }
- }
- var icon=[me.iconColumn,0];
- if (me.locked)
- {
- name='???';
- desc='???';
- icon=[0,7];
- }
- var canBuy=false;
- var price=me.bulkPrice;
- if ((Game.buyMode==1 && Game.cookies>=price) || (Game.buyMode==-1 && me.amount>0)) canBuy=true;
- var synergiesStr='';
- //note : might not be entirely accurate, math may need checking
- if (me.amount>0)
- {
- var synergiesWith={};
- var synergyBoost=0;
- if (me.name=='Grandma')
- {
- for (var i in Game.GrandmaSynergies)
- {
- if (Game.Has(Game.GrandmaSynergies[i]))
- {
- var other=Game.Upgrades[Game.GrandmaSynergies[i]].buildingTie;
- var mult=me.amount*0.01*(1/(other.id-1));
- var boost=(other.storedTotalCps*Game.globalCpsMult)-(other.storedTotalCps*Game.globalCpsMult)/(1+mult);
- synergyBoost+=boost;
- if (!synergiesWith[other.plural]) synergiesWith[other.plural]=0;
- synergiesWith[other.plural]+=mult;
- }
- }
- }
- else if (me.name=='Portal' && Game.Has('Elder Pact'))
- {
- var other=Game.Objects['Grandma'];
- var boost=(me.amount*0.05*other.amount)*Game.globalCpsMult;
- synergyBoost+=boost;
- if (!synergiesWith[other.plural]) synergiesWith[other.plural]=0;
- synergiesWith[other.plural]+=boost/(other.storedTotalCps*Game.globalCpsMult);
- }
- for (var i in me.synergies)
- {
- var it=me.synergies[i];
- if (Game.Has(it.name))
- {
- if ((it.tier == "synergy1" && Game.Has("Unshackled synergies I") && Game.mods.improvedUnshackled.valid(it.buildingTie1, it.buildingTie2)) || (it.tier == "synergy2" && Game.Has("Unshackled synergies II") && Game.mods.improvedUnshackled.valid(it.buildingTie1, it.buildingTie2))) {
- var other=it.buildingTie1;
- var weight=0.05+0.01*(5-0.25*other.id);
- if (me==it.buildingTie1) {other=it.buildingTie2;weight=0.001+0.01*(0.1-0.005*other.id);}
- var boost=(other.storedTotalCps*Game.globalCpsMult)-(other.storedTotalCps*Game.globalCpsMult)/(1+me.amount*weight);
- synergyBoost+=boost;
- if (!synergiesWith[other.plural]) synergiesWith[other.plural]=0;
- synergiesWith[other.plural]+=me.amount*weight;
- } else {
- var weight=0.05;
- var other=it.buildingTie1;
- if (me==it.buildingTie1) {weight=0.001;other=it.buildingTie2;}
- var boost=(other.storedTotalCps*Game.globalCpsMult)-(other.storedTotalCps*Game.globalCpsMult)/(1+me.amount*weight);
- synergyBoost+=boost;
- if (!synergiesWith[other.plural]) synergiesWith[other.plural]=0;
- synergiesWith[other.plural]+=me.amount*weight;
- }
- }
- }
- if (synergyBoost>0)
- {
- for (var i in synergiesWith)
- {
- if (synergiesStr!='') synergiesStr+=', ';
- synergiesStr+='<span style="color:#fff;font-weight:bold;font-size:80%;background:#000;box-shadow:0px 0px 0px 1px rgba(255,255,255,0.2);border-radius:3px;padding:0px 2px;display:inline-block;">'+i+' +'+Beautify(synergiesWith[i]*100,1)+'%</span>';
- }
- synergiesStr=loc("...also boosting some other buildings:")+' '+synergiesStr+' - '+loc("all combined, these boosts account for <b>%1</b> per second (<b>%2%</b> of total CpS)",[loc("%1 cookie",LBeautify(synergyBoost,1)),Beautify((synergyBoost/Game.cookiesPs)*100,1)]);
- }
- }
- if (Game.prefs.screenreader)
- {
- if (me.locked) ariaText='This building is not yet unlocked. ';
- else ariaText=name+'. ';
- if (!me.locked) ariaText+='You own '+me.amount+'. ';
- ariaText+=(canBuy?'Can buy 1 for':'Cannot afford the')+' '+Beautify(Math.round(price))+' cookies. ';
- if (!me.locked && me.totalCookies>0)
- {
- ariaText+='Each '+me.single+' produces '+Beautify((me.storedTotalCps/me.amount)*Game.globalCpsMult,1)+' cookies per second. ';
- ariaText+=Beautify(me.totalCookies)+' cookies '+me.actionName+' so far. ';
- }
- if (!me.locked) ariaText+=desc;
- var ariaLabel=l('ariaReader-product-'+(me.id));
- if (ariaLabel) ariaLabel.innerHTML=ariaText.replace(/(<([^>]+)>)/gi,' ');
- }
- return '<div style="position:absolute;left:1px;top:1px;right:1px;bottom:1px;background:linear-gradient(125deg,'+(false?'rgba(15,115,130,1) 0%,rgba(15,115,130,0)':'rgba(50,40,40,1) 0%,rgba(50,40,40,0)')+' 20%);mix-blend-mode:screen;z-index:1;"></div><div style="z-index:10;min-width:350px;padding:8px;position:relative;" id="tooltipBuilding"><div class="icon" style="float:left;margin-left:-8px;margin-top:-8px;'+writeIcon(icon)+'"></div><div style="float:right;text-align:right;"><span class="price'+(canBuy?'':' disabled')+'">'+Beautify(Math.round(price))+'</span>'+Game.costDetails(price)+'</div><div class="name">'+name+'</div>'+'<small><div class="tag">'+loc("owned: %1",me.amount)+'</div>'+(me.free>0?'<div class="tag">'+loc("free: %1!",me.free)+'</div>':'')+'</small>'+
- '<div class="line"></div><div class="description"><q>'+desc+'</q></div>'+
- (me.totalCookies>0?(
- '<div class="line"></div>'+
- (me.amount>0?'<div class="descriptionBlock">'+loc("each %1 produces <b>%2</b> per second",[me.single,loc("%1 cookie",LBeautify((me.storedTotalCps/me.amount)*Game.globalCpsMult,1))])+'</div>':'')+
- '<div class="descriptionBlock">'+loc("%1 producing <b>%2</b> per second",[loc("%1 "+me.bsingle,LBeautify(me.amount)),loc("%1 cookie",LBeautify(me.storedTotalCps*Game.globalCpsMult,1))])+' ('+loc("<b>%1%</b> of total CpS",Beautify(Game.cookiesPs>0?((me.amount>0?((me.storedTotalCps*Game.globalCpsMult)/Game.cookiesPs):0)*100):0,1))+')</div>'+
- (synergiesStr?('<div class="descriptionBlock">'+synergiesStr+'</div>'):'')+
- (EN?'<div class="descriptionBlock"><b>'+Beautify(me.totalCookies)+'</b> '+(Math.floor(me.totalCookies)==1?'cookie':'cookies')+' '+me.actionName+' so far</div>':'<div class="descriptionBlock">'+loc("<b>%1</b> produced so far",loc("%1 cookie",LBeautify(me.totalCookies)))+'</div>')
- ):'')+
- '</div>';
- }
- }
- }
- this.changeUpgrades=function(){
- for (let i = 0; i < 14; i++) {
- Game.UpgradesById[i+787].icon = [i % 5, Math.floor(i / 5), this.spritesheet]
- }
- Game.UpgradesById[863].icon = [4, 2, this.spritesheet]
- locStrings["Unshackled! Each %1 provides an additional <b>+%4%</b> production to %3, and each %3 provides an additional <b>+%2%</b> production to %1."] = "Unshackled! Each %1 provides an additional <b>+%4%</b> production to %3, and each %3 provides an additional <b>+%2%</b> production to %1."
- for (let j in Game.Upgrades) {
- let me = Game.Upgrades[j];
- if (Game.Upgrades[j].tier == "synergy1") {
- Game.Upgrades[j].descFunc = function() {
- return ((Game.ascensionMode!=1 && Game.Has("Unshackled synergies I") && Game.mods.improvedUnshackled.valid(me.buildingTie1, me.buildingTie2))?('<div style="font-size:80%;text-align:center;">'+loc("Unshackled! Each %1 provides an additional <b>+%4%</b> production to %3, and each %3 provides an additional <b>+%2%</b> production to %1.",[this.buildingTie1.name, (5-0.25*me.buildingTie1.id), this.buildingTie2.name, (0.1-0.005*me.buildingTie2.id)])+'</div><div class="line"></div>'):'')+this.ddesc;
- }
- }
- if (Game.Upgrades[j].tier == "synergy2") {
- Game.Upgrades[j].descFunc = function() {
- return ((Game.ascensionMode!=1 && Game.Has("Unshackled synergies II") && Game.mods.improvedUnshackled.valid(me.buildingTie1, me.buildingTie2))?('<div style="font-size:80%;text-align:center;">'+loc("Unshackled! Each %1 provides an additional <b>+%4%</b> production to %3, and each %3 provides an additional <b>+%2%</b> production to %1.",[this.buildingTie1.name, (5-0.25*me.buildingTie1.id), this.buildingTie2.name, (0.1-0.005*me.buildingTie2.id)])+'</div><div class="line"></div>'):'')+this.ddesc;
- }
- }
- if (Game.Upgrades[j].kitten) {
- Game.Upgrades[j].descFunc = function() {
- return ((Game.ascensionMode!=1 && impUns.tierCheck(Game.Upgrades[j].tier))?('<div style="font-size:80%;text-align:center;">'+loc("Unshackled! <b>+10%</b> power.")+'</div><div class="line"></div>'):'')+this.ddesc;
- }
- }
- if (Game.Upgrades[j].name.includes('mouse') && Game.Upgrades[j].name != 'Unshackled mouse') {
- Game.Upgrades[j].descFunc = function() {
- return ((Game.ascensionMode!=1 && impUns.tierCheckM(Game.Upgrades[j].tier))?('<div style="font-size:80%;text-align:center;">'+loc("Unshackled! Additional <b>+0.25%</b> of your CpS per click.")+'</div><div class="line"></div>'):'')+this.ddesc;
- }
- }
- }
- for (let j in Game.cookieUpgrades) {
- Game.cookieUpgrades[j].descFunc = function() {
- return ((Game.ascensionMode!=1 && Game.Upgrades['Unshackled cookie'].bought)?('<div style="font-size:80%;text-align:center;">'+loc("Unshackled! Additional <b>+1%</b> production multiplier.")+'</div><div class="line"></div>'):'')+this.ddesc;
- }
- }
- }
- this.adjust = function() {
- eval('Game.CalculateGains='+Game.CalculateGains.toString().replace(`if (Game.Has('Kitten helpers')) catMult*=(1+Game.milkProgress*0.1*milkMult);
- if (Game.Has('Kitten workers')) catMult*=(1+Game.milkProgress*0.125*milkMult);
- if (Game.Has('Kitten engineers')) catMult*=(1+Game.milkProgress*0.15*milkMult);
- if (Game.Has('Kitten overseers')) catMult*=(1+Game.milkProgress*0.175*milkMult);
- if (Game.Has('Kitten managers')) catMult*=(1+Game.milkProgress*0.2*milkMult);
- if (Game.Has('Kitten accountants')) catMult*=(1+Game.milkProgress*0.2*milkMult);
- if (Game.Has('Kitten specialists')) catMult*=(1+Game.milkProgress*0.2*milkMult);
- if (Game.Has('Kitten experts')) catMult*=(1+Game.milkProgress*0.2*milkMult);
- if (Game.Has('Kitten consultants')) catMult*=(1+Game.milkProgress*0.2*milkMult);
- if (Game.Has('Kitten assistants to the regional manager')) catMult*=(1+Game.milkProgress*0.175*milkMult);
- if (Game.Has('Kitten marketeers')) catMult*=(1+Game.milkProgress*0.15*milkMult);
- if (Game.Has('Kitten analysts')) catMult*=(1+Game.milkProgress*0.125*milkMult);
- if (Game.Has('Kitten executives')) catMult*=(1+Game.milkProgress*0.115*milkMult);
- if (Game.Has('Kitten admins')) catMult*=(1+Game.milkProgress*0.11*milkMult);
- if (Game.Has('Kitten strategists')) catMult*=(1+Game.milkProgress*0.105*milkMult);`,
- `
- if (Game.Has('Kitten helpers')) catMult*=(1+Game.milkProgress*0.1*milkMult*(impUns.tierCheck(1)?1.1:1));
- if (Game.Has('Kitten workers')) catMult*=(1+Game.milkProgress*0.125*milkMult*(impUns.tierCheck(2)?1.1:1));
- if (Game.Has('Kitten engineers')) catMult*=(1+Game.milkProgress*0.15*milkMult*(impUns.tierCheck(3)?1.1:1));
- if (Game.Has('Kitten overseers')) catMult*=(1+Game.milkProgress*0.175*milkMult*(impUns.tierCheck(4)?1.1:1));
- if (Game.Has('Kitten managers')) catMult*=(1+Game.milkProgress*0.2*milkMult*(impUns.tierCheck(5)?1.1:1));
- if (Game.Has('Kitten accountants')) catMult*=(1+Game.milkProgress*0.2*milkMult*(impUns.tierCheck(6)?1.1:1));
- if (Game.Has('Kitten specialists')) catMult*=(1+Game.milkProgress*0.2*milkMult*(impUns.tierCheck(7)?1.1:1));
- if (Game.Has('Kitten experts')) catMult*=(1+Game.milkProgress*0.2*milkMult*(impUns.tierCheck(8)?1.1:1));
- if (Game.Has('Kitten consultants')) catMult*=(1+Game.milkProgress*0.2*milkMult*(impUns.tierCheck(9)?1.1:1));
- if (Game.Has('Kitten assistants to the regional manager')) catMult*=(1+Game.milkProgress*0.175*milkMult*(impUns.tierCheck(10)?1.1:1));
- if (Game.Has('Kitten marketeers')) catMult*=(1+Game.milkProgress*0.15*milkMult*(impUns.tierCheck(11)?1.1:1));
- if (Game.Has('Kitten analysts')) catMult*=(1+Game.milkProgress*0.125*milkMult*(impUns.tierCheck(12)?1.1:1));
- if (Game.Has('Kitten executives')) catMult*=(1+Game.milkProgress*0.115*milkMult*(impUns.tierCheck(13)?1.1:1));
- if (Game.Has('Kitten admins')) catMult*=(1+Game.milkProgress*0.11*milkMult*(impUns.tierCheck(14)?1.1:1));
- if (Game.Has('Kitten strategists')) catMult*=(1+Game.milkProgress*0.105*milkMult*(impUns.tierCheck(15)?1.1:1));`));
- eval('Game.mouseCps='+Game.mouseCps.toString().replace(`if (Game.Has('Plastic mouse')) add+=Game.cookiesPs*0.01;
- if (Game.Has('Iron mouse')) add+=Game.cookiesPs*0.01;
- if (Game.Has('Titanium mouse')) add+=Game.cookiesPs*0.01;
- if (Game.Has('Adamantium mouse')) add+=Game.cookiesPs*0.01;
- if (Game.Has('Unobtainium mouse')) add+=Game.cookiesPs*0.01;
- if (Game.Has('Eludium mouse')) add+=Game.cookiesPs*0.01;
- if (Game.Has('Wishalloy mouse')) add+=Game.cookiesPs*0.01;
- if (Game.Has('Fantasteel mouse')) add+=Game.cookiesPs*0.01;
- if (Game.Has('Nevercrack mouse')) add+=Game.cookiesPs*0.01;
- if (Game.Has('Armythril mouse')) add+=Game.cookiesPs*0.01;
- if (Game.Has('Technobsidian mouse')) add+=Game.cookiesPs*0.01;
- if (Game.Has('Plasmarble mouse')) add+=Game.cookiesPs*0.01;
- if (Game.Has('Miraculite mouse')) add+=Game.cookiesPs*0.01;
- if (Game.Has('Aetherice mouse')) add+=Game.cookiesPs*0.01;
- if (Game.Has('Omniplast mouse')) add+=Game.cookiesPs*0.01;`,`
- if (Game.Has('Plastic mouse')) add+=Game.cookiesPs*0.01*(impUns.tierCheckM(1)?1.25:1);
- if (Game.Has('Iron mouse')) add+=Game.cookiesPs*0.01*(impUns.tierCheckM(2)?1.25:1);
- if (Game.Has('Titanium mouse')) add+=Game.cookiesPs*0.01*(impUns.tierCheckM(3)?1.25:1);
- if (Game.Has('Adamantium mouse')) add+=Game.cookiesPs*0.01*(impUns.tierCheckM(4)?1.25:1);
- if (Game.Has('Unobtainium mouse')) add+=Game.cookiesPs*0.01*(impUns.tierCheckM(5)?1.25:1);
- if (Game.Has('Eludium mouse')) add+=Game.cookiesPs*0.01*(impUns.tierCheckM(6)?1.25:1);
- if (Game.Has('Wishalloy mouse')) add+=Game.cookiesPs*0.01*(impUns.tierCheckM(7)?1.25:1);
- if (Game.Has('Fantasteel mouse')) add+=Game.cookiesPs*0.01*(impUns.tierCheckM(8)?1.25:1);
- if (Game.Has('Nevercrack mouse')) add+=Game.cookiesPs*0.01*(impUns.tierCheckM(9)?1.25:1);
- if (Game.Has('Armythril mouse')) add+=Game.cookiesPs*0.01*(impUns.tierCheckM(10)?1.25:1);
- if (Game.Has('Technobsidian mouse')) add+=Game.cookiesPs*0.01*(impUns.tierCheckM(11)?1.25:1);
- if (Game.Has('Plasmarble mouse')) add+=Game.cookiesPs*0.01*(impUns.tierCheckM(12)?1.25:1);
- if (Game.Has('Miraculite mouse')) add+=Game.cookiesPs*0.01*(impUns.tierCheckM(13)?1.25:1);
- if (Game.Has('Aetherice mouse')) add+=Game.cookiesPs*0.01*(impUns.tierCheckM(14)?1.25:1);
- if (Game.Has('Omniplast mouse')) add+=Game.cookiesPs*0.01*(impUns.tierCheckM(15)?1.25:1);`));
- eval('Game.CalculateGains='+Game.CalculateGains.toString().replace(`mult*=(1+(typeof(me.power)==='function'?me.power(me):me.power)*0.01);`,`mult*=(1+(typeof(me.power)==='function'?me.power(me):me.power+(Game.Upgrades['Unshackled cookie'].bought))*0.01);`));
- }
- this.valid = function(build1, build2){
- let one = Game.Upgrades[build1.unshackleUpgrade].bought;
- let two = Game.Upgrades[build2.unshackleUpgrade].bought;
- if (one && two) {
- return true;
- }
- return false;
- }
- this.tierCheck = function(tier) {
- if (Game.Upgrades[Game.Tiers[tier].unshackleUpgrade].bought&&Game.Upgrades["Unshackled kitten"].bought) { return true; }
- return false;
- }
- this.tierCheckM = function(tier) {
- if (Game.Upgrades[Game.Tiers[tier].unshackleUpgrade].bought&&Game.Upgrades["Unshackled mouse"].bought) { return true; }
- return false;
- }
- if(Game.ready) this.allCreations()
- else Game.registerHook("create", this.allCreations)
- },
- save: function(){
- let str = "";
- for(let i of this.upgrades)str+=i.bought
- return str;
- },
- load: function(str){
- for(let i in this.upgrades)this.upgrades[i].bought=Number(str[i])
- Game.recalculateGains = 1;
- }
- })
Advertisement
Add Comment
Please, Sign In to add comment