Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Max Tox not disabled mid run anymore #179

Open
wants to merge 198 commits into
base: gh-pages
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
198 commits
Select commit Hold shift + click to select a range
4ec33c6
Max Tox not disabled mid run anymore
maurezen Nov 9, 2018
ccaaa92
fork readme update
maurezen Nov 23, 2018
bd167da
fork user.js update
maurezen Nov 23, 2018
4d37620
3 - lead hd ratio
maurezen Nov 23, 2018
698f211
3 - lead hd ratio
maurezen Nov 23, 2018
fa7c097
3 - lead hd ratio
maurezen Nov 23, 2018
3493264
3 - lead hd ratio
maurezen Nov 24, 2018
c2077c3
1 - Scrying stance should take heed of remaining enemies
maurezen Nov 26, 2018
4937336
#4 Corrupted cells are underfarmed for - account for the worst case, …
maurezen Nov 26, 2018
e75498b
#4 Corrupted cells are underfarmed for - minor stupid fix
maurezen Nov 26, 2018
70d71c7
#2 map generator should try perfect maps - backing off via loot inste…
maurezen Nov 27, 2018
af7d053
#4 - corrupted cells are underfarmed for - moved farming point a bit …
maurezen Nov 27, 2018
18dbcd4
#6 h/d ratio doesn't know about coordinated
maurezen Nov 27, 2018
8825578
#9 - AutoBreedTimer not aware of Trapper
maurezen Nov 28, 2018
a7b4baa
#10 - genetoicists cycle fire
maurezen Nov 29, 2018
7621616
#1 - Scrying stance should take heed of remaining enemies
maurezen Dec 3, 2018
54f6cad
#15 - Don't use S on corrupteds should be separate from magma
maurezen Dec 7, 2018
41f43fb
#18 h/d ratio seems to fluctuate - disabled Ice in h/d ratio calculation
maurezen Dec 12, 2018
06945e9
#19 Add domination challenge to autoportal settings
maurezen Dec 20, 2018
c44fd68
#10 - geneticists cycle fire - dropped firing due to timer left
maurezen Dec 20, 2018
c0523b5
#1 - Scrying stance should take heed of remaining enemies
maurezen Dec 21, 2018
25afe9c
#10 - geneticists cycle fire - rolled back firing due to timer left, …
maurezen Dec 21, 2018
1a1c556
#25 Autostance2 doesn't know about Ice
maurezen Dec 26, 2018
34fc854
#17 Pre-spire farming ignores equip caps - no equipment wall in Spire
maurezen Dec 27, 2018
4b84e9b
#29 h/d ratio doesn't know about obliterated - added eradicated as well
maurezen Dec 28, 2018
75b233e
#30 - Breed timer can't into amalgamator
maurezen Dec 29, 2018
526fcc0
#31 - Autotimer for dailies
maurezen Dec 30, 2018
2032c4c
#32 - autoequipment enemy dmg aware of coordinated/obliterated/corrup…
maurezen Dec 30, 2018
f5f1d7e
#34 - Graphs should display prettified numbers
maurezen Jan 3, 2019
5465bab
#35 - Add bones graph
maurezen Jan 3, 2019
2cf455a
#37 Add late-game auto ratios
maurezen Jan 9, 2019
ddc036b
#29 - h/d ratio doesn't know about Obliterated - fixed some undefineds
maurezen Jan 10, 2019
3d7166a
#7 - Unify mob health/dmg calculations - temporary helper solution
maurezen Jan 11, 2019
5690e7a
#7 - Unify mob health/dmg calculations - temporary helper solution
maurezen Jan 11, 2019
1b3e95b
#7 - Unify mob health/dmg calculations - temporary helper solution
maurezen Jan 11, 2019
da99e03
#38 - Add situational modifiers for Amalgamator and Strength Tower
maurezen Jan 13, 2019
e4929c8
#42 - AutoPerks doesn't know about Classy
maurezen Feb 18, 2019
f03b1ba
#42 - AutoPerks doesn't know about Classy
maurezen Feb 18, 2019
c427b58
#42 - AutoPerks doesn't know about Classy
maurezen Feb 18, 2019
6bd5726
#42 - AutoPerks doesn't know about Classy
maurezen Feb 18, 2019
5835fa3
#42 - AutoPerks doesn't know about Classy
maurezen Feb 19, 2019
321915a
#43 - AutoPerks can't into DecaBuild
maurezen Feb 19, 2019
b896ed1
#44 - Force S in Void Maps should ignore min zone
maurezen Feb 25, 2019
447b083
#43 - force s in voids should ignore min zone - fixed min zone everyw…
maurezen Mar 27, 2019
4f4747e
#45 4.11 broke heirlooms - first try
maurezen Mar 27, 2019
19d3100
#45 4.11 broke heirlooms.js - second try
maurezen Mar 28, 2019
5ceaaed
#46 - crit damage is not calculated correctly
maurezen Mar 28, 2019
e518574
#46 - crit damage is not calculated correctly
maurezen Mar 28, 2019
3739e08
#46 - crit damage is not calculated correctly
maurezen Mar 28, 2019
90288ee
#46 - crit damage is not calculated correctly
maurezen Mar 28, 2019
2e420b5
#46 - crit damage is not calculated correctly
maurezen Mar 28, 2019
6bc045a
#50 autoperks ignore looting
maurezen Apr 28, 2019
8f58e7f
#53
maurezen Aug 29, 2019
53d8d3b
#54 - U2 automation and stats
maurezen Sep 4, 2019
55c06be
#54 - U2 automation and stats
maurezen Sep 4, 2019
1a1e9ba
#54 - U2 automation and stats
maurezen Sep 4, 2019
022ca33
#54 - U2 automation and stats
maurezen Sep 4, 2019
3c17353
#54 - U2 automation and stats
maurezen Sep 4, 2019
511d272
#54 - U2 automation and stats
maurezen Sep 4, 2019
4cce1fa
#55 - Trapping should stop somewhere
maurezen Sep 4, 2019
679f54b
#54 - U2 automation and stats
maurezen Sep 4, 2019
3b930a3
#54 - U2 automation and stats
maurezen Sep 4, 2019
8090a6a
#7 - Unify mob health/dmg calculations
maurezen Sep 4, 2019
fe26925
#57 - Lower default void map difficulty
maurezen Sep 4, 2019
2bac71a
#54 - U2 automation and stats
maurezen Sep 4, 2019
1711693
#54 - U2 automation and stats
maurezen Sep 4, 2019
11ed2a4
#54 - U2 automation and stats
maurezen Sep 4, 2019
a0c3e7b
#54 - U2 automation and stats
maurezen Sep 4, 2019
f77bfad
#54 - U2 automation and stats
maurezen Sep 5, 2019
182e240
#54 - U2 automation and stats
maurezen Sep 5, 2019
8ecf561
#54 - U2 automation and stats
maurezen Sep 5, 2019
f3c28e2
#54 - U2 automation and stats
maurezen Sep 5, 2019
287581e
#54 - U2 automation and stats
maurezen Sep 5, 2019
1904b47
#58 - Autoperks fast calculation should be faster
maurezen Sep 6, 2019
bfaacf7
#59 - Geneticists are too slow to hire
maurezen Sep 6, 2019
62b1eaa
#60 - Magmamancers not hired despite having Still Magmamancing
maurezen Sep 6, 2019
4b5daf5
#54 - U2 automation and stats
maurezen Sep 8, 2019
d99f8d2
#54 - U2 automation and stats
maurezen Sep 8, 2019
2b581ed
#54 - U2 automation and stats
maurezen Sep 8, 2019
268e1ef
#54 - U2 automation and stats
maurezen Sep 8, 2019
f6e14c4
#54 - U2 automation and stats
maurezen Sep 8, 2019
76dd63d
#54 - U2 automation and stats
maurezen Sep 8, 2019
c89d136
#54 - U2 automation and stats
maurezen Sep 9, 2019
e2e021f
#54 - U2 automation and stats
maurezen Sep 9, 2019
9515fa9
#54 - U2 automation and stats
maurezen Sep 9, 2019
2a735c5
#54 - U2 automation and stats
maurezen Sep 9, 2019
8cfcf63
#54 - U2 automation and stats
maurezen Sep 10, 2019
ba6cb65
#54 - U2 automation and stats
maurezen Sep 10, 2019
0fe6256
#61 - Full equip criterias need to be updated
maurezen Sep 13, 2019
f1ec13c
#62 - Max tox setting ignored
maurezen Sep 21, 2019
4b260d1
#54 - U2 automation and stats
maurezen Sep 22, 2019
5ebe9c5
#54 - U2 automation and stats
maurezen Sep 22, 2019
681f8b2
#54 - U2 automation and stats
maurezen Sep 22, 2019
fc8da05
#54 - U2 automation and stats
maurezen Sep 22, 2019
3607755
#54 - U2 automation and stats
maurezen Oct 7, 2019
2573aa8
#54 - U2 automation and stats
maurezen Oct 12, 2019
463459d
#54 - U2 automation and stats
maurezen Oct 13, 2019
a2a8665
#54 - U2 automation and stats
maurezen Oct 13, 2019
d6c9e9b
#54 - U2 automation and stats
maurezen Oct 13, 2019
09ef219
#54 - U2 automation and stats
maurezen Oct 13, 2019
9b0a7e4
#54 - U2 automation and stats
maurezen Oct 13, 2019
bbfe0f7
#54 - U2 automation and stats
maurezen Oct 13, 2019
4a2928a
#54 - U2 automation and stats
maurezen Oct 13, 2019
8e55dfd
#54 - U2 automation and stats
maurezen Oct 15, 2019
0e70e9d
#54 - U2 automation and stats
maurezen Oct 16, 2019
f98b8bd
#54 - U2 automation and stats
maurezen Oct 22, 2019
caf20dc
#54 - U2 automation and stats
maurezen Nov 2, 2019
0854ff0
#54 - U2 automation and stats
maurezen Dec 5, 2019
74d4bad
#54 - U2 automation and stats
maurezen Dec 5, 2019
6167708
#54 - U2 automation and stats
maurezen Dec 5, 2019
ebc431b
#54 - U2 automation and stats
maurezen Dec 5, 2019
b0bfab1
#54 - U2 automation and stats
maurezen Dec 6, 2019
3f15183
#54 - U2 automation and stats
maurezen Dec 6, 2019
ae06b75
#54 - U2 automation and stats
maurezen Dec 6, 2019
7cd716f
#54 - U2 automation and stats
maurezen Dec 6, 2019
a16295f
#65 - Melting point should be ran somewhere during a filler run
maurezen Jan 27, 2020
b8631c6
#66 - Add my own presets to the preset list
maurezen Jan 27, 2020
8051ce2
#67 - Update perks with max values for prismal and greed
maurezen Jan 27, 2020
1707dec
#66 - Add my own presets to the preset list
maurezen Jan 29, 2020
e2c32e3
#67 - Update perks with max values for tenacity
maurezen Feb 6, 2020
567dca3
#69 - 5.3.0 updates
maurezen Feb 20, 2020
8b335cc
#70 - AutoPerks might be slow
maurezen Feb 23, 2020
2b21d96
#71 - Equipment's isQuick needs improvement
maurezen Feb 24, 2020
1f94156
#69 - 5.3.+ updates
maurezen Feb 28, 2020
b29933a
#69 - 5.3.+ updates
maurezen Feb 28, 2020
ef88783
#72 Void maps shouldn't force S in c2
maurezen Apr 6, 2020
a55723e
#73 AutoStance wind support
maurezen Apr 13, 2020
b3f2920
#77 - equality management
maurezen Jun 24, 2020
ecc2702
Merge pull request #78 from maurezen/77-equality-management
maurezen Jun 24, 2020
2d9bb8a
#77 - equality management - typo
maurezen Jun 24, 2020
51cefc0
#77 - equality management - additional modules loaded
maurezen Jun 24, 2020
fd4568c
#77 - equality management - namespaces and a tad of docs
maurezen Jun 24, 2020
27fa58d
#77 - equality management - disabledStacks happens to be NaN sometime…
maurezen Jun 25, 2020
e760f9d
#74 - AutoWorkerRatios for U2
maurezen Jun 25, 2020
bcacd2c
#74 - AutoWorkerRatios for U2 - init the maps
maurezen Jun 25, 2020
8115a80
#74 - AutoWorkerRatios for U2 - archaeology ratio
maurezen Jun 25, 2020
02363cd
#79 - autostance shouldn't set formation in U2
maurezen Jun 26, 2020
1dd8ee1
#77 - Equality support for U2 - correctly calculating equality for ga…
maurezen Jun 27, 2020
9679fcd
#77 - Equality support for U2 - handling undefined getCurrentCell case
maurezen Jun 27, 2020
6fb5414
#77 - Equality support for U2 - handling undefined getCurrentCell case
maurezen Jun 27, 2020
c3ce044
#76 - autoperks takes forever - extracted the perk advance logic, mad…
maurezen Jun 29, 2020
3702b43
#76 - autoperks takes forever - minor adjustments, adaptive backoff
maurezen Jun 30, 2020
030d20e
#76 - autoperks takes forever - default factor adjustment, stopping f…
maurezen Jun 30, 2020
08b3e55
#73 - AutoStance wind support - user setting for wind in maps
maurezen Jul 2, 2020
fdfa738
#73 - AutoStance wind support - disable Wind in Spires
maurezen Jul 2, 2020
2308357
#73 - AutoStance wind support - get out of Wind if enemy is healthy e…
maurezen Jul 2, 2020
67bfe79
#73 - AutoStance wind support - cleanup - damn I need a linter
maurezen Jul 2, 2020
3f7ad7a
#73 - AutoStance wind support - should consider both current and next…
maurezen Jul 2, 2020
930d23f
#79 - autostance shouldn't set formation in U2 - shouldn't stop calcu…
maurezen Jul 4, 2020
b098514
#83 - 5.4.0 update changes - berserk perk
maurezen Sep 7, 2020
5391e0a
#83 - 5.4.0 update changes - Insanity challenge custom portal
maurezen Sep 7, 2020
5444800
#83 - 5.4.0 update changes - parity work ratio
maurezen Sep 7, 2020
f689bd8
#83 - 5.4.0 update changes - hunger perk
maurezen Sep 7, 2020
c42880a
#83 - 5.4.0 update changes - parity adjustment
maurezen Sep 7, 2020
554598f
#83 - 5.4.0 update changes - experienced makes equality management ig…
maurezen Sep 7, 2020
b5a65cf
#83 - 5.4.0 update changes - buy Antenna if you can
maurezen Sep 8, 2020
108b45f
#83 - 5.4.0 update changes - take hub into account while calculating …
maurezen Sep 9, 2020
8cfdafc
#83 - 5.4.0 update changes - a sneaky equality management fix so wait…
maurezen Sep 10, 2020
8ead462
#80 - Add scruffy exp graphs - also added worshippers
maurezen Sep 14, 2020
12de452
#80 - Add scruffy exp graphs - dropped the analytics while I was around
maurezen Sep 14, 2020
8a659b8
#80 - Add scruffy exp graphs - cleanup
maurezen Sep 14, 2020
2dc97a5
#83 - 5.4.0 update changes - a sneaky building update, forbidding to …
maurezen Sep 30, 2020
39d7151
#77 - equality manamement - added an ability to target a specific num…
maurezen Dec 7, 2020
fb89b27
#77 - equality manamement - exposed module variables as settings
maurezen Dec 7, 2020
58a3c09
#77 - equality manamement - configurable backoff
maurezen Dec 7, 2020
fa0725d
#77 - equality manamement - minor cleanup
maurezen Dec 7, 2020
be35ec0
#77 - equality manamement - backoff gui setting
maurezen Dec 7, 2020
3df2ada
#87 - 5.4.4 update - observation perk, quadratic perk support
maurezen Dec 12, 2020
51b0355
#87 - 5.4.4 update - nurture custom autoportal
maurezen Dec 12, 2020
4a214b0
#87 - 5.4.4 update - minor cleanup
maurezen Dec 12, 2020
bbd6771
#87 - 5.4.4 update - fixes quadratic type calculation bug that droppe…
maurezen Dec 12, 2020
5e667e9
#87 - 5.4.4 update - corrects observation price
maurezen Dec 13, 2020
20962e9
#87 - 5.4.4 update - corrects dumb typos w.r.t. exponential type
maurezen Dec 19, 2020
2d48ae1
#87 - 5.4.4 update - corrects dumb typos w.r.t. exponential type
maurezen Dec 19, 2020
83a39a6
#91 - 5.5.0 update - equality management fixes, pandemonium/alchemy a…
maurezen May 16, 2021
2b62ad1
#91 - 5.5.0 update - fixes missed bracket that prevents equality modu…
maurezen May 16, 2021
238c350
#82 - Automatically invoke nature empowerment
maurezen Sep 8, 2021
d3643e0
#82 - Automatically invoke nature empowerment
maurezen Sep 8, 2021
07ed74f
#76 - autoperks takes forever - default factor adjustment, factor set…
maurezen Sep 11, 2021
fe11f09
#76 - autoperks takes forever - remaining helium tracking is bumping …
maurezen Sep 11, 2021
963d0a2
#76 - autoperks takes forever - have I mentioned typos?
maurezen Sep 11, 2021
e86a631
#93 - Incorrect autoportal settings get the AT stuck on portal
maurezen Oct 13, 2021
4f27981
Merge pull request #94 from maurezen/93-incorrect-autoportal-settings…
maurezen Oct 13, 2021
9982507
#93 - Incorrect autoportal settings get the AT stuck on portal - sill…
maurezen Nov 10, 2021
161560a
Merge pull request #95 from maurezen/93-incorrect-autoportal-settings…
maurezen Nov 10, 2021
ae5b1dd
#96 - 5.6.0 update - added Experience and Hypothermia to autoportal s…
maurezen Dec 7, 2021
82c1c7d
#96 - 5.6.0 update - added masterfulness to the autoperks
maurezen Dec 7, 2021
0728f0c
#96 - 5.6.0 update - check whether the enemy is fast for equality dan…
maurezen Dec 7, 2021
a69c7b0
#96 - 5.6.0 update - typo fix
maurezen Dec 7, 2021
1118bdc
#96 - 5.6.0 update - ratios tweak (greed & masterfulness)
maurezen Dec 7, 2021
5255979
#96 - 5.6.0 update - autogather targeting wood for hypothermia (under…
maurezen Jan 22, 2022
2d5d647
#97 - 5.7.0 update - decibuild syntax thing, dropping a bunch of depr…
maurezen Apr 23, 2022
8035758
#98 - 5.8.0. update - mutated imps are considered fast
maurezen Aug 4, 2022
34cff71
#98 - 5.8.0. update - new perks added with bogus weights
maurezen Aug 4, 2022
fd6dabb
#98 - 5.8.0. update - apparently observation has a maximum?
maurezen Dec 14, 2022
574cef3
#99 - 5.9.0 update
maurezen Feb 12, 2023
e4c2e73
#100 - masterfulness max - masterfulness should have a maximum listed.
maurezen Oct 5, 2024
c39184c
Merge remote-tracking branch 'origin/gh-pages' into gh-pages
maurezen Oct 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions AutoTrimps2.js
Original file line number Diff line number Diff line change
Expand Up @@ -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', 'perks', /* 'perky', */ 'fight-info', 'performance', 'equality', 'mainWrapper'];
for (var m in ATmoduleList) {
ATscriptLoad(modulepath, ATmoduleList[m]);
}
Expand Down Expand Up @@ -216,15 +216,16 @@ 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)
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)
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" (")
Expand All @@ -235,6 +236,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();
Expand Down
186 changes: 91 additions & 95 deletions Graphs.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ document.getElementById("graphParent").innerHTML += '<div id="graphFooter" style
var $graphFooter = document.getElementById('graphFooterLine1');
//$graphFooter.innerHTML += '\
//Create the dropdown for what graph to show (these correspond to headings in setGraph() and have to match)
var graphList = ['Helium - He/Hr', 'Helium - Total', 'Helium - He/Hr Instant', 'Helium - He/Hr Delta', 'HeHr % / LifetimeHe', 'He % / LifetimeHe', 'Clear Time', 'Cumulative Clear Time', 'Run Time', 'Map Bonus', 'Void Maps', 'Void Map History', 'Loot Sources', 'Coordinations', 'GigaStations', 'Unused Gigas', 'Last Warpstation', 'Trimps', 'Nullifium Gained', 'Dark Essence', 'Dark Essence PerHour', 'OverkillCells', 'Magmite', 'Magmamancers', 'Fluffy XP', 'Fluffy XP PerHour', 'Nurseries'];
var graphList = ['Helium - He/Hr', 'Radon - Ra/Hr', 'Helium - Total', 'Helium - He/Hr Instant', 'Helium - He/Hr Delta', 'HeHr % / LifetimeHe', 'He % / LifetimeHe', 'Clear Time', 'Cumulative Clear Time', 'Run Time', 'Map Bonus', 'Void Maps', 'Void Map History', 'Loot Sources', 'Coordinations', 'GigaStations', 'Unused Gigas', 'Last Warpstation', 'Trimps', 'Nullifium Gained', 'Dark Essence', 'Dark Essence PerHour', 'OverkillCells', 'Magmite', 'Magmamancers', 'Fluffy XP', 'Fluffy XP PerHour', 'Scruffy XP', 'Scruffy XP PerHour', 'Nurseries', 'Bones', 'Worshippers'];
var $graphSel = document.createElement("select");
$graphSel.id = 'graphSelection';
$graphSel.setAttribute("style", "");
Expand Down Expand Up @@ -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();
}
}
Expand Down Expand Up @@ -359,8 +359,9 @@ function pushData() {
var lifetime = (game.resources.helium.owned / (game.global.totalHeliumEarned-game.resources.helium.owned))*100;

allSaveData.push({
totalPortals: game.global.totalPortals,
totalPortals: game.global.totalPortals + game.global.totalRadPortals,
heliumOwned: game.resources.helium.owned,
radonOwned: game.resources.radon.owned,
currentTime: new Date().getTime(),
portalTime: game.global.portalTime,
world: game.global.world,
Expand All @@ -382,32 +383,16 @@ function pushData() {
magmite: game.global.magmite,
magmamancers: game.jobs.Magmamancer.owned,
fluffy: game.global.fluffyExp,
nursery: game.buildings.Nursery.purchased
scruffy: game.global.fluffyExp2,
nursery: game.buildings.Nursery.purchased,
worshipper: game.jobs.Worshipper.owned,
bones: game.global.b
});
//only keep 15 portals worth of runs to prevent filling storage
clearData(15);
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,
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) {
Expand Down Expand Up @@ -442,9 +427,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},
Expand Down Expand Up @@ -863,6 +848,17 @@ function setGraphData(graph) {
yType = 'Linear';
yminFloor=0;
break;
case 'Radon - Ra/Hr':
graphData = allPurposeGraph('radonhr',true,null,
function specialCalc(e1,e2) {
return Math.floor(e1.radonOwned / ((e1.currentTime - e1.portalTime) / 3600000));
});
title = 'Radon/Hour (Cumulative)';
xTitle = 'Zone';
yTitle = 'Radon/Hour';
yType = 'Linear';
yminFloor=0;
break;
case 'Helium - Total':
graphData = allPurposeGraph('heliumOwned',true,null,
function specialCalc(e1,e2) {
Expand Down Expand Up @@ -966,31 +962,7 @@ function setGraphData(graph) {
var currentPortal = -1;
var currentZone = -1;
var startEssence = 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;
startEssence = allSaveData[i].essence;
}
//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--;
}
}
//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';
Expand All @@ -1000,11 +972,16 @@ function setGraphData(graph) {
case 'Nurseries':
graphData = allPurposeGraph('nursery',true,"number");
title = 'Nurseries Bought (Total)';
xTitle = 'Zone';// (starting at your NoNurseriesUntil setting)';
xTitle = 'Zone';
yTitle = 'Nursery';
yType = 'Linear';
// if (getPageSetting('NoNurseriesUntil'))
// xminFloor = getPageSetting('NoNurseriesUntil');
break;
case 'Bones':
graphData = allPurposeGraph('bones',true,"number");
title = 'Bones Found (Total)';
xTitle = 'Zone';
yTitle = 'Bones';
yType = 'Linear';
break;
case 'Fluffy XP':
graphData = allPurposeGraph('fluffy',true,"number");
Expand All @@ -1018,45 +995,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 = [];
Expand Down Expand Up @@ -1092,6 +1061,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;
Expand Down Expand Up @@ -1133,13 +1130,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)
Expand All @@ -1149,12 +1144,13 @@ function setGraphData(graph) {
}
return graphData;
}

//default formatter used (can define a decimal precision, and a suffix)
formatter = formatter || function () {
var ser = this.series;
return '<span style="color:' + ser.color + '" >●</span> ' +
ser.name + ': <b>' +
Highcharts.numberFormat(this.y, precision,'.', ',') + valueSuffix + '</b><br>';
ser.name + ' <b>' +
prettify(this.y) + valueSuffix + '</b><br>';//#34 - changed formatting to Trimps own prettification
};
var additionalParams = {};
//Makes everything happen.
Expand Down Expand Up @@ -1337,13 +1333,13 @@ 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!!!!!!!!!!!!!!!!!!!!!!

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;
Expand Down
Loading