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.
- package/README.md +1 -1
- package/eslint.config.mjs +71 -0
- package/package.json +14 -20
- package/src/API/getAchievements.js +1 -0
- package/src/API/getBoosters.js +1 -0
- package/src/API/getChallenges.js +1 -0
- package/src/API/getGameCounts.js +1 -0
- package/src/API/getGuild.js +4 -3
- package/src/API/getGuildAchievements.js +1 -0
- package/src/API/getLeaderboards.js +1 -1
- package/src/API/getPlayer.js +1 -0
- package/src/API/getQuests.js +1 -0
- package/src/API/getRecentGames.js +5 -9
- package/src/API/getServerInfo.js +40 -37
- package/src/API/getStatus.js +1 -0
- package/src/API/getWatchdogStats.js +1 -0
- package/src/API/housing/getActiveHouses.js +7 -0
- package/src/API/housing/getHouse.js +9 -0
- package/src/API/housing/getPlayerHouses.js +11 -0
- package/src/API/index.js +6 -1
- package/src/API/skyblock/getAuction.js +8 -6
- package/src/API/skyblock/getAuctions.js +15 -12
- package/src/API/skyblock/getAuctionsByPlayer.js +1 -1
- package/src/API/skyblock/getBazaar.js +1 -3
- package/src/API/skyblock/getBingo.js +1 -2
- package/src/API/skyblock/getBingoByPlayer.js +3 -3
- package/src/API/skyblock/getEndedAuctions.js +1 -0
- package/src/API/skyblock/getFireSales.js +1 -1
- package/src/API/skyblock/getGarden.js +7 -0
- package/src/API/skyblock/getGovernment.js +1 -2
- package/src/API/skyblock/getMember.js +5 -2
- package/src/API/skyblock/getMuseum.js +1 -0
- package/src/API/skyblock/getNews.js +1 -0
- package/src/API/skyblock/getProfiles.js +5 -2
- package/src/Client.js +88 -16
- package/src/Private/rateLimit.js +7 -11
- package/src/Private/requests.js +12 -13
- package/src/Private/updater.js +2 -3
- package/src/Private/uuidCache.js +1 -2
- package/src/Private/validate.js +19 -19
- package/src/index.js +5 -0
- package/src/structures/APIIncident.js +1 -2
- package/src/structures/APIStatus.js +0 -1
- package/src/structures/Boosters/Booster.js +9 -8
- package/src/structures/Game.js +1 -1
- package/src/structures/Guild/Guild.js +19 -36
- package/src/structures/Guild/GuildMember.js +2 -2
- package/src/structures/House.js +54 -0
- package/src/structures/MiniGames/Arcade.js +798 -312
- package/src/structures/MiniGames/ArenaBrawl.js +98 -32
- package/src/structures/MiniGames/BedWars.js +197 -194
- package/src/structures/MiniGames/BlitzSurvivalGames.js +381 -129
- package/src/structures/MiniGames/BuildBattle.js +19 -8
- package/src/structures/MiniGames/CopsAndCrims.js +253 -25
- package/src/structures/MiniGames/Duels.js +905 -664
- package/src/structures/MiniGames/MegaWalls.js +390 -51
- package/src/structures/MiniGames/MurderMystery.js +151 -30
- package/src/structures/MiniGames/Paintball.js +31 -11
- package/src/structures/MiniGames/Pit.js +4 -5
- package/src/structures/MiniGames/Quakecraft.js +113 -50
- package/src/structures/MiniGames/SkyWars.js +528 -372
- package/src/structures/MiniGames/SmashHeroes.js +201 -73
- package/src/structures/MiniGames/SpeedUHC.js +77 -24
- package/src/structures/MiniGames/TNTGames.js +242 -73
- package/src/structures/MiniGames/TurboKartRacers.js +55 -115
- package/src/structures/MiniGames/UHC.js +144 -132
- package/src/structures/MiniGames/VampireZ.js +70 -37
- package/src/structures/MiniGames/Warlords.js +126 -1
- package/src/structures/MiniGames/WoolWars.js +60 -9
- package/src/structures/Pet.js +1 -1
- package/src/structures/Player.js +43 -128
- package/src/structures/PlayerCosmetics.js +5 -4
- package/src/structures/SkyBlock/Auctions/AuctionInfo.js +2 -1
- package/src/structures/SkyBlock/Auctions/BaseAuction.js +1 -1
- package/src/structures/SkyBlock/News/SkyblockNews.js +15 -15
- package/src/structures/SkyBlock/PlayerBingo.js +7 -14
- package/src/structures/SkyBlock/SkyblockGarden.js +146 -0
- package/src/structures/SkyBlock/SkyblockInventoryItem.js +4 -28
- package/src/structures/SkyBlock/SkyblockMember.js +90 -228
- package/src/structures/SkyBlock/SkyblockPet.js +3 -4
- package/src/structures/SkyBlock/Static/Bingo.js +10 -11
- package/src/structures/SkyBlock/Static/BingoData.js +1 -1
- package/src/structures/Static/Achievement.js +16 -15
- package/src/structures/Static/AchievementTier.js +2 -2
- package/src/structures/Static/Quest.js +2 -2
- package/src/utils/Constants.js +522 -520
- package/src/utils/{guildExp.js → Guild.js} +42 -12
- package/src/utils/Player.js +112 -0
- package/src/utils/SkyblockUtils.js +482 -192
- package/src/utils/arrayTools.js +1 -1
- package/src/utils/divide.js +1 -1
- package/src/utils/index.js +2 -1
- package/src/utils/isGuildID.js +1 -1
- package/src/utils/oscillation.js +4 -2
- package/src/utils/removeSnakeCase.js +11 -7
- package/src/utils/rgbToHexColor.js +1 -1
- package/src/utils/romanize.js +3 -3
- package/src/utils/toUuid.js +4 -4
- package/src/utils/varInt.js +2 -2
- package/typings/index.d.ts +1186 -967
- package/src/utils/toIGN.js +0 -24
|
@@ -1,47 +1,109 @@
|
|
|
1
1
|
const divide = require('../../utils/divide');
|
|
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
|
-
|
|
2
|
+
|
|
3
|
+
class BlitzSGKit {
|
|
4
|
+
/**
|
|
5
|
+
* @param {object} data Blitz SG data
|
|
6
|
+
* @param {string} kitName Kit name
|
|
7
|
+
*/
|
|
8
|
+
constructor(data, kitName) {
|
|
9
|
+
/**
|
|
10
|
+
* Kit Level
|
|
11
|
+
* @type {number}
|
|
12
|
+
*/
|
|
13
|
+
this.level = data[kitName] || 0;
|
|
14
|
+
/**
|
|
15
|
+
* Kit Level
|
|
16
|
+
* @type {number}
|
|
17
|
+
*/
|
|
18
|
+
this.exp = data[`exp_${kitName}`] || 0;
|
|
19
|
+
/**
|
|
20
|
+
* Kills
|
|
21
|
+
* @type {number}
|
|
22
|
+
*/
|
|
23
|
+
this.kills = data[`kills_${kitName}`] || 0;
|
|
24
|
+
/**
|
|
25
|
+
* Deaths
|
|
26
|
+
* @type {number}
|
|
27
|
+
*/
|
|
28
|
+
this.deaths = data[`deaths_${kitName}`] || 0;
|
|
29
|
+
/**
|
|
30
|
+
* Kill Death ratio
|
|
31
|
+
* @type {number}
|
|
32
|
+
*/
|
|
33
|
+
this.KDRatio = divide(this.kills, this.deaths);
|
|
34
|
+
/**
|
|
35
|
+
* Wins
|
|
36
|
+
* @type {number}
|
|
37
|
+
*/
|
|
38
|
+
this.wins = data[`wins_${kitName}`] || 0;
|
|
39
|
+
/**
|
|
40
|
+
* Games Played
|
|
41
|
+
* @type {number}
|
|
42
|
+
*/
|
|
43
|
+
this.gamesPlayed = data[`games_played_${kitName}`] || 0;
|
|
44
|
+
/**
|
|
45
|
+
* Losses
|
|
46
|
+
* @type {number}
|
|
47
|
+
*/
|
|
48
|
+
this.losses = this.gamesPlayed - this.wins;
|
|
49
|
+
/**
|
|
50
|
+
* Win Loss ratio
|
|
51
|
+
* @type {number}
|
|
52
|
+
*/
|
|
53
|
+
this.WLRatio = divide(this.wins, this.losses);
|
|
54
|
+
/**
|
|
55
|
+
* Arrows Shot
|
|
56
|
+
* @type {number}
|
|
57
|
+
*/
|
|
58
|
+
this.arrowsShot = data[`arrows_fired_${kitName}`] || 0;
|
|
59
|
+
/**
|
|
60
|
+
* Arrows Hit
|
|
61
|
+
* @type {number}
|
|
62
|
+
*/
|
|
63
|
+
this.arrowsHit = data[`arrows_hit_${kitName}`] || 0;
|
|
64
|
+
/**
|
|
65
|
+
* Bow Accuracy
|
|
66
|
+
* @type {number}
|
|
67
|
+
*/
|
|
68
|
+
this.bowAccuracy = divide(this.arrowsHit, this.arrowsShot);
|
|
69
|
+
/**
|
|
70
|
+
* Damage Delt
|
|
71
|
+
* @type {number}
|
|
72
|
+
*/
|
|
73
|
+
this.damage = data[`damage_${kitName}`] || 0;
|
|
74
|
+
/**
|
|
75
|
+
* Damage Taken
|
|
76
|
+
* @type {number}
|
|
77
|
+
*/
|
|
78
|
+
this.damageTaken = data[`damage_taken_${kitName}`] || 0;
|
|
79
|
+
/**
|
|
80
|
+
* Potions Drunk
|
|
81
|
+
* @type {number}
|
|
82
|
+
*/
|
|
83
|
+
this.potionsDrunk = data[`potions_drunk_${kitName}`] || 0;
|
|
84
|
+
/**
|
|
85
|
+
* Potions Thrown
|
|
86
|
+
* @type {number}
|
|
87
|
+
*/
|
|
88
|
+
this.potionsThrown = data[`potions_thrown_${kitName}`] || 0;
|
|
89
|
+
/**
|
|
90
|
+
* Time Played (In seconds)
|
|
91
|
+
* @type {number}
|
|
92
|
+
*/
|
|
93
|
+
this.playTime = data[`time_played_${kitName}`] || 0;
|
|
94
|
+
/**
|
|
95
|
+
* Mobs Spawned
|
|
96
|
+
* @type {number}
|
|
97
|
+
*/
|
|
98
|
+
this.mobsSpawned = data[`mobs_spawned_${kitName}`] || 0;
|
|
99
|
+
/**
|
|
100
|
+
* Chests Opened
|
|
101
|
+
* @type {number}
|
|
102
|
+
*/
|
|
103
|
+
this.chestsOpened = data[`chests_opened_${kitName}`] || 0;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
45
107
|
/**
|
|
46
108
|
* Blitz SG class
|
|
47
109
|
*/
|
|
@@ -60,6 +122,21 @@ class BlitzSurvivalGames {
|
|
|
60
122
|
* @type {number}
|
|
61
123
|
*/
|
|
62
124
|
this.kills = data.kills || 0;
|
|
125
|
+
/**
|
|
126
|
+
* Kit
|
|
127
|
+
* @type {string}
|
|
128
|
+
*/
|
|
129
|
+
this.kit = data.defaultkit || '';
|
|
130
|
+
/**
|
|
131
|
+
* Solo Kills
|
|
132
|
+
* @type {number}
|
|
133
|
+
*/
|
|
134
|
+
this.killsSolo = data.kills_solo_normal || 0;
|
|
135
|
+
/**
|
|
136
|
+
* Teams Kills
|
|
137
|
+
* @type {number}
|
|
138
|
+
*/
|
|
139
|
+
this.killsTeams = data.kills_teams_normal || 0;
|
|
63
140
|
/**
|
|
64
141
|
* Deaths
|
|
65
142
|
* @type {number}
|
|
@@ -70,103 +147,278 @@ class BlitzSurvivalGames {
|
|
|
70
147
|
* @type {number}
|
|
71
148
|
*/
|
|
72
149
|
this.KDRatio = divide(this.kills, this.deaths);
|
|
150
|
+
/**
|
|
151
|
+
* Wins
|
|
152
|
+
* @type {number}
|
|
153
|
+
*/
|
|
154
|
+
this.wins = data.wins || 0;
|
|
73
155
|
/**
|
|
74
156
|
* Solo wins
|
|
75
157
|
* @type {number}
|
|
76
158
|
*/
|
|
77
|
-
this.winsSolo = data.
|
|
159
|
+
this.winsSolo = data.wins_solo_normal || 0;
|
|
78
160
|
/**
|
|
79
161
|
* Team wins
|
|
80
162
|
* @type {number}
|
|
81
163
|
*/
|
|
82
164
|
this.winsTeam = data.wins_teams || 0;
|
|
83
165
|
/**
|
|
84
|
-
*
|
|
85
|
-
* @type {
|
|
166
|
+
* Games Played
|
|
167
|
+
* @type {number}
|
|
86
168
|
*/
|
|
87
|
-
this.
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
169
|
+
this.gamesPlayed = data.games_played || 0;
|
|
170
|
+
/**
|
|
171
|
+
* Losses
|
|
172
|
+
* @type {number}
|
|
173
|
+
*/
|
|
174
|
+
this.losses = this.gamesPlayed - this.wins;
|
|
175
|
+
/**
|
|
176
|
+
* Win Loss ratio
|
|
177
|
+
* @type {number}
|
|
178
|
+
*/
|
|
179
|
+
this.WLRatio = divide(this.wins, this.losses);
|
|
180
|
+
/**
|
|
181
|
+
* Arrows Shot
|
|
182
|
+
* @type {number}
|
|
183
|
+
*/
|
|
184
|
+
this.arrowsShot = data.arrows_fired || 0;
|
|
185
|
+
/**
|
|
186
|
+
* Arrows Hit
|
|
187
|
+
* @type {number}
|
|
188
|
+
*/
|
|
189
|
+
this.arrowsHit = data.arrows_hit || 0;
|
|
190
|
+
/**
|
|
191
|
+
* Bow Accuracy
|
|
192
|
+
* @type {number}
|
|
193
|
+
*/
|
|
194
|
+
this.bowAccuracy = divide(this.arrowsHit, this.arrowsShot);
|
|
195
|
+
/**
|
|
196
|
+
* Damage Delt
|
|
197
|
+
* @type {number}
|
|
198
|
+
*/
|
|
199
|
+
this.damage = data.damage || 0;
|
|
200
|
+
/**
|
|
201
|
+
* Damage Taken
|
|
202
|
+
* @type {number}
|
|
203
|
+
*/
|
|
204
|
+
this.damageTaken = data.damage_taken || 0;
|
|
205
|
+
/**
|
|
206
|
+
* Potions Drunk
|
|
207
|
+
* @type {number}
|
|
208
|
+
*/
|
|
209
|
+
this.potionsDrunk = data.potions_drunk || 0;
|
|
210
|
+
/**
|
|
211
|
+
* Potions Thrown
|
|
212
|
+
* @type {number}
|
|
213
|
+
*/
|
|
214
|
+
this.potionsThrown = data.potions_thrown || 0;
|
|
215
|
+
/**
|
|
216
|
+
* Mobs Spawned
|
|
217
|
+
* @type {number}
|
|
218
|
+
*/
|
|
219
|
+
this.mobsSpawned = data.mobs_spawned || 0;
|
|
220
|
+
/**
|
|
221
|
+
* Time Played (In seconds)
|
|
222
|
+
* @type {number}
|
|
223
|
+
*/
|
|
224
|
+
this.playTime = data.time_played || 0;
|
|
225
|
+
/**
|
|
226
|
+
* Blitz Uses
|
|
227
|
+
* @type {number}
|
|
228
|
+
*/
|
|
229
|
+
this.blitzUses = data.blitz_uses || 0;
|
|
230
|
+
/**
|
|
231
|
+
* Chests Opened
|
|
232
|
+
* @type {number}
|
|
233
|
+
*/
|
|
234
|
+
this.chestsOpened = data.chests_opened || 0;
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* Archer Kit Stats
|
|
238
|
+
* @type {BlitzSGKit}
|
|
239
|
+
*/
|
|
240
|
+
this.archer = new BlitzSGKit(data, 'archer');
|
|
241
|
+
/**
|
|
242
|
+
* Meatmaster Kit Stats
|
|
243
|
+
* @type {BlitzSGKit}
|
|
244
|
+
*/
|
|
245
|
+
this.meatmaster = new BlitzSGKit(data, 'meatmaster');
|
|
246
|
+
/**
|
|
247
|
+
* Speleologist Kit Stats
|
|
248
|
+
* @type {BlitzSGKit}
|
|
249
|
+
*/
|
|
250
|
+
this.speleologist = new BlitzSGKit(data, 'speleologist');
|
|
251
|
+
/**
|
|
252
|
+
* Baker Kit Stats
|
|
253
|
+
* @type {BlitzSGKit}
|
|
254
|
+
*/
|
|
255
|
+
this.baker = new BlitzSGKit(data, 'baker');
|
|
256
|
+
/**
|
|
257
|
+
* Knight Kit Stats
|
|
258
|
+
* @type {BlitzSGKit}
|
|
259
|
+
*/
|
|
260
|
+
this.knight = new BlitzSGKit(data, 'knight');
|
|
261
|
+
/**
|
|
262
|
+
* Guardian Kit Stats
|
|
263
|
+
* @type {BlitzSGKit}
|
|
264
|
+
*/
|
|
265
|
+
this.guardian = new BlitzSGKit(data, 'guardian');
|
|
266
|
+
/**
|
|
267
|
+
* Scout Kit Stats
|
|
268
|
+
* @type {BlitzSGKit}
|
|
269
|
+
*/
|
|
270
|
+
this.scout = new BlitzSGKit(data, 'scout');
|
|
271
|
+
/**
|
|
272
|
+
* Hunter Kit Stats
|
|
273
|
+
* @type {BlitzSGKit}
|
|
274
|
+
*/
|
|
275
|
+
this.hunter = new BlitzSGKit(data, 'hunter');
|
|
276
|
+
/**
|
|
277
|
+
* Hype Train Kit Stats
|
|
278
|
+
* @type {BlitzSGKit}
|
|
279
|
+
*/
|
|
280
|
+
this.hypeTrain = new BlitzSGKit(data, 'hype train');
|
|
281
|
+
/**
|
|
282
|
+
* Fisherman Kit Stats
|
|
283
|
+
* @type {BlitzSGKit}
|
|
284
|
+
*/
|
|
285
|
+
this.fisherman = new BlitzSGKit(data, 'fisherman');
|
|
286
|
+
/**
|
|
287
|
+
* Armorer Kit Stats
|
|
288
|
+
* @type {BlitzSGKit}
|
|
289
|
+
*/
|
|
290
|
+
this.armorer = new BlitzSGKit(data, 'armorer');
|
|
291
|
+
/**
|
|
292
|
+
* Horsetamer Kit Stats
|
|
293
|
+
* @type {BlitzSGKit}
|
|
294
|
+
*/
|
|
295
|
+
this.horsetamer = new BlitzSGKit(data, 'horsetamer');
|
|
296
|
+
/**
|
|
297
|
+
* Astronaut Kit Stats
|
|
298
|
+
* @type {BlitzSGKit}
|
|
299
|
+
*/
|
|
300
|
+
this.astronaut = new BlitzSGKit(data, 'astronaut');
|
|
301
|
+
/**
|
|
302
|
+
* Troll Kit Stats
|
|
303
|
+
* @type {BlitzSGKit}
|
|
304
|
+
*/
|
|
305
|
+
this.troll = new BlitzSGKit(data, 'troll');
|
|
306
|
+
/**
|
|
307
|
+
* Reaper Kit Stats
|
|
308
|
+
* @type {BlitzSGKit}
|
|
309
|
+
*/
|
|
310
|
+
this.reaper = new BlitzSGKit(data, 'reaper');
|
|
311
|
+
/**
|
|
312
|
+
* Shark Kit Stats
|
|
313
|
+
* @type {BlitzSGKit}
|
|
314
|
+
*/
|
|
315
|
+
this.shark = new BlitzSGKit(data, 'shark');
|
|
316
|
+
/**
|
|
317
|
+
* Reddragon Kit Stats
|
|
318
|
+
* @type {BlitzSGKit}
|
|
319
|
+
*/
|
|
320
|
+
this.reddragon = new BlitzSGKit(data, 'reddragon');
|
|
321
|
+
/**
|
|
322
|
+
* Toxicologist Kit Stats
|
|
323
|
+
* @type {BlitzSGKit}
|
|
324
|
+
*/
|
|
325
|
+
this.toxicologist = new BlitzSGKit(data, 'toxicologist');
|
|
326
|
+
/**
|
|
327
|
+
* Rogue Kit Stats
|
|
328
|
+
* @type {BlitzSGKit}
|
|
329
|
+
*/
|
|
330
|
+
this.rogue = new BlitzSGKit(data, 'rogue');
|
|
331
|
+
/**
|
|
332
|
+
* Warlock Kit Stats
|
|
333
|
+
* @type {BlitzSGKit}
|
|
334
|
+
*/
|
|
335
|
+
this.warlock = new BlitzSGKit(data, 'warlock');
|
|
336
|
+
/**
|
|
337
|
+
* Slimeyslime Kit Stats
|
|
338
|
+
* @type {BlitzSGKit}
|
|
339
|
+
*/
|
|
340
|
+
this.slimeyslime = new BlitzSGKit(data, 'slimeyslime');
|
|
341
|
+
/**
|
|
342
|
+
* Jockey Kit Stats
|
|
343
|
+
* @type {BlitzSGKit}
|
|
344
|
+
*/
|
|
345
|
+
this.jockey = new BlitzSGKit(data, 'jockey');
|
|
346
|
+
/**
|
|
347
|
+
* Golem Kit Stats
|
|
348
|
+
* @type {BlitzSGKit}
|
|
349
|
+
*/
|
|
350
|
+
this.golem = new BlitzSGKit(data, 'golem');
|
|
351
|
+
/**
|
|
352
|
+
* Viking Kit Stats
|
|
353
|
+
* @type {BlitzSGKit}
|
|
354
|
+
*/
|
|
355
|
+
this.viking = new BlitzSGKit(data, 'viking');
|
|
356
|
+
/**
|
|
357
|
+
* Shadow Knight Kit Stats
|
|
358
|
+
* @type {BlitzSGKit}
|
|
359
|
+
*/
|
|
360
|
+
this.shadowKnight = new BlitzSGKit(data, 'shadow knight');
|
|
361
|
+
/**
|
|
362
|
+
* Pigman Kit Stats
|
|
363
|
+
* @type {BlitzSGKit}
|
|
364
|
+
*/
|
|
365
|
+
this.pigman = new BlitzSGKit(data, 'pigman');
|
|
366
|
+
/**
|
|
367
|
+
* Paladin Kit Stats
|
|
368
|
+
* @type {BlitzSGKit}
|
|
369
|
+
*/
|
|
370
|
+
this.paladin = new BlitzSGKit(data, 'paladin');
|
|
371
|
+
/**
|
|
372
|
+
* Necromancer Kit Stats
|
|
373
|
+
* @type {BlitzSGKit}
|
|
374
|
+
*/
|
|
375
|
+
this.necromancer = new BlitzSGKit(data, 'necromancer');
|
|
376
|
+
/**
|
|
377
|
+
* Florist Kit Stats
|
|
378
|
+
* @type {BlitzSGKit}
|
|
379
|
+
*/
|
|
380
|
+
this.florist = new BlitzSGKit(data, 'florist');
|
|
381
|
+
/**
|
|
382
|
+
* Diver Kit Stats
|
|
383
|
+
* @type {BlitzSGKit}
|
|
384
|
+
*/
|
|
385
|
+
this.diver = new BlitzSGKit(data, 'diver');
|
|
386
|
+
/**
|
|
387
|
+
* Arachnologist Kit Stats
|
|
388
|
+
* @type {BlitzSGKit}
|
|
389
|
+
*/
|
|
390
|
+
this.arachnologist = new BlitzSGKit(data, 'arachnologist');
|
|
391
|
+
/**
|
|
392
|
+
* Blaze Kit Stats
|
|
393
|
+
* @type {BlitzSGKit}
|
|
394
|
+
*/
|
|
395
|
+
this.blaze = new BlitzSGKit(data, 'blaze');
|
|
396
|
+
/**
|
|
397
|
+
* Wolftamer Kit Stats
|
|
398
|
+
* @type {BlitzSGKit}
|
|
399
|
+
*/
|
|
400
|
+
this.wolftamer = new BlitzSGKit(data, 'wolftamer');
|
|
401
|
+
/**
|
|
402
|
+
* Tim Kit Stats
|
|
403
|
+
* @type {BlitzSGKit}
|
|
404
|
+
*/
|
|
405
|
+
this.tim = new BlitzSGKit(data, 'tim');
|
|
406
|
+
/**
|
|
407
|
+
* Farmer Kit Stats
|
|
408
|
+
* @type {BlitzSGKit}
|
|
409
|
+
*/
|
|
410
|
+
this.farmer = new BlitzSGKit(data, 'farmer');
|
|
411
|
+
/**
|
|
412
|
+
* Creepertamer Kit Stats
|
|
413
|
+
* @type {BlitzSGKit}
|
|
414
|
+
*/
|
|
415
|
+
this.creepertamer = new BlitzSGKit(data, 'creepertamer');
|
|
416
|
+
/**
|
|
417
|
+
* Snowman Kit Stats
|
|
418
|
+
* @type {BlitzSGKit}
|
|
419
|
+
*/
|
|
420
|
+
this.snowman = new BlitzSGKit(data, 'snowman');
|
|
110
421
|
}
|
|
111
|
-
return stats;
|
|
112
422
|
}
|
|
113
|
-
|
|
114
|
-
* @typedef {string} BlitzSGKit
|
|
115
|
-
* * `arachnologist`
|
|
116
|
-
* * `archer`
|
|
117
|
-
* * `armorer`
|
|
118
|
-
* * `astronaut`
|
|
119
|
-
* * `baker`
|
|
120
|
-
* * `blaze`
|
|
121
|
-
* * `creepertamer`
|
|
122
|
-
* * `fisherman`
|
|
123
|
-
* * `horsetamer`
|
|
124
|
-
* * `hunter`
|
|
125
|
-
* * `knight`
|
|
126
|
-
* * `meatmaster`
|
|
127
|
-
* * `necromancer`
|
|
128
|
-
* * `pigman`
|
|
129
|
-
* * `reddragon`
|
|
130
|
-
* * `rogue`
|
|
131
|
-
* * `scout`
|
|
132
|
-
* * `slimeyslime`
|
|
133
|
-
* * `speleologist`
|
|
134
|
-
* * `tim`
|
|
135
|
-
* * `toxicologist`
|
|
136
|
-
* * `troll`
|
|
137
|
-
* * `wolftamer`
|
|
138
|
-
* * `paladin`
|
|
139
|
-
* * `shadow knight`
|
|
140
|
-
* * `hype train`
|
|
141
|
-
* * `jockey`
|
|
142
|
-
* * `reaper`
|
|
143
|
-
* * `golem`
|
|
144
|
-
* * `farmer`
|
|
145
|
-
* * `florist`
|
|
146
|
-
* * `snowman`
|
|
147
|
-
* * `guardian`
|
|
148
|
-
* * `warlock`
|
|
149
|
-
* * `viking`
|
|
150
|
-
* * `diver`
|
|
151
|
-
* * `ranger`
|
|
152
|
-
* * `donkeytamer`
|
|
153
|
-
* * `phoenix`
|
|
154
|
-
* * `warrior`
|
|
155
|
-
* * `rambo`
|
|
156
|
-
*/
|
|
157
|
-
/**
|
|
158
|
-
* @typedef {object} BlitzSGKitStats
|
|
159
|
-
* @property {BlitzSGKit} name Kit name
|
|
160
|
-
* @property {number} games Played games
|
|
161
|
-
* @property {number} level level
|
|
162
|
-
* @property {number} experience Total experience
|
|
163
|
-
* @property {number} prestige Prestige
|
|
164
|
-
* @property {number} kills Kills
|
|
165
|
-
* @property {number} deaths Deaths
|
|
166
|
-
* @property {number} KDRatio Kill Death ratio
|
|
167
|
-
* @property {number} wins Wins
|
|
168
|
-
* @property {number} losses Losses
|
|
169
|
-
* @property {number} WLRatio Win Loss ratio
|
|
170
|
-
* @property {number|null} timePlayed Time played
|
|
171
|
-
*/
|
|
423
|
+
|
|
172
424
|
module.exports = BlitzSurvivalGames;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
const divide = require('../../utils/divide');
|
|
1
2
|
/**
|
|
2
3
|
* BuildBattle class
|
|
3
4
|
*/
|
|
@@ -11,11 +12,26 @@ class BuildBattle {
|
|
|
11
12
|
* @type {number}
|
|
12
13
|
*/
|
|
13
14
|
this.score = data.score || 0;
|
|
15
|
+
/**
|
|
16
|
+
* Total wins
|
|
17
|
+
* @type {number}
|
|
18
|
+
*/
|
|
19
|
+
this.totalWins = data.wins || 0;
|
|
14
20
|
/**
|
|
15
21
|
* Played games
|
|
16
22
|
* @type {number}
|
|
17
23
|
*/
|
|
18
|
-
this.
|
|
24
|
+
this.games = data.games_played || 0;
|
|
25
|
+
/**
|
|
26
|
+
* Win Loss ratio
|
|
27
|
+
* @type {number}
|
|
28
|
+
*/
|
|
29
|
+
this.WLRatio = divide(this.totalWins, this.games);
|
|
30
|
+
/**
|
|
31
|
+
* Amount of super votes the player has
|
|
32
|
+
* @type {number}
|
|
33
|
+
*/
|
|
34
|
+
this.superVotes = data.super_votes || 0;
|
|
19
35
|
/**
|
|
20
36
|
* Coins
|
|
21
37
|
* @type {number}
|
|
@@ -26,18 +42,13 @@ class BuildBattle {
|
|
|
26
42
|
* @type {number}
|
|
27
43
|
*/
|
|
28
44
|
this.totalVotes = data.total_votes || 0;
|
|
29
|
-
/**
|
|
30
|
-
* Total wins
|
|
31
|
-
* @type {number}
|
|
32
|
-
*/
|
|
33
|
-
this.totalWins = data.wins || 0;
|
|
34
45
|
/**
|
|
35
46
|
* Wins for each mode
|
|
36
47
|
* @type {BuildBattleWins}
|
|
37
48
|
*/
|
|
38
49
|
this.wins = {
|
|
39
50
|
solo: data.wins_solo_normal || 0,
|
|
40
|
-
|
|
51
|
+
teams: data.wins_teams_normal || 0,
|
|
41
52
|
pro: data.wins_solo_pro || 0,
|
|
42
53
|
gtb: data.wins_guess_the_build || 0
|
|
43
54
|
};
|
|
@@ -46,7 +57,7 @@ class BuildBattle {
|
|
|
46
57
|
/**
|
|
47
58
|
* @typedef {object} BuildBattleWins
|
|
48
59
|
* @property {number} solo BuildBattle Solo wins
|
|
49
|
-
* @property {number}
|
|
60
|
+
* @property {number} teams BuildBattle Team wins
|
|
50
61
|
* @property {number} pro BuildBattle Pro wins
|
|
51
62
|
* @property {number} gtb BuildBattle Guess The Build wins
|
|
52
63
|
*/
|