[F] Fix full combo count

This commit is contained in:
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 date: Any
val achievement: Int val achievement: Int
val maxCombo: Int val maxCombo: Int
val totalCombo: Int val isFullCombo: Boolean
val beforeRating: Int val beforeRating: Int
val afterRating: Int val afterRating: Int
} }
@@ -93,7 +93,7 @@ fun genericUserSummary(
ratingHighest = user.highestRating, ratingHighest = user.highestRating,
ranks = ranks.map { (k, v) -> RankCount(k, v) }, ranks = ranks.map { (k, v) -> RankCount(k, v) },
maxCombo = plays.maxOf { it.maxCombo }, maxCombo = plays.maxOf { it.maxCombo },
fullCombo = plays.count { it.totalCombo == it.maxCombo }, fullCombo = plays.count { it.isFullCombo },
allPerfect = plays.count { it.achievement == 1010000 }, allPerfect = plays.count { it.achievement == 1010000 },
totalScore = user.totalScore, totalScore = user.totalScore,
plays = plays.size, plays = plays.size,

View File

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

View File

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

View File

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