@rian8337/osu-rebalance-difficulty-calculator 1.4.5 → 1.4.6

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.
@@ -11,7 +11,7 @@ class DroidPerformanceCalculator extends PerformanceCalculator_1.PerformanceCalc
11
11
  constructor() {
12
12
  super(...arguments);
13
13
  this.stars = new DroidStarRating_1.DroidStarRating();
14
- this.finalMultiplier = 1.3;
14
+ this.finalMultiplier = 1.24;
15
15
  /**
16
16
  * The aim performance value.
17
17
  */
@@ -72,17 +72,17 @@ class DifficultyHitObjectCreator {
72
72
  object.noteDensity += 1 - deltaTime / params.preempt;
73
73
  if (!(hitObject instanceof osu_base_1.Spinner)) {
74
74
  object.overlappingFactor +=
75
- (0.8 *
76
- // Penalize objects that are too close to the object in both distance
77
- // and delta time to prevent stream maps from being overweighted.
78
- Math.max(0, 1 -
75
+ // Penalize objects that are too close to the object in both distance
76
+ // and delta time to prevent stream maps from being overweighted.
77
+ Math.max(0, 2 *
78
+ (1 -
79
79
  object.object.stackedPosition.getDistance(hitObject.stackedEndPosition) /
80
- (1.5 * object.object.radius)) *
81
- 50) /
82
- (1 +
83
- Math.exp(0.15 *
84
- (Math.max(deltaTime, this.minDeltaTime) -
85
- 75)));
80
+ (4 * object.object.radius))) *
81
+ (50 /
82
+ (1 +
83
+ Math.exp(0.15 *
84
+ (Math.max(deltaTime, this.minDeltaTime) -
85
+ 75))));
86
86
  }
87
87
  }
88
88
  if (object.object instanceof osu_base_1.Spinner ||
@@ -9,7 +9,6 @@ const DroidSkill_1 = require("./DroidSkill");
9
9
  class DroidVisual extends DroidSkill_1.DroidSkill {
10
10
  constructor(mods, preempt) {
11
11
  super(mods);
12
- this.historyLength = 16;
13
12
  this.starsPerDouble = 1.025;
14
13
  this.reducedSectionCount = 10;
15
14
  this.reducedSectionBaseline = 0.75;
@@ -25,34 +24,39 @@ class DroidVisual extends DroidSkill_1.DroidSkill {
25
24
  if (current.object instanceof osu_base_1.Spinner) {
26
25
  return 0;
27
26
  }
28
- const last = this.previous.at(0);
29
27
  // Start with base density and give minimum global bonus for Hidden.
30
- let strain = (0.25 * current.noteDensity) / (1 + current.overlappingFactor * 5);
28
+ // Add density caps for sanity.
29
+ let strain = Math.min(20, Math.pow(current.noteDensity, 2)) /
30
+ 10 /
31
+ (1 + current.overlappingFactor * 2);
31
32
  if (this.isHidden) {
32
33
  strain +=
33
- (0.1 * current.noteDensity) /
34
- (1 + current.overlappingFactor * 2);
35
- }
36
- // Give bonus for AR higher than 10.33 or lower than 8.
37
- if (this.preempt < 400) {
38
- strain +=
39
- (0.02375 * (400 - this.preempt)) /
34
+ Math.min(15, Math.pow(current.noteDensity, 2)) /
35
+ 10 /
40
36
  (1 + current.overlappingFactor * 1.5);
41
37
  }
42
- else if (this.preempt > 750) {
43
- strain +=
44
- ((this.isHidden ? 0.007 : 0.006) * (this.preempt - 750)) /
45
- (1 + current.overlappingFactor * 2);
38
+ // Give bonus for AR higher than 10.33.
39
+ if (this.preempt < 400) {
40
+ strain += 0.035 * (400 - this.preempt);
46
41
  }
47
- if (current.travelTime) {
42
+ if (current.object instanceof osu_base_1.Slider) {
48
43
  const currentVelocity = current.travelDistance / current.travelTime;
49
44
  // Reward sliders based on velocity, while avoiding overbuffing extremely fast sliders.
50
- strain += Math.min(10, currentVelocity * 1.5);
51
- // Reward for velocity changes if the previous object is a slider.
52
- if (last?.travelTime) {
45
+ strain += Math.min(15, currentVelocity * 2.5);
46
+ // Reward for velocity changes based on last few objects.
47
+ for (let i = 0; i < this.previous.length; ++i) {
48
+ const last = this.previous[i];
49
+ // Only reward velocity changes for sliders.
50
+ if (!(last.object instanceof osu_base_1.Slider)) {
51
+ continue;
52
+ }
53
53
  const prevVelocity = last.travelDistance / last.travelTime;
54
54
  // Avoid overbuffing extremely fast sliders.
55
- strain += Math.min(10, Math.abs(currentVelocity - prevVelocity) * 2.5);
55
+ strain += Math.min(15, (Math.abs(currentVelocity - prevVelocity) *
56
+ 5 *
57
+ // Add a decay as past objects become more irrelevant
58
+ (this.previous.length - i)) /
59
+ this.previous.length);
56
60
  }
57
61
  }
58
62
  return strain;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rian8337/osu-rebalance-difficulty-calculator",
3
- "version": "1.4.5",
3
+ "version": "1.4.6",
4
4
  "description": "A module for calculating osu!standard beatmap difficulty and performance value with respect to the latest osu!lazer difficulty and performance algorithm.",
5
5
  "keywords": [
6
6
  "osu",
@@ -35,5 +35,5 @@
35
35
  "publishConfig": {
36
36
  "access": "public"
37
37
  },
38
- "gitHead": "83b5b637f1e04fb2a23901ecf39a505680e5f70a"
38
+ "gitHead": "931d6a15a3308244df0f90b3584cfc2350ac1523"
39
39
  }