-
Notifications
You must be signed in to change notification settings - Fork 2
/
updates.js
6720 lines (6511 loc) · 399 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)
)){
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"){
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>下个词缀将在区域" + 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=Brownprobe" target="_blank">click here to send a message on Reddit</a> or find Greensatellite in the Trimps Discord.<hr/><br/>' + "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 == "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/>(快捷键:S或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 == "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) + 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 = "点击后可以查看" + ((textString == 0) ? "今天" : dayOfWeek(getDailyTimeString(textString, false, true))) + "的挑战内容,该挑战将在" + daysUntilReset + "天后重置。";
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 == "Respec"){
tooltipText = "You can respec your perks once per portal. Clicking cancel after clicking this button will not consume your respec.";
costText = "";
}
if (what == "Well Fed"){
var tBonus = 50;
if (game.talents.turkimp2.purchased) tBonus = 100;
else if (game.talents.turkimp2.purchased) tBonus = 75;
tooltipText = "脆皮火鸡非常美味,但您实在是吃不完。在该加成期间如果您自己进行采集食物,砍伐木头或采掘金属,则可以将剩下的火鸡与脆皮们分享,使它们相应的资源获取速度增加" + 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则不限制)</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-4' 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-6 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-4' 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-6 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;
elem.style.left = "33.75%";
elem.style.top = "25%";
ondisplay = function(){
verticalCenterTooltip(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 = "25%";
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 += "<i></i>" + 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>金色升级' + heName + '(' + game.goldenUpgrades.Helium.purchasedAt.length + '/' + Math.round(game.goldenUpgrades.Helium.currentBonus * 100) + '%)</b> - 如果您想更快地获取特权,可以选择该选项。高达八成的脆皮认同这能增加' + heliumOrRadon() + '获取量,但没有一个脆皮能搞明白原理。</p><p><b>金色升级战斗(' + 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>金色升级虚空(' + 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> - 将首先尽可能地购买金色虚空(使加成达到72%),然后切换为购买金色' + heName + '。您还可以选择……<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 hundreds of 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 = "该敌人受到毒赋能影响,每回合受到的伤害额外增加" + prettify(game.empowerments.Poison.getDamage()) + "。";
costText = "";
}
if (what == "Chilled"){
tooltipText = "该敌人受到冰赋能影响,被冰冻了,它受到的伤害增加" + prettify(game.empowerments.Ice.getDamageModifier() * 100) + "%,普通攻击造成的伤害减少" + prettify((1 - game.empowerments.Ice.getCombatModifier()) * 100) + "%。" + game.empowerments.Ice.overkillDesc();
costText = "";
}
if (what == "Breezy"){
var heliumText = (!game.global.mapsActive)? "氦获取量增加" + prettify(game.empowerments.Wind.getCombatModifier(true) * 100) + "%,非氦资源" : "非氦资源";
tooltipText = "该敌人身旁狂风肆虐,使" + heliumText + "获取量增加" + 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.Name : "预设" + 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 = "挑战<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 = "挑战<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/>即使您选择了<b>关闭重复</b>,通过地图以后也不会因此而放弃士兵。(快捷键: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>中, 您可以重新进行一些挑战,使我方脆皮获得永久的攻击力、生命值和" + heliumOrRadon() + "获取量加成。 大 多 数 挑战<sup>" + sup + "</sup>s will grant <b>每到达" + squaredConfig.rewardFreq + "个区域,可以增加" + rewardEach + "%" + ((sup == 2) ? "攻击力和生命值,并使" + heliumOrRadon() + "获取量增加" + prettify(rewardEach / 10) + "%。": "的挑战<sup>" + sup + "</sup>加成。") + "且每到达" + squaredConfig.thresh + "个区域,在后续区域中该加成将增加" + ((sup == 2) ? rewardGrowth + "%攻击力和生命值,并使" + heliumOrRadon() + "获取量加成增加" + prettify(rewardGrowth / 10) + "%" : 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>挑战中无法掉落" + heliumOrRadon() + ",该周目您的" + heliumOrRadon() + "获取量也不会有任何加成</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>。您在宇宙1中的挑战<sup>2</sup>总加成为" + prettify(uniArray[0]) + "%,宇宙2中的挑战<sup>3</sup>总加成为" + prettify(uniArray[1]) + "%。因此叠乘后挑战<sup><span class='icomoon icon-infinity'></span></sup>的总加成变为<b>" + prettify(game.global.totalSquaredReward) + "%</b>,使我方脆皮的攻击力和生命值增加" + prettify(game.global.totalSquaredReward) + "%,且" + heliumOrRadon() + "获取量增加" + prettify(game.global.totalSquaredReward / 10) + "%。";
}
else
tooltipText += "<p>由于您有挑战<sup>" + sup + "</sup>的加成,我方脆皮的攻击力和生命值增加" + prettify(game.global.totalSquaredReward) + "%,且" + heliumOrRadon() + "获取量增加" + prettify(game.global.totalSquaredReward / 10) + "%。</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;'" : "";
tooltipText += "<p><b" + color + ">Note that Challenge<sup>2</sup> Bonus is capped at " + prettify(60000) + "%.</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) + " 每周目解锁遗传学家时将它设为未激活</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>"
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 >= 5){
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();
tooltipText = "<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='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: false,
preset: 0,
repeat: 0,
until: 0,
exit: 0,
bwWorld: 125,
times: -1,
on: true,
through: 999,
rx: 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;
}
else style = " style='display: none' ";
var presetDropdown = "<option value='0'" + ((vals.preset == 0) ? " selected='selected'" : "") + ">Preset 1</option><option value='1'" + ((vals.preset == 1) ? " selected='selected'" : "") + ">Preset 2</option><option value='2'" + ((vals.preset == 2) ? " selected='selected'" : "") + ">Preset 3</option><option value='6'" + ((vals.preset == 6) ? " selected='selected'" : "") + ">Preset 4</option><option value='7'" + ((vals.preset == 7) ? " selected='selected'" : "") + ">Preset 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'" : "") + ">运行熔点地图</option>";
if (game.global.universe == 2 && game.global.highestRadonLevelCleared >= 69) presetDropdown += "<option value='5'" + ((vals.preset == 5) ? " selected='selected'" : "") + ">运行黑色泥沼</option>";
if (game.global.universe == 2 && game.global.highestRadonLevelCleared >= 174) presetDropdown += "<option value='9'" + ((vals.preset == 9) ? " selected='selected'" : "") + ">运行冻结城堡</option>";
var repeatDropdown = "<option value='0'" + ((vals.repeat == 0) ? " selected='selected'" : "") + ">Don't Change</option><option value='1'" + ((vals.repeat == 1) ? " selected='selected'" : "") + ">Repeat On</option><option value='2'" + ((vals.repeat == 2) ? " selected='selected'" : "") + ">Repeat 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'" : "") + ">重复至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'" : "") + ">Don't Change</option><option value='1'" + ((vals.exit == 1) ? " selected='selected'" : "") + ">Exit to Maps</option><option value='2'" + ((vals.exit == 2) ? " selected='selected'" : "") + ">Exit to World</option>";
var timesDropdown = "<option value='-1'" + ((vals.times == -1) ? " selected='selected'" : "") + ">Just This Zone</option><option value='1'" + ((vals.times == 1) ? " selected='selected'" : "") + ">Run Every Zone</option><option value='2'" + ((vals.times == 2) ? " selected='selected'" : "") + ">Run Every Other Zone</option><option value='3'" + ((vals.times == 3) ? " selected='selected'" : "") + ">Run Every 3 Zones</option><option value='5'" + ((vals.times == 5) ? " selected='selected'" : "") + ">Run Every 5 Zones</option><option value='10'" + ((vals.times == 10) ? " selected='selected'" : "") + ">Run Every 10 Zones</option><option value='30'" + ((vals.times == 30) ? " selected='selected'" : "") + ">Run Every 30 Zones</option>";
var className = (vals.preset == 3) ? "mazBwMainOn" : "mazBwMainOff";
className += (vals.preset == 3 && vals.until == 5) ? " mazBwZoneOn" : " mazBwZoneOff"
className += (vals.until == 9) ? " mazRxOn" : " mazRxOff";
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='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='mazExit'><select value='" + vals.exit + "' id='mazExit" + x + "'>" + exitDropdown + "</select></div>";
tooltipText += "<div class='mazBwWorld'><div style='text-align: center;'>Exit After L</div><input value='" + vals.bwWorld + "' type='number' id='mazBwWorld" + x + "'/></div>";
tooltipText += "<div class='mazTimes select'><select value='" + vals.times + "' id='mazTimes" + x + "'>" + timesDropdown + "</select></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>";
costText = "<div class='maxCenter'><span class='btn btn-success btn-md' id='confirmTooltipBtn' onclick='game.options.menu.mapAtZone.save()'>Confirm</span><span class='btn btn-danger btn-md' onclick='cancelTooltip(true)'>Cancel</span></div>"
game.global.lockTooltip = true;
elem.style.top = "25%";
elem.style.left = "17.5%";
swapClass('tooltipExtra', 'tooltipExtraSuperLg', 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", "*yinyang"]
}
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>"
}
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>"
}
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";
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>"
}
if (isItIn == "goldenUpgrades"){
var upgrade = game.goldenUpgrades[what];
var timesPurchased = upgrade.purchasedAt.length
var sup = (game.global.universe == 2 ) ? "3" : "2";
var s = (timesPurchased == 1) ? "" : "s";
var three = (game.global.totalPortals >= 5 || (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) tooltipText += "<br/><br/><b class='red'>进行挑战<sup>" + sup + "</sup>时您无法获得" + heliumOrRadon() + "!</b>";
costText = "免费";
if (getAvailableGoldenUpgrades() > 1) costText += "(剩余" + getAvailableGoldenUpgrades() + "次)";
var numeral = (usingScreenReader) ? prettify(game.global.goldenUpgrades + 1) : romanNumeral(game.global.goldenUpgrades + 1);
if (game.global.universe == 2 && what == "Helium") what = "Radon";
what = "Golden <i></i>" + what + "<i></i>(" + numeral + " 阶)";
}
if (isItIn == "talents"){
var talent = game.talents[what];
tooltipText = talent.description;
var nextTalCost = getNextTalentCost();
var thisTierTalents = countPurchasedTalents(talent.tier);
if (ctrlPressed){
var highestAffordable = getHighestPurchaseableRow();
var highestIdeal = getHighestIdealRow();
var isAffordable = (highestAffordable >= talent.tier);
var isIdeal = (highestIdeal >= talent.tier);
if (thisTierTalents == 6) {
costText = "<span class='green'>You have already purchased this tier!</span>";
}
else if (isIdeal) {
costText = "<span class='green'>You must buy this entire tier to be able to spend all of your Dark Essence.</span>"
}
else if (isAffordable) {
costText = "<span class='green'>You can afford to purchase this entire tier!</span> <span class='red'>However, purchasing this entire tier right now may limit which other Masteries you can reach.</span>"
}
else {
costText = "<span class='red'>You cannot afford to purchase this entire tier.</span>"
}
}
else{
if (talent.purchased)
costText = "<span style='color: green'>Purchased</span>";
else{
var requiresText = false;
if (typeof talent.requires !== 'undefined'){
var requires;
if (Array.isArray(talent.requires)) requires = talent.requires;
else requires = [talent.requires];
var needed = [];
for (var x = 0; x < requires.length; x++){
if (!game.talents[requires[x]].purchased){
needed.push(game.talents[requires[x]].name);
}
}
if (needed.length) requiresText = formatListCommasAndStuff(needed);
}
if (getAllowedTalentTiers()[talent.tier - 1] < 1 && thisTierTalents < 6){
costText = "<span style='color: red'>未解锁";
var lastTierTalents = countPurchasedTalents(talent.tier - 1);
if (lastTierTalents <= 1) costText += "(您还需要购买第" + (talent.tier - 1) + "层的" + ((lastTierTalents == 0) ? "2个专精" : "1个专精") + "才能解锁第" + talent.tier + "层的专精)";
else costText += "(您还需要购买第" + (talent.tier - 1) + "层的1个专精才能解锁第" + talent.tier + "层的下一个专精)";
if (requiresText) costText += "<br>This Mastery also requires " + requiresText + "</span>";
}
else if (requiresText)
costText = "<span style='color: red'>Requires " + requiresText + "</span>";
else if (game.global.essence < nextTalCost && prettify(game.global.essence) != prettify(nextTalCost))
costText = "<span style='color: red'>" + prettify(nextTalCost) + " Dark Essence (Use Scrying Formation to earn more)</span>";
else {
costText = prettify(nextTalCost) + " Dark Essence";
if (canPurchaseRow(talent.tier)) {
costText += "<br/><b style='color: black; font-size: 0.8vw;'>You can afford to purchase this whole row! Hold Ctrl when clicking to buy this entire row and any uncompleted rows before it.</b>";
}
}
}
}
what = talent.name;
noExtraCheck = true;
}
if (what == "Mastery"){
tooltipText = "<p>Click to view your masteries.</p><p>您目前拥有<b>" + prettify(game.global.essence) + "</b>黑暗精华。</p>"
}
if (what == "The Improbability"){
tooltipText = "<span class='planetBreakMessage'>That shouldn't have happened. There should have been a Blimp there. Something is growing unstable.</span>";
if (!game.global.autoUpgradesAvailable) tooltipText += "<br/><br/><span class='planetBreakMessage'><b>Your Trimps seem to understand that they'll need to help out more, and you realize how to permanently use them to automate upgrades!<b></span><br/>";
costText = "<span class='planetBreakDescription'><span class='bad'>Trimp breed speed reduced by a factor of 10. 20% of enemy damage can now penetrate your block.</span><span class='good'> You have unlocked a new upgrade to learn a Formation. Helium harvested per Zone is increased by a factor of 5. Equipment cost is dramatically cheaper. Creating modified maps is now cheaper, and your scientists have found new ways to improve maps! You have access to the 'Trimp' challenge!<span></span>";
if (game.global.challengeActive == "Corrupted") costText += "<br/><br/><span class='corruptedBadGuyName'>Looks like the Corruption is starting early...</span>";
costText += "<hr/><div class='maxCenter'><div class='btn btn-info' id='confirmTooltipBtn' onclick='cancelTooltip()'>I'll be fine</div><div class='btn btn-danger' onclick='cancelTooltip(); message(\"Sorry\", \"Notices\")'>I'm Scared</div></div>"
game.global.lockTooltip = true;
elem.style.left = "33.75%";
elem.style.top = "25%";
}
if (what == "Corruption"){
if (game.global.challengeActive == "Corrupted"){
tooltipText = "<span class='planetBreakMessage'>Though you've seen the Corruption grow since the planet broke, you can now see a giant spire pumping out tons of the purple goo. Things seem to be absorbing it at a higher rate now.</span><br/>";
costText += "<span class='planetBreakDescription'><span class='bad'>Improbabilities and Void Maps are now more difficult.</span> <span class='good'>Improbabilities and Void Maps now drop 2x helium.</span></span>";
}
else {
tooltipText = (game.talents.headstart.purchased) ? "Off in the distance, you can see a giant spire grow larger as you approach it." : "You can now see a giant spire only about 20 Zones ahead of you.";
tooltipText = "<span class='planetBreakMessage'>" + tooltipText + " Menacing plumes of some sort of goopy gas boil out of the spire and appear to be tainting the land even further. It looks to you like the Zones are permanently damaged, poor planet. You know that if you want to reach the spire, you'll have to deal with the goo.</span><br/>";
costText = "<span class='planetBreakDescription'><span class='bad'>From now on as you press further through Zones, more and more corrupted cells of higher and higher difficulty will begin to spawn. Improbabilities and Void Maps are now more difficult.</span> <span class='good'>Improbabilities and Void Maps now drop 2x helium. Each corrupted cell will drop 15% of that Zone's helium reward.</span></span> ";
}
costText += "<hr/><div class='maxCenter'><div class='btn btn-info' id='confirmTooltipBtn' onclick='cancelTooltip()'>Bring it on</div></div>";
game.global.lockTooltip = true;
elem.style.left = "33.75%";
elem.style.top = "25%";
}
if (what == "A Whole New World"){
tooltipText = "<p>Fluffy has reached Evolution 8 Level 10! He levitates above the ground, then realizes he seems a bit like a showoff so he floats back down. He strikes a good balance between power and humility by just having his eyes glow a little bit; you have to admit it's a good look on him.</p><p>Anyways, Fluffy walks over to your Portal Device and gives it a good smack. He uses some nifty telepathic powers to inform you that you can now use your Portal Device to travel to a different Universe, one that he himself handpicked for its usefulness.</p><p>He continues to inform you that the Magma on this planet is beginning to harden, blocking later Spires behind impenetrable walls of Obsidian. If we want to have any hope of reaching them, we'll need a tremendous amount of energy from this new Universe!</p><p><b>You can now travel back and forth between Universe 1 - \"The Helium Universe\", and Universe 2 - \"The Radon Universe\". See the top left of your Portal for more information.</b></p>";
costText += "<div class='maxCenter'><div class='btn btn-info' id='confirmTooltipBtn' onclick='cancelTooltip()'>Bring it on</div></div>";
game.global.lockTooltip = true;
elem.style.left = "33.75%";
elem.style.top = "25%";
}
if (what == "Change Universe"){
var nextUniverse, newResource, oldResource, oldPet, newPet;
if (portalUniverse == 1){
nextUniverse = "2";
newResource = "Radon";
oldResource = "Helium";
oldPet = "Fluffy";
newPet = "Scruffy";
}
else {
nextUniverse = "1";
newResource = "Helium";
oldResource = "Radon";