@rian8337/osu-difficulty-calculator 1.0.2 → 1.0.4

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.
@@ -74,18 +74,16 @@ class DroidPerformanceCalculator extends PerformanceCalculator_1.PerformanceCalc
74
74
  // Combo scaling
75
75
  this.aim *= this.comboPenalty;
76
76
  // We want to give more reward for lower AR when it comes to aim and HD. This nerfs high AR and buffs lower AR.
77
- let hiddenBonus = 1;
78
77
  if (this.stars.mods.some((m) => m instanceof osu_base_1.ModHidden)) {
79
78
  // The bonus starts decreasing twice as fast
80
79
  // beyond AR10 and reaches 1 at AR11.
81
80
  if (calculatedAR > 10) {
82
- hiddenBonus += Math.max(0, 0.08 * (11 - calculatedAR));
81
+ this.aim *= 1 + Math.max(0, 0.08 * (11 - calculatedAR));
83
82
  }
84
83
  else {
85
- hiddenBonus += 0.04 * (12 - calculatedAR);
84
+ this.aim *= 1 + 0.04 * (12 - calculatedAR);
86
85
  }
87
86
  }
88
- this.aim *= hiddenBonus;
89
87
  // AR scaling
90
88
  let arFactor = 0;
91
89
  if (calculatedAR > 10.33) {
@@ -77,11 +77,9 @@ class OsuPerformanceCalculator extends PerformanceCalculator_1.PerformanceCalcul
77
77
  // Buff for longer maps with high AR.
78
78
  this.aim *= 1 + arFactor * lengthBonus;
79
79
  // We want to give more reward for lower AR when it comes to aim and HD. This nerfs high AR and buffs lower AR.
80
- let hiddenBonus = 1;
81
80
  if (this.stars.mods.some((m) => m instanceof osu_base_1.ModHidden)) {
82
- hiddenBonus += 0.04 * (12 - calculatedAR);
81
+ this.aim *= 1 + 0.04 * (12 - calculatedAR);
83
82
  }
84
- this.aim *= hiddenBonus;
85
83
  // Scale the aim value with slider factor to nerf very likely dropped sliderends.
86
84
  this.aim *= this.sliderNerfFactor;
87
85
  // Scale the aim value with accuracy.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rian8337/osu-difficulty-calculator",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "A module for calculating osu!standard beatmap difficulty and performance value with respect to the current difficulty and performance algorithm.",
5
5
  "keywords": [
6
6
  "osu",
@@ -30,10 +30,10 @@
30
30
  "url": "https://github.com/Rian8337/osu-droid-module/issues"
31
31
  },
32
32
  "dependencies": {
33
- "@rian8337/osu-base": "^1.0.2"
33
+ "@rian8337/osu-base": "^1.0.4"
34
34
  },
35
35
  "publishConfig": {
36
36
  "access": "public"
37
37
  },
38
- "gitHead": "34e161583bc0e9beb122e91f2b51ea6706e38736"
38
+ "gitHead": "31e88dedb78e6b1e0123b67bcc5d4dd31f5dfc60"
39
39
  }
@@ -1,5 +1,15 @@
1
1
  declare module "@rian8337/osu-difficulty-calculator" {
2
- import { Accuracy, Beatmap, HitObject, MapStats, Mod, modes, OsuHitWindow, Slider, Vector2 } from "@rian8337/osu-base";
2
+ import {
3
+ Accuracy,
4
+ Beatmap,
5
+ HitObject,
6
+ MapStats,
7
+ Mod,
8
+ modes,
9
+ OsuHitWindow,
10
+ Slider,
11
+ Vector2,
12
+ } from "@rian8337/osu-base";
3
13
 
4
14
  //#region Classes
5
15
 
@@ -39,7 +49,7 @@ declare module "@rian8337/osu-difficulty-calculator" {
39
49
  flashlightStrain: number;
40
50
  /**
41
51
  * The normalized distance from the "lazy" end position of the previous hitobject to the start position of this hitobject.
42
- *
52
+ *
43
53
  * The "lazy" end position is the position at which the cursor ends up if the previous hitobject is followed with as minimal movement as possible (i.e. on the edge of slider follow circles).
44
54
  */
45
55
  lazyJumpDistance: number;
@@ -822,7 +832,10 @@ declare module "@rian8337/osu-difficulty-calculator" {
822
832
  /**
823
833
  * Calculates the amount of misses + sliderbreaks from combo.
824
834
  */
825
- private calculateEffectiveMissCount(combo: number, maxCombo: number): number;
835
+ private calculateEffectiveMissCount(
836
+ combo: number,
837
+ maxCombo: number
838
+ ): number;
826
839
  }
827
840
 
828
841
  /**