1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-18 12:02:57 +08:00
osu-lazer/osu.Game.Rulesets.Taiko/Difficulty/Skills/Colour.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

67 lines
2.6 KiB
C#
Raw Normal View History

2020-05-11 13:50:02 +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;
using System.Collections.Generic;
2020-05-11 13:50:02 +08:00
using osu.Game.Rulesets.Difficulty.Preprocessing;
using osu.Game.Rulesets.Difficulty.Skills;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Taiko.Difficulty.Preprocessing;
using osu.Game.Rulesets.Taiko.Difficulty.Preprocessing.Colour;
2020-05-11 13:50:02 +08:00
namespace osu.Game.Rulesets.Taiko.Difficulty.Skills
{
/// <summary>
/// Calculates the colour coefficient of taiko difficulty.
/// </summary>
public class Colour : StrainDecaySkill
2020-05-11 13:50:02 +08:00
{
protected override double SkillMultiplier => 0.12;
2020-05-11 13:50:02 +08:00
// This is set to decay slower than other skills, due to the fact that only the first note of each Mono/Colour/Coupled
// encoding having any difficulty values, and we want to allow colour difficulty to be able to build up even on
// slower maps.
protected override double StrainDecayBase => 0.8;
public Colour(Mod[] mods)
: base(mods)
{
}
2020-08-13 00:35:56 +08:00
protected override double StrainValueOf(DifficultyHitObject current)
2020-05-22 19:50:21 +08:00
{
double difficulty = ((TaikoDifficultyHitObject)current).Colour?.EvaluatedDifficulty ?? 0;
2022-07-01 14:27:23 +08:00
return difficulty;
}
2022-06-25 22:42:56 +08:00
// TODO: Remove before pr
public static String GetDebugHeaderLabels()
{
return "StartTime,Raw,Decayed,CoupledRunLength,RepetitionInterval,EncodingRunLength,Payload(MonoRunLength|MonoCount)";
}
// TODO: Remove before pr
public string GetDebugString(DifficultyHitObject current)
{
double difficulty = ((TaikoDifficultyHitObject)current).Colour?.EvaluatedDifficulty ?? 0;
TaikoDifficultyHitObject? taikoCurrent = (TaikoDifficultyHitObject)current;
TaikoDifficultyHitObjectColour? colour = taikoCurrent?.Colour;
if (taikoCurrent != null && colour != null)
{
List<ColourEncoding> payload = colour.Encoding.Payload;
string payloadDisplay = "";
for (int i = 0; i < payload.Count; ++i)
{
payloadDisplay += $"({payload[i].Payload[0].RunLength}|{payload[i].Payload.Count})";
}
return $"{current.StartTime},{difficulty},{CurrentStrain},{colour.Encoding.Payload[0].Payload.Count},{colour.Encoding.RepetitionInterval},{colour.Encoding.Payload.Count},{payloadDisplay}";
}
else
{
return $"{current.StartTime},{difficulty},{CurrentStrain},0,0,0,0,0";
}
}
2020-05-11 13:50:02 +08:00
}
}