mirror of
https://github.com/MewoLab/AquaDX.git
synced 2026-02-07 23:07:38 +08:00
[F] Fix all perfect count
This commit is contained in:
@@ -60,6 +60,7 @@ interface IGenericGamePlaylog {
|
|||||||
val isFullCombo: Boolean
|
val isFullCombo: Boolean
|
||||||
val beforeRating: Int
|
val beforeRating: Int
|
||||||
val afterRating: Int
|
val afterRating: Int
|
||||||
|
val isAllPerfect: Boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
interface GenericPlaylogRepo {
|
interface GenericPlaylogRepo {
|
||||||
@@ -95,7 +96,7 @@ fun genericUserSummary(
|
|||||||
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.isFullCombo },
|
fullCombo = plays.count { it.isFullCombo },
|
||||||
allPerfect = plays.count { it.achievement == 1010000 },
|
allPerfect = plays.count { it.isAllPerfect },
|
||||||
totalScore = user.totalScore,
|
totalScore = user.totalScore,
|
||||||
plays = plays.size,
|
plays = plays.size,
|
||||||
totalPlayTime = plays.count() * 3L, // TODO: Give a better estimate
|
totalPlayTime = plays.count() * 3L, // TODO: Give a better estimate
|
||||||
@@ -121,7 +122,7 @@ fun genericRanking(
|
|||||||
name = user.userName,
|
name = user.userName,
|
||||||
accuracy = plays.sumOf { it.achievement }.toDouble() / plays.size / 10000.0,
|
accuracy = plays.sumOf { it.achievement }.toDouble() / plays.size / 10000.0,
|
||||||
rating = user.playerRating,
|
rating = user.playerRating,
|
||||||
allPerfect = plays.count { it.achievement == 1010000 },
|
allPerfect = plays.count { it.isAllPerfect },
|
||||||
fullCombo = plays.count { it.isFullCombo },
|
fullCombo = plays.count { it.isFullCombo },
|
||||||
lastSeen = user.lastPlayDate.toString()
|
lastSeen = user.lastPlayDate.toString()
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -166,4 +166,9 @@ public class UserPlaylog implements Serializable, IGenericGamePlaylog {
|
|||||||
public int getBeforeRating() {
|
public int getBeforeRating() {
|
||||||
return playerRating; // TODO: Get before rating
|
return playerRating; // TODO: Get before rating
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isAllPerfect() {
|
||||||
|
return isAllJustice;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -269,4 +269,13 @@ public class UserPlaylog implements Serializable, IGenericGamePlaylog {
|
|||||||
public boolean isFullCombo() {
|
public boolean isFullCombo() {
|
||||||
return maxCombo == totalCombo;
|
return maxCombo == totalCombo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isAllPerfect() {
|
||||||
|
return tapMiss + tapGood + tapGreat == 0
|
||||||
|
&& holdMiss + holdGood + holdGreat == 0
|
||||||
|
&& slideMiss + slideGood + slideGreat == 0
|
||||||
|
&& touchMiss + touchGood + touchGreat == 0
|
||||||
|
&& breakMiss + breakGood + breakGreat == 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -174,4 +174,9 @@ public class UserPlaylog implements Serializable, IGenericGamePlaylog {
|
|||||||
public int getBeforeRating() {
|
public int getBeforeRating() {
|
||||||
return playerRating; // TODO: Get before rating
|
return playerRating; // TODO: Get before rating
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isAllPerfect() {
|
||||||
|
return isAllBreak;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user