protected override double StrainValueOf(DifficultyHitObject current) { double addition = 1; // We get an extra addition if we are not a slider or spinner if (current.LastObject is Hit && current.BaseObject is Hit && current.DeltaTime < 1000) { if (hasColourChange(current)) { addition += 0.75; } if (hasRhythmChange(current)) { addition += 1; } } else { lastColourSwitch = ColourSwitch.None; sameColourCount = 1; } double additionFactor = 1; // Scale the addition factor linearly from 0.4 to 1 for DeltaTime from 0 to 50 if (current.DeltaTime < 50) { additionFactor = 0.4 + 0.6 * current.DeltaTime / 50; } return(additionFactor * addition); }
protected override double StrainValueOf(HitObject current) { double addition = 1; deltaTimes.Add(current, current.time - lastObject().time); // We get an extra addition if we are not a slider or spinner if (/*isHit(lastObject()) && isHit(current) && */ getDeltaTime(current) < 1000) { if (hasColourChange(lastObject(), current)) { addition += 0.75; } if (hasRhythmChange(lastObject(), current)) { addition += 1; } } else { lastColourSwitch = ColourSwitch.None; sameColourCount = 1; } double additionFactor = 1; // Scale the addition factor linearly from 0.4 to 1 for DeltaTime from 0 to 50 if (getDeltaTime(current) < 50) { additionFactor = 0.4 + 0.6 * getDeltaTime(current) / 50; } return(additionFactor * addition); }
private bool hasColourChange(HitObject lastObject, HitObject current) { if (isKat(lastObject) == isKat(current)) { sameColourCount++; return(false); } var oldColourSwitch = lastColourSwitch; var newColourSwitch = sameColourCount % 2 == 0 ? ColourSwitch.Even : ColourSwitch.Odd; lastColourSwitch = newColourSwitch; sameColourCount = 1; // We only want a bonus if the parity of the color switch changes return(oldColourSwitch != ColourSwitch.None && oldColourSwitch != newColourSwitch); }
private bool hasColourChange(DifficultyHitObject current) { var taikoCurrent = (TaikoDifficultyHitObject)current; if (!taikoCurrent.HasTypeChange) { sameColourCount++; return(false); } var oldColourSwitch = lastColourSwitch; var newColourSwitch = sameColourCount % 2 == 0 ? ColourSwitch.Even : ColourSwitch.Odd; lastColourSwitch = newColourSwitch; sameColourCount = 1; // We only want a bonus if the parity of the color switch changes return(oldColourSwitch != ColourSwitch.None && oldColourSwitch != newColourSwitch); }