[Eva] /check: новые триггеры достижений
This commit is contained in:
+11
-3
@@ -254,12 +254,20 @@ async def check_quiz_answer(request: Request):
|
|||||||
("quiz_guessed", total_guessed),
|
("quiz_guessed", total_guessed),
|
||||||
("total_score", xp_result["total_xp"]),
|
("total_score", xp_result["total_xp"]),
|
||||||
]
|
]
|
||||||
if current_streak >= 10:
|
if current_streak >= 5:
|
||||||
achievements_to_check.append(("quiz_perfect_streak", current_streak))
|
achievements_to_check.append(("quiz_correct_streak", current_streak))
|
||||||
|
if no_mistakes_streak > 0:
|
||||||
|
achievements_to_check.append(("quiz_no_mistakes_streak", no_mistakes_streak))
|
||||||
if mistakes == 0:
|
if mistakes == 0:
|
||||||
achievements_to_check.append(("quiz_no_mistakes", 1))
|
achievements_to_check.append(("quiz_no_mistakes", 1))
|
||||||
|
if completion_time is not None and 0 < completion_time <= 5:
|
||||||
|
achievements_to_check.append(("quiz_speed_5", 5))
|
||||||
if completion_time is not None and 0 < completion_time <= 3:
|
if completion_time is not None and 0 < completion_time <= 3:
|
||||||
achievements_to_check.append(("quiz_speed", 3))
|
achievements_to_check.append(("quiz_speed_3", 3))
|
||||||
|
if completion_time is not None and 0 < completion_time <= 2:
|
||||||
|
achievements_to_check.append(("quiz_speed_2", 2))
|
||||||
|
if completion_time is not None and 0 < completion_time <= 1:
|
||||||
|
achievements_to_check.append(("quiz_speed_1", 1))
|
||||||
else:
|
else:
|
||||||
# При 3 ошибках — утешительный XP (10)
|
# При 3 ошибках — утешительный XP (10)
|
||||||
if mistakes >= 3:
|
if mistakes >= 3:
|
||||||
|
|||||||
Reference in New Issue
Block a user