-
Notifications
You must be signed in to change notification settings - Fork 20
/
rosu_pp_py.pyi
1064 lines (801 loc) · 30.2 KB
/
rosu_pp_py.pyi
1
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
from enum import Enum
from typing import List, Optional, Union
from collections.abc import Iterator
GameMods = Union[int, str, GameMod, List[Union[GameMod, str, int]]]
GameMod = dict[str, Union[str, GameModSettings]]
"""
Must contain item `'acronym': str` and optionally `'settings': GameModSettings`
"""
GameModSettings = dict[str, Union[bool, float, str]]
class GameMode(Enum):
"""
Enum for a beatmap's gamemode
"""
Osu = 0
Taiko = 1
Catch = 2
Mania = 3
class HitResultPriority(Enum):
"""
While generating remaining hitresults, decide how they should be distributed.
"""
BestCase = 0
WorstCase = 1
class Beatmap:
"""
Class containing all beatmap data relevant for difficulty and performance calculation
The kwargs must include any of the following:
`'path': str`
The path to a .osu file
`'content': Union[str, bytearray]`
The content of a .osu file as string or bytes
`'bytes': bytearray`
The content of a .osu file as bytes
## Raises
Throws an exception if the map could not be parsed or the map's mode cannot be converted to
the specified mode
"""
def __init__(self, **kwargs) -> None: ...
def convert(self, mode: GameMode) -> None:
"""
Convert the beatmap to the specified mode
## Raises
Throws an exception if the specified mode is incompatible with the map's mode
"""
@property
def bpm(self) -> float: ...
@property
def version(self) -> int: ...
@property
def is_convert(self) -> bool: ...
@property
def stack_leniency(self) -> float: ...
@property
def ar(self) -> float: ...
@property
def cs(self) -> float: ...
@property
def hp(self) -> float: ...
@property
def od(self) -> float: ...
@property
def slider_multiplier(self) -> float: ...
@property
def slider_tick_rate(self) -> float: ...
@property
def mode(self) -> GameMode: ...
@property
def n_breaks(self) -> int: ...
@property
def n_objects(self) -> int: ...
@property
def n_circles(self) -> int: ...
@property
def n_sliders(self) -> int: ...
@property
def n_spinners(self) -> int: ...
@property
def n_holds(self) -> int: ...
class Difficulty:
"""
Builder for a difficulty calculation
The kwargs may include any of the following:
`'mods': GameMods`
Specify mods.
Relevant type aliases:
`GameMods = Union[int, str, GameMod, List[Union[GameMod, str, int]]]`
`GameMod = dict[str, Union[str, GameModSettings]]`
`GameMod` *must* have an item `'acronym': str` and an optional
item `'settings': GameModSettings`
`GameModSettings = dict[str, Union[bool, float, str]]`
See https://github.com/ppy/osu-api/wiki#mods
`'clock_rate': float`
Adjust the clock rate used in the calculation.
If none is specified, it will take the clock rate based on the mods
i.e. 1.5 for DT, 0.75 for HT and 1.0 otherwise.
Clamped between 0.01 and 100.
`'ar': float`
Override a beatmap's set AR.
Only relevant for osu! and osu!catch.
Clamped between -20 and 20.
`'ar_with_mods': bool`
Determines if the given AR value should be used before
or after accounting for mods, e.g. on `true` the value will be
used as is and on `false` it will be modified based on the mods.
`'cs': float`
Override a beatmap's set CS.
Only relevant for osu! and osu!catch.
Clamped between -20 and 20.
`'cs_with_mods': bool`
Determines if the given CS value should be used before
or after accounting for mods, e.g. on `true` the value will be
used as is and on `false` it will be modified based on the mods.
`'hp': float`
Override a beatmap's set HP.
Clamped between -20 and 20.
`'hp_with_mods': bool`
Determines if the given HP value should be used before
or after accounting for mods, e.g. on `true` the value will be
used as is and on `false` it will be modified based on the mods.
`'od': float`
Override a beatmap's set OD.
Clamped between -20 and 20.
`'od_with_mods': bool`
Determines if the given OD value should be used before
or after accounting for mods, e.g. on `true` the value will be
used as is and on `false` it will be modified based on the mods.
`'passed_objects': int`
Amount of passed objects for partial plays, e.g. a fail.
If you want to calculate the difficulty after every few objects,
instead of using `Difficulty` multiple times with different
`passed_objects`, you should use `GradualDifficulty`.
`'hardrock_offsets': bool`
Adjust patterns as if the HR mod is enabled.
Only relevant for osu!catch.
"""
def __init__(self, **kwargs) -> None: ...
def calculate(self, map: Beatmap) -> DifficultyAttributes:
"""
Perform the difficulty calculation
"""
def strains(self, map: Beatmap) -> Strains:
"""
Perform the difficulty calculation but instead of evaluating strain
values, return them as is.
Suitable to plot the difficulty over time.
"""
def performance(self) -> Performance:
"""
Use the current difficulty settings to create a performance calculator
"""
def gradual_difficulty(self, map: Beatmap) -> GradualDifficulty:
"""
Returns a gradual difficulty calculator for the current difficulty settings
"""
def gradual_performance(self, map: Beatmap) -> GradualPerformance:
"""
Returns a gradual performance calculator for the current difficulty settings
"""
def set_mods(self, mods: Optional[GameMods]) -> None: ...
def set_clock_rate(self, clock_rate: Optional[float]) -> None: ...
def set_ar(self, ar: Optional[float], with_mods: bool) -> None:
"""
Override a beatmap's set AR.
Only relevant for osu! and osu!catch.
Clamped between -20 and 20.
`with_mods` determines if the given AR value should be used before
or after accounting for mods, e.g. on `true` the value will be
used as is and on `false` it will be modified based on the mods.
"""
def set_cs(self, cs: Optional[float], with_mods: bool) -> None:
"""
Override a beatmap's set CS.
Only relevant for osu! and osu!catch.
Clamped between -20 and 20.
`with_mods` determines if the given CS value should be used before
or after accounting for mods, e.g. on `true` the value will be
used as is and on `false` it will be modified based on the mods.
"""
def set_hp(self, hp: Optional[float], with_mods: bool) -> None:
"""
Override a beatmap's set HP.
Clamped between -20 and 20.
`with_mods` determines if the given HP value should be used before
or after accounting for mods, e.g. on `true` the value will be
used as is and on `false` it will be modified based on the mods.
"""
def set_od(self, od: Optional[float], with_mods: bool) -> None:
"""
Override a beatmap's set OD.
Clamped between -20 and 20.
`with_mods` determines if the given OD value should be used before
or after accounting for mods, e.g. on `true` the value will be
used as is and on `false` it will be modified based on the mods.
"""
def set_passed_objects(self, passed_objects: Optional[int]) -> None: ...
def set_hardrock_offsets(self, hardrock_offsets: Optional[bool]) -> None: ...
class Performance:
"""
Builder for a performance calculation
The kwargs may include any of the following:
`'mods': GameMods`
Specify mods.
Relevant type aliases:
`GameMods = Union[int, str, GameMod, List[Union[GameMod, str, int]]]`
`GameMod = dict[str, Union[str, GameModSettings]]`
`GameMod` *must* have an item `'acronym': str` and an optional
item `'settings': GameModSettings`
`GameModSettings = dict[str, Union[bool, float, str]]`
See https://github.com/ppy/osu-api/wiki#mods
`'clock_rate': float`
Adjust the clock rate used in the calculation.
If none is specified, it will take the clock rate based on the mods
i.e. 1.5 for DT, 0.75 for HT and 1.0 otherwise.
Clamped between 0.01 and 100.
`'ar': float`
Override a beatmap's set AR.
Only relevant for osu! and osu!catch.
Clamped between -20 and 20.
`'ar_with_mods': bool`
Determines if the given AR value should be used before
or after accounting for mods, e.g. on `true` the value will be
used as is and on `false` it will be modified based on the mods.
`'cs': float`
Override a beatmap's set CS.
Only relevant for osu! and osu!catch.
Clamped between -20 and 20.
`'cs_with_mods': bool`
Determines if the given CS value should be used before
or after accounting for mods, e.g. on `true` the value will be
used as is and on `false` it will be modified based on the mods.
`'hp': float`
Override a beatmap's set HP.
Clamped between -20 and 20.
`'hp_with_mods': bool`
Determines if the given HP value should be used before
or after accounting for mods, e.g. on `true` the value will be
used as is and on `false` it will be modified based on the mods.
`'od': float`
Override a beatmap's set OD.
Clamped between -20 and 20.
`'od_with_mods': bool`
Determines if the given OD value should be used before
or after accounting for mods, e.g. on `true` the value will be
used as is and on `false` it will be modified based on the mods.
`'passed_objects': int`
Amount of passed objects for partial plays, e.g. a fail.
If you want to calculate the difficulty after every few objects,
instead of using `Difficulty` multiple times with different
`passed_objects`, you should use `GradualDifficulty`.
`'hardrock_offsets': bool`
Adjust patterns as if the HR mod is enabled.
Only relevant for osu!catch.
`'accuracy': float`
Set the accuracy between `0.0` and `100.0`.
`'combo': int`
Specify the max combo of the play.
Irrelevant for osu!mania.
`'n_geki': int`
Specify the amount of gekis of a play.
Only relevant for osu!mania for which it repesents the amount of n320.
`'n_katu': int`
Specify the amount of katus of a play.
Only relevant for osu!catch for which it represents the amount of tiny
droplet misses and osu!mania for which it repesents the amount of n200.
`'n300': int`
Specify the amount of 300s of a play.
`'n100': int`
Specify the amount of 100s of a play.
`'n50': int`
Specify the amount of 50s of a play.
Irrelevant for osu!taiko.
`'misses': int`
Specify the amount of misses of a play.
`'hitresult_priority': HitResultPriority`
Specify how hitresults should be generated.
Defaults to `HitResultPriority.BestCase`.
"""
def __init__(self, **kwargs) -> None: ...
def calculate(self, arg: Union[DifficultyAttributes, PerformanceAttributes, Beatmap]) -> PerformanceAttributes:
"""
Calculate performance attributes.
If a beatmap is passed as argument, difficulty attributes will have to
be calculated internally which is a comparably expensive task. Hence,
passing previously calculated attributes should be prefered whenever
available.
However, be careful that the passed attributes have been calculated
for the same difficulty settings like mods, clock rate, beatmap,
custom ar, ... otherwise the final attributes will be incorrect.
"""
def difficulty(self) -> Difficulty:
"""
Use the current difficulty settings to create a difficulty calculator
"""
def set_mods(self, mods: Optional[GameMods]) -> None: ...
def set_clock_rate(self, clock_rate: Optional[float]) -> None: ...
def set_ar(self, ar: Optional[float], with_mods: bool) -> None:
"""
Override a beatmap's set AR.
Only relevant for osu! and osu!catch.
Clamped between -20 and 20.
`with_mods` determines if the given AR value should be used before
or after accounting for mods, e.g. on `true` the value will be
used as is and on `false` it will be modified based on the mods.
"""
def set_cs(self, cs: Optional[float], with_mods: bool) -> None:
"""
Override a beatmap's set CS.
Only relevant for osu! and osu!catch.
Clamped between -20 and 20.
`with_mods` determines if the given CS value should be used before
or after accounting for mods, e.g. on `true` the value will be
used as is and on `false` it will be modified based on the mods.
"""
def set_hp(self, hp: Optional[float], with_mods: bool) -> None:
"""
Override a beatmap's set HP.
Clamped between -20 and 20.
`with_mods` determines if the given HP value should be used before
or after accounting for mods, e.g. on `true` the value will be
used as is and on `false` it will be modified based on the mods.
"""
def set_od(self, od: Optional[float], with_mods: bool) -> None:
"""
Override a beatmap's set OD.
Clamped between -20 and 20.
`with_mods` determines if the given OD value should be used before
or after accounting for mods, e.g. on `true` the value will be
used as is and on `false` it will be modified based on the mods.
"""
def set_passed_objects(self, passed_objects: Optional[int]) -> None: ...
def set_hardrock_offsets(self, hardrock_offsets: Optional[bool]) -> None: ...
def set_accuracy(self, accuracy: Optional[float]) -> None: ...
def set_combo(self, combo: Optional[int]) -> None: ...
def set_n_geki(self, n_geki: Optional[int]) -> None: ...
def set_n_katu(self, n_katu: Optional[int]) -> None: ...
def set_n300(self, n300: Optional[int]) -> None: ...
def set_n100(self, n100: Optional[int]) -> None: ...
def set_n50(self, n50: Optional[int]) -> None: ...
def set_misses(self, misses: Optional[int]) -> None: ...
def set_hitresult_priority(self, hitresult_priority: Optional[HitResultPriority]) -> None: ...
class GradualDifficulty(Iterator):
"""
Gradually calculate difficulty attributes after each hitobject
"""
def __init__(self, difficulty: Difficulty, map: Beatmap) -> None: ...
def next(self) -> Optional[DifficultyAttributes]:
"""
Advances the iterator and returns the next attributes.
"""
def nth(self, n: int) -> Optional[DifficultyAttributes]:
"""
Returns the `n`th attributes of the iterator.
Note that the count starts from zero, so `nth(0)` returns the first
value, `nth(1)` the second, and so on.
"""
@property
def n_remaining(self) -> int:
"""
The amount of remaining items.
"""
class GradualPerformance:
"""
Gradually calculate performance attributes after each hitresult
"""
def __init__(self, difficulty: Difficulty, map: Beatmap) -> None: ...
def next(self, state: ScoreState) -> Optional[PerformanceAttributes]:
"""
Process the next hit object and calculate the performance attributes
for the resulting score state.
"""
def nth(self, state: ScoreState, n: int) -> Optional[PerformanceAttributes]:
"""
Process everything up to the next `n`th hitobject and calculate the
performance attributes for the resulting score state.
Note that the count is zero-indexed, so `n=0` will process 1 object,
`n=1` will process 2, and so on.
"""
@property
def n_remaining(self) -> int:
"""
The amount of remaining items.
"""
class BeatmapAttributesBuilder:
"""
Calculator for beatmap attributes considering various settings
The kwargs may include any of the following:
`'mode': GameMode`
Specify a gamemode
`'is_convert': bool`
Specify whether it's a converted map
`'mods': GameMods`
Specify mods.
Relevant type aliases:
`GameMods = Union[int, str, GameMod, List[Union[GameMod, str, int]]]`
`GameMod = dict[str, Union[str, GameModSettings]]`
`GameMod` *must* have an item `'acronym': str` and an optional
item `'settings': GameModSettings`
`GameModSettings = dict[str, Union[bool, float, str]]`
See https://github.com/ppy/osu-api/wiki#mods
`'clock_rate': float`
Adjust the clock rate used in the calculation.
If none is specified, it will take the clock rate based on the mods
i.e. 1.5 for DT, 0.75 for HT and 1.0 otherwise.
Clamped between 0.01 and 100.
`'ar': float`
Override a beatmap's set AR.
Only relevant for osu! and osu!catch.
Clamped between -20 and 20.
`'ar_with_mods': bool`
Determines if the given AR value should be used before
or after accounting for mods, e.g. on `true` the value will be
used as is and on `false` it will be modified based on the mods.
`'cs': float`
Override a beatmap's set CS.
Only relevant for osu! and osu!catch.
Clamped between -20 and 20.
`'cs_with_mods': bool`
Determines if the given CS value should be used before
or after accounting for mods, e.g. on `true` the value will be
used as is and on `false` it will be modified based on the mods.
`'hp': float`
Override a beatmap's set HP.
Clamped between -20 and 20.
`'hp_with_mods': bool`
Determines if the given HP value should be used before
or after accounting for mods, e.g. on `true` the value will be
used as is and on `false` it will be modified based on the mods.
`'od': float`
Override a beatmap's set OD.
Clamped between -20 and 20.
`'od_with_mods': bool`
Determines if the given OD value should be used before
or after accounting for mods, e.g. on `true` the value will be
used as is and on `false` it will be modified based on the mods.
"""
def __init__(self, **kwargs) -> None: ...
def build(self) -> BeatmapAttributes:
"""
Calculate the beatmap attributes
"""
def set_map(self, map: Beatmap) -> None:
"""
Consider the map's attributes, mode, and convert status
"""
def set_mode(self, mode: Optional[GameMode], is_convert: bool) -> None: ...
def set_mods(self, mods: Optional[GameMods]) -> None: ...
def set_clock_rate(self, clock_rate: Optional[float]) -> None: ...
def set_ar(self, ar: Optional[float], with_mods: bool) -> None:
"""
Override a beatmap's set AR.
Only relevant for osu! and osu!catch.
Clamped between -20 and 20.
`with_mods` determines if the given AR value should be used before
or after accounting for mods, e.g. on `true` the value will be
used as is and on `false` it will be modified based on the mods.
"""
def set_cs(self, cs: Optional[float], with_mods: bool) -> None:
"""
Override a beatmap's set CS.
Only relevant for osu! and osu!catch.
Clamped between -20 and 20.
`with_mods` determines if the given CS value should be used before
or after accounting for mods, e.g. on `true` the value will be
used as is and on `false` it will be modified based on the mods.
"""
def set_hp(self, hp: Optional[float], with_mods: bool) -> None:
"""
Override a beatmap's set HP.
Clamped between -20 and 20.
`with_mods` determines if the given HP value should be used before
or after accounting for mods, e.g. on `true` the value will be
used as is and on `false` it will be modified based on the mods.
"""
def set_od(self, od: Optional[float], with_mods: bool) -> None:
"""
Override a beatmap's set OD.
Clamped between -20 and 20.
`with_mods` determines if the given OD value should be used before
or after accounting for mods, e.g. on `true` the value will be
used as is and on `false` it will be modified based on the mods.
"""
class ScoreState:
"""
Aggregation for a score's current state.
"""
def __init__(self, **kwargs) -> None: ...
max_combo: int
"""
Maximum combo that the score has had so far. **Not** the maximum
possible combo of the map so far.
Note that for osu!catch only fruits and droplets are considered for combo.
Irrelevant for osu!mania.
"""
n_geki: int
"""
Amount of current gekis (n320 for osu!mania).
"""
n_katu: int
"""
Amount of current katus (tiny droplet misses for osu!catch / n200 for osu!mania).
"""
n300: int
"""
Amount of current 300s (fruits for osu!catch).
"""
n100: int
"""
Amount of current 100s (droplets for osu!catch).
"""
n50: int
"""
Amount of current 50s (tiny droplets for osu!catch).
"""
misses: int
"""
Amount of current misses (fruits + droplets for osu!catch).
"""
class DifficultyAttributes:
"""
The result of a difficulty calculation
"""
@property
def mode(self) -> GameMode:
"""
The attributes' gamemode
"""
@property
def stars(self) -> float:
"""
The final star rating
"""
@property
def is_convert(self) -> bool:
"""
Whether the map was a convert
"""
@property
def aim(self) -> Optional[float]:
"""
The difficulty of the aim skill.
Only available for osu!.
"""
@property
def speed(self) -> Optional[float]:
"""
The difficulty of the speed skill.
Only available for osu!.
"""
@property
def flashlight(self) -> Optional[float]:
"""
The difficulty of the flashlight skill.
Only available for osu!.
"""
@property
def slider_factor(self) -> Optional[float]:
"""
The ratio of the aim strain with and without considering sliders
Only available for osu!.
"""
@property
def speed_note_count(self) -> Optional[float]:
"""
The number of clickable objects weighted by difficulty.
Only available for osu!.
"""
@property
def od(self) -> Optional[float]:
"""
The overall difficulty
Only available for osu!.
"""
@property
def hp(self) -> Optional[float]:
"""
The health drain rate.
Only available for osu!.
"""
@property
def n_circles(self) -> Optional[int]:
"""
The amount of circles.
Only available for osu!.
"""
@property
def n_sliders(self) -> Optional[int]:
"""
The amount of sliders.
Only available for osu!.
"""
@property
def n_spinners(self) -> Optional[int]:
"""
The amount of spinners.
Only available for osu!.
"""
@property
def stamina(self) -> Optional[float]:
"""
The difficulty of the stamina skill.
Only available for osu!taiko.
"""
@property
def rhythm(self) -> Optional[float]:
"""
The difficulty of the rhythm skill.
Only available for osu!taiko.
"""
@property
def color(self) -> Optional[float]:
"""
The difficulty of the color skill.
Only available for osu!taiko.
"""
@property
def peak(self) -> Optional[float]:
"""
The difficulty of the hardest parts of the map.
Only available for osu!taiko.
"""
@property
def n_fruits(self) -> Optional[int]:
"""
The amount of fruits.
Only available for osu!catch.
"""
@property
def n_droplets(self) -> Optional[int]:
"""
The amount of droplets.
Only available for osu!catch.
"""
@property
def n_tiny_droplets(self) -> Optional[int]:
"""
The amount of tiny droplets.
Only available for osu!catch.
"""
@property
def n_objects(self) -> Optional[int]:
"""
The amount of hitobjects in the map.
Only available for osu!mania.
"""
@property
def ar(self) -> Optional[float]:
"""
The approach rate.
Only available for osu! and osu!catch.
"""
@property
def hit_window(self) -> Optional[float]:
"""
The perceived hit window for an n300 inclusive of rate-adjusting mods (DT/HT/etc)
Only available for osu!taiko and osu!mania.
"""
@property
def max_combo(self) -> int:
"""
The maximum combo on the map.
"""
class PerformanceAttributes:
"""
The result of a performance calculation
"""
@property
def difficulty(self) -> DifficultyAttributes:
"""
The difficulty attributes.
"""
@property
def pp(self) -> float:
"""
The final performance points.
"""
@property
def pp_aim(self) -> Optional[float]:
"""
The aim portion of the final pp.
Only available for osu!.
"""
@property
def pp_flashlight(self) -> Optional[float]:
"""
The flashlight portion of the final pp.
Only available for osu!.
"""
@property
def pp_speed(self) -> Optional[float]:
"""
The speed portion of the final pp.
Only available for osu!.
"""
@property
def pp_accuracy(self) -> Optional[float]:
"""
The accuracy portion of the final pp.
Only available for osu! and osu!taiko.
"""
@property
def effective_miss_count(self) -> Optional[float]:
"""
Scaled miss count based on total hits.
Only available for osu! and osu!taiko.
"""
@property
def pp_difficulty(self) -> Optional[float]:
"""
The strain portion of the final pp.
Only available for osu!taiko and osu!mania.
"""
@property
def state(self) -> Optional[ScoreState]:
"""
The hitresult score state that was used for performance calculation.
Only available if *not* created through gradual calculation.
"""
class Strains:
"""
The result of calculating the strains of a beatmap.
Suitable to plot the difficulty over time.
"""
@property
def mode(self) -> GameMode:
"""
The strains' gamemode.
"""
@property
def section_length(self) -> float:
"""
Time inbetween two strains in ms.
"""
@property
def aim(self) -> Optional[List[float]]:
"""
Strain peaks of the aim skill in osu!
"""
@property
def aim_no_sliders(self) -> Optional[List[float]]:
"""
Strain peaks of the aim skill without sliders in osu!
"""
@property
def speed(self) -> Optional[List[float]]:
"""
Strain peaks of the speed skill in osu!
"""
@property
def flashlight(self) -> Optional[List[float]]:
"""