1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 12:33:01 +08:00

Merge pull request #4185 from smoogipoo/add-touchdevice-mod

Add touchdevice mod for pp calculation
This commit is contained in:
Dean Herbert 2019-01-31 14:14:57 +09:00 committed by GitHub
commit 7d8c274bae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 25 additions and 1 deletions

View File

@ -88,7 +88,12 @@ namespace osu.Game.Rulesets.Osu.Difficulty
private double computeAimValue()
{
double aimValue = Math.Pow(5.0f * Math.Max(1.0f, Attributes.AimStrain / 0.0675f) - 4.0f, 3.0f) / 100000.0f;
double rawAim = Attributes.AimStrain;
if (mods.Any(m => m is OsuModTouchDevice))
rawAim = Math.Pow(rawAim, 0.8);
double aimValue = Math.Pow(5.0f * Math.Max(1.0f, rawAim / 0.0675f) - 4.0f, 3.0f) / 100000.0f;
// Longer maps are worth more
double lengthBonus = 0.95f + 0.4f * Math.Min(1.0f, totalHits / 2000.0f) +

View File

@ -0,0 +1,16 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Game.Rulesets.Mods;
namespace osu.Game.Rulesets.Osu.Mods
{
public class OsuModTouchDevice : Mod
{
public override string Name => "Touch Device";
public override string Acronym => "TD";
public override double ScoreMultiplier => 1;
public override bool Ranked => true;
}
}

View File

@ -82,6 +82,9 @@ namespace osu.Game.Rulesets.Osu
if (mods.HasFlag(LegacyMods.Target))
yield return new OsuModTarget();
if (mods.HasFlag(LegacyMods.TouchDevice))
yield return new OsuModTouchDevice();
}
public override IEnumerable<Mod> GetModsFor(ModType type)