-
Notifications
You must be signed in to change notification settings - Fork 193
/
updates.js
7250 lines (7035 loc) · 438 KB
/
updates.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/* Trimps
Copyright (C) 2019 Zach Hood
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program (if you are reading this on the original
author's website, you can find a copy at
<trimps.github.io/license.txt>). If not, see
<http://www.gnu.org/licenses/>. */
var customUp;
var tooltipUpdateFunction = "";
var lastMousePos = [];
var lastTooltipTitle = "";
var onShift;
var openTooltip = null;
//"onmouseover="tooltip('*TOOLTIP_TITLE*', 'customText', event, '*TOOLTIP_TEXT*');" onmouseout="tooltip('hide')""
//tooltip('confirm', null, 'update', '*TEXT STRING*', '*FUNCTION()*', '*TIP TITLE*', '*BUTTON TEXT*')
function tooltip(what, isItIn, event, textString, attachFunction, numCheck, renameBtn, noHide, hideCancel, ignoreShift) { //Now 20% less menacing. Work in progress.
if (!game.options.menu.bigPopups.enabled && (
what == "The Improbability" ||
(what == "Corruption" && getHighestLevelCleared() >= 199) ||
(what == "The Spire" && getHighestLevelCleared() >= 219) ||
(what == "The Magma" && getHighestLevelCleared() >= 249) ||
(what == "The Mutated Zones" && game.global.highestRadonLevelCleared >= 220)
)){
return;
}
checkAlert(what, isItIn);
if (game.global.lockTooltip && event != 'update') return;
if (game.global.lockTooltip && isItIn && event == 'update') return;
var elem = document.getElementById("tooltipDiv");
swapClass("tooltipExtra", "tooltipExtraNone", elem);
document.getElementById('tipText').className = "";
var ondisplay = null; // if non-null, called after the tooltip is displayed
openTooltip = null;
if (what == "hide"){
elem.style.display = "none";
tooltipUpdateFunction = "";
onShift = null;
return;
}
if (event != 'lock' && (event != 'update' || isItIn) && !game.options.menu.tooltips.enabled && !shiftPressed && what != "Well Fed" && what != 'Perk Preset' && what != 'Activate Portal' && !ignoreShift) {
var whatU = what, isItInU = isItIn, eventU = event, textStringU = textString, attachFunctionU = attachFunction, numCheckU = numCheck, renameBtnU = renameBtn, noHideU = noHide;
var newFunction = function () {
tooltip(whatU, isItInU, eventU, textStringU, attachFunctionU, numCheckU, renameBtnU, noHideU);
};
onShift = newFunction;
return;
}
if (event != "update" && event != "screenRead"){
var whatU = what, isItInU = isItIn, eventU = event, textStringU = textString, attachFunctionU = attachFunction, numCheckU = numCheck, renameBtnU = renameBtn, noHideU = noHide;
var newFunction = function () {
tooltip(whatU, isItInU, eventU, textStringU, attachFunctionU, numCheckU, renameBtnU, noHideU);
};
tooltipUpdateFunction = newFunction;
}
var tooltipText;
var costText = "";
var toTip;
var titleText;
var tip2 = false;
var noExtraCheck = false;
if (isItIn !== null && isItIn != "maps" && isItIn != "customText" && isItIn != "dailyStack" && isItIn != "advMaps" && isItIn != "Mutator"){
toTip = game[isItIn];
toTip = toTip[what];
if (typeof toTip === 'undefined') console.log(what);
else {
tooltipText = toTip.tooltip;
if (typeof tooltipText === 'function') tooltipText = tooltipText();
if (typeof toTip.cost !== 'undefined') costText = addTooltipPricing(toTip, what, isItIn);
else if (what == "Hub") costText = "Purchase a Hut, House, Mansion, Hotel, Resort, or Gateway"
}
}
if (isItIn == "advMaps"){
var advTips = {
Loot: "This slider allows you to fine tune the map Loot modifier. Moving this slider from left to right will guarantee more loot from the map, but increase the cost.",
Size: "This slider allows you to fine tune the map Size modifier. Moving this slider from left to right will guarantee a smaller map, but increase the cost.",
Difficulty: "This slider allows you to fine tune the map Difficulty modifier. Moving this slider from left to right will guarantee an easier map, but increase the cost.",
get Biome(){
var text = "<p>If you're looking to farm something specific, you can select the biome here. Anything other than random will increase the cost of the map.</p><ul>";
text += "<li><b>Mountain</b> - Contains a lot of Metal</li><li><b>Forest</b> - A great place to find some Wood</li><li><b>Sea</b> - Just filled with food to catch</li><li><b>Depths</b> - Ancient Gem mines</li>";
if (game.global.decayDone) text += "<li><b>Gardens</b> - 25% extra loot and a random assortment of resources</li>";
if (game.global.farmlandsUnlocked) text += "<li><b>Farmlands</b> - 100% extra loot in Universe 2, 50% extra Herbs. Mimics Mountains on Z6, Forest on Z7, Sea on Z8, Depths at Z9, Gardens at Z10. Continues on rotating every World Zone."
text += "</ul>";
return text;
},
get Special_Modifier() {
var text = "<p>Select a special modifier to add to your map from the drop-down below! You can only add one of these to each map. The following bonuses are currently available:</p><ul>"
for (var item in mapSpecialModifierConfig){
var bonusItem = mapSpecialModifierConfig[item];
var unlocksAt = (game.global.universe == 2) ? bonusItem.unlocksAt2 : bonusItem.unlocksAt;
if ((typeof unlocksAt === 'function' && !unlocksAt()) || unlocksAt == -1){
continue;
}
else if (getHighestLevelCleared() + 1 < unlocksAt){
text += "<li><b>Next modifier unlocks at Z" + unlocksAt + "</b></li>";
break;
}
text += "<li><b>" + bonusItem.name + " (" + bonusItem.abv + ")</b> - " + bonusItem.description + "</li>";
}
return text;
},
Show_Hide_Map_Config: "Click this to collapse/expand the map configuration options.",
Save_Map_Settings: "Click this to save your current map configuration settings to your currently selected preset. These settings will load by default every time you come in to the map chamber or select this preset.",
Reset_Map_Settings: "Click this to reset all settings to their default positions. This will not clear your saved setting, which will still be loaded next time you enter the map chamber.",
Extra_Zones: "<p>Create a map up to 10 Zones higher than your current Zone number. This map will gain +10% loot per extra level (compounding), and can drop Prestige upgrades higher than you could get from a world level map.</p><p>A green background indicates that you could afford a map at this Extra Zone amount with your selected Special Modifier and Perfect Sliders. A gold background indicates that you could afford that map with your selected Special Modifier and some combination of non-perfect sliders.</p><p>You can only use this setting when creating a max level map.</p>",
Perfect_Sliders: "<p>This option takes all of the RNG out of map generation! If sliders are maxxed and the box is checked, you have a 100% chance to get a perfect roll on Loot, Size, and Difficulty.</p><p>You can only choose this setting if the sliders for Loot, Size, and Difficulty are at the max.</p>",
Map_Preset: "You can save up to 5 different map configurations to switch between at will. The most recently selected setting will load each time you enter your map chamber."
}
if (what == "Special Modifier" && game.global.highestLevelCleared >= 149) {
swapClass("tooltipExtra", "tooltipExtraLg", elem);
renameBtn = "forceLeft";
}
noExtraCheck = true;
tooltipText = advTips[what.replace(/ /g, '_').replace(/\//g, '_')];
}
if (isItIn == "dailyStack"){
tooltipText = dailyModifiers[what].stackDesc(game.global.dailyChallenge[what].strength, game.global.dailyChallenge[what].stacks);
costText = "";
what = what[0].toUpperCase() + what.substr(1)
}
if (what == "Confirm Purchase"){
if (attachFunction == "purchaseImport()" && !boneTemp.selectedImport) return;
if (game.options.menu.boneAlerts.enabled == 0 && numCheck){
eval(attachFunction);
return;
}
var btnText = "Make Purchase";
if (numCheck && game.global.b < numCheck){
if (typeof kongregate === 'undefined') return;
tooltipText = "You can't afford this bonus. Would you like to visit the shop?";
attachFunction = "showPurchaseBones()";
btnText = "Visit Shop";
}
else
tooltipText = textString;
costText += '<div class="maxCenter"><div id="confirmTooltipBtn" class="btn btn-info" onclick="' + attachFunction + '; cancelTooltip()">' + btnText + '</div><div class="btn btn-info" onclick="cancelTooltip()">Cancel</div></div>';
game.global.lockTooltip = true;
elem.style.left = "33.75%";
elem.style.top = "25%";
}
if (what == "Trimps Info"){
var kongMode = (document.getElementById('boneBtn') !== null);
var text = '<div class="trimpsInfoPopup">Need help, found a bug or just want to talk about Trimps? Check out the <a href="https://www.reddit.com/r/trimps" target="_blank">/r/Trimps SubReddit</a>';
if (kongMode) text += ' or the <a href="https://www.kongregate.com/forums/11405-trimps" target="_blank">Kongregate Forums</a>.<br/><br/>';
else text +=' or come hang out in the new <a href="https://discord.gg/kSpNHte" target="_blank">Trimps Official Discord</a>!<br/><br/>';
text += ' If you want to read about or discuss the finer details of Trimps mechanics, check out the <a href="https://trimps.wikia.com/wiki/Trimps_Wiki" target="_blank">community-created Trimps Wiki!</a><br/><br/>';
if (kongMode) text += ' If you need to contact the developer for any reason, <a target="_blank" href="https://www.kongregate.com/accounts/Greensatellite/private_messages?focus=true">send a private message to GreenSatellite</a> on Kongregate.';
else text += ' If you need to contact the developer for any reason, <a href="https://www.reddit.com/message/compose/?to=Greensatellite" target="_blank">click here to send a message on Reddit</a> or find Greensatellite in the Trimps Discord.<hr/><br/>';
if (!kongMode) text += "If you would like to make a donation to help support the development of Trimps, you can now do so with PayPal! If you want to contribute but can't afford a donation, you can still give back by joining the community and sharing your feedback or helping others. Thank you either way, you're awesome! <form id='donateForm' style='text-align: center' action='https://www.paypal.com/cgi-bin/webscr' method='post' target='_blank'><input type='hidden' name='cmd' value='_s-xclick'><input type='hidden' name='hosted_button_id' value='MGFEJS3VVJG6U'><input type='image' src='https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif' border='0' name='submit' alt='PayPal - The safer, easier way to pay online!'><img alt='' border='0' src='https://www.paypalobjects.com/en_US/i/scr/pixel.gif' width='1' height='1'></form>";
text += '</div>';
tooltipText = text;
costText = '<div class="btn btn-info" onclick="cancelTooltip()">Close</div>';
game.global.lockTooltip = true;
elem.style.left = "33.75%";
elem.style.top = "25%";
noExtraCheck = true;
}
if (what == "NW Trimps Info"){
what = "Trimps Info";
var text = '<div class="trimpsInfoPopup">Need help, found a bug or just want to talk about Trimps? Check out the <a class="nwWebLink" onclick="nwWebLink(\'https://www.reddit.com/r/trimps\')">/r/Trimps SubReddit</a>';
text +=' or come hang out in the <a class="nwWebLink" onclick="nwWebLink(\'https://discord.gg/Trimps\')">Trimps Official Discord</a>!<br/><br/>';
text += ' If you want to read about or discuss the finer details of Trimps mechanics, check out the <a class="nwWebLink" onclick="nwWebLink(\'https://trimps.wikia.com/wiki/Trimps_Wiki\')">community-created Trimps Wiki!</a><br/><br/>';
text += ' If you need to contact the developer for any reason, <a class="nwWebLink" onclick="nwWebLink(\'https://www.reddit.com/message/compose/?to=Greensatellite\')">click here to send a message on Reddit</a> or find Greensatellite#7771 in the Trimps Discord.';
text += '</div>';
tooltipText = text;
costText = '<div class="btn btn-info" onclick="cancelTooltip()">Close</div>';
game.global.lockTooltip = true;
elem.style.left = "33.75%";
elem.style.top = "25%";
noExtraCheck = true;
}
if (what == "Fluffy"){
if (event == 'update'){
//clicked
game.global.lockTooltip = true;
elem.style.top = "25%";
elem.style.left = "25%";
swapClass('tooltipExtra', 'tooltipExtraLg', elem);
var fluffyTip = Fluffy.tooltip(true);
tooltipText = "<div id='fluffyTooltipTopContainer'>" + fluffyTip[0] + "</div>";
tooltipText += "<div id='fluffyLevelBreakdownContainer' class='niceScroll'>" + fluffyTip[1] + "</div>";
costText = '<div class="btn btn-danger btn-lg" onclick="cancelTooltip()">Close</div>';
if (game.challenges.Nurture.boostsActive()){
costText += "<span id='toggleCruffyTipBtn' class='btn btn-lg btn-primary' onclick='Fluffy.toggleCruffys()'>Show ";
costText += (Fluffy.cruffysTipActive()) ? "Scruffy" : "Cruffys";
costText += " Info</span>"
}
costText += "<span onclick='Fluffy.pat()' id='fluffyPatBtn' style='display: " + ((Fluffy.cruffysTipActive()) ? "none" : "inline-block") + "' class='btn btn-lg btn-warning'>Pat</span>";
openTooltip = "Fluffy";
setTimeout(Fluffy.refreshTooltip, 1000);
ondisplay = function(){
verticalCenterTooltip(false, true);
};
}
else {
//mouseover
tooltipText = Fluffy.tooltip();
costText = "Click for more detailed info"
}
if (Fluffy.cruffysTipActive()) what = "<b>IT'S CRUFFYS</b>";
else what = Fluffy.getName();
}
if (what == "Scryer Formation"){
tooltipText = "<p>Trimps lose half of their attack, health and block but gain 2x resources from loot (not including Helium) and have a chance to find Dark Essence above Z180 in the world. This formation must be active for the entire fight to receive any bonus from enemies, and must be active for the entire map to earn a bonus from a Cache.</p>";
tooltipText += getExtraScryerText(4);
tooltipText += "<br/>(Hotkeys: S or 5)";
costText = "";
}
if (what == "First Amalgamator"){
tooltipText = "<p><b>You found your first Amalgamator! You can view this tooltip again and track how many Amalgamators you currently have under 'Jobs'.</b></p>";
tooltipText += game.jobs.Amalgamator.tooltip;
costText = "<div class='maxCenter'><div class='btn btn-info' id='confirmTooltipBtn' onclick='cancelTooltip()'>Thanks for the help, tooltip, but you can go now.</div></div>";
game.global.lockTooltip = true;
elem.style.left = "33.75%";
elem.style.top = "25%";
noExtraCheck = true;
ondisplay = function () { verticalCenterTooltip() };
}
if (what == "Empowerments of Nature"){
var active = getEmpowerment();
if (!active) return;
var emp = game.empowerments[active];
if (typeof emp.description === 'undefined') return;
var lvlsLeft = ((5 - ((game.global.world - 1) % 5)) + (game.global.world - 1)) + 1;
tooltipText = "<p>The " + active + " Empowerment is currently active!</p><p>" + emp.description() + "</p><p>This Empowerment will end on Z" + lvlsLeft;
if (game.global.challengeActive !== "Eradicated"){
tooltipText += ", at which point you'll be able to fight a " + getEmpowerment(null, true) + " enemy to earn";
var tokCount = rewardToken(emp, true, lvlsLeft);
tooltipText += " " + prettify(tokCount) + " Token" + needAnS(tokCount) + " of " + active + ".</p>";
}
else tooltipText += ".</p>";
costText = "";
}
if (what == "Helium Per Hour"){
var name = heliumOrRadon();
what = name + " Per Hour";
tooltipText = "The displayed value for " + name + " Per Hour is simply a calculation of how much " + name + " you've earned so far this run, divided by the amount of hours you've spent so far on this run.<br/><br/>This value is <b>not</b> production like the other resources. " + name + " is always earned from killing strong Bad Guys and never produced automatically.";
costText = "";
}
if (what == "Finish Daily"){
var reward = game.challenges.Daily.getCurrentReward();
tooltipText = "Clicking <b>Finish</b> below will end your daily challenge and you will be unable to attempt it again. You will earn <b>" + prettify(reward) + " extra " + heliumOrRadon() + "!</b>";
costText = '<div class="maxCenter"><div id="confirmTooltipBtn" class="btn btn-info" onclick="abandonChallenge(); cancelTooltip()">Finish</div><div class="btn btn-danger" onclick="cancelTooltip()">Cancel</div></div>';
game.global.lockTooltip = true;
elem.style.left = "33.75%";
elem.style.top = "25%";
}
if (what == "Switch Daily"){
var daysUntilReset = Math.floor(7 + textString);
tooltipText = "Click to view " + ((textString == 0) ? "today" : dayOfWeek(getDailyTimeString(textString, false, true))) + "s challenge, which resets in less than " + daysUntilReset + " day" + ((daysUntilReset == 1) ? "" : "s") + ".";
costText = "";
}
if (what == "Decay"){
var challenge = game.challenges.Decay;
if (game.global.challengeActive == "Melt"){
challenge = game.challenges.Melt;
what = "Melt";
}
var decayedAmt = ((1 - Math.pow(challenge.decayValue, challenge.stacks)) * 100).toFixed(2);
tooltipText = "Things are quickly becoming tougher. Gathering, looting, and Trimp attack are reduced by " + decayedAmt + "%.";
costText = "";
}
if (what == "Heirloom"){
//attachFunction == location, numCheck == index
tooltipUpdateFunction = "";
tooltipText = displaySelectedHeirloom(false, 0, true, numCheck, attachFunction);
costText = "";
renameBtn = what;
what = "";
if (getSelectedHeirloom(numCheck, attachFunction).rarity == 8){
ondisplay = function() {
document.getElementById('tooltipHeirloomIcon').style.animationDelay = "-" + ((new Date().getTime() / 1000) % 30).toFixed(1) + "s";
}
}
swapClass("tooltipExtra", "tooltipExtraHeirloom", elem);
noExtraCheck = true;
}
if (what == "Bone Shrine"){
tooltipText = game.permaBoneBonuses.boosts.btnTooltip();
costText = "";
tooltipUpdateFunction = "";
}
if (what == "Respec"){
tooltipText = "You can respec your perks once per portal. Clicking cancel after clicking this button will not consume your respec.";
costText = "";
}
if (what == "Respec Mutators"){
tooltipText = "You can only respec your Mutators when you are activating your Portal. Make sure your Mutator setup will work for your entire run!";
costText = "";
}
if (what == "Well Fed"){
var tBonus = 50;
if (game.talents.turkimp2.purchased) tBonus = 100;
else if (game.talents.turkimp2.purchased) tBonus = 75;
tooltipText = "That Turkimp was delicious, and you have leftovers. If you set yourself to gather Food, Wood, or Metal while this buff is active, you can share with your workers to increase their gather speed by " + tBonus + "%";
costText = "";
}
if (what == "Geneticistassist"){
tooltipText = "I'm your Geneticistassist! I'll hire and fire Geneticists until your total breed time is as close as possible to the target time you choose. I will fire a Farmer, Lumberjack, or Miner at random if there aren't enough workspaces, I will never spend more than 1% of your food on a Geneticist, and you can customize my target time options in Settings <b>or by holding Ctrl and clicking me</b>. I have uploaded myself to your portal and will never leave you.";
costText = "";
}
if (what == "Welcome"){
tooltipText = "Welcome to Trimps! This game saves using Local Storage in your browser. Clearing your cookies or browser settings will cause your save to disappear! Please make sure you regularly back up your save file by either using the 'Export' button in the bar below or the 'Online Saving' option under 'Settings'.<br/><br/><b>Chrome and Firefox are currently the only fully supported browsers.</b><br/><br/>";
if (document.getElementById('boneBtn') !== null){
tooltipText += "<b style='color: red'>Notice: Did you expect to see your save here?</b><br/>If this is your first time playing since November 13th 2017, check <a target='_blank' href='http://trimps.github.io'>http://trimps.github.io</a> (make sure you go to http, not https), and see if it's there. For more information, see <a target='_blank' href='http://www.kongregate.com/forums/11406-general-discussion/topics/941201-if-your-save-is-missing-after-november-13th-click-here?page=1#posts-11719541'>This Forum Thread</a>.<br/><br/>";
}
tooltipText += "<b>Would you like to enable online saving before you start?</b>";
game.global.lockTooltip = true;
costText = "<div class='maxCenter'><div class='btn btn-info' id='confirmTooltipBtn' onclick='cancelTooltip(); toggleSetting(\"usePlayFab\");'>Enable Online Saving</div><div class='btn btn-danger' onclick='cancelTooltip()'>Don't Enable</div></div>";
elem.style.left = "33.75%";
elem.style.top = "25%";
}
if (what == "Trustworthy Trimps"){
if (usingScreenReader){
setTimeout(function(){document.getElementById('screenReaderTooltip').innerHTML = textString;}, 2000);
return;
}
tooltipText = textString;
game.global.lockTooltip = true;
costText = "<div class='maxCenter'><div class='btn btn-info' id='confirmTooltipBtn' onclick='cancelTooltip()'>Sweet, thanks.</div></div>";
elem.style.left = "33.75%";
elem.style.top = "25%";
}
if (what == "Unequip Heirloom"){
game.global.lockTooltip = true;
elem.style.left = "33.75%";
elem.style.top = "25%";
costText = "<div class='maxCenter'>";
tooltipText = "<p>You have no more room to carry another Heirloom, ";
if (game.global.maxCarriedHeirlooms > game.heirlooms.values.length){
tooltipText += "and you've already purchased the maximum amount of slots.</p><p>Would you like to leave this Heirloom equipped "
}
else if (game.global.nullifium < getNextCarriedCost()){
tooltipText += "and don't have enough Nullifium to purchase another Carried slot.</p><p>Would you like to leave this Heirloom equipped "
}
else {
tooltipText += "but you do have enough Nullifium to purchase another Carried slot!</p><p>Would you like to purchase another Carried slot, leave this Heirloom equipped, ";
costText += "<div class='btn btn-success' onclick='cancelTooltip(); addCarried(true); unequipHeirloom();'>Buy a Slot (" + getNextCarriedCost() + " Nu)</div>";
}
tooltipText += "or put it in Temporary Storage? <b>If you use your Portal while this Heirloom is in Temporary Storage, it will be recycled!</b></p>";
costText += "<div class='btn btn-info' id='confirmTooltipBtn' onclick='cancelTooltip()'>Leave it equipped</div><div class='btn btn-danger' onclick='cancelTooltip(); unequipHeirloom(null, \"heirloomsExtra\");'>Place in Temporary</div></div>";
}
if (what == "Configure AutoStructure"){
tooltipText = "<p>Here you can choose which structures will be automatically purchased when AutoStructure is toggled on. Check a box to enable the automatic purchasing of that structure, set the dropdown to specify the cost-to-resource % that the structure should be purchased below, and set the 'Up To:' box to the maximum number of that structure you'd like purchased <b>(0 for no limit)</b>. For example, setting the dropdown to 10% and the 'Up To:' box to 50 for 'House' will cause a House to be automatically purchased whenever the costs of the next house are less than 10% of your Food, Metal, and Wood, as long as you have less than 50 houses. \'W\' for Gigastation is the required minimum amount of Warpstations before a Gigastation is purchased.</p><table id='autoPurchaseConfigTable'><tbody><tr>";
var count = 0;
var setting, selectedPerc, checkbox, options;
var settingGroup = getAutoStructureSetting();
for (var item in game.buildings){
var building = game.buildings[item];
if (building.blockU2 && game.global.universe == 2) continue;
if (building.blockU1 && game.global.universe == 1) continue;
if (item == "Laboratory" && game.global.challengeActive != "Nurture") continue;
if (!building.AP) continue;
if (count != 0 && count % 2 == 0) tooltipText += "</tr><tr>";
setting = settingGroup[item];
selectedPerc = (setting) ? setting.value : 0.1;
checkbox = buildNiceCheckbox('structConfig' + item, 'autoCheckbox', (setting && setting.enabled));
options = "<option value='0.1'" + ((selectedPerc == 0.1) ? " selected" : "") + ">0.1%</option><option value='1'" + ((selectedPerc == 1) ? " selected" : "") + ">1%</option><option value='5'" + ((selectedPerc == 5) ? " selected" : "") + ">5%</option><option value='10'" + ((selectedPerc == 10) ? " selected" : "") + ">10%</option><option value='25'" + ((selectedPerc == 25) ? " selected" : "") + ">25%</option><option value='50'" + ((selectedPerc == 50) ? " selected" : "") + ">50%</option><option value='99'" + ((selectedPerc == 99) ? " selected" : "") + ">99%</option>";
var id = "structSelect" + item;
tooltipText += "<td><div class='row'><div class='col-xs-5' style='padding-right: 5px'>" + checkbox + " <span>" + item + "</span></div><div style='text-align: center; padding-left: 0px;' class='col-xs-2'><select class='structSelect' id='" + id + "'>" + options + "</select></div><div class='col-xs-5 lowPad' style='text-align: right'>Up To: <input class='structConfigQuantity' id='structQuant" + item + "' type='number' value='" + ((setting && setting.buyMax) ? setting.buyMax : 0 ) + "'/></div></div></td>";
count++;
}
tooltipText += "</tr><tr>";
if (game.global.universe == 1){
tooltipText += "<tr>";
//stupid gigas making this all spaghetti
setting = settingGroup.Gigastation;
selectedPerc = (setting) ? setting.value : 0.1;
checkbox = buildNiceCheckbox('structConfigGigastation', 'autoCheckbox', (setting && setting.enabled));
options = "<option value='0.1'" + ((selectedPerc == 0.1) ? " selected" : "") + ">0.1%</option><option value='1'" + ((selectedPerc == 1) ? " selected" : "") + ">1%</option><option value='5'" + ((selectedPerc == 5) ? " selected" : "") + ">5%</option><option value='10'" + ((selectedPerc == 10) ? " selected" : "") + ">10%</option><option value='25'" + ((selectedPerc == 25) ? " selected" : "") + ">25%</option><option value='50'" + ((selectedPerc == 50) ? " selected" : "") + ">50%</option><option value='99'" + ((selectedPerc == 99) ? " selected" : "") + ">99%</option>";
tooltipText += "<td><div class='row'><div class='col-xs-5' style='padding-right: 5px'>" + checkbox + " <span>Gigastation</span></div><div style='text-align: center; padding-left: 0px;' class='col-xs-2'><select class='structSelect' id='structSelectGigastation'>" + options + "</select></div><div class='col-xs-5 lowPad' style='text-align: right'>At W: <input class='structConfigQuantity' id='structQuantGigastation' type='number' value='" + ((setting && setting.buyMax) ? setting.buyMax : 0 ) + "'/></div></div></td>";
if (getHighestLevelCleared() >= 229){
var nurserySetting = (typeof settingGroup.NurseryZones !== 'undefined') ? settingGroup.NurseryZones : 1;
tooltipText += "<td><div class='row'><div class='col-xs-12' style='text-align: right; padding-right: 5px;'>Don't buy Nurseries Until Z: <input style='width: 20.8%; margin-right: 4%;' class='structConfigQuantity' id='structZoneNursery' type='number' value='" + nurserySetting + "'></div></div></td>";
}
tooltipText += "</tr>";
}
options = "<option value='0'>Apply Percent to All</option><option value='0.1'>0.1%</option><option value='1'>1%</option><option value='5'>5%</option><option value='10'>10%</option><option value='25'>25%</option><option value='50'>50%</option><option value='99'>99%</option>";
tooltipText += "<tr style='text-align: center'>";
tooltipText += "<td><span data-nexton='true' onclick='toggleAllAutoStructures(this)' class='btn colorPrimary btn-md toggleAllBtn'>Toggle All Structures On</span></td>";
tooltipText += "<td><select class='toggleAllBtn' id='autoStructureAllPctSelect' onchange='setAllAutoStructurePercent(this)'>" + options + "</select></td>";
tooltipText += "</tr></tbody></table>";
costText = "<div class='maxCenter'><div id='confirmTooltipBtn' class='btn btn-info btn-lg' onclick='saveAutoStructureConfig()'>Apply</div><div class='btn-lg btn btn-danger' onclick='cancelTooltip()'>Cancel</div></div>";
game.global.lockTooltip = true;
ondisplay = function(){
verticalCenterTooltip(false, true);
};
}
if (what == "AutoStructure"){
tooltipText = "<p>Your mastery of this world has enabled your Foremen to handle fairly complicated orders regarding which buildings should be built. Click the cog icon on the right side of this button to tell your Foremen what you want and when you want it, then click the left side of the button to tell them to start or stop.</p>";
costText = "";
}
if (what == "Configure AutoEquip"){
tooltipText = "<p>Welcome to AutoEquip! <span id='autoTooltipHelpBtn' style='font-size: 0.6vw;' class='btn btn-md btn-info' onclick='toggleAutoTooltipHelp()'>Help</span></p><div id='autoTooltipHelpDiv' style='display: none'><p>Here you can choose which equipment will be automatically purchased when AutoEquip is toggled on. Check a box to enable the automatic purchasing of that equipment type, set the dropdown to specify the cost-to-resource % that the equipment should be purchased below, and set the 'Up To:' box to the maximum number of that equipment you'd like purchased (0 for no limit).</p><p>For example, setting the dropdown to 10% and the 'Up To:' box to 50 for 'Shield' will cause a Shield to be automatically purchased whenever the cost of the next Shield is less than 10% of your Wood, as long as you have less than 50 Shields.</p></div>";
tooltipText += "<table id='autoPurchaseConfigTable'><tbody><tr>";
var count = 0;
var setting, selectedPerc, checkbox, options, type;
var settingGroup = getAutoEquipSetting();
for (var item in game.equipment){
var equipment = game.equipment[item];
if (count != 0 && count % 2 == 0) tooltipText += "</tr><tr>";
setting = settingGroup[item];
selectedPerc = (setting) ? setting.value : 0.1;
type = ((equipment.health) ? "Armor" : "Wep");
checkbox = buildNiceCheckbox('equipConfig' + item, 'autoCheckbox checkbox' + type, (setting && setting.enabled));
options = "<option value='0.1'" + ((selectedPerc == 0.1) ? " selected" : "") + ">0.1%</option><option value='1'" + ((selectedPerc == 1) ? " selected" : "") + ">1%</option><option value='5'" + ((selectedPerc == 5) ? " selected" : "") + ">5%</option><option value='10'" + ((selectedPerc == 10) ? " selected" : "") + ">10%</option><option value='25'" + ((selectedPerc == 25) ? " selected" : "") + ">25%</option><option value='50'" + ((selectedPerc == 50) ? " selected" : "") + ">50%</option><option value='99'" + ((selectedPerc == 99) ? " selected" : "") + ">99%</option>";
tooltipText += "<td><div class='row'><div class='col-xs-6' style='padding-right: 5px'>" + checkbox + " <span>" + item + "</span></div><div style='text-align: center; padding-left: 0px;' class='col-xs-2'><select class='equipSelect" + type + "' id='equipSelect" + item + "'>" + options + "</select></div><div class='col-xs-4 lowPad' style='text-align: right'>Up To: <input class='equipConfigQuantity' id='equipQuant" + item + "' type='number' value='" + ((setting && setting.buyMax) ? setting.buyMax : 0 ) + "'/></div></div></td>";
count++;
}
tooltipText += "</tr><tr><td></td></tr></tbody></table>";
options = "<option value='0'>Apply Percent to All</option><option value='0.1'>0.1%</option><option value='1'>1%</option><option value='5'>5%</option><option value='10'>10%</option><option value='25'>25%</option><option value='50'>50%</option><option value='99'>99%</option>";
tooltipText += "<table id='autoEquipMiscTable'><tbody><tr>";
tooltipText += "<td><span data-nexton='true' onclick='uncheckAutoEquip(\"Armor\", this)' class='toggleAllBtn btn colorPrimary btn-md'>Toggle All Armor On</span></td>";
tooltipText += "<td><select class='toggleAllBtn' onchange='setAllAutoEquipPercent(\"Armor\", this)'>" + options + "</select></td>";
var highestTierOn = (settingGroup.highestTier === true);
tooltipText += "<td><span data-on='" + (highestTierOn) + "' onclick='toggleAutoEquipHighestTier(this)' id='highestTierOnlyBtn' class='toggleAllBtn btn color" + ((highestTierOn) ? "Success" : "Danger") + " btn-md'>Only Buy From Highest Tier" + ((highestTierOn) ? " On" : " Off") + "</span></td>";
tooltipText += "<td><span data-nexton='true' onclick='uncheckAutoEquip(\"Wep\", this)' class='toggleAllBtn btn colorPrimary btn-md'>Toggle All Weapons On</span></td>";
tooltipText += "<td><select class='toggleAllBtn' onchange='setAllAutoEquipPercent(\"Wep\", this)'>" + options + "</select></td>";
tooltipText += "</tr></tbody></table>";
costText = "<div class='maxCenter'><div id='confirmTooltipBtn' class='btn btn-lg btn-info' onclick='saveAutoEquipConfig()'>Apply</div><div class='btn btn-lg btn-danger' onclick='cancelTooltip()'>Cancel</div></div>";
game.global.lockTooltip = true;
elem.style.left = "25%";
elem.style.top = "25%";
ondisplay = function(){
verticalCenterTooltip(false, true);
};
}
if (what == "AutoEquip"){
tooltipText = "<p>The Auspicious Presence has blessed your Trimps with the ability to automatically upgrade their own equipment! Click the cog icon on the right side of this button to tell your Trimps what they should upgrade and when to do it, then click the left side of the button to tell them to start or stop.</p>";
costText = "";
}
if (what == "Configure Generator State"){
geneMenuOpen = true;
elem = document.getElementById('tooltipDiv2');
tip2 = true;
elem.style.left = "33.75%";
elem.style.top = "25%";
tooltipText = "<div style='padding: 1.5vw;'><div style='color: red; font-size: 1.1em; text-align: center;' id='genStateConfigError'></div>"
tooltipText += "<div id='genStateConfigTooltip'>" + getGenStateConfigTooltip() + "</div>";
costText = "<div class='maxCenter'><div id='confirmTooltipBtn' class='btn-lg btn btn-info' onclick='saveGenStateConfig()'>Apply</div><div class='btn btn-lg btn-danger' onclick='cancelTooltip()'>Cancel</div></div>";
}
if (what == "Rename SA Preset"){
what += " " + textString;
elem.style.left = "33.75%";
elem.style.top = "25%";
tooltipText = autoBattle.renamePresetTooltip(textString);
costText = "<div class='maxCenter'><div id='confirmTooltipBtn' onclick='autoBattle.savePresetName(" + textString + ")' class='btn-lg btn autoItemEquipped'>Save</div><div class='btn btn-lg autoItemHide' onclick='autoBattle.popup(false,false,false,true);'>Cancel</div>";
}
if (what == "Configure AutoJobs"){
tooltipText = "<div style='color: red; font-size: 1.1em; text-align: center;' id='autoJobsError'></div><p>Welcome to AutoJobs! <span id='autoTooltipHelpBtn' role='button' style='font-size: 0.6vw;' class='btn btn-md btn-info' onclick='toggleAutoTooltipHelp()'>Help</span></p><div id='autoTooltipHelpDiv' style='display: none'><p>The left side of this window is dedicated to jobs that are limited more by workspaces than resources. 1:1:1:1 will purchase all 4 of these ratio-based jobs evenly, and the ratio refers to the amount of workspaces you wish to dedicate to each job. You can use any number larger than 0. Ratio-based jobs will be purchased once at the end of every Zone AND once every 30 seconds, but not more often than once every 2 seconds.</p><p>The right side of this window is dedicated to jobs limited more by resources than workspaces. Set the dropdown to the percentage of resources that you'd like to be spent on each job, and add a max amount if you wish (0 for unlimited). Percentage-based jobs are purchased once every 2 seconds.</p></div><table id='autoStructureConfigTable' style='font-size: 1.1vw;'><tbody>";
var percentJobs = ["Explorer"];
if (game.global.universe == 1){
if (game.global.highestLevelCleared >= 229) percentJobs.push("Magmamancer");
percentJobs.push("Trainer");
}
if (game.global.universe == 2 && game.global.highestRadonLevelCleared > 29) percentJobs.push("Meteorologist");
if (game.global.universe == 2 && game.global.highestRadonLevelCleared > 49) percentJobs.push("Worshipper");
var ratioJobs = ["Farmer", "Lumberjack", "Miner", "Scientist"];
var count = 0;
var sciMax = 1;
var settingGroup = getAutoJobsSetting();
for (var x = 0; x < ratioJobs.length; x++){
tooltipText += "<tr>";
var item = ratioJobs[x];
var setting = settingGroup[item];
var selectedPerc = (setting) ? setting.value : 0.1;
var max;
var checkbox = buildNiceCheckbox('autoJobCheckbox' + item, 'autoCheckbox', (setting && setting.enabled));
tooltipText += "<td style='width: 40%'><div class='row'><div class='col-xs-6' style='padding-right: 5px'>" + checkbox + " <span>" + item + "</span></div><div class='col-xs-6 lowPad' style='text-align: right'>Ratio: <input class='jobConfigQuantity' id='autoJobQuant" + item + "' type='number' value='" + ((setting && setting.ratio) ? setting.ratio : 1 ) + "'/></div></div>"
if (ratioJobs[x] == "Scientist"){
max = ((setting && setting.buyMax) ? setting.buyMax : 0 );
if (max > 1e4) max = max.toExponential().replace('+', '');
sciMax = max;
if (percentJobs.length < 4) tooltipText += "</td><td style='width: 60%'><div class='row' style='width: 50%; border: 0; text-align: left;'><span style='padding-left: 0.4vw'> </span>Up To: <input class='jobConfigQuantity' id='autoJobQuant" + item + "' value='" + prettify(max) + "'/></div></td>"
}
else tooltipText += "</td>";
if (percentJobs.length > x){
item = percentJobs[x];
setting = settingGroup[item];
selectedPerc = (setting) ? setting.value : 0.1;
max = ((setting && setting.buyMax) ? setting.buyMax : 0 );
if (max > 1e4) max = max.toExponential().replace('+', '');
checkbox = buildNiceCheckbox('autoJobCheckbox' + item, 'autoCheckbox', (setting && setting.enabled));
var options = "<option value='0.1'" + ((selectedPerc == 0.001) ? " selected" : "") + ">0.1%</option><option value='1'" + ((selectedPerc == .01) ? " selected" : "") + ">1%</option><option value='5'" + ((selectedPerc == .05) ? " selected" : "") + ">5%</option><option value='10'" + ((selectedPerc == .10) ? " selected" : "") + ">10%</option><option value='25'" + ((selectedPerc == .25) ? " selected" : "") + ">25%</option><option value='50'" + ((selectedPerc == .50) ? " selected" : "") + ">50%</option><option value='99'" + ((selectedPerc == .99) ? " selected" : "") + ">99%</option>";
tooltipText += "<td style='width: 60%'><div class='row'><div class='col-xs-5' style='padding-right: 5px'>" + checkbox + " <span>" + item + "</span></div><div style='text-align: center; padding-left: 0px;' class='col-xs-2'><select id='autoJobSelect" + item + "'>" + options + "</select></div><div class='col-xs-5 lowPad' style='text-align: right'>Up To: <input class='jobConfigQuantity' id='autoJobQuant" + item + "' value='" + prettify(max) + "'/></div></div></td></tr>";
}
}
if (percentJobs.length >= 4) tooltipText += "<tr><td style='width: 40%'><div class='row'><div class='col-xs-6' style='padding-right: 5px'> </div><div class='col-xs-6 lowPad' style='text-align: right'>Up To: <input class='jobConfigQuantity' id='autoJobQuantScientist2' value='" + prettify(sciMax) + "'></div></div></td><td style='width: 60%'> </td></tr>";
tooltipText += "<tr><td style='width: 40%'><div class='col-xs-7' style='padding-right: 5px'>Gather on Portal:</div><div class='col-xs-5 lowPad' style='text-align: right'><select style='width: 100%' id='autoJobSelfGather'><option value='0'>Nothing</option>";
var values = ['Food', 'Wood', 'Metal', 'Science'];
for (var x = 0; x < values.length; x++){
tooltipText += "<option" + ((settingGroup.portalGather && settingGroup.portalGather == values[x].toLowerCase()) ? " selected='selected'" : "") + " value='" + values[x].toLowerCase() + "'>" + values[x] + "</option>";
}
tooltipText += "</select></div></td></tr>";
tooltipText += "</tbody></table>";
costText = "<div class='maxCenter'><div id='confirmTooltipBtn' class='btn-lg btn btn-info' onclick='saveAutoJobsConfig()'>Apply</div><div class='btn btn-lg btn-danger' onclick='cancelTooltip()'>Cancel</div></div>";
game.global.lockTooltip = true;
elem.style.left = "33.75%";
elem.style.top = "25%";
ondisplay = function(){
verticalCenterTooltip(true);
};
}
if (what == "Archaeology Automator" && !isItIn){
tooltipText = game.challenges.Archaeology.automatorTooltip();
costText = "<div class='maxCenter'><div id='confirmTooltipBtn' class='btn-lg btn btn-info' onclick='game.challenges.Archaeology.saveAutomator()'>Apply</div><div class='btn btn-lg btn-danger' onclick='cancelTooltip()'>Cancel</div><div class='btn btn-lg btn-" + ((game.challenges.Archaeology.pauseAuto) ? 'primary' : 'warning') + "' onclick='game.challenges.Archaeology.pauseAuto = !game.challenges.Archaeology.pauseAuto; this.className = \"btn btn-lg btn-\" + ((game.challenges.Archaeology.pauseAuto) ? \"primary\" : \"warning\"); this.innerHTML = ((game.challenges.Archaeology.pauseAuto) ? \"Unpause Automator\" : \"Pause Automator\");'>" + ((game.challenges.Archaeology.pauseAuto) ? "Unpause" : "Pause") + " Automator</div></div>";
game.global.lockTooltip = true;
elem.style.left = "33.75%";
elem.style.top = "25%";
ondisplay = function(){
verticalCenterTooltip(true);
};
}
if (what == "AutoJobs"){
tooltipText = "<p>Your continued mastery of this world has enabled you to set rules for automatic job allocation. Click the cog icon on the right side of this button to tell your Human Resourceimps what you want and when you want it, then click the left side of the button to tell them to start or stop.</p>";
costText = "";
}
if (what == "AutoGold"){
var heName = heliumOrRadon();
var voidHeName = (game.global.universe == 2) ? "Voidon" : "Voidlium";
tooltipText = '<p>Thanks to your brilliant Scientists, you can designate Golden Upgrades to be purchased automatically! Toggle between: </p><p><b>AutoGold Off</b> when you\'re not feeling particularly trusting.</p><p><b>AutoGold ' + heName + ' (' + game.goldenUpgrades.Helium.purchasedAt.length + '/' + Math.round(game.goldenUpgrades.Helium.currentBonus * 100) + '%)</b> when you\'re looking to boost your Perk game. 4/5 Trimps agree that this will increase your overall ' + heliumOrRadon() + ' earned, though none of the 5 really understood the question.</p><p><b>AutoGold Battle (' + game.goldenUpgrades.Battle.purchasedAt.length + '/' + Math.round(game.goldenUpgrades.Battle.currentBonus * 100) + '%)</b> if your Trimps have a tendency to slack off when you turn your back.</p>';
tooltipText += '<p><b>AutoGold Void (' + game.goldenUpgrades.Void.purchasedAt.length + '/' + Math.round(game.goldenUpgrades.Void.currentBonus * 100) + '%)</b> which comes in 2 different flavors';
if (getTotalPortals() == 0) tooltipText += ", but you can't find Void Maps until you've found the Portal Device at least once, so you can't use them.</p>";
else tooltipText += ':<br/><b>' + voidHeName + '</b> - Will entrust your Scientists with purchasing as many Golden Voids as possible (to reach 72%) before switching to Golden ' + heName + ', or...<br/><b>Voidtle</b> - Where your Scientists will again attempt to buy as many Golden Voids as possible (to reach 72%), but will instead switch to Golden Battle afterwards.</p>';
if (game.global.canGuString) tooltipText += "<p><b>Custom AutoGold</b> - For the advanced Trimp commander/archaeologist who wants even more control. <b>Ctrl Click to customize your string</b></p>"
tooltipText += '<p>Please allow 4 seconds for Trimp retraining after clicking this button before any Golden Upgrades are automatically purchased, and don\'t forget to frequently thank your scientists! Seriously, they get moody.</p>';
costText = "";
}
if (what == "Unliving"){
var stacks = game.challenges.Life.stacks;
var mult = game.challenges.Life.getHealthMult(true);
if (stacks > 130) tooltipText = "Your Trimps are looking quite dead, which is very healthy in this dimension. You're doing a great job!";
else if (stacks > 75) tooltipText = "Your Trimps are starting to look more lively and slow down, but at least they're still fairly pale.";
else if (stacks > 30) tooltipText = "The Bad Guys in this dimension seem to be way more dead than your Trimps!";
else tooltipText = "Your Trimps look perfectly normal and healthy now, which is not what you want in this dimension.";
tooltipText += " <b>Trimp attack and health increased by " + mult + ".</b>";
costText = "";
}
if (what == "AutoGolden Unlocked"){
tooltipText = "<p>Your Trimps have extracted and processed many Golden Upgrades by now, and though you're still nervous to leave things completely to them, you figure they can probably handle doing this on their own as well. You find the nearest Trimp and ask if he could handle buying Golden Upgrades on his own, as long as you told him which ones to buy. You can tell by the puddle of drool rapidly gaining mass at his feet that this is going to take either magic or a lot of hard work.</p><p>You can't find any magic anywhere, so you decide to found Trimp University, a school dedicated to teaching Trimps how to extract the might of Golden Upgrades without any assistance. Weeks go by while you and your Trimps work tirelessly to set up the University, choosing only the finest building materials and hiring only the most renowned Foremen to draw the plans. Just as you're finishing up, a Scientist stops by, sees what you're doing, and offers to just handle the Golden Upgrades instead. Probably should have just asked one of them first.</p><p><b>You have unlocked AutoGolden!</b></p>";
costText = "<div class='maxCenter'><div id='confirmTooltipBtn' class='btn btn-info' onclick='cancelTooltip()'>Close</div></div>";
game.global.lockTooltip = true;
elem.style.left = "33.75%";
elem.style.top = "25%";
}
if (what == "Poisoned"){
tooltipText = "This enemy is harmed by the Empowerment of Poison, and is taking " + prettify(game.empowerments.Poison.getDamage()) + " extra damage per turn.";
costText = "";
}
if (what == "Chilled"){
tooltipText = "This enemy has been chilled by the Empowerment of Ice, is taking " + prettify(game.empowerments.Ice.getDamageModifier() * 100) + "% more damage, and is dealing " + prettify((1 - game.empowerments.Ice.getCombatModifier()) * 100) + "% less damage with each normal attack." + game.empowerments.Ice.overkillDesc();
costText = "";
}
if (what == "Breezy"){
var heliumText = (!game.global.mapsActive)? "increasing all Helium gained by " + prettify(game.empowerments.Wind.getCombatModifier(true) * 100) + "% and all other" : "increasing all non-Helium ";
tooltipText = "There is a rather large amount of Wind swelling around this enemy, " + heliumText + " resources by " + prettify(game.empowerments.Wind.getCombatModifier() * 100) + "%.";
costText = "";
}
if (what == "Perk Preset"){
if (textString == "Save"){
what = "Save Perk Preset";
tooltipText = "Click to save your current perk loadout to the selected preset";
}
else if (textString == "Rename"){
what = "Rename Perk Preset";
tooltipText = "Click to set a name for your currently selected perk preset";
}
else if (textString == "Load"){
what = "Load Perk Preset";
tooltipText = "Click to load your currently selected perk preset.";
if (!game.global.respecActive) tooltipText += " <p class='red'>You must have your Respec active to load a preset!</p>";
}
else if (textString == "Import"){
what = "Import Perk Preset";
tooltipText = "Click to import a perk setup from a text string";
}
else if (textString == "Export"){
what = "Export Perk Setup";
tooltipText = "Click to export a copy of your current perk setup to share with friends, or to save and import later!"
}
else if (textString > 0 && textString <= 3){
var presetGroup = (portalUniverse == 2) ? game.global.perkPresetU2 : game.global.perkPresetU1;
var preset = presetGroup["perkPreset" + textString];
if (typeof preset === 'undefined') return;
what = (preset.Name) ? "Preset: " + preset.Name : "Preset " + textString;
if (isObjectEmpty(preset)){
tooltipText = "<span class='red'>This Preset slot is empty!</span> Select this slot and then click 'Save' to save your current Perk configuration to this slot. You'll be able to load this configuration back whenever you want, as long as you have your Respec active.";
}
else{
tooltipText = "<p style='font-weight: bold'>This Preset holds:</p>";
var count = 0;
for (var item in preset){
if (item == "Name") continue;
tooltipText += (count > 0) ? ", " : "";
tooltipText += '<b>' + item.replace('_', ' ') + ":</b> " + preset[item];
count++;
}
}
}
}
if (what == "Rename Preset"){
what == "Rename Preset " + selectedPreset;
var presetGroup = (portalUniverse == 2) ? game.global.perkPresetU2 : game.global.perkPresetU1;
tooltipText = "Type a name below for your Perk Preset! This name will show up on the Preset bar and make it easy to identify which Preset is which."
if (textString) tooltipText += " <b>Max of 1,000 for most perks</b>";
var preset = presetGroup["perkPreset" + selectedPreset];
var oldName = (preset && preset.Name) ? preset.Name : "";
tooltipText += "<br/><br/><input id='renamePresetBox' maxlength='25' style='width: 50%' value='" + oldName + "' />";
costText = "<div class='maxCenter'><div id='confirmTooltipBtn' class='btn btn-info' onclick='renamePerkPreset()'>Apply</div><div class='btn btn-info' onclick='cancelTooltip()'>Cancel</div></div>";
game.global.lockTooltip = true;
elem.style.left = "33.75%";
elem.style.top = "25%";
ondisplay = function() {
var box = document.getElementById("renamePresetBox");
// Chrome chokes on setSelectionRange on a number box; fall back to select()
try { box.setSelectionRange(0, box.value.length); }
catch (e) { box.select(); }
box.focus();
};
noExtraCheck = true;
}
if (what == "UnlockedChallenge2"){
what = "Unlocked Challenge<sup>2</sup>";
tooltipText = "You hear some strange noises behind you and turn around to see three excited scientists. They inform you that they've figured out a way to modify The Portal to take you to a new type of challenging dimension, a system they proudly call 'Challenge<sup>2</sup>'. You will be able to activate and check out their new technology by clicking the 'Challenge<sup>2</sup>' button next time you go to use The Portal.";
game.global.lockTooltip = true;
costText = "<div class='maxCenter'><div class='btn btn-info' id='confirmTooltipBtn' onclick='cancelTooltip()'>Thanks, Scientists</div></div>";
elem.style.left = "33.75%";
elem.style.top = "25%";
}
if (what == "UnlockedChallenge3"){
what = "Unlocked Challenge<sup>3</sup>";
tooltipText = "You hear some strange noises behind you and turn around to see nine excited scientists. They inform you that they've figured out a way to modify The Portal to take you to a new type of challenging dimension, a system they proudly call 'Challenge<sup>3</sup>'. It seems as if the difference between Challenge<sup>2</sup> and Challenge<sup>3</sup> allows them to combine multiplicatively into your Challenge<sup><span class='icomoon icon-infinity'></span></sup> bonus.";
game.global.lockTooltip = true;
costText = "<div class='maxCenter'><div class='btn btn-info' id='confirmTooltipBtn' onclick='cancelTooltip()'>Thanks, Scientists</div></div>";
elem.style.left = "33.75%";
elem.style.top = "25%";
}
if (what == "Eggs"){
tooltipText = '<span class="eggMessage">It seems as if some sort of animal has placed a bunch of brightly colored eggs in the world. If you happen to see one, you can click on it to send a Trimp to pick it up! According to your scientists, they have a rare chance to contain some neat stuff, but they will not last forever...</span>';
game.global.lockTooltip = true;
costText = "<div class='maxCenter'><div class='btn btn-info' id='confirmTooltipBtn' onclick='cancelTooltip()'>I'll keep an eye out.</div></div>";
elem.style.left = "33.75%";
elem.style.top = "25%";
}
if (what == "Portal"){
tooltipText = "The portal device you found shines " + ((game.global.universe == 1) ? "green" : "blue") + " in the lab. Such a familiar shade... (Hotkey: T)";
costText = "";
}
if (what == "Repeat Map"){
tooltipText = "Allow the Trimps to find their way back to square 1 once they finish without your help. They grow up so fast. <br/><br/>If you are <b>not</b> repeating, your current group of Trimps will not be abandoned after the map ends. (Hotkey: R)";
costText = "";
}
if (what == "Challenge2"){
var sup = (portalUniverse == 1 || game.global.highestRadonLevelCleared < 49) ? "2" : "3";
what = "Challenge<sup>" + sup + "</sup>";
tooltipText = "";
var rewardEach = squaredConfig.rewardEach;
var rewardGrowth = squaredConfig.rewardGrowth;
var uniArray = countChallengeSquaredReward(false, false, true);
if (game.talents.mesmer.purchased){
rewardEach *= 3;
rewardGrowth *= 3;
}
if (portalUniverse == 2 && game.global.highestRadonLevelCleared < 49){
tooltipText = "<p><b style='color: #003b99'>Reach Zone 50 in Universe 2 to unlock Challenge<sup>3</sup>, which combine multiplicatively with your Challenge<sup>2</sup>. Just imagine the possibilities!</b></p>"
}
else{
if (!textString)
tooltipText = "<p>Click to toggle a challenge mode for your challenges!</p>";
tooltipText += "<p>In Challenge<sup>" + sup + "</sup> mode, you can re-run some challenges in order to earn a permanent attack, health, and " + heliumOrRadon() + " bonus for your Trimps. MOST Challenge<sup>" + sup + "</sup>s will grant <b>" + rewardEach + "% " + ((sup == 2) ? "attack and health and " + prettify(rewardEach / 10) + "% increased " + heliumOrRadon() : "Challenge<sup>" + sup + "</sup> bonus") + " for every " + squaredConfig.rewardFreq + " Zones reached. Every " + squaredConfig.thresh + " Zones, " + ((sup == 2) ? "the attack and health bonus will increase by an additional " + rewardGrowth + "%, and the " + heliumOrRadon() + " bonus will increase by " + prettify(rewardGrowth / 10) + "%" : "this bonus will increase by an additional " + rewardGrowth + "%") + "</b>. This bonus is additive with all available Challenge<sup>" + sup + "</sup>s, and your highest Zone reached for each challenge is saved and used.</p><p><b>No Challenge<sup>" + sup + "</sup>s end at any specific Zone</b>, they can only be completed by using your portal or abandoning through the 'View Perks' menu. However, <b>no " + heliumOrRadon() + " can drop, and no bonus " + heliumOrRadon() + " will be earned during or after the run</b>. Void Maps will still drop heirlooms, and all other currency can still be earned.</p>";
}
if (game.global.highestRadonLevelCleared >= 49){
tooltipText += "<p><b>Challenge<sup>2</sup> stacks multiplicatively with Challenge<sup>3</sup>, creating one big, beautiful Challenge<sup><span class='icomoon icon-infinity'></span></sup> modifier</b>. You have a " + prettify(uniArray[0]) + "% bonus from Challenge<sup>2</sup> in Universe 1, and a " + prettify(uniArray[1]) + "% bonus from Challenge<sup>3</sup> in Universe 2. This brings your total Challenge<sup><span class='icomoon icon-infinity'></span></sup> bonus to <b>" + prettify(game.global.totalSquaredReward) + "</b>, granting " + prettify(game.global.totalSquaredReward) + "% extra attack and health, and " + prettify(game.global.totalSquaredReward / 10) + "% extra " + heliumOrRadon() + ".";
}
else
tooltipText += "<p>You are currently gaining " + prettify(game.global.totalSquaredReward) + "% extra attack and health, and are gaining " + prettify(game.global.totalSquaredReward / 10) + "% extra " + heliumOrRadon() + " thanks to your Challenge<sup>" + sup + "</sup> bonus.</p>";
if (game.talents.headstart.purchased) tooltipText += "<p><b>Note that your Headstart mastery will be disabled during Challenge<sup>" + sup + "</sup> runs.</b></p>";
if (portalUniverse == 1 && uniArray[0] >= 35000){
var color = (uniArray[0] >= 50000) ? " style='color: red;'" : "";
var extra = (uniArray[0] >= 60000) ? " You've reached this bonus and are officially done with Challenge<sup>2</sup>! Congratulations!" : "";
tooltipText += "<p><b" + color + ">Note that Challenge<sup>2</sup> Bonus is capped at " + prettify(60000) + "%." + extra + "</b></p>"
}
costText = "";
}
if (what == "Geneticistassist Settings"){
if (isItIn == null){
geneMenuOpen = true;
elem = document.getElementById('tooltipDiv2');
tip2 = true;
var steps = game.global.GeneticistassistSteps;
tooltipText = "<div id='GATargetError'></div><div>Customize the target thresholds for your Geneticistassist! Use a number between 0.5 and 5000 seconds for all 3 boxes. Each box corresponds to a Geneticistassist toggle threshold.</div><div style='width: 100%'><input class='GACustomInput' id='target1' value='" + steps[1] + "'/><input class='GACustomInput' id='target2' value='" + steps[2] + "'/><input class='GACustomInput' id='target3' value='" + steps[3] + "'/><hr class='noBotMarg'/><div class='maxCenter'>" + getSettingHtml(game.options.menu.gaFire, 'gaFire') + getSettingHtml(game.options.menu.geneSend, 'geneSend') + "</div><hr class='noTopMarg'/><div id='GADisableCheck'>" + buildNiceCheckbox('disableOnUnlockCheck', null, game.options.menu.GeneticistassistTarget.disableOnUnlock) + " Start disabled when unlocked each run</div></div>";
costText = "<div class='maxCenter'><div class='btn btn-info' id='confirmTooltipBtn' onclick='customizeGATargets();'>Confirm</div> <div class='btn btn-danger' onclick='cancelTooltip()'>Cancel</div></div>"
elem.style.left = "33.75%";
elem.style.top = "25%";
}
}
if (what == "Configure Maps"){
if (isItIn == null){
geneMenuOpen = true;
elem = document.getElementById('tooltipDiv2');
tip2 = true;
var steps = game.global.GeneticistassistSteps;
tooltipText = "<div id='GATargetError'></div><div>Customize your settings for running maps!</div>";
tooltipText += "<hr class='noBotMarg'/><div class='maxCenter'>"
var settingCount = 0;
if (game.global.totalPortals >= 1) {
tooltipText += getSettingHtml(game.options.menu.mapLoot, 'mapLoot', null, "CM");
settingCount++;
}
if (game.global.totalPortals >= 1){
tooltipText += getSettingHtml(game.options.menu.repeatVoids, 'repeatVoids', null, "CM");
settingCount++;
}
if (settingCount % 2 == 0) tooltipText += "<br/><br/>";
tooltipText += '<div class="optionContainer"><div class="noselect settingsBtn ' + ((game.global.repeatMap) ? "settingBtn1" : "settingBtn0") + '" id="repeatBtn2" onmouseover="tooltip(\'Repeat Map\', null, event)" onmouseout="tooltip(\'hide\')" onclick="repeatClicked()">' + ((game.global.repeatMap) ? "Repeat On" : "Repeat Off") + '</div></div>';
settingCount++;
if (settingCount % 2 == 0) tooltipText += "<br/><br/>";
tooltipText += getSettingHtml(game.options.menu.repeatUntil, 'repeatUntil', null, "CM");
settingCount++;
if (settingCount % 2 == 0) tooltipText += "<br/><br/>";
tooltipText += getSettingHtml(game.options.menu.exitTo, 'exitTo', null, "CM")
settingCount++;
if (game.options.menu.mapsOnSpire.lockUnless() && game.global.universe == 1){
if (settingCount % 2 == 0) tooltipText += "<br/><br/>";
tooltipText += getSettingHtml(game.options.menu.mapsOnSpire, 'mapsOnSpire', null, "CM");
settingCount++;
}
if (game.global.canMapAtZone){
if (settingCount % 2 == 0) tooltipText += "<br/><br/>";
tooltipText += getSettingHtml(game.options.menu.mapAtZone, 'mapAtZone', null, "CM");
settingCount++;
}
if (game.global.highestLevelCleared >= 124){
if (settingCount % 2 == 0) tooltipText += "<br/><br/>";
tooltipText += getSettingHtml(game.options.menu.climbBw, 'climbBw', null, "CM");
settingCount++;
}
if (settingCount % 2 == 0) tooltipText += "<br/><br/>";
tooltipText += getSettingHtml(game.options.menu.extraMapBtns, 'extraMapBtns', null, "CM")
settingCount++;
tooltipText += "</div>";
costText = "<div class='maxCenter'><div class='btn btn-info' id='confirmTooltipBtn' onclick='cancelTooltip();'>Close</div></div>"
elem.style.left = "33.75%";
elem.style.top = "25%";
}
}
if (what == "Set Map At Zone"){
var maxSettings = game.options.menu.mapAtZone.getMaxSettings();
var mazHelp = "Welcome to Map at Zone (also referred to as MaZ)! This is a powerful automation tool that allows you to set when maps should be automatically run, and allows for a high amount of customization. Here's a quick overview of what everything does:<ul><li><span style='padding-left: 0.3%' class='mazDelete'><span class='icomoon icon-cross'></span></span> - Remove this MaZ line completely</li><li><b>Active</b> - A toggle to temporarily disable/enable the entire MaZ line.</li><li><b>Start Zone</b> - The first Zone that this MaZ line should run. Must be between 10 and 1000.</li><li><b>End Zone</b> - Only matters if you're planning on having this MaZ line repeat. If so, the line will stop repeating at this Zone. Must be between 10 and 1000.</li><li><b>Exit At Cell</b> - The cell number between 1 and 100 where this MaZ line should trigger. 1 is the first cell of the Zone, 100 is the final cell. This line will trigger before starting combat against that cell.</li><li><b>Priority</b> - If there are two or more MaZ lines set to trigger at the same cell on the same Zone, the line with the lowest priority will run first. This also determines sort order of lines in the UI.</li><li><b>Run Map</b> - Uncheck this box if you want Map at Zone to just put you into the Map Chamber without running a map. This will stall your run at a specified point until manual intervention.</li><li><b>Use Preset</b> - Select one of your Advanced Maps presets here, to determine what type of map should be created by this MaZ line. You can also choose to run Void Maps or some specific Unique Maps from this dropdown depending on game progress.</li><li><b>Map Repeat</b> - This will toggle your Map Repeat setting On, Off, or leave it as is every time this MaZ line triggers. Set to Repeat On if you want the map to run more than once.</li>";
mazHelp += "<li><b>Set Repeat Until</b> - This changes your 'Repeat to' setting to the selected choice, allowing you to customize how many times the map should be repeated. If 'Run Bionic' is selected as your Preset, you can select the option 'Climb BW to Level' in this dropdown which will automatically climb Bionic Wonderlands until the set level of map has been cleared of items, then will exit the map.</li><li><b>Exit To</b> - Ensure you're Exiting to World if you want the game to continue progressing after the maps have been completed, or set Exit to Maps if you want the game to wait for manual intervention after completing its map.</li><li><b>Zone Repeat</b> - Set how often this preset should repeat between the Start Zone and End Zone. Preset can be repeated every Zone, or set to a custom number depending on need. Note that when using Zone Repeat with 'Climb BW to Level' that your 'Climb To' setting will be increased by the amount of Zones in between Start Zone and the Zone where this line actually triggers. For example, starting a MaZ line at Z140 to climb BW to Z165 with repeat every 30 Zones will run through BW 165 on Z140, then at Z170 will run through BW 195.</li></ul>"
tooltipText = "<div id='mazContainer' style='display: block'><div id='mazError'></div><div class='row mazRow titles'><div class='mazCheckbox' style='width: 6%'>Active?</div><div class='mazWorld'>Start<br/>Zone</div><div class='mazThrough'>End<br/>Zone</div><div class='mazCell'>Exit At<br/>Cell</div><div class='mazPrio'>Priority</div><div class='mazCheckbox'>Run Map?</div><div class='mazPreset'>Use<br/>Preset</div><div class='mazRepeat'>Map<br/>Repeat</div><div class='mazRepeatUntil'>Set<br/>Repeat Until</div><div class='mazExit'>Exit To</div><div class='mazTimes'>Zone<br/>Repeat</div></div>";
var current = game.options.menu.mapAtZone.getSetZone();
for (var x = 0; x < maxSettings; x++){
var vals = {
world: -1,
cell: 1,
check: true,
preset: 0,
repeat: 0,
until: 0,
exit: 0,
bwWorld: 125,
times: -1,
on: true,
through: 999,
rx: 10,
prio: (x + 1),
tx: 10
}
var style = "";
if (current.length - 1 >= x){
vals.world = current[x].world;
vals.check = current[x].check;
vals.preset = current[x].preset;
vals.repeat = current[x].repeat;
vals.until = current[x].until;
vals.exit = current[x].exit;
vals.bwWorld = current[x].bwWorld;
vals.times = (current[x].times) ? current[x].times : -1;
vals.cell = (current[x].cell) ? current[x].cell : 1;
vals.on = (current[x].on === false) ? false : true;
vals.through = (current[x].through) ? current[x].through : 999;
vals.rx = (current[x].rx) ? current[x].rx : 10;
vals.tx = (current[x].tx) ? current[x].tx : 10;
}
else style = " style='display: none' ";
var presetDropdown = "<option value='0'" + ((vals.preset == 0) ? " selected='selected'" : "") + ">" + getPresetDescription(1) + "</option><option value='1'" + ((vals.preset == 1) ? " selected='selected'" : "") + ">" + getPresetDescription(2) + "</option><option value='2'" + ((vals.preset == 2) ? " selected='selected'" : "") + ">" + getPresetDescription(3) + "</option><option value='6'" + ((vals.preset == 6) ? " selected='selected'" : "") + ">" + getPresetDescription(4) + "</option><option value='7'" + ((vals.preset == 7) ? " selected='selected'" : "") + ">" + getPresetDescription(5) + "</option><option value='3'" + ((vals.preset == 3) ? " selected='selected'" : "") + ">Run Bionic</option><option value='4'" + ((vals.preset == 4) ? " selected='selected'" : "") + ">Run Void</option>";
if (game.global.universe == 2 && game.global.highestRadonLevelCleared >= 49) presetDropdown += "<option value='8'" + ((vals.preset == 8) ? " selected='selected'" : "") + ">Melting Point</option>";
if (game.global.universe == 2 && game.global.highestRadonLevelCleared >= 69) presetDropdown += "<option value='5'" + ((vals.preset == 5) ? " selected='selected'" : "") + ">Black Bog</option>";
if (game.global.universe == 2 && game.global.highestRadonLevelCleared >= 174) presetDropdown += "<option value='9'" + ((vals.preset == 9) ? " selected='selected'" : "") + ">Frozen Castle</option>";
var repeatDropdown = "<option value='0'" + ((vals.repeat == 0) ? " selected='selected'" : "") + ">No Change</option><option value='1'" + ((vals.repeat == 1) ? " selected='selected'" : "") + ">On</option><option value='2'" + ((vals.repeat == 2) ? " selected='selected'" : "") + ">Off</option>";
var repeatUntilDropdown = "<option value='0'" + ((vals.until == 0) ? " selected='selected'" : "") + ">Don't Change</option><option value='1'" + ((vals.until == 1) ? " selected='selected'" : "") + ">Repeat Forever</option><option value='2'" + ((vals.until == 2) ? " selected='selected'" : "") + ">Repeat to 10</option><option value='3'" + ((vals.until == 3) ? " selected='selected'" : "") + ">Repeat for Items</option><option value='4'" + ((vals.until == 4) ? " selected='selected'" : "") + ">Repeat for Any</option><option class='mazBwClimbOption' value='5'" + ((vals.until == 5) ? " selected='selected'" : "") + ">Climb BW to Level</option><option value='6'" + ((vals.until == 6) ? " selected='selected'" : "") + ">Repeat 25 Times</option><option value='7'" + ((vals.until == 7) ? " selected='selected'" : "") + ">Repeat 50 Times</option><option value='8'" + ((vals.until == 8) ? " selected='selected'" : "") + ">Repeat 100 Times</option><option value='9'" + ((vals.until == 9) ? " selected='selected'" : "") + ">Repeat X Times</option>"
var exitDropdown = "<option value='0'" + ((vals.exit == 0) ? " selected='selected'" : "") + ">No Change</option><option value='1'" + ((vals.exit == 1) ? " selected='selected'" : "") + ">Maps</option><option value='2'" + ((vals.exit == 2) ? " selected='selected'" : "") + ">World</option>";
var timesDropdown = "<option value='-1'" + ((vals.times == -1) ? " selected='selected'" : "") + ">Just This Zone</option><option value='1'" + ((vals.times == 1) ? " selected='selected'" : "") + ">Every Zone</option><option value='2'" + ((vals.times == 2) ? " selected='selected'" : "") + ">Every Other Zone</option><option value='3'" + ((vals.times == 3) ? " selected='selected'" : "") + ">Every 3 Zones</option><option value='5'" + ((vals.times == 5) ? " selected='selected'" : "") + ">Every 5 Zones</option><option value='10'" + ((vals.times == 10) ? " selected='selected'" : "") + ">Every 10 Zones</option><option value='30'" + ((vals.times == 30) ? " selected='selected'" : "") + ">Every 30 Zones</option><option value='-2'" + ((vals.times == -2) ? " selected='selected'" : "") + ">Every X Zones</option>";
var className = (vals.preset == 3) ? "mazBwMainOn" : "mazBwMainOff";
className += (vals.preset == 3 && vals.until == 5) ? " mazBwZoneOn" : " mazBwZoneOff"
className += (vals.until == 9) ? " mazRxOn" : " mazRxOff";
className += (vals.times == -2) ? " mazTxOn" : " mazTxOff";
tooltipText += "<div id='mazRow" + x + "' class='row mazRow " + className + "'" + style + ">";
tooltipText += "<div class='mazDelete' onclick='game.options.menu.mapAtZone.removeRow(" + x + ")'><span class='icomoon icon-cross'></span></div>";
tooltipText += "<div class='mazCheckbox' style='text-align: center;'>" + buildNiceCheckbox("mazEnableSetting" + x, null, vals.on) + "</div>";
tooltipText += "<div class='mazWorld'><input value='" + vals.world + "' type='number' id='mazWorld" + x + "'/></div>";
tooltipText += "<div class='mazThrough'><input value='" + vals.through + "' type='number' id='mazThrough" + x + "'/></div>";
tooltipText += "<div class='mazCell'><input value='" + vals.cell + "' type='number' id='mazCell" + x + "'/></div>";
tooltipText += "<div class='mazPrio'><input value='" + vals.prio + "' type='number' id='mazPrio" + x + "'/></div>";
tooltipText += "<div class='mazCheckbox' style='text-align: center;'>" + buildNiceCheckbox("mazCheckbox" + x, null, vals.check) + "</div>";
tooltipText += "<div class='mazPreset' onchange='updateMazPreset(" + x + ")'><select value='" + vals.preset + "' id='mazPreset" + x + "'>" + presetDropdown + "</select></div>"
tooltipText += "<div class='mazRepeat'><select value='" + vals.repeat + "' id='mazRepeat" + x + "'>" + repeatDropdown + "</select></div>";
tooltipText += "<div class='mazRepeatUntil' onchange='updateMazPreset(" + x + ")'><select value='" + vals.until + "' id='mazRepeatUntil" + x + "'>" + repeatUntilDropdown + "</select></div>";
tooltipText += "<div class='mazRx'><div style='text-align: center;'>X Times</div><input value='" + vals.rx + "' type='number' id='mazRx" + x + "'/></div>";
tooltipText += "<div class='mazBwWorld'><div style='text-align: center; margin-left: -0.5vw;'>Climb To</div><input value='" + vals.bwWorld + "' type='number' id='mazBwWorld" + x + "'/></div>";
tooltipText += "<div class='mazExit'><select value='" + vals.exit + "' id='mazExit" + x + "'>" + exitDropdown + "</select></div>";
tooltipText += "<div class='mazTimes select' onchange='updateMazPreset(" + x + ")'><select value='" + vals.times + "' id='mazTimes" + x + "'>" + timesDropdown + "</select></div>";
tooltipText += "<div class='mazTx'><div style='text-align: center;'>X Zones</div><input value='" + vals.tx + "' type='number' id='mazTx" + x + "'/></div>";
tooltipText += "</div>"
}
tooltipText += "<div id='mazAddRowBtn' style='display: " + ((current.length < maxSettings) ? "inline-block" : "none") + "' class='btn btn-success btn-md' onclick='game.options.menu.mapAtZone.addRow()'>+ Add Row</div>"
var currentPreset = ((game.global.universe == 1 && game.options.menu.mapAtZone.U1Mode == 'a') || (game.global.universe == 2 && game.options.menu.mapAtZone.U2Mode == 'a')) ? "a" : "b";
tooltipText += "<div id='mazSwapPresetBtn' style='display: " + ((game.talents.maz.purchased) ? "inline-block" : "none") + "' class='btn btn-" + ((currentPreset == "a") ? "info" : "danger") + " btn-md' onclick='game.options.menu.mapAtZone.swapPreset()'>Swap to Preset " + ((currentPreset == "a") ? "B" : "A") + "</div>";
tooltipText += "</div><div style='display: none' id='mazHelpContainer'>" + mazHelp + "</div>";
costText = "<div class='maxCenter'><span class='btn btn-success btn-md' id='confirmTooltipBtn' onclick='game.options.menu.mapAtZone.save()'>Save and Close (Z/Enter)</span><span class='btn btn-danger btn-md' onclick='cancelTooltip(true)'>Cancel (Esc)</span><span class='btn btn-primary btn-md' id='confirmTooltipBtn' onclick='game.options.menu.mapAtZone.save(true)'>Save</span><span class='btn btn-info btn-md' onclick='game.options.menu.mapAtZone.toggleHelp()'>Help</span></div>"
game.global.lockTooltip = true;
elem.style.top = "25%";
elem.style.left = "10%";
swapClass('tooltipExtra', 'tooltipExtraGigantic', elem);
}
if (what == "Change Heirloom Icon"){
var heirloom = getSelectedHeirloom();
var icons = [];
tooltipText = "<div style='width: 100%; height: 100%; background-color: black; text-align: center;'>";
if (heirloom.type == "Shield"){
icons = ["*shield3", "*shield", "*shield2", "*heart3", "*star2", "*road2", "*fast-forward", "*trophy3", "*eraser"];
}
if (heirloom.type == "Staff"){
icons = ["grain", "apple", "tree-deciduous", "*cubes", "*diamond", "*lab-flask", "*key", "*hour-glass", "*flag", "*feather", "*edit"];
}
if (heirloom.type == "Core"){
icons = ["adjust", "*compass", "*cog", "*battery", "*adjust", "*cloud", "*yingyang"]
}
for (var x = 0; x < icons.length; x++){
tooltipText += "<div class='heirloomChangeIcon heirloomRare" + heirloom.rarity + "' onclick='saveHeirloomIcon(\"" + icons[x] + "\")'>" + convertIconNameToSpan(icons[x]) + "</div>";
}
tooltipText += "</div>"
game.global.lockTooltip = true;
elem.style.left = "33.75%";
elem.style.top = "25%";
costText = "<div class='maxCenter'><span class='btn btn-success btn-md' id='confirmTooltipBtn' onclick='cancelTooltip(true)'>Close</span></div>"
}
if (what == "Change Portal Color"){
var tiers = 6;
tooltipText = "<div style='width: 100%; height: 100%; background-color: black; text-align: center;'>";
for (var x = 1; x < tiers + 1; x++){
var selected = (game.global.portalColor == x || (game.global.portalColor == 0 && x == 6)) ? " selected" : "";
tooltipText += "<div class='pointer portalPreview portalMk" + x + selected + "' onclick='savePortalColor(" + x + ")'>" + x + "</div>";
}
tooltipText += "</div>"
game.global.lockTooltip = true;
elem.style.left = "33.75%";
elem.style.top = "25%";
costText = "<div class='maxCenter'><span class='btn btn-success btn-md' id='confirmTooltipBtn' onclick='cancelTooltip(true)'>Close</span></div>"
}
if (what == "Message Config"){
tooltipText = "<div id='messageConfigMessage'>Here you can finely tune your message settings, to see only what you want from each category. Mouse over the name of a filter for more info.</div>";
var msgs = game.global.messages;
var toCheck = ["Loot", "Unlocks", "Combat"];
tooltipText += "<div class='row'>";
for (var x = 0; x < toCheck.length; x++){
var name = toCheck[x];
tooltipText += "<div class='col-xs-4'><span class='messageConfigTitle'>" + toCheck[x] + "</span><br/>";
for (var item in msgs[name]){
if (item == "essence" && game.global.highestLevelCleared < 179) continue;
if (item == "magma" && game.global.highestLevelCleared < 229) continue;
if (item == "cache" && game.global.highestLevelCleared < 59) continue;
if (item == "token" && game.global.highestLevelCleared < 235) continue;
if (item == "exp" && game.global.highestRadonLevelCleared < 49) continue;
if (item == 'enabled') continue;
var realName = item;
if (item == "helium" && game.global.universe == 2) realName = "radon";
if (item == "voidMaps"){
if (game.global.totalPortals < 1) continue;
realName = "Void Maps";
}
tooltipText += "<span class='messageConfigContainer'><span class='messageCheckboxHolder'>" + buildNiceCheckbox(name + item, 'messageConfigCheckbox', (msgs[name][item])) + "</span><span onmouseover='messageConfigHover(\"" + name + item + "\", event)' onmouseout='tooltip(\"hide\")' class='messageNameHolder'> - " + realName.charAt(0).toUpperCase() + realName.substr(1) + "</span></span><br/>";
}
tooltipText += "</div>";
}
tooltipText += "</div>";
ondisplay = function () {verticalCenterTooltip();};
game.global.lockTooltip = true;
elem.style.top = "25%";
elem.style.left = "25%";
swapClass('tooltipExtra', 'tooltipExtraLg', elem);
costText = "<div class='maxCenter'><div class='btn btn-info' id='confirmTooltipBtn' onclick='cancelTooltip();configMessages();'>Confirm</div> <div class='btn btn-danger' onclick='cancelTooltip()'>Cancel</div></div>"
}
if (what == "Hotkeys"){
tooltipText = "<table id='keybindsTable' class='table table-striped'><tbody>";
tooltipText += "<tr><td class='keybindsTitle' colspan='4'>General</td></tr>";
tooltipText += "<tr><td>K/k</td><td>Show Hot(K)eys menu</td><td>";
if (game.global.totalPortals > 0 || game.global.portalActive) tooltipText += "T/t</td><td>Open Por(T)al Window"
else tooltipText += "</td><td>"
tooltipText += "</td></tr>";
tooltipText += "<tr><td>F5</td><td>Reload the game to the last saved point</td><td>";
if (game.stats.totalHeirlooms.valueTotal > 0) tooltipText += "L/l</td><td>Open Heir(L)ooms Window";
else tooltipText += "</td><td>"
tooltipText += "</td></tr>";
tooltipText += "<tr><td>F11</td><td>Toggle Fullscreen</td><td>";
if (game.stats.totalHeirlooms.valueTotal > 0) tooltipText += "C/c</td><td>Show Heirloom (C)hances on Heirlooms Window"
else tooltipText += "</td><td>"
tooltipText += "</td></tr>";
tooltipText += "<tr><td>Space</td><td>Pause (if enabled in settings)</td><td>";
if (game.permaBoneBonuses.boosts.owned > 0) tooltipText += "O/o</td><td>W(O)rship Bone Shrine"
else tooltipText += "</td><td>"
tooltipText += "</td></tr>";
tooltipText += "<tr><td>F/f</td><td>(F)ight</td><td>";
if (!game.portal.Equality.radLocked) tooltipText += "E/e</td><td>(E)quality"
else tooltipText += "</td><td>"
tooltipText += "</td></tr>";
tooltipText += "<tr><td>A/a</td><td>Toggle (A)utoFight</td><td>";
if (game.global.highestRadonLevelCleared >= 74) tooltipText += "I/i</td><td>Sp(I)re Assault"
else tooltipText += "</td><td>"
tooltipText += "</td></tr>";
tooltipText += "<tr><td>Left/Right</td><td>Usable on windows with <span class='icomoon icon-arrow-left'></span> and <span class='icomoon icon-arrow-right'></span> icons</td><td></td><td></td></tr>";
tooltipText += "<tr><td>V</td><td>Open AD(V)ISOR</td><td></td><td></td></tr>";
tooltipText += "<tr><td>Esc</td><td>Close popups/menus. Open Settings if nothing else is open</td><td></td><td></td></tr>";
if (game.global.highestLevelCleared >= 5){
tooltipText += "<tr><td class='keybindsTitle' colspan='4'>Maps</td></tr>";
tooltipText += "<tr><td>M/m</td><td>Toggle (M)aps</td><td>R/r</td><td>Toggle Map (R)epeat</td></tr>";
tooltipText += "<tr><td>Up</td><td>Increase Map level</td><td>Down</td><td>Decrease Map level</td></tr>";
tooltipText += "<tr><td>C/c</td><td>(C)ontinue/Run Map</td><td>";
if (game.global.canMapAtZone) tooltipText += "Z/z</td><td>Map at (Z)one"
else tooltipText += "</td><td>"
tooltipText += "</td></tr>";
}
if (game.global.highestLevelCleared >= 60){
tooltipText += "<tr><td class='keybindsTitle' colspan='4'>Formations</td></tr>";
tooltipText += "<tr><td>X/x/1/Num1</td><td>No Formation</td><td>H/h/2/Num2</td><td>(H)eap</td></tr>";
if (game.global.highestLevelCleared >= 70 || game.upgrades.Dominance.done > 0){
tooltipText += "<tr><td>D/d/3/Num3</td><td>(D)ominance</td><td>";
if (game.global.highestLevelCleared >= 80 || game.upgrades.Barrier.done > 0) tooltipText += "B/b/4/Num4</td><td>(B)arrier"
else tooltipText += "</td><td>"
tooltipText += "</td></tr>";
}
if (game.global.highestLevelCleared >= 179){
tooltipText += "<tr><td>S/s/5/Num5</td><td>(S)cryer</td><td>";
if (game.global.highestLevelCleared >= 239) tooltipText += "W/w/6/Num6</td><td>(W)ind"
else tooltipText += "</td><td>"
tooltipText += "</td></tr>";
}
}
if (game.global.spiresCompleted > 0){
tooltipText += "<tr><td class='keybindsTitle' colspan='4'>Personal Spire</td></tr>";
tooltipText += "<tr><td>P/p</td><td>Open S(P)ire</td><td>0/Num0</td><td>Sell a trap/tower</td></tr>";
tooltipText += "<tr><td>1-7/Num1-Num7</td><td colspan='3'>Buy a Trap/Tower</td></tr>";
}
tooltipText += "</tbody></table>";
ondisplay = function () {verticalCenterTooltip();};
game.global.lockTooltip = true;
elem.style.top = "25%";
elem.style.left = "17.5%";
swapClass('tooltipExtra', 'tooltipExtraSuperLg', elem);
costText = "<div class='maxCenter'><div class='btn btn-danger' onclick='cancelTooltip()'>Close</div></div>"
}
if (isItIn == "goldenUpgrades"){
var upgrade = game.goldenUpgrades[what];
var timesPurchased = upgrade.purchasedAt.length
var s = (timesPurchased == 1) ? "" : "s";
var three = (game.global.totalPortals >= 1 || (game.global.universe == 2 && game.global.totalRadPortals == 0)) ? "three" : "two";
tooltipText += " <b>You can only choose one of these " + three + " Golden Upgrades. Choose wisely...</b><br/><br/> Each time Golden Upgrades are unlocked, they will increase in strength. You are currently gaining " + Math.round(upgrade.currentBonus * 100) + "% from purchasing this upgrade " + timesPurchased + " time" + s + " since your last portal.";
if (what == "Void" && (parseFloat((game.goldenUpgrades.Void.currentBonus + game.goldenUpgrades.Void.nextAmt()).toFixed(2)) > 0.72)) tooltipText += "<br/><br/><b class='red'>This upgrade would put you over 72% increased Void Map chance, which would destabilize the universe. You don't want to destabilize the universe, do you?</b>";
else if (what == "Void") tooltipText += "<br/><br/><b class='green'>Note: The absolute maximum value for Golden Void is +72%. Golden Void will no longer be able to be purchased if it would increase your bonus above 72%. Plan carefully!</b>";
if (what == "Helium" && game.global.runningChallengeSquared){
var cMode = (game.global.universe == 1) ? 2 : 3;
tooltipText += "<br/><br/><b class='red'>You can't earn " + heliumOrRadon() + " while running a Challenge<sup>" + cMode + "</sup>!</b>";
}
costText = "Free";
if (getAvailableGoldenUpgrades() > 1) costText += " (" + getAvailableGoldenUpgrades() + " remaining)";
var numeral = (usingScreenReader) ? prettify(game.global.goldenUpgrades + 1) : romanNumeral(game.global.goldenUpgrades + 1);
if (game.global.universe == 2 && what == "Helium") what = "Radon";