修改剩余时间的计算方式

This commit is contained in:
zhl 2021-05-13 19:42:12 +08:00
parent f29bcf5e00
commit 84b7e7ee16

View File

@ -201,7 +201,7 @@ export function checkSingleFinish(history: any, accountId: string): number {
*/
export function calcSingleScore(history: any, accountId: string) {
let cfgLevel = fetchLevelCfg(history.level)
let time = (Date.now() - history.createdAt.getTime()) / 1000
let time = cfgLevel.time - (Date.now() - history.createdAt.getTime()) / 1000
let stat = history.members.get(accountId)
let combo = stat.maxCombo
let hp = cfgLevel.hp - stat.errorCount