-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathui.js
More file actions
2171 lines (1969 loc) · 178 KB
/
Copy pathui.js
File metadata and controls
2171 lines (1969 loc) · 178 KB
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
function processInputs() {
thisIsHinted = false;
var peeked = false;
for (var i = 0; i < Locations.length; i++) {
const locationId = Locations[i];
// Break early if check is already known.
if(Check[locationId] != "unknown") {
if (!checkedYet[i-1]) {
checkedYet[i-1] = true;
if (i > lastItem) {
checkLocation = "Song";
}
else if (locationId.startsWith("h_")) {
checkLocation = "Hint";
}
else {
checkLocation = AreaNames[AreaNamesIndex];
}
textBlock += "" + tempHours + "h " + tempMinutes + "m " + tempSeconds + "s " + checkLocation + ": " + Names[i] + "\n";
}
continue;
}
let input = document.getElementById(locationId).value;
// Break early if no user input.
if (input == '' || input == "???") {
continue;
}
//PATH
if (input.startsWith("1")) {
input = input.slice(1);
Object.keys(areaInputs).forEach(key => {
if (input.startsWith(key)) {
input = input.replace(key,"");
for (var j = 0; j < pathInputs.length; j++) {
if (input.startsWith(pathInputs[j])) {
let wothNum = 8;
for (var k = 1; k < wothNum; k++) {
if (document.getElementById("woth_input" + k).value == "") {
document.getElementById("woth_input" + k).value = areaInputs[key];
document.getElementById("path_boss" + k).value = pathInputs[j];
document.getElementById(locationId).value = "";
wothAndBarrenProcessing();
flash();
break;
}
}
}
}
}
});
continue;
}
//BARREN
if (input.startsWith("2")) {
input = input.slice(1);
Object.keys(areaInputs).forEach(key => {
if (input.startsWith(key)) {
let barrenNum = 8;
for (var j = 1; j < barrenNum; j++) {
if (document.getElementById("barren_input" + j).value == "") {
document.getElementById("barren_input" + j).value = areaInputs[key];
document.getElementById(locationId).value = "";
wothAndBarrenProcessing();
flash();
break;
}
}
}
});
continue;
}
//ALWAYS
if (input.startsWith("3")) {
input = input.slice(1);
Object.keys(alwaysTable).forEach(key => {
if (input.startsWith(key)) {
input = input.slice(1);
if (inputs.includes(input)) {
document.getElementById(alwaysTable[key]).value = input.charAt(0).toUpperCase() + input.slice(1);
document.getElementById(locationId).value = "";
flash();
}
}
});
continue;
}
//SOMETIMES
if (input.startsWith("4")) {
input = input.slice(1);
Object.keys(sometimesTableReduced).forEach(key => {
if (input.startsWith(key)) {
input = input.replace(key,'');
if (inputs.includes(input.slice(0,1))) {
if (!key.startsWith("4")) {
document.getElementById(sometimesTableReduced[key]).value = input.charAt(0).toUpperCase() + input.slice(1);
document.getElementById(locationId).value = "";
flash();
}
else {
let firstInput = input.charAt(0).toUpperCase();
if (!input.startsWith("a") && !input.startsWith("q") && !input.startsWith("x")) {
firstInput += input.slice(1);
input = input.slice(2);
}
else {
input = input.slice(1);
}
if (inputs.includes(input)) {
document.getElementById(sometimesTableReduced[key][0]).value = firstInput;
document.getElementById(sometimesTableReduced[key][1]).value = input.charAt(0).toUpperCase() + input.slice(1);
document.getElementById(locationId).value = "";
flash();
}
}
}
}
});
continue;
}
//DUNGEON ENTRANCES
if (input.startsWith("9")) {
input = input.slice(1);
if (input.length == 22) {
document.getElementById("mark_ER_Dungeons").value = input;
document.getElementById(locationId).value = "";
updateDungeonER();
flash();
}
continue;
}
//MEDALLIONS
if (input.startsWith("0")) {
input = input.slice(1);
if (input.length == 12) {
document.getElementById("markMedallions").value = input;
document.getElementById(locationId).value = "";
stoneMedallionInput();
flash();
}
continue;
}
// Break early if input is invalid.
var inputIdx = inputs.indexOf(input.toLowerCase());
if (inputIdx === -1) {
continue;
}
// don't allow inputting the same item twice if it's not a duplicate item
if(!DuplicateItems.includes(Items2[inputIdx]) && Known[Items2[inputIdx]]) {
continue;
}
// if it is a duplicate item and all copies are already known, don't allow the input
if(Items2[inputIdx] == "bomb_bag" && Known["bomb_bag3"]) continue;
if(Items2[inputIdx] == "bow" && Known["bow3"]) continue;
if(Items2[inputIdx] == "slingshot" && Known["slingshot3"]) continue;
if(Items2[inputIdx] == "strength" && Known["strength3"]) continue;
if(Items2[inputIdx] == "bottle" && Known["bottle4"]) continue;
if(Items2[inputIdx] == "hookshot" && Known["hookshot2"]) continue;
if(Items2[inputIdx] == "magic" && Known["magic2"]) continue;
if(Items2[inputIdx] == "scale" && Known["scale2"]) continue;
if(Items2[inputIdx] == "wallet" && Known["wallet3"]) continue;
if((Items2[inputIdx] == "prescription" || Items2[inputIdx] == "claim_check") && (Known["prescription"] || Known["claim_check"])) continue;
for (var areaIdx = AreaIndexes.length - 1; areaIdx > 0; areaIdx--) {
if (i < AreaIndexes[areaIdx]) {
var AreaNamesIndex = areaIdx;
} else {
break;
}
}
if(locationId == "zeldasSpot")
AreaNamesIndex = AreaNames.indexOf("");
else if(locationId == "eponasSpot")
AreaNamesIndex = AreaNames.indexOf("Ranch");
else if(locationId == "oot")
AreaNamesIndex = AreaNames.indexOf("Field");
else if(locationId == "serenadeSpot")
AreaNamesIndex = AreaNames.indexOf("Ice");
else if(locationId == "stormsSpot" || locationId == "nocturneSpot")
AreaNamesIndex = AreaNames.indexOf("Kakariko");
else if(locationId == "sunsSpot")
AreaNamesIndex = AreaNames.indexOf("Graveyard");
else if(locationId == "requiemSpot")
AreaNamesIndex = AreaNames.indexOf("Colossus");
else if(locationId == "sariasSpot" || locationId == "minuetSpot")
AreaNamesIndex = AreaNames.indexOf("SFM");
else if(locationId == "preludeSpot")
AreaNamesIndex = AreaNames.indexOf("ToT");
else if(locationId == "boleroSpot")
AreaNamesIndex = AreaNames.indexOf("Crater");
if(input == inputs[ItemNames2.indexOf("Bombchus")]) {
if(Player.has_chus == false && !hinted && !peeked)
enableChus();
}
hinted = false;
if (isLowerCase(input.charAt(0)) && isUpperCase(input.charAt(input.length-1))) {
peeked = true;
document.getElementById(locationId).value = input.toLowerCase();
}
else if (isUpperCase(input.charAt(0))) {
hinted = true;
document.getElementById(locationId).value = input.toLowerCase();
}
// Input may have been lowercased or emptied, so set it again.
input = document.getElementById(locationId).value;
if (inputIdx == 0) {
if (i > lastItem) {
songItemChecked = true;
}
if (isBoss.includes(locationId) && hinted) {
Check[document.getElementById(locationId).id] = "junk";
forcedDisplay[i] = true;
continue;
}
document.getElementById("text_" + locationId).dispatchEvent(new Event('mousedown'));
flash();
continue;
}
if (inputIdx == 1) {
if (!hinted) {
document.getElementById("text_" + locationId).dispatchEvent(new Event('mousedown'));
}
else {
Check[document.getElementById(locationId).id] = "small_key";
forcedDisplay[i] = true;
}
continue;
}
if (inputIdx == 2) {
if (!hinted) {
document.getElementById("text_" + locationId).dispatchEvent(new Event('mousedown'));
}
else {
Check[document.getElementById(locationId).id] = "boss_key";
forcedDisplay[i] = true;
}
continue;
}
for (var k = 0; k <= 5; k++) {
if (k == 0) {var duplicate = "";}
else {var duplicate = k + "";}
if (!Known[Items2[inputIdx] + duplicate]) {
Check[document.getElementById(locationId).id] = Items2[inputIdx] + duplicate;
Location[Items2[inputIdx] + duplicate] = document.getElementById(locationId).id;
if (Items2[inputIdx] == "prescription" || Items2[inputIdx] == "claim_check") {document.getElementById("trade_location").innerHTML = ItemNames2[inputIdx] + " → " + AreaNames[AreaNamesIndex] + ": " + Names[i];} else if (Items2[inputIdx] == "big_poe") {document.getElementById("bottle"+duplicate+"_location").innerHTML = ItemNames2[inputIdx] + " → " + AreaNames[AreaNamesIndex] + ": " + Names[i];} else if (inputIdx < Items2.indexOf("lullaby") && inputIdx != 4) {document.getElementById(Items2[inputIdx] + duplicate + "_location").innerHTML = ItemNames2[inputIdx] + " → " + AreaNames[AreaNamesIndex] + ": " + Names[i];}
Known[Items2[inputIdx] + duplicate] = true;
if (inputs[inputIdx] == "big") {Known.big_poe = true; Location.big_poe = document.getElementById(locationId).id;}
if (!hinted && !peeked){
Player[Items2[inputIdx] + duplicate] = true;
if(inputs[inputIdx] == "big")
Player["big_poe"] = true;
}
if (hinted) {Hinted[locationId] = true;}
if(hintedInput == inputs[inputIdx])
thisIsHinted = true;
junkItem(document.getElementById(locationId));
if (!Player[Items2[inputIdx] + duplicate] && i <= lastItem) {forcedDisplay[i] = true; document.getElementById(locationId).style.backgroundImage= ""; document.getElementById(locationId).value = document.getElementById(locationId).value.toUpperCase()}
thisIsHinted = false;
hintedInput = "";
if (inputIdx<Items2.indexOf("lullaby") && i > lastItem) {
songItemChecked = true;
}
trackAnimalQuest();
break;
}
}
}
}
function hideCheck(locationID) {
if (document.getElementById("shiftChecks").value == "YES") {
document.getElementById(locationID).style.display = "none";
if (Locations.indexOf(locationID) <= lastItem) {
document.getElementById("text_" + locationID).style.display = "none";
document.getElementById("br_" + locationID).style.display = "none";
}
}
else {
document.getElementById(locationID).style.display = "none";
document.getElementById(locationID).style.visibility = "hidden";
if (Locations.indexOf(locationID) <= lastItem) {
document.getElementById(locationID).style.display = "inline-block";
document.getElementById("text_" + locationID).style.display = "inline-block";
document.getElementById("br_" + locationID).style.display = "inline-block";
document.getElementById("text_" + locationID).style.visibility = "hidden";
document.getElementById("br_" + locationID).style.visibility = "hidden";
}
}
}
function stoneMedallionInput() {
var str = document.getElementById("markStones").value.substring(0,2);
if (!hasChangedMedal) {
document.getElementById("text_dung7").style.color = "yellow";
document.getElementById("text_dung8").style.color = "yellow";
document.getElementById("text_dung9").style.color = "yellow";
}
dekuPlacement = "unknown";
dodongosPlacement = "unknown";
jabuPlacement = "unknown";
forestPlacement = "unknown";
firePlacement = "unknown";
waterPlacement = "unknown";
spiritPlacement = "unknown";
shadowPlacement = "unknown";
pocketPlacement = "unknown";
for (var i = 1; i<=9; i++) {
Logic["dung" + i] = "unknown";
document.getElementById("dung" + i + "_icon").src = dungIconSources[i-1];
document.getElementById("dung" + i + "_req1").removeAttribute('src');
document.getElementById("dung" + i + "_req2").removeAttribute('src');
document.getElementById("dung" + i + "_req3").removeAttribute('src');
document.getElementById("dung" + i + "_req4").removeAttribute('src');
document.getElementById("dung" + i + "_req5").removeAttribute('src');
document.getElementById("dung" + i + "_req1").removeAttribute('class');
document.getElementById("dung" + i + "_req2").removeAttribute('class');
document.getElementById("dung" + i + "_req3").removeAttribute('class');
document.getElementById("dung" + i + "_req4").removeAttribute('class');
document.getElementById("dung" + i + "_req5").removeAttribute('class');
document.getElementById("dung" + i + "_text2").innerHTML ="";
document.getElementById("dung" + i + "_text3").innerHTML ="";
if (i <= 3) {document.getElementById("dung" + i + "_icon").className = "stones";}
if (i > 3) {document.getElementById("dung" + i + "_icon").className = "medallions";}
if (str == "de") {Logic["dung" + i] = "deku"; document.getElementById("text_dung" + i).className="dung" + i; document.getElementById("text_dung" + i).innerHTML = "dek"; document.getElementById("dung" + i + "_req1").className = "requirements"; document.getElementById("dung" + i + "_req1").src=Player.kokiri_sword_img; dekuPlacement = "dung" + i;}
else if (str == "do") {Logic["dung" + i]= "dodongos"; document.getElementById("text_dung" + i).className="dung" + i; document.getElementById("text_dung" + i).innerHTML = "dod"; document.getElementById("dung" + i + "_req1").className = "requirements"; document.getElementById("dung" + i + "_req1").src=Player.bomb_img; dodongosPlacement = "dung" + i;}
else if (str == "ja") {Logic["dung" + i] = "jabu"; document.getElementById("text_dung" + i).className="dung" + i; document.getElementById("text_dung" + i).innerHTML = "jab"; document.getElementById("dung" + i + "_req1").className = "requirements"; document.getElementById("dung" + i + "_req2").className = "requirements"; document.getElementById("dung" + i + "_req1").src=Player.rutos_letter_img; document.getElementById("dung" + i + "_req2").src=Player.boomerang_img; jabuPlacement = "dung" + i;}
else if (str == "fo") {Logic["dung" + i] = "forest"; document.getElementById("text_dung" + i).className="dung" + i; document.getElementById("text_dung" + i).innerHTML = "for"; document.getElementById("dung" + i + "_req1").className = "requirements"; document.getElementById("dung" + i + "_req2").className = "requirements"; document.getElementById("dung" + i + "_req3").className = "requirements"; document.getElementById("dung" + i + "_req1").src=Player.hookshot_img; document.getElementById("dung" + i + "_req2").src=Player.bow_img; document.getElementById("dung" + i + "_req3").src=Player.goron_bracelet_img; forestPlacement = "dung" + i;}
else if (str == "fi") {Logic["dung" + i] = "fire"; document.getElementById("text_dung" + i).className="dung" + i; document.getElementById("text_dung" + i).innerHTML = "fir"; document.getElementById("dung" + i + "_req1").className = "requirements"; document.getElementById("dung" + i + "_req1").src=Player.hammer_img; firePlacement = "dung" + i;}
else if (str == "wa") {Logic["dung" + i] = "water"; document.getElementById("text_dung" + i).className="dung" + i; document.getElementById("text_dung" + i).innerHTML = "wat"; document.getElementById("dung" + i + "_req1").className = "requirements"; document.getElementById("dung" + i + "_req2").className = "requirements"; document.getElementById("dung" + i + "_req3").className = "requirements"; document.getElementById("dung" + i + "_req1").src=Player.iron_boots_img; document.getElementById("dung" + i + "_text2").innerHTML ="/"; document.getElementById("dung" + i + "_req2").src=Player.golden_scale_img; document.getElementById("dung" + i + "_text3").innerHTML = "+"; document.getElementById("dung" + i + "_req3").src=Player.longshot_img; waterPlacement = "dung" + i;}
else if (str == "sh") {Logic["dung" + i] = "shadow"; document.getElementById("text_dung" + i).className="dung" + i; document.getElementById("text_dung" + i).innerHTML = "sha"; document.getElementById("dung" + i + "_req1").className = "requirements"; document.getElementById("dung" + i + "_req2").className = "requirements"; document.getElementById("dung" + i + "_req3").className = "requirements"; document.getElementById("dung" + i + "_req4").className = "requirements"; document.getElementById("dung" + i + "_req5").className = "requirements"; document.getElementById("dung" + i + "_req1").src=Player.dins_fire_img; document.getElementById("dung" + i + "_req2").src =Player.magic_img; document.getElementById("dung" + i + "_req3").src=Player.hover_boots_img; document.getElementById("dung" + i + "_req4").src=Player.bomb_img; document.getElementById("dung" + i + "_req5").src=Player.hookshot_img; shadowPlacement = "dung" + i;}
else if (str == "sp") {Logic["dung" + i] = "spirit"; document.getElementById("text_dung" + i).className="dung" + i; document.getElementById("text_dung" + i).innerHTML = "spi"; document.getElementById("dung" + i + "_req1").className = "requirements"; document.getElementById("dung" + i + "_req2").className = "requirements"; document.getElementById("dung" + i + "_req3").className = "requirements"; document.getElementById("dung" + i + "_req4").className = "requirements"; document.getElementById("dung" + i + "_req1").src=Player.silver_gauntlets_img; document.getElementById("dung" + i + "_req2").src=Player.mirror_shield_img; document.getElementById("dung" + i + "_req3").src=Player.bomb_img; document.getElementById("dung" + i + "_req4").src=Player.hookshot_img; spiritPlacement = "dung" + i;}
else if (str == "fr" || str == "kk") {Logic["dung" + i] = "pocket"; document.getElementById("text_dung" + i).className="dung" + i; document.getElementById("text_dung" + i).innerHTML = "pok"; pocketPlacement = "dung" + i;}
else {
document.getElementById("dung" + i + "_icon").className = "empty";
}
if (i == 1) {str = document.getElementById("markStones").value.substring(2,4);}
else if (i == 2) {str = document.getElementById("markStones").value.substring(4,6);}
else if (i == 3) {str = document.getElementById("markMedallions").value.substring(0,2); if (document.getElementById("markMedallions").value.length >= 12){str = document.getElementById("markMedallions").value.substring(2,4);} }
else if (i == 4) {str = document.getElementById("markMedallions").value.substring(2,4); if (document.getElementById("markMedallions").value.length >= 12){str = document.getElementById("markMedallions").value.substring(4,6);} }
else if (i == 5) {str = document.getElementById("markMedallions").value.substring(4,6); if (document.getElementById("markMedallions").value.length >= 12){str = document.getElementById("markMedallions").value.substring(6,8);} }
else if (i == 6) {str = document.getElementById("markMedallions").value.substring(6,8); if (document.getElementById("markMedallions").value.length >= 12){str = document.getElementById("markMedallions").value.substring(8,10);} }
else if (i == 7) {str = document.getElementById("markMedallions").value.substring(8,10); if (document.getElementById("markMedallions").value.length >= 12){str = document.getElementById("markMedallions").value.substring(10,12);} }
else if (i == 8) {str = document.getElementById("markMedallions").value.substring(10,12); if (document.getElementById("markMedallions").value.length >= 12){str = document.getElementById("markMedallions").value.substring(0,2);} }
}
if (Logic.dung7 != "unknown") {Logic.shadow_medallion = Logic.dung7; document.getElementById("text_dung7").style.color = "rgb(238, 130, 238)"; document.getElementById("dung7_icon").src = "./normal/items/shadow.png";}
if (Logic.dung8 != "unknown") {Logic.spirit_medallion = Logic.dung8; document.getElementById("text_dung8").style.color = "rgb(255, 165, 0)"; document.getElementById("dung8_icon").src = "./normal/items/spirit.png";}
for (var i = 1; i<= 9; i++) {
if (dekuPlacement == "unknown" && Logic["dung" + i] == "unknown") {if (Logic.dung4 != "unknown" && Logic.dung5 != "unknown" && Logic.dung6 != "unknown" && Logic.dung7 != "unknown" && Logic.dung8 != "unknown" && Logic.dung9 != "unknown") {Logic["dung" + i] = "deku"; document.getElementById("dung" + i + "_icon").src = dungIconSources[i-1];} else if (Logic.dung1 != "unknown" && Logic.dung2 != "unknown" && Logic.dung3 != "unknown" && Logic.dung4 != "unknown" && Logic.dung5 != "unknown" && Logic.dung6 != "unknown") {Logic["dung" + i] = "deku"; document.getElementById("dung" + i + "_icon").src = dungIconSources[8];} document.getElementById("text_dung" + i).className="dung" + i; document.getElementById("text_dung" + i).innerHTML = "dek"; document.getElementById("dung" + i + "_req1").className = "requirements"; document.getElementById("dung" + i + "_req1").src=Player.kokiri_sword_img; dekuPlacement = "dung" + i;}
else if (dodongosPlacement == "unknown" && Logic["dung" + i] == "unknown") {if (Logic.dung4 != "unknown" && Logic.dung5 != "unknown" && Logic.dung6 != "unknown" && Logic.dung7 != "unknown" && Logic.dung8 != "unknown" && Logic.dung9 != "unknown") {Logic["dung" + i] = "dodongos"; document.getElementById("dung" + i + "_icon").src = dungIconSources[i-1];} else if (Logic.dung1 != "unknown" && Logic.dung2 != "unknown" && Logic.dung3 != "unknown" && Logic.dung4 != "unknown" && Logic.dung5 != "unknown" && Logic.dung6 != "unknown") {Logic["dung" + i] = "dodongos"; document.getElementById("dung" + i + "_icon").src = dungIconSources[8];} document.getElementById("text_dung" + i).className="dung" + i; document.getElementById("text_dung" + i).innerHTML = "dod"; document.getElementById("dung" + i + "_req1").className = "requirements"; document.getElementById("dung" + i + "_req1").src=Player.bomb_img; dodongosPlacement = "dung" + i;}
else if (jabuPlacement == "unknown" && Logic["dung" + i] == "unknown") {if (Logic.dung4 != "unknown" && Logic.dung5 != "unknown" && Logic.dung6 != "unknown" && Logic.dung7 != "unknown" && Logic.dung8 != "unknown" && Logic.dung9 != "unknown") {Logic["dung" + i] = "jabu"; document.getElementById("dung" + i + "_icon").src = dungIconSources[i-1];} else if (Logic.dung1 != "unknown" && Logic.dung2 != "unknown" && Logic.dung3 != "unknown" && Logic.dung4 != "unknown" && Logic.dung5 != "unknown" && Logic.dung6 != "unknown") {Logic["dung" + i] = "jabu"; document.getElementById("dung" + i + "_icon").src = dungIconSources[8];} document.getElementById("text_dung" + i).className="dung" + i; document.getElementById("text_dung" + i).innerHTML = "jab"; document.getElementById("dung" + i + "_req1").className = "requirements"; document.getElementById("dung" + i + "_req2").className = "requirements"; document.getElementById("dung" + i + "_req1").src=Player.rutos_letter_img; document.getElementById("dung" + i + "_req2").src=Player.boomerang_img; jabuPlacement = "dung" + i;}
else if (forestPlacement == "unknown" && Logic["dung" + i] == "unknown") {if (Logic.dung4 != "unknown" && Logic.dung5 != "unknown" && Logic.dung6 != "unknown" && Logic.dung7 != "unknown" && Logic.dung8 != "unknown" && Logic.dung9 != "unknown") {Logic["dung" + i] = "forest"; document.getElementById("dung" + i + "_icon").src = dungIconSources[i-1];} else if (Logic.dung1 != "unknown" && Logic.dung2 != "unknown" && Logic.dung3 != "unknown" && Logic.dung4 != "unknown" && Logic.dung5 != "unknown" && Logic.dung6 != "unknown") {Logic["dung" + i] = "forest"; document.getElementById("dung" + i + "_icon").src = dungIconSources[8];} document.getElementById("text_dung" + i).className="dung" + i; document.getElementById("text_dung" + i).innerHTML = "for"; document.getElementById("dung" + i + "_req1").className = "requirements"; document.getElementById("dung" + i + "_req2").className = "requirements"; document.getElementById("dung" + i + "_req3").className = "requirements"; document.getElementById("dung" + i + "_req1").src=Player.hookshot_img; document.getElementById("dung" + i + "_req2").src=Player.bow_img; document.getElementById("dung" + i + "_req3").src=Player.goron_bracelet_img; forestPlacement = "dung" + i;}
else if (firePlacement == "unknown" && Logic["dung" + i] == "unknown") {if (Logic.dung4 != "unknown" && Logic.dung5 != "unknown" && Logic.dung6 != "unknown" && Logic.dung7 != "unknown" && Logic.dung8 != "unknown" && Logic.dung9 != "unknown") {Logic["dung" + i] = "fire"; document.getElementById("dung" + i + "_icon").src = dungIconSources[i-1];} else if (Logic.dung1 != "unknown" && Logic.dung2 != "unknown" && Logic.dung3 != "unknown" && Logic.dung4 != "unknown" && Logic.dung5 != "unknown" && Logic.dung6 != "unknown") {Logic["dung" + i] = "fire"; document.getElementById("dung" + i + "_icon").src = dungIconSources[8];} document.getElementById("text_dung" + i).className="dung" + i; document.getElementById("text_dung" + i).innerHTML = "fir"; document.getElementById("dung" + i + "_req1").className = "requirements"; document.getElementById("dung" + i + "_req1").src=Player.hammer_img; firePlacement = "dung" + i;}
else if (waterPlacement == "unknown" && Logic["dung" + i] == "unknown") {if (Logic.dung4 != "unknown" && Logic.dung5 != "unknown" && Logic.dung6 != "unknown" && Logic.dung7 != "unknown" && Logic.dung8 != "unknown" && Logic.dung9 != "unknown") {Logic["dung" + i] = "water"; document.getElementById("dung" + i + "_icon").src = dungIconSources[i-1];} else if (Logic.dung1 != "unknown" && Logic.dung2 != "unknown" && Logic.dung3 != "unknown" && Logic.dung4 != "unknown" && Logic.dung5 != "unknown" && Logic.dung6 != "unknown") {Logic["dung" + i] = "water"; document.getElementById("dung" + i + "_icon").src = dungIconSources[8];} document.getElementById("text_dung" + i).className="dung" + i; document.getElementById("text_dung" + i).innerHTML = "wat"; document.getElementById("dung" + i + "_req1").className = "requirements"; document.getElementById("dung" + i + "_req2").className = "requirements"; document.getElementById("dung" + i + "_req3").className = "requirements"; document.getElementById("dung" + i + "_req1").src=Player.iron_boots_img; document.getElementById("dung" + i + "_text2").innerHTML ="/"; document.getElementById("dung" + i + "_req2").src=Player.golden_scale_img; document.getElementById("dung" + i + "_text3").innerHTML = "+"; document.getElementById("dung" + i + "_req3").src=Player.longshot_img; waterPlacement = "dung" + i;}
else if (shadowPlacement == "unknown" && Logic["dung" + i] == "unknown") {if (Logic.dung4 != "unknown" && Logic.dung5 != "unknown" && Logic.dung6 != "unknown" && Logic.dung7 != "unknown" && Logic.dung8 != "unknown" && Logic.dung9 != "unknown") {Logic["dung" + i] = "shadow"; document.getElementById("dung" + i + "_icon").src = dungIconSources[i-1];} else if (Logic.dung1 != "unknown" && Logic.dung2 != "unknown" && Logic.dung3 != "unknown" && Logic.dung4 != "unknown" && Logic.dung5 != "unknown" && Logic.dung6 != "unknown") {Logic["dung" + i] = "shadow"; document.getElementById("dung" + i + "_icon").src = dungIconSources[8];} document.getElementById("text_dung" + i).className="dung" + i; document.getElementById("text_dung" + i).innerHTML = "sha"; document.getElementById("dung" + i + "_req1").className = "requirements"; document.getElementById("dung" + i + "_req2").className = "requirements"; document.getElementById("dung" + i + "_req3").className = "requirements"; document.getElementById("dung" + i + "_req4").className = "requirements"; document.getElementById("dung" + i + "_req5").className = "requirements"; document.getElementById("dung" + i + "_req1").src=Player.dins_fire_img; document.getElementById("dung" + i + "_req2").src =Player.magic_img; document.getElementById("dung" + i + "_req3").src=Player.hover_boots_img; document.getElementById("dung" + i + "_req4").src=Player.bomb_img; document.getElementById("dung" + i + "_req5").src=Player.hookshot_img; shadowPlacement = "dung" + i;}
else if (spiritPlacement == "unknown" && Logic["dung" + i] == "unknown") {if (Logic.dung4 != "unknown" && Logic.dung5 != "unknown" && Logic.dung6 != "unknown" && Logic.dung7 != "unknown" && Logic.dung8 != "unknown" && Logic.dung9 != "unknown") {Logic["dung" + i] = "spirit"; document.getElementById("dung" + i + "_icon").src = dungIconSources[i-1];} else if (Logic.dung1 != "unknown" && Logic.dung2 != "unknown" && Logic.dung3 != "unknown" && Logic.dung4 != "unknown" && Logic.dung5 != "unknown" && Logic.dung6 != "unknown") {Logic["dung" + i] = "spirit"; document.getElementById("dung" + i + "_icon").src = dungIconSources[8];} document.getElementById("text_dung" + i).className="dung" + i; document.getElementById("text_dung" + i).innerHTML = "spi"; document.getElementById("dung" + i + "_req1").className = "requirements"; document.getElementById("dung" + i + "_req2").className = "requirements"; document.getElementById("dung" + i + "_req3").className = "requirements"; document.getElementById("dung" + i + "_req4").className = "requirements"; document.getElementById("dung" + i + "_req1").src=Player.silver_gauntlets_img; document.getElementById("dung" + i + "_req2").src=Player.mirror_shield_img; document.getElementById("dung" + i + "_req3").src=Player.bomb_img; document.getElementById("dung" + i + "_req4").src=Player.hookshot_img; spiritPlacement = "dung" + i;}
else if (pocketPlacement == "unknown" && Logic["dung" + i] == "unknown") {if (Logic.dung4 != "unknown" && Logic.dung5 != "unknown" && Logic.dung6 != "unknown" && Logic.dung7 != "unknown" && Logic.dung8 != "unknown" && Logic.dung9 != "unknown") {Logic["dung" + i] = "pocket"; document.getElementById("dung" + i + "_icon").src = dungIconSources[i-1];} else if (Logic.dung1 != "unknown" && Logic.dung2 != "unknown" && Logic.dung3 != "unknown" && Logic.dung4 != "unknown" && Logic.dung5 != "unknown" && Logic.dung6 != "unknown") {Logic["dung" + i] = "pocket"; document.getElementById("dung" + i + "_icon").src = dungIconSources[8];} document.getElementById("text_dung" + i).className="dung" + i; document.getElementById("text_dung" + i).innerHTML = "pok"; pocketPlacement = "dung" + i;}
if (i <= 3 && Logic.dung4 != "unknown" && Logic.dung5 != "unknown" && Logic.dung6 != "unknown" && Logic.dung7 != "unknown" && Logic.dung8 != "unknown" && Logic.dung9 != "unknown") {document.getElementById("dung" + i + "_icon").className = "stones"; }
if (i > 3 && Logic.dung1 != "unknown" && Logic.dung2 != "unknown" && Logic.dung3 != "unknown" && Logic.dung4 != "unknown" && Logic.dung5 != "unknown" && Logic.dung6 != "unknown") {document.getElementById("dung" + i + "_icon").className = "medallions"; }
}
Logic.emerald = Logic.dung1;
Logic.ruby = Logic.dung2;
Logic.sapphire = Logic.dung3;
Logic.forest_medallion_location = Logic.dung4;
Logic.fire_medallion_location = Logic.dung5;
Logic.water_medallion_location = Logic.dung6;
Logic.generic1 = Logic.dung7;
Logic.generic2 = Logic.dung8;
Logic.generic3 = Logic.dung9;
updateChecklistRewards();
dungeonHeaderVisibility();
}
function dungeonHeaderVisibility() {
let visibleChecks = [];
for (var i = 0; i < Locations.length; i++) {
if (document.getElementById(Locations[i]).style.visibility == "visible" && document.getElementById(Locations[i]).style.display != "none") {
visibleChecks.push(Locations[i]);
}
}
const elements = document.querySelectorAll('[data-dungeon]');
elements.forEach((el) => {
if (visibleChecks.some(item => item.includes(el.dataset.dungeon + "_"))) {
el.style.visibility = "visible";
el.style.display = "inline-block";
}
else {
if (document.getElementById("shiftChecks").value == "NO") {
el.style.visibility = "hidden";
}
else {
el.style.display = "none";
}
}
});
}
function updateChecklistRewards() {
const rewardList = ["emerald", "ruby", "sapphire", "forest", "fire", "water", "shadow", "spirit", "light"];
const validDungeons = new Set(["deku", "dodongos", "jabu", "forest", "fire", "water", "shadow", "spirit"]);
rewardList.forEach((rewardName, index) => {
const logicKey = "dung" + (index + 1);
// Get the name of the dungeon assigned to this reward (e.g., "deku")
const dungeonName = Logic[logicKey];
// Only update if the logic has a value AND that value is a valid dungeon ID
if (dungeonName && validDungeons.has(dungeonName)) {
const element = document.getElementById("reward_" + dungeonName);
if (element) {
// Construct the image variable name (e.g., "emerald_img")
element.src = Player[rewardName + "_img"];
element.style.visibility = "visible";
}
}
});
}
function updateSpawnInputs() {
if (document.getElementById("markChildLocation").value.toLowerCase() == spawnInputs[spawnNames.indexOf("DMC by Goron City")].toLowerCase()) {Spawn.child_lower_dmc = true;} else {Spawn.child_lower_dmc = false;}
if (document.getElementById("markChildLocation").value.toLowerCase() == spawnInputs[spawnNames.indexOf("DMC fountain")].toLowerCase()) {Spawn.child_lower_dmc = true; Spawn.child_lower_dmc_fairy = true;} else {Spawn.child_lower_dmc_fairy = false;}
if (document.getElementById("markChildLocation").value.toLowerCase() == spawnInputs[spawnNames.indexOf("DMC by trail")].toLowerCase()) {Spawn.child_upper_dmc = true;} else {Spawn.child_upper_dmc = false;}
if (document.getElementById("markChildLocation").value.toLowerCase() == spawnInputs[spawnNames.indexOf("trail fairy")].toLowerCase()) {Spawn.child_upper_dmc = true; Spawn.child_dmt_fairy = true;} else {Spawn.child_dmt_fairy = false;}
if (document.getElementById("markChildLocation").value.toLowerCase() == spawnInputs[spawnNames.indexOf("trail fairy(ool)")].toLowerCase()) {Spawn.child_upper_dmc = true; Spawn.child_dmt_fairy = true; Spawn.child_dmt_fairy_ool = true;} else {Spawn.child_dmt_fairy_ool = false;}
if (document.getElementById("markChildLocation").value.toLowerCase() == spawnInputs[spawnNames.indexOf("fortress")].toLowerCase()) {Spawn.child_gv_gf = true;} else {Spawn.child_gv_gf = false;}
if (document.getElementById("markChildLocation").value.toLowerCase() == spawnInputs[spawnNames.indexOf("waste")].toLowerCase()) {Spawn.child_wasteland = true;} else {Spawn.child_wasteland = false;}
if (document.getElementById("markChildLocation").value.toLowerCase() == spawnInputs[spawnNames.indexOf("dins fairy")].toLowerCase()) {Spawn.child_hyrule_fairy = true;} else {Spawn.child_hyrule_fairy = false;}
if (document.getElementById("markChildLocation").value.toLowerCase() == spawnInputs[spawnNames.indexOf("domain")].toLowerCase()) {Spawn.child_zd = true;} else {Spawn.child_zd = false;}
if (document.getElementById("markChildLocation").value.toLowerCase() == spawnInputs[spawnNames.indexOf("river")].toLowerCase()) {Spawn.child_zr = true;} else {Spawn.child_zr = false;}
if (document.getElementById("markChildLocation").value.toLowerCase() == spawnInputs[spawnNames.indexOf("colossus")].toLowerCase()) {Spawn.child_colossus = true;} else {Spawn.child_colossus = false;}
if (document.getElementById("markChildLocation").value.toLowerCase() == spawnInputs[spawnNames.indexOf("fountain")].toLowerCase()) {Spawn.child_zf = true;} else {Spawn.child_zf = false;}
if (document.getElementById("markChildLocation").value.toLowerCase() == spawnInputs[spawnNames.indexOf("fountain fairy")].toLowerCase()) {Spawn.child_zf_fairy = true;Spawn.child_zf = true;} else {Spawn.child_zf_fairy = false;}
if (document.getElementById("markChildLocation").value.toLowerCase() == spawnInputs[spawnNames.indexOf("fountain fairy(ool)")].toLowerCase()) {Spawn.child_zf_fairy_ool = true;Spawn.child_zf = true;} else {Spawn.child_zf_fairy_ool = false;}
if (document.getElementById("markAdultLocation").value.toLowerCase() == spawnInputs[spawnNames.indexOf("DMC by Goron City")].toLowerCase()) {Spawn.adult_lower_dmc = true;} else {Spawn.adult_lower_dmc = false;}
if (document.getElementById("markAdultLocation").value.toLowerCase() == spawnInputs[spawnNames.indexOf("DMC fountain")].toLowerCase()) {Spawn.adult_lower_dmc_fairy = true; Spawn.adult_lower_dmc = true;} else {Spawn.adult_lower_dmc_fairy = false;}
if (document.getElementById("markAdultLocation").value.toLowerCase() == spawnInputs[spawnNames.indexOf("DMC by trail")].toLowerCase()) {Spawn.adult_upper_dmc = true;} else {Spawn.adult_upper_dmc = false;}
if (document.getElementById("markAdultLocation").value.toLowerCase() == spawnInputs[spawnNames.indexOf("trail fairy")].toLowerCase()) {Spawn.adult_upper_dmc = true; Spawn.adult_dmt_fairy = true;} else {Spawn.adult_dmt_fairy = false;}
if (document.getElementById("markAdultLocation").value.toLowerCase() == spawnInputs[spawnNames.indexOf("trail fairy(ool)")].toLowerCase()) {Spawn.adult_upper_dmc = true; Spawn.adult_dmt_fairy = true; Spawn.adult_dmt_fairy_ool = true;} else {Spawn.adult_dmt_fairy_ool = false;}
if (document.getElementById("markAdultLocation").value.toLowerCase() == spawnInputs[spawnNames.indexOf("fortress")].toLowerCase()) {Spawn.adult_gf = true;} else {Spawn.adult_gf = false;}
if (document.getElementById("markAdultLocation").value.toLowerCase() == spawnInputs[spawnNames.indexOf("waste")].toLowerCase()) {Spawn.adult_wasteland = true;} else {Spawn.adult_wasteland = false;}
if (document.getElementById("markAdultLocation").value.toLowerCase() == spawnInputs[spawnNames.indexOf("goron shop")].toLowerCase()) {Spawn.adult_gc_shop = true;} else {Spawn.adult_gc_shop = false;}
if (document.getElementById("markAdultLocation").value.toLowerCase() == spawnInputs[spawnNames.indexOf("nocturne")].toLowerCase()) {Spawn.adult_nocturne = true;} else {Spawn.adult_nocturne = false;}
if (document.getElementById("markAdultLocation").value.toLowerCase() == spawnInputs[spawnNames.indexOf("fishing")].toLowerCase()) {Spawn.adult_fishing = true;} else {Spawn.adult_fishing = false;}
if (document.getElementById("markAdultLocation").value.toLowerCase() == spawnInputs[spawnNames.indexOf("sfm")].toLowerCase()) {Spawn.adult_meadow = true;} else {Spawn.adult_meadow = false;}
if (document.getElementById("markAdultLocation").value.toLowerCase() == spawnInputs[spawnNames.indexOf("domain")].toLowerCase()) {Spawn.adult_zd = true;} else {Spawn.adult_zd = false;}
if (document.getElementById("markAdultLocation").value.toLowerCase() == spawnInputs[spawnNames.indexOf("domain shop")].toLowerCase()) {Spawn.adult_zd_shop = true; Spawn.adult_zd = true;} else {Spawn.adult_zd_shop = false;}
if (document.getElementById("markAdultLocation").value.toLowerCase() == spawnInputs[spawnNames.indexOf("ogc fairy")].toLowerCase()) {Spawn.adult_ogc = true;} else {Spawn.adult_ogc = false;}
if (document.getElementById("markAdultLocation").value.toLowerCase() == spawnInputs[spawnNames.indexOf("ogc fairy(ool)")].toLowerCase()) {Spawn.adult_ogc_ool = true; Spawn.adult_ogc = true;} else {Spawn.adult_ogc_ool = false;}
if (document.getElementById("markAdultLocation").value.toLowerCase() == spawnInputs[spawnNames.indexOf("kak rooftop")].toLowerCase()) {Spawn.adult_kak_roof = true;} else {Spawn.adult_kak_roof = false;}
if (document.getElementById("markAdultLocation").value.toLowerCase() == spawnInputs[spawnNames.indexOf("colossus")].toLowerCase()) {Spawn.adult_colossus = true;} else {Spawn.adult_colossus = false;}
if (document.getElementById("markAdultLocation").value.toLowerCase() == spawnInputs[spawnNames.indexOf("fountain")].toLowerCase()) {Spawn.adult_zf = true;} else {Spawn.adult_zf = false;}
if (document.getElementById("markAdultLocation").value.toLowerCase() == spawnInputs[spawnNames.indexOf("fountain fairy")].toLowerCase()) {Spawn.adult_zf_fairy = true;Spawn.adult_zf = true;} else {Spawn.adult_zf_fairy = false;}
if (document.getElementById("markAdultLocation").value.toLowerCase() == spawnInputs[spawnNames.indexOf("fountain fairy(ool)")].toLowerCase()) {Spawn.adult_zf_fairy_ool = true;Spawn.adult_zf = true;} else {Spawn.adult_zf_fairy_ool = false;}
}
function linSoClick() {
var str = event.target.src.split("/");
str = str[str.length-1];
str = str.substring(0,str.length-4);
//if (str.endsWith("forest") || str.endsWith("fire") || str.endsWith("water")){return;}
if (str.endsWith("hookshot") && Player.hookshot) {Player.hookshot2 = true;}
else if (str.endsWith("longshot")) {Player.hookshot1 = false; Player.hookshot2 = false;}
else if (str.endsWith("hookshot")) {Player.hookshot1 = true;}
else if (str.endsWith("bracelet") && Player.goron_bracelet) {if (!Player.strength1) {Player.strength1 = true;} else if (!Player.strength2) {Player.strength2 = true;} else{Player.strength3 = true;}}
else if (str.endsWith("silver_gauntlets")) {Player.strength1 = true; Player.strength2 = true; Player.strength3 = true;}
else if (str.endsWith("golden_gauntlets")) {Player.strength1 = false; Player.strength2 = false; Player.strength3 = false;}
else if (str.endsWith("bracelet")) {Player.strength1 = true;}
else if (str.endsWith("silver_scale") && Player.scale1) {Player.scale2 = true;}
else if (str.endsWith("golden_scale")) {Player.scale1 = false; Player.scale2 = false;}
else if (str.endsWith("silver_scale")) {Player.scale1 = true;}
else if (str.endsWith("magic") && Player.magic) {Player.magic2 = true;}
else if (str.endsWith("magic_2")) {Player.magic1 = false; Player.magic2 = false;}
else if (str.endsWith("adults_wallet") && Player.adults_wallet) {Player.wallet2 = true;}
else if (str.endsWith("giants_wallet") && Player.wallet3) {Player.wallet1 = false; Player.wallet2 = false; Player.wallet3 = false; }
else if (str.endsWith("giants_wallet") && Player.giants_wallet) {Player.wallet3 = true;}
else if (str.endsWith("adults_wallet")) {Player.wallet1 = true;}
else if (str.endsWith("magic")) {Player.magic1 = true;}
else if (str.endsWith("bomb")) {if (Player.bomb_bag1) {Player.bomb_bag1 = false; Player.bomb_bag2 = false; Player.bomb_bag3 = false;} else {Player.bomb_bag1 = true;}}
else if (str.endsWith("claim_check") && Player.claim_check) {Player.claim_check = false;}
else if (str.endsWith("chicken1") && Player.chicken1) {Player.chicken1 = false; Player.blue_chicken = true;}
else if (str.endsWith("blue_chicken") && Player.blue_chicken) {Player.blue_chicken = false; Player.odd_mushroom = true;}
else if (str.endsWith("eyeball_frog") && Player.eyeball_frog) {Player.eyeball_frog = false; Player.eyedrops = true;}
else if (str.endsWith("broken_sword") && Player.broken_sword) {Player.broken_sword = false; Player.prescription = true;}
else if (str.endsWith("eyedrops") && Player.eyedrops) {Player.eyedrops = false; Player.claim_check = true;}
else if (str.endsWith("odd_mushroom") && Player.odd_mushroom) {Player.odd_mushroom = false; Player.antidote = true;}
else if (str.endsWith("antidote") && Player.antidote) {Player.antidote = false; Player.poachers_saw = true;}
else if (str.endsWith("egg1") && Player.egg1) {Player.egg1 = false; Player.chicken1 = true;}
else if (str.endsWith("poachers_saw") && Player.poachers_saw) {Player.poachers_saw = false; Player.broken_sword = true;}
else if (str.endsWith("prescription") && Player.prescription) {Player.prescription = false; Player.eyeball_frog = true;}
else if (str.endsWith("egg1")) {Player.egg1 = true;}
else if (str.endsWith("mask_of_truth") && Player.mask_of_truth) {Player.mask_of_truth = false;}
else if (str.endsWith("gerudo_mask") && Player.gerudo_mask) {Player.gerudo_mask = false; Player.mask_of_truth = true;}
else if (str.endsWith("zora_mask") && Player.zora_mask) {Player.zora_mask = false; Player.gerudo_mask = true;}
else if (str.endsWith("goron_mask") && Player.goron_mask) {Player.goron_mask = false; Player.zora_mask = true;}
else if (str.endsWith("bunny_hood") && Player.bunny_hood) {Player.bunny_hood = false; Player.goron_mask = true;}
else if (str.endsWith("spooky_mask") && Player.spooky_mask) {Player.spooky_mask = false; Player.bunny_hood = true;}
else if (str.endsWith("skull_mask") && Player.skull_mask) {Player.skull_mask = false; Player.spooky_mask = true;}
else if (str.endsWith("keaton_mask") && Player.keaton_mask) {Player.keaton_mask = false; Player.skull_mask = true;}
else if (str.endsWith("zeldas_letter") && Player.zeldas_letter) {Player.zeldas_letter = false; Player.keaton_mask = true;}
else if (str.endsWith("chicken2") && Player.chicken2) {Player.chicken2 = false; Player.zeldas_letter = true;}
else if (str.endsWith("egg2") && Player.egg2) {Player.egg2 = false; Player.chicken2 = true;}
else if (str.endsWith("egg2")) {Player.egg2 = true;}
else if (event.target.style.filter == "none") {Player[str] = false; Player[str+1] = false;}
else {Player[str] = true; Player[str+1] = true;}
midUpdate();
}
function junk() {
var type = event.button;
var locationID = event.target.id;
locationID = locationID.substring('text_'.length);
var locationIndex = Locations.indexOf(locationID);
if(!simActive) {
if(type == 0 && !event.altKey && Check[locationID] == "unknown") {
if(locationID.includes("forest_") && Player.forest_checks_remaining != 0) {Player.forest_checks_remaining -=1;}
else if(locationID.includes("fire_") && Player.fire_checks_remaining != 0 && locationID != "fire_grave") {Player.fire_checks_remaining -=1;}
else if(locationID.includes("water_") && Player.water_checks_remaining != 0) {Player.water_checks_remaining -=1;}
else if(locationID.includes("spirit_") && Player.spirit_checks_remaining != 0) {Player.spirit_checks_remaining -=1;}
else if(locationID.includes("shadow_") && Player.shadow_checks_remaining != 0) {Player.shadow_checks_remaining -=1;}
else if(locationID.includes("ganons_") && Player.ganons_checks_remaining != 0) {Player.ganons_checks_remaining -=1;}
else if(locationID.includes("gtg_") && Player.gtg_checks_remaining != 0) {Player.gtg_checks_remaining -=1;}
else if(locationID.includes("well_") && Player.well_checks_remaining != 0) {Player.well_checks_remaining -=1;}
Check[locationID]="junk";
}
else if(type == 1 || (type == 0 && event.altKey) || document.getElementById(locationID).value.toLowerCase() == inputs[inputNames.indexOf("Boss Key")]) {
if(locationID.includes("forest_") && !Player.forest_boss_key) {Player.forest_boss_key = true; Location.forest_boss_key = locationID;}
else if(locationID.includes("fire_") && !Player.fire_boss_key) {Player.fire_boss_key = true; Location.fire_boss_key = locationID;}
else if(locationID.includes("water_") && !Player.water_boss_key) {Player.water_boss_key = true; Location.water_boss_key = locationID;}
else if(locationID.includes("spirit_") && !Player.spirit_boss_key) {Player.spirit_boss_key = true; Location.spirit_boss_key = locationID;}
else if(locationID.includes("shadow_") && !Player.shadow_boss_key) {Player.shadow_boss_key = true; Location.shadow_boss_key = locationID;}
else if(locationID.includes("ganons_") && !Player.ganons_boss_key) {Player.ganons_boss_key = true; Location.ganons_boss_key = locationID;}
else {
if(locationID.startsWith("shop_")) {if (Shop_Logic[locationID] == "giants_wallet") {Shop_Logic[locationID] = "accessible"} else if (Shop_Logic[locationID] == "accessible") {Shop_Logic[locationID] = "adults_wallet"} else {Shop_Logic[locationID] = "giants_wallet"}}
return;
}
Check[locationID]="boss_key";
}
else if ((type == 2 && !event.altKey) || document.getElementById(locationID).value.toLowerCase() == inputs[inputNames.indexOf("Small Key")]) {
if(locationID.includes("forest_") && Player.current_forest_keys < 5) {Player.current_forest_keys +=1;}
else if(locationID.includes("fire_") && Player.current_fire_keys < 8) {Player.current_fire_keys +=1;}
else if(locationID.includes("water_") && Player.current_water_keys < 6) {Player.current_water_keys +=1;}
else if(locationID.includes("spirit_") && Player.current_spirit_keys < 5) {Player.current_spirit_keys +=1;}
else if(locationID.includes("shadow_") && Player.current_shadow_keys < 5) {Player.current_shadow_keys +=1;}
else if(locationID.includes("gtg_") && Player.current_gtg_keys < 9) {Player.current_gtg_keys +=1;}
else if(locationID.includes("well_") && Player.current_well_keys < 3) {Player.current_well_keys +=1;}
else if(locationID.includes("ganons_") && Player.current_ganons_keys < 2) {Player.current_ganons_keys +=1;}
else {
if ((type == 2 && !event.altKey)) {
if (event.target.style.color == "magenta") {event.target.style.color = "green";}
else {event.target.style.color = "magenta"; event.target.style.opacity = "1"}
}
return;
}
Check[locationID]="small_key";
}
else if (type == 2 && event.altKey) {
if (event.target.style.color == "magenta") {event.target.style.color = "green";}
else {event.target.style.color = "magenta"; event.target.style.opacity = "1"}
return;
}
else if (Check[locationID] == "unknown") {
Check[locationID]="junk";
}
hideCheck(locationID);
if (forcedDisplay[locationIndex]) {forcedDisplay[locationIndex] = false; Player[Check[locationID]] = true; if(Check[locationID] == "bombchus"){if(Player.has_chus == false){enableChus();} Check[locationID] = "junk";} Update(); }
if (Check[locationID] != "junk") {midUpdate();}
lastCheck.push(locationID);
Update();
if(!thisIsHinted && !hinted) {
highlightNextCheck(locationID);
}
}
else {
// Sim active
if(LocationToSpoilerName[locationID] == undefined)
console.log(locationID + " is not a known location in the sim");
if(((locationID == "kokiri_storms" && Area[AreaNames.indexOf("Kokiri")] != "barren") || ((locationID == "hyrule_remoteGrotto" || locationID == "hyrule_openGrotto" || locationID == "hyrule_marketGrotto") && Area[AreaNames.indexOf("Field")] != "barren") || (locationID == "lw_generic" && Area[AreaNames.indexOf("Lost Woods")] != "barren") || (locationID == "crater_grotto" && Area[AreaNames.indexOf("Crater")] != "barren") || (locationID == "kakariko_grotto" && Area[AreaNames.indexOf("Kakariko")] != "barren") || (locationID == "river_grotto" && Area[AreaNames.indexOf("River")] != "barren") || (locationID == "trail_storms" && Area[AreaNames.indexOf("Trail")] != "barren")) && Check["h_" + locationID] != "junk") {
document.getElementById("text_" + "h_"+ locationID).dispatchEvent(new Event('mousedown'));
}
var spoilerBossName = "";
if(locationID == "deku_queen_gohma") spoilerBossName = "Queen Gohma";
if(locationID == "dodongos_king_dodongo") spoilerBossName = "King Dodongo";
if(locationID == "jabu_barinade") spoilerBossName = "Barinade";
if(locationID == "forest_phantomGanon") spoilerBossName = "Phantom Ganon";
if(locationID == "fire_volvagia") spoilerBossName = "Volvagia";
if(locationID == "water_morpha") spoilerBossName = "Morpha";
if(locationID == "spirit_twinrova") spoilerBossName = "Twinrova";
if(locationID == "shadow_bongo") spoilerBossName = "Bongo Bongo";
if (spoilerBossName != "") {
if(SpoilerJSON["locations"][spoilerBossName] == "Light Medallion") document.getElementById("markMedallions").value = document.getElementById("markMedallions").value.replaceAt(0,rewardInputDict[spoilerBossName]);
if(SpoilerJSON["locations"][spoilerBossName] == "Forest Medallion") document.getElementById("markMedallions").value = document.getElementById("markMedallions").value.replaceAt(2,rewardInputDict[spoilerBossName]);
if(SpoilerJSON["locations"][spoilerBossName] == "Fire Medallion") document.getElementById("markMedallions").value = document.getElementById("markMedallions").value.replaceAt(4,rewardInputDict[spoilerBossName]);
if(SpoilerJSON["locations"][spoilerBossName] == "Water Medallion") document.getElementById("markMedallions").value = document.getElementById("markMedallions").value.replaceAt(6,rewardInputDict[spoilerBossName]);
if(SpoilerJSON["locations"][spoilerBossName] == "Shadow Medallion") document.getElementById("markMedallions").value = document.getElementById("markMedallions").value.replaceAt(8,rewardInputDict[spoilerBossName]);
if(SpoilerJSON["locations"][spoilerBossName] == "Spirit Medallion") document.getElementById("markMedallions").value = document.getElementById("markMedallions").value.replaceAt(10,rewardInputDict[spoilerBossName]);
if(SpoilerJSON["locations"][spoilerBossName] == "Kokiri Emerald") document.getElementById("markStones").value = document.getElementById("markStones").value.replaceAt(0,rewardInputDict[spoilerBossName]);
if(SpoilerJSON["locations"][spoilerBossName] == "Goron Ruby") document.getElementById("markStones").value = document.getElementById("markStones").value.replaceAt(2,rewardInputDict[spoilerBossName]);
if(SpoilerJSON["locations"][spoilerBossName] == "Zora Sapphire") document.getElementById("markStones").value = document.getElementById("markStones").value.replaceAt(4,rewardInputDict[spoilerBossName]);
}
if(!locationID.startsWith("h_")) {
// clicked an item check, not a gossip hint
var input = "";
if(LocationToSpoilerName[locationID] != undefined){
if(SpoilerJSON["locations"][LocationToSpoilerName[locationID]]["item"] != undefined)
input = SpoilerItemToInput[SpoilerJSON["locations"][LocationToSpoilerName[locationID]]["item"]];
else
input = SpoilerItemToInput[SpoilerJSON["locations"][LocationToSpoilerName[locationID]]];
}
if(input == undefined || document.getElementById(locationID).value.toLowerCase() == inputs[inputNames.indexOf("Boss Key")] || document.getElementById(locationID).value.toLowerCase() == inputs[inputNames.indexOf("Small Key")] || document.getElementById(locationID).value == inputs[ItemNames2.indexOf("Bombchus")] || (input == inputs[ItemNames2.indexOf("Bombchus")] && type == 2 && !LocationToSpoilerName[locationID].includes("Freestanding"))) {
if(document.getElementById(locationID).value.toLowerCase() != inputs[inputNames.indexOf("Boss Key")] && document.getElementById(locationID).value.toLowerCase() != inputs[inputNames.indexOf("Small Key")]) {
if(locationID.includes("forest_") && Player.forest_checks_remaining != 0) {Player.forest_checks_remaining -=1;}
else if(locationID.includes("fire_") && Player.fire_checks_remaining != 0 && locationID != "fire_grave") {Player.fire_checks_remaining -=1;}
else if(locationID.includes("water_") && Player.water_checks_remaining != 0) {Player.water_checks_remaining -=1;}
else if(locationID.includes("spirit_") && Player.spirit_checks_remaining != 0) {Player.spirit_checks_remaining -=1;}
else if(locationID.includes("shadow_") && Player.shadow_checks_remaining != 0) {Player.shadow_checks_remaining -=1;}
else if(locationID.includes("ganons_") && Player.ganons_checks_remaining != 0) {Player.ganons_checks_remaining -=1;}
else if(locationID.includes("gtg_") && Player.gtg_checks_remaining != 0) {Player.gtg_checks_remaining -=1;}
else if(locationID.includes("well_") && Player.well_checks_remaining != 0) {Player.well_checks_remaining -=1;}
else if(locationIndex < AreaIndexes[27]){}
else {return;}
Check[locationID]="junk";
}
else if(document.getElementById(locationID).value.toLowerCase() == inputs[inputNames.indexOf("Boss Key")]) {
if(locationID.includes("forest_") && !Player.forest_boss_key) {Player.forest_boss_key = true; Location.forest_boss_key = locationID;}
else if(locationID.includes("fire_") && !Player.fire_boss_key) {Player.fire_boss_key = true; Location.fire_boss_key = locationID;}
else if(locationID.includes("water_") && !Player.water_boss_key) {Player.water_boss_key = true; Location.water_boss_key = locationID;}
else if(locationID.includes("spirit_") && !Player.spirit_boss_key) {Player.spirit_boss_key = true; Location.spirit_boss_key = locationID;}
else if(locationID.includes("shadow_") && !Player.shadow_boss_key) {Player.shadow_boss_key = true; Location.shadow_boss_key = locationID;}
else if(locationID.includes("ganons_") && !Player.ganons_boss_key) {Player.ganons_boss_key = true; Location.ganons_boss_key = locationID;}
else {
if(locationID.startsWith("shop_")) {if (Shop_Logic[locationID] == "giants_wallet") {Shop_Logic[locationID] = "accessible"} else if (Shop_Logic[locationID] == "accessible") {Shop_Logic[locationID] = "adults_wallet"} else {Shop_Logic[locationID] = "giants_wallet"}}
return;
}
Check[locationID]="boss_key";
}
else if (document.getElementById(locationID).value.toLowerCase() == inputs[inputNames.indexOf("Small Key")]) {
if(locationID.includes("forest_") && Player.current_forest_keys < 5) {Player.current_forest_keys +=1;}
else if(locationID.includes("fire_") && Player.current_fire_keys < 8) {Player.current_fire_keys +=1;}
else if(locationID.includes("water_") && Player.current_water_keys < 6) {Player.current_water_keys +=1;}
else if(locationID.includes("spirit_") && Player.current_spirit_keys < 5) {Player.current_spirit_keys +=1;}
else if(locationID.includes("shadow_") && Player.current_shadow_keys < 5) {Player.current_shadow_keys +=1;}
else if(locationID.includes("gtg_") && Player.current_gtg_keys < 9) {Player.current_gtg_keys +=1;}
else if(locationID.includes("well_") && Player.current_well_keys < 3) {Player.current_well_keys +=1;}
else if(locationID.includes("ganons_") && Player.current_ganons_keys < 2) {Player.current_ganons_keys +=1;}
else {return;}
Check[locationID]="small_key";
}
if(SpoilerJSON["locations"][LocationToSpoilerName[locationID]]["item"] != undefined)
item = SpoilerJSON["locations"][LocationToSpoilerName[locationID]]["item"].replaceAll("Small Key (Gerudo Training Ground)", "Small Key (GTG)");
else
item = SpoilerJSON["locations"][LocationToSpoilerName[locationID]].replaceAll("Small Key (Gerudo Training Ground)", "Small Key (GTG)");
if (item.startsWith("Rupee")) {var count = item.replace(/[^0-9]/g, ""); modifyRupees(parseInt(count));}
document.getElementById(locationID).style.display = "none";
document.getElementById("text_" + locationID).style.display = "none";
document.getElementById("br_" + locationID).style.display = "none";
if (forcedDisplay[locationIndex]) {forcedDisplay[locationIndex] = false; Player[Check[locationID]] = true; Update(); }
lastCheck.push(locationID);
if(input == inputs[ItemNames2.indexOf("Bombchus")] && type == 2 && (LocationToSpoilerName[locationID].includes("Freestanding") || LocationToSpoilerName[locationID].includes("LH Underwater Item")))
document.getElementById("simLog").value = LocationToSpoilerName[locationID] + " -> Bombchus (peeked)\n" + document.getElementById("simLog").value;
}
else if((type == 0 && Check[locationID] == "unknown") || document.getElementById(locationID).value.toLowerCase() == inputs[ItemNames2.indexOf("Bombchus")]) {
// left click, get the item
if(input != inputs[inputNames.indexOf("Boss Key")] && input != inputs[inputNames.indexOf("Small Key")])
document.getElementById(locationID).value = input;
else if(input == inputs[inputNames.indexOf("Boss Key")]) {
if(locationID.includes("forest_") && !Player.forest_boss_key) {Player.forest_boss_key = true; Location.forest_boss_key = locationID;}
else if(locationID.includes("fire_") && !Player.fire_boss_key) {Player.fire_boss_key = true; Location.fire_boss_key = locationID;}
else if(locationID.includes("water_") && !Player.water_boss_key) {Player.water_boss_key = true; Location.water_boss_key = locationID;}
else if(locationID.includes("spirit_") && !Player.spirit_boss_key) {Player.spirit_boss_key = true; Location.spirit_boss_key = locationID;}
else if(locationID.includes("shadow_") && !Player.shadow_boss_key) {Player.shadow_boss_key = true; Location.shadow_boss_key = locationID;}
else if(locationID.includes("ganons_") && !Player.ganons_boss_key) {Player.ganons_boss_key = true; Location.ganons_boss_key = locationID;}
else {
if(locationID.startsWith("shop_")) {if (Shop_Logic[locationID] == "giants_wallet") {Shop_Logic[locationID] = "accessible"} else if (Shop_Logic[locationID] == "accessible") {Shop_Logic[locationID] = "adults_wallet"} else {Shop_Logic[locationID] = "giants_wallet"}}
return;
}
Check[locationID]="boss_key";
}
else if (input == inputs[inputNames.indexOf("Small Key")]) {
if(locationID.includes("forest_") && Player.current_forest_keys < 5) {Player.current_forest_keys +=1;}
else if(locationID.includes("fire_") && Player.current_fire_keys < 8) {Player.current_fire_keys +=1;}
else if(locationID.includes("water_") && Player.current_water_keys < 6) {Player.current_water_keys +=1;}
else if(locationID.includes("spirit_") && Player.current_spirit_keys < 5) {Player.current_spirit_keys +=1;}
else if(locationID.includes("shadow_") && Player.current_shadow_keys < 5) {Player.current_shadow_keys +=1;}
else if(locationID.includes("gtg_") && Player.current_gtg_keys < 9) {Player.current_gtg_keys +=1;}
else if(locationID.includes("well_") && Player.current_well_keys < 3) {Player.current_well_keys +=1;}
else if(locationID.includes("ganons_") && Player.current_ganons_keys < 2) {Player.current_ganons_keys +=1;}
else {return;}
Check[locationID]="small_key";
}
if(SpoilerJSON["locations"][LocationToSpoilerName[locationID]]["item"] != undefined)
item = SpoilerJSON["locations"][LocationToSpoilerName[locationID]]["item"].replaceAll("Small Key (Gerudo Training Ground)", "Small Key (GTG)");
else
item = SpoilerJSON["locations"][LocationToSpoilerName[locationID]].replaceAll("Small Key (Gerudo Training Ground)", "Small Key (GTG)");
document.getElementById("simLog").value = LocationToSpoilerName[locationID] + " -> " + item + "\n" + document.getElementById("simLog").value;
if (item.startsWith("Bombchus")) {var count = item.replace(/[^0-9]/g, ""); chuCount += parseInt(count); document.getElementById("chuCount").innerHTML = "Chus: " + chuCount;}
}
else if(type == 2 && Check[locationID] == "unknown" && document.getElementById(locationID).value != "???") {
// right click, peek the item
var temp_item = "";
if(SpoilerJSON["locations"][LocationToSpoilerName[locationID]]["item"] != undefined)
temp_item = SpoilerJSON["locations"][LocationToSpoilerName[locationID]]["item"].replaceAll("Small Key (Gerudo Training Ground)", "Small Key (GTG)");
else
temp_item = SpoilerJSON["locations"][LocationToSpoilerName[locationID]].replaceAll("Small Key (Gerudo Training Ground)", "Small Key (GTG)");
if (LocationToSpoilerName[locationID].includes("Freestanding") || LocationToSpoilerName[locationID].includes("LH Underwater Item") || temp_item.includes("Small Key") || temp_item.includes("Boss Key")) {
item = SpoilerJSON["locations"][LocationToSpoilerName[locationID]].replaceAll("Small Key (Gerudo Training Ground)", "Small Key (GTG)");
document.getElementById(locationID).value = input.charAt(0) + input.charAt(1) + input.charAt(2).toUpperCase();
if(input == inputs[ItemNames2.indexOf("Bombchus")])
item = "Bombchus";
}
else {
item = "unknown big chest";
document.getElementById(locationID).value = "???";
}
document.getElementById("simLog").value = LocationToSpoilerName[locationID] + " -> " + item + " (peeked)\n" + document.getElementById("simLog").value;
}
else if (Check[locationID] != "unknown" && Check[locationID] != "junk" && forcedDisplay[locationIndex]) {
forcedDisplay[locationIndex] = false;
Player[Check[locationID]] = true;
}
}
else {
// clicked a gossip hint
hint = SpoilerJSON["gossip_stones"][LocationToSpoilerName[locationID]]["text"].replaceAll("#", "");
simProcessHint(hint, locationID);
document.getElementById("simLog").value = hint.replaceAll("Small Key (Gerudo Training Ground)", "Small Key (GTG)") + "\n" + document.getElementById("simLog").value;
Check[locationID] = "junk";
document.getElementById(locationID).style.display = "none";
document.getElementById("text_" + locationID).style.display = "none";
document.getElementById("br_" + locationID).style.display = "none";
lastCheck.push(locationID);
}
Update();
}
}
function junkUltra() {
if(!simActive) {
var x = event.target;
if (x.id.startsWith("forest")) {var temp = 27; Logic.forced_forest_keys = 5 - Player.current_forest_keys; Player.current_forest_keys = 5; if (Player.forest_boss_key == false) {Logic.forced_forest_boss_key = true; Player.forest_boss_key = true;}}
if (x.id.startsWith("fire")) {var temp = 28; Logic.forced_fire_keys = 8 - Player.current_fire_keys; Player.current_fire_keys = 8; if (Player.fire_boss_key == false) {Logic.forced_fire_boss_key = true; Player.fire_boss_key = true;}}
if (x.id.startsWith("water")) {var temp = 31; Logic.forced_water_keys = 6 - Player.current_water_keys; Player.current_water_keys = 6; if (Player.water_boss_key == false) {Logic.forced_water_boss_key = true; Player.water_boss_key = true;}}
if (x.id.startsWith("spirit")) {var temp = 29; Logic.forced_spirit_keys = 5 - Player.current_spirit_keys; Player.current_spirit_keys = 5; if (Player.spirit_boss_key == false) {Logic.forced_spirit_boss_key = true; Player.spirit_boss_key = true;}}
if (x.id.startsWith("shadow")) {var temp = 30; Logic.forced_shadow_keys = 5 - Player.current_shadow_keys; Player.current_shadow_keys = 5; if (Player.shadow_boss_key == false) {Logic.forced_shadow_boss_key = true; Player.shadow_boss_key = true;}}
if (x.id.startsWith("ganons")) {var temp = 32; Logic.forced_ganons_keys = 2 - Player.current_ganons_keys; Player.current_ganons_keys = 2; if (Player.ganons_boss_key == false) {Logic.ganons_boss_key = true; Player.ganons_boss_key = true;}}
if (x.id.startsWith("gtg")) {var temp = 33; Logic.forced_gtg_keys = 5 - Player.current_gtg_keys; Player.current_gtg_keys = 9;}
if (x.id.startsWith("well")) {var temp = 34; Logic.forced_well_keys = 5 - Player.current_well_keys; Player.current_well_keys = 3;}
for (var i = AreaIndexes[temp]; i < AreaIndexes[temp + 1]; i++){
if (Check[Locations[i]] == "unknown") {Check[Locations[i]] = "ultra";}
hideCheck(Locations[i]);
lastCheck.push(Locations[i]);
}
midUpdate();
slowUpdate();
Update();
}
}
function junkItem(x) {
let locationID = x.id;
hideCheck(locationID);
lastCheck.push(locationID);
midUpdate();
flash();
if(!thisIsHinted && !hinted) {
highlightNextCheck(locationID);
}
}
function highlightNextCheck(locationID) {
let d = new Date();
if ((d.getTime() - ageSetStamp) > 30000) {
age = "";
}
if (adult.includes(locationID)) {
age = "adult";
ageSetStamp = d.getTime();
}
else if (child.includes(locationID)) {
age = "child";
ageSetStamp = d.getTime();
}
for(var j = 0; j < AreaIndexes.length; j++) {
if(Locations.indexOf(locationID) < AreaIndexes[j])
break;
}
for (var i = Locations.indexOf(locationID) + 1; i < Locations.length; i++) {
if(i == AreaIndexes[j]) {
i = AreaIndexes[j-1];
}
if (i == Locations.indexOf(locationID)) {
i = AreaIndexes[j];
}
if ((age == "child" && adult.includes(Locations[i])) || (age == "adult" && child.includes(Locations[i]))) {
continue;
}
if (document.getElementById(Locations[i]).style.display != "none" && document.getElementById(Locations[i]).style.visibility != "hidden" && document.getElementById(Locations[i]).value == "" && Location_Peek[Locations[i]]) {
toFocus = document.getElementById(Locations[i]);
break;
}
}
}
function checkCircleInfo() {
document.getElementById("forest").innerHTML = "" + Player.forest_checks_remaining;
document.getElementById("fire").innerHTML = "" + Player.fire_checks_remaining;
document.getElementById("water").innerHTML = "" + Player.water_checks_remaining;
document.getElementById("spirit").innerHTML = "" + Player.spirit_checks_remaining;
document.getElementById("shadow").innerHTML = "" + Player.shadow_checks_remaining;
document.getElementById("ganons").innerHTML = "" + Player.ganons_checks_remaining;
document.getElementById("gtg").innerHTML = "" + Player.gtg_checks_remaining;
document.getElementById("well").innerHTML = "" + Player.well_checks_remaining;
document.getElementById("forestSKs").innerHTML = "" + (5 - Player.current_forest_keys);
document.getElementById("fireSKs").innerHTML = "" + (8 - Player.current_fire_keys);
document.getElementById("waterSKs").innerHTML = "" + (6 - Player.current_water_keys);
document.getElementById("spiritSKs").innerHTML = "" + (5 - Player.current_spirit_keys);
document.getElementById("shadowSKs").innerHTML = "" + (5 - Player.current_shadow_keys);
document.getElementById("ganonsSKs").innerHTML = "" + (2 - Player.current_ganons_keys);
document.getElementById("gtgSKs").innerHTML = "" + (9 - Player.current_gtg_keys);
document.getElementById("wellSKs").innerHTML = "" + (3 - Player.current_well_keys);
if (Player.forest_boss_key) {document.getElementById("forestBKs").innerHTML = 0;} else {document.getElementById("forestBKs").innerHTML = 1;}
if (Player.fire_boss_key) {document.getElementById("fireBKs").innerHTML = 0;} else {document.getElementById("fireBKs").innerHTML = 1;}
if (Player.water_boss_key) {document.getElementById("waterBKs").innerHTML = 0;} else {document.getElementById("waterBKs").innerHTML = 1;}
if (Player.spirit_boss_key) {document.getElementById("spiritBKs").innerHTML = 0;} else {document.getElementById("spiritBKs").innerHTML = 1;}
if (Player.shadow_boss_key) {document.getElementById("shadowBKs").innerHTML = 0;} else {document.getElementById("shadowBKs").innerHTML = 1;}
document.getElementById("forestSKs").title = "";
document.getElementById("forestBKs").title = "";
for(i = AreaIndexes[27]; i < AreaIndexes[28]; i++) {
if(Check[Locations[i]] == "small_key")
document.getElementById("forestSKs").title += Names[i] + "\n";
if(Check[Locations[i]] == "boss_key")
document.getElementById("forestBKs").title += Names[i] + "\n";
}
document.getElementById("fireSKs").title = "";
document.getElementById("fireBKs").title = "";
for(i = AreaIndexes[28]; i < AreaIndexes[29]; i++) {
if(Check[Locations[i]] == "small_key")
document.getElementById("fireSKs").title += Names[i] + "\n";
if(Check[Locations[i]] == "boss_key")
document.getElementById("fireBKs").title += Names[i] + "\n";
}
document.getElementById("spiritSKs").title = "";
document.getElementById("spiritBKs").title = "";
for(i = AreaIndexes[29]; i < AreaIndexes[30]; i++) {
if(Check[Locations[i]] == "small_key")
document.getElementById("spiritSKs").title += Names[i] + "\n";
if(Check[Locations[i]] == "boss_key")
document.getElementById("spiritBKs").title += Names[i] + "\n";
}
document.getElementById("shadowSKs").title = "";
document.getElementById("shadowBKs").title = "";
for(i = AreaIndexes[30]; i < AreaIndexes[31]; i++) {
if(Check[Locations[i]] == "small_key")
document.getElementById("shadowSKs").title += Names[i] + "\n";
if(Check[Locations[i]] == "boss_key")
document.getElementById("shadowBKs").title += Names[i] + "\n";
}
document.getElementById("waterSKs").title = "";
document.getElementById("waterBKs").title = "";
for(i = AreaIndexes[31]; i < AreaIndexes[32]; i++) {
if(Check[Locations[i]] == "small_key")
document.getElementById("waterSKs").title += Names[i] + "\n";
if(Check[Locations[i]] == "boss_key")
document.getElementById("waterBKs").title += Names[i] + "\n";
}
document.getElementById("ganonsSKs").title = "";
for(i = AreaIndexes[32]; i < AreaIndexes[33]; i++)
if(Check[Locations[i]] == "small_key")
document.getElementById("ganonsSKs").title += Names[i] + "\n";
document.getElementById("gtgSKs").title = "";
for(i = AreaIndexes[33]; i < AreaIndexes[34]; i++)
if(Check[Locations[i]] == "small_key")
document.getElementById("gtgSKs").title += Names[i] + "\n";
document.getElementById("wellSKs").title = "";
for(i = AreaIndexes[34]; i < AreaIndexes[35]; i++)
if(Check[Locations[i]] == "small_key")
document.getElementById("wellSKs").title += Names[i] + "\n";
}
function areaBreaks() {
var tempUnique = 0;
for (var i = 0; i < Locations.length; i++) {
if ((i >= AreaIndexes[10] && i < AreaIndexes[11]) || (i >= AreaIndexes[17] && i < AreaIndexes[18])) {continue;}
if (document.getElementById(Locations[i]).style.display == "none" || document.getElementById(Locations[i]).style.visibility == "hidden") {tempUnique += 1;}
if (i == AreaIndexes[1]-1) {if (tempUnique == AreaIndexes[1] - AreaIndexes[0]) {document.getElementById("kokiri_break").style.display = "none";} else {document.getElementById("kokiri_break").style.display = "inline-block";} tempUnique = 0;}
if (i == AreaIndexes[2]-1) {if (tempUnique == AreaIndexes[2] - AreaIndexes[1]) {document.getElementById("ranch_break").style.display = "none";} else {document.getElementById("ranch_break").style.display = "inline-block";} tempUnique = 0;}
if (i == AreaIndexes[3]-1) {if (tempUnique == AreaIndexes[3] - AreaIndexes[2]) {document.getElementById("field_break").style.display = "none";} else {document.getElementById("field_break").style.display = "inline-block";} tempUnique = 0;}
if (i == AreaIndexes[4]-1) {if (tempUnique == AreaIndexes[4] - AreaIndexes[3]) {document.getElementById("valley_break").style.display = "none";} else {document.getElementById("valley_break").style.display = "inline-block";} tempUnique = 0;}
if (i == AreaIndexes[5]-1) {if (tempUnique == AreaIndexes[5] - AreaIndexes[4]) {document.getElementById("hylia_break").style.display = "none";} else {document.getElementById("hylia_break").style.display == "inline-block";} tempUnique = 0;}
if (i == AreaIndexes[6]-1) {if (tempUnique == AreaIndexes[6] - AreaIndexes[5]) {document.getElementById("market_break").style.display = "none";} else {document.getElementById("market_break").style.display = "inline-block";} tempUnique = 0;}
if (i == AreaIndexes[7]-1) {if (tempUnique == AreaIndexes[7] - AreaIndexes[6]) {document.getElementById("hyrule_castle_break").style.display = "none";} else {document.getElementById("hyrule_castle_break").style.display = "inline-block";} tempUnique = 0;}
if (i == AreaIndexes[8]-1) {if (tempUnique == AreaIndexes[8] - AreaIndexes[7]) {document.getElementById("ogc_break").style.display = "none";} else {document.getElementById("ogc_break").style.display = "inline-block";} tempUnique = 0;}
if (i == AreaIndexes[9]-1) {if (tempUnique == AreaIndexes[9] - AreaIndexes[8]) {document.getElementById("tot_break").style.display = "none";} else {document.getElementById("tot_break").style.display = "inline-block";} tempUnique = 0;}
if (i == AreaIndexes[10]-1) {if (tempUnique == AreaIndexes[10] - AreaIndexes[9]) {document.getElementById("fountain_break").style.display = "none";} else {document.getElementById("fountain_break").style.display = "inline-block";} tempUnique = 0;}
if (i == AreaIndexes[12]-1) {if (tempUnique == AreaIndexes[12] - AreaIndexes[11]) {document.getElementById("deku_break").style.display = "none";} else {document.getElementById("deku_break").style.display = "inline-block";} tempUnique = 0;}
if (i == AreaIndexes[13]-1) {if (tempUnique == AreaIndexes[13] - AreaIndexes[12]) {document.getElementById("lost_woods_break").style.display = "none";} else {document.getElementById("lost_woods_break").style.display = "inline-block";} tempUnique = 0;}
if (i == AreaIndexes[14]-1) {if (tempUnique == AreaIndexes[14] - AreaIndexes[13]) {document.getElementById("sfm_break").style.display = "none";} else {document.getElementById("sfm_break").style.display = "inline-block";} tempUnique = 0;}
if (i == AreaIndexes[15]-1) {if (tempUnique == AreaIndexes[15] - AreaIndexes[14]) {document.getElementById("goron_break").style.display = "none";} else {document.getElementById("goron_break").style.display = "inline-block";} tempUnique = 0;}
if (i == AreaIndexes[16]-1) {if (tempUnique == AreaIndexes[16] - AreaIndexes[15]) {document.getElementById("dodongos_break").style.display = "none";} else {document.getElementById("dodongos_break").style.display = "inline-block";} tempUnique = 0;}
if (i == AreaIndexes[17]-1) {if (tempUnique == AreaIndexes[17] - AreaIndexes[16]) {document.getElementById("dmt_break").style.display = "none";} else {document.getElementById("dmt_break").style.display = "inline-block";} tempUnique = 0;}
if (i == AreaIndexes[19]-1) {if (tempUnique == AreaIndexes[19] - AreaIndexes[18]) {document.getElementById("kakariko_break").style.display = "none";} else {document.getElementById("kakariko_break").style.display = "inline-block";} tempUnique = 0;}
if (i == AreaIndexes[20]-1) {if (tempUnique == AreaIndexes[20] - AreaIndexes[19]) {document.getElementById("graveyard_break").style.display = "none";} else {document.getElementById("graveyard_break").style.display = "inline-block";} tempUnique = 0;}
if (i == AreaIndexes[21]-1) {if (tempUnique == AreaIndexes[21] - AreaIndexes[20]) {document.getElementById("river_break").style.display = "none";} else {document.getElementById("river_break").style.display = "inline-block";} tempUnique = 0;}
if (i == AreaIndexes[22]-1) {if (tempUnique == AreaIndexes[22] - AreaIndexes[21]) {document.getElementById("domain_break").style.display = "none";} else {document.getElementById("domain_break").style.display = "inline-block";} tempUnique = 0;}
if (i == AreaIndexes[23]-1) {if (tempUnique == AreaIndexes[23] - AreaIndexes[22]) {document.getElementById("colossus_break").style.display = "none";} else {document.getElementById("colossus_break").style.display = "inline-block";} tempUnique = 0;}
if (i == AreaIndexes[24]-1) {if (tempUnique == AreaIndexes[24] - AreaIndexes[23]) {document.getElementById("wasteland_break").style.display = "none";} else {document.getElementById("wasteland_break").style.display = "inline-block";} tempUnique = 0;}
if (i == AreaIndexes[25]-1) {if (tempUnique == AreaIndexes[25] - AreaIndexes[24]) {document.getElementById("thieves_break").style.display = "none";} else {document.getElementById("thieves_break").style.display = "inline-block";} tempUnique = 0;}
if (i == AreaIndexes[26]-1) {if (tempUnique == AreaIndexes[26] - AreaIndexes[25]) {document.getElementById("fortress_break").style.display = "none";} else {document.getElementById("fortress_break").style.display = "inline-block";} tempUnique = 0;}
}
}
function itemHighlights() {
if (Player.kokiri_sword) {if(document.getElementById(dekuPlacement +"_req1") != null) {document.getElementById(dekuPlacement +"_req1").style.opacity =1; }}
if (Player.bomb_bag) {if(document.getElementById(dodongosPlacement +"_req1") != null) {document.getElementById(dodongosPlacement +"_req1").style.opacity =1; } if(document.getElementById(shadowPlacement +"_req4") != null) {document.getElementById(shadowPlacement +"_req4").style.opacity =1; } if(document.getElementById(spiritPlacement +"_req3") != null) {document.getElementById(spiritPlacement +"_req3").style.opacity =1; }}
if (Player.magic) {document.getElementById("gan_req1").style.opacity=1; if(document.getElementById(shadowPlacement +"_req2") != null) {document.getElementById(shadowPlacement +"_req2").style.opacity =1; }}
if (Player.light_arrows) {document.getElementById("gan_req2").style.opacity=1;}
if (Player.bow) {document.getElementById("gan_req3").style.opacity=1; if(document.getElementById(forestPlacement +"_req2") != null) {document.getElementById(forestPlacement +"_req2").style.opacity =1; }}
if (Player.hookshot) {if(document.getElementById(forestPlacement +"_req1") != null) {document.getElementById(forestPlacement +"_req1").style.opacity =1; } if(document.getElementById(shadowPlacement +"_req5") != null) {document.getElementById(shadowPlacement +"_req5").style.opacity =1; } if(document.getElementById(spiritPlacement +"_req4") != null) {document.getElementById(spiritPlacement +"_req4").style.opacity =1; }}
if (Player.goron_bracelet) {if(document.getElementById(forestPlacement +"_req3") != null) {document.getElementById(forestPlacement +"_req3").style.opacity =1; }}
if (Player.hammer) {if(document.getElementById(firePlacement +"_req1") != null) {document.getElementById(firePlacement +"_req1").style.opacity =1; }}
if (Player.rutos_letter) {if(document.getElementById(jabuPlacement +"_req1") != null) {document.getElementById(jabuPlacement +"_req1").style.opacity =1; }}
if (Player.boomerang) {if(document.getElementById(jabuPlacement +"_req2") != null) {document.getElementById(jabuPlacement +"_req2").style.opacity =1; }}
if (Player.iron_boots) {if(document.getElementById(waterPlacement +"_req1") != null) {document.getElementById(waterPlacement +"_req1").style.opacity =1; }}
if (Player.golden_scale) {if(document.getElementById(waterPlacement +"_req2") != null) {document.getElementById(waterPlacement +"_req2").style.opacity =1; }}
if (Player.longshot) {if(document.getElementById(waterPlacement +"_req3") != null) {document.getElementById(waterPlacement +"_req3").style.opacity =1; }}
if (Player.silver_gauntlets) {if(document.getElementById(spiritPlacement +"_req1") != null) {document.getElementById(spiritPlacement +"_req1").style.opacity =1; }}
if (Player.mirror_shield) {if(document.getElementById(spiritPlacement +"_req2") != null) {document.getElementById(spiritPlacement +"_req2").style.opacity =1; }}
if (Player.dins_fire) {if(document.getElementById(shadowPlacement +"_req1") != null) {document.getElementById(shadowPlacement +"_req1").style.opacity =1; }}
if (Player.hover_boots) {if(document.getElementById(shadowPlacement +"_req3") != null) {document.getElementById(shadowPlacement +"_req3").style.opacity =1; }}
if (!Player.kokiri_sword) {if(document.getElementById(dekuPlacement +"_req1") != null) {document.getElementById(dekuPlacement +"_req1").style.opacity = dimmed; }}
if (!Player.bomb_bag) {if(document.getElementById(dodongosPlacement +"_req1") != null) {document.getElementById(dodongosPlacement +"_req1").style.opacity =dimmed; } if(document.getElementById(shadowPlacement +"_req4") != null) {document.getElementById(shadowPlacement +"_req4").style.opacity =dimmed; } if(document.getElementById(spiritPlacement +"_req3") != null) {document.getElementById(spiritPlacement +"_req3").style.opacity =dimmed; }}
if (!Player.magic) {document.getElementById("gan_req1").style.opacity = dimmed; if(document.getElementById(shadowPlacement +"_req2") != null) {document.getElementById(shadowPlacement +"_req2").style.opacity =dimmed; }}
if (!Player.light_arrows) {document.getElementById("gan_req2").style.opacity = dimmed;}