@rian8337/osu-difficulty-calculator 3.0.0-beta.19 → 3.0.0-beta.20
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 +5 -3
- package/dist/index.js +190 -131
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/typings/index.d.ts +112 -12
package/typings/index.d.ts
CHANGED
|
@@ -312,11 +312,67 @@ declare abstract class StrainSkill extends Skill {
|
|
|
312
312
|
}
|
|
313
313
|
|
|
314
314
|
/**
|
|
315
|
-
* Holds
|
|
315
|
+
* Holds data that can be used to calculate performance points.
|
|
316
316
|
*/
|
|
317
317
|
interface DifficultyAttributes {
|
|
318
|
+
/**
|
|
319
|
+
* The mods which were applied to the beatmap.
|
|
320
|
+
*/
|
|
321
|
+
mods: Mod[];
|
|
322
|
+
/**
|
|
323
|
+
* The combined star rating of all skills.
|
|
324
|
+
*/
|
|
325
|
+
starRating: number;
|
|
326
|
+
/**
|
|
327
|
+
* The maximum achievable combo.
|
|
328
|
+
*/
|
|
329
|
+
maxCombo: number;
|
|
330
|
+
/**
|
|
331
|
+
* The difficulty corresponding to the aim skill.
|
|
332
|
+
*/
|
|
333
|
+
aimDifficulty: number;
|
|
334
|
+
/**
|
|
335
|
+
* The difficulty corresponding to the flashlight skill.
|
|
336
|
+
*/
|
|
337
|
+
flashlightDifficulty: number;
|
|
338
|
+
/**
|
|
339
|
+
* The number of clickable objects weighted by difficulty.
|
|
340
|
+
*
|
|
341
|
+
* Related to speed/tap difficulty.
|
|
342
|
+
*/
|
|
318
343
|
speedNoteCount: number;
|
|
344
|
+
/**
|
|
345
|
+
* Describes how much of aim difficulty is contributed to by hitcircles or sliders.
|
|
346
|
+
*
|
|
347
|
+
* A value closer to 1 indicates most of aim difficulty is contributed by hitcircles.
|
|
348
|
+
*
|
|
349
|
+
* A value closer to 0 indicates most of aim difficulty is contributed by sliders.
|
|
350
|
+
*/
|
|
319
351
|
sliderFactor: number;
|
|
352
|
+
/**
|
|
353
|
+
* The perceived approach rate inclusive of rate-adjusting mods (DT/HT/etc).
|
|
354
|
+
*
|
|
355
|
+
* Rate-adjusting mods don't directly affect the approach rate difficulty value, but have a perceived effect as a result of adjusting audio timing.
|
|
356
|
+
*/
|
|
357
|
+
approachRate: number;
|
|
358
|
+
/**
|
|
359
|
+
* The perceived overall difficulty inclusive of rate-adjusting mods (DT/HT/etc), based on osu!standard judgement.
|
|
360
|
+
*
|
|
361
|
+
* Rate-adjusting mods don't directly affect the overall difficulty value, but have a perceived effect as a result of adjusting audio timing.
|
|
362
|
+
*/
|
|
363
|
+
overallDifficulty: number;
|
|
364
|
+
/**
|
|
365
|
+
* The number of hitcircles in the beatmap.
|
|
366
|
+
*/
|
|
367
|
+
hitCircleCount: number;
|
|
368
|
+
/**
|
|
369
|
+
* The number of sliders in the beatmap.
|
|
370
|
+
*/
|
|
371
|
+
sliderCount: number;
|
|
372
|
+
/**
|
|
373
|
+
* The number of spinners in the beatmap.
|
|
374
|
+
*/
|
|
375
|
+
spinnerCount: number;
|
|
320
376
|
}
|
|
321
377
|
|
|
322
378
|
/**
|
|
@@ -370,9 +426,9 @@ declare abstract class DifficultyCalculator {
|
|
|
370
426
|
*/
|
|
371
427
|
readonly strainPeaks: StrainPeaks;
|
|
372
428
|
/**
|
|
373
|
-
*
|
|
429
|
+
* Holds data that can be used to calculate performance points.
|
|
374
430
|
*/
|
|
375
|
-
readonly attributes: DifficultyAttributes;
|
|
431
|
+
abstract readonly attributes: DifficultyAttributes;
|
|
376
432
|
protected readonly sectionLength: number;
|
|
377
433
|
protected abstract readonly difficultyMultiplier: number;
|
|
378
434
|
protected abstract readonly mode: Modes;
|
|
@@ -424,6 +480,10 @@ declare abstract class DifficultyCalculator {
|
|
|
424
480
|
* Creates skills to be calculated.
|
|
425
481
|
*/
|
|
426
482
|
protected abstract createSkills(): StrainSkill[];
|
|
483
|
+
/**
|
|
484
|
+
* Populates the stored difficulty attributes with necessary data.
|
|
485
|
+
*/
|
|
486
|
+
protected populateDifficultyAttributes(): void;
|
|
427
487
|
/**
|
|
428
488
|
* Calculates the star rating value of a difficulty.
|
|
429
489
|
*
|
|
@@ -552,6 +612,24 @@ declare abstract class DroidAimEvaluator extends AimEvaluator {
|
|
|
552
612
|
private static movementStrainOf;
|
|
553
613
|
}
|
|
554
614
|
|
|
615
|
+
/**
|
|
616
|
+
* Holds data that can be used to calculate osu!droid performance points.
|
|
617
|
+
*/
|
|
618
|
+
interface DroidDifficultyAttributes extends DifficultyAttributes {
|
|
619
|
+
/**
|
|
620
|
+
* The difficulty corresponding to the tap skill.
|
|
621
|
+
*/
|
|
622
|
+
tapDifficulty: number;
|
|
623
|
+
/**
|
|
624
|
+
* The difficulty corresponding to the rhythm skill.
|
|
625
|
+
*/
|
|
626
|
+
rhythmDifficulty: number;
|
|
627
|
+
/**
|
|
628
|
+
* The difficulty corresponding to the visual skill.
|
|
629
|
+
*/
|
|
630
|
+
visualDifficulty: number;
|
|
631
|
+
}
|
|
632
|
+
|
|
555
633
|
/**
|
|
556
634
|
* A difficulty calculator for osu!droid gamemode.
|
|
557
635
|
*/
|
|
@@ -578,6 +656,7 @@ declare class DroidDifficultyCalculator extends DifficultyCalculator {
|
|
|
578
656
|
visual: number;
|
|
579
657
|
protected readonly difficultyMultiplier: number;
|
|
580
658
|
protected readonly mode: Modes;
|
|
659
|
+
readonly attributes: DroidDifficultyAttributes;
|
|
581
660
|
/**
|
|
582
661
|
* Calculates the aim star rating of the beatmap and stores it in this instance.
|
|
583
662
|
*/
|
|
@@ -715,7 +794,7 @@ interface PerformanceCalculationOptions {
|
|
|
715
794
|
/**
|
|
716
795
|
* The base class of performance calculators.
|
|
717
796
|
*/
|
|
718
|
-
declare abstract class PerformanceCalculator
|
|
797
|
+
declare abstract class PerformanceCalculator {
|
|
719
798
|
/**
|
|
720
799
|
* The overall performance value.
|
|
721
800
|
*/
|
|
@@ -725,9 +804,9 @@ declare abstract class PerformanceCalculator<T extends DifficultyCalculator> {
|
|
|
725
804
|
*/
|
|
726
805
|
computedAccuracy: Accuracy;
|
|
727
806
|
/**
|
|
728
|
-
* The difficulty
|
|
807
|
+
* The difficulty attributes that is being calculated.
|
|
729
808
|
*/
|
|
730
|
-
readonly
|
|
809
|
+
abstract readonly difficultyAttributes: DifficultyAttributes;
|
|
731
810
|
/**
|
|
732
811
|
* Penalty for combo breaks.
|
|
733
812
|
*/
|
|
@@ -750,10 +829,6 @@ declare abstract class PerformanceCalculator<T extends DifficultyCalculator> {
|
|
|
750
829
|
* Nerf factor used for nerfing beatmaps with very likely dropped sliderends.
|
|
751
830
|
*/
|
|
752
831
|
protected sliderNerfFactor: number;
|
|
753
|
-
/**
|
|
754
|
-
* @param difficultyCalculator The difficulty calculator to calculate.
|
|
755
|
-
*/
|
|
756
|
-
constructor(difficultyCalculator: T);
|
|
757
832
|
/**
|
|
758
833
|
* Calculates the performance points of the beatmap.
|
|
759
834
|
*
|
|
@@ -774,6 +849,10 @@ declare abstract class PerformanceCalculator<T extends DifficultyCalculator> {
|
|
|
774
849
|
* Calculates the total performance value of the beatmap and stores it in this instance.
|
|
775
850
|
*/
|
|
776
851
|
protected abstract calculateTotalValue(): void;
|
|
852
|
+
/**
|
|
853
|
+
* The total hits that can be done in the beatmap.
|
|
854
|
+
*/
|
|
855
|
+
protected get totalHits(): number;
|
|
777
856
|
/**
|
|
778
857
|
* Calculates the base performance value of a star rating.
|
|
779
858
|
*/
|
|
@@ -793,7 +872,7 @@ declare abstract class PerformanceCalculator<T extends DifficultyCalculator> {
|
|
|
793
872
|
/**
|
|
794
873
|
* A performance points calculator that calculates performance points for osu!droid gamemode.
|
|
795
874
|
*/
|
|
796
|
-
declare class DroidPerformanceCalculator extends PerformanceCalculator
|
|
875
|
+
declare class DroidPerformanceCalculator extends PerformanceCalculator {
|
|
797
876
|
/**
|
|
798
877
|
* The aim performance value.
|
|
799
878
|
*/
|
|
@@ -821,8 +900,13 @@ declare class DroidPerformanceCalculator extends PerformanceCalculator<DroidDiff
|
|
|
821
900
|
*/
|
|
822
901
|
get tapPenalty(): number;
|
|
823
902
|
private _tapPenalty;
|
|
903
|
+
readonly difficultyAttributes: DroidDifficultyAttributes;
|
|
824
904
|
protected finalMultiplier: number;
|
|
825
905
|
protected readonly mode: Modes;
|
|
906
|
+
/**
|
|
907
|
+
* @param difficultyAttributes The difficulty attributes to calculate.
|
|
908
|
+
*/
|
|
909
|
+
constructor(difficultyAttributes: DroidDifficultyAttributes);
|
|
826
910
|
/**
|
|
827
911
|
* Applies a tap penalty value to this calculator.
|
|
828
912
|
*
|
|
@@ -1010,6 +1094,16 @@ declare abstract class OsuSkill extends StrainSkill {
|
|
|
1010
1094
|
difficultyValue(): number;
|
|
1011
1095
|
}
|
|
1012
1096
|
|
|
1097
|
+
/**
|
|
1098
|
+
* Holds data that can be used to calculate osu!standard performance points.
|
|
1099
|
+
*/
|
|
1100
|
+
interface OsuDifficultyAttributes extends DifficultyAttributes {
|
|
1101
|
+
/**
|
|
1102
|
+
* The difficulty corresponding to the speed skill.
|
|
1103
|
+
*/
|
|
1104
|
+
speedDifficulty: number;
|
|
1105
|
+
}
|
|
1106
|
+
|
|
1013
1107
|
/**
|
|
1014
1108
|
* A difficulty calculator for osu!standard gamemode.
|
|
1015
1109
|
*/
|
|
@@ -1026,6 +1120,7 @@ declare class OsuDifficultyCalculator extends DifficultyCalculator {
|
|
|
1026
1120
|
* The flashlight star rating of the beatmap.
|
|
1027
1121
|
*/
|
|
1028
1122
|
flashlight: number;
|
|
1123
|
+
readonly attributes: OsuDifficultyAttributes;
|
|
1029
1124
|
protected readonly difficultyMultiplier: number;
|
|
1030
1125
|
protected readonly mode: Modes;
|
|
1031
1126
|
/**
|
|
@@ -1183,7 +1278,7 @@ declare abstract class OsuFlashlightEvaluator extends FlashlightEvaluator {
|
|
|
1183
1278
|
/**
|
|
1184
1279
|
* A performance points calculator that calculates performance points for osu!standard gamemode.
|
|
1185
1280
|
*/
|
|
1186
|
-
declare class OsuPerformanceCalculator extends PerformanceCalculator
|
|
1281
|
+
declare class OsuPerformanceCalculator extends PerformanceCalculator {
|
|
1187
1282
|
/**
|
|
1188
1283
|
* The aim performance value.
|
|
1189
1284
|
*/
|
|
@@ -1200,8 +1295,13 @@ declare class OsuPerformanceCalculator extends PerformanceCalculator<OsuDifficul
|
|
|
1200
1295
|
* The flashlight performance value.
|
|
1201
1296
|
*/
|
|
1202
1297
|
flashlight: number;
|
|
1298
|
+
readonly difficultyAttributes: OsuDifficultyAttributes;
|
|
1203
1299
|
protected finalMultiplier: number;
|
|
1204
1300
|
protected readonly mode: Modes;
|
|
1301
|
+
/**
|
|
1302
|
+
* @param difficultyAttributes The difficulty attributes to calculate.
|
|
1303
|
+
*/
|
|
1304
|
+
constructor(difficultyAttributes: OsuDifficultyAttributes);
|
|
1205
1305
|
protected calculateValues(): void;
|
|
1206
1306
|
protected calculateTotalValue(): void;
|
|
1207
1307
|
/**
|