Skip to content

Commit

Permalink
Adding length bonus based on factor for taiko
Browse files Browse the repository at this point in the history
  • Loading branch information
TheDark98 committed Jan 11, 2025
1 parent 5f163be commit e8c6cb1
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,18 @@ protected override PerformanceAttributes CreatePerformanceAttributes(ScoreInfo s
};
}

//private const double bonus_length_stamina_multiplier = 0.142857143;
private const double bonus_length_stamina_multiplier = 0.125;
private const double bonus_length_rhythm_multiplier = 0.5;

private double computeDifficultyValue(ScoreInfo score, TaikoDifficultyAttributes attributes)
{
double baseDifficulty = 5 * Math.Max(1.0, attributes.StarRating / 0.115) - 4.0;
double difficultyValue = Math.Min(Math.Pow(baseDifficulty, 3) / 69052.51, Math.Pow(baseDifficulty, 2.25) / 1150.0);

double staminaFactor = attributes.StaminaDifficultyFactor;

double lengthBonus = 1 + 0.1 * Math.Min(1.0, totalHits / 1500.0);
double lengthBonus = 1 + staminaFactor * bonus_length_stamina_multiplier * Math.Min(1.0, totalHits / 1500.0);
difficultyValue *= lengthBonus;

difficultyValue *= Math.Pow(0.986, effectiveMissCount);
Expand Down Expand Up @@ -111,7 +115,7 @@ private double computeAccuracyValue(ScoreInfo score, TaikoDifficultyAttributes a

double accuracyValue = Math.Pow(70 / estimatedUnstableRate.Value, 1.1) * Math.Pow(attributes.StarRating, 0.4) * 100.0;

double lengthBonus = Math.Min(1.15, Math.Pow(totalHits / 1500.0, 0.3));
double lengthBonus = Math.Min(1.15, Math.Pow(totalHits / 1500.0, rhythmFactor * bonus_length_rhythm_multiplier));

// Slight HDFL Bonus for accuracy. A clamp is used to prevent against negative values.
if (score.Mods.Any(m => m is ModFlashlight<TaikoHitObject>) && score.Mods.Any(m => m is ModHidden) && !isConvert)
Expand Down

0 comments on commit e8c6cb1

Please sign in to comment.