hypixel-api-reborn 11.2.0 → 11.3.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.
Files changed (101) hide show
  1. package/README.md +1 -1
  2. package/eslint.config.mjs +71 -0
  3. package/package.json +14 -20
  4. package/src/API/getAchievements.js +1 -0
  5. package/src/API/getBoosters.js +1 -0
  6. package/src/API/getChallenges.js +1 -0
  7. package/src/API/getGameCounts.js +1 -0
  8. package/src/API/getGuild.js +4 -3
  9. package/src/API/getGuildAchievements.js +1 -0
  10. package/src/API/getLeaderboards.js +1 -1
  11. package/src/API/getPlayer.js +1 -0
  12. package/src/API/getQuests.js +1 -0
  13. package/src/API/getRecentGames.js +5 -9
  14. package/src/API/getServerInfo.js +40 -37
  15. package/src/API/getStatus.js +1 -0
  16. package/src/API/getWatchdogStats.js +1 -0
  17. package/src/API/housing/getActiveHouses.js +7 -0
  18. package/src/API/housing/getHouse.js +9 -0
  19. package/src/API/housing/getPlayerHouses.js +11 -0
  20. package/src/API/index.js +6 -1
  21. package/src/API/skyblock/getAuction.js +8 -6
  22. package/src/API/skyblock/getAuctions.js +15 -12
  23. package/src/API/skyblock/getAuctionsByPlayer.js +1 -1
  24. package/src/API/skyblock/getBazaar.js +1 -3
  25. package/src/API/skyblock/getBingo.js +1 -2
  26. package/src/API/skyblock/getBingoByPlayer.js +3 -3
  27. package/src/API/skyblock/getEndedAuctions.js +1 -0
  28. package/src/API/skyblock/getFireSales.js +1 -1
  29. package/src/API/skyblock/getGarden.js +7 -0
  30. package/src/API/skyblock/getGovernment.js +1 -2
  31. package/src/API/skyblock/getMember.js +5 -2
  32. package/src/API/skyblock/getMuseum.js +1 -0
  33. package/src/API/skyblock/getNews.js +1 -0
  34. package/src/API/skyblock/getProfiles.js +5 -2
  35. package/src/Client.js +88 -16
  36. package/src/Private/rateLimit.js +7 -11
  37. package/src/Private/requests.js +12 -13
  38. package/src/Private/updater.js +2 -3
  39. package/src/Private/uuidCache.js +1 -2
  40. package/src/Private/validate.js +19 -19
  41. package/src/index.js +5 -0
  42. package/src/structures/APIIncident.js +1 -2
  43. package/src/structures/APIStatus.js +0 -1
  44. package/src/structures/Boosters/Booster.js +9 -8
  45. package/src/structures/Game.js +1 -1
  46. package/src/structures/Guild/Guild.js +19 -36
  47. package/src/structures/Guild/GuildMember.js +2 -2
  48. package/src/structures/House.js +54 -0
  49. package/src/structures/MiniGames/Arcade.js +798 -312
  50. package/src/structures/MiniGames/ArenaBrawl.js +98 -32
  51. package/src/structures/MiniGames/BedWars.js +197 -194
  52. package/src/structures/MiniGames/BlitzSurvivalGames.js +381 -129
  53. package/src/structures/MiniGames/BuildBattle.js +19 -8
  54. package/src/structures/MiniGames/CopsAndCrims.js +253 -25
  55. package/src/structures/MiniGames/Duels.js +905 -664
  56. package/src/structures/MiniGames/MegaWalls.js +390 -51
  57. package/src/structures/MiniGames/MurderMystery.js +151 -30
  58. package/src/structures/MiniGames/Paintball.js +31 -11
  59. package/src/structures/MiniGames/Pit.js +4 -5
  60. package/src/structures/MiniGames/Quakecraft.js +113 -50
  61. package/src/structures/MiniGames/SkyWars.js +528 -372
  62. package/src/structures/MiniGames/SmashHeroes.js +201 -73
  63. package/src/structures/MiniGames/SpeedUHC.js +77 -24
  64. package/src/structures/MiniGames/TNTGames.js +242 -73
  65. package/src/structures/MiniGames/TurboKartRacers.js +55 -115
  66. package/src/structures/MiniGames/UHC.js +144 -132
  67. package/src/structures/MiniGames/VampireZ.js +70 -37
  68. package/src/structures/MiniGames/Warlords.js +126 -1
  69. package/src/structures/MiniGames/WoolWars.js +60 -9
  70. package/src/structures/Pet.js +1 -1
  71. package/src/structures/Player.js +43 -128
  72. package/src/structures/PlayerCosmetics.js +5 -4
  73. package/src/structures/SkyBlock/Auctions/AuctionInfo.js +2 -1
  74. package/src/structures/SkyBlock/Auctions/BaseAuction.js +1 -1
  75. package/src/structures/SkyBlock/News/SkyblockNews.js +15 -15
  76. package/src/structures/SkyBlock/PlayerBingo.js +7 -14
  77. package/src/structures/SkyBlock/SkyblockGarden.js +146 -0
  78. package/src/structures/SkyBlock/SkyblockInventoryItem.js +4 -28
  79. package/src/structures/SkyBlock/SkyblockMember.js +90 -228
  80. package/src/structures/SkyBlock/SkyblockPet.js +3 -4
  81. package/src/structures/SkyBlock/Static/Bingo.js +10 -11
  82. package/src/structures/SkyBlock/Static/BingoData.js +1 -1
  83. package/src/structures/Static/Achievement.js +16 -15
  84. package/src/structures/Static/AchievementTier.js +2 -2
  85. package/src/structures/Static/Quest.js +2 -2
  86. package/src/utils/Constants.js +522 -520
  87. package/src/utils/{guildExp.js → Guild.js} +42 -12
  88. package/src/utils/Player.js +112 -0
  89. package/src/utils/SkyblockUtils.js +482 -192
  90. package/src/utils/arrayTools.js +1 -1
  91. package/src/utils/divide.js +1 -1
  92. package/src/utils/index.js +2 -1
  93. package/src/utils/isGuildID.js +1 -1
  94. package/src/utils/oscillation.js +4 -2
  95. package/src/utils/removeSnakeCase.js +11 -7
  96. package/src/utils/rgbToHexColor.js +1 -1
  97. package/src/utils/romanize.js +3 -3
  98. package/src/utils/toUuid.js +4 -4
  99. package/src/utils/varInt.js +2 -2
  100. package/typings/index.d.ts +1186 -967
  101. package/src/utils/toIGN.js +0 -24
@@ -1,226 +1,649 @@
1
1
  // IMPORTANT : a lot of the properties from the API seem to be nonsense
2
2
 
3
- const divide = require('../../utils/divide');
4
- const { weekAB, monthAB } = require('../../utils/oscillation');
5
3
  const { removeSnakeCaseString } = require('../../utils/removeSnakeCase');
4
+ const { weekAB, monthAB } = require('../../utils/oscillation');
5
+ const divide = require('../../utils/divide');
6
6
 
7
+ // eslint-disable-next-line jsdoc/require-jsdoc
8
+ function parseZombiesKills(data) {
9
+ const matches = Array.from(Object.keys(data))
10
+ .map((x) => x.match(/^([A-Za-z]+)_zombie_kills_zombies$/))
11
+ .filter((x) => x);
12
+ // From entries might be broken
13
+ return Object.fromEntries(matches.map((x) => [removeSnakeCaseString(x[1]), data[x[0]] || 0]));
14
+ }
7
15
  /**
8
- * Arcade class
16
+ * Zombies - Stats by Map + Difficulty
9
17
  */
10
- class Arcade {
18
+ class ZombiesStats {
11
19
  /**
12
20
  * Constructor
13
- * @param {Object} data Data from the API
21
+ * @param {Object} data Data from API
22
+ * @param {string} type Map name + difficulty ( default overall )
14
23
  */
15
- constructor(data = {}) {
24
+ constructor(data, type = '') {
25
+ if (type) type = `_${type}`;
16
26
  /**
17
- * Amount of coins
27
+ * Best Round
18
28
  * @type {number}
19
29
  */
20
- this.coins = data.coins || 0;
30
+ this.bestRound = data[`best_round_zombies${type}`] || 0;
21
31
  /**
22
- * Weekly coins
32
+ * Deaths ( NOT losses )
23
33
  * @type {number}
24
34
  */
25
- this.weeklyCoins = parseInt(data[`weekly_coins_${weekAB()}`] || 0, 10);
35
+ this.deaths = data[`deaths_zombies${type}`] || 0;
26
36
  /**
27
- * Monthly coins
37
+ * Doors opened
28
38
  * @type {number}
29
39
  */
30
- this.monthlyCoins = parseInt(data[`monthly_coins_${monthAB()}`] || 0, 10);
40
+ this.doorsOpened = data[`doors_opened_zombies${type}`] || 0;
31
41
  /**
32
- * Hints Disabled
33
- * @type {boolean}
42
+ * Fastest time to reach round 10 in seconds
43
+ * @type {number}
34
44
  */
35
- this.hintsDisabled = !data.hints;
45
+ this.fastestRound10 = data[`fastest_time_10_zombies${type}_normal`] || 0;
36
46
  /**
37
- * Flash Disabled
38
- * @type {boolean}
47
+ * Fastest time to reach round 20 in seconds
48
+ * @type {number}
39
49
  */
40
- this.flashDisabled = !data.flash;
50
+ this.fastestRound20 = data[`fastest_time_20_zombies${type}_normal`] || 0;
41
51
  /**
42
- * Draw their thing stats
43
- * @type {BaseGame}
52
+ * Fastest time to reach round 30 in seconds
53
+ * @type {number}
44
54
  */
45
- this.drawTheirThing = new BaseGame(data, 'draw_their_thing');
55
+ this.fastestRound30 = data[`fastest_time_30_zombies${type}_normal`] || 0;
46
56
  /**
47
- * Dragon wars "2" stats
48
- * @type {BaseGame}
57
+ * Players revived
58
+ * @type {number}
49
59
  */
50
- this.dragonWars = new BaseGame(data, 'dragonwars2');
60
+ this.playersRevived = data[`players_revived_zombies${type}`] || 0;
51
61
  /**
52
- * Easter Simulator stats
53
- * @type {EasterSimulator}
62
+ * Number of times player is knocked down
63
+ * @type {number}
54
64
  */
55
- this.easterSimulator = new BaseGame(data, 'easter_simulator').extend(
56
- 'eggsFound',
57
- data.eggs_found_easter_simulator || 0
58
- );
65
+ this.timesKnockedDown = data[`times_knocked_down_zombies${type}`] || 0;
59
66
  /**
60
- * Grinch Simulator stats
61
- * @type {GrinchSimulator}
67
+ * Total amount of rounds the player survived
68
+ * @type {number}
62
69
  */
63
- this.grinchSimulator = new BaseGame(data, 'grinch_simulator_v2').extend(
64
- 'giftsFound',
65
- data.gifts_grinch_simulator_v2 || 0
66
- );
70
+ this.roundsSurvived = data[`total_rounds_survived_zombies${type}`] || 0;
67
71
  /**
68
- * Scuba Simulator stats
69
- * @type {ScubaSimulator}
72
+ * Total amount of windows fully repaired by player
73
+ * @type {number}
70
74
  */
71
- this.scubaSimulator = new BaseGame(data, 'scuba_simulator').extend(
72
- 'itemsFound',
73
- data.items_found_scuba_simulator || 0
74
- );
75
+ this.windowsRepaired = data[`windows_repaired_zombies${type}`] || 0;
75
76
  /**
76
- * Santa Simulator stats
77
- * @type {SantaSimulator}
77
+ * Wins
78
+ * @type {number}
78
79
  */
79
- this.santaSimulator = new BaseGame(data, 'santa_simulator').extend(
80
- 'giftsDelivered',
81
- data.delivered_santa_simulator || 0
82
- );
80
+ this.wins = data[`wins_zombies${type}`] || 0;
83
81
  /**
84
- * Santa Says stats
85
- * @type {BaseGame}
82
+ * Total Zombie Kills
83
+ * @type {number}
86
84
  */
87
- this.santaSays = new BaseGame(data, 'santa_says');
85
+ this.zombieKills = data[`zombie_kills_zombies${type}`] || 0;
86
+ }
87
+ }
88
+
89
+ /**
90
+ * Zombies - Overall stats
91
+ */
92
+ class Zombies {
93
+ /**
94
+ * Constructor
95
+ * @param {Object} data Data from API
96
+ */
97
+ constructor(data) {
88
98
  /**
89
- * Simon Says stats
90
- * @type {BaseGame}
99
+ * Overall Stats
100
+ * @type {ZombiesStats}
91
101
  */
92
- this.simonSays = new BaseGame(data, 'simon_says');
102
+ this.overall = new ZombiesStats(data);
93
103
  /**
94
- * Farm Hunt stats
95
- * @type {BaseGame}
104
+ * Stats for Dead End
105
+ * @type {ZombiesStats}
96
106
  */
97
- this.farmHunt = new BaseGame(data, 'farm_hunt');
107
+ this.deadEnd = new ZombiesStats(data, 'deadend');
98
108
  /**
99
- * Hole in the Wall stats
100
- * @type {HITW}
109
+ * Stats for Bad Blood
110
+ * @type {ZombiesStats}
101
111
  */
102
- this.holeInTheWall = new HITW(data, 'hole_in_the_wall');
112
+ this.badBlood = new ZombiesStats(data, 'badblood');
103
113
  /**
104
- * Mini Walls stats
105
- * @type {MiniWalls}
114
+ * Stats for Alien Arcadium
115
+ * @type {ZombiesStats}
106
116
  */
107
- this.miniWalls = new MiniWalls(data); // needs extension
117
+ this.alienArcadium = new ZombiesStats(data, 'alienarcadium');
108
118
  /**
109
- * Party games (1) stats
110
- * @type {BaseGame}
119
+ * Stats for Prison
120
+ * @type {ZombiesStats}
111
121
  */
112
- this.partyGames = new BaseGame(data, 'party');
122
+ this.prison = new ZombiesStats(data, 'prison');
113
123
  /**
114
- * Party Games 2 stats ( legacy )
115
- * @type {BaseGame}
116
- * @deprecated
124
+ * Kills By Zombie
125
+ * @type {Record<string, number>}
117
126
  */
118
- this.partyGames2 = new BaseGame(data, 'party_2');
127
+ this.killsByZombie = parseZombiesKills(data);
119
128
  /**
120
- * Party Games 3 stats ( legacy )
121
- * @type {BaseGame}
122
- * @deprecated
129
+ * Bullets Hit
130
+ * @type {number}
123
131
  */
124
- this.partyGames3 = new BaseGame(data, 'party_3');
132
+ this.bulletsHit = data.bullets_hit_zombies || 0;
125
133
  /**
126
- * Throw out stats
127
- * @type {BaseGame}
134
+ * Bullets Shot
135
+ * @type {number}
128
136
  */
129
- this.throwOut = new BaseGame(data, 'throw_out');
137
+ this.bulletsShot = data.bullets_shot_zombies || 0;
130
138
  /**
131
- * Soccer stats
132
- * @type {Soccer}
139
+ * Gun Accuracy
140
+ * @type {number}
133
141
  */
134
- this.soccer = new Soccer(data);
142
+ this.gunAccuracy = divide(this.bulletsHit, this.bulletsShot);
135
143
  /**
136
- * Hypixel Sports stats
137
- * @type {BaseGame}
138
- * @deprecated
144
+ * Headshots
145
+ * @type {number}
139
146
  */
140
- this.hypixelSports = new BaseGame(data, 'hypixel_sports');
147
+ this.headshots = data.headshots_zombies || 0;
141
148
  /**
142
- * Ender Spleef stats
143
- * @type {BaseGame}
149
+ * Headshot Accuracy
150
+ * @type {number}
144
151
  */
145
- this.enderSpleef = new BaseGame(data, 'ender');
152
+ this.headshotAccuracy = divide(this.headshots, this.bulletsShot);
153
+ }
154
+ }
155
+
156
+ /**
157
+ * Dropper stats by map
158
+ */
159
+ class DropperMap {
160
+ /**
161
+ * Constructor
162
+ * @param {Object} data Data from API
163
+ * @param {string} mapName String map name
164
+ */
165
+ constructor(data, mapName) {
146
166
  /**
147
- * Blocking dead ( previously known as DayOne ) stats
148
- * @type {BlockingDead}
167
+ * Best Complete Time
168
+ * @type {number}
149
169
  */
150
- this.blockingDead = new BaseGame(data, 'dayone').extend('headshots', data.headshots_dayone || 0);
170
+ this.bestTime = data?.[mapName]?.best_time ?? 0;
151
171
  /**
152
- * Galaxy Wars stats
153
- * @type {GalaxyWars}
172
+ * Total completions
173
+ * @type {number}
154
174
  */
155
- this.galaxyWars = new GalaxyWars(data);
156
- // Lenient parsing
175
+ this.completions = data?.[mapName]?.completions ?? 0;
176
+ }
177
+ }
178
+
179
+ /**
180
+ * Blocking Dead class
181
+ */
182
+ class BlockingDead {
183
+ constructor(data) {
184
+ /**
185
+ * Wins
186
+ * @type {number}
187
+ */
188
+ this.wins = data.wins_dayone || 0;
189
+ /**
190
+ * Kills
191
+ * @type {number}
192
+ */
193
+ this.kills = data.kills_dayone || 0;
194
+ /**
195
+ * Headshots
196
+ * @type {number}
197
+ */
198
+ this.headshots = data.headshots_dayone || 0;
199
+ }
200
+ }
201
+ /**
202
+ * Bounty Hunters class
203
+ */
204
+ class BountyHunters {
205
+ constructor(data) {
206
+ /**
207
+ * Wins
208
+ * @type {number}
209
+ */
210
+ this.wins = data.wins_oneinthequiver || 0;
211
+ /**
212
+ * Kills
213
+ * @type {number}
214
+ */
215
+ this.kills = data.kills_oneinthequiver || 0;
216
+ /**
217
+ * Deaths
218
+ * @type {number}
219
+ */
220
+ this.deaths = data.deaths_oneinthequiver || 0;
221
+ /**
222
+ * Kill Death Ratio
223
+ * @type {number}
224
+ */
225
+ this.KDRatio = divide(this.kills, this.deaths);
226
+ /**
227
+ * Bounty Kills
228
+ * @type {number}
229
+ */
230
+ this.bountyKills = data.bounty_kills_oneinthequiver || 0;
231
+ /**
232
+ * Bow Kills
233
+ * @type {number}
234
+ */
235
+ this.bowKills = data.bow_kills_oneinthequiver || 0;
236
+ /**
237
+ * Sword Kills
238
+ * @type {number}
239
+ */
240
+ this.swordKills = data.sword_kills_oneinthequiver || 0;
241
+ }
242
+ }
243
+ /**
244
+ * Capture the Wool class
245
+ */
246
+ class CaptureTheWool {
247
+ constructor(data) {
248
+ /**
249
+ * Wins
250
+ * @type {number}
251
+ */
252
+ this.wins = data.woolhunt_participated_wins || 0;
253
+ /**
254
+ * Losses
255
+ * @type {number}
256
+ */
257
+ this.losses = data.woolhunt_participated_losses || 0;
258
+ /**
259
+ * Win Loss ratio
260
+ * @type {number}
261
+ */
262
+ this.WLRatio = divide(this.wins, this.losses);
263
+ /**
264
+ * Draws
265
+ * @type {number}
266
+ */
267
+ this.draws = data.woolhunt_participated_draws || 0;
268
+ /**
269
+ * Kills
270
+ * @type {number}
271
+ */
272
+ this.kills = data.woolhunt_kills || 0;
273
+ /**
274
+ * Deaths
275
+ * @type {number}
276
+ */
277
+ this.deaths = data.woolhunt_deaths || 0;
278
+ /**
279
+ * Kill Death ratio
280
+ * @type {number}
281
+ */
282
+ this.KDRatio = divide(this.kills, this.deaths);
283
+ /**
284
+ * assists
285
+ * @type {number}
286
+ */
287
+ this.assists = data.woolhunt_assists || 0;
288
+ /**
289
+ * woolPickedUp
290
+ * @type {number}
291
+ */
292
+ this.woolPickedUp = data.woolhunt_wools_stolen || 0;
293
+ /**
294
+ * woolCaptured
295
+ * @type {number}
296
+ */
297
+ this.woolCaptured = data.woolhunt_wools_captured || 0;
298
+ /**
299
+ * fastestWin (In seconds)
300
+ * @type {number}
301
+ */
302
+ this.fastestWin = data.woolhunt_fastest_win || 0;
303
+ /**
304
+ * longestGame (In seconds)
305
+ * @type {number}
306
+ */
307
+ this.longestGame = data.woolhunt_longest_game || 0;
308
+ }
309
+ }
310
+ /**
311
+ * Dragon Wars class
312
+ */
313
+ class DragonWars {
314
+ constructor(data) {
315
+ /**
316
+ * Wins
317
+ * @type {number}
318
+ */
319
+ this.wins = data.wins_dragonwars2 || 0;
320
+ /**
321
+ * Kills
322
+ * @type {number}
323
+ */
324
+ this.kills = data.kills_dragonwars2 || 0;
325
+ }
326
+ }
327
+ /**
328
+ * Dropper class
329
+ */
330
+ class Dropper {
331
+ constructor(data) {
332
+ /**
333
+ * Total Wins
334
+ * @type {number}
335
+ */
336
+ this.wins = data?.wins ?? 0;
337
+ /**
338
+ * Total Fails
339
+ * @type {number}
340
+ */
341
+ this.fails = data?.fails ?? 0;
342
+ /**
343
+ * Fastest Game
344
+ * @type {number}
345
+ */
346
+ this.fastestGame = data?.fastest_game ?? 0;
347
+ /**
348
+ * Total Amount of Flawless Games
349
+ * @type {number}
350
+ */
351
+ this.flawlessGames = data?.flawless_games ?? 0;
352
+ /**
353
+ * Total Amount of Games Played
354
+ * @type {number}
355
+ */
356
+ this.gamesPlayed = data?.games_played ?? 0;
357
+ /**
358
+ * Total Amount of Maps Completed
359
+ * @type {number}
360
+ */
361
+ this.mapsCompleted = data?.maps_completed ?? 0;
362
+ /**
363
+ * Total Amount of Games Finished
364
+ * @type {number}
365
+ */
366
+ this.gamesFinished = data?.games_finished ?? 0;
367
+ /**
368
+ * Maps
369
+ * @type {Object.<string, DropperMap>}
370
+ */
371
+ this.maps = {};
372
+ Object.keys(data?.map_stats ?? {}).forEach((map) => {
373
+ this.maps[map] = new DropperMap(data?.map_stats, map);
374
+ });
375
+ }
376
+ }
377
+ /**
378
+ * Ender Spleef class
379
+ */
380
+ class EnderSpleef {
381
+ constructor(data) {
382
+ /**
383
+ * Wins
384
+ * @type {number}
385
+ */
386
+ this.wins = data.wins_ender || 0;
387
+ /**
388
+ * Kills
389
+ * @type {number}
390
+ */
391
+ this.kills = data.kills_dragonwars2 || 0;
392
+ /**
393
+ * Trail
394
+ * @type {string}
395
+ */
396
+ this.trail = data.enderspleef_trail || '';
397
+ /**
398
+ * Blocks Destroyed
399
+ * @type {number}
400
+ */
401
+ this.blocksDestroyed = data.blocks_destroyed_ender || 0;
402
+ /**
403
+ * Big Shot Activations
404
+ * @type {number}
405
+ */
406
+ this.bigShotActivations = data.bigshot_powerup_activations_ender || 0;
407
+ /**
408
+ * Triple Shot Activations
409
+ * @type {number}
410
+ */
411
+ this.tripleShotActivations = data.tripleshot_powerup_activations_ender || 0;
412
+ /**
413
+ * Total Powerup Activations
414
+ * @type {number}
415
+ */
416
+ this.totalPowerUpActivations = this.bigShotActivations + this.tripleShotActivations;
417
+ }
418
+ }
419
+ /**
420
+ * Farm Hunt class
421
+ */
422
+ class FarmHunt {
423
+ constructor(data) {
424
+ /**
425
+ * Wins
426
+ * @type {number}
427
+ */
428
+ this.wins = data.wins_farm_hunt || 0;
429
+ /**
430
+ * Wins as Animal
431
+ * @type {number}
432
+ */
433
+ this.winsAsAnimal = data.animal_wins_farm_hunt || 0;
434
+ /**
435
+ * Wins as Hunter
436
+ * @type {number}
437
+ */
438
+ this.winsAsHunter = data.hunter_wins_farm_hunt || 0;
439
+ /**
440
+ * Kills
441
+ * @type {number}
442
+ */
443
+ this.kills = data.kills_farm_hunt || 0;
444
+ /**
445
+ * Kills as Animal
446
+ * @type {number}
447
+ */
448
+ this.killsAsAnimal = data.animal_kills_farm_hunt || 0;
449
+ /**
450
+ * Kills as Hunter
451
+ * @type {number}
452
+ */
453
+ this.killsAsHunter = data.hunter_kills_farm_hunt || 0;
454
+ /**
455
+ * Taunts Used
456
+ * @type {number}
457
+ */
458
+ this.tauntsUsed = data.taunts_used_farm_hunt || 0;
459
+ /**
460
+ * Risky Taunts Used
461
+ * @type {number}
462
+ */
463
+ this.riskyTauntsUsed = data.risky_taunts_used_farm_hunt || 0;
464
+ /**
465
+ * Safe Taunts Used
466
+ * @type {number}
467
+ */
468
+ this.safeTauntsUsed = data.safe_taunts_used_farm_hunt || 0;
469
+ /**
470
+ * Dangerous Taunts Used
471
+ * @type {number}
472
+ */
473
+ this.dangerousTauntsUsed = data.dangerous_taunts_used_farm_hunt || 0;
474
+ /**
475
+ * Firework Taunts Used
476
+ * @type {number}
477
+ */
478
+ this.fireworkTauntsUsed = data.firework_taunts_used_farm_hunt || 0;
479
+ /**
480
+ * Poop Collected
481
+ * @type {number}
482
+ */
483
+ this.poop = (data.poop_collected_farm_hunt || 0) + (data.poop_collected || 0);
484
+ }
485
+ }
486
+ /**
487
+ * Football class
488
+ */
489
+ class Football {
490
+ constructor(data) {
491
+ /**
492
+ * Wins
493
+ * @type {number}
494
+ */
495
+ this.wins = data.wins_soccer || 0;
496
+ /**
497
+ * Goals
498
+ * @type {number}
499
+ */
500
+ this.goals = data.goals_soccer || 0;
501
+ /**
502
+ * Kikcs
503
+ * @type {number}
504
+ */
505
+ this.kicks = data.kicks_soccer || 0;
506
+ /**
507
+ * Power Kicks
508
+ * @type {number}
509
+ */
510
+ this.powerKicks = data.powerkicks_soccer || 0;
511
+ }
512
+ }
513
+ /**
514
+ * Galxy Wars
515
+ */
516
+ class GalaxyWars {
517
+ /**
518
+ * @param {Object} data Data from API
519
+ */
520
+ constructor(data) {
521
+ /**
522
+ * Wins
523
+ * @type {number}
524
+ */
525
+ this.wins = data.sw_game_wins || 0;
526
+ /**
527
+ * Kills
528
+ * @type {number}
529
+ */
530
+ this.kills = data.sw_kills || 0;
531
+ /**
532
+ * Deaths
533
+ * @type {number}
534
+ */
535
+ this.deaths = data.sw_deaths || 0;
536
+ /**
537
+ * Total shots fired
538
+ * @type {number}
539
+ */
540
+ this.shotsFired = data.sw_shots_fired || 0;
541
+ /**
542
+ * Total weekly kills
543
+ * @type {number}
544
+ */
545
+ this.weeklyKills = parseInt(data[`weekly_kills_${weekAB()}`] || 0, 10);
546
+ /**
547
+ * Total Monthly kills
548
+ * @type {number}
549
+ */
550
+ this.monthlyKills = parseInt(data[`monthly_kills_${monthAB()}`] || 0, 10);
551
+ /**
552
+ * Attacker Kills
553
+ * @type {number}
554
+ */
555
+ this.attackerKills = data.sw_rebel_kills || 0;
556
+ /**
557
+ * Defender Kills
558
+ * @type {number}
559
+ */
560
+ this.defenderKills = data.sw_empire_kills || 0;
561
+ }
562
+ }
563
+ /**
564
+ * Party Popper Stats (Sub gamemode of Hide and Seek)
565
+ */
566
+ class PartyPopper {
567
+ /**
568
+ * @param {Object} data Data from API
569
+ */
570
+ constructor(data) {
571
+ /**
572
+ * Wins as Seeker
573
+ * @type {number}
574
+ */
575
+ this.winsAsSeeker = data.party_pooper_seeker_wins_hide_and_seek || 0;
576
+ /**
577
+ * Wins as Hider
578
+ * @type {number}
579
+ */
580
+ this.winsAsHider = data.party_pooper_hider_wins_hide_and_seek || 0;
581
+ /**
582
+ * Wins
583
+ * @type {number}
584
+ */
585
+ this.wins = this.winsAsSeeker + this.winsAsHider;
586
+ }
587
+ }
588
+ /**
589
+ * Prop Hunt Stats (Sub gamemode of Hide and Seek)
590
+ */
591
+ class PropHunt {
592
+ /**
593
+ * @param {Object} data Data from API
594
+ */
595
+ constructor(data) {
157
596
  /**
158
- * OITQ / One In The Quiver stats
159
- * @type {OITQ}
597
+ * Wins as Seeker
598
+ * @type {number}
160
599
  */
161
- this.oitq = this.oneInTheQuiver = new BaseGame(data, 'oneinthequiver').extend(
162
- 'bountyKills',
163
- data.bounty_kills_oneinthequiver || 0
164
- );
600
+ this.winsAsSeeker = data.prop_hunt_seeker_wins_hide_and_seek || 0;
165
601
  /**
166
- * Zombies
167
- * @type {Zombies}
602
+ * Wins as Hider
603
+ * @type {number}
168
604
  */
169
- this.zombies = new Zombies(data);
605
+ this.winsAsHider = data.prop_hunt_hider_wins_hide_and_seek || 0;
170
606
  /**
171
- * Capture The Wool
172
- * @type {{kills: number, captures: number}}
607
+ * Wins
608
+ * @type {number}
173
609
  */
174
- this.captureTheWool = { kills: data.arcade_ctw_slayer || 0, captures: data.arcade_ctw_oh_sheep || 0 };
610
+ this.wins = this.winsAsSeeker + this.winsAsHider;
175
611
  }
176
612
  }
177
613
  /**
178
- * Most basic game class, used by all arcade games
614
+ * Hide And Seek Stats
179
615
  */
180
- class BaseGame {
616
+ class HideAndSeek {
181
617
  /**
182
- * @param {Object} data data
183
- * @param {string} gameName Game Name ( snake )
618
+ * @param {Object} data Data from API
184
619
  */
185
- constructor(data, gameName) {
620
+ constructor(data) {
186
621
  /**
187
- * Wins
188
- * @type {?number}
622
+ * Party Popper Stats
623
+ * @type {PartyPopper}
189
624
  */
190
- this.wins = parseInt(data['wins_' + gameName], 10) || 0;
625
+ this.partyPopper = new PartyPopper(data);
191
626
  /**
192
- * Kills, only available in combat games
193
- * @type {?number}
627
+ * Prop Hunt Stats
628
+ * @type {PropHunt}
194
629
  */
195
- this.kills = parseInt(data['kills_' + gameName], 10) || 0;
630
+ this.propHunt = new PropHunt(data);
196
631
  /**
197
- * Deaths, only available in combat games
198
- * @type {?number}
632
+ * Wins as Seeker
633
+ * @type {number}
199
634
  */
200
- this.deaths = parseInt(data['deaths_' + gameName], 10) || 0;
635
+ this.winsAsSeeker = data.seeker_wins_hide_and_seek || 0;
201
636
  /**
202
- * Rounds Played, only available in Santa says, Simon Says, and HITW
203
- * @type {?number}
637
+ * Wins as Hider
638
+ * @type {number}
204
639
  */
205
- this.roundsPlayed = parseInt(data['rounds_' + gameName], 10) || 0;
206
- }
207
- /**
208
- * Extend BaseGame without creating a new class
209
- * @param {string} name Property to add
210
- * @param {*} value Corresponding value
211
- * @private
212
- * @returns {BaseGame}
213
- */
214
- extend(name, value) {
215
- this[name] = value;
216
- return this;
640
+ this.winsAsHider = data.hider_wins_hide_and_seek || 0;
217
641
  }
218
642
  }
219
-
220
643
  /**
221
- * Galxy Wars, aka sw class, totally different from normal stats
644
+ * Hide And Seek Stats
222
645
  */
223
- class GalaxyWars {
646
+ class HoleInTheWall {
224
647
  /**
225
648
  * @param {Object} data Data from API
226
649
  */
@@ -229,344 +652,407 @@ class GalaxyWars {
229
652
  * Wins
230
653
  * @type {number}
231
654
  */
232
- this.wins = data.sw_game_wins || 0;
655
+ this.wins = data.wins_hole_in_the_wall || 0;
233
656
  /**
234
- * Kills
657
+ * Rounds Played
235
658
  * @type {number}
236
659
  */
237
- this.kills = data.sw_kills || 0;
660
+ this.rounds = data.rounds_hole_in_the_wall || 0;
238
661
  /**
239
- * Deaths
662
+ * Score Record in Finals
240
663
  * @type {number}
241
664
  */
242
- this.deaths = data.sw_deaths || 0;
665
+ this.scoreRecordFinals = data.hitw_record_f || 0;
243
666
  /**
244
- * Total shots fired
667
+ * Score Record in Normal
245
668
  * @type {number}
246
669
  */
247
- this.shotsFired = data.sw_shots_fired || 0;
670
+ this.scoreRecordNormal = data.hitw_record_q || 0;
248
671
  /**
249
- * Total weekly kills
672
+ * Score Record Overall
250
673
  * @type {number}
251
674
  */
252
- this.weeklyKills = parseInt(data[`weekly_kills_${weekAB()}`] || 0, 10);
675
+ this.scoreRecordOverall = this.scoreRecordFinals + this.scoreRecordNormal;
676
+ }
677
+ }
678
+ /**
679
+ * Hypixel Says Stats
680
+ */
681
+ class HypixelSays {
682
+ constructor(data) {
253
683
  /**
254
- * Total Monthly kills
684
+ * Wins
255
685
  * @type {number}
256
686
  */
257
- this.monthlyKills = parseInt(data[`monthly_kills_${monthAB()}`] || 0, 10);
687
+ this.wins = data.wins_simon_says || 0;
258
688
  /**
259
- * Attacker Kills
689
+ * Rounds
260
690
  * @type {number}
261
691
  */
262
- this.attackerKills = data.sw_rebel_kills || 0;
692
+ this.rounds = data.rounds_simon_says || 0;
263
693
  /**
264
- * Defender Kills
694
+ * Round Wins
265
695
  * @type {number}
266
696
  */
267
- this.defenderKills = data.sw_empire_kills || 0;
697
+ this.roundWins = data.round_wins_simon_says || 0;
698
+ /**
699
+ * Top Score
700
+ * @type {number}
701
+ */
702
+ this.topScore = data.top_score_simon_says || 0;
268
703
  }
269
704
  }
270
705
  /**
271
- * Soccer class
706
+ * Mini Walls class
272
707
  */
273
- class Soccer {
708
+ class MiniWalls {
274
709
  /**
275
- * @param {Object} data Data from API
710
+ * Constructor
711
+ * @param {Object} data data from API
276
712
  */
277
713
  constructor(data) {
714
+ /**
715
+ * Active Kit
716
+ * @type {string}
717
+ */
718
+ this.kit = data.miniWalls_activeKit || '';
278
719
  /**
279
720
  * Wins
280
721
  * @type {number}
281
722
  */
282
- this.wins = data.wins_soccer || 0;
723
+ this.wins = data.wins_mini_walls || 0;
283
724
  /**
284
- * Number of Kicks
725
+ * Kills
285
726
  * @type {number}
286
727
  */
287
- this.kicks = data.kicks_soccer || 0;
728
+ this.kills = data.kills_mini_walls || 0;
288
729
  /**
289
- * Number of Powerkicks
730
+ * Deaths
290
731
  * @type {number}
291
732
  */
292
- this.powerKicks = data.powerkicks_soccer || 0;
733
+ this.deaths = data.deaths_mini_walls || 0;
293
734
  /**
294
- * Goals
735
+ * Kill Death Ratio
295
736
  * @type {number}
296
737
  */
297
- this.goals = data.goals_soccer || 0;
738
+ this.KDRatio = divide(this.kills, this.deaths);
739
+ /**
740
+ * Final Kills
741
+ * @type {number}
742
+ */
743
+ this.finalKills = data.final_kills_mini_walls || 0;
744
+ /**
745
+ * Wither Kills
746
+ * @type {number}
747
+ */
748
+ this.witherKills = data.wither_kills_mini_walls || 0;
749
+ /**
750
+ * Wither Damage
751
+ * @type {number}
752
+ */
753
+ this.witherDamage = data.wither_damage_mini_walls || 0;
754
+ /**
755
+ * Arrows Shot
756
+ * @type {number}
757
+ */
758
+ this.arrowsShot = data.arrows_shot_mini_walls || 0;
759
+ /**
760
+ * Arrows Hit
761
+ * @type {number}
762
+ */
763
+ this.arrowsHit = data.arrows_hit_mini_walls || 0;
764
+ /**
765
+ * Bow Accuracy
766
+ * @type {number}
767
+ */
768
+ this.bowAccuracy = divide(this.arrowsHit, this.arrowsShot);
298
769
  }
299
770
  }
300
771
  /**
301
- * Hole in the Wall class
772
+ * Party Games class
302
773
  */
303
- class HITW extends BaseGame {
774
+ class PartyGames {
304
775
  /**
305
- * @param {Object} data Data From API
776
+ * Constructor
777
+ * @param {Object} data data from API
306
778
  */
307
779
  constructor(data) {
308
- super(data, 'hole_in_the_wall');
309
780
  /**
310
- * Score Record in Finals
781
+ * Wins
311
782
  * @type {number}
312
783
  */
313
- this.scoreRecordFinals = data.hitw_record_f || 0;
784
+ this.wins = data.wins_party || 0;
314
785
  /**
315
- * Score Record in Normal
786
+ * Rounds Won
316
787
  * @type {number}
317
788
  */
318
- this.scoreRecordNormal = data.hitw_record_q || 0;
789
+ this.roundWins = data.round_wins_party || 0;
319
790
  /**
320
- * Score Record overall
791
+ * Stars Earned
321
792
  * @type {number}
322
793
  */
323
- this.scoreRecordOverall = this.scoreRecordFinals + this.scoreRecordNormal;
794
+ this.stars = data.total_stars_party || 0;
324
795
  }
325
796
  }
326
797
  /**
327
- * Mini Walls class
798
+ * Pixel Party Game Mode
328
799
  */
329
- class MiniWalls extends BaseGame {
800
+ class PixelPartyGameMode {
330
801
  /**
331
802
  * Constructor
332
803
  * @param {Object} data data from API
804
+ * @param {string} modeName Mode name
333
805
  */
334
- constructor(data) {
335
- super(data, 'mini_walls');
806
+ constructor(data, modeName) {
336
807
  /**
337
- * Total Arrow Hits
808
+ * Wins
338
809
  * @type {number}
339
810
  */
340
- this.arrowHits = data.arrows_hit_mini_walls || 0;
811
+ this.wins = data?.[`wins_${modeName}`] || 0;
341
812
  /**
342
- * Total Arrow shots
813
+ * Games Played
343
814
  * @type {number}
344
815
  */
345
- this.arrowShots = data.arrows_shot_mini_walls || 0;
816
+ this.gamesPlayed = data?.[`games_played_${modeName}`] || 0;
346
817
  /**
347
- * Bow Accuracy based on hits/shots
818
+ * Losses
348
819
  * @type {number}
349
820
  */
350
- this.bowAccuracy = divide(this.arrowHits, this.arrowShots);
821
+ this.losses = this.gamesPlayed - this.wins;
351
822
  /**
352
- * Final Kills
823
+ * Win Loss Ratio
353
824
  * @type {number}
354
825
  */
355
- this.finalKills = data.final_kills_mini_walls || 0;
826
+ this.WLRatio = divide(this.wins, this.losses);
356
827
  /**
357
- * Total damage dealt to withers
828
+ * Rounds Played
358
829
  * @type {number}
359
830
  */
360
- this.witherDamage = data.wither_damage_mini_walls || 0;
831
+ this.roundsPlayed = data?.[`rounds_completed_${modeName}`] || 0;
361
832
  /**
362
- * Wither Killed
833
+ * Power Ups Collected
363
834
  * @type {number}
364
835
  */
365
- this.witherKills = data.wither_kills_mini_walls || 0;
836
+ this.powerUpsCollected = data?.[`power_ups_collected_${modeName}`] || 0;
366
837
  }
367
838
  }
368
839
  /**
369
- * Zombies - Overall stats
840
+ * Party Games class
370
841
  */
371
- class Zombies {
842
+ class PixelParty {
372
843
  /**
373
844
  * Constructor
374
- * @param {Object} data Data from API
845
+ * @param {Object} data data from API
375
846
  */
376
847
  constructor(data) {
377
848
  /**
378
- * Overall Stats
379
- * @type {ZombiesStats}
849
+ * Wins
850
+ * @type {number}
380
851
  */
381
- this.overall = new ZombiesStats(data);
852
+ this.wins = data?.pixel_party?.wins || 0;
382
853
  /**
383
- * Stats for Dead End
384
- * @type {ZombieMap}
854
+ * Games Played
855
+ * @type {number}
385
856
  */
386
- this.deadEnd = new ZombieMap(data, 'deadend');
857
+ this.gamesPlayed = data?.pixel_party?.games_played || 0;
387
858
  /**
388
- * Stats for Bad Blood
389
- * @type {ZombieMap}
859
+ * Losses
860
+ * @type {number}
390
861
  */
391
- this.badBlood = new ZombieMap(data, 'badblood');
862
+ this.losses = this.gamesPlayed - this.wins;
392
863
  /**
393
- * Stats for Alien Arcadium
394
- * @type {ZombieMap}
864
+ * Win Loss Ratio
865
+ * @type {number}
395
866
  */
396
- this.alienArcadium = new ZombieMap(data, 'alienarcadium');
867
+ this.WLRatio = divide(this.wins, this.losses);
397
868
  /**
398
- * Kills By Zombie
399
- * @type {Record<string,number>}
869
+ * Rounds Played
870
+ * @type {number}
400
871
  */
401
- this.killsByZombie = parseZombiesKills(data);
872
+ this.roundsPlayed = data?.pixel_party?.rounds_completed || 0;
402
873
  /**
403
- * Bullets Hit
874
+ * Power Ups Collected
404
875
  * @type {number}
405
876
  */
406
- this.bulletsHit = data.bullets_hit_zombies || 0;
877
+ this.powerUpsCollected = data?.pixel_party?.power_ups_collected || 0;
407
878
  /**
408
- * Bullets Shot
409
- * @type {number}
879
+ * Normal Game Mode
880
+ * @type {PixelPartyGameMode}
410
881
  */
411
- this.bulletsShot = data.bullets_shot_zombies || 0;
882
+ this.normal = new PixelPartyGameMode(data.pixel_party, 'normal');
412
883
  /**
413
- * Gun Accuracy
414
- * @type {number}
884
+ * Hyper Game Mode
885
+ * @type {PixelPartyGameMode}
415
886
  */
416
- this.gunAccuracy = divide(this.bulletsHit, this.bulletsShot);
887
+ this.hyper = new PixelPartyGameMode(data.pixel_party, 'hyper');
417
888
  /**
418
- * Headshots
889
+ * Highest Round
419
890
  * @type {number}
420
891
  */
421
- this.headshots = data.headshots_zombies || 0;
892
+ this.highestRound = data?.pixel_party?.highest_round || 0;
422
893
  /**
423
- * Headshot Accuracy
894
+ * Music Volume
424
895
  * @type {number}
425
896
  */
426
- this.headshotAccuracy = divide(this.headshots, this.bulletsShot);
897
+ this.musicVolume = data.pixel_party_music_volume || 0;
898
+ /**
899
+ * Color Blind Settings
900
+ * @type {object}
901
+ */
902
+ this.colorBlind = data.pixelparty || {};
427
903
  }
428
904
  }
429
905
  /**
430
- * Zombie stats by map
906
+ * Throw Out class
431
907
  */
432
- class ZombieMap {
908
+ class ThrowOut {
433
909
  /**
434
910
  * Constructor
435
- * @param {Object} data Data from API
436
- * @param {string} mapName String map name
911
+ * @param {Object} data data from API
437
912
  */
438
- constructor(data, mapName) {
913
+ constructor(data) {
439
914
  /**
440
- * Normal mode
441
- * @type {ZombiesStats}
915
+ * Wins
916
+ * @type {number}
442
917
  */
443
- this.normal = new ZombiesStats(data, `${mapName}_normal`);
918
+ this.wins = data.wins_throw_out || 0;
444
919
  /**
445
- * Hard mode ( parties only )
446
- * @type {ZombiesStats}
920
+ * Kills
921
+ * @type {number}
447
922
  */
448
- this.hard = new ZombiesStats(data, `${mapName}_hard`);
923
+ this.kills = data.kills_throw_out || 0;
449
924
  /**
450
- * RIP mode ( parties only )
451
- * @type {ZombiesStats}
925
+ * Deaths
926
+ * @type {number}
452
927
  */
453
- this.rip = new ZombiesStats(data, `${mapName}_rip`);
928
+ this.deaths = data.deaths_throw_out || 0;
454
929
  /**
455
- * Overall ( 3 modes combined )
456
- * @type {ZombiesStats}
930
+ * KDRatio
931
+ * @type {number}
457
932
  */
458
- this.overall = new ZombiesStats(data, mapName);
933
+ this.KDRatio = divide(this.kills, this.deaths);
459
934
  }
460
935
  }
461
936
  /**
462
- * Zombies - Stats by Map + Difficulty
937
+ * Arcade class
463
938
  */
464
- class ZombiesStats {
939
+ class Arcade {
465
940
  /**
466
941
  * Constructor
467
- * @param {Object} data Data from API
468
- * @param {string} type Map name + difficulty ( default overall )
942
+ * @param {Object} data Data from the API
469
943
  */
470
- constructor(data, type = '') {
471
- if (type) type = `_${type}`;
944
+ constructor(data = {}) {
472
945
  /**
473
- * Best Round
946
+ * Amount of coins
474
947
  * @type {number}
475
948
  */
476
- this.bestRound = data[`best_round_zombies${type}`] || 0;
949
+ this.coins = data.coins || 0;
477
950
  /**
478
- * Deaths ( NOT losses )
951
+ * Weekly coins
479
952
  * @type {number}
480
953
  */
481
- this.deaths = data[`deaths_zombies${type}`] || 0;
954
+ this.weeklyCoins = parseInt(data[`weekly_coins_${weekAB()}`] || 0, 10);
482
955
  /**
483
- * Doors opened
956
+ * Monthly coins
484
957
  * @type {number}
485
958
  */
486
- this.doorsOpened = data[`doors_opened_zombies${type}`] || 0;
959
+ this.monthlyCoins = parseInt(data[`monthly_coins_${monthAB()}`] || 0, 10);
487
960
  /**
488
- * Fastest time to reach round 10 in seconds
489
- * @type {number}
961
+ * Hints Disabled
962
+ * @type {boolean}
490
963
  */
491
- this.fastestRound10 = data[`fastest_time_10_zombies${type}`] || 0;
964
+ this.hintsDisabled = !data.hints;
492
965
  /**
493
- * Fastest time to reach round 20 in seconds
494
- * @type {number}
966
+ * Flash Disabled
967
+ * @type {boolean}
495
968
  */
496
- this.fastestRound20 = data[`fastest_time_20_zombies${type}`] || 0;
969
+ this.flashDisabled = !data.flash;
497
970
  /**
498
- * Fastest time to reach round 30 in seconds
499
- * @type {number}
971
+ * Blocking dead ( previously known as DayOne ) stats
972
+ * @type {BlockingDead}
500
973
  */
501
- this.fastestRound30 = data[`fastest_time_30_zombies${type}`] || 0;
974
+ this.blockingDead = new BlockingDead(data);
502
975
  /**
503
- * Players revived
504
- * @type {number}
976
+ * Bounty Hunters (previously known as One In The Quiver) stats
977
+ * @type {BountyHunters}
505
978
  */
506
- this.playersRevived = data[`players_revived_zombies${type}`] || 0;
979
+ this.bountyHunters = new BountyHunters(data);
507
980
  /**
508
- * Number of times player is knocked down
509
- * @type {number}
981
+ * Capture The Wool
982
+ * @type {CaptureTheWool}
510
983
  */
511
- this.timesKnockedDown = data[`times_knocked_down_zombies${type}`] || 0;
984
+ this.captureTheWool = new CaptureTheWool(data);
512
985
  /**
513
- * Total amount of rounds the player survived
514
- * @type {number}
986
+ * Dragon wars stats
987
+ * @type {DragonWars}
515
988
  */
516
- this.roundsSurvived = data[`total_rounds_survived_zombies${type}`] || 0;
989
+ this.dragonWars = new DragonWars(data);
517
990
  /**
518
- * Total amount of windows fully repaired by player
519
- * @type {number}
991
+ * Dropper
992
+ * @type {Dropper}
520
993
  */
521
- this.windowsRepaired = data[`windows_repaired_zombies${type}`] || 0;
994
+ this.dropper = new Dropper(data.dropper);
522
995
  /**
523
- * Wins
524
- * @type {number}
996
+ * Ender Spleef stats
997
+ * @type {EnderSpleef}
525
998
  */
526
- this.wins = data[`wins_zombies${type}`] || 0;
999
+ this.enderSpleef = new EnderSpleef(data);
527
1000
  /**
528
- * Total Zombie Kills
529
- * @type {number}
1001
+ * Farm Hunt stats
1002
+ * @type {FarmHunt}
530
1003
  */
531
- this.zombieKills = data[`zombie_kills_zombies${type}`] || 0;
1004
+ this.farmHunt = new FarmHunt(data);
1005
+ /**
1006
+ * Football stats
1007
+ * @type {Football}
1008
+ */
1009
+ this.football = new Football(data);
1010
+ /**
1011
+ * Galaxy Wars stats
1012
+ * @type {GalaxyWars}
1013
+ */
1014
+ this.galaxyWars = new GalaxyWars(data);
1015
+ /**
1016
+ * Hide and Seek stats
1017
+ * @type {HideAndSeek}
1018
+ */
1019
+ this.hideAndSeek = new HideAndSeek(data);
1020
+ /**
1021
+ * Hole in the Wall stats
1022
+ * @type {HoleInTheWall}
1023
+ */
1024
+ this.holeInTheWall = new HoleInTheWall(data);
1025
+ /**
1026
+ * Hypixel Says stats
1027
+ * @type {HypixelSays}
1028
+ */
1029
+ this.hypixelSays = new HypixelSays(data);
1030
+ /**
1031
+ * Mini Walls stats
1032
+ * @type {MiniWalls}
1033
+ */
1034
+ this.miniWalls = new MiniWalls(data);
1035
+ /**
1036
+ * Party games stats
1037
+ * @type {PartyGames}
1038
+ */
1039
+ this.partyGames = new PartyGames(data);
1040
+ /**
1041
+ * Pixel Party stats
1042
+ * @type {PixelParty}
1043
+ */
1044
+ this.pixelParty = new PixelParty(data);
1045
+ /**
1046
+ * Throw out stats
1047
+ * @type {ThrowOut}
1048
+ */
1049
+ this.throwOut = new ThrowOut(data);
1050
+ /**
1051
+ * Zombies
1052
+ * @type {Zombies}
1053
+ */
1054
+ this.zombies = new Zombies(data);
532
1055
  }
533
1056
  }
534
- // eslint-disable-next-line require-jsdoc
535
- function parseZombiesKills(data) {
536
- const matches = Array.from(Object.keys(data))
537
- .map((x) => x.match(/^([A-z]+)_zombie_kills_zombies$/))
538
- .filter((x) => x);
539
- // From entries might be broken
540
- return Object.fromEntries(matches.map((x) => [removeSnakeCaseString(x[1]), data[x[0]] || 0]));
541
- }
542
- /**
543
- * @typedef {Object} EasterSimulator
544
- * @extends BaseGame
545
- * @property {number} eggsFound Total eggs found
546
- */
547
- /**
548
- * @typedef {Object} GrinchSimulator
549
- * @extends BaseGame
550
- * @property {number} giftsFound Total gifts found and stolen
551
- */
552
- /**
553
- * @typedef {Object} ScubaSimulator
554
- * @extends BaseGame
555
- * @property {number} itemsFound Total items found
556
- */
557
- /**
558
- * @typedef {Object} SantaSimulator
559
- * @extends BaseGame
560
- * @property {number} giftsDelivered Total gifts delivered
561
- */
562
- /**
563
- * @typedef {Object} OITQ
564
- * @extends BaseGame
565
- * @property {number} bountyKills Bounty Kills
566
- */
567
- /**
568
- * @typedef {JSON} BlockingDead
569
- * @extends BaseGame
570
- * @property {number} headshots Headshots
571
- */
1057
+
572
1058
  module.exports = Arcade;