mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 22:56:36 +09:00
Cleanup of code
This commit is contained in:
@ -57,7 +57,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty
|
||||
Math.Pow(
|
||||
Math.Pow(aimValue, 1.1) +
|
||||
Math.Pow(speedValue, 1.1) +
|
||||
Math.Pow(accuracyValue, 1.1) +
|
||||
Math.Pow(accuracyValue, 1.1) +
|
||||
Math.Pow(flashlightValue, 1.1), 1.0 / 1.1
|
||||
) * multiplier;
|
||||
|
||||
@ -194,7 +194,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty
|
||||
|
||||
if (mods.Any(h => h is OsuModFlashlight)) {
|
||||
flashlightValue = Math.Pow(Attributes.FlashlightStrain, 2.0) * 25.0;
|
||||
|
||||
|
||||
// Add an additional bonus for HDFL.
|
||||
if (mods.Any(h => h is OsuModHidden))
|
||||
flashlightValue *= 1.2;
|
||||
@ -205,7 +205,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty
|
||||
|
||||
// Combo scaling
|
||||
if (Attributes.MaxCombo > 0)
|
||||
flashlightValue *= Math.Min(Math.Pow(scoreMaxCombo, 0.8) / Math.Pow(Attributes.MaxCombo, 0.8), 1.0);
|
||||
flashlightValue *= Math.Min(Math.Pow(scoreMaxCombo, 0.8) / Math.Pow(Attributes.MaxCombo, 0.8), 1.0);
|
||||
|
||||
// Account for shorter maps having a higher ratio of 0 combo/100 combo flashlight radius.
|
||||
flashlightValue *= 0.5 + 0.15 * Math.Min(1.0, totalHits / 200.0) +
|
||||
|
@ -2,12 +2,10 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using osu.Game.Rulesets.Difficulty.Preprocessing;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
using osu.Game.Rulesets.Osu.Difficulty.Preprocessing;
|
||||
using osu.Game.Rulesets.Osu.Objects;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.Difficulty.Skills
|
||||
{
|
||||
@ -45,18 +43,18 @@ namespace osu.Game.Rulesets.Osu.Difficulty.Skills
|
||||
for (int i = 0; i < Previous.Count; i++) {
|
||||
var osuPrevious = (OsuDifficultyHitObject)Previous[i];
|
||||
var osuPreviousHitObject = (OsuHitObject)(osuPrevious.BaseObject);
|
||||
|
||||
|
||||
if (!(osuPrevious.BaseObject is Spinner)) {
|
||||
double JumpDistance = (osuHitObject.StackedPosition - osuPreviousHitObject.EndPosition).Length;
|
||||
double jumpDistance = (osuHitObject.StackedPosition - osuPreviousHitObject.EndPosition).Length;
|
||||
|
||||
cumulativeStrainTime += osuPrevious.StrainTime;
|
||||
|
||||
// We want to nerf objects that can be easily seen within the Flashlight circle radius.
|
||||
if (i == 0 && JumpDistance < 50.0) {
|
||||
smallDistNerf = JumpDistance / 50.0;
|
||||
if (i == 0 && jumpDistance < 50.0) {
|
||||
smallDistNerf = jumpDistance / 50.0;
|
||||
}
|
||||
|
||||
result += Math.Pow(0.8, i) * scalingFactor * JumpDistance / cumulativeStrainTime;
|
||||
result += Math.Pow(0.8, i) * scalingFactor * jumpDistance / cumulativeStrainTime;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user