@using System.ComponentModel.DataAnnotations @using Blazored.LocalStorage @inject IGameDataService GameDataService @inject HttpClient Client @inject AuthService AuthService @inject NavigationManager NavigationManager @inject ILocalStorageService LocalStorage @inject BreadcrumbsStateContainer BreadcrumbsStateContainer @page "/Users/{baid:int}/DaniDojo" @if (AuthService.LoginRequired && (!AuthService.IsLoggedIn || (AuthService.GetLoggedInBaid() != Baid && !AuthService.IsAdmin))) { if (!AuthService.IsLoggedIn) { NavigationManager.NavigateTo("/Login"); } else { NavigationManager.NavigateTo("/"); } } else { @foreach (var danId in danMap.Keys) { var danData = danMap[danId]; @Localizer["Details"] @Localizer["Result"] @{ var danResultState = GetDanResultState(danId); var danClearStateString = GetDanClearStateString(danResultState); } danResultState.ToString() @danClearStateString @Localizer["Score"] @{ var totalScore = GetTotalScore(danId); } @totalScore @Localizer["Totals"] @{ var totalGoods = GetTotalGoodHits(danId); var totalOks = GetTotalOkHits(danId); var totalBads = GetTotalBadHits(danId); var totalDrumroll = GetTotalDrumrollHits(danId); var totalMaxCombo = GetTotalMaxCombo(danId); var totalHits = GetTotalHits(danId); } @Localizer["Good"] @totalGoods @Localizer["OK"] @totalOks @Localizer["Bad"] @totalBads @Localizer["Drumroll"] @totalDrumroll @Localizer["MAX Combo"] @totalMaxCombo @Localizer["Total Hits"] @totalHits @Localizer["Course Songs"] @for (uint j = 0; j <= 2; j++) { var index = (int)j; var danDataOdaiSong = danData.OdaiSongList[index]; var stageNumber = j + 1; var difficulty = (Difficulty)danDataOdaiSong.Level;

@stageNumber

@difficulty @GameDataService.GetMusicStarLevel(musicDetailDictionary, danDataOdaiSong.SongNo, difficulty) @GameDataService.GetMusicNameBySongId(musicDetailDictionary, danDataOdaiSong.SongNo, SongNameLanguage) @GameDataService.GetMusicArtistBySongId(musicDetailDictionary, danDataOdaiSong.SongNo, SongNameLanguage) @if (_bestDataMap.TryGetValue(danId, out var danBestData)) { if (danBestData.DanBestStageDataList.Count > index) { var bestStage = danBestData.DanBestStageDataList[index]; @Localizer["Good"] @bestStage.GoodCount @Localizer["OK"] @bestStage.OkCount @Localizer["Bad"] @bestStage.BadCount @Localizer["Drumroll"] @bestStage.DrumrollCount @Localizer["MAX Combo"] @bestStage.ComboCount @Localizer["Total Hits"] @bestStage.TotalHitCount } }
}
@Localizer["Conditions"] @Localizer["Soul Gauge"] @{ var redRequirement = GetSoulGauge(danData, false); var goldRequirement = GetSoulGauge(danData, true); var barClass = "bar-default"; var resultText = Localizer["Not Passed"]; } @Localizer["Result"] @if (_bestDataMap.TryGetValue(danId, out var danBestData)) { if (danBestData.SoulGaugeTotal >= redRequirement) { barClass = "bar-pass-red"; resultText = Localizer["Pass"]; } if (danBestData.SoulGaugeTotal >= goldRequirement) { barClass = "bar-pass-gold"; resultText = Localizer["Gold"]; } @danBestData.SoulGaugeTotal% @resultText } else { 0% N/A } @Localizer["Conditions"] @Localizer["Red"] > @redRequirement% @Localizer["Gold"] > @goldRequirement% @for (var j = 1; j < danData.OdaiBorderList.Count; j++) { var border = danData.OdaiBorderList[j]; @GetDanRequirementTitle(border) @{ var borderType = (DanBorderType)border.BorderType; } @if (borderType == DanBorderType.All) { @{ var redRequirement = border.RedBorderTotal; var goldRequirement = border.GoldBorderTotal; var barClass = "bar-default"; var resultText = Localizer["Not Passed"]; } @Localizer["Result"] @if (_bestDataMap.TryGetValue(danId, out var danBestData)) { var bestData = GetAllBestFromData((DanConditionType)border.OdaiType, danBestData); if ((DanConditionType)border.OdaiType is DanConditionType.BadCount or DanConditionType.OkCount) { if (bestData <= goldRequirement) { barClass = "bar-pass-gold"; resultText = Localizer["Gold"]; } else if (bestData <= redRequirement) { barClass = "bar-pass-red"; resultText = Localizer["Pass"]; } var resultValue = redRequirement - bestData; if (resultValue < 0) resultValue = 0; @resultValue @resultText } else { if (bestData >= goldRequirement) { barClass = "bar-pass-gold"; resultText = Localizer["Gold"]; } else if (bestData >= redRequirement) { barClass = "bar-pass-red"; resultText = Localizer["Pass"]; } var resultValue = Math.Min(bestData, redRequirement); @bestData @resultText } } else { 0 N/A } @{ var conditionOperator = GetDanConditionOperator((DanConditionType)border.OdaiType); } @Localizer["Conditions"] @Localizer["Red"] @conditionOperator @redRequirement @Localizer["Gold"] @conditionOperator @goldRequirement } else { @for (var k = 0; k < 3; k++) { var songNumber = k; var redRequirement = GetSongBorderCondition(border, songNumber, false); var goldRequirement = GetSongBorderCondition(border, songNumber, true); var barClass = "bar-default"; var resultText = Localizer["Not Cleared"]; @Localizer["Stage"] @(songNumber + 1) @Localizer["Result"] @if (_bestDataMap.TryGetValue(danId, out var danBestData) && (danBestData.DanBestStageDataList.Count > songNumber)) { var bestData = GetSongBestFromData((DanConditionType)border.OdaiType, danBestData, songNumber); if ((DanConditionType)border.OdaiType is DanConditionType.BadCount or DanConditionType.OkCount) { if (bestData <= redRequirement) { barClass = "bar-pass-red"; resultText = Localizer["Pass"]; } if (bestData <= goldRequirement) { barClass = "bar-pass-gold"; resultText = Localizer["Gold"]; } var resultValue = redRequirement - bestData; if (bestData >= redRequirement) resultValue = 0; @resultValue @resultText } else { if (bestData >= redRequirement) { barClass = "bar-pass-red"; resultText = Localizer["Pass"]; } if (bestData >= goldRequirement) { barClass = "bar-pass-gold"; resultText = Localizer["Gold"]; } @bestData @resultText } } else { 0 N/A } @{ var conditionOperator = GetDanConditionOperator((DanConditionType)border.OdaiType); if (redRequirement == 0) { conditionOperator = ""; } } @Localizer["Conditions"] @Localizer["Red"] @conditionOperator @redRequirement @Localizer["Gold"] @conditionOperator @goldRequirement } } }
}
}