@rian8337/osu-droid-replay-analyzer 4.0.0-beta.32 → 4.0.0-beta.34

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/dist/index.js CHANGED
@@ -2331,7 +2331,7 @@ class ReplayAnalyzer {
2331
2331
  resultObject.accuracy.nmiss = rawObject[4].readInt32BE(28);
2332
2332
  resultObject.score = rawObject[4].readInt32BE(32);
2333
2333
  resultObject.maxCombo = rawObject[4].readInt32BE(36);
2334
- resultObject.isFullCombo = !!rawObject[4][44];
2334
+ resultObject.isFullCombo = resultObject.accuracy.value() === 1;
2335
2335
  resultObject.playerName = rawObject[5];
2336
2336
  resultObject.rawMods = Object.values(rawObject[6].elements);
2337
2337
  resultObject.convertedMods = osuBase.ModUtil.droidStringToMods(this.convertDroidMods(resultObject.rawMods));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rian8337/osu-droid-replay-analyzer",
3
- "version": "4.0.0-beta.32",
3
+ "version": "4.0.0-beta.34",
4
4
  "description": "A replay analyzer for analyzing osu!droid replay files.",
5
5
  "keywords": [
6
6
  "osu",
@@ -46,5 +46,5 @@
46
46
  "publishConfig": {
47
47
  "access": "public"
48
48
  },
49
- "gitHead": "dd164dcc63fea94501959236d310eccf5a7cda6a"
49
+ "gitHead": "84edfdafe59ec605b49716cf2e4a56bfc88d89b0"
50
50
  }
@@ -182,82 +182,168 @@ declare class CursorData {
182
182
  }
183
183
 
184
184
  /**
185
- * Represents an exported replay's JSON structure.
185
+ * The structure of the exported replay JSON data for version 1.
186
186
  */
187
- interface ExportedReplayJSON {
187
+ interface ExportedReplayJSONDataV1 {
188
+ /**
189
+ * The path towards the beatmap's `.osu` file from the song directory of the game.
190
+ */
191
+ filename: string;
192
+ /**
193
+ * The name of the player.
194
+ */
195
+ playername: string;
196
+ /**
197
+ * The name of the replay file.
198
+ */
199
+ replayfile: string;
200
+ /**
201
+ * Droid modifications that are used in the replay.
202
+ */
203
+ mod: string;
204
+ /**
205
+ * The amount of total score achieved.
206
+ */
207
+ score: number;
208
+ /**
209
+ * The maximum combo achieved.
210
+ */
211
+ combo: number;
212
+ /**
213
+ * The rank achieved in the replay.
214
+ */
215
+ mark: string;
216
+ /**
217
+ * The amount of geki hits in the replay.
218
+ */
219
+ h300k: number;
220
+ /**
221
+ * The amount of great hits in the replay.
222
+ */
223
+ h300: number;
224
+ /**
225
+ * The amount of katu hits in the replay.
226
+ */
227
+ h100k: number;
228
+ /**
229
+ * The amount of good hits in the replay.
230
+ */
231
+ h100: number;
232
+ /**
233
+ * The amount of meh hits in the replay.
234
+ */
235
+ h50: number;
236
+ /**
237
+ * The amount of misses in the replay.
238
+ */
239
+ misses: number;
240
+ /**
241
+ * Accuracy gained in the replay.
242
+ */
243
+ accuracy: number;
244
+ /**
245
+ * The epoch date at which the score was set, in milliseconds.
246
+ */
247
+ time: number;
248
+ /**
249
+ * Whether the score is a full combo (1 is `true`, 0 is `false`).
250
+ */
251
+ perfect: number;
252
+ }
253
+
254
+ interface ExportedReplayJSONDataV2 {
255
+ /**
256
+ * The name of the beatmap.
257
+ */
258
+ filename: string;
259
+ /**
260
+ * The name of the player.
261
+ */
262
+ playername: string;
263
+ /**
264
+ * The name of the replay file.
265
+ */
266
+ replayfile: string;
267
+ /**
268
+ * The MD5 hash of the beatmap.
269
+ */
270
+ beatmapMD5: string;
271
+ /**
272
+ * Droid modifications that are used in the replay.
273
+ */
274
+ mod: string;
275
+ /**
276
+ * The amount of total score achieved.
277
+ */
278
+ score: number;
279
+ /**
280
+ * The maximum combo achieved.
281
+ */
282
+ combo: number;
283
+ /**
284
+ * The rank achieved in the replay.
285
+ */
286
+ mark: string;
287
+ /**
288
+ * The amount of geki hits in the replay.
289
+ */
290
+ h300k: number;
291
+ /**
292
+ * The amount of great hits in the replay.
293
+ */
294
+ h300: number;
295
+ /**
296
+ * The amount of katu hits in the replay.
297
+ */
298
+ h100k: number;
299
+ /**
300
+ * The amount of good hits in the replay.
301
+ */
302
+ h100: number;
303
+ /**
304
+ * The amount of meh hits in the replay.
305
+ */
306
+ h50: number;
307
+ /**
308
+ * The amount of misses in the replay.
309
+ */
310
+ misses: number;
311
+ /**
312
+ * Accuracy gained in the replay.
313
+ */
314
+ accuracy: number;
315
+ /**
316
+ * The epoch date at which the score was set, in milliseconds.
317
+ */
318
+ time: number;
319
+ }
320
+
321
+ /**
322
+ * Represents an exported replay's JSON structure for version 1.
323
+ */
324
+ interface ExportedReplayJSONV1 {
188
325
  /**
189
326
  * The version of the exported replay.
190
327
  */
191
- version: number;
328
+ version: 1;
192
329
  /**
193
330
  * Data of the exported replay.
194
331
  */
195
- replaydata: {
196
- /**
197
- * The path towards the beatmap's `.osu` file from the song directory of the game.
198
- */
199
- filename: string;
200
- /**
201
- * The name of the player.
202
- */
203
- playername: string;
204
- /**
205
- * The name of the replay file.
206
- */
207
- replayfile: string;
208
- /**
209
- * Droid modifications that are used in the replay.
210
- */
211
- mod: string;
212
- /**
213
- * The amount of total score achieved.
214
- */
215
- score: number;
216
- /**
217
- * The maximum combo achieved.
218
- */
219
- combo: number;
220
- /**
221
- * The rank achieved in the replay.
222
- */
223
- mark: string;
224
- /**
225
- * The amount of geki hits in the replay.
226
- */
227
- h300k: number;
228
- /**
229
- * The amount of great hits in the replay.
230
- */
231
- h300: number;
232
- /**
233
- * The amount of katu hits in the replay.
234
- */
235
- h100k: number;
236
- /**
237
- * The amount of good hits in the replay.
238
- */
239
- h100: number;
240
- /**
241
- * The amount of meh hits in the replay.
242
- */
243
- h50: number;
244
- /**
245
- * The amount of misses in the replay.
246
- */
247
- misses: number;
248
- /**
249
- * Accuracy gained in the replay.
250
- */
251
- accuracy: number;
252
- /**
253
- * The epoch date at which the score was set, in milliseconds.
254
- */
255
- time: number;
256
- /**
257
- * Whether the score is a full combo (1 is `true`, 0 is `false`).
258
- */
259
- perfect: number;
260
- };
332
+ replaydata: ExportedReplayJSONDataV1;
333
+ }
334
+
335
+ /**
336
+ * Represents an exported replay's JSON structure for version 2.
337
+ */
338
+ interface ExportedReplayJSONV2 {
339
+ /**
340
+ * The version of the exported replay.
341
+ */
342
+ version: 2;
343
+ /**
344
+ * Data of the exported replay.
345
+ */
346
+ replaydata: ExportedReplayJSONDataV2;
261
347
  }
262
348
 
263
349
  /**
@@ -296,10 +382,16 @@ declare enum HitResult {
296
382
  */
297
383
  declare class ReplayObjectData {
298
384
  /**
299
- * For circles, this is the offset at which the circle was hit. If the hit accuracy is 10000, it means the circle was tapped too late ([game source code](https://github.com/osudroid/osu-droid/blob/6306c68e3ffaf671eac794bf45cc95c0f3313a82/src/ru/nsu/ccfit/zuev/osu/game/HitCircle.java#L298-L306)).
385
+ * For circles, this is the offset at which the circle was hit. If the hit accuracy is 10000,
386
+ * it means the circle was tapped too late and therefore the player missed ([game source code](https://github.com/osudroid/osu-droid/blob/ca0e4a2c06b9db18d094a15a4abf3f7ffcb05d7a/src/ru/nsu/ccfit/zuev/osu/game/GameplayHitCircle.java#L305)).
387
+ *
388
+ * For sliders, this is the offset at which the slider head was hit. For sliderbreaks, there are two scenarios:
389
+ * - a value equal to `Math.floor(<hit window 50>ms) + 13ms` strictly for replays before version 1.7.2 ([game source code](https://github.com/osudroid/osu-droid/blob/6306c68e3ffaf671eac794bf45cc95c0f3313a82/src/ru/nsu/ccfit/zuev/osu/game/Slider.java#L821)), or
390
+ * - a value that is more than the slider's span duration ([game source code](https://github.com/osudroid/osu-droid/blob/ca0e4a2c06b9db18d094a15a4abf3f7ffcb05d7a/src/ru/nsu/ccfit/zuev/osu/game/GameplaySlider.java#L701)).
300
391
  *
301
- * For sliders, this is the offset at which the slider head was hit. For
302
- * sliderbreaks, the accuracy would be `Math.floor(<hit window 50>ms) + 13ms` ([game source code](https://github.com/osudroid/osu-droid/blob/6306c68e3ffaf671eac794bf45cc95c0f3313a82/src/ru/nsu/ccfit/zuev/osu/game/Slider.java#L821)).
392
+ * `tickset` and `result` can be used in conjunction with this value to derive whether the player sliderbroke in the slider.
393
+ * If `result` is a 300, the player did not sliderbreak. Otherwise, if all slider ticks, repeats, and ends were hit, the
394
+ * player sliderbroke. In other cases, it is almost impossible to derive this result.
303
395
  *
304
396
  * For spinners, this is the total amount at which the spinner was spinned:
305
397
  * ```js
@@ -1173,4 +1265,4 @@ declare class TwoHandChecker {
1173
1265
  private getCursorPosition;
1174
1266
  }
1175
1267
 
1176
- export { CursorData, type CursorInformation, CursorOccurrence, CursorOccurrenceGroup, type ExportedReplayJSON, type Grade, type HitErrorInformation, HitResult, MovementType, RebalanceThreeFingerChecker, ReplayAnalyzer, ReplayData, ReplayObjectData, ReplayV3Data, ReplayV4Data, ReplayV5Data, SliderCheeseChecker, type SliderCheeseInformation, ThreeFingerChecker, type ThreeFingerInformation, TwoHandChecker, type TwoHandInformation };
1268
+ export { CursorData, type CursorInformation, CursorOccurrence, CursorOccurrenceGroup, type ExportedReplayJSONDataV1, type ExportedReplayJSONDataV2, type ExportedReplayJSONV1, type ExportedReplayJSONV2, type Grade, type HitErrorInformation, HitResult, MovementType, RebalanceThreeFingerChecker, ReplayAnalyzer, ReplayData, ReplayObjectData, ReplayV3Data, ReplayV4Data, ReplayV5Data, SliderCheeseChecker, type SliderCheeseInformation, ThreeFingerChecker, type ThreeFingerInformation, TwoHandChecker, type TwoHandInformation };