mirror of
https://github.com/ppy/osu
synced 2024-12-15 03:16:17 +00:00
Merge pull request #4185 from smoogipoo/add-touchdevice-mod
Add touchdevice mod for pp calculation
This commit is contained in:
commit
7d8c274bae
@ -88,7 +88,12 @@ namespace osu.Game.Rulesets.Osu.Difficulty
|
|||||||
|
|
||||||
private double computeAimValue()
|
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
|
// Longer maps are worth more
|
||||||
double lengthBonus = 0.95f + 0.4f * Math.Min(1.0f, totalHits / 2000.0f) +
|
double lengthBonus = 0.95f + 0.4f * Math.Min(1.0f, totalHits / 2000.0f) +
|
||||||
|
16
osu.Game.Rulesets.Osu/Mods/OsuModTouchDevice.cs
Normal file
16
osu.Game.Rulesets.Osu/Mods/OsuModTouchDevice.cs
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
@ -82,6 +82,9 @@ namespace osu.Game.Rulesets.Osu
|
|||||||
|
|
||||||
if (mods.HasFlag(LegacyMods.Target))
|
if (mods.HasFlag(LegacyMods.Target))
|
||||||
yield return new OsuModTarget();
|
yield return new OsuModTarget();
|
||||||
|
|
||||||
|
if (mods.HasFlag(LegacyMods.TouchDevice))
|
||||||
|
yield return new OsuModTouchDevice();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override IEnumerable<Mod> GetModsFor(ModType type)
|
public override IEnumerable<Mod> GetModsFor(ModType type)
|
||||||
|
Loading…
Reference in New Issue
Block a user