🐛 修正 max 数据

This commit is contained in:
2024-06-18 17:26:04 +08:00
parent 95aa5b0419
commit ae65b5140f
2 changed files with 8 additions and 2 deletions

View File

@@ -84,7 +84,10 @@ async def make_blitz_image(player: Player) -> bytes:
keys=endcontext.inputs,
kpp=round(endcontext.inputs / endcontext.piecesplaced, 2),
kps=round(endcontext.inputs / duration, 2),
max=Max(combo=endcontext.combo, btb=endcontext.btb),
max=Max(
combo=max((0, endcontext.combo - 1)),
btb=max((0, endcontext.btb - 1)),
),
pieces=endcontext.piecesplaced,
pps=metrics.pps,
lines=endcontext.lines,

View File

@@ -86,7 +86,10 @@ async def make_sprint_image(player: Player) -> bytes:
keys=endcontext.inputs,
kpp=round(endcontext.inputs / endcontext.piecesplaced, 2),
kps=round(endcontext.inputs / duration, 2),
max=Max(combo=endcontext.combo, btb=endcontext.btb),
max=Max(
combo=max((0, endcontext.combo - 1)),
btb=max((0, endcontext.btb - 1)),
),
pieces=endcontext.piecesplaced,
pps=metrics.pps,
lines=endcontext.lines,