[F] Fix full combo count

pull/16/head
Azalea 2024-02-27 22:46:49 -05:00
parent d149b02c06
commit 763cbfa656
4 changed files with 9 additions and 12 deletions

View File

@ -56,7 +56,7 @@ interface IGenericGamePlaylog {
val date: Any
val achievement: Int
val maxCombo: Int
val totalCombo: Int
val isFullCombo: Boolean
val beforeRating: Int
val afterRating: Int
}
@ -93,7 +93,7 @@ fun genericUserSummary(
ratingHighest = user.highestRating,
ranks = ranks.map { (k, v) -> RankCount(k, v) },
maxCombo = plays.maxOf { it.maxCombo },
fullCombo = plays.count { it.totalCombo == it.maxCombo },
fullCombo = plays.count { it.isFullCombo },
allPerfect = plays.count { it.achievement == 1010000 },
totalScore = user.totalScore,
plays = plays.size,

View File

@ -157,11 +157,6 @@ public class UserPlaylog implements Serializable, IGenericGamePlaylog {
return score;
}
@Override
public int getTotalCombo() {
return maxCombo;
}
@Override
public int getAfterRating() {
return playerRating;

View File

@ -128,8 +128,10 @@ public class UserPlaylog implements Serializable, IGenericGamePlaylog {
private int scoreRank;
// Maximum continuous combo that the player achieved in this play.
private int maxCombo;
// Maximum achievable combo in the song.
private int totalCombo;
private int maxSync;
@ -268,4 +270,9 @@ public class UserPlaylog implements Serializable, IGenericGamePlaylog {
public Object getDate() {
return playDate;
}
@Override
public boolean isFullCombo() {
return maxCombo == totalCombo;
}
}

View File

@ -171,11 +171,6 @@ public class UserPlaylog implements Serializable, IGenericGamePlaylog {
return techScore;
}
@Override
public int getTotalCombo() {
return maxCombo;
}
@Override
public int getAfterRating() {
return playerRating;