diff --git a/osu.Game.Rulesets.Osu.Tests/OsuDifficultyCalculatorTest.cs b/osu.Game.Rulesets.Osu.Tests/OsuDifficultyCalculatorTest.cs index c034906aa2ab..3148bcc3bda2 100644 --- a/osu.Game.Rulesets.Osu.Tests/OsuDifficultyCalculatorTest.cs +++ b/osu.Game.Rulesets.Osu.Tests/OsuDifficultyCalculatorTest.cs @@ -95,6 +95,23 @@ public void TestOffsetChanges(int expectedMaxCombo, string name) } } + [TestCase("diffcalc-test")] + [TestCase("801165")] + [TestCase("5542176")] // real example of a map whose difficulty decreased with more objects + public void TestDifficultyDoesNotDecreaseWithMoreObjects(string name) + { + var timedAttributes = CreateDifficultyCalculator(GetBeatmap(name)) + .CalculateTimed([new OsuModEasy(), new OsuModHidden()]); + + for (int i = 1; i < timedAttributes.Count; i++) + { + var previous = (OsuDifficultyAttributes)timedAttributes[i - 1].Attributes; + var current = (OsuDifficultyAttributes)timedAttributes[i].Attributes; + + Assert.That(current.StarRating, Is.GreaterThanOrEqualTo(previous.StarRating).Within(CHECK_PRECISION)); + } + } + protected override DifficultyCalculator CreateDifficultyCalculator(IWorkingBeatmap beatmap) => new OsuDifficultyCalculator(new OsuRuleset().RulesetInfo, beatmap); protected override Ruleset CreateRuleset() => new OsuRuleset(); diff --git a/osu.Game.Rulesets.Osu.Tests/Resources/Testing/Beatmaps/5542176.osu b/osu.Game.Rulesets.Osu.Tests/Resources/Testing/Beatmaps/5542176.osu new file mode 100644 index 000000000000..6e097ec0a01d --- /dev/null +++ b/osu.Game.Rulesets.Osu.Tests/Resources/Testing/Beatmaps/5542176.osu @@ -0,0 +1,356 @@ +osu file format v14 + +[General] +AudioFilename: audio.ogg +AudioLeadIn: 0 +PreviewTime: 10862 +Countdown: 0 +SampleSet: Soft +StackLeniency: 0.5 +Mode: 0 +LetterboxInBreaks: 0 +WidescreenStoryboard: 0 + +[Editor] +Bookmarks: 16645,16877,20575,20805,24264,25647,25828 +DistanceSpacing: 1 +BeatDivisor: 4 +GridSize: 32 +TimelineZoom: 1.5 + +[Metadata] +Title:overture +TitleUnicode:overture +Artist:you are an angel +ArtistUnicode:you are an angel +Creator:NaPiii_ +Version:daydream +Source: +Tags:electronic experimental bedroom pop post-emo emo indie rock its 5th fifth wave shoegaze glass beach it's fine to dream english whalermelon sekiri Parad0xa paradoxa melons take nymphe app aishiteiru- [-omni-] hakashii sanairrt kiyoshi guarden +BeatmapID:5542176 +BeatmapSetID:2513884 + +[Difficulty] +HPDrainRate:5.2 +CircleSize:3.7 +OverallDifficulty:10 +ApproachRate:10 +SliderMultiplier:1.4 +SliderTickRate:1 + +[Events] +//Background and Video events +0,0,"bgg.jpg",0,0 +//Break Periods +//Storyboard Layer 0 (Background) +//Storyboard Layer 1 (Fail) +//Storyboard Layer 2 (Pass) +//Storyboard Layer 3 (Foreground) +//Storyboard Layer 4 (Overlay) +//Storyboard Sound Samples + +[TimingPoints] +882,300,4,2,1,70,1,0 +932,-100,4,2,1,70,0,0 +1182,300,4,2,1,70,1,0 +1182,-66.6666666666667,4,2,1,70,0,0 +10182,229.445506692161,4,2,1,40,1,0 +10411,-100,4,2,1,50,0,0 +10640,-100,4,2,1,60,0,0 +10870,-100,4,2,1,70,0,0 +11099,232.121786564018,4,2,1,85,1,0 +11099,-66.6666666666667,4,2,1,85,0,0 +11331,-66.6666666666667,4,2,1,85,0,0 +13884,228.547580560598,4,2,1,85,1,0 +13884,-66.6666666666667,4,2,1,85,0,0 +14798,229.58731,4,2,1,85,1,0 +14798,-66.6666666666667,4,2,1,85,0,0 +15716,232.295260092542,4,2,1,85,1,0 +15716,-66.6666666666667,4,2,1,85,0,0 +16645,231.660231660232,4,2,1,85,1,0 +16645,-66.6666666666667,4,2,1,85,0,0 +17571,228.806772680471,4,2,1,85,1,0 +17571,-66.6666666666667,4,2,1,85,0,0 +18486,232.558139534884,4,2,1,85,1,0 +18486,-66.6666666666667,4,2,1,85,0,0 +19416,229.885057471264,4,2,1,85,1,0 +19416,-66.6666666666667,4,2,1,85,0,0 +22174,231.660231660232,4,2,1,85,1,0 +22174,-66.6666666666667,4,2,1,85,0,0 +24027,232.827967295432,4,2,1,85,1,0 +24027,-66.6666666666667,4,2,1,85,0,0 +24958,229.27015666794,4,2,1,85,1,0 +24958,-66.6666666666667,4,2,1,85,0,0 +25875,230.237912509593,4,2,1,95,1,1 +25875,-66.6666666666667,4,2,1,95,0,1 +26335,231.884057971014,4,2,1,95,1,1 +27263,227.703984819734,4,2,1,95,1,1 +27718,232.78370514064,4,2,1,95,1,1 +28183,229.007633587786,4,2,1,95,1,1 +29099,232.78370514064,4,2,1,95,1,1 +29564,230.769230769231,4,2,1,95,1,1 +30025,233.463035019455,4,2,1,95,1,1 +30491,370.942812982998,4,2,1,80,1,0 +30491,-200,4,2,1,80,0,0 +31232,411.663807890222,4,2,1,75,1,0 +31437,542.955742946495,4,2,1,75,1,0 +31979,523.818919291727,4,2,1,70,1,0 +31979,-80,4,2,1,70,0,0 +32371,363.003007889696,4,2,1,70,1,0 +32734,382.860606834062,4,2,1,70,1,0 +33116,393.44262295082,4,2,1,70,1,0 +33116,-133.333333333333,4,2,1,70,0,0 +33509,-66.6666666666667,4,2,1,70,0,0 +33902,-100,4,2,1,70,0,0 +34296,388.075831597703,4,2,1,70,1,0 +35072,406.608747509521,4,2,1,70,1,0 +35072,-66.6666666666667,4,2,1,70,0,0 +35478,-100,4,2,1,70,0,0 +36698,415.420405450316,4,2,1,70,1,0 +36698,-66.6666666666667,4,2,1,70,0,0 +37528,421.174520963119,4,2,1,70,1,0 +37528,-200,4,2,1,70,0,0 +38370,430.457755951975,4,2,1,60,1,0 +39230,440.111571129336,4,2,1,60,1,0 +40110,-133.333333333333,4,2,1,60,0,0 +40990,453.091485341997,4,2,1,60,1,0 +40990,-200,4,2,1,60,0,0 +41896,469.781316797031,4,2,1,60,1,0 +41896,-200,4,2,1,60,0,0 +43775,485.563233928828,4,2,1,60,1,0 +43775,-200,4,2,1,60,0,0 +44746,521.431531173263,4,2,1,60,1,0 +44746,-400,4,2,1,60,0,0 +45267,446.240048289123,4,2,1,60,1,0 +45267,-400,4,2,1,60,0,0 +45713,446.240048289123,4,2,1,30,1,0 +45713,-400,4,2,1,30,0,0 +51514,-400,4,2,1,67,0,0 + + +[Colours] +Combo1 : 146,57,168 +Combo2 : 23,23,255 +Combo3 : 188,58,220 +Combo4 : 98,98,255 + +[HitObjects] +175,228,882,5,8,2:3:0:0: +175,228,1182,5,8,2:3:0:0: +55,63,1332,1,0,3:0:0:0: +249,126,1482,1,8,2:3:0:0: +55,189,1632,1,0,3:0:0:0: +174,24,1782,6,0,P|224:8|275:19,1,105.000004005432,8|0,2:3|3:0,0:0:0:0: +340,85,2082,2,0,P|390:95|440:80,1,105.000004005432,8|0,2:3|3:0,0:0:0:0: +512,0,2382,5,8,2:3:0:0: +458,231,2532,1,0,3:0:0:0: +331,72,2682,5,8,2:3:0:0: +385,303,2832,1,0,3:0:0:0: +267,14,2982,5,8,2:3:0:0: +213,245,3132,1,0,3:0:0:0: +86,86,3282,5,8,2:3:0:0: +140,317,3432,1,0,3:0:0:0: +0,116,3582,6,0,B|123:92|75:204|225:159,1,210.000008010865,8|0,2:3|3:0,0:0:0:0: +319,91,4032,1,8,2:3:0:0: +261,232,4182,1,0,3:0:0:0: +216,43,4332,1,0,3:0:0:0: +347,305,4482,6,0,B|334:204|334:204|329:197|329:197|310:58,1,210.000008010865,8|0,2:3|3:0,0:0:0:0: +402,2,4932,1,8,2:3:0:0: +230,130,5082,1,0,3:0:0:0: +444,116,5232,1,0,3:0:0:0: +283,14,5382,6,0,P|259:26|243:46,2,52.5000020027161,8|8|8,2:3|2:3|2:3,0:0:0:0: +287,200,5682,2,0,P|311:188|327:168,2,52.5000020027161,0|0|0,3:0|3:0|3:0,0:0:0:0: +512,0,5982,5,8,2:3:0:0: +479,196,6132,1,0,3:0:0:0: +421,22,6282,1,8,2:3:0:0: +488,214,6432,1,0,3:0:0:0: +348,60,6582,6,0,P|297:51|248:69,1,105.000004005432,8|0,2:3|3:0,0:0:0:0: +199,140,6882,2,0,P|150:158|99:149,1,105.000004005432,8|0,2:3|3:0,0:0:0:0: +0,0,7182,5,8,2:3:0:0: +56,229,7332,1,0,3:0:0:0: +175,43,7482,5,8,2:3:0:0: +119,272,7632,1,0,3:0:0:0: +252,0,7782,5,8,2:3:0:0: +308,229,7932,1,0,3:0:0:0: +427,43,8082,5,8,2:3:0:0: +371,272,8232,1,0,3:0:0:0: +347,0,8382,5,8,2:3:0:0: +494,357,8532,1,0,3:0:0:0: +494,357,8832,5,8,2:3:0:0: +141,187,8982,1,0,3:0:0:0: +141,187,9282,5,8,2:3:0:0: +460,85,9432,1,0,3:0:0:0: +460,85,9732,5,8,2:3:0:0: +207,365,9882,1,0,3:0:0:0: +207,365,10182,6,0,L|198:326,14,35,8|8|8|8|8|8|8|8|8|8|10|8|8|8|8,2:3|2:3|2:3|2:3|2:3|2:3|2:3|2:3|2:3|2:3|2:2|2:3|2:3|2:3|2:3,0:0:0:0: +51,185,11099,6,0,P|101:175|149:196,1,105.000004005432,6|0,3:2|0:0,0:0:0:0: +391,362,11331,2,0,P|341:349|306:310,1,105.000004005432,10|0,2:2|3:0,0:0:0:0: +177,111,11563,5,2,2:2:0:0: +483,169,11679,1,0,3:0:0:0: +165,192,11795,1,10,2:2:0:0: +471,250,11911,1,0,3:0:0:0: +220,36,12027,2,0,P|252:76|261:127,1,105.000004005432,2|0,2:2|0:0,0:0:0:0: +25,362,12259,5,8,2:3:0:0: +106,31,12375,1,8,2:3:0:0: +177,359,12491,5,8,2:3:0:0: +19,1,12607,1,8,2:3:0:0: +100,296,12723,5,10,2:2:0:0: +186,2,12839,1,0,3:0:0:0: +24,246,12955,6,0,P|61:210|112:206,1,105.000004005432,2|0,3:2|0:0,0:0:0:0: +282,383,13188,2,0,P|231:378|194:342,1,105.000004005432,8|0,2:3|3:0,0:0:0:0: +251,97,13420,5,2,2:2:0:0: +302,293,13536,1,0,3:0:0:0: +440,65,13652,6,0,P|389:58|315:47,1,105.000004005432,10|0,2:2|3:0,0:0:0:0: +134,215,13884,2,0,P|185:208|259:197,1,105.000004005432,2|0,3:2|0:0,0:0:0:0: +478,353,14112,5,8,2:3:0:0: +426,48,14226,1,0,3:0:0:0: +294,309,14341,5,10,2:2:0:0: +346,4,14455,1,0,3:0:0:0: +409,384,14569,5,10,2:2:0:0: +354,85,14683,1,0,3:0:0:0: +490,253,14798,6,0,P|447:277|367:262,1,105.000004005432,2|0,3:2|0:0,0:0:0:0: +278,123,15027,1,8,2:3:0:0: +177,307,15142,6,0,P|184:256|192:204,1,105.000004005432,2|0,3:2|0:0,0:0:0:0: +167,40,15371,1,0,3:0:0:0: +32,259,15486,2,0,P|25:310|18:363,1,105.000004005432,10|0,2:2|3:0,0:0:0:0: +0,115,15716,2,0,P|50:104|92:133,1,105.000004005432,2|0,3:2|0:0,0:0:0:0: +388,372,15948,5,8,2:3:0:0: +115,215,16064,5,8,2:3:0:0: +382,259,16180,1,10,2:2:0:0: +116,314,16296,5,8,2:3:0:0: +391,244,16412,1,8,2:3:0:0: +105,122,16528,1,8,2:3:0:0: +214,384,16645,6,0,P|260:362|278:314,1,105.000004005432,10|0,2:2|0:0,0:0:0:0: +284,108,16876,1,8,2:3:0:0: +193,292,16992,1,0,3:0:0:0: +400,130,17108,6,0,P|401:78|374:34,1,105.000004005432,2|0,2:2|3:0,0:0:0:0: +109,2,17339,2,0,P|81:45|82:96,1,105.000004005432,8|0,2:3|3:0,0:0:0:0: +295,218,17571,5,10,2:2:0:0: +142,166,17685,1,0,3:0:0:0: +280,137,17799,5,8,2:3:0:0: +157,246,17914,1,0,3:0:0:0: +265,39,18028,5,10,2:2:0:0: +213,332,18143,1,0,3:0:0:0: +185,48,18257,5,8,2:3:0:0: +133,341,18371,1,0,3:0:0:0: +19,85,18486,6,0,B|40:80|40:80|77:89|151:100,1,105.000004005432,4|0,3:3|0:0,0:0:0:0: +189,226,18718,1,8,2:3:0:0: +265,0,18834,2,0,P|258:51|247:125,1,105.000004005432,2|0,3:2|0:0,0:0:0:0: +174,208,19067,1,0,3:0:0:0: +364,197,19183,2,0,P|416:190|468:183,1,105.000004005432,10|0,2:2|3:0,0:0:0:0: +512,7,19416,6,0,P|472:40|457:90,1,105.000004005432,2|0,3:2|0:0,0:0:0:0: +407,293,19645,1,8,2:3:0:0: +337,79,19760,1,8,2:3:0:0: +265,263,19875,6,0,P|276:312|313:349,1,105.000004005432,0|0,3:0|0:0,0:0:0:0: +483,193,20105,2,0,P|470:142|434:106,1,105.000004005432,10|0,2:2|3:0,0:0:0:0: +152,240,20335,5,2,3:2:0:0: +347,169,20450,1,0,0:0:0:0: +145,233,20565,5,10,2:2:0:0: +445,302,20680,1,0,3:0:0:0: +137,225,20795,2,0,P|188:232|262:243,1,105.000004005432,2|0,2:2|3:0,0:0:0:0: +350,93,21025,1,10,2:2:0:0: +68,360,21140,6,0,B|80:284|80:284|47:247|47:247|61:156,1,210.000008010865,2|0,3:2|0:0,0:0:0:0: +8,67,21484,5,10,2:2:0:0: +88,358,21599,1,8,2:3:0:0: +197,18,21714,6,0,P|190:70|183:122,1,105.000004005432,2|0,3:2|0:0,0:0:0:0: +32,292,21944,1,8,2:3:0:0: +250,179,22059,1,0,3:0:0:0: +17,48,22174,6,0,P|24:100|31:152,1,105.000004005432,2|0,3:2|0:0,0:0:0:0: +209,308,22405,1,10,2:2:0:0: +172,108,22521,2,0,P|165:160|158:212,1,105.000004005432,0|2,3:0|0:2,0:0:0:0: +109,353,22753,1,0,3:0:0:0: +290,257,22868,6,0,P|342:250|394:243,1,105.000004005432,10|0,2:2|3:0,0:0:0:0: +155,97,23100,2,0,P|103:90|51:83,1,105.000004005432,2|0,3:2|0:0,0:0:0:0: +218,325,23332,5,10,2:2:0:0: +282,54,23448,1,0,3:0:0:0: +350,325,23563,5,10,2:2:0:0: +215,0,23679,1,0,3:0:0:0: +279,271,23795,5,10,2:2:0:0: +347,0,23911,1,0,3:0:0:0: +205,315,24027,6,0,P|153:322|101:329,1,105.000004005432,2|0,3:2|0:0,0:0:0:0: +360,148,24259,2,0,P|412:155|464:162,1,105.000004005432,8|0,2:3|3:0,0:0:0:0: +214,0,24492,5,2,0:2:0:0: +172,232,24609,1,0,3:0:0:0: +203,11,24725,2,0,P|196:63|189:115,1,105.000004005432,8|0,2:3|3:0,0:0:0:0: +72,382,24958,5,2,3:2:0:0: +190,220,25072,1,0,3:0:0:0: +0,281,25186,1,8,2:3:0:0: +190,343,25301,1,0,3:0:0:0: +72,181,25416,6,0,P|79:129|86:77,1,105.000004005432,2|0,3:2|3:0,0:0:0:0: +296,0,25645,2,0,P|289:52|282:104,1,105.000004005432,8|8,2:3|2:3,0:0:0:0: +348,333,25875,5,10,2:2:0:0: +379,28,25990,1,0,3:0:0:0: +416,383,26105,1,0,3:0:0:0: +311,79,26220,1,0,3:0:0:0: +279,383,26335,1,10,2:2:0:0: +448,79,26450,1,0,3:0:0:0: +349,319,26566,1,0,3:0:0:0: +380,15,26682,1,0,3:0:0:0: +164,333,26798,5,10,2:2:0:0: +133,28,26914,1,0,3:0:0:0: +96,383,27030,1,0,3:0:0:0: +201,79,27146,1,0,3:0:0:0: +233,383,27263,1,10,2:2:0:0: +64,79,27376,1,0,3:0:0:0: +163,319,27490,1,0,3:0:0:0: +132,15,27604,1,0,3:0:0:0: +5,343,27718,5,10,2:2:0:0: +345,256,27834,1,0,3:0:0:0: +0,211,27950,1,0,3:0:0:0: +281,369,28067,1,0,3:0:0:0: +57,274,28183,1,10,2:2:0:0: +337,245,28297,1,0,3:0:0:0: +68,159,28412,1,0,3:0:0:0: +275,355,28526,1,0,3:0:0:0: +90,15,28641,5,10,2:2:0:0: +147,309,28755,1,0,3:0:0:0: +252,85,28870,1,0,3:0:0:0: +195,379,28984,1,0,3:0:0:0: +176,3,29099,1,10,2:2:0:0: +233,297,29215,1,0,3:0:0:0: +338,73,29331,1,0,3:0:0:0: +281,367,29448,1,0,3:0:0:0: +492,134,29564,5,10,2:2:0:0: +140,262,29679,1,0,3:0:0:0: +492,262,29794,1,0,3:0:0:0: +140,134,29910,1,0,3:0:0:0: +467,143,30025,1,10,2:2:0:0: +162,254,30141,1,0,3:0:0:0: +467,254,30258,1,0,3:0:0:0: +162,143,30375,1,0,3:0:0:0: +445,150,30491,6,0,P|410:154|376:162,1,70,10|0,2:2|0:0,0:0:0:0: +280,188,31232,1,8,2:3:0:0: +268,174,31437,2,0,L|256:243,1,70,10|0,2:2|0:0,0:0:0:0: +173,384,31979,6,0,L|186:297,1,87.5,4|0,3:3|0:0,0:0:0:0: +146,224,32371,2,0,P|115:242|99:272,1,70,10|0,2:2|0:0,0:0:0:0: +17,378,32734,2,0,L|31:291,1,70,2|0,3:0|0:0,0:0:0:0: +18,192,33116,6,0,P|42:204|68:204,1,52.5000020027161,2|0,3:2|0:0,0:0:0:0: +173,144,33509,2,0,P|127:122|75:122,1,105.000004005432,4|0,3:3|0:0,0:0:0:0: +171,56,33902,6,0,L|183:126,1,70,2|0,0:2|0:0,0:0:0:0: +294,215,34296,2,0,L|283:146,1,70,10|0,2:2|0:0,0:0:0:0: +366,87,34684,2,0,L|378:157,1,70,2|0,3:2|0:0,0:0:0:0: +507,355,35072,6,0,P|456:358|410:332,1,105.000004005432,12|0,3:3|0:0,0:0:0:0: +353,251,35478,2,0,P|319:250|289:267,1,70,2|0,3:2|0:0,0:0:0:0: +230,323,35885,2,0,P|196:325|166:308,1,70,10|0,2:2|0:0,0:0:0:0: +114,250,36291,2,0,P|80:249|50:266,1,70,2|0,3:2|0:0,0:0:0:0: +222,306,36698,6,0,L|206:203,1,105.000004005432,4|0,3:3|0:0,0:0:0:0: +249,45,37113,2,0,L|266:149,1,105.000004005432,10|0,2:2|0:0,0:0:0:0: +337,192,37528,6,0,P|362:192|384:183,1,35,2|0,3:2|0:0,0:0:0:0: +445,215,37949,2,0,P|452:191|449:168,1,35,2|0,3:2|0:0,0:0:0:0: +477,63,38370,6,0,L|408:75,1,70,12|0,3:3|0:0,0:0:0:0: +348,25,38800,2,0,L|279:14,1,70,2|0,0:2|0:0,0:0:0:0: +113,48,39230,6,0,L|182:59,1,70,0|0,3:0|0:0,0:0:0:0: +40,119,39670,2,0,L|110:131,1,70,2|0,0:2|0:0,0:0:0:0: +174,197,40110,6,0,L|123:206,1,52.5000020027161,2|0,3:2|0:0,0:0:0:0: +235,269,40550,2,0,L|184:278,1,52.5000020027161,2|0,0:2|0:0,0:0:0:0: +98,319,40990,6,0,L|104:285,1,35,2|0,3:2|0:0,0:0:0:0: +33,264,41443,2,0,L|39:230,1,35,2|0,0:2|0:0,0:0:0:0: +118,122,41896,6,0,L|153:128,1,35,2|0,3:2|0:0,0:0:0:0: +199,192,42365,2,0,L|234:187,1,35,2|0,0:2|0:0,0:0:0:0: +287,137,42835,2,0,L|322:143,1,35,2|0,3:2|0:0,0:0:0:0: +368,196,43305,2,0,L|403:191,1,35,2|0,0:2|0:0,0:0:0:0: +506,144,43775,6,0,L|501:179,1,35,2|0,3:2|0:0,0:0:0:0: +457,241,44260,2,0,L|463:276,1,35,2|0,0:2|0:0,0:0:0:0: +507,363,44746,6,0,L|485:360,1,17.5,2|0,3:2|0:0,0:0:0:0: +478,351,45267,2,0,L|456:355,1,17.5,2|0,0:2|0:0,0:0:0:0: +453,360,45713,5,2,2:2:0:0: diff --git a/osu.Game.Rulesets.Osu/Difficulty/Skills/Reading.cs b/osu.Game.Rulesets.Osu/Difficulty/Skills/Reading.cs index 92f054573210..6cca13d0a770 100644 --- a/osu.Game.Rulesets.Osu/Difficulty/Skills/Reading.cs +++ b/osu.Game.Rulesets.Osu/Difficulty/Skills/Reading.cs @@ -2,9 +2,7 @@ // See the LICENCE file in the repository root for full licence text. using System; -using System.Collections.Generic; using System.Linq; -using osu.Framework.Utils; using osu.Game.Rulesets.Difficulty.Aggregation; using osu.Game.Rulesets.Difficulty.Preprocessing; using osu.Game.Rulesets.Difficulty.Skills; @@ -29,28 +27,33 @@ public Reading(Mod[] mods) private double currentStrain; - private double reducedNoteCount; - private double? reducedDuration; + private double? firstObjectStartTime; private double strainDecay(double ms) => DiffUtils.Pow(0.8, ms / 1000); protected override double ProcessInternal(DifficultyHitObject current) { const double skill_multiplier = 2.5; - const double reduced_difficulty_duration = 60 * 1000; + const double reduced_difficulty_duration = 40 * 1000; double decay = strainDecay(current.DeltaTime); - currentStrain *= decay; - currentStrain += calculateAdjustedDifficulty(current) * (1 - decay) * skill_multiplier; - // This currently operates under the assumption that `ObjectDifficultyOf` is called once per object, and in order. - // Under that assumption, we can trust that `current.StartTime` refers to the start time of the first object in the case that `reducedDuration` is yet to be set. - reducedDuration ??= current.StartTime + reduced_difficulty_duration; + // Under that assumption, we can trust that `current.StartTime` refers to the start time of the first object in the case that `firstObjectStartTime` is yet to be set. + firstObjectStartTime ??= current.StartTime; + + const double reduced_difficulty_base_line = 0.2; // Assume that even with full memorisation, skill is still required to read and play the first objects. - // This relies on the same assumption, as calling in order means that we can safely increase the note count until we reach the first object after the reduced duration. - if (current.StartTime <= reducedDuration) - reducedNoteCount++; + double currentObjectStrain = calculateAdjustedDifficulty(current) * (1 - decay) * skill_multiplier; + + if (current.StartTime <= firstObjectStartTime + reduced_difficulty_duration) + { + double scale = Math.Log10(double.Lerp(1, 10, Math.Clamp((current.StartTime - firstObjectStartTime.Value) / reduced_difficulty_duration, 0, 1))); + currentObjectStrain *= double.Lerp(reduced_difficulty_base_line, 1.0, scale); + } + + currentStrain *= decay; + currentStrain += currentObjectStrain; return currentStrain; } @@ -84,28 +87,11 @@ public override double DifficultyValue() if (ObjectDifficulties.Count == 0) return 0; - var difficulties = GetTransformedDifficulties(ObjectDifficulties); - - (double difficulty, harmonicWeightSum) = HarmonicSeries.Aggregate(difficulties); + (double difficulty, harmonicWeightSum) = HarmonicSeries.Aggregate(ObjectDifficulties); return difficulty; } - protected List GetTransformedDifficulties(List difficulties) - { - difficulties = difficulties.Where(v => v > 0).ToList(); - - const double reduced_difficulty_base_line = 0.0; // Assume the first seconds are completely memorised - - for (int i = 0; i < Math.Min(difficulties.Count, reducedNoteCount); i++) - { - double scale = Math.Log10(Interpolation.Lerp(1, 10, Math.Clamp(i / reducedNoteCount, 0, 1))); - difficulties[i] *= Interpolation.Lerp(reduced_difficulty_base_line, 1.0, scale); - } - - return difficulties; - } - public double CountTopWeightedObjectDifficulties(double difficultyValue) { if (ObjectDifficulties.Count == 0)