diff --git a/.user.js b/.user.js index 1467ea6d0..85abab38d 100644 --- a/.user.js +++ b/.user.js @@ -1,22 +1,22 @@ // ==UserScript== -// @name AutoTrimps-genBTC -// @version 2.1.6.9-genbtc-3-23-2018 -// @namespace https://genbtc.github.io/AutoTrimps -// @updateURL https://genbtc.github.io/AutoTrimps/.user.js +// @name AutoTrimps-Zek +// @version 1.0-Zek +// @namespace https://Zorn192.github.io/AutoTrimps +// @updateURL https://Zorn192.github.io/AutoTrimps/.user.js // @description Automate all the trimps! -// @author zininzinin, spindrjr, Ishkaru, genBTC +// @author zininzinin, spindrjr, Ishkaru, genBTC, Zeker0 // @include *trimps.github.io* // @include *kongregate.com/games/GreenSatellite/trimps -// @connect *genbtc.github.io/AutoTrimps* +// @connect *Zorn192.github.io/AutoTrimps* // @connect *trimps.github.io* // @connect self // @grant none // ==/UserScript== var script = document.createElement('script'); -script.id = 'AutoTrimps-script'; +script.id = 'AutoTrimps-Zek'; //This can be edited to point to your own Github Repository URL. -script.src = 'https://genBTC.github.io/AutoTrimps/AutoTrimps2.js'; +script.src = 'https://KFrowde.github.io/AutoTrimps/AutoTrimps2.js'; //script.setAttribute('crossorigin',"use-credentials"); script.setAttribute('crossorigin',"anonymous"); document.head.appendChild(script); diff --git a/AutoTrimps2.js b/AutoTrimps2.js index 96766fc01..67fd41210 100644 --- a/AutoTrimps2.js +++ b/AutoTrimps2.js @@ -3,19 +3,19 @@ // @version 2.1.6.9b-genbtc-4-2-2018 // @updateURL https://github.com/genbtc/AutoTrimps/AutoTrimps2.js // @description Automate all the trimps! -// @author zininzinin, spindrjr, belaith, ishakaru, genBTC, Unihedron, coderPatsy +// @author zininzinin, spindrjr, belaith, ishakaru, genBTC, Unihedron, coderPatsy, Kfro, Zeker0 // @include *trimps.github.io* // @include *kongregate.com/games/GreenSatellite/trimps // @grant none // ==/UserScript== -var ATversion = '2.1.6.9b-genbtc-4-2-2018'; +var ATversion = '2.1.6.9b-genbtc-4-2-2018 + KFrowde + Zeker0'; //////////////////////////////////////////////////////////////////////////////// //Main Loader Initialize Function (loads first, load everything else)/////////// //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////// var atscript = document.getElementById('AutoTrimps-script') - , basepath = 'https://genBTC.github.io/AutoTrimps/' + , basepath = 'https://KFrowde.github.io/AutoTrimps/' , modulepath = 'modules/' ; //This should redirect the script to wherever its being mirrored from. @@ -52,7 +52,7 @@ function initializeAutoTrimps() { ATscriptLoad('','SettingsGUI'); //populate Settings GUI ATscriptLoad('','Graphs'); //populate Graphs //Load modules: - ATmoduleList = ['query', 'portal', 'upgrades', 'heirlooms', 'buildings', 'jobs', 'equipment', 'gather', 'stance', 'battlecalc', 'maps', 'breedtimer', 'dynprestige', 'fight', 'scryer', 'magmite', 'other', 'import-export', 'client-server', 'perks', /* 'perky', */ 'fight-info', 'performance']; + ATmoduleList = ['query', 'portal', 'upgrades', 'heirlooms', 'buildings', 'jobs', 'equipment', 'gather', 'stance', 'battlecalc', 'maps', 'breedtimer', 'dynprestige', 'fight', 'scryer', 'magmite', 'other', 'import-export', 'client-server', 'perks', /* 'perky', */ 'fight-info', 'performance', 'ATcalc']; for (var m in ATmoduleList) { ATscriptLoad(modulepath, ATmoduleList[m]); } @@ -62,13 +62,11 @@ function initializeAutoTrimps() { var changelogList = []; //changelogList.push({date: " ", version: " ", description: "", isNew: true}); //TEMPLATE -changelogList.push({date: "4/2", version: "v2.1.6.9b", description: "Import Export, Modules Load code Improvements. Multiple Buttons/Settings Were Combined. AutoPerks code was changed but still functions the same, except for a new algorithm that reduces the time to allocate for high helium players to near-instantaneous. Please test new algo with MODULES[\"perks\"].useAlgo2=true; .You can also clear all perks then allocate and have it work now. AutoMaps no longer considered as being in Lead challenge during Chall^2. ", isNew: true}); -changelogList.push({date: "3/23", version: "v2.1.6.9", description: "Game's Map at Zone can be used with AT now, to run maps forever. AutoMaps setting was combined with RunUniqueMaps (variable has changed from boolean false,true to a value 0,1,2). Settings file has been migrated as such. New: Map SpecialMod is sort of working, at least. Geneticist Infinity bugfix. New AGU Settings for 60% Void (fixed). Many Graphs fixes. AutoMaps changes. Equipment Cap, see README at GitHub DarkTheme fix. Scientists Fix. Zek450 Perks Preset Changed. Ongoing Development...", isNew: true}); -changelogList.push({date: "3/22", version: "v2.1.6.8", description: "Settings GUI, make better. Import/export improved. Graph buttons: Cycle Up/Down. Internal code fixes. New Graph: Nurseries", isNew: false}); -changelogList.push({date: "3/24", version: "v2.1.6.5-stable", description: "Set up Stable Repository for the faint of heart.", isNew: true}); -//changelogList.push({date: "3/20", version: "v2.1.6.7", description: "Entirely Re-Arranged Settings Layout. Enjoy! New: Display Tab: EnhanceGrid + Go AFK Mode. GUI: Pinned AT Tab menu bar to top when scrolling. Minimize/Maxi/Close Buttons. ShowChangeLog Button. New Graph: FluffyXP&Xp/Hr (starts@300)", isNew: false}); -//changelogList.push({date: "3/13", version: "v2.1.6.6", description: "Geneticist management changes. Equipment code improvements. ATscriptLoad improvements. attempt to track errors.", isNew: false}); -//changelogList.push({date: "3/7", version: "v2.1.6.5", description: "Save/Reload Profiles in Import/Export. Magmamancer graph. Magmite/Magma Spam disableable.", isNew: false}); +changelogList.push({date: "05/06/2018", version: "v2.2.2", description: "Fixed map at zone. Updated calcs. Praiding should work for everyone now. BW raiding still being tested, but should work. Ratios being tested, finding optimum coord and carp. Any bugs, please let me know, thanks. ", isNew: true}); +changelogList.push({date: "05/06/2018", version: "v2.2.1", description: "Updated Heirloom calc, should be 4.8 ready. Ratios will be updated soon. ", isNew: true}); +changelogList.push({date: "28/05/2018", version: "v2.2", description: "Added single use prestige raiding, BW raiding, looting II dump, amals are now calcd properly. ", isNew: true}); +//changelogList.push({date: "4/2", version: "v2.1.6.9b", description: "Import Export, Modules Load code Improvements. Multiple Buttons/Settings Were Combined. AutoPerks code was changed but still functions the same, except for a new algorithm that reduces the time to allocate for high helium players to near-instantaneous. Please test new algo with MODULES[\"perks\"].useAlgo2=true; .You can also clear all perks then allocate and have it work now. AutoMaps no longer considered as being in Lead challenge during Chall^2. ", isNew: true}); +//changelogList.push({date: "3/23", version: "v2.1.6.9", description: "Game's Map at Zone can be used with AT now, to run maps forever. AutoMaps setting was combined with RunUniqueMaps (variable has changed from boolean false,true to a value 0,1,2). Settings file has been migrated as such. New: Map SpecialMod is sort of working, at least. Geneticist Infinity bugfix. New AGU Settings for 60% Void (fixed). Many Graphs fixes. AutoMaps changes. Equipment Cap, see README at GitHub DarkTheme fix. Scientists Fix. Zek450 Perks Preset Changed. Ongoing Development...", isNew: false}); function assembleChangelog(date,version,description,isNew) { return (isNew) @@ -85,7 +83,7 @@ function printChangelog() { var footer = 'Ongoing Development - Report any bugs/problems please!\
Talk with the dev: genr8_#8163 @ AutoTrimps Discord Channel\ -
SeeReadMe Or check the commit history (if you want).' +
See ReadMe Or check the commit history (if you want).' , action = 'cancelTooltip()' , title = 'Script Update Notice
' + ATversion , acceptBtnText = "Thank you for playing AutoTrimps. Accept and Continue." @@ -175,7 +173,7 @@ function mainLoop() { if(getPageSetting('PauseScript') || game.options.menu.pauseGame.enabled || game.global.viewingUpgrades) return; ATrunning = true; if(game.options.menu.showFullBreed.enabled != 1) toggleSetting("showFullBreed"); //more detail - addbreedTimerInsideText.innerHTML = parseFloat(game.global.lastBreedTime/1000).toFixed(1) + 's'; //add hidden next group breed timer; + addbreedTimerInsideText.innerHTML = ((game.jobs.Amalgamator.owned > 0) ? Math.floor((new Date().getTime() - game.global.lastSoldierSentAt) / 1000) : Math.floor(game.global.lastBreedTime / 1000)) + 's'; //add breed time for next army; addToolTipToArmyCount(); //Add hidden tooltip for army count (SettingsGUI.js @ end) //Heirloom: if (mainCleanup() // Z1 new world @@ -208,25 +206,33 @@ function mainLoop() { //EXECUTE CORE LOGIC if (getPageSetting('ExitSpireCell') >0) exitSpireCell(); //"Exit Spire After Cell" (other.js) - if (getPageSetting('WorkerRatios')) workerRatios(); //"Auto Worker Ratios" (jobs.js) - if (getPageSetting('BuyUpgrades')) buyUpgrades(); //"Buy Upgrades" (upgrades.js) + //if (getPageSetting('loomprotect') == true) protectloom(); //"Exit Spire After Cell" (other.js) + if (getPageSetting('Praidingzone') >0) Praiding(); //Prestige Raiding (other.js) + if (getPageSetting('BWraid')==true){setTimeout(BWraiding(), 3000);} //BW Raiding (other.js) + if (getPageSetting('AutoAllocatePerks')==2) lootdump(); //Loot Dumping (other.js) + if (getPageSetting('BuyUpgradesNew') != 0) buyUpgrades(); //"Buy Upgrades" (upgrades.js) var agu = getPageSetting('AutoGoldenUpgrades'); if (agu && agu!='Off') autoGoldenUpgradesAT(agu); //"Golden Upgrades" (other.js) - if (getPageSetting('BuyStorage')) buyStorage(); //"Buy Storage" (buildings.js) - if (getPageSetting('BuyBuildings')) buyBuildings(); //"Buy Buildings" (buildings.js) - if (getPageSetting('BuyJobs')) buyJobs(); //"Buy Jobs" (jobs.js) - if (getPageSetting('ManualGather2')<=2) manualLabor(); //"Auto Gather/Build" (gather.js) - else if (getPageSetting('ManualGather2')==3) manualLabor2(); //"Auto Gather/Build #2" (") + if (getPageSetting('BuyBuildingsNew')===0); //"Buy Neither" (Buildings.js) + else if (getPageSetting('BuyBuildingsNew')==1) { buyBuildings(); buyStorage(); } //"Buy Buildings & Storage" (") + else if (getPageSetting('BuyBuildingsNew')==2) buyBuildings(); //"Buy Buildings" (") + else if (getPageSetting('BuyBuildingsNew')==3) buyStorage(); //"Buy Storage" (") + if (getPageSetting('BuyJobsNew')===0); //"Don't Buy Jobs" (Jobs.js) + else if (getPageSetting('BuyJobsNew')==1) { workerRatios(); buyJobs(); } //"Auto Worker Ratios" (") + else if (getPageSetting('BuyJobsNew')==2) buyJobs(); //"Manual Worker Ratios" (") + if (getPageSetting('ManualGather2')<=1) manualLabor(); //"Auto Gather/Build" (gather.js) + else if (getPageSetting('ManualGather2')==2) manualLabor2(); //"Auto Gather/Build #2" (") getPageSetting('AutoMaps') > 0 ? autoMap() : updateAutoMapsStatus(); //"Auto Maps" (automaps.js) - if (getPageSetting('GeneticistTimer') >= 0) autoBreedTimer(); //"Geneticist Timer" / "Auto Breed Timer" (autobreedtimer.js) + //if (getPageSetting('GeneticistTimer') >= 0) autoBreedTimer(); //"Geneticist Timer" / "Auto Breed Timer" (autobreedtimer.js) if (autoTrimpSettings.AutoPortal.selected != "Off") autoPortal(); //"Auto Portal" (hidden until level 40) (portal.js) if (getPageSetting('TrapTrimps') && game.global.trapBuildAllowed && game.global.trapBuildToggled == false) toggleAutoTrap(); //"Trap Trimps" if (aWholeNewWorld && getPageSetting('AutoRoboTrimp')) autoRoboTrimp(); //"AutoRoboTrimp" (other.js) if (aWholeNewWorld && getPageSetting('FinishC2')>0 && game.global.runningChallengeSquared) finishChallengeSquared(); // "Finish Challenge2" (other.js) autoLevelEquipment(); //"Buy Armor", "Buy Armor Upgrades", "Buy Weapons", "Buy Weapons Upgrades" (equipment.js) if (getPageSetting('UseScryerStance')) useScryerStance(); //"Use Scryer Stance" (scryer.js) - else if (getPageSetting('AutoStance')<=1) autoStance(); //"Auto Stance" (autostance.js) + else if (getPageSetting('AutoStance')<=1) autoStance(); //"Auto Stance" (stance.js) else if (getPageSetting('AutoStance')==2) autoStance2(); //"Auto Stance #2" (") + else if (getPageSetting('AutoStance')==3) autoStance3(); //"Auto Stance #3" (") if (getPageSetting('UseAutoGen')) autoGenerator(); //"Auto Generator ON" (magmite.js) ATselectAutoFight(); // pick the right version of Fight/AutoFight/BetterAutoFight/BAF2 (fight.js) var forcePrecZ = (getPageSetting('ForcePresZ')<0) || (game.global.world1genbtcPLjAEk6RnfC66chYniFKfP7vASNo one has donated bitcoin yet - be the first and I will be ever eternally grateful
-Automation script for the idle incremental game Trimps, originally based on the zininzinin fork and modified by genBTC (genr8_ on discord)
+# AutoTrimps + Zek [![Join the chat at https://gitter.im/AutoTrimps/Lobby](https://badges.gitter.im/AutoTrimps/Lobby.svg)](https://gitter.im/AutoTrimps/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) ## Discussion / Discord Channel @@ -9,7 +6,11 @@ Automation script for the idle incremental game Trimps, originally based on the Discord is a chat program. Come to talk about AutoTrimps, for help, or suggestions for new features : https://discord.gg/0VbWe0dxB9kIfV2C (same one as zininzinin) ## Current Version (full changes below) - Ongoing Development! -- This version has beta changes by genBTC, forked from GenBTC. Including Autostance 3, Update to Swiffy Overlay, and Merging of buttons. Please tell me about bugs on Discord +- Too many to list +- This version has beta changes by Zek, forked from GenBTC + Kfro. Including Autostance 3, Update to Swiffy Overlay, and Merging of buttons. Please tell me about bugs on Discord + +Zek - New changes will be posted here^ + - Mar 24, BATTLECALC CHANGES: - BattleCalc.js - getBattleStats() updated for the stuff added to AutoStance 1 a while ago, Life,C2,StillRowing, Copied from game code. - Mar 24, EQUIPMENT CHANGES: @@ -41,12 +42,12 @@ took a break ## Script Installation **Please backup your game via export before and during use to prevent losing your save due to corruption!** -***Option 1***: Install TamperMonkey (Chrome) or GreaseMonkey (Firefox) +***Your only Option***: Install TamperMonkey (Chrome) or GreaseMonkey (Firefox) -**EASY INSTALL click here: https://github.com/genbtc/AutoTrimps/raw/gh-pages/.user.js** (the Monkeys will detect this and prompt you to install it) +**EASY INSTALL click here: https://github.com/Zorn192/AutoTrimps/raw/gh-pages/.user.js** (the Monkeys will detect this and prompt you to install it) Overly detailed Chrome/TamperMonkey Instructions: -- Open the TamperMonkey dashboard and go to utilities – in the URL box paste https://github.com/genbtc/AutoTrimps/raw/gh-pages/.user.js and click IMPORT +- Open the TamperMonkey dashboard and go to utilities – in the URL box paste https://github.com/Zorn192/AutoTrimps/raw/gh-pages/.user.js and click IMPORT - Alternatively, paste the contents of `.user.js` into a user script (pay attention, it says .user.js - this contains 4 lines of code that loads AutoTrimps2.js) - The script should automatically load everytime you go to https://trimps.github.io or the game on Kongregate - You will know you have the script loaded if you see the Automation and Graphs buttons in the game menu at the bottom @@ -56,26 +57,7 @@ Overly detailed Chrome/TamperMonkey Instructions: FireFox/GreaseMonkey instructions: - GreaseMonkey identifies userscripts by visiting a URL that ends with ".user.js" in them: -- Visit this URL, and Agree to install the userscript: https://github.com/genbtc/AutoTrimps/raw/gh-pages/.user.js - -***Option 2***: Via a Bookmark (does not work with Kongregate - maybe it does now that I added an include kongregate line to the file) -- Create new bookmark and set its target to: -```js -javascript:with(document)(head.appendChild(createElement('script')).src='https://genbtc.github.io/AutoTrimps/AutoTrimps2.js')._ -``` -- This bookmark button has to be clicked manually after you go to https://trimps.github.io - -***Option 3***: Paste into console (last resort for debugging, dont do this) - -Chrome Instructions -- You can copy and paste the entire contents of AutoTrimps2.js into the Dev Console (F12 in chrome) of the page. (make sure the dropdown box to the left of "Preserve Log" is set to "top" - or "mainFrame (indexKong.html)" for kongregate. - -Firefox Instructions -- Push Ctrl+Shift+K to go into console and look for the "Select an iframe" icon, and choose http://trimps.github.io/indexKong.html - -Notes: -If you would like to use only the graphs module, replace `AutoTrimps2.js` with `Graphs.js` in the bookmark or your userscript. -Feel free to submit any bugs/suggestions as issues here on github. +- Visit this URL, and Agree to install the userscript: https://github.com/Zorn192/AutoTrimps/raw/gh-pages/.user.js ***LowLevelPlayer Notes:*** @@ -83,200 +65,6 @@ Feel free to submit any bugs/suggestions as issues here on github. The fact that it works at all is misleading new players into thinking its perfect. Its not. If your highest zone is under z60, you have not unlocked the stats required, and have not experienced the full meta with its various paradigm shifts. If you are just starting, my advice is to play along naturally and use AutoTrimps as a tool, not a crutch. Play with the settings as if it was the game, Dont expect to go unattended, if AT chooses wrong, and make the RIGHT choice yourself. Additionally, its not coded to run one-time challenges for you, only repeatable ones for helium. During this part of the game, content is king - automating literally removes the fun of the game. If you find that many flaws in the automation exist for you, level up. Keep in mind the challenge of maintaining the code is that it has to work for everyone. AT cant see the future and doesnt run simulations, it exists only in the present moment. Post any suggestions on how it can be better, or volunteer to adapt the code, or produce some sort of low-level player guide with what youve learned. Happy scripting! -genBTC -## Current feature changes by genBTC -- Current as of : -- *** 11/7/2017, v2.1.5.7 Merge DerSkagg PullRequest In*** -- New AutoGoldenUpgrades - After max void golden upgrades, alternate between buying helium and battle upgrades. Or Choose a Zone to switch over completely at. -- *** 8/26/2017, v2.1.5.6 Merge Unihedro Branch In*** -- Uni changes include: Dont buy Coords, Trimple Z#, Scryer Suicide Z#, Safety First, Forced Prestige Z#, Prefer Metal Maps, Nursery Count Pre-Spire, Finish Challenge2, DontCare/PowerSaving/DontRushVoids, Prestige Skip 2, Auto Eggs. -- See his branch here @ https://github.com/Unihedro/AutoTrimps -- Past Changes: -- *** April Unihedro Branch Changes *** -- 4/17 v2.1.5.5u3 - fix improvedautostorage hijack -- Fixed a certain specific stupid bug caused by how graph overwrites some functions unnecessarily -- 4/16 v2.1.5.5u2 - do more map stacks if not enoughHealth -- No longer forces Buy Storage off -- 4/15 v2.1.5.5u1 - new settings BuyOvclock -- 4/14 v2.1.5.4u6 - Improved nurseries map and betterautostorage -- 4/14 v2.1.5.4u5 - Auto Eggs, some more 4.3 support -- 4/12 v2.1.5.4u4 - AutoTrimps lifecycle changes -- 4/11 v2.1.5.4u3 - fixed spire farming, autogen supply zone -- 4/10 v2.1.5.4u2 - PrestigeSkip2 -- 4/09 v2.1.5.4u1 - Magma: AutoGen, AutoGen2 -- 4/08 v2.1.5.3u6 - ForcePresZ -- 4/07 + 4/06: -- U5: FinishC2, PowerSaving -- U4: PreferMetal, PreSpireNurseries -- U3: LinearZ, SupplyWall, OneTimeOnly -- U2: TrimpleZ, ScryerDieZ, IgnoreCrits -- U1: Don't buy Coords / Skip challenge maps -- ***1/10/2017*** -- new setting Buy Warp to Hit Coord (genbtc page) -- AutoStance support for Plague/Bogged Daily -- Update Map Sliders decisions - less loot% reduction -- ***12/23/2016*** -- v2.1.5.2-genbtc-12-23-2016+Modular -- ***12/20*** -- Gear tab to Settings UI. Customize your equip level cap. -- Internally Disable Farm mode if we have nothing left to farm for (no prestiges,capped equip) to prevent infinite farming. -- ***12/19*** -- Skip prestige if >=2 unbought prestiges (maps settings) -- Bug Fixes + redo geneticists buying again. -- NEW: Add Map Bonus Graph -- ***12/18*** -- Fixed: dynamic prestige not reverting to dagger after the target zone is reached -- Graphs - clear time, removed #2s, (essence graph might be messed up but its fixed now) -- Change forceAbandonTrimps "sitting around breeding forever when not on full anti stacks" from 60 seconds to 31. -- Fix BAF2 #4 for players without geneticists. -- Buildings cost efficiency + jobs low level fixes -- Some low level jobs and Buildings fixes. -- ***12/14*** -- NEW: AutoAllocatePerks (genbtc settings) - uses AutoPerks ratio system to Auto Spend Helium during AutoPortal -- ***12/12*** -- Fix: HeHrBuffer will now portal midzone if you exceed 5x your buffer -- ***12/10*** -- New: AutoStartDaily option (read tooltip) -- New way to buy geneticists (fast) -- ***12/9*** -- Fixed: DynamicPrestige=-1 wasnt disabling it -- Fixed: needPrestige conflicting with needFarmSpire -- ***12/8*** -- FarmWithNomStacks changes (read tooltip) -- Nom stacks now calced by Autostance1 -- Default VoidDifficultyCheck is now defaulting to 6 -- ***12/6*** -- AutoMagmiteSpender now has a new cost efficiency algorithm.(read new tooltip) -- AT now does its Nursery map for Blacksmithery owners at z50 not z60, to prevent breeding time-stalls.(+fixed bug) -- ***12/4*** -- Completely rewrite lots of the Graphs.js code. -- Converted the codebase into individual files, to help people find stuff. -- For automaps, Not enough Health doesnt do 10 maps anymore, it only does 1. -- Adjust enoughHealth calculation for people without D stance. -- Add a farm lower level zones option (maps settings tab). -- ***12/2*** -- Changed Automaps farming/damage/health calculations. AutoMaps farms above 16x now. (10x in Lead, 10x in Nom with the Farm on >7 NOMstacks option). -- Hover over the Farming/Advancing/WantMoreDamage status area to see the precise number now. Read the AutoMaps tooltip in settings for slightly more information. -- Add dailymods: weakness, rampage, oddtrimpnerf, eventrimpbuff, badStrength, badMapStrength, bloodthirst to Autostance1. (and AS2 has minDmg, maxDmg too) -- ***11/29*** -- Puts a 5 second pause in between cycling AutoMagmiteSpender from "on portal" to "always" so you can switch it to "off" without it spending all your magmite. -- Make multi-toggle tooltip title give the name of all 3 options to be more descriptive. -- new calcBadGuyDmg function, used in DynamicGyms. -- stop using stopScientistsatFarmers and use MaxScientists instead. -- hire 1 miner,farmer,lumber each cycle even if our breed timer is low to do something tiny, so earlygame isnt stuck on 0 -- fix/re-arrange lazy Trainers duplicate code -- exit autostance if Formations isnt done (like level <60) -- Lead damage stacks were wrongly on 0.0005, its 0.0003. -- Trimpicide Mod #1: consider Titimp = forceAbandon and kill titimp if theres less than 5 seconds left on it or, we stand to gain more than 5 antistacks. -- Trimpicide Mod #2: if we're sitting around breeding for >60s while being over 5 anti stacks away from target. -- Include beta autostance2 code that im working on so I dont have a bunch of crazy local commits. -- ***11/26*** -- Patch corruption detection, and Scryer tooltips -- Dynamic Gyms - dont buy gyms if your block is higher than enemy attack -- Auto Magmamancer management after 10 mins -- Auto Finish Daily on portal (genbtc settings) -- Gym Wall (genbtc settings) -- ***11/23*** -- Auto Magmite Spender can now be toggled to Always Run -- AutoTrimpicide/Force-Abandon is now toggleable -- New Better AutoFight #2(optional) -- New Hover tooltips: Screenshot beta0.1, more to come -- ***11/22*** -- Auto Spend Magmite before portaling - (setting in genBTC page)- Part 1 buys any permanent one-and-done upgrades in order from most expensive to least. Part 2 then finds/buys the cheapest non-permanent multi-upgrade and repeats itself until you cant buy anymore. -- Buy 2 buildings instead of 1 if we have the mastery -- Entirely remove high lumberjack ratio during Spire. -- During Magma with 3000+ Tributes, switch to 1/12/12 auto-worker-ratios instead of 1/2/22. -- Add a 10 second timeout Popup window that can postpone Autoportal when clicked. -- Added a No Nurseries Until setting, in genBTC page -- ***11/20*** -- Fixed spire map bug -- Added new ratios to AutoPerks (ZXV3,truth_late) -- AutoFight if timer is <0.5 not <0.1 now -- ***11/19*** -- Doesnt run the 10 maps for Mapbonus before Spire now. Please increase/adjust your MinutesBeforeSpire Timer accordingly (the 10 maps were never accounted for in that timer). -- Re-arranged all the categories in the settings window and updated tooltips -- Kill your trimps (AutoTrimpicide) for Anti-Stacks more often - -## Gap in Changelog exists here. - -## Prior feature changes by genBTC (up to date as of 8/5/2016): -- Minutes to Farm Before Spire - force some time to be spent so you can for sure complete Spire (recommended: 3-10 minutes) -- Auto Upgrade Heirlooms - spends ALL your nullifium on the recommended upgrades -- Auto Golden Upgrades = Buys all the Golden Helium, Battle, or Voids when available. -- Always Runs 10 maps for 200% map bonus before attempting Spire (happens after the first death if you don't select "Map At Spire" in regular Trimps settings) -- AutoHeirlooms2 - new algorithm to sort/carry/recycle the Heirlooms (the original had a bug) -- Cap Trainers to a % of Tributes - Only buy a trainer when its cost is less than X% of the cost of a tribute. Prevents from competing with food resources, if you care. -- Run Bionic Before Spire - meant as a one time function (like max tox is) to farm the Bionic Wonderland maps for a LONG time(2 hours-ish) before entering Spire. (not HE/hr efficient) -- Dynamic Prestige: Skip prestiges at the beginning of the run which saves time, and delay them until the end when you need them most and can provide resources from farming too) -- Helium per Hour Portal "Buffer" - now you can customize how much He/Hr is allowed to drop before portaling -- Auto Robo Trimp - activate the MagnetoShriek ability on the bosses every 5 levels starting from the level you specify. (recommended set to 60) - -## Individual changes (from pinned messages on the Discord channel) -- 7/30 Patch heirlooms2 not carrying all protected heirlooms due to some indexing bug -- 7/28 Add 3 new graphs. Update Graphs, fix He/hr shifted by 1 bug. -- 7/27 Works on level 1 fresh new games a lot better, and added a new function Auto Upgrade Heirlooms which spends ALL your nullifium on the advised upgrade automatically -Also bugfix Adjust storage buying so that the script cannot buy a storage building before it is unlocked at level 1 and 70% -- 7/23 Important Fix for Heirloom2 and fix tooltips. -Reason: It was trying too hard to maintain equal shield/staff amounts, now it will not leave any better heirlooms (rarity/mods) in the temporary "extras" pile. -- 7/23 ~~Automatically gets 10 map stacks During Spire.~~ -- 7/22 Add new feature: Auto Golden Upgrades (in genBTC advanced settings) -- 7/22 Brand new AutoHeirlooms2 algorithm & Dynamic Prestige Algorithm (by Hyppy) -There is a new setting in the genBTC settings called "AutoHeirlooms2" and this will override the original. -I have not immediately switched over because Heirlooms are sensitive and I dont want to be responsible for anyone's heirlooms losses -So when you enable this new setting for the new algorithm, Take notice of what is going on, and manually "Protect" button any heirlooms you need to before portal-recycling -This image is a quick documentation of the heirloom carry bug, and the fix: https://puu.sh/qb6zj/903364c3d2.png -- 7/21 Fix helium per hour portal bug. -- 7/20 Dynamic Prestige now works with Helium Per Hour Autoportal setting! It uses the Last Run's portal zone in this situation. -- 7/17 Add Corruption handling for 2 of the corruption types (Strong and Tough). -- 7/16 Dynamic Prestige has been altered, if you are having a bug, reload, toggle your prestige dropdown setting to something else, and back, and portal to start a fresh run. -- 7/16 Added a new "Protect Heirloom" button in the Heirlooms dialog: Mark certain heirlooms from being auto-recycled on portal if/when a better one is found by the AutoHeirloom script. -- 7/6 New EasyMode Worker Ratios, >1000 tributes = 1/1/10 and >1500 tributes = 1/2/22 - -## Feature changes added by genBTC since before 4/27/2016 and Trimps version 3.22: -- Change Genetecist Timer to 10 sec instead of 11sec. (was commonly showing 11.4s because it rounds. that is too much) -- 'Farm on >7 NomStacks': During Nom, take precautions not to get too many stacks. (On Improbability(cell 100). Meant to be used with DisableFarming (otherwise farming would take care of this, but its slower). If Improbability already has 5 NomStacks, stack 30 Anticipation. If the Improbability has >7 NomStacks on it, get +200% dmg from MapBonus. If we still cant kill it, enter Farming mode at 30 stacks, Even with DisableFarming On!') -- Dynamic Siphonology - only when needed based on (Enemyhealth / baseDamage) -Created a new setting in the advanced options. "Dynamic Siphonology". -It will switch to the proper Map-level as soon as the current map is completed. -So you can choose original behavior of always using the lowest level map, -or the modified behavior, which increases the map level based on your damage. -The old behavior of "no siphonology at all when using DisableFarming" is no longer applied, under any circumstance. -- Skip Gear Level 58&59: Dont Buy Gear during level 58 and 59, wait till level 60, when cost drops down to 10%. -- Cap Equip to 10: Do not level equipment past 10. Similar to LimitEquipment, Helps for early game when the script wants to level your tier2s to 40+, but unlike LimitEquipment, should not impact Zone 60+. -- Delay Armor When needed: Delay buying armor prestige upgrades during Want More Damage or Farming automap-modes. -- Add console debug messages to the map selection/buying/running section. -- Put a numerical status on the "Farming"&"Want more Damage" UI indicator. -This way you can see things progressing, instead of wondering what is going on. -The number pertains to Enemy Health / Base Damage(non-stance). Above 16 means farm. Below 10 means stop farming. -- Farm @ cell 61 (megamining) not 82 (megafarming). -- Farm if enemyHealth divided by baseDamage (in X stance) is between 10 and 16. (Used to be 10 and 15). -Means it will farm very slightly less. -- Take Map Bonus +%Damage into account for farming decisions. (so you can farm less.) -- Stop from firing all scientists when it reaches the threshhold. (250k farmers) -Farmers will be maintained at the current level, not fired entirely. I -- Add WarpStation Cap (deltaGiga+baseWarp) feature. -Stop making warpstations if we are past the deltagiga + base -warpstations (and no giga upgrade is available). Will also remove the -green highlight around the icon. This will save you metal to use on -weapons,armor, etc. -NOTE: (the cap will ONLY work on incremental buys, it will not come into -effect when the game uses a gigastation and immediately BULK-buys as -many warpstations as it can afford. In this way it can buy over the cap. I think this is actually preferrable.) -- Add an Export/Import/Reset AutoTrimps settings buttons. -- Add a seperate "genBTC's settings UI" button, -- Better Tooltip Help - -**Voidmaps and Toxicity changes:** - -- Voidmaps: Do voids @ cell 96 Instead of 98. (to prevent overkill). Before, it only applied to Tox runs. -- Voidmap + Max-Tox runs: If we need to do a voidmap and have already more than 1415 stacks, (smallest voidmap is 85 cells) consider tox-stack finished. -- For normal-tox: Instead of starting the voidmap at 1400 stacks, start at (1500-theVoidmap.size) in case its an 85 cell voidmap. -- Regular Tox-Run: Avoid another non-unique map cycle due to having the amount of tox stacks we need. -- Max-Tox Run: During a Toxicity + Max Tox run AutoPortal, unset the MaxTox setting from the settings page, so we dont' run 2 Max-Tox's in a row (will go back to normal Tox run). - -## Original zininzinin version's historical changes -See changelog at the original version's github page: https://github.com/zininzinin/AutoTrimps/blob/c8eac4c80d0a1a5ebe36bc44c7655c335a2dea7b/README.md#recent-changes - - ## Easy explanation of Colors for EquipUpgrades / prestiges highlights - white - Upgrade is not available - yellow - Upgrade is not affordable diff --git a/SettingsGUI.js b/SettingsGUI.js index 8b88d2df2..78de7f45f 100644 --- a/SettingsGUI.js +++ b/SettingsGUI.js @@ -28,7 +28,7 @@ function automationMenuInit() { newContainer.setAttribute("onmouseover", 'tooltip(\"Toggle Automapping\", \"customText\", event, \"Toggle automapping on and off.\")'); newContainer.setAttribute("onmouseout", 'tooltip("hide")'); var abutton = document.createElement("SPAN"); - abutton.appendChild(document.createTextNode("Auto Maps")); + abutton.appendChild(document.createTextNode("Auto Maps")); abutton.setAttribute("id", "autoMapLabel"); var fightButtonCol = document.getElementById("battleBtnsColumn"); newContainer.appendChild(abutton); @@ -178,6 +178,7 @@ function initializeAllTabs() { createTabs("Jobs", "Jobs - Worker Settings"); createTabs("Gear", "Gear - Equipment Settings"); createTabs("Maps", "Maps - AutoMaps & VoidMaps Settings"); + createTabs("Spire", "Spire - Settings for Spires"); createTabs("Combat", "Combat & Stance Settings"); createTabs("Scryer", "Scryer Settings"); createTabs("Magma", "Dimensional Generator & Magmite Settings"); @@ -239,28 +240,25 @@ function initializeAllSettings() { //CORE: //Line1: - createSetting('ManualGather2', ['Gather/Build OFF', 'Auto Gather/Build', 'Science Research OFF', 'Auto Gather/Build #2'], '4-Way Button. Auto Gathering of Food,Wood,Metal(w/turkimp) & Science. Auto speed-Builds your build queue. Now able to turn science researching off for the achievement Reach Z120 without using manual research. The decision between AutoGather 1 or 2 is up to your own discretion and they should be similar.', 'multitoggle', 1, null, "Core"); - createSetting('BuyUpgrades', 'Buy Upgrades', 'Autobuy non equipment Upgrades', 'boolean', true, null, "Core"); - createSetting('TrapTrimps', 'Trap Trimps', 'Automatically trap trimps when needed, including building traps. (when you turn off, make sure you also turn off the ingame AutoTraps button)', 'boolean', true, null, "Core"); - createSetting('ManageBreedtimer', 'Auto Breed Timer', 'Genetecist management is controlled by the Timer setting box to the right, not this.
Explanation:
[ON](Green): All this does is auto-choose the appropriate timer for various challenges (0, 3.5s, 10s, 30s).
[OFF](Red): You set the Timer yourself! Even if this is red, it still tampers with genetecists if the timer is >= 0.
Note: Using AutoStance is recommended to survive the full 30 seconds or else Auto will probably be undesirable.', 'boolean', true, null, "Core"); - createSetting('UsePatience', 'Enable Patience', 'Sets the default breed timer to 45 seconds if you have the Patience mastery.', 'boolean', true, null, 'Core'); - createSetting('GeneticistTimer', 'Geneticist Timer', 'Manages the breed timer by hiring/firing Geneticists for the purpose of setting the ideal anticpation stacks. Disable with -1 to disable the Hiring/Firing of geneticists.
Info: Potency and Nursery buying behavior is adjusted dynamically (and disabling no longer disables potency). The Automatic Genetecist Hiring Process can best be summarized by: Buy/Wait/Die,Repeat. (if you do not die, no action is taken). Also self-kills (trimpicide) aka force abandon when your anti-stacks arent maxed out (conservatively).

Controlled automatically (locked) when Auto Breed Timer is on.', 'value', '30', null, "Core"); - createSetting('SpireBreedTimer', 'Spire Breed Timer', 'Set a different breed timer target for the Spire. Use -1 to disable this special setting.', 'value', -1, null, 'Core'); + createSetting('ManualGather2', ['Manual Gather/Build', 'Auto Gather/Build', 'Auto Gather/Build #2', 'Science Research OFF'], 'Controls what YOU do. Manual does nothing
The Decision between AutoGather 1 or 2 is up to you, and they should be similar. Auto Gathering of Food,Wood,Metal(w/turkimp) & Science. Auto speed-Builds your build queue.
You can disable science researching for the achievement: Reach Z120 without using manual research.', 'multitoggle', 1, null, "Core"); + createSetting('BuyUpgradesNew', ['Manual Upgrades', 'Buy All Upgrades', 'Upgrades no Coords'], 'Autobuys non-equipment upgrades (equipment is controlled in the Gear tab). The second option does NOT buy coordination (use this ONLY if you know what you\'re doing).', 'multitoggle', 1, null, "Core"); + createSetting('TrapTrimps', 'Trap Trimps', 'Automatically trap trimps when needed, including building traps. (when you turn this off, you may aswell turn off the in-game autotraps button, think of the starving trimps that could eat that food!)', 'boolean', true, null, "Core"); + createSetting('fastallocate', 'Fast Allocate', 'Turn on if your helium is above 500Qa. Not recommended for low amounts of helium. ', 'boolean', false, null, 'Core'); + createSetting('AutoAllocatePerks', ['Auto Allocate Off', 'Auto Allocate On', 'Dump into Looting II'], 'Uses the AutoPerks ratio based preset system to automatically allocate your perks to spend whatever helium you have when you AutoPortal. Does not change Fixed Perks: siphonology, anticipation, meditation, relentlessness, range, agility, bait, trumps, packrat, capable. NEW: Dump into Looting II, dumps all loot gained from previous portal at specified zone', 'multitoggle', 0, null, 'Core'); + createSetting('lootdumpz', 'Loot Dump Z', 'What zone to dump all earned helium from previous portal at. E.g; z230, will dump all helium from last run into looting II at zone 230.', 'value', -1, null, 'Core'); + createSetting('lootdumpa', 'Loot Dump Amount', 'What amount of helium to dump into Looting II. E.g; 1000, will dump 1000 helium into looting II until you can no longer afford to.', 'value', -1, null, 'Core'); + //Line2 - createSetting('AutoAllocatePerks', 'Auto Allocate Perks', 'Uses the AutoPerks ratio based preset system to automatically allocate your perks to spend whatever helium you have when you AutoPortal. ', 'boolean', false, null, 'Core'); - createSetting('AutoStartDaily', 'Auto Start Daily', 'With this on, the Auto Portal options will portal you into and auto-start the daily whenever available. Does Yesterday first, followed by Today. Falls back to selected challenge when both are complete.', 'boolean', false, null, 'Core'); - createSetting('AutoFinishDaily', 'Auto Finish Daily', 'With this on, the He/Hr Portal and Custom Auto Portal options will auto-finish the daily whenever they trigger and THEN portal you.', 'boolean', true, null, 'Core'); - createSetting('AutoFinishDailyZone', 'Finish Daily Zone Mod', 'Finish Daily by this # of zones earlier/later than your regular Custom AutoPortal zone or your Helium Dont Portal Before zone. When Auto Finish Daily is on. Tip: Tune your value of He/HrDontPortalBefore to suit the daily, and then tune this. Can accept negative numbers for earlier, ie: -7 means portal 7 zones earlier than normal. Can also use positive numbers to DELAY portaling for later. When used with He/Hr AutoPortal, the number of zones early does not FORCE end the daily at that zone, only ALLOW it to end that early: it will Always end when your HE/hr drops enough to trigger the portal. Use 0 to disable.', 'valueNegative', 0, null, 'Core'); - createSetting('FinishC2', 'Finish Challenge2', 'Finish / Abandon Challenge2 (any) when this zone is reached, if you are running one. For manual use. Recommended: Zones ending with 0 for most challenges. Disable with -1.', 'value', -1, null, 'Core'); - if (game.worldUnlocks.easterEgg) - createSetting('AutoEggs', 'AutoEggs', 'Click easter egg if it exists, upon entering a new zone. Warning: Quite overpowered. Please solemnly swear that you are up to no good.', 'boolean', false, null, 'Core'); - createSetting('ManualCoords', 'Don\'t buy Coords', 'Enable it if you know what you\'re doing, disable it if you don\'t know what you\'re doing. For when manually handling coords means a lot on challenges like Trapper.', 'boolean', false, null, 'Core'); - //NewLine3 - document.getElementById('ManualCoords').parentNode.insertAdjacentHTML('afterend','
'); - createSetting('AutoPortal', 'Auto Portal', 'Automatically portal. Will NOT auto-portal if you have a challenge active, the challenge setting dictates which challenge it will select for the next run. All challenge settings will portal right after the challenge ends, regardless. Helium Per Hour only portals at cell 1 of the first level where your He/Hr went down even slightly compared to the current runs Best He/Hr. Take note, there is a Buffer option, which is like a grace percentage of how low it can dip without triggering. Setting a buffer will portal mid-zone if you exceed 5x of the buffer. CAUTION: Selecting He/hr may immediately portal you if its lower-(use Pause AutoTrimps button to pause the script first to avoid this)', 'dropdown', 'Off', ['Off', 'Helium Per Hour', 'Balance', 'Decay', 'Electricity', 'Life', 'Crushed', 'Nom', 'Toxicity', 'Watch', 'Lead', 'Corrupted', 'Custom'], "Core"); - //document.getElementById("AutoPortal").style="font-size: 1.0vw;"; //fit it on 1 line. + createSetting('AutoStartDaily', 'Auto Start Daily', 'With this on, the Auto Portal options will portal you into and auto-start the daily whenever available. Starts from the oldest available, and works forwards. Falls back to selected challenge when there are no more dailies available.', 'boolean', false, null, 'Core'); + createSetting('AutoFinishDailyNew', 'Finish Daily Z Mod', 'The Helium Don\'t Portal Before and Custom AutoPortal settings will Auto-Finish the daily whenever they trigger and then portal you. This allows you to modify this # of zones ealier/later than your regular zone. Negative numbers mean you will portal EARLIER than normal. Positive numbers will DELAY portalling until a later zone. 0 does not mod your normal AutoPortal setting. When used with the He/Hr AutoPortal, this does not FORCE it to end early, only ALLOW it to if your He/Hr drops. To disable AutoPortal during a Daily, turn off the AutoPortal option or set this to 999!', 'valueNegative', 999, null, 'Core'); + createSetting('FinishC2', 'Finish Challenge2', 'Finish / Abandon Challenge2 (any) when this zone is reached, if you are running one. For manual use. Recommended: Zones ending with 0 for most Challenge2. Disable with -1. Does not affect Non-Challenge2 runs.', 'value', -1, null, 'Core'); + document.getElementById('FinishC2').parentNode.insertAdjacentHTML('afterend','
'); + + + //NewLine3 For Autoportal, it would be nice to add a 5s countdown, like with magma spending. + createSetting('AutoPortal', 'AutoPortal', 'Automatically portal. Will NOT auto-portal if you have a challenge active, the challenge setting dictates which challenge it will select for the next run. All challenge settings will portal right after the challenge ends, regardless. Helium Per Hour only portals at cell 1 of the first level where your He/Hr went down even slightly compared to the current runs Best He/Hr. Take note, there is a Buffer option, which is like a grace percentage of how low it can dip without triggering. Setting a buffer will portal mid-zone if you exceed 5x of the buffer. CAUTION: Selecting He/hr may immediately portal you if its lower-(use Pause AutoTrimps button to pause the script first to avoid this)', 'dropdown', 'Off', ['Off', 'Helium Per Hour', 'Balance', 'Decay', 'Electricity', 'Life', 'Crushed', 'Nom', 'Toxicity', 'Watch', 'Lead', 'Corrupted', 'Custom'], "Core"); createSetting('HeliumHourChallenge', 'Portal Challenge', 'Automatically portal into this challenge when using helium per hour or custom autoportal. Custom portals after cell 100 of the zone specified. ', 'dropdown', 'None', ['None', 'Balance', 'Decay', 'Electricity', 'Life', 'Crushed', 'Nom', 'Toxicity', 'Watch', 'Lead', 'Corrupted'], "Core"); - //document.getElementById("HeliumHourChallengeLabel").innerHTML = "Portal Challenge:"; //fit it on 1 line. + document.getElementById("HeliumHourChallengeLabel").innerHTML = "Portal Challenge:"; //fit it on 1 line. createSetting('CustomAutoPortal', 'Custom Portal', 'Automatically portal AFTER clearing this level.(ie: setting to 200 would portal when you first reach level 201)', 'value', '999', null, "Core"); createSetting('HeHrDontPortalBefore', 'Don\'t Portal Before', 'Do NOT allow Helium per Hour AutoPortal setting to portal BEFORE this level is reached. It is an additional check that prevents drops in helium/hr from triggering autoportal. Set to 0 or -1 to completely disable this check. (only shows up with Helium per Hour set)', 'value', '999', null, "Core"); createSetting('HeliumHrBuffer', 'He/Hr Portal Buffer %', 'IMPORTANT SETTING. When using the He/Hr Autoportal, it will portal if your He/Hr drops by this amount of % lower than your best for current run, default is 0% (ie: set to 5 to portal at 95% of your best). Now with stuck protection - Allows portaling midzone if we exceed set buffer amount by 5x. (ie a normal 2% buffer setting would now portal mid-zone you fall below 10% buffer).', 'value', '0', null, 'Core'); @@ -275,10 +273,9 @@ function initializeAllSettings() { //Buildings - createSetting('BuyStorage', 'Buy Storage', 'Will buy storage when resource is almost full. (like AutoStorage, even anticipates Jestimp)', 'boolean', true, null, "Buildings"); - createSetting('BuyBuildings', 'Buy Buildings', 'Will buy non storage buildings as soon as they are available', 'boolean', true, null, "Buildings"); + createSetting('BuyBuildingsNew', ['Buy Neither','Buy Buildings & Storage', 'Buy Buildings', 'Buy Storage'], 'AutoBuys Storage when it is almost full (it even anticipates Jestimp) and Non-Storage Buildings (As soon as they are available). Takes cost efficiency into account before buying Non-Storage Buildings.', 'multitoggle', 1, null, "Buildings"); //This should replace the two below createSetting('WarpstationCap', 'Warpstation Cap', 'Do not level Warpstations past Basewarp+DeltaGiga **. Without this, if a Giga wasnt available, it would level infinitely (wastes metal better spent on prestiges instead.) **The script bypasses this cap each time a new giga is bought, when it insta-buys as many as it can afford (since AT keeps available metal/gems to a low, overbuying beyond the cap to what is affordable at that first moment is not a bad thing). ', 'boolean', true, null, 'Buildings'); - createSetting('WarpstationCoordBuy', 'Buy Warp to Hit Coord', 'If we are very close to hitting the next coordination, and we can afford the warpstations it takes to do it, Do it! (even if we are over the Cap/Wall). Recommended with WarpCap/WarpWall. (has no point otherwise) ', 'boolean', true, null, 'Buildings'); + createSetting('WarpstationCoordBuy', 'Buy Warp to Hit Coord', 'If we are very close to hitting the next coordination, and we can afford the warpstations it takes to do it, Do it! (even if we are over the Cap/Wall). Recommended with WarpCap/WarpWall. (has no point otherwise) ', 'boolean', true, null, 'Buildings'); //Can this just be removed? if it happens, its a good thing. createSetting('MaxHut', 'Max Huts', 'Huts', 'value', '100', null, "Buildings"); createSetting('MaxHouse', 'Max Houses', 'Houses', 'value', '100', null, "Buildings"); createSetting('MaxMansion', 'Max Mansions', 'Mansions', 'value', '100', null, "Buildings"); @@ -288,42 +285,37 @@ function initializeAllSettings() { createSetting('MaxGateway', 'Max Gateways', 'WARNING: Not recommended to raise above 25', 'value', '25', null, "Buildings"); createSetting('MaxWormhole', 'Max Wormholes', 'WARNING: Wormholes cost helium! Values below 0 do nothing.', 'value', '0', null, "Buildings"); createSetting('MaxCollector', 'Max Collectors', 'recommend: -1', 'value', '-1', null, "Buildings"); - createSetting('MaxGym', 'Max Gyms', 'Advanced. recommend: -1', 'value', '-1', null, "Buildings"); - createSetting('MaxTribute', 'Max Tributes', 'Advanced. recommend: -1 ', 'value', '-1', null, "Buildings"); - createSetting('GymWall', 'Gym Wall', 'Conserves Wood. Only buys 1 Gym when you can afford X gyms wood cost (at the first one\'s price, simple math). -1 or 0 to disable. In other words, only allows gyms that cost less than 1/nth your currently owned wood. (to save wood for nurseries for new z230+ Magma nursery strategy). Takes decimal numbers. (Identical to the Warpstation wall setting which is why its called that). Setting to 1 does nothing besides stopping gyms from being bought 2 at a time due to the mastery.', 'value', -1, null, 'Buildings'); + createSetting('MaxGym', 'Max Gyms', 'Advanced. recommend: -1', 'value', '-1', null, "Buildings"); //Remove? + createSetting('MaxTribute', 'Max Tributes', 'Advanced. recommend: -1 ', 'value', '-1', null, "Buildings"); //Remove? (More gems is never a bad thing...) + createSetting('GymWall', 'Gym Wall', 'Conserves Wood. Only buys 1 Gym when you can afford X gyms wood cost (at the first one\'s price, simple math). -1 or 0 to disable. In other words, only allows gyms that cost less than 1/nth your currently owned wood. (to save wood for nurseries for new z230+ Magma nursery strategy). Takes decimal numbers. (Identical to the Warpstation wall setting which is why its called that). Setting to 1 does nothing besides stopping gyms from being bought 2 at a time due to the mastery.', 'value', -1, null, 'Buildings'); //remove? //Line3 createSetting('FirstGigastation', 'First Gigastation', 'How many warpstations to buy before your first gigastation', 'value', '20', null, "Buildings"); createSetting('DeltaGigastation', 'Delta Gigastation', 'How many extra warpstations to buy for each gigastation. Supports decimal values. For example 2.5 will buy +2/+3/+2/+3...', 'value', '2', null, "Buildings"); createSetting('WarpstationWall3', 'Warpstation Wall', 'Conserves Metal. Only buys 1 Warpstation when you can afford X warpstations metal cost (at the first one\'s price, simple math). -1, 0, 1 = disable. In other words, only allows warps that cost less than 1/nth your currently owned metal. (to save metal for prestiges)', 'value', -1, null, 'Buildings'); createSetting('MaxNursery', 'Max Nurseries', 'Advanced. Recommend: -1 until you reach Magma (z230+)', 'value', '-1', null, "Buildings"); createSetting('NoNurseriesUntil', 'No Nurseries Until z', 'For Magma z230+ purposes. Nurseries get shut down, and wasting nurseries early on is probably a bad idea. Might want to set this to 230+ for now. Can use combined with the old Max Nurseries cap setting.', 'value', -1, null, 'Buildings'); - createSetting('PreSpireNurseries', 'Nurseries pre-Spire', 'Set the maximum number of Nurseries to build for Spires. Overrides No Nurseries Until z and Max Nurseries so you can keep them seperate! Will build nurseries before z200 for Spire 1, but only on the zone of Spires 2+ to avoid unnecessary burning. Disable with -1.', 'value', -1, null, 'Buildings'); - //Jobs - createSetting('BuyJobs', 'Buy Jobs', 'Buys jobs based on ratios configured below. CAUTION: you cannot manually assign jobs with this. Toggle if you need to.', 'boolean', true, null, "Jobs"); - createSetting('WorkerRatios', 'Auto Worker Ratios', 'Automatically changes worker ratios based on current progress. WARNING: overrides worker ratio settings. Settings: 1/1/1 up to 300k trimps, 3/3/5 up to 3mil trimps, then 3/1/4 above 3 mil trimps, then 1/1/10 above 1000 tributes, then 1/2/22 above 1500 tributes, then 1/12/12 above 3000 tributes.', 'boolean', true, null, "Jobs"); + createSetting('BuyJobsNew', ['Don\'t Buy Jobs','Auto Worker Ratios', 'Manual Worker Ratios'], 'Manual Worker Ratios buys jobs for your trimps according to the ratios below. Auto Worker ratios automatically changes these ratios based on current progress, overriding your ratio settings.
AutoRatios: 1/1/1 up to 300k trimps, 3/3/5 up to 3mil trimps, then 3/1/4 above 3 mil trimps, then 1/1/10 above 1000 tributes, then 1/2/22 above 1500 tributes, then 1/12/12 above 3000 tributes.
CAUTION: You cannot manually assign jobs with this, turn it off if you have to', 'multitoggle', 1, null, "Jobs"); createSetting('AutoMagmamancers', 'Auto Magmamancers', 'Auto Magmamancer Management. Hires Magmamancers when the Current Zone time goes over 10 minutes. Does a one-time spend of at most 10% of your gem resources. Every increment of 10 minutes after that repeats the 10% hiring process. Magmamancery mastery is accounted for, with that it hires them at 5 minutes instead of 10. Disclaimer: May negatively impact Gem count.', 'boolean', true, null, 'Jobs'); - createSetting('FarmerRatio', 'Farmer Ratio', '', 'value', '1', null, "Jobs"); + createSetting('FarmerRatio', 'Farmer Ratio', '', 'value', '1', null, "Jobs"); //realistically gems are not that useful by the time you have magmamancers... maybe just set it to only spend 50% of your gems at a time and leave it at that? 10% is kinda low anyway createSetting('LumberjackRatio', 'Lumberjack Ratio', '', 'value', '1', null, "Jobs"); createSetting('MinerRatio', 'Miner Ratio', '', 'value', '1', null, "Jobs"); - createSetting('MaxScientists', 'Max Scientists', 'Enable or disable hiring of scientists or Cap your scientists. (This is NOT a ratio, it is an absolute number). Recommend: -1 (infinite cap, hiring controls itself). 0 means Dont Hire Scientists at all. Any other number sets the population cap, not the ratio. Scientist ratio can be controlled by internal variable: MODULES[\\"jobs\\"].scientistRatio = 25; Example Math Behind It: ScientistRatio=(FarmerRatio+LumberjackRatio+MinerRatio)/25.', 'value', '-1', null, "Jobs"); + //createSetting('ScientistRatio', 'Scientist Ratio', 'Advanced. This will allow you to cap your scientist to worker ratio, as well as disable the hiring of scientists.
-1 Allows the ratio to be set automatically (Recommended)
0 Turns off Scientist hiring
\>0 Set a custom ratio.', 'value', '-1', null, "Jobs"); + createSetting('MaxScientists', 'Max Scientists', 'Advanced. Cap your scientists (This is an absolute number not a ratio). recommend: -1 (infinite still controls itself)', 'value', '-1', null, "Jobs"); //Line2 - createSetting('MaxExplorers', 'Max Explorers', 'Advanced. Cap your explorers. recommend: -1', 'value', '-1', null, "Jobs"); - createSetting('MaxTrainers', 'Max Trainers', 'Advanced. Cap your trainers. recommend: -1', 'value', '-1', null, "Jobs"); - createSetting('TrainerCaptoTributes', 'Cap Trainers %', 'Only Buy a Trainer when its cost is LESS than X% of cost of a tribute. This setting can work in combination with the other one, or set the other one to -1 and this will take full control. Default: -1 (Disabled). 50% is close to the point where the cap does nothing. You can go as low as you want but recommended is 10% to 1%. (example: Trainer cost of 5001, Tribute cost of 100000, @ 5%, it would NOT buy the trainer.)', 'value', '-1', null, 'Jobs'); - createSetting('BreedFire', 'Breed Fire', 'OPTIONAL. Fire Lumberjacks and Miners to speed up breeding when needed. Basically trades wood/metal to cut the wait between deaths down. Disclaimer: May heavily negatively impact wood-gathering. ', 'boolean', false, null, 'Jobs'); + createSetting('MaxExplorers', 'Max Explorers', 'Advanced. Cap your explorers (This is an absolute number not a ratio). recommend: -1', 'value', '-1', null, "Jobs"); //Explorers are important now! outdated setting tbh + createSetting('MaxTrainers', 'Max Trainers', 'Advanced. Cap your trainers (This is an absolute number not a ratio). recommend: -1', 'value', '-1', null, "Jobs"); //by the time that you stop needing block, food is abundant + createSetting('TrainerCaptoTributes', 'Cap Trainers %', 'Only Buy a Trainer when its cost is LESS than X% of cost of a tribute. This setting can work in combination with the other one, or set the other one to -1 and this will take full control. Default: -1 (Disabled). 50% is close to the point where the cap does nothing. You can go as low as you want but recommended is 10% to 1%. (example: Trainer cost of 5001, Tribute cost of 100000, @ 5%, it would NOT buy the trainer.)', 'value', '-1', null, 'Jobs'); //this is a bit unnecessary, resource management by the script is already sufficient. //GEAR: - createSetting('BuyArmor', 'Buy Armor Levels', 'Auto-Buy/Level-Up the most cost efficient armor available. ', 'boolean', true, null, "Gear"); - createSetting('BuyArmorUpgrades', 'Buy Armor Prestiges', '(Prestiges) & Gymystic. Will buy the most efficient armor upgrade available. ', 'boolean', true, null, "Gear"); - createSetting('BuyWeapons', 'Buy Weapon Levels', 'Auto-Buy/Level-Up the most cost efficient weapon available. ', 'boolean', true, null, "Gear"); - createSetting('BuyWeaponUpgrades', 'Buy Weapon Prestiges', '(Prestiges) Will buy the most efficient weapon upgrade available. ', 'boolean', true, null, "Gear"); + createSetting('BuyArmorNew', ['Armor: Buy Neither','Armor: Buy Both', 'Armor: Prestiges', 'Armor: Levels'], 'AutoBuys Prestiges and Levels up the most cost efficient Armor available. Gymystic buying is controlled under this setting\'s prestige option', 'multitoggle', 1, null, "Gear"); //This should replace the two below + createSetting('BuyWeaponsNew', ['Weapons: Buy Neither','Weapons: Buy Both', 'Weapons: Prestiges', 'Weapons: Levels'], 'AutoBuys Prestiges and Levels up the most cost efficient Weapon available.', 'multitoggle', 1, null, "Gear"); //This should replace the two below createSetting('CapEquip2', 'Cap Equip to', 'Do not level equipment past this number. Helps stop wasting metal when the script levels-up equip High, only to prestige right after. Recommended value: earlygame 10, lategame: 100. Disable with -1 or 0. NEW: Also sub-caps to 10% of your number during liquified or overkilled(under 25sec) zones. This does not mean the script always hits the cap. Your Equip will now always be leveled to at least 2 since its the most effective level. It will only be leveled however if you dont have enoughHealth or enoughDamage. But During Spire, everything will be leveled up to the cap.
Hidden var: MODULES[\\"equipment\\"].capDivisor = 10; //number to divide your normal cap by.', 'value', 10, null, 'Gear'); createSetting('DynamicPrestige2', 'Dynamic Prestige z', 'Dynamic Prestige: Set Target Zone number: Z #. (disable with 0 or -1)
Skip getting prestiges at first, and Gradually work up to the desired Prestige setting you have set (set the Prestige dropdown to the highest weapon you want to end up on at the target zone you set here). Runs with Dagger to save a significant amount of time until we need better gear, then starts increasing the prestige setting near the end of the run. Examines which prestiges you have, how many missing ones youd need to achieve the desired target and starts running maps every zone (more maps for higher settings), Until the target prestige is reached. ', 'value', -1, null, 'Gear'); createSetting('Prestige', 'Prestige', 'Acquire prestiges through the selected item (inclusive) as soon as they are available in maps. Forces equip first mode. Automap must be enabled. THIS IS AN IMPORTANT SETTING related to speed climbing and should probably always be on something. If you find the script getting stuck somewhere, particularly where you should easily be able to kill stuff, setting this to an option lower down in the list will help ensure you are more powerful at all times, but will spend more time acquiring the prestiges in maps.', 'dropdown', 'Polierarm', ['Off', 'Supershield', 'Dagadder', 'Bootboost', 'Megamace', 'Hellishmet', 'Polierarm', 'Pantastic', 'Axeidic', 'Smoldershoulder', 'Greatersword', 'Bestplate', 'Harmbalest', 'GambesOP'], "Gear"); @@ -336,8 +328,7 @@ function initializeAllSettings() { }; //Line2: createSetting('ForcePresZ', 'Force Prestige Z', 'On and after this zone is reached, always try to prestige for everything immediately, ignoring Dynamic Prestige settings and overriding that of Linear Prestige. Prestige Skip mode will exit this. Disable with -1.', 'value', -1, null, 'Gear'); - createSetting('PrestigeSkipMode', 'Prestige Skip Mode', 'If there are more than 2 Unbought Prestiges (besides Shield), ie: sitting in your upgrades window but you cant afford them, AutoMaps will not enter Prestige Mode, and/or will exit from it. The amount of unboughts can be configured with this variable MODULES[\\"maps\\"].SkipNumUnboughtPrestiges = 2;', 'boolean', false, null, "Gear"); - createSetting('PrestigeSkip2', 'Prestige Skip 2', 'If there are 2 or fewer Unobtained Weapon Prestiges in maps, ie: there are less than 2 types to run for, AutoMaps will not enter Prestige Mode, and/or will exit from it. For users who tends to not need the last few prestiges due to resource gain not keeping up. The amount of unboughts can be configured with MODULES.maps.UnearnedPrestigesRequired. If PrestigeSkipMode is enabled, both conditions need to be reached before exiting.', 'boolean', false, null, 'Gear'); + createSetting('PrestigeSkip1_2', ['Prestige Skip Off','Prestige Skip 1 & 2', 'Prestige Skip 1', 'Prestige Skip 2'], 'Prestige Skip 1: If there are more than 2 Unbought Prestiges (besides Shield), ie: sitting in your upgrades window but you cant afford them, AutoMaps will not enter Prestige Mode, and/or will exit from it. The amount of unboughts can be configured with this variable MODULES[\\"maps\\"].SkipNumUnboughtPrestiges = 2;
Prestige Skip 2: If there are 2 or fewer Unobtained Weapon Prestiges in maps, ie: there are less than 2 types to run for, AutoMaps will not enter Prestige Mode, and/or will exit from it. For users who tends to not need the last few prestiges due to resource gain not keeping up. The amount of unboughts can be configured with MODULES.maps.UnearnedPrestigesRequired. If PrestigeSkipMode is enabled, both conditions need to be reached before exiting.', 'multitoggle', 0, null, "Gear"); createSetting('DelayArmorWhenNeeded', 'Delay Armor Prestige', 'Delays buying armor prestige-upgrades during Want More Damage or Farming automap-modes, Although if you need health AND damage, it WILL buy armor prestiges tho. NOTE: Applies to Prestiges only', 'boolean', false, null, 'Gear'); createSetting('BuyShieldblock', 'Buy Shield Block', 'Will buy the shield block upgrade. CAUTION: If you are progressing past zone 60, you probably don\'t want this :)', 'boolean', false, null, "Gear"); @@ -345,62 +336,80 @@ function initializeAllSettings() { //AutoMaps + VoidMaps settings: -//Could combine automaps and run unique maps into one 3 way toggle: Automaps on, Non-unique maps only, Automaps off. - createSetting('AutoMaps', ["Auto Maps Off","Auto Maps","Auto Maps No Unique"], 'Recommended. Automatically run maps to progress. Very Important. Has multiple modes: Prestige, Voids, Want more Damage, Want more Health, Want Health & Damage, and Farming.Prestige takes precedence and does equal level maps until it gets what is needed as per Autotrimps Prestige dropdown setting. Voids is self explanatory: use the Void Difficulty Check setting to control the amount of farming. If \'want more damage\', it will only do 10 maps for 200% mapbonus damage bonus. If \'Farming\', it does maps beyond 10 if the displayed number is over >16x. \'Want more health[or and damage]\' is basically just a status message telling you need more health, theres not much that can be done besides tell AutoLevelEquipment to keep buying stuff. If you \'want health\' but your damage is OK to continue, invest in more HP perks.


Unique Maps are run automatically unless disabled.
Uniques Required to auto-run The Wall and Dimension of Anger. Also Required for challenges: Electricity, Mapocalypse, Meditate, and Crushed (etc) to complete their AutoPortal.

Maps/Levels:
The Block - 12
The Wall - 16
Dimension of Anger - 21
Trimple Of Doom - 34
The Prison - 82
Bionic Wonderland (only during Crushed) @ 127
NOTE: This should generally be on.
NOTE: Run Bionic Before Spire prevents the setting of Unique.
NOTICE: This does NOT auto-run all your Bionics according to your lack of Robotrimp status or whether you pass a certain level (yet).', 'multitoggle', 1, null, "Maps"); - createSetting('DynamicSiphonology', 'Dynamic Siphonology', 'Recommended Always ON. Use the right level of siphonology based on your damage output. IE: Only uses siphonology if you are weak. With this OFF it means it ALWAYS uses the lowest siphonology map you can create. Siphonology is a perk you get at level 115-125ish, and means you receive map bonus stacks for running maps below your current zone - Up to 3 zones below (1 per perk level).', 'boolean', true, null, 'Maps'); - createSetting('PreferMetal', 'Prefer Metal Maps', 'ADVANCED: Always prefer metal maps, intended for manual use, such as pre-spire farming. Remember to turn it back off after you\'re done farming! Usually helps for pre-spire. Use on x90-x99 zones.', 'boolean', false, null, 'Maps'); + createSetting('AutoMaps', ["Auto Maps Off","Auto Maps On","Auto Maps No Unique"], 'Automaps. The no unique setting will not run unique maps such as dimensions of anger. Recommended ON. ', 'multitoggle', 1, null, "Maps"); + createSetting('DynamicSiphonology', 'Dynamic Siphonology', 'Recommended Always ON. Use the right level of siphonology based on your damage output. IE: Only uses siphonology if you are weak. With this OFF it means it ALWAYS uses the lowest siphonology map you can create. Siphonology is a perk you get at level 115-125ish, and means you receive map bonus stacks for running maps below your current zone - Up to 3 zones below (1 per perk level).', 'boolean', true, null, 'Maps'); //Should always be on? + createSetting('PreferMetal', 'Prefer Metal Maps', 'Always prefer metal maps, intended for manual use, such as pre-spire farming. Remember to turn it back off after you\'re done farming!', 'boolean', false, null, 'Maps'); //rarely better tbh createSetting('MaxMapBonusAfterZone', 'Max MapBonus After', 'Always gets Max Map Bonus from this zone on. (inclusive and after).
NOTE: Set -1 to disable entirely (default). Set 0 to use it always.
Advanced:User can set a lower number than the default 10 maps with the AT hidden console command: MODULES[\\"maps\\"].maxMapBonusAfterZ = 9;', 'value', '-1', null, 'Maps'); createSetting('DisableFarm', 'Disable Farming', 'Disables the extended farming algorithm of the AutoMaps part of the script. Always returns to the world after reaching 10 map stacks. Use at your own risk. (No need to refresh anymore)', 'boolean', false, null, 'Maps'); createSetting('LowerFarmingZone', 'Lower Farming Zone', 'Lowers the zone used during Farming mode. Uses the dynamic siphonology code, to Find the minimum map level you can successfully one-shot, and uses this level for any maps done after the first 10 map stacks. The difference being it goes LOWER than what Siphonology gives you map-bonus for, but after 10 stacks you dont need bonus, you just want to do maps that you can one-shot. Goes as low as 10 below current zone if your damage is that bad, but this is extreme and indicates you should probably portal.', 'boolean', true, null, 'Maps'); + createSetting('FarmWhenNomStacks7', 'Farm on >7 NOMstacks', 'Optional. If Improbability already has 5 NOMstacks, stack 30 Anticipation. If the Improbability has >7 NOMstacks on it, get +200% dmg from MapBonus. If we still cant kill it, enter Farming mode at 30 stacks, Even with DisableFarming On! (exits when we get under 10x). Farms if we hit 100 stacks in the world. If we ever hit (100) nomstacks in a map (likely a voidmap), farm, (exit the voidmap) and (prevent void from running, until situation is clear). Restarts any voidmaps if we hit 100 stacks. ', 'boolean', false, null, 'Maps'); + //Line2 - createSetting('MaxStacksForSpire', 'Max Map Bonus for Spire', 'Get max map bonus before running the Spire.', 'boolean', false, null, 'Maps'); - createSetting('MinutestoFarmBeforeSpire', 'Farm Before Spire', 'Farm level 200/199(or BW) maps for X minutes before continuing onto attempting Spire.
NOTE: Set 0 to disable entirely (default).
Setting to -1/Infinite does not work here, set a very high number instead.', 'value', '0', null, 'Maps'); - createSetting('IgnoreSpiresUntil', 'Ignore Spires Until', 'Spire specific settings like end-at-cell are ignored until at least this zone is reached (0 to disable).
Does not work with Run Bionic Before Spire.', 'value', '200', null, 'Maps'); - createSetting('RunBionicBeforeSpire', 'Run Bionic Before Spire', 'CAUTION: Runs Bionic Wonderlands and repeatedly farms Bionic VI @ level 200 before attempting Spire, for the purpose of resource farming. Then it attempts the spire. The Minutes-Before-Spire timer runs concurrently to this, and needs to be set. If not set, it will exit without doing any Bionics... You can un-toggle it on the fly.
NOTE: Turning this on also mandates that AutoMaps + Unique Maps be on.
WARNING: These 100 square maps take ~3x longer than normal maps.
WARNING: If you dont have Bionic Magnet mastery, this will run the 5 pre-requisites and take longer.
NOTE: In fact, it may not be what you want at all.', 'boolean', false, null, 'Maps'); - createSetting('ExitSpireCell', 'Exit Spire After Cell', 'Optional/Rare. Exits the Spire early, after completing cell X. example: 40 for Row 4. (use 0 or -1 to disable)', 'value', '-1', null, 'Maps'); createSetting('CorruptionCalc', 'Corruption Farm Mode', 'Recommended. Enabling this will cause the Automaps routine to take amount of corruption in a zone into account, to decide whether it should do maps first for map bonus. ONLY in Zone 181+ (or Headstart 1,2,3 zone: 176,166,151) ', 'boolean', true, null, 'Maps'); - createSetting('FarmWhenNomStacks7', 'Farm on >7 NOMstacks', 'Optional. If Improbability already has 5 NOMstacks, stack 30 Anticipation. If the Improbability has >7 NOMstacks on it, get +200% dmg from MapBonus. If we still cant kill it, enter Farming mode at 30 stacks, Even with DisableFarming On! (exits when we get under 10x). Farms if we hit 100 stacks in the world. If we ever hit (100) nomstacks in a map (likely a voidmap), farm, (exit the voidmap) and (prevent void from running, until situation is clear). Restarts any voidmaps if we hit 100 stacks. ', 'boolean', false, null, 'Maps'); + createSetting('MaxTox', 'Max Toxicity Stacks', 'Get maximum toxicity stacks before killing the improbability in each zone 60 and above. Generally only recommended for 1 run to maximize bone portal value. This setting will revert to disabled after a successful Max-Tox run + Toxicity Autoportal.', 'boolean', false, null, 'Maps'); + //Line3 - createSetting('VoidMaps', 'Void Maps', 'The zone at which you want all your void maps to be cleared (Cell 96). 0 is off', 'value', '0', null, "Maps"); - createSetting('RunNewVoids', 'Run New Voids', 'Run new void maps acquired after the set void map zone. Runs them at Cell 95 by default, unless you set a decimal value indicating the cell, like: 187.75 CAUTION: May severely slow you down by trying to do too-high level voidmaps. Use the adjacent RunNewVoidsUntil setting to limit this.', 'boolean', false, null, 'Maps'); - createSetting('RunNewVoidsUntil', 'New Voids Until', 'Run New Voids Until: Put a cap on what zone new voids will run at, until this zone, inclusive. ', 'value', '-1', null, 'Maps'); + createSetting('VoidMaps', 'Void Maps', '0 to disable The zone at which you want all your void maps to be cleared inclusive of the zone you type. Runs them at Cell 93 by default, unless you set a decimal value indicating the cell (example: 187.75). Use odd zones on Lead.
If Daily Void Zone Mod is active, your Finish Daily Z Mod will apply to this number when a Daily is active.', 'value', '0', null, "Maps"); + createSetting('RunNewVoidsUntilNew', 'New Voids Mod', '0 to disable. Positive numbers are added to your Void Map zone. -1 for no cap. This allows you to run new Void Maps obtained after your Void Map zone by adding this number to your Void Map zone.
Example Void map zone=185.75 and This setting=10. New Voids run until 197.75).
This means that any new void maps gained until Z197, cell 75 will be run. CAUTION: May severely slow you down by trying to do too-high level void maps. Default 0 (OFF).', 'value', '0', null, 'Maps'); //Should replace the two below //createSetting('VoidsPerZone', 'Voids per Zone', 'Run a max of this many Voids per zone, if you have a lot of Voids saved up. Then moves onto the next zone and does more voids.', 'value', '-1', null, 'Maps'); + //-1 Autograbs your Finish Daily Z Mod
0 Disables this setting
Positive Numbers add to your normal void zone on a daily

Possible number input? + createSetting('DailyVoidMod', 'Daily Void Zone Mod', 'If this is on, your daily autoportal mod (Core) will also apply to Void maps on dailies. For example, if you have void maps and autoportal set to 200 on normal runs, and your daily mod is 15, you will do voids and portal 15 zones later on a daily.', 'boolean', true, null, 'Maps'); + createSetting('PlusMapVoidToggle', 'Plus Maps for Voids', '-1/0 = Off
Max Value is 10!!!

If this is on, AT will grab a prestigious map X zones up, and run it once (to grab the dagger prestige). This is independent of the new special map mods button that Gen is testing. I cba to make this \'smart\' and actively calculate what zone to go for...
Values above 10 will NOT work at all. Advise 1-5.', 'value', '0', null, 'Maps'); createSetting('VoidCheck', 'Void Difficulty Check', 'How many hits to be able to take from a void map boss in X stance before we attempt the map. Higher values will get you stronger (by farming maps for health) before attempting. Disabling this with 0 or -1 translates into a default of surviving 2 hits. I recommend somewhere between 2 and 12 (default is now 6).', 'value', '6', null, 'Maps'); - createSetting('MaxTox', 'Max Toxicity Stacks', 'Get maximum toxicity stacks before killing the improbability in each zone 60 and above. Generally only recommended for 1 run to maximize bone portal value. This setting will revert to disabled after a successful Max-Tox run + Toxicity Autoportal.', 'boolean', false, null, 'Maps'); - createSetting('TrimpleZ', 'Trimple Z', 'I don\'t really think doing this automatically is a good idea. You might want to farm for a bit before this, but I\'m not sure if it\'s meaningful at all to make a \'farm X minutes before trimple\' parameter to go along with it. Set it to the zone you want and it will run Trimple of Doom for Ancient Treasure AFTER farming and getting map stacks. If it is a negative number, this will be disabled after a successful run so you can set it differently next time.', 'valueNegative', 0, null, 'Maps'); + createSetting('TrimpleZ', 'Trimple Z', 'I don\'t really think doing this automatically is a good idea. You might want to farm for a bit before this, but I\'m not sure if it\'s meaningful at all to make a \'farm X minutes before trimple\' parameter to go along with it. Set it to the zone you want and it will run Trimple of Doom for Ancient Treasure AFTER farming and getting map stacks. If it is a negative number, this will be disabled after a successful run so you can set it differently next time.', 'valueNegative', 0, null, 'Maps'); //in reality this needs another setting to make it farm for a set number of minutes without spending anything. And I cba cause its a meh setting anyway. Advancing 2 zones more than doubles your income. Only useful for spire I, and IMO you may aswell actually play the game manually at SOME point. createSetting('AdvMapSpecialModifier', 'Map Special Modifier', 'EXPERIMENTAL. Attempt to select the BEST map special attacks mod. With this on, this will replace the normal behavior. If bugs, please report as this will become more default soon.', 'boolean', false, null, 'Maps'); +//Spire + //Line 1 + createSetting('MaxStacksForSpire', 'Max Map Bonus for Spire', 'Get max map bonus before running the Spire.', 'boolean', false, null, 'Spire'); //Does farm before spire not cover this fairly well anyway? grabbing +1 equips would make way more difference anyway + createSetting('MinutestoFarmBeforeSpire', 'Farm Before Spire', 'Farm level 200/199(or BW) maps for X minutes before continuing onto attempting Spire.
NOTE: Set 0 to disable entirely (default).
Setting to -1/Infinite does not work here, set a very high number instead.', 'value', '0', null, 'Spire'); + createSetting('IgnoreSpiresUntil', 'Ignore Spires Until', 'Spire specific settings like end-at-cell are ignored until at least this zone is reached (0 to disable).
Does not work with Run Bionic Before Spire.', 'value', '200', null, 'Spire'); + createSetting('RunBionicBeforeSpire', 'Run Bionic Before Spire', 'CAUTION: Runs Bionic Wonderlands and repeatedly farms Bionic VI @ level 200 before attempting Spire, for the purpose of resource farming. Then it attempts the spire. The Minutes-Before-Spire timer runs concurrently to this, and needs to be set. If not set, it will exit without doing any Bionics... You can un-toggle it on the fly.
NOTE: Turning this on also mandates that Run Unique Maps be on.
WARNING: These 100 square maps take ~3x longer than normal maps.
WARNING: If you dont have Bionic Magnet mastery, this will run the 5 pre-requisites and take longer.
NOTE: In fact, it may not be what you want at all.', 'boolean', false, null, 'Spire'); //OUTDATED! + createSetting('ExitSpireCell', 'Exit Spire After Cell', 'Optional/Rare. Exits the Spire early, after completing cell X. example: 40 for Row 4. (use 0 or -1 to disable)', 'value', '-1', null, 'Spire'); + createSetting('SpireBreedTimer', 'Spire Breed Timer', 'Overrides the normal breed timer for the Spire (Affected by ignore spires until zone in Maps tab). Use -1 to disable this special setting.', 'value', -1, null, 'Spire'); + createSetting('PreSpireNurseries', 'Nurseries pre-Spire', 'Set the maximum number of Nurseries to build for Spires. Overrides No Nurseries Until z and Max Nurseries so you can keep them seperate! Will build nurseries before z200 for Spire 1, but only on the zone of Spires 2+ to avoid unnecessary burning. Disable with -1.', 'value', -1, null, 'Spire'); + + //Line 2 + createSetting('Praidingzone', 'P Raiding Z', 'Raids Maps for prestiges at zone specified. Example: 495, will raid Maps at 501. Once all gear is obtained from the map, it will revert back to regular farming. Extremely helpful for spire. Best used in poison zones.', 'value', -1, null, 'Spire'); + createSetting('BWraid', 'BW Raiding', 'Raids BW at zone specified in BW Raiding min/max.', 'boolean', false, null, 'Spire'); + createSetting('BWraidingz', 'Z to BW Raid', 'Raids BWs at zone specified. Example: 495, will raid all BWs for all gear starting from 495. Will skip lower BWs if you have enough damage. Once all gear is obtained, will return to regular farming.', 'value', -1, null, 'Spire'); + createSetting('BWraidingmax', 'Max BW to raid', 'Raids BWs until zone specified. Example: 515, will raid all BWs for all gear until 515. Will skip lower BWs if you have enough damage. Once all gear is obtained, will return to regular farming.', 'value', -1, null, 'Spire'); + + + + //Combat //Subsection1Line1 - createSetting('BetterAutoFight', ['Better AutoFight OFF', 'Better Auto Fight 1', 'Better Auto Fight 2'], '3-Way Button, Recommended. Will automatically handle fighting. The decision between BetterAutoFight 1 or 2 is up to your own discretion. The new BAF#2 does: A)Click fight anyway if we are dead and stuck in a loop due to Dimensional Generator and we can get away with adding time to it.(RemainingTime + ArmyAdd.Time < GeneTimer) and B) Clicks fight anyway if we are dead and have >=31 NextGroupTimer and deal with the consequences by firing genetecists afterwards. WARNING: If you autoportal with BetterAutoFight disabled, the game sits there doing nothing until you click FIGHT. (not good for afk) ', 'multitoggle', 1, null, "Combat"); - createSetting('AutoStance', ['Auto Stance OFF', 'Auto Stance 1', 'Auto Stance 2'], 'Automatically swap stances to avoid death. The decision between AutoStance 1 or 2 is up to your own discretion and they should be similar. ', 'multitoggle', 1, null, "Combat"); + createSetting('BetterAutoFight', ['Better AutoFight OFF', 'Better Auto Fight 1', 'Better Auto Fight 2', 'Better Auto Fight 3'], '4-Way Button, Recommended. Will automatically handle fighting.
BAF1 = Old Algo (Fights if dead, new squad ready, new squad breed timer target exceeded, and if breeding takes under 0.5 seconds
BAF2 = Newer, As with BAF1, but also solves DimGen looping, sends trimps immediately when breed target met, and deals with the consequences by firing geneticists
BAF3 = Uses vanilla autofight, and force fights when dead except in VM and Spire.
WARNING: If you autoportal with BetterAutoFight disabled, the game may sit there doing nothing until you click FIGHT. (not good for afk) ', 'multitoggle', 3, null, "Combat"); + createSetting('AutoStance', ['Auto Stance OFF', 'Auto Stance 1', 'Auto Stance 2', 'Auto Stance 3'], 'Automatically swap stances to avoid death. The decision between AutoStance 1 or 2 is up to your own discretion and they should be similar. AutoStance 3 is new and experimental for use after nature (z230), and will keep you in D stance unless you are windstacking (only useful if transfer is maxed out and wind empowerment is high. This feature is currently only a tweak added on request.', 'multitoggle', 1, null, "Combat"); + createSetting('WindStackingMin', 'Windstack Min Zone', '-1 = Off
0 = Always On

For use with AutoStance 3, enables windstacking in zones above and inclusive of the zone set. (Get 200 windstacks then change to D, kill bad guy, then repeat). This is designed to force S use until you have 200 stacks in wind zones, overriding scryer settings.', 'value', '-1', null, 'Combat'); createSetting('IgnoreCrits', ['Safety First', 'Ignore Void Strength', 'Ignore All Crits'], 'No longer switches to B against corrupted precision and/or void strength. Basically we now treat \'crit things\' as regular in both autoStance and autoStance2. In fact it no longer takes precision / strength into account and will manage like a normal enemy, thus retaining X / D depending on your needs. If you\'re certain your block is high enough regardless if you\'re fighting a crit guy in a crit daily, use this! Alternatively, manage the stances yourself.', 'multitoggle', 0, null, 'Combat'); - createSetting('PowerSaving', ['Don\'t care', 'Power Saving', 'Only Rush Voids'], 'Avoid killing your army impatiently. Don\'t force abandon trimps when prestiging. Will still Die To Use Z and aggressively autostance to aid progression and anything else. Made for Empower daily, you might find it helpful if you\'re doing Workplace Safety feat. Then again with that I strongly recommend doing it fully manually. Anyway, don\'t blame me whatever happens. Only Rush Voids will allow considering abandoning, not force one. Note: AT will no longer be able to fix when your scryer gets stuck!', 'multitoggle', 0, null, 'Combat'); - createSetting('ForceAbandon', 'Auto Force-Abandon', '(Trimpicide). If a new fight group is available and anticipation stacks arent maxed, force abandon and grab a new group. Located in the geneticist management script.', 'boolean', true, null, 'Combat'); - createSetting('DynamicGyms', 'Dynamic Gyms', 'Designed to limit your block to slightly more than however much the enemy attack is. If MaxGyms is capped or GymWall is set, those will still work, and this will NOT override those (works concurrently), but it will further limit them. In the future it may override, but the calculation is not easy to get right so I dont want it undo-ing other things yet. ', 'boolean', false, null, 'Combat'); + createSetting('PowerSaving', ['AutoAbandon', 'Don\'t Abandon', 'Only Rush Voids'], 'Autoabandon: Considers abandoning trimps for void maps/prestiges.
Don\'t Abandon: Will not abandon troops, but will still agressively autostance even if it will kill you (WILL NOT ABANDON TRIMPS TO DO VOIDS).
Only Rush Voids: Considers abandoning trimps for void maps, but not prestiges, still autostances aggressively.
Made for Empower daily, and you might find this helpful if you\'re doing Workplace Safety feat. Then again with that I strongly recommend doing it fully manually. Anyway, don\'t blame me whatever happens.
Note: AT will no longer be able to fix when your scryer gets stuck!', 'multitoggle', 0, null, 'Combat'); + createSetting('ForceAbandon', 'Auto Force-Abandon', '(Trimpicide). If a new fight group is available and anticipation stacks aren\'t maxed, force abandon and grab a new group. Located in the geneticist management script.', 'boolean', true, null, 'Combat'); + createSetting('DynamicGyms', 'Dynamic Gyms', 'Designed to limit your block to slightly more than however much the enemy attack is. If MaxGyms is capped or GymWall is set, those will still work, and this will NOT override those (works concurrently), but it will further limit them. In the future it may override, but the calculation is not easy to get right so I dont want it undo-ing other things yet. ', 'boolean', false, null, 'Combat'); //Does anybody actually use this? createSetting('AutoRoboTrimp', 'AutoRoboTrimp', 'Use RoboTrimps ability starting at this level, and every 5 levels thereafter. (set to 0 to disable. default 60.) 60 is a good choice for mostly everybody.', 'value', '60', null, 'Combat'); //Scryer - createSetting('UseScryerStance', 'Use Scryer Stance', 'MASTER BUTTON Stay in Scryer stance in z181 and above (Overrides Autostance). Falls back to regular Autostance when not in use (so leave that on). Get 2x resources or Dark Essence. All other buttons have no effect if this one is off.', 'boolean', true, null, 'Scryer'); - createSetting('ScryerUseWhenOverkill', 'Use When Overkill', 'Use when we can Overkill in S stance, for double loot with no speed penalty. Recommend this be on. NOTE: This being on, and being able to overkill in S will override ALL other settings (Except never use in spire). This is a boolean logic shortcut that disregards all the other settings including Min and Max Zone. If you ONLY want to use S during Overkill, as a workaround: turn this on and Min zone: to 9999 and everything else off(red). ', 'boolean', true, null, 'Scryer'); - createSetting('ScryerMinZone', 'Min Zone', 'Minimum zone to start using scryer in.(inclusive) Recommend:(60 or 181). This needs to be On & Valid for options other than Overkill to work. Tip: Use 9999 to disable all other Non-Overkill scryer usage.', 'value', '181', null, 'Scryer'); - createSetting('ScryerMaxZone', 'Max Zone', 'Zone to STOP using scryer at.(not inclusive) Recommend: Leave off (0 or -1 to disable: doesnt prevent options other than Overkill from working.) Positive numbers DO disable it past that zone. ', 'value', '230', null, 'Scryer'); - createSetting('ScryerUseinMaps2', ['Maybe Use in Maps', 'Force Use in Maps'], 'Maybe/Force Use in Maps. Overkill overrides this setting. Does not have to be on for Overkill Button to use S in maps. (Obeys zone settings)', 'multitoggle', 0, null, 'Scryer'); - createSetting('ScryerUseinVoidMaps2', ['Maybe Use in VoidMaps', 'Force Use in VoidMaps', 'Never Use in VoidMaps'], 'Maybe/Force/Never Use in Void Maps. Never WILL override the Overkill setting, and never use S in Void Maps. Maybe means default - treat Void Maps like any other cell (something else has to be ON to trigger Scryer). Force = Always use S.', 'multitoggle', 0, null, 'Scryer'); - createSetting('ScryerUseinSpire2', ['Maybe Use in Spire', 'Force Use in Spire', 'Never Use in Spire'], 'Maybe/Force/Never Use in Spire. Never WILL override the Overkill setting, and never use S in Spire. Maybe means default - treat Spire like any other cell (something else has to be ON to trigger Scryer). Force = Always use S.', 'multitoggle', 0, null, 'Scryer'); + createSetting('UseScryerStance', 'Enable Scryer Stance', 'MASTER BUTTON Activates all other scrying settings, and overrides AutoStance when scryer conditions are met. Leave regular Autostance on while this is active. Scryer gives 2x Resources (Non-Helium/Nullifium) and a chance for Dark Essence. Once this is on, priority for Scryer decisions goes as such:
NEVER USE, FORCE USE, OVERKILL, MIN/MAX ZONE

NO OTHER BUTTONS WILL DO ANYTHING IF THIS IS OFF.', 'boolean', true, null, 'Scryer'); + createSetting('ScryerUseWhenOverkill', 'Use When Overkill', 'Overrides the Min/Max zones. Does not override any NEVER settings. Toggles stance when we can Overkill in S, giving us double loot with no speed penalty! NOTE: This being on, and being able to overkill in S will override ALL other settings (Except never use in spire). This is a boolean logic shortcut that disregards all the other settings including Min and Max Zone. If you ONLY want to use S during Overkill, as a workaround: turn this on and Min zone: to 9999 and everything else off(red).

This has not been optimised for double overkill, and does not always produce the intended results, if you have problems, it may be worth turning off until it can be adjusted.', 'boolean', true, null, 'Scryer'); + createSetting('ScryerMinZone', 'Min Zone', 'Minimum zone to start using scryer in.(inclusive) Recommend:(60 or 181). Overkill ignores this. This needs to be On & Valid for the MAYBE option on all other Scryer settings to do anything if Overkill is off. Tip: Use 9999 to disable all Non-Overkill, Non-Force, scryer usage.', 'value', '181', null, 'Scryer'); + createSetting('ScryerMaxZone', 'Max Zone', '0 or -1 to disable (Recommended)
Overkill ignores this. Zone to STOP using scryer at (not inclusive). Turning this ON with a positive number stops MAYBE use of all other Scryer settings.', 'value', '230', null, 'Scryer'); + createSetting('ScryerUseinMaps2', ['Maps: NEVER','Maps: FORCE', 'Maps: MAYBE'], 'NEVER means what it says!!!
FORCE means Scryer will ALWAYS activate in Void Maps
MAYBE means that Overkill and Min/Max use are allowed.
This setting requires use on Corrupteds to be on after corruption/magma.

Recommend MAYBE.', 'multitoggle', 2, null, 'Scryer'); + createSetting('ScryerUseinVoidMaps2', ['VoidMaps: NEVER','VoidMaps: FORCE', 'VoidMaps: MAYBE'], 'NEVER means what it says!!!
FORCE means Scryer will ALWAYS activate in Void Maps
MAYBE means that Overkill and Min/Max use are allowed.
This setting requires use in Maps to be on, as well as use on Corrupteds (if above corruption/magma) to activate.

Recommend NEVER.', 'multitoggle', 0, null, 'Scryer'); + createSetting('ScryerUseinSpire2', ['Spire: NEVER','Spire: FORCE','Spire: MAYBE'], 'NEVER means what it says!!!
FORCE means Scryer will ALWAYS activate in the Spire
MAYBE means that Overkill and Min/Max use are allowed.
This setting requires use on Corrupteds to be on for corrupted enemies.

Recommend NEVER.', 'multitoggle', 0, null, 'Scryer'); //Line2 - createSetting('ScryerSkipBoss2', ['Default on Cell 100', 'Never Use on Cell 100 above VoidLevel', 'Never Use on Cell 100 (ALL Levels)'], 'On cell 100: Default/Never Use(above VoidLevel)/Never Use(ALL Levels). Overkill overrides this setting. Doesnt use Scrying stance for world Improbabilities/Bosses (cell 100) if you are past the level you have your VoidMaps set to run at. (or all levels, if set.) Default treats cell 100 like any other cell.', 'multitoggle', 0, null, 'Scryer'); - createSetting('ScryerSkipCorrupteds2', ['Maybe Use S on Corrupteds', 'Dont Use S on Corrupteds'], 'Overkill overrides this setting, even on Dont Use. Turning this Green doesnt use S stance for corrupted cells UNLESS you can overkill them. Red/Maybe just means default (corrupteds are treated like normal cells), so something else has to be ON to trigger Scryer to be used. Magma maps and Corrupted Voidmaps are classified under this box as corrupted and Green-DontUse here will override the ForceMaps/ForceVoidmaps (for now)', 'multitoggle', 0, null, 'Scryer'); - createSetting('ScryerDieToUseS', 'Die To Use S', 'Turning this on will switch you back to S even when doing so would kill you. Happens in scenarios where you used Skip Corrupteds that took you into regular Autostance X/H stance, killed the corrupted and reached a non-corrupted enemy that you wish to use S on, but you havent bred yet and you are too low on health to just switch back to S. So youd rather die, wait to breed, then use S for the full non-corrupted enemy, to maximize DE. This feature was added for 1 person, use at your own risk.', 'boolean', false, null, 'Scryer'); - createSetting('ScryerDieZ', 'Scryer Suicide Z', 'You know, Die To Use S is helpful and all, but sometimes it doesn\'t matter in early zones. Don\'t you think so? That was a rhetorical question, don\'t answer it. Like Void Maps config, you can put a decimal value for cell, like 230.60 for after zone 230 for >= 60th cell.', 'value', 230.60, null, 'Scryer'); - //createSetting('ScryUseinPoison', ' Scry in Poison', ['Maybe Use in Poison', 'Force Use in Poison', 'Never Use in Poison'] - + createSetting('ScryerSkipBoss2', ['Boss: NEVER (All Levels)','Boss: NEVER (Above VoidLevel)','Boss: MAYBE'], 'NEVER (All Levels) will NEVER use S in cell 100 of the world!!!
NEVER (Above VoidLevel) will NEVER use S in cell 100 of the world ABOVE the zone that your void maps are set to run at (Maps).
MAYBE treats the cell no differently to any other, Overkill and Min/Max Scryer is allowed.

Recommend NEVER (There is little benefit to double NON-HELIUM resources and a small chance of DE).', 'multitoggle', 0, null, 'Scryer'); + createSetting('ScryerSkipCorrupteds2', ['Corrupted: NEVER', 'Corrupted: FORCE','Corrupted: MAYBE'], 'NEVER means what it says!!!
FORCE means Scryer will ALWAYS activate against Corrupted enemies
MAYBE means that Overkill and Min/Max use are allowed.
Magma maps and Corrupted Voidmaps are currently classified as corrupted and NEVER here will override Maps and Voidmaps use of Scryer

Recommend MAYBE.', 'multitoggle', 2, null, 'Scryer'); + createSetting('ScryerDieZ', 'Die To Use S','-1 to disable.
Turning this on will switch you back to S even when doing so would kill you. Happens in scenarios where you used Skip Corrupteds that took you into regular Autostance X/H stance, killed the corrupted and reached a non-corrupted enemy that you wish to use S on, but you havent bred yet and you are too low on health to just switch back to S. So you\'d rather die, wait to breed, then use S for the full non-corrupted enemy, to maximize DE. NOTE: Use at your own risk.
Use this input to set the minimum zone that scryer activates in (You can use decimal values to specify what cell this setting starts from)' , 'value', 230.60, null, 'Scryer'); + createSetting('ScryUseinPoison', 'Scry in Poison','-1 to disable, any other number (including 0) sets a minimum zone to use S in Poison', 'value', -1, null, 'Scryer'); + createSetting('ScryUseinWind', 'Scry in Wind','-1 to disable, any other number (including 0) sets a minimum zone to use S in Wind', 'value', -1, null, 'Scryer'); + createSetting('ScryUseinIce', 'Scry in Ice','-1 to disable, any other number (including 0) sets a minimum zone to use S in Ice', 'value', -1, null, 'Scryer'); @@ -415,26 +424,22 @@ function initializeAllSettings() { createSetting('AutoGen2Override', ['Override Final Only', 'Strong Override'], 'Overrides apply to the final mode (always use early mode), or also to early mode (will stop microtick etc). Normal will not change anything.', 'multitoggle', 1, null, 'Magma'); createSetting('AutoMagmiteSpender2', ['Spend Magmite OFF', 'Spend Magmite (Portal)', 'Spend Magmite Always'], 'Auto Spends any unspent Magmite immediately before portaling. (Or Always, if toggled). Part 1 buys any permanent one-and-done upgrades in order from most expensive to least. Part 2 then analyzes Efficiency vs Capacity for cost/benefit, and buys Efficiency if its BETTER than Capacity. If not, if the PRICE of Capacity is less than the price of Supply, it buys Capacity. If not, it buys Supply. And then it repeats itself until you run out of Magmite and cant buy anymore. For Magma z230+ purposes.', 'multitoggle', 1, null, 'Magma'); createSetting('SupplyWall', 'Throttle Supply (or Capacity)', 'Positive number NOT 1 e.g. 2.5: Consider Supply when its cost * 2.5 is < Capacity, instead of immediately when < Cap. Effectively throttles supply for when you don\'t need too many.

Negative number (-1 is ok) e.g. -2.5: Consider Supply if it costs < Capacity * 2.5, buy more supplys! Effectively throttling capacity instead.

Set to 1: DISABLE SUPPLY only spend magmite on Efficiency, Capacity and Overclocker. (For some end game players, supply is worth probably figuratively nothing.)
Set to 0: IGNORE SETTING and use old behaviour (will still try to buy overclocker)
', 'valueNegative', 2, null, 'Magma'); - createSetting('OneTimeOnly', 'One Time / Overclock Only', 'Makes the magmite spending sequence only buy one time upgrades and overclock, ignoring Efficiency, Capacity and Supply. Intended for manual use. Does not disable itself.', 'boolean', false, null, 'Magma'); - createSetting('BuyOvclock', 'Buy Overclock', 'Turn this off to not buy anymore overclocks. Will still buy the first level if you don\'t already own it.', 'boolean', true, null, 'Magma'); + createSetting('BuyOneTimeOC', ['Buy OneTime Only (No OC)', 'Maybe Buy OneTime & OC', 'Maybe Buy OneTime (No OC)', 'Buy OneTime & OC Only'], 'Buy OneTime Only (No OC) = ONLY BUYS ONE TIME UPGRADES, NOTHING ELSE.
Maybe Buy OneTime & OC = Normal spending, will consider Overclocker and One Time Upgrades
Maybe Buy OneTime (No OC) = Normal Spending, but will NOT Buy Overclocker (Will still buy the first level if you don\'t have it).
Buy OneTime & OC Only = Will Force spend magmite on these two only, ignoring Efficiency, Capacity and Supply.
Recommend Default (Maybe Buy OneTime & OC)', 'multitoggle', 1, null, 'Magma'); createSetting('MagmiteExplain', 'Magmite spending behaviour', '1. Buy one-and-done upgrades, expensive first, then consider 1st level of Overclocker;
2. Buy Overclocker IF AND ONLY IF we can afford it;
2.5. Exit if OneTimeOnly
3. Buy Efficiency if it is better than capacity;
4. Buy Capacity or Supply depending on which is cheaper, or based on SupplyWall', 'infoclick', 'MagmiteExplain', null, 'Magma'); //Heirloom Settings - createSetting('AutoHeirlooms', 'Auto Heirlooms', 'Automatically evaluate and carry the best heirlooms, and recommend upgrades for equipped items. AutoHeirlooms will only change carried items when the heirlooms window is not open. Carried items will be compared and swapped with the types that are already carried. If a carry spot is empty, it will be filled with the best shield (if available). Evaluation is based ONLY on the following mods (listed in order of priority, high to low): Void Map Drop Chance/Trimp Attack, Crit Chance/Crit Damage, Miner Efficiency/Metal Drop, Gem Drop/Dragimp Efficiency, Farmer/Lumberjack Efficiency. For the purposes of carrying, rarity trumps all of the stat evaluations. Empty mod slots are valued at the average value of the best missing mod.', 'boolean', false, null, "Heirlooms"); - createSetting('AutoHeirlooms2', 'Auto Heirlooms2', 'IMPORTANT SETTING. New algorithm for Heirlooms. While enabled, the old AutoHeirlooms algorithm will be disabled (the button will stay lit or you can turn that one off). CAUTION: Turning this on will immediately re-sort your heirlooms according to the new algorithm, and turning it off again DOES revert to the original algorithm even though it may NOT have a visible result on your heirlooms. (fyi: This lack of action highlights one of the problems with the old one.) ', 'boolean', false, null, 'Heirlooms'); + createSetting('AutoHeirloomsNew', ['AutoHeirlooms Off', 'AutoHeirlooms 1', 'AutoHeirlooms 2'], 'Use Autoheirlooms 2. It will keep heirlooms on portal. ', 'multitoggle', 0, null, 'Heirlooms'); createSetting('AutoUpgradeHeirlooms', 'Auto Upgrade Heirlooms', 'Automatically buys the upgrades the script advises for the Equipped shield and staff, until we are out of nullifium.', 'boolean', false, null, 'Heirlooms'); - - //Golden Upgrade Strategies: createSetting('AutoGoldenUpgrades', 'AutoGoldenUpgrades', 'IMPORTANT SETTING. Automatically Buy the specified Golden Upgrades as they become available. Faster than vanilla. NOTE: Void setting unlocks more settings: goldStrat, goldAlternating, goldZone and goldNoBattle. New: Void also has a \\"Max then Helium\\" setting so you can get the perfect 60% Voids then Helium. More buttons will become visible when you make selections.', 'dropdown', 'Void', ["Off", "Helium", "Battle", "Void"], 'Golden'); createSetting('goldStrat', 'Strategy', 'VOID ONLY: After max Void golden upgrades, alternate between buying helium and battle upgrades. Or Choose a Zone to switch over completely at (zones lower than X will buy only battle, and zones higher than X only helium). Battle can be disabled completely with the goldNoBattle button. MAX THEN HELIUM setting so you can get the perfect 60% Voids then Helium', 'dropdown', 'Max then Helium', ["Off", "Alternating", "Zone", "Max then Helium"], 'Golden'); createSetting('goldAlternating', 'GU VOID: Alternating', 'Buy a helium upgrade after X-1 battle upgrades have been purchased', 'value', '2', null, 'Golden'); createSetting('goldZone', 'GU VOID: Zone', 'Buy a helium upgrade until zone X, then buy battle upgrades.', 'value', '200', null, 'Golden'); - createSetting('goldNoBattle', 'GU VOID: No Battle', 'Dont ever buy battle upgrades.', 'boolean', true, null, 'Golden'); + createSetting('goldNoBattle', 'GU VOID: No Battle', 'Green = Do NOT buy Battle Upgrades
Red = Buy Battle Upgrades.', 'boolean', true, null, 'Golden'); @@ -443,7 +448,9 @@ function initializeAllSettings() { createSetting('AutoPoison', 'Poison', 'Spend/convert Poison tokens', 'dropdown', 'Off', ['Off', 'Empowerment', 'Transfer', 'Convert to Wind', 'Convert to Ice', 'Convert to Both'], 'Nature'); createSetting('AutoWind', 'Wind', 'Spend/convert Wind tokens', 'dropdown', 'Off', ['Off', 'Empowerment', 'Transfer', 'Convert to Poison', 'Convert to Ice', 'Convert to Both'], 'Nature'); createSetting('AutoIce', 'Ice', 'Spend/convert Ice tokens', 'dropdown', 'Off', ['Off', 'Empowerment', 'Transfer', 'Convert to Poison', 'Convert to Wind', 'Convert to Both'], 'Nature'); - + if (!game.worldUnlocks.easterEgg.locked) { + createSetting('AutoEggs', 'AutoEggs', 'Click easter egg if it exists, upon entering a new zone. Warning: Quite overpowered. Please solemnly swear that you are up to no good.', 'boolean', false, null, 'Core');} + //Display settings: @@ -453,9 +460,10 @@ function initializeAllSettings() { document.getElementById('battleSideTitle').setAttribute('onclick','MODULES["performance"].EnableAFKMode()'); document.getElementById('battleSideTitle').setAttribute('onmouseover', "getZoneStats(event);this.style.cursor='pointer'"); createSetting('ChangeLog', 'Show Changelog', '(Action Button). Shows the changelog popup message that AT loads on startup again, in case you missed it. The blue color means this is not a settable setting, just a button.', 'action', 'printChangelog()', null, 'Display'); + createSetting('ShowSettings', 'Show Extra Settings', 'Show/Hide settings that in my personal opinion, are rarely useful (HZE 470)', 'boolean', true, null, 'Display') document.getElementById('Display').lastChild.insertAdjacentHTML('afterend','
'); -//SPAM settings: +//SPAM settings: //Subsection2Line1 createSetting('SpamGeneral', 'General Spam', 'General Spam = Notification Messages, Auto He/Hr', 'boolean', true, null, 'Display'); createSetting('SpamUpgrades', 'Upgrades Spam', 'Upgrades Spam', 'boolean', true, null, 'Display'); @@ -470,7 +478,7 @@ function initializeAllSettings() { createSetting('SpamPerks', 'AutoPerks Spam', 'Everything in related to AutoPerks', 'boolean', true, null, 'Display'); - + // Export/Import/Default settings createSetting('ImportAutoTrimps', 'Import AutoTrimps', 'Import your AutoTrimps Settings. Asks you to name it as a profile afterwards.', 'infoclick', 'ImportAutoTrimps', null, 'Import Export'); createSetting('ExportAutoTrimps', 'Export AutoTrimps', 'Export your AutoTrimps Settings as a output string text formatted in JSON.', 'infoclick', 'ExportAutoTrimps', null, 'Import Export'); @@ -481,16 +489,16 @@ function initializeAllSettings() { //createSetting('ExportModuleVars', 'Export Custom Variables', 'Export your custom MODULES variables.', 'infoclick', 'ExportModuleVars', null, 'Import Export'); //createSetting('ImportModuleVars', 'Import Custom Variables', 'Import your custom MODULES variables (and save).', 'infoclick', 'ImportModuleVars', null, 'Import Export'); //createSetting('ResetModuleVars', 'Reset Custom Variables', 'Reset(Delete) your custom MODULES variables, and return the script to normal. ', 'infoclick', 'ResetModuleVars', null, 'Import Export'); - + //createSetting('PlayerLevel', 'PlayerLevel', 'PlayerLevel: Indicate around what level you are. noob, low, medium, high, spire, magma, expert, z450+, z500+, endgame and so on. Might be used to control which settings are visible in the future. ', 'dropdown', "Medium", ["Noob","Low","Medium","High","Spire","Magma","Expert","z450+","z500+","EndGame"], 'Display'); /* createSetting('ATModuleListDropdown', 'Modules', 'AT Module List Dropdown: Lists all the individual modules (.js files) that have been auto-loaded. It might be possible to unload these or something in the future.', 'dropdown', ATmoduleList[0], ATmoduleList, 'Import Export'); document.getElementById('ATModuleListDropdown').multiple = true; //allow 4 multiple selections document.getElementById('ATModuleListDropdown').size = 4; - document.getElementById('ATModuleListDropdown').height = '5vw'; + document.getElementById('ATModuleListDropdown').height = '5vw'; document.getElementById('ATModuleListDropdownLabel').style.verticalAlign = 'top'; document.getElementById('ATModuleListDropdownLabel').parentNode.style.width = null; //make the next stuff fit on 1 line. - createSetting('ATModuleUnload', 'Unload Module', 'UnLoads a running module file this session', 'infoclick', 'ATModuleUnload', null, 'Import Export'); + createSetting('ATModuleUnload', 'Unload Module', 'UnLoads a running module file this session', 'infoclick', 'ATModuleUnload', null, 'Import Export'); createSetting('ATModuleLoad', 'ReLoad Module', 'Load/Reloads a module file (.js) and runs it.', 'infoclick', 'ATModuleLoad', null, 'Import Export'); */ } @@ -799,15 +807,19 @@ function autoPlusSettingsMenu() { function updateCustomButtons() { //console.log("GUI: CustomButtons Updated"); - //Check for Theme Changed, and swap theme: + if (lastTheme && game.options.menu.darkTheme.enabled != lastTheme) { if (typeof MODULES["graphs"] !== 'undefined') MODULES["graphs"].themeChanged(); + debug("Theme change - AutoTrimps styles updated."); + } + lastTheme = game.options.menu.darkTheme.enabled; function toggleElem(elem, showHide) { + var $item = document.getElementById(elem); + if ($item == null) return; var state = showHide ? '' : 'none'; var stateParent = showHide ? 'inline-block' : 'none'; - var item = document.getElementById(elem); - item.style.display = state; - item.parentNode.style.display = stateParent; + $item.style.display = state; + $item.parentNode.style.display = stateParent; } function turnOff(elem) { toggleElem(elem, false); @@ -823,7 +835,6 @@ function updateCustomButtons() { var doDaily = game.challenges.Daily.filter(); (doDaily) ? turnOn("AutoStartDaily") : turnOff("AutoStartDaily"); (doDaily) ? turnOn("AutoFinishDaily") : turnOff("AutoFinishDaily"); - (doDaily && getPageSetting('AutoFinishDaily')) ? turnOn("AutoFinishDailyZone") : turnOff("AutoFinishDailyZone"); //if custom auto portal is not selected, remove the custom value settingsbox (autoTrimpSettings.AutoPortal.selected == "Custom") ? turnOn("CustomAutoPortal") : turnOff("CustomAutoPortal"); //if HeHr is not selected, remove HeliumHourChallenge settingsbox @@ -834,7 +845,34 @@ function updateCustomButtons() { //if HeHr is not selected, remove HeHr buffer settingsbox (heHr) ? turnOn("HeliumHrBuffer") : turnOff("HeliumHrBuffer"); //if ShieldBlock is for sure, remove ShieldBlock from settingsbox (achievement=12 means z100). - (game.achievements.zones.finished < 12) ? turnOn("BuyShieldblock") : function(){turnOff("BuyShieldblock");setPageSetting("BuyShieldblock",false);}(); + //(game.achievements.zones.finished < 12) ? turnOn("BuyShieldblock") : function(){turnOff("BuyShieldblock");setPageSetting("BuyShieldblock",false);}(); + //if AS3 is not selected, remove Windstack settingsbox + getPageSetting('AutoStance')==3 ? turnOn("WindStackingMin"): turnOff("WindStackingMin"); + getPageSetting('AutoStance')==3 ? turnOn("ScryUseinPoison"): turnOff("ScryUseinPoison"); + getPageSetting('AutoStance')==3 ? turnOn("ScryUseinWind"): turnOff("ScryUseinWind"); + getPageSetting('AutoStance')==3 ? turnOn("ScryUseinIce"): turnOff("ScryUseinIce"); + getPageSetting('AutoStance')!=3 ? turnOn("IgnoreCrits") : turnOff("IgnoreCrits"); + getPageSetting('AutoAllocatePerks')==2 ? turnOn("lootdumpa"): turnOff("lootdumpa"); + getPageSetting('AutoAllocatePerks')==2 ? turnOn("lootdumpz"): turnOff("lootdumpz"); + getPageSetting('BWraid')==true ? turnOn("BWraidingz"): turnOff("BWraidingz"); + getPageSetting('BWraid')==true ? turnOn("BWraidingmax"): turnOff("BWraidingmax"); + /*//Make Scryer settings a little more user friendly + if (getPageSetting('ScryerUseinVoidMaps2') !=0) { setPageSetting("ScryerUseinMaps2", "2"); } + if (getPageSetting('ScryerUseinSpire2') !=1 && isActiveSpireAT()) { setPageSetting("ScryerSkipCorrupteds2", "2"); } */ + //Show and Hide useless settings to reduce UI clutter + var turnonofflist = [ + "ManualGather2","BuyUpgradesNew","TrapTrimps","UsePatience", + "BuyBuildingsNew","WarpstationCap","WarpstationCoordBuy","MaxHut","MaxHouse","MaxMansion","MaxHotel","MaxResort","MaxGateway","MaxWormhole","MaxCollector","MaxGym","MaxTribute","GymWall","FirstGigastation","DeltaGigastation","WarpstationWall3", + "CapEquip2","DelayArmorWhenNeeded","BuyShieldblock", + "DynamicSiphonology","PreferMetal","LowerFarmingZone","FarmWhenNomStacks7","RunBionicBeforeSpire","CorruptionCalc","MaxTox","VoidCheck","TrimpleZ", + "DynamicGyms", + "SupplyWall","BuyOneTimeOC","MagmiteExplain", + "SpamGeneral","SpamUpgrades","SpamEquipment","SpamMaps","SpamOther","SpamBuilding","SpamJobs","SpamGraphs","SpamMagmite","SpamPerks", + ]; + if (game.worldUnlocks.easterEgg) + turnonofflist.push("AutoEggs"); + for (var i in turnonofflist) + getPageSetting('ShowSettings') ? turnOn(turnonofflist[i]) : turnOff(turnonofflist[i]); //DROPDOWNS: updates dropdown selections. (ALL DROPDOWNS REQUIRE THIS BIT TO BE UPDATEY) //todo check why this isnt possible to set automatically in the dropdown code. @@ -926,10 +964,10 @@ function getDailyHeHrStats() { function settingsProfileMakeGUI(){}; //blank on purpose, will be overwritten if necessary. //controls the button skips 2 of the tri-state automaps button -function toggleAutoMaps(){ +function toggleAutoMaps(){ if (getPageSetting('AutoMaps')) setPageSetting('AutoMaps',0); else setPageSetting('AutoMaps',1); document.getElementById("autoMapBtn").setAttribute("class", "noselect settingsBtn settingBtn" + autoTrimpSettings.AutoMaps.value); -} \ No newline at end of file +} diff --git a/docs/AutoPerks EfficiencyQueue.txt b/docs/AutoPerks EfficiencyQueue.txt deleted file mode 100644 index 9a0337c6a..000000000 --- a/docs/AutoPerks EfficiencyQueue.txt +++ /dev/null @@ -1,29 +0,0 @@ -How AutoPerks Works: ----------------------- -Get list of Ratio'ed Perks. -Create an Efficiency queue of each of the 16 perks. - - Current Level - - Current Price @ that level - - Current Stat Increase @ that Level. - - Current Efficiency (price / stat increase). -Then the list of 16 perks is sorted by Efficiency, and the 1st one on the list is purchased. -Repeat ad nauseum 36 million iterations. - -for (var e in effQueue.array) { console.log("Effiency@ " + effQueue.array[e].efficiency + " Perk name: " + effQueue.array[e].name);} - -Effiency@ 30.00000000000003 Perk name: power -Effiency@ 4.0000000000000036 Perk name: toughness -Effiency@ 3.200000000000003e-9 Perk name: cunning -Effiency@ 1.3333333333333346 Perk name: pheromones -Effiency@ 1.0000000000000009 Perk name: motivation -Effiency@ 0.36 Perk name: carpentry -Effiency@ 0.13333333333333333 Perk name: artisanistry -Effiency@ 0.08 Perk name: resilience -Effiency@ 0.00030000000000000024 Perk name: power_II -Effiency@ 0.00014999999999999682 Perk name: looting_II -Effiency@ 0.00011333333333333333 Perk name: coordinated -Effiency@ 0.00004000000000000004 Perk name: toughness_II -Effiency@ 0.000008000000000000006 Perk name: motivation_II -Effiency@ 0.000002249999999999952 Perk name: carpentry_II -Effiency@ 0.000002 Perk name: resourceful -Effiency@ 0.000001 Perk name: overkill \ No newline at end of file diff --git a/docs/SettingsTooltipDocumentation.txt b/docs/SettingsTooltipDocumentation.txt deleted file mode 100644 index 289452cc1..000000000 --- a/docs/SettingsTooltipDocumentation.txt +++ /dev/null @@ -1,71 +0,0 @@ -Auto Gather/Build - Automatically gathers resources (and uses Turkimp on metal). Auto speed-builds your build queue and auto-researches science on demand. -Better Auto Fight - Will automatically handle fighting. It gives you autofight before you get the Battle upgrade in Zone 1.. .CAUTION: If you autoportal with BetterAutoFight disabled, the game sits there doing nothing until you click FIGHT. (not good for afk) -Auto Stance - Automatically swap stances to avoid death. -Trap Trimps - Automatically trap trimps when needed, including building traps. -Buy Storage - Will buy storage when resource is almost full. (like AutoStorage, even anticipates Jestimp) -Buy Jobs - Buys jobs based on ratios configured below. CAUTION: you cannot manually assign jobs with this. Toggle if you need to. -Buy Buildings - Will buy non storage buildings as soon as they are available -Buy Upgrades - Autobuy non equipment Upgrades -Buy Armor - Auto-Buy/Level-Up the most cost efficient armor available. -Buy Armor Upgrades - (Prestiges) & Gymystic. Will buy the most efficient armor upgrade available. -Buy Weapons - Auto-Buy/Level-Up the most cost efficient weapon available. -Buy Weapon Upgrades - (Prestiges) Will buy the most efficient weapon upgrade available. -Buy Shield Block - Will buy the shield block upgrade. CAUTION: If you are progressing past zone 60, you probably don't want this :) -Run Unique Maps - Relies on AutoMaps to choose to run Unique maps. Required for AutoPortal. Also needed for challenges: Electricity, Mapocalypse, Meditate, and Crushed (etc). Needed to auto-run The Wall and Dimension of Anger. -Auto Heirlooms - Automatically evaluate and carry the best heirlooms, and recommend upgrades for equipped items. AutoHeirlooms will only change carried items when the heirlooms window is not open. Carried items will be compared and swapped with the types that are already carried. If a carry spot is empty, it will be filled with the best shield (if available). Evaluation is based ONLY on the following mods (listed in order of priority, high to low): Void Map Drop Chance/Trimp Attack, Crit Chance/Crit Damage, Miner Efficiency/Metal Drop, Gem Drop/Dragimp Efficiency, Farmer/Lumberjack Efficiency. For the purposes of carrying, rarity trumps all of the stat evaluations. Empty mod slots are valued at the average value of the best missing mod. -Hire Scientists - Enable or disable hiring of scientists. Math: ScientistRatio=(FarmerRatio+LumberjackRatio+MinerRatio)/25 and stops hiring scientists after 250k Farmers. -Manage Breed Timer - Automatically manage the breed timer by purchasing Genetecists. Sets ideal anticpation stacks. If not using AutoStance, this will probably be undesirable... Picks appropriate times for various challenges (3.5s,11s,30s). Delays purchasing potency and nurseries if trying to raise the timer. EFFECTIVELY LOCKS THE BREED TIMER -Geneticist Timer - Breed time in seconds to shoot for using geneticists. Disable with -1 (and Disable ManageBreedTimer) to disable the Hiring/Firing of genetecists (and potency upgrades). CANNOT CHANGE WITH MANAGE BREED TIMER OPTION ON -Farmer Ratio - -Lumberjack Ratio - -Miner Ratio - -Max Explorers - Map the planet!! -Max Trainers - Fist bump me bro -Max Huts - -Max Houses - -Max Mansions - -Max Hotels - -Max Resorts - -Max Gateways - WARNING: Not recommended to raise above 25 -Max Wormholes - WARNING: Wormholes cost helium! Values below 0 do nothing. -Max Collectors - -First Gigastation - How many warpstations to buy before your first gigastation -Delta Gigastation - How many extra warpstations to buy for each gigastation. Supports fractional values. For example 2.5 will buy +2/+3/+2/+3... -Max Gyms - -Max Tributes - -Max Nurseries - -Void Maps - The zone at which you want all your void maps to be cleared (Cell 96). 0 is off -Prestige - Acquire prestiges through the selected item (inclusive) as soon as they are available in maps. Forces equip first mode. Automap must be enabled. THIS IS AN IMPORTANT SETTING related to speed climbing and should probably always be on something. If you find the script getting stuck somewhere, particularly where you should easily be able to kill stuff, setting this to an option lower down in the list will help ensure you are more powerful at all times, but will spend more time acquiring the prestiges in maps. -Auto Portal - Automatically portal. Will NOT auto-portal if you have a challenge active, the challenge setting dictates which challenge it will select for the next run. All challenge settings will portal right after the challenge ends, regardless. Helium Per Hour portals at cell 1 of the first level where your He/Hr went down even slightly compared to the current runs Best He/Hr. Take note, there is a Buffer option in the genBTC settings, which is like a grace percentage of how low it can dip without triggering. CAUTION: Selecting He/hr may immediately portal you if its lower. -Challenge for Helium per Hour and Custom - Automatically portal into this challenge when using helium per hour or custom autoportal. Custom portals after cell 100 of the zone specified. -Custom Portal - Automatically portal AFTER clearing this level.(ie: setting to 200 would portal when you first reach level 201) -Limit Equipment - Limit levels of equipment bought to:(level 11 - the prestige level). At or Above Prestige X (10), your equipment will remain at level 1. In other words, do not level equipment after ~level ~51, and only buy Prestiges. CAUTION: may reduce He/hr performance in many cases. -Breed Fire - Fire Lumberjacks and Miners to speed up breeding when needed. (Not genetecists). -Max Toxicity Stacks - Get maximum toxicity stacks before killing the improbability in each zone 60 and above. Generally only recommended for 1 run to maximize bone portal value. This setting will revert to disabled after a successful Max-Tox run + Toxicity Autoportal. -Run New Voids - Run new void maps acquired after the set void map zone. Runs them at Cell 95 by default, unless you set a decimal value indicating the cell, like: 187.75 CAUTION: May severely slow you down by trying to do too-high level voidmaps. Use the adjacent RunNewVoidsUntil setting to limit this. -Void Difficulty Check - How many hits to be able to take from a void map boss in dominance stance before we attempt the map. Higher values will get you stronger (by farming for health) before attempting. 2 should be fine. -Disable Farming - Disables the farming section of the automaps algorithm. This will cause it to always return to the zone upon reaching 10 map stacks. TROUBLESHOOTING: Save and Refresh when you toggle this, if necessary. INFO: The new Trimps 3.22 map-buttons greatly eliminate the usefulness of this. ALSO: NO LONGER DISABLES SIPHONOLOGY. -PauseAutoTrimps - PauseAutoTrimps(notincludingthegraphsmodule) -Warpstation Cap - Do not level Warpstations past Basewarp+DeltaGiga **. Without this, if a Giga wasnt available, it would level infinitely (wastes metal better spent on prestiges instead.) **The script bypasses this cap each time a new giga is bought, when it insta-buys as many as it can afford (since AT keeps available metal/gems to a low, overbuying beyond the cap to what is affordable at that first moment is not a bad thing). -Cap Equip to 10 - Do not level equipment past 10. Similar to LimitEquipment, Helps for early game when the script wants to level your tier2s to 40+, but unlike LimitEquipment, does not impact Zone 60+. -Skip Gear Level 58&59 - Dont Buy Gear during level 58 and 59, wait till level 60, when cost drops down to 10%. -Delay Armor - Delay buying armor prestige upgrades during Want More Damage or Farming automap-modes. -Dynamic Siphonology - Use the right level of siphonology based on your damage output. -Farm on >7 NomStacks - On Improbability(cell 100). Meant to be used with DisableFarming (otherwise farming would take care of this, but its slower). If Improbability already has 5 NomStacks, stack 30 Anticipation. If the Improbability has >7 NomStacks on it, get +200% dmg from MapBonus. If we still cant kill it, enter Farming mode at 30 stacks, Even with DisableFarming On! (exits when we get under 20x) -AutoRoboTrimp - Use RoboTrimps ability starting at this level, and every 5 levels thereafter. (set to 0 to disable) -He/Hr Portal Buffer % - When using the He/Hr Autoportal, it will portal if your He/Hr drops by this amount of % lower than your best for current run, default is 0% (ie: set to 5 to portal at 95% of your best) -Run New Voids Until - Put a cap on what zone new voids will run at, until this zone, inclusive. -Always Buy Lvl 2 Armor - Always Buy the 2nd point of Armor even if we dont need the HP. Its the most cost effective level, and the HP _need_ script isnt always adequate. -Dynamic Prestige - EXPERIMENTAL: Skip getting prestiges at first, and Gradually work up to the desired Prestige setting you have set. Runs with Dagger to save a significant amount of time until we need better gear, then starts increasing the prestige setting near the end of the run. ---NEW ALGORITHM 7/23/2016--- Examines which prestiges you have, how many missing ones youd need to achieve the desired target and starts running 5 maps or 2 maps every zone, Until the target prestige is reached. Example: For mace, starts getting the prerequisite prestiges 10 zones away from max, then more and more, finally reaching the desired prestige by the last final zone (also goes for 9 mapbonus on the last zone). IMPORTANT NOTE PLEASE READ: Final Zone Number is inherently tied to the AutoPortal setting. When using the Helium per Hour setting, it uses the zone we portaled at last run (game.global.lastPortal). If the AutoPortal is set to a challenge, it will use the last zone of the challenge. CAUTION: EXPERIMENTAL, please come to Discord chat if you have problems. -undefined - undefined -Run Bionic Before Spire - Run the Bionic Wonderlands I through VI and then repeatedly farms VI(level 200) before attempting Spire, for the purpose of farming. WARNING: The point at which it stops farming has yet to be fully decided upon or set in stone, so it currently runs Bionic VI until it runs out of new prestige item rewards, then runs Bionic VII until it runs out of prestige items from that one, and then attempts the spire. This amounts to somewhere around 144 minutes. DO NOT USE WITH HE/HR PORTAL. Not meant to be used every time, He/Hr suffers. -Cap Trainers to a % of Tributes - Only Buy a Trainer when its cost is LESS than X% of cost of a tribute. This setting can work in combination with the other one, or set the other one to -1 and this will take full control. Default: -1 (Disabled). 50% is close to the point where the cap does nothing. You can go as low as you want but recommended is 10% to 1%. (example: Trainer cost of 5001, Tribute cost of 100000, @ 5%, it would NOT buy the trainer.) -PrestigeBackup - Acquire prestiges through the selected item (inclusive) as soon as they are available in maps. Forces equip first mode. Automap must be enabled. THIS IS AN IMPORTANT SETTING related to speed climbing and should probably always be on something. If you find the script getting stuck somewhere, particularly where you should easily be able to kill stuff, setting this to an option lower down in the list will help ensure you are more powerful at all times, but will spend more time acquiring the prestiges in maps. -Auto Heirlooms2 - New algorithm for Heirlooms. While enabled, the old AutoHeirlooms algorithm will be disabled (the button will stay lit or you can turn that one off). CAUTION: Turning this on will immediately re-sort your heirlooms according to the new algorithm, and turning it off again DOES revert to the original algorithm even though it may NOT have a visible result on your heirlooms. (fyi: This lack of action highlights one of the problems with the old one.) -AutoGoldenUpgrades - Automatically Buy the specified Golden Upgrades as they become available. -Auto Upgrade Heirlooms - Automatically buy the upgrade the script advises for the Equipped shield and staff, until we are out of nullifium. -Minutes to Farm Before Spire - Farm level 200 maps for X minutes before continuing to beat spire (0 to disable) -Auto Maps - Automatically run maps to progress. Very Important. -Auto Worker Ratios - Automatically changes worker ratios based on current progress. WARNING: overrides worker ratio settings. Settings: 1/1/1 up to 300k trimps, 3/3/5 up to 3mil trimps, then 3/1/4 above 3 mil trimps, then 1/1/10 above 1000 tributes, then 1/2/22 above 1500 tributes. Uses 1/40/8 in Spire since we get plenty of metal from that. -Warpstation Wall - Do not level Warpstations if it costs over 1/4th of the current metal we own. (Experimental) -Exit Spire After Cell - Exits the Spire after completing cell X. example: 40 for Row 4. (0 to disable) \ No newline at end of file diff --git a/docs/TODO.md b/docs/TODO.md deleted file mode 100644 index 7bd8d4d26..000000000 --- a/docs/TODO.md +++ /dev/null @@ -1,136 +0,0 @@ -Document Code Structure: (for other developers): see main-doc.txt ----------------- -Main-Documentation (main-doc.txt) -TODO List (this file - TODO.md) -Update README.md/changelog(.json?)/version # (manually for now) -Code Comments (getting better) - -Near Future: ------------------------- -WebSite https://autotrimps.site - even just a link to github, or link to tutorials on how to install. --GRAPHS! -TODO 1: Add notes or labels to graph runs. (to indicate which settings we used) -TODO 1: HighCharts annotations module for "notes" comments to indicate which graph runs were what. -TODO: IMPLEMENTING A STANDARD FOR CLOUD GRAPH STATISTICS: - -now : Highest zone, helium, bones, Perk preset/ratios. - -next: ATSettings, MODULES, which graphs were clicked on. - - -new TODO LIST: 3/3/2018 and 3/4/2018 extended to 3/7 still working on it as of 3/20. -------------------------------------- -XXXX: AutoPerks - background thread / web worker -XXXX: AutoPerks - allocate speed improvement, shortcuts, (36 million iterations and 15 seconds @ 720Qa HE) - - maybe slow due to OO structure and repeated resolutions for pass2. -TODO: Perky - implement Altizar Perky new Perk manager interface -TODO: SPAM tab - more granular settings. maybe every module could have its own toggle? - working on it. -TODO: "Map Special Modifier": Special Modifiers, Perfect Sliders (way more fragments), Extra Zones (+0 to +10) - with a save config option - if you create a config with FA and +5 zones, and save it, next time you/the script creates a map, it will remember the setting - so if you want you can use the script to create 3 setups (there are 3 slots to save your config) - + maps should be only created at poison zones and when they will provide new equipment - prestigious when you need prestiges, lmc when you need more lvls in your eq - perfect sliders when you can afford it - make perfect sliders like if you're able to afford 3x the cost of it in frags, just buy it. otherwise no. and it will be rarer that way but still useful - another valid idea is burn out all your frags on perfect near the end i guess -TODO: (from old TODO LIST: 8/17/2016) BionicW toggle that can let AT do Bionic Wonderland maps if they haven't ever been done before? - (in the same vein, check for "Speed" achievements for unique maps and do them if they're not done yet and possible) -TODO: for alfa166: "Bionic OverBurner" :smiley: Make it Configurable to run BW 470 one time at z480 to unlock and run BW485, (with the +5 map kit) -TODO: Make a more configurable Auto Spend Nulli function for 2018 -TODO: Should invent a tool/script to plug in the version numbers, changelogs, docs. -TODO: Instead of hard-coded changelog, Break changelog out into a seperate file and HTTPRequest it, parse it and run it through a standardized display function. - Pull external .JSON Changelog and stuff from this site's API (obviously have to create a new server endpoint PHP script) -TODO: Modular Structured load of the modules/*.js files is less than robust now. Check status of each loaded, tally a count, double check success. - -FAR: In this way, the tracking and loading of modules can be timestamped and version controlled for itemization and aggregate cloud managed. -FAR TODO: Cloud management of Save Files (already uploading save files and naming them. just need to download) -FAR TODO: Cloud distributed graphs. Show similar users graphs? (STARTED) - -Could just upload all the graphs after every run (how to detect full run?) -FAR TODO: Theoretically the graphs database can be used as a pro-active future prediction model and conditions can be inferred from past runs. - Example: If Helium per/hour is ABOUT to go down based on previous cached runs (during the ambiguity period of about a few zones), portal earlier. - Think like Grace %% setting but automatic. -FAR TODO: Analysis of the Userbase and custom settings, even make queries to ask server for better decision making based on global multi-client probability state -TODO: Develop an internal utility for me to Scrape/Grep/Grok the .json analytics files already on the server. -FAR TODO: Import/Export/Append Graphs. is delete working on refresh? -FAR TODO: Graphs encoding vs. storage is wasteful of space. We need more. Compress data or RLE it -TODO: Structure of Graphs.js is very wonky and can be re-sorted, nested somehow. -TODO: GUI javascript warning message "Are you sure?" OK/cancel template. -TODO: Bundle a newbie profile into the profiles-defaults. -TODO: Keep generating content in this file very late at night, that nobody can see or care about - real smart use of my time. - - -Bugs To Fix: ----------------- -Last github pull request is from 2016 = needs to be cleared. Has useful code that could be imported into Settings file for version comparisons and settings migrations/in-place upgrades. -All Issues from January to February have been resolved. -Any Issues remaining from prior 2017 should be disregarded. -BUG 1: Bone Portal messes with graphs / Importing a savedgame in progress produces bad graphs -BUG 2: The graphs still can miss time and have gaps/skips and has zone innacuracies, additionally it can fail to track Trimps data entirely during background window Javascript AFK/idle/catchup mode. -BUG 2: Overkill and certain graphs can skip progress and get mis-aligned if the script was paused or was backgrounded. - - -Done Did: ----------- -Done: Visible Version Status Number in UI / Startup popup messages -Done: Essence graph -Done: Renamed Module names: Some stuff is named auto, some stuff isnt. Its AutoTrimps so isn't everything auto? Redundant? -Done: Renamed NewUI2.js as SettingsGUI - needs new name, some love. -Done: Add autotrimps.site data json upload capability (thanks to Swiffy) -Done: BUG 1: Liquification - the Auto-Skip-tons-of-zones-in-beginning - causes overkill graph to be off by a LOT. -Not actually a thing: "Max Magmamancers By Zone #" so we can buy them at the start, to gain 5% attack for the first 10 minutes, usually for cases when the void zone which is the same as the portal zone, and you want to stack that level up with all you've got. - -5% Attack is only given after 5 minutes. Misunderstanding. -Done: AutoTrimps Presets dropdown list to name, save, reload different profiles -Done: Partially: Split SettingsGUI.js up into front-end DOM+GUI, back-end functions for Settings/Modules/Profiles, and createSettings+descriptions. -Done: Fluffy XP Graph -Done: Pin the ATSettings Tab MenuBar + Minimize,Maximize,Close buttons. -Done: TODO: Graphs, make 2 arrows to cycle sequentially through the graphs without using the dropdown everytime. -Done: TODO: Put changelog show/hide popup Button into settings -Done: PrintChangelog: print changelog function should be refactored: another function should be made to create a DOM element for all the changelog lines, scrape the API data into it, and then print tooltip with header/footer. - -Other Improvements: ------------------- -AUTOMAPS: -Rewrite the automaps way of deciding/picking/buying/running maps. (convo below) ---------------------------------------------------------------------------------- --: Decide whether map stacks can help speed you up or not: -If you're more limited by you being dead and your lack of health, than damage output, its probably more likely to not be worth it. -also if you don't have the overkill perk increasing damage can get inefficient when damage output is wasted -so keeping a good "survivability to damage output" ratio is better than optimizing "damage output" -keep a count of how long you were dead and how long you were doing damage -if you're never dead, then the damage boost from map stacks is USUALLY worth it. (cant say for sure but im pretty sure) -I still think you'd have to run 1 full map to know for sure if its worth it. then extrapolate that out times 10 --: Summary: -never dead -> damage boost helps when not "early game when you're ripping through bad guys" -almost never alive, frequently dead -> if more damage output than damage taken (and enough hp to react to fast guys), go on, otherwise farm -occasionally dead and dies faster than breeding -> needs more damage -occasionally dead and dies slower than breeding -> advance -Also while doing this, determine more refined rules for entering the 3 modes: want dmg/want health/farming - --:230+ regular maps should really be treated differently from corruption -they don't have block pierce, and no special abilities --it doesnt go into the map bonus mode soon enough because of the fact that its gauging the zone on non-corrupted enemies - //we will get at least 85 toxstacks from the 1st voidmap UNLESS we have overkill, then we dont get enough. - //if a new fight group is available and anticipation stacks aren't 30, abandon and grab a new group - - -VOIDMAPS: -Void Map Farming - based on how much damage you do rather than your health/survival ---------------------------------------------------------------------------------- --:Voidmaps: - //TODO: Account for magmated voidmaps. (not /2) - //TODO: Account for daily. --:On Voids Diff: -if you have enough HP to survive poisonous without genetecists, i guess its easy -poison is really bad before you get geneticists for example -before you have geneticists poisonous is just awful -if you block everything, heinous is awful -if you almost block everything, destructive is awful -and then the double hit is somewhere in the middle -yeah i think they shift a lot depending on how strong you are -if you're strong enough that doing voids at 190 is a joke but can't do them later after you finish corrupted for example -for me right now I usually block close to 100% of the damage, which is why destruction and heinous are worst -poison is completely trivial when the maps are already easy -destruction = % damage, heinous = crit -if you're trying to do the void maps before you're actually strong though poison is a killer -yea thats a good point, people doing them at the challenge boundary vs at the end of their run -I also thing the difficulty check should consider block, if it doesn't already do that -i always found poison to be the most obnoxious of them early on because when you don't even have geneticists to fire to make breeding faster again it just takes sooo long -for a large part of the game I only did VMs when I could completely block everything, which made them trivial diff --git a/docs/dailymodifiers.txt b/docs/dailymodifiers.txt deleted file mode 100644 index 951395309..000000000 --- a/docs/dailymodifiers.txt +++ /dev/null @@ -1,94 +0,0 @@ -badHealth = enemy, health -badMapHealth = enemy, health -badMapStrength = enemy, attack -badStrength = enemy, attack -bloodthirst = enemy, stacks -bogged = self, health, drain -crits = enemy, crit -dedication = gathering -dysfunctional = breeding -evenTrimpBuff = self,+attack -explosive = enemy, attack, drainy -famine = gathering, loot -karma = loot, stacks -large = housing -maxDamage = self,attack -minDamage = self,attack -oddTrimpNerf = self,-attack -plague = -health, stacks -rampage = self, +attack, stacks -slippery= dodge -toxic = breeding, stacks -weakness= self, -attack, stacks - -Main.js @ line 5455 -var dailyModifiers = -{ - minDamage: { - description : "Trimp min damage reduced by X % (additive)." - }, - maxDamage: { - description : "Trimp max damage increased by X % (additive)." - }, - plague: { - //Half of electricity - description : "Enemies stack a debuff with each attack, damaging Trimps for X% of total health per turn per stack, resets on Trimp death." - }, - weakness: { - description : "Enemies stack a debuff with each attack, reducing Trimp attack by X% per stack. Stacks cap at 9 and reset on Trimp death." - }, - large: { - description : "All housing can store X% fewer Trimps" - }, - dedication: { - description : "Gain X% more resources from gathering" - }, - famine: { - description : "Gain X% less Metal, Food, Wood, and Gems from all sources" - }, - badStrength: { - description : "Enemy attack increased by X%." - }, - badHealth: { - description : "Enemy health increased by X%." - }, - badMapStrength: { - description : "Enemy attack in maps increased by X%." - }, - badMapHealth: { - description : "Enemy health in maps increased by X%." - }, - crits: { - description : "Enemies have a 25% chance to crit for X% of normal damage" - }, - bogged: { - description : "Your Trimps lose X% of their max health after each attack." - }, - dysfunctional: { - description : "Your Trimps breed X% slower" - }, - oddTrimpNerf: { - description : "Trimps have X% less attack on odd numbered zones" - }, - evenTrimpBuff: { - description : "Trimps have X% more attack on even numbered zones" - }, - karma: { - description : 'Gain a stack after killing an enemy, increasing all non Helium loot by X%. Stacks cap at Y, and reset after clearing a zone.' - }, - toxic: { - description : "Gain a stack after killing an enemy, reducing breed speed by X% (compounding). Stacks cap at Y, and reset after clearing a zone." - }, - bloodthirst: { - description : "Enemies gain a stack of Bloodthirst whenever Trimps die.Every X stacks, enemies will heal to full and gain an additive 50 % attack.Stacks cap at Y, and reset after killing an enemy." - }, - explosive: { - description : " Enemies instantly deal % of their attack damage when killed if (str > 15) UNLESS your block is as high as your maximum health " - }, - slippery: { - description : " Enemies have a % chance to dodge your attacks on odd ? / ?even zones." - }, - rampage: { - description : "Gain a stack after killing an enemy, increasing Trimp attack by % (additive). Stacks cap at ? , and reset when your Trimps die." - }, -} diff --git a/docs/main-doc.txt b/docs/main-doc.txt deleted file mode 100644 index 6a3cb24b1..000000000 --- a/docs/main-doc.txt +++ /dev/null @@ -1,283 +0,0 @@ -AutoTrimps - A Highly Extensive Idle Clicker Game Script - -Code Execution Structure,Behavior/Explanation: -============================================== -A script bootstrap file userscript "install.user.js" is ran by Tampermonkeyed/Greasemonkeyed and installed into permanence on the browser extension. This loads AutoTrimps2.js. First it loads utils.js for some tools, then it loads the Settings UI and then it Loads the Graphs, This loads all the 17 submodules *.js files in the modules/ dir, in a particular order as listed. From that point, a timeout/interval loop is set up to launch the Main Game and Re-run the "Main Loop" every 100ms (10x a second) in sync with the Game Loop. Also the Graphs has its own identical tick count and loop. Each module function is called during the "Main Loop" generally one by one, sequentially, in a particular order, each cycle. There is no future state, just current. The past state is limited to anything we explicitly choose to keep around like in the graphs db or other variables. -The main files are: AutoTrimps2.js, SettingsGUI.js, Graphs.js - Keep reading for details. The separate modules are documented below. - -MODULES (2018): -=============== -battlecalc.js -breedtimer.js -buildings.js -client-server.js -dimgen.js (not used anymore?) -dynprestige.js -equipment.js -fight.js -gather.js -heirlooms.js -import-export.js -jobs.js -magmite.js -maps.js -other.js -perks.js -portal.js -query.js -scryer.js -stance.js -upgrades.js -utils.js - -EXTERNAL FILES: -================ -FastPriorityQueue.js - AutoPerks - uses a 3rd party library for data queues -HighCharts.js - Graphs - uses a 3rd party library to draw the graphs... -tabs.css - User Interface - mandatory css styles for the settings tab or to rewrite or style the UI -dark-graph.css - Graphs - needed some tweaks to work for dark theme. - -GUI: -===== -Consists of SettingsGUI.js is the Settings section + styles of tabs.css - -SETTINGS: -========= -AlwaysArmorLvl2 -AutoFight -AutoGoldenUpgrades -AutoHeirlooms -AutoHeirlooms2 -AutoMaps -AutoPortal -AutoRoboTrimp -AutoStance -AutoUpgradeHeirlooms -BreedFire -BuyArmor -BuyArmorUpgrades -BuyBuildings -BuyJobs -BuyShieldblock -BuyStorage -BuyUpgrades -BuyWeapons -BuyWeaponUpgrades -CapEquip -CorruptionCalc -CustomAutoPortal -DefaultAutoTrimps -DelayArmorWhenNeeded -DeltaGigastation -DisableFarm -DynamicPrestige -DynamicSiphonology -ExitSpireCell -ExportAutoTrimps -FarmerRatio -FarmWhenNomStacks7 -FirstGigastation -GeneticistTimer -HeliumHourChallenge -HeliumHrBuffer -HireScientists -ImportAutoTrimps -LimitEquipment -LumberjackRatio -ManageBreedtimer -ManualGather -MaxCollector -MaxExplorers -MaxGateway -MaxGym -MaxHotel -MaxHouse -MaxHut -MaxMansion -MaxNursery -MaxResort -MaxTox -MaxTrainers -MaxTribute -MaxWormhole -MinerRatio -MinutestoFarmBeforeSpire -PauseScript -Prestige -RunBionicBeforeSpire -RunNewVoids -RunNewVoidsUntil -RunUniqueMaps -ScryerMaxZone -ScryerMinZone -ScryerSkipBoss2 -ScryerSkipCorrupteds2 -ScryerUseinMaps2 -ScryerUseinSpire2 -ScryerUseinVoidMaps2 -ScryerUseWhenOverkill -TrainerCaptoTributes -TrapTrimps -UseScryerStance -VoidCheck -VoidMaps -WaitTill60 -WarpstationCap -WarpstationWall -WorkerRatios - -GRAPHS - Graphs.js is the graphs section: + dark-graph.css (maybe need to darkify the css on the perks too window) -======= -HeliumPerHour -Helium -HeliumPerHour Instant -HeliumPerHour Delta -HeHr % / LifetimeHe -He % / LifetimeHe -Clear Time -Cumulative Clear Time -Run Time -Map Bonus -Void Maps -Void Map History -Loot Sources -Coords -Gigas -UnusedGigas -Lastwarp -Trimps -Nullifium Gained -DarkEssence -DarkEssencePerHour -OverkillCells -Magmite -Magmamancers - -AutoTrimps2.js Detailed Main Function Documentation (from 2016): -=================================================== -The main loop consists of the following subroutines, all of which are enable-able/disable-able by their buttons.: - workerRatios(); //"Auto Worker Ratios" - buyUpgrades(); //"Buy Upgrades" - autoGoldenUpgrades(); //"AutoGoldenUpgrades" (genBTC settings area) - buyStorage(); //"Buy Storage" - buyBuildings(); //"Buy Buildings" - buyJobs(); //"Buy Jobs" - manualLabor(); //"Auto Gather/Build" - autoMap(); //"Auto Maps" - manageGenes(); //"Genetecist Timer" / "Manage Breed Timer" - autoPortal(); //"Auto Portal" (hidden until level 60) - autoHeirlooms2(); or autoHeirlooms(); //"Auto Heirlooms 2" (genBTC settings area) or //"Auto Heirlooms" - toggleAutoTrap(); //"Trap Trimps" - autoRoboTrimp(); //"AutoRoboTrimp" (genBTC settings area) - autoNull(); //"Auto Upgrade Heirlooms" (genBTC settings area) - autoLevelEquipment(); //"Buy Armor", "Buy Armor Upgrades", "Buy Weapons","Buy Weapons Upgrades" - autoStance(); //"Auto Stance" - betterAutoFight(); //"Better Auto Fight" - prestigeChanging2(); //"Dynamic Prestige" (genBTC settings area) - userscripts(); //Runs any user provided scripts - by copying and pasting a function named userscripts() into the Chrome Dev console. (F12) - - -Version Numbered Files (files needing version string during minor upgrades): -====================== -.user.js -user.js -install.user.js -AutoTrimps2.js -Graphs.js -TODO: Should invent a tool/script to advance the version numbers, generate changelogs, auto-link docs. - -HOWTO = Become an AutoTrimps developer -====================================== -The script is setup to be able to be bootstrapped from Tampermonkey/Greasemonkey. -If you paste the AutoTrimps2.js into your Tampermonkey window directly, you can attempt to run a local developer copy and edit it in the tampermonkey edit window. This pulls from a repo and loads all the sub-modules .js files. -The point to understand is HTTPS and SSL is required. It has to be served over an actual HTTPS web-server so chrome can successfully load the secure content resources since https://trimps.github.io is technically the origin and any non-secure javascript resources will be flagged,denied and not-executed... -Simply, You can fork the project on github, find&replace my github URL with yours and upload all your changes to your own repo. And every time you make a change you will have to re-upload / defeat caching / reload to host the file. But this is non-ideal from a "agile" or "live" developer POV. -A better way is to set up a local HTTPS server, mirror my github repo to a local folder, and tell the webserver to run out of that folder, serving it up on https://localhost:4443 or some port number. -So instead of downloading Apache or a full complicated webserver or something, download python - or most computers these days have Python installed. You can use python to be a simple HTTP server with the following scripts, applicable to either Python2.x or Python3.x. -There are multiple ways to achieve the webserver, but this is the best way i've found (if it doesnt do HTTPS it wont work). -These scripts let you open a folder, double click the script, and start serving files out of that local dir instantly over HTTPS. -//(make sure you generate a self-signed .PEM cert to serve.) - this Cert is what provides the necessary SSL functionality - -# generate the cert with the following command (should be an openssl binary exe somewhere on the system) -# openssl req -new -x509 -keyout AutoTrimps.pem -out AutoTrimps.pem -days 365 -nodes -# run as follows: -# python https.py -# then in your browser, visit: -# https://localhost:4443 -# - -Choose the right version of https.py for your System: ----------------------------------------- -https.py = HTTPS Localhost Self serve - With Python 2: ----------------------------------------- -import BaseHTTPServer, SimpleHTTPServer -import ssl -httpd = BaseHTTPServer.HTTPServer(('localhost', 4443), SimpleHTTPServer.SimpleHTTPRequestHandler) -httpd.socket = ssl.wrap_socket (httpd.socket, certfile='./AutoTrimps.pem', server_side=True) -httpd.serve_forever() - ----------------------------------------- -https.py = HTTPS Localhost Self serve - With Python 3: ----------------------------------------- -import logging -import os -import sys -import http.server -import socketserver -import ssl -logging.info('Server running...') -httpd = socketserver.TCPServer(('localhost', 4443), http.server.SimpleHTTPRequestHandler) -httpd.socket = ssl.wrap_socket(httpd.socket, certfile='./AutoTrimps.pem', server_side=True) -httpd.serve_forever() - -//(make sure you generate a self-signed .PEM cert to serve.) - this Cert is what provides the necessary SSL functionality - -Make this batch script to double click to easily run the .py file from windows explorer without going to command line (mac/linux make a .sh file im sure you know how): --------------------- -SIMPLEHTTPSERVER.BAT --------------------- -@echo off -cd C:\Users\EOFL\Documents\GitHub\AutoTrimps -rem Infinite loop, counting from 1 to 10 with increment of 0. (just makes it restart on errors) -for /L %%n in (1,0,10) do ( - C:\Python36\python.exe https.py -) - - -HOWTO = Add A Button -===================== -All the buttons are created in SettingsGUI.js @ line 410 - with a function createSetting(): -This function takes 7 parameters and can make about 6 types of buttons: (boolean, value, valueNegative, dropdown, infoclick, multitoggle). The visual style will match similar. First determine the type of button, then copy a similar button. This explains the parameters: -function createSetting(id, name, description, type, defaultValue, list, container) -id = settings variable name -name = text on the button -description = tooltip when hovering inside the button. -type = boolean, value, valueNegative, dropdown, infoclick, multitoggle -defaultValue = pick the most common desirable setting -list = Only for dropdowns, the list of choices in ["one", "two", "three"] form -container = IMPORTANT: this will position the button in any of the tabbable sections "Main, Gear, Maps, Settings, Scryer" etc. - - These container tabs are what we will learn next: - -HOWTO = Add a New Tab (to the settings area.) -============================================= -All the tabs are created in SettingsGUI.js @ line 143 - the function is: initializeAllTabs(): -Inside there, follow the existing pattern and create a new line in the form of: - createTabs("Tab Name", "Tab Sub Heading"); - -Then you can use this new "Tab Name" as the container variable when you createSetting() and the button will go in there. - -HOWTO = Add a New Script Module -=============================== -AutoTrimps2.js is the module loader. Line 32: -var ATmodules = ['query', 'import-export', 'upgrades', 'heirlooms', 'buildings', 'jobs', 'equipment', 'gather', 'stance', 'battlecalc', 'maps', 'breedtimer', 'dynprestige', 'fight', 'scryer', 'magmite', 'portal', 'other', 'client-server', 'perks']; -They refer to .js files of the same name in the "modules" directory. -All you have to do is create a new file in modules/ named something.js and add ,'something' to the end of that list. -The script will then load it on startup, so it either has to run itself self-sufficiently, or you need to use ATs userscripts functionality to run it, something like this: -function userscripts() -{ - runModuleWhatever.FunctionFromThatModuleFile(); -} -Any function named userscripts will execute 10 times per second at the final portion of each game cycle. -This way means you can add your own code without contaminating AutoTrimps files directly. -Some Files contain/require game-code overwrites that need to be periodically checked and maintained. These are undocumented. Some are for the GUI and some are in utils.js maybe some for the heirlooms, and also graph loot... \ No newline at end of file diff --git a/docs/v2.1.5.1 b/docs/v2.1.5.1 deleted file mode 100644 index 1600aadd9..000000000 --- a/docs/v2.1.5.1 +++ /dev/null @@ -1,72 +0,0 @@ -v2.1.5.1 - 12/23/2016 -AutoTrimps2.js: -internals: fix module load order bug -move automaps re-enable after portal to mainCleanup -NEW: make AT use betterautofight on Zone 1 before Battle upgrade even when better autofight is disabled -internals: Change ATrunning variable - -docs/TODO.md: -Add a conversation about Void map difficulty so I dont forget - -Graphs.js -NEW: Add Magmite Graph -dont push updates if the game is paused. fix import on pause Clear Time problem -Change Loot Sources graph to 60 datapoints, every 15 seconds. -internals: refactor time graph functions -Change Dark Essence graph to be Total owned, not gained that run. -internals: refactor code for Dark Essence per Hour graph, adjust 0's zone alignment -internals: tried to change Loot Sources from having 0.5 tick lengths on the x-axis but failed. - -Autofight.js - Refactor; -betterAutoFight2 use lowLevelFight when scientist 1 is incomplete, not complete. -IMPORTANT: betterAutoFight2 dont use #3 when VoidMap is first ran (so it waits and loads your full Anticipation stacks) - -Automaps.js -add MODULE variable for SpireFarm199Maps -NEW: add a more efficient health check to make sure you can in fact kill the enemy on that specific cell you're on and you arent stuck on it due to it being fast and lack of health etc. -TODO: Account for magmated voidmaps. -TODO: Account for dailymods in voidmaps. -NEW: Change entire system of map sliders: - fixed bug where it was picking Metal maps at low level. - start all map sliders on 9/9/9 and decrement cost if needed based on priority that is assigned based on which situation. - -Autostance.js -Fix rare case when your enemyHealth == baseDamage -Fix some bugs in Autostance2 with Crit -Start fixing the scryer checkOnly thing but didnt finish. -NEW: (mentioned in automaps) autoStanceCheck now handles individual cell health checks that follow all the autostance rules (for automap) - -Battlecalc.js -Allow functions to be called with variables to disable stance correction and min/max damage range fluctuation. - -Buildings 1 & 2.js -Fix Green highlighting -NEW: Delay buying Gyms if we NEED gymystic - -Equipment.js -NEW: Skip buying shields (w/ shieldblock) if we NEED gymystic -Uncap Equipment levels during Metal Challenge - -Gather.js -Change Trapping Behavior, make it identical between gather1 and gather2. -Make sure watch challenge doesnt get stuck. - -Jobs.js -Only try to buy jobs (and therefore print message) if we can afford them. (reduce spam) -Add Auto Worker Ratios for Metal Challenge (acts somewhat weird but better than nothing) - -Other.js -TODO: coding the Auto Dimensional Generator (determined which functions to use) -TODO: start coding for Overclocker upgrade (need help/advice) - -Portal.js -NEW: AutoFinishDailyZone : Finish Daily by this # of zones earlier/later than your regular Custom AutoPortal zone or your Helium Dont Portal Before zone - -Utils.js -moved to mainLoop in AutoTrimps2.js - -SettingsGUI.js -Change wording to "Better" Auto Fight -AutoFinishDailyZone -TODO: Start coding the importModuleVars stuff for "Import your custom MODULES variables " -Create a way to make negative value boxes. \ No newline at end of file diff --git a/index.html b/index.html index fc7de85e1..ae613e88e 100644 --- a/index.html +++ b/index.html @@ -18,13 +18,13 @@

Autotrimps

Automation for the idle incremental game 'Trimps'

-

View the Project on GitHub genbtc/AutoTrimps

+

View the Project on GitHub genbtc/AutoTrimps

@@ -59,6 +59,6 @@

- + diff --git a/install.user.js b/install.user.js deleted file mode 100644 index 8f864910a..000000000 --- a/install.user.js +++ /dev/null @@ -1,19 +0,0 @@ -// ==UserScript== -// @name AutoTrimps-genBTC -// @namespace https://github.com/genbtc/AutoTrimps -// @version 2.1.6.9-genbtc-3-23-2018 -// @updateURL https://github.com/genbtc/AutoTrimps/install.user.js -// @description Automate all the trimps! -// @author zininzinin, spindrjr, Ishkaru, genBTC -// @include *trimps.github.io* -// @include *kongregate.com/games/GreenSatellite/trimps -// @grant none -// ==/UserScript== - -var script = document.createElement('script'); -script.id = 'AutoTrimps-script'; -//This can be edited to be your own Github Repository URL. -script.src = 'https://genbtc.github.io/AutoTrimps/AutoTrimps2.js'; -//script.setAttribute('crossorigin',"use-credentials"); -script.setAttribute('crossorigin',"anonymous"); -document.head.appendChild(script); diff --git a/modules/ATcalc.js b/modules/ATcalc.js new file mode 100644 index 000000000..9f77a7599 --- /dev/null +++ b/modules/ATcalc.js @@ -0,0 +1,5 @@ +function calculateDamageAT() { +var trimpATK1 = calculateDamage(game.global.soldierCurrentAttack, true, true); +var trimpATK = parseFloat(trimpATK1) +return trimpATK; +} diff --git a/modules/battlecalc.js b/modules/battlecalc.js index c365db94c..c305c6ca6 100644 --- a/modules/battlecalc.js +++ b/modules/battlecalc.js @@ -219,6 +219,22 @@ function getBattleStats(what,form,crit) { var amt = Fluffy.getDamageModifier(); currentCalc *= amt; } + //Amal attack + if (what == "attack" && game.jobs.Amalgamator.owned > 0){ + var amt = game.jobs.Amalgamator.getDamageMult(); + currentCalc *= amt; + } + //Amal health + if (what == "health" && game.jobs.Amalgamator.owned > 0){ + var amt = game.jobs.Amalgamator.getHealthMult(); + currentCalc *= amt; + } + if (what == "attack" && game.singleRunBonuses.sharpTrimps.owned) { + currentCalc *= 1.5; + } + if (game.jobs.Magmamancer.owend > 0) { + currentCalc *= game.jobs.Magmamancer.getBonusPercent(); + } if (crit) { var critChance = getPlayerCritChance(); if (what == "attack" && critChance){ @@ -273,7 +289,7 @@ function calcOurDmg(number,maxormin,disableStances,disableFlucts) { //number = b number *= ((vpAmt / 100) + 1); } if (game.global.totalSquaredReward > 0){ - number *= ((game.global.totalSquaredReward / 100) + 1) + number *= ((game.global.totalSquaredReward / 100) + 1); } if (game.talents.magmamancer.purchased){ number *= game.jobs.Magmamancer.getBonusPercent(); @@ -287,6 +303,15 @@ function calcOurDmg(number,maxormin,disableStances,disableFlucts) { //number = b if (Fluffy.isActive()){ number *= Fluffy.getDamageModifier(); } + if (game.jobs.Amalgamator.owned > 0){ + number *= game.jobs.Amalgamator.getDamageMult(); + } + if (game.jobs.Amalgamator.owned > 0){ + number *= game.jobs.Amalgamator.getHealthMult(); + } + if (game.singleRunBonuses.sharpTrimps.owned) { + number *= 1.5; + } number *= (1 + (1 - game.empowerments.Ice.getCombatModifier())); if (game.global.challengeActive == "Daily"){ @@ -367,6 +392,9 @@ function calcBadGuyDmg(enemy,attack,daily,maxormin,disableFlucts) { } else if (game.global.challengeActive == "Corrupted"){ number *= 3; + } + else if (game.global.challengeActive == "Obliterated"){ + number *= 1e12; } if (daily) number = calcDailyAttackMod(number); @@ -397,7 +425,7 @@ function calcDailyAttackMod(number) { number *= dailyModifiers.badMapStrength.getMult(game.global.dailyChallenge.badMapStrength.strength); } if (typeof game.global.dailyChallenge.bloodthirst !== 'undefined'){ - number *= dailyModifiers.bloodthirst.getMult(game.global.dailyChallenge.bloodthirst.strength, game.global.dailyChallenge.bloodthirst.stacks) + number *= dailyModifiers.bloodthirst.getMult(game.global.dailyChallenge.bloodthirst.strength, game.global.dailyChallenge.bloodthirst.stacks); } } return number; diff --git a/modules/breedtimer.js b/modules/breedtimer.js index 740500fdd..d262e2090 100644 --- a/modules/breedtimer.js +++ b/modules/breedtimer.js @@ -125,7 +125,7 @@ function autoBreedTimer() { var fireobj = fire1 ? time : timeLeft; //if we need to speed up our breeding //if we have potency upgrades available, buy them. If geneticists are unlocked, or we aren't managing the breed timer, just buy them - if ((targetBreed < time || !game.jobs.Geneticist.locked || !getPageSetting('ManageBreedtimer') || game.global.challengeActive == 'Watch') && game.upgrades.Potency.allowed > game.upgrades.Potency.done && canAffordTwoLevel('Potency') && getPageSetting('BuyUpgrades')) { + if ((targetBreed < time || !game.jobs.Geneticist.locked || !getPageSetting('ManageBreedtimer') || game.global.challengeActive == 'Watch') && game.upgrades.Potency.allowed > game.upgrades.Potency.done && canAffordTwoLevel('Potency') && getPageSetting('BuyUpgradesNew')) { buyUpgrade('Potency'); } //otherwise, if we have too many geneticists, (total time) - start firing them #1 diff --git a/modules/equipment.js b/modules/equipment.js index 1df61fea1..59e430ae0 100644 --- a/modules/equipment.js +++ b/modules/equipment.js @@ -146,6 +146,8 @@ function evaluateEquipmentEfficiency(equipName) { var StatusBorder = 'white'; var Wall = false; + var BuyWeaponUpgrades = ((getPageSetting('BuyWeaponsNew')==1) || (getPageSetting('BuyWeaponsNew')==2)); + var BuyArmorUpgrades = ((getPageSetting('BuyArmorNew')==1) || (getPageSetting('BuyArmorNew')==2)); if (!game.upgrades[equip.Upgrade].locked) { //Evaluating upgrade! var CanAfford = canAffordTwoLevel(game.upgrades[equip.Upgrade]); @@ -153,7 +155,7 @@ function evaluateEquipmentEfficiency(equipName) { var NextEffect = PrestigeValue(equip.Upgrade); //Scientist 3 and 4 challenge: set metalcost to Infinity so it can buy equipment levels without waiting for prestige. (fake the impossible science cost) //also Fake set the next cost to infinity so it doesn't wait for prestiges if you have both options disabled. - if ((game.global.challengeActive == "Scientist" && getScientistLevel() > 2) || ((!getPageSetting('BuyArmorUpgrades') && !getPageSetting('BuyWeaponUpgrades')))) + if ((game.global.challengeActive == "Scientist" && getScientistLevel() > 2) || (!BuyWeaponUpgrades && !BuyArmorUpgrades)) var NextCost = Infinity; else var NextCost = Math.ceil(getNextPrestigeCost(equip.Upgrade) * Math.pow(1 - game.portal.Artisanistry.modifier, game.portal.Artisanistry.level)); @@ -349,8 +351,8 @@ function autoLevelEquipment() { //Code is Spaced This Way So You Can Read It: if (evaluation.StatusBorder == 'red' && !(game.global.world < 60 && game.global.world >= 58 && MODULES["equipment"].waitTill60)) { - var BuyWeaponUpgrades = getPageSetting('BuyWeaponUpgrades'); - var BuyArmorUpgrades = getPageSetting('BuyArmorUpgrades'); + var BuyWeaponUpgrades = ((getPageSetting('BuyWeaponsNew')==1) || (getPageSetting('BuyWeaponsNew')==2)); + var BuyArmorUpgrades = ((getPageSetting('BuyArmorNew')==1) || (getPageSetting('BuyArmorNew')==2)); var DelayArmorWhenNeeded = getPageSetting('DelayArmorWhenNeeded'); if ( @@ -392,6 +394,8 @@ function autoLevelEquipment() { //LEVELING EQUIPMENT SECTION: preBuy(); game.global.buyAmt = 1; //needed for buyEquipment() + var BuyWeaponLevels = ((getPageSetting('BuyWeaponsNew')==1) || (getPageSetting('BuyWeaponsNew')==3)); + var BuyArmorLevels = ((getPageSetting('BuyArmorNew')==1) || (getPageSetting('BuyArmorNew')==3)); for (var stat in Best) { var eqName = Best[stat].Name; var $eqName = document.getElementById(eqName); @@ -408,21 +412,22 @@ function autoLevelEquipment() { //If we are doing the MaxMapBonusAfterZone stuff, equipment should be upgraded to its cap. var maxmap = getPageSetting('MaxMapBonusAfterZone') && doMaxMapBonus; //If we're considering an attack item, we want to buy weapons if we don't have enough damage, or if we don't need health (so we default to buying some damage) - if (getPageSetting('BuyWeapons') && DaThing.Stat == 'attack' && (!enoughDamageE || enoughHealthE || maxmap || spirecheck)) { + if (BuyWeaponLevels && DaThing.Stat == 'attack' && (!enoughDamageE || enoughHealthE || maxmap || spirecheck)) { if (DaThing.Equip && !Best[stat].Wall && canAffordBuilding(eqName, null, null, true)) { debug('Leveling equipment ' + eqName, "equips", '*upload3'); buyEquipment(eqName, null, true); } } //If we're considering a health item, buy it if we don't have enough health, otherwise we default to buying damage - if (getPageSetting('BuyArmor') && (DaThing.Stat == 'health' || DaThing.Stat == 'block') && (!enoughHealthE || maxmap || spirecheck)) { + if (BuyArmorLevels && (DaThing.Stat == 'health' || DaThing.Stat == 'block') && (!enoughHealthE || maxmap || spirecheck)) { if (DaThing.Equip && !Best[stat].Wall && canAffordBuilding(eqName, null, null, true)) { debug('Leveling equipment ' + eqName, "equips", '*upload3'); buyEquipment(eqName, null, true); } } - var aalvl2 = MODULES["equipment"].alwaysLvl2; //getPageSetting('AlwaysArmorLvl2'); - if (getPageSetting('BuyArmor') && (DaThing.Stat == 'health') && aalvl2 && game.equipment[eqName].level < 2){ + //Always LVL 2: + var aalvl2 = MODULES["equipment"].alwaysLvl2; //was getPageSetting('AlwaysArmorLvl2'); + if (BuyArmorLevels && (DaThing.Stat == 'health') && aalvl2 && game.equipment[eqName].level < 2){ if (DaThing.Equip && !Best[stat].Wall && canAffordBuilding(eqName, null, null, true)) { debug('Leveling equipment ' + eqName + " (AlwaysLvl2)", "equips", '*upload3'); buyEquipment(eqName, null, true); diff --git a/modules/fight-info.js b/modules/fight-info.js index 8923b769b..214f74119 100644 --- a/modules/fight-info.js +++ b/modules/fight-info.js @@ -13,7 +13,7 @@ "Hulking_Mutimp" ]; - // Exotic imps + // Exotic imps (This has been disabled) M["fightinfo"].exotics = [ "Feyimp", @@ -93,65 +93,142 @@ // Cell data var cell = cells[i]; - + //Glyphs if(cell.name.toLowerCase().indexOf('skele') > -1) // Skeletimp cell { - if(cell.special.length === 0) - $cell.innerHTML = " "; + if(cell.special.length !== 0){$cell.innerHTML += ' ';} + $cell.innerHTML += ``; + $cell.style.textShadow = '0px 0px 15px #ffffff'; + } - $cell.title = cell.name; - //$cell.style.color = M["fightinfo"].colors.bone; //(This changes the colour of the glyph - bad bc it overrides trimps and looks bad against corruption etc) - $cell.style.textShadow = '0px 0px 10px #ffffff'; + else if(M["fightinfo"].powerful.indexOf(cell.name) > -1) // Powerful imps + { + if(cell.special.length !== 0){$cell.innerHTML += ' ';} + $cell.innerHTML += " "; + $cell.style.textShadow = '0px 0px 15px #8c0000'; } - else if(M["fightinfo"].exotics.indexOf(cell.name) > -1) // Exotic cell + else if(cell.name.toLowerCase().indexOf('cthulimp') > -1) // Cthulimp cell { - if(cell.special.length === 0) - $cell.innerHTML = " "; + $cell.style.textShadow = '0px 0px 15px #fb753f'; + } - $cell.title = cell.name; - //$cell.style.color = M["fightinfo"].colors.exotic; //(This changes the colour of the glyph - bad bc it overrides trimps and looks bad against corruption etc) - $cell.style.textShadow = '0px 0px 10px #fb753f'; + //Map Imports + else if(cell.name.toLowerCase().indexOf('goblimp') > -1) // goblimp cell + { + if(cell.special.length !== 0){$cell.innerHTML += ' ';} + $cell.innerHTML = " "; + $cell.style.textShadow = '0px 0px 15px #fb753f'; } - else if(M["fightinfo"].powerful.indexOf(cell.name) > -1) // Powerful imp + else if(cell.name.toLowerCase().indexOf('flutimp') > -1) // flutimp cell { - if(cell.special.length === 0) - $cell.innerHTML = " "; + if(cell.special.length !== 0){$cell.innerHTML += ' ';} + $cell.innerHTML = " "; + $cell.style.textShadow = '0px 0px 15px #fb753f'; + } - $cell.title = cell.name; - //$cell.style.color = M["fightinfo"].colors.powerful; //(This changes the colour of the glyph - bad bc it overrides trimps and looks bad against corruption etc) - $cell.style.textShadow = '0px 0px 10px #8c0000'; + else if(cell.name.toLowerCase().indexOf('jestimp') > -1) // jestimp cell + { + if(cell.special.length !== 0){$cell.innerHTML += ' ';} + $cell.innerHTML = " "; + $cell.style.textShadow = '0px 0px 15px #fb753f'; } - //This shit doesn't work and I don't know why (What is the celltitle??? is it the name of the nature? Imps are labelled Toxic/Gusty/Frozen but that didin't work either) - if(cell.name.toLowerCase().indexOf('poison') > -1) // Poison Token cell + else if(cell.name.toLowerCase().indexOf('titimp') > -1) // titimp cell { - if(cell.special.length === 0) - $cell.innerHTML = " "; + if(cell.special.length !== 0){$cell.innerHTML += ' ';} + $cell.innerHTML = " "; + $cell.style.textShadow = '0px 0px 15px #fb753f'; + } - $cell.title = cell.name; - //$cell.style.color = M["fightinfo"].colors.exotic; //(This changes the colour of the glyph - bad bc it overrides trimps and looks bad against corruption etc) - $cell.style.textShadow = '0px 0px 10px #ffffff'; + else if(cell.name.toLowerCase().indexOf('chronoimp') > -1) // chronoimp cell + { + if(cell.special.length !== 0){$cell.innerHTML += ' ';} + $cell.innerHTML = " "; + $cell.style.textShadow = '0px 0px 15px #fb753f'; } - if(cell.name.toLowerCase().indexOf('wind') > -1) // Wind Token cell + + + //World Imports + else if(cell.name.toLowerCase().indexOf('feyimp') > -1) // feyimp cell { - if(cell.special.length === 0) - $cell.innerHTML = " "; + if(cell.special.length !== 0){$cell.innerHTML += ' ';} + $cell.innerHTML += ``; + $cell.style.textShadow = '0px 0px 15px #fb753f'; + } - $cell.title = cell.name; - //$cell.style.color = M["fightinfo"].colors.exotic; //(This changes the colour of the glyph - bad bc it overrides trimps and looks bad against corruption etc) + else if(cell.name.toLowerCase().indexOf('tauntimp') > -1) // titimp cell + { + if(cell.special.length !== 0){$cell.innerHTML += ' ';} + $cell.innerHTML += ``; + $cell.style.textShadow = '0px 0px 15px #fb753f'; + } + + else if(cell.name.toLowerCase().indexOf('venimp') > -1) // titimp cell + { + if(cell.special.length !== 0){$cell.innerHTML += ' ';} + $cell.innerHTML += ``; + $cell.style.textShadow = '0px 0px 15px #fb753f'; + } + + else if(cell.name.toLowerCase().indexOf('whipimp') > -1) // titimp cell + { + if(cell.special.length !== 0){$cell.innerHTML += ' ';} + $cell.innerHTML += ``; + $cell.style.textShadow = '0px 0px 15px #fb753f'; + } + + else if(cell.name.toLowerCase().indexOf('magnimp') > -1) // magnimp cell + { + if(cell.special.length !== 0){$cell.innerHTML += ' ';} + $cell.innerHTML += ``; + $cell.style.textShadow = '0px 0px 15px #fb753f'; + } + + + + /*else if(M["fightinfo"].exotics.indexOf(cell.name) > -1) // Exotic cell (also the Original code) + { + //if(cell.special.length === 0) + $cell.innerHTML += " "; + + $cell.title = cell.name; + //$cell.style.color = M["fightinfo"].colors.exotic; //(This changes the colour of the glyph - bad bc it overrides trimps and looks bad against corruption etc) + $cell.style.textShadow = '0px 0px 15px #fb753f'; + }*/ + + //This shit doesn't work and I don't know why tbh, the current behaviour spams ice glyphs everywhere + /*else if(document.getElementsByClassName("empoweredCellPoison")[0] != null) // Poison Token cell + { + $cell.innerHTML += `` ; $cell.style.textShadow = '0px 0px 10px #ffffff'; } - if(cell.name.toLowerCase().indexOf('ice') > -1) // Ice Token cell + + else if(document.getElementsByClassName("empoweredCellWind")[0] != null) // Wind Token cell { - if(cell.special.length === 0) - $cell.innerHTML = " "; + $cell.innerHTML += ``; + $cell.style.textShadow = '0px 0px 10px #ffffff'; + } - $cell.title = cell.name; - //$cell.style.color = M["fightinfo"].colors.exotic; //(This changes the colour of the glyph - bad bc it overrides trimps and looks bad against corruption etc) + else if(document.getElementsByClassName("empoweredCellIce")[0] != null) // Ice Token cell + { + if(cell.special.length !== 0){$cell.innerHTML += ' ';} + $cell.innerHTML += ``; $cell.style.textShadow = '0px 0px 10px #ffffff'; + }*/ + + //Tooltip on world cells, works reasonably well. special behaviour for maps cause of looping + if(cell.corrupted != null && cell.corrupted !== "none") + { + $cell.title += `${cell.name} \- ${mutationEffects[cell.corrupted].title}`; + } + else if (game.global.mapsActive) + { + $cell.title = `${cell.name}`; } + else + $cell.title += ` ${cell.name}`; } } diff --git a/modules/fight.js b/modules/fight.js index 4368395ea..2d869ff0c 100644 --- a/modules/fight.js +++ b/modules/fight.js @@ -10,6 +10,7 @@ function ATselectAutoFight() { BAFsetting = getPageSetting('BetterAutoFight'); if (BAFsetting==1) betterAutoFight(); //"Better Auto Fight" (autofight.js) else if (BAFsetting==2) betterAutoFight2(); //"Better Auto Fight2" (") + else if (BAFsetting==3) betterAutoFight3(); //"Better Auto Fight3" (") else if (BAFsetting==0 && BAFsetting!=oldBAFsetting && game.global.autoBattle && game.global.pauseFight) pauseFight(); //turn on autofight on once when BAF is toggled off. else if (BAFsetting==0 && game.global.world == 1 && game.global.autoBattle && game.global.pauseFight) pauseFight(); //turn on autofight on lvl 1 if its off. else if (BAFsetting==0 && !game.global.autoBattle && game.global.soldierHealth == 0) betterAutoFight(); //use BAF as a backup for pre-Battle situations @@ -47,7 +48,8 @@ function betterAutoFight2() { pauseFight(); //Disable built-in autofight if (game.global.gridArray.length === 0 || game.global.preMapsActive || !game.upgrades.Battle.done || game.global.fighting) return; //sanity check. - var targetBreed = getPageSetting('GeneticistTimer'); + var spireBreed = getPageSetting('SpireBreedTimer'); + var targetBreed = (game.global.spireActive && spireBreed != -1) ? spireBreed : game.global.GeneticistassistSetting; //use custom breed value for spire var breeding = (game.resources.trimps.owned - game.resources.trimps.employed); var newSquadRdy = game.resources.trimps.realMax() <= game.resources.trimps.owned + 1; var adjustedMax = (game.portal.Coordinated.level) ? game.portal.Coordinated.currentSend : trimps.maxSoldiers; @@ -57,40 +59,73 @@ function betterAutoFight2() { //if armySend is less than half of what you have breeding, and what you have breeding is more than 10% of your total trimps. (when scientist I is incompleted) var lowLevelFight = game.resources.trimps.maxSoldiers < 0.5*breeding && breeding > 0.1*game.resources.trimps.realMax() && game.global.world <= 6 && game.global.sLevel < 1; + //chooses the correct patience value var breedTimerLimit = game.talents.patience.purchased && getPageSetting('UsePatience') ? 46 : 31; //Manually fight if: //game.global.soldierHealth > 0 //just fight if we're alive,or if == 0; we're dead, and also fight :P - if (!game.global.fighting) { - if (game.global.soldierHealth > 0) - battle(true); //just fight, dont speak. - else if (newSquadRdy || lowLevelFight || game.global.challengeActive == 'Watch') { - battle(true); - if (MODULES["fight"].enableDebug) - debug("AutoFight Default: New squad ready", "other"); + if (!game.global.fighting) { // !(game.global.spireActive || (game.global.mapsActive && getCurrentMapObject().location == "Void") || game.global.preMapsActive) + if (game.global.SpireActive){ + if((game.global.lastBreedtime/1000)>=targetBreed && (game.global.lastBreedtime/1000)>=breedTimerLimit) { + fightManual() + } } - //Click Fight if we are dead and already have enough for our breed timer, and fighting would not add a significant amount of time - else if (getBreedTime() < customVars.breedTimerCutoff1 && (game.global.lastBreedTime/1000) > targetBreed) { - battle(true); - if (MODULES["fight"].enableDebug) - debug("AutoFight: BAF2 #1, breed < " + customVars.breedTimerCutoff1 + " && HiddenNextGroup > GeneTimer", "other"); - } - //AutoFight will now send Trimps to fight if it takes less than 0.5 seconds to create a new group of soldiers, if we havent bred fully yet - else if (getBreedTime() <= customVars.breedTimerCutoff2) { - battle(true); - if (MODULES["fight"].enableDebug) - debug("AutoFight: BAF2 #2, breed <= " + customVars.breedTimerCutoff2 + " s", "other"); + else if (game.global.soldierHealth > 0) + fightManual(); //If you are not fighting but have health, fix this situation by clicking fight (fixes some weird Trimps errors) + //if max trimps, army size insignificant, or in Watch + else if (newSquadRdy || lowLevelFight || game.global.challengeActive == 'Watch') { + fightManual(); + if (MODULES["fight"].enableDebug) + debug("AutoFight Default: New squad ready", "other"); + } + //Click Fight if we are dead and already have enough for our breed timer, and fighting would not add a significant amount of time + else if (getBreedTime() < customVars.breedTimerCutoff1 && (game.global.lastBreedTime/1000) > targetBreed) { + fightManual(); + if (MODULES["fight"].enableDebug) + debug("AutoFight: BAF2 #1, breed < " + customVars.breedTimerCutoff1 + " && HiddenNextGroup > GeneTimer", "other"); + } + //AutoFight will now send Trimps to fight if it takes less than 0.5 seconds to create a new group of soldiers, if we havent bred fully yet + else if (getBreedTime() <= customVars.breedTimerCutoff2) { + fightManual(); + if (MODULES["fight"].enableDebug) + debug("AutoFight: BAF2 #2, breed <= " + customVars.breedTimerCutoff2 + " s", "other"); + } + //Click fight anyway if we are dead and stuck in a loop due to Dimensional Generator and we can get away with adding time to it. + else if (getBreedTime(true)+addTime <= targetBreed && breeding>=adjustedMax && !(game.global.mapsActive && getCurrentMapObject().location == "Void")) { + fightManual(); + if (MODULES["fight"].enableDebug) + debug("AutoFight: BAF2 #3, RemainingTime + ArmyAdd.Time < GeneTimer", "other"); + } + //Clicks fight anyway if we are dead and have >=breedTimerLimit NextGroupTimer and deal with the consequences by firing geneticists afterwards. + else if (game.global.soldierHealth == 0 && (game.global.lastBreedTime/1000)>=breedTimerLimit && targetBreed >= 0 && !game.jobs.Geneticist.locked && game.jobs.Geneticist.owned > 10 ) { + fightManual(); + if (MODULES["fight"].enableDebug) + debug("AutoFight: BAF2 #4, NextGroupBreedTimer went over " + breedTimerLimit + " and we arent fighting.", "other"); + } + } +} + +//NEW:: 3rd algorithm for Better Auto Fight (Basically brute force fight unless in spire or VM) +function betterAutoFight3() { + var customVars = MODULES["fight"]; + if (game.global.autoBattle && game.global.pauseFight) //check autofight available, and if it is off + pauseFight(); //activates autofight + if (game.global.gridArray.length === 0 || game.global.preMapsActive || !game.upgrades.Battle.done || game.global.fighting || game.global.spireActive) + return; //sanity check. + if (!game.global.fighting) { + fightManual(); + } +} + +/* code borrowed from Sliverz as a starting point +if (game.global.soldierHealth == 0 && !(game.global.spireActive || (game.global.mapsActive && getCurrentMapObject().location == "Void") || game.global.preMapsActive)) { + fightManual(); + buyArmors(); } - //Click fight anyway if we are dead and stuck in a loop due to Dimensional Generator and we can get away with adding time to it. - else if (getBreedTime(true)+addTime <= targetBreed && breeding>=adjustedMax && !(game.global.mapsActive && getCurrentMapObject().location == "Void")) { - battle(true); - if (MODULES["fight"].enableDebug) - debug("AutoFight: BAF2 #3, RemainingTime + ArmyAdd.Time < GeneTimer", "other"); + if (game.global.antiStacks != 45 && game.global.realBreedTime >= 45500 && !game.global.SpireActive) { + forceAbandonTrimps(); } - //Clicks fight anyway if we are dead and have >=breedTimerLimit NextGroupTimer and deal with the consequences by firing geneticists afterwards. - else if (game.global.soldierHealth == 0 && (game.global.lastBreedTime/1000)>=breedTimerLimit && targetBreed >= 0 && !game.jobs.Geneticist.locked && game.jobs.Geneticist.owned > 10 ) { - battle(true); - if (MODULES["fight"].enableDebug) - debug("AutoFight: BAF2 #4, NextGroupBreedTimer went over " + breedTimerLimit + " and we arent fighting.", "other"); + if ((needPrestige || !enoughDamage) && game.global.world>=200 && (getEmpowerment() == "Ice" || (getEmpowerment() == "Wind" && game.global.realBreedTime >= 45500)) && !game.global.mapsActive && game.global.mapBonus != 10 && game.global.world!=game.options.menu.mapAtZone.setZone) { + forceAbandonTrimps(); } - } -} + + */ diff --git a/modules/gather.js b/modules/gather.js index 54299d885..850c00553 100644 --- a/modules/gather.js +++ b/modules/gather.js @@ -37,7 +37,7 @@ function manualLabor() { if (trapperTrapUntilFull && (game.global.buildingsQueue.length == 0 || game.buildings.Trap.owned == 1) && !game.global.trapBuildAllowed && canAffordBuilding('Trap')) safeBuyBuilding('Trap'); //get ahead on trap building since it is always needed for Trapper } - else if (getPageSetting('ManualGather2') != 2 && game.resources.science.owned < MODULES["gather"].minScienceAmount && document.getElementById('scienceCollectBtn').style.display != 'none' && document.getElementById('science').style.visibility != 'hidden') + else if (getPageSetting('ManualGather2') != 3 && game.resources.science.owned < MODULES["gather"].minScienceAmount && document.getElementById('scienceCollectBtn').style.display != 'none' && document.getElementById('science').style.visibility != 'hidden') setGather('science'); //if we have more than 2 buildings in queue, or (our modifier is real fast and trapstorm is off), build else if (!game.talents.foreman.purchased && (game.global.buildingsQueue.length ? (game.global.buildingsQueue.length > 1 || game.global.autoCraftModifier == 0 || (getPlayerModifier() > 1000 && game.global.buildingsQueue[0] != 'Trap.1')) : false)) { @@ -50,11 +50,11 @@ function manualLabor() { //if we have some upgrades sitting around which we don't have enough science for, gather science else if (game.resources.science.owned < scienceNeeded && document.getElementById('scienceCollectBtn').style.display != 'none' && document.getElementById('science').style.visibility != 'hidden') { // debug('Science needed ' + scienceNeeded); - if ((getPlayerModifier() < getPerSecBeforeManual('Scientist') && hasTurkimp)||getPageSetting('ManualGather2') == 2){ + if ((getPlayerModifier() < getPerSecBeforeManual('Scientist') && hasTurkimp)||getPageSetting('ManualGather2') == 3){ //if manual is less than science production, switch on turkimp setGather('metal'); } - else if (getPageSetting('ManualGather2') != 2){ + else if (getPageSetting('ManualGather2') != 3){ setGather('science'); } } @@ -106,7 +106,7 @@ function manualLabor() { else setGather(lowestResource);//gather the lowest resource //This stuff seems to be repeated from above. Should be refactored and fixed so this is not confusing. - } else if (getPageSetting('ManualGather2') != 2 && document.getElementById('scienceCollectBtn').style.display != 'none' && document.getElementById('science').style.visibility != 'hidden') { + } else if (getPageSetting('ManualGather2') != 3 && document.getElementById('scienceCollectBtn').style.display != 'none' && document.getElementById('science').style.visibility != 'hidden') { if (game.resources.science.owned < getPsString('science', true) * MODULES["gather"].minScienceSeconds && game.global.turkimpTimer < 1 && haveWorkers) setGather('science'); else if (hasTurkimp) @@ -183,15 +183,15 @@ function manualLabor2() { //if we have less than (100) science or less than a minute of science if (game.resources.science.owned < MODULES["gather"].minScienceAmount || (game.resources.science.owned < getPsString('science', true) * MODULES["gather"].minScienceSeconds && game.global.turkimpTimer < 1)) - if (getPageSetting('ManualGather2') != 2) { + if (getPageSetting('ManualGather2') != 3) { setGather('science'); return; } if (game.resources.science.owned < scienceNeeded) { //if manual is less than science production and turkimp, metal. (or science is set as disallowed) - if ((getPlayerModifier() < getPerSecBeforeManual('Scientist') && hasTurkimp) || getPageSetting('ManualGather2') == 2) + if ((getPlayerModifier() < getPerSecBeforeManual('Scientist') && hasTurkimp) || getPageSetting('ManualGather2') == 3) setGather('metal'); - else if (getPageSetting('ManualGather2') != 2) { + else if (getPageSetting('ManualGather2') != 3) { setGather('science'); return; } diff --git a/modules/heirlooms.js b/modules/heirlooms.js index 9c4dd20de..2276597ec 100644 --- a/modules/heirlooms.js +++ b/modules/heirlooms.js @@ -326,6 +326,22 @@ function evaluateHeirloomMods(loom, location, upgrade) { } } break; + + case 'plaguebringer': + tempEff = loom.mods[m][1]*1000000; + eff += tempEff; + if(upgrade){ + steps = game.heirlooms.Shield.plaguebringer.steps[loom.rarity]; + tempEff = (steps[2]/1)/((game.heirlooms.Shield.plaguebringer.currentBonus/100) + 1); + tempEff = tempEff / getModUpgradeCost(loom, m); + if(tempEff > bestUpgrade.effect) { + bestUpgrade.effect = tempEff; + bestUpgrade.name = 'plaguebringer'; + bestUpgrade.index = m; + } + } + break; + case 'MinerSpeed': tempEff = 0.75*loom.mods[m][1]/100; eff += tempEff; @@ -409,6 +425,19 @@ function evaluateHeirloomMods(loom, location, upgrade) { bestUpgrade.index = m; } } + case 'FluffyExp': + tempEff = 0.5*loom.mods[m][1]*100000; + eff += tempEff; + if(upgrade) { + steps = game.heirlooms.defaultSteps[loom.rarity]; + tempEff = (0.5*steps[2]/1)/((game.heirlooms.Staff.FluffyExp.currentBonus/100) + 1); + tempEff = tempEff / getModUpgradeCost(loom, m); + if(tempEff > bestUpgrade.effect) { + bestUpgrade.effect = tempEff; + bestUpgrade.name = 'FluffyExp'; + bestUpgrade.index = m; + } + } break; case 'empty': var av; @@ -418,13 +447,13 @@ function evaluateHeirloomMods(loom, location, upgrade) { if(!checkForMod('trimpAttack', index, location)){ steps = game.heirlooms[loom.type].trimpAttack.steps[loom.rarity]; av = steps[0] + ((steps[1] - steps[0])/2); - tempEff = av/100; + tempEff = av/10; eff += tempEff; } else if(!checkForMod('voidMaps', index, location)){ steps = game.heirlooms[loom.type].voidMaps.steps[loom.rarity]; av = steps[0] + ((steps[1] - steps[0])/2); - tempEff = (steps[2]/100); + tempEff = (steps[2]/10); eff += tempEff; } else if(!checkForMod('critChance', index, location)){ @@ -439,11 +468,17 @@ function evaluateHeirloomMods(loom, location, upgrade) { tempEff = (av * ccb)/(cmb * ccb + 1 - ccb); eff += tempEff; } + else if(!checkForMod('plaguebringer', index, location)){ + steps = game.heirlooms[loom.type].plaguebringer.steps[loom.rarity]; + av = steps[0] + ((steps[1] - steps[0])/2); + tempEff = av/1; + eff += tempEff; + } } if(loom.type == 'Staff') { steps = game.heirlooms.defaultSteps[loom.rarity]; av = steps[0] + ((steps[1] - steps[0])/2); - if(!checkForMod('MinerSpeed', index, location) || !checkForMod('metalDrop', index, location) || !checkForMod('DragimpSpeed', index, location) || !checkForMod('gemsDrop', index, location)){ + if(!checkForMod('MinerSpeed', index, location) || !checkForMod('metalDrop', index, location) || !checkForMod('fragmentsDrop', index, location) || !checkForMod('ExplorerSpeed', index, location) || !checkForMod('FluffyExp', index, location)){ eff += 0.75*av/100; } else if(!checkForMod('FarmerSpeed', index, location) || !checkForMod('LumberjackSpeed', index, location)) { diff --git a/modules/magmite.js b/modules/magmite.js index 5ac9684ca..179f3c896 100644 --- a/modules/magmite.js +++ b/modules/magmite.js @@ -29,13 +29,13 @@ function autoMagmiteSpender() { // then consider overclocker if we can afford it var hasOv = game.permanentGeneratorUpgrades.Hybridization.owned && game.permanentGeneratorUpgrades.Storage.owned; var ovclock = game.generatorUpgrades.Overclocker; - if (hasOv && (getPageSetting('BuyOvclock') || !ovclock.upgrades) && (game.global.magmite >= ovclock.cost())) { + if (hasOv && ((getPageSetting('BuyOneTimeOC')==1 || getPageSetting('BuyOneTimeOC')==3) || !ovclock.upgrades) && (game.global.magmite >= ovclock.cost())) { debug("Auto Spending " + ovclock.cost() + " Magmite on: Overclocker" + (ovclock.upgrades ? " #" + (ovclock.upgrades + 1) : ""), "magmite"); buyGeneratorUpgrade('Overclocker'); } - + //Part #2 - var repeat = !getPageSetting('OneTimeOnly'); + var repeat = (getPageSetting('BuyOneTimeOC')==1 || getPageSetting('BuyOneTimeOC')==2); while (repeat) { if (MODULES["magmite"].algorithm == 2) { //Method 2: diff --git a/modules/maps.js b/modules/maps.js index 92c50b197..300edb94a 100644 --- a/modules/maps.js +++ b/modules/maps.js @@ -1,37 +1,38 @@ MODULES["maps"] = {}; //These can be changed (in the console) if you know what you're doing: MODULES["maps"].enoughDamageCutoff = 4; //above this the game will do maps for map bonus stacks -MODULES["maps"].farmingCutoff = 16; //above this the game will farm. -MODULES["maps"].numHitsSurvived = 8; //survive X hits in D stance or not enough Health. +MODULES["maps"].farmingCutoff = 16; //above this the game will farm. +MODULES["maps"].numHitsSurvived = 8; //survive X hits in D stance or not enough Health. MODULES["maps"].LeadfarmingCutoff = 10; //lead has its own farmingCutoff -MODULES["maps"].NomfarmingCutoff = 10; //nom has its own farmingCutoff -MODULES["maps"].NurseryMapLevel = 50; //with blacksmithery, run map for nursery on this level +MODULES["maps"].NomfarmingCutoff = 10; //nom has its own farmingCutoff +MODULES["maps"].NurseryMapLevel = 50; //with blacksmithery, run map for nursery on this level //if FarmWhenNomStacks7 setting is on = [x, y, z]; -MODULES["maps"].NomFarmStacksCutoff = [7,30,100]; +MODULES["maps"].NomFarmStacksCutoff = [7, 30, 100]; //[x] get maxMapBonus (10) if we go above (7) stacks on Improbability (boss) //[y] go into maps on (30) stacks on Improbability (boss), farm until we fall under the 'NomfarmingCutoff' (10) //[z] restarts your voidmap if you hit (100) stacks -MODULES["maps"].MapTierZone = [72,47,16]; //descending order for these. +MODULES["maps"].MapTierZone = [72, 47, 16]; //descending order for these. // .MapTier?Sliders = [size,difficulty,loot,biome]; -MODULES["maps"].MapTier0Sliders = [9,9,9,'Mountain']; //Zone 72+ (old: 9/9/9 Metal) -MODULES["maps"].MapTier1Sliders = [9,9,9,'Depths']; //Zone 47-72 (old: 9/9/4 Metal) -MODULES["maps"].MapTier2Sliders = [9,9,9,'Random']; //Zone 16-47 (old: 9/9/0 Random) -MODULES["maps"].MapTier3Sliders = [9,9,9,'Random']; //Zone 6-16 (old: 9/0/0 Random) -MODULES["maps"].preferGardens = !getPageSetting('PreferMetal'); //prefer run Garden maps instead of ^^ if we have Decay done -MODULES["maps"].maxMapBonus = 10; //cap how many maps are run during Want More Damage mode -MODULES["maps"].wantHealthMapBonus = 10;//cap how many maps are run during Want More Health mode -MODULES["maps"].SpireFarm199Maps = true; //this will farm spire on 199 maps instead of 200 maps when Map Reducer is bought -MODULES["maps"].watchChallengeMaps = [15, 25, 35, 50]; //during 'watch' challenge, run maps on these levels: +MODULES["maps"].MapTier0Sliders = [9, 9, 9, 'Mountain']; //Zone 72+ (old: 9/9/9 Metal) +MODULES["maps"].MapTier1Sliders = [9, 9, 9, 'Depths']; //Zone 47-72 (old: 9/9/4 Metal) +MODULES["maps"].MapTier2Sliders = [9, 9, 9, 'Random']; //Zone 16-47 (old: 9/9/0 Random) +MODULES["maps"].MapTier3Sliders = [9, 9, 9, 'Random']; //Zone 6-16 (old: 9/0/0 Random) +MODULES["maps"].preferGardens = !getPageSetting('PreferMetal'); //prefer run Garden maps instead of ^^ if we have Decay done +MODULES["maps"].maxMapBonus = 10; //cap how many maps are run during Want More Damage mode +MODULES["maps"].wantHealthMapBonus = 10; //cap how many maps are run during Want More Health mode +MODULES["maps"].SpireFarm199Maps = true; //this will farm spire on 199 maps instead of 200 maps when Map Reducer is bought +MODULES["maps"].watchChallengeMaps = [15, 25, 35, 50]; //during 'watch' challenge, run maps on these levels: MODULES["maps"].shouldFarmCell = 59; -MODULES["maps"].SkipNumUnboughtPrestiges = 2; //exceeding this number of unbought prestiges will trigger a skip of prestige mode. +MODULES["maps"].SkipNumUnboughtPrestiges = 2; //exceeding this number of unbought prestiges will trigger a skip of prestige mode. MODULES["maps"].UnearnedPrestigesRequired = 2; -MODULES["maps"].maxMapBonusAfterZ = MODULES["maps"].maxMapBonus; //Max Map Bonus After Zone uses this many stacks - //- init as default value (10). user can set if they want. +MODULES["maps"].maxMapBonusAfterZ = MODULES["maps"].maxMapBonus; //Max Map Bonus After Zone uses this many stacks +//- init as default value (10). user can set if they want. //Initialize Global Vars (dont mess with these ones, nothing good can come from it). var stackingTox = false; var doVoids = false; var needToVoid = false; +var plusMapVoid = false; var needPrestige = false; var skippedPrestige = false; var voidCheckPercent = 0; @@ -47,6 +48,7 @@ var spireMapBonusFarming = false; var spireTime = 0; var doMaxMapBonus = false; var vanillaMapatZone = false; +var additionalCritMulti = (getPlayerCritChance() > 2) ? 25 : 5; //AutoMap - function originally created by Belaith (in 1971) //anything/everything to do with maps. @@ -56,15 +58,17 @@ function autoMap() { // if(game.options.menu.alwaysAbandon.enabled == 1) toggleSetting('alwaysAbandon'); //if we are prestige mapping, force equip first mode var prestige = autoTrimpSettings.Prestige.selected; - if(prestige != "Off" && game.options.menu.mapLoot.enabled != 1) toggleSetting('mapLoot'); + if (prestige != "Off" && game.options.menu.mapLoot.enabled != 1) toggleSetting('mapLoot'); //Control in-map right-side-buttons for people who can't control themselves. If you wish to use these buttons manually, turn off autoMaps temporarily. - if(game.options.menu.repeatUntil.enabled == 2) toggleSetting('repeatUntil'); - if(game.options.menu.exitTo.enabled != 0) toggleSetting('exitTo'); - if(game.options.menu.repeatVoids.enabled != 0) toggleSetting('repeatVoids'); + if (game.options.menu.repeatUntil.enabled == 2) toggleSetting('repeatUntil'); + if (game.options.menu.exitTo.enabled != 0) toggleSetting('exitTo'); + if (game.options.menu.repeatVoids.enabled != 0) toggleSetting('repeatVoids'); //exit and do nothing if we are prior to zone 6 (maps haven't been unlocked): - if (!game.global.mapsUnlocked || !(baseDamage > 0)) { //if we have no damage, why bother running anything? (this fixes weird bugs) - enoughDamage = true; enoughHealth = true; shouldFarm = false; - updateAutoMapsStatus(); //refresh the UI status (10x per second) + if (!game.global.mapsUnlocked || !(baseDamage > 0)) { //if we have no damage, why bother running anything? (this fixes weird bugs) + enoughDamage = true; + enoughHealth = true; + shouldFarm = false; + updateAutoMapsStatus(); //refresh the UI status (10x per second) return; } //if we are in mapology and we have no credits, exit @@ -77,29 +81,56 @@ function autoMap() { var extraMapLevels = getPageSetting('AdvMapSpecialModifier') ? getExtraMapLevels() : 0; //FIND VOID MAPS LEVEL: var voidMapLevelSetting = getPageSetting('VoidMaps'); + //Add your daily zone mod onto the void maps level + var dailyVoidMod = getPageSetting('AutoFinishDailyNew'); + if ((game.global.challengeActive == "Daily") && (getPageSetting('AutoFinishDailyNew') != 999) && (getPageSetting('DailyVoidMod'))) { + (voidMapLevelSetting += dailyVoidMod); + } //decimal void maps are possible, using string function to avoid false float precision (0.29999999992). javascript can compare ints to strings anyway. - var voidMapLevelSettingZone = (voidMapLevelSetting+"").split(".")[0]; - var voidMapLevelSettingMap = (voidMapLevelSetting+"").split(".")[1]; + var voidMapLevelSettingZone = (voidMapLevelSetting + "").split(".")[0]; + var voidMapLevelSettingMap = (voidMapLevelSetting + "").split(".")[1]; if (voidMapLevelSettingMap === undefined || (game.global.challengeActive == 'Lead' && !challSQ)) - voidMapLevelSettingMap = 93; - if (voidMapLevelSettingMap.length == 1) voidMapLevelSettingMap += "0"; //entering 187.70 becomes 187.7, this will bring it back to 187.70 - var voidsuntil = getPageSetting('RunNewVoidsUntil'); + voidMapLevelSettingMap = 90; + if (voidMapLevelSettingMap.length == 1) voidMapLevelSettingMap += "0"; //entering 187.70 becomes 187.7, this will bring it back to 187.70 + var voidsuntil = getPageSetting('RunNewVoidsUntilNew'); needToVoid = voidMapLevelSetting > 0 && game.global.totalVoidMaps > 0 && game.global.lastClearedCell + 1 >= voidMapLevelSettingMap && - (game.global.world == voidMapLevelSettingZone || - (game.global.world >= voidMapLevelSettingZone && getPageSetting('RunNewVoids') && (voidsuntil == -1 || game.global.world <= voidsuntil))); - if(game.global.totalVoidMaps == 0 || !needToVoid) + (game.global.world == voidMapLevelSettingZone || + (game.global.world >= voidMapLevelSettingZone && getPageSetting('RunNewVoidsUntilNew') != 0 && (voidsuntil == -1 || game.global.world <= (voidsuntil + voidMapLevelSettingZone)))); + if (game.global.totalVoidMaps == 0 || !needToVoid) doVoids = false; + + //NEW KFrowde + Sliverz This has several issues: 1 - Buys fuckloads of maps, 2 - enters a BW map instead of the one that you want + //Set up vars + var plusMapVoidLastZone + var plusMapVoid = (voidMapLevelSetting > 0) && (game.global.totalVoidMaps > 0) && (game.global.world == voidMapLevelSettingZone); //Sanity check + var plusMapVoidInput = getPageSetting('PlusMapVoidToggle') + //Check that you should do this, check you've enabled it between the correct values, check that it hasn't already run this zone + if ((plusMapVoid) && (plusMapVoidInput > 0 && plusMapVoidInput <= 10) && (plusMapVoidLastZone === null || plusMapVoidLastZone !== game.global.world)) { + document.getElementById("biomeAdvMapsSelect").value = "Random"; + document.getElementById('advExtraLevelSelect').value = plusMapVoidInput; + document.getElementById('advSpecialSelect').value = "p"; + document.getElementById("lootAdvMapsRange").value = 0; + document.getElementById("difficultyAdvMapsRange").value = 9; + document.getElementById("sizeAdvMapsRange").value = 9; + document.getElementById('advPerfectCheckbox').checked = false; + updateMapCost(); + buyMap(); + selectMap(game.global.mapsOwnedArray[game.global.mapsOwnedArray.length - 1].id); + runMap(); + plusMapVoidLastZone = game.global.world; //This should have stopped it from looping + } + // if force prestige, check if we are behind any first - if ((getPageSetting('ForcePresZ') >= 0) && ((game.global.world+extraMapLevels) >= getPageSetting('ForcePresZ'))) { - const prestigeList = ['Supershield','Dagadder','Megamace','Polierarm','Axeidic','Greatersword','Harmbalest','Bootboost','Hellishmet','Pantastic','Smoldershoulder','Bestplate','GambesOP']; - needPrestige = prestigeList.some(pres => game.mapUnlocks[pres].last <= (game.global.world+extraMapLevels) - 5); + if ((getPageSetting('ForcePresZ') >= 0) && ((game.global.world + extraMapLevels) >= getPageSetting('ForcePresZ'))) { + const prestigeList = ['Supershield', 'Dagadder', 'Megamace', 'Polierarm', 'Axeidic', 'Greatersword', 'Harmbalest', 'Bootboost', 'Hellishmet', 'Pantastic', 'Smoldershoulder', 'Bestplate', 'GambesOP']; + needPrestige = prestigeList.some(pres => game.mapUnlocks[pres].last <= (game.global.world + extraMapLevels) - 5); } else - //calculate if we are behind on unlocking prestiges - needPrestige = prestige != "Off" && game.mapUnlocks[prestige] && game.mapUnlocks[prestige].last <= (game.global.world+extraMapLevels) - 5 && game.global.challengeActive != "Frugal"; + //calculate if we are behind on unlocking prestiges + needPrestige = prestige != "Off" && game.mapUnlocks[prestige] && game.mapUnlocks[prestige].last <= (game.global.world + extraMapLevels) - 5 && game.global.challengeActive != "Frugal"; //dont need prestige if we are caught up, and have (2) unbought prestiges: skippedPrestige = false; - if (needPrestige && getPageSetting('PrestigeSkipMode')) { - var prestigeList = ['Dagadder','Megamace','Polierarm','Axeidic','Greatersword','Harmbalest','Bootboost','Hellishmet','Pantastic','Smoldershoulder','Bestplate','GambesOP']; + if (needPrestige && (getPageSetting('PrestigeSkip1_2') == 1 || getPageSetting('PrestigeSkip1_2') == 2)) { + var prestigeList = ['Dagadder', 'Megamace', 'Polierarm', 'Axeidic', 'Greatersword', 'Harmbalest', 'Bootboost', 'Hellishmet', 'Pantastic', 'Smoldershoulder', 'Bestplate', 'GambesOP']; var numUnbought = 0; for (var i in prestigeList) { var p = prestigeList[i]; @@ -112,22 +143,27 @@ function autoMap() { } } // Don't need prestige if there aren't many weapon prestiges left - if ((needPrestige || skippedPrestige) && getPageSetting('PrestigeSkip2')) { - const prestigeList = ['Dagadder','Megamace','Polierarm','Axeidic','Greatersword','Harmbalest']; - const numLeft = prestigeList.filter(pres => game.mapUnlocks[pres].last <= (game.global.world+extraMapLevels) - 5); + if ((needPrestige || skippedPrestige) && (getPageSetting('PrestigeSkip1_2') == 1 || getPageSetting('PrestigeSkip1_2') == 3)) { + const prestigeList = ['Dagadder', 'Megamace', 'Polierarm', 'Axeidic', 'Greatersword', 'Harmbalest']; + const numLeft = prestigeList.filter(pres => game.mapUnlocks[pres].last <= (game.global.world + extraMapLevels) - 5); const shouldSkip = numLeft <= customVars.UnearnedPrestigesRequired; if (shouldSkip != skippedPrestige) { // not both conditions are met / is met but not already skipped: unskip it / do skip it - needPrestige = !needPrestige; - skippedPrestige = !skippedPrestige; + needPrestige = !needPrestige; + skippedPrestige = !skippedPrestige; } } -//START CALCULATING DAMAGES: + //START CALCULATING DAMAGES: var AutoStance = getPageSetting('AutoStance'); //calculate crits (baseDamage was calced in function autoStance) this is a weighted average of nonCrit + Crit. (somewhere in the middle) - ourBaseDamage = (baseDamage * (1-getPlayerCritChance()) + (baseDamage * getPlayerCritChance() * getPlayerCritDamageMult())); + if (getPlayerCritChance() > 1) { + ourBaseDamage = (baseDamage * (1 - getPlayerCritChance()) + (baseDamage * getPlayerCritChance() * getPlayerCritDamageMult() * additionalCritMulti)); + } + else { + ourBaseDamage = (baseDamage * (1 - getPlayerCritChance()) + (baseDamage * getPlayerCritChance() * getPlayerCritDamageMult())); + } //calculate with map bonus - var mapbonusmulti = 1 + (0.20*game.global.mapBonus); + var mapbonusmulti = 1 + (0.20 * game.global.mapBonus); //(autostance2 has mapbonusmulti built in) ourBaseDamage2 = ourBaseDamage; //keep a version without mapbonus ourBaseDamage *= mapbonusmulti; @@ -135,46 +171,46 @@ function autoMap() { //get average enemyhealth and damage for the next zone, cell 50, snimp type and multiply it by a max range fluctuation of 1.2 var enemyDamage; var enemyHealth; - if (AutoStance<=1) { + if (AutoStance <= 1) { enemyDamage = getEnemyMaxAttack(game.global.world + 1, 50, 'Snimp', 1.2); enemyDamage = calcDailyAttackMod(enemyDamage); //daily mods: badStrength,badMapStrength,bloodthirst } else { - enemyDamage = calcBadGuyDmg(null,getEnemyMaxAttack(game.global.world + 1, 50, 'Snimp', 1.0),true,true); //(enemy,attack,daily,maxormin,[disableFlucts]) + enemyDamage = calcBadGuyDmg(null, getEnemyMaxAttack(game.global.world + 1, 50, 'Snimp', 1.0), true, true); //(enemy,attack,daily,maxormin,[disableFlucts]) } - enemyHealth = getEnemyMaxHealth(game.global.world + 1,50); - if(game.global.challengeActive == "Toxicity") { + enemyHealth = getEnemyMaxHealth(game.global.world + 1, 50); + if (game.global.challengeActive == "Toxicity") { enemyHealth *= 2; } //Corruption Zone Proportionality Farming Calculator: var corrupt = game.global.world >= mutations.Corruption.start(true); if (getPageSetting('CorruptionCalc') && corrupt) { - var cptnum = getCorruptedCellsNum(); //count corrupted cells + var cptnum = getCorruptedCellsNum(); //count corrupted cells var cpthlth = getCorruptScale("health"); //get corrupted health mod - var cptpct = cptnum / 100; //percentage of zone which is corrupted. - var hlthprop = cptpct * cpthlth; //Proportion of cells corrupted * health of a corrupted cell - if (hlthprop >= 1) //dont allow sub-1 numbers to make the number less + var cptpct = cptnum / 100; //percentage of zone which is corrupted. + var hlthprop = cptpct * cpthlth; //Proportion of cells corrupted * health of a corrupted cell + if (hlthprop >= 1) //dont allow sub-1 numbers to make the number less enemyHealth *= hlthprop; - var cptatk = getCorruptScale("attack"); //get corrupted attack mod - var atkprop = cptpct * cptatk; //Proportion of cells corrupted * attack of a corrupted cell + var cptatk = getCorruptScale("attack"); //get corrupted attack mod + var atkprop = cptpct * cptatk; //Proportion of cells corrupted * attack of a corrupted cell if (atkprop >= 1) enemyDamage *= atkprop; //console.log("enemy dmg:" + enemyDamage + " enemy hp:" + enemyHealth + " base dmg: " + ourBaseDamage); } // enter farming if it takes over 4 hits in D stance (16) (and exit if under.) - if(!getPageSetting('DisableFarm')) { + if (!getPageSetting('DisableFarm')) { shouldFarm = enemyHealth > (ourBaseDamage * customVars.farmingCutoff); - if(game.options.menu.repeatUntil.enabled == 1) toggleSetting('repeatUntil'); //turn repeat forever on if farming is on. + if (game.options.menu.repeatUntil.enabled == 1) toggleSetting('repeatUntil'); //turn repeat forever on if farming is on. } //Lead specific farming calcuation section: - if((game.global.challengeActive == 'Lead' && !challSQ)) { + if ((game.global.challengeActive == 'Lead' && !challSQ)) { ourBaseDamage /= mapbonusmulti; - if (AutoStance<=1) + if (AutoStance <= 1) enemyDamage *= (1 + (game.challenges.Lead.stacks * 0.04)); enemyHealth *= (1 + (game.challenges.Lead.stacks * 0.04)); //if the zone is odd: (skip the +2 calc for the last level. - if (game.global.world % 2 == 1 && game.global.world != 179){ - //calculate for the next level in advance (since we only farm on odd, and evens are very tough) + if (game.global.world % 2 == 1 && game.global.world != 179) { + //calculate for the next level in advance (since we only farm on odd, and evens are very tough) if (AutoStance <= 1) { enemyDamage = getEnemyMaxAttack(game.global.world + 1, 99, 'Snimp', 1.2); enemyDamage = calcDailyAttackMod(enemyDamage); //daily mods: badStrength,badMapStrength,bloodthirst @@ -188,7 +224,7 @@ function autoMap() { ourBaseDamage *= mapbonusmulti; } //let people disable this if they want. - if(!getPageSetting('DisableFarm')) { + if (!getPageSetting('DisableFarm')) { shouldFarm = enemyHealth > (ourBaseDamage * customVars.LeadfarmingCutoff); } } @@ -196,37 +232,37 @@ function autoMap() { var pierceMod = (game.global.brokenPlanet && !game.global.mapsActive) ? getPierceAmt() : 0; const FORMATION_MOD_1 = game.upgrades.Dominance.done ? 2 : 1; //asks if we can survive x number of hits in either D stance or X stance. - enoughHealth = (baseHealth/FORMATION_MOD_1 > customVars.numHitsSurvived * (enemyDamage - baseBlock/FORMATION_MOD_1 > 0 ? enemyDamage - baseBlock/FORMATION_MOD_1 : enemyDamage * pierceMod)); + enoughHealth = (baseHealth / FORMATION_MOD_1 > customVars.numHitsSurvived * (enemyDamage - baseBlock / FORMATION_MOD_1 > 0 ? enemyDamage - baseBlock / FORMATION_MOD_1 : enemyDamage * pierceMod)); enoughDamage = (ourBaseDamage * customVars.enoughDamageCutoff > enemyHealth); //remove this in the meantime until it works for everyone. -/* if (!wantToScry) { - //enough health if we can survive 8 hits in D stance (health/2 and block/2) - enoughHealth = (baseHealth/2 > 8 * (enemyDamage - baseBlock/2 > 0 ? enemyDamage - baseBlock/2 : enemyDamage * pierceMod)); - //enough damage if we can one-shot the enemy in D (ourBaseDamage*4) - enoughDamage = (ourBaseDamage * 4) > enemyHealth; - scryerStuck = false; - } else { - //enough health if we can pass all the tests in autostance2 under the best of the worst conditions. - //enough damage if we can one-shot the enemy in S (ourBaseDamage/2) - var result = autoStanceCheck(true); - enoughHealth = result[0]; - enoughDamage = result[1]; - scryerStuck = !enoughHealth; - } */ + /* if (!wantToScry) { + //enough health if we can survive 8 hits in D stance (health/2 and block/2) + enoughHealth = (baseHealth/2 > 8 * (enemyDamage - baseBlock/2 > 0 ? enemyDamage - baseBlock/2 : enemyDamage * pierceMod)); + //enough damage if we can one-shot the enemy in D (ourBaseDamage*4) + enoughDamage = (ourBaseDamage * 4) > enemyHealth; + scryerStuck = false; + } else { + //enough health if we can pass all the tests in autostance2 under the best of the worst conditions. + //enough damage if we can one-shot the enemy in S (ourBaseDamage/2) + var result = autoStanceCheck(true); + enoughHealth = result[0]; + enoughDamage = result[1]; + scryerStuck = !enoughHealth; + } */ //Health:Damage ratio: (status) HDratio = enemyHealth / ourBaseDamage; - updateAutoMapsStatus(); //refresh the UI status (10x per second) + updateAutoMapsStatus(); //refresh the UI status (10x per second) -//BEGIN AUTOMAPS DECISIONS: + //BEGIN AUTOMAPS DECISIONS: //variables for doing maps var selectedMap = "world"; var shouldFarmLowerZone = false; shouldDoMaps = false; //prevents map-screen from flickering on and off during startup when base damage is 0. - if (ourBaseDamage > 0){ + if (ourBaseDamage > 0) { shouldDoMaps = !enoughDamage || shouldFarm || scryerStuck; } //Check our graph history and - Estimate = The zone should take around this long in milliseconds. @@ -246,24 +282,24 @@ function autoMap() { //FarmWhenNomStacks7 var restartVoidMap = false; - if(game.global.challengeActive == 'Nom' && getPageSetting('FarmWhenNomStacks7')) { + if (game.global.challengeActive == 'Nom' && getPageSetting('FarmWhenNomStacks7')) { //Get maxMapBonus (10) if we go above (7) stacks on Improbability (boss) - if (game.global.gridArray[99].nomStacks > customVars.NomFarmStacksCutoff[0]){ + if (game.global.gridArray[99].nomStacks > customVars.NomFarmStacksCutoff[0]) { if (game.global.mapBonus != customVars.maxMapBonus) shouldDoMaps = true; } //Go into maps on (30) stacks on Improbability (boss), farm until we fall under (10) H:D ratio - if (game.global.gridArray[99].nomStacks == customVars.NomFarmStacksCutoff[1]){ + if (game.global.gridArray[99].nomStacks == customVars.NomFarmStacksCutoff[1]) { shouldFarm = (HDratio > customVars.NomfarmingCutoff); shouldDoMaps = true; } //If we ever hit (100) nomstacks in the world, farm. - if(!game.global.mapsActive && game.global.gridArray[game.global.lastClearedCell + 1].nomStacks >= customVars.NomFarmStacksCutoff[2]) { + if (!game.global.mapsActive && game.global.gridArray[game.global.lastClearedCell + 1].nomStacks >= customVars.NomFarmStacksCutoff[2]) { shouldFarm = (HDratio > customVars.NomfarmingCutoff); shouldDoMaps = true; } //If we ever hit (100) nomstacks in a map (likely a voidmap), farm, (exit the voidmap and prevent void from running, until situation is clear) - if(game.global.mapsActive && game.global.mapGridArray[game.global.lastClearedMapCell + 1].nomStacks >= customVars.NomFarmStacksCutoff[2]) { + if (game.global.mapsActive && game.global.mapGridArray[game.global.lastClearedMapCell + 1].nomStacks >= customVars.NomFarmStacksCutoff[2]) { shouldFarm = (HDratio > customVars.NomfarmingCutoff); shouldDoMaps = true; restartVoidMap = true; @@ -278,14 +314,13 @@ function autoMap() { var prestigeitemsleft; if (game.global.mapsActive) { prestigeitemsleft = addSpecials(true, true, getCurrentMapObject()); - } - else if (lastMapWeWereIn) { + } else if (lastMapWeWereIn) { prestigeitemsleft = addSpecials(true, true, lastMapWeWereIn); } //check if we have unbought+available prestiges - var prestigeList = ['Dagadder','Megamace','Polierarm','Axeidic','Greatersword','Harmbalest']; + var prestigeList = ['Dagadder', 'Megamace', 'Polierarm', 'Axeidic', 'Greatersword', 'Harmbalest']; var numUnbought = 0; - for (var i=0,len=prestigeList.length; i < len; i++) { + for (var i = 0, len = prestigeList.length; i < len; i++) { var p = prestigeList[i]; if (game.upgrades[p].allowed - game.upgrades[p].done > 0) numUnbought++; @@ -299,24 +334,23 @@ function autoMap() { } //stack tox stacks if we are doing max tox, or if we need to clear our void maps - if(game.global.challengeActive == 'Toxicity' && game.global.lastClearedCell > 93 && game.challenges.Toxicity.stacks < 1500 && ((getPageSetting('MaxTox') && game.global.world > 59) || needToVoid)) { + if (game.global.challengeActive == 'Toxicity' && game.global.lastClearedCell > 93 && game.challenges.Toxicity.stacks < 1500 && ((getPageSetting('MaxTox') && game.global.world > 59) || needToVoid)) { shouldDoMaps = true; //we will get at least 85 toxstacks from the 1st voidmap (unless we have overkill) -// if (!game.portal.Overkill.locked && game.stats.cellsOverkilled.value) + // if (!game.portal.Overkill.locked && game.stats.cellsOverkilled.value) stackingTox = !(needToVoid && game.challenges.Toxicity.stacks > 1415); //force abandon army - if(!game.global.mapsActive && !game.global.preMapsActive) { + if (!game.global.mapsActive && !game.global.preMapsActive) { mapsClicked(); mapsClicked(); } - } - else stackingTox = false; + } else stackingTox = false; //during 'watch' challenge, run maps on these levels: var watchmaps = customVars.watchChallengeMaps; var shouldDoWatchMaps = false; - if (game.global.challengeActive == 'Watch' && watchmaps.indexOf(game.global.world) > -1 && game.global.mapBonus < 1){ + if (game.global.challengeActive == 'Watch' && watchmaps.indexOf(game.global.world) > -1 && game.global.mapBonus < 1) { shouldDoMaps = true; shouldDoWatchMaps = true; } @@ -333,8 +367,8 @@ function autoMap() { // but not when 3A. home detector is purchased, or 3B. we don't need nurseries if (game.buildings.Nursery.locked && game.talents.blacksmith.purchased && !(game.talents.housing.purchased || (getPageSetting('PreSpireNurseries') < 0 ? - !(getPageSetting('MaxNursery') && game.global.world >= getPageSetting('NoNurseriesUntil')) : - !getPageSetting('PreSpireNurseries'))) && game.global.world >= customVars.NurseryMapLevel) { + !(getPageSetting('MaxNursery') && game.global.world >= getPageSetting('NoNurseriesUntil')) : + !getPageSetting('PreSpireNurseries'))) && game.global.world >= customVars.NurseryMapLevel) { shouldDoMaps = true; shouldDoWatchMaps = true; //TODO coding: this is overloaded - not ideal. } @@ -344,27 +378,29 @@ function autoMap() { if (doMaxMapBonus) shouldDoMaps = true; //Allow automaps to work with in-game Map at Zone option: - vanillaMapatZone = (game.options.menu.mapAtZone.enabled && game.options.menu.mapAtZone.setZone == game.global.world && !isActiveSpireAT()); + vanillaMapatZone = (game.options.menu.mapAtZone.enabled && game.global.canMapAtZone && !isActiveSpireAT()); if (vanillaMapatZone) - shouldDoMaps = true; - + for (var x = 0; x < game.options.menu.mapAtZone.setZone.length; x++){ + if (game.global.world == game.options.menu.mapAtZone.setZone[x]) + shouldDoMaps = true; + } //Dynamic Siphonology section (when necessary) //Lower Farming Zone = Lowers the zone used during Farming mode. Starts 10 zones below current and Finds the minimum map level you can successfully one-shot var siphlvl = shouldFarmLowerZone ? game.global.world - 10 : game.global.world - game.portal.Siphonology.level; var maxlvl = game.talents.mapLoot.purchased ? game.global.world - 1 : game.global.world; - maxlvl += extraMapLevels; // extraMapLevels : advanced slider - if (getPageSetting('DynamicSiphonology') || shouldFarmLowerZone){ + maxlvl += extraMapLevels; // extraMapLevels : advanced slider + if (getPageSetting('DynamicSiphonology') || shouldFarmLowerZone) { for (siphlvl; siphlvl < maxlvl; siphlvl++) { //check HP vs damage and find how many siphonology levels we need. - var maphp = getEnemyMaxHealth(siphlvl) * 1.1; // 1.1 mod is for all maps (taken out of the function) - var cpthlth = getCorruptScale("health")/2; //get corrupted health mod + var maphp = getEnemyMaxHealth(siphlvl) * 1.1; // 1.1 mod is for all maps (taken out of the function) + var cpthlth = getCorruptScale("health") / 2; //get corrupted health mod if (mutations.Magma.active()) maphp *= cpthlth; - var mapdmg = ourBaseDamage2 * (game.unlocks.imps.Titimp ? 2 : 1); // *2 for titimp. (ourBaseDamage2 has no mapbonus in it) + var mapdmg = ourBaseDamage2 * (game.unlocks.imps.Titimp ? 2 : 1); // *2 for titimp. (ourBaseDamage2 has no mapbonus in it) if (game.upgrades.Dominance.done && !getPageSetting('ScryerUseinMaps2')) - mapdmg*=4; //dominance stance and not-scryer stance in maps. - if (mapdmg < maphp){ + mapdmg *= 4; //dominance stance and not-scryer stance in maps. + if (mapdmg < maphp) { break; } } @@ -375,7 +411,7 @@ function autoMap() { if (!game.global.mapsOwnedArray[map].noRecycle) { obj[map] = game.global.mapsOwnedArray[map].level; //Get matching map for our siphonology level - if(game.global.mapsOwnedArray[map].level == siphlvl) + if (game.global.mapsOwnedArray[map].level == siphlvl) siphonMap = map; } } @@ -391,86 +427,96 @@ function autoMap() { selectedMap = "create"; //Look through all the maps we have and figure out, find and Run Uniques if we need to - var runUniques = (getPageSetting('AutoMaps')==1); + var runUniques = (getPageSetting('AutoMaps') == 1); if (runUniques) { - for (var map in game.global.mapsOwnedArray) { - var theMap = game.global.mapsOwnedArray[map]; - if (theMap.noRecycle) { - if (theMap.name == 'The Wall' && game.upgrades.Bounty.allowed == 0 && !game.talents.bounty.purchased) { - var theMapDifficulty = Math.ceil(theMap.difficulty / 2); - if(game.global.world < 15 + theMapDifficulty) continue; - selectedMap = theMap.id; - break; - } - if (theMap.name == 'Dimension of Anger' && document.getElementById("portalBtn").style.display == "none" && !game.talents.portal.purchased) { - var theMapDifficulty = Math.ceil(theMap.difficulty / 2); - if(game.global.world < 20 + theMapDifficulty) continue; - selectedMap = theMap.id; - break; - } - var dont = game.global.runningChallengeSquared; - if(theMap.name == 'The Block' && !game.upgrades.Shieldblock.allowed && ((game.global.challengeActive == "Scientist" || game.global.challengeActive == "Trimp") && !dont || getPageSetting('BuyShieldblock'))) { - var theMapDifficulty = Math.ceil(theMap.difficulty / 2); - if(game.global.world < 11 + theMapDifficulty) continue; - selectedMap = theMap.id; - break; - } - var treasure = getPageSetting('TrimpleZ'); - if (theMap.name == 'Trimple Of Doom' && (!dont && (game.global.challengeActive == "Meditate" || game.global.challengeActive == "Trapper") && game.mapUnlocks.AncientTreasure.canRunOnce && game.global.world >= treasure)) { - var theMapDifficulty = Math.ceil(theMap.difficulty / 2); - if ((game.global.world < 33 + theMapDifficulty) || treasure > -33 && treasure < 33) continue; - selectedMap = theMap.id; - if (treasure < 0) // need to reset - setPageSetting('TrimpleZ', 0); - break; - } - if (!dont) { - //run the prison only if we are 'cleared' to run level 80 + 1 level per 200% difficulty. Could do more accurate calc if needed - if(theMap.name == 'The Prison' && (game.global.challengeActive == "Electricity" || game.global.challengeActive == "Mapocalypse")) { - var theMapDifficulty = Math.ceil(theMap.difficulty / 2); - if(game.global.world < 80 + theMapDifficulty) continue; - selectedMap = theMap.id; - break; - } - if(theMap.name == 'Bionic Wonderland' && game.global.challengeActive == "Crushed" ) { - var theMapDifficulty = Math.ceil(theMap.difficulty / 2); - if(game.global.world < 125 + theMapDifficulty) continue; - selectedMap = theMap.id; - break; - } - } - //Bionic Before Spire - mandates preReq of UniqueMaps. run Bionics before spire to farm. - if (getPageSetting('RunBionicBeforeSpire') && (game.global.world == 200) && theMap.name.includes('Bionic Wonderland')){ - //this is how to check if a bionic is green or not. - var bionicnumber = 1 + ((theMap.level - 125) / 15); - //if numbers match, map is green, so run it. (do the pre-requisite bionics one at a time in order) - if (bionicnumber == game.global.bionicOwned && bionicnumber < 6){ - selectedMap = theMap.id; - break; - } - if (shouldDoSpireMaps && theMap.name == 'Bionic Wonderland VI'){ - selectedMap = theMap.id; - break; - } - } //TODO Spire II+?? - //other unique maps here - } - } + for (var map in game.global.mapsOwnedArray) { + var theMap = game.global.mapsOwnedArray[map]; + if (theMap.noRecycle) { + if (theMap.name == 'The Wall' && game.upgrades.Bounty.allowed == 0 && !game.talents.bounty.purchased) { + var theMapDifficulty = Math.ceil(theMap.difficulty / 2); + if (game.global.world < 15 + theMapDifficulty) continue; + selectedMap = theMap.id; + break; + } + if (theMap.name == 'Dimension of Anger' && document.getElementById("portalBtn").style.display == "none" && !game.talents.portal.purchased) { + var theMapDifficulty = Math.ceil(theMap.difficulty / 2); + if (game.global.world < 20 + theMapDifficulty) continue; + selectedMap = theMap.id; + break; + } + var dont = game.global.runningChallengeSquared; + if (theMap.name == 'The Block' && !game.upgrades.Shieldblock.allowed && ((game.global.challengeActive == "Scientist" || game.global.challengeActive == "Trimp") && !dont || getPageSetting('BuyShieldblock'))) { + var theMapDifficulty = Math.ceil(theMap.difficulty / 2); + if (game.global.world < 11 + theMapDifficulty) continue; + selectedMap = theMap.id; + break; + } + var treasure = getPageSetting('TrimpleZ'); + if (theMap.name == 'Trimple Of Doom' && (!dont && (game.global.challengeActive == "Meditate" || game.global.challengeActive == "Trapper") && game.mapUnlocks.AncientTreasure.canRunOnce && game.global.world >= treasure)) { + var theMapDifficulty = Math.ceil(theMap.difficulty / 2); + if ((game.global.world < 33 + theMapDifficulty) || treasure > -33 && treasure < 33) continue; + selectedMap = theMap.id; + if (treasure < 0) // need to reset + setPageSetting('TrimpleZ', 0); + break; + } + if (!dont) { + //run the prison only if we are 'cleared' to run level 80 + 1 level per 200% difficulty. Could do more accurate calc if needed + if (theMap.name == 'The Prison' && (game.global.challengeActive == "Electricity" || game.global.challengeActive == "Mapocalypse")) { + var theMapDifficulty = Math.ceil(theMap.difficulty / 2); + if (game.global.world < 80 + theMapDifficulty) continue; + selectedMap = theMap.id; + break; + } + if (theMap.name == 'Bionic Wonderland' && game.global.challengeActive == "Crushed") { + var theMapDifficulty = Math.ceil(theMap.difficulty / 2); + if (game.global.world < 125 + theMapDifficulty) continue; + selectedMap = theMap.id; + break; + } + } + //Bionic Before Spire - mandates preReq of UniqueMaps. run Bionics before spire to farm. + if (getPageSetting('RunBionicBeforeSpire') && (game.global.world == 200) && theMap.name.includes('Bionic Wonderland')) { + //this is how to check if a bionic is green or not. + var bionicnumber = 1 + ((theMap.level - 125) / 15); + //if numbers match, map is green, so run it. (do the pre-requisite bionics one at a time in order) + if (bionicnumber == game.global.bionicOwned && bionicnumber < 6) { + selectedMap = theMap.id; + break; + } + if (shouldDoSpireMaps && theMap.name == 'Bionic Wonderland VI') { + selectedMap = theMap.id; + break; + } + } //TODO Spire II+?? + //other unique maps here + } + } } -//VOIDMAPS: + //VOIDMAPS: //Only proceed if we needToVoid right now. if (needToVoid) { //voidArray: make an array with all our voidmaps, so we can sort them by real-world difficulty level var voidArray = []; //values are easiest to hardest. (hardest has the highest value) - var prefixlist = {'Deadly':10, 'Heinous':11, 'Poisonous':20, 'Destructive':30}; + var prefixlist = { + 'Deadly': 10, + 'Heinous': 11, + 'Poisonous': 20, + 'Destructive': 30 + }; var prefixkeys = Object.keys(prefixlist); - var suffixlist = {'Descent':7.077, 'Void':8.822, 'Nightmare':9.436, 'Pit':10.6}; + var suffixlist = { + 'Descent': 7.077, + 'Void': 8.822, + 'Nightmare': 9.436, + 'Pit': 10.6 + }; var suffixkeys = Object.keys(suffixlist); for (var map in game.global.mapsOwnedArray) { var theMap = game.global.mapsOwnedArray[map]; - if(theMap.location == 'Void') { + if (theMap.location == 'Void') { for (var pre in prefixkeys) { if (theMap.name.includes(prefixkeys[pre])) theMap.sortByDiff = 1 * prefixlist[prefixkeys[pre]]; @@ -489,7 +535,7 @@ function autoMap() { for (var map in voidArraySorted) { var theMap = voidArraySorted[map]; //if we are on toxicity, don't clear until we will have max stacks at the last cell. - if(game.global.challengeActive == 'Toxicity' && game.challenges.Toxicity.stacks < (1500 - theMap.size)) break; + if (game.global.challengeActive == 'Toxicity' && game.challenges.Toxicity.stacks < (1500 - theMap.size)) break; doVoids = true; //check to make sure we won't get 1-shot in nostance by boss var eAttack = getEnemyMaxAttack(game.global.world, theMap.size, 'Voidsnimp', theMap.difficulty); @@ -498,44 +544,43 @@ function autoMap() { //TODO: Account for magmated voidmaps. (not /2) //TODO: Account for daily. var ourHealth = baseHealth; - if(game.global.challengeActive == 'Balance') { + if (game.global.challengeActive == 'Balance') { var stacks = game.challenges.Balance.balanceStacks ? (game.challenges.Balance.balanceStacks > theMap.size) ? theMap.size : game.challenges.Balance.balanceStacks : false; eAttack *= 2; - if(stacks) { - for (i = 0; i < stacks; i++ ) { + if (stacks) { + for (i = 0; i < stacks; i++) { ourHealth *= 1.01; } } } - if(game.global.challengeActive == 'Toxicity') eAttack *= 5; + if (game.global.challengeActive == 'Toxicity') eAttack *= 5; //break to prevent finishing map to finish a challenge? //continue to check for doable map? var diff = parseInt(getPageSetting('VoidCheck')) > 0 ? parseInt(getPageSetting('VoidCheck')) : 2; - var ourBlock = getBattleStats("block", true); //use block tooltip (after death block) instead of current army block. - if(ourHealth/diff < eAttack - ourBlock) { + var ourBlock = getBattleStats("block", true); //use block tooltip (after death block) instead of current army block. + if (ourHealth / diff < eAttack - ourBlock) { shouldFarm = true; - voidCheckPercent = Math.round((ourHealth/diff)/(eAttack-ourBlock)*100); - abandonVoidMap(); //exit/restart if below <95% health, we have ForceAbandon on, and its not due to randomly losing anti stacks + voidCheckPercent = Math.round((ourHealth / diff) / (eAttack - ourBlock) * 100); + abandonVoidMap(); //exit/restart if below <95% health, we have ForceAbandon on, and its not due to randomly losing anti stacks break; - } - else { + } else { voidCheckPercent = 0; - if(getPageSetting('DisableFarm')) + if (getPageSetting('DisableFarm')) shouldFarm = shouldFarm || false; } //only go into the voidmap if we need to. if (!restartVoidMap) selectedMap = theMap.id; //Restart the voidmap if we hit (100) nomstacks on the final boss - if(game.global.mapsActive && getCurrentMapObject().location == "Void" && game.global.challengeActive == "Nom" && getPageSetting('FarmWhenNomStacks7')) { - if(game.global.mapGridArray[theMap.size-1].nomStacks >= customVars.NomFarmStacksCutoff[2]) { + if (game.global.mapsActive && getCurrentMapObject().location == "Void" && game.global.challengeActive == "Nom" && getPageSetting('FarmWhenNomStacks7')) { + if (game.global.mapGridArray[theMap.size - 1].nomStacks >= customVars.NomFarmStacksCutoff[2]) { mapsClicked(true); } } break; } } -//MAPS CREATION pt1: + //MAPS CREATION pt1: //map if we don't have health/dmg or we need to clear void maps or if we are prestige mapping, and our set item has a new prestige available if (shouldDoMaps || doVoids || needPrestige) { //selectedMap = world here if we haven't set it to create yet, meaning we found appropriate high level map, or siphon map @@ -547,13 +592,13 @@ function autoMap() { selectedMap = game.global.mapsOwnedArray[highestMap].id; else selectedMap = "create"; - //if needPrestige, TRY to find current level map as the highest level map we own. + //if needPrestige, TRY to find current level map as the highest level map we own. } else if (needPrestige || (extraMapLevels > 0)) { if ((game.global.world + extraMapLevels) == game.global.mapsOwnedArray[highestMap].level) selectedMap = game.global.mapsOwnedArray[highestMap].id; else selectedMap = "create"; - //if shouldFarm is true, use a siphonology adjusted map, as long as we aren't trying to prestige + //if shouldFarm is true, use a siphonology adjusted map, as long as we aren't trying to prestige } else if (siphonMap != -1) selectedMap = game.global.mapsOwnedArray[siphonMap].id; //if we dont' have an appropriate max level map, or a siphon map, we need to make one @@ -562,21 +607,21 @@ function autoMap() { } //if selectedMap != world, it already has a map ID and will be run below } -//LEAD EVEN ZONE EXIT + //LEAD EVEN ZONE EXIT //don't map on even worlds if on Lead Challenge, except if person is dumb and wants to void on even - if((game.global.challengeActive == 'Lead' && !challSQ) && !doVoids && (game.global.world % 2 == 0 || game.global.lastClearedCell < customVars.shouldFarmCell)) { - if(game.global.preMapsActive) + if ((game.global.challengeActive == 'Lead' && !challSQ) && !doVoids && (game.global.world % 2 == 0 || game.global.lastClearedCell < customVars.shouldFarmCell)) { + if (game.global.preMapsActive) mapsClicked(); return; //exit } -//REPEAT BUTTON: + //REPEAT BUTTON: //Repeat Button Management (inside a map): if (!game.global.preMapsActive && game.global.mapsActive) { //Set the repeatBionics flag (farm bionics before spire), for the repeat button management code. var repeatBionics = getPageSetting('RunBionicBeforeSpire') && game.global.bionicOwned >= 6; //if we are doing the right map, and it's not a norecycle (unique) map, and we aren't going to hit max map bonus //or repeatbionics is true and there are still prestige items available to get - var doDefaultMapBonus = game.global.mapBonus < customVars.maxMapBonus-1; + var doDefaultMapBonus = game.global.mapBonus < customVars.maxMapBonus - 1; if (selectedMap == game.global.currentMapId && (!getCurrentMapObject().noRecycle && (doDefaultMapBonus || vanillaMapatZone || doMaxMapBonus || shouldFarm || stackingTox || needPrestige || shouldDoSpireMaps) || repeatBionics)) { var targetPrestige = autoTrimpSettings.Prestige.selected; //make sure repeat map is on @@ -584,11 +629,11 @@ function autoMap() { repeatClicked(); } //if we aren't here for dmg/hp, and we see the prestige we are after on the last cell of this map, and it's the last one available, turn off repeat to avoid an extra map cycle - if (!shouldDoMaps && (game.global.mapGridArray[game.global.mapGridArray.length - 1].special == targetPrestige && game.mapUnlocks[targetPrestige].last >= (game.global.world+extraMapLevels - 9 ))) { + if (!shouldDoMaps && (game.global.mapGridArray[game.global.mapGridArray.length - 1].special == targetPrestige && game.mapUnlocks[targetPrestige].last >= (game.global.world + extraMapLevels - 9))) { repeatClicked(); } //avoid another map cycle due to having the amount of tox stacks we need. - if (stackingTox && (game.challenges.Toxicity.stacks + game.global.mapGridArray.length - (game.global.lastClearedMapCell + 1) >= 1500)){ + if (stackingTox && (game.challenges.Toxicity.stacks + game.global.mapGridArray.length - (game.global.lastClearedMapCell + 1) >= 1500)) { repeatClicked(); } //turn off repeat maps if we doing Watch maps. @@ -613,31 +658,30 @@ function autoMap() { mapsClicked(true); } } -//FORCE EXIT WORLD->MAPS - //clicks the maps button, once or twice (inside the world): + //FORCE EXIT WORLD->MAPS + //clicks the maps button, once or twice (inside the world): } else if (!game.global.preMapsActive && !game.global.mapsActive) { if (selectedMap != "world") { //if we should not be in the world, and the button is not already clicked, click map button once (and wait patiently until death) - if (!game.global.switchToMaps){ + if (!game.global.switchToMaps) { mapsClicked(); } //Get Impatient/Abandon if: (need prestige / _NEED_ to do void maps / on lead in odd world.) AND (a new army is ready, OR _need_ to void map OR lead farming and we're almost done with the zone) (handle shouldDoWatchMaps elsewhere below) if ((!getPageSetting('PowerSaving') || (getPageSetting('PowerSaving') == 2) && doVoids) && game.global.switchToMaps && !shouldDoWatchMaps && (needPrestige || doVoids || - ((game.global.challengeActive == 'Lead' && !challSQ) && game.global.world % 2 == 1) || - (!enoughDamage && enoughHealth && game.global.lastClearedCell < 9) || - (shouldFarm && game.global.lastClearedCell >= customVars.shouldFarmCell) || - (scryerStuck)) - && - ( - (game.resources.trimps.realMax() <= game.resources.trimps.owned + 1) - || ((game.global.challengeActive == 'Lead' && !challSQ) && game.global.lastClearedCell > 93) - || (doVoids && game.global.lastClearedCell > 93) - ) - ){ + ((game.global.challengeActive == 'Lead' && !challSQ) && game.global.world % 2 == 1) || + (!enoughDamage && enoughHealth && game.global.lastClearedCell < 9) || + (shouldFarm && game.global.lastClearedCell >= customVars.shouldFarmCell) || + (scryerStuck)) && + ( + (game.resources.trimps.realMax() <= game.resources.trimps.owned + 1) || + ((game.global.challengeActive == 'Lead' && !challSQ) && game.global.lastClearedCell > 93) || + (doVoids && game.global.lastClearedCell > 93) + ) + ) { //output stuck message if (scryerStuck) { - debug("Got perma-stuck on cell " + (game.global.lastClearedCell+2) + " during scryer stance. Are your scryer settings correct? Entering map to farm to fix it."); + debug("Got perma-stuck on cell " + (game.global.lastClearedCell + 2) + " during scryer stance. Are your scryer settings correct? Entering map to farm to fix it."); } mapsClicked(); } @@ -646,19 +690,18 @@ function autoMap() { if (shouldDoWatchMaps) { mapsClicked(); } -//MAPS CREATION pt2: + //MAPS CREATION pt2: } else if (game.global.preMapsActive) { if (selectedMap == "world") { - mapsClicked(); //go back - } - else if (selectedMap == "create") { + mapsClicked(); //go back + } else if (selectedMap == "create") { var $mapLevelInput = document.getElementById("mapLevelInput"); $mapLevelInput.value = needPrestige ? game.global.world : siphlvl; //choose spire level 199 or 200 if (preSpireFarming && MODULES["maps"].SpireFarm199Maps) $mapLevelInput.value = game.talents.mapLoot.purchased ? game.global.world - 1 : game.global.world; - var decrement; //['size','diff','loot'] - var tier; //taken from MODULES vars at the top of this file. + var decrement; //['size','diff','loot'] + var tier; //taken from MODULES vars at the top of this file. //instead of normal map locations, use Plentiful (Gardens) if the Decay challenge has been completed. (for +25% better loot) var useGardens = (customVars.preferGardens && game.global.decayDone); if (game.global.world >= customVars.MapTierZone[0]) { @@ -676,7 +719,7 @@ function autoMap() { } else { //Zone 6-16 (old: 9/0/0 Random): tier = customVars.MapTier3Sliders; - decrement = ['diff','loot']; + decrement = ['diff', 'loot']; } //NEW: start all maps off on 9/9/9 sliders and decrement from there. sizeAdvMapsRange.value = tier[0]; @@ -689,7 +732,7 @@ function autoMap() { //recalculate cost. updateMapCost(); //if we are "Farming" for resources, make sure it's Plentiful OR metal (and always aim for lowest difficulty) - if(shouldFarm || !enoughDamage || !enoughHealth || game.global.challengeActive == 'Metal') { + if (shouldFarm || !enoughDamage || !enoughHealth || game.global.challengeActive == 'Metal') { biomeAdvMapsSelect.value = useGardens ? "Plentiful" : "Mountain"; updateMapCost(); } @@ -699,7 +742,7 @@ function autoMap() { if (shouldFarm) decrement.push('size'); } - //Decrement 1 - use priorities first: + //Decrement 1 - use priorities first: //if we STILL cant afford the map, lower the loot slider (less loot) while (decrement.indexOf('loot') > -1 && lootAdvMapsRange.value > 0 && updateMapCost(true) > game.resources.fragments.owned) { lootAdvMapsRange.value -= 1; @@ -714,7 +757,7 @@ function autoMap() { while (decrement.indexOf('size') > -1 && sizeAdvMapsRange.value > 0 && updateMapCost(true) > game.resources.fragments.owned) { sizeAdvMapsRange.value -= 1; } - //Decrement 2 - if its still too expensive: + //Decrement 2 - if its still too expensive: //if we STILL cant afford the map, lower the loot slider (less loot) while (lootAdvMapsRange.value > 0 && updateMapCost(true) > game.resources.fragments.owned) { lootAdvMapsRange.value -= 1; @@ -730,31 +773,31 @@ function autoMap() { sizeAdvMapsRange.value -= 1; } - //run the Advanced Special Modifier script, bring + //run the Advanced Special Modifier script, bring if (getPageSetting('AdvMapSpecialModifier')) testMapSpecialModController(); - //if we can't afford the map we designed, pick our highest existing map - //TODO Debug Output the mods we made. + //if we can't afford the map we designed, pick our highest existing map + //TODO Debug Output the mods we made. var maplvlpicked = parseInt($mapLevelInput.value) + (getPageSetting('AdvMapSpecialModifier') ? getExtraMapLevels() : 0); if (updateMapCost(true) > game.resources.fragments.owned) { selectMap(game.global.mapsOwnedArray[highestMap].id); - debug("Can't afford the map we designed, #" + maplvlpicked , "maps", '*crying2'); + debug("Can't afford the map we designed, #" + maplvlpicked, "maps", '*crying2'); debug("...selected our highest map instead # " + game.global.mapsOwnedArray[highestMap].id + " Level: " + game.global.mapsOwnedArray[highestMap].level, "maps", '*happy2'); runMap(); lastMapWeWereIn = getCurrentMapObject(); - //if we can afford it, buy it and run it: + //if we can afford it, buy it and run it: } else { debug("Buying a Map, level: #" + maplvlpicked, "maps", 'th-large'); var result = buyMap(); - if(result == -2){ + if (result == -2) { debug("Too many maps, recycling now: ", "maps", 'th-large'); recycleBelow(true); debug("Retrying, Buying a Map, level: #" + maplvlpicked, "maps", 'th-large'); buyMap(); } } - //if we already have a map picked, run it + //if we already have a map picked, run it } else { selectMap(selectedMap); var themapobj = game.global.mapsOwnedArray[getMapIndex(selectedMap)]; @@ -772,17 +815,16 @@ function updateAutoMapsStatus(get) { //automaps status var status; var minSp = getPageSetting('MinutestoFarmBeforeSpire'); - if(getPageSetting('AutoMaps') == 0) status = 'Off'; + if (getPageSetting('AutoMaps') == 0) status = 'Off'; else if (game.global.challengeActive == "Mapology" && game.challenges.Mapology.credits < 1) status = 'Out of Map Credits'; else if (preSpireFarming) { - var secs = Math.floor(60 - (spireTime*60)%60).toFixed(0) + var secs = Math.floor(60 - (spireTime * 60) % 60).toFixed(0) var mins = Math.floor(minSp - spireTime).toFixed(0); var hours = minSp - (spireTime / 60).toFixed(2); - var spiretimeStr = (spireTime>=60) ? - (hours + 'h') : (mins + 'm:' + (secs>=10 ? secs : ('0'+secs)) + 's'); + var spiretimeStr = (spireTime >= 60) ? + (hours + 'h') : (mins + 'm:' + (secs >= 10 ? secs : ('0' + secs)) + 's'); status = 'Farming for Spire ' + spiretimeStr + ' left'; - } - else if (spireMapBonusFarming) status = 'Getting Spire Map Bonus'; + } else if (spireMapBonusFarming) status = 'Getting Spire Map Bonus'; else if (doMaxMapBonus) status = 'Max Map Bonus After Zone'; else if (!game.global.mapsUnlocked) status = ' '; else if (needPrestige && !doVoids) status = 'Prestige'; @@ -801,12 +843,12 @@ function updateAutoMapsStatus(get) { status += '
Prestige Skipped'; //hider he/hr% status - var getPercent = (game.stats.heliumHour.value() / (game.global.totalHeliumEarned - (game.global.heliumLeftover + game.resources.helium.owned)))*100; - var lifetime = (game.resources.helium.owned / (game.global.totalHeliumEarned-game.resources.helium.owned))*100; - var hiderStatus = 'He/hr: ' + getPercent.toFixed(3) + '%
   He: ' + lifetime.toFixed(3) +'%'; + var getPercent = (game.stats.heliumHour.value() / (game.global.totalHeliumEarned - (game.global.heliumLeftover + game.resources.helium.owned))) * 100; + var lifetime = (game.resources.helium.owned / (game.global.totalHeliumEarned - game.resources.helium.owned)) * 100; + var hiderStatus = 'He/hr: ' + getPercent.toFixed(3) + '%
   He: ' + lifetime.toFixed(3) + '%'; if (get) { - return [status,getPercent,lifetime]; + return [status, getPercent, lifetime]; } else { document.getElementById('autoMapStatus').innerHTML = status; document.getElementById('hiderStatus').innerHTML = hiderStatus; @@ -826,12 +868,13 @@ function updateAutoMapsStatus(get) { //Automaps: Map Special Modifier Selector Decider Magical Action Taker //TODO: a priority list? Which is more important, perfect slide, LMC or the +x value? -MODULES["maps"].advSpecialMapMod_numZones = 3; //The default amount of +x zones you try to skip and work backwards from there. (if its too hard you will fail the map there is no dmg check only cost yet) +MODULES["maps"].advSpecialMapMod_numZones = 3; //The default amount of +x zones you try to skip and work backwards from there. (if its too hard you will fail the map there is no dmg check only cost yet) var advExtraMapLevels = 0; + function testMapSpecialModController() { //var mapSpecialMods = ["Fast Attacks", "Large Cache", "Small Savory Cache", "Small Wooden Cache", "Small Metal Cache", "Prestigious", "Huge Cache", "Large Savory Cache", "Large Wooden Cache", "Large Metal Cache"]; - var mapSpecialMods=[]; - Object.keys(mapSpecialModifierConfig).forEach(function(key){ + var mapSpecialMods = []; + Object.keys(mapSpecialModifierConfig).forEach(function(key) { var elem = mapSpecialModifierConfig[key]; if ((game.global.highestLevelCleared + 1) >= elem.unlocksAt) mapSpecialMods.push(elem.name); @@ -845,36 +888,36 @@ function testMapSpecialModController() { return; if (game.global.highestLevelCleared >= 59) { if (needPrestige) - maxIndex=6; + maxIndex = 6; //Set the special mod to some max. $advSpecialMod.selectedIndex = maxIndex; if ($advSpecialMod.selectedIndex == 0) return; //Check Hyperspeed 2 or Fast Attacks if (!needPrestige && game.talents.hyperspeed2.purchased && (game.global.world > Math.floor((game.global.highestLevelCleared + 1) * 0.5))) - $advSpecialMod.selectedIndex=1; + $advSpecialMod.selectedIndex = 1; else if (needPrestige) - $advSpecialMod.selectedIndex=0; - if (game.global.mapExtraBonus != "fa" && $advSpecialMod.selectedIndex==1) ; + $advSpecialMod.selectedIndex = 0; + if (game.global.mapExtraBonus != "fa" && $advSpecialMod.selectedIndex == 1); //map frag cost is stored in: document.getElementById("mapCostFragmentCost").innerHTML var mc = updateMapCost(true); var my = game.resources.fragments.owned; - var pct = mc/my*100; + var pct = mc / my * 100; while ($advSpecialMod.selectedIndex > 0 && mc > my) { $advSpecialMod.selectedIndex -= 1; } var mc = updateMapCost(true); var my = game.resources.fragments.owned; - var pct = mc/my*100; + var pct = mc / my * 100; if ($advSpecialMod.value != "0") //if its 0 it fails { console.log("Set the map special modifier to: " + mapSpecialModifierConfig[$advSpecialMod.value].name + ". Cost: " + pct.toFixed(2) + "% of your fragments."); } //TODO: - var specialMod = getSpecialModifierSetting(); //either 0 or the abbreviation/property of mapSpecialModifierConfig - var perfectAllowed = (game.global.highestLevelCleared >= 109); //levels are 109 and 209 for Perfect sliders and Extra Levels - var perfectChecked = checkPerfectChecked(); //Perfect Checkboxes + var specialMod = getSpecialModifierSetting(); //either 0 or the abbreviation/property of mapSpecialModifierConfig + var perfectAllowed = (game.global.highestLevelCleared >= 109); //levels are 109 and 209 for Perfect sliders and Extra Levels + var perfectChecked = checkPerfectChecked(); //Perfect Checkboxes var $advPerfect = document.getElementById('advPerfectCheckbox'); - var extraMapLevels = getPageSetting('AdvMapSpecialModifier') ? getExtraMapLevels() : 0; //Extra Levels + var extraMapLevels = getPageSetting('AdvMapSpecialModifier') ? getExtraMapLevels() : 0; //Extra Levels //Set the extra level to max ( 3 ) var extraAllowed = (game.global.highestLevelCleared >= 209); @@ -884,7 +927,7 @@ function testMapSpecialModController() { return; var maplvlpicked = document.getElementById("mapLevelInput").value; if (maplvlpicked == game.global.world) //then the +x zones dropdown is open. - $advExtraLevel.selectedIndex=MODULES["maps"].advSpecialMapMod_numZones; + $advExtraLevel.selectedIndex = MODULES["maps"].advSpecialMapMod_numZones; else $advExtraLevel.selectedIndex = 0; while ($advExtraLevel.selectedIndex > 0 && (updateMapCost(true) > game.resources.fragments.owned)) { @@ -896,7 +939,7 @@ function testMapSpecialModController() { function mapTimeEstimater() { //Check our graph history and - Estimate = The zone should take around this long in milliseconds. var thiszone = lookUpZoneData(game.global.world); - var lastzone = lookUpZoneData(game.global.world-1); + var lastzone = lookUpZoneData(game.global.world - 1); if (thiszone && lastzone) mapTimeEstimate = thiszone.currentTime - lastzone.currentTime; else diff --git a/modules/other.js b/modules/other.js index 64bc59541..d07960211 100644 --- a/modules/other.js +++ b/modules/other.js @@ -1,7 +1,13 @@ MODULES["other"] = {}; MODULES["other"].enableRoboTrimpSpam = true; //set this to false to stop Spam of "Activated Robotrimp MagnetoShriek Ability" - - +var prestraid = false; +var failpraid = false; +var bwraided = false; +var failbwraid = false; +var perked = false; +var prestraidon = false; +var cost = (updateMapCost(true)); +var mapbought = false; //Activate Robo Trimp (will activate on the first zone after liquification) function autoRoboTrimp() { //exit if the cooldown is active, or we havent unlocked robotrimp. @@ -132,3 +138,176 @@ function exitSpireCell() { if(isActiveSpireAT() && game.global.lastClearedCell >= getPageSetting('ExitSpireCell')-1) endSpire(); } + +function plusPres() { + document.getElementById("biomeAdvMapsSelect").value = "Random"; + document.getElementById('advExtraLevelSelect').value = plusMapToRun(game.global.world); + document.getElementById('advSpecialSelect').value = "p"; + document.getElementById("lootAdvMapsRange").value = 0; + document.getElementById("difficultyAdvMapsRange").value = 9; + document.getElementById("sizeAdvMapsRange").value = 9; + document.getElementById('advPerfectCheckbox').checked = false; + updateMapCost(); + } + +function plusMapToRun(zone) { + if (zone % 10 == 9) + return 6; + else if (zone % 10 <5) + return 5 - zone % 10; + else + return 11 - zone % 10; + } + +function findLastBionic() { + for (var i = game.global.mapsOwnedArray.length -1; i>=0; i--) { + if (game.global.mapsOwnedArray[i].location === "Bionic") { + return game.global.mapsOwnedArray[i]; + } + } + } + +//Praiding + +function Praiding() { + if (game.global.world == getPageSetting('Praidingzone') && !prestraid && !failpraid) { + prestraidon = true; + + if (getPageSetting('AutoMaps') == 1 && !prestraid && !failpraid) { + autoTrimpSettings["AutoMaps"].value = 0; + } + if (!game.global.preMapsActive && !game.global.mapsActive && !prestraid && !failpraid) { + mapsClicked(); + if (!game.global.preMapsActive) { + mapsClicked(); + } + debug("Beginning Prestige Raiding..."); + } + if (game.options.menu.repeatUntil.enabled!=2 && !prestraid && !failpraid) { + game.options.menu.repeatUntil.enabled = 2; + } + if (game.global.preMapsActive && !prestraid && !failpraid) { + plusPres(); + if ((updateMapCost(true) <= game.resources.fragments.owned)) { + buyMap(); + failpraid = false; + mapbought = true; + } + else if ((updateMapCost(true) > game.resources.fragments.owned)) { + if (getPageSetting('AutoMaps') == 0 && !prestraid) { + autoTrimpSettings["AutoMaps"].value = 1; + failpraid = true; + prestraidon = false; + mapbought = false; + debug("Failed to prestige raid. Looks like you can't afford to.."); + } + return; + + } + } + if (mapbought == true) { + selectMap(game.global.mapsOwnedArray[game.global.mapsOwnedArray.length-1].id); + runMap(); + } + if (!prestraid && !failpraid && !game.global.repeatMap) { + repeatClicked(); + debug("...Successfully prestiged!"); + } + prestraid = true; + prestraidon = false; + mapbought = false; + } + if (getPageSetting('AutoMaps') == 0 && game.global.preMapsActive && prestraid && !failpraid) { + autoTrimpSettings["AutoMaps"].value = 1; + debug("Turning AutoMaps back on"); + } + if (prestraid == true && game.global.world !== getPageSetting('Praidingzone')) { + prestraid = false; + prestraidon = false; + mapbought = false; + } + +} + + + +//BWraiding +//BWrmn +//BWrmx +function BWraiding() { + if (!prestraidon && game.global.world == getPageSetting('BWraidingz') && !bwraided && !failbwraid && getPageSetting('BWraid')) { + if (getPageSetting('AutoMaps') == 1 && game.global.world >= getPageSetting('BWraidingz') && !bwraided && !failbwraid) { + autoTrimpSettings["AutoMaps"].value = 0; + } + if (!game.global.preMapsActive && !game.global.mapsActive && game.global.world >= getPageSetting('BWraidingz') && !bwraided && !failbwraid) { + mapsClicked(); + if (!game.global.switchToMaps) { + mapsClicked(); + } + } + if (game.options.menu.repeatUntil.enabled != 2 && game.global.world >= getPageSetting('BWraidingz') && !bwraided && !failbwraid) { + game.options.menu.repeatUntil.enabled = 2; + } + if (game.global.world >= getPageSetting('BWraidingz') && game.global.preMapsActive && !bwraided && !failbwraid) { + selectMap(findLastBionic().id); + failbwraid = false; + debug("Beginning BW Raiding..."); + } + else if (game.global.world >= getPageSetting('BWraidingz') && game.global.preMapsActive && !bwraided && !failbwraid) { + if (getPageSetting('AutoMaps') == 0 && game.global.world >= getPageSetting('BWraidingz') && !bwraided) { + autoTrimpSettings["AutoMaps"].value = 1; + failbwraid = true; + debug("Failed to BW raid. Looks like you don't have a BW to raid..."); + } + return; + + } + if (findLastBionic().level <= getPageSetting('BWraidingmax') && !bwraided && !failbwraid) { + runMap(); + } + if (!game.global.repeatMap && game.global.world >= getPageSetting('BWraidingz') && !bwraided && !failbwraid && getCurrentMapObject().level > getPageSetting('BWraidingz') && game.global.mapsActive) { + repeatClicked(); + } + else if (game.global.repeatMap && game.global.world >= getPageSetting('BWraidingz') && !bwraided && !failbwraid && getCurrentMapObject().level <= getPageSetting('BWraidingz') && game.global.mapsActive) { + repeatClicked(); + } + if (findLastBionic().level > getPageSetting('BWraidingmax') && !bwraided && !failbwraid) { + bwraided = true; + failbwraid = false; + debug("...Successfully BW raided!"); + if (getPageSetting('AutoMaps') == 0 && game.global.preMapsActive && game.global.world >= getPageSetting('BWraidingz') && bwraided && !failbwraid) { + autoTrimpSettings["AutoMaps"].value = 1; + } + } + } + else if (getPageSetting('AutoMaps') == 0 && game.global.preMapsActive && bwraided && !failbwraid) { + autoTrimpSettings["AutoMaps"].value = 1; + debug("Turning AutoMaps back on"); + } + if (bwraided == true && game.global.world !== getPageSetting('BWraidingz')) { + bwraided = false; + } + + } +//AutoAllocate Looting II +function lootdump() { +if (game.global.world==getPageSetting('lootdumpz') && !perked && getPageSetting('AutoAllocatePerks')==2 && getPageSetting('lootdumpa') > 0 && getPageSetting('lootdumpz') > 0) { + viewPortalUpgrades(); + game.global.lastCustomAmt = getPageSetting('lootdumpa'); + numTab(5, true); + if (getPortalUpgradePrice("Looting_II")+game.resources.helium.totalSpentTemp <= game.resources.helium.respecMax) { + buyPortalUpgrade('Looting_II'); + activateClicked(); + cancelPortal(); + debug('Bought ' + getPageSetting('lootdumpa') + ' Looting II'); + } + else { + perked = true; + cancelPortal(); + debug("Done buying Looting II"); + } + } +else if (perked == true && game.global.world !== getPageSetting('lootdumpz')) { + perked = false; + } +} diff --git a/modules/perks.js b/modules/perks.js index 835bb38b8..a35bdf665 100644 --- a/modules/perks.js +++ b/modules/perks.js @@ -1,7 +1,7 @@ // ==UserScript== // @name AutoPerks // @namespace http://tampermonkey.net/ -// @version 1.1.2-4-2-2018+genBTC +// @version 1.1.3-4-7-2018+genBTC // @description Trimps Automatic Perk Calculator // @author zxv, genBTC // @include *trimps.github.io* @@ -12,8 +12,7 @@ //Create blank AutoPerks object var AutoPerks = {}; MODULES["perks"] = {}; -MODULES["perks"].showDetails = true; //show which individual perks are spent; -MODULES["perks"].useAlgo2 = false; //use algorithm 2 instead. +MODULES["perks"].showDetails = true; //show which individual perks are spent; //use algorithm 2 instead. //Import the FastPriorityQueue.js general Library (not AT specific, but needed for perk queue) var head = document.getElementsByTagName('head')[0]; @@ -38,14 +37,25 @@ var preset_HiderBalance = [75, 4, 8, 4, 1, 4, 24, 1, 75, 0.5, 3, 1, 1]; var preset_HiderMore = [20, 4, 10, 12, 1, 8, 8, 1, 40, 0.1, 0.5, 1, 1]; var preset_genBTC = [100, 8, 8, 4, 4, 5, 18, 8, 14, 1, 1, 1, 1]; var preset_genBTC2 = [96, 19, 15.4, 8, 8, 7, 14, 19, 11, 1, 1, 1, 1]; -var preset_Zek450 = [300, 1, 30, 2, 4, 2, 9, 8, 17, 0.1, 1, 320, 1]; -var preset_Zek4502 = [350, 1, 40, 2, 3, 2, 5, 8, 2, 0.1, 1, 300, 20]; //Will update again in few days, this seems to be more optimal for more helium for now -var preset_Zek4503 = [450, 0.9, 48, 3.35, 1, 2.8, 7.8, 1.95, 4, 0.04, 1, 120, 175]; //Final change till perky(?) integration +var preset_Zek4501 = [300, 1, 30, 2, 4, 2, 9, 8, 17, 0.1, 1, 320, 1]; +var preset_Zek4502 = [350, 1, 40, 2, 3, 2, 5, 8, 2, 0.1, 1, 300, 20]; +var preset_Zek450 = [450, 0.9, 48, 3.35, 1, 2.8, 7.8, 1.95, 4, 0.04, 1, 120, 175]; +// +var preset_space = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; +// +var preset_Zek059 = [7, 0.6, 3, 0.8, 0.3, 3, 25, 0.6, 0, 0, 0, 0, 0]; +var preset_Zek100 = [9.8, 1.8, 3.2, 2.6, 0.7, 2.9, 25, 1.8, 0, 0, 0, 0, 0]; +var preset_Zek180 = [13, 1.3, 4, 2.6, 0.7, 2.9, 25, 1.3, 35, 0.05, 1, 0, 0]; +var preset_Zek229 = [11.2, 0.58, 2.37, 1.464, 0.3, 2.02, 12.2, 0.58, 37, 0.22, 2.2, 0, 0]; +var preset_Zek299 = [16.8, 3, 1.9, 1.1, 1.2, 1, 17.1, 3, 100, 0.06, 0.8, 0, 0]; +var preset_Zek399 = [135, 6.1, 18.5, 6.5, 2.5, 6, 17, 6.1, 25, 0.08, 1, 0, 0]; +var preset_Zek449 = [245, 5.85, 29, 1.95, 2.8, 6, 6.1, 5.85, 15, 0.05, 1, 57, 0]; //gather these into an array of objects. this is one important object. -var presetList = [preset_ZXV,preset_ZXVnew,preset_ZXV3,preset_TruthEarly,preset_TruthLate,preset_nsheetz,preset_nsheetzNew,preset_HiderHehr,preset_HiderBalance,preset_HiderMore,preset_genBTC,preset_genBTC2,preset_Zek450,preset_Zek4502,preset_Zek4503]; +var presetList = [preset_ZXV,preset_ZXVnew,preset_ZXV3,preset_TruthEarly,preset_TruthLate,preset_nsheetz,preset_nsheetzNew,preset_HiderHehr,preset_HiderBalance,preset_HiderMore,preset_genBTC,preset_genBTC2,preset_Zek4501,preset_Zek4502,preset_Zek450,preset_space,preset_Zek059,preset_Zek100,preset_Zek180,preset_Zek229,preset_Zek299,preset_Zek399,preset_Zek449,preset_Zek450,preset_space]; //Specific ratios labeled above must be given the matching ID below. //Ratio preset dropdown list -var presetListHtml = "\ +var presetListHtml = "\ +\ \ \ \ @@ -57,15 +67,25 @@ var presetListHtml = "\ \ \ \ -\ -\ -\ -"; +\ +\ +\ +\ +\ +\ +\ +\ +\ +\ +\ +\ +\ +"; //Custom Creation for all perk customRatio boxes in Trimps Perk Window AutoPerks.createInput = function(perkname,div) { var perk1input = document.createElement("Input"); perk1input.id = perkname + 'Ratio'; - var oldstyle = 'text-align: center; width: 60px;'; + var oldstyle = 'text-align: center; width: calc(100vw/36); font-size: 1.0vw; '; if(game.options.menu.darkTheme.enabled != 2) perk1input.setAttribute("style", oldstyle + " color: black;"); else perk1input.setAttribute('style', oldstyle); perk1input.setAttribute('class', 'perkRatios'); @@ -73,7 +93,7 @@ AutoPerks.createInput = function(perkname,div) { var perk1label = document.createElement("Label"); perk1label.id = perkname + 'Label'; perk1label.innerHTML = perkname; - perk1label.setAttribute('style', 'margin-right: 1vw; width: 120px; color: white;'); + perk1label.setAttribute('style', 'margin-right: 0.7vw; width: calc(100vw/18); color: white; font-size: 0.9vw; font-weight: lighter; margin-left: 0.3vw; '); //add to the div. div.appendChild(perk1input); div.appendChild(perk1label); @@ -85,8 +105,14 @@ AutoPerks.GUI = {}; AutoPerks.removeGUI = function() { Object.keys(AutoPerks.GUI).forEach(function(key) { var $elem = AutoPerks.GUI[key]; - $elem.parentNode.removeChild($elem); - delete AutoPerks.GUI[key]; + if (!$elem) { + console.log("error in: "+key); + return; + } + if ($elem.parentNode) { + $elem.parentNode.removeChild($elem); + delete $elem; + } }); } AutoPerks.displayGUI = function() { @@ -119,39 +145,43 @@ AutoPerks.displayGUI = function() { apGUI.$dumpperklabel = document.createElement("Label"); apGUI.$dumpperklabel.id = 'DumpPerk Label'; apGUI.$dumpperklabel.innerHTML = "Dump Perk:"; - apGUI.$dumpperklabel.setAttribute('style', 'margin-right: 1vw; color: white;'); + apGUI.$dumpperklabel.setAttribute('style', 'margin-right: 1vw; color: white; font-size: 0.9vw;'); apGUI.$dumpperk = document.createElement("select"); apGUI.$dumpperk.id = 'dumpPerk'; apGUI.$dumpperk.setAttribute('onchange', 'AutoPerks.saveDumpPerk()'); - var oldstyle = 'text-align: center; width: 120px;'; + var oldstyle = 'text-align: center; width: 8vw; font-size: 0.8vw; font-weight: lighter; '; if(game.options.menu.darkTheme.enabled != 2) apGUI.$dumpperk.setAttribute("style", oldstyle + " color: black;"); else apGUI.$dumpperk.setAttribute('style', oldstyle); //Add the dump perk dropdown to UI Line 2 apGUI.$ratiosLine2.appendChild(apGUI.$dumpperklabel); apGUI.$ratiosLine2.appendChild(apGUI.$dumpperk); - //Toggle Algorithm 2 checkbox - apGUI.$toggleAlgo2 = document.createElement("DIV"); - apGUI.$toggleAlgo2.setAttribute('style', 'display: inline-block; text-align: left; margin-left: 1vw; width: 7vw;'); - apGUI.$toggleAlgo2.innerHTML = '\ - \ - Fast Allocate!:'; - apGUI.$ratiosLine2.appendChild(apGUI.$toggleAlgo2); //Create ratioPreset dropdown apGUI.$ratioPresetLabel = document.createElement("Label"); apGUI.$ratioPresetLabel.id = 'Ratio Preset Label'; apGUI.$ratioPresetLabel.innerHTML = "Ratio Preset:"; - apGUI.$ratioPresetLabel.setAttribute('style', 'margin-right: 1vw; color: white;'); + apGUI.$ratioPresetLabel.setAttribute('style', 'margin-right: 0.5vw; color: white; font-size: 0.9vw;'); apGUI.$ratioPreset = document.createElement("select"); apGUI.$ratioPreset.id = 'ratioPreset'; apGUI.$ratioPreset.setAttribute('onchange', 'AutoPerks.setDefaultRatios()'); - oldstyle = 'text-align: center; width: 110px;'; + oldstyle = 'text-align: center; width: 8vw; font-size: 0.8vw; font-weight: lighter; '; if(game.options.menu.darkTheme.enabled != 2) apGUI.$ratioPreset.setAttribute("style", oldstyle + " color: black;"); else apGUI.$ratioPreset.setAttribute('style', oldstyle); //Populate ratio preset dropdown list from HTML above: apGUI.$ratioPreset.innerHTML = presetListHtml; - //load the last ratio used + //Load the last ratio used var loadLastPreset = localStorage.getItem('AutoperkSelectedRatioPresetID'); - apGUI.$ratioPreset.selectedIndex = (loadLastPreset != null) ? loadLastPreset : 0; // First element is zxv (default) ratio. + var setID; + if (loadLastPreset != null) { + //these four lines are temporary to migrate Custom Ratios to the new dropdown. Once everyone has the name in localStorage we can remove this. + if (loadLastPreset == 15 && !localStorage.getItem('AutoperkSelectedRatioPresetName')) + loadLastPreset = 25; + if (localStorage.getItem('AutoperkSelectedRatioPresetName')=="customPreset") + loadLastPreset = 25; + setID = loadLastPreset; + } + else + setID = 0; // First element is zxv (default) ratio. + apGUI.$ratioPreset.selectedIndex = setID; //Add the presets dropdown to UI Line 1 apGUI.$ratiosLine1.appendChild(apGUI.$ratioPresetLabel); apGUI.$ratiosLine1.appendChild(apGUI.$ratioPreset); @@ -185,8 +215,9 @@ AutoPerks.populateDumpPerkList = function() { } AutoPerks.saveDumpPerk = function() { - var dumpIndex = document.getElementById("dumpPerk").selectedIndex; - safeSetItems('AutoperkSelectedDumpPresetID', dumpIndex); + var $dump = document.getElementById("dumpPerk"); + safeSetItems('AutoperkSelectedDumpPresetID', $dump.selectedIndex); + safeSetItems('AutoperkSelectedDumpPresetName', $dump.value); } AutoPerks.saveCustomRatios = function() { @@ -211,14 +242,17 @@ AutoPerks.switchToCustomRatios = function() { //loads custom ratio selections from localstorage if applicable AutoPerks.setDefaultRatios = function() { var $perkRatioBoxes = document.getElementsByClassName("perkRatios"); - var ratioSet = document.getElementById("ratioPreset").selectedIndex; + var $rp = document.getElementById("ratioPreset"); + if (!$rp || !$perkRatioBoxes || !$rp.selectedOptions[0]) return; + var ratioSet = $rp.selectedIndex; var currentPerk; + //set ratio boxes using getPerksByName to get values from the perkHolder for(var i = 0; i < $perkRatioBoxes.length; i++) { currentPerk = AutoPerks.getPerkByName($perkRatioBoxes[i].id.substring(0, $perkRatioBoxes[i].id.length - 5)); // Remove "ratio" from the id to obtain the perk name $perkRatioBoxes[i].value = currentPerk.value[ratioSet]; } //If "Custom" dropdown is selected: - if (ratioSet == document.getElementById("ratioPreset").length-1) { + if (ratioSet == $rp.length-1) { //Try to grab custom ratios from LocalStorage if they were saved. var tmp = JSON.parse(localStorage.getItem('AutoPerksCustomRatios')); if (tmp !== null) @@ -239,6 +273,7 @@ AutoPerks.setDefaultRatios = function() { } //save the last ratio used safeSetItems('AutoperkSelectedRatioPresetID', ratioSet); + safeSetItems('AutoperkSelectedRatioPresetName', $rp.selectedOptions[0].id); } //updates the internal perk variables with values grabbed from the custom ratio input boxes that the user may have changed. @@ -291,15 +326,15 @@ AutoPerks.clickAllocate = function() { debug("AutoPerks: Major Error: Reading your Helium amount. " + remainingHelium, "perks"); // determine how to spend helium - if (MODULES["perks"].useAlgo2) - var result = AutoPerks.spendHelium2(remainingHelium); + var result; + if (getPageSetting('fastallocate')==true) + result = AutoPerks.spendHelium2(remainingHelium); else - var result = AutoPerks.spendHelium(remainingHelium); + result = AutoPerks.spendHelium(remainingHelium); if (result == false) { debug("AutoPerks: Major Error: Make sure all ratios are set properly.","perks"); return; } - // Get owned perks var perks = AutoPerks.getOwnedPerks(); //re-arrange perk points @@ -325,7 +360,7 @@ AutoPerks.getHelium = function() { //Calculate Price AutoPerks.calculatePrice = function(perk, level) { // Calculate price of buying *next* level if(perk.fluffy) return Math.ceil(perk.base * Math.pow(10,level)); - if(perk.type == 'exponential') return Math.ceil(level/2 + perk.base * Math.pow(1.3, level)); + else if(perk.type == 'exponential') return Math.ceil(level/2 + perk.base * Math.pow(1.3, level)); else if(perk.type == 'linear') return Math.ceil(perk.base + perk.increase * level); } //Calculate Total Price @@ -361,11 +396,11 @@ AutoPerks.spendHelium = function(helium) { if(helium < 0) { debug("AutoPerks: Major Error - Not enough helium to buy fixed perks.","perks"); //document.getElementById("nextCoordinated").innerHTML = "Not enough helium to buy fixed perks."; - return; + return false; } if (Number.isNaN(helium)) { debug("AutoPerks: Major Error - Helium is Not a Number!","perks"); - return; + return false; } var perks = AutoPerks.getVariablePerks(); @@ -378,13 +413,18 @@ AutoPerks.spendHelium = function(helium) { price = AutoPerks.calculatePrice(perks[i], 0); inc = AutoPerks.calculateIncrease(perks[i], 0); perks[i].efficiency = inc/price; - if(perks[i].efficiency <= 0) { + if(perks[i].efficiency < 0) { debug("Perk ratios must be positive values.","perks"); return false; } + //Unsaid: If eff == 0, just do nothing. if(perks[i].efficiency != 0) effQueue.add(perks[i]); } + if (effQueue.size < 1) { + debug("All Perk Ratios were 0, or some other error.","perks"); + return false; + } var i=0; //Change the way we iterate. @@ -455,11 +495,11 @@ AutoPerks.spendHelium2 = function(helium) { if(helium < 0) { debug("AutoPerks: Major Error - Not enough helium to buy fixed perks.","perks"); //document.getElementById("nextCoordinated").innerHTML = "Not enough helium to buy fixed perks."; - return; + return false; } if (Number.isNaN(helium)) { debug("AutoPerks: Major Error - Helium is Not a Number!","perks"); - return; + return false; } var perks = AutoPerks.getVariablePerks(); @@ -474,9 +514,14 @@ AutoPerks.spendHelium2 = function(helium) { debug("Perk ratios must be positive values.","perks"); return false; } + //Unsaid: If eff == 0, just do nothing. if(perks[i].efficiency != 0) effQueue.add(perks[i]); } + if (effQueue.size < 1) { + debug("All Perk Ratios were 0, or some other error.","perks"); + return false; + } var mostEff, price, inc; var packPrice,packLevel; @@ -650,9 +695,6 @@ AutoPerks.getPercent = function(spentHelium, totalHelium) { frac = (frac* 100).toPrecision(2); return frac + "%"; } -AutoPerks.toggleFastAllocate = function() { - MODULES["perks"].useAlgo2 = !MODULES["perks"].useAlgo2; -} AutoPerks.FixedPerk = function(name, base, level, max, fluffy) { this.id = -1; @@ -821,4 +863,4 @@ AutoPerks.getOwnedPerks = function() { } //Run the GUI: -AutoPerks.displayGUI(); \ No newline at end of file +AutoPerks.displayGUI(); diff --git a/modules/perky.js b/modules/perky.js deleted file mode 100644 index 758bc44b1..000000000 --- a/modules/perky.js +++ /dev/null @@ -1,791 +0,0 @@ -// ==UserScript== -// @name Trimps - Autoperks - PERKY -// @namespace http://tampermonkey.net/ -// @version 0.5 -// @description try to take over the world! -// @author OG: Grimy -> Altizar -> Zeker0 -> genBTC -// @match https://trimps.github.io/* -// @include *trimps.github.io* -// @include *kongregate.com/games/GreenSatellite/trimps -// @grant GM_xmlhttpRequest -// ==/UserScript== - -//Create blank AutoPerks object -MODULES["perks"] = {}; -var AutoPerks = {}; - -var AutoPerks = { - data: { - he_left: 0, - zone: 60, - targetzone: 60, - perks: null, - weight: { - helium: 0, - attack: 0, - health: 0, - xp: 0, - trimps: 0 - }, - fluffy: { - xp: 0, - prestige: 0 - }, - mod: { - storage: 0.125, - soldiers: 0, - dg: 0, - tent_city: false, - whip: false, - magn: false, - taunt: false, - ven: false, - chronojest: 0, - prod: 0, - loot: 0, - breed_timer: 0 - } - }, - preset: "z450", - fixed: "", - Perk: /** @class */ (function () { - function Perk(base_cost, increment, cap, free, scaling) { - if (scaling === void 0) { - scaling = 30; - } - this.base_cost = base_cost; - this.increment = increment; - this.cap = cap; - this.free = free; - this.scaling = scaling; - this.locked = true; - this.level = 0; - this.pack = 1; - this.must = 0; - this.spent = 0; - } - // Compute the current cost of a perk, based on its current level. - Perk.prototype.cost = function () { - return this.increment - ? this.pack * - (this.base_cost + - this.increment * (this.level + (this.pack - 1) / 2)) - : Math.ceil(this.level / 2 + this.base_cost * AutoPerky.mult(this, this.scaling)); - }; - return Perk; - })(), - unlocks: "", - notation: 2, - perks: null, - presets: { - early: ["5", "4", "3"], - broken: ["7", "3", "1"], - mid: ["16", "5", "1"], - corruption: ["25", "7", "1"], - magma: ["35", "4", "3"], - z280: ["42", "6", "1"], - z400: ["88", "10", "1"], - z450: ["500", "50", "1"], - spire: ["0", "1", "1"], - nerfed: ["0", "4", "3"], - tent: ["5", "4", "3"], - scientist: ["0", "1", "3"], - carp: ["0", "0", "0"], - trapper: ["0", "7", "1"], - coord: ["0", "40", "1"], - trimp: ["0", "99", "1"], - metal: ["0", "7", "1"], - c2: ["0", "7", "1"], - custom: ["1", "1", "1"] - }, - notations: [ - [], - ( - "KMBTQaQiSxSpOcNoDcUdDdTdQadQidSxdSpdOdNdVUvDvTvQavQivSxvSpvOvNvTgUtgDtgTtgQatg" + - "QitgSxtgSptgOtgNtgQaaUqaDqaTqaQaqaQiqaSxqaSpqaOqaNqaQiaUqiDqiTqiQaqiQiqiSxqiSpqi" + - "OqiNqiSxaUsxDsxTsxQasxQisxSxsxSpsxOsxNsxSpaUspDspTspQaspQispSxspSpspOspNspOgUog" + - "DogTogQaogQiogSxogSpogOogNogNaUnDnTnQanQinSxnSpnOnNnCtUc" - ).split(/(?=[A-Z])/), - [], - ( - "a b c d e f g h i j k l m n o p q r s t u v w x y z" + - " aa ab ac ad ae af ag ah ai aj ak al am an ao ap aq ar as at au av aw ax ay az" + - " ba bb bc bd be bf bg bh bi bj bk bl bm bn bo bp bq br bs bt bu bv bw bx by bz" + - " ca cb cc cd ce cf cg ch ci cj ck cl cm cn co cp cq cr cs ct cu cv cw cx" - ).split(" "), - "KMBTQaQiSxSpOcNoDcUdDdTdQadQidSxdSpdOdNdVUvDvTvQavQivSxvSpvOvNvTg".split( - /(?=[A-Z])/ - ) - ], - add: function (perk, x) { - return 1 + perk.level * x / 100; - }, - mult: function (perk, x) { - return Math.pow(1 + x / 100, perk.level); - }, - mastery: function (name) { - if (!game.talents[name]) { - throw "unknown mastery: " + name; - } - return game.talents[name].purchased; - }, - parse_suffixes: function (str) { - str = str.replace(/\*.*|[^--9+a-z]/gi, ""); - var suffixes = AutoPerky.notations[AutoPerky.notation === "3" ? 3 : 1]; - for (var i = suffixes.length; i > 0; --i) { - str = str.replace(new RegExp(suffixes[i - 1] + "$", "i"), "E" + 3 * i); - } - return +str; - }, - parse_perks: function (fixed, unlocks) { - var perks = { - Looting_II: new AutoPerky.Perk(100e3, 10e3, Infinity, 1e4), - Carpentry_II: new AutoPerky.Perk(100e3, 10e3, Infinity, 1e4), - Motivation_II: new AutoPerky.Perk(50e3, 1e3, Infinity, 1e4), - Power_II: new AutoPerky.Perk(20e3, 500, Infinity, 1e4), - Toughness_II: new AutoPerky.Perk(20e3, 500, Infinity, 1e4), - Capable: new AutoPerky.Perk(1e8, 0, 10, 1e4, 900), - Cunning: new AutoPerky.Perk(1e11, 0, Infinity, 1e4), - Curious: new AutoPerky.Perk(1e14, 0, Infinity, 1e4), - Overkill: new AutoPerky.Perk(1e6, 0, 30, 1e4), - Resourceful: new AutoPerky.Perk(50e3, 0, Infinity, 1e6), - Coordinated: new AutoPerky.Perk(150e3, 0, Infinity, 1e4), - Siphonology: new AutoPerky.Perk(100e3, 0, 3, 1e4), - Anticipation: new AutoPerky.Perk(1000, 0, 10, 1e4), - Resilience: new AutoPerky.Perk(100, 0, Infinity, 1e4), - Meditation: new AutoPerky.Perk(75, 0, 7, 1e4), - Relentlessness: new AutoPerky.Perk(75, 0, 10, 1e4), - Carpentry: new AutoPerky.Perk(25, 0, Infinity, 1e4), - Artisanistry: new AutoPerky.Perk(15, 0, Infinity, 1e4), - Range: new AutoPerky.Perk(1, 0, 10, 1e4), - Agility: new AutoPerky.Perk(4, 0, 20, 1e4), - Bait: new AutoPerky.Perk(4, 0, Infinity, 1e7), - Trumps: new AutoPerky.Perk(3, 0, Infinity, 1e8), - Pheromones: new AutoPerky.Perk(3, 0, Infinity, 1e6), - Packrat: new AutoPerky.Perk(3, 0, Infinity, 1e7), - Motivation: new AutoPerky.Perk(2, 0, Infinity, 1e4), - Power: new AutoPerky.Perk(1, 0, Infinity, 1e4), - Toughness: new AutoPerky.Perk(1, 0, Infinity, 1e4), - Looting: new AutoPerky.Perk(1, 0, Infinity, 1e4) - }; - if (!unlocks.match(/>/)) { - unlocks = unlocks.replace(/(?=,|$)/g, ">0"); - } - var list = (unlocks + "," + fixed).split(/,/).filter(x => x); - for (var key in list) { - var item = list[key]; - var m = (m = item.match(/(\S+) *([<=>])=?(.*)/)); - if (!m) { - throw "Enter a list of perk levels, such as “power=42, toughness=51”."; - } - var tier2 = m[1].match(/2$|II$/); - var name = m[1].replace(/[ _]?(2|II)/i, "").replace(/^OK/i, "O").replace(/^Looty/i, "L"); - var regex = new RegExp(`^${name}[a-z]*${tier2 ? "_II" : ""}$`, "i"); - var matches = Object.keys(perks).filter(p => p.match(regex)); - if (matches.length > 1) { - throw `Ambiguous perk abbreviation: ${m[1]}.`; - } - if (matches.length < 1) { - throw `Unknown perk: ${m[1]}.`; - } - let level = m[3]; - if (!isFinite(level)) { - throw `Invalid number: ${m[3]}.`; - } - perks[matches[0]].locked = false; - if (m[2] != ">") { - perks[matches[0]].cap = parseInt(level); - } - if (m[2] != "<") { - perks[matches[0]].must = parseInt(level); - } - } - return perks; - }, - select_preset: function (name, manually) { - if (manually === void 0) { - manually = true; - } - this.data.weight = { - helium: parseInt(this.presets[name][0]), - attack: parseInt(this.presets[name][1]), - health: parseInt(this.presets[name][2]), - xp: Math.floor((+this.presets[name][0] + +this.presets[name][1] + +this.presets[name][2]) / 5), - trimps: 0 - }; - }, - read_data: function () { - this.data.zone = this.data.targetzone; - this.unlocks = Object.keys(game.portal).filter(function (perk) { - return !game.portal[perk].locked; - }).join(","); - this.data.perks = this.parse_perks(this.fixed, this.unlocks); - var preset = this.preset; - this.select_preset(preset); - if (preset == "trapper" && (!game || game.global.challengeActive != "Trapper")) { - throw "This preset requires a save currently running Trapper². Start a new run using “Trapper² (initial)”, export, and try again."; - } - this.update_dg(); - //extra settings - var zone = this.data.targetzone; - var helium = game.global.viewingUpgrades ? game.global.heliumLeftover : game.global.heliumLeftover + game.resources.helium.owned; - for (var perk in game.portal) { - helium += game.portal[perk].heliumSpent; - } - var unlocks = Object.keys(game.portal).filter(function (perk) { - return !game.portal[perk].locked; - }); - if (!game.global.canRespecPerks) { - unlocks = unlocks.map(function (perk) { - return perk + ">" + game.portal[perk].level; - }); - } - // Income - var tt = this.mastery("turkimp4") ? 1 : this.mastery("turkimp3") ? 0.6 : this.mastery("turkimp2") ? 0.4 : this.mastery("turkimp") ? 0.3 : 0.25; - var prod = 1 + tt; - var loot = 1 + 0.333 * tt; - var spires = Math.min(Math.floor((zone - 101) / 100), game.global.spiresCompleted); - loot *= zone < 100 ? 0.7 : 1 + (this.mastery("stillRowing") ? 0.3 : 0.2) * spires; - var chronojest = 27 * game.unlocks.imps.Jestimp + 15 * game.unlocks.imps.Chronoimp; - var cache = zone < 60 ? 0 : zone < 85 ? 7 : zone < 160 ? 10 : zone < 185 ? 14 : 20; - chronojest += (this.mastery("mapLoot2") ? 5 : 4) * cache; - for (var _i = 0, _a = game.global.StaffEquipped.mods || []; _i < _a.length; _i++) { - var mod = _a[_i]; - if (mod[0] === "MinerSpeed") { - prod *= 1 + 0.01 * mod[1]; - } else if (mod[0] === "metalDrop") { - loot *= 1 + 0.01 * mod[1]; - } - } - this.data.he_left = helium + (game.global.canRespecPerks ? 0 : game.resources.helium.owned); - this.data.fluffy = { - xp: game ? game.global.fluffyExp : 0, - prestige: game ? game.global.fluffyPrestige : 0 - }; - this.data.mod = { - storage: 0.125, - soldiers: 0, - dg: preset == "nerfed" ? 0 : this.data.mod.dg, - tent_city: preset == "tent", - whip: game.unlocks.imps.Whipimp, - magn: game.unlocks.imps.Magnimp, - taunt: game.unlocks.imps.Tauntimp, - ven: game.unlocks.imps.Venimp, - chronojest: chronojest, - prod: prod, - loot: loot, - breed_timer: 45 - }; - if (preset == "nerfed") { - this.data.he_left = 1e8; - this.data.zone = 200; - this.data.mod.dg = 0; - } - if (preset == "trapper") { - this.data.mod.soldiers = game.resources.trimps.owned; - this.data.mod.prod = 0; - this.data.perks.Pheromones.cap = 0; - this.data.perks.Anticipation.cap = 0; - } - if (preset == "spire") { - this.data.mod.prod = this.data.mod.loot = 0; - this.data.perks.Overkill.cap = 0; - this.data.zone = game.global.world; - } - if (preset == "carp") { - this.data.mod.prod = this.data.mod.loot = 0; - this.data.weight.trimps = 1e6; - } - if (preset == "metal") { - this.data.mod.prod = 0; - } - if (preset == "trimp") { - this.data.mod.soldiers = 1; - } - if (preset == "nerfed") { - this.data.perks.Overkill.cap = 1; - } - if (preset == "scientist") { - this.data.perks.Coordinated.cap = 0; - } - }, - update_dg: function () { - var max_zone = this.data.targetzone / 2 + 115; - var eff = 500e6 + 50e6 * game.generatorUpgrades.Efficiency.upgrades; - var capa = 3 + 0.4 * game.generatorUpgrades.Capacity.upgrades; - var max_fuel = game.permanentGeneratorUpgrades.Storage.owned ? capa * 1.5 : capa; - var supply = 230 + 2 * game.generatorUpgrades.Supply.upgrades; - var overclock = game.generatorUpgrades.Overclocker.upgrades; - overclock = overclock && 1 - 0.5 * Math.pow(0.99, overclock - 1); - var burn = game.permanentGeneratorUpgrades.Slowburn.owned ? 0.4 : 0.5; - var cells = this.mastery("magmaFlow") ? 18 : 16; - var accel = this.mastery("quickGen") ? 1.03 : 1.02; - var hs2 = this.mastery("hyperspeed2") ? (game.global.highestLevelCleared + 1) / 2 : 0; - var bs = 0.5 * this.mastery("blacksmith") + 0.25 * this.mastery("blacksmith2") + 0.15 * this.mastery("blacksmith3"); - bs *= game.global.highestLevelCleared + 1; - var housing = 0; - var fuel = 0; - var time = 0; - function tick(mult) { - housing += mult * eff * Math.sqrt(Math.min(capa, fuel)); - fuel -= burn; - } - for (var zone = 230; zone <= max_zone; ++zone) { - fuel += cells * (0.01 * Math.min(zone, supply) - 2.1); - var tick_time = Math.ceil(60 / Math.pow(accel, Math.floor((zone - 230) / 3))); - time += zone > bs ? 28 : zone > hs2 ? 20 : 15; - while (time >= tick_time) { - time -= tick_time; - tick(1); - } - while (fuel > max_fuel) { - tick(overclock); - } - housing *= 1.009; - } - while (fuel >= burn) { - tick(1); - } - this.data.mod.dg = housing; - }, - optimize: function (data) { - var he_left = data.he_left, - zone = data.zone, - fluffy = data.fluffy, - perks = data.perks, - weight = data.weight, - mod = data.mod; - var Looting_II = perks.Looting_II, - Carpentry_II = perks.Carpentry_II, - Motivation_II = perks.Motivation_II, - Power_II = perks.Power_II, - Toughness_II = perks.Toughness_II, - Capable = perks.Capable, - Cunning = perks.Cunning, - Curious = perks.Curious, - Overkill = perks.Overkill, - Resourceful = perks.Resourceful, - Coordinated = perks.Coordinated, - Siphonology = perks.Siphonology, - Anticipation = perks.Anticipation, - Resilience = perks.Resilience, - Meditation = perks.Meditation, - Relentlessness = perks.Relentlessness, - Carpentry = perks.Carpentry, - Artisanistry = perks.Artisanistry, - Range = perks.Range, - Agility = perks.Agility, - Bait = perks.Bait, - Trumps = perks.Trumps, - Pheromones = perks.Pheromones, - Packrat = perks.Packrat, - Motivation = perks.Motivation, - Power = perks.Power, - Toughness = perks.Toughness, - Looting = perks.Looting; - for (var name in perks) { - if (name.endsWith("_II")) { - perks[name].pack = Math.pow(10, Math.max(0, Math.floor(Math.log(he_left) / Math.log(100) - 4.2))); - } - } - for (var _i = 0, _a = ["whip", "magn", "taunt", "ven"]; _i < _a.length; _i++) { - var name = _a[_i]; - mod[name] = Math.pow(1.003, zone * 99 * 0.03 * mod[name]); - } - var books = Math.pow(1.25, zone) * Math.pow(zone > 100 ? 1.28 : 1.2, Math.max(zone - 59, 0)); - var gigas = Math.max(0, Math.min(zone - 60, zone / 2 - 25, zone / 3 - 12, zone / 5, zone / 10 + 17, 39)); - var base_housing = Math.pow(1.25, Math.min(zone / 2, 30) + gigas); - var mystic = zone >= 25 ? Math.floor(Math.min(zone / 5, 9 + zone / 25, 15)) : 0; - var tacular = (20 + zone - zone % 5) / 100; - var base_income = 600 * mod.whip * books; - var base_helium = Math.pow(zone - 19, 2); - var max_tiers = zone / 5 + +((zone - 1) % 10 < 5); - var exponents = { - cost: Math.pow(1.069, 0.85 * (zone < 60 ? 57 : 53)), - attack: Math.pow(1.19, 13), - health: Math.pow(1.19, 14), - block: Math.pow(1.19, 10) - }; - var equip_cost = { - attack: 211 * (weight.attack + weight.health) / weight.attack, - health: 248 * (weight.attack + weight.health) / weight.health, - block: 5 * (weight.attack + weight.health) / weight.health - }; - // Number of ticks it takes to one-shot an enemy. - function ticks() { - return 1 + +(Agility.level < 3) + Math.ceil(10 * AutoPerky.mult(Agility, -5)); - } - var moti = function () { - return AutoPerky.add(Motivation, 5) * AutoPerky.add(Motivation_II, 1); - }; - var looting = function () { - return AutoPerky.add(Looting, 5) * AutoPerky.add(Looting_II, 0.25); - }; - function income(ignore_prod) { - var storage = mod.storage * AutoPerky.mult(Resourceful, -5) / AutoPerky.add(Packrat, 20); - var loot = looting() * mod.magn / ticks(); - var prod = ignore_prod ? 0 : moti() * AutoPerky.add(Meditation, 1) * mod.prod; - var chronojest = mod.chronojest * 0.1 * prod * loot; - return (base_income * (prod + loot * mod.loot + chronojest) * (1 - storage)); - } - // Max population - var trimps = mod.tent_city - ? function () { - var carp = AutoPerky.mult(Carpentry, 10) * AutoPerky.add(Carpentry_II, 0.25); - var territory = AutoPerky.add(Trumps, 20); - return 10 * (mod.taunt + territory * (mod.taunt - 1) * 111) * carp; - } - : function () { - var carp = AutoPerky.mult(Carpentry, 10) * AutoPerky.add(Carpentry_II, 0.25); - var bonus = 3 + Math.max(Math.log(income() / base_income * carp / AutoPerky.mult(Resourceful, -5)), 0); - var territory = AutoPerky.add(Trumps, 20) * zone; - return (10 * (base_housing * bonus + territory) * carp * mod.taunt + mod.dg * carp); - }; - function equip(stat) { - var cost = equip_cost[stat] * AutoPerky.mult(Artisanistry, -5); - var levels = 1.136; - var tiers = Math.log(1 + income() * trimps() / cost) / Math.log(exponents.cost); - if (tiers > max_tiers + 0.45) { - levels = Math.log(1 + Math.pow(exponents.cost, tiers - max_tiers) * 0.2) / Math.log(1.2); - tiers = max_tiers; - } - return levels * Math.pow(exponents[stat], tiers); - } - // Number of buildings of a given kind that can be built with the current income. - // cost: base cost of the buildings - // exp: cost increase for each new level of the building - function building(cost, exp) { - cost *= 4 * AutoPerky.mult(Resourceful, -5); - return Math.log(1 + income(true) * trimps() * (exp - 1) / cost) / Math.log(exp); - } - // Number of zones spent in the Magma - function magma() { - return Math.max(zone - 229, 0); - } - // function mancers() { - // let tributes = building(10000, 1.05); - // let mancers = Math.log(loot * Math.pow(1.05, tributes) / 1e62) / Math.log(1.01); - // return magma() ? 1 + 0.6 * (1 - Math.pow(0.9999, mancers)) : 1; - // } - // Breed speed - function breed() { - var nurseries = building(2e6, 1.06) / (1 + 0.1 * Math.min(magma(), 20)); - var potency = 0.0085 * (zone >= 60 ? 0.1 : 1) * Math.pow(1.1, Math.floor(zone / 5)); - return potency * Math.pow(1.01, nurseries) * AutoPerky.add(Pheromones, 10) * mod.ven; - } - var group_size = []; - for (var coord = 0; coord <= Math.log(1 + he_left / 500e3) / Math.log(1.3); ++coord) { - var ratio = 1 + 0.25 * Math.pow(0.98, coord); - var result = 1; - for (var i = 0; i < 100; ++i) { - result = Math.ceil(result * ratio); - } - group_size[coord] = result / Math.pow(ratio, 100); - } - // Theoretical fighting group size (actual size is lower because of Coordinated) - function soldiers() { - var ratio = 1 + 0.25 * AutoPerky.mult(Coordinated, -2); - var pop = (mod.soldiers || trimps()) / 3; - if (mod.soldiers > 1) - pop += 36000 * AutoPerky.add(Bait, 100); - var coords = Math.log(pop / group_size[Coordinated.level]) / Math.log(ratio); - var available = zone - 1 + (magma() ? 100 : 0); - return group_size[0] * Math.pow(1.25, Math.min(coords, available)); - } - // Total attack - function attack() { - var attack = (0.15 + equip("attack")) * Math.pow(0.8, magma()); - attack *= AutoPerky.add(Power, 5) * AutoPerky.add(Power_II, 1); - attack *= AutoPerky.add(Relentlessness, 5 * AutoPerky.add(Relentlessness, 30)); - attack *= Math.pow(1 + Siphonology.level, 0.1) * AutoPerky.add(Range, 1); - attack *= AutoPerky.add(Anticipation, 6); - return soldiers() * attack; - } - // Total survivability (accounts for health and block) - function health() { - var health = (0.6 + equip("health")) * Math.pow(0.8, magma()); - health *= AutoPerky.add(Toughness, 5) * AutoPerky.add(Toughness_II, 1) * AutoPerky.mult(Resilience, 10); - // block - var gyms = building(400, 1.185); - var trainers = (gyms * Math.log(1.185) - Math.log(1 + gyms)) / Math.log(1.1) + 25 - mystic; - var block = 0.04 * gyms * Math.pow(1 + mystic / 100, gyms) * (1 + tacular * trainers); - // target number of attacks to survive - var attacks = 60; - if (zone < 70) { - // number of ticks needed to repopulate an army - var timer = - Math.log(1 + soldiers() * breed() / AutoPerky.add(Bait, 100)) / Math.log(1 + breed()); - attacks = timer / ticks(); - } else { - var ratio = 1 + 0.25 * AutoPerky.mult(Coordinated, -2); - var available = zone - 1 + (magma() ? 100 : 0); - var required = group_size[Coordinated.level] * Math.pow(ratio, available); - var fighting = Math.min(required / trimps(), 1 / 3); - var target_speed = fighting > 1e-9 ? (Math.pow(0.5 / (0.5 - fighting), 0.1 / mod.breed_timer) - 1) * 10 : fighting / mod.breed_timer; - var geneticists = Math.log(breed() / target_speed) / -Math.log(0.98); - health *= Math.pow(1.01, geneticists); - } - health /= attacks; - if (zone < 60) { - block += equip("block"); - } else { - block = Math.min(block, 4 * health); - } - return soldiers() * (block + health); - } - // XP earned by Fluffy over the run - fluffy.base = 0; - for (var z = 301; z < zone; ++z) { - fluffy.base += 50 * Math.pow(1.015, z - 300); - } - function xp() { - var total = fluffy.base * AutoPerky.add(Cunning, 25) * AutoPerky.add(Curious, 60); - var cap = Capable.level == 10 ? Infinity : 1000 * Math.pow(5, fluffy.prestige) * (AutoPerky.mult(Capable, 300) - 1) / 3; - return Math.max(1, Math.min(total, cap - fluffy.xp) + Math.min(total * 7, cap - fluffy.xp)); - } - var agility = function () { - return 1 / AutoPerky.mult(Agility, -5); - }; - var helium = function () { - return base_helium * looting() + 45; - }; - var overkill = function () { - return Math.max(0.2, Overkill.level); - }; - var stats = { - agility: agility, - helium: helium, - xp: xp, - attack: attack, - health: health, - overkill: overkill, - trimps: trimps - }; - function score() { - var result = 0; - for (var i in weight) { - if (!weight[i]) { - continue; - } - var stat = stats[i](); - if (!isFinite(stat)) { - throw Error(i + " is " + stat); - } - result += weight[i] * Math.log(stat); - } - return result; - } - function best_perk() { - var best; - var max = 0; - var baseline = score(); - for (var name in perks) { - var perk = perks[name]; - if (perk.locked || perk.level >= perk.cap || perk.cost() > he_left) { - continue; - } - perk.level += perk.pack; - var gain = score() - baseline; - perk.level -= perk.pack; - var efficiency = gain / perk.cost(); - if (efficiency >= max) { - max = efficiency; - best = perk; - } - } - return best; - } - mod.loot *= 20.8; // TODO: check that this is correct - weight.agility = (weight.helium + weight.attack) / 2; - weight.overkill = 0.25 * weight.attack * (2 - Math.pow(0.9, weight.helium / weight.attack)); - //Disable Bait if we are above z110 - if (zone > 110 && mod.soldiers <= 1 && Bait.must == 0) { - Bait.cap = 0; - } - if (!Capable.must) { - Capable.must = Math.ceil(Math.log(0.003 * fluffy.xp / Math.pow(5, fluffy.prestige) + 1) / Math.log(4)); - } - // Dirty fix - Capable.must = Math.min(Capable.must, 10, Math.floor(Math.log(he_left) / Math.log(10) - 7.5)); - for (var name in perks) { - var perk = perks[name]; - while (perk.level < perk.must) { - var cost = perk.cost(); - he_left -= cost; - perk.level += perk.pack; - perk.spent += cost; - } - } - if (he_left < 0) { - throw game && game.global.canRespecPerks ? "You don’t have enough Helium to afford your Fixed Perks." : "You don’t have a respec available."; - } - // Main loop - for (var best = void 0; (best = best_perk()); ) { - var spent = 0; - while (best.level < best.cap && (best.level < best.must || spent < he_left / best.free)) { - he_left -= best.cost(); - spent += best.cost(); - best.level += best.pack; - if (best.level == 1000 * best.pack) { - best.pack *= 10; - } - } - best.spent += spent; - } - for (var perk in perks) { - //console.log(perk, "=", perks[perk].level, "=", perks[perk].must); - } - return [he_left, perks]; - }, - init: function () { - var ratio = JSON.parse(localStorage.getItem("AutoperkCustomRatio")); - if (ratio !== null && ratio !== undefined && ratio.length === 3) { - this.presets["custom"] = ratio; - } - this.buildButtons(); - }, - run: function () { - this.inputs = this.read_data(); - this.optimize(this.data); - }, - clickAllocate: function () { - AutoPerky.run(); - this.applyCalculations(this.data.perks); - }, - applyCalculations: function (perks) { - var preBuyAmt = game.global.buyAmt; - if (game.global.canRespecPerks) { - respecPerks(); - } - if (game.global.respecActive) { - clearPerks(); - for (var i in perks) { - if (!game.portal[i].locked) { - game.global.buyAmt = perks[i].level; - buyPortalUpgrade(i); - } - } - } - game.global.buyAmt = preBuyAmt; - numTab(1, true); //selects the 1st number of the buy-amount tab-bar (Always 1) - cancelTooltip(); //displays the last perk we bought's tooltip without this. idk why. - }, - createInput: function (perkname, div) { - var perk1input = document.createElement("Input"); - perk1input.id = perkname + "Ratio"; - var oldstyle = "text-align: center; width: 60px;"; - if (game.options.menu.darkTheme.enabled != 2) { - perk1input.setAttribute("style", oldstyle + " color: black;"); - } else { - perk1input.setAttribute("style", oldstyle); - } - perk1input.setAttribute("class", "perkRatios"); - var perk1label = document.createElement("Label"); - perk1label.id = perkname + "Label"; - perk1label.innerHTML = perkname; - perk1label.setAttribute("style", "margin-right: 1vw; width: 120px; color: white;"); - //add to the div. - perk1input.setAttribute("onchange", "AutoPerky.saveRatios()"); - div.appendChild(perk1input); - div.appendChild(perk1label); - }, - saveRatios: function () { - if (this.preset === "custom") { - this.presets[this.preset][0] = parseInt(document.getElementById("HeliumRatio").value); - this.presets[this.preset][1] = parseInt(document.getElementById("AttackRatio").value); - this.presets[this.preset][2] = parseInt(document.getElementById("HealthRatio").value); - safeSetItems("AutoperkCustomRatio", JSON.stringify(this.presets[this.preset])); - } - if (this.fixed != document.getElementById("FixedRatio").value) { - this.fixed = document.getElementById("FixedRatio").value; - safeSetItems("AutoperkFixedPerks", this.fixed); - } - var loadZone = parseInt(document.getElementById("TargetRatio").value); - if (loadZone > 0) { - this.data.targetzone = loadZone; - safeSetItems("AutoperkTargetZone", this.data.targetzone); - } - }, - setDefaultRatios: function () { - if (this.preset !== document.getElementById("ratioPreset").value) { - var ratioSet = document.getElementById("ratioPreset").selectedIndex; - if (Number.isInteger(ratioSet)) { - safeSetItems("AutoperkSelectedRatioPresetID", ratioSet); - } - this.preset = document.getElementById("ratioPreset").value; - } - document.getElementById("HeliumRatio").value = this.presets[this.preset][0]; - document.getElementById("AttackRatio").value = this.presets[this.preset][1]; - document.getElementById("HealthRatio").value = this.presets[this.preset][2]; - if (this.preset === "custom") { - document.getElementById("HeliumRatio").disabled = false; - document.getElementById("AttackRatio").disabled = false; - document.getElementById("HealthRatio").disabled = false; - } else { - document.getElementById("HeliumRatio").disabled = true; - document.getElementById("AttackRatio").disabled = true; - document.getElementById("HealthRatio").disabled = true; - } - document.getElementById("FixedRatio").value = this.fixed; - document.getElementById("TargetRatio").value = this.data.targetzone; - }, - buildButtons: function () { - var buttonbar = document.getElementById("portalBtnContainer"); - var customRatios = document.createElement("DIV"); - customRatios.id = 'customRatios'; - this.createInput("Helium", customRatios); - this.createInput("Attack", customRatios); - this.createInput("Health", customRatios); - this.createInput("Target", customRatios); - this.createInput("Fixed", customRatios); - var loadFixed = localStorage.getItem("AutoperkFixedPerks"); - if (loadFixed !== null) { - this.fixed = loadFixed; - } - var loadZone = parseInt(localStorage.getItem("AutoperkTargetZone")); - if (loadZone > 0) { - this.data.targetzone = loadZone; - } else { - this.data.targetzone = - game.stats.highestVoidMap.valueTotal || game.global.highestLevelCleared; - } - //Create Allocator button and add it to Trimps Perk Window - var allocatorBtn1 = document.createElement("DIV"); - allocatorBtn1.id = "allocatorBTN1"; - allocatorBtn1.setAttribute("class", "btn inPortalBtn settingsBtn settingBtntrue"); - allocatorBtn1.setAttribute("onclick", "AutoPerky.clickAllocate();"); - allocatorBtn1.textContent = "Allocate Perks"; - buttonbar.appendChild(allocatorBtn1); - buttonbar.setAttribute("style", "margin-bottom: 0.8vw;"); - - var ratioPreset = document.createElement("select"); - ratioPreset.id = "ratioPreset"; - var oldstyle = "text-align: center; width: 110px;"; - if (game.options.menu.darkTheme.enabled != 2) - ratioPreset.setAttribute("style", oldstyle + " color: black;"); - else - ratioPreset.setAttribute("style", oldstyle); - //Populate dump perk dropdown list : - // var AutoPerky.presetList = [preset_ZXV,preset_ZXVnew,preset_ZXV3,preset_TruthEarly,preset_TruthLate,preset_nsheetz,preset_nsheetzNew,preset_HiderHehr,preset_HiderBalance,preset_HiderMore,preset_genBTC,preset_genBTC2]; - var html = ""; - for (var key in this.presets) { - html += '"; - } - //Specific ratios labeled above are configured down in the bottom of this file.Lines 543-556 - ratioPreset.innerHTML = html; - //load the last ratio used - var loadLastPreset = localStorage.getItem("AutoperkSelectedRatioPresetID"); - if (loadLastPreset != null) - ratioPreset.selectedIndex = loadLastPreset; // First element is zxv (default) ratio. - else - ratioPreset.selectedIndex = 0; - ratioPreset.setAttribute("onchange", "AutoPerky.setDefaultRatios()"); - //Add the presets dropdown to UI Line 1 - customRatios.appendChild(ratioPreset); - document.getElementById("portalWrapper").appendChild(customRatios); - document.getElementById("FixedRatio").style["width"] = "480px"; - this.setDefaultRatios(); - } -}; - -AutoPerky.init(); \ No newline at end of file diff --git a/modules/portal.js b/modules/portal.js index dfa883f8d..3b63a5851 100644 --- a/modules/portal.js +++ b/modules/portal.js @@ -12,8 +12,8 @@ var zonePostpone = 0; //additional postponement of the zone above. //Decide When to Portal function autoPortal() { if(!game.global.portalActive) return; - var autoFinishDaily = (game.global.challengeActive == "Daily" && getPageSetting('AutoFinishDaily')); - var autoFinishDailyZone = getPageSetting('AutoFinishDailyZone'); + var autoFinishDaily = (game.global.challengeActive == "Daily" && getPageSetting('AutoFinishDailyNew') != 999); + var autoFinishDailyZone = getPageSetting('AutoFinishDailyNew'); if (!autoFinishDaily) autoFinishDailyZone = 0; //dont use stale disabled values switch (autoTrimpSettings.AutoPortal.selected) { @@ -106,13 +106,14 @@ function doPortal(challenge) { if(!game.global.portalActive) return; if (getPageSetting('AutoMagmiteSpender2')==1) autoMagmiteSpender(); // From mainLoop - if (getPageSetting('AutoHeirlooms2')) autoHeirlooms2(); //"Auto Heirlooms 2" (heirlooms.js) - else if (getPageSetting('AutoHeirlooms')) autoHeirlooms();//"Auto Heirlooms" (") + if (getPageSetting('AutoHeirloomsNew')==0); //"AutoHeirlooms OFF" (Heirlooms.js) + else if (getPageSetting('AutoHeirloomsNew')==1) autoHeirlooms(); //"AH1" (") + else if (getPageSetting('AutoHeirloomsNew')==2) autoHeirlooms2(); //"AH2" (") if (getPageSetting('AutoUpgradeHeirlooms') && !heirloomsShown) autoNull(); //"Auto Upgrade Heirlooms" (heirlooms.js) //Go into portal screen portalClicked(); //AutoPerks: do this first, because it reflashes the screen. - if (getPageSetting('AutoAllocatePerks') && (typeof MODULES["perks"] !== 'undefined' || typeof AutoPerks !== 'undefined')) + if (getPageSetting('AutoAllocatePerks')==1 && (typeof MODULES["perks"] !== 'undefined' || typeof AutoPerks !== 'undefined')) AutoPerks.clickAllocate(); //Auto Start Daily: if (getPageSetting('AutoStartDaily')) { diff --git a/modules/scryer.js b/modules/scryer.js index c7a71e5db..f15b12fc0 100644 --- a/modules/scryer.js +++ b/modules/scryer.js @@ -3,30 +3,71 @@ var wantToScry = false; //use S stance function useScryerStance() { - var AutoStance = getPageSetting('AutoStance'); + var AutoStance = getPageSetting('AutoStance'); function autostancefunction() { if (AutoStance<=1) autoStance(); //"Auto Stance" - else if (AutoStance==2) autoStance2(); //"Auto Stance #2" + else if (AutoStance==2) autoStance2(); + else if (AutoStance==3) autoStance3(); //"Auto Stance #3" }; - //check preconditions (exit quick, if impossible to use) + + //check NEVER & Prerequisites (This overrides overkill settings) var use_auto = game.global.preMapsActive || game.global.gridArray.length === 0 || game.global.highestLevelCleared < 180; + //check scryer is unlocked use_auto = use_auto || game.global.world <= 60; - use_auto = use_auto || game.global.mapsActive && getCurrentMapObject().location == "Void" && getPageSetting('ScryerUseinVoidMaps2') == 2; - if (use_auto) { + //check map NEVER + use_auto = use_auto || game.global.mapsActive && getPageSetting('ScryerUseinMaps2') == 0; + //check void map NEVER + use_auto = use_auto || game.global.mapsActive && getCurrentMapObject().location == "Void" && getPageSetting('ScryerUseinVoidMaps2') == 0; + //check spire NEVER + use_auto = use_auto || !game.global.mapsActive && isActiveSpireAT() && getPageSetting('ScryerUseinSpire2') == 0; + //check Boss NEVERs + use_auto = use_auto || (getPageSetting('ScryerSkipBoss2') == 1 && game.global.world > getPageSetting('VoidMaps') && game.global.lastClearedCell == 98) || (getPageSetting('ScryerSkipBoss2') == 2 && game.global.lastClearedCell == 98); + //Check Nature Min Zone + use_auto = use_auto || ((getEmpowerment() == "Poison" && 0 <= getPageSetting('ScryUseinPoison') && (game.global.world < getPageSetting('ScryUseinPoison'))) + || (getEmpowerment() == "Wind" && 0 <= getPageSetting('ScryUseinWind') && (game.global.world < getPageSetting('ScryUseinWind'))) + || (getEmpowerment() == "Ice" && 0 <= getPageSetting('ScryUseinIce') && (game.global.world < getPageSetting('ScryUseinIce')))); + //check Corrupted Never + var curEnemy = getCurrentEnemy(1); + var iscorrupt = curEnemy && (curEnemy.mutation == "Corruption" || curEnemy.mutation == "Healthy"); + iscorrupt = iscorrupt || (game.global.mapsActive && mutations.Magma.active()); + iscorrupt = iscorrupt || (game.global.mapsActive && getCurrentMapObject().location == "Void" && game.global.world >= mutations.Corruption.start()); + if ((iscorrupt && getPageSetting('ScryerSkipCorrupteds2') == 0 || (use_auto))) { autostancefunction(); wantToScry = false; return; } + //check Force (This overrides overkill settings) + //check map Force + var use_scryer = use_scryer || (game.global.mapsActive && getPageSetting('ScryerUseinMaps2') == 1); + //check void map Force + use_scryer = use_scryer || (game.global.mapsActive && getCurrentMapObject().location == "Void" && getPageSetting('ScryerUseinVoidMaps2') == 1); + //check spire Force + use_scryer = use_scryer || (!game.global.mapsActive && isActiveSpireAT() && getPageSetting('ScryerUseinSpire2') == 1); + //Check Nature Min Zone + use_scryer = use_scryer || ((getEmpowerment() == "Poison" && 0 <= getPageSetting('ScryUseinPoison') && (game.global.world >= getPageSetting('ScryUseinPoison'))) + || (getEmpowerment() == "Wind" && 0 <= getPageSetting('ScryUseinWind') && (game.global.world >= getPageSetting('ScryUseinWind'))) + || (getEmpowerment() == "Ice" && 0 <= getPageSetting('ScryUseinIce') && (game.global.world >= getPageSetting('ScryUseinIce')))); + //check Corrupted Force + if ((iscorrupt && getPageSetting('ScryerSkipCorrupteds2') == 1) || (use_scryer)) { + setFormation(4); + wantToScry = true; + return; + } + + +//If neither NEVER or FORCE, move on to assessing whether to MAYBE +//First, calculate damage if (AutoStance<=1) calcBaseDamageinX(); //calculate internal script variables normally processed by autostance. - else if (AutoStance==2) + else if (AutoStance>=2) calcBaseDamageinX2(); //calculate method #2 +//Decide whether it is oktoswitch (Suicide) var missingHealth = game.global.soldierHealthMax - game.global.soldierHealth; var newSquadRdy = game.resources.trimps.realMax() <= game.resources.trimps.owned + 1; var form = game.global.formation; var oktoswitch = true; - var die = getPageSetting('ScryerDieToUseS'); + var die = (getPageSetting('ScryerDieZ') != -1 && getPageSetting('ScryerDieZ') <= game.global.world) ; const willSuicide = getPageSetting('ScryerDieZ'); if (die && willSuicide >= 0) { var [dieZ, dieC] = willSuicide.toString().split("."); @@ -34,14 +75,22 @@ function useScryerStance() { die = game.global.world >= dieZ && (!dieC || (game.global.lastClearedCell + 1 >= dieC)); } if (form == 0 || form == 1) - oktoswitch = die || newSquadRdy || (missingHealth < (baseHealth / 2)); + oktoswitch = die || newSquadRdy || (missingHealth < (baseHealth / 2)); //switch if DieToUse / a new squad is ready / or trimp\'s missing health is less than half of base health +//Decide whether Overkill is possible var useoverkill = getPageSetting('ScryerUseWhenOverkill'); + //If Overkill isn't unlocked, toggle overkill use off! if (useoverkill && game.portal.Overkill.level == 0) setPageSetting('ScryerUseWhenOverkill', false); - if (useoverkill && !game.global.mapsActive && isActiveSpireAT() && getPageSetting('ScryerUseinSpire2')==2) - useoverkill = false; - //Overkill button being on and being able to overkill in S will override any other setting, regardless. + //If Spire is set to never and is active, don't use overkill setting. //redundant now?? + if (useoverkill && !game.global.mapsActive && isActiveSpireAT() && getPageSetting('ScryerUseinSpire2')==0) + useoverkill = false; + //If lower than nature zone, do not use overkill //redundant now?? + if (useoverkill && ((getEmpowerment() == "Poison" && (game.global.world <= getPageSetting('ScryUseinPoison'))) + || (getEmpowerment() == "Wind" && (game.global.world <= getPageSetting('ScryUseinWind'))) + || (getEmpowerment() == "Ice" &&(game.global.world <= getPageSetting('ScryUseinIce'))))) + useoverkill = false; + //Overkill button being on and being able to overkill in S will override any setting other than never spire & nature zone, regardless. if (useoverkill && game.portal.Overkill.level > 0) { var avgDamage = (baseDamage * (1-getPlayerCritChance()) + (baseDamage * getPlayerCritChance() * getPlayerCritDamageMult())); var Sstance = 0.5; @@ -55,34 +104,7 @@ function useScryerStance() { } } -//Any of these being true will indicate scryer should not be used, and cause the function to dump back to regular autoStance(): - //check for spire - use_auto = use_auto || !game.global.mapsActive && isActiveSpireAT() && getPageSetting('ScryerUseinSpire2')!=1; - //check for voids - use_auto = use_auto || game.global.mapsActive && getCurrentMapObject().location == "Void" && !getPageSetting('ScryerUseinVoidMaps2'); - //check for maps - use_auto = use_auto || game.global.mapsActive && !getPageSetting('ScryerUseinMaps2'); - //check for bosses above voidlevel - use_auto = use_auto || getPageSetting('ScryerSkipBoss2') == 1 && game.global.world > getPageSetting('VoidMaps') && game.global.lastClearedCell == 98; - //check for bosses (all levels) - use_auto = use_auto || getPageSetting('ScryerSkipBoss2') == 2 && game.global.lastClearedCell == 98; - if (use_auto) { - autostancefunction(); //falls back to autostance when not using S. - wantToScry = false; - return; - } - - //check for corrupted cells (and exit) - var iscorrupt = getCurrentEnemy(1).mutation == "Corruption"; - iscorrupt = iscorrupt || (mutations.Magma.active() && game.global.mapsActive); - iscorrupt = iscorrupt || (game.global.mapsActive && getCurrentMapObject().location == "Void" && game.global.world >= mutations.Corruption.start()); - if (iscorrupt && getPageSetting('ScryerSkipCorrupteds2')) { - autostancefunction(); - wantToScry = false; - return; - } - - //Default. +//Default. (All Never and Always are accounted for, Overkill has decided whether to run, leaving solely what zones you want to run S in even when you can't overkill) var min_zone = getPageSetting('ScryerMinZone'); var max_zone = getPageSetting('ScryerMaxZone'); var valid_min = game.global.world >= min_zone; diff --git a/modules/stance.js b/modules/stance.js index b157ad7e8..b91807a86 100644 --- a/modules/stance.js +++ b/modules/stance.js @@ -2,21 +2,7 @@ function calcBaseDamageinX() { //baseDamage - baseDamage = game.global.soldierCurrentAttack * (1 + (game.global.achievementBonus / 100)) * ((game.global.antiStacks * game.portal.Anticipation.level * game.portal.Anticipation.modifier) + 1) * (1 + (game.global.roboTrimpLevel * 0.2)) * (1 + (game.global.totalSquaredReward / 100)) * (game.talents.stillRowing2.purchased ? (1 + (0.06 * game.global.spireRows)) : 1) * (game.talents.healthStrength.purchased ? (1 + (0.15 * mutations.Healthy.cellCount())) : 1) * (Fluffy.isActive() ? Fluffy.getDamageModifier() : 1) * (1 + (1 - game.empowerments.Ice.getCombatModifier())) * (game.talents.magmamancer.purchased ? game.jobs.Magmamancer.getBonusPercent() : 1); - if (game.global.challengeActive == "Daily"){ - if (typeof game.global.dailyChallenge.weakness !== 'undefined'){ - baseDamage *= dailyModifiers.weakness.getMult(game.global.dailyChallenge.weakness.strength, game.global.dailyChallenge.weakness.stacks); - } - if (typeof game.global.dailyChallenge.oddTrimpNerf !== 'undefined' && ((game.global.world % 2) == 1)){ - baseDamage *= dailyModifiers.oddTrimpNerf.getMult(game.global.dailyChallenge.oddTrimpNerf.strength); - } - if (typeof game.global.dailyChallenge.evenTrimpBuff !== 'undefined' && ((game.global.world % 2) == 0)){ - baseDamage *= dailyModifiers.evenTrimpBuff.getMult(game.global.dailyChallenge.evenTrimpBuff.strength); - } - if (typeof game.global.dailyChallenge.rampage !== 'undefined'){ - baseDamage *= dailyModifiers.rampage.getMult(game.global.dailyChallenge.rampage.strength, game.global.dailyChallenge.rampage.stacks); - } - } + baseDamage = (getBattleStats("attack", false, true)); //baseBlock baseBlock = game.global.soldierCurrentBlock; //baseHealth @@ -47,7 +33,7 @@ function calcBaseDamageinX() { //goes to battlecalc.js which came from Trimps "updates.js" line 1103 function calcBaseDamageinX2() { //baseDamage - baseDamage = calcOurDmg(game.global.soldierCurrentAttack,false); + baseDamage = getBattleStats("attack", false, true); //baseBlock baseBlock = getBattleStats("block"); //baseHealth @@ -560,15 +546,19 @@ function autoStance3() { //no need to continue if (game.global.gridArray.length === 0) return; if (game.global.soldierHealth <= 0) return; //dont calculate stances when dead, cause the "current" numbers are not updated when dead. - if (!getPageSetting('AutoStance')) return; + if (getPageSetting('AutoStance') == 0) return; if (!game.upgrades.Formations.done) return; + var windstackzone = getPageSetting('WindStackingMin'); + if(game.global.world>=80) { - if( getEmpowerment() != "Wind" || game.global.mapsActive || game.empowerments.Wind.currentDebuffPower==200) { - setFormation(2); - } - else if (getPageSetting('WindStacking')) { - setFormation(4); - } + if( getEmpowerment() != "Wind" || game.global.mapsActive || game.empowerments.Wind.currentDebuffPower==200 || (windstackzone < 0) || (windstackzone >= game.global.world) || game.global.spireActive) { + setFormation(2); + return; + } + else if (game.global.world >= windstackzone) { + setFormation(4); + return; + } } } diff --git a/modules/upgrades.js b/modules/upgrades.js index 6bc63509b..7207ac9df 100644 --- a/modules/upgrades.js +++ b/modules/upgrades.js @@ -7,7 +7,7 @@ function buyUpgrades() { upgrade = upgradeList[upgrade]; var gameUpgrade = game.upgrades[upgrade]; var available = (gameUpgrade.allowed > gameUpgrade.done && canAffordTwoLevel(gameUpgrade)); - if (upgrade == 'Coordination' && (getPageSetting('ManualCoords') || !canAffordCoordinationTrimps())) continue; + if (upgrade == 'Coordination' && (getPageSetting('BuyUpgradesNew') == 2 || !canAffordCoordinationTrimps())) continue; if (upgrade == 'Shieldblock' && !getPageSetting('BuyShieldblock')) continue; if (upgrade == 'Gigastation' && (game.global.lastWarp ? game.buildings.Warpstation.owned < (Math.floor(game.upgrades.Gigastation.done * getPageSetting('DeltaGigastation')) + getPageSetting('FirstGigastation')) : game.buildings.Warpstation.owned < getPageSetting('FirstGigastation'))) continue; //skip bloodlust during scientist challenges and while we have autofight enabled. diff --git a/modules/utils.js b/modules/utils.js index e7e392417..ee71b65af 100644 --- a/modules/utils.js +++ b/modules/utils.js @@ -66,26 +66,42 @@ function updateOldSettings(oldSettings) { var oldVer = oldSettings['ATversion']; debug("ATsettings: Updating v" + oldVer + " to v" + ATversion); if (versionIsOlder(oldVer, '2.1.6.9')) { - debug("ATsettings: Migrating AutoMaps + RunUniqueMaps to new AutoMaps."); - //migrate AutoMaps + RunUniqueMaps to new AutoMaps - var am = (oldSettings['AutoMaps']); - oldSettings['AutoMaps'] = am ? 1 : 0; - if (!oldSettings['RunUniqueMaps']) - oldSettings['AutoMaps']++; - delete oldSettings['RunUniqueMaps']; + debug("ATsettings: Migrating AutoMaps + RunUniqueMaps to new AutoMaps."); + //migrate AutoMaps + RunUniqueMaps to new AutoMaps + oldSettings['AutoMaps'].value = oldSettings['AutoMaps'].enabled ? 1 : 0; + if (!oldSettings['RunUniqueMaps'].enabled) + oldSettings['AutoMaps'].value++; + delete oldSettings['RunUniqueMaps']; } - /* - if (versionIsOlder(oldVer, '2.1.7.0')) { - debug("ATsettings: Migrating X + Y to new Z."); - //migrate X + Y to new Z - var am = (oldSettings['X']); - oldSettings['X'] = am ? 1 : 0; - if (!oldSettings['Y']) - oldSettings['X']++; - delete oldSettings['Y']; - } - */ + //These settingsneed to be migrated here: +/* +BuyBuildingsNew = BuyBuildings + BuyStorage +BuyJobsNew = BuyJobs + WorkerRatios +BuyWeaponsNew = BuyWeaponUpgrades + BuyWeapons +BuyArmorNew = BuyArmorUpgrades + BuyArmor +ManualGather2 was 2 now 3 (4=way) - needs to be converted. +BuyOneTimeOC = BuyOvclock + OneTimeOnly +PrestigeSkip1_2 = PrestigeSkipMode + PrestigeSkip2 +AutoHeirloomsNew = AutoHeirlooms + AutoHeirlooms2 +ScryerDieToUseS += ScryerDieZ +(+more since 5 days ago) +*/ + if (versionIsOlder(oldVer, '2.1.7.0')) { + //example:*untested* + var X='BuyBuildings'; + var Y='BuyStorage'; + var Z='BuyBuildingsNew'; + //migrate X + Y to new Z + var oldOne = oldSettings[X]; + var oldTwo = oldSettings[Y]; + var newOne = oldSettings[Z]; + debug("ATsettings: Migrating " + X + " + " + Y + " to new " + Z); + newOne.value = oldOne.enabled ? 1 : 0; + newOne.value+= oldTwo.enabled ? 1 : 0; + delete oldOne; + delete oldTwo; + } autoTrimpSettings = oldSettings; } @@ -168,6 +184,7 @@ function debug(message, type, lootIcon) { var graphs = getPageSetting('SpamGraphs'); var magmite = getPageSetting('SpamMagmite'); var perks = getPageSetting('SpamPerks'); + var profiles = getPageSetting('SpamProfiles'); var output = true; switch (type) { case null: @@ -202,6 +219,9 @@ function debug(message, type, lootIcon) { case "perks": output = perks; break; + case "profiles": + output = profiles; + break; } if (output) { if (enableDebug) @@ -373,13 +393,7 @@ window.onerror = function catchErrors(msg, url, lineNo, columnNo, error) { console.log("AT logged error: " + message); //ATServer.Upload(message); }; -/* -window.addEventListener('error', function(event) { - var message = JSON.stringify(event); - console.log("logged error: " + message); - //ATServer.Upload(message); -}); -*/ + function throwErrorfromModule() { throw new Error("We have successfully read the thrown error message out of a module"); } diff --git a/sparecode/HiderTrimp.js b/sparecode/HiderTrimp.js deleted file mode 100644 index 348c3df11..000000000 --- a/sparecode/HiderTrimp.js +++ /dev/null @@ -1,208 +0,0 @@ - -//original globals -var buildcounter = 0; -var autoTSettings = {}; -var version = "0.37b.17T2"; - -//setup talk button -document.getElementById("buildingsQueue").style = "width: 70%; float: left;"; -document.getElementById("queueContainer").insertAdjacentHTML('beforeend', '
Talk
'); -letMeTalk = document.getElementById("talkingBtn"); -letMeTalk.setAttribute("onmouseover", 'tooltip(\"Talk\", \"customText\", event, \"It knows a lot about how Trimps works.\")'); -letMeTalk.setAttribute("onmouseout", 'tooltip("hide")'); -//setup talk window -document.getElementById("boneWrapper").insertAdjacentHTML('beforebegin', ''); -document.getElementById("autotrimp").insertAdjacentHTML('beforeend', ''); - -//setup paint button -document.getElementById("queueContainer").insertAdjacentHTML('beforeend', '
Paint
'); -letMePaint = document.getElementById("paintingBtn"); -letMePaint.setAttribute("onmouseover", 'tooltip(\"Paint\", \"customText\", event, \"It can paint things.\")'); -letMePaint.setAttribute("onmouseout", 'tooltip("hide")'); -//setup paint window -document.getElementById("queueContainer").insertAdjacentHTML('beforebegin', ''); -//HiderTryThatFailed//document.getElementById("boneWrapper").insertAdjacentHTML('beforebegin', ''); -//beforebegin //afterbegin //beforeend //afterend - -function getNiceThingsDone() { - var zp = document.getElementById("zonePic").value; - var pp = document.getElementById("prePic").value; - var vp = document.getElementById("voidPic").value; - var mp = document.getElementById("mapPic").value; - var sp = document.getElementById("spirePic").value; - if (zp.length > 5 || pp.length > 5 || vp.length > 5 || mp.length > 5 || sp.length > 5) { - //bring the art. (mp.length > 5) - if (zp.length > 5 && !game.global.preMapsActive && !game.global.mapsActive && !game.global.spireActive) { - document.getElementById("trimps").insertAdjacentHTML('afterend', '
'); - } else if (pp.length > 5 && game.global.preMapsActive) { - document.getElementById("trimps").insertAdjacentHTML('afterend', '
'); - } else if (vp.length > 5 && game.global.mapsActive && getCurrentMapObject().location == "Void") { - document.getElementById("trimps").insertAdjacentHTML('afterend', '
'); - } else if (mp.length > 5 && game.global.mapsActive && getCurrentMapObject().location != "Void") { - document.getElementById("trimps").insertAdjacentHTML('afterend', '
'); - } else if (sp.length > 5 && game.global.world >= getPageSetting('IgnoreSpiresUntil') && (game.global.world == 200 || game.global.world == 300 || game.global.world == 400 || game.global.world == 500 || game.global.world == 600) && game.global.spireActive) { - document.getElementById("trimps").insertAdjacentHTML('afterend', '
'); - } - if ((sp.length > 5 || zp.length > 5) && game.resources.trimps.soldiers != 0 && !game.global.preMapsActive && !game.global.mapsActive && (new Date().getTime() - game.global.zoneStarted) > 1600 && game.global.gridArray.length != 0) { - var cells = document.getElementById("grid").getElementsByClassName("battleCell cellColorBeaten"); var oldstyle = cells[0].getAttribute('style'); for (var i=0; i < cells.length; i++) cells[i].setAttribute('style', oldstyle + '; background-color: rgba(0,0,0,0.3);'); - } - if ((mp.length > 5 || vp.length > 5) && game.resources.trimps.soldiers != 0 && game.global.mapsActive && (new Date().getTime() - game.global.mapStarted) > 1600 && game.global.mapGridArray.length != 0) { - var cells = document.getElementById("mapGrid").getElementsByClassName("battleCell cellColorBeaten"); var oldstyle = cells[0].getAttribute('style'); for (var i=0; i < cells.length; i++) cells[i].setAttribute('style', oldstyle + '; background-color: rgba(0,0,0,0.3);'); - } - } - //bring the light. - var BR0 = document.getElementById("BR").value*1; - var BG0 = document.getElementById("BG").value*1; - var BB0 = document.getElementById("BB").value*1; - var CR0 = document.getElementById("CR").value*1; - var CG0 = document.getElementById("CG").value*1; - var CB0 = document.getElementById("CB").value*1; - if ((BR0 > 0 && BG0 > 0 && BB0 > 0) || (CR0 > 0 && CG0 > 0 && CB0 > 0)) { - var colB = "background: rgb("+BR0+"," +BG0+","+ BB0+");"; - var colC = "background: rgb("+CR0+"," +CG0+","+ CB0+");"; - //document.getElementById("innerWrapper").style = "background: rgb(BR, BG, BB);"; - document.getElementById("innerWrapper").style = colB; - document.getElementById("battleContainer").style = colC; - document.getElementById("gridContainer").style = colC; - document.getElementById("science").style = colC; - document.getElementById("selectedMapContainer").style = colC; - document.getElementById("helium").style = colC; - document.getElementById("achievementWrapper").style = colC; - document.getElementById("buyContainer").style = colC; - document.getElementById("logContainer").style = colC; - document.getElementById("queueContainer").style = colC; - document.getElementById("wood").style = colC; - document.getElementById("fragments").style = colC; - document.getElementById("heirloomWrapper").style = colC; - document.getElementById("food").style = colC; - document.getElementById("metal").style = colC; - document.getElementById("gems").style = colC; - document.getElementById("trimps").style = colC; - } -} - -//setup options -function createInputSetting(pic,div) { - var picInput = document.createElement("Input"); - picInput.id = pic + "URL"; - picInput.setAttribute('style', 'text-align: center; width: 60px; color: black;'); - picInput.setAttribute('class', 'picInput'); - var perk1label = document.createElement("Label"); - picLable.id = pic + 'Label'; - picLable.innerHTML = pic; - picLable.setAttribute('style', 'margin-right: 1vw; width: 120px; color: white;'); - //add to the div. - div.appendChild(picInput); - div.appendChild(picLable); -} - -//Add new css rule -//document.styleSheets[2].insertRule(".settingBtn3 {background-color: #337AB7;}", 84); - -var getPercent = 0; -var reactPercent = 0; -function getStats() { - reactPercent = 0; - getPercent = (game.stats.heliumHour.value() / (game.global.totalHeliumEarned - (game.global.heliumLeftover + game.resources.helium.owned)))*100; - if (getPercent.toFixed(3) > 0.54) { - reactPercent = " An amazing result, share it with others, they will appriciate it."; - } else if (getPercent.toFixed(3) > 0.53) { - reactPercent = " GRATZ, A NEW WORLD RECORD!"; - } else if (getPercent.toFixed(3) > 0.52) { - reactPercent = " Only a few ever got this far."; - } else if (getPercent.toFixed(3) > 0.50) { - reactPercent = " it's not shameful to give up."; - } else if (getPercent.toFixed(3) > 0.40) { - reactPercent = " It's the final push."; - } else if (getPercent.toFixed(3) > 0.30) { - reactPercent = " Keep it comming..."; - } else if (getPercent.toFixed(3) <= 0.30) { - reactPercent = " Did you just portal?"; - } - return getPercent.toFixed(3) + '%'; //return -} - -var getGigaDelta = false; -var reactGigaDelta = false; -function getStats2() { - reactGigaDelta = true; - getGigaDelta = (getPageSetting('FirstGigastation') > 40 || getPageSetting('DeltaGigastation') > 2); - if (getGigaDelta == true) { - reactGigaDelta = "First Gigastation must be under 41 and Min Warpstation must be under two, if you don't know how it works, why don't you click on the chat and ask?"; - } else if (getGigaDelta == false) { - reactGigaDelta = "You know the Truth."; - } - return getGigaDelta; -} - -var getAutoPortal = false; -var reactAutoPortal = false; -function getStats3() { - reactAutoPortal = true; - getAutoPortal = (getPageSetting('HeliumHrBuffer') > 0 || autoTrimpSettings.AutoPortal.selected != "Helium Per Hour"); - if (getAutoPortal == true) { - reactAutoPortal = "The Helium/Hr Buffer must be set to 0 and Auto Portal is there in order to help you get better Helium per hour, if you don't know how it works, why don't you click on the chat and ask?"; - } else if (getAutoPortal == false) { - reactAutoPortal = "You know the Truth."; - } - return getAutoPortal; -} - -//setup convo array -var conversation = []; -conversation[0] = {Q:"Hello.",R1:"Tell me the Truth.",L1:1,R2:"How am i doing so far?",L2:5,R3:"Tell me what to do.",L3:3}; -conversation[1] = {Q:"" +reactGigaDelta,R1:"Be more honest please.",L1:6,R2:"What can go wrong in the Don't Touch Zone?",L2:4,R3:"I know the Truth.",L3:0}; -conversation[2] = {Q:"OK.",R1:"Again.",L1:0,R2:"How am i doing so far?",L2:5,R3:"What can go wrong in the Don't Touch Zone?",L3:4}; -conversation[3] = {Q:"Please set Auto Portal to Helium Per Hour and set First Gigastation to 40 (or less). Make sure that Min Warpstation is set to two (or less). And notice that some of the Void Maps will be done before your Void Maps settings, so please use it and set the Void Maps to no more then 10 Zones before you predict that you will Auto Portal. Have a nice AutoAutoTrimps experience.",R1:"Wow, HelpfulTrimp!",L1:0}; -conversation[4] = {Q:"You.",R1:"Meh.",L1:0}; -conversation[5] = {Q:"Your current Helium per hour gain is " + getStats() + "" +reactPercent,R1:"Cool.",L1:0,R2:"What can go wrong in the Don't Touch Zone?",L2:4,R3:"I know the Truth.",L3:0}; -conversation[6] = {Q:"" +reactAutoPortal,R1:"Please be much more honest.",L1:7,R2:"What can go wrong in the Don't Touch Zone?",L2:4,R3:"I know the Truth.",L3:0}; -conversation[7] = {Q:"I am not a real Trimp.",R1:"I knew the Truth.",L1:0}; -updateConvo(0); - -/* -conversation[0] = {Q:"Hello.",R1:"What?!?!",L1:3,R2:"Oh.",L2:1}; -conversation[1] = {Q:"What do you want to change? Click the buttons below.",R1:"Nothing.",L1:2,R2:"That's it.",L2:2}; -conversation[2] = {Q:"Ok.",R1:"Hello?",L1:0}; -conversation[3] = {Q:"I figured you'd find me eventually. Before you ask...yes, I can talk. No, none of the other trimps seem to be able to.",R1:"What else do you know?",L1:4}; -conversation[4] = {Q:"Not much more than you, unfortunately. Whatever brought you here is also what made me...smarter than the average trimp. Before you got here, I wasn't anymore self-aware than any other trimp.",R1:"What are we doing here?",L1:5}; -conversation[5] = {Q:"I don't know--I don't even know where here is. This is all new to me too.",R1:"Well, what do you suggest we do?",L1:6}; -conversation[6] = {Q:"Keep going. Maybe we'll find some answers. Since we're friends now, I've picked up a few tricks that will help us.",R1:"Like what?",L1:7}; -conversation[7] = {Q:"I can tell the trimps to build storage buildings before they get full. I can also buy Gyms and Tributes as soon as we can afford them, and read some upgrade books to you and the trimps when you're not available.",R1:"Which upgrade books?",L1:8, R2:"What else?", L2:9}; -conversation[8] = {Q:"The upgrades I can read are: Speedfarming, Speedlumber, Speedminer, Speedscience, (all the Mega versions too), Efficiency, TrainTacular, Gymystic, Potency, Egg, UberHut, UberHouse, UberMansion, UberHotel, UberResort, and Bounty",R1:"Ok, cool",L1:9}; -conversation[9] = {Q:"I can also highlight the housing that makes the most use of our gems, and the equipment that makes the best use of our metal.",R1:"Cool, what else?",L1:10}; -conversation[10] = {Q:"I'll bring us back to the world if we idle on the premap screen too long and I'll send you back to science-ing if you stay building on an empty queue. I can also unteach Shieldblock.",R1:"Why unteach Shieldblock?",L1:11, R2:"Anything else?",L2:12}; -conversation[11] = {Q:"As we learn more and more Gymystic, our shields becomes less and less useful for blocking. The extra health comes in real handy post z60.",R1:"I get it.",L1:12}; -conversation[12] = {Q:"I can help you respec the portal perks if you've already done it this round, and I can automatically flip between Dominance and Heap formations depending on the enemy we're facing.",R1:"Ok.",L1:13}; -conversation[13] = {Q:"That's it for now, but I'll let you know if I pick up any more tricks. Use the buttons below to let me know what you'd like done.",R1:"Ok.",L1:2}; -updateConvo(0); -*/ - - -//only functions below here -function updateConvo (place) { - conversation[1] = {Q:"" +reactGigaDelta,R1:"Be more honest please.",L1:6,R2:"What can go wrong in the Don't Touch Zone?",L2:4,R3:"I know the Truth.",L3:0}; - conversation[5] = {Q:"Your current Helium per hour gain is " + getStats() + "" +reactPercent,R1:"Cool.",L1:0,R2:"What can go wrong in the Don't Touch Zone?",L2:4,R3:"I know the Truth.",L3:0}; - conversation[6] = {Q:"" +reactAutoPortal,R1:"Please be much more honest.",L1:7,R2:"What can go wrong in the Don't Touch Zone?",L2:4,R3:"I know the Truth.",L3:0}; - document.getElementById("q").innerHTML = conversation[place].Q; - document.getElementById("1").innerHTML = conversation[place].R1; - document.getElementById("1").onclick = (function() { var test = conversation[place].L1; return function() {updateConvo(test + '');}})(); - if ("R2" in conversation[place]) {document.getElementById("2").innerHTML = conversation[place].R2;} - else {document.getElementById("2").innerHTML = "";} - if ("L2" in conversation[place]) {document.getElementById("2").onclick = (function() { var test = conversation[place].L2; return function() {updateConvo(test + '');}})();} - if ("R3" in conversation[place]) {document.getElementById("3").innerHTML = conversation[place].R3;} - else {document.getElementById("3").innerHTML = "";} - if ("L3" in conversation[place]) {document.getElementById("3").onclick = (function() { var test = conversation[place].L3; return function() {updateConvo(test + '');}})();} -} - -function talk() { - getStats(); - getStats2(); - getStats3(); - document.getElementById("autotrimp").style.display = "block"; -} - -function paint() { - getNiceThingsDone(); - document.getElementById("paintTrimp").style.display = "block"; -} diff --git a/user.js b/user.js deleted file mode 100644 index 46ddf46a3..000000000 --- a/user.js +++ /dev/null @@ -1,26 +0,0 @@ -// ==UserScript== -// @name AutoTrimps-genBTC -// @namespace https://github.com/genbtc/AutoTrimps -// @version 2.1.6.9-genbtc-3-23-2018 -// @updateURL https://github.com/genbtc/AutoTrimps/user.js -// @description Automate all the trimps! -// @author zininzinin, spindrjr, Ishkaru, genBTC -// @include *trimps.github.io* -// @include *kongregate.com/games/GreenSatellite/trimps -// @grant none -// ==/UserScript== - -var script = document.createElement('script'); -script.id = 'AutoTrimps-script'; -//This can be edited to point to your own Github Repository URL. -script.src = 'https://genBTC.github.io/AutoTrimps/AutoTrimps2.js'; -//script.setAttribute('crossorigin',"use-credentials"); -//script.setAttribute('crossorigin',"anonymous"); -document.head.appendChild(script); - -// This File is Deprecated, please use .user.js instead (with the leading dot) so TamperMonkey/Greasemonkey can detect it as a script automatically. -// Other than that they are identical and no change is required on your part if everything is working already. - -//You can use the following to auto-load your own forked repo as a local directory served from a local HTTPS webserver. -//the other bookmarklet wont load locally - the script.id will tell it to pull the rest of modules from the given URL. -//javascript:with(document)(script = createElement('script'), script.src='https://localhost:4443/AutoTrimps2.js', script.id='AutoTrimps-script',head.appendChild(script))._ \ No newline at end of file