gw2e-account-statistics 3.7.0 → 3.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,917 +0,0 @@
1
- /* eslint-env node, mocha */
2
- import { expect } from 'chai'
3
- import itemsStatistics from '../src/statistics/items'
4
-
5
- const generateAccount = (items) => {
6
- return {
7
- bank: items.slice(0, 1),
8
- characters: [{
9
- name: 'Holds items',
10
- equipment: [],
11
- bags: [
12
- {inventory: items.slice(1)}
13
- ]
14
- }]
15
- }
16
- }
17
-
18
- describe('statistics > items', () => {
19
- it('exits out when one of the permissions is missing', () => {
20
- const emptyObject = {
21
- baubleInfusions: null,
22
- brokenSpoons: null,
23
- shinyBaubles: null,
24
- chakEggSacks: null,
25
- fractalTonics: null,
26
- ghostlyInfusions: null,
27
- legendaryItems: null,
28
- legendaryItemsWeapon: null,
29
- legendaryItemsArmor: null,
30
- legendaryItemsBack: null,
31
- legendaryItemsTrinket: null,
32
- luminescentRefractors: null,
33
- preservedQueenBees: null,
34
- permanentTools: null,
35
- whiteMantlePortalDevices: null,
36
- blackLionClaimTickets: null,
37
- instruments: null,
38
- fishItems: null,
39
- fishItemsLegendary: null,
40
- fishItemsAscended: null,
41
- fishItemsExotic: null,
42
- fishItemsRare: null,
43
- fishItemsMasterwork: null,
44
- fishItemsFine: null,
45
- fishItemsBasic: null,
46
- fishItemsJunk: null,
47
- musicBoxes: null,
48
- chakEggs: null,
49
- fossilizedInsects: null,
50
- reclaimedMetalPlates: null,
51
- championBags: null,
52
- tripleTroubleChests: null,
53
- tequatlChests: null,
54
- vbHerosChoice: null,
55
- tdHerosChoice: null,
56
- abHerosChoice: null,
57
- dsHerosChoice: null,
58
- crystalOasisHerosChoice: null,
59
- elonRiverlandsHerosChoice: null,
60
- theDesolationHerosChoice: null,
61
- domainOfVabbiHerosChoice: null,
62
- uniqueTonics: null,
63
- bloodRubies: null,
64
- petrifiedWood: null,
65
- tomesOfKnowledge: null,
66
- permanentContracts: null,
67
- freshWinterberries: null,
68
- wintersHeartInfusions: null,
69
- kodasWarmthEnrichment: null,
70
- phospholuminescentInfusions: null,
71
- gemstoreToys: null,
72
- blackLionMiniatureClaimTickets: null,
73
- jadeShards: null,
74
- giftsOfExploration: null,
75
- giftsOfBattle: null,
76
- dragoniteOre: null,
77
- bloodstoneDust: null,
78
- empyrealFragments: null,
79
- crystallineOre: null,
80
- airshipOil: null,
81
- auricDust: null,
82
- leyLineSparks: null,
83
- _luckFromItems: null,
84
- legendarySpikes: null,
85
- fireOrchidBlossoms: null,
86
- orrianPearls: null,
87
- liquidAurillium: null,
88
- celestialInfusion: null,
89
- celestialInfusionRed: null,
90
- celestialInfusionBlue: null,
91
- frostLegionInfusion: null,
92
- abyssalInfusion: null,
93
- ottersBlessingEnrichment: null,
94
- celebratoryBirthdayEnrichment: null,
95
- festiveConfettiInfusions: null,
96
- emberInfusions: null,
97
- mysticInfusions: null,
98
- peerlessInfusions: null,
99
- toyShellInfusions: null,
100
- kralkatiteOre: null,
101
- potionOfPvpRewards: null,
102
- potionOfWvwRewards: null,
103
- skirmishChests: null,
104
- difluoriteCrystals: null,
105
- eitriteIngots: null,
106
- kites: null,
107
- snowDiamondInfusions: null,
108
- inscribedShards: null,
109
- lumpsOfMistonium: null,
110
- brandedMass: null,
111
- mistbornMote: null,
112
- hatchedChili: null,
113
- eternalIceShard: null,
114
- crystalInfusions: null,
115
- polysaturatingInfusions: null,
116
- silverwastesShovels: null,
117
- thirtyTwoSlotBags: null,
118
- flyingCowTokens: null,
119
- heartOfTheKhanUr: null,
120
- brokenTwig: null,
121
- warmStone: null,
122
- crumblingBone: null,
123
- mangledTalon: null,
124
- clumpOfResin: null,
125
- emblemOfTheAvenger: null,
126
- emblemOfTheConqueror: null,
127
- emblemOfTournamentVictory: null,
128
- emblemOfVictory: null,
129
- _unstableFractalEssenceFromItems: null,
130
- chestOfDungeoneering: null,
131
- deldrimorStoneskinInfusions: null,
132
- jormagEyeInfusions: null,
133
- primordusEyeInfusions: null,
134
- _legendaryInsightsFromItems: null,
135
- _legendaryDivinationsFromItems: null
136
- }
137
-
138
- const bothPermissions = {bank: null, characters: null}
139
- expect(itemsStatistics(bothPermissions)).to.deep.equal(emptyObject)
140
-
141
- const inventoriesPermission = {bank: null, characters: [{name: 'Yo'}]}
142
- expect(itemsStatistics(inventoriesPermission)).to.deep.equal(emptyObject)
143
-
144
- const charactersPermission = {bank: [{id: 30687}], characters: null}
145
- expect(itemsStatistics(charactersPermission)).to.deep.equal(emptyObject)
146
- })
147
-
148
- it('can calculate legendary count', () => {
149
- const account = generateAccount([
150
- {id: 123, count: 1},
151
- {id: 30687, count: 1}, // 1
152
- {id: 71383, count: 1}, // 2
153
- {id: 1, count: 1},
154
- {id: 80205, count: 1}, // 3
155
- {id: 77474, count: 1} // 4
156
- ])
157
-
158
- account.characters[0].last_modified = new Date('2021-07-24T12:00:00.000Z')
159
- account.characters[0].equipment = [
160
- {id: 80205},
161
- {id: 71383, location: 'EquippedFromLegendaryArmory'}
162
- ] // Ignored
163
-
164
- account.legendaryarmory = [{id: 80205, count: 2}] // 5 + 6
165
-
166
- expect(itemsStatistics(account).legendaryItems).to.equal(6)
167
- })
168
-
169
- it('can calculate legendary weapon count', () => {
170
- expect(itemsStatistics(generateAccount([
171
- {id: 123, count: 1},
172
- {id: 30687, count: 1},
173
- {id: 71383, count: 1},
174
- {id: 1, count: 1},
175
- {id: 7, count: 1},
176
- {id: 77474, count: 1}
177
- ])).legendaryItemsWeapon).to.equal(2)
178
- })
179
-
180
- it('can calculate legendary armor count', () => {
181
- expect(itemsStatistics(generateAccount([
182
- {id: 123, count: 1},
183
- {id: 80254, count: 1},
184
- {id: 80277, count: 1},
185
- {id: 1, count: 1},
186
- {id: 7, count: 1},
187
- {id: 77474, count: 1}
188
- ])).legendaryItemsArmor).to.equal(2)
189
- })
190
-
191
- it('can calculate legendary back count', () => {
192
- expect(itemsStatistics(generateAccount([
193
- {id: 123, count: 1},
194
- {id: 74155, count: 1},
195
- {id: 80277, count: 1},
196
- {id: 1, count: 1},
197
- {id: 30704, count: 1},
198
- {id: 77474, count: 1}
199
- ])).legendaryItemsBack).to.equal(2)
200
- })
201
-
202
- it('can calculate legendary trinket count', () => {
203
- expect(itemsStatistics(generateAccount([
204
- {id: 123, count: 1},
205
- {id: 74155, count: 1},
206
- {id: 80277, count: 1},
207
- {id: 1, count: 1},
208
- {id: 81908, count: 1},
209
- {id: 77474, count: 1}
210
- ])).legendaryItemsTrinket).to.equal(1)
211
- })
212
-
213
- it('can calculate fractal tonic count', () => {
214
- expect(itemsStatistics(generateAccount([
215
- {id: 49277, count: 1},
216
- {id: 30687, count: 1},
217
- {id: 71383, count: 1},
218
- {id: 49277, count: 1},
219
- {id: 49277, count: 1}
220
- ])).fractalTonics).to.equal(3)
221
- })
222
-
223
- it('can calculate legendary insight count', () => {
224
- const items = {
225
- // Heavy Ascended
226
- RefinedEnvoyHelmet: 80387,
227
- RefinedEnvoyPauldrons: 80236,
228
- RefinedEnvoyBreastplate: 80648,
229
- RefinedEnvoyGauntlets: 80673,
230
- RefinedEnvoyTassets: 80427,
231
- RefinedEnvoyGreaves: 80127,
232
-
233
- // Medium Ascended
234
- RefinedEnvoyMask: 80634,
235
- RefinedEnvoyShoulderpads: 80366,
236
- RefinedEnvoyJerkin: 80607,
237
- RefinedEnvoyVambraces: 80658,
238
- RefinedEnvoyLeggings: 80675,
239
- RefinedEnvoyBoots: 80177,
240
-
241
- // Light Ascended
242
- RefinedEnvoyCowl: 80441,
243
- RefinedEnvoyMantle: 80264,
244
- RefinedEnvoyVestments: 80120,
245
- RefinedEnvoyGloves: 80460,
246
- RefinedEnvoyPants: 80275,
247
- RefinedEnvoyShoes: 80583,
248
-
249
- // Heavy Legendary
250
- PerfectedEnvoyHelmet: 80384,
251
- PerfectedEnvoyPauldrons: 80435,
252
- PerfectedEnvoyBreastplate: 80254,
253
- PerfectedEnvoyGauntlets: 80205,
254
- PerfectedEnvoyTassets: 80277,
255
- PerfectedEnvoyGreaves: 80557,
256
-
257
- // Medium Legendary
258
- PerfectedEnvoyMask: 80296,
259
- PerfectedEnvoyShoulderpads: 80145,
260
- PerfectedEnvoyJerkin: 80578,
261
- PerfectedEnvoyVambraces: 80161,
262
- PerfectedEnvoyLeggings: 80252,
263
- PerfectedEnvoyBoots: 80281,
264
-
265
- // Light Legendary
266
- PerfectedEnvoyCowl: 80248,
267
- PerfectedEnvoyMantle: 80131,
268
- PerfectedEnvoyVestments: 80190,
269
- PerfectedEnvoyGloves: 80111,
270
- PerfectedEnvoyPants: 80356,
271
- PerfectedEnvoyShoes: 80399
272
- }
273
-
274
- function countFromList (itemList) {
275
- const account = generateAccount(itemList.map(id => ({id, count: 1})))
276
- return itemsStatistics(account)._legendaryInsightsFromItems
277
- }
278
-
279
- // Count the basic items
280
- expect(itemsStatistics(generateAccount([
281
- {id: 80516, count: 3}, // Envoy Insignia => 25 each
282
- {id: 78989, count: 1}, // Gift of Prowess => 25 each
283
- {id: 77302, count: 7} // Legendary Insight => 1 each
284
- ]))._legendaryInsightsFromItems, 'basic items').to.equal(3 * 25 + 25 + 7)
285
-
286
- // Count the full first ascended set (from the achievement, so no LI spent)
287
- const oneWeightAscendedSet = [
288
- items.RefinedEnvoyHelmet, items.RefinedEnvoyPauldrons, items.RefinedEnvoyBreastplate,
289
- items.RefinedEnvoyGauntlets, items.RefinedEnvoyTassets, items.RefinedEnvoyGreaves
290
- ]
291
- expect(countFromList(oneWeightAscendedSet), 'oneWeightAscendedSet')
292
- .to.equal(0)
293
-
294
- // Count the full first ascended set (from the achievement, so no LI spent)
295
- // and some extra ascended items that got crafted via 25 LI insignias
296
- const oneWeightAscendedSetPlusExtra = [
297
- items.RefinedEnvoyHelmet, items.RefinedEnvoyPauldrons, items.RefinedEnvoyBreastplate,
298
- items.RefinedEnvoyGauntlets, items.RefinedEnvoyTassets, items.RefinedEnvoyGreaves,
299
- items.RefinedEnvoyHelmet, items.RefinedEnvoyCowl // one of the same weight, one in a different one
300
- ]
301
- expect(countFromList(oneWeightAscendedSetPlusExtra), 'oneWeightAscendedSetPlusExtra')
302
- .to.equal(25 + 25)
303
-
304
- // Count all first ascended sets (one from the achievement, so no LI spent and two for 25/each)
305
- const allAscendedSets = [
306
- items.RefinedEnvoyHelmet, items.RefinedEnvoyPauldrons, items.RefinedEnvoyBreastplate,
307
- items.RefinedEnvoyGauntlets, items.RefinedEnvoyTassets, items.RefinedEnvoyGreaves,
308
-
309
- items.RefinedEnvoyMask, items.RefinedEnvoyShoulderpads, items.RefinedEnvoyJerkin,
310
- items.RefinedEnvoyVambraces, items.RefinedEnvoyLeggings, items.RefinedEnvoyBoots,
311
-
312
- items.RefinedEnvoyCowl, items.RefinedEnvoyMantle, items.RefinedEnvoyVestments,
313
- items.RefinedEnvoyGloves, items.RefinedEnvoyPants, items.RefinedEnvoyShoes
314
- ]
315
- expect(countFromList(allAscendedSets), 'allAscendedSets')
316
- .to.equal(2 * 6 * 25)
317
-
318
- // Count the full first legendary set (the precursor was from the achievement, so no LI spent)
319
- // but the ascended -> legendary conversion costs 25
320
- const oneWeightLegendarySet = [
321
- items.PerfectedEnvoyHelmet, items.PerfectedEnvoyPauldrons, items.PerfectedEnvoyBreastplate,
322
- items.PerfectedEnvoyGauntlets, items.PerfectedEnvoyTassets, items.PerfectedEnvoyGreaves
323
- ]
324
- expect(countFromList(oneWeightLegendarySet), 'oneWeightLegendarySet')
325
- .to.equal(6 * 25)
326
-
327
- // Count the full first legendary set (the precursor was from the achievement, so no LI spent)
328
- // but the ascended -> legendary conversion costs 25 and some extra ascended items that got crafted via 25 LI insignias
329
- const oneWeightLegendarySetSetPlusExtraAscended = [
330
- items.PerfectedEnvoyHelmet, items.PerfectedEnvoyPauldrons, items.PerfectedEnvoyBreastplate,
331
- items.PerfectedEnvoyGauntlets, items.PerfectedEnvoyTassets, items.PerfectedEnvoyGreaves,
332
- items.RefinedEnvoyHelmet, items.RefinedEnvoyCowl // one of the same weight, one in a different one
333
- ]
334
- expect(countFromList(oneWeightLegendarySetSetPlusExtraAscended), 'oneWeightLegendarySetSetPlusExtraAscended')
335
- .to.equal(6 * 25 + 25 + 25)
336
-
337
- // Count the full first legendary set (the precursor was from the achievement, so no LI spent)
338
- // but the ascended -> legendary conversion costs 25 and some extra ascended items that got crafted via 25 LI insignias
339
- // and some extra legendary items that got crafted (25 for the precursor and 25 for the conversion)
340
- const oneWeightLegendarySetPlusExtraLegendary = [
341
- items.PerfectedEnvoyHelmet, items.PerfectedEnvoyPauldrons, items.PerfectedEnvoyBreastplate,
342
- items.PerfectedEnvoyGauntlets, items.PerfectedEnvoyTassets, items.PerfectedEnvoyGreaves,
343
- items.RefinedEnvoyHelmet, items.RefinedEnvoyCowl, // one of the same weight, one in a different one
344
- items.PerfectedEnvoyHelmet, items.PerfectedEnvoyCowl // one of the same weight, one in a different one
345
- ]
346
- expect(countFromList(oneWeightLegendarySetPlusExtraLegendary), 'oneWeightLegendarySetPlusExtraLegendary').to.equal(
347
- 6 * 25 + // First set, where the precursor was free
348
- 25 + 25 + // Extra refined items, 25 each
349
- 50 + 50 // Extra perfected items, 50 each
350
- )
351
-
352
- // Count the full first legendary set (one of the precursor sets was from the achievement, so no LI spent)
353
- // but the ascended -> legendary conversion costs 25 and the second set costs 25 extra for the precursor
354
- const allLegendarySets = [
355
- items.PerfectedEnvoyHelmet, items.PerfectedEnvoyPauldrons, items.PerfectedEnvoyBreastplate,
356
- items.PerfectedEnvoyGauntlets, items.PerfectedEnvoyTassets, items.PerfectedEnvoyGreaves,
357
-
358
- items.PerfectedEnvoyMask, items.PerfectedEnvoyShoulderpads, items.PerfectedEnvoyJerkin,
359
- items.PerfectedEnvoyVambraces, items.PerfectedEnvoyLeggings, items.PerfectedEnvoyBoots,
360
-
361
- items.PerfectedEnvoyCowl, items.PerfectedEnvoyMantle, items.PerfectedEnvoyVestments,
362
- items.PerfectedEnvoyGloves, items.PerfectedEnvoyPants, items.PerfectedEnvoyShoes,
363
-
364
- items.RefinedEnvoyHelmet, items.RefinedEnvoyCowl, // extra refined items
365
- items.PerfectedEnvoyHelmet, items.PerfectedEnvoyCowl // extra perfected items
366
- ]
367
- expect(countFromList(allLegendarySets), 'allLegendarySets').to.equal(
368
- 6 * 25 + // First set, where the precursor was free
369
- 2 * 6 * (25 + 25) + // Second and third set, where the precursor was 25 LI
370
- 25 + 25 + // Extra refined items, 25 each
371
- 50 + 50 // Extra perfected items, 50 each
372
- )
373
- })
374
-
375
- it('can calculate white mantle portal device count', () => {
376
- expect(itemsStatistics(generateAccount([
377
- {id: 78978, count: 1},
378
- {id: 30687, count: 1},
379
- {id: 71383, count: 1},
380
- {id: 78978, count: 1},
381
- {id: 78978, count: 1}
382
- ])).whiteMantlePortalDevices).to.equal(3)
383
- })
384
-
385
- it('can calculate chak egg sack count', () => {
386
- expect(itemsStatistics(generateAccount([
387
- {id: 72021, count: 1},
388
- {id: 30687, count: 1},
389
- {id: 71383, count: 1},
390
- {id: 72021, count: 1},
391
- {id: 72021, count: 1}
392
- ])).chakEggSacks).to.equal(3)
393
- })
394
-
395
- it('can calculate preserved queen bee count', () => {
396
- expect(itemsStatistics(generateAccount([
397
- {id: 68440, count: 1},
398
- {id: 30687, count: 1},
399
- {id: 71383, count: 1},
400
- {id: 68440, count: 1},
401
- {id: 68440, count: 1}
402
- ])).preservedQueenBees).to.equal(3)
403
- })
404
-
405
- it('can calculate ghostly infusion count', () => {
406
- expect(itemsStatistics(generateAccount([
407
- {id: 77303, count: 1},
408
- {id: 30687, count: 1},
409
- {id: 71383, count: 1},
410
- {id: 77316, count: 1},
411
- {id: 77394, count: 1}
412
- ])).ghostlyInfusions).to.equal(3)
413
- })
414
-
415
- it('can calculate bauble infusion count', () => {
416
- expect(itemsStatistics(generateAccount([
417
- {id: 78079, count: 1},
418
- {id: 30687, count: 1},
419
- {id: 71383, count: 1},
420
- {id: 78028, count: 1},
421
- {id: 78097, count: 1}
422
- ])).baubleInfusions).to.equal(3)
423
- })
424
-
425
- it('can calculate luminescent refractor count', () => {
426
- expect(itemsStatistics(generateAccount([
427
- {id: 67375, count: 1},
428
- {id: 30687, count: 1},
429
- {id: 71383, count: 1},
430
- {id: 67370, count: 1},
431
- {id: 67372, count: 1}
432
- ])).luminescentRefractors).to.equal(3)
433
- })
434
-
435
- it('can calculate broken spoon count', () => {
436
- expect(itemsStatistics(generateAccount([
437
- {id: 74996, count: 1},
438
- {id: 30687, count: 1},
439
- {id: 71383, count: 1},
440
- {id: 74996, count: 1},
441
- {id: 74996, count: 1}
442
- ])).brokenSpoons).to.equal(3)
443
- })
444
-
445
- it('can calculate black lion claim ticket count', () => {
446
- expect(itemsStatistics(generateAccount([
447
- {id: 43992, count: 1},
448
- {id: 30687, count: 1},
449
- {id: 71383, count: 1},
450
- {id: 43998, count: 3},
451
- {id: 43998, count: 1}
452
- ])).blackLionClaimTickets).to.equal(1.4)
453
-
454
- expect(itemsStatistics(generateAccount([
455
- {id: 43992, count: 3},
456
- {id: 30687, count: 1},
457
- {id: 43998, count: 164}
458
- ])).blackLionClaimTickets).to.equal(19.4)
459
- })
460
-
461
- it('can calculate instrument count', () => {
462
- expect(itemsStatistics(generateAccount([
463
- {id: 66323, count: 1},
464
- {id: 30687, count: 1},
465
- {id: 71383, count: 1},
466
- {id: 38129, count: 1}, // This is a container and does not count
467
- {id: 43526, count: 1}
468
- ])).instruments).to.equal(2)
469
- })
470
-
471
- it('can calculate music box count', () => {
472
- expect(itemsStatistics(generateAccount([
473
- {id: 66323, count: 1},
474
- {id: 30687, count: 1},
475
- {id: 82432, count: 1},
476
- {id: 38129, count: 1},
477
- {id: 83826, count: 1}
478
- ])).musicBoxes).to.equal(2)
479
- })
480
-
481
- it('can calculate permanent tool count', () => {
482
- expect(itemsStatistics(generateAccount([
483
- {id: 78806, count: 1},
484
- {id: 30687, count: 1},
485
- {id: 71383, count: 1},
486
- {id: 38129, count: 1},
487
- {id: 47897, count: 1}
488
- ])).permanentTools).to.equal(2)
489
- })
490
-
491
- it('can calculate chak egg count', () => {
492
- expect(itemsStatistics(generateAccount([
493
- {id: 72205, count: 1},
494
- {id: 30687, count: 1},
495
- {id: 71383, count: 1},
496
- {id: 72205, count: 1},
497
- {id: 72205, count: 1}
498
- ])).chakEggs).to.equal(3)
499
- })
500
-
501
- it('can calculate reclaimed metal plate count', () => {
502
- expect(itemsStatistics(generateAccount([
503
- {id: 74356, count: 1},
504
- {id: 30687, count: 1},
505
- {id: 71383, count: 1},
506
- {id: 74356, count: 1},
507
- {id: 74356, count: 1}
508
- ])).reclaimedMetalPlates).to.equal(3)
509
- })
510
-
511
- it('can calculate fossilized insects count', () => {
512
- expect(itemsStatistics(generateAccount([
513
- {id: 66655, count: 1},
514
- {id: 30687, count: 1},
515
- {id: 71383, count: 1},
516
- {id: 66646, count: 1},
517
- {id: 66642, count: 1}
518
- ])).fossilizedInsects).to.equal(3)
519
- })
520
-
521
- it('can calculate champion bag count', () => {
522
- expect(itemsStatistics(generateAccount([
523
- {id: 44216, count: 1},
524
- {id: 30687, count: 1},
525
- {id: 71383, count: 1},
526
- {id: 44226, count: 1},
527
- {id: 44199, count: 250}
528
- ])).championBags).to.equal(252)
529
- })
530
-
531
- it('can calculate triple trouble chest count', () => {
532
- expect(itemsStatistics(generateAccount([
533
- {id: 49664, count: 1},
534
- {id: 30687, count: 1},
535
- {id: 71383, count: 1},
536
- {id: 49664, count: 1},
537
- {id: 49664, count: 250}
538
- ])).tripleTroubleChests).to.equal(252)
539
- })
540
-
541
- it('can calculate tequatl chest count', () => {
542
- expect(itemsStatistics(generateAccount([
543
- {id: 47836, count: 1},
544
- {id: 30687, count: 1},
545
- {id: 71383, count: 1},
546
- {id: 47836, count: 1},
547
- {id: 47836, count: 250}
548
- ])).tequatlChests).to.equal(252)
549
- })
550
-
551
- it('can calculate unique tonic count', () => {
552
- expect(itemsStatistics(generateAccount([
553
- {id: 68046, count: 3},
554
- {id: 2, count: 1},
555
- {id: 66768, count: 1},
556
- {id: 66926, count: 1},
557
- {id: 5, count: 250},
558
- {id: 68046, count: 100}
559
- ])).uniqueTonics).to.equal(2)
560
- })
561
-
562
- it('can calculate blood ruby count', () => {
563
- expect(itemsStatistics(generateAccount([
564
- {id: 79280, count: 1},
565
- {id: 30687, count: 1},
566
- {id: 71383, count: 1},
567
- {id: 79280, count: 1},
568
- {id: 79280, count: 250}
569
- ])).bloodRubies).to.equal(252)
570
- })
571
-
572
- it('can calculate petrified wood count', () => {
573
- expect(itemsStatistics(generateAccount([
574
- {id: 79469, count: 1},
575
- {id: 30687, count: 1},
576
- {id: 71383, count: 1},
577
- {id: 79469, count: 1},
578
- {id: 79469, count: 250}
579
- ])).petrifiedWood).to.equal(252)
580
- })
581
-
582
- it('can calculate tomes of knowledge count', () => {
583
- expect(itemsStatistics(generateAccount([
584
- {id: 43741, count: 1},
585
- {id: 30687, count: 1},
586
- {id: 71383, count: 1},
587
- {id: 43741, count: 1},
588
- {id: 43766, count: 250}
589
- ])).tomesOfKnowledge).to.equal(252)
590
- })
591
-
592
- it('can calculate permanent contract count', () => {
593
- expect(itemsStatistics(generateAccount([
594
- {id: 35985, count: 1},
595
- {id: 30687, count: 1},
596
- {id: 71383, count: 1},
597
- {id: 35984, count: 1},
598
- {id: 49501, count: 1}
599
- ])).permanentContracts).to.equal(3)
600
- })
601
-
602
- it('can calculate fresh winterberry count', () => {
603
- expect(itemsStatistics(generateAccount([
604
- {id: 79899, count: 2},
605
- {id: 30687, count: 1},
606
- {id: 79899, count: 1},
607
- {id: 79899, count: 1},
608
- {id: 49501, count: 1}
609
- ])).freshWinterberries).to.equal(4)
610
- })
611
-
612
- it('can calculate winter\' heart infusion count', () => {
613
- expect(itemsStatistics(generateAccount([
614
- {id: 79899, count: 2},
615
- {id: 79994, count: 1},
616
- {id: 79959, count: 1},
617
- {id: 79899, count: 1},
618
- {id: 49501, count: 1}
619
- ])).wintersHeartInfusions).to.equal(2)
620
- })
621
-
622
- it('can calculate kodas warmth enrichment count', () => {
623
- expect(itemsStatistics(generateAccount([
624
- {id: 79899, count: 2},
625
- {id: 30687, count: 1},
626
- {id: 79926, count: 1},
627
- {id: 79899, count: 1},
628
- {id: 49501, count: 1}
629
- ])).kodasWarmthEnrichment).to.equal(1)
630
- })
631
-
632
- it('can calculate phospholuminescent infusions count', () => {
633
- expect(itemsStatistics(generateAccount([
634
- {id: 79899, count: 2},
635
- {id: 30687, count: 1},
636
- {id: 79653, count: 1},
637
- {id: 79899, count: 1},
638
- {id: 49501, count: 1}
639
- ])).phospholuminescentInfusions).to.equal(1)
640
- })
641
-
642
- it('can calculate liquid aurillium count', () => {
643
- expect(itemsStatistics(generateAccount([
644
- {id: 76063, count: 2},
645
- {id: 81715, count: 1},
646
- {id: 79653, count: 1},
647
- {id: 79899, count: 1},
648
- {id: 49501, count: 1}
649
- ])).liquidAurillium).to.equal(3)
650
- })
651
-
652
- it('can calculate celestial infusion count', () => {
653
- expect(itemsStatistics(generateAccount([
654
- {id: 81811, count: 2},
655
- {id: 81927, count: 1},
656
- {id: 79653, count: 1},
657
- {id: 79899, count: 1},
658
- {id: 49501, count: 1}
659
- ])).celestialInfusion).to.equal(3)
660
- })
661
-
662
- it('can calculate gemstore toys count', () => {
663
- expect(itemsStatistics(generateAccount([
664
- {id: 79899, count: 2},
665
- {id: 30687, count: 1},
666
- {id: 49939, count: 1},
667
- {id: 79899, count: 1},
668
- {id: 49501, count: 1}
669
- ])).gemstoreToys).to.equal(1)
670
- })
671
-
672
- it('can calculate black lion miniature claim tickets count', () => {
673
- expect(itemsStatistics(generateAccount([
674
- {id: 78474, count: 2},
675
- {id: 30687, count: 1},
676
- {id: 78474, count: 1},
677
- {id: 79899, count: 1},
678
- {id: 49501, count: 1}
679
- ])).blackLionMiniatureClaimTickets).to.equal(3)
680
- })
681
-
682
- it('can calculate jade shards count', () => {
683
- expect(itemsStatistics(generateAccount([
684
- {id: 80332, count: 2},
685
- {id: 78474, count: 2},
686
- {id: 78474, count: 1},
687
- {id: 80332, count: 1},
688
- {id: 49501, count: 1}
689
- ])).jadeShards).to.equal(3)
690
- })
691
-
692
- it('can calculate gifts of exploration count', () => {
693
- expect(itemsStatistics(generateAccount([
694
- {id: 19677, count: 2},
695
- {id: 78474, count: 2},
696
- {id: 78474, count: 1},
697
- {id: 19677, count: 1},
698
- {id: 49501, count: 1}
699
- ])).giftsOfExploration).to.equal(3)
700
- })
701
-
702
- it('can calculate gifts of battle count', () => {
703
- expect(itemsStatistics(generateAccount([
704
- {id: 19678, count: 2},
705
- {id: 78474, count: 2},
706
- {id: 78474, count: 1},
707
- {id: 19678, count: 1},
708
- {id: 49501, count: 1}
709
- ])).giftsOfBattle).to.equal(3)
710
- })
711
-
712
- it('can calculate dragonite ore count', () => {
713
- expect(itemsStatistics(generateAccount([
714
- {id: 78474, count: 1},
715
- {id: 46733, count: 22},
716
- {id: 78474, count: 1},
717
- {id: 19677, count: 1},
718
- {id: 46732, count: 4}
719
- ])).dragoniteOre).to.equal(422)
720
- })
721
-
722
- it('can calculate bloodstone dust count', () => {
723
- expect(itemsStatistics(generateAccount([
724
- {id: 78474, count: 1},
725
- {id: 46731, count: 22},
726
- {id: 78474, count: 1},
727
- {id: 19677, count: 1},
728
- {id: 46730, count: 4}
729
- ])).bloodstoneDust).to.equal(422)
730
- })
731
-
732
- it('can calculate empyreal fragments count', () => {
733
- expect(itemsStatistics(generateAccount([
734
- {id: 78474, count: 1},
735
- {id: 46735, count: 22},
736
- {id: 78474, count: 1},
737
- {id: 19677, count: 1},
738
- {id: 46734, count: 4}
739
- ])).empyrealFragments).to.equal(422)
740
- })
741
-
742
- it('can calculate crystalline ore count', () => {
743
- expect(itemsStatistics(generateAccount([
744
- {id: 78474, count: 1},
745
- {id: 46682, count: 22},
746
- {id: 78474, count: 1},
747
- {id: 19677, count: 1},
748
- {id: 46683, count: 4}
749
- ])).crystallineOre).to.equal(26)
750
- })
751
-
752
- it('can calculate airship oil count', () => {
753
- expect(itemsStatistics(generateAccount([
754
- {id: 78474, count: 1},
755
- {id: 46682, count: 22},
756
- {id: 78474, count: 1},
757
- {id: 76933, count: 1},
758
- {id: 69434, count: 4}
759
- ])).airshipOil).to.equal(5)
760
- })
761
-
762
- it('can calculate auric dust count', () => {
763
- expect(itemsStatistics(generateAccount([
764
- {id: 78474, count: 1},
765
- {id: 69432, count: 22},
766
- {id: 73537, count: 1},
767
- {id: 76933, count: 1},
768
- {id: 69434, count: 4}
769
- ])).auricDust).to.equal(53)
770
- })
771
-
772
- it('can calculate ley line sparks count', () => {
773
- expect(itemsStatistics(generateAccount([
774
- {id: 78474, count: 1},
775
- {id: 69392, count: 22},
776
- {id: 76933, count: 1},
777
- {id: 74042, count: 1},
778
- {id: 69434, count: 4}
779
- ])).leyLineSparks).to.equal(24)
780
- })
781
-
782
- it('can calculate legendary spikes count', () => {
783
- expect(itemsStatistics(generateAccount([
784
- {id: 78474, count: 1},
785
- {id: 81296, count: 22},
786
- {id: 76933, count: 1},
787
- {id: 74042, count: 1},
788
- {id: 69434, count: 4}
789
- ])).legendarySpikes).to.equal(22)
790
- })
791
-
792
- it('can calculate fire orchid blossoms count', () => {
793
- expect(itemsStatistics(generateAccount([
794
- {id: 78474, count: 1},
795
- {id: 81296, count: 22},
796
- {id: 81127, count: 1},
797
- {id: 74042, count: 1},
798
- {id: 81127, count: 4}
799
- ])).fireOrchidBlossoms).to.equal(5)
800
- })
801
-
802
- it('can calculate orrian peal count', () => {
803
- expect(itemsStatistics(generateAccount([
804
- {id: 78474, count: 1},
805
- {id: 81296, count: 22},
806
- {id: 81706, count: 1},
807
- {id: 74042, count: 1},
808
- {id: 81706, count: 4}
809
- ])).orrianPearls).to.equal(5)
810
- })
811
-
812
- it('can calculate luck', () => {
813
- expect(itemsStatistics(generateAccount([
814
- {id: 45175, count: 1}, // 10
815
- {id: 45175, count: 5}, // 50
816
- {id: 45176, count: 1}, // 50
817
- {id: 45176, count: 8}, // 400
818
- {id: 45177, count: 1}, // 100
819
- {id: 45177, count: 4}, // 400
820
- {id: 45178, count: 1}, // 200
821
- {id: 45178, count: 3}, // 600
822
- {id: 45179, count: 1}, // 500
823
- {id: 45179, count: 7} // 3500
824
- ]))._luckFromItems).to.equal(5810)
825
- })
826
-
827
- it('can calculate kralkatite ore', () => {
828
- expect(itemsStatistics(generateAccount([
829
- {id: 45175, count: 1},
830
- {id: 45175, count: 5},
831
- {id: 81743, count: 3},
832
- {id: 45176, count: 8},
833
- {id: 45177, count: 1},
834
- {id: 86069, count: 4},
835
- {id: 81743, count: 9},
836
- {id: 45178, count: 3},
837
- {id: 86069, count: 1},
838
- {id: 45179, count: 7}
839
- ])).kralkatiteOre).to.equal(5)
840
- })
841
-
842
- it('can calculate festive confetti infusions', () => {
843
- expect(itemsStatistics(generateAccount([
844
- {id: 45175, count: 1},
845
- {id: 45175, count: 1},
846
- {id: 84970, count: 1},
847
- {id: 45176, count: 1},
848
- {id: 45177, count: 1},
849
- {id: 84871, count: 1},
850
- {id: 81743, count: 1},
851
- {id: 45178, count: 1},
852
- {id: 84882, count: 1},
853
- {id: 84882, count: 1}
854
- ])).festiveConfettiInfusions).to.equal(4)
855
- })
856
-
857
- it('can calculate potions of pvp reward', () => {
858
- expect(itemsStatistics(generateAccount([
859
- {id: 45175, count: 1},
860
- {id: 45175, count: 1},
861
- {id: 68110, count: 1},
862
- {id: 45176, count: 1},
863
- {id: 45177, count: 1},
864
- {id: 68110, count: 1},
865
- {id: 81743, count: 1},
866
- {id: 45178, count: 1},
867
- {id: 84882, count: 1},
868
- {id: 84882, count: 1}
869
- ])).potionOfPvpRewards).to.equal(2)
870
- })
871
-
872
- it('can calculate potions of wvw reward', () => {
873
- expect(itemsStatistics(generateAccount([
874
- {id: 45175, count: 1},
875
- {id: 45175, count: 1},
876
- {id: 68110, count: 1},
877
- {id: 78600, count: 1},
878
- {id: 45177, count: 1},
879
- {id: 68110, count: 1},
880
- {id: 81743, count: 1},
881
- {id: 78600, count: 1},
882
- {id: 84882, count: 1},
883
- {id: 84882, count: 1}
884
- ])).potionOfWvwRewards).to.equal(2)
885
- })
886
-
887
- it('can calculate skirmish chests', () => {
888
- expect(itemsStatistics(generateAccount([
889
- {id: 45175, count: 1},
890
- {id: 84966, count: 1},
891
- {id: 68110, count: 1},
892
- {id: 78600, count: 1},
893
- {id: 45177, count: 1},
894
- {id: 68110, count: 1},
895
- {id: 81743, count: 1},
896
- {id: 81324, count: 1},
897
- {id: 84882, count: 1},
898
- {id: 84882, count: 1}
899
- ])).skirmishChests).to.equal(2)
900
- })
901
-
902
- it('can calculate unstable fractal essence', () => {
903
- expect(itemsStatistics(generateAccount([
904
- {id: 81743, count: 12}, // Unstable Cosmic Essence
905
- {id: 94036, count: 1}, // Abyssal Fractal Weapon Box
906
- {id: 94042, count: 1}, // Abyssal Fractal Axe Skin
907
- {id: 94017, count: 1}, // Abyssal Infusion Chest
908
- {id: 94024, count: 1}, // Abyssal Infusion
909
- {id: 81790, count: 1}, // Celestial Infusion Chest
910
- {id: 82070, count: 1}, // Celestial Infusion (Red)
911
- {id: 81632, count: 1}, // Endless Chaos Combat Tonic
912
- {id: 94055, count: 1}, // Endless Inner Demon Combat Tonic
913
-
914
- {id: 81761, count: 9999999} // Celestial Infusion (Blue) -- (!) Does not count
915
- ]))._unstableFractalEssenceFromItems).to.equal(7410)
916
- })
917
- })