-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwishlist.js
1130 lines (1102 loc) · 29.1 KB
/
wishlist.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
const helpers = require("./helpers.js");
module.exports = () => ({
ada: {
description: "ada-1",
frequency: "daily",
type: "vendor",
values: [],
setNeeded: function() {}
},
banshee: {
description: "banshee-44",
frequency: "daily",
type: "vendor",
values: [],
setNeeded: function() {}
},
/*spider: {
description: "spider",
frequency: "daily",
type: "vendor",
values: [],
setNeeded: function() {}
},*/
xur: {
description: "xûr",
frequency: "weekly",
type: "vendor",
values: [],
setNeeded: function() {}
},
lostSectors: {
description: "lost sector",
frequency: "daily",
type: "combo",
values: {
level: [
{name: "legend"},
{name: "master", neededFor: [
{type: "triumph", name: "Lost Sector Mastery", value: false},
{type: "triumph", name: "Solo Lost Sector Mastery", value: false}
]}
],
sector: [
{name: "concealed void", neededFor: [{type: "objective", name: "Europa Lost Sectors", value: false}]},
{name: "bunker E15", neededFor: [{type: "objective", name: "Europa Lost Sectors", value: false}]},
{name: "the conflux", neededFor: []},
//{name: "the rift", neededFor: []},
{name: "perdition", neededFor: [{type: "objective", name: "Europa Lost Sectors", value: false}]},
{name: "k1 crew quarters", neededFor: []},
{name: "k1 logistics", neededFor: []},
{name: "k1 communion", neededFor: []},
{name: "skydock IV", neededFor: []},
{name: "scavenger's den", neededFor: []},
{name: "the quarry", neededFor: []},
{name: "excavation site XII", neededFor: []}
//{name: "metamorphosis", neededFor: []},
//{name: "sepulcher", neededFor: []},
//{name: "extraction", neededFor: []},
//{name: "k1 revelation", neededFor: []},
],
reward: [
{name: "legs", neededFor: [
{type: "item", name: "boots of the assembler", value: false},
{type: "item", name: "the path of burning steps", value: false},
{type: "item", name: "star-eater scales", value: false},
{type: "item", name: "radiant dance machines", value: false},
{type: "item", name: "rain of fire", value: false},
{type: "item", name: "secant filaments", value: false}
]},
{name: "arms", neededFor: [
{type: "item", name: "necrotic grip", value: false},
{type: "item", name: "nothing manacles", value: false},
{type: "item", name: "icefall mantle", value: false},
{type: "item", name: "no backup plans", value: false},
{type: "item", name: "athrys's embrace", value: false},
{type: "item", name: "caliban's hand", value: false},
{type: "item", name: "renewal grasps", value: false},
{type: "item", name: "second chance", value: false},
{type: "item", name: "point-contact cannon brace", value: false}
]},
{name: "chest", neededFor: [
{type: "item", name: "mantle of battle harmony", value: false},
{type: "item", name: "cuirass of the falling star", value: false},
{type: "item", name: "omnioculus", value: false},
{type: "item", name: "hoarfrost-z", value: false},
{type: "item", name: "gyrfalcon's hauberk", value: false}
]},
{name: "head", neededFor: [
{type: "item", name: "dawn chorus", value: false},
{type: "item", name: "precious scars", value: false},
{type: "item", name: "mask of bakris", value: false},
{type: "item", name: "loreley splendor", value: false},
{type: "item", name: "blight ranger", value: false},
{type: "item", name: "fallen sunstar", value: false}
]}
]
},
setNeeded: async function(profileInfo) {
/*var promises = [];
Object.entries(this.values).forEach(entry => {
let [type, values] = entry;
values.forEach(value => {
if (value.neededFor) {
value.neededFor.forEach(nf => {
if (nf.type == "triumph") {
promises.push(helpers.getDefinitionByName("record", nf.name).then(record => {
nf.value = profileInfo.records[record.hash].state % 4 == 0;
}));
} else if (nf.type == "objective") {
promises.push(Promise.all([
helpers.getDefinitionByName("record", nf.name),
helpers.getDefinitionByField("objective", "$.progressDescription", "sector " + value.name, false)
]).then(result => {
let [record, objective] = result;
nf.value = !(
profileInfo.records[record.hash].objectives.find(
o => o.objectiveHash == objective.hash
).complete
);
}));
} else if (nf.type == "item") {
promises.push(helpers.getDefinitionByName("collectible", nf.name).then(item => {
nf.value = profileInfo.collectibles[item.hash].state % 2 != 0;
}));
}
});
}
});
});
await Promise.all(promises);*/
}
},
empireHunts: {
description: "empire hunt",
frequency: "weekly",
type: "list",
values: [
{
name: "the warrior",
neededFor: [{
type: "triumph",
name: "the warrior",
value: false
}]
},
{
name: "the technocrat",
neededFor: [{
type: "triumph",
name: "the technocrat",
value: false
}]
},
{
name: "the dark priestess",
neededFor: [{
type: "triumph",
name: "the dark priestess",
value: false
}]
}
],
setNeeded: async function(profileInfo) {
var records = await Promise.all(this.values.map(value => helpers.getDefinitionByName("record", value.neededFor[0].name)));
records.forEach((record, i) => {
this.values[i].neededFor[0].value = profileInfo.records?.[record.hash]?.state % 4 == 0;
});
}
},
exoChallenges: {
description: "exo challenge",
frequency: "weekly",
type: "list",
values: [
{
name: "simulation: agility",
neededFor: [{type: "objective", name: "training complete", value: false}]
},
{
name: "simulation: safeguard",
neededFor: [{type: "objective", name: "training complete", value: false}]
},
{
name: "simulation: survival",
neededFor: [{type: "objective", name: "training complete", value: false}]
}
],
setNeeded: async function(profileInfo) {
var tcRecord = await helpers.getDefinitionByName("record", this.values[0].neededFor[0].name);
var tcObjectives = await Promise.all(this.values.map(value =>
helpers.getDefinitionByField("objective", "$.progressDescription", value.name, false)
));
tcObjectives.forEach((tcObjective, i) => {
this.values[i].neededFor[0].value = !(
profileInfo.records?.[tcRecord.hash]?.objectives.find(
o => o.objectiveHash == tcObjective.hash
).complete
);
});
}
},
augments: {
description: "scanner augment",
frequency: "weekly",
type: "list",
values: [
{
name: "riis-reborn sectors",
neededFor: [
{
type: "triumph",
name: "augment: riis-reborn approach",
value: false
},
{
type: "triumph",
name: "augment: technocrat's iron",
value: false
},
{
type: "triumph",
name: "augment: kell's rising",
value: false
}
]
},
{
name: "vex sectors",
neededFor: [
{
type: "triumph",
name: "augment: nexus",
value: false
},
{
type: "triumph",
name: "augment: well of infinitude",
value: false
}
]
},
{
name: "bray sectors",
neededFor: [
{
type: "triumph",
name: "augment: bray exoscience",
value: false
},
{
type: "triumph",
name: "augment: eternity",
value: false
},
{
type: "triumph",
name: "augment: creation",
value: false
}
]
}
],
setNeeded: async function(profileInfo) {
for (var value of this.values) {
for (var nf of value.neededFor) {
var record = await helpers.getDefinitionByName("record", nf.name);
nf.value = profileInfo.records?.[record.hash]?.state % 4 == 0;
}
};
}
},
nightmareHunts: {
description: "nightmare hunt",
frequency: "weekly",
type: "list",
values: [
{
name: "crota",
neededFor: [{
type: "triumph",
name: "time trial: despair",
value: false
}]
},
{
name: "zydron",
neededFor: [{
type: "triumph",
name: "time trial: servitude",
value: false
}]
},
{
name: "phogoth",
neededFor: [{
type: "triumph",
name: "time trial: fear",
value: false
}]
},
{
name: "skolas",
neededFor: [{
type: "triumph",
name: "time trial: pride",
value: false
}]
},
{
name: "omnigul",
neededFor: [{
type: "triumph",
name: "time trial: anguish",
value: false
}]
},
{
name: "ghaul",
neededFor: [{
type: "triumph",
name: "time trial: rage",
value: false
}]
},
{
name: "the fanatic",
neededFor: [{
type: "triumph",
name: "time trial: insanity",
value: false
}]
},
{
name: "taniks",
neededFor: [{
type: "triumph",
name: "time trial: isolation",
value: false
}]
}
],
setNeeded: async function(profileInfo) {
var records = await Promise.all(this.values.map(value => helpers.getDefinitionByName("record", value.neededFor[0].name)));
records.forEach((record, i) => {
this.values[i].neededFor[0].value = profileInfo.records?.[record.hash]?.state % 4 == 0;
});
}
},
ordeals: {
description: "nightfall: the ordeal",
frequency: "weekly",
type: "list",
values: [
{
name: "the arms dealer",
neededFor: [{
type: "triumph",
name: "grandmaster: the arms dealer",
value: false
}]
},
{
name: "lake of shadows",
neededFor: [{
type: "triumph",
name: "grandmaster: lake of shadows",
value: false
}]
},
{
name: "exodus crash",
neededFor: [{
type: "triumph",
name: "grandmaster: exodus crash",
value: false
}]
},
{
name: "the inverted spire",
neededFor: [{
type: "triumph",
name: "grandmaster: the inverted spire",
value: false
}]
},
{
name: "the insight terminus",
neededFor: [{
type: "triumph",
name: "grandmaster: the insight terminus",
value: false
}]
},
{
name: "warden of nothing",
neededFor: [{
type: "triumph",
name: "grandmaster: warden of nothing",
value: false
}]
},
{
name: "broodhold",
neededFor: [{
type: "triumph",
name: "grandmaster: broodhold",
value: false
}]
},
{
name: "the corrupted",
neededFor: [{
type: "triumph",
name: "grandmaster: the corrupted",
value: false
}]
},
{
name: "the scarlet keep",
neededFor: [{
type: "triumph",
name: "grandmaster: the scarlet keep"
}]
},
{
name: "the hollowed lair",
neededFor: []
},
{
name: "the devils' lair",
neededFor: []
}
/*{
name: "savathûn's song",
neededFor: [{
type: "triumph",
name: "grandmaster: savathûn's song",
value: false
}]
},
{
name: "the pyramidion",
neededFor: [{
type: "triumph",
name: "grandmaster: the pyramidion",
value: false
}]
},
{
name: "tree of probabilities",
neededFor: [{
type: "triumph",
name: "grandmaster: tree of probabilities",
value: false
}]
},
{
name: "a garden world",
neededFor: [{
type: "triumph",
name: "grandmaster: a garden world",
value: false
}]
},
{
name: "strange terrain",
neededFor: [{
type: "triumph",
name: "grandmaster: strange terrain",
value: false
}]
},
{
name: "the festering core",
neededFor: [{
type: "triumph",
name: "grandmaster: the festering core",
value: false
}]
}*/
],
setNeeded: async function(profileInfo) {
var records = await Promise.all(this.values
.filter(value => value.neededFor.length > 0)
.map(value => helpers.getDefinitionByName("record", value.neededFor[0].name))
);
records.forEach((record, i) => {
if (!record) {
this.values[i].neededFor[0].value = false;
} else {
this.values[i].neededFor[0].value = profileInfo.records?.[record.hash]?.state % 4 == 0;
}
});
}
},
curses: {
description: "dreaming city's curse",
frequency: "weekly",
type: "list",
values: [
{name: "weak", neededFor: [{value: false}]},
{name: "growing", neededFor: [{value: false}]},
{
name: "strong",
neededFor: [{
type: "book",
name: "truth to power",
value: false
}]
}
],
setNeeded: async function(profileInfo) {
var value = this.values.find(v => v.name == "strong");
var ttpRecord = await helpers.getDefinitionByName("record", value.neededFor[0].name);
value.neededFor[0].value = profileInfo.records?.[ttpRecord.hash]?.state % 4 == 0;
}
},
ascendantChallenges: {
description: "ascendant challenge",
frequency: "weekly",
type: "list",
values: [
{
name: "forfeit shrine (gardens of esila)",
neededFor: [
{type: "triumph", name: "never forfeit", value: false},
{type: "lore", name: "heresiology", value: false},
{type: "eggs", name: "corrupted eggs", value: false, checklist: [
1084474590,
1034141726
]}
]
},
{
name: "shattered ruins (spine of keres)",
neededFor: [
{type: "triumph", name: "shatter that record", value: false},
{type: "lore", name: "ecstasiate I", value: false},
{type: "eggs", name: "corrupted eggs", value: false, checklist: [
1084474583,
1067697005
]}
]
},
{
name: "keep of honed edges (harbinger's seclude)",
neededFor: [
{type: "triumph", name: "honed for speed", value: false},
{type: "lore", name: "ecstasiate II", value: false},
{type: "eggs", name: "corrupted eggs", value: false, checklist: [
1084474579,
1084474578
]}
]
},
{
name: "agonarch abyss (bay of drowned wishes)",
neededFor: [
{type: "triumph", name: "agonarch agony", value: false},
{type: "lore", name: "cosmogyre IV", value: false},
{type: "eggs", name: "corrupted eggs", value: false, checklist: [
1084474580,
1084474582,
1084474581
]}
]
},
{
name: "cimmerian garrison (chamber of starlight)",
neededFor: [
{type: "triumph", name: "run the gauntlet", value: false},
{type: "lore", name: "brephos III", value: false},
{type: "eggs", name: "corrupted eggs", value: false, checklist: [
1067696994,
1067697004,
1067696995
]}
]
},
{
name: "ouroborea (aphelion's rest)",
neededFor: [
{type: "triumph", name: "eating your own tail", value: false},
{type: "lore", name: "imponent I", value: false},
{type: "eggs", name: "corrupted eggs", value: false, checklist: [
1084474577,
1084474591,
1084474576
]}
]
}
],
setNeeded: async function(profileInfo) {
var [triumphs, lores, eggsChecklist] = await Promise.all([
Promise.all(this.values.map(value =>
helpers.getDefinitionByName("record", value.neededFor[0].name)
)),
Promise.all(this.values.map(value =>
helpers.getDefinitionByName("record", value.neededFor[1].name)
)),
helpers.getDefinitionByName("checklist", "corrupted eggs")
]);
this.values.forEach((value, i) => {
value.neededFor[0].value = profileInfo.records?.[triumphs[i].hash]?.state % 4 == 0;
value.neededFor[1].value = profileInfo.records?.[lores[i].hash]?.state % 4 == 0;
var missingEggs = value.neededFor[2].checklist.filter(egg => !profileInfo.checklists?.[eggsChecklist.hash]?.[egg]);
value.neededFor[2].value = missingEggs.length > 0;
value.neededFor[2].name = "corrupted eggs (" + missingEggs.length + ")";
});
}
},
blindWell: {
description: "blind well boss",
frequency: "weekly",
type: "list",
values: [
{name: "sikariis and varkuuriis", neededFor: [{
type: "triumph",
name: "the scorn champion",
value: false
}]},
{name: "cragur", neededFor: [{
type: "triumph",
name: "the hive champion",
value: false
}]},
{name: "inomina", neededFor: [{
type: "triumph",
name: "the taken champion",
value: false
}]}
],
setNeeded: async function(profileInfo) {
var records = await Promise.all(this.values.map(value => helpers.getDefinitionByName("record", value.neededFor[0].name)));
records.forEach((record, i) => {
this.values[i].neededFor[0].value = profileInfo.records?.[record.hash]?.state % 4 == 0;
});
}
},
altars: {
description: "altars of sorrow weapon",
frequency: "daily",
type: "list",
values: [
{name: "apostate", neededFor: [{
type: "item",
name: "apostate",
value: false
}]},
{name: "heretic", neededFor: [{
type: "item",
name: "heretic",
value: false
}]},
{name: "blasphemer", neededFor: [{
type: "item",
name: "blasphemer",
value: false
}]},
],
setNeeded: async function(profileInfo) {
var collectibles = await Promise.all(this.values.map(value =>
helpers.getDefinitionByName("collectible", value.neededFor[0].name)
));
collectibles.forEach((collectible, i) => {
this.values[i].neededFor[0].value = profileInfo.collectibles?.[collectible.hash]?.state % 2 != 0;
});
}
},
wanderingNightmares: {
description: "wandering nightmare",
frequency: "weekly",
type: "list",
values: [
{name: "horkis", neededFor: [{type: "objective", name: "wandering nightmares", value: false}]},
{name: "jaxx", neededFor: [{type: "objective", name: "wandering nightmares", value: false}]},
{name: "fallen council", neededFor: [{type: "objective", name: "wandering nightmares", value: false}]},
{name: "xortal", neededFor: [{type: "objective", name: "wandering nightmares", value: false}]}
],
setNeeded: async function(profileInfo) {
var wnRecord = await helpers.getDefinitionByName("record", this.values[0].neededFor[0].name);
var wnObjectives = await Promise.all(this.values.map(value =>
helpers.getDefinitionByField("objective", "$.progressDescription", value.name, false)
));
wnObjectives.forEach((wnObjective, i) => {
this.values[i].neededFor[0].value = !(
profileInfo.records?.[wnRecord.hash]?.objectives.find(
o => o.objectiveHash == wnObjective.hash
).complete
);
});
}
}
/*contact: {
description: "contact boss",
frequency: "weekly",
values: [
{name: "taken howler", neededFor: [{type: "objective", name: "contact: heavy hitters", value: false}]},
{name: "taken pyromaster", neededFor: [{type: "objective", name: "contact: heavy hitters", value: false}]},
{name: "taken monstrosity", neededFor: [{type: "objective", name: "contact: heavy hitters", value: false}]}
],
setNeeded: async function(profileInfo) {
var hhRecord = await helpers.getDefinitionByName("record", this.values[0].neededFor[0].name);
var hhObjectives = await Promise.all(this.values.map(value =>
helpers.getDefinitionByField("objective", "$.progressDescription", value.name)
));
hhObjectives.forEach((hhObjective, i) => {
this.values[i].neededFor[0].value = !(
profileInfo.records[hhRecord.hash].objectives.find(
o => o.objectiveHash == hhObjective.hash
).complete
);
});
}
},
interference: {
description: "interference",
frequency: "weekly",
values: [
{name: "crystal encounter", neededFor: [{type: "objective", name: "interference: loop", value: false}]},
{name: "ritual encounter", neededFor: [{type: "objective", name: "interference: loop", value: false}]},
{name: "relic encounter", neededFor: [{type: "objective", name: "interference: loop", value: false}]},
{name: "final encounter", neededFor: [{type: "objective", name: "interference: loop", value: false}]}
],
setNeeded: async function(profileInfo) {
var ilRecord = await helpers.getDefinitionByName("record", this.values[0].neededFor[0].name);
var ilObjectives = await Promise.all(this.values.map(value =>
helpers.getDefinitionByField("objective", "$.progressDescription", value.name)
));
ilObjectives.forEach((ilObjective, i) => {
if (!ilObjective) {
this.values[i].neededFor[0].value = false;
} else {
this.values[i].neededFor[0].value = !(
profileInfo.records[ilRecord.hash].objectives.find(
o => o.objectiveHash == ilObjective.hash
).complete
);
}
});
}
},
dailyMissions: {
description: "daily heroic story mission",
frequency: "daily",
values: [
{
name: "ace in the hole",
neededFor: [{
type: "book",
name: "the man they called cayde",
value: false
}]
},
{
name: "the machinist",
neededFor: [{
type: "lore",
name: "the chosen's choice",
value: false
}]
},
{
name: "chosen",
neededFor: [{
type: "triumph",
name: "ghaul: heroic",
value: false
}]
},
{
name: "omega",
neededFor: [{
type: "triumph",
name: "panoptes: heroic",
value: false
}]
},
{
name: "nothing left to say",
neededFor: [{
type: "triumph",
name: "\"you're not my sister!\"",
value: false
}]
}
],
setNeeded: async function(profileInfo) {
var records = await Promise.all(this.values.map(value => helpers.getDefinitionByName("record", value.neededFor[0].name)));
records.forEach((record, i) => {
this.values[i].neededFor[0].value = profileInfo.records[record.hash].state % 4 == 0;
});
}
},
forges: {
description: "black armory forge",
frequency: "daily",
values: [
{name: "volundr", neededFor: [{value: false}]},
{name: "gofannon", neededFor: [{value: false}]},
{name: "izanami", neededFor: [{value: false}]},
{name: "bergusia", neededFor: [{value: false}]}
],
setNeeded: function() {
return false;
}
},
nightfalls: {
description: "nightfall",
frequency: "weekly",
values: [
{
name: "the arms dealer",
neededFor: [{
type: "item",
name: "tilt fuse",
value: false
}]
},
{
name: "lake of shadows",
neededFor: [{
type: "item",
name: "the militia's birthright",
value: false
}]
},
{
name: "savathûn's song",
neededFor: [{
type: "item",
name: "duty bound",
value: false
}]
},
{
name: "exodus crash",
neededFor: [{
type: "item",
name: "impact velocity",
value: false
}]
},
{
name: "the inverted spire",
neededFor: [{
type: "item",
name: "trichromatica",
value: false
}]
},
{
name: "the pyramidion",
neededFor: [{
type: "item",
name: "silicon neuroma",
value: false
}]
},
{
name: "tree of probabilities",
neededFor: [{
type: "item",
name: "D.F.A.",
value: false
}]
},
{
name: "a garden world",
neededFor: [{
type: "item",
name: "universal wavefunction",
value: false
}]
},
{
name: "strange terrain",
neededFor: [{
type: "item",
name: "braytech osprey",
value: false
}]
},
{
name: "will of the thousands",
neededFor: [{
type: "item",
name: "worm god incarnation",
value: false
}]
},
{
name: "the insight terminus",
neededFor: [{
type: "item",
name: "the long goodbye",
value: false
}]
},
{
name: "warden of nothing",
neededFor: [{
type: "item",
name: "warden's law",
value: false
}]
},
{
name: "broodhold",
neededFor: [{
type: "item",
name: "",
value: false
}]
},
{
name: "the hollowed lair",
neededFor: [{
type: "item",
name: "mindbender's ambition",
value: false
}]
},
{
name: "the corrupted",
neededFor: [{
type: "item",
name: "horror's least",
value: false
}]
},
{
name: "the scarlet keep",
neededFor: [{
type: "item",
name: "",
value: false
}]
},
{
name: "the festering core",
neededFor: [{
type: "item",
name: "",
value: false
}]
}
],
setNeeded: async function(profileInfo) {
var collectibles = await Promise.all(this.values.map(value =>
!value.neededFor[0].name ? null : helpers.getDefinitionByName("collectible", value.neededFor[0].name)
));
collectibles.forEach((collectible, i) => {
this.values[i].neededFor[0].value = !this.values[i].neededFor[0].name ? false : profileInfo.collectibles[collectible.hash].state % 2 != 0;
});
}
},
flashpoints: {
description: "flashpoint",
frequency: "weekly",
values: [
{name: "EDZ", neededFor: [{value: false}]},
{name: "nessus", neededFor: [{value: false}]},
{name: "tangled shore", neededFor: [{
type: "book",
name: "the tangled shore",
value: false
}]}
//{name: "io", neededFor: [{value: false}]},
//{name: "mercury", neededFor: [{value: false}]},
//{name: "titan", neededFor: [{value: false}]},
//{name: "mars", neededFor: [{value: false}]}
],
setNeeded: async function(profileInfo) {
var value = this.values.find(v => v.name == "tangled shore");
var ttsRecord = await helpers.getDefinitionByName("record", value.neededFor[0].name);
value.neededFor[0].value = profileInfo.records[ttsRecord.hash].state % 4 == 0;
}