Skip to content

Commit

Permalink
Fix MaxCombo difficulty attribute being wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
LumpBloom7 committed Oct 2, 2020
1 parent 168d366 commit de00a61
Showing 1 changed file with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,20 @@ public SentakkiDifficultyCalculator(Ruleset ruleset, WorkingBeatmap beatmap) : b
protected override DifficultyAttributes CreateDifficultyAttributes(IBeatmap beatmap, Mod[] mods, Skill[] skills, double clockRate)
{
int maxCombo = 0;
foreach (var h in beatmap.HitObjects)
foreach (SentakkiHitObject h in beatmap.HitObjects)
{
if (h is Slide s)
maxCombo += 1 + s.SlideInfoList.Count;
else
++maxCombo;
switch (h)
{
case Slide slide:
maxCombo += 1 + slide.SlideInfoList.Count + (slide.IsBreak ? 4 : 0);
break;
case Hold hold:
maxCombo += 2 + (hold.IsBreak ? 8 : 0);
break;
default:
maxCombo += 1 + (h.IsBreak ? 4 : 0);
break;
}
}

return new DifficultyAttributes
Expand Down

0 comments on commit de00a61

Please sign in to comment.