Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- document.sUpgrade = 'transcendenceUpgrades';
- var str = "\n"+game.mods.sophie.queueLabelsAndValues.find(o=>o[0]==document.sUpgrade)[1].join("\n")+"\n";
- "\ngame.mods.sophie.aListToBuy = [];"+"\n"+str.replaceAll("\n", "', 'priceMutiplicator':1 } );\ngame.mods.sophie.aListToBuy.push( { 'name':'").replace("', 'priceMutiplicator':1 } );\n",'').replace(/game.mods.sophie.aListToBuy.push\( \{ 'name':'$/g , '');
- ^ code to print base of code, past it in console to list transcendenceUpgrades,
- see game.mods.sophie.queueLabelsAndValues for other upgrades
- /!\ Before using, you need to load the code at https://pastebin.com/raw/cfN9KFAc /!\
- */
- if(!game.mods || !game.mods.sophie)
- {
- console.error("/!\\ Before using, you need to load the code at https://pastebin.com/raw/cfN9KFAc /!\\ ");
- }
- // base of code generated by commented line 2 + 3 + 4 :
- game.mods.sophie.aListToBuy = [];
- game.mods.sophie.aListToBuy.push( { 'name':'blackObelisk', 'priceMutiplicator':10000 } );
- game.mods.sophie.aListToBuy.push( { 'name':'blackNexus', 'priceMutiplicator':10000 } );
- game.mods.sophie.aListToBuy.push( { 'name':'blackCore', 'priceMutiplicator':1000 } );
- game.mods.sophie.aListToBuy.push( { 'name':'singularity', 'priceMutiplicator':1000 } );
- game.mods.sophie.aListToBuy.push( { 'name':'blackLibrary', 'priceMutiplicator':10000 } );
- game.mods.sophie.aListToBuy.push( { 'name':'blackRadiance', 'priceMutiplicator':1000 } );
- game.mods.sophie.aListToBuy.push( { 'name':'blazar', 'priceMutiplicator':1000 } );
- //game.mods.sophie.aListToBuy.push( { 'name':'darkNova', 'priceMutiplicator':1 } );
- //game.mods.sophie.aListToBuy.push( { 'name':'mausoleum', 'priceMutiplicator':1 } );
- //game.mods.sophie.aListToBuy.push( { 'name':'holyGenocide', 'priceMutiplicator':1 } );
- game.mods.sophie.sResName = "relic";
- buildRec();
- function buildRec()
- {
- game.mods.sophie.sortedArray = fillPricesAndSort(game.mods.sophie.aListToBuy, game.mods.sophie.sResName);
- if(game.resPool.get(game.mods.sophie.sResName).value > game.mods.sophie.sortedArray[0].prices.find(o=>o.name == game.mods.sophie.sResName).val)
- {
- //console.log("Try to build "+game.mods.sophie.sortedArray[0].name);
- var sRet = game.mods.sophie.smartBuild(game.mods.sophie.sortedArray[0].name);
- console.log(sRet+" build "+game.mods.sophie.sortedArray[0].name);
- game.render();
- setTimeout(buildRec, 50);
- }
- else
- {
- console.log("transcendenceUpgrades end");
- }
- }
- function fillPricesAndSort(aArray)
- {
- for(var i=0; i<aArray.length; i++)
- {
- var aTmpPrices = game.mods.sophie.smartGetPrices(aArray[i].name);
- for (var j=0; j<aTmpPrices.length; j++)
- {
- aTmpPrices[j].val *= aArray[i].priceMutiplicator;
- }
- aArray[i].prices = aTmpPrices;
- }
- aArray.sort((a,b)=> a.prices.find(o=>o.name == game.mods.sophie.sResName).val - b.prices.find(o=>o.name == game.mods.sophie.sResName).val);
- return aArray;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement