mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 07:06:35 +09:00
42 lines
1.4 KiB
C#
42 lines
1.4 KiB
C#
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
using System;
|
|
using osu.Game.Rulesets.Osu.Difficulty.Preprocessing;
|
|
|
|
namespace osu.Game.Rulesets.Osu.Difficulty.Skills
|
|
{
|
|
/// <summary>
|
|
/// Represents the skill required to correctly aim at every object in the map with a uniform CircleSize and normalized distances.
|
|
/// </summary>
|
|
public class Aim : Skill
|
|
{
|
|
protected override double SkillMultiplier => 26.25;
|
|
protected override double StrainDecayBase => 0.15;
|
|
|
|
protected override double StrainValueOf(OsuDifficultyHitObject current)
|
|
{
|
|
double angleBonus = 1.0;
|
|
|
|
if (current.Angle != null)
|
|
{
|
|
double angle = current.Angle.Value * 180 / Math.PI;
|
|
|
|
if (current.JumpDistance > SINGLE_SPACING_THRESHOLD)
|
|
{
|
|
if (angle > 75)
|
|
angleBonus = (angle / 45 - 75) / 2;
|
|
else if (angle > 120)
|
|
angleBonus = 0.5;
|
|
}
|
|
}
|
|
|
|
return angleBonus * (
|
|
Math.Pow(current.JumpDistance - SINGLE_SPACING_THRESHOLD, 0.99)
|
|
+ Math.Pow(current.TravelDistance, 0.99)
|
|
+ Math.Pow(current.JumpDistance, 0.99)
|
|
) / current.StrainTime;
|
|
}
|
|
}
|
|
}
|