From 4ec33c65d25e09f34f19a1ad1b55f345bf84dbdf Mon Sep 17 00:00:00 2001 From: maurezen Date: Fri, 9 Nov 2018 17:03:09 +0300 Subject: [PATCH 001/194] Max Tox not disabled mid run anymore Fix for https://github.com/genbtc/AutoTrimps/issues/178 --- modules/portal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/portal.js b/modules/portal.js index dfa883f8d..1866eb597 100644 --- a/modules/portal.js +++ b/modules/portal.js @@ -87,7 +87,7 @@ function autoPortal() { case "Crushed": case "Nom": case "Toxicity": - if (getPageSetting('MaxTox')) + if (!game.global.challengeActive && getPageSetting('MaxTox')) settingChanged("MaxTox"); case "Watch": case "Lead": From ccaaa92e8b74dd159626e0dd01382a3da4cfc198 Mon Sep 17 00:00:00 2001 From: Eugene Bukhtin Date: Fri, 23 Nov 2018 11:48:55 +0300 Subject: [PATCH 002/194] fork readme update --- README.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d495e29df..7b84e57a5 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,10 @@ 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! +changes by maurezen: +- Fixed max-tox stacks setting being dropped mid-run, not only on portal + +## FORK POINT from genbtc/Autotrimps - 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 - 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. @@ -43,10 +46,10 @@ took a break ***Option 1***: 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/maurezen/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/maurezen/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 @@ -61,7 +64,7 @@ FireFox/GreaseMonkey instructions: ***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')._ +javascript:with(document)(head.appendChild(createElement('script')).src='https://maurezen.github.io/AutoTrimps/AutoTrimps2.js')._ ``` - This bookmark button has to be clicked manually after you go to https://trimps.github.io From bd167da793e503fb836c8c9a88d1eb695d108902 Mon Sep 17 00:00:00 2001 From: Eugene Bukhtin Date: Fri, 23 Nov 2018 15:17:16 +0300 Subject: [PATCH 003/194] fork user.js update --- user.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/user.js b/user.js index 46ddf46a3..6113e2c0b 100644 --- a/user.js +++ b/user.js @@ -1,10 +1,10 @@ // ==UserScript== // @name AutoTrimps-genBTC -// @namespace https://github.com/genbtc/AutoTrimps +// @namespace https://github.com/maurezen/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 +// @author zininzinin, spindrjr, Ishkaru, genBTC, maurezen // @include *trimps.github.io* // @include *kongregate.com/games/GreenSatellite/trimps // @grant none @@ -13,7 +13,7 @@ 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.src = 'https://maurezen.github.io/AutoTrimps/AutoTrimps2.js'; //script.setAttribute('crossorigin',"use-credentials"); //script.setAttribute('crossorigin',"anonymous"); document.head.appendChild(script); From 4d376204c8d61cb726dc91b43f689107f6852806 Mon Sep 17 00:00:00 2001 From: Eugene Bukhtin Date: Fri, 23 Nov 2018 15:37:34 +0300 Subject: [PATCH 004/194] 3 - lead hd ratio --- modules/battlecalc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/battlecalc.js b/modules/battlecalc.js index c365db94c..6a6f1544a 100644 --- a/modules/battlecalc.js +++ b/modules/battlecalc.js @@ -360,7 +360,7 @@ function calcBadGuyDmg(enemy,attack,daily,maxormin,disableFlucts) { number *= 1.25; } else if (game.global.challengeActive == "Lead"){ - number *= (1 + (game.challenges.Lead.stacks * 0.04)); + number *= (1 + (150 * 1.04));//going to be extra careful here and calculate vs 150 Lead stacks. } else if (game.global.challengeActive == "Scientist" && getScientistLevel() == 5) { number *= 10; From 698f211a3d7ac701a1a9bf26391abf2916d9eb8e Mon Sep 17 00:00:00 2001 From: Eugene Bukhtin Date: Fri, 23 Nov 2018 16:40:08 +0300 Subject: [PATCH 005/194] 3 - lead hd ratio --- modules/maps.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/maps.js b/modules/maps.js index 92c50b197..e6bc10489 100644 --- a/modules/maps.js +++ b/modules/maps.js @@ -178,10 +178,10 @@ function autoMap() { if (AutoStance <= 1) { enemyDamage = getEnemyMaxAttack(game.global.world + 1, 99, 'Snimp', 1.2); enemyDamage = calcDailyAttackMod(enemyDamage); //daily mods: badStrength,badMapStrength,bloodthirst + enemyDamage *= (1 + (100 * 0.04));//we already take lead into account in calcBadGuyDmg } else { enemyDamage = calcBadGuyDmg(null, getEnemyMaxAttack(game.global.world + 1, 99, 'Snimp', 1.0), true, true); //(enemy,attack,daily,maxormin,[disableFlucts]) } - enemyDamage *= (1 + (100 * 0.04)); ourBaseDamage /= 1.5; //subtract the odd-zone bonus. } if (game.global.world == 179) { From fa7c09773a6a4a28ae206e9792d771ad83382ae1 Mon Sep 17 00:00:00 2001 From: Eugene Bukhtin Date: Fri, 23 Nov 2018 17:19:47 +0300 Subject: [PATCH 006/194] 3 - lead hd ratio --- modules/maps.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/maps.js b/modules/maps.js index e6bc10489..86070b61a 100644 --- a/modules/maps.js +++ b/modules/maps.js @@ -169,9 +169,11 @@ function autoMap() { //Lead specific farming calcuation section: 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)); + } + //The idea is to check vs a large momentum count, not vs the current one which is low-ish at the end of odd zone when farming usually occurs + enemyHealth *= (1 + (150 * 0.04));//we have calcBadGuy to do this to to damage. //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) From 3493264a9f06b50ceff36069abb982f5d84122b4 Mon Sep 17 00:00:00 2001 From: Eugene Bukhtin Date: Sat, 24 Nov 2018 11:33:06 +0300 Subject: [PATCH 007/194] 3 - lead hd ratio --- modules/maps.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/maps.js b/modules/maps.js index 86070b61a..7a60d0b32 100644 --- a/modules/maps.js +++ b/modules/maps.js @@ -173,7 +173,7 @@ function autoMap() { enemyDamage *= (1 + (game.challenges.Lead.stacks * 0.04)); } //The idea is to check vs a large momentum count, not vs the current one which is low-ish at the end of odd zone when farming usually occurs - enemyHealth *= (1 + (150 * 0.04));//we have calcBadGuy to do this to to damage. + enemyHealth *= (1 + (250 * 0.04));//we have calcBadGuy to do this to to damage. Note the different multipliers. //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) From c2077c336e3a4d66582773fe7977ea9bd1da22f9 Mon Sep 17 00:00:00 2001 From: Eugene Bukhtin Date: Mon, 26 Nov 2018 12:09:21 +0300 Subject: [PATCH 008/194] 1 - Scrying stance should take heed of remaining enemies (this check is performed after overkill, so overkill still gets scrying no matter what) --- modules/scryer.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/scryer.js b/modules/scryer.js index c7a71e5db..e41ce0c29 100644 --- a/modules/scryer.js +++ b/modules/scryer.js @@ -56,6 +56,9 @@ function useScryerStance() { } //Any of these being true will indicate scryer should not be used, and cause the function to dump back to regular autoStance(): + var remainingEssence = countRemainingEssenceDrops(); + //check for no more dark matter + use_auto = use_auto || (remainingEssence == 0); //check for spire use_auto = use_auto || !game.global.mapsActive && isActiveSpireAT() && getPageSetting('ScryerUseinSpire2')!=1; //check for voids From 4937336a65ad6958e342932f6c630adc834d7060 Mon Sep 17 00:00:00 2001 From: Eugene Bukhtin Date: Mon, 26 Nov 2018 14:55:19 +0300 Subject: [PATCH 009/194] #4 Corrupted cells are underfarmed for - account for the worst case, not the average --- modules/maps.js | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/modules/maps.js b/modules/maps.js index 7a60d0b32..ae697f5be 100644 --- a/modules/maps.js +++ b/modules/maps.js @@ -146,18 +146,15 @@ function autoMap() { enemyHealth *= 2; } //Corruption Zone Proportionality Farming Calculator: - var corrupt = game.global.world >= mutations.Corruption.start(true); + var corrupt = game.global.world >= mutations.Corruption.start(false); if (getPageSetting('CorruptionCalc') && corrupt) { - var cptnum = getCorruptedCellsNum(); //count corrupted cells + //plain scale, without the averages, because we don't really want to have big corruption spikes + //wouldn't be that good to overkill normal cells and die to 1 corrupted hit + //a little bit of farming should help smoothen this issue 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 - enemyHealth *= hlthprop; + enemyHealth *= hlthprop; 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; + 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.) From e75498b6be4edfe9730bd113944a326c9acabedb Mon Sep 17 00:00:00 2001 From: Eugene Bukhtin Date: Mon, 26 Nov 2018 15:00:41 +0300 Subject: [PATCH 010/194] #4 Corrupted cells are underfarmed for - minor stupid fix --- modules/maps.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/maps.js b/modules/maps.js index ae697f5be..de0015459 100644 --- a/modules/maps.js +++ b/modules/maps.js @@ -151,10 +151,8 @@ function autoMap() { //plain scale, without the averages, because we don't really want to have big corruption spikes //wouldn't be that good to overkill normal cells and die to 1 corrupted hit //a little bit of farming should help smoothen this issue - var cpthlth = getCorruptScale("health"); //get corrupted health mod - enemyHealth *= hlthprop; - var cptatk = getCorruptScale("attack"); //get corrupted attack mod - enemyDamage *= atkprop; + enemyHealth *= getCorruptScale("health"); + enemyDamage *= getCorruptScale("attack"); //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.) From 70d71c7304ba64a40491a423ef2b3cda4bf083b6 Mon Sep 17 00:00:00 2001 From: Eugene Bukhtin Date: Tue, 27 Nov 2018 10:38:20 +0300 Subject: [PATCH 011/194] #2 map generator should try perfect maps - backing off via loot instead of size --- modules/maps.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/maps.js b/modules/maps.js index de0015459..c5ab11fa8 100644 --- a/modules/maps.js +++ b/modules/maps.js @@ -693,7 +693,8 @@ function autoMap() { //set up various priorities for various situations if (updateMapCost(true) > game.resources.fragments.owned) { if (needPrestige && !enoughDamage) decrement.push('diff'); - if (shouldFarm) decrement.push('size'); + //size is bad for caches, and in corruption, where this is a problem, maps don't pose a challenge anyway + if (shouldFarm) decrement.push('loot'); } //Decrement 1 - use priorities first: @@ -727,7 +728,7 @@ function autoMap() { sizeAdvMapsRange.value -= 1; } - //run the Advanced Special Modifier script, bring + //run the Advanced Special Modifier script, bring//@todo consider bringing this higher in the loop for #2 if (getPageSetting('AdvMapSpecialModifier')) testMapSpecialModController(); From af7d053981a09fe12b84f79844a42f65f6a44d61 Mon Sep 17 00:00:00 2001 From: Eugene Bukhtin Date: Tue, 27 Nov 2018 10:57:10 +0300 Subject: [PATCH 012/194] #4 - corrupted cells are underfarmed for - moved farming point a bit later in the zone to definitely have all the books while farming --- modules/maps.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/maps.js b/modules/maps.js index c5ab11fa8..7e888fb2a 100644 --- a/modules/maps.js +++ b/modules/maps.js @@ -22,7 +22,7 @@ MODULES["maps"].maxMapBonus = 10; //cap how many maps are run during Want 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"].shouldFarmCell = 81; 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 From 18dbcd4eb68958934052f70073bcd7dc715700d7 Mon Sep 17 00:00:00 2001 From: Eugene Bukhtin Date: Tue, 27 Nov 2018 23:52:30 +0300 Subject: [PATCH 013/194] #6 h/d ratio doesn't know about coordinated --- modules/maps.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/maps.js b/modules/maps.js index 7e888fb2a..ec464c22a 100644 --- a/modules/maps.js +++ b/modules/maps.js @@ -142,9 +142,15 @@ function autoMap() { 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") { + if (game.global.challengeActive == "Toxicity") { enemyHealth *= 2; } + //yep, nobody taken care of that yet TODO a stick pending #7 + if (game.global.challengeActive == "Coordinate") { + var badCoord = getBadCoordLevel(); + enemyHealth *= badCoord; + enemyDamage *= badCoord; + } //Corruption Zone Proportionality Farming Calculator: var corrupt = game.global.world >= mutations.Corruption.start(false); if (getPageSetting('CorruptionCalc') && corrupt) { From 88255782d7add3d493c666298bf6d8d02c29b3d0 Mon Sep 17 00:00:00 2001 From: Eugene Bukhtin Date: Wed, 28 Nov 2018 12:21:54 +0300 Subject: [PATCH 014/194] #9 - AutoBreedTimer not aware of Trapper --- modules/breedtimer.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/breedtimer.js b/modules/breedtimer.js index 740500fdd..8d35e89b7 100644 --- a/modules/breedtimer.js +++ b/modules/breedtimer.js @@ -101,6 +101,10 @@ function autoBreedTimer() { //Don't hire geneticists if we have already reached 30 anti stacks (put off further delay to next trimp group) //&& (game.global.lastBreedTime/1000 + getBreedTime(true) < targetBreed) var time = getBreedTime(); var timeLeft = getBreedTime(true); + //TODO inline in getBreedTime? + if (game.global.challengeActive == "Trapper") { + timeLeft = 0; + } var boughtGenRound1 = false; if ((newSquadRdy || (game.global.lastBreedTime/1000 + timeLeft < targetBreed)) && targetBreed > time && !game.jobs.Geneticist.locked && targetBreed > timeLeft && game.resources.trimps.soldiers > 0 && !breedFire) { //Buy geneticists in Increments of 1 for now: @@ -120,6 +124,9 @@ function autoBreedTimer() { //FIRING SECTION: var time = getBreedTime(); var timeLeft = getBreedTime(true); + if (game.global.challengeActive == "Trapper") { + timeLeft = 0; + } var fire1 = targetBreed*1.02 < time; var fire2 = targetBreed*1.02 < timeLeft; var fireobj = fire1 ? time : timeLeft; From a7b4baa33e66881467dc8c90699ba246b5bbfb77 Mon Sep 17 00:00:00 2001 From: Eugene Bukhtin Date: Thu, 29 Nov 2018 20:03:50 +0300 Subject: [PATCH 015/194] #10 - genetoicists cycle fire Thanks to rounding errors and buy/fire increments being a multiple of each other, we got in a cycle Reduced buy/fire increments to 1 --- modules/breedtimer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/breedtimer.js b/modules/breedtimer.js index 8d35e89b7..f1b95f583 100644 --- a/modules/breedtimer.js +++ b/modules/breedtimer.js @@ -1,7 +1,7 @@ MODULES["breedtimer"] = {}; //These can be changed (in the console) if you know what you're doing: -MODULES["breedtimer"].buyGensIncrement = 5; //Buy this many geneticists at a time -MODULES["breedtimer"].fireGensIncrement = 10; //Fire this many geneticists at a time +MODULES["breedtimer"].buyGensIncrement = 1; //Buy this many geneticists at a time +MODULES["breedtimer"].fireGensIncrement = 1; //Fire this many geneticists at a time MODULES["breedtimer"].fireGensFloor = 10; //Dont FIRE below this number (nothing to do with hiring up to it)(maybe is disregarded?) MODULES["breedtimer"].breedFireOn = 6; //turn breedfire on at X seconds (if BreedFire) MODULES["breedtimer"].breedFireOff = 2; //turn breedfire off at X seconds(if BreedFire) From 762161655482c16e4767208e9e3868e70ad42832 Mon Sep 17 00:00:00 2001 From: Eugene Bukhtin Date: Mon, 3 Dec 2018 19:19:36 +0300 Subject: [PATCH 016/194] #1 - Scrying stance should take heed of remaining enemies (only perform the check in world) --- modules/scryer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/scryer.js b/modules/scryer.js index e41ce0c29..ef9bac889 100644 --- a/modules/scryer.js +++ b/modules/scryer.js @@ -57,8 +57,8 @@ function useScryerStance() { //Any of these being true will indicate scryer should not be used, and cause the function to dump back to regular autoStance(): var remainingEssence = countRemainingEssenceDrops(); - //check for no more dark matter - use_auto = use_auto || (remainingEssence == 0); + //check for no more dark matter if in world + use_auto = use_auto || (remainingEssence == 0 && !game.global.mapsActive); //check for spire use_auto = use_auto || !game.global.mapsActive && isActiveSpireAT() && getPageSetting('ScryerUseinSpire2')!=1; //check for voids From 54f6cadd5b4fad02f28107055c7b2302f3696c75 Mon Sep 17 00:00:00 2001 From: Eugene Bukhtin Date: Fri, 7 Dec 2018 11:51:23 +0300 Subject: [PATCH 017/194] #15 - Don't use S on corrupteds should be separate from magma --- SettingsGUI.js | 2 +- modules/scryer.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/SettingsGUI.js b/SettingsGUI.js index 8b88d2df2..85558f817 100644 --- a/SettingsGUI.js +++ b/SettingsGUI.js @@ -396,7 +396,7 @@ function initializeAllSettings() { 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'); //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('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. Corrupted Voidmaps are classified under this box as corrupted, but magma maps do not. 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'] diff --git a/modules/scryer.js b/modules/scryer.js index ef9bac889..d9d8ec103 100644 --- a/modules/scryer.js +++ b/modules/scryer.js @@ -77,7 +77,8 @@ function useScryerStance() { //check for corrupted cells (and exit) var iscorrupt = getCurrentEnemy(1).mutation == "Corruption"; - iscorrupt = iscorrupt || (mutations.Magma.active() && game.global.mapsActive); + //#15 says we'd like to keep S in magma if possible +// 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(); From 41f43fbaa2ce8a9a964ed9a5d70d7c841f48a7d9 Mon Sep 17 00:00:00 2001 From: Eugene Bukhtin Date: Wed, 12 Dec 2018 16:31:16 +0300 Subject: [PATCH 018/194] #18 h/d ratio seems to fluctuate - disabled Ice in h/d ratio calculation --- modules/battlecalc.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/battlecalc.js b/modules/battlecalc.js index 6a6f1544a..a02ef40ef 100644 --- a/modules/battlecalc.js +++ b/modules/battlecalc.js @@ -287,7 +287,8 @@ function calcOurDmg(number,maxormin,disableStances,disableFlucts) { //number = b if (Fluffy.isActive()){ number *= Fluffy.getDamageModifier(); } - number *= (1 + (1 - game.empowerments.Ice.getCombatModifier())); + //#18 - disable Ice in h/d ratio calculations +// number *= (1 + (1 - game.empowerments.Ice.getCombatModifier())); if (game.global.challengeActive == "Daily"){ if (typeof game.global.dailyChallenge.minDamage !== 'undefined'){ From 06945e922827165cf3a489ad63902dfdcb13521d Mon Sep 17 00:00:00 2001 From: Eugene Bukhtin Date: Thu, 20 Dec 2018 16:47:22 +0300 Subject: [PATCH 019/194] #19 Add domination challenge to autoportal settings --- SettingsGUI.js | 4 ++-- modules/portal.js | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/SettingsGUI.js b/SettingsGUI.js index 85558f817..c0b75e2e8 100644 --- a/SettingsGUI.js +++ b/SettingsGUI.js @@ -257,9 +257,9 @@ function initializeAllSettings() { 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"); + 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', 'Domination', 'Custom'], "Core"); //document.getElementById("AutoPortal").style="font-size: 1.0vw;"; //fit it on 1 line. - 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"); + 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', 'Domination'], "Core"); //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"); diff --git a/modules/portal.js b/modules/portal.js index 1866eb597..fbce8d58b 100644 --- a/modules/portal.js +++ b/modules/portal.js @@ -92,6 +92,7 @@ function autoPortal() { case "Watch": case "Lead": case "Corrupted": + case "Domination": if(!game.global.challengeActive) { doPortal(autoTrimpSettings.AutoPortal.selected); } @@ -172,7 +173,8 @@ function findOutCurrentPortalLevel() { "Toxicity" : 166, "Lead" : 181, "Watch" : 181, - "Corrupted" : 191 + "Corrupted" : 191, + "Domination" : 216 }; var AP = getPageSetting("AutoPortal"); switch (AP) { From c44fd681ef116ac0e84c9fb7c96c5782dce9c881 Mon Sep 17 00:00:00 2001 From: Eugene Bukhtin Date: Thu, 20 Dec 2018 22:54:53 +0300 Subject: [PATCH 020/194] #10 - geneticists cycle fire - dropped firing due to timer left --- modules/breedtimer.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/breedtimer.js b/modules/breedtimer.js index f1b95f583..63a778191 100644 --- a/modules/breedtimer.js +++ b/modules/breedtimer.js @@ -128,7 +128,6 @@ function autoBreedTimer() { timeLeft = 0; } var fire1 = targetBreed*1.02 < time; - var fire2 = targetBreed*1.02 < timeLeft; 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 @@ -137,7 +136,7 @@ function autoBreedTimer() { } //otherwise, if we have too many geneticists, (total time) - start firing them #1 //otherwise, if we have too many geneticists, (remaining time) - start firing them #2 - else if (!boughtGenRound1 && (fire1 || fire2) && !game.jobs.Geneticist.locked && game.jobs.Geneticist.owned > customVars.fireGensFloor) { + else if (!boughtGenRound1 && fire1 && !game.jobs.Geneticist.locked && game.jobs.Geneticist.owned > customVars.fireGensFloor) { //var timeGap = (time + timeLeft) > targetBreed ? targetBreed : targetBreed - (time + timeLeft); var timeOK = fireobj > 0 ? fireobj : 0.1; var numgens = Math.ceil(Math.log10(targetBreed / timeOK) / Math.log10(1.02)); From c0523b5ee246def0fed325f6c6e75e836de96fde Mon Sep 17 00:00:00 2001 From: Eugene Bukhtin Date: Fri, 21 Dec 2018 17:08:05 +0300 Subject: [PATCH 021/194] #1 - Scrying stance should take heed of remaining enemies --- modules/scryer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/scryer.js b/modules/scryer.js index d9d8ec103..1cf8b8e41 100644 --- a/modules/scryer.js +++ b/modules/scryer.js @@ -63,8 +63,8 @@ function useScryerStance() { 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 maps that are NOT void maps + use_auto = use_auto || game.global.mapsActive && !(getCurrentMapObject().location == "Void") && !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) From 25afe9cc91d2ff29961129a22b3bb9ea86194b5b Mon Sep 17 00:00:00 2001 From: Eugene Bukhtin Date: Fri, 21 Dec 2018 17:10:45 +0300 Subject: [PATCH 022/194] #10 - geneticists cycle fire - rolled back firing due to timer left, but increased threshold to 200% (was 102%) --- modules/breedtimer.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/breedtimer.js b/modules/breedtimer.js index 63a778191..a41fab379 100644 --- a/modules/breedtimer.js +++ b/modules/breedtimer.js @@ -128,6 +128,8 @@ function autoBreedTimer() { timeLeft = 0; } var fire1 = targetBreed*1.02 < time; + //#10 - can't really get rid of time left fire until we have simulacrum. what about getting a more reasonable threshold? + var fire2 = targetBreed*2 < timeLeft; 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 @@ -136,7 +138,7 @@ function autoBreedTimer() { } //otherwise, if we have too many geneticists, (total time) - start firing them #1 //otherwise, if we have too many geneticists, (remaining time) - start firing them #2 - else if (!boughtGenRound1 && fire1 && !game.jobs.Geneticist.locked && game.jobs.Geneticist.owned > customVars.fireGensFloor) { + else if (!boughtGenRound1 && (fire1 || fire2) && !game.jobs.Geneticist.locked && game.jobs.Geneticist.owned > customVars.fireGensFloor) { //var timeGap = (time + timeLeft) > targetBreed ? targetBreed : targetBreed - (time + timeLeft); var timeOK = fireobj > 0 ? fireobj : 0.1; var numgens = Math.ceil(Math.log10(targetBreed / timeOK) / Math.log10(1.02)); From 1a1c556524bb214e93b51972026c56e71736fc85 Mon Sep 17 00:00:00 2001 From: Eugene Bukhtin Date: Wed, 26 Dec 2018 20:17:58 +0300 Subject: [PATCH 023/194] #25 Autostance2 doesn't know about Ice --- modules/stance.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/stance.js b/modules/stance.js index b157ad7e8..812c85f05 100644 --- a/modules/stance.js +++ b/modules/stance.js @@ -294,6 +294,11 @@ function autoStance2() { enemyDamage *= 2; if (enemy.corrupted == 'corruptTough') enemyHealth *= 5; + //Ice + var iceFactor = game.empowerments.Ice.getCombatModifier(); + if (iceFactor && iceFactor < 1) { + enemyDamage *= iceFactor; + } //calc X,D,B: var xDamage = (enemyDamage - baseBlock); From 34fc85471728fb0d81ad7b6b5aef838faa547f9d Mon Sep 17 00:00:00 2001 From: Eugene Bukhtin Date: Thu, 27 Dec 2018 15:39:18 +0300 Subject: [PATCH 024/194] #17 Pre-spire farming ignores equip caps - no equipment wall in Spire --- modules/equipment.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/equipment.js b/modules/equipment.js index 1df61fea1..de862015f 100644 --- a/modules/equipment.js +++ b/modules/equipment.js @@ -197,7 +197,7 @@ function evaluateEquipmentEfficiency(equipName) { var isLiquified = (game.options.menu.liquification.enabled && game.talents.liquification.purchased && !game.global.mapsActive && game.global.gridArray && game.global.gridArray[0] && game.global.gridArray[0].name == "Liquimp"); //Run a quick Time estimate and if we complete it in 25 seconds or less, use 1/10th of our cap just so we can continue (MODULES["equipment"].capDivisor=10;) var time = mapTimeEstimater(); - var isQuick = (time!=0) && (time < 25000); + var isQuick = (time!=0) && (time < 25000) && (!isActiveSpireAT());; var cap = getPageSetting('CapEquip2'); if ((isLiquified || isQuick) && cap > 0 && gameResource.level >= (cap / MODULES["equipment"].capDivisor)) { Factor = 0; From 4b84e9bad2515f0bb5556a2e6355ca10e5b8d49d Mon Sep 17 00:00:00 2001 From: Eugene Bukhtin Date: Fri, 28 Dec 2018 19:34:01 +0300 Subject: [PATCH 025/194] #29 h/d ratio doesn't know about obliterated - added eradicated as well --- modules/battlecalc.js | 12 ++++++++++++ modules/maps.js | 16 ++++++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/modules/battlecalc.js b/modules/battlecalc.js index a02ef40ef..1ac210134 100644 --- a/modules/battlecalc.js +++ b/modules/battlecalc.js @@ -333,6 +333,17 @@ function calcOurDmg(number,maxormin,disableStances,disableFlucts) { //number = b return number; } +//A method to calculated enemy hp and atk factors for Obliterated and Eradicated challenges +//If neither challenge is active, returns 1 +function calcObliteratedEradicatedFactor() { + var obliteratedFactor = + (game.global.challengeActive == "Eradicated") + ? game.challenges.Eradicated.scaleModifier + : ((game.global.challengeActive == "Obliterated") ? 1e12 : 1); + var zoneModifier = Math.floor(game.global.world / game.challenges[game.global.challengeActive].zoneScaleFreq); + obliteratedFactor *= Math.pow(game.challenges[game.global.challengeActive].zoneScaling, zoneModifier); + return obliteratedFactor; +} function calcBadGuyDmg(enemy,attack,daily,maxormin,disableFlucts) { var number; @@ -348,6 +359,7 @@ function calcBadGuyDmg(enemy,attack,daily,maxormin,disableFlucts) { //Situational bad guy damage increases if (game.global.challengeActive){ //Challenge bonuses here + number *= calcObliteratedEradicatedFactor(); if (game.global.challengeActive == "Coordinate"){ number *= getBadCoordLevel(); } diff --git a/modules/maps.js b/modules/maps.js index ec464c22a..6e889c1ed 100644 --- a/modules/maps.js +++ b/modules/maps.js @@ -147,10 +147,22 @@ function autoMap() { } //yep, nobody taken care of that yet TODO a stick pending #7 if (game.global.challengeActive == "Coordinate") { - var badCoord = getBadCoordLevel(); - enemyHealth *= badCoord; + var badCoord = getBadCoordLevel(); + enemyHealth *= badCoord; + //otherwise it's covered in calcBadGuyDmg already + if (AutoStance<=1) { enemyDamage *= badCoord; + } + } + if (game.global.challengeActive == "Obliterated" || game.global.challengeActive == "Eradicated") { + obliteratedFactor = calcObliteratedEradicatedFactor(); + enemyHealth *= obliteratedFactor; + //otherwise it's covered in calcBadGuyDmg already + if (AutoStance<=1) { + enemyDamage *= obliteratedFactor; + } } + //Corruption Zone Proportionality Farming Calculator: var corrupt = game.global.world >= mutations.Corruption.start(false); if (getPageSetting('CorruptionCalc') && corrupt) { From 75b233e365eb579d93324030219f80cab2188ea3 Mon Sep 17 00:00:00 2001 From: Eugene Bukhtin Date: Sat, 29 Dec 2018 15:30:28 +0300 Subject: [PATCH 026/194] #30 - Breed timer can't into amalgamator --- modules/query.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/query.js b/modules/query.js index fa209216a..5bad39abb 100644 --- a/modules/query.js +++ b/modules/query.js @@ -218,6 +218,9 @@ function getBreedTime(remaining,howManyMoreGenes) { return parseFloat(timeRemaining.toFixed(1)); var adjustedMax = (game.portal.Coordinated.level) ? game.portal.Coordinated.currentSend : trimps.maxSoldiers; + if (game.jobs.Amalgamator.owned > 0) { + adjustedMax *= game.jobs.Amalgamator.getPopulationMult(); + } var totalTime = log10((trimpsMax - trimps.employed) / (trimpsMax - adjustedMax - trimps.employed)) / log10(potencyMod); totalTime /= 10; From 526fcc015c8f6aa5e8243c1073142ed6511b8485 Mon Sep 17 00:00:00 2001 From: Eugene Bukhtin Date: Sun, 30 Dec 2018 10:32:01 +0300 Subject: [PATCH 027/194] #31 - Autotimer for dailies --- modules/breedtimer.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/modules/breedtimer.js b/modules/breedtimer.js index a41fab379..a9edee95b 100644 --- a/modules/breedtimer.js +++ b/modules/breedtimer.js @@ -76,18 +76,21 @@ function autoBreedTimer() { var manageBreedTimer = getPageSetting('ManageBreedtimer'); if (manageBreedTimer) { if(game.portal.Anticipation.level == 0) newGeneTimerSetting = 0; - else if(game.global.challengeActive == 'Electricity' || game.global.challengeActive == 'Mapocalypse') newGeneTimerSetting = 3.5; - else if(game.global.challengeActive == 'Nom' || game.global.challengeActive == 'Toxicity') { + else if(game.global.challengeActive == 'Electricity' + || game.global.challengeActive == 'Mapocalypse' + || (typeof game.global.dailyChallenge.plague !== 'undefined')) { + newGeneTimerSetting = 3.5; + } else if(game.global.challengeActive == 'Nom' || game.global.challengeActive == 'Toxicity') { if(getPageSetting('FarmWhenNomStacks7') && game.global.gridArray[99].nomStacks >= 5 && !game.global.mapsActive) //if Improbability already has 5 nomstacks, do 30 antistacks. newGeneTimerSetting = defaultBreedTimer; else newGeneTimerSetting = 10; - } - else if (getPageSetting('SpireBreedTimer') > -1 && isActiveSpireAT()) + } else if (getPageSetting('SpireBreedTimer') > -1 && isActiveSpireAT()) { newGeneTimerSetting = getPageSetting('SpireBreedTimer'); - else + } else { newGeneTimerSetting = defaultBreedTimer; + } if (newGeneTimerSetting != targetBreed) { setPageSetting('GeneticistTimer',newGeneTimerSetting); //controlGeneticistassist(newGeneTimerSetting); From 2032c4c27dc3a073b31e65f138fd4477d6339362 Mon Sep 17 00:00:00 2001 From: Eugene Bukhtin Date: Sun, 30 Dec 2018 16:44:15 +0300 Subject: [PATCH 028/194] #32 - autoequipment enemy dmg aware of coordinated/obliterated/corruption --- modules/equipment.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/modules/equipment.js b/modules/equipment.js index de862015f..d424bac01 100644 --- a/modules/equipment.js +++ b/modules/equipment.js @@ -268,6 +268,25 @@ function autoLevelEquipment() { enemyDamage = calcDailyAttackMod(enemyDamage); //daily mods: badStrength,badMapStrength,bloodthirst enemyHealth = getSpireStats(cell, "Snimp", "health"); } + //yep, nobody taken care of that yet TODO a stick pending #7 - remove this copypaste and have a single place to calc enemy stats + if (game.global.challengeActive == "Coordinate") { + var badCoord = getBadCoordLevel(); + enemyHealth *= badCoord; + enemyDamage *= badCoord; + } + if (game.global.challengeActive == "Obliterated" || game.global.challengeActive == "Eradicated") { + obliteratedFactor = calcObliteratedEradicatedFactor(); + enemyHealth *= obliteratedFactor; + enemyDamage *= obliteratedFactor; + } + var corrupt = game.global.world >= mutations.Corruption.start(false); + if (getPageSetting('CorruptionCalc') && corrupt) { + //plain scale, without the averages, because we don't really want to have big corruption spikes + //wouldn't be that good to overkill normal cells and die to 1 corrupted hit + //a little bit of farming should help smoothen this issue + enemyHealth *= getCorruptScale("health"); + enemyDamage *= getCorruptScale("attack"); + } //below challenge multiplier not necessarily accurate, just fudge factors if(game.global.challengeActive == "Toxicity") { From f5f1d7ef50c71c954ff216fa1812a4eb1e30a2c7 Mon Sep 17 00:00:00 2001 From: Eugene Bukhtin Date: Thu, 3 Jan 2019 11:43:39 +0300 Subject: [PATCH 029/194] #34 - Graphs should display prettified numbers --- Graphs.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Graphs.js b/Graphs.js index bd2314424..7ffaff7c6 100644 --- a/Graphs.js +++ b/Graphs.js @@ -1153,8 +1153,8 @@ function setGraphData(graph) { formatter = formatter || function () { var ser = this.series; return ' ' + - ser.name + ': ' + - Highcharts.numberFormat(this.y, precision,'.', ',') + valueSuffix + '
'; + ser.name + ' ' + + prettify(this.y) + valueSuffix + '
';//#34 - changed formatting to Trimps own prettification }; var additionalParams = {}; //Makes everything happen. From 5465babce5f1de80ebe20942a1ada9fcc01f15d1 Mon Sep 17 00:00:00 2001 From: Eugene Bukhtin Date: Thu, 3 Jan 2019 13:02:54 +0300 Subject: [PATCH 030/194] #35 - Add bones graph --- Graphs.js | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/Graphs.js b/Graphs.js index 7ffaff7c6..51d39d7e2 100644 --- a/Graphs.js +++ b/Graphs.js @@ -30,7 +30,7 @@ document.getElementById("graphParent").innerHTML += '
Date: Wed, 9 Jan 2019 22:49:02 +0300 Subject: [PATCH 031/194] #37 Add late-game auto ratios --- modules/jobs.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/jobs.js b/modules/jobs.js index 73cee637a..608161349 100644 --- a/modules/jobs.js +++ b/modules/jobs.js @@ -4,6 +4,8 @@ MODULES["jobs"].scientistRatio = 25; //ratio for scientists. (totalRatios MODULES["jobs"].scientistRatio2 = 10; //used for lowlevel and Watch challenge MODULES["jobs"].magmamancerRatio = 0.1; //buys 10% of your gem resources per go. //Worker Ratios = [Farmer,Lumber,Miner] +MODULES["jobs"].autoRatio8 = [1,1,100]; +MODULES["jobs"].autoRatio7 = [1,1,24]; MODULES["jobs"].autoRatio6 = [1,12,12]; MODULES["jobs"].autoRatio5 = [1,2,22]; MODULES["jobs"].autoRatio4 = [1,1,10]; @@ -279,6 +281,10 @@ function workerRatios() { var ratioSet; if (MODULES["jobs"].customRatio) { ratioSet = MODULES["jobs"].customRatio; + } else if (game.buildings.Tribute.owned > 6000 && mutations.Magma.active()) { + ratioSet = MODULES["jobs"].autoRatio8; + } else if (game.buildings.Tribute.owned > 4500 && mutations.Magma.active()) { + ratioSet = MODULES["jobs"].autoRatio7; } else if (game.buildings.Tribute.owned > 3000 && mutations.Magma.active()) { ratioSet = MODULES["jobs"].autoRatio6; } else if (game.buildings.Tribute.owned > 1500) { From ddc036b36a8a3757c410b7b3844998e9a730a38d Mon Sep 17 00:00:00 2001 From: Eugene Bukhtin Date: Thu, 10 Jan 2019 13:23:15 +0300 Subject: [PATCH 032/194] #29 - h/d ratio doesn't know about Obliterated - fixed some undefineds --- modules/battlecalc.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/modules/battlecalc.js b/modules/battlecalc.js index 1ac210134..18d5e6762 100644 --- a/modules/battlecalc.js +++ b/modules/battlecalc.js @@ -336,13 +336,17 @@ function calcOurDmg(number,maxormin,disableStances,disableFlucts) { //number = b //A method to calculated enemy hp and atk factors for Obliterated and Eradicated challenges //If neither challenge is active, returns 1 function calcObliteratedEradicatedFactor() { - var obliteratedFactor = - (game.global.challengeActive == "Eradicated") - ? game.challenges.Eradicated.scaleModifier - : ((game.global.challengeActive == "Obliterated") ? 1e12 : 1); - var zoneModifier = Math.floor(game.global.world / game.challenges[game.global.challengeActive].zoneScaleFreq); - obliteratedFactor *= Math.pow(game.challenges[game.global.challengeActive].zoneScaling, zoneModifier); - return obliteratedFactor; + if (game.global.challengeActive == "Eradicated" || game.global.challengeActive == "Obliterated") { + var obliteratedFactor = + (game.global.challengeActive == "Eradicated") + ? game.challenges.Eradicated.scaleModifier + : ((game.global.challengeActive == "Obliterated") ? 1e12 : 1); + var zoneModifier = Math.floor(game.global.world / game.challenges[game.global.challengeActive].zoneScaleFreq); + obliteratedFactor *= Math.pow(game.challenges[game.global.challengeActive].zoneScaling, zoneModifier); + return obliteratedFactor; + } else { + return 1; + } } function calcBadGuyDmg(enemy,attack,daily,maxormin,disableFlucts) { From 3d7166a765495f95076099e9b0321b475e3ef82a Mon Sep 17 00:00:00 2001 From: Eugene Bukhtin Date: Fri, 11 Jan 2019 14:31:33 +0300 Subject: [PATCH 033/194] #7 - Unify mob health/dmg calculations - temporary helper solution --- modules/stance.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/stance.js b/modules/stance.js index 812c85f05..fd121bcb8 100644 --- a/modules/stance.js +++ b/modules/stance.js @@ -251,7 +251,10 @@ function autoStance() { function autoStance2() { //get back to a baseline of no stance (X) - calcBaseDamageinX2(); + //calcBaseDamageinX2(); + //temporary stick to help with #7 + //stats in v2 are about x100 off + calcBaseDamageinX(); //no need to continue if (game.global.gridArray.length === 0) return true; if (game.global.soldierHealth <= 0) return; //dont calculate stances when dead, cause the "current" numbers are not updated when dead. From 5690e7a97d3ade998bc38d70bb039004ddc6e7d2 Mon Sep 17 00:00:00 2001 From: Eugene Bukhtin Date: Fri, 11 Jan 2019 14:51:26 +0300 Subject: [PATCH 034/194] #7 - Unify mob health/dmg calculations - temporary helper solution --- modules/battlecalc.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/battlecalc.js b/modules/battlecalc.js index 18d5e6762..70976f7ed 100644 --- a/modules/battlecalc.js +++ b/modules/battlecalc.js @@ -363,7 +363,8 @@ function calcBadGuyDmg(enemy,attack,daily,maxormin,disableFlucts) { //Situational bad guy damage increases if (game.global.challengeActive){ //Challenge bonuses here - number *= calcObliteratedEradicatedFactor(); + //#7 - apparently enemy stats factor that in already + //number *= calcObliteratedEradicatedFactor(); if (game.global.challengeActive == "Coordinate"){ number *= getBadCoordLevel(); } From 1b3e95b36be24562c3bdc1678329baaaf530cab6 Mon Sep 17 00:00:00 2001 From: Eugene Bukhtin Date: Fri, 11 Jan 2019 15:23:21 +0300 Subject: [PATCH 035/194] #7 - Unify mob health/dmg calculations - temporary helper solution --- modules/battlecalc.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/battlecalc.js b/modules/battlecalc.js index 70976f7ed..ddf4e72fe 100644 --- a/modules/battlecalc.js +++ b/modules/battlecalc.js @@ -363,8 +363,10 @@ function calcBadGuyDmg(enemy,attack,daily,maxormin,disableFlucts) { //Situational bad guy damage increases if (game.global.challengeActive){ //Challenge bonuses here - //#7 - apparently enemy stats factor that in already - //number *= calcObliteratedEradicatedFactor(); + //#7 - apparently enemy stats factor that in already - but only where enemy was obtained + if (!enemy) { + number *= calcObliteratedEradicatedFactor(); + } if (game.global.challengeActive == "Coordinate"){ number *= getBadCoordLevel(); } From da99e03d0ceac45c27df7a4197ce0ba30e72c6ae Mon Sep 17 00:00:00 2001 From: Eugene Bukhtin Date: Mon, 14 Jan 2019 02:00:37 +0300 Subject: [PATCH 036/194] #38 - Add situational modifiers for Amalgamator and Strength Tower --- modules/battlecalc.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/modules/battlecalc.js b/modules/battlecalc.js index ddf4e72fe..0b628d29e 100644 --- a/modules/battlecalc.js +++ b/modules/battlecalc.js @@ -228,6 +228,9 @@ function getBattleStats(what,form,crit) { return currentCalc; } +//todo #7 - use function calculateDamage(number, buildString, isTrimp, noCheckAchieve, cell) +//typical invocation calculateDamage(game.global.soldierCurrentAttack, false, true); +//it gets an accurate pre-crit calculation in current stance function calcOurDmg(number,maxormin,disableStances,disableFlucts) { //number = base attack var fluctuation = .2; //%fluctuation var maxFluct = -1; @@ -287,6 +290,15 @@ function calcOurDmg(number,maxormin,disableStances,disableFlucts) { //number = b if (Fluffy.isActive()){ number *= Fluffy.getDamageModifier(); } + //#38 - Amalgamator + if (game.jobs.Amalgamator.owned > 0) { + number *= game.jobs.Amalgamator.getDamageMult(); + } + //#38 - Strength Towers + if (playerSpireTraps.Strength.owned){ + var strBonus = playerSpireTraps.Strength.getWorldBonus(); + number *= (1 + (strBonus / 100)); + } //#18 - disable Ice in h/d ratio calculations // number *= (1 + (1 - game.empowerments.Ice.getCombatModifier())); From e4929c8ec7fb33fc3758f3032341314cf91eb3f7 Mon Sep 17 00:00:00 2001 From: Eugene Bukhtin Date: Mon, 18 Feb 2019 21:42:13 +0300 Subject: [PATCH 037/194] #42 - AutoPerks doesn't know about Classy --- modules/perks.js | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/perks.js b/modules/perks.js index 774f1b168..c3d9bb96e 100644 --- a/modules/perks.js +++ b/modules/perks.js @@ -802,6 +802,7 @@ AutoPerks.initializePerks = function () { var capable = new AutoPerks.FixedPerk("capable", 100000000, 0, 10, "fluffy"); var cunning = new AutoPerks.VariablePerk("cunning", 100000000000, false, 11, 0.05); var curious = new AutoPerks.VariablePerk("curious", 100000000000000, false, 12, 0.05); + var classy = new AutoPerks.FixedPerk("classy", 100000000000000000, 0, 100, "fluffy"); //Tier2 perks var toughness_II = new AutoPerks.ArithmeticPerk("toughness_II", 20000, 500, 0.01, toughness); var power_II = new AutoPerks.ArithmeticPerk("power_II", 20000, 500, 0.01, power); From f03b1ba9ff853e56838c1d2b0ebb0a5b4855fa57 Mon Sep 17 00:00:00 2001 From: Eugene Bukhtin Date: Mon, 18 Feb 2019 23:30:20 +0300 Subject: [PATCH 038/194] #42 - AutoPerks doesn't know about Classy --- modules/perks.js | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/modules/perks.js b/modules/perks.js index c3d9bb96e..ac8863e53 100644 --- a/modules/perks.js +++ b/modules/perks.js @@ -623,15 +623,17 @@ AutoPerks.applyCalculationsRespec = function(perks,remainingHelium){ var preBuyAmt = game.global.buyAmt; for(var i in perks) { - var capitalized = AutoPerks.capitaliseFirstLetter(perks[i].name); - game.global.buyAmt = perks[i].level; - if (getPortalUpgradePrice(capitalized) <= remainingHelium) { - if (MODULES["perks"].showDetails) - debug("AutoPerks-Respec Buying: " + capitalized + " " + perks[i].level, "perks"); - buyPortalUpgrade(capitalized); - } else - if (MODULES["perks"].showDetails) - debug("AutoPerks-Respec Error Couldn't Afford Asked Perk: " + capitalized + " " + perks[i].level, "perks"); + if (perks[i]) {//defense against future unknown perks + var capitalized = AutoPerks.capitaliseFirstLetter(perks[i].name); + game.global.buyAmt = perks[i].level; + if (getPortalUpgradePrice(capitalized) <= remainingHelium) { + if (MODULES["perks"].showDetails) + debug("AutoPerks-Respec Buying: " + capitalized + " " + perks[i].level, "perks"); + buyPortalUpgrade(capitalized); + } else + if (MODULES["perks"].showDetails) + debug("AutoPerks-Respec Error Couldn't Afford Asked Perk: " + capitalized + " " + perks[i].level, "perks"); + } } game.global.buyAmt = preBuyAmt; numTab(1,true); //selects the 1st number of the buy-amount tab-bar (Always 1) From c427b583b3702a3887bbddf1fc593a20baf712df Mon Sep 17 00:00:00 2001 From: Eugene Bukhtin Date: Mon, 18 Feb 2019 23:33:47 +0300 Subject: [PATCH 039/194] #42 - AutoPerks doesn't know about Classy --- modules/perks.js | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/modules/perks.js b/modules/perks.js index ac8863e53..effdd0696 100644 --- a/modules/perks.js +++ b/modules/perks.js @@ -654,18 +654,20 @@ AutoPerks.applyCalculations = function(perks,remainingHelium){ var preBuyAmt = game.global.buyAmt; var needsRespec = false; for(var i in perks) { - var capitalized = AutoPerks.capitaliseFirstLetter(perks[i].name); - game.global.buyAmt = perks[i].level - game.portal[capitalized].level - game.portal[capitalized].levelTemp; - if (game.global.buyAmt < 0) { - needsRespec = true; - if (MODULES["perks"].showDetails) - debug("AutoPerks RESPEC Required for: " + capitalized + " " + game.global.buyAmt, "perks"); - //break; - } - else if (game.global.buyAmt > 0) { - if (MODULES["perks"].showDetails) - debug("AutoPerks-NoRespec Adding: " + capitalized + " " + game.global.buyAmt, "perks"); - buyPortalUpgrade(capitalized); + if (perks[i]) {//defense against future unknown perks + var capitalized = AutoPerks.capitaliseFirstLetter(perks[i].name); + game.global.buyAmt = perks[i].level - game.portal[capitalized].level - game.portal[capitalized].levelTemp; + if (game.global.buyAmt < 0) { + needsRespec = true; + if (MODULES["perks"].showDetails) + debug("AutoPerks RESPEC Required for: " + capitalized + " " + game.global.buyAmt, "perks"); + //break; + } + else if (game.global.buyAmt > 0) { + if (MODULES["perks"].showDetails) + debug("AutoPerks-NoRespec Adding: " + capitalized + " " + game.global.buyAmt, "perks"); + buyPortalUpgrade(capitalized); + } } } From 6bd572681bd401095b2588db8c91f44fbab40d94 Mon Sep 17 00:00:00 2001 From: Eugene Bukhtin Date: Mon, 18 Feb 2019 23:43:15 +0300 Subject: [PATCH 040/194] #42 - AutoPerks doesn't know about Classy --- modules/perks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/perks.js b/modules/perks.js index effdd0696..f3edcd515 100644 --- a/modules/perks.js +++ b/modules/perks.js @@ -815,7 +815,7 @@ AutoPerks.initializePerks = function () { var looting_II = new AutoPerks.ArithmeticPerk("looting_II", 100000, 10000, 0.0025, looting); //gather these into an array of objects - AutoPerks.perkHolder = [siphonology, anticipation, meditation, relentlessness, range, agility, bait, trumps, packrat, looting, toughness, power, motivation, pheromones, artisanistry, carpentry, resilience, coordinated, resourceful, overkill, capable, cunning, curious, toughness_II, power_II, motivation_II, carpentry_II, looting_II]; + AutoPerks.perkHolder = [siphonology, anticipation, meditation, relentlessness, range, agility, bait, trumps, packrat, looting, toughness, power, motivation, pheromones, artisanistry, carpentry, resilience, coordinated, resourceful, overkill, capable, cunning, curious, classy, toughness_II, power_II, motivation_II, carpentry_II, looting_II]; //initialize basics on all. for(var i in AutoPerks.perkHolder) { AutoPerks.perkHolder[i].level = 0; //errors out here if a new perk is added to the game. From 5835fa398a38241016fd68fbda00e83c316b6be8 Mon Sep 17 00:00:00 2001 From: Eugene Bukhtin Date: Tue, 19 Feb 2019 15:41:58 +0300 Subject: [PATCH 041/194] #42 - AutoPerks doesn't know about Classy --- modules/perks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/perks.js b/modules/perks.js index f3edcd515..36a1ceaaa 100644 --- a/modules/perks.js +++ b/modules/perks.js @@ -806,7 +806,7 @@ AutoPerks.initializePerks = function () { var capable = new AutoPerks.FixedPerk("capable", 100000000, 0, 10, "fluffy"); var cunning = new AutoPerks.VariablePerk("cunning", 100000000000, false, 11, 0.05); var curious = new AutoPerks.VariablePerk("curious", 100000000000000, false, 12, 0.05); - var classy = new AutoPerks.FixedPerk("classy", 100000000000000000, 0, 100, "fluffy"); + var classy = new AutoPerks.FixedPerk("classy", 100000000000000000, 0, 50); //Tier2 perks var toughness_II = new AutoPerks.ArithmeticPerk("toughness_II", 20000, 500, 0.01, toughness); var power_II = new AutoPerks.ArithmeticPerk("power_II", 20000, 500, 0.01, power); From 321915aa8220159d39461be4be4b9637fecb2a1a Mon Sep 17 00:00:00 2001 From: Eugene Bukhtin Date: Tue, 19 Feb 2019 15:58:33 +0300 Subject: [PATCH 042/194] #43 - AutoPerks can't into DecaBuild --- modules/buildings.js | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/modules/buildings.js b/modules/buildings.js index 79ab89e13..320f91d05 100644 --- a/modules/buildings.js +++ b/modules/buildings.js @@ -15,9 +15,21 @@ function safeBuyBuilding(building) { if (game.buildings[building].locked) return false; var oldBuy = preBuy2(); - //build 2 at a time if we have the mastery for it. - //Note: Bypasses any "Max" caps by 1 if they are odd numbers and we can afford the 2nd one. - if (game.talents.doubleBuild.purchased) { + //build 10 or 2 at a time if we have the mastery for it. + //Note: Bypasses any "Max" caps by 1 if they are odd numbers and we can afford the 2nd one.//@todo #24 + if (game.talents.deciBuild.purchased) {//@todo refactor without this horrendous nested ifs and code duplication + game.global.buyAmt = 10; + if (!canAffordBuilding(building)) { + game.global.buyAmt = 2; + if (!canAffordBuilding(building)) { + game.global.buyAmt = 1; + if (!canAffordBuilding(building)) { + postBuy2(oldBuy); + return false; + } + } + } + } else if (game.talents.doubleBuild.purchased) { game.global.buyAmt = 2; if (!canAffordBuilding(building)) { game.global.buyAmt = 1; From b896ed1983e972a45c1c145450d88285213e5f2b Mon Sep 17 00:00:00 2001 From: Eugene Bukhtin Date: Mon, 25 Feb 2019 14:03:30 +0300 Subject: [PATCH 043/194] #44 - Force S in Void Maps should ignore min zone --- modules/scryer.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/scryer.js b/modules/scryer.js index 1cf8b8e41..2bacdb83c 100644 --- a/modules/scryer.js +++ b/modules/scryer.js @@ -62,7 +62,8 @@ function useScryerStance() { //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'); + var noVoid = game.global.mapsActive && getCurrentMapObject().location == "Void" && !getPageSetting('ScryerUseinVoidMaps2'); + use_auto = use_auto || noVoid; //check for maps that are NOT void maps use_auto = use_auto || game.global.mapsActive && !(getCurrentMapObject().location == "Void") && !getPageSetting('ScryerUseinMaps2'); //check for bosses above voidlevel @@ -91,7 +92,7 @@ function useScryerStance() { var max_zone = getPageSetting('ScryerMaxZone'); var valid_min = game.global.world >= min_zone; var valid_max = max_zone <= 0 || game.global.world < max_zone; - if (valid_min && valid_max) { + if ((valid_min && valid_max) || !noVoid) { if (oktoswitch) setFormation(4); wantToScry = true; From 447b083ce382d20c5f282eac4e5a5dfa465109d0 Mon Sep 17 00:00:00 2001 From: maurezen Date: Thu, 28 Mar 2019 02:08:21 +0300 Subject: [PATCH 044/194] #43 - force s in voids should ignore min zone - fixed min zone everywhere else --- modules/scryer.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/scryer.js b/modules/scryer.js index 2bacdb83c..4f135dbff 100644 --- a/modules/scryer.js +++ b/modules/scryer.js @@ -62,8 +62,9 @@ function useScryerStance() { //check for spire use_auto = use_auto || !game.global.mapsActive && isActiveSpireAT() && getPageSetting('ScryerUseinSpire2')!=1; //check for voids - var noVoid = game.global.mapsActive && getCurrentMapObject().location == "Void" && !getPageSetting('ScryerUseinVoidMaps2'); - use_auto = use_auto || noVoid; + var isVoid = game.global.mapsActive && getCurrentMapObject().location == "Void"; + var ignoreVoid = isVoid && !getPageSetting('ScryerUseinVoidMaps2'); + use_auto = use_auto || ignoreVoid; //check for maps that are NOT void maps use_auto = use_auto || game.global.mapsActive && !(getCurrentMapObject().location == "Void") && !getPageSetting('ScryerUseinMaps2'); //check for bosses above voidlevel @@ -92,7 +93,7 @@ function useScryerStance() { var max_zone = getPageSetting('ScryerMaxZone'); var valid_min = game.global.world >= min_zone; var valid_max = max_zone <= 0 || game.global.world < max_zone; - if ((valid_min && valid_max) || !noVoid) { + if ((valid_min && valid_max) || isVoid) { if (oktoswitch) setFormation(4); wantToScry = true; From 4f4747ef13a807f63d543290b66ef2b37cfa8aa5 Mon Sep 17 00:00:00 2001 From: maurezen Date: Thu, 28 Mar 2019 02:37:49 +0300 Subject: [PATCH 045/194] #45 4.11 broke heirlooms - first try --- modules/heirlooms.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/heirlooms.js b/modules/heirlooms.js index 9c4dd20de..2f0a11e32 100644 --- a/modules/heirlooms.js +++ b/modules/heirlooms.js @@ -5,9 +5,9 @@ //OLD: //renamed from sortHeirlooms to worthOfHeirlooms -var worth = {'Shield': {}, 'Staff': {}}; +var worth = {'Shield': {}, 'Staff': {}, 'Core': {}}; function worthOfHeirlooms(){ - worth = {'Shield': {}, 'Staff': {}}; + worth = {'Shield': {}, 'Staff': {}, 'Core': {}}; for (var loom in game.global.heirloomsExtra) { var theLoom = game.global.heirloomsExtra[loom]; worth[theLoom.type][loom] = theLoom.rarity; @@ -28,9 +28,9 @@ function worthOfHeirlooms(){ //NEW: //makes an array of heirlooms sitting in the temporary extra area to indicate to the autoHeirlooms2() function which to Carry/Drop -var worth2 = {'Shield': [], 'Staff': []}; +var worth2 = {'Shield': {}, 'Staff': {}, 'Core': {}}; function worthOfHeirlooms2(){ - worth2 = {'Shield': [], 'Staff': []}; + worth2 = {'Shield': {}, 'Staff': {}, 'Core': {}}; for (var index in game.global.heirloomsExtra) { var theLoom = game.global.heirloomsExtra[index]; var data = {'location': 'heirloomsExtra', 'index': index, 'rarity': theLoom.rarity, 'eff': evaluateHeirloomMods(index, 'heirloomsExtra')}; From 19d3100a49424e3d765b5d8fedd0d668af68cf5a Mon Sep 17 00:00:00 2001 From: maurezen Date: Thu, 28 Mar 2019 03:01:19 +0300 Subject: [PATCH 046/194] #45 4.11 broke heirlooms.js - second try alright apparently I'm blind to the parentheses --- modules/heirlooms.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/heirlooms.js b/modules/heirlooms.js index 2f0a11e32..6b9367f6b 100644 --- a/modules/heirlooms.js +++ b/modules/heirlooms.js @@ -28,9 +28,9 @@ function worthOfHeirlooms(){ //NEW: //makes an array of heirlooms sitting in the temporary extra area to indicate to the autoHeirlooms2() function which to Carry/Drop -var worth2 = {'Shield': {}, 'Staff': {}, 'Core': {}}; +var worth2 = {'Shield': [], 'Staff': [], 'Core': []}; function worthOfHeirlooms2(){ - worth2 = {'Shield': {}, 'Staff': {}, 'Core': {}}; + worth2 = {'Shield': [], 'Staff': [], 'Core': []}; for (var index in game.global.heirloomsExtra) { var theLoom = game.global.heirloomsExtra[index]; var data = {'location': 'heirloomsExtra', 'index': index, 'rarity': theLoom.rarity, 'eff': evaluateHeirloomMods(index, 'heirloomsExtra')}; From 5ceaaed0261355b696f829f7b37f7786d04cc052 Mon Sep 17 00:00:00 2001 From: maurezen Date: Thu, 28 Mar 2019 03:44:52 +0300 Subject: [PATCH 047/194] #46 - crit damage is not calculated correctly crit application function in battlecalc - megacrit-aware weighted crit multiplier --- modules/battlecalc.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/modules/battlecalc.js b/modules/battlecalc.js index 0b628d29e..5c852ca5b 100644 --- a/modules/battlecalc.js +++ b/modules/battlecalc.js @@ -1,3 +1,25 @@ +//Applies getMegaCritDamageMult(critTier), if needed; applies regular crit as well. +function applyCritMultiplier(baseDamage) { + //(baseDamage * (1-getPlayerCritChance()) + (baseDamage * getPlayerCritChance() * getPlayerCritDamageMult())); + var critDamage = baseDamage; + var critChance = getPlayerCritChance(); + var critTier = Math.floor(critChance); + var critMult = getPlayerCritDamageMult(); + var critMegaMult = getMegaCritDamageMult(1); + + if (critTier > 0) { + critDamage *= critMult; + while (critTier > 1) { + critChance -= 1; + critDamage *= critMegaMult; + } + critDamage = critDamage * (1-critChance) + baseDamage * critChance * critMegaMult); + } else { + critDamage = baseDamage * (1-critChance) + baseDamage * critChance * critMult); + } + return critDamage; +} + //MODULES["battlecalc"] = {}; //AutoTrimps: currently only used for health and block. attack is done by calcOurDmg below // function ripped from Trimps "updates.js" line 1103 From e518574c82de3d19808a8666ac2b5cc101aac0b9 Mon Sep 17 00:00:00 2001 From: maurezen Date: Thu, 28 Mar 2019 03:45:37 +0300 Subject: [PATCH 048/194] #46 - crit damage is not calculated correctly using new function in automap --- modules/maps.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/maps.js b/modules/maps.js index 6e889c1ed..130d2fb9d 100644 --- a/modules/maps.js +++ b/modules/maps.js @@ -125,7 +125,7 @@ function autoMap() { //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())); + ourBaseDamage = applyCritMultiplier(baseDamage); //calculate with map bonus var mapbonusmulti = 1 + (0.20*game.global.mapBonus); //(autostance2 has mapbonusmulti built in) From 3739e08ab5fe7d7bd5f8cc5ffa7017e7dc108153 Mon Sep 17 00:00:00 2001 From: maurezen Date: Thu, 28 Mar 2019 03:47:35 +0300 Subject: [PATCH 049/194] #46 - crit damage is not calculated correctly damn typos --- modules/battlecalc.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/battlecalc.js b/modules/battlecalc.js index 5c852ca5b..1a760a547 100644 --- a/modules/battlecalc.js +++ b/modules/battlecalc.js @@ -13,9 +13,9 @@ function applyCritMultiplier(baseDamage) { critChance -= 1; critDamage *= critMegaMult; } - critDamage = critDamage * (1-critChance) + baseDamage * critChance * critMegaMult); + critDamage = critDamage * (1-critChance) + baseDamage * critChance * critMegaMult; } else { - critDamage = baseDamage * (1-critChance) + baseDamage * critChance * critMult); + critDamage = baseDamage * (1-critChance) + baseDamage * critChance * critMult; } return critDamage; } From 90288ee6661fb2fb64cd854260bc43ad01ff9f66 Mon Sep 17 00:00:00 2001 From: maurezen Date: Thu, 28 Mar 2019 03:51:50 +0300 Subject: [PATCH 050/194] #46 - crit damage is not calculated correctly fixed infinite cycle (damn I need an IDE) --- modules/battlecalc.js | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/battlecalc.js b/modules/battlecalc.js index 1a760a547..01317718b 100644 --- a/modules/battlecalc.js +++ b/modules/battlecalc.js @@ -11,6 +11,7 @@ function applyCritMultiplier(baseDamage) { critDamage *= critMult; while (critTier > 1) { critChance -= 1; + critTier -= 1; critDamage *= critMegaMult; } critDamage = critDamage * (1-critChance) + baseDamage * critChance * critMegaMult; From 2e420b5ea1bf54f022d73a52b2c7a4764a53a4c4 Mon Sep 17 00:00:00 2001 From: maurezen Date: Thu, 28 Mar 2019 04:05:02 +0300 Subject: [PATCH 051/194] #46 - crit damage is not calculated correctly megacrit modifier and application --- modules/battlecalc.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/battlecalc.js b/modules/battlecalc.js index 01317718b..895e8dc7b 100644 --- a/modules/battlecalc.js +++ b/modules/battlecalc.js @@ -5,11 +5,11 @@ function applyCritMultiplier(baseDamage) { var critChance = getPlayerCritChance(); var critTier = Math.floor(critChance); var critMult = getPlayerCritDamageMult(); - var critMegaMult = getMegaCritDamageMult(1); + var critMegaMult = getMegaCritDamageMult(2);//yes, a single step megacrit modifier is 2 if (critTier > 0) { critDamage *= critMult; - while (critTier > 1) { + while (critTier > 0) { critChance -= 1; critTier -= 1; critDamage *= critMegaMult; From 6bc045a275089e4b34b81808195e37e1f3f976cf Mon Sep 17 00:00:00 2001 From: maurezen Date: Sun, 28 Apr 2019 12:05:54 +0300 Subject: [PATCH 052/194] #50 autoperks ignore looting last perk to be updated now uses max instead of a precise calculation which saves us from rounding errors 10+ symbols after the decimal dot also changed the iteration order and last perk to be updated is now t2, so the difference is much less pronounced --- modules/perks.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/modules/perks.js b/modules/perks.js index 36a1ceaaa..e7532614e 100644 --- a/modules/perks.js +++ b/modules/perks.js @@ -622,10 +622,15 @@ AutoPerks.applyCalculationsRespec = function(perks,remainingHelium){ clearPerks(); var preBuyAmt = game.global.buyAmt; + perks.reverse();//we want last perk to be t2 one so max instead of precise calc has less of an impact for(var i in perks) { if (perks[i]) {//defense against future unknown perks var capitalized = AutoPerks.capitaliseFirstLetter(perks[i].name); - game.global.buyAmt = perks[i].level; + if (perks.length - 1 == i) {//fall back to max for the last perk out there so we're not hit by rounding + game.global.buyAmt = "Max"; + } else { + game.global.buyAmt = perks[i].level; + } if (getPortalUpgradePrice(capitalized) <= remainingHelium) { if (MODULES["perks"].showDetails) debug("AutoPerks-Respec Buying: " + capitalized + " " + perks[i].level, "perks"); @@ -635,6 +640,7 @@ AutoPerks.applyCalculationsRespec = function(perks,remainingHelium){ debug("AutoPerks-Respec Error Couldn't Afford Asked Perk: " + capitalized + " " + perks[i].level, "perks"); } } + perks.reverse();//no idea if anything else uses it so we'd better fix it 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. @@ -661,7 +667,7 @@ AutoPerks.applyCalculations = function(perks,remainingHelium){ needsRespec = true; if (MODULES["perks"].showDetails) debug("AutoPerks RESPEC Required for: " + capitalized + " " + game.global.buyAmt, "perks"); - //break; + break;//no point iterating further } else if (game.global.buyAmt > 0) { if (MODULES["perks"].showDetails) @@ -882,4 +888,4 @@ AutoPerks.getOwnedPerks = function() { } //Run the GUI: -AutoPerks.displayGUI(); \ No newline at end of file +AutoPerks.displayGUI(); From 8f58e7f571ba33596eba602ec033b5e98192b7a3 Mon Sep 17 00:00:00 2001 From: maurezen Date: Thu, 29 Aug 2019 10:10:10 +0300 Subject: [PATCH 053/194] #53 gather.js turkimp issue --- modules/gather.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/gather.js b/modules/gather.js index 54299d885..f2bae35c7 100644 --- a/modules/gather.js +++ b/modules/gather.js @@ -15,7 +15,7 @@ function manualLabor() { var targetBreed = getPageSetting('GeneticistTimer'); var trapperTrapUntilFull = game.global.challengeActive == "Trapper" && notFullPop; var watchJumpstartTraps = game.global.challengeActive == "Watch" && notFullPop; - var hasTurkimp = game.talents.turkimp4.purchased || game.global.turkimpTimer > 0; + var hasTurkimp = game.talents.turkimp2.purchased || game.global.turkimpTimer > 0; //FRESH GAME NO HELIUM CODE. if (game.global.world <=3 && game.global.totalHeliumEarned<=5000) { From 53d8d3b712241f73b1342b7ec68a1f89a931ff82 Mon Sep 17 00:00:00 2001 From: maurezen Date: Wed, 4 Sep 2019 10:23:20 +0300 Subject: [PATCH 054/194] #54 - U2 automation and stats added Big Wall and Dimension of Rage maps --- modules/maps.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/maps.js b/modules/maps.js index 130d2fb9d..8588f522a 100644 --- a/modules/maps.js +++ b/modules/maps.js @@ -411,13 +411,13 @@ function autoMap() { 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) { + if ((theMap.name == 'The Wall' || theMap.name == 'Big 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) { + if ((theMap.name == 'Dimension of Anger' || theMap.name == 'Dimension of Rage') && 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; From 55c06be83e5ced44c1de7ddc3ee21b9491df9ece Mon Sep 17 00:00:00 2001 From: maurezen Date: Wed, 4 Sep 2019 10:24:34 +0300 Subject: [PATCH 055/194] #54 - U2 automation and stats added Smithy and Microchip buildings --- modules/buildings.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/buildings.js b/modules/buildings.js index 320f91d05..2943ed4b9 100644 --- a/modules/buildings.js +++ b/modules/buildings.js @@ -197,6 +197,14 @@ function buyBuildings() { var customVars = MODULES["buildings"]; var oldBuy = preBuy2(); game.global.buyAmt = 1; + //Smithy + if (!game.buildings.Smithy.locked) { + safeBuyBuilding('Smithy'); + } + //Microchip + if (!game.buildings.Smithy.locked) { + safeBuyBuilding('Microchip'); + } buyFoodEfficientHousing(); //["Hut", "House", "Mansion", "Hotel", "Resort"]; buyGemEfficientHousing(); //["Hotel", "Resort", "Gateway", "Collector", "Warpstation"]; //WormHoles: From 1a1e9ba1c5b22380a6cc5d18274f8a60e81b2111 Mon Sep 17 00:00:00 2001 From: maurezen Date: Wed, 4 Sep 2019 10:25:26 +0300 Subject: [PATCH 056/194] #54 - U2 automation and stats added Rage and Prismatic upgrades --- modules/upgrades.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/upgrades.js b/modules/upgrades.js index 6bc63509b..bc483763c 100644 --- a/modules/upgrades.js +++ b/modules/upgrades.js @@ -1,5 +1,5 @@ //MODULES["upgrades"] = {}; -var upgradeList = ['Miners', 'Scientists', 'Coordination', 'Speedminer', 'Speedlumber', 'Speedfarming', 'Speedscience', 'Speedexplorer', 'Megaminer', 'Megalumber', 'Megafarming', 'Megascience', 'Efficiency', 'TrainTacular', 'Trainers', 'Explorers', 'Blockmaster', 'Battle', 'Bloodlust', 'Bounty', 'Egg', 'Anger', 'Formations', 'Dominance', 'Barrier', 'UberHut', 'UberHouse', 'UberMansion', 'UberHotel', 'UberResort', 'Trapstorm', 'Gigastation', 'Shieldblock', 'Potency', 'Magmamancers']; +var upgradeList = ['Miners', 'Scientists', 'Coordination', 'Speedminer', 'Speedlumber', 'Speedfarming', 'Speedscience', 'Speedexplorer', 'Megaminer', 'Megalumber', 'Megafarming', 'Megascience', 'Efficiency', 'TrainTacular', 'Trainers', 'Explorers', 'Blockmaster', 'Battle', 'Bloodlust', 'Bounty', 'Egg', 'Anger', 'Formations', 'Dominance', 'Barrier', 'UberHut', 'UberHouse', 'UberMansion', 'UberHotel', 'UberResort', 'Trapstorm', 'Gigastation', 'Shieldblock', 'Potency', 'Magmamancers', 'Rage', 'Prismatic']; //Buys all available non-equip upgrades listed in var upgradeList function buyUpgrades() { From 022ca3342afff411bfffc469733a8668d1142a3d Mon Sep 17 00:00:00 2001 From: maurezen Date: Wed, 4 Sep 2019 10:26:39 +0300 Subject: [PATCH 057/194] #54 - U2 automation and stats enemy stats calculation update --- modules/query.js | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/modules/query.js b/modules/query.js index 5bad39abb..11722223e 100644 --- a/modules/query.js +++ b/modules/query.js @@ -72,10 +72,14 @@ function getScienceCostToUpgrade(upgrade) { } +//this is a hideous copy from game.global.getEnemyMaxAttack +//to fully delegate to game.global.getEnemyMaxAttack we need to hijack getCurrentMapObject() with world +//and also apply diff/corrupt outside function getEnemyMaxAttack(world, level, name, diff, corrupt) { var amt = 0; var adjWorld = ((world - 1) * 100) + level; - amt += 50 * Math.sqrt(world) * Math.pow(3.27, world / 2); + var attackBase = (game.global.universe == 2) ? 750 : 50; + amt += attackBase * Math.sqrt(world) * Math.pow(3.27, world / 2); amt -= 10; if (world == 1){ amt *= 0.35; @@ -96,6 +100,18 @@ function getEnemyMaxAttack(world, level, name, diff, corrupt) { if (diff) { amt *= diff; } + + if (game.global.universe == 2){ + var part1 = (world > 40) ? 40 : world; + var part2 = (world > 60) ? 20 : world - 40; + var part3 = (world - 60); + if (part2 < 0) part2 = 0; + if (part3 < 0) part3 = 0; + amt *= Math.pow(1.5, part1); + amt *= Math.pow(1.4, part2); + amt *= Math.pow(1.32, part3); + } + if (!corrupt) amt *= game.badGuys[name].attack; else { @@ -104,11 +120,15 @@ function getEnemyMaxAttack(world, level, name, diff, corrupt) { return Math.floor(amt); } +//this is a hideous copy from game.global.getEnemyMaxHealth +//to fully delegate to game.global.getEnemyMaxHealth we need to hijack getCurrentMapObject() with world +//and also apply corrupt outside function getEnemyMaxHealth(world, level, corrupt) { if (!level) level = 30; var amt = 0; - amt += 130 * Math.sqrt(world) * Math.pow(3.265, world / 2); + var healthBase = (game.global.universe == 2) ? 10e7 : 130; + amt += healthBase * Math.sqrt(world) * Math.pow(3.265, world / 2); amt -= 110; if (world == 1 || world == 2 && level < 10) { amt *= 0.6; @@ -122,6 +142,15 @@ function getEnemyMaxHealth(world, level, corrupt) { } if (world < 60) amt *= 0.75; //if (world > 5 && game.global.mapsActive) amt *= 1.1; + + if (game.global.universe == 2){ + var part1 = (world > 60) ? 60 : world; + var part2 = (world - 60); + if (part2 < 0) part2 = 0; + amt *= Math.pow(1.4, part1); + amt *= Math.pow(1.32, part2); + } + if (!corrupt) amt *= game.badGuys["Grimp"].health; else From 3c173530028847d16f0fab512ab22a1b6515285a Mon Sep 17 00:00:00 2001 From: maurezen Date: Wed, 4 Sep 2019 10:31:14 +0300 Subject: [PATCH 058/194] #54 - U2 automation and stats enemy stats estimation point moved closer syphonology update --- modules/maps.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/maps.js b/modules/maps.js index 8588f522a..df66cc61c 100644 --- a/modules/maps.js +++ b/modules/maps.js @@ -136,12 +136,12 @@ function autoMap() { var enemyDamage; var enemyHealth; if (AutoStance<=1) { - enemyDamage = getEnemyMaxAttack(game.global.world + 1, 50, 'Snimp', 1.2); + enemyDamage = getEnemyMaxAttack(game.global.world, 90, '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, 90, 'Snimp', 1.0),true,true); //(enemy,attack,daily,maxormin,[disableFlucts]) } - enemyHealth = getEnemyMaxHealth(game.global.world + 1,50); + enemyHealth = getEnemyMaxHealth(game.global.world, 90); if (game.global.challengeActive == "Toxicity") { enemyHealth *= 2; } @@ -366,7 +366,7 @@ function autoMap() { //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 siphlvl = shouldFarmLowerZone ? game.global.world - 10 : (game.global.universe == 1 ? game.global.world - game.portal.Siphonology.level : game.global.world); var maxlvl = game.talents.mapLoot.purchased ? game.global.world - 1 : game.global.world; maxlvl += extraMapLevels; // extraMapLevels : advanced slider if (getPageSetting('DynamicSiphonology') || shouldFarmLowerZone){ From 511d272e2ad4539af1c38b3928855cbc133b6742 Mon Sep 17 00:00:00 2001 From: maurezen Date: Wed, 4 Sep 2019 21:14:42 +0300 Subject: [PATCH 059/194] #54 - U2 automation and stats automaps minor fix - don't rely on masteries in u2, run wall and dimension anyway --- modules/maps.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/maps.js b/modules/maps.js index df66cc61c..ba3844ab3 100644 --- a/modules/maps.js +++ b/modules/maps.js @@ -411,13 +411,13 @@ function autoMap() { for (var map in game.global.mapsOwnedArray) { var theMap = game.global.mapsOwnedArray[map]; if (theMap.noRecycle) { - if ((theMap.name == 'The Wall' || theMap.name == 'Big Wall') && game.upgrades.Bounty.allowed == 0 && !game.talents.bounty.purchased) { + if ((theMap.name == 'The Wall' || theMap.name == 'Big Wall') && game.upgrades.Bounty.allowed == 0 && (!game.talents.bounty.purchased || game.global.universe == 2)) { var theMapDifficulty = Math.ceil(theMap.difficulty / 2); if(game.global.world < 15 + theMapDifficulty) continue; selectedMap = theMap.id; break; } - if ((theMap.name == 'Dimension of Anger' || theMap.name == 'Dimension of Rage') && document.getElementById("portalBtn").style.display == "none" && !game.talents.portal.purchased) { + if ((theMap.name == 'Dimension of Anger' || theMap.name == 'Dimension of Rage') && document.getElementById("portalBtn").style.display == "none" && (!game.talents.portal.purchased || game.global.universe == 2)) { var theMapDifficulty = Math.ceil(theMap.difficulty / 2); if(game.global.world < 20 + theMapDifficulty) continue; selectedMap = theMap.id; From 4cce1fadfe0fa815f25bc08c2106f0ad4fb6dd52 Mon Sep 17 00:00:00 2001 From: maurezen Date: Wed, 4 Sep 2019 21:40:50 +0300 Subject: [PATCH 060/194] #55 - Trapping should stop somewhere dropped autotrapping toggle as a temporary solution --- AutoTrimps2.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/AutoTrimps2.js b/AutoTrimps2.js index 9907e1e47..3a2df5731 100644 --- a/AutoTrimps2.js +++ b/AutoTrimps2.js @@ -221,7 +221,8 @@ function mainLoop() { getPageSetting('AutoMaps') > 0 ? autoMap() : updateAutoMapsStatus(); //"Auto Maps" (automaps.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" + //#55 @todo move to gather.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) From 679f54b6d68df01c071e48c92f8d3ad19e3721fe Mon Sep 17 00:00:00 2001 From: maurezen Date: Wed, 4 Sep 2019 22:13:31 +0300 Subject: [PATCH 061/194] #54 - U2 automation and stats minor mapping fix --- modules/maps.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/maps.js b/modules/maps.js index ba3844ab3..00fc9a242 100644 --- a/modules/maps.js +++ b/modules/maps.js @@ -419,7 +419,8 @@ function autoMap() { } if ((theMap.name == 'Dimension of Anger' || theMap.name == 'Dimension of Rage') && document.getElementById("portalBtn").style.display == "none" && (!game.talents.portal.purchased || game.global.universe == 2)) { var theMapDifficulty = Math.ceil(theMap.difficulty / 2); - if(game.global.world < 20 + theMapDifficulty) continue; + //15 for U2, 20 for U1 + if(game.global.world < 10 + (3 - game.global.universe)*5 + theMapDifficulty) continue; selectedMap = theMap.id; break; } From 3b930a3c0f3ad935bf9d8df9a981d820c6428a17 Mon Sep 17 00:00:00 2001 From: maurezen Date: Wed, 4 Sep 2019 22:13:37 +0300 Subject: [PATCH 062/194] #54 - U2 automation and stats added radon graph --- Graphs.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Graphs.js b/Graphs.js index 51d39d7e2..c8989bf86 100644 --- a/Graphs.js +++ b/Graphs.js @@ -30,7 +30,7 @@ document.getElementById("graphParent").innerHTML += '
Date: Wed, 4 Sep 2019 22:54:04 +0300 Subject: [PATCH 063/194] #7 - Unify mob health/dmg calculations deferred trimp atk calculation in autostance 1 to base game's method --- modules/stance.js | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/modules/stance.js b/modules/stance.js index fd121bcb8..23a194c39 100644 --- a/modules/stance.js +++ b/modules/stance.js @@ -2,21 +2,24 @@ 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 = 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); +// } +// } + // yay #7, @todo take care of calcBaseDamageinX2 (or, rather, battlecalc.js:calcOurDmg) + //baseDamage according to game + baseDamage = calculateDamage(game.global.soldierCurrentAttack, false, true); //baseBlock baseBlock = game.global.soldierCurrentBlock; //baseHealth From fe2692507b86a0f1e9f8e59a54fe880434d23f09 Mon Sep 17 00:00:00 2001 From: maurezen Date: Wed, 4 Sep 2019 23:29:18 +0300 Subject: [PATCH 064/194] #57 - Lower default void map difficulty --- modules/maps.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/maps.js b/modules/maps.js index 00fc9a242..40d186a56 100644 --- a/modules/maps.js +++ b/modules/maps.js @@ -526,7 +526,8 @@ function autoMap() { 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; + //allow player to kill itself if he wants to, make default difficulty equal to 1 + var diff = parseInt(getPageSetting('VoidCheck')) > 0 ? parseInt(getPageSetting('VoidCheck')) : 1; var ourBlock = getBattleStats("block", true); //use block tooltip (after death block) instead of current army block. if(ourHealth/diff < eAttack - ourBlock) { shouldFarm = true; From 2bac71aa748cf6b208646bbb0b1200553b95bb9d Mon Sep 17 00:00:00 2001 From: maurezen Date: Thu, 5 Sep 2019 00:23:06 +0300 Subject: [PATCH 065/194] #54 - U2 automation and stats learn battlecalc to calculate prismatic shield value --- modules/battlecalc.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/battlecalc.js b/modules/battlecalc.js index 895e8dc7b..44d1669a0 100644 --- a/modules/battlecalc.js +++ b/modules/battlecalc.js @@ -80,6 +80,8 @@ function getBattleStats(what,form,crit) { trainerStrength = calcHeirloomBonus("Shield", "trainerEfficiency", trainerStrength); currentCalc *= (trainerStrength + 1); } + } else if (what == "shield") { + return getMaxEnergyShield(); } //Add coordination currentCalc *= game.resources.trimps.maxSoldiers; From 1711693d6e4364fd6a674a02ca7b6327f5d0172d Mon Sep 17 00:00:00 2001 From: maurezen Date: Thu, 5 Sep 2019 00:23:47 +0300 Subject: [PATCH 066/194] #54 - U2 automation and stats added prismatic palace --- modules/maps.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/maps.js b/modules/maps.js index 40d186a56..9ea76f5d4 100644 --- a/modules/maps.js +++ b/modules/maps.js @@ -424,6 +424,12 @@ function autoMap() { selectedMap = theMap.id; break; } + if (theMap.name == 'Prismatic Palace') { + 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); From 11ed2a4f7cf49d083aa1de06982c036337feb523 Mon Sep 17 00:00:00 2001 From: maurezen Date: Thu, 5 Sep 2019 00:26:10 +0300 Subject: [PATCH 067/194] #54 - U2 automation and stats added prismalicious upgrade --- modules/upgrades.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/upgrades.js b/modules/upgrades.js index bc483763c..9b6c40e67 100644 --- a/modules/upgrades.js +++ b/modules/upgrades.js @@ -1,5 +1,5 @@ //MODULES["upgrades"] = {}; -var upgradeList = ['Miners', 'Scientists', 'Coordination', 'Speedminer', 'Speedlumber', 'Speedfarming', 'Speedscience', 'Speedexplorer', 'Megaminer', 'Megalumber', 'Megafarming', 'Megascience', 'Efficiency', 'TrainTacular', 'Trainers', 'Explorers', 'Blockmaster', 'Battle', 'Bloodlust', 'Bounty', 'Egg', 'Anger', 'Formations', 'Dominance', 'Barrier', 'UberHut', 'UberHouse', 'UberMansion', 'UberHotel', 'UberResort', 'Trapstorm', 'Gigastation', 'Shieldblock', 'Potency', 'Magmamancers', 'Rage', 'Prismatic']; +upgradeList = ['Miners', 'Scientists', 'Coordination', 'Speedminer', 'Speedlumber', 'Speedfarming', 'Speedscience', 'Speedexplorer', 'Megaminer', 'Megalumber', 'Megafarming', 'Megascience', 'Efficiency', 'TrainTacular', 'Trainers', 'Explorers', 'Blockmaster', 'Battle', 'Bloodlust', 'Bounty', 'Egg', 'Anger', 'Formations', 'Dominance', 'Barrier', 'UberHut', 'UberHouse', 'UberMansion', 'UberHotel', 'UberResort', 'Trapstorm', 'Gigastation', 'Shieldblock', 'Potency', 'Magmamancers', 'Rage', 'Prismatic', 'Prismalicious']; //Buys all available non-equip upgrades listed in var upgradeList function buyUpgrades() { From a0c3e7b562d75db8b5c0bd215aea75732fa329ea Mon Sep 17 00:00:00 2001 From: maurezen Date: Thu, 5 Sep 2019 00:33:30 +0300 Subject: [PATCH 068/194] #54 - U2 automation and stats minor prismatic palace fix --- modules/maps.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/maps.js b/modules/maps.js index 9ea76f5d4..929aa26ee 100644 --- a/modules/maps.js +++ b/modules/maps.js @@ -424,7 +424,7 @@ function autoMap() { selectedMap = theMap.id; break; } - if (theMap.name == 'Prismatic Palace') { + if (theMap.name == 'Prismatic Palace' && !game.upgrades.Prismalicious.done) { var theMapDifficulty = Math.ceil(theMap.difficulty / 2); if(game.global.world < 20 + theMapDifficulty) continue; selectedMap = theMap.id; From f77bfade013366be16784c92cfdb09661d5cb37c Mon Sep 17 00:00:00 2001 From: maurezen Date: Thu, 5 Sep 2019 10:02:00 +0300 Subject: [PATCH 069/194] #54 - U2 automation and stats void maps health estimate corrected for prismatic shield --- modules/maps.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/maps.js b/modules/maps.js index 929aa26ee..8330c5cf0 100644 --- a/modules/maps.js +++ b/modules/maps.js @@ -519,7 +519,9 @@ function autoMap() { eAttack *= (getCorruptScale("attack") / 2).toFixed(1); //TODO: Account for magmated voidmaps. (not /2) //TODO: Account for daily. - var ourHealth = baseHealth; + //u2 update - prismatic shield + //@todo Angelic? + var ourHealth = baseHealth + getBattleStats("shield", true); 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; @@ -535,6 +537,7 @@ function autoMap() { //allow player to kill itself if he wants to, make default difficulty equal to 1 var diff = parseInt(getPageSetting('VoidCheck')) > 0 ? parseInt(getPageSetting('VoidCheck')) : 1; var ourBlock = getBattleStats("block", true); //use block tooltip (after death block) instead of current army block. + //@todo get rid of getbattlestats and extract "survives X hits" calculation to a single place if(ourHealth/diff < eAttack - ourBlock) { shouldFarm = true; voidCheckPercent = Math.round((ourHealth/diff)/(eAttack-ourBlock)*100); From 182e240b2b588af45667e08b73c74cc61662580f Mon Sep 17 00:00:00 2001 From: maurezen Date: Thu, 5 Sep 2019 10:15:51 +0300 Subject: [PATCH 070/194] #54 - U2 automation and stats minor Big Wall fix --- modules/maps.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/maps.js b/modules/maps.js index 8330c5cf0..a7fe97e0e 100644 --- a/modules/maps.js +++ b/modules/maps.js @@ -413,7 +413,8 @@ function autoMap() { if (theMap.noRecycle) { if ((theMap.name == 'The Wall' || theMap.name == 'Big Wall') && game.upgrades.Bounty.allowed == 0 && (!game.talents.bounty.purchased || game.global.universe == 2)) { var theMapDifficulty = Math.ceil(theMap.difficulty / 2); - if(game.global.world < 15 + theMapDifficulty) continue; + //15 for U1, 7 for U2 + if(game.global.world < 7 + (2 - game.global.universe)*8 + theMapDifficulty) continue; selectedMap = theMap.id; break; } From 8ecf561c58ca801fb185bd07b1c058aeaf2ffae7 Mon Sep 17 00:00:00 2001 From: maurezen Date: Thu, 5 Sep 2019 20:55:38 +0300 Subject: [PATCH 071/194] #54 - U2 automation and stats window.addResCheckMax now takes 6 arguments, have to take that into account --- Graphs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Graphs.js b/Graphs.js index c8989bf86..b3f15ab31 100644 --- a/Graphs.js +++ b/Graphs.js @@ -1355,7 +1355,7 @@ setInterval(getLootData, 15000); // who even thought copying the code was a good idea? const oldFunction = window.addResCheckMax; - window.addResCheckMax = (a, b, c, d, e) => filterLoot(a, b, null, d) || oldFunction(a, b, c, d, e); + window.addResCheckMax = (a, b, c, d, e, f) => filterLoot(a, b, null, d) || oldFunction(a, b, c, d, e, f); })(); //END overwriting default game functions!!!!!!!!!!!!!!!!!!!!!! From f3c28e2b34ebd3f7a7e4152257fc1dc2df3ab647 Mon Sep 17 00:00:00 2001 From: maurezen Date: Thu, 5 Sep 2019 21:58:57 +0300 Subject: [PATCH 072/194] #54 - U2 automation and stats pulled Zek's presets for more levels --- modules/perks.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/modules/perks.js b/modules/perks.js index e7532614e..5caa7d211 100644 --- a/modules/perks.js +++ b/modules/perks.js @@ -40,7 +40,7 @@ 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_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_Zek4503 = [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]; // @@ -51,8 +51,11 @@ var preset_Zek229 = [11.2, 0.58, 2.37, 1.464, 0.3, 2.02, 12.2, 0.58, 37, 0.22, 2 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]; +var preset_Zek450 = [450, 0.9, 48, 3.35, 1, 2.8, 7.8, 1.95, 10, 0.03, 1, 120, 175, 0]; +var preset_Zek500 = [600, 2.4, 60, 2, 1, 2.5, 8, 2.4, 8, 0.02, 1, 145, 180, 130]; +var preset_Zek550 = [700, 2.8, 70, 1.4, 1, 2.2, 7.5, 2.8, 8, 0.003, 1, 50, 80, 45]; //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_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]; +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_Zek4503,preset_space,preset_Zek059,preset_Zek100,preset_Zek180,preset_Zek229,preset_Zek299,preset_Zek399,preset_Zek449,preset_Zek450,preset_Zek500,preset_Zek550,preset_space]; //Specific ratios labeled above must be given the matching ID below. //Ratio preset dropdown list var presetListHtml = "\ @@ -70,7 +73,7 @@ var presetListHtml = "\ \ \ \ -\ +\ \ \ \ @@ -79,7 +82,9 @@ var presetListHtml = "\ \ \ \ -\ +\ +\ +\ \ "; //Custom Creation for all perk customRatio boxes in Trimps Perk Window From 287581edb9146f2f217408fe0e43649d66afe65e Mon Sep 17 00:00:00 2001 From: maurezen Date: Thu, 5 Sep 2019 23:14:48 +0300 Subject: [PATCH 073/194] #54 - U2 automation and stats basic u2 autoperk adaptation. is probably buggy af. --- modules/perks.js | 52 +++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 45 insertions(+), 7 deletions(-) diff --git a/modules/perks.js b/modules/perks.js index 5caa7d211..31e5d2481 100644 --- a/modules/perks.js +++ b/modules/perks.js @@ -320,14 +320,26 @@ AutoPerks.initialise = function() { AutoPerks.clickAllocate = function() { AutoPerks.initialise(); // Reset all fixed perks to 0 and grab new ratios if any - var helium = AutoPerks.getHelium(); + var helium; + if (game.global.universe == 1) { + helium = AutoPerks.getHelium(); + } else if (game.global.universe == 2) { + helium = AutoPerks.getRadon(); + } // Get fixed perks var preSpentHe = 0; var fixedPerks = AutoPerks.getFixedPerks(); + var gamePerk; for (var i in fixedPerks) { //Maintain your existing fixed perks levels. - fixedPerks[i].level = game.portal[AutoPerks.capitaliseFirstLetter(fixedPerks[i].name)].level; + gamePerk = game.portal[AutoPerks.capitaliseFirstLetter(fixedPerks[i].name)]; + if (game.global.universe == 1) { + fixedPerks[i].level = gamePerk.level; + } else if (game.global.universe == 2) { + //u2 perk list is not supposed to have wrong perks + fixedPerks[i].level = gamePerk.radLevel; + } var price = AutoPerks.calculateTotalPrice(fixedPerks[i], fixedPerks[i].level); fixedPerks[i].spent += price; preSpentHe += price; @@ -373,6 +385,20 @@ AutoPerks.getHelium = function() { return respecMax; } +AutoPerks.getRadon = function() { + //determines if we are in the portal screen or the perk screen. + + var respecMax = (game.global.viewingUpgrades) ? game.global.radonLeftover : game.global.radonLeftover + game.resources.radon.owned; + //iterates all the perks and gathers up their heliumSpent counts. + for (var item in game.portal){ + if (game.portal[item].radLocked) continue; + var portUpgrade = game.portal[item]; + if (typeof portUpgrade.radLevel === 'undefined') continue; + respecMax += portUpgrade.radSpent; + } + return respecMax; +} + //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)); @@ -636,6 +662,7 @@ AutoPerks.applyCalculationsRespec = function(perks,remainingHelium){ } else { game.global.buyAmt = perks[i].level; } + //works fine, has u2 factored in if (getPortalUpgradePrice(capitalized) <= remainingHelium) { if (MODULES["perks"].showDetails) debug("AutoPerks-Respec Buying: " + capitalized + " " + perks[i].level, "perks"); @@ -667,7 +694,8 @@ AutoPerks.applyCalculations = function(perks,remainingHelium){ for(var i in perks) { if (perks[i]) {//defense against future unknown perks var capitalized = AutoPerks.capitaliseFirstLetter(perks[i].name); - game.global.buyAmt = perks[i].level - game.portal[capitalized].level - game.portal[capitalized].levelTemp; + gameLevel = game.global.universe == 1 ? game.portal[capitalized].level : game.portal[capitalized].radLevel; + game.global.buyAmt = perks[i].level - gameLevel - game.portal[capitalized].levelTemp; if (game.global.buyAmt < 0) { needsRespec = true; if (MODULES["perks"].showDetails) @@ -699,11 +727,13 @@ AutoPerks.applyCalculations = function(perks,remainingHelium){ if (MODULES["perks"].showDetails) { var exportPerks = {}; for (var item in game.portal){ - el = game.portal[item]; + el = game.portal[item]; + //u2 exists + level = game.global.universe == 1 ? el.level : el.radLevel; //For smaller strings and backwards compatibility, perks not added to the object will be treated as if the perk is supposed to be level 0. - if (el.locked || el.level <= 0) continue; + if (el.locked || level <= 0) continue; //Add the perk to the object with the desired level - exportPerks[item] = el.level + el.levelTemp; + exportPerks[item] = level + el.levelTemp; } console.log(exportPerks); } @@ -825,8 +855,16 @@ AutoPerks.initializePerks = function () { var carpentry_II = new AutoPerks.ArithmeticPerk("carpentry_II", 100000, 10000, 0.0025, carpentry); var looting_II = new AutoPerks.ArithmeticPerk("looting_II", 100000, 10000, 0.0025, looting); + //U2 perks + var prismal = new AutoPerks.VariablePerk("prismal", 1, true, 6, 0.1); + + AutoPerks.perkHolder = []; //gather these into an array of objects - AutoPerks.perkHolder = [siphonology, anticipation, meditation, relentlessness, range, agility, bait, trumps, packrat, looting, toughness, power, motivation, pheromones, artisanistry, carpentry, resilience, coordinated, resourceful, overkill, capable, cunning, curious, classy, toughness_II, power_II, motivation_II, carpentry_II, looting_II]; + if (game.global.universe == 1) { + AutoPerks.perkHolder = [siphonology, anticipation, meditation, relentlessness, range, agility, bait, trumps, packrat, looting, toughness, power, motivation, pheromones, artisanistry, carpentry, resilience, coordinated, resourceful, overkill, capable, cunning, curious, classy, toughness_II, power_II, motivation_II, carpentry_II, looting_II]; + } else if (game.global.universe == 2) { + AutoPerks.perkHolder = [range, agility, bait, trumps, packrat, looting, toughness, power, motivation, pheromones, artisanistry, carpentry, prismal]; + } //initialize basics on all. for(var i in AutoPerks.perkHolder) { AutoPerks.perkHolder[i].level = 0; //errors out here if a new perk is added to the game. From 1904b47b0f3d7e7e79ac4f2fed89f5d381ca06de Mon Sep 17 00:00:00 2001 From: maurezen Date: Fri, 6 Sep 2019 21:28:00 +0300 Subject: [PATCH 074/194] #58 - Autoperks fast calculation should be faster Increased coefficient for a tighter loop --- modules/perks.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/perks.js b/modules/perks.js index 31e5d2481..0397f3a27 100644 --- a/modules/perks.js +++ b/modules/perks.js @@ -581,7 +581,10 @@ AutoPerks.spendHelium2 = function(helium) { // Purchase the most efficient perk var t2 = mostEff.name.endsWith("_II"); if (t2) { - packLevel = mostEff.increase * 10; + //at 6.5 Oc He with *10 that were here ran 370-ish million loops, ffs + //*1000 gives ~4m + //*10000 gives ~50m, weird + packLevel = mostEff.increase * 1000; packPrice = AutoPerks.calculateTotalPrice(mostEff, mostEff.level + packLevel) - mostEff.spent; } if (t2 && packPrice <= helium) { From bfaacf7624bda7c0fea3c6443f69da1079a4fe1a Mon Sep 17 00:00:00 2001 From: maurezen Date: Fri, 6 Sep 2019 21:46:48 +0300 Subject: [PATCH 075/194] #59 - Geneticists are too slow to hire Geneticists are now hired in increments of 10 --- modules/breedtimer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/breedtimer.js b/modules/breedtimer.js index a9edee95b..3cdbae865 100644 --- a/modules/breedtimer.js +++ b/modules/breedtimer.js @@ -1,6 +1,6 @@ MODULES["breedtimer"] = {}; //These can be changed (in the console) if you know what you're doing: -MODULES["breedtimer"].buyGensIncrement = 1; //Buy this many geneticists at a time +MODULES["breedtimer"].buyGensIncrement = 10; //Buy this many geneticists at a time MODULES["breedtimer"].fireGensIncrement = 1; //Fire this many geneticists at a time MODULES["breedtimer"].fireGensFloor = 10; //Dont FIRE below this number (nothing to do with hiring up to it)(maybe is disregarded?) MODULES["breedtimer"].breedFireOn = 6; //turn breedfire on at X seconds (if BreedFire) From 62b1eaa06efe60ba11577e173f1c818e4f34bc71 Mon Sep 17 00:00:00 2001 From: maurezen Date: Fri, 6 Sep 2019 21:52:09 +0300 Subject: [PATCH 076/194] #60 - Magmamancers not hired despite having Still Magmamancing --- modules/jobs.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/jobs.js b/modules/jobs.js index 608161349..81cea080a 100644 --- a/modules/jobs.js +++ b/modules/jobs.js @@ -227,8 +227,13 @@ function buyJobs() { //game.jobs.Magmamancer.getBonusPercent(true); var timeOnZone = Math.floor((new Date().getTime() - game.global.zoneStarted) / 60000); // Add 5 minutes for zone-time for magmamancer mastery - if (game.talents.magmamancer.purchased) + if (game.talents.magmamancer.purchased) { timeOnZone += 5; + } + // Add some minutes for Still Magmamancing master + if (game.talents.stillMagmamancer.purchased) { + timeOnZone += game.global.spireRows; + } var stacks2 = Math.floor(timeOnZone / 10); if (getPageSetting('AutoMagmamancers') && stacks2 > tierMagmamancers) { var old = preBuy2(); From 4b5daf5b560c89084d436e911d2c6669cd616a57 Mon Sep 17 00:00:00 2001 From: maurezen Date: Sun, 8 Sep 2019 21:37:34 +0300 Subject: [PATCH 077/194] #54 - U2 automation and stats enabled autoportal right away --- SettingsGUI.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SettingsGUI.js b/SettingsGUI.js index c0b75e2e8..586616338 100644 --- a/SettingsGUI.js +++ b/SettingsGUI.js @@ -818,7 +818,7 @@ function updateCustomButtons() { //automaps button in GUI document.getElementById("autoMapBtn").setAttribute("class", "noselect settingsBtn settingBtn" + autoTrimpSettings.AutoMaps.value); //auto portal setting, hide until player has unlocked the balance challenge - (game.challenges.Balance.filter()) ? turnOn("AutoPortal") : turnOff("AutoPortal"); + //(game.challenges.Balance.filter()) ? turnOn("AutoPortal") : turnOff("AutoPortal"); //auto Daily settings, hide until player has unlocked the Daily challenges var doDaily = game.challenges.Daily.filter(); (doDaily) ? turnOn("AutoStartDaily") : turnOff("AutoStartDaily"); @@ -932,4 +932,4 @@ function toggleAutoMaps(){ else setPageSetting('AutoMaps',1); document.getElementById("autoMapBtn").setAttribute("class", "noselect settingsBtn settingBtn" + autoTrimpSettings.AutoMaps.value); -} \ No newline at end of file +} From d99f8d25bd552d99a643093d5530bd11feac62a3 Mon Sep 17 00:00:00 2001 From: maurezen Date: Sun, 8 Sep 2019 21:42:15 +0300 Subject: [PATCH 078/194] #54 - U2 automation and stats pulled Zek's ratio for early u2 implemented separate ratios for u1 and u2 --- modules/perks.js | 58 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 41 insertions(+), 17 deletions(-) diff --git a/modules/perks.js b/modules/perks.js index 0397f3a27..a20087984 100644 --- a/modules/perks.js +++ b/modules/perks.js @@ -87,6 +87,18 @@ var presetListHtml = "\ \ \ "; + +//U2 +//[looting,toughness,power,motivation,pheromones,artisanistry,carpentry,prismal] +var preset_Rspace = [0, 0, 0, 0, 0, 0, 0, 0]; +var preset_RZek059 = [7, 10, 5, 1, 0.5, 2, 15, 9]; + +var presetListU2 = [preset_RZek059,preset_Rspace]; +var presetListHtmlU2 = "\ +\ +\ +"; + //Custom Creation for all perk customRatio boxes in Trimps Perk Window AutoPerks.createInput = function(perkname,div) { var perk1input = document.createElement("Input"); @@ -137,14 +149,24 @@ AutoPerks.displayGUI = function() { //Line 1 of the UI apGUI.$ratiosLine1 = document.createElement("DIV"); apGUI.$ratiosLine1.setAttribute('style', 'display: inline-block; text-align: left; width: 100%'); - var listratiosLine1 = ["Overkill","Resourceful","Coordinated","Resilience","Carpentry","Artisanistry"]; + var listratiosLine1; + if (game.global.universe == 1) { + listratiosLine1 = ["Overkill","Resourceful","Coordinated","Resilience","Carpentry","Artisanistry"]; + } else if (game.global.universe == 2) { + listratiosLine1 = ["Carpentry","Pheromones","Motivation","Artisanistry"]; + } for (var i in listratiosLine1) AutoPerks.createInput(listratiosLine1[i],apGUI.$ratiosLine1); apGUI.$customRatios.appendChild(apGUI.$ratiosLine1); //Line 2 of the UI apGUI.$ratiosLine2 = document.createElement("DIV"); apGUI.$ratiosLine2.setAttribute('style', 'display: inline-block; text-align: left; width: 100%'); - var listratiosLine2 = ["Pheromones","Motivation","Power","Looting","Cunning","Curious"]; + var listratiosLine2; + if (game.global.universe == 1) { + listratiosLine2 = ["Pheromones","Motivation","Power","Looting","Cunning","Curious"]; + } else if (game.global.universe == 2) { + listratiosLine2 = ["Power","Looting","Toughness","Prismal"]; + } for (var i in listratiosLine2) AutoPerks.createInput(listratiosLine2[i],apGUI.$ratiosLine2); //Create dump perk dropdown @@ -183,16 +205,17 @@ AutoPerks.displayGUI = function() { 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 - var loadLastPreset = localStorage.getItem('AutoperkSelectedRatioPresetID'); + apGUI.$ratioPreset.innerHTML = game.global.universe == 1 ? presetListHtml : presetListHtmlU2; + //Load the last ratio used + var loadLastPreset = localStorage.getItem(game.global.universe == 1 ? 'AutoperkSelectedRatioPresetID' : 'AutoperkSelectedRatioPresetIDU2'); 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") + itemName = game.global.universe == 1 ? 'AutoperkSelectedRatioPresetName' : 'AutoperkSelectedRatioPresetNameU2'; + if (loadLastPreset == 15 && !localStorage.getItem(itemName)) loadLastPreset = 25; + if (localStorage.getItem(itemName)=="customPreset") + loadLastPreset = 25; setID = loadLastPreset; } else @@ -223,7 +246,7 @@ AutoPerks.populateDumpPerkList = function() { html += ""; $dumpDropdown.innerHTML = html; //load the last dump preset used - var loadLastDump = localStorage.getItem('AutoperkSelectedDumpPresetID'); + var loadLastDump = localStorage.getItem(game.global.universe == 1 ? 'AutoperkSelectedDumpPresetID' : 'AutoperkSelectedDumpPresetIDU2'); if (loadLastDump != null) $dumpDropdown.selectedIndex = loadLastDump; else @@ -232,8 +255,8 @@ AutoPerks.populateDumpPerkList = function() { AutoPerks.saveDumpPerk = function() { var $dump = document.getElementById("dumpPerk"); - safeSetItems('AutoperkSelectedDumpPresetID', $dump.selectedIndex); - safeSetItems('AutoperkSelectedDumpPresetName', $dump.value); + safeSetItems(game.global.universe == 1 ? 'AutoperkSelectedDumpPresetID' : 'AutoperkSelectedDumpPresetIDU2', $dump.selectedIndex); + safeSetItems(game.global.universe == 1 ? 'AutoperkSelectedDumpPresetName' : 'AutoperkSelectedDumpPresetNameU2', $dump.value); } AutoPerks.saveCustomRatios = function() { @@ -243,7 +266,7 @@ AutoPerks.saveCustomRatios = function() { for(var i = 0; i < $perkRatioBoxes.length; i++) { customRatios.push({'id':$perkRatioBoxes[i].id,'value':parseFloat($perkRatioBoxes[i].value)}); } - safeSetItems('AutoPerksCustomRatios', JSON.stringify(customRatios) ); + safeSetItems(game.global.universe == 1 ? 'AutoPerksCustomRatios' : 'AutoPerksCustomRatiosU2', JSON.stringify(customRatios) ); } } @@ -270,7 +293,7 @@ AutoPerks.setDefaultRatios = function() { //If "Custom" dropdown is selected: if (ratioSet == $rp.length-1) { //Try to grab custom ratios from LocalStorage if they were saved. - var tmp = JSON.parse(localStorage.getItem('AutoPerksCustomRatios')); + var tmp = JSON.parse(localStorage.getItem(game.global.universe == 1 ? 'AutoPerksCustomRatios' : 'AutoPerksCustomRatiosU2')); if (tmp !== null) AutoPerks.GUI.$customRatios = tmp; else { @@ -288,8 +311,8 @@ AutoPerks.setDefaultRatios = function() { } } //save the last ratio used - safeSetItems('AutoperkSelectedRatioPresetID', ratioSet); - safeSetItems('AutoperkSelectedRatioPresetName', $rp.selectedOptions[0].id); + safeSetItems(game.global.universe == 1 ? 'AutoperkSelectedRatioPresetID' : 'AutoperkSelectedRatioPresetIDU2', ratioSet); + safeSetItems(game.global.universe == 1 ? 'AutoperkSelectedRatioPresetName' : 'AutoperkSelectedRatioPresetNameU2', $rp.selectedOptions[0].id); } //updates the internal perk variables with values grabbed from the custom ratio input boxes that the user may have changed. @@ -791,8 +814,9 @@ AutoPerks.VariablePerk = function(name, base, compounding, value, baseIncrease, this.spent = 0; // Total helium spent on each perk. function getRatiosFromPresets() { var valueArray = []; - for (var i=0; i Date: Sun, 8 Sep 2019 21:53:23 +0300 Subject: [PATCH 079/194] #54 - U2 automation and stats total owned perks list fixed --- modules/perks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/perks.js b/modules/perks.js index a20087984..a774267bd 100644 --- a/modules/perks.js +++ b/modules/perks.js @@ -951,7 +951,7 @@ AutoPerks.getOwnedPerks = function() { var perks = []; for (var name in game.portal){ perk = game.portal[name]; - if(perk.locked || (typeof perk.level === 'undefined')) continue; + if((game.global.universe == 1 ? perk.locked : perk.radLocked) || (typeof perk.level === 'undefined')) continue; perks.push(AutoPerks.getPerkByName(name)); } return perks; From 268e1ef52440d83d31699342e7c55c2f08945c31 Mon Sep 17 00:00:00 2001 From: maurezen Date: Sun, 8 Sep 2019 21:57:46 +0300 Subject: [PATCH 080/194] #54 - U2 automation and stats fixes u1 perks in u2 auto --- modules/perks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/perks.js b/modules/perks.js index a774267bd..31a1333c3 100644 --- a/modules/perks.js +++ b/modules/perks.js @@ -951,7 +951,7 @@ AutoPerks.getOwnedPerks = function() { var perks = []; for (var name in game.portal){ perk = game.portal[name]; - if((game.global.universe == 1 ? perk.locked : perk.radLocked) || (typeof perk.level === 'undefined')) continue; + if((game.global.universe == 1 ? perk.locked : (typeof perk.radLocked === 'undefined' || perk.radLocked)) || (typeof perk.level === 'undefined')) continue; perks.push(AutoPerks.getPerkByName(name)); } return perks; From f6e14c4a9cea7bf11287393fdaf66e70ebc5caba Mon Sep 17 00:00:00 2001 From: maurezen Date: Sun, 8 Sep 2019 22:01:49 +0300 Subject: [PATCH 081/194] #54 - U2 automation and stats default void map difficulty lowered to 0.25 --- modules/maps.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/maps.js b/modules/maps.js index a7fe97e0e..a9f963f20 100644 --- a/modules/maps.js +++ b/modules/maps.js @@ -535,8 +535,8 @@ function autoMap() { if(game.global.challengeActive == 'Toxicity') eAttack *= 5; //break to prevent finishing map to finish a challenge? //continue to check for doable map? - //allow player to kill itself if he wants to, make default difficulty equal to 1 - var diff = parseInt(getPageSetting('VoidCheck')) > 0 ? parseInt(getPageSetting('VoidCheck')) : 1; + //allow player to kill itself if he wants to, make default difficulty equal to 0.25 + var diff = parseInt(getPageSetting('VoidCheck')) > 0 ? parseInt(getPageSetting('VoidCheck')) : 0.25; var ourBlock = getBattleStats("block", true); //use block tooltip (after death block) instead of current army block. //@todo get rid of getbattlestats and extract "survives X hits" calculation to a single place if(ourHealth/diff < eAttack - ourBlock) { From 76dd63d279817a95910ec1a7c10429938b7b7cd0 Mon Sep 17 00:00:00 2001 From: maurezen Date: Mon, 9 Sep 2019 00:51:09 +0300 Subject: [PATCH 082/194] #54 - U2 automation and stats updated for heirlooms - used `getMaxCarriedHeirlooms()` instead of `game.global.maxCarriedHeirlooms`, those are different now. --- modules/heirlooms.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/heirlooms.js b/modules/heirlooms.js index 6b9367f6b..950371313 100644 --- a/modules/heirlooms.js +++ b/modules/heirlooms.js @@ -71,7 +71,7 @@ function autoHeirlooms2() { var originalLength = game.global.heirloomsExtra.length; for(var index=0; index < originalLength; index++) { var theLoom = game.global.heirloomsExtra[index]; - if ((theLoom.protected) && (game.global.heirloomsCarried.length < game.global.maxCarriedHeirlooms)){ + if ((theLoom.protected) && (game.global.heirloomsCarried.length < getMaxCarriedHeirlooms())){ selectHeirloom(index, 'heirloomsExtra'); carryHeirloom(); index--; originalLength--; //stop index-skipping/re-ordering (idk how else to do it). @@ -81,7 +81,7 @@ function autoHeirlooms2() { //now start by re-filling any empty carried slots with the most highly evaluated heirlooms //Alternates EQUALLY between Shield and Staff, putting the best ones of each. //PART 3: - while ((game.global.heirloomsCarried.length < game.global.maxCarriedHeirlooms) && game.global.heirloomsExtra.length > 0){ + while ((game.global.heirloomsCarried.length < getMaxCarriedHeirlooms()) && game.global.heirloomsExtra.length > 0){ //re-evaluate their worth (needed to refresh the worth array since we for sure re-arranged everything.) worthOfHeirlooms2(); if (worth2["Shield"].length > 0){ @@ -132,7 +132,7 @@ function autoHeirlooms() { //start by immediately carrying any protected heirlooms. for(var extra in game.global.heirloomsExtra) { var theLoom = game.global.heirloomsExtra[extra]; - if ((theLoom.protected) && (game.global.heirloomsCarried.length < game.global.maxCarriedHeirlooms)){ + if ((theLoom.protected) && (game.global.heirloomsCarried.length < getMaxCarriedHeirlooms())){ selectHeirloom(extra, 'heirloomsExtra'); carryHeirloom(); } @@ -153,7 +153,7 @@ function autoHeirlooms() { } } } - if (game.global.heirloomsCarried.length < game.global.maxCarriedHeirlooms){ + if (game.global.heirloomsCarried.length < getMaxCarriedHeirlooms()){ if(worth.Shield.length > 0) selectHeirloom(worth.Shield[0], 'heirloomsExtra'); else if(worth.Staff.length > 0) From c89d13656dcf189da0de36d446c96cb4b6bf1e03 Mon Sep 17 00:00:00 2001 From: maurezen Date: Mon, 9 Sep 2019 10:20:50 +0300 Subject: [PATCH 083/194] #54 - U2 automation and stats u2 portals recognition for graphs --- Graphs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Graphs.js b/Graphs.js index b3f15ab31..1b876b03a 100644 --- a/Graphs.js +++ b/Graphs.js @@ -359,7 +359,7 @@ function pushData() { var lifetime = (game.resources.helium.owned / (game.global.totalHeliumEarned-game.resources.helium.owned))*100; allSaveData.push({ - totalPortals: game.global.totalPortals, + totalPortals: totalPortals: game.global.totalPortals + game.global.totalRadPortals, heliumOwned: game.resources.helium.owned, radonOwned: game.resources.radon.owned, currentTime: new Date().getTime(), From e2e021fc1285586921bbdf1c1f4add9a9732dae5 Mon Sep 17 00:00:00 2001 From: maurezen Date: Mon, 9 Sep 2019 20:26:57 +0300 Subject: [PATCH 084/194] #54 - U2 automation and stats u2 portals recognition for graphs --- Graphs.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Graphs.js b/Graphs.js index 1b876b03a..6d21a8e24 100644 --- a/Graphs.js +++ b/Graphs.js @@ -276,11 +276,11 @@ function clearData(portal,clrall) { if(!portal) portal = 0; if (!clrall) { - while(allSaveData[0].totalPortals < game.global.totalPortals - portal) { + while(allSaveData[0].totalPortals < game.global.totalPortals + game.global.totalRadPortals - portal) { allSaveData.shift(); } } else { - while(allSaveData[0].totalPortals != game.global.totalPortals) { + while(allSaveData[0].totalPortals != game.global.totalPortals + game.global.totalRadPortals) { allSaveData.shift(); } } @@ -397,7 +397,7 @@ var graphAnal = []; function trackHourlyGraphAnalytics() { graphAnal.push({ currentTime: new Date().getTime(), - totalPortals: game.global.totalPortals, + totalPortals: game.global.totalPortals + game.global.totalRadPortals, heliumOwned: game.resources.helium.owned, highzone: game.global.highestLevelCleared, bones: game.global.b @@ -444,9 +444,9 @@ function gatherInfo() { //make sure data structures are ready initializeData(); //Track portal. - GraphsVars.aWholeNewPortal = GraphsVars.currentPortal != game.global.totalPortals; + GraphsVars.aWholeNewPortal = GraphsVars.currentPortal != game.global.totalPortals + game.global.totalRadPortals; if (GraphsVars.aWholeNewPortal) { - GraphsVars.currentPortal = game.global.totalPortals; + GraphsVars.currentPortal = game.global.totalPortals + game.global.totalRadPortals; //clear filtered loot data upon portaling. < 5 check to hopefully throw out bone portal shenanigans filteredLoot = { 'produced': {metal: 0, wood: 0, food: 0, gems: 0}, @@ -1361,7 +1361,7 @@ setInterval(getLootData, 15000); function lookUpZoneData(zone,portal) { if (portal == null) - portal = game.global.totalPortals; + portal = game.global.totalPortals + game.global.totalRadPortals; for (var i=allSaveData.length-1,end=0; i >= 0; i--) { if (allSaveData[i].totalPortals != portal) continue; if (allSaveData[i].world != zone) continue; From 9515fa9b7f6cbcae090e0fae793918a581ae1801 Mon Sep 17 00:00:00 2001 From: maurezen Date: Mon, 9 Sep 2019 21:48:52 +0300 Subject: [PATCH 085/194] #54 - U2 automation and stats added meteorologists to autojobs --- modules/jobs.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/jobs.js b/modules/jobs.js index 81cea080a..9719e9a1a 100644 --- a/modules/jobs.js +++ b/modules/jobs.js @@ -178,6 +178,10 @@ function buyJobs() { safeBuyJob('Scientist', buyScientists); } } + //Meteorologists + if (game.jobs.Meteorologist.locked == 0) { + checkFireandHire('Meteorologist'); + } //Trainers: if (getPageSetting('MaxTrainers') > game.jobs.Trainer.owned || getPageSetting('MaxTrainers') == -1) { // capped to tributes percentage. From 2a735c5d41ad2faba12c01abc2f05ffc0e0d846e Mon Sep 17 00:00:00 2001 From: maurezen Date: Mon, 9 Sep 2019 22:22:55 +0300 Subject: [PATCH 086/194] #54 - U2 automation and stats autoperks ignores u2 perks no more --- modules/perks.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/perks.js b/modules/perks.js index 31a1333c3..72b2392fa 100644 --- a/modules/perks.js +++ b/modules/perks.js @@ -926,7 +926,8 @@ AutoPerks.getSomePerks = function(fixed,variable,tier2,allperks) { for(var i in AutoPerks.perkHolder) { var name = AutoPerks.capitaliseFirstLetter(AutoPerks.perkHolder[i].name); var perk = game.portal[name]; - if(perk.locked || (typeof perk.level === 'undefined')) continue; + if (game.global.universe == 1 ? (typeof perk.locked === 'undefined' || perk.locked) : (typeof perk.radLocked === 'undefined' || perk.radLocked)) continue; + if (game.global.universe == 1 ? typeof perk.level === 'undefined' : typeof perk.radLevel === 'undefined') continue; if ((fixed && AutoPerks.perkHolder[i].fixed) || (variable && !AutoPerks.perkHolder[i].fixed) || (tier2 && AutoPerks.perkHolder[i].type == "linear" && !AutoPerks.perkHolder[i].fluffy) || @@ -951,7 +952,8 @@ AutoPerks.getOwnedPerks = function() { var perks = []; for (var name in game.portal){ perk = game.portal[name]; - if((game.global.universe == 1 ? perk.locked : (typeof perk.radLocked === 'undefined' || perk.radLocked)) || (typeof perk.level === 'undefined')) continue; + if (game.global.universe == 1 ? (typeof perk.locked === 'undefined' || perk.locked) : (typeof perk.radLocked === 'undefined' || perk.radLocked)) continue; + if (game.global.universe == 1 ? typeof perk.level === 'undefined' : typeof perk.radLevel === 'undefined') continue; perks.push(AutoPerks.getPerkByName(name)); } return perks; From 8cfcf6377d18be191874b10c02b988e11ee0636e Mon Sep 17 00:00:00 2001 From: maurezen Date: Wed, 11 Sep 2019 00:12:56 +0300 Subject: [PATCH 087/194] #54 - U2 automation and stats fix a typo in graph that caused a parser error and prevented graphs.js to be loaded and everything else failed as well --- Graphs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Graphs.js b/Graphs.js index 6d21a8e24..5efc18586 100644 --- a/Graphs.js +++ b/Graphs.js @@ -359,7 +359,7 @@ function pushData() { var lifetime = (game.resources.helium.owned / (game.global.totalHeliumEarned-game.resources.helium.owned))*100; allSaveData.push({ - totalPortals: totalPortals: game.global.totalPortals + game.global.totalRadPortals, + totalPortals: game.global.totalPortals + game.global.totalRadPortals, heliumOwned: game.resources.helium.owned, radonOwned: game.resources.radon.owned, currentTime: new Date().getTime(), From ba6cb65216d351d39b18044b774bbd94c2502b7a Mon Sep 17 00:00:00 2001 From: maurezen Date: Wed, 11 Sep 2019 00:39:30 +0300 Subject: [PATCH 088/194] #54 - U2 automation and stats fixed autoperks ratios bug, they behave sane-ish in u2 now --- modules/perks.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/perks.js b/modules/perks.js index 72b2392fa..9b926da94 100644 --- a/modules/perks.js +++ b/modules/perks.js @@ -323,7 +323,10 @@ AutoPerks.updatePerkRatios = function() { currentPerk = AutoPerks.getPerkByName($perkRatioBoxes[i].id.substring(0, $perkRatioBoxes[i].id.length - 5)); // Remove "ratio" from the id to obtain the perk name currentPerk.updatedValue = parseFloat($perkRatioBoxes[i].value); } - AutoPerks.getPerkByName("toughness").updatedValue = AutoPerks.getPerkByName("resilience").updatedValue / 2; + resilience = AutoPerks.getPerkByName("resilience"); + if (!(typeof resilience === 'undefined')) { + AutoPerks.getPerkByName("toughness").updatedValue = resilience.updatedValue / 2; + } // Manually update tier II perks var tierIIPerks = AutoPerks.getTierIIPerks(); for(var i in tierIIPerks) From 0fe62563a0b7b6a2c1b1a204387c127701d72f1b Mon Sep 17 00:00:00 2001 From: maurezen Date: Fri, 13 Sep 2019 15:58:18 +0300 Subject: [PATCH 089/194] #61 - Full equip criterias need to be updated made the threshold configurable and set the default to 10s --- modules/equipment.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/equipment.js b/modules/equipment.js index d424bac01..13dfcc622 100644 --- a/modules/equipment.js +++ b/modules/equipment.js @@ -5,6 +5,7 @@ MODULES["equipment"].numHitsSurvivedScry = 80; MODULES["equipment"].enoughDamageCutoff = 4; //above this the game will buy attack equipment MODULES["equipment"].capDivisor = 10; //Your Equipment cap divided by this will give you the lower cap for liquified and overkilled zones MODULES["equipment"].alwaysLvl2 = true; //Always buys the 2nd level of equipment. Its the most effective. +MODULES["equipment"].quickMs = 10000; MODULES["equipment"].waitTill60 = true; // 'Skip Gear Level 58&59', 'Dont Buy Gear during level 58 and 59, wait till level 60, when cost drops down to 10% MODULES["equipment"].equipHealthDebugMessage = false; //this repeats a message when you don't have enough health. set to false to stop the spam. @@ -197,7 +198,7 @@ function evaluateEquipmentEfficiency(equipName) { var isLiquified = (game.options.menu.liquification.enabled && game.talents.liquification.purchased && !game.global.mapsActive && game.global.gridArray && game.global.gridArray[0] && game.global.gridArray[0].name == "Liquimp"); //Run a quick Time estimate and if we complete it in 25 seconds or less, use 1/10th of our cap just so we can continue (MODULES["equipment"].capDivisor=10;) var time = mapTimeEstimater(); - var isQuick = (time!=0) && (time < 25000) && (!isActiveSpireAT());; + var isQuick = (time!=0) && (time < MODULES["equipment"].quickMs) && (!isActiveSpireAT());; var cap = getPageSetting('CapEquip2'); if ((isLiquified || isQuick) && cap > 0 && gameResource.level >= (cap / MODULES["equipment"].capDivisor)) { Factor = 0; From f1ec13ca10675c6914e8a12900d3d79df756f24e Mon Sep 17 00:00:00 2001 From: maurezen Date: Sat, 21 Sep 2019 11:40:40 +0300 Subject: [PATCH 090/194] #62 - Max tox setting ignored Stopped ignoring max tox being disabled when there's a need to do void maps --- modules/maps.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/maps.js b/modules/maps.js index a9f963f20..20bf3950e 100644 --- a/modules/maps.js +++ b/modules/maps.js @@ -314,7 +314,7 @@ 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) From 4b260d1c11994c7214f8b6701f50249e36129710 Mon Sep 17 00:00:00 2001 From: maurezen Date: Sun, 22 Sep 2019 12:38:22 +0300 Subject: [PATCH 091/194] #54 - U2 automation and stats added equality to perk list as a fixed perk --- modules/perks.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/perks.js b/modules/perks.js index 9b926da94..711cf4a74 100644 --- a/modules/perks.js +++ b/modules/perks.js @@ -887,13 +887,14 @@ AutoPerks.initializePerks = function () { //U2 perks var prismal = new AutoPerks.VariablePerk("prismal", 1, true, 6, 0.1); - + var equality = new AutoPerks.FixedPerk("equality", 1, 10); + AutoPerks.perkHolder = []; //gather these into an array of objects if (game.global.universe == 1) { AutoPerks.perkHolder = [siphonology, anticipation, meditation, relentlessness, range, agility, bait, trumps, packrat, looting, toughness, power, motivation, pheromones, artisanistry, carpentry, resilience, coordinated, resourceful, overkill, capable, cunning, curious, classy, toughness_II, power_II, motivation_II, carpentry_II, looting_II]; } else if (game.global.universe == 2) { - AutoPerks.perkHolder = [range, agility, bait, trumps, packrat, looting, toughness, power, motivation, pheromones, artisanistry, carpentry, prismal]; + AutoPerks.perkHolder = [range, agility, bait, trumps, packrat, looting, toughness, power, motivation, pheromones, artisanistry, carpentry, prismal, equality]; } //initialize basics on all. for(var i in AutoPerks.perkHolder) { From 5ebe9c54e9adc4c4a97da10768b5332e5e4f3be2 Mon Sep 17 00:00:00 2001 From: maurezen Date: Sun, 22 Sep 2019 13:00:15 +0300 Subject: [PATCH 092/194] #54 - U2 automation and stats added Buble to autoportal at challenge. he/hr works as ra/hr without any change. --- SettingsGUI.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SettingsGUI.js b/SettingsGUI.js index 586616338..b9c7efe3e 100644 --- a/SettingsGUI.js +++ b/SettingsGUI.js @@ -257,7 +257,7 @@ function initializeAllSettings() { 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', 'Domination', 'Custom'], "Core"); + 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', 'Bublé', 'Decay', 'Electricity', 'Life', 'Crushed', 'Nom', 'Toxicity', 'Watch', 'Lead', 'Corrupted', 'Domination', 'Custom'], "Core"); //document.getElementById("AutoPortal").style="font-size: 1.0vw;"; //fit it on 1 line. 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', 'Domination'], "Core"); //document.getElementById("HeliumHourChallengeLabel").innerHTML = "Portal Challenge:"; //fit it on 1 line. From 681f8b2dd4a6383ab32518cd0e01d14a7bbf625e Mon Sep 17 00:00:00 2001 From: maurezen Date: Sun, 22 Sep 2019 13:02:43 +0300 Subject: [PATCH 093/194] #54 - U2 automation and stats fixed buble addition --- SettingsGUI.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SettingsGUI.js b/SettingsGUI.js index b9c7efe3e..725b645af 100644 --- a/SettingsGUI.js +++ b/SettingsGUI.js @@ -257,9 +257,9 @@ function initializeAllSettings() { 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', 'Bublé', 'Decay', 'Electricity', 'Life', 'Crushed', 'Nom', 'Toxicity', 'Watch', 'Lead', 'Corrupted', 'Domination', 'Custom'], "Core"); + 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', 'Domination', 'Custom'], "Core"); //document.getElementById("AutoPortal").style="font-size: 1.0vw;"; //fit it on 1 line. - 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', 'Domination'], "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', 'Bublé', 'Decay', 'Electricity', 'Life', 'Crushed', 'Nom', 'Toxicity', 'Watch', 'Lead', 'Corrupted', 'Domination'], "Core"); //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"); From fc8da050adda2ca116bd74566de734f131955a5b Mon Sep 17 00:00:00 2001 From: maurezen Date: Sun, 22 Sep 2019 13:16:47 +0300 Subject: [PATCH 094/194] #54 - U2 automation and stats figured Equality in getEnemyMaxDamage calculations (those were used for equip) --- modules/query.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/query.js b/modules/query.js index 11722223e..4d04f21a3 100644 --- a/modules/query.js +++ b/modules/query.js @@ -117,6 +117,8 @@ function getEnemyMaxAttack(world, level, name, diff, corrupt) { else { amt *= getCorruptScale("attack"); } + //gotta take care of Equality as well + if (getPerkLevel("Equality")) amt *= game.portal.Equality.getMult(); return Math.floor(amt); } From 36077553b4c3956b680531267330097ac28a1186 Mon Sep 17 00:00:00 2001 From: maurezen Date: Mon, 7 Oct 2019 20:22:48 +0300 Subject: [PATCH 095/194] #54 - U2 automation and stats vanilla map at zone support for u2 autoabandon fixes - now autoabandons for max map bonus as well --- modules/maps.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/modules/maps.js b/modules/maps.js index 20bf3950e..b5af02092 100644 --- a/modules/maps.js +++ b/modules/maps.js @@ -359,7 +359,12 @@ 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.universe == 1 && game.options.menu.mapAtZone.setZone == game.global.world) + || (game.global.universe == 2 && game.options.menu.mapAtZone.setZoneU2 == game.global.world)) + && !isActiveSpireAT()); if (vanillaMapatZone) shouldDoMaps = true; @@ -648,9 +653,9 @@ function autoMap() { 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) + //Get Impatient/Abandon if: (need prestige / _NEED_ to do void maps / need max map bonus / 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 || + (needPrestige || doVoids || doMaxMapBonus || ((game.global.challengeActive == 'Lead' && !challSQ) && game.global.world % 2 == 1) || (!enoughDamage && enoughHealth && game.global.lastClearedCell < 9) || (shouldFarm && game.global.lastClearedCell >= customVars.shouldFarmCell) || From 2573aa86b97900702679aa989d8d173b961050e0 Mon Sep 17 00:00:00 2001 From: maurezen Date: Sun, 13 Oct 2019 00:17:23 +0300 Subject: [PATCH 096/194] #54 - U2 automation and stats autogather2 fix autogather trappapalooza fix --- modules/gather.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/gather.js b/modules/gather.js index f2bae35c7..29e1e4b8c 100644 --- a/modules/gather.js +++ b/modules/gather.js @@ -13,7 +13,7 @@ function manualLabor() { var notFullPop = game.resources.trimps.owned < game.resources.trimps.realMax(); var trapTrimpsOK = getPageSetting('TrapTrimps'); var targetBreed = getPageSetting('GeneticistTimer'); - var trapperTrapUntilFull = game.global.challengeActive == "Trapper" && notFullPop; + var trapperTrapUntilFull = (game.global.challengeActive == "Trapper" || game.global.challengeActive == "Trappapalooza") && notFullPop; var watchJumpstartTraps = game.global.challengeActive == "Watch" && notFullPop; var hasTurkimp = game.talents.turkimp2.purchased || game.global.turkimpTimer > 0; @@ -131,9 +131,9 @@ function manualLabor2() { var notFullPop = game.resources.trimps.owned < game.resources.trimps.realMax(); var trapTrimpsOK = getPageSetting('TrapTrimps'); var targetBreed = getPageSetting('GeneticistTimer'); - var trapperTrapUntilFull = game.global.challengeActive == "Trapper" && notFullPop; + var trapperTrapUntilFull = (game.global.challengeActive == "Trapper" || game.global.challengeActive == "Trappapalooza") && notFullPop; var watchJumpstartTraps = game.global.challengeActive == "Watch" && notFullPop; - var hasTurkimp = game.talents.turkimp4.purchased || game.global.turkimpTimer > 0; + var hasTurkimp = game.talents.turkimp2.purchased || game.global.turkimpTimer > 0; //FRESH GAME LOWLEVEL NOHELIUM CODE. if (game.global.world <=3 && game.global.totalHeliumEarned<=5000) { From 463459db74d87003c8d7efa242e98fa7027fee8c Mon Sep 17 00:00:00 2001 From: maurezen Date: Sun, 13 Oct 2019 03:41:02 +0300 Subject: [PATCH 097/194] #54 - U2 automation and stats added resilience to u2 perk list (trappapalooza) added criticality to u2 perk list (duel), got it its own ratio made equality dynamic pulled Zek's melt preset --- modules/perks.js | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/modules/perks.js b/modules/perks.js index 711cf4a74..4576f3ca8 100644 --- a/modules/perks.js +++ b/modules/perks.js @@ -89,13 +89,15 @@ var presetListHtml = "\ "; //U2 -//[looting,toughness,power,motivation,pheromones,artisanistry,carpentry,prismal] +//[looting,toughness,power,motivation,pheromones,artisanistry,carpentry,prismal,equality,criticality] var preset_Rspace = [0, 0, 0, 0, 0, 0, 0, 0]; -var preset_RZek059 = [7, 10, 5, 1, 0.5, 2, 15, 9]; +var preset_RZek059 = [7, 10, 5, 1, 0.5, 2, 12, 9, 0.5, 2]; +var preset_RZekmelt = [10, 0.5, 2, 0.5, 0.3, 1.2, 3, 0.5, 1, 3]; -var presetListU2 = [preset_RZek059,preset_Rspace]; +var presetListU2 = [preset_RZek059,preset_RZekmelt,preset_Rspace]; var presetListHtmlU2 = "\ \ +\ \ "; @@ -153,8 +155,8 @@ AutoPerks.displayGUI = function() { if (game.global.universe == 1) { listratiosLine1 = ["Overkill","Resourceful","Coordinated","Resilience","Carpentry","Artisanistry"]; } else if (game.global.universe == 2) { - listratiosLine1 = ["Carpentry","Pheromones","Motivation","Artisanistry"]; - } + listratiosLine1 = ["Equality", "Carpentry","Pheromones","Motivation","Artisanistry"]; + } for (var i in listratiosLine1) AutoPerks.createInput(listratiosLine1[i],apGUI.$ratiosLine1); apGUI.$customRatios.appendChild(apGUI.$ratiosLine1); @@ -165,7 +167,7 @@ AutoPerks.displayGUI = function() { if (game.global.universe == 1) { listratiosLine2 = ["Pheromones","Motivation","Power","Looting","Cunning","Curious"]; } else if (game.global.universe == 2) { - listratiosLine2 = ["Power","Looting","Toughness","Prismal"]; + ["Power","Looting","Toughness","Prismal","Criticality"]; } for (var i in listratiosLine2) AutoPerks.createInput(listratiosLine2[i],apGUI.$ratiosLine2); @@ -887,14 +889,17 @@ AutoPerks.initializePerks = function () { //U2 perks var prismal = new AutoPerks.VariablePerk("prismal", 1, true, 6, 0.1); - var equality = new AutoPerks.FixedPerk("equality", 1, 10); + //10% compounding + var equality = new AutoPerks.VariablePerk("equality", 1, true, 12, 0.11111); + equality.exprate = 1.5; + var criticality = new AutoPerks.VariablePerk("criticality", 100, true, 10, 0.1); AutoPerks.perkHolder = []; //gather these into an array of objects if (game.global.universe == 1) { AutoPerks.perkHolder = [siphonology, anticipation, meditation, relentlessness, range, agility, bait, trumps, packrat, looting, toughness, power, motivation, pheromones, artisanistry, carpentry, resilience, coordinated, resourceful, overkill, capable, cunning, curious, classy, toughness_II, power_II, motivation_II, carpentry_II, looting_II]; } else if (game.global.universe == 2) { - AutoPerks.perkHolder = [range, agility, bait, trumps, packrat, looting, toughness, power, motivation, pheromones, artisanistry, carpentry, prismal, equality]; + AutoPerks.perkHolder = [range, agility, bait, trumps, packrat, looting, toughness, resilience, power, motivation, pheromones, artisanistry, carpentry, prismal, equality]; } //initialize basics on all. for(var i in AutoPerks.perkHolder) { From a2a86657060248a4289b38e144509fe8710cdee8 Mon Sep 17 00:00:00 2001 From: maurezen Date: Sun, 13 Oct 2019 03:42:51 +0300 Subject: [PATCH 098/194] #54 - U2 automation and stats syntax fix --- modules/perks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/perks.js b/modules/perks.js index 4576f3ca8..37082cd57 100644 --- a/modules/perks.js +++ b/modules/perks.js @@ -167,7 +167,7 @@ AutoPerks.displayGUI = function() { if (game.global.universe == 1) { listratiosLine2 = ["Pheromones","Motivation","Power","Looting","Cunning","Curious"]; } else if (game.global.universe == 2) { - ["Power","Looting","Toughness","Prismal","Criticality"]; + listratiosLine2 = ["Power","Looting","Toughness","Prismal","Criticality"];["Power","Looting","Toughness","Prismal","Criticality"]; } for (var i in listratiosLine2) AutoPerks.createInput(listratiosLine2[i],apGUI.$ratiosLine2); From d6c9e9bfe79384cf0128081686881823baecb4b2 Mon Sep 17 00:00:00 2001 From: maurezen Date: Sun, 13 Oct 2019 03:47:03 +0300 Subject: [PATCH 099/194] #54 - U2 automation and stats one more syntax fix --- modules/perks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/perks.js b/modules/perks.js index 37082cd57..f161402e1 100644 --- a/modules/perks.js +++ b/modules/perks.js @@ -167,7 +167,7 @@ AutoPerks.displayGUI = function() { if (game.global.universe == 1) { listratiosLine2 = ["Pheromones","Motivation","Power","Looting","Cunning","Curious"]; } else if (game.global.universe == 2) { - listratiosLine2 = ["Power","Looting","Toughness","Prismal","Criticality"];["Power","Looting","Toughness","Prismal","Criticality"]; + listratiosLine2 = ["Power","Looting","Toughness","Prismal","Criticality"]; } for (var i in listratiosLine2) AutoPerks.createInput(listratiosLine2[i],apGUI.$ratiosLine2); From 09ef219f05692a464f3857b04eae7e78c10aa917 Mon Sep 17 00:00:00 2001 From: maurezen Date: Sun, 13 Oct 2019 04:23:21 +0300 Subject: [PATCH 100/194] #54 - U2 automation and stats ok forgetting criticality is bad --- modules/perks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/perks.js b/modules/perks.js index f161402e1..7f8bcba26 100644 --- a/modules/perks.js +++ b/modules/perks.js @@ -899,7 +899,7 @@ AutoPerks.initializePerks = function () { if (game.global.universe == 1) { AutoPerks.perkHolder = [siphonology, anticipation, meditation, relentlessness, range, agility, bait, trumps, packrat, looting, toughness, power, motivation, pheromones, artisanistry, carpentry, resilience, coordinated, resourceful, overkill, capable, cunning, curious, classy, toughness_II, power_II, motivation_II, carpentry_II, looting_II]; } else if (game.global.universe == 2) { - AutoPerks.perkHolder = [range, agility, bait, trumps, packrat, looting, toughness, resilience, power, motivation, pheromones, artisanistry, carpentry, prismal, equality]; + AutoPerks.perkHolder = [range, agility, bait, trumps, packrat, looting, toughness, resilience, power, motivation, pheromones, artisanistry, carpentry, prismal, equality, criticality]; } //initialize basics on all. for(var i in AutoPerks.perkHolder) { From 9b0a7e4618485d31abaaba34c13abe16dd5065b7 Mon Sep 17 00:00:00 2001 From: maurezen Date: Sun, 13 Oct 2019 04:38:29 +0300 Subject: [PATCH 101/194] #54 - U2 automation and stats some indexing issues with perks got resilience its own setting --- modules/perks.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/modules/perks.js b/modules/perks.js index 7f8bcba26..6d677402c 100644 --- a/modules/perks.js +++ b/modules/perks.js @@ -89,15 +89,15 @@ var presetListHtml = "\ "; //U2 -//[looting,toughness,power,motivation,pheromones,artisanistry,carpentry,prismal,equality,criticality] -var preset_Rspace = [0, 0, 0, 0, 0, 0, 0, 0]; -var preset_RZek059 = [7, 10, 5, 1, 0.5, 2, 12, 9, 0.5, 2]; -var preset_RZekmelt = [10, 0.5, 2, 0.5, 0.3, 1.2, 3, 0.5, 1, 3]; +//[looting,toughness,power,motivation,pheromones,artisanistry,carpentry,resilience,prismal,equality,criticality] +var preset_Rspace = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; +var preset_RZek059 = [7, 10, 5, 1, 0.5, 2, 12, 0, 9, 0.5, 2]; +var preset_RZekmelt = [10, 0.5, 2, 0.5, 0.3, 1.2, 3, 1, 0.5, 1, 3]; var presetListU2 = [preset_RZek059,preset_RZekmelt,preset_Rspace]; var presetListHtmlU2 = "\ -\ -\ +\ +\ \ "; @@ -155,7 +155,7 @@ AutoPerks.displayGUI = function() { if (game.global.universe == 1) { listratiosLine1 = ["Overkill","Resourceful","Coordinated","Resilience","Carpentry","Artisanistry"]; } else if (game.global.universe == 2) { - listratiosLine1 = ["Equality", "Carpentry","Pheromones","Motivation","Artisanistry"]; + listratiosLine1 = ["Equality", "Carpentry","Pheromones","Motivation","Artisanistry","Resilience"]; } for (var i in listratiosLine1) AutoPerks.createInput(listratiosLine1[i],apGUI.$ratiosLine1); @@ -170,7 +170,7 @@ AutoPerks.displayGUI = function() { listratiosLine2 = ["Power","Looting","Toughness","Prismal","Criticality"]; } for (var i in listratiosLine2) - AutoPerks.createInput(listratiosLine2[i],apGUI.$ratiosLine2); + AutoPerks.createInput(listratiosLine2[i],apGUI.$ratiosLine2); //Create dump perk dropdown apGUI.$dumpperklabel = document.createElement("Label"); apGUI.$dumpperklabel.id = 'DumpPerk Label'; @@ -888,9 +888,9 @@ AutoPerks.initializePerks = function () { var looting_II = new AutoPerks.ArithmeticPerk("looting_II", 100000, 10000, 0.0025, looting); //U2 perks - var prismal = new AutoPerks.VariablePerk("prismal", 1, true, 6, 0.1); + var prismal = new AutoPerks.VariablePerk("prismal", 1, true, 8, 0.1); //10% compounding - var equality = new AutoPerks.VariablePerk("equality", 1, true, 12, 0.11111); + var equality = new AutoPerks.VariablePerk("equality", 1, true, 9, 0.11111); equality.exprate = 1.5; var criticality = new AutoPerks.VariablePerk("criticality", 100, true, 10, 0.1); From bbfe0f7d99945ffcc6e2c805bf9e74de207104fc Mon Sep 17 00:00:00 2001 From: maurezen Date: Sun, 13 Oct 2019 04:47:43 +0300 Subject: [PATCH 102/194] #54 - U2 automation and stats Added Melt to challenge list --- SettingsGUI.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SettingsGUI.js b/SettingsGUI.js index 725b645af..01c406c32 100644 --- a/SettingsGUI.js +++ b/SettingsGUI.js @@ -257,9 +257,9 @@ function initializeAllSettings() { 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', 'Domination', 'Custom'], "Core"); + 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', 'Bublé', 'Melt', 'Decay', 'Electricity', 'Life', 'Crushed', 'Nom', 'Toxicity', 'Watch', 'Lead', 'Corrupted', 'Domination', 'Custom'], "Core"); //document.getElementById("AutoPortal").style="font-size: 1.0vw;"; //fit it on 1 line. - 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', 'Bublé', 'Decay', 'Electricity', 'Life', 'Crushed', 'Nom', 'Toxicity', 'Watch', 'Lead', 'Corrupted', 'Domination'], "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', 'Bublé', 'Melt', 'Decay', 'Electricity', 'Life', 'Crushed', 'Nom', 'Toxicity', 'Watch', 'Lead', 'Corrupted', 'Domination'], "Core"); //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"); From 4a2928a37b9de929160cbe59ec36d867055dd9c3 Mon Sep 17 00:00:00 2001 From: maurezen Date: Sun, 13 Oct 2019 16:47:09 +0300 Subject: [PATCH 103/194] #54 - U2 automation and stats a bit more of melt-aware portal logic --- modules/portal.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/portal.js b/modules/portal.js index fbce8d58b..88df9dd09 100644 --- a/modules/portal.js +++ b/modules/portal.js @@ -82,6 +82,7 @@ function autoPortal() { break; case "Balance": case "Decay": + case "Melt": case "Electricity": case "Life": case "Crushed": @@ -166,6 +167,7 @@ function findOutCurrentPortalLevel() { var portalLevelName = { "Balance" : 41, + "Melt": 51, "Decay" : 56, "Electricity" : 82, "Crushed" : 126, From 8e55dfd3901c5b9c95f959286bc48a58b85e2a1c Mon Sep 17 00:00:00 2001 From: maurezen Date: Tue, 15 Oct 2019 10:29:49 +0300 Subject: [PATCH 104/194] #54 - U2 automation and stats adding melting point to automaps --- modules/maps.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/maps.js b/modules/maps.js index b5af02092..799f7c3b1 100644 --- a/modules/maps.js +++ b/modules/maps.js @@ -437,6 +437,10 @@ function autoMap() { break; } var dont = game.global.runningChallengeSquared; + if (theMap.name == 'Melting Point' && game.global.challengeActive == "Melt" && !dont) { + selectedMap = theMap.id; + break; + } 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; From 0e70e9d42d40756c9a0e9c476a9ed57e14b37028 Mon Sep 17 00:00:00 2001 From: maurezen Date: Wed, 16 Oct 2019 22:21:45 +0300 Subject: [PATCH 105/194] #54 - U2 automation and stats don't run Melting Point earlier than z51 --- modules/maps.js | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/maps.js b/modules/maps.js index 799f7c3b1..577953540 100644 --- a/modules/maps.js +++ b/modules/maps.js @@ -438,6 +438,7 @@ function autoMap() { } var dont = game.global.runningChallengeSquared; if (theMap.name == 'Melting Point' && game.global.challengeActive == "Melt" && !dont) { + if (game.global.world < 51) continue; selectedMap = theMap.id; break; } From f98b8bd12a4144d4a0087ca00984dbaa1206130b Mon Sep 17 00:00:00 2001 From: maurezen Date: Tue, 22 Oct 2019 21:56:08 +0300 Subject: [PATCH 106/194] #54 - U2 automation and stats added tenacity perk --- modules/perks.js | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/modules/perks.js b/modules/perks.js index 6d677402c..d1c0290f4 100644 --- a/modules/perks.js +++ b/modules/perks.js @@ -89,10 +89,10 @@ var presetListHtml = "\ "; //U2 -//[looting,toughness,power,motivation,pheromones,artisanistry,carpentry,resilience,prismal,equality,criticality] -var preset_Rspace = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; -var preset_RZek059 = [7, 10, 5, 1, 0.5, 2, 12, 0, 9, 0.5, 2]; -var preset_RZekmelt = [10, 0.5, 2, 0.5, 0.3, 1.2, 3, 1, 0.5, 1, 3]; +//[looting,toughness,power,motivation,pheromones,artisanistry,carpentry,resilience,prismal,equality,criticality, tenacity] +var preset_Rspace = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; +var preset_RZek059 = [7, 10, 5, 1, 0.5, 2, 12, 0, 9, 0.5, 2, 25]; +var preset_RZekmelt = [10, 0.5, 2, 0.5, 0.3, 1.2, 3, 1, 0.5, 1, 3, 18]; var presetListU2 = [preset_RZek059,preset_RZekmelt,preset_Rspace]; var presetListHtmlU2 = "\ @@ -157,8 +157,9 @@ AutoPerks.displayGUI = function() { } else if (game.global.universe == 2) { listratiosLine1 = ["Equality", "Carpentry","Pheromones","Motivation","Artisanistry","Resilience"]; } - for (var i in listratiosLine1) + for (var i in listratiosLine1) { AutoPerks.createInput(listratiosLine1[i],apGUI.$ratiosLine1); + } apGUI.$customRatios.appendChild(apGUI.$ratiosLine1); //Line 2 of the UI apGUI.$ratiosLine2 = document.createElement("DIV"); @@ -167,10 +168,11 @@ AutoPerks.displayGUI = function() { if (game.global.universe == 1) { listratiosLine2 = ["Pheromones","Motivation","Power","Looting","Cunning","Curious"]; } else if (game.global.universe == 2) { - listratiosLine2 = ["Power","Looting","Toughness","Prismal","Criticality"]; + listratiosLine2 = ["Power","Looting","Toughness","Prismal","Criticality", "Tenacity"]; } - for (var i in listratiosLine2) + for (var i in listratiosLine2) { AutoPerks.createInput(listratiosLine2[i],apGUI.$ratiosLine2); + } //Create dump perk dropdown apGUI.$dumpperklabel = document.createElement("Label"); apGUI.$dumpperklabel.id = 'DumpPerk Label'; @@ -893,13 +895,15 @@ AutoPerks.initializePerks = function () { var equality = new AutoPerks.VariablePerk("equality", 1, true, 9, 0.11111); equality.exprate = 1.5; var criticality = new AutoPerks.VariablePerk("criticality", 100, true, 10, 0.1); + //10% compounding + var tenacity = new AutoPerks.VariablePerk("tenacity", 50000000, true, 11, 0.1); AutoPerks.perkHolder = []; //gather these into an array of objects if (game.global.universe == 1) { AutoPerks.perkHolder = [siphonology, anticipation, meditation, relentlessness, range, agility, bait, trumps, packrat, looting, toughness, power, motivation, pheromones, artisanistry, carpentry, resilience, coordinated, resourceful, overkill, capable, cunning, curious, classy, toughness_II, power_II, motivation_II, carpentry_II, looting_II]; } else if (game.global.universe == 2) { - AutoPerks.perkHolder = [range, agility, bait, trumps, packrat, looting, toughness, resilience, power, motivation, pheromones, artisanistry, carpentry, prismal, equality, criticality]; + AutoPerks.perkHolder = [range, agility, bait, trumps, packrat, looting, toughness, resilience, power, motivation, pheromones, artisanistry, carpentry, prismal, equality, criticality, tenacity]; } //initialize basics on all. for(var i in AutoPerks.perkHolder) { From caf20dc457ae984a604cf58c855b11b327eb6330 Mon Sep 17 00:00:00 2001 From: maurezen Date: Sat, 2 Nov 2019 11:17:05 +0300 Subject: [PATCH 107/194] #54 - U2 automation and stats added overkill --- modules/perks.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/perks.js b/modules/perks.js index d1c0290f4..44a350e59 100644 --- a/modules/perks.js +++ b/modules/perks.js @@ -903,7 +903,8 @@ AutoPerks.initializePerks = function () { if (game.global.universe == 1) { AutoPerks.perkHolder = [siphonology, anticipation, meditation, relentlessness, range, agility, bait, trumps, packrat, looting, toughness, power, motivation, pheromones, artisanistry, carpentry, resilience, coordinated, resourceful, overkill, capable, cunning, curious, classy, toughness_II, power_II, motivation_II, carpentry_II, looting_II]; } else if (game.global.universe == 2) { - AutoPerks.perkHolder = [range, agility, bait, trumps, packrat, looting, toughness, resilience, power, motivation, pheromones, artisanistry, carpentry, prismal, equality, criticality, tenacity]; + var overkill = new AutoPerks.FixedPerk("overkill", 1000000, 30); + AutoPerks.perkHolder = [range, agility, bait, trumps, packrat, overkill, looting, toughness, resilience, power, motivation, pheromones, artisanistry, carpentry, prismal, equality, criticality, tenacity]; } //initialize basics on all. for(var i in AutoPerks.perkHolder) { From 0854ff0623eb295ee76bb83ddef9144c443edf6b Mon Sep 17 00:00:00 2001 From: maurezen Date: Thu, 5 Dec 2019 22:29:03 +0300 Subject: [PATCH 108/194] #54 - U2 automation and stats added greed as a 10% compounding perk pulled Zek's ratio for greed rearranged controls a little bit --- modules/perks.js | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/modules/perks.js b/modules/perks.js index 44a350e59..df135edb0 100644 --- a/modules/perks.js +++ b/modules/perks.js @@ -89,15 +89,17 @@ var presetListHtml = "\ "; //U2 -//[looting,toughness,power,motivation,pheromones,artisanistry,carpentry,resilience,prismal,equality,criticality, tenacity] -var preset_Rspace = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; -var preset_RZek059 = [7, 10, 5, 1, 0.5, 2, 12, 0, 9, 0.5, 2, 25]; -var preset_RZekmelt = [10, 0.5, 2, 0.5, 0.3, 1.2, 3, 1, 0.5, 1, 3, 18]; +//[looting,toughness,power,motivation,pheromones,artisanistry,carpentry,resilience,prismal,equality,criticality, tenacity, greed] +var preset_Rspace = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; +var preset_RZek059 = [7, 10, 5, 1, 0.5, 2, 12, 9, 0.5, 2, 5, 0, 0]; +var preset_RZekmelt = [10, 0.5, 2, 0.5, 0.3, 1.2, 3, 1, 0.5, 1, 3, 18, 20]; +var preset_RZekquag = [8, 0.7, 1.8, 0.8, 0.2, 1.3, 3.3, 0.6, 0.8, 2.8, 6.2, 18, 27]; -var presetListU2 = [preset_RZek059,preset_RZekmelt,preset_Rspace]; +var presetListU2 = [preset_RZek059,preset_RZekmelt,preset_RZekquag,preset_Rspace]; var presetListHtmlU2 = "\ \ \ +\ \ "; @@ -155,7 +157,7 @@ AutoPerks.displayGUI = function() { if (game.global.universe == 1) { listratiosLine1 = ["Overkill","Resourceful","Coordinated","Resilience","Carpentry","Artisanistry"]; } else if (game.global.universe == 2) { - listratiosLine1 = ["Equality", "Carpentry","Pheromones","Motivation","Artisanistry","Resilience"]; + listratiosLine1 = ["Equality", "Carpentry","Pheromones","Motivation","Artisanistry"]; } for (var i in listratiosLine1) { AutoPerks.createInput(listratiosLine1[i],apGUI.$ratiosLine1); @@ -168,11 +170,18 @@ AutoPerks.displayGUI = function() { if (game.global.universe == 1) { listratiosLine2 = ["Pheromones","Motivation","Power","Looting","Cunning","Curious"]; } else if (game.global.universe == 2) { - listratiosLine2 = ["Power","Looting","Toughness","Prismal","Criticality", "Tenacity"]; + listratiosLine2 = ["Power","Looting","Toughness","Prismal","Criticality"]; } for (var i in listratiosLine2) { AutoPerks.createInput(listratiosLine2[i],apGUI.$ratiosLine2); } + if (game.global.universe == 2) { + var listratiosLine3; + listratiosLine3 = ["Resilience","Tenacity","Greed"]; + for (var i in listratiosLine3) { + AutoPerks.createInput(listratiosLine3[i],apGUI.$ratiosLine3); + } + } //Create dump perk dropdown apGUI.$dumpperklabel = document.createElement("Label"); apGUI.$dumpperklabel.id = 'DumpPerk Label'; @@ -894,9 +903,12 @@ AutoPerks.initializePerks = function () { //10% compounding var equality = new AutoPerks.VariablePerk("equality", 1, true, 9, 0.11111); equality.exprate = 1.5; + //should it be compounding? var criticality = new AutoPerks.VariablePerk("criticality", 100, true, 10, 0.1); //10% compounding var tenacity = new AutoPerks.VariablePerk("tenacity", 50000000, true, 11, 0.1); + //we'll think of it as of 10% compounding to not complicate things too much + var greed = new AutoPerks.VariablePerk("greed", 10000000000, true, 12, 0.1); AutoPerks.perkHolder = []; //gather these into an array of objects @@ -904,7 +916,7 @@ AutoPerks.initializePerks = function () { AutoPerks.perkHolder = [siphonology, anticipation, meditation, relentlessness, range, agility, bait, trumps, packrat, looting, toughness, power, motivation, pheromones, artisanistry, carpentry, resilience, coordinated, resourceful, overkill, capable, cunning, curious, classy, toughness_II, power_II, motivation_II, carpentry_II, looting_II]; } else if (game.global.universe == 2) { var overkill = new AutoPerks.FixedPerk("overkill", 1000000, 30); - AutoPerks.perkHolder = [range, agility, bait, trumps, packrat, overkill, looting, toughness, resilience, power, motivation, pheromones, artisanistry, carpentry, prismal, equality, criticality, tenacity]; + AutoPerks.perkHolder = [range, agility, bait, trumps, packrat, overkill, looting, toughness, resilience, power, motivation, pheromones, artisanistry, carpentry, prismal, equality, criticality, tenacity, greed]; } //initialize basics on all. for(var i in AutoPerks.perkHolder) { From 74d4bad2f622056820e7b20cf0b30b6039d072c2 Mon Sep 17 00:00:00 2001 From: maurezen Date: Fri, 6 Dec 2019 00:00:28 +0300 Subject: [PATCH 109/194] #54 - U2 automation and stats layout bug fix --- modules/perks.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/perks.js b/modules/perks.js index df135edb0..a91dde028 100644 --- a/modules/perks.js +++ b/modules/perks.js @@ -176,6 +176,9 @@ AutoPerks.displayGUI = function() { AutoPerks.createInput(listratiosLine2[i],apGUI.$ratiosLine2); } if (game.global.universe == 2) { + //Line 3 of the UI + apGUI.$ratiosLine3 = document.createElement("DIV"); + apGUI.$ratiosLine3.setAttribute('style', 'display: inline-block; text-align: left; width: 100%'); var listratiosLine3; listratiosLine3 = ["Resilience","Tenacity","Greed"]; for (var i in listratiosLine3) { From 61677086736c4dc166135f3d2ae19c2c0a0f1d0e Mon Sep 17 00:00:00 2001 From: maurezen Date: Fri, 6 Dec 2019 00:11:47 +0300 Subject: [PATCH 110/194] #54 - U2 automation and stats fix layout bug --- modules/perks.js | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/perks.js b/modules/perks.js index a91dde028..d7b6df344 100644 --- a/modules/perks.js +++ b/modules/perks.js @@ -179,6 +179,7 @@ AutoPerks.displayGUI = function() { //Line 3 of the UI apGUI.$ratiosLine3 = document.createElement("DIV"); apGUI.$ratiosLine3.setAttribute('style', 'display: inline-block; text-align: left; width: 100%'); + apGUI.$customRatios.appendChild(apGUI.$ratiosLine3; var listratiosLine3; listratiosLine3 = ["Resilience","Tenacity","Greed"]; for (var i in listratiosLine3) { From ebc431b81a884ef91963d1ed4a881d7f2c649ac6 Mon Sep 17 00:00:00 2001 From: maurezen Date: Fri, 6 Dec 2019 00:13:06 +0300 Subject: [PATCH 111/194] #54 - U2 automation and stats fix idiotic fucking typo that's what I get for not having an ultimate idea license and editing right here on github --- modules/perks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/perks.js b/modules/perks.js index d7b6df344..36914dc75 100644 --- a/modules/perks.js +++ b/modules/perks.js @@ -179,7 +179,7 @@ AutoPerks.displayGUI = function() { //Line 3 of the UI apGUI.$ratiosLine3 = document.createElement("DIV"); apGUI.$ratiosLine3.setAttribute('style', 'display: inline-block; text-align: left; width: 100%'); - apGUI.$customRatios.appendChild(apGUI.$ratiosLine3; + apGUI.$customRatios.appendChild(apGUI.$ratiosLine3); var listratiosLine3; listratiosLine3 = ["Resilience","Tenacity","Greed"]; for (var i in listratiosLine3) { From b0bfab1c1ac9fa84eb957fb296cfb39cb66b4ab2 Mon Sep 17 00:00:00 2001 From: maurezen Date: Fri, 6 Dec 2019 11:13:14 +0300 Subject: [PATCH 112/194] #54 - U2 automation and stats added Quagmire challenge to autoportal --- SettingsGUI.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SettingsGUI.js b/SettingsGUI.js index 01c406c32..4a636d6ee 100644 --- a/SettingsGUI.js +++ b/SettingsGUI.js @@ -257,9 +257,9 @@ function initializeAllSettings() { 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', 'Bublé', 'Melt', 'Decay', 'Electricity', 'Life', 'Crushed', 'Nom', 'Toxicity', 'Watch', 'Lead', 'Corrupted', 'Domination', 'Custom'], "Core"); + 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', 'Bublé', 'Melt', 'Quagmire', 'Decay', 'Electricity', 'Life', 'Crushed', 'Nom', 'Toxicity', 'Watch', 'Lead', 'Corrupted', 'Domination', 'Custom'], "Core"); //document.getElementById("AutoPortal").style="font-size: 1.0vw;"; //fit it on 1 line. - 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', 'Bublé', 'Melt', 'Decay', 'Electricity', 'Life', 'Crushed', 'Nom', 'Toxicity', 'Watch', 'Lead', 'Corrupted', 'Domination'], "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', 'Bublé', 'Melt', 'Quagmire', 'Decay', 'Electricity', 'Life', 'Crushed', 'Nom', 'Toxicity', 'Watch', 'Lead', 'Corrupted', 'Domination'], "Core"); //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"); From 3f1518344a34e7d6283e393764ea6776bdeacc4f Mon Sep 17 00:00:00 2001 From: maurezen Date: Fri, 6 Dec 2019 11:15:09 +0300 Subject: [PATCH 113/194] #54 - U2 automation and stats a bit more of quagmire-aware portal logic --- modules/portal.js | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/portal.js b/modules/portal.js index 88df9dd09..ad191e2dd 100644 --- a/modules/portal.js +++ b/modules/portal.js @@ -168,6 +168,7 @@ function findOutCurrentPortalLevel() { { "Balance" : 41, "Melt": 51, + "Quagmire": 71, "Decay" : 56, "Electricity" : 82, "Crushed" : 126, From ae06b753fe1d672379ef802bb33b46678736c374 Mon Sep 17 00:00:00 2001 From: maurezen Date: Fri, 6 Dec 2019 11:29:40 +0300 Subject: [PATCH 114/194] #54 - U2 automation and stats bug in perk price calculation - custom exprate was ignored --- modules/perks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/perks.js b/modules/perks.js index 36914dc75..07a5af349 100644 --- a/modules/perks.js +++ b/modules/perks.js @@ -445,7 +445,7 @@ AutoPerks.getRadon = 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)); - else 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(perk.exprate, level)); else if(perk.type == 'linear') return Math.ceil(perk.base + perk.increase * level); } //Calculate Total Price From 7cd716fa3c164d0bf51ca3c6cc2269a70370b7aa Mon Sep 17 00:00:00 2001 From: maurezen Date: Fri, 6 Dec 2019 11:34:28 +0300 Subject: [PATCH 115/194] #54 - U2 automation and stats ... and a few more exprate bugs --- modules/perks.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/perks.js b/modules/perks.js index 07a5af349..a7911d4bc 100644 --- a/modules/perks.js +++ b/modules/perks.js @@ -806,6 +806,7 @@ AutoPerks.FixedPerk = function(name, base, level, max, fluffy) { this.name = name; this.base = base; this.type = "exponential"; + this.exprate = 1.3; this.fixed = true; this.level = level || 0; this.spent = 0; @@ -849,6 +850,7 @@ AutoPerks.ArithmeticPerk = function(name, base, increase, baseIncrease, parent, this.base = base; this.increase = increase; this.type = "linear"; + this.exprate = 1.0; this.fixed = false; this.compounding = false; this.baseIncrease = baseIncrease; From a16295fcca427a8d12153c34ba3cf2bb3b31963b Mon Sep 17 00:00:00 2001 From: maurezen Date: Mon, 27 Jan 2020 21:38:34 +0300 Subject: [PATCH 116/194] #65 - Melting point should be ran somewhere during a filler run Implemented a basic strategy for melting point run moment selection - once, at void maps zone prior to void maps and after getting max map bonus. --- modules/maps.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/modules/maps.js b/modules/maps.js index 577953540..a131cbb8c 100644 --- a/modules/maps.js +++ b/modules/maps.js @@ -436,10 +436,17 @@ function autoMap() { selectedMap = theMap.id; break; } - var dont = game.global.runningChallengeSquared; - if (theMap.name == 'Melting Point' && game.global.challengeActive == "Melt" && !dont) { - if (game.global.world < 51) continue; - selectedMap = theMap.id; + //c^2 is left for manual control; we also shouldn't run the melting point more than once + var dont = game.global.runningChallengeSquared || !game.mapUnlocks.SmithFree.canRunOnce; + if (theMap.name == 'Melting Point' && !dont) { + //run ASAP for Melt challenge + if (game.global.world < 51 && game.global.challengeActive == "Melt") continue; + //we want to get a bonus smithy at the last possible moment + if (voidMapLevelSetting > 0 && game.global.world < voidMapLevelSettingZone) continue; + //which includes getting max map bonus and, incidentally, doing a bunch of farming beforehand + if ((doMaxMapBonus && game.global.mapBonus < customVars.maxMapBonus-1) || shouldDoMaps) continue; + + selectedMap = theMap.id; break; } if(theMap.name == 'The Block' && !game.upgrades.Shieldblock.allowed && ((game.global.challengeActive == "Scientist" || game.global.challengeActive == "Trimp") && !dont || getPageSetting('BuyShieldblock'))) { From b8631c69a171effeb62e1c311860c4fb3c6f2f0d Mon Sep 17 00:00:00 2001 From: maurezen Date: Mon, 27 Jan 2020 21:58:47 +0300 Subject: [PATCH 117/194] #66 - Add my own presets to the preset list adds a couple more ratio presets to fit my own needs and preferences --- modules/perks.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/perks.js b/modules/perks.js index a7911d4bc..b31e87054 100644 --- a/modules/perks.js +++ b/modules/perks.js @@ -94,12 +94,16 @@ var preset_Rspace = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; var preset_RZek059 = [7, 10, 5, 1, 0.5, 2, 12, 9, 0.5, 2, 5, 0, 0]; var preset_RZekmelt = [10, 0.5, 2, 0.5, 0.3, 1.2, 3, 1, 0.5, 1, 3, 18, 20]; var preset_RZekquag = [8, 0.7, 1.8, 0.8, 0.2, 1.3, 3.3, 0.6, 0.8, 2.8, 6.2, 18, 27]; +var preset_Rmauquag = [8, 0.7, 1.8, 0.8, 0.2, 1.3, 3.3, 0.6, 0.8, 0.01, 6.2, 18, 27]; +var preset_Rmauc3 = [1, 1, 3, 0.8, 0.2, 1.3, 3.3, 2, 1, 0.01, 6.2, 30, 1]; -var presetListU2 = [preset_RZek059,preset_RZekmelt,preset_RZekquag,preset_Rspace]; +var presetListU2 = [preset_RZek059, preset_RZekmelt, preset_RZekquag, preset_Rmauquag, preset_Rmauc3, preset_Rspace]; var presetListHtmlU2 = "\ \ \ \ +\ +\ \ "; From 8051ce2de3252c0161c416f1d7187f62bd767940 Mon Sep 17 00:00:00 2001 From: maurezen Date: Mon, 27 Jan 2020 22:14:44 +0300 Subject: [PATCH 118/194] #67 - Update perks with max values for prismal and greed --- modules/perks.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/perks.js b/modules/perks.js index b31e87054..643cce33b 100644 --- a/modules/perks.js +++ b/modules/perks.js @@ -909,7 +909,7 @@ AutoPerks.initializePerks = function () { var looting_II = new AutoPerks.ArithmeticPerk("looting_II", 100000, 10000, 0.0025, looting); //U2 perks - var prismal = new AutoPerks.VariablePerk("prismal", 1, true, 8, 0.1); + var prismal = new AutoPerks.VariablePerk("prismal", 1, true, 8, 0.1, 100); //10% compounding var equality = new AutoPerks.VariablePerk("equality", 1, true, 9, 0.11111); equality.exprate = 1.5; @@ -918,7 +918,7 @@ AutoPerks.initializePerks = function () { //10% compounding var tenacity = new AutoPerks.VariablePerk("tenacity", 50000000, true, 11, 0.1); //we'll think of it as of 10% compounding to not complicate things too much - var greed = new AutoPerks.VariablePerk("greed", 10000000000, true, 12, 0.1); + var greed = new AutoPerks.VariablePerk("greed", 10000000000, true, 12, 0.1, 40); AutoPerks.perkHolder = []; //gather these into an array of objects From 1707dece2d683641248f80991820cd49e291b476 Mon Sep 17 00:00:00 2001 From: maurezen Date: Wed, 29 Jan 2020 21:11:26 +0300 Subject: [PATCH 119/194] #66 - Add my own presets to the preset list added a less battle-skewed preset --- modules/perks.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/perks.js b/modules/perks.js index 643cce33b..4ab39a8e1 100644 --- a/modules/perks.js +++ b/modules/perks.js @@ -89,15 +89,17 @@ var presetListHtml = "\ "; //U2 -//[looting,toughness,power,motivation,pheromones,artisanistry,carpentry,resilience,prismal,equality,criticality, tenacity, greed] +//[looting,toughness,power,motivation,pheromones,artisanistry,carpentry,resilience,prismal,equality,criticality,tenacity,greed] var preset_Rspace = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; var preset_RZek059 = [7, 10, 5, 1, 0.5, 2, 12, 9, 0.5, 2, 5, 0, 0]; var preset_RZekmelt = [10, 0.5, 2, 0.5, 0.3, 1.2, 3, 1, 0.5, 1, 3, 18, 20]; var preset_RZekquag = [8, 0.7, 1.8, 0.8, 0.2, 1.3, 3.3, 0.6, 0.8, 2.8, 6.2, 18, 27]; var preset_Rmauquag = [8, 0.7, 1.8, 0.8, 0.2, 1.3, 3.3, 0.6, 0.8, 0.01, 6.2, 18, 27]; var preset_Rmauc3 = [1, 1, 3, 0.8, 0.2, 1.3, 3.3, 2, 1, 0.01, 6.2, 30, 1]; +var preset_Rmauc3greedy = [8, 1, 3, 0.8, 0.2, 1.3, 3.3, 2, 1, 0.01, 6.2, 18, 15]; -var presetListU2 = [preset_RZek059, preset_RZekmelt, preset_RZekquag, preset_Rmauquag, preset_Rmauc3, preset_Rspace]; +var presetListU2 = [preset_RZek059, preset_RZekmelt, preset_RZekquag, preset_Rmauquag, + preset_Rmauc3, preset_Rmauc3greedy, preset_Rspace]; var presetListHtmlU2 = "\ \ \ From e2c32e37c942bd2e78b0f99cbc728b70b1534946 Mon Sep 17 00:00:00 2001 From: maurezen Date: Thu, 6 Feb 2020 22:23:21 +0300 Subject: [PATCH 120/194] #67 - Update perks with max values for tenacity --- modules/perks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/perks.js b/modules/perks.js index 4ab39a8e1..a327e0c44 100644 --- a/modules/perks.js +++ b/modules/perks.js @@ -918,7 +918,7 @@ AutoPerks.initializePerks = function () { //should it be compounding? var criticality = new AutoPerks.VariablePerk("criticality", 100, true, 10, 0.1); //10% compounding - var tenacity = new AutoPerks.VariablePerk("tenacity", 50000000, true, 11, 0.1); + var tenacity = new AutoPerks.VariablePerk("tenacity", 50000000, true, 11, 0.1, 40); //we'll think of it as of 10% compounding to not complicate things too much var greed = new AutoPerks.VariablePerk("greed", 10000000000, true, 12, 0.1, 40); From 567dca3ea5252c2339d0ddfb446297b1a8380670 Mon Sep 17 00:00:00 2001 From: maurezen Date: Thu, 20 Feb 2020 16:16:04 +0300 Subject: [PATCH 121/194] #69 - 5.3.0 updates dropped foreman reference --- modules/gather.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/gather.js b/modules/gather.js index 29e1e4b8c..f13246e60 100644 --- a/modules/gather.js +++ b/modules/gather.js @@ -40,7 +40,7 @@ function manualLabor() { else if (getPageSetting('ManualGather2') != 2 && 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)) { + else if (game.global.roboTrimpLevel < 1 && (game.global.buildingsQueue.length ? (game.global.buildingsQueue.length > 1 || game.global.autoCraftModifier == 0 || (getPlayerModifier() > 1000 && game.global.buildingsQueue[0] != 'Trap.1')) : false)) { setGather('buildings'); } //if trapstorm is off (likely we havent gotten it yet, the game is still early, buildings take a while to build ), then Prioritize Storage buildings when they hit the front of the queue (should really be happening anyway since the queue should be >2(fits the clause above this), but in case they are the only object in the queue.) From 8b335cc13a7f490739212a435ba4dc5782526b33 Mon Sep 17 00:00:00 2001 From: maurezen Date: Sun, 23 Feb 2020 15:24:24 +0300 Subject: [PATCH 122/194] #70 - AutoPerks might be slow configurable fast allocate loop multiplier --- modules/perks.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/perks.js b/modules/perks.js index a327e0c44..9f23536f2 100644 --- a/modules/perks.js +++ b/modules/perks.js @@ -14,6 +14,7 @@ var AutoPerks = {}; MODULES["perks"] = {}; MODULES["perks"].showDetails = true; //show which individual perks are spent; MODULES["perks"].useAlgo2 = false; //use algorithm 2 instead. +MODULES["perks"].fastAllocateFactor = 1000; //perk purchase loop multiplier //Import the FastPriorityQueue.js general Library (not AT specific, but needed for perk queue) var head = document.getElementsByTagName('head')[0]; @@ -633,7 +634,7 @@ AutoPerks.spendHelium2 = function(helium) { //at 6.5 Oc He with *10 that were here ran 370-ish million loops, ffs //*1000 gives ~4m //*10000 gives ~50m, weird - packLevel = mostEff.increase * 1000; + packLevel = mostEff.increase * MODULES["perks"].fastAllocateFactor; packPrice = AutoPerks.calculateTotalPrice(mostEff, mostEff.level + packLevel) - mostEff.spent; } if (t2 && packPrice <= helium) { From 2b21d9677f9183e477f7eb3a41df8ad19db079c6 Mon Sep 17 00:00:00 2001 From: maurezen Date: Mon, 24 Feb 2020 10:32:19 +0300 Subject: [PATCH 123/194] #71 - Equipment's isQuick needs improvement took current time in zone into account --- modules/equipment.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/equipment.js b/modules/equipment.js index 13dfcc622..d75582199 100644 --- a/modules/equipment.js +++ b/modules/equipment.js @@ -198,7 +198,7 @@ function evaluateEquipmentEfficiency(equipName) { var isLiquified = (game.options.menu.liquification.enabled && game.talents.liquification.purchased && !game.global.mapsActive && game.global.gridArray && game.global.gridArray[0] && game.global.gridArray[0].name == "Liquimp"); //Run a quick Time estimate and if we complete it in 25 seconds or less, use 1/10th of our cap just so we can continue (MODULES["equipment"].capDivisor=10;) var time = mapTimeEstimater(); - var isQuick = (time!=0) && (time < MODULES["equipment"].quickMs) && (!isActiveSpireAT());; + var isQuick = (time!=0) && (time < MODULES["equipment"].quickMs) && (!isActiveSpireAT()) && (getZoneMinutes() < 2); var cap = getPageSetting('CapEquip2'); if ((isLiquified || isQuick) && cap > 0 && gameResource.level >= (cap / MODULES["equipment"].capDivisor)) { Factor = 0; From 1f941561ad469248c22c8360a038a9df1dd23d32 Mon Sep 17 00:00:00 2001 From: maurezen Date: Fri, 28 Feb 2020 12:18:03 +0300 Subject: [PATCH 124/194] #69 - 5.3.+ updates added Archaeology to custom/hehr autoportal --- SettingsGUI.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SettingsGUI.js b/SettingsGUI.js index 4a636d6ee..81c2f6117 100644 --- a/SettingsGUI.js +++ b/SettingsGUI.js @@ -259,7 +259,7 @@ function initializeAllSettings() { 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', 'Bublé', 'Melt', 'Quagmire', 'Decay', 'Electricity', 'Life', 'Crushed', 'Nom', 'Toxicity', 'Watch', 'Lead', 'Corrupted', 'Domination', 'Custom'], "Core"); //document.getElementById("AutoPortal").style="font-size: 1.0vw;"; //fit it on 1 line. - 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', 'Bublé', 'Melt', 'Quagmire', 'Decay', 'Electricity', 'Life', 'Crushed', 'Nom', 'Toxicity', 'Watch', 'Lead', 'Corrupted', 'Domination'], "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', 'Bublé', 'Melt', 'Quagmire', 'Decay', 'Electricity', 'Life', 'Crushed', 'Nom', 'Toxicity', 'Watch', 'Lead', 'Corrupted', 'Domination', 'Archaeology'], "Core"); //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"); From b29933ad9b2c97b8f0432ceca18ac4488520dbac Mon Sep 17 00:00:00 2001 From: maurezen Date: Sat, 29 Feb 2020 00:24:19 +0300 Subject: [PATCH 125/194] #69 - 5.3.+ updates Added Mayhem to portal targets for custom/hehr --- SettingsGUI.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SettingsGUI.js b/SettingsGUI.js index 81c2f6117..1efef6c28 100644 --- a/SettingsGUI.js +++ b/SettingsGUI.js @@ -259,7 +259,7 @@ function initializeAllSettings() { 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', 'Bublé', 'Melt', 'Quagmire', 'Decay', 'Electricity', 'Life', 'Crushed', 'Nom', 'Toxicity', 'Watch', 'Lead', 'Corrupted', 'Domination', 'Custom'], "Core"); //document.getElementById("AutoPortal").style="font-size: 1.0vw;"; //fit it on 1 line. - 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', 'Bublé', 'Melt', 'Quagmire', 'Decay', 'Electricity', 'Life', 'Crushed', 'Nom', 'Toxicity', 'Watch', 'Lead', 'Corrupted', 'Domination', 'Archaeology'], "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', 'Bublé', 'Melt', 'Quagmire', 'Decay', 'Electricity', 'Life', 'Crushed', 'Nom', 'Toxicity', 'Watch', 'Lead', 'Corrupted', 'Domination', 'Archaeology', 'Mayhem'], "Core"); //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"); From ef88783ec0798cfe840c6fa12f251436e59f1815 Mon Sep 17 00:00:00 2001 From: maurezen Date: Mon, 6 Apr 2020 21:21:36 +0300 Subject: [PATCH 126/194] #72 Void maps shouldn't force S in c2 --- modules/scryer.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/scryer.js b/modules/scryer.js index 4f135dbff..40eb1cb6d 100644 --- a/modules/scryer.js +++ b/modules/scryer.js @@ -63,7 +63,8 @@ function useScryerStance() { use_auto = use_auto || !game.global.mapsActive && isActiveSpireAT() && getPageSetting('ScryerUseinSpire2')!=1; //check for voids var isVoid = game.global.mapsActive && getCurrentMapObject().location == "Void"; - var ignoreVoid = isVoid && !getPageSetting('ScryerUseinVoidMaps2'); + //ignore scryer for voids if setting is off or running c2 + var ignoreVoid = isVoid && (!getPageSetting('ScryerUseinVoidMaps2') || game.global.runningChallengeSquared); use_auto = use_auto || ignoreVoid; //check for maps that are NOT void maps use_auto = use_auto || game.global.mapsActive && !(getCurrentMapObject().location == "Void") && !getPageSetting('ScryerUseinMaps2'); From a55723e6f0a4a753229f3f6af0393c659369a77d Mon Sep 17 00:00:00 2001 From: maurezen Date: Mon, 13 Apr 2020 11:17:10 +0300 Subject: [PATCH 127/194] #73 AutoStance wind support --- modules/stance.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/stance.js b/modules/stance.js index 23a194c39..3dabafba4 100644 --- a/modules/stance.js +++ b/modules/stance.js @@ -407,8 +407,11 @@ function autoStance2() { var voidCritinXok = !isCritThing || oneshotFast || surviveX; if (!game.global.preMapsActive && game.global.soldierHealth > 0) { + //use Wind stance if: enlightened wind is active and we're in the wind zone + if (getUberEmpowerment() == "Wind" && getEmpowerment() == "Wind") { + setFormation(5); //use D stance if: new army is ready&waiting / can survive void-double-attack or we can one-shot / can survive lead damage / can survive void-crit-dmg - if (game.upgrades.Dominance.done && surviveD && leadAttackOK && drainAttackOK && voidCritinDok && dExplosionOK) { + } else if (game.upgrades.Dominance.done && surviveD && leadAttackOK && drainAttackOK && voidCritinDok && dExplosionOK) { setFormation(2); //if CritVoidMap, switch out of D stance if we cant survive. Do various things. } else if (isCritThing && !voidCritinDok) { From b3f2920cdb30967a595f0887ee3b17127a5f3783 Mon Sep 17 00:00:00 2001 From: maurezen Date: Wed, 24 Jun 2020 20:16:06 +0300 Subject: [PATCH 128/194] #77 - equality management --- AutoTrimps2.js | 1 + SettingsGUI.js | 2 ++ modules/equality.js | 57 ++++++++++++++++++++++++++++++++++++++++++ modules/mainWrapper.js | 32 ++++++++++++++++++++++++ 4 files changed, 92 insertions(+) create mode 100644 modules/equality.js create mode 100644 modules/mainWrapper.js diff --git a/AutoTrimps2.js b/AutoTrimps2.js index 3a2df5731..ae7e8ef01 100644 --- a/AutoTrimps2.js +++ b/AutoTrimps2.js @@ -226,6 +226,7 @@ function mainLoop() { 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('ManagedEquality')) manageEquality(); if (getPageSetting('UseScryerStance')) useScryerStance(); //"Use Scryer Stance" (scryer.js) else if (getPageSetting('AutoStance')<=1) autoStance(); //"Auto Stance" (autostance.js) else if (getPageSetting('AutoStance')==2) autoStance2(); //"Auto Stance #2" (") diff --git a/SettingsGUI.js b/SettingsGUI.js index 1efef6c28..4d11eed9a 100644 --- a/SettingsGUI.js +++ b/SettingsGUI.js @@ -382,6 +382,8 @@ function initializeAllSettings() { 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('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'); + createSetting('ManagedEquality', 'Managed Equality', '[U2 only] Use Equality dance - zero equality for non-fast enemies, just enough for fast ones', 'boolean', true, null, 'Combat'); + createSetting('WaitForGamma', 'Wait for Gamma', '[U2 only] Equality dance subsetting - if true, for fast enemies it will aim at surviving 5 hits to trigger Gamma Burst. Will try to detect situations like reflect when this is not possible. Plague and electricity effects are assumed fine atm due to Angelic mastery.', 'boolean', false, null, 'Combat'); diff --git a/modules/equality.js b/modules/equality.js new file mode 100644 index 000000000..feb14dc90 --- /dev/null +++ b/modules/equality.js @@ -0,0 +1,57 @@ +//automatic equality management + +function aimAtGamma() { + var settingOn = getPageSetting('WaitForGamma'); + //reflect is going to kill us, so what's the point + setting &= !(game.global.challengeActive == "Daily" && typeof game.global.dailyChallenge.mirrored !== 'undefined'); + + return settingOn; +} + +function manageEquality() { + if (game.global.universe == 2 && !game.portal.Equality.radLocked) { + if (game.portal.Equality.scalingActive) { + toggleEqualityScale(); + } + + var cell = getCurrentCell(); + + //run just enough stacks vs fast + if (isEnemyFast(cell)) { + var minEnemyDamage = calculateDamage(cell.attack, false, false, false, cell, true); + var fluctuation = getFluctuation(); + var maxEnemyDamage = (1 + fluctuation) * minEnemyDamage / (1 - fluctuation); + + var enemyDamage = (minEnemyDamage + maxEnemyDamage) / 2; + var ourEffectiveHealth = game.global.soldierHealthMax + game.global.soldierEnergyShieldMax; + if (aimAtGamma()) { + ourEffectiveHealth = ourEffectiveHealth / 5; + } + + var equalityNeeded = 0; + if (enemyDamage > ourEffectiveHealth) { + equalityNeeded = Math.ceil(Math.log10(enemyDamage / ourEffectiveHealth)/Math.log10(1.1)); + //cut down on equality if we can + } else { + equalityNeeded = -Math.floor(Math.log10(ourEffectiveHealth / enemyDamage)/Math.log10(1.1)); + } + + //there might be some stacks already + //also this happens to be string if set via slider, hence Number() call + game.portal.Equality.disabledStackCount = Number(game.portal.Equality.disabledStackCount) + equalityNeeded; + + //gotta stay in the interval, game doesn't have validation + var maxEquality = getPerkLevel("Equality"); + if (game.portal.Equality.disabledStackCount > maxEquality) { + game.portal.Equality.disabledStackCount = maxEquality; + } else if (game.portal.Equality.disabledStackCount < 0) { + game.portal.Equality.disabledStackCount = 0; + } + //if enemy is slow run 0 stacks + } else { + game.portal.Equality.disabledStackCount = 0; + } + + manageEqualityStacks(); + } +} \ No newline at end of file diff --git a/modules/mainWrapper.js b/modules/mainWrapper.js new file mode 100644 index 000000000..cc8fee972 --- /dev/null +++ b/modules/mainWrapper.js @@ -0,0 +1,32 @@ +//this is a wrapper for everything that needs a bit of code around main.js calls + +//obtains current world or map cell +function getCurrentCell() { + // copypaste from approx main.js#handleDominationDebuff:6945 + return (game.global.mapsActive) ? getCurrentMapCell() : getCurrentWorldCell(); +} + +//checks whether the current enemy is fast. A copypaste job from approx main.js#fight:13491 +//cell is a current world or map cell object +function isEnemyFast(cell) { + var checkFast = + (game.global.challengeActive == "Slow" || ((((game.badGuys[cell.name].fast || cell.mutation == "Corruption") && game.global.challengeActive != "Nom") || game.global.voidBuff == "doubleAttack") && game.global.challengeActive != "Coordinate")); + var forceSlow = false; + if (game.global.challengeActive == "Duel"){ + if (game.challenges.Duel.enemyStacks < 10) { + checkFast = true; + } else if (game.challenges.Duel.trimpStacks < 10 && !game.global.runningChallengeSquared) { + forceSlow = true; + } + } + return checkFast && !forceSlow; +} + +//copypaste as well; at least this is straightforward to do +function getFluctuation() { + if (game.global.universe == 2) { + return 0.5; + } else { + return 0.2; + } +} \ No newline at end of file From 2d9bb8a652a7aa514b3c7a4d018baabe320e2c48 Mon Sep 17 00:00:00 2001 From: maurezen Date: Wed, 24 Jun 2020 20:31:49 +0300 Subject: [PATCH 129/194] #77 - equality management - typo --- modules/equality.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/equality.js b/modules/equality.js index feb14dc90..34ce04697 100644 --- a/modules/equality.js +++ b/modules/equality.js @@ -3,7 +3,7 @@ function aimAtGamma() { var settingOn = getPageSetting('WaitForGamma'); //reflect is going to kill us, so what's the point - setting &= !(game.global.challengeActive == "Daily" && typeof game.global.dailyChallenge.mirrored !== 'undefined'); + settingOn &= !(game.global.challengeActive == "Daily" && typeof game.global.dailyChallenge.mirrored !== 'undefined'); return settingOn; } From 51cefc03f57f011a7d493a4106ead7f3ae303dff Mon Sep 17 00:00:00 2001 From: maurezen Date: Wed, 24 Jun 2020 20:34:47 +0300 Subject: [PATCH 130/194] #77 - equality management - additional modules loaded --- AutoTrimps2.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AutoTrimps2.js b/AutoTrimps2.js index ae7e8ef01..72ebb77dd 100644 --- a/AutoTrimps2.js +++ b/AutoTrimps2.js @@ -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', 'equality', 'mainWrapper']; for (var m in ATmoduleList) { ATscriptLoad(modulepath, ATmoduleList[m]); } From fd4568c822d364c20d15c09569e203614c87fc08 Mon Sep 17 00:00:00 2001 From: maurezen Date: Wed, 24 Jun 2020 23:36:09 +0300 Subject: [PATCH 131/194] #77 - equality management - namespaces and a tad of docs --- AutoTrimps2.js | 2 +- modules/equality.js | 28 ++++++++++++++++++++++------ modules/mainWrapper.js | 10 +++++++--- 3 files changed, 30 insertions(+), 10 deletions(-) diff --git a/AutoTrimps2.js b/AutoTrimps2.js index 72ebb77dd..2a8c16fdc 100644 --- a/AutoTrimps2.js +++ b/AutoTrimps2.js @@ -226,7 +226,7 @@ function mainLoop() { 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('ManagedEquality')) manageEquality(); + if (getPageSetting('ManagedEquality')) equality.manageEquality(); if (getPageSetting('UseScryerStance')) useScryerStance(); //"Use Scryer Stance" (scryer.js) else if (getPageSetting('AutoStance')<=1) autoStance(); //"Auto Stance" (autostance.js) else if (getPageSetting('AutoStance')==2) autoStance2(); //"Auto Stance #2" (") diff --git a/modules/equality.js b/modules/equality.js index 34ce04697..5bcb13955 100644 --- a/modules/equality.js +++ b/modules/equality.js @@ -1,6 +1,14 @@ //automatic equality management -function aimAtGamma() { +//a holder object to avoid polluting namespace +equality = {}; +MODULES["equality"] = equality; + +//returns true if we should try to keep trimps alive for 5 attacks +//setting is argument for it +//reflect is an argument against it +//we don't care about plague/poison/electricity for now because Angelic is good enough +equality.aimAtGamma = function() { var settingOn = getPageSetting('WaitForGamma'); //reflect is going to kill us, so what's the point settingOn &= !(game.global.challengeActive == "Daily" && typeof game.global.dailyChallenge.mirrored !== 'undefined'); @@ -8,23 +16,28 @@ function aimAtGamma() { return settingOn; } -function manageEquality() { +//performs equality dance. +//no stacks if enemy is not fast +//otherwise, if not trying to hit gamma, barely enough stacks to survive a hit +//otherwise, barely enough stacks to survive 5 hits +//if we have too many equality stacks, dial those down a bit +equality.manageEquality = function() { if (game.global.universe == 2 && !game.portal.Equality.radLocked) { if (game.portal.Equality.scalingActive) { toggleEqualityScale(); } - var cell = getCurrentCell(); + var cell = mainWrapper.getCurrentCell(); //run just enough stacks vs fast - if (isEnemyFast(cell)) { + if (mainWrapper.isEnemyFast(cell)) { var minEnemyDamage = calculateDamage(cell.attack, false, false, false, cell, true); - var fluctuation = getFluctuation(); + var fluctuation = mainWrapper.getFluctuation(); var maxEnemyDamage = (1 + fluctuation) * minEnemyDamage / (1 - fluctuation); var enemyDamage = (minEnemyDamage + maxEnemyDamage) / 2; var ourEffectiveHealth = game.global.soldierHealthMax + game.global.soldierEnergyShieldMax; - if (aimAtGamma()) { + if (this.aimAtGamma()) { ourEffectiveHealth = ourEffectiveHealth / 5; } @@ -33,6 +46,9 @@ function manageEquality() { equalityNeeded = Math.ceil(Math.log10(enemyDamage / ourEffectiveHealth)/Math.log10(1.1)); //cut down on equality if we can } else { + //the corner case is when the truth lies between the two equality stacks + //this will cause fluctuation + //not very nice for your eyes, but better than adding 1 here and having an extra stack equalityNeeded = -Math.floor(Math.log10(ourEffectiveHealth / enemyDamage)/Math.log10(1.1)); } diff --git a/modules/mainWrapper.js b/modules/mainWrapper.js index cc8fee972..50cc9a615 100644 --- a/modules/mainWrapper.js +++ b/modules/mainWrapper.js @@ -1,14 +1,18 @@ //this is a wrapper for everything that needs a bit of code around main.js calls +//a holder object to avoid polluting namespace +mainWrapper = {}; +MODULES["mainWrapper"] = mainWrapper; + //obtains current world or map cell -function getCurrentCell() { +mainWrapper.getCurrentCell = function() { // copypaste from approx main.js#handleDominationDebuff:6945 return (game.global.mapsActive) ? getCurrentMapCell() : getCurrentWorldCell(); } //checks whether the current enemy is fast. A copypaste job from approx main.js#fight:13491 //cell is a current world or map cell object -function isEnemyFast(cell) { +mainWrapper.isEnemyFast = function(cell) { var checkFast = (game.global.challengeActive == "Slow" || ((((game.badGuys[cell.name].fast || cell.mutation == "Corruption") && game.global.challengeActive != "Nom") || game.global.voidBuff == "doubleAttack") && game.global.challengeActive != "Coordinate")); var forceSlow = false; @@ -23,7 +27,7 @@ function isEnemyFast(cell) { } //copypaste as well; at least this is straightforward to do -function getFluctuation() { +mainWrapper.getFluctuation = function() { if (game.global.universe == 2) { return 0.5; } else { From 27fa58d0c59f1f13f93ec258a29367649486501a Mon Sep 17 00:00:00 2001 From: maurezen Date: Thu, 25 Jun 2020 14:07:02 +0300 Subject: [PATCH 132/194] #77 - equality management - disabledStacks happens to be NaN sometimes, takes care of that --- modules/equality.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/equality.js b/modules/equality.js index 5bcb13955..eea778b2c 100644 --- a/modules/equality.js +++ b/modules/equality.js @@ -53,6 +53,10 @@ equality.manageEquality = function() { } //there might be some stacks already + //this can also be NaN sometimes + if (isNaN(game.portal.Equality.disabledStackCount)) { + game.portal.Equality.disabledStackCount = 0; + } //also this happens to be string if set via slider, hence Number() call game.portal.Equality.disabledStackCount = Number(game.portal.Equality.disabledStackCount) + equalityNeeded; From e760f9d153b5d9c16f9cace3107857657c4b1d4b Mon Sep 17 00:00:00 2001 From: maurezen Date: Thu, 25 Jun 2020 19:06:01 +0300 Subject: [PATCH 133/194] #74 - AutoWorkerRatios for U2 --- modules/jobs.js | 79 +++++++++++++++++++++++++++++++++---------------- 1 file changed, 54 insertions(+), 25 deletions(-) diff --git a/modules/jobs.js b/modules/jobs.js index 9719e9a1a..4d68b98a5 100644 --- a/modules/jobs.js +++ b/modules/jobs.js @@ -4,15 +4,23 @@ MODULES["jobs"].scientistRatio = 25; //ratio for scientists. (totalRatios MODULES["jobs"].scientistRatio2 = 10; //used for lowlevel and Watch challenge MODULES["jobs"].magmamancerRatio = 0.1; //buys 10% of your gem resources per go. //Worker Ratios = [Farmer,Lumber,Miner] -MODULES["jobs"].autoRatio8 = [1,1,100]; -MODULES["jobs"].autoRatio7 = [1,1,24]; -MODULES["jobs"].autoRatio6 = [1,12,12]; -MODULES["jobs"].autoRatio5 = [1,2,22]; -MODULES["jobs"].autoRatio4 = [1,1,10]; -MODULES["jobs"].autoRatio3 = [3,1,4]; -MODULES["jobs"].autoRatio2 = [3,3,5]; -MODULES["jobs"].autoRatio1 = [1,1,1]; -MODULES["jobs"].customRatio; //set this like above and it will Auto use it. +//[1] is U1 +MODULES["jobs"].ratios[1][8] = [1,1,100]; +MODULES["jobs"].ratios[1][7] = [1,1,24]; +MODULES["jobs"].ratios[1][6] = [1,12,12]; +MODULES["jobs"].ratios[1][5] = [1,2,22]; +MODULES["jobs"].ratios[1][4] = [1,1,10]; +MODULES["jobs"].ratios[1][3] = [3,1,4]; +MODULES["jobs"].ratios[1][2] = [3,3,5]; +MODULES["jobs"].ratios[1][1] = [1,1,1]; +//[2] is U2 +MODULES["jobs"].ratios[2][5] = [1,20,200]; +MODULES["jobs"].ratios[2][4] = [10,1,1]; +MODULES["jobs"].ratios[2][3] = [3,1,4]; +MODULES["jobs"].ratios[2][2] = [3,3,5]; +MODULES["jobs"].ratios[2][1] = [1,1,1]; +//set this like above and it will Auto use it. +MODULES["jobs"].customRatio; function safeBuyJob(jobTitle, amount) { if (!Number.isFinite(amount) || amount === 0 || typeof amount === 'undefined' || Number.isNaN(amount)) { @@ -290,26 +298,47 @@ function workerRatios() { var ratioSet; if (MODULES["jobs"].customRatio) { ratioSet = MODULES["jobs"].customRatio; - } else if (game.buildings.Tribute.owned > 6000 && mutations.Magma.active()) { - ratioSet = MODULES["jobs"].autoRatio8; - } else if (game.buildings.Tribute.owned > 4500 && mutations.Magma.active()) { - ratioSet = MODULES["jobs"].autoRatio7; - } else if (game.buildings.Tribute.owned > 3000 && mutations.Magma.active()) { - ratioSet = MODULES["jobs"].autoRatio6; - } else if (game.buildings.Tribute.owned > 1500) { - ratioSet = MODULES["jobs"].autoRatio5; - } else if (game.buildings.Tribute.owned > 1000) { - ratioSet = MODULES["jobs"].autoRatio4; - } else if (game.resources.trimps.realMax() > 3000000) { - ratioSet = MODULES["jobs"].autoRatio3; - } else if (game.resources.trimps.realMax() > 300000) { - ratioSet = MODULES["jobs"].autoRatio2; } else { - ratioSet = MODULES["jobs"].autoRatio1; + ratio = 1; + + if (game.global.universe == 2) { + //if we have a ton of tributes, we don't need more even if greed is not maxed yet + if (getPerkLevel("Greed") > 4 || game.buildings.Tribute.owned > 1250) { + ratio++; + } + if (game.buildings.Tribute.owned > 1250) { + ratio++; + } + } else { + if (game.buildings.Tribute.owned > 6000 && mutations.Magma.active()) { + ratio++; + } + if (game.buildings.Tribute.owned > 4500 && mutations.Magma.active()) { + ratio++; + } + if (game.buildings.Tribute.owned > 3000 && mutations.Magma.active()) { + ratio++; + } + if (game.buildings.Tribute.owned > 1500) { + ratio++; + } + if (game.buildings.Tribute.owned > 1000) { + ratio++; + } + } + + if (game.resources.trimps.realMax() > 3000000) { + ratio++; + } + if (game.resources.trimps.realMax() > 300000) { + ratio++; + } + + ratioSet = MODULES["jobs"].ratios[game.global.universe][ratio]; } //Override normal ratios with challenge specific ones if (game.global.challengeActive == 'Watch'){ - ratioSet = MODULES["jobs"].autoRatio1; + ratioSet = MODULES["jobs"].ratios[1][1]; } else if (game.global.challengeActive == 'Metal'){ ratioSet = [4,5,0]; //this challenge likes workers split half and half between farmers and lumbers (idk why) } From bcacd2c45aa67cd8c32f5fba83852dcef81cc75c Mon Sep 17 00:00:00 2001 From: maurezen Date: Thu, 25 Jun 2020 19:59:11 +0300 Subject: [PATCH 134/194] #74 - AutoWorkerRatios for U2 - init the maps --- modules/jobs.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/jobs.js b/modules/jobs.js index 4d68b98a5..47239b2cd 100644 --- a/modules/jobs.js +++ b/modules/jobs.js @@ -4,6 +4,9 @@ MODULES["jobs"].scientistRatio = 25; //ratio for scientists. (totalRatios MODULES["jobs"].scientistRatio2 = 10; //used for lowlevel and Watch challenge MODULES["jobs"].magmamancerRatio = 0.1; //buys 10% of your gem resources per go. //Worker Ratios = [Farmer,Lumber,Miner] +MODULES["jobs"].ratios = {}; +MODULES["jobs"].ratios[1] = {}; +MODULES["jobs"].ratios[2] = {}; //[1] is U1 MODULES["jobs"].ratios[1][8] = [1,1,100]; MODULES["jobs"].ratios[1][7] = [1,1,24]; From 8115a80bb23cf0c07a1d2611f29ab6986c5c5f67 Mon Sep 17 00:00:00 2001 From: maurezen Date: Thu, 25 Jun 2020 20:04:30 +0300 Subject: [PATCH 135/194] #74 - AutoWorkerRatios for U2 - archaeology ratio --- modules/jobs.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/jobs.js b/modules/jobs.js index 47239b2cd..3fb0408bb 100644 --- a/modules/jobs.js +++ b/modules/jobs.js @@ -1,7 +1,7 @@ MODULES["jobs"] = {}; //These can be changed (in the console) if you know what you're doing: MODULES["jobs"].scientistRatio = 25; //ratio for scientists. (totalRatios / this) -MODULES["jobs"].scientistRatio2 = 10; //used for lowlevel and Watch challenge +MODULES["jobs"].scientistRatio2 = 10; //used for lowlevel, Watch and Archaeology challenges MODULES["jobs"].magmamancerRatio = 0.1; //buys 10% of your gem resources per go. //Worker Ratios = [Farmer,Lumber,Miner] MODULES["jobs"].ratios = {}; @@ -96,7 +96,7 @@ function buyJobs() { var minerRatio = parseInt(getPageSetting('MinerRatio')); var totalRatio = farmerRatio + lumberjackRatio + minerRatio; var scientistRatio = totalRatio / MODULES["jobs"].scientistRatio; - if (game.jobs.Farmer.owned < 100) { + if (game.jobs.Farmer.owned < 100 || game.global.challengeActive == "Archaeology") { scientistRatio = totalRatio / MODULES["jobs"].scientistRatio2; } From 02363cdeac694810cf4d773f2fec8b0a6edc773c Mon Sep 17 00:00:00 2001 From: maurezen Date: Fri, 26 Jun 2020 23:37:39 +0300 Subject: [PATCH 136/194] #79 - autostance shouldn't set formation in U2 --- modules/scryer.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/scryer.js b/modules/scryer.js index 40eb1cb6d..c01d076b2 100644 --- a/modules/scryer.js +++ b/modules/scryer.js @@ -3,6 +3,9 @@ var wantToScry = false; //use S stance function useScryerStance() { + // we don't have formations in U2 + if (game.global.universe == 2) return; + var AutoStance = getPageSetting('AutoStance'); function autostancefunction() { if (AutoStance<=1) autoStance(); //"Auto Stance" From 1dd8ee10ca4ed578347c236f4b308b9a849ad441 Mon Sep 17 00:00:00 2001 From: maurezen Date: Sat, 27 Jun 2020 17:24:52 +0300 Subject: [PATCH 137/194] #77 - Equality support for U2 - correctly calculating equality for gamma case --- modules/equality.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/equality.js b/modules/equality.js index eea778b2c..9cd194d76 100644 --- a/modules/equality.js +++ b/modules/equality.js @@ -30,14 +30,16 @@ equality.manageEquality = function() { var cell = mainWrapper.getCurrentCell(); //run just enough stacks vs fast - if (mainWrapper.isEnemyFast(cell)) { + var aimAtGamma = this.aimAtGamma(); + if (mainWrapper.isEnemyFast(cell) || aimAtGamma) { var minEnemyDamage = calculateDamage(cell.attack, false, false, false, cell, true); var fluctuation = mainWrapper.getFluctuation(); var maxEnemyDamage = (1 + fluctuation) * minEnemyDamage / (1 - fluctuation); var enemyDamage = (minEnemyDamage + maxEnemyDamage) / 2; var ourEffectiveHealth = game.global.soldierHealthMax + game.global.soldierEnergyShieldMax; - if (this.aimAtGamma()) { + if (aimAtGamma) { + enemyDamage = maxEnemyDamage; ourEffectiveHealth = ourEffectiveHealth / 5; } From 9679fcd1b154aac668dd523bc6e59aebf27bae6a Mon Sep 17 00:00:00 2001 From: maurezen Date: Sat, 27 Jun 2020 17:28:32 +0300 Subject: [PATCH 138/194] #77 - Equality support for U2 - handling undefined getCurrentCell case --- modules/mainWrapper.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/mainWrapper.js b/modules/mainWrapper.js index 50cc9a615..f92267cca 100644 --- a/modules/mainWrapper.js +++ b/modules/mainWrapper.js @@ -13,6 +13,8 @@ mainWrapper.getCurrentCell = function() { //checks whether the current enemy is fast. A copypaste job from approx main.js#fight:13491 //cell is a current world or map cell object mainWrapper.isEnemyFast = function(cell) { + //happens near portal + if (typeof cell === 'undefined') return false; var checkFast = (game.global.challengeActive == "Slow" || ((((game.badGuys[cell.name].fast || cell.mutation == "Corruption") && game.global.challengeActive != "Nom") || game.global.voidBuff == "doubleAttack") && game.global.challengeActive != "Coordinate")); var forceSlow = false; From 6fb5414f6ef2078c2b35f6aaa69370d6510a901f Mon Sep 17 00:00:00 2001 From: maurezen Date: Sat, 27 Jun 2020 18:00:58 +0300 Subject: [PATCH 139/194] #77 - Equality support for U2 - handling undefined getCurrentCell case --- modules/equality.js | 2 ++ modules/mainWrapper.js | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/equality.js b/modules/equality.js index 9cd194d76..644c5b135 100644 --- a/modules/equality.js +++ b/modules/equality.js @@ -28,6 +28,8 @@ equality.manageEquality = function() { } var cell = mainWrapper.getCurrentCell(); + //happens near portal + if (typeof cell === 'undefined') return false; //run just enough stacks vs fast var aimAtGamma = this.aimAtGamma(); diff --git a/modules/mainWrapper.js b/modules/mainWrapper.js index f92267cca..50cc9a615 100644 --- a/modules/mainWrapper.js +++ b/modules/mainWrapper.js @@ -13,8 +13,6 @@ mainWrapper.getCurrentCell = function() { //checks whether the current enemy is fast. A copypaste job from approx main.js#fight:13491 //cell is a current world or map cell object mainWrapper.isEnemyFast = function(cell) { - //happens near portal - if (typeof cell === 'undefined') return false; var checkFast = (game.global.challengeActive == "Slow" || ((((game.badGuys[cell.name].fast || cell.mutation == "Corruption") && game.global.challengeActive != "Nom") || game.global.voidBuff == "doubleAttack") && game.global.challengeActive != "Coordinate")); var forceSlow = false; From c3ce04448516f10558beac52d7dc4be2e08ae9a0 Mon Sep 17 00:00:00 2001 From: maurezen Date: Mon, 29 Jun 2020 21:31:05 +0300 Subject: [PATCH 140/194] #76 - autoperks takes forever - extracted the perk advance logic, made it aware of fastAllocateFactor, used it everywhere --- modules/perks.js | 84 ++++++++++++++++++++++-------------------------- 1 file changed, 39 insertions(+), 45 deletions(-) diff --git a/modules/perks.js b/modules/perks.js index 9f23536f2..91af514b1 100644 --- a/modules/perks.js +++ b/modules/perks.js @@ -615,40 +615,20 @@ AutoPerks.spendHelium2 = function(helium) { return false; } - var mostEff, price, inc; + var mostEff; var packPrice,packLevel; var i=0; //Change the way we iterate. function iterateQueue() { mostEff = effQueue.poll(); - price = AutoPerks.calculatePrice(mostEff, mostEff.level); // Price of *next* purchase. - inc = AutoPerks.calculateIncrease(mostEff, mostEff.level); + mostEff.price = AutoPerks.calculatePrice(mostEff, mostEff.level); // Price of *next* purchase. + mostEff.inc = AutoPerks.calculateIncrease(mostEff, mostEff.level); mostEff.efficiency = inc / price; i++; } - for (iterateQueue() ; price <= helium ; iterateQueue() ) { + for (iterateQueue() ; mostEff.price <= helium ; iterateQueue() ) { if(mostEff.level < mostEff.max) { // but first, check if the perk has reached its maximum value - // Purchase the most efficient perk - var t2 = mostEff.name.endsWith("_II"); - if (t2) { - //at 6.5 Oc He with *10 that were here ran 370-ish million loops, ffs - //*1000 gives ~4m - //*10000 gives ~50m, weird - packLevel = mostEff.increase * MODULES["perks"].fastAllocateFactor; - packPrice = AutoPerks.calculateTotalPrice(mostEff, mostEff.level + packLevel) - mostEff.spent; - } - if (t2 && packPrice <= helium) { - helium -= packPrice; - mostEff.level+= packLevel; - mostEff.spent += packPrice; - } else { - helium -= price; - mostEff.level++; - mostEff.spent += price; - } - price = AutoPerks.calculatePrice(mostEff, mostEff.level); // Price of *next* purchase. - inc = AutoPerks.calculateIncrease(mostEff, mostEff.level); - mostEff.efficiency = inc / price; + helium = AutoPerks.bumpPerkLevel(mostEff, helium); effQueue.add(mostEff); // Add back into queue run again until out of helium } } @@ -660,14 +640,11 @@ AutoPerks.spendHelium2 = function(helium) { var heb4dump = helium; var index = $selector.selectedIndex; var dumpPerk = AutoPerks.getPerkByName($selector[index].innerHTML); - //debug(AutoPerks.capitaliseFirstLetter(dumpPerk.name) + " level pre-dump: " + dumpPerk.level,"perks"); - if(dumpPerk.level < dumpPerk.max) { - for(price = AutoPerks.calculatePrice(dumpPerk, dumpPerk.level); price < helium && dumpPerk.level < dumpPerk.max; price = AutoPerks.calculatePrice(dumpPerk, dumpPerk.level)) { - helium -= price; - dumpPerk.spent += price; - dumpPerk.level++; - } + + while (dumpPerk.level < dumpPerk.max) { + helium = AutoPerks.bumpPerkLevel(dumpPerk, helium); } + var dumpresults = heb4dump - helium; debug("AutoPerks2: Dump Perk " + AutoPerks.capitaliseFirstLetter(dumpPerk.name) + " level post-dump: "+ dumpPerk.level + " Helium Dumped: " + prettify(dumpresults) + " He.", "perks"); } //end dump perk code. @@ -676,24 +653,41 @@ AutoPerks.spendHelium2 = function(helium) { //Repeat the process for spending round 2. This spends any extra helium we have that is less than the cost of the last point of the dump-perk. while (effQueue.size > 1) { mostEff = effQueue.poll(); - if (mostEff.level >= mostEff.max) continue; // but first, check if the perk has reached its maximum value - price = AutoPerks.calculatePrice(mostEff, mostEff.level); - if (price >= helium) continue; - // Purchase the most efficient perk - helium -= price; - mostEff.level++; - mostEff.spent += price; - // Reduce its efficiency - inc = AutoPerks.calculateIncrease(mostEff, mostEff.level); - price = AutoPerks.calculatePrice(mostEff, mostEff.level); - mostEff.efficiency = inc/price; - // Add back into queue run again until out of helium - effQueue.add(mostEff); + if (mostEff.level <= mostEff.max) { + helium = AutoPerks.bumpPerkLevel(mostEff, helium); + // Add back into queue run again until out of helium + effQueue.add(mostEff); + } } var r2results = heB4round2 - helium; debug("AutoPerks2: Pass Two Complete. Cleanup Spent Any Leftover Helium: " + prettify(r2results) + " He.","perks"); } +//perk is a perk object from perkHolder collection +//helium is the number of helium left to spend +//returns the helium left post-spend +AutoPerks.bumpPerkLevel = function(perk, helium) { + var t2 = perk.name.endsWith("_II"); + + packLevel = 1; + packPrice = perk.price; + if (t2) { + packLevel = perk.increase * MODULES["perks"].fastAllocateFactor; + packPrice = AutoPerks.calculateTotalPrice(perk, perk.level + packLevel) - perk.spent; + + if (packPrice > helium) { + packLevel = 1; + packPrice = perk.price; + } + } + + perk.level+= packLevel; + perk.spent += packPrice; + perk.price = AutoPerks.calculatePrice(perk, perk.level); // Price of *next* purchase. + perk.inc = AutoPerks.calculateIncrease(perk, perk.level); + perk.efficiency = inc / price; + return helium - packPrice; +} //Pushes the respec button, then the Clear All button, then assigns perk points based on what was calculated. From 3702b43aca3b8471379dc05b7b8f0cc0a2b13b27 Mon Sep 17 00:00:00 2001 From: maurezen Date: Tue, 30 Jun 2020 11:35:11 +0300 Subject: [PATCH 141/194] #76 - autoperks takes forever - minor adjustments, adaptive backoff --- modules/perks.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/perks.js b/modules/perks.js index 91af514b1..1add2c833 100644 --- a/modules/perks.js +++ b/modules/perks.js @@ -626,6 +626,7 @@ AutoPerks.spendHelium2 = function(helium) { mostEff.efficiency = inc / price; i++; } + AutoPerks.fastAllocateFactor = MODULES["perks"].fastAllocateFactor; for (iterateQueue() ; mostEff.price <= helium ; iterateQueue() ) { if(mostEff.level < mostEff.max) { // but first, check if the perk has reached its maximum value helium = AutoPerks.bumpPerkLevel(mostEff, helium); @@ -635,6 +636,7 @@ AutoPerks.spendHelium2 = function(helium) { debug("AutoPerks2: Pass One Complete. Loops ran: " + i, "perks"); //Begin selectable dump perk code + AutoPerks.fastAllocateFactor = MODULES["perks"].fastAllocateFactor; var $selector = document.getElementById('dumpPerk'); if ($selector != null && $selector.value != "None") { var heb4dump = helium; @@ -650,6 +652,7 @@ AutoPerks.spendHelium2 = function(helium) { } //end dump perk code. var heB4round2 = helium; + AutoPerks.fastAllocateFactor = MODULES["perks"].fastAllocateFactor; //Repeat the process for spending round 2. This spends any extra helium we have that is less than the cost of the last point of the dump-perk. while (effQueue.size > 1) { mostEff = effQueue.poll(); @@ -672,12 +675,14 @@ AutoPerks.bumpPerkLevel = function(perk, helium) { packLevel = 1; packPrice = perk.price; if (t2) { - packLevel = perk.increase * MODULES["perks"].fastAllocateFactor; + packLevel = perk.increase * AutoPerks.fastAllocateFactor; packPrice = AutoPerks.calculateTotalPrice(perk, perk.level + packLevel) - perk.spent; if (packPrice > helium) { packLevel = 1; packPrice = perk.price; + // back off in case we're near the end of our helium stores + AutoPerks.fastAllocateFactor = Math.ceil(AutoPerks.fastAllocateFactor / 10); } } @@ -685,7 +690,7 @@ AutoPerks.bumpPerkLevel = function(perk, helium) { perk.spent += packPrice; perk.price = AutoPerks.calculatePrice(perk, perk.level); // Price of *next* purchase. perk.inc = AutoPerks.calculateIncrease(perk, perk.level); - perk.efficiency = inc / price; + perk.efficiency = perk.inc / perk.price; return helium - packPrice; } From 030d20e374031615d74e1b8ecd978a31e88aef66 Mon Sep 17 00:00:00 2001 From: maurezen Date: Tue, 30 Jun 2020 11:52:48 +0300 Subject: [PATCH 142/194] #76 - autoperks takes forever - default factor adjustment, stopping factors --- modules/perks.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/perks.js b/modules/perks.js index 1add2c833..8be1f75b6 100644 --- a/modules/perks.js +++ b/modules/perks.js @@ -14,7 +14,7 @@ var AutoPerks = {}; MODULES["perks"] = {}; MODULES["perks"].showDetails = true; //show which individual perks are spent; MODULES["perks"].useAlgo2 = false; //use algorithm 2 instead. -MODULES["perks"].fastAllocateFactor = 1000; //perk purchase loop multiplier +MODULES["perks"].fastAllocateFactor = 100000; //perk purchase loop multiplier //Import the FastPriorityQueue.js general Library (not AT specific, but needed for perk queue) var head = document.getElementsByTagName('head')[0]; @@ -643,7 +643,7 @@ AutoPerks.spendHelium2 = function(helium) { var index = $selector.selectedIndex; var dumpPerk = AutoPerks.getPerkByName($selector[index].innerHTML); - while (dumpPerk.level < dumpPerk.max) { + while (dumpPerk.level < dumpPerk.max && dumpPerk.price < helium) { helium = AutoPerks.bumpPerkLevel(dumpPerk, helium); } @@ -656,7 +656,7 @@ AutoPerks.spendHelium2 = function(helium) { //Repeat the process for spending round 2. This spends any extra helium we have that is less than the cost of the last point of the dump-perk. while (effQueue.size > 1) { mostEff = effQueue.poll(); - if (mostEff.level <= mostEff.max) { + if (mostEff.level <= mostEff.max && mostEff.price < helium) { helium = AutoPerks.bumpPerkLevel(mostEff, helium); // Add back into queue run again until out of helium effQueue.add(mostEff); From 08b3e558f9f085fff9ccf686de84031f5278581b Mon Sep 17 00:00:00 2001 From: maurezen Date: Thu, 2 Jul 2020 17:59:20 +0300 Subject: [PATCH 143/194] #73 - AutoStance wind support - user setting for wind in maps --- SettingsGUI.js | 1 + modules/stance.js | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/SettingsGUI.js b/SettingsGUI.js index 4d11eed9a..5565db463 100644 --- a/SettingsGUI.js +++ b/SettingsGUI.js @@ -445,6 +445,7 @@ 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'); + createSetting('WindInMaps', 'Wind in maps', 'Use wind stance while in maps ', 'boolean', false, null, 'Nature'); diff --git a/modules/stance.js b/modules/stance.js index 3dabafba4..7c3bc6fd6 100644 --- a/modules/stance.js +++ b/modules/stance.js @@ -408,7 +408,9 @@ function autoStance2() { if (!game.global.preMapsActive && game.global.soldierHealth > 0) { //use Wind stance if: enlightened wind is active and we're in the wind zone - if (getUberEmpowerment() == "Wind" && getEmpowerment() == "Wind") { + if (getUberEmpowerment() == "Wind" && getEmpowerment() == "Wind" + //only use Wind in maps if the user wants it + && (!game.global.mapsActive || getPageSetting('WindInMaps'))) { setFormation(5); //use D stance if: new army is ready&waiting / can survive void-double-attack or we can one-shot / can survive lead damage / can survive void-crit-dmg } else if (game.upgrades.Dominance.done && surviveD && leadAttackOK && drainAttackOK && voidCritinDok && dExplosionOK) { From fdfa7382d02d8faaf235975c55781e24eeeeebe8 Mon Sep 17 00:00:00 2001 From: maurezen Date: Thu, 2 Jul 2020 19:00:30 +0300 Subject: [PATCH 144/194] #73 - AutoStance wind support - disable Wind in Spires --- modules/stance.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/stance.js b/modules/stance.js index 7c3bc6fd6..dadb5f178 100644 --- a/modules/stance.js +++ b/modules/stance.js @@ -410,7 +410,9 @@ function autoStance2() { //use Wind stance if: enlightened wind is active and we're in the wind zone if (getUberEmpowerment() == "Wind" && getEmpowerment() == "Wind" //only use Wind in maps if the user wants it - && (!game.global.mapsActive || getPageSetting('WindInMaps'))) { + && (!game.global.mapsActive || getPageSetting('WindInMaps')) + //turn Wind off in spires, we don't want any trouble on plagued dailies or something + && (!game.global.spireActive || game.global.mapsActive)) { setFormation(5); //use D stance if: new army is ready&waiting / can survive void-double-attack or we can one-shot / can survive lead damage / can survive void-crit-dmg } else if (game.upgrades.Dominance.done && surviveD && leadAttackOK && drainAttackOK && voidCritinDok && dExplosionOK) { From 23083578105b8b75dbd4393f2c916825e66ab0ed Mon Sep 17 00:00:00 2001 From: maurezen Date: Thu, 2 Jul 2020 19:47:22 +0300 Subject: [PATCH 145/194] #73 - AutoStance wind support - get out of Wind if enemy is healthy enough when we're at max stacks --- modules/equality.js | 3 +-- modules/mainWrapper.js | 40 ++++++++++++++++++++++++++++++++++++++++ modules/stance.js | 4 +++- 3 files changed, 44 insertions(+), 3 deletions(-) diff --git a/modules/equality.js b/modules/equality.js index 644c5b135..a9a7fe6d3 100644 --- a/modules/equality.js +++ b/modules/equality.js @@ -35,8 +35,7 @@ equality.manageEquality = function() { var aimAtGamma = this.aimAtGamma(); if (mainWrapper.isEnemyFast(cell) || aimAtGamma) { var minEnemyDamage = calculateDamage(cell.attack, false, false, false, cell, true); - var fluctuation = mainWrapper.getFluctuation(); - var maxEnemyDamage = (1 + fluctuation) * minEnemyDamage / (1 - fluctuation); + var maxEnemyDamage = mainWrapper.min2max(minEnemyDamage); var enemyDamage = (minEnemyDamage + maxEnemyDamage) / 2; var ourEffectiveHealth = game.global.soldierHealthMax + game.global.soldierEnergyShieldMax; diff --git a/modules/mainWrapper.js b/modules/mainWrapper.js index 50cc9a615..b2464501c 100644 --- a/modules/mainWrapper.js +++ b/modules/mainWrapper.js @@ -33,4 +33,44 @@ mainWrapper.getFluctuation = function() { } else { return 0.2; } +} + +//checks whether we're in spire right now (world on spire zone) +mainWrapper.isInSpire == function() { + return game.global.spireActive && !game.global.mapsActive; +} + +//gets min damage as a parameter +//returns max damage +mainWrapper.min2max == function(min) { + var fluctuation = mainWrapper.getFluctuation(); + return (1 + fluctuation) * min / (1 - fluctuation); +} + +mainWrapper.critTier + +//checks whether trimps can possibly 1-shot both current & next enemy +mainWrapper.canOverkill == function() { + var cell = mainWrapper.getCurrentCell(); + + //happens near portal + if (typeof cell === 'undefined') return true; + + var enemyHealth = cell.health; + + var trimpAttack = mainWrapper.min2max(calculateDamage(game.global.soldierCurrentAttack, false, true, false, 0, true)); + //apply crits + var trimpMaxAttack = trimpAttack * getPlayerCritDamageMult() * getMegaCritDamageMult(Math.floor(1 + getPlayerCritChance())); + //apply Gamma + trimpMaxAttack = calcHeirloomBonus("Shield", "gammaBurst", trimpMaxAttack); + //apply difference with D stance + trimpMaxAttack *= 8; + + var enemyMaxHealth = cell.maxHealth; + //apply PB at max rate + enemyMaxHealth *= 0.05; + //apply overkill penalties + enemyMaxHealth /= (getPerkLevel("Overkill") * 0.005); + + return trimpMaxAttack >= enemyMaxHealth; } \ No newline at end of file diff --git a/modules/stance.js b/modules/stance.js index dadb5f178..16dd2229e 100644 --- a/modules/stance.js +++ b/modules/stance.js @@ -412,7 +412,9 @@ function autoStance2() { //only use Wind in maps if the user wants it && (!game.global.mapsActive || getPageSetting('WindInMaps')) //turn Wind off in spires, we don't want any trouble on plagued dailies or something - && (!game.global.spireActive || game.global.mapsActive)) { + && !mainWrapper.isInSpire() + //we want to switch Wind off as soon as we hit 300 if we can't possibly overkill + && (mainWrapper.canOverkill() || game.empowerments.Wind.currentDebuffPower < 300)) { setFormation(5); //use D stance if: new army is ready&waiting / can survive void-double-attack or we can one-shot / can survive lead damage / can survive void-crit-dmg } else if (game.upgrades.Dominance.done && surviveD && leadAttackOK && drainAttackOK && voidCritinDok && dExplosionOK) { From 67bfe7995d72b4e74bb2950cd67086abdb8a174d Mon Sep 17 00:00:00 2001 From: maurezen Date: Fri, 3 Jul 2020 00:40:37 +0300 Subject: [PATCH 146/194] #73 - AutoStance wind support - cleanup - damn I need a linter --- modules/mainWrapper.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/modules/mainWrapper.js b/modules/mainWrapper.js index b2464501c..cc19771f4 100644 --- a/modules/mainWrapper.js +++ b/modules/mainWrapper.js @@ -36,21 +36,19 @@ mainWrapper.getFluctuation = function() { } //checks whether we're in spire right now (world on spire zone) -mainWrapper.isInSpire == function() { +mainWrapper.isInSpire = function() { return game.global.spireActive && !game.global.mapsActive; } //gets min damage as a parameter //returns max damage -mainWrapper.min2max == function(min) { +mainWrapper.min2max = function(min) { var fluctuation = mainWrapper.getFluctuation(); return (1 + fluctuation) * min / (1 - fluctuation); } -mainWrapper.critTier - //checks whether trimps can possibly 1-shot both current & next enemy -mainWrapper.canOverkill == function() { +mainWrapper.canOverkill = function() { var cell = mainWrapper.getCurrentCell(); //happens near portal From 3f7ad7aaa55f5079ac76924d1226d9b30c3fa061 Mon Sep 17 00:00:00 2001 From: maurezen Date: Fri, 3 Jul 2020 00:42:01 +0300 Subject: [PATCH 147/194] #73 - AutoStance wind support - should consider both current and next cells --- modules/mainWrapper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/mainWrapper.js b/modules/mainWrapper.js index cc19771f4..7ba4196e5 100644 --- a/modules/mainWrapper.js +++ b/modules/mainWrapper.js @@ -70,5 +70,5 @@ mainWrapper.canOverkill = function() { //apply overkill penalties enemyMaxHealth /= (getPerkLevel("Overkill") * 0.005); - return trimpMaxAttack >= enemyMaxHealth; + return trimpMaxAttack >= (enemyMaxHealth + enemyHealth); } \ No newline at end of file From 930d23f424c9945a517593acec180d23080cb756 Mon Sep 17 00:00:00 2001 From: maurezen Date: Sat, 4 Jul 2020 18:19:45 +0300 Subject: [PATCH 148/194] #79 - autostance shouldn't set formation in U2 - shouldn't stop calculating enemy stats either --- modules/scryer.js | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/modules/scryer.js b/modules/scryer.js index c01d076b2..240b6db68 100644 --- a/modules/scryer.js +++ b/modules/scryer.js @@ -3,14 +3,22 @@ var wantToScry = false; //use S stance function useScryerStance() { - // we don't have formations in U2 - if (game.global.universe == 2) return; var AutoStance = getPageSetting('AutoStance'); function autostancefunction() { if (AutoStance<=1) autoStance(); //"Auto Stance" else if (AutoStance==2) autoStance2(); //"Auto Stance #2" }; + // these are needed to trigger a base enemy damage calculation + // @TODO #7 get rid of this dependency + if (AutoStance<=1) + calcBaseDamageinX(); //calculate internal script variables normally processed by autostance. + else if (AutoStance==2) + calcBaseDamageinX2(); //calculate method #2 + + // we don't have formations in U2 + if (game.global.universe == 2) return; + //check preconditions (exit quick, if impossible to use) var use_auto = game.global.preMapsActive || game.global.gridArray.length === 0 || game.global.highestLevelCleared < 180; use_auto = use_auto || game.global.world <= 60; @@ -21,10 +29,7 @@ function useScryerStance() { return; } - if (AutoStance<=1) - calcBaseDamageinX(); //calculate internal script variables normally processed by autostance. - else if (AutoStance==2) - calcBaseDamageinX2(); //calculate method #2 + var missingHealth = game.global.soldierHealthMax - game.global.soldierHealth; var newSquadRdy = game.resources.trimps.realMax() <= game.resources.trimps.owned + 1; var form = game.global.formation; From b098514dd53595d9bf9477cc080e514c441a7c43 Mon Sep 17 00:00:00 2001 From: maurezen Date: Mon, 7 Sep 2020 12:28:16 +0300 Subject: [PATCH 149/194] #83 - 5.4.0 update changes - berserk perk --- modules/perks.js | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/modules/perks.js b/modules/perks.js index 8be1f75b6..84d4ed2f6 100644 --- a/modules/perks.js +++ b/modules/perks.js @@ -90,14 +90,14 @@ var presetListHtml = "\ "; //U2 -//[looting,toughness,power,motivation,pheromones,artisanistry,carpentry,resilience,prismal,equality,criticality,tenacity,greed] -var preset_Rspace = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; -var preset_RZek059 = [7, 10, 5, 1, 0.5, 2, 12, 9, 0.5, 2, 5, 0, 0]; -var preset_RZekmelt = [10, 0.5, 2, 0.5, 0.3, 1.2, 3, 1, 0.5, 1, 3, 18, 20]; -var preset_RZekquag = [8, 0.7, 1.8, 0.8, 0.2, 1.3, 3.3, 0.6, 0.8, 2.8, 6.2, 18, 27]; -var preset_Rmauquag = [8, 0.7, 1.8, 0.8, 0.2, 1.3, 3.3, 0.6, 0.8, 0.01, 6.2, 18, 27]; -var preset_Rmauc3 = [1, 1, 3, 0.8, 0.2, 1.3, 3.3, 2, 1, 0.01, 6.2, 30, 1]; -var preset_Rmauc3greedy = [8, 1, 3, 0.8, 0.2, 1.3, 3.3, 2, 1, 0.01, 6.2, 18, 15]; +//[looting,toughness,power,motivation,pheromones,artisanistry,carpentry,resilience,prismal,equality,criticality,tenacity,greed, frenzy] +var preset_Rspace = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; +var preset_RZek059 = [7, 10, 5, 1, 0.5, 2, 12, 9, 0.5, 2, 5, 0, 0, 0]; +var preset_RZekmelt = [10, 0.5, 2, 0.5, 0.3, 1.2, 3, 1, 0.5, 1, 3, 18, 20, 0]; +var preset_RZekquag = [8, 0.7, 1.8, 0.8, 0.2, 1.3, 3.3, 0.6, 0.8, 2.8, 6.2, 18, 27, 12]; +var preset_Rmauquag = [8, 0.7, 1.8, 0.8, 0.2, 1.3, 3.3, 0.6, 0.8, 0.01, 6.2, 18, 27, 12]; +var preset_Rmauc3 = [1, 1, 3, 0.8, 0.2, 1.3, 3.3, 2, 1, 0.01, 6.2, 30, 1, 12]; +var preset_Rmauc3greedy = [8, 1, 3, 0.8, 0.2, 1.3, 3.3, 2, 1, 0.01, 6.2, 18, 15, 12]; var presetListU2 = [preset_RZek059, preset_RZekmelt, preset_RZekquag, preset_Rmauquag, preset_Rmauc3, preset_Rmauc3greedy, preset_Rspace]; @@ -105,8 +105,8 @@ var presetListHtmlU2 = "\ \ \ \ -\ -\ +\ +\ \ "; @@ -188,7 +188,7 @@ AutoPerks.displayGUI = function() { apGUI.$ratiosLine3.setAttribute('style', 'display: inline-block; text-align: left; width: 100%'); apGUI.$customRatios.appendChild(apGUI.$ratiosLine3); var listratiosLine3; - listratiosLine3 = ["Resilience","Tenacity","Greed"]; + listratiosLine3 = ["Resilience","Tenacity","Greed", "Frenzy"]; for (var i in listratiosLine3) { AutoPerks.createInput(listratiosLine3[i],apGUI.$ratiosLine3); } @@ -898,7 +898,6 @@ AutoPerks.initializePerks = function () { var resourceful = new AutoPerks.VariablePerk("resourceful", 50000, true, 9, 0.05); var overkill = new AutoPerks.VariablePerk("overkill", 1000000, true, 10, 0.005, 30); //Fluffy perks: a new pseudo-category had to be created for "capable" - its a fixed,Linear, (not exponential) perk. - //TODO: Cost benefit analysis the inter-relationship of buying these. var capable = new AutoPerks.FixedPerk("capable", 100000000, 0, 10, "fluffy"); var cunning = new AutoPerks.VariablePerk("cunning", 100000000000, false, 11, 0.05); var curious = new AutoPerks.VariablePerk("curious", 100000000000000, false, 12, 0.05); @@ -921,6 +920,7 @@ AutoPerks.initializePerks = function () { var tenacity = new AutoPerks.VariablePerk("tenacity", 50000000, true, 11, 0.1, 40); //we'll think of it as of 10% compounding to not complicate things too much var greed = new AutoPerks.VariablePerk("greed", 10000000000, true, 12, 0.1, 40); + var frenzy = new AutoPerks.VariablePerk("frenzy", 1000000000000000, true, 13, 0.1); AutoPerks.perkHolder = []; //gather these into an array of objects @@ -928,7 +928,7 @@ AutoPerks.initializePerks = function () { AutoPerks.perkHolder = [siphonology, anticipation, meditation, relentlessness, range, agility, bait, trumps, packrat, looting, toughness, power, motivation, pheromones, artisanistry, carpentry, resilience, coordinated, resourceful, overkill, capable, cunning, curious, classy, toughness_II, power_II, motivation_II, carpentry_II, looting_II]; } else if (game.global.universe == 2) { var overkill = new AutoPerks.FixedPerk("overkill", 1000000, 30); - AutoPerks.perkHolder = [range, agility, bait, trumps, packrat, overkill, looting, toughness, resilience, power, motivation, pheromones, artisanistry, carpentry, prismal, equality, criticality, tenacity, greed]; + AutoPerks.perkHolder = [range, agility, bait, trumps, packrat, looting, toughness, resilience, power, motivation, pheromones, artisanistry, carpentry, prismal, equality, criticality, tenacity, greed, frenzy]; } //initialize basics on all. for(var i in AutoPerks.perkHolder) { From 5391e0a3dcc721ab09e7a0514206d0c6d29b7611 Mon Sep 17 00:00:00 2001 From: maurezen Date: Mon, 7 Sep 2020 12:32:55 +0300 Subject: [PATCH 150/194] #83 - 5.4.0 update changes - Insanity challenge custom portal --- SettingsGUI.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SettingsGUI.js b/SettingsGUI.js index 5565db463..cef564c4e 100644 --- a/SettingsGUI.js +++ b/SettingsGUI.js @@ -259,7 +259,7 @@ function initializeAllSettings() { 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', 'Bublé', 'Melt', 'Quagmire', 'Decay', 'Electricity', 'Life', 'Crushed', 'Nom', 'Toxicity', 'Watch', 'Lead', 'Corrupted', 'Domination', 'Custom'], "Core"); //document.getElementById("AutoPortal").style="font-size: 1.0vw;"; //fit it on 1 line. - 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', 'Bublé', 'Melt', 'Quagmire', 'Decay', 'Electricity', 'Life', 'Crushed', 'Nom', 'Toxicity', 'Watch', 'Lead', 'Corrupted', 'Domination', 'Archaeology', 'Mayhem'], "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', 'Bublé', 'Melt', 'Quagmire', 'Decay', 'Electricity', 'Life', 'Crushed', 'Nom', 'Toxicity', 'Watch', 'Lead', 'Corrupted', 'Domination', 'Archaeology', 'Insanity', 'Mayhem'], "Core"); //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"); From 544480057de68125e4775e814a166d4f9f07e59f Mon Sep 17 00:00:00 2001 From: maurezen Date: Mon, 7 Sep 2020 13:29:18 +0300 Subject: [PATCH 151/194] #83 - 5.4.0 update changes - parity work ratio --- modules/jobs.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/jobs.js b/modules/jobs.js index 3fb0408bb..51aca06bc 100644 --- a/modules/jobs.js +++ b/modules/jobs.js @@ -17,6 +17,7 @@ MODULES["jobs"].ratios[1][3] = [3,1,4]; MODULES["jobs"].ratios[1][2] = [3,3,5]; MODULES["jobs"].ratios[1][1] = [1,1,1]; //[2] is U2 +MODULES["jobs"].ratios[2][6] = [1,1,1]; MODULES["jobs"].ratios[2][5] = [1,20,200]; MODULES["jobs"].ratios[2][4] = [10,1,1]; MODULES["jobs"].ratios[2][3] = [3,1,4]; @@ -337,6 +338,13 @@ function workerRatios() { ratio++; } + //we want that sweet parity buff if we're where it's important (u2) + //and are not already heavily skewed towards food + //TODO have a setting for maxing parity + if (game.global.universe == 2 && getParityBonus() > 1 && ratio != 4) { + ratio = 6; + } + ratioSet = MODULES["jobs"].ratios[game.global.universe][ratio]; } //Override normal ratios with challenge specific ones From f689bd85f6cd5f1848a4a146df6130a0b7f692fc Mon Sep 17 00:00:00 2001 From: maurezen Date: Mon, 7 Sep 2020 13:57:08 +0300 Subject: [PATCH 152/194] #83 - 5.4.0 update changes - hunger perk --- modules/perks.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/perks.js b/modules/perks.js index 84d4ed2f6..707cf4aad 100644 --- a/modules/perks.js +++ b/modules/perks.js @@ -927,8 +927,8 @@ AutoPerks.initializePerks = function () { if (game.global.universe == 1) { AutoPerks.perkHolder = [siphonology, anticipation, meditation, relentlessness, range, agility, bait, trumps, packrat, looting, toughness, power, motivation, pheromones, artisanistry, carpentry, resilience, coordinated, resourceful, overkill, capable, cunning, curious, classy, toughness_II, power_II, motivation_II, carpentry_II, looting_II]; } else if (game.global.universe == 2) { - var overkill = new AutoPerks.FixedPerk("overkill", 1000000, 30); - AutoPerks.perkHolder = [range, agility, bait, trumps, packrat, looting, toughness, resilience, power, motivation, pheromones, artisanistry, carpentry, prismal, equality, criticality, tenacity, greed, frenzy]; + var hunger = new AutoPerks.FixedPerk("hunger", 1000000, 30); + AutoPerks.perkHolder = [range, agility, bait, trumps, packrat, hunger, looting, toughness, resilience, power, motivation, pheromones, artisanistry, carpentry, prismal, equality, criticality, tenacity, greed, frenzy]; } //initialize basics on all. for(var i in AutoPerks.perkHolder) { From c42880a92bcafc0e0ac59498125a4737bb873311 Mon Sep 17 00:00:00 2001 From: maurezen Date: Mon, 7 Sep 2020 14:13:56 +0300 Subject: [PATCH 153/194] #83 - 5.4.0 update changes - parity adjustment --- modules/jobs.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/jobs.js b/modules/jobs.js index 51aca06bc..a1b53204b 100644 --- a/modules/jobs.js +++ b/modules/jobs.js @@ -339,9 +339,9 @@ function workerRatios() { } //we want that sweet parity buff if we're where it's important (u2) - //and are not already heavily skewed towards food + //1:1:1 gets quite a bonus, which is not that lower than 1:0:0 skew, so we'll stick to this //TODO have a setting for maxing parity - if (game.global.universe == 2 && getParityBonus() > 1 && ratio != 4) { + if (game.global.universe == 2 && getParityBonus() > 1) { ratio = 6; } From 554598f149895dc3f8f09f8fda2faefd1c18091d Mon Sep 17 00:00:00 2001 From: maurezen Date: Mon, 7 Sep 2020 18:40:39 +0300 Subject: [PATCH 154/194] #83 - 5.4.0 update changes - experienced makes equality management ignore fast trait --- modules/mainWrapper.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/mainWrapper.js b/modules/mainWrapper.js index 7ba4196e5..08bed3833 100644 --- a/modules/mainWrapper.js +++ b/modules/mainWrapper.js @@ -15,6 +15,7 @@ mainWrapper.getCurrentCell = function() { mainWrapper.isEnemyFast = function(cell) { var checkFast = (game.global.challengeActive == "Slow" || ((((game.badGuys[cell.name].fast || cell.mutation == "Corruption") && game.global.challengeActive != "Nom") || game.global.voidBuff == "doubleAttack") && game.global.challengeActive != "Coordinate")); + var experienced = game.global.challengeActive == "Exterminate" && game.challenges.Exterminate.experienced; var forceSlow = false; if (game.global.challengeActive == "Duel"){ if (game.challenges.Duel.enemyStacks < 10) { @@ -23,7 +24,7 @@ mainWrapper.isEnemyFast = function(cell) { forceSlow = true; } } - return checkFast && !forceSlow; + return checkFast && !forceSlow && !experienced; } //copypaste as well; at least this is straightforward to do From b5a65cf8d6a039182ba5221a41e022b98653e9bc Mon Sep 17 00:00:00 2001 From: maurezen Date: Wed, 9 Sep 2020 00:47:29 +0300 Subject: [PATCH 155/194] #83 - 5.4.0 update changes - buy Antenna if you can --- modules/buildings.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/buildings.js b/modules/buildings.js index 2943ed4b9..a15196fd1 100644 --- a/modules/buildings.js +++ b/modules/buildings.js @@ -197,6 +197,10 @@ function buyBuildings() { var customVars = MODULES["buildings"]; var oldBuy = preBuy2(); game.global.buyAmt = 1; + //Antenna + if (!game.buildings.Antenna.locked) { + safeBuyBuilding('Antenna'); + } //Smithy if (!game.buildings.Smithy.locked) { safeBuyBuilding('Smithy'); From 108b45f01545b7da2130b80d929107ce0bb1fdc9 Mon Sep 17 00:00:00 2001 From: maurezen Date: Wed, 9 Sep 2020 13:13:16 +0300 Subject: [PATCH 156/194] #83 - 5.4.0 update changes - take hub into account while calculating housing ratios --- modules/buildings.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/modules/buildings.js b/modules/buildings.js index a15196fd1..9ef151ca4 100644 --- a/modules/buildings.js +++ b/modules/buildings.js @@ -82,7 +82,7 @@ function buyFoodEfficientHousing() { for (var house in unlockedHousing) { var building = game.buildings[unlockedHousing[house]]; var cost = getBuildingItemPrice(building, "food", false, 1); - var ratio = cost / building.increase.by; + var ratio = cost / getHousingIncrease(building); buildorder.push({ 'name': unlockedHousing[house], 'ratio': ratio @@ -106,6 +106,14 @@ function buyFoodEfficientHousing() { } } +function getHousingIncrease(building) { + var increase = building.increase.by; + if (!game.buildings.Hub.locked && game.buildings.Hub.owned > 0) { + increase += game.buildings.Hub.increase.by; + } + return increase; +} + function buyGemEfficientHousing() { var gemHousing = ["Hotel", "Resort", "Gateway", "Collector", "Warpstation"]; var unlockedHousing = []; @@ -118,7 +126,7 @@ function buyGemEfficientHousing() { for (var house in unlockedHousing) { var building = game.buildings[unlockedHousing[house]]; var cost = getBuildingItemPrice(building, "gems", false, 1); - var ratio = cost / building.increase.by; + var ratio = cost / getHousingIncrease(building); //don't consider Gateway if we can't afford it right now - hopefully to prevent game waiting for fragments to buy gateway when collector could be bought right now if (unlockedHousing[house] == "Gateway" && !canAffordBuilding('Gateway')) continue; From 8cfdafc709b738d5d6ebc0f9f0f913c61aac1f22 Mon Sep 17 00:00:00 2001 From: maurezen Date: Thu, 10 Sep 2020 17:38:13 +0300 Subject: [PATCH 157/194] #83 - 5.4.0 update changes - a sneaky equality management fix so wait for gamma only applies to fast enemies, as tooltip says --- modules/equality.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/equality.js b/modules/equality.js index a9a7fe6d3..8a456577a 100644 --- a/modules/equality.js +++ b/modules/equality.js @@ -33,7 +33,9 @@ equality.manageEquality = function() { //run just enough stacks vs fast var aimAtGamma = this.aimAtGamma(); - if (mainWrapper.isEnemyFast(cell) || aimAtGamma) { + //@todo maybe we wanna check equality vs gamma modifiers to see whether waiting for gamma to proc + //is better than running suicidally? frenzy won't make this easy, tho + if (mainWrapper.isEnemyFast(cell)) { var minEnemyDamage = calculateDamage(cell.attack, false, false, false, cell, true); var maxEnemyDamage = mainWrapper.min2max(minEnemyDamage); From 8ead4626cb5ba23933c219d540a017e1a4b6eff2 Mon Sep 17 00:00:00 2001 From: maurezen Date: Mon, 14 Sep 2020 12:10:32 +0300 Subject: [PATCH 158/194] #80 - Add scruffy exp graphs - also added worshippers --- Graphs.js | 125 ++++++++++++++++++++++++++---------------------------- 1 file changed, 61 insertions(+), 64 deletions(-) diff --git a/Graphs.js b/Graphs.js index 5efc18586..02541093d 100644 --- a/Graphs.js +++ b/Graphs.js @@ -30,7 +30,7 @@ document.getElementById("graphParent").innerHTML += '
0) { - graphData[graphData.length - 1].data.push(0); - loop--; - } - } - //write datapoint (one of 3 ways) - if (currentZone != 0) { - graphData[graphData.length - 1].data.push(Math.floor((allSaveData[i].essence - startEssence) / ((allSaveData[i].currentTime - allSaveData[i].portalTime) / 3600000))); - } - currentZone = allSaveData[i].world; - } + graphData = hourlyGraph('essence'); title = 'Dark Essence/Hour (Cumulative)'; xTitle = 'Zone'; yTitle = 'Dark Essence/Hour'; @@ -1036,45 +1014,37 @@ function setGraphData(graph) { var currentPortal = -1; var currentZone = -1; var startFluffy = 0; - graphData = []; - for (var i in allSaveData) { - if (allSaveData[i].totalPortals != currentPortal) { - graphData.push({ - name: 'Portal ' + allSaveData[i].totalPortals + ': ' + allSaveData[i].challenge, - data: [] - }); - currentPortal = allSaveData[i].totalPortals; - currentZone = 0; - startFluffy = allSaveData[i].fluffy; - } - //runs extra checks for mid-run imports, and pushes 0's to align to the right zone properly. - /*if (currentZone != allSaveData[i].world - 1) { - var loop = allSaveData[i].world - 1 - currentZone; - while (loop > 0) { - graphData[graphData.length - 1].data.push(0); - loop--; - } - }*/ - if (currentZone != allSaveData[i].world - 1) { - //console.log(allSaveData[i].totalPortals + " / " + allSaveData[i].world); - var loop = allSaveData[i].world - 1 - currentZone; - while (loop > 0) { - graphData[graphData.length - 1].data.push(allSaveData[i-1][item]*1); - loop--; - } - } - //write datapoint (one of 3 ways) - if (currentZone != 0) { - graphData[graphData.length - 1].data.push(Math.floor((allSaveData[i].fluffy - startFluffy) / ((allSaveData[i].currentTime - allSaveData[i].portalTime) / 3600000))); - } - currentZone = allSaveData[i].world; - } + graphData = hourlyGraph('fluffy'); title = 'Fluffy XP/Hour (Cumulative)'; xTitle = 'Zone (starts at 300)'; yTitle = 'Fluffy XP/Hour'; yType = 'Linear'; xminFloor = 300; break; + case 'Scruffy XP': + graphData = allPurposeGraph('scruffy',true,"number"); + title = 'Scruffy XP (Lifetime Total)'; + xTitle = 'Zone'; + yTitle = 'Scruffy XP'; + yType = 'Linear'; + break; + case 'Scruffy XP PerHour': + var currentPortal = -1; + var currentZone = -1; + var startFluffy = 0; + graphData = hourlyGraph('scruffy'); + title = 'Scruffy XP/Hour (Cumulative)'; + xTitle = 'Zone'; + yTitle = 'Scruffy XP/Hour'; + yType = 'Linear'; + break; + case 'Worshippers': + graphData = allPurposeGraph('worshipper',true,"number"); + title = 'Worshippers Active'; + xTitle = 'Zone'; + yTitle = 'Worshippers'; + yType = 'Linear'; + break; case 'OverkillCells': var currentPortal = -1; graphData = []; @@ -1110,6 +1080,34 @@ function setGraphData(graph) { break; }//end of switch(graph) + function hourlyGraph(item) { + graphData = []; + for (var i in allSaveData) { + if (allSaveData[i].totalPortals != currentPortal) { + graphData.push({ + name: 'Portal ' + allSaveData[i].totalPortals + ': ' + allSaveData[i].challenge, + data: [] + }); + currentPortal = allSaveData[i].totalPortals; + currentZone = 0; + startingValue = allSaveData[i][item]*1; + } + //runs extra checks for mid-run imports, and pushes 0's to align to the right zone properly. + if (currentZone != allSaveData[i].world - 1) { + var loop = allSaveData[i].world - 1 - currentZone; + while (loop > 0) { + graphData[graphData.length - 1].data.push(0); + loop--; + } + } + if (currentZone != 0) { + graphData[graphData.length - 1].data.push(Math.floor((allSaveData[i][item]*1 - startingValue) / ((allSaveData[i].currentTime - allSaveData[i].portalTime) / 3600000))); + } + currentZone = allSaveData[i].world; + } + return graphData; + } + //(internal) default function used to draw non-specific graphs (and some specific ones) function allPurposeGraph(item,extraChecks,typeCheck,funcToRun,useAccumulator) { var currentPortal = -1; @@ -1151,13 +1149,11 @@ function setGraphData(graph) { var num = funcToRun(allSaveData[i],allSaveData[i-1]); if (num < 0) num = 1; graphData[graphData.length - 1].data.push(num); - } - else if (funcToRun && useAccumulator && currentZone != 0) { + } else if (funcToRun && useAccumulator && currentZone != 0) { accumulator += funcToRun(allSaveData[i],allSaveData[i-1]); if (accumulator < 0) accumulator = 1; graphData[graphData.length - 1].data.push(accumulator); - } - else { + } else { if (allSaveData[i][item] >= 0) graphData[graphData.length - 1].data.push(allSaveData[i][item]*1); else if (extraChecks) @@ -1167,6 +1163,7 @@ function setGraphData(graph) { } return graphData; } + //default formatter used (can define a decimal precision, and a suffix) formatter = formatter || function () { var ser = this.series; From 12de4522602d9189733653c8c8d588ae3a037fea Mon Sep 17 00:00:00 2001 From: maurezen Date: Mon, 14 Sep 2020 12:14:25 +0300 Subject: [PATCH 159/194] #80 - Add scruffy exp graphs - dropped the analytics while I was around --- Graphs.js | 19 --------- SettingsGUI.js | 16 -------- modules/client-server.js | 84 ---------------------------------------- 3 files changed, 119 deletions(-) delete mode 100644 modules/client-server.js diff --git a/Graphs.js b/Graphs.js index 02541093d..8a4fe55e7 100644 --- a/Graphs.js +++ b/Graphs.js @@ -393,25 +393,6 @@ function pushData() { safeSetItems('allSaveData', JSON.stringify(allSaveData)); } -//TODO: Cloud Analytics - Experimental function to start tracking graphing data on the cloud server. -// we want this to be small so we don't transmit the whole 10MB graph-data. -var graphAnal = []; -function trackHourlyGraphAnalytics() { - graphAnal.push({ - currentTime: new Date().getTime(), - totalPortals: game.global.totalPortals + game.global.totalRadPortals, - heliumOwned: game.resources.helium.owned, - highzone: game.global.highestLevelCleared, - bones: game.global.b - //ratio: document.getElementById("ratioPreset").value - }); - safeSetItems('graphAnal', JSON.stringify(graphAnal)); -} -//Run once. -trackHourlyGraphAnalytics(); -//then set Timer loop for 1 hour; -setInterval(trackHourlyGraphAnalytics, 3600000); - function initializeData() { //initialize fresh with a blank array if needed if (allSaveData === null) { diff --git a/SettingsGUI.js b/SettingsGUI.js index cef564c4e..0fc16f155 100644 --- a/SettingsGUI.js +++ b/SettingsGUI.js @@ -479,23 +479,7 @@ function initializeAllSettings() { createSetting('ExportAutoTrimps', 'Export AutoTrimps', 'Export your AutoTrimps Settings as a output string text formatted in JSON.', 'infoclick', 'ExportAutoTrimps', null, 'Import Export'); createSetting('DefaultAutoTrimps', 'Reset to Default', 'Reset everything to the way it was when you first installed the script. ', 'infoclick', 'ResetDefaultSettingsProfiles', null, 'Import Export'); createSetting('CleanupAutoTrimps', 'Cleanup Saved Settings ', 'Deletes old values from previous versions of the script from your AutoTrimps Settings file.', 'infoclick', 'CleanupAutoTrimps', null, 'Import Export'); - createSetting('allowSettingsUpload', 'Allow Analytics Upload', 'Uploads your AUTOTRIMPS saved settings files (the same as Export AutoTrimps on this tab) anonymously - to https://autotrimps.site = the official Autotrimps development server. It will remain private for now, and aggregated for analytics to improve the script in the future and see which features are being used. Please Opt in. The upload will be approximately a small 5-10KB uncompressed text file every time the script is LOADED (for the time being until it is refined), and there is no concern for any personal data leak or privacy concern. This is all in good faith, and you are welcome to check the open source file modules/client-server.js. In the future, I will have to make a more fine-grained data-usage privacy-policy. Possible other data collected in the near-future may include certain game stats such as your highest zone, helium amount, bones, resource/magma/DE amounts, perk ratio selections. ', 'boolean', true, null, 'Import Export'); settingsProfileMakeGUI(); //Settings Profile dropdown and Delete button. (this always shows up first - can be here last) - //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('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('ATModuleLoad', 'ReLoad Module', 'Load/Reloads a module file (.js) and runs it.', 'infoclick', 'ATModuleLoad', null, 'Import Export'); - */ } initializeAllSettings(); //EXECUTE diff --git a/modules/client-server.js b/modules/client-server.js deleted file mode 100644 index 988cd7ef1..000000000 --- a/modules/client-server.js +++ /dev/null @@ -1,84 +0,0 @@ -/* - * AutoTrimps Client-Server EndPoint Data Transferance script. - * - * March 4.2018 - Simple AT data save endpoint script -- orig by Swiffy - * -*/ -//MODULES["client-server"] = {}; -//The ATServer{} object has 3 commands: GetID(), SaveData(), Upload() -//All Data is uncompressed, unencrypted, plaintext for clarity. No private info is leaked. - -var ATServer = -{ - //SERVER_IP: '207.246.77.188', - SERVER_HOSTNAME: 'https://autotrimps.site/ATendpoint.php' -} - -ATServer.GetID = function(callback) -{ - var req = new XMLHttpRequest(); - - req.onreadystatechange = function() - { - if (this.readyState == 4 && this.status == 200) - { - callback(JSON.parse(req.responseText).data.id); - } - } - - req.open('GET', ATServer.SERVER_HOSTNAME, true); - req.setRequestHeader('req', 'get_id'); - req.send(); -} - -ATServer.SaveData = function(id, data, callback) -{ - var req = new XMLHttpRequest(); - - req.onreadystatechange = function() - { - if (this.readyState == 4 && this.status == 200) - { - callback(JSON.parse(req.responseText)); - } - } - - req.open('POST', ATServer.SERVER_HOSTNAME + '?id=' + id, true); - req.setRequestHeader('req', 'save_data'); - req.setRequestHeader("Content-Type", "application/json"); - req.send(JSON.stringify(data)); -} - -ATServer.Upload = function(data) -{ - ATServer.GetID(function(id) - { - autoTrimpSettings.analyticsID = autoTrimpSettings.analyticsID || id; - //debug("Server generated ID: " + autoTrimpSettings.analyticsID, "other"); - ATServer.SaveData(autoTrimpSettings.analyticsID, data, function(response) - { - debug("Submitted analytics data w/ ID: " + autoTrimpSettings.analyticsID, "other"); - }); - }); -} - -//Data to be uploaded: The version of AutoTrimps and the list of your settings file. Also list of saved/named profiles. -// note to newbs: typing in autoTrimpSettings into console and expanding the arrow will show you what is all in here. -//------------------------------------------------------------------------------------------------------------------- -//TODO: This is part of the ATsettings variable management:, it might make sense to move to that file, splitting here -//------------------------------------------------------------------------------------------------------------------- - -ATServer.UploadSettings = function() { - var loadLastProfiles = localStorage.getItem('ATSelectedSettingsProfile'); - var allProfiles = loadLastProfiles ? JSON.parse(loadLastProfiles) : new Array(); //load the import. - var ulData = { - settings: JSON.parse(serializeSettings()), //Line 41 utils.js - grabs fresh autoTrimpSettings from localstorage, reduces the length and parses it. - profiles: allProfiles, //every saved profile. - modules: MODULES - }; - ATServer.Upload(ulData); - debug("AutoTrimps Settings File was Uploaded for analytics/usage! This is controlled with a new button on AT's Import/Export tab.","general"); -} -if (getPageSetting('allowSettingsUpload')) { - ATServer.UploadSettings(); -} From 8a659b8e7da12e9735b9c41a53399a3105dfd5de Mon Sep 17 00:00:00 2001 From: maurezen Date: Mon, 14 Sep 2020 12:19:16 +0300 Subject: [PATCH 160/194] #80 - Add scruffy exp graphs - cleanup --- AutoTrimps2.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AutoTrimps2.js b/AutoTrimps2.js index 2a8c16fdc..2922877be 100644 --- a/AutoTrimps2.js +++ b/AutoTrimps2.js @@ -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', 'equality', 'mainWrapper']; + ATmoduleList = ['query', 'portal', 'upgrades', 'heirlooms', 'buildings', 'jobs', 'equipment', 'gather', 'stance', 'battlecalc', 'maps', 'breedtimer', 'dynprestige', 'fight', 'scryer', 'magmite', 'other', 'import-export', 'perks', /* 'perky', */ 'fight-info', 'performance', 'equality', 'mainWrapper']; for (var m in ATmoduleList) { ATscriptLoad(modulepath, ATmoduleList[m]); } From 2dc97a54ade3789ac85127046e3fb1ada1cd664e Mon Sep 17 00:00:00 2001 From: maurezen Date: Wed, 30 Sep 2020 12:10:43 +0300 Subject: [PATCH 161/194] #83 - 5.4.0 update changes - a sneaky building update, forbidding to autobuild a smithy during Quest3 --- modules/buildings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/buildings.js b/modules/buildings.js index 9ef151ca4..36feeb8c2 100644 --- a/modules/buildings.js +++ b/modules/buildings.js @@ -210,7 +210,7 @@ function buyBuildings() { safeBuyBuilding('Antenna'); } //Smithy - if (!game.buildings.Smithy.locked) { + if (!game.buildings.Smithy.locked && !(game.global.challengeActive == 'Quest')) { safeBuyBuilding('Smithy'); } //Microchip From 39d71510ee1c8b250e1fa8fac75e0459214c633d Mon Sep 17 00:00:00 2001 From: maurezen Date: Mon, 7 Dec 2020 20:52:03 +0300 Subject: [PATCH 162/194] #77 - equality manamement - added an ability to target a specific number of hits survived via setting equality module variables --- modules/equality.js | 140 +++++++++++++++++++++++++++++------------ modules/mainWrapper.js | 4 ++ 2 files changed, 105 insertions(+), 39 deletions(-) diff --git a/modules/equality.js b/modules/equality.js index 8a456577a..ed0321f7c 100644 --- a/modules/equality.js +++ b/modules/equality.js @@ -4,6 +4,14 @@ equality = {}; MODULES["equality"] = equality; +//this is the threshold for angelic to heal us indefinitely +//@todo make this an UI-exposed setting +//24 gets us 3-4 hits for main health pool which means hey, we get to live indefinitely +equality.hitsToSurvive = 24; +equality.gammaHits = 5; +equality.dropEverything = -1; +equality.wannaLive = true; + //returns true if we should try to keep trimps alive for 5 attacks //setting is argument for it //reflect is an argument against it @@ -11,11 +19,49 @@ MODULES["equality"] = equality; equality.aimAtGamma = function() { var settingOn = getPageSetting('WaitForGamma'); //reflect is going to kill us, so what's the point - settingOn &= !(game.global.challengeActive == "Daily" && typeof game.global.dailyChallenge.mirrored !== 'undefined'); + settingOn = settingOn && !mainWrapper.reflect(); + + return settingOn; +} + + +equality.iWannaLive = function() { + //var settingOn = getPageSetting('IWannaLive') + //@todo make this a setting + var settingOn = this.wannaLive; + //reflect is going to kill us, so what's the point + settingOn = settingOn && !mainWrapper.reflect(); return settingOn; } +equality.howLongDoILive = function(cell) { + var hitsToSurvive = this.dropEverything; + //fast => just enough equality to survive + // waitForGamma => survive 5 turns + // iWannaLive => survive however many turns there is, at least 5 + //slow => zero equality + // iWannaLive => survive however many turns there is + // waitForGamma => at least 5 + if (mainWrapper.isEnemyFast(cell)) { + hitsToSurvive = 1; + if (this.aimAtGamma()) { + hitsToSurvive = this.gammaHits; + } + if (this.iWannaLive() && (hitsToSurvive < this.hitsToSurvive)) { + hitsToSurvive = this.hitsToSurvive; + } + } else { + if (this.iWannaLive()) { + hitsToSurvive = this.hitsToSurvive; + if (this.aimAtGamma() && (hitsToSurvive < this.gammaHits)) { + hitsToSurvive = this.gammaHits; + } + } + } + return hitsToSurvive; +} + //performs equality dance. //no stacks if enemy is not fast //otherwise, if not trying to hit gamma, barely enough stacks to survive a hit @@ -31,52 +77,68 @@ equality.manageEquality = function() { //happens near portal if (typeof cell === 'undefined') return false; - //run just enough stacks vs fast - var aimAtGamma = this.aimAtGamma(); - //@todo maybe we wanna check equality vs gamma modifiers to see whether waiting for gamma to proc - //is better than running suicidally? frenzy won't make this easy, tho - if (mainWrapper.isEnemyFast(cell)) { + var hitsToSurvive = this.howLongDoILive(cell); + + //this will drop equality stacks to zero + var equalityNeeded = -getPerkLevel("Equality"); + + if (0 < hitsToSurvive) { var minEnemyDamage = calculateDamage(cell.attack, false, false, false, cell, true); var maxEnemyDamage = mainWrapper.min2max(minEnemyDamage); - var enemyDamage = (minEnemyDamage + maxEnemyDamage) / 2; + var enemyDamage = maxEnemyDamage; + var ourEffectiveHealth = game.global.soldierHealthMax + game.global.soldierEnergyShieldMax; - if (aimAtGamma) { - enemyDamage = maxEnemyDamage; - ourEffectiveHealth = ourEffectiveHealth / 5; - } + var ourEffectiveHealthWait = ourEffectiveHealth / hitsToSurvive; - var equalityNeeded = 0; - if (enemyDamage > ourEffectiveHealth) { - equalityNeeded = Math.ceil(Math.log10(enemyDamage / ourEffectiveHealth)/Math.log10(1.1)); - //cut down on equality if we can - } else { - //the corner case is when the truth lies between the two equality stacks - //this will cause fluctuation - //not very nice for your eyes, but better than adding 1 here and having an extra stack - equalityNeeded = -Math.floor(Math.log10(ourEffectiveHealth / enemyDamage)/Math.log10(1.1)); - } + equalityNeeded = this.additionalStacksNeeded(ourEffectiveHealthWait, enemyDamage); - //there might be some stacks already - //this can also be NaN sometimes - if (isNaN(game.portal.Equality.disabledStackCount)) { - game.portal.Equality.disabledStackCount = 0; - } - //also this happens to be string if set via slider, hence Number() call - game.portal.Equality.disabledStackCount = Number(game.portal.Equality.disabledStackCount) + equalityNeeded; - - //gotta stay in the interval, game doesn't have validation - var maxEquality = getPerkLevel("Equality"); - if (game.portal.Equality.disabledStackCount > maxEquality) { - game.portal.Equality.disabledStackCount = maxEquality; - } else if (game.portal.Equality.disabledStackCount < 0) { - game.portal.Equality.disabledStackCount = 0; + if (equalityNeeded > this.equalityStackBudget()) { + equalityNeeded = this.additionalStacksNeeded(ourEffectiveHealth, enemyDamage); } - //if enemy is slow run 0 stacks - } else { - game.portal.Equality.disabledStackCount = 0; } - manageEqualityStacks(); + equality.setStacks(equalityNeeded); + } +} + +equality.additionalStacksNeeded = function(ourHealth, enemyDamage) { + var equalityNeeded = 0; + if (enemyDamage > ourHealth) { + equalityNeeded = Math.ceil(Math.log10(enemyDamage / ourHealth)/Math.log10(1.1)); + //cut down on equality if we can + } else { + //the corner case is when the truth lies between the two equality stacks + //this will cause fluctuation + equalityNeeded = -Math.floor(Math.log10(ourHealth / enemyDamage)/Math.log10(1.1)); + //this setting means we don't really want to die on accident, so let's have one extra + if (this.iWannaLive()) { + equalityNeeded++; + } + } + return equalityNeeded; +} + +equality.equalityStackBudget = function() { + return getPerkLevel("Equality") - Number(game.portal.Equality.disabledStackCount); +} + +equality.setStacks = function(equalityNeeded) { + //there might be some stacks already + //this can also be NaN sometimes + if (isNaN(game.portal.Equality.disabledStackCount)) { + game.portal.Equality.disabledStackCount = 0; + } + //also this happens to be string if set via slider, hence Number() call + game.portal.Equality.disabledStackCount = Number(game.portal.Equality.disabledStackCount) + equalityNeeded; + + //gotta stay in the interval, game doesn't have validation + var maxEquality = getPerkLevel("Equality"); + if (game.portal.Equality.disabledStackCount > maxEquality) { // gotta ignore + game.portal.Equality.disabledStackCount = maxEquality; + } else if (game.portal.Equality.disabledStackCount < 0) { + game.portal.Equality.disabledStackCount = 0; } + + manageEqualityStacks(); } \ No newline at end of file diff --git a/modules/mainWrapper.js b/modules/mainWrapper.js index 08bed3833..fe1367a5c 100644 --- a/modules/mainWrapper.js +++ b/modules/mainWrapper.js @@ -72,4 +72,8 @@ mainWrapper.canOverkill = function() { enemyMaxHealth /= (getPerkLevel("Overkill") * 0.005); return trimpMaxAttack >= (enemyMaxHealth + enemyHealth); +} + +mainWrapper.reflect = function() { + return (game.global.challengeActive == "Daily" && typeof game.global.dailyChallenge.mirrored !== 'undefined'); } \ No newline at end of file From fb89b273facc5d29ddc0b1f982ee613c0ca606ad Mon Sep 17 00:00:00 2001 From: maurezen Date: Mon, 7 Dec 2020 21:36:32 +0300 Subject: [PATCH 163/194] #77 - equality manamement - exposed module variables as settings --- SettingsGUI.js | 6 +++++- modules/equality.js | 23 ++++++++--------------- 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/SettingsGUI.js b/SettingsGUI.js index 0fc16f155..4d124bc59 100644 --- a/SettingsGUI.js +++ b/SettingsGUI.js @@ -384,7 +384,8 @@ function initializeAllSettings() { 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'); createSetting('ManagedEquality', 'Managed Equality', '[U2 only] Use Equality dance - zero equality for non-fast enemies, just enough for fast ones', 'boolean', true, null, 'Combat'); createSetting('WaitForGamma', 'Wait for Gamma', '[U2 only] Equality dance subsetting - if true, for fast enemies it will aim at surviving 5 hits to trigger Gamma Burst. Will try to detect situations like reflect when this is not possible. Plague and electricity effects are assumed fine atm due to Angelic mastery.', 'boolean', false, null, 'Combat'); - + createSetting('IWannaLive', 'I Wanna Live', '[U2 only] Equality dance subsetting - if true, will try to survive a specified number of hits. Will try to detect situations like reflect when this is not possible. Plague and electricity effects are ignored - adjust the setting to make sure Angelic can keep up for long enough.', 'boolean', false, null, 'Combat'); + createSetting('IWannaLiveForHowLong', 'I Wanna Live For How Long', '[U2 only] Equality dance subsetting - how long do we want to try to live? Is ignored when I Wanna Live is false. Default setting of 24 hits means just about enough equality to survive indefinitely with 1170% prismatic shield and Angelic mastery.', 'value', '24', null, 'Combat'); @@ -850,6 +851,9 @@ function updateCustomButtons() { } //document.getElementById('Prestige').value = autoTrimpSettings.Prestige.selected; //dont update this, dynamic prestige takes it over and is handled elsewhere. + //IWannaLive should hide the field when disabled and show it when enabled + toggleElem('IWannaLiveForHowLong', getPageSetting('IWannaLive')); + //stop disable farming from needing a refresh if (getPageSetting('DisableFarm')) shouldFarm = false; diff --git a/modules/equality.js b/modules/equality.js index ed0321f7c..5f06018d8 100644 --- a/modules/equality.js +++ b/modules/equality.js @@ -5,12 +5,8 @@ equality = {}; MODULES["equality"] = equality; //this is the threshold for angelic to heal us indefinitely -//@todo make this an UI-exposed setting -//24 gets us 3-4 hits for main health pool which means hey, we get to live indefinitely -equality.hitsToSurvive = 24; equality.gammaHits = 5; equality.dropEverything = -1; -equality.wannaLive = true; //returns true if we should try to keep trimps alive for 5 attacks //setting is argument for it @@ -24,11 +20,12 @@ equality.aimAtGamma = function() { return settingOn; } +equality.hitsToSurvive = function() { + return getPageSetting('IWannaLiveForHowLong'); +} equality.iWannaLive = function() { - //var settingOn = getPageSetting('IWannaLive') - //@todo make this a setting - var settingOn = this.wannaLive; + var settingOn = getPageSetting('IWannaLive') //reflect is going to kill us, so what's the point settingOn = settingOn && !mainWrapper.reflect(); @@ -48,12 +45,12 @@ equality.howLongDoILive = function(cell) { if (this.aimAtGamma()) { hitsToSurvive = this.gammaHits; } - if (this.iWannaLive() && (hitsToSurvive < this.hitsToSurvive)) { - hitsToSurvive = this.hitsToSurvive; + if (this.iWannaLive() && (hitsToSurvive < this.hitsToSurvive())) { + hitsToSurvive = this.hitsToSurvive(); } } else { if (this.iWannaLive()) { - hitsToSurvive = this.hitsToSurvive; + hitsToSurvive = this.hitsToSurvive(); if (this.aimAtGamma() && (hitsToSurvive < this.gammaHits)) { hitsToSurvive = this.gammaHits; } @@ -109,12 +106,8 @@ equality.additionalStacksNeeded = function(ourHealth, enemyDamage) { //cut down on equality if we can } else { //the corner case is when the truth lies between the two equality stacks - //this will cause fluctuation + //this might cause fluctuation equalityNeeded = -Math.floor(Math.log10(ourHealth / enemyDamage)/Math.log10(1.1)); - //this setting means we don't really want to die on accident, so let's have one extra - if (this.iWannaLive()) { - equalityNeeded++; - } } return equalityNeeded; } From 58a3c09586c2194b1aa711d99310c6e8f8244d44 Mon Sep 17 00:00:00 2001 From: maurezen Date: Mon, 7 Dec 2020 22:08:33 +0300 Subject: [PATCH 164/194] #77 - equality manamement - configurable backoff --- modules/equality.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/equality.js b/modules/equality.js index 5f06018d8..18b823563 100644 --- a/modules/equality.js +++ b/modules/equality.js @@ -4,9 +4,10 @@ equality = {}; MODULES["equality"] = equality; -//this is the threshold for angelic to heal us indefinitely equality.gammaHits = 5; equality.dropEverything = -1; +//too niche of a setting to pull this to UI +equality.singleHitBackoff = true; //returns true if we should try to keep trimps alive for 5 attacks //setting is argument for it @@ -80,6 +81,10 @@ equality.manageEquality = function() { var equalityNeeded = -getPerkLevel("Equality"); if (0 < hitsToSurvive) { + //@todo this looks at absolute max dmg, e.g. snimp + //but for lower-dmg enemies we might get away with less equality + //(x2 difference in dmg is not uncommon) + //likewise, improbability hits a tad higher var minEnemyDamage = calculateDamage(cell.attack, false, false, false, cell, true); var maxEnemyDamage = mainWrapper.min2max(minEnemyDamage); @@ -90,7 +95,7 @@ equality.manageEquality = function() { equalityNeeded = this.additionalStacksNeeded(ourEffectiveHealthWait, enemyDamage); - if (equalityNeeded > this.equalityStackBudget()) { + if (singleHitBackoff && equalityNeeded > this.equalityStackBudget()) { equalityNeeded = this.additionalStacksNeeded(ourEffectiveHealth, enemyDamage); } } From fa0725d94bd062dbdcb44930135a98539d2025b2 Mon Sep 17 00:00:00 2001 From: maurezen Date: Mon, 7 Dec 2020 22:15:45 +0300 Subject: [PATCH 165/194] #77 - equality manamement - minor cleanup --- modules/equality.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/equality.js b/modules/equality.js index 18b823563..3ae520d5c 100644 --- a/modules/equality.js +++ b/modules/equality.js @@ -95,7 +95,7 @@ equality.manageEquality = function() { equalityNeeded = this.additionalStacksNeeded(ourEffectiveHealthWait, enemyDamage); - if (singleHitBackoff && equalityNeeded > this.equalityStackBudget()) { + if ((equalityNeeded > this.equalityStackBudget()) && this.singleHitBackoff) { equalityNeeded = this.additionalStacksNeeded(ourEffectiveHealth, enemyDamage); } } From be35ec00ba8325989d92da9c82d28354529602ab Mon Sep 17 00:00:00 2001 From: maurezen Date: Mon, 7 Dec 2020 23:06:36 +0300 Subject: [PATCH 166/194] #77 - equality manamement - backoff gui setting --- SettingsGUI.js | 1 + modules/equality.js | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/SettingsGUI.js b/SettingsGUI.js index 4d124bc59..cb3a1baa1 100644 --- a/SettingsGUI.js +++ b/SettingsGUI.js @@ -386,6 +386,7 @@ function initializeAllSettings() { createSetting('WaitForGamma', 'Wait for Gamma', '[U2 only] Equality dance subsetting - if true, for fast enemies it will aim at surviving 5 hits to trigger Gamma Burst. Will try to detect situations like reflect when this is not possible. Plague and electricity effects are assumed fine atm due to Angelic mastery.', 'boolean', false, null, 'Combat'); createSetting('IWannaLive', 'I Wanna Live', '[U2 only] Equality dance subsetting - if true, will try to survive a specified number of hits. Will try to detect situations like reflect when this is not possible. Plague and electricity effects are ignored - adjust the setting to make sure Angelic can keep up for long enough.', 'boolean', false, null, 'Combat'); createSetting('IWannaLiveForHowLong', 'I Wanna Live For How Long', '[U2 only] Equality dance subsetting - how long do we want to try to live? Is ignored when I Wanna Live is false. Default setting of 24 hits means just about enough equality to survive indefinitely with 1170% prismatic shield and Angelic mastery.', 'value', '24', null, 'Combat'); + createSetting('SingleHitBackoff', 'Single Hit Backoff', '[U2 only] Equality dance subsetting - if true, will only get enough equality for a single hit survival when full amount of necessary equality is unavailable. Will use max equality if false.', 'boolean', false, null, 'Combat'); diff --git a/modules/equality.js b/modules/equality.js index 3ae520d5c..60523db2a 100644 --- a/modules/equality.js +++ b/modules/equality.js @@ -6,8 +6,10 @@ MODULES["equality"] = equality; equality.gammaHits = 5; equality.dropEverything = -1; -//too niche of a setting to pull this to UI -equality.singleHitBackoff = true; + +equality.singleHitBackoff = function() { + return getPageSetting('SingleHitBackoff'); +} //returns true if we should try to keep trimps alive for 5 attacks //setting is argument for it @@ -95,7 +97,7 @@ equality.manageEquality = function() { equalityNeeded = this.additionalStacksNeeded(ourEffectiveHealthWait, enemyDamage); - if ((equalityNeeded > this.equalityStackBudget()) && this.singleHitBackoff) { + if ((equalityNeeded > this.equalityStackBudget()) && this.singleHitBackoff()) { equalityNeeded = this.additionalStacksNeeded(ourEffectiveHealth, enemyDamage); } } From 3df2adae6e44675ad423ac0bd29c50d291ddf6e9 Mon Sep 17 00:00:00 2001 From: maurezen Date: Sat, 12 Dec 2020 16:19:10 +0300 Subject: [PATCH 167/194] #87 - 5.4.4 update - observation perk, quadratic perk support --- modules/perks.js | 53 +++++++++++++++++++++++++++++++----------------- 1 file changed, 34 insertions(+), 19 deletions(-) diff --git a/modules/perks.js b/modules/perks.js index 707cf4aad..5bf9f59cb 100644 --- a/modules/perks.js +++ b/modules/perks.js @@ -90,14 +90,15 @@ var presetListHtml = "\ "; //U2 -//[looting,toughness,power,motivation,pheromones,artisanistry,carpentry,resilience,prismal,equality,criticality,tenacity,greed, frenzy] -var preset_Rspace = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; -var preset_RZek059 = [7, 10, 5, 1, 0.5, 2, 12, 9, 0.5, 2, 5, 0, 0, 0]; -var preset_RZekmelt = [10, 0.5, 2, 0.5, 0.3, 1.2, 3, 1, 0.5, 1, 3, 18, 20, 0]; -var preset_RZekquag = [8, 0.7, 1.8, 0.8, 0.2, 1.3, 3.3, 0.6, 0.8, 2.8, 6.2, 18, 27, 12]; -var preset_Rmauquag = [8, 0.7, 1.8, 0.8, 0.2, 1.3, 3.3, 0.6, 0.8, 0.01, 6.2, 18, 27, 12]; -var preset_Rmauc3 = [1, 1, 3, 0.8, 0.2, 1.3, 3.3, 2, 1, 0.01, 6.2, 30, 1, 12]; -var preset_Rmauc3greedy = [8, 1, 3, 0.8, 0.2, 1.3, 3.3, 2, 1, 0.01, 6.2, 18, 15, 12]; +//[looting,toughness,power,motivation,pheromones,artisanistry,carpentry,resilience,prismal,equality,criticality,tenacity, greed, frenzy, observation] +var preset_Rspace = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; +var preset_RZek059 = [7, 10, 5, 1, 0.5, 2, 12, 9, 0.5, 2, 5, 0, 0, 0, 0]; +var preset_RZekmelt = [10, 0.5, 2, 0.5, 0.3, 1.2, 3, 1, 0.5, 1, 3, 18, 20, 0, 0]; +var preset_RZekquag = [8, 0.7, 1.8, 0.8, 0.2, 1.3, 3.3, 0.6, 0.8, 2.8, 6.2, 18, 27, 12, 0]; +var preset_Rmauquag = [8, 0.7, 1.8, 0.8, 0.2, 1.3, 3.3, 0.6, 0.8, 0.01, 6.2, 18, 27, 12, 0]; +var preset_Rmauc3 = [1, 1, 3, 0.8, 0.2, 1.3, 3.3, 2, 1, 0.01, 6.2, 30, 1, 12, 1]; +var preset_Rmauc3greedy = [8, 1, 3, 0.8, 0.2, 1.3, 3.3, 2, 1, 0.01, 6.2, 18, 15, 12, 1]; +var preset_Rmauz135 = [8, 0.7, 1.8, 0.8, 0.2, 1.3, 3.3, 2.1, 0.8, 0.1, 2, 1, 2, 1.2, 5]; var presetListU2 = [preset_RZek059, preset_RZekmelt, preset_RZekquag, preset_Rmauquag, preset_Rmauc3, preset_Rmauc3greedy, preset_Rspace]; @@ -107,6 +108,7 @@ var presetListHtmlU2 = "\ \ \ \ +\ \ "; @@ -188,7 +190,7 @@ AutoPerks.displayGUI = function() { apGUI.$ratiosLine3.setAttribute('style', 'display: inline-block; text-align: left; width: 100%'); apGUI.$customRatios.appendChild(apGUI.$ratiosLine3); var listratiosLine3; - listratiosLine3 = ["Resilience","Tenacity","Greed", "Frenzy"]; + listratiosLine3 = ["Resilience","Tenacity","Greed", "Frenzy", "Observation"]; for (var i in listratiosLine3) { AutoPerks.createInput(listratiosLine3[i],apGUI.$ratiosLine3); } @@ -478,8 +480,13 @@ AutoPerks.calculateIncrease = function(perk, level) { if(perk.updatedValue != -1) value = perk.updatedValue; else value = perk.value; - if(perk.compounding) increase = perk.baseIncrease; - else increase = (1 + (level + 1) * perk.baseIncrease) / ( 1 + level * perk.baseIncrease) - 1; + if (perk.compounding) { + increase = perk.baseIncrease; + } else if (AutoPerks.QUADRATIC_TYPE === perk.type) { + increase = (1 + (level + 1) * (level + 1) * perk.baseIncrease) / ( 1 + level * level * perk.baseIncrease) - 1; + } else { + increase = (1 + (level + 1) * perk.baseIncrease) / ( 1 + level * perk.baseIncrease) - 1; + } return increase / perk.baseIncrease * value; } @@ -807,11 +814,15 @@ AutoPerks.toggleFastAllocate = function() { MODULES["perks"].useAlgo2 = !MODULES["perks"].useAlgo2; } +AutoPerks.QUADRATIC_TYPE = "quadratic"; +AutoPerks.EXPONENTIAL_TYPE = "exponential"; +AutoPerks.LINEAR_TYPE = "linear"; + AutoPerks.FixedPerk = function(name, base, level, max, fluffy) { this.id = -1; this.name = name; this.base = base; - this.type = "exponential"; + this.type = AutoPerks.EXPONENTIAL_TYPE; this.exprate = 1.3; this.fixed = true; this.level = level || 0; @@ -820,7 +831,7 @@ AutoPerks.FixedPerk = function(name, base, level, max, fluffy) { if (fluffy == "fluffy") { //This affects cost calculation on "Capable" fixed perk (during line 273) this.fluffy = true; - this.type = "linear"; + this.type = AutoPerks.LINEAR_TYPE; this.increase = 10; } } @@ -829,12 +840,12 @@ AutoPerks.VariablePerk = function(name, base, compounding, value, baseIncrease, this.id = -1; this.name = name; this.base = base; - this.type = "exponential"; + this.type = AutoPerks.EXPONENTIAL_TYPE; this.exprate = 1.3; //cost is almost always the default 1.3x this.fixed = false; this.compounding = compounding; this.updatedValue = -1; // If a custom ratio is supplied, this will be modified to hold the new value. - this.baseIncrease = baseIncrease; // The raw stat increase that the perk gives. + this.baseIncrease = baseIncrease; // The raw stat increase that the perk gives. Multiplicative. this.efficiency = -1; // Efficiency is defined as % increase * value / He cost this.max = max || Number.MAX_VALUE; this.level = level || 0; // How many levels have been invested into a perk @@ -855,7 +866,7 @@ AutoPerks.ArithmeticPerk = function(name, base, increase, baseIncrease, parent, this.name = name; this.base = base; this.increase = increase; - this.type = "linear"; + this.type = AutoPerks.LINEAR_TYPE; this.exprate = 1.0; this.fixed = false; this.compounding = false; @@ -921,14 +932,18 @@ AutoPerks.initializePerks = function () { //we'll think of it as of 10% compounding to not complicate things too much var greed = new AutoPerks.VariablePerk("greed", 10000000000, true, 12, 0.1, 40); var frenzy = new AutoPerks.VariablePerk("frenzy", 1000000000000000, true, 13, 0.1); + var hunger = new AutoPerks.FixedPerk("hunger", 1000000, 30); + //value it at max runestones, so base increase is lvl1 * 1000% = 10x + var observation = new AutoPerks.VariablePerk("observation", 1000000000000000000, true, 14, 10); + observation.exprate = 2; + observation.type = AutoPerks.QUADRATIC_TYPE; AutoPerks.perkHolder = []; //gather these into an array of objects if (game.global.universe == 1) { AutoPerks.perkHolder = [siphonology, anticipation, meditation, relentlessness, range, agility, bait, trumps, packrat, looting, toughness, power, motivation, pheromones, artisanistry, carpentry, resilience, coordinated, resourceful, overkill, capable, cunning, curious, classy, toughness_II, power_II, motivation_II, carpentry_II, looting_II]; } else if (game.global.universe == 2) { - var hunger = new AutoPerks.FixedPerk("hunger", 1000000, 30); - AutoPerks.perkHolder = [range, agility, bait, trumps, packrat, hunger, looting, toughness, resilience, power, motivation, pheromones, artisanistry, carpentry, prismal, equality, criticality, tenacity, greed, frenzy]; + AutoPerks.perkHolder = [range, agility, bait, trumps, packrat, hunger, looting, toughness, resilience, power, motivation, pheromones, artisanistry, carpentry, prismal, equality, criticality, tenacity, greed, frenzy, observation]; } //initialize basics on all. for(var i in AutoPerks.perkHolder) { @@ -968,7 +983,7 @@ AutoPerks.getSomePerks = function(fixed,variable,tier2,allperks) { if (game.global.universe == 1 ? typeof perk.level === 'undefined' : typeof perk.radLevel === 'undefined') continue; if ((fixed && AutoPerks.perkHolder[i].fixed) || (variable && !AutoPerks.perkHolder[i].fixed) || - (tier2 && AutoPerks.perkHolder[i].type == "linear" && !AutoPerks.perkHolder[i].fluffy) || + (tier2 && AutoPerks.perkHolder[i].type == AutoPerks.LINEAR_TYPE && !AutoPerks.perkHolder[i].fluffy) || (allperks)) { perks.push(AutoPerks.perkHolder[i]); } } From 51b03557c29a25a598cecb0ee9686ec53277e022 Mon Sep 17 00:00:00 2001 From: maurezen Date: Sat, 12 Dec 2020 16:22:55 +0300 Subject: [PATCH 168/194] #87 - 5.4.4 update - nurture custom autoportal --- SettingsGUI.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SettingsGUI.js b/SettingsGUI.js index cb3a1baa1..55c4247fe 100644 --- a/SettingsGUI.js +++ b/SettingsGUI.js @@ -259,7 +259,7 @@ function initializeAllSettings() { 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', 'Bublé', 'Melt', 'Quagmire', 'Decay', 'Electricity', 'Life', 'Crushed', 'Nom', 'Toxicity', 'Watch', 'Lead', 'Corrupted', 'Domination', 'Custom'], "Core"); //document.getElementById("AutoPortal").style="font-size: 1.0vw;"; //fit it on 1 line. - 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', 'Bublé', 'Melt', 'Quagmire', 'Decay', 'Electricity', 'Life', 'Crushed', 'Nom', 'Toxicity', 'Watch', 'Lead', 'Corrupted', 'Domination', 'Archaeology', 'Insanity', 'Mayhem'], "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', 'Bublé', 'Melt', 'Quagmire', 'Decay', 'Electricity', 'Life', 'Crushed', 'Nom', 'Toxicity', 'Watch', 'Lead', 'Corrupted', 'Domination', 'Archaeology', 'Insanity', 'Mayhem', 'Nurture'], "Core"); //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"); From 4a214b07f2b253487085809938416b249642d85f Mon Sep 17 00:00:00 2001 From: maurezen Date: Sat, 12 Dec 2020 16:31:15 +0300 Subject: [PATCH 169/194] #87 - 5.4.4 update - minor cleanup --- modules/perks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/perks.js b/modules/perks.js index 5bf9f59cb..df3760cc7 100644 --- a/modules/perks.js +++ b/modules/perks.js @@ -101,7 +101,7 @@ var preset_Rmauc3greedy = [8, 1, 3, 0.8, 0.2, 1.3, 3.3, 2, 1, 0.01, 6.2, 18, 15, var preset_Rmauz135 = [8, 0.7, 1.8, 0.8, 0.2, 1.3, 3.3, 2.1, 0.8, 0.1, 2, 1, 2, 1.2, 5]; var presetListU2 = [preset_RZek059, preset_RZekmelt, preset_RZekquag, preset_Rmauquag, - preset_Rmauc3, preset_Rmauc3greedy, preset_Rspace]; + preset_Rmauc3, preset_Rmauz135, preset_Rspace]; var presetListHtmlU2 = "\ \ \ From bbd6771c51a543c245161c087ccdac97bc24739e Mon Sep 17 00:00:00 2001 From: maurezen Date: Sat, 12 Dec 2020 21:52:42 +0300 Subject: [PATCH 170/194] #87 - 5.4.4 update - fixes quadratic type calculation bug that dropped the price and ignored the quadratic type altogether --- modules/perks.js | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/modules/perks.js b/modules/perks.js index df3760cc7..ef823caae 100644 --- a/modules/perks.js +++ b/modules/perks.js @@ -453,15 +453,20 @@ AutoPerks.getRadon = 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)); - else if(perk.type == 'exponential') return Math.ceil(level/2 + perk.base * Math.pow(perk.exprate, level)); - else if(perk.type == 'linear') return Math.ceil(perk.base + perk.increase * level); + if (perk.fluffy) { + return Math.ceil(perk.base * Math.pow(10,level)); + } else if (perk.type == || perk.type == AutoPerks.QUADRATIC_TYPE) { + return Math.ceil(level/2 + perk.base * Math.pow(perk.exprate, level)); + } else if (perk.type == AutoPerks.LINEAR_TYPE) { + return Math.ceil(perk.base + perk.increase * level); + } } //Calculate Total Price AutoPerks.calculateTotalPrice = function(perk, finalLevel) { - if(perk.type == 'linear' && !perk.fluffy) + if(perk.type == AutoPerks.LINEAR_TYPE && !perk.fluffy) return AutoPerks.calculateTIIprice(perk, finalLevel); var totalPrice = 0; + //@todo replace cycle with series sum formula for(var i = 0; i < finalLevel; i++) { totalPrice += AutoPerks.calculatePrice(perk, i); } @@ -482,11 +487,15 @@ AutoPerks.calculateIncrease = function(perk, level) { if (perk.compounding) { increase = perk.baseIncrease; - } else if (AutoPerks.QUADRATIC_TYPE === perk.type) { - increase = (1 + (level + 1) * (level + 1) * perk.baseIncrease) / ( 1 + level * level * perk.baseIncrease) - 1; } else { increase = (1 + (level + 1) * perk.baseIncrease) / ( 1 + level * perk.baseIncrease) - 1; } + //@todo this is a dangerous confusion + //perk.type is related to cost, not to benefits model + //@todo refactor this to a more sane setup + if (AutoPerks.QUADRATIC_TYPE === perk.type) { + increase = (1 + (level + 1) * (level + 1) * perk.baseIncrease) / ( 1 + level * level * perk.baseIncrease) - 1; + } return increase / perk.baseIncrease * value; } @@ -815,14 +824,14 @@ AutoPerks.toggleFastAllocate = function() { } AutoPerks.QUADRATIC_TYPE = "quadratic"; -AutoPerks.EXPONENTIAL_TYPE = "exponential"; + = "exponential"; AutoPerks.LINEAR_TYPE = "linear"; AutoPerks.FixedPerk = function(name, base, level, max, fluffy) { this.id = -1; this.name = name; this.base = base; - this.type = AutoPerks.EXPONENTIAL_TYPE; + this.type = ; this.exprate = 1.3; this.fixed = true; this.level = level || 0; From 5e667e957201d9f866e933f2ecf35e16b2ef3a06 Mon Sep 17 00:00:00 2001 From: maurezen Date: Sun, 13 Dec 2020 04:25:06 +0300 Subject: [PATCH 171/194] #87 - 5.4.4 update - corrects observation price --- modules/perks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/perks.js b/modules/perks.js index ef823caae..476e9298f 100644 --- a/modules/perks.js +++ b/modules/perks.js @@ -943,7 +943,7 @@ AutoPerks.initializePerks = function () { var frenzy = new AutoPerks.VariablePerk("frenzy", 1000000000000000, true, 13, 0.1); var hunger = new AutoPerks.FixedPerk("hunger", 1000000, 30); //value it at max runestones, so base increase is lvl1 * 1000% = 10x - var observation = new AutoPerks.VariablePerk("observation", 1000000000000000000, true, 14, 10); + var observation = new AutoPerks.VariablePerk("observation", 5000000000000000000, true, 14, 10); observation.exprate = 2; observation.type = AutoPerks.QUADRATIC_TYPE; From 20962e97ef29125b5333a1aae8d2dac1f018c73a Mon Sep 17 00:00:00 2001 From: maurezen Date: Sat, 19 Dec 2020 18:10:13 +0300 Subject: [PATCH 172/194] #87 - 5.4.4 update - corrects dumb typos w.r.t. exponential type --- modules/perks.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/perks.js b/modules/perks.js index 476e9298f..a91672651 100644 --- a/modules/perks.js +++ b/modules/perks.js @@ -455,7 +455,7 @@ AutoPerks.getRadon = function() { AutoPerks.calculatePrice = function(perk, level) { // Calculate price of buying *next* level if (perk.fluffy) { return Math.ceil(perk.base * Math.pow(10,level)); - } else if (perk.type == || perk.type == AutoPerks.QUADRATIC_TYPE) { + } else if (perk.type == AutoPerks.EXPONENTIAL_TYPE || perk.type == AutoPerks.QUADRATIC_TYPE) { return Math.ceil(level/2 + perk.base * Math.pow(perk.exprate, level)); } else if (perk.type == AutoPerks.LINEAR_TYPE) { return Math.ceil(perk.base + perk.increase * level); @@ -824,7 +824,7 @@ AutoPerks.toggleFastAllocate = function() { } AutoPerks.QUADRATIC_TYPE = "quadratic"; - = "exponential"; +AutoPerks.EXPONENTIAL_TYPE = "exponential"; AutoPerks.LINEAR_TYPE = "linear"; AutoPerks.FixedPerk = function(name, base, level, max, fluffy) { From 2d48ae11e804931d4b93f3439f64301f808ca5c3 Mon Sep 17 00:00:00 2001 From: maurezen Date: Sat, 19 Dec 2020 18:12:03 +0300 Subject: [PATCH 173/194] #87 - 5.4.4 update - corrects dumb typos w.r.t. exponential type --- modules/perks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/perks.js b/modules/perks.js index a91672651..889733151 100644 --- a/modules/perks.js +++ b/modules/perks.js @@ -831,7 +831,7 @@ AutoPerks.FixedPerk = function(name, base, level, max, fluffy) { this.id = -1; this.name = name; this.base = base; - this.type = ; + this.type = AutoPerks.EXPONENTIAL_TYPE; this.exprate = 1.3; this.fixed = true; this.level = level || 0; From 83a39a68665f17110e30c7c0dbacdd7a56257ab7 Mon Sep 17 00:00:00 2001 From: maurezen Date: Sun, 16 May 2021 20:12:52 +0300 Subject: [PATCH 174/194] #91 - 5.5.0 update - equality management fixes, pandemonium/alchemy autoportal settings, championism perk added to autoperks --- SettingsGUI.js | 2 +- modules/equality.js | 6 +++++- modules/perks.js | 30 ++++++++++++++++++------------ 3 files changed, 24 insertions(+), 14 deletions(-) diff --git a/SettingsGUI.js b/SettingsGUI.js index 55c4247fe..54dbe1e85 100644 --- a/SettingsGUI.js +++ b/SettingsGUI.js @@ -259,7 +259,7 @@ function initializeAllSettings() { 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', 'Bublé', 'Melt', 'Quagmire', 'Decay', 'Electricity', 'Life', 'Crushed', 'Nom', 'Toxicity', 'Watch', 'Lead', 'Corrupted', 'Domination', 'Custom'], "Core"); //document.getElementById("AutoPortal").style="font-size: 1.0vw;"; //fit it on 1 line. - 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', 'Bublé', 'Melt', 'Quagmire', 'Decay', 'Electricity', 'Life', 'Crushed', 'Nom', 'Toxicity', 'Watch', 'Lead', 'Corrupted', 'Domination', 'Archaeology', 'Insanity', 'Mayhem', 'Nurture'], "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', 'Bublé', 'Melt', 'Quagmire', 'Decay', 'Electricity', 'Life', 'Crushed', 'Nom', 'Toxicity', 'Watch', 'Lead', 'Corrupted', 'Domination', 'Archaeology', 'Insanity', 'Mayhem', 'Nurture', 'Pandemonium', 'Alchemy'], "Core"); //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"); diff --git a/modules/equality.js b/modules/equality.js index 60523db2a..d79120944 100644 --- a/modules/equality.js +++ b/modules/equality.js @@ -87,7 +87,8 @@ equality.manageEquality = function() { //but for lower-dmg enemies we might get away with less equality //(x2 difference in dmg is not uncommon) //likewise, improbability hits a tad higher - var minEnemyDamage = calculateDamage(cell.attack, false, false, false, cell, true); + //math.max for the case when atk is somehow zero + var minEnemyDamage = calculateDamage(Math.max(cell.attack, 1), false, false, false, cell, true); var maxEnemyDamage = mainWrapper.min2max(minEnemyDamage); var enemyDamage = maxEnemyDamage; @@ -129,6 +130,9 @@ equality.setStacks = function(equalityNeeded) { if (isNaN(game.portal.Equality.disabledStackCount)) { game.portal.Equality.disabledStackCount = 0; } + if (isNaN(equalityNeeded) { + equalityNeeded = 0; + } //also this happens to be string if set via slider, hence Number() call game.portal.Equality.disabledStackCount = Number(game.portal.Equality.disabledStackCount) + equalityNeeded; diff --git a/modules/perks.js b/modules/perks.js index 889733151..3ee85b6de 100644 --- a/modules/perks.js +++ b/modules/perks.js @@ -90,18 +90,19 @@ var presetListHtml = "\ "; //U2 -//[looting,toughness,power,motivation,pheromones,artisanistry,carpentry,resilience,prismal,equality,criticality,tenacity, greed, frenzy, observation] -var preset_Rspace = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; -var preset_RZek059 = [7, 10, 5, 1, 0.5, 2, 12, 9, 0.5, 2, 5, 0, 0, 0, 0]; -var preset_RZekmelt = [10, 0.5, 2, 0.5, 0.3, 1.2, 3, 1, 0.5, 1, 3, 18, 20, 0, 0]; -var preset_RZekquag = [8, 0.7, 1.8, 0.8, 0.2, 1.3, 3.3, 0.6, 0.8, 2.8, 6.2, 18, 27, 12, 0]; -var preset_Rmauquag = [8, 0.7, 1.8, 0.8, 0.2, 1.3, 3.3, 0.6, 0.8, 0.01, 6.2, 18, 27, 12, 0]; -var preset_Rmauc3 = [1, 1, 3, 0.8, 0.2, 1.3, 3.3, 2, 1, 0.01, 6.2, 30, 1, 12, 1]; -var preset_Rmauc3greedy = [8, 1, 3, 0.8, 0.2, 1.3, 3.3, 2, 1, 0.01, 6.2, 18, 15, 12, 1]; -var preset_Rmauz135 = [8, 0.7, 1.8, 0.8, 0.2, 1.3, 3.3, 2.1, 0.8, 0.1, 2, 1, 2, 1.2, 5]; +//[looting,toughness,power,motivation,pheromones,artisanistry,carpentry,resilience,prismal,equality,criticality,tenacity, greed, frenzy, observation, championism] +var preset_Rspace = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; +var preset_RZek059 = [7, 10, 5, 1, 0.5, 2, 12, 9, 0.5, 2, 5, 0, 0, 0, 0, 0]; +var preset_RZekmelt = [10, 0.5, 2, 0.5, 0.3, 1.2, 3, 1, 0.5, 1, 3, 18, 20, 0, 0, 0]; +var preset_RZekquag = [8, 0.7, 1.8, 0.8, 0.2, 1.3, 3.3, 0.6, 0.8, 2.8, 6.2, 18, 27, 12, 0, 0]; +var preset_Rmauquag = [8, 0.7, 1.8, 0.8, 0.2, 1.3, 3.3, 0.6, 0.8, 0.01, 6.2, 18, 27, 12, 0, 0]; +var preset_Rmauc3 = [1, 1, 3, 0.8, 0.2, 1.3, 3.3, 2, 1, 0.01, 6.2, 30, 1, 12, 1, 1]; +var preset_Rmauc3greedy = [8, 1, 3, 0.8, 0.2, 1.3, 3.3, 2, 1, 0.01, 6.2, 18, 15, 12, 1, 0]; +var preset_Rmauz135 = [8, 0.7, 1.8, 0.8, 0.2, 1.3, 3.3, 2.1, 0.8, 0.1, 2, 1, 2, 1.2, 5, 0]; +var preset_Rmauz155 = [8, 0.7, 1.8, 0.8, 0.2, 1.3, 3.3, 2.1, 0.8, 0.1, 2, 1, 2, 1.2, 5, 1]; var presetListU2 = [preset_RZek059, preset_RZekmelt, preset_RZekquag, preset_Rmauquag, - preset_Rmauc3, preset_Rmauz135, preset_Rspace]; + preset_Rmauc3, preset_Rmauz135, preset_Rmauz155, preset_Rspace]; var presetListHtmlU2 = "\ \ \ @@ -109,6 +110,7 @@ var presetListHtmlU2 = "\ \ \ \ +\ \ "; @@ -190,7 +192,7 @@ AutoPerks.displayGUI = function() { apGUI.$ratiosLine3.setAttribute('style', 'display: inline-block; text-align: left; width: 100%'); apGUI.$customRatios.appendChild(apGUI.$ratiosLine3); var listratiosLine3; - listratiosLine3 = ["Resilience","Tenacity","Greed", "Frenzy", "Observation"]; + listratiosLine3 = ["Resilience","Tenacity","Greed", "Frenzy", "Observation", "Championism"]; for (var i in listratiosLine3) { AutoPerks.createInput(listratiosLine3[i],apGUI.$ratiosLine3); } @@ -946,13 +948,17 @@ AutoPerks.initializePerks = function () { var observation = new AutoPerks.VariablePerk("observation", 5000000000000000000, true, 14, 10); observation.exprate = 2; observation.type = AutoPerks.QUADRATIC_TYPE; + + //value it at 10% compounding (would be true at 18 SA levels) + var championism = new AutoPerks.VariablePerk("championism", 1e9, true, 15, 0.1) + championism.exprate = 5; AutoPerks.perkHolder = []; //gather these into an array of objects if (game.global.universe == 1) { AutoPerks.perkHolder = [siphonology, anticipation, meditation, relentlessness, range, agility, bait, trumps, packrat, looting, toughness, power, motivation, pheromones, artisanistry, carpentry, resilience, coordinated, resourceful, overkill, capable, cunning, curious, classy, toughness_II, power_II, motivation_II, carpentry_II, looting_II]; } else if (game.global.universe == 2) { - AutoPerks.perkHolder = [range, agility, bait, trumps, packrat, hunger, looting, toughness, resilience, power, motivation, pheromones, artisanistry, carpentry, prismal, equality, criticality, tenacity, greed, frenzy, observation]; + AutoPerks.perkHolder = [range, agility, bait, trumps, packrat, hunger, looting, toughness, resilience, power, motivation, pheromones, artisanistry, carpentry, prismal, equality, criticality, tenacity, greed, frenzy, observation, championism]; } //initialize basics on all. for(var i in AutoPerks.perkHolder) { From 2b62ad15a465f00b9a9c05029f20e13d38ccf4f8 Mon Sep 17 00:00:00 2001 From: maurezen Date: Mon, 17 May 2021 01:16:23 +0300 Subject: [PATCH 175/194] #91 - 5.5.0 update - fixes missed bracket that prevents equality module from loading and prevents everything from equality on in main loop from functioning --- modules/equality.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/equality.js b/modules/equality.js index d79120944..2079d87c4 100644 --- a/modules/equality.js +++ b/modules/equality.js @@ -130,7 +130,7 @@ equality.setStacks = function(equalityNeeded) { if (isNaN(game.portal.Equality.disabledStackCount)) { game.portal.Equality.disabledStackCount = 0; } - if (isNaN(equalityNeeded) { + if (isNaN(equalityNeeded)) { equalityNeeded = 0; } //also this happens to be string if set via slider, hence Number() call From 238c350b52f4e0db266be7df73340a142c5bc786 Mon Sep 17 00:00:00 2001 From: maurezen Date: Wed, 8 Sep 2021 21:05:43 +0300 Subject: [PATCH 176/194] #82 - Automatically invoke nature empowerment --- AutoTrimps2.js | 1 + SettingsGUI.js | 5 ++++- modules/mainWrapper.js | 12 ++++++++++++ modules/other.js | 22 ++++++++++++++++++++++ 4 files changed, 39 insertions(+), 1 deletion(-) diff --git a/AutoTrimps2.js b/AutoTrimps2.js index 2922877be..4660433e0 100644 --- a/AutoTrimps2.js +++ b/AutoTrimps2.js @@ -237,6 +237,7 @@ function mainLoop() { else autoTrimpSettings.Prestige.selected = document.getElementById('Prestige').value; //just make sure the UI setting and the internal setting are aligned. if (getPageSetting('AutoMagmiteSpender2')==2 && !magmiteSpenderChanged) autoMagmiteSpender(); //Auto Magmite Spender (magmite.js) if (getPageSetting('AutoNatureTokens')) autoNatureTokens(); //Nature (other.js) + if (getPageSetting('AutoNatureTokens')) autoNatureEmpowerment(); //Nature empowerments (other.js) // //Runs any user provided scripts, see line 253 below if (userscriptOn) userscripts(); diff --git a/SettingsGUI.js b/SettingsGUI.js index 54dbe1e85..e5ffb1151 100644 --- a/SettingsGUI.js +++ b/SettingsGUI.js @@ -443,11 +443,14 @@ function initializeAllSettings() { // Nature settings: - createSetting('AutoNatureTokens', 'Spend Nature Tokens', 'MASTER BUTTON Automatically spend or convert nature tokens.', 'boolean', false, null, 'Nature'); + createSetting('AutoNatureTokens', 'Spend Nature Tokens', 'MASTER BUTTON Automatically spend or convert nature tokens. Automatically trigger empowerments.', 'boolean', false, null, 'Nature'); 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'); createSetting('WindInMaps', 'Wind in maps', 'Use wind stance while in maps ', 'boolean', false, null, 'Nature'); + createSetting('AutoTriggerNatureDaily', 'Trigger on Daily', 'Trigger empowerments of nature on a Daily run', 'dropdown', 'Wind', ['Off', 'Poison', 'Ice', 'Wind'], 'Nature'); + createSetting('AutoTriggerNatureChallenge', 'Trigger on Challenge', 'Trigger empowerments of nature on a Challenge run', 'dropdown', 'Off', ['Off', 'Poison', 'Ice', 'Wind'], 'Nature'); + createSetting('AutoTriggerNatureFiller', 'Trigger on Filler', 'Trigger empowerments of nature on a filler run', 'dropdown', 'Off', ['Off', 'Poison', 'Ice', 'Wind'], 'Nature'); diff --git a/modules/mainWrapper.js b/modules/mainWrapper.js index fe1367a5c..bf237f343 100644 --- a/modules/mainWrapper.js +++ b/modules/mainWrapper.js @@ -76,4 +76,16 @@ mainWrapper.canOverkill = function() { mainWrapper.reflect = function() { return (game.global.challengeActive == "Daily" && typeof game.global.dailyChallenge.mirrored !== 'undefined'); +} + +mainWrapper.isDailyRunning = function() { + return game.global.challengeActive == 'Daily'; +} + +mainWrapper.isChallengeRunning = function() { + return game.global.runningChallengeSquared && game.global.challengeActive; +} + +mainWrapper.isNatureEmpowered = function() { + return game.global.uberNature != ""; } \ No newline at end of file diff --git a/modules/other.js b/modules/other.js index d6bd38aec..3209e1e1d 100644 --- a/modules/other.js +++ b/modules/other.js @@ -61,6 +61,28 @@ function autoGoldenUpgradesAT(setting) { //} catch(err) { debug("Error in autoGoldenUpgrades: " + err.message, "general"); } } +//auto trigger empowerments +function autoNatureEmpowerment() { + if (mainWrapper.isNatureEmpowered()) return; + + if (mainWrapper.isDailyRunning()) { + var dailySetting = getPageSetting('AutoTriggerNatureDaily'); + if (dailySetting && dailySetting != 'Off') { + naturePurchase("uberEmpower", dailySetting); + } + } else if (mainWrapper.isChallengeRunning()) { + var challengeSetting = getPageSetting('AutoTriggerNatureChallenge'); + if (challengeSetting && challengeSetting != 'Off') { + naturePurchase("uberEmpower", challengeSetting); + } + } else { + var fillerSetting = getPageSetting('AutoTriggerNatureFiller'); + if (fillerSetting && fillerSetting != 'Off') { + naturePurchase("uberEmpower", fillerSetting); + } + } +} + //auto spend nature tokens function autoNatureTokens() { var changed = false; From d3643e0938769f781c2884229a48727961fd3188 Mon Sep 17 00:00:00 2001 From: maurezen Date: Wed, 8 Sep 2021 21:12:27 +0300 Subject: [PATCH 177/194] #82 - Automatically invoke nature empowerment --- SettingsGUI.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SettingsGUI.js b/SettingsGUI.js index e5ffb1151..2f47e54b0 100644 --- a/SettingsGUI.js +++ b/SettingsGUI.js @@ -448,9 +448,9 @@ function initializeAllSettings() { 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'); createSetting('WindInMaps', 'Wind in maps', 'Use wind stance while in maps ', 'boolean', false, null, 'Nature'); - createSetting('AutoTriggerNatureDaily', 'Trigger on Daily', 'Trigger empowerments of nature on a Daily run', 'dropdown', 'Wind', ['Off', 'Poison', 'Ice', 'Wind'], 'Nature'); - createSetting('AutoTriggerNatureChallenge', 'Trigger on Challenge', 'Trigger empowerments of nature on a Challenge run', 'dropdown', 'Off', ['Off', 'Poison', 'Ice', 'Wind'], 'Nature'); - createSetting('AutoTriggerNatureFiller', 'Trigger on Filler', 'Trigger empowerments of nature on a filler run', 'dropdown', 'Off', ['Off', 'Poison', 'Ice', 'Wind'], 'Nature'); + createSetting('AutoTriggerNatureDaily', 'Daily', 'Trigger empowerments of nature on a Daily run', 'dropdown', 'Wind', ['Off', 'Poison', 'Ice', 'Wind'], 'Nature'); + createSetting('AutoTriggerNatureChallenge', 'CInf', 'Trigger empowerments of nature on a Challenge run', 'dropdown', 'Off', ['Off', 'Poison', 'Ice', 'Wind'], 'Nature'); + createSetting('AutoTriggerNatureFiller', 'Filler', 'Trigger empowerments of nature on a filler run', 'dropdown', 'Off', ['Off', 'Poison', 'Ice', 'Wind'], 'Nature'); From 07ed74fd5e8a0b6e2719e26b8ae6b9fb4ae22454 Mon Sep 17 00:00:00 2001 From: maurezen Date: Sat, 11 Sep 2021 13:09:41 +0300 Subject: [PATCH 178/194] #76 - autoperks takes forever - default factor adjustment, factor setting, max fallback setting (fallback breaks at ~1e36), remaining helium tracking --- SettingsGUI.js | 11 +++++++++-- modules/perks.js | 39 ++++++++++++++++++++++++++------------- 2 files changed, 35 insertions(+), 15 deletions(-) diff --git a/SettingsGUI.js b/SettingsGUI.js index 2f47e54b0..27bd2665f 100644 --- a/SettingsGUI.js +++ b/SettingsGUI.js @@ -252,11 +252,18 @@ function initializeAllSettings() { 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'); + 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('AutoPerksMaxFallback', 'AutoPerks Max', 'With this on, the Auto Perks will fall back to using max when buying last perk in the selection. Helps vs some of the rounding errors.', 'boolean', false, null, 'Core'); + createSetting('AutoPerksFactor', 'AutoPerks Factor', 'A multiplier for the autoperks loop buying additive *_II perks. I cba to make that scale, so you gotta adjust this setting manually whenever your allocation starts getting slow. More multiplier = faster loop.', 'value', 100000000000, null, 'Core'); + //NewLine4 + document.getElementById('AutoPerksFactor').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', 'Bublé', 'Melt', 'Quagmire', 'Decay', 'Electricity', 'Life', 'Crushed', 'Nom', 'Toxicity', 'Watch', 'Lead', 'Corrupted', 'Domination', 'Custom'], "Core"); //document.getElementById("AutoPortal").style="font-size: 1.0vw;"; //fit it on 1 line. 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', 'Bublé', 'Melt', 'Quagmire', 'Decay', 'Electricity', 'Life', 'Crushed', 'Nom', 'Toxicity', 'Watch', 'Lead', 'Corrupted', 'Domination', 'Archaeology', 'Insanity', 'Mayhem', 'Nurture', 'Pandemonium', 'Alchemy'], "Core"); diff --git a/modules/perks.js b/modules/perks.js index 3ee85b6de..da8dada9b 100644 --- a/modules/perks.js +++ b/modules/perks.js @@ -14,7 +14,7 @@ var AutoPerks = {}; MODULES["perks"] = {}; MODULES["perks"].showDetails = true; //show which individual perks are spent; MODULES["perks"].useAlgo2 = false; //use algorithm 2 instead. -MODULES["perks"].fastAllocateFactor = 100000; //perk purchase loop multiplier +MODULES["perks"].fastAllocateFactor = 100000000000; //perk purchase loop multiplier //Import the FastPriorityQueue.js general Library (not AT specific, but needed for perk queue) var head = document.getElementsByTagName('head')[0]; @@ -644,7 +644,8 @@ AutoPerks.spendHelium2 = function(helium) { mostEff.efficiency = inc / price; i++; } - AutoPerks.fastAllocateFactor = MODULES["perks"].fastAllocateFactor; + var factor = getPageSetting('AutoPerksFactor'); + AutoPerks.fastAllocateFactor = factor ? factor : MODULES["perks"].fastAllocateFactor; for (iterateQueue() ; mostEff.price <= helium ; iterateQueue() ) { if(mostEff.level < mostEff.max) { // but first, check if the perk has reached its maximum value helium = AutoPerks.bumpPerkLevel(mostEff, helium); @@ -723,23 +724,34 @@ AutoPerks.applyCalculationsRespec = function(perks,remainingHelium){ clearPerks(); var preBuyAmt = game.global.buyAmt; + var he = remainingHelium; + perks.reverse();//we want last perk to be t2 one so max instead of precise calc has less of an impact for(var i in perks) { if (perks[i]) {//defense against future unknown perks var capitalized = AutoPerks.capitaliseFirstLetter(perks[i].name); - if (perks.length - 1 == i) {//fall back to max for the last perk out there so we're not hit by rounding + var maxFallback = getPageSetting('AutoPerksMaxFallback'); + if (perks.length - 1 == i && maxFallback) { + //fall back to max for the last perk out there so we're not hit by rounding + //except at high levels that still happens, hence a setting toggle game.global.buyAmt = "Max"; } else { game.global.buyAmt = perks[i].level; } //works fine, has u2 factored in - if (getPortalUpgradePrice(capitalized) <= remainingHelium) { - if (MODULES["perks"].showDetails) - debug("AutoPerks-Respec Buying: " + capitalized + " " + perks[i].level, "perks"); + var price = getPortalUpgradePrice(capitalized); + if (price <= he) { + if (MODULES["perks"].showDetails) { + debug("AutoPerks-Respec Buying: " + capitalized + " " + perks[i].level + " for " + prettify(price), "perks"); + } buyPortalUpgrade(capitalized); - } else - if (MODULES["perks"].showDetails) - debug("AutoPerks-Respec Error Couldn't Afford Asked Perk: " + capitalized + " " + perks[i].level, "perks"); + //this tracking of he remaining should help autoperks to nope out of issues and not leave us with zero looting + he -= price; + } else { + if (MODULES["perks"].showDetails) { + debug("AutoPerks-Respec Error Couldn't Afford Asked Perk: " + capitalized + " " + perks[i].level + " for " + prettify(price) + " : only " + prettify(he) + " left. Check for rounding; try toggling max fallback setting.", "perks"); + } + } } } perks.reverse();//no idea if anything else uses it so we'd better fix it @@ -747,8 +759,7 @@ AutoPerks.applyCalculationsRespec = function(perks,remainingHelium){ 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. //activateClicked(); //click OK for them (disappears the window). - } - else { + } else { debug("A Respec would be required and is not available. You used it already, try again next portal.","perks"); AutoPerks.GUI.$allocatorBtn1.setAttribute('class', 'btn inPortalBtn settingsBtn settingBtnfalse'); tooltip("Automatic Perk Allocation Error", "customText", event, "A Respec would be required and is NOT available. You used it already, try again next portal. Press esc to close this tooltip." ); @@ -768,13 +779,15 @@ AutoPerks.applyCalculations = function(perks,remainingHelium){ game.global.buyAmt = perks[i].level - gameLevel - game.portal[capitalized].levelTemp; if (game.global.buyAmt < 0) { needsRespec = true; - if (MODULES["perks"].showDetails) + if (MODULES["perks"].showDetails) { debug("AutoPerks RESPEC Required for: " + capitalized + " " + game.global.buyAmt, "perks"); + } break;//no point iterating further } else if (game.global.buyAmt > 0) { - if (MODULES["perks"].showDetails) + if (MODULES["perks"].showDetails) { debug("AutoPerks-NoRespec Adding: " + capitalized + " " + game.global.buyAmt, "perks"); + } buyPortalUpgrade(capitalized); } } From fe11f0935340fd6fa3992e42c52fa0d1a8eae720 Mon Sep 17 00:00:00 2001 From: maurezen Date: Sat, 11 Sep 2021 13:28:15 +0300 Subject: [PATCH 179/194] #76 - autoperks takes forever - remaining helium tracking is bumping into rouonding issues, using something looked up in main game code instead --- modules/mainWrapper.js | 4 ++++ modules/perks.js | 5 ++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/mainWrapper.js b/modules/mainWrapper.js index bf237f343..7ed29499d 100644 --- a/modules/mainWrapper.js +++ b/modules/mainWrapper.js @@ -88,4 +88,8 @@ mainWrapper.isChallengeRunning = function() { mainWrapper.isNatureEmpowered = function() { return game.global.uberNature != ""; +} + +mainWrapper.getAvailableHeliumDuringRespec = funciton() { + return game.resources.helium.respecMax - game.resources.helium.totalSpentTemp; } \ No newline at end of file diff --git a/modules/perks.js b/modules/perks.js index da8dada9b..a4ebc2343 100644 --- a/modules/perks.js +++ b/modules/perks.js @@ -724,7 +724,7 @@ AutoPerks.applyCalculationsRespec = function(perks,remainingHelium){ clearPerks(); var preBuyAmt = game.global.buyAmt; - var he = remainingHelium; + debug("AutoPerks-Respec remainingHelium: " + remainingHelium + " " + " mainWrapper.he: " + mainWrapper.getAvailableHeliumDuringRespec(), "perks"); perks.reverse();//we want last perk to be t2 one so max instead of precise calc has less of an impact for(var i in perks) { @@ -739,14 +739,13 @@ AutoPerks.applyCalculationsRespec = function(perks,remainingHelium){ game.global.buyAmt = perks[i].level; } //works fine, has u2 factored in + var he = mainWrapper.getAvailableHeliumDuringRespec(); var price = getPortalUpgradePrice(capitalized); if (price <= he) { if (MODULES["perks"].showDetails) { debug("AutoPerks-Respec Buying: " + capitalized + " " + perks[i].level + " for " + prettify(price), "perks"); } buyPortalUpgrade(capitalized); - //this tracking of he remaining should help autoperks to nope out of issues and not leave us with zero looting - he -= price; } else { if (MODULES["perks"].showDetails) { debug("AutoPerks-Respec Error Couldn't Afford Asked Perk: " + capitalized + " " + perks[i].level + " for " + prettify(price) + " : only " + prettify(he) + " left. Check for rounding; try toggling max fallback setting.", "perks"); From 963d0a2e437777e4685c89f67f8465b90a59c01e Mon Sep 17 00:00:00 2001 From: maurezen Date: Sat, 11 Sep 2021 13:30:25 +0300 Subject: [PATCH 180/194] #76 - autoperks takes forever - have I mentioned typos? --- modules/mainWrapper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/mainWrapper.js b/modules/mainWrapper.js index 7ed29499d..73d11a70d 100644 --- a/modules/mainWrapper.js +++ b/modules/mainWrapper.js @@ -90,6 +90,6 @@ mainWrapper.isNatureEmpowered = function() { return game.global.uberNature != ""; } -mainWrapper.getAvailableHeliumDuringRespec = funciton() { +mainWrapper.getAvailableHeliumDuringRespec = function() { return game.resources.helium.respecMax - game.resources.helium.totalSpentTemp; } \ No newline at end of file From e86a631b02a38bb6f353e6e711f426a7499cd2f3 Mon Sep 17 00:00:00 2001 From: maurezen Date: Wed, 13 Oct 2021 20:04:43 +0300 Subject: [PATCH 181/194] #93 - Incorrect autoportal settings get the AT stuck on portal --- modules/mainWrapper.js | 9 +++++++++ modules/portal.js | 6 +++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/modules/mainWrapper.js b/modules/mainWrapper.js index 73d11a70d..ffa9377b5 100644 --- a/modules/mainWrapper.js +++ b/modules/mainWrapper.js @@ -92,4 +92,13 @@ mainWrapper.isNatureEmpowered = function() { mainWrapper.getAvailableHeliumDuringRespec = function() { return game.resources.helium.respecMax - game.resources.helium.totalSpentTemp; +} + +mainWrapper.selectChallengeSafely = function(what) { + if (what && game.challenges(what) && game.challenges(what).filter()) { + selectChallenge(what); + } else { + selectChallenge(0); + } + } \ No newline at end of file diff --git a/modules/portal.js b/modules/portal.js index ad191e2dd..9452c09e1 100644 --- a/modules/portal.js +++ b/modules/portal.js @@ -118,7 +118,7 @@ function doPortal(challenge) { AutoPerks.clickAllocate(); //Auto Start Daily: if (getPageSetting('AutoStartDaily')) { - selectChallenge('Daily'); + mainWrapper.selectChallengeSafely('Daily'); checkCompleteDailies(); var lastUndone = -7; // Note: Most previous challenge == -6 @@ -131,7 +131,7 @@ function doPortal(challenge) { if (lastUndone == 1) { // None debug("All available Dailies already completed.", "portal"); //Fallback to w/e Regular challenge we picked. Or none (unselect) - selectChallenge(challenge || 0); + mainWrapper.selectChallengeSafely(challenge); } else { getDailyChallenge(lastUndone); debug("Portaling into Daily for: " + getDailyTimeString(lastUndone, true) + " now!", "portal"); @@ -139,7 +139,7 @@ function doPortal(challenge) { } //Regular Challenge: else if(challenge) { - selectChallenge(challenge); + mainWrapper.selectChallengeSafely(challenge); } //Push He Data: pushData(); From 998250754e4bb647f7981120e5833b5b073bb259 Mon Sep 17 00:00:00 2001 From: maurezen Date: Wed, 10 Nov 2021 15:41:15 +0300 Subject: [PATCH 182/194] #93 - Incorrect autoportal settings get the AT stuck on portal - silly syntax bug that gets AT stuck --- modules/mainWrapper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/mainWrapper.js b/modules/mainWrapper.js index ffa9377b5..4b0efd0c3 100644 --- a/modules/mainWrapper.js +++ b/modules/mainWrapper.js @@ -95,7 +95,7 @@ mainWrapper.getAvailableHeliumDuringRespec = function() { } mainWrapper.selectChallengeSafely = function(what) { - if (what && game.challenges(what) && game.challenges(what).filter()) { + if (what && game.challenges[what] && game.challenges[what].filter()) { selectChallenge(what); } else { selectChallenge(0); From ae5b1dd9a41c67a1f531fb2709dfe29c3affd38e Mon Sep 17 00:00:00 2001 From: maurezen Date: Tue, 7 Dec 2021 21:28:38 +0300 Subject: [PATCH 183/194] #96 - 5.6.0 update - added Experience and Hypothermia to autoportal settings --- SettingsGUI.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SettingsGUI.js b/SettingsGUI.js index 27bd2665f..c160dfd4c 100644 --- a/SettingsGUI.js +++ b/SettingsGUI.js @@ -266,7 +266,7 @@ function initializeAllSettings() { 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', 'Bublé', 'Melt', 'Quagmire', 'Decay', 'Electricity', 'Life', 'Crushed', 'Nom', 'Toxicity', 'Watch', 'Lead', 'Corrupted', 'Domination', 'Custom'], "Core"); //document.getElementById("AutoPortal").style="font-size: 1.0vw;"; //fit it on 1 line. - 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', 'Bublé', 'Melt', 'Quagmire', 'Decay', 'Electricity', 'Life', 'Crushed', 'Nom', 'Toxicity', 'Watch', 'Lead', 'Corrupted', 'Domination', 'Archaeology', 'Insanity', 'Mayhem', 'Nurture', 'Pandemonium', 'Alchemy'], "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', 'Bublé', 'Melt', 'Quagmire', 'Decay', 'Electricity', 'Life', 'Crushed', 'Nom', 'Toxicity', 'Watch', 'Lead', 'Corrupted', 'Domination', 'Experience', 'Archaeology', 'Insanity', 'Mayhem', 'Nurture', 'Pandemonium', 'Alchemy', 'Hypothermia'], "Core"); //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"); From 82c1c7d4787b02db724db903cf58aff22a9393d1 Mon Sep 17 00:00:00 2001 From: maurezen Date: Tue, 7 Dec 2021 22:13:15 +0300 Subject: [PATCH 184/194] #96 - 5.6.0 update - added masterfulness to the autoperks --- modules/perks.js | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/modules/perks.js b/modules/perks.js index a4ebc2343..9d1c7fda6 100644 --- a/modules/perks.js +++ b/modules/perks.js @@ -90,19 +90,20 @@ var presetListHtml = "\ "; //U2 -//[looting,toughness,power,motivation,pheromones,artisanistry,carpentry,resilience,prismal,equality,criticality,tenacity, greed, frenzy, observation, championism] -var preset_Rspace = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; -var preset_RZek059 = [7, 10, 5, 1, 0.5, 2, 12, 9, 0.5, 2, 5, 0, 0, 0, 0, 0]; -var preset_RZekmelt = [10, 0.5, 2, 0.5, 0.3, 1.2, 3, 1, 0.5, 1, 3, 18, 20, 0, 0, 0]; -var preset_RZekquag = [8, 0.7, 1.8, 0.8, 0.2, 1.3, 3.3, 0.6, 0.8, 2.8, 6.2, 18, 27, 12, 0, 0]; -var preset_Rmauquag = [8, 0.7, 1.8, 0.8, 0.2, 1.3, 3.3, 0.6, 0.8, 0.01, 6.2, 18, 27, 12, 0, 0]; -var preset_Rmauc3 = [1, 1, 3, 0.8, 0.2, 1.3, 3.3, 2, 1, 0.01, 6.2, 30, 1, 12, 1, 1]; -var preset_Rmauc3greedy = [8, 1, 3, 0.8, 0.2, 1.3, 3.3, 2, 1, 0.01, 6.2, 18, 15, 12, 1, 0]; -var preset_Rmauz135 = [8, 0.7, 1.8, 0.8, 0.2, 1.3, 3.3, 2.1, 0.8, 0.1, 2, 1, 2, 1.2, 5, 0]; -var preset_Rmauz155 = [8, 0.7, 1.8, 0.8, 0.2, 1.3, 3.3, 2.1, 0.8, 0.1, 2, 1, 2, 1.2, 5, 1]; +//[looting,toughness,power,motivation,pheromones,artisanistry,carpentry,resilience,prismal,equality,criticality,tenacity, greed, frenzy, observation, championism, masterfulness] +var preset_Rspace = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; +var preset_RZek059 = [7, 10, 5, 1, 0.5, 2, 12, 9, 0.5, 2, 5, 0, 0, 0, 0, 0, 0]; +var preset_RZekmelt = [10, 0.5, 2, 0.5, 0.3, 1.2, 3, 1, 0.5, 1, 3, 18, 20, 0, 0, 0, 0]; +var preset_RZekquag = [8, 0.7, 1.8, 0.8, 0.2, 1.3, 3.3, 0.6, 0.8, 2.8, 6.2, 18, 27, 12, 0, 0, 0]; +var preset_Rmauquag = [8, 0.7, 1.8, 0.8, 0.2, 1.3, 3.3, 0.6, 0.8, 0.01, 6.2, 18, 27, 12, 0, 0, 0]; +var preset_Rmauc3 = [1, 1, 3, 0.8, 0.2, 1.3, 3.3, 2, 1, 0.01, 6.2, 30, 1, 12, 1, 1, 0]; +var preset_Rmauc3greedy = [8, 1, 3, 0.8, 0.2, 1.3, 3.3, 2, 1, 0.01, 6.2, 18, 15, 12, 1, 0, 0]; +var preset_Rmauz135 = [8, 0.7, 1.8, 0.8, 0.2, 1.3, 3.3, 2.1, 0.8, 0.1, 2, 1, 2, 1.2, 5, 0, 0]; +var preset_Rmauz155 = [8, 0.7, 1.8, 0.8, 0.2, 1.3, 3.3, 2.1, 0.8, 0.1, 2, 1, 2, 1.2, 5, 1, 0]; +var preset_Rmauz200 = [8, 0.7, 2.5, 0.8, 0.2, 1.3, 4, 5.5, 0.8, 0.4, 0.3, 1, 2, 0.7, 800, 150, 100]; var presetListU2 = [preset_RZek059, preset_RZekmelt, preset_RZekquag, preset_Rmauquag, - preset_Rmauc3, preset_Rmauz135, preset_Rmauz155, preset_Rspace]; + preset_Rmauc3, preset_Rmauz135, preset_Rmauz155, presert_Rmauz200, preset_Rspace]; var presetListHtmlU2 = "\ \ \ @@ -110,7 +111,8 @@ var presetListHtmlU2 = "\ \ \ \ -\ +\ +\ \ "; @@ -192,7 +194,7 @@ AutoPerks.displayGUI = function() { apGUI.$ratiosLine3.setAttribute('style', 'display: inline-block; text-align: left; width: 100%'); apGUI.$customRatios.appendChild(apGUI.$ratiosLine3); var listratiosLine3; - listratiosLine3 = ["Resilience","Tenacity","Greed", "Frenzy", "Observation", "Championism"]; + listratiosLine3 = ["Resilience","Tenacity","Greed", "Frenzy", "Observation", "Championism", "Masterfulness"]; for (var i in listratiosLine3) { AutoPerks.createInput(listratiosLine3[i],apGUI.$ratiosLine3); } @@ -964,13 +966,17 @@ AutoPerks.initializePerks = function () { //value it at 10% compounding (would be true at 18 SA levels) var championism = new AutoPerks.VariablePerk("championism", 1e9, true, 15, 0.1) championism.exprate = 5; + + //it gives 1 extra tenacity and greed, which means it is valued at 0.21 + var masterfulness = new AutoPerks.VariablePerk("masterfulness", 1e23, true, 16, 0.21) + masterfulness.exprate = 50; AutoPerks.perkHolder = []; //gather these into an array of objects if (game.global.universe == 1) { AutoPerks.perkHolder = [siphonology, anticipation, meditation, relentlessness, range, agility, bait, trumps, packrat, looting, toughness, power, motivation, pheromones, artisanistry, carpentry, resilience, coordinated, resourceful, overkill, capable, cunning, curious, classy, toughness_II, power_II, motivation_II, carpentry_II, looting_II]; } else if (game.global.universe == 2) { - AutoPerks.perkHolder = [range, agility, bait, trumps, packrat, hunger, looting, toughness, resilience, power, motivation, pheromones, artisanistry, carpentry, prismal, equality, criticality, tenacity, greed, frenzy, observation, championism]; + AutoPerks.perkHolder = [range, agility, bait, trumps, packrat, hunger, looting, toughness, resilience, power, motivation, pheromones, artisanistry, carpentry, prismal, equality, criticality, tenacity, greed, frenzy, observation, championism, masterfulness]; } //initialize basics on all. for(var i in AutoPerks.perkHolder) { From 0728f0cc820062ce01fdd81e6fa256ac1920c6f1 Mon Sep 17 00:00:00 2001 From: maurezen Date: Wed, 8 Dec 2021 00:03:22 +0300 Subject: [PATCH 185/194] #96 - 5.6.0 update - check whether the enemy is fast for equality dance is updated with Glass --- modules/mainWrapper.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/mainWrapper.js b/modules/mainWrapper.js index 4b0efd0c3..5bfe78e0c 100644 --- a/modules/mainWrapper.js +++ b/modules/mainWrapper.js @@ -14,7 +14,11 @@ mainWrapper.getCurrentCell = function() { //cell is a current world or map cell object mainWrapper.isEnemyFast = function(cell) { var checkFast = - (game.global.challengeActive == "Slow" || ((((game.badGuys[cell.name].fast || cell.mutation == "Corruption") && game.global.challengeActive != "Nom") || game.global.voidBuff == "doubleAttack") && game.global.challengeActive != "Coordinate")); + (game.global.challengeActive == "Glass" + || game.global.challengeActive == "Slow" + || ((((game.badGuys[cell.name].fast || cell.mutation == "Corruption") + && game.global.challengeActive != "Nom") || game.global.voidBuff == "doubleAttack") + && game.global.challengeActive != "Coordinate")); var experienced = game.global.challengeActive == "Exterminate" && game.challenges.Exterminate.experienced; var forceSlow = false; if (game.global.challengeActive == "Duel"){ From a69c7b07837b7f4f145f3c9b2374e0ee8943c3f2 Mon Sep 17 00:00:00 2001 From: maurezen Date: Wed, 8 Dec 2021 01:47:08 +0300 Subject: [PATCH 186/194] #96 - 5.6.0 update - typo fix --- modules/perks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/perks.js b/modules/perks.js index 9d1c7fda6..655049af7 100644 --- a/modules/perks.js +++ b/modules/perks.js @@ -103,7 +103,7 @@ var preset_Rmauz155 = [8, 0.7, 1.8, 0.8, 0.2, 1.3, 3.3, 2.1, 0.8, 0.1, 2, 1, 2, var preset_Rmauz200 = [8, 0.7, 2.5, 0.8, 0.2, 1.3, 4, 5.5, 0.8, 0.4, 0.3, 1, 2, 0.7, 800, 150, 100]; var presetListU2 = [preset_RZek059, preset_RZekmelt, preset_RZekquag, preset_Rmauquag, - preset_Rmauc3, preset_Rmauz135, preset_Rmauz155, presert_Rmauz200, preset_Rspace]; + preset_Rmauc3, preset_Rmauz135, preset_Rmauz155, preset_Rmauz200, preset_Rspace]; var presetListHtmlU2 = "\ \ \ From 1118bdcda6d4df0ee96aba8bb62fe6b8f9c8fb91 Mon Sep 17 00:00:00 2001 From: maurezen Date: Wed, 8 Dec 2021 02:22:40 +0300 Subject: [PATCH 187/194] #96 - 5.6.0 update - ratios tweak (greed & masterfulness) --- modules/perks.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/perks.js b/modules/perks.js index 655049af7..ee0dc0163 100644 --- a/modules/perks.js +++ b/modules/perks.js @@ -955,7 +955,7 @@ AutoPerks.initializePerks = function () { //10% compounding var tenacity = new AutoPerks.VariablePerk("tenacity", 50000000, true, 11, 0.1, 40); //we'll think of it as of 10% compounding to not complicate things too much - var greed = new AutoPerks.VariablePerk("greed", 10000000000, true, 12, 0.1, 40); + var greed = new AutoPerks.VariablePerk("greed", 10000000000, true, 12, 0.21, 40); var frenzy = new AutoPerks.VariablePerk("frenzy", 1000000000000000, true, 13, 0.1); var hunger = new AutoPerks.FixedPerk("hunger", 1000000, 30); //value it at max runestones, so base increase is lvl1 * 1000% = 10x @@ -967,8 +967,8 @@ AutoPerks.initializePerks = function () { var championism = new AutoPerks.VariablePerk("championism", 1e9, true, 15, 0.1) championism.exprate = 5; - //it gives 1 extra tenacity and greed, which means it is valued at 0.21 - var masterfulness = new AutoPerks.VariablePerk("masterfulness", 1e23, true, 16, 0.21) + //it gives 1 extra tenacity and greed, which means it is valued at 1.21*1.1 + var masterfulness = new AutoPerks.VariablePerk("masterfulness", 1e23, true, 16, 0.331) masterfulness.exprate = 50; AutoPerks.perkHolder = []; From 5255979de32422c8511fc4028160bbbb8fa21d1d Mon Sep 17 00:00:00 2001 From: maurezen Date: Sat, 22 Jan 2022 17:38:09 +0300 Subject: [PATCH 188/194] #96 - 5.6.0 update - autogather targeting wood for hypothermia (under a separate setting) --- AutoTrimps2.js | 3 +-- SettingsGUI.js | 2 +- modules/gather.js | 22 ++++++++++++++++++++++ 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/AutoTrimps2.js b/AutoTrimps2.js index 4660433e0..ddeff535b 100644 --- a/AutoTrimps2.js +++ b/AutoTrimps2.js @@ -216,8 +216,7 @@ function mainLoop() { 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" (") + autoGatherIfTurnedOn(); ////"Auto Gather/Build" (gather.js) getPageSetting('AutoMaps') > 0 ? autoMap() : updateAutoMapsStatus(); //"Auto Maps" (automaps.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) diff --git a/SettingsGUI.js b/SettingsGUI.js index c160dfd4c..af370e0fd 100644 --- a/SettingsGUI.js +++ b/SettingsGUI.js @@ -239,7 +239,7 @@ 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('ManualGather2', ['Gather/Build OFF', 'Auto Gather/Build', 'Science Research OFF', 'Auto Gather/Build #2', 'Auto Gather/Build #L'], '5-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. 1 and 2 should be pretty similar. L is for late game (Hypothermia) peeps.', '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"); diff --git a/modules/gather.js b/modules/gather.js index f13246e60..30c3c7996 100644 --- a/modules/gather.js +++ b/modules/gather.js @@ -4,6 +4,16 @@ MODULES["gather"].minTraps = 100; MODULES["gather"].minScienceAmount = 100; MODULES["gather"].minScienceSeconds = 60; +function autoGatherIfTurnedOn() { + if (getPageSetting('ManualGather2')<=2) { + manualLabor(); //"Auto Gather/Build" + } else if (getPageSetting('ManualGather2') == 3) { + manualLabor2(); //"Auto Gather/Build #2" + } else if (getPageSetting('ManualGather2') == 4) { + manualLaborLateGame(); //"Auto Gather/Build #L + } +} + //OLD: "Auto Gather/Build" function manualLabor() { if (getPageSetting('ManualGather2')==0) return; @@ -243,3 +253,15 @@ function manualLabor2() { //ok return true; } + +//At the late game stages we don't need fancy logic +function manualLaborLateGame() { + // Hypothermia only cares about wood because muh fires + if (game.global.challengeActive == 'Hypothermia') { + setGather('wood') + // Everything else only cares about metal because you're starved for metal for equipment at the end of the run + // and don't really care otherwise + } else { + setGather('metal') + } +} \ No newline at end of file From 2d5d647b5d1e8c00c8a91b6f03bc6a34cfeb821b Mon Sep 17 00:00:00 2001 From: maurezen Date: Sat, 23 Apr 2022 18:17:39 +0300 Subject: [PATCH 189/194] #97 - 5.7.0 update - decibuild syntax thing, dropping a bunch of deprecated talents usage without any meaningful change of the logic for the better --- modules/buildings.js | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/modules/buildings.js b/modules/buildings.js index 36feeb8c2..29d214959 100644 --- a/modules/buildings.js +++ b/modules/buildings.js @@ -16,20 +16,11 @@ function safeBuyBuilding(building) { return false; var oldBuy = preBuy2(); //build 10 or 2 at a time if we have the mastery for it. - //Note: Bypasses any "Max" caps by 1 if they are odd numbers and we can afford the 2nd one.//@todo #24 - if (game.talents.deciBuild.purchased) {//@todo refactor without this horrendous nested ifs and code duplication - game.global.buyAmt = 10; - if (!canAffordBuilding(building)) { - game.global.buyAmt = 2; - if (!canAffordBuilding(building)) { - game.global.buyAmt = 1; - if (!canAffordBuilding(building)) { - postBuy2(oldBuy); - return false; - } - } - } - } else if (game.talents.doubleBuild.purchased) { + //Note: Bypasses any "Max" caps by 1 if they are odd numbers and we can afford the 2nd one. + //@todo #97 ok I'm dropping anything decabuild and doublebuild related, because who knows how to check for + // bwRewards being triggered now + game.global.buyAmt = 10; + if (!canAffordBuilding(building)) { game.global.buyAmt = 2; if (!canAffordBuilding(building)) { game.global.buyAmt = 1; @@ -38,12 +29,6 @@ function safeBuyBuilding(building) { return false; } } - } else { - game.global.buyAmt = 1; - if (!canAffordBuilding(building)) { - postBuy2(oldBuy); - return false; - } } game.global.firing = false; if (building == 'Gym' && getPageSetting('GymWall')) { From 8035758c9ff7d800f35c1e50bdc3d420fb36861e Mon Sep 17 00:00:00 2001 From: maurezen Date: Thu, 4 Aug 2022 10:55:36 +0300 Subject: [PATCH 190/194] #98 - 5.8.0. update - mutated imps are considered fast --- modules/mainWrapper.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/mainWrapper.js b/modules/mainWrapper.js index 5bfe78e0c..cb2e3ef3f 100644 --- a/modules/mainWrapper.js +++ b/modules/mainWrapper.js @@ -18,7 +18,9 @@ mainWrapper.isEnemyFast = function(cell) { || game.global.challengeActive == "Slow" || ((((game.badGuys[cell.name].fast || cell.mutation == "Corruption") && game.global.challengeActive != "Nom") || game.global.voidBuff == "doubleAttack") - && game.global.challengeActive != "Coordinate")); + && game.global.challengeActive != "Coordinate")) + //@todo #98 - assuming any mutated imps to be fast because I can't find their fast flag otherwise + || (game.global.universe == 2 && cell.u2Mutation != undefined && cell.u2Mutation.length > 0); var experienced = game.global.challengeActive == "Exterminate" && game.challenges.Exterminate.experienced; var forceSlow = false; if (game.global.challengeActive == "Duel"){ From 34cff71e210f61cdf47f163eef3bd350fe23bbcb Mon Sep 17 00:00:00 2001 From: maurezen Date: Thu, 4 Aug 2022 10:57:07 +0300 Subject: [PATCH 191/194] #98 - 5.8.0. update - new perks added with bogus weights --- modules/perks.js | 67 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 48 insertions(+), 19 deletions(-) diff --git a/modules/perks.js b/modules/perks.js index ee0dc0163..0ef4614bf 100644 --- a/modules/perks.js +++ b/modules/perks.js @@ -90,20 +90,21 @@ var presetListHtml = "\ "; //U2 -//[looting,toughness,power,motivation,pheromones,artisanistry,carpentry,resilience,prismal,equality,criticality,tenacity, greed, frenzy, observation, championism, masterfulness] -var preset_Rspace = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; -var preset_RZek059 = [7, 10, 5, 1, 0.5, 2, 12, 9, 0.5, 2, 5, 0, 0, 0, 0, 0, 0]; -var preset_RZekmelt = [10, 0.5, 2, 0.5, 0.3, 1.2, 3, 1, 0.5, 1, 3, 18, 20, 0, 0, 0, 0]; -var preset_RZekquag = [8, 0.7, 1.8, 0.8, 0.2, 1.3, 3.3, 0.6, 0.8, 2.8, 6.2, 18, 27, 12, 0, 0, 0]; -var preset_Rmauquag = [8, 0.7, 1.8, 0.8, 0.2, 1.3, 3.3, 0.6, 0.8, 0.01, 6.2, 18, 27, 12, 0, 0, 0]; -var preset_Rmauc3 = [1, 1, 3, 0.8, 0.2, 1.3, 3.3, 2, 1, 0.01, 6.2, 30, 1, 12, 1, 1, 0]; -var preset_Rmauc3greedy = [8, 1, 3, 0.8, 0.2, 1.3, 3.3, 2, 1, 0.01, 6.2, 18, 15, 12, 1, 0, 0]; -var preset_Rmauz135 = [8, 0.7, 1.8, 0.8, 0.2, 1.3, 3.3, 2.1, 0.8, 0.1, 2, 1, 2, 1.2, 5, 0, 0]; -var preset_Rmauz155 = [8, 0.7, 1.8, 0.8, 0.2, 1.3, 3.3, 2.1, 0.8, 0.1, 2, 1, 2, 1.2, 5, 1, 0]; -var preset_Rmauz200 = [8, 0.7, 2.5, 0.8, 0.2, 1.3, 4, 5.5, 0.8, 0.4, 0.3, 1, 2, 0.7, 800, 150, 100]; +//[looting,toughness,power,motivation,pheromones,artisanistry,carpentry,resilience,prismal,equality,criticality,tenacity, greed, frenzy, observation, championism, masterfulness, smithology, expansion] +var preset_Rspace = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; +var preset_RZek059 = [7, 10, 5, 1, 0.5, 2, 12, 9, 0.5, 2, 5, 0, 0, 0, 0, 0, 0, 0, 0]; +var preset_RZekmelt = [10, 0.5, 2, 0.5, 0.3, 1.2, 3, 1, 0.5, 1, 3, 18, 20, 0, 0, 0, 0, 0, 0]; +var preset_RZekquag = [8, 0.7, 1.8, 0.8, 0.2, 1.3, 3.3, 0.6, 0.8, 2.8, 6.2, 18, 27, 12, 0, 0, 0, 0, 0]; +var preset_Rmauquag = [8, 0.7, 1.8, 0.8, 0.2, 1.3, 3.3, 0.6, 0.8, 0.01, 6.2, 18, 27, 12, 0, 0, 0, 0, 0]; +var preset_Rmauc3 = [1, 1, 3, 0.8, 0.2, 1.3, 3.3, 2, 1, 0.01, 6.2, 30, 1, 12, 1, 1, 0, 0, 0]; +var preset_Rmauc3greedy = [8, 1, 3, 0.8, 0.2, 1.3, 3.3, 2, 1, 0.01, 6.2, 18, 15, 12, 1, 0, 0, 0, 0]; +var preset_Rmauz135 = [8, 0.7, 1.8, 0.8, 0.2, 1.3, 3.3, 2.1, 0.8, 0.1, 2, 1, 2, 1.2, 5, 0, 0, 0, 0]; +var preset_Rmauz155 = [8, 0.7, 1.8, 0.8, 0.2, 1.3, 3.3, 2.1, 0.8, 0.1, 2, 1, 2, 1.2, 5, 1, 0, 0, 0]; +var preset_Rmauz200 = [8, 0.7, 2.5, 0.8, 0.2, 1.3, 4, 5.5, 0.8, 0.4, 0.3, 1, 2, 0.7, 800, 150, 100, 0, 0]; +var preset_Rmauz250 = [8, 0.7, 2.5, 0.8, 0.2, 1.3, 4, 5.5, 0.8, 0.4, 0.3, 1, 2, 0.7, 800, 150, 100, 5, 5]; var presetListU2 = [preset_RZek059, preset_RZekmelt, preset_RZekquag, preset_Rmauquag, - preset_Rmauc3, preset_Rmauz135, preset_Rmauz155, preset_Rmauz200, preset_Rspace]; + preset_Rmauc3, preset_Rmauz135, preset_Rmauz155, preset_Rmauz200, preset_Rmauz250, preset_Rspace]; var presetListHtmlU2 = "\ \ \ @@ -113,6 +114,7 @@ var presetListHtmlU2 = "\ \ \ \ +\ \ "; @@ -197,7 +199,16 @@ AutoPerks.displayGUI = function() { listratiosLine3 = ["Resilience","Tenacity","Greed", "Frenzy", "Observation", "Championism", "Masterfulness"]; for (var i in listratiosLine3) { AutoPerks.createInput(listratiosLine3[i],apGUI.$ratiosLine3); - } + } + //line 4 of the UI + apGUI.$ratiosLine4 = document.createElement("DIV"); + apGUI.$ratiosLine4.setAttribute('style', 'display: inline-block; text-align: left; width: 100%'); + apGUI.$customRatios.appendChild(apGUI.$ratiosLine4); + var listratiosLine4; + listratiosLine4 = ["Expansion","Smithology"]; + for (var i in listratiosLine4) { + AutoPerks.createInput(listratiosLine4[i],apGUI.$ratiosLine4); + } } //Create dump perk dropdown apGUI.$dumpperklabel = document.createElement("Label"); @@ -242,14 +253,19 @@ AutoPerks.displayGUI = function() { 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. itemName = game.global.universe == 1 ? 'AutoperkSelectedRatioPresetName' : 'AutoperkSelectedRatioPresetNameU2'; - if (loadLastPreset == 15 && !localStorage.getItem(itemName)) + if (loadLastPreset == 15 && !localStorage.getItem(itemName)) { + loadLastPreset = 25; + } else if (localStorage.getItem(itemName)=="customPreset") { loadLastPreset = 25; - if (localStorage.getItem(itemName)=="customPreset") - loadLastPreset = 25; + } + if (25 == loadLastPreset && game.global.universe == 2) { + //this should point us exactly at the custom preset + loadLastPreset = presetListU2.length; + } setID = loadLastPreset; - } - else + } 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); @@ -970,13 +986,26 @@ AutoPerks.initializePerks = function () { //it gives 1 extra tenacity and greed, which means it is valued at 1.21*1.1 var masterfulness = new AutoPerks.VariablePerk("masterfulness", 1e23, true, 16, 0.331) masterfulness.exprate = 50; + + //improves smithy base effect; at zone 250 we can see about 40 smithies + //a correct comparison is ((1.25+0.01*(N+1))/(1.25+0.01*N))^40 = Y^40 + //we can get away with the lower bound of (Y-1)*40 + 1 + //..which is atk/health, and not radon + //putting a bogus 0.3 weight here for the time being + var smithology = new AutoPerks.VariablePerk("smithology", 1e23, true, 17, 0.3); + smithology.exprate = 4; + + //improves tauntimp base effect which is population + //putting a bogus 0.3 weight here for the time being + var expansion = new AutoPerks.VariablePerk("expansion", 1e23, true, 18, 0.3); + expansion.exprate = 3; AutoPerks.perkHolder = []; //gather these into an array of objects if (game.global.universe == 1) { AutoPerks.perkHolder = [siphonology, anticipation, meditation, relentlessness, range, agility, bait, trumps, packrat, looting, toughness, power, motivation, pheromones, artisanistry, carpentry, resilience, coordinated, resourceful, overkill, capable, cunning, curious, classy, toughness_II, power_II, motivation_II, carpentry_II, looting_II]; } else if (game.global.universe == 2) { - AutoPerks.perkHolder = [range, agility, bait, trumps, packrat, hunger, looting, toughness, resilience, power, motivation, pheromones, artisanistry, carpentry, prismal, equality, criticality, tenacity, greed, frenzy, observation, championism, masterfulness]; + AutoPerks.perkHolder = [range, agility, bait, trumps, packrat, hunger, looting, toughness, resilience, power, motivation, pheromones, artisanistry, carpentry, prismal, equality, criticality, tenacity, greed, frenzy, observation, championism, masterfulness, smithology, expansion]; } //initialize basics on all. for(var i in AutoPerks.perkHolder) { From fd6dabb87dd0e93f27e48780b7295513e9c5de23 Mon Sep 17 00:00:00 2001 From: maurezen Date: Wed, 14 Dec 2022 22:56:28 +0300 Subject: [PATCH 192/194] #98 - 5.8.0. update - apparently observation has a maximum? --- modules/perks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/perks.js b/modules/perks.js index 0ef4614bf..efc2d9ad9 100644 --- a/modules/perks.js +++ b/modules/perks.js @@ -975,7 +975,7 @@ AutoPerks.initializePerks = function () { var frenzy = new AutoPerks.VariablePerk("frenzy", 1000000000000000, true, 13, 0.1); var hunger = new AutoPerks.FixedPerk("hunger", 1000000, 30); //value it at max runestones, so base increase is lvl1 * 1000% = 10x - var observation = new AutoPerks.VariablePerk("observation", 5000000000000000000, true, 14, 10); + var observation = new AutoPerks.VariablePerk("observation", 5000000000000000000, true, 14, 10, 50); observation.exprate = 2; observation.type = AutoPerks.QUADRATIC_TYPE; From 574cef3ffaa7f34b46af3bebf3b20fdaeff27362 Mon Sep 17 00:00:00 2001 From: maurezen Date: Mon, 13 Feb 2023 00:36:11 +0300 Subject: [PATCH 193/194] #99 - 5.9.0 update #99 - 5.9.0 update - desolation added to autoportal settings --- SettingsGUI.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SettingsGUI.js b/SettingsGUI.js index af370e0fd..6b9f056ae 100644 --- a/SettingsGUI.js +++ b/SettingsGUI.js @@ -266,7 +266,7 @@ function initializeAllSettings() { 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', 'Bublé', 'Melt', 'Quagmire', 'Decay', 'Electricity', 'Life', 'Crushed', 'Nom', 'Toxicity', 'Watch', 'Lead', 'Corrupted', 'Domination', 'Custom'], "Core"); //document.getElementById("AutoPortal").style="font-size: 1.0vw;"; //fit it on 1 line. - 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', 'Bublé', 'Melt', 'Quagmire', 'Decay', 'Electricity', 'Life', 'Crushed', 'Nom', 'Toxicity', 'Watch', 'Lead', 'Corrupted', 'Domination', 'Experience', 'Archaeology', 'Insanity', 'Mayhem', 'Nurture', 'Pandemonium', 'Alchemy', 'Hypothermia'], "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', 'Bublé', 'Melt', 'Quagmire', 'Decay', 'Electricity', 'Life', 'Crushed', 'Nom', 'Toxicity', 'Watch', 'Lead', 'Corrupted', 'Domination', 'Experience', 'Archaeology', 'Insanity', 'Mayhem', 'Nurture', 'Pandemonium', 'Alchemy', 'Hypothermia', 'Desolation'], "Core"); //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"); From e4c2e73ecf4a2f2f54ace38e8fe272a75b9a1c65 Mon Sep 17 00:00:00 2001 From: maurezen Date: Sat, 5 Oct 2024 22:40:48 +0300 Subject: [PATCH 194/194] #100 - masterfulness max - masterfulness should have a maximum listed. --- modules/perks.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/perks.js b/modules/perks.js index efc2d9ad9..4e9f2aade 100644 --- a/modules/perks.js +++ b/modules/perks.js @@ -968,9 +968,9 @@ AutoPerks.initializePerks = function () { equality.exprate = 1.5; //should it be compounding? var criticality = new AutoPerks.VariablePerk("criticality", 100, true, 10, 0.1); - //10% compounding + //10% compounding. has a max of 40. var tenacity = new AutoPerks.VariablePerk("tenacity", 50000000, true, 11, 0.1, 40); - //we'll think of it as of 10% compounding to not complicate things too much + //we'll think of it as of 10% compounding to not complicate things too much. has a max of 40. var greed = new AutoPerks.VariablePerk("greed", 10000000000, true, 12, 0.21, 40); var frenzy = new AutoPerks.VariablePerk("frenzy", 1000000000000000, true, 13, 0.1); var hunger = new AutoPerks.FixedPerk("hunger", 1000000, 30); @@ -983,8 +983,8 @@ AutoPerks.initializePerks = function () { var championism = new AutoPerks.VariablePerk("championism", 1e9, true, 15, 0.1) championism.exprate = 5; - //it gives 1 extra tenacity and greed, which means it is valued at 1.21*1.1 - var masterfulness = new AutoPerks.VariablePerk("masterfulness", 1e23, true, 16, 0.331) + //it gives 1 extra tenacity and greed, which means it is valued at 1.21*1.1. has a max of 10. + var masterfulness = new AutoPerks.VariablePerk("masterfulness", 1e23, true, 16, 0.331, 10) masterfulness.exprate = 50; //improves smithy base effect; at zone 250 we can see about 40 smithies