2023-06-13 22:22:27 +08:00
|
|
|
// 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 System.Collections.Generic;
|
|
|
|
using System.Linq;
|
2023-06-26 21:19:01 +08:00
|
|
|
using osu.Game.Beatmaps;
|
2023-06-13 22:22:27 +08:00
|
|
|
using osu.Game.Rulesets.Mania.Mods;
|
|
|
|
using osu.Game.Rulesets.Mods;
|
2023-06-26 21:19:01 +08:00
|
|
|
using osu.Game.Rulesets.Scoring;
|
2023-06-13 22:22:27 +08:00
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Mania.Difficulty
|
|
|
|
{
|
2023-07-04 16:32:54 +08:00
|
|
|
internal class ManiaLegacyScoreSimulator : ILegacyScoreSimulator
|
2023-06-13 22:22:27 +08:00
|
|
|
{
|
2023-06-26 21:19:01 +08:00
|
|
|
public int AccuracyScore => 0;
|
|
|
|
public int ComboScore { get; private set; }
|
|
|
|
public double BonusScoreRatio => 0;
|
2023-06-13 22:22:27 +08:00
|
|
|
|
2023-06-26 21:19:01 +08:00
|
|
|
public void Simulate(IWorkingBeatmap workingBeatmap, IBeatmap playableBeatmap, IReadOnlyList<Mod> mods)
|
2023-06-13 22:22:27 +08:00
|
|
|
{
|
|
|
|
double multiplier = mods.Where(m => m is not (ModHidden or ModHardRock or ModDoubleTime or ModFlashlight or ManiaModFadeIn))
|
|
|
|
.Select(m => m.ScoreMultiplier)
|
2023-06-15 18:55:51 +08:00
|
|
|
.Aggregate(1.0, (c, n) => c * n);
|
2023-06-13 22:22:27 +08:00
|
|
|
|
2023-06-26 21:19:01 +08:00
|
|
|
ComboScore = (int)(1000000 * multiplier);
|
2023-06-13 22:22:27 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|