mirror of
https://github.com/osukey/osukey.git
synced 2025-05-05 21:57:24 +09:00
Implement vinxis/xexxar's adjustments
This commit is contained in:
parent
be476c58d7
commit
8546fedd4f
@ -3,7 +3,6 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using osu.Game.Rulesets.Osu.Difficulty.Preprocessing;
|
using osu.Game.Rulesets.Osu.Difficulty.Preprocessing;
|
||||||
using osuTK;
|
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Osu.Difficulty.Skills
|
namespace osu.Game.Rulesets.Osu.Difficulty.Skills
|
||||||
{
|
{
|
||||||
@ -13,30 +12,39 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
|
|||||||
public class Aim : Skill
|
public class Aim : Skill
|
||||||
{
|
{
|
||||||
private const double angle_bonus_begin = 5 * Math.PI / 12;
|
private const double angle_bonus_begin = 5 * Math.PI / 12;
|
||||||
|
private const double timing_threshold = 107;
|
||||||
|
private const double min_distance_for_bonus = 90;
|
||||||
|
|
||||||
|
private const double angle_threshold = Math.PI / 4;
|
||||||
|
|
||||||
protected override double SkillMultiplier => 26.25;
|
protected override double SkillMultiplier => 26.25;
|
||||||
protected override double StrainDecayBase => 0.15;
|
protected override double StrainDecayBase => 0.15;
|
||||||
|
|
||||||
protected override double StrainValueOf(OsuDifficultyHitObject current)
|
protected override double StrainValueOf(OsuDifficultyHitObject current)
|
||||||
{
|
{
|
||||||
double angleBonus = 0;
|
|
||||||
|
|
||||||
double result = 0;
|
double result = 0;
|
||||||
|
|
||||||
if (Previous.Count > 0)
|
if (Previous.Count > 0)
|
||||||
{
|
{
|
||||||
if (current.Angle != null)
|
if (current.Angle != null && current.Angle.Value > angle_bonus_begin)
|
||||||
{
|
{
|
||||||
angleBonus = Math.Min(
|
var angleBonus = Math.Sqrt(
|
||||||
(Previous[0].JumpDistance - STREAM_SPACING_THRESHOLD) * Math.Sin(current.Angle.Value - angle_bonus_begin),
|
Math.Max(0, Previous[0].JumpDistance + Previous[0].TravelDistance - min_distance_for_bonus)
|
||||||
(current.JumpDistance - STREAM_SPACING_THRESHOLD) * Math.Sin(current.Angle.Value - angle_bonus_begin)
|
* Math.Min(
|
||||||
);
|
Math.Sin(current.Angle.Value - angle_bonus_begin),
|
||||||
}
|
Math.Sin(angle_threshold))
|
||||||
|
* (Math.Max(0, current.JumpDistance - min_distance_for_bonus)
|
||||||
|
* Math.Min(
|
||||||
|
Math.Sin(current.Angle.Value - angle_bonus_begin),
|
||||||
|
Math.Sin(angle_threshold))));
|
||||||
|
|
||||||
result = 2 * Math.Pow(Math.Max(0, angleBonus), 0.99) / Previous[0].StrainTime;
|
result = 2 * Math.Pow(Math.Max(0, angleBonus), 0.99) / Math.Max(Previous[0].StrainTime, timing_threshold);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return result + (Math.Pow(current.TravelDistance, 0.99) + Math.Pow(current.JumpDistance, 0.99)) / current.StrainTime;
|
return Math.Max(
|
||||||
|
result + (Math.Pow(current.TravelDistance, 0.99) + Math.Pow(current.JumpDistance, 0.99)) / Math.Max(current.StrainTime, timing_threshold),
|
||||||
|
(Math.Pow(current.TravelDistance, 0.99) + Math.Pow(current.JumpDistance, 0.99)) / current.StrainTime);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using osu.Game.Rulesets.Osu.Difficulty.Preprocessing;
|
using osu.Game.Rulesets.Osu.Difficulty.Preprocessing;
|
||||||
using osuTK;
|
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Osu.Difficulty.Skills
|
namespace osu.Game.Rulesets.Osu.Difficulty.Skills
|
||||||
{
|
{
|
||||||
@ -12,8 +11,6 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class Speed : Skill
|
public class Speed : Skill
|
||||||
{
|
{
|
||||||
private const double min_angle_bonus = 1.0;
|
|
||||||
private const double max_angle_bonus = 1.25;
|
|
||||||
private const double angle_bonus_begin = 3 * Math.PI / 4;
|
private const double angle_bonus_begin = 3 * Math.PI / 4;
|
||||||
private const double pi_over_4 = Math.PI / 4;
|
private const double pi_over_4 = Math.PI / 4;
|
||||||
|
|
||||||
@ -34,8 +31,14 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
|
|||||||
speedBonus = 1 + Math.Pow((min_speed_bonus - deltaTime) / speed_balancing_factor, 2);
|
speedBonus = 1 + Math.Pow((min_speed_bonus - deltaTime) / speed_balancing_factor, 2);
|
||||||
|
|
||||||
double angleBonus = 1.0;
|
double angleBonus = 1.0;
|
||||||
if (current.Angle != null)
|
if (current.Angle != null && current.Angle.Value < angle_bonus_begin)
|
||||||
angleBonus = MathHelper.Clamp((angle_bonus_begin - current.Angle.Value) / pi_over_4 * 0.5 + 1.0, min_angle_bonus, max_angle_bonus);
|
{
|
||||||
|
angleBonus = 1 + Math.Min(Math.Sin(angle_bonus_begin - current.Angle.Value), Math.Sin(Math.PI / 4)) / 2.5;
|
||||||
|
if (distance < 90 && current.Angle.Value < Math.PI / 4)
|
||||||
|
angleBonus += (1 - angleBonus) * Math.Min((90 - distance) / 10, 1);
|
||||||
|
else if (distance < 90 && current.Angle.Value < Math.PI / 2)
|
||||||
|
angleBonus += (1 - angleBonus) * Math.Min((90 - distance) / 10, 1) * Math.Sin((Math.PI / 2 - current.Angle.Value) / pi_over_4);
|
||||||
|
}
|
||||||
|
|
||||||
return speedBonus * angleBonus * (0.95 + Math.Pow(distance / SINGLE_SPACING_THRESHOLD, 4)) / current.StrainTime;
|
return speedBonus * angleBonus * (0.95 + Math.Pow(distance / SINGLE_SPACING_THRESHOLD, 4)) / current.StrainTime;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user