Automated Task

结算挑战分

Type When entry is approved

Created 7/19/2024, 3:54:36 PM

Updated 7/25/2024, 7:31:29 AM

Description 针对选择了挑战 1-6、2-1、2-1-ex、2-7、2-7-ex、2-8、3-2、3-2-ex 中任意一个的作品进行解析并自动结算所选挑战获得的分数。

Code
1
using Microsoft.Extensions.Logging;
2
using Microsoft.Extensions.DependencyInjection;
3
using PhiZoneApi.Models;
4
using PhiZoneApi.Interfaces;
5
using System.Collections.Generic;
6
using System.Net.Http;
7
using System.Linq;
8
using System.IO;
9
using System;
10
using System.Globalization;
11
using PhiZoneApi.Dtos.ChartFormats;
12
using PhiZoneApi.Enums;
13
using PhiZoneApi.Utils;
14

15
Dictionary<string, string> tagDict = new()
16
{
17
    { "7PJ-0-2", "撞色:多人合作谱面。" },
18
    { "7PJ-0-3", "这是我最好的作品。" },
19
    { "7PJ-0-4", "我将获得前 20% 的评委分排名!" },
20
    { "7PJ-1-1", "主题-色彩:选择以色彩为主题的曲目。" },
21
    { "7PJ-1-2", "主题-极限:选择以极限为主题的曲目。" },
22
    { "7PJ-1-3", "主题-反驳:选择以反驳为主题的曲目。" },
23
    { "7PJ-1-4", "选择 2014 年或更早发行的曲目。" },
24
    { "7PJ-1-5", "选择 2024 年发行的曲目。" },
25
    { "7PJ-1-6", "选择自己创作的曲目。" },
26
    { "7PJ-1-7", "第二次机会:选择自己曾经制谱的曲目(必须公开发布过;不必须为 Phigros 自制)。" },
27
    { "7PJ-1-8", "你喜欢就好!选择自己喜欢的曲目。" },
28
    { "7PJ-2-1", "使用至多 8 根判定线。" },
29
    { "7PJ-2-1-ex", "使用至多 4 根判定线。" },
30
    { "7PJ-2-2", "制作一张单手游玩的谱面。" },
31
    { "7PJ-2-3", "画面中至多同时出现 8 个音符。" },
32
    { "7PJ-2-3-ex", "画面中至多同时出现 4 个音符。" },
33
    { "7PJ-2-4", "同一种 Note 至多连续判定 3 次。" },
34
    { "7PJ-2-5", "创作同一曲目的不同差分。" },
35
    { "7PJ-2-6", "创作一张完全对称的谱面。" },
36
    { "7PJ-2-7", "谱面中判定线要么完全透明,要么完全不透明。" },
37
    { "7PJ-2-7-ex", "谱面中不出现可见的判定线。" },
38
    { "7PJ-2-8", "谱面中 Flick 的数量大于曲目的秒数。" },
39
    { "7PJ-3-1", "第十戒律:选择一首曲目,制作至少两张谱面。玩家可以在不同设备上各运行一张谱面,并同时游玩。" },
40
    { "7PJ-3-2", "漫长的告别:谱面中至少出现两个这样的 Hold——从开始判定到结束判定,至少经过 8 秒,且期间有至少 20 个其他需要打击的 Tap 或 Hold 被完整判定。" },
41
    { "7PJ-3-2-ex", "漫长的告别 EX:从谱面的第一个音符开始,到最后音符结束,始终有至少一个 Hold处于判定中。" },
42
    { "7PJ-3-3", "神隐迷案:谱面中存在至少一个这样的段落——时长不小于 15 秒;画面中不能出现音符;判定不少于 20 个 Tap 或 Hold。" },
43
    { "7PJ-3-3-ex", "神隐迷案 EX:谱面中存在至少 100 个这样的 Tap 或 Hold——需要打击;在判定的前后各 1s 内,画面中不出现任何音符。" }
44
};
45
var t = (EventResource)Target;
46
var httpClient = new HttpClient();
47
const int reviewerCount = 20;
48
await using (var scope = ServiceProvider.CreateAsyncScope())
49
{
50
    var resourceService = scope.ServiceProvider.GetRequiredService<IResourceService>();
51
    var tagRepository = scope.ServiceProvider.GetRequiredService<ITagRepository>();
52
    var chartRepository = scope.ServiceProvider.GetRequiredService<IChartRepository>();
53
    var chartService = scope.ServiceProvider.GetRequiredService<IChartService>();
54
    var eventResourceRepository = scope.ServiceProvider.GetRequiredService<IEventResourceRepository>();
55
    var eventTeamRepository = scope.ServiceProvider.GetRequiredService<IEventTeamRepository>();
56

57
    var target = await eventResourceRepository.GetEventResourceAsync(t.DivisionId, t.ResourceId);
58
    var eventTeam = await eventTeamRepository.GetEventTeamAsync(target.TeamId!.Value);
59
    var tags = await tagRepository.GetTagsAsync(predicate: e =>
60
        tagDict.Select(tag => resourceService.Normalize(tag.Key)).Contains(e.NormalizedName));
61
    var chart = await chartRepository.GetChartAsync(target.ResourceId);
62
    using (var response = await httpClient.GetAsync(chart.File))
63
    {
64
        response.EnsureSuccessStatusCode();
65
        await using (var stream = await response.Content.ReadAsStreamAsync())
66
        using (var reader = new StreamReader(stream))
67
        {
68
            var result = chartService.Validate(await reader.ReadToEndAsync());
69
            if (result == null)
70
            {
71
                Logger.LogError("Unable to read chart {Song} [{Level} {Difficulty}] by {Team}", chart.Song.Title,
72
                    chart.Level, Math.Floor(chart.Difficulty), eventTeam.Name);
73
                return;
74
            }
75
            Logger.LogInformation("Analyzing chart {Song} [{Level} {Difficulty}] by {Team}", chart.Song.Title,
76
                chart.Level, Math.Floor(chart.Difficulty), eventTeam.Name);
77

78
            var tagsToCheck = chart.Tags.Where(e => tags.Any(tag => tag.Id == e.Id));
79
            while (target.Reserved.Count < 14 + reviewerCount)
80
            {
81
                target.Reserved.Add(string.Empty);
82
            }
83

84
            foreach (var tag in tagsToCheck)
85
            {
86
                switch (tag.Name)
87
                {
88
                    case "7PJ-1-6":
89
                    {
90
                        target.Reserved[8] = chart.Song.IsOriginal ? "5" : "0";
91
                        Logger.LogInformation("Tag {Tag}: {Score} pts", tag.Name, target.Reserved[8]);
92
                        break;
93
                    }
94
                    case "7PJ-2-1":
95
                    {
96
                        switch (result.Value.Item1)
97
                        {
98
                            case ChartFormat.RpeJson:
99
                            {
100
                                var content = (RpeJsonDto)result.Value.Item2;
101
                                target.Reserved[9] = content.JudgeLineList.Count <= 8 ? "1" : "0";
102
                                break;
103
                            }
104
                            case ChartFormat.Pec:
105
                            {
106
                                var content = (PecDto)result.Value.Item2;
107
                                var lineCount = 0;
108
                                lineCount = Math.Max(lineCount,
109
                                    content.AlphaCommands.GroupBy(e => e.JudgeLine).Count(e => e.Count() > 4));
110
                                lineCount = Math.Max(lineCount,
111
                                    content.BpmCommands.GroupBy(e => e.JudgeLine).Count(e => e.Count() > 4));
112
                                lineCount = Math.Max(lineCount,
113
                                    content.MoveCommands.GroupBy(e => e.JudgeLine).Count(e => e.Count() > 4));
114
                                lineCount = Math.Max(lineCount,
115
                                    content.NoteCommands.GroupBy(e => e.JudgeLine).Count(e => e.Count() > 4));
116
                                lineCount = Math.Max(lineCount,
117
                                    content.RotationCommands.GroupBy(e => e.JudgeLine).Count(e => e.Count() > 4));
118
                                lineCount = Math.Max(lineCount,
119
                                    content.SpeedCommands.GroupBy(e => e.JudgeLine).Count(e => e.Count() > 4));
120
                                lineCount = Math.Max(lineCount,
121
                                    content.DurationalAlphaCommands.GroupBy(e => e.JudgeLine)
122
                                        .Count(e => e.Count() > 4));
123
                                lineCount = Math.Max(lineCount,
124
                                    content.DurationalMoveCommands.GroupBy(e => e.JudgeLine).Count(e => e.Count() > 4));
125
                                lineCount = Math.Max(lineCount,
126
                                    content.DurationalRotationCommands.GroupBy(e => e.JudgeLine)
127
                                        .Count(e => e.Count() > 4));
128
                                target.Reserved[9] = lineCount <= 8 ? "1" : "0";
129
                                break;
130
                            }
131
                            case ChartFormat.PhiZone:
132
                            case ChartFormat.Phigrim:
133
                            case ChartFormat.Unsupported:
134
                            default:
135
                                Logger.LogError("Unsupported format: {Song} [{Level} {Difficulty}] by {Team}",
136
                                    chart.Song.Title, chart.Level, Math.Floor(chart.Difficulty), eventTeam.Name);
137
                                break;
138
                        }
139
                        Logger.LogInformation("Tag {Tag}: {Score} pts", tag.Name, target.Reserved[9]);
140
                        break;
141
                    }
142
                    case "7PJ-2-1-ex":
143
                    {
144
                        switch (result.Value.Item1)
145
                        {
146
                            case ChartFormat.RpeJson:
147
                            {
148
                                var content = (RpeJsonDto)result.Value.Item2;
149
                                target.Reserved[9] = content.JudgeLineList.Count <= 4 ? "2" : "0";
150
                                break;
151
                            }
152
                            case ChartFormat.Pec:
153
                            {
154
                                var content = (PecDto)result.Value.Item2;
155
                                var lineCount = 0;
156
                                lineCount = Math.Max(lineCount,
157
                                    content.AlphaCommands.GroupBy(e => e.JudgeLine).Count(e => e.Count() > 4));
158
                                lineCount = Math.Max(lineCount,
159
                                    content.MoveCommands.GroupBy(e => e.JudgeLine).Count(e => e.Count() > 4));
160
                                lineCount = Math.Max(lineCount,
161
                                    content.NoteCommands.GroupBy(e => e.JudgeLine).Count(e => e.Count() > 4));
162
                                lineCount = Math.Max(lineCount,
163
                                    content.RotationCommands.GroupBy(e => e.JudgeLine).Count(e => e.Count() > 4));
164
                                lineCount = Math.Max(lineCount,
165
                                    content.SpeedCommands.GroupBy(e => e.JudgeLine).Count(e => e.Count() > 4));
166
                                lineCount = Math.Max(lineCount,
167
                                    content.DurationalAlphaCommands.GroupBy(e => e.JudgeLine)
168
                                        .Count(e => e.Count() > 4));
169
                                lineCount = Math.Max(lineCount,
170
                                    content.DurationalMoveCommands.GroupBy(e => e.JudgeLine).Count(e => e.Count() > 4));
171
                                lineCount = Math.Max(lineCount,
172
                                    content.DurationalRotationCommands.GroupBy(e => e.JudgeLine)
173
                                        .Count(e => e.Count() > 4));
174
                                target.Reserved[9] = lineCount <= 4 ? "2" : "0";
175
                                break;
176
                            }
177
                            case ChartFormat.PhiZone:
178
                            case ChartFormat.Phigrim:
179
                            case ChartFormat.Unsupported:
180
                            default:
181
                                Logger.LogError("Unsupported format: {Song} [{Level} {Difficulty}] by {Team}",
182
                                    chart.Song.Title, chart.Level, Math.Floor(chart.Difficulty), eventTeam.Name);
183
                                break;
184
                        }
185
                        Logger.LogInformation("Tag {Tag}: {Score} pts", tag.Name, target.Reserved[9]);
186
                        break;
187
                    }
188
                    case "7PJ-2-7":
189
                    {
190
                        switch (result.Value.Item1)
191
                        {
192
                            case ChartFormat.RpeJson:
193
                            {
194
                                var content = (RpeJsonDto)result.Value.Item2;
195
                                target.Reserved[11] = content.JudgeLineList.All(e =>
196
                                    e?.AlphaControl == null ||
197
                                    e.AlphaControl.All(f => f == null || f.Alpha <= 0 || f.Alpha >= 255))
198
                                    ? "2"
199
                                    : "0";
200
                                break;
201
                            }
202
                            case ChartFormat.Pec:
203
                            {
204
                                var content = (PecDto)result.Value.Item2;
205
                                target.Reserved[11] =
206
                                    content.AlphaCommands.All(e => e.Alpha is <= 0 or >= 255) &&
207
                                    content.DurationalAlphaCommands.All(e => e.Alpha is <= 0 or >= 255)
208
                                        ? "2"
209
                                        : "0";
210
                                break;
211
                            }
212
                            case ChartFormat.PhiZone:
213
                            case ChartFormat.Phigrim:
214
                            case ChartFormat.Unsupported:
215
                            default:
216
                                Logger.LogError("Unsupported format: {Song} [{Level} {Difficulty}] by {Team}",
217
                                    chart.Song.Title, chart.Level, Math.Floor(chart.Difficulty), eventTeam.Name);
218
                                break;
219
                        }
220
                        Logger.LogInformation("Tag {Tag}: {Score} pts", tag.Name, target.Reserved[11]);
221
                        break;
222
                    }
223
                    case "7PJ-2-7-ex":
224
                    {
225
                        switch (result.Value.Item1)
226
                        {
227
                            case ChartFormat.RpeJson:
228
                            {
229
                                var content = (RpeJsonDto)result.Value.Item2;
230
                                target.Reserved[11] = content.JudgeLineList.All(e =>
231
                                    e?.AlphaControl == null || e.AlphaControl.All(f => f == null || f.Alpha <= 0))
232
                                    ? "3"
233
                                    : "0";
234
                                break;
235
                            }
236
                            case ChartFormat.Pec:
237
                            {
238
                                var content = (PecDto)result.Value.Item2;
239
                                target.Reserved[11] =
240
                                    content.AlphaCommands.All(e => e.Alpha <= 0) &&
241
                                    content.DurationalAlphaCommands.All(e => e.Alpha <= 0)
242
                                        ? "3"
243
                                        : "0";
244
                                break;
245
                            }
246
                            case ChartFormat.PhiZone:
247
                            case ChartFormat.Phigrim:
248
                            case ChartFormat.Unsupported:
249
                            default:
250
                                Logger.LogError("Unsupported format: {Song} [{Level} {Difficulty}] by {Team}",
251
                                    chart.Song.Title, chart.Level, Math.Floor(chart.Difficulty), eventTeam.Name);
252
                                break;
253
                        }
254
                        Logger.LogInformation("Tag {Tag}: {Score} pts", tag.Name, target.Reserved[11]);
255
                        break;
256
                    }
257
                    case "7PJ-2-8":
258
                    {
259
                        switch (result.Value.Item1)
260
                        {
261
                            case ChartFormat.RpeJson:
262
                            {
263
                                var content = (RpeJsonDto)result.Value.Item2;
264
                                target.Reserved[12] = content.JudgeLineList.Sum(e =>
265
                                {
266
                                    return e?.Notes?.Count(f => f is { Type: 3 }) ?? 0;
267
                                }) > chart.Song.Duration!.Value.TotalSeconds
268
                                    ? "1"
269
                                    : "0";
270
                                break;
271
                            }
272
                            case ChartFormat.Pec:
273
                            {
274
                                var content = (PecDto)result.Value.Item2;
275
                                target.Reserved[12] =
276
                                    content.NoteCommands.Count(e => e.Id == "n3") >
277
                                    chart.Song.Duration!.Value.TotalSeconds
278
                                        ? "1"
279
                                        : "0";
280
                                break;
281
                            }
282
                            case ChartFormat.PhiZone:
283
                            case ChartFormat.Phigrim:
284
                            case ChartFormat.Unsupported:
285
                            default:
286
                                Logger.LogError("Unsupported format: {Song} [{Level} {Difficulty}] by {Team}",
287
                                    chart.Song.Title, chart.Level, Math.Floor(chart.Difficulty), eventTeam.Name);
288
                                break;
289
                        }
290
                        Logger.LogInformation("Tag {Tag}: {Score} pts", tag.Name, target.Reserved[12]);
291
                        break;
292
                    }
293
                    case "7PJ-3-2":
294
                    {
295
                        switch (result.Value.Item1)
296
                        {
297
                            case ChartFormat.RpeJson:
298
                            {
299
                                var content = (RpeJsonDto)result.Value.Item2;
300
                                target.Reserved[13] = content.JudgeLineList.Sum(e =>
301
                                {
302
                                    return e?.Notes?.Count(f =>
303
                                    {
304
                                        if (f is not { Type: 2 }) return false;
305
                                        var holdStart = ChartUtil.ConvertTime(f.StartTime);
306
                                        var holdEnd = ChartUtil.ConvertTime(f.EndTime);
307
                                        var bpmIndex = 0;
308
                                        var bpmList = content.BpmList.Where(g => g != null)
309
                                            .Select(g => g!)
310
                                            .OrderBy(g => g)
311
                                            .ToList();
312
                                        while (bpmIndex < bpmList.Count &&
313
                                               ChartUtil.ConvertTime(bpmList[bpmIndex].StartTime) <= holdStart)
314
                                        {
315
                                            bpmIndex++;
316
                                        }
317

318
                                        var lengthInSeconds = 0d;
319
                                        for (bpmIndex--;
320
                                             bpmIndex < bpmList.Count &&
321
                                             ChartUtil.ConvertTime(bpmList[bpmIndex].StartTime) < holdEnd;
322
                                             bpmIndex++)
323
                                        {
324
                                            var bpm = bpmList[bpmIndex].Bpm;
325
                                            var intervalStart =
326
                                                Math.Max(ChartUtil.ConvertTime(bpmList[bpmIndex].StartTime), holdStart);
327
                                            var intervalEnd =
328
                                                Math.Min(
329
                                                    bpmIndex < bpmList.Count - 1
330
                                                        ? ChartUtil.ConvertTime(bpmList[bpmIndex + 1].StartTime)
331
                                                        : double.PositiveInfinity, holdEnd);
332
                                            lengthInSeconds += (intervalEnd - intervalStart) * 60 / bpm;
333
                                        }
334

335
                                        if (lengthInSeconds < 8) return false;
336
                                        return content.JudgeLineList.Sum(g =>
337
                                        {
338
                                            return g?.Notes?.Count(h =>
339
                                                h != null &&
340
                                                ((h.Type == 1 && ChartUtil.ConvertTime(h.StartTime) >= holdStart &&
341
                                                  ChartUtil.ConvertTime(h.StartTime) <= holdEnd) ||
342
                                                 (h.Type == 2 && ChartUtil.ConvertTime(h.StartTime) >= holdStart &&
343
                                                  ChartUtil.ConvertTime(h.EndTime) <= holdEnd))) ?? 0;
344
                                        }) >= 20;
345
                                    }) ?? 0;
346
                                }) >= 2
347
                                    ? "3"
348
                                    : "0";
349
                                break;
350
                            }
351
                            case ChartFormat.Pec:
352
                            {
353
                                var content = (PecDto)result.Value.Item2;
354
                                target.Reserved[13] = content.NoteCommands.Count(e =>
355
                                {
356
                                    if (e.Id != "n2") return false;
357
                                    var bpmIndex = 0;
358
                                    var bpmList = content.BpmCommands.OrderBy(f => f).ToList();
359
                                    while (bpmIndex < bpmList.Count && bpmList[bpmIndex].Time <= e.Time)
360
                                    {
361
                                        bpmIndex++;
362
                                    }
363

364
                                    var lengthInSeconds = 0d;
365
                                    for (bpmIndex--;
366
                                         bpmIndex < bpmList.Count && bpmList[bpmIndex].Time < e.EndTime;
367
                                         bpmIndex++)
368
                                    {
369
                                        var bpm = bpmList[bpmIndex].Bpm;
370
                                        var intervalStart = Math.Max(bpmList[bpmIndex].Time, e.Time);
371
                                        var intervalEnd =
372
                                            Math.Min(
373
                                                bpmIndex < bpmList.Count - 1
374
                                                    ? bpmList[bpmIndex + 1].Time
375
                                                    : double.PositiveInfinity, e.EndTime!.Value);
376
                                        lengthInSeconds += (intervalEnd - intervalStart) * 60 / bpm;
377
                                    }
378

379
                                    if (lengthInSeconds < 8) return false;
380
                                    return content.NoteCommands.Count(f =>
381
                                        (f.Id == "n1" && f.Time >= e.Time && f.Time <= e.EndTime) ||
382
                                        (f.Id == "n2" && f.Time >= e.Time && f.EndTime <= e.EndTime)) >= 20;
383
                                }) >= 2
384
                                    ? "3"
385
                                    : "0";
386
                                break;
387
                            }
388
                            case ChartFormat.PhiZone:
389
                            case ChartFormat.Phigrim:
390
                            case ChartFormat.Unsupported:
391
                            default:
392
                                Logger.LogError("Unsupported format: {Song} [{Level} {Difficulty}] by {Team}",
393
                                    chart.Song.Title, chart.Level, Math.Floor(chart.Difficulty), eventTeam.Name);
394
                                break;
395
                        }
396
                        Logger.LogInformation("Tag {Tag}: {Score} pts", tag.Name, target.Reserved[13]);
397
                        break;
398
                    }
399
                    case "7PJ-3-2-ex":
400
                    {
401
                        switch (result.Value.Item1)
402
                        {
403
                            case ChartFormat.RpeJson:
404
                            {
405
                                var content = (RpeJsonDto)result.Value.Item2;
406
                                target.Reserved[13] = content.JudgeLineList.Any(e => e is { Notes: not null } &&
407
                                    e.Notes.Any(f =>
408
                                    {
409
                                        if (f is not { Type: 2 }) return false;
410
                                        var holdStart = ChartUtil.ConvertTime(f.StartTime);
411
                                        var holdEnd = ChartUtil.ConvertTime(f.EndTime);
412
                                        return !content.JudgeLineList.Any(g =>
413
                                            g is { Notes: not null } && g.Notes.Any(h =>
414
                                                h != null &&
415
                                                ((h.Type != 2 && (ChartUtil.ConvertTime(h.StartTime) < holdStart ||
416
                                                                  ChartUtil.ConvertTime(h.StartTime) > holdEnd)) ||
417
                                                 (h.Type == 2 && (ChartUtil.ConvertTime(h.StartTime) < holdStart ||
418
                                                                  ChartUtil.ConvertTime(h.EndTime) > holdEnd)))));
419
                                    }))
420
                                    ? "6"
421
                                    : "0";
422
                                break;
423
                            }
424
                            case ChartFormat.Pec:
425
                            {
426
                                var content = (PecDto)result.Value.Item2;
427
                                target.Reserved[13] = content.NoteCommands.Any(e =>
428
                                {
429
                                    if (e.Id != "n2") return false;
430
                                    return !content.NoteCommands.Any(f =>
431
                                        (f.Id != "n2" && (f.Time < e.Time || f.Time > e.EndTime)) ||
432
                                        (f.Id == "n2" && (f.Time < e.Time || f.EndTime > e.EndTime)));
433
                                })
434
                                    ? "6"
435
                                    : "0";
436
                                break;
437
                            }
438
                            case ChartFormat.PhiZone:
439
                            case ChartFormat.Phigrim:
440
                            case ChartFormat.Unsupported:
441
                            default:
442
                                Logger.LogError("Unsupported format: {Song} [{Level} {Difficulty}] by {Team}",
443
                                    chart.Song.Title, chart.Level, Math.Floor(chart.Difficulty), eventTeam.Name);
444
                                break;
445
                        }
446
                        Logger.LogInformation("Tag {Tag}: {Score} pts", tag.Name, target.Reserved[13]);
447
                        break;
448
                    }
449
                }
450
            }
451

452
            var challengeTotal = Enumerable.Range(7, 7)
453
                .Select(i => target.Reserved[i])
454
                .Select(e => !string.IsNullOrWhiteSpace(e) && double.TryParse(e, out _) ? e : "0")
455
                .Sum(double.Parse);
456
            target.Reserved[3] = challengeTotal.ToString(CultureInfo.InvariantCulture);
457
            var scores = Enumerable.Range(1, 3)
458
                .Select(i => target.Reserved[i])
459
                .Select(e =>
460
                {
461
                    if (!string.IsNullOrWhiteSpace(e) && double.TryParse(e, out var a)) return (double?)a;
462
                    return null;
463
                })
464
                .ToList();
465
            var total = Math.Round((scores[0] ?? 0) * ((scores[2] ?? 0) + 100) / 100 + (scores[1] ?? 2.5) * 3, 2);
466
            target.Reserved[0] = total.ToString(CultureInfo.InvariantCulture);
467
            Logger.LogInformation("Chart {Song} [{Level} {Difficulty}] by {Team} has a challenge score of {Challenge}",
468
                chart.Song.Title, chart.Level, Math.Floor(chart.Difficulty), eventTeam.Name, challengeTotal);
469
            if (eventTeam.IsUnveiled)
470
            {
471
                target.Score = total;
472
            }
473

474
            await eventResourceRepository.UpdateEventResourceAsync(target);
475
        }
476
    }
477
}