Fix events

This commit is contained in:
2026-01-05 23:41:22 +07:00
parent 65b2512d8c
commit 18fe95effc
5 changed files with 99 additions and 29 deletions

View File

@@ -268,6 +268,7 @@ export interface Assignment {
completed_at: string | null
drop_penalty: number
bonus_challenges?: BonusAssignment[] // For playthrough
event_type?: EventType // Event active when assignment was created
}
export interface SpinResult {
@@ -279,6 +280,7 @@ export interface SpinResult {
bonus_challenges?: Challenge[] // Available bonus challenges for playthrough
can_drop: boolean
drop_penalty: number
event_type?: EventType // Event active during spin
}
export interface CompleteResult {

View File

@@ -152,11 +152,12 @@ export function formatActivityMessage(activity: Activity): { title: string; deta
const points = data.points ? `+${data.points}` : ''
const streak = data.streak && (data.streak as number) > 1 ? `серия ${data.streak}` : ''
const bonus = data.common_enemy_bonus ? `+${data.common_enemy_bonus} бонус` : ''
const eventBonus = data.event_bonus ? `(+${data.event_bonus} ${EVENT_NAMES[data.event_type as EventType] || 'бонус'})` : ''
return {
title: `завершил ${points}`,
details: challenge || undefined,
extra: [game, streak, bonus].filter(Boolean).join(' • ') || undefined,
extra: [game, streak, bonus, eventBonus].filter(Boolean).join(' • ') || undefined,
}
}