[Eva] Ева, прочитай .gitignore #33
+3
-5
@@ -209,18 +209,16 @@ async def award_xp(
|
||||
}
|
||||
"""
|
||||
# 1. Валидация
|
||||
stars = max(MIN_STARS, min(MAX_STARS, int(stars)))
|
||||
if game not in GAME_XP_COEF:
|
||||
raise ValueError(f"Unknown game: {game}")
|
||||
|
||||
# 2. База
|
||||
base = stars * POINTS_PER_STAR
|
||||
base = int(round(base * GAME_XP_COEF.get(game, 1.0)))
|
||||
# 2. База с коэффициентом игры (для баланса)
|
||||
base_points = int(round(points * GAME_XP_COEF.get(game, 1.0)))
|
||||
|
||||
# 3. Множитель игры дня
|
||||
is_featured = (game == featured_game())
|
||||
multiplier = FEATURED_MULTIPLIER if is_featured else 1.0
|
||||
points = int(round(base * multiplier))
|
||||
final_points = int(round(base_points * multiplier))
|
||||
|
||||
# 4. Читаем текущий total_xp
|
||||
row = await conn.fetchrow(
|
||||
|
||||
Reference in New Issue
Block a user