@inject IGameDataService GameDataService @inject HttpClient Client @inject LoginService LoginService @inject IJSRuntime JSRuntime @inject NavigationManager NavigationManager @page "/Users/{baid:int}/DaniDojo" @if (LoginService.LoginRequired && (!LoginService.IsLoggedIn || (LoginService.GetLoggedInUser().Baid != Baid && !LoginService.IsAdmin))) { if (!LoginService.IsLoggedIn) { NavigationManager.NavigateTo("/Login"); } else { NavigationManager.NavigateTo("/"); } } else { @Localizer["Key_03"] @for (uint i = 1; i <= 19; i++) { var danId = i; var danData = GameDataService.GetDanDataById(danId); @Localizer["Details"] @Localizer["Result"] @{ var danResultState = GetDanResultState(danId); var danClearStateString = GetDanClearStateString(danResultState); } danResultState.ToString() @danClearStateString @Localizer["Key_01"] @{ 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["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(danDataOdaiSong.SongNo, difficulty) @GameDataService.GetMusicNameBySongId(danDataOdaiSong.SongNo, @CurrentLanguage) @GameDataService.GetMusicArtistBySongId(danDataOdaiSong.SongNo, @CurrentLanguage) @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["Failed"]; } @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["Failed"]; } @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 <= redRequirement) { barClass = "bar-pass-red"; resultText = @Localizer["Pass"]; } if (bestData <= goldRequirement) { barClass = "bar-pass-gold"; resultText = @Localizer["Gold"]; } var resultValue = redRequirement - bestData; if (resultValue < 0) 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); } @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["Failed"]; @Localizer["Stage"] @(songNumber + 1) @Localizer["Result"] @if (bestDataMap.TryGetValue(danId, out var danBestData)) { 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 } } }
}
}