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

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.
@@ -25,6 +25,7 @@ class DroidVisual extends DroidSkill_1.DroidSkill {
25
25
  if (current.object instanceof osu_base_1.Spinner) {
26
26
  return 0;
27
27
  }
28
+ const last = this.previous.at(0);
28
29
  // Start with base density and give minimum global bonus for Hidden.
29
30
  let strain = (0.25 * current.noteDensity) / (1 + current.overlappingFactor * 5);
30
31
  if (this.isHidden) {
@@ -43,6 +44,17 @@ class DroidVisual extends DroidSkill_1.DroidSkill {
43
44
  ((this.isHidden ? 0.007 : 0.006) * (this.preempt - 750)) /
44
45
  (1 + current.overlappingFactor * 2);
45
46
  }
47
+ if (current.travelTime) {
48
+ const currentVelocity = current.travelDistance / current.travelTime;
49
+ // 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) {
53
+ const prevVelocity = last.travelDistance / last.travelTime;
54
+ // Avoid overbuffing extremely fast sliders.
55
+ strain += Math.min(10, Math.abs(currentVelocity - prevVelocity) * 2.5);
56
+ }
57
+ }
46
58
  return strain;
47
59
  }
48
60
  strainValueAt(current) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rian8337/osu-rebalance-difficulty-calculator",
3
- "version": "1.4.4",
3
+ "version": "1.4.5",
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": "5a06b61b4f9a509714db001af22375bba8320a05"
38
+ "gitHead": "83b5b637f1e04fb2a23901ecf39a505680e5f70a"
39
39
  }