Skip to content

Commit

Permalink
Merge pull request #6 from kanaarima/main
Browse files Browse the repository at this point in the history
  • Loading branch information
Lekuruu authored Dec 13, 2023
2 parents ac5c54b + 6c21da8 commit cbb3743
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions helpers/score.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,24 @@ def calculate_rx_score(score: DBScore, beatmap: DBBeatmap) -> int:
score.n50 +
score.nMiss
)

original_score = (
(score.n300 * 300) +
(score.n100 * 100) +
(score.n50 * 50)
)

if total_hits <= 0:
return 0

# Account for slider ticks inflating score
slider_factor = beatmap.max_combo / total_hits

avg_hit = (
(300 * (score.n300 / total_hits)) +
(100 * (score.n100 / total_hits)) +
(50 * (score.n50 / total_hits))
)
) / slider_factor

mod_multiplier = calculate_mod_multiplier(Mods(score.mods))
difficulty_multiplier = calculate_difficulty_multiplier(beatmap, total_hits)
Expand All @@ -66,6 +75,6 @@ def calculate_rx_score(score: DBScore, beatmap: DBBeatmap) -> int:
for combo in range(1, score.max_combo)
]

final_score = sum(combo_multipliers)
final_score = original_score + sum(combo_multipliers)

return round(final_score)

0 comments on commit cbb3743

Please sign in to comment.