🐛 修复ysa未知制图问题

This commit is contained in:
CMHopeSunshine 2022-09-08 18:06:23 +08:00
parent 198ee3a71f
commit 4e6666fd01

View File

@ -39,8 +39,8 @@ def sort_characters(characters: List[Character]) -> List[Character]:
武器等级每级0.6/0.6/0.6/0.8/1精炼等级每级10/10/10/20/40
圣遗物每级0.5/0.8/1每个两件套20分四件套60分最后按降序排序
"""
characters = [chara for chara in characters if chara is not None]
for chara in characters:
try:
chara.score = chara.level * (0.8 if chara.rarity == 4 else 1) + chara.fetter * 3
if chara.talents:
for talent in chara.talents:
@ -59,9 +59,6 @@ def sort_characters(characters: List[Character]) -> List[Character]:
chara.score += artifact.level * (0.5 if artifact.rarity <= 3 else 0.8 if artifact.rarity == 4 else 1)
else:
chara.suit = []
except Exception:
chara.score = 0
chara.suit = []
return sorted(characters, key=lambda x: x.score, reverse=True)