osu/osu.Game.Rulesets.Osu/Difficulty/Skills/Speed.cs

24 lines
878 B
C#
Raw Normal View History

2018-04-13 09:19:50 +00:00
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
2018-12-18 00:38:02 +00:00
using System;
2018-05-15 08:36:29 +00:00
using osu.Game.Rulesets.Osu.Difficulty.Preprocessing;
2018-04-13 09:19:50 +00:00
2018-05-15 08:36:29 +00:00
namespace osu.Game.Rulesets.Osu.Difficulty.Skills
2018-04-13 09:19:50 +00:00
{
/// <summary>
/// Represents the skill required to press keys with regards to keeping up with the speed at which objects need to be hit.
/// </summary>
public class Speed : Skill
{
protected override double SkillMultiplier => 1400;
protected override double StrainDecayBase => 0.3;
protected override double StrainValueOf(OsuDifficultyHitObject current)
{
double distance = current.TravelDistance + current.JumpDistance;
2018-12-18 00:49:54 +00:00
return (0.95 + Math.Pow(distance / SINGLE_SPACING_THRESHOLD, 4)) / current.StrainTime;
2018-04-13 09:19:50 +00:00
}
}
}