gw2e-account-statistics 3.17.3 → 3.18.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.
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.default = [103995, // Infinite Arrow Cart Blueprint
5
+ 103993, // Infinite Ballista Blueprint
6
+ 103963, // Infinite Catapult Blueprint
7
+ 103878, // Infinite Flame Ram Blueprint
8
+ 103915, // Infinite Shield Generator Blueprint
9
+ 103911, // Infinite Siege Golem Blueprint
10
+ 103980 // Infinite Trebuchet Blueprint
11
+ ];
@@ -66,9 +66,15 @@ exports.default = {
66
66
  91241, // Cardinal Sabir's Coffer
67
67
  91200, // Cardinal Adina's Coffer
68
68
  91260, // Qadim the Peerless's Coffer
69
- 103783, // Greer's Coffer
70
- 103926, // Decima's Coffer
71
- 103946 // Ura's Coffer
69
+ 103783, // Greer's Coffer (old)
70
+ 104306, // Greer's Coffer
71
+ 104399, // Greer's Magnificent Coffer
72
+ 103926, // Decima's Coffer (old)
73
+ 104410, // Decima's Coffer
74
+ 104246, // Decima's Magnificent Coffer
75
+ 103946, // Ura's Coffer (old)
76
+ 104439, // Ura's Coffer
77
+ 104355 // Ura's Magnificent Coffer
72
78
  ],
73
79
  strikeCmCoffers: [97269, // Mai Trin's Magnificent Coffer
74
80
  96638, // Ankka's Magnificent Coffer
@@ -43,7 +43,7 @@ function deathCountPerHour(accountStatistics) {
43
43
 
44
44
  // Get the total number of auras
45
45
  function totalAuras(accountStatistics) {
46
- var keys = ['nightfury', 'wintersPresence', 'legendaryItemsTrinket'].concat(Object.keys(_cosmeticAuras2.default));
46
+ var keys = ['nightfury', 'wintersPresence', 'legendaryItemsTrinket', 'rimeRimmedRebreather'].concat(Object.keys(_cosmeticAuras2.default));
47
47
 
48
48
  // All keys have to be set
49
49
  var statisticsKeys = Object.keys(accountStatistics);
@@ -174,6 +174,7 @@ exports.default = function (accountData, extraInformation) {
174
174
  // (12) WORLD VS WORLD
175
175
  potionOfWvwRewards: countItems(items, 78600),
176
176
  skirmishChests: countItems(items, [84966, 81324, 96536]),
177
+ infiniteWvwBlueprints: countItems(items, _infiniteWvwBlueprints2.default, true),
177
178
 
178
179
  // (13) PLAYER VS PLAYER
179
180
  potionOfPvpRewards: countItems(items, 68110),
@@ -416,6 +417,10 @@ var _statInfusions = require('../gameData/statInfusions');
416
417
 
417
418
  var _statInfusions2 = _interopRequireDefault(_statInfusions);
418
419
 
420
+ var _infiniteWvwBlueprints = require('../static/infiniteWvwBlueprints');
421
+
422
+ var _infiniteWvwBlueprints2 = _interopRequireDefault(_infiniteWvwBlueprints);
423
+
419
424
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
420
425
 
421
426
  // Get all the items on the account
@@ -9,7 +9,10 @@ exports.default = function (accountData) {
9
9
  masteryPointsTyria: null,
10
10
  masteryPointsMaguuma: null,
11
11
  masteryPointsDesert: null,
12
- masteryPointsCrystal: null
12
+ masteryPointsCrystal: null,
13
+ masteryPointsEndOfDragons: null,
14
+ masteryPointsSecretsOfTheObscure: null,
15
+ masteryPointsJanthirWilds: null
13
16
  };
14
17
  }
15
18
 
@@ -23,10 +26,13 @@ exports.default = function (accountData) {
23
26
 
24
27
  return {
25
28
  masteryPoints: (0, _sumBy2.default)(Object.values(earnedMasteryPoints)),
26
- masteryPointsTyria: earnedMasteryPoints['Tyria'] || 0,
27
- masteryPointsMaguuma: earnedMasteryPoints['Maguuma'] || 0,
28
- masteryPointsDesert: earnedMasteryPoints['Desert'] || 0,
29
- masteryPointsCrystal: earnedMasteryPoints['Tundra'] || 0
29
+ masteryPointsTyria: earnedMasteryPoints['Central Tyria'] || 0,
30
+ masteryPointsMaguuma: earnedMasteryPoints['Heart of Thorns'] || 0,
31
+ masteryPointsDesert: earnedMasteryPoints['Path of Fire'] || 0,
32
+ masteryPointsCrystal: earnedMasteryPoints['Icebrood Saga'] || 0,
33
+ masteryPointsEndOfDragons: earnedMasteryPoints['End of Dragons'] || 0,
34
+ masteryPointsSecretsOfTheObscure: earnedMasteryPoints['Secrets of the Obscure'] || 0,
35
+ masteryPointsJanthirWilds: earnedMasteryPoints['Janthir Wilds'] || 0
30
36
  };
31
37
  };
32
38
 
@@ -31,6 +31,7 @@ exports.default = function (accountData, extraInformation) {
31
31
  fractalSkins: fractalSkins(accountData),
32
32
  immortalSkins: immortalSkins(accountData),
33
33
  wintersPresence: skinExists(accountData, 6577),
34
+ rimeRimmedRebreather: skinExists(accountData, 6891),
34
35
  nightfury: skinExists(accountData, 6161),
35
36
  _fractalRelicsFromTitles: fractalRelicsFromTitles(accountData),
36
37
  _pristineFractalRelicsFromTitles: pristineFractalRelicsFromTitles(accountData),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gw2e-account-statistics",
3
- "version": "3.17.3",
3
+ "version": "3.18.0",
4
4
  "description": "Calculate statistics of guildwars2 accounts",
5
5
  "main": "./build/index.js",
6
6
  "scripts": {
@@ -19,7 +19,7 @@
19
19
  "mockdate": "^2.0.0"
20
20
  },
21
21
  "dependencies": {
22
- "@gw2efficiency/game-data": "^0.1.50",
22
+ "@gw2efficiency/game-data": "^0.1.58",
23
23
  "array-unique": "^0.3.2",
24
24
  "gw2e-account-value": "^3.13.1",
25
25
  "gw2e-static-data": "^0.5.32",
@@ -10,6 +10,7 @@ describe('statistics > aggregate', () => {
10
10
  nightfury: 0,
11
11
  wintersPresence: 1,
12
12
  legendaryItemsTrinket: 1,
13
+ rimeRimmedRebreather: 1,
13
14
 
14
15
  abyssalInfusion: 1,
15
16
  baubleInfusions: 1,
@@ -48,10 +49,13 @@ describe('statistics > aggregate', () => {
48
49
  silentSymphony: 1,
49
50
  arcaneFlowInfusion: 1,
50
51
  mistwalkerInfusion: 1,
52
+ bloodstoneInfusion: 1,
53
+ heatCoreInfusion: 1,
54
+ forestWispInfusion: 1,
51
55
 
52
56
  // (!) Has to be ignored, else it's counting double
53
57
  celestialInfusion: 999
54
- }).totalAuras).to.equal(39)
58
+ }).totalAuras).to.equal(43)
55
59
  })
56
60
 
57
61
  it('can calculate death count per hour', () => {
@@ -178,7 +178,11 @@ describe('statistics > items', () => {
178
178
  silentSymphony: null,
179
179
  arcaneFlowInfusion: null,
180
180
  mistwalkerInfusion: null,
181
- statInfusions: null
181
+ statInfusions: null,
182
+ infiniteWvwBlueprints: null,
183
+ bloodstoneInfusion: null,
184
+ heatCoreInfusion: null,
185
+ forestWispInfusion: null
182
186
  }
183
187
 
184
188
  const bothPermissions = {bank: null, characters: null}
@@ -996,4 +1000,14 @@ describe('statistics > items', () => {
996
1000
  { id: 47897, count: 1 }
997
1001
  ]), EXTRA_INFO).statInfusions).to.equal(3)
998
1002
  })
1003
+
1004
+ it('can calculate infinite blueprint count uniquely', () => {
1005
+ expect(itemsStatistics(generateAccount([
1006
+ { id: 103995, count: 2 },
1007
+ { id: 103993, count: 1 },
1008
+ { id: 71383, count: 1 },
1009
+ { id: 38129, count: 1 },
1010
+ { id: 47897, count: 1 }
1011
+ ]), EXTRA_INFO).infiniteWvwBlueprints).to.equal(2)
1012
+ })
999
1013
  })
@@ -9,7 +9,10 @@ describe('statistics > masteries', () => {
9
9
  masteryPointsTyria: null,
10
10
  masteryPointsMaguuma: null,
11
11
  masteryPointsDesert: null,
12
- masteryPointsCrystal: null
12
+ masteryPointsCrystal: null,
13
+ masteryPointsEndOfDragons: null,
14
+ masteryPointsSecretsOfTheObscure: null,
15
+ masteryPointsJanthirWilds: null
13
16
  }
14
17
 
15
18
  expect(masteriesStatistics({mastery: {points: null}})).to.deep.equal(empty)
@@ -18,26 +21,32 @@ describe('statistics > masteries', () => {
18
21
  it('can calculate the mastery points', () => {
19
22
  const accountData = {
20
23
  totals: [
21
- {region: 'Tyria', spent: 49, earned: 58},
22
- {region: 'Maguuma', spent: 85, earned: 106},
23
- {region: 'Desert', spent: 12, earned: 32},
24
- {region: 'Tundra', spent: 3, earned: 12}
24
+ {region: 'Central Tyria', spent: 49, earned: 58},
25
+ {region: 'Heart of Thorns', spent: 85, earned: 106},
26
+ {region: 'Path of Fire', spent: 12, earned: 32},
27
+ {region: 'Icebrood Saga', spent: 3, earned: 12},
28
+ {region: 'End of Dragons', spent: 7, earned: 9},
29
+ {region: 'Secrets of the Obscure', spent: 4, earned: 5},
30
+ {region: 'Janthir Wilds', spent: 15, earned: 22}
25
31
  ]
26
32
  }
27
33
 
28
34
  expect(masteriesStatistics({mastery: {points: accountData}})).to.deep.equal({
29
- masteryPoints: 58 + 106 + 32 + 12,
35
+ masteryPoints: 58 + 106 + 32 + 12 + 9 + 5 + 22,
30
36
  masteryPointsTyria: 58,
31
37
  masteryPointsMaguuma: 106,
32
38
  masteryPointsDesert: 32,
33
- masteryPointsCrystal: 12
39
+ masteryPointsCrystal: 12,
40
+ masteryPointsEndOfDragons: 9,
41
+ masteryPointsSecretsOfTheObscure: 5,
42
+ masteryPointsJanthirWilds: 22
34
43
  })
35
44
  })
36
45
 
37
46
  it('can calculate the mastery points with missing points', () => {
38
47
  const accountData = {
39
48
  totals: [
40
- {region: 'Maguuma', spent: 0, earned: 1}
49
+ {region: 'Heart of Thorns', spent: 0, earned: 1}
41
50
  ]
42
51
  }
43
52
 
@@ -47,7 +56,10 @@ describe('statistics > masteries', () => {
47
56
  masteryPointsTyria: 0,
48
57
  masteryPointsMaguuma: 1,
49
58
  masteryPointsDesert: 0,
50
- masteryPointsCrystal: 0
59
+ masteryPointsCrystal: 0,
60
+ masteryPointsEndOfDragons: 0,
61
+ masteryPointsSecretsOfTheObscure: 0,
62
+ masteryPointsJanthirWilds: 0
51
63
  })
52
64
  })
53
65
 
@@ -57,7 +69,10 @@ describe('statistics > masteries', () => {
57
69
  masteryPointsTyria: 0,
58
70
  masteryPointsMaguuma: 0,
59
71
  masteryPointsDesert: 0,
60
- masteryPointsCrystal: 0
72
+ masteryPointsCrystal: 0,
73
+ masteryPointsEndOfDragons: 0,
74
+ masteryPointsSecretsOfTheObscure: 0,
75
+ masteryPointsJanthirWilds: 0
61
76
  })
62
77
  })
63
78
  })
@@ -228,6 +228,13 @@ describe('statistics > unlocks', () => {
228
228
  expect(unlocksStatistics({skins: [1, 2, 6577, 6577]}, EXTRA_INFO).wintersPresence).to.equal(1)
229
229
  })
230
230
 
231
+ it('can calculate the rime rimmed rebreather unlock', () => {
232
+ expect(unlocksStatistics({}, EXTRA_INFO).rimeRimmedRebreather).to.equal(null)
233
+ expect(unlocksStatistics({skins: []}, EXTRA_INFO).rimeRimmedRebreather).to.equal(0)
234
+ expect(unlocksStatistics({skins: [1, 2, 7, 9, 10]}, EXTRA_INFO).rimeRimmedRebreather).to.equal(0)
235
+ expect(unlocksStatistics({skins: [1, 2, 6891, 6891]}, EXTRA_INFO).rimeRimmedRebreather).to.equal(1)
236
+ })
237
+
231
238
  it('can calculate the nightfury unlock', () => {
232
239
  expect(unlocksStatistics({}, EXTRA_INFO).nightfury).to.equal(null)
233
240
  expect(unlocksStatistics({skins: []}, EXTRA_INFO).nightfury).to.equal(0)