diff --git a/TaikoWebUI/Pages/DaniDojo.razor b/TaikoWebUI/Pages/DaniDojo.razor index ecbb3fb..520ca16 100644 --- a/TaikoWebUI/Pages/DaniDojo.razor +++ b/TaikoWebUI/Pages/DaniDojo.razor @@ -18,76 +18,100 @@ var danData = GameDataService.GetDanDataById(danId); - - @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

-
+ + + + + + Result + + + + + @{ + var danResultState = GetDanResultState(danId); + string danClearStateString = GetDanClearStateString(danResultState); + } + + @danClearStateString + + + + + + + @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; - - - @difficulty - - - - @GameDataService.GetMusicStarLevel(danDataOdaiSong.SongNo, difficulty) - - + + + + +

@stageNumber

+
- - @GameDataService.GetMusicNameBySongId(danDataOdaiSong.SongNo) - @GameDataService.GetMusicArtistBySongId(danDataOdaiSong.SongNo) - + + + @difficulty + + + + @GameDataService.GetMusicStarLevel(danDataOdaiSong.SongNo, difficulty) + + + + + @GameDataService.GetMusicNameBySongId(danDataOdaiSong.SongNo) + @GameDataService.GetMusicArtistBySongId(danDataOdaiSong.SongNo) + - @if (bestDataMap.ContainsKey(danId)) - { - var danBestData = bestDataMap[danId]; - if (danBestData.DanBestStageDataList.Count > index) + @if (bestDataMap.ContainsKey(danId)) { - var bestStage = danBestData.DanBestStageDataList[index]; + var danBestData = bestDataMap[danId]; + if (danBestData.DanBestStageDataList.Count > index) + { + var bestStage = danBestData.DanBestStageDataList[index]; - - - Good - @bestStage.GoodCount - - - OK - @bestStage.OkCount - - - Bad - @bestStage.BadCount - - - Drumroll - @bestStage.DrumrollCount - - - MAX Combo - @bestStage.ComboCount - - - Total Hits - @bestStage.TotalHitCount - - - + + + Good + @bestStage.GoodCount + + + OK + @bestStage.OkCount + + + Bad + @bestStage.BadCount + + + Drumroll + @bestStage.DrumrollCount + + + MAX Combo + @bestStage.ComboCount + + + Total Hits + @bestStage.TotalHitCount + + +
+ } } - } -
-
-
- } +
+ + + } + + @@ -134,15 +158,15 @@ } - Conditions + Conditions Red - > @redRequirement% + > @redRequirement% Gold - > @goldRequirement% + > @goldRequirement% diff --git a/TaikoWebUI/Pages/DaniDojo.razor.cs b/TaikoWebUI/Pages/DaniDojo.razor.cs index ceba86c..9d82147 100644 --- a/TaikoWebUI/Pages/DaniDojo.razor.cs +++ b/TaikoWebUI/Pages/DaniDojo.razor.cs @@ -1,4 +1,5 @@ -using System.Net.NetworkInformation; +using SharedProject.Enums; +using System.Net.NetworkInformation; namespace TaikoWebUI.Pages; @@ -29,6 +30,21 @@ public partial class DaniDojo breadcrumbs.Add(new BreadcrumbItem("Dani Dojo", href: $"/Cards/{Baid}/DaniDojo", disabled: false)); } + private static string GetDanClearStateString(DanClearState danClearState) + { + return danClearState switch + { + DanClearState.NotClear => "Not Cleared", + DanClearState.RedNormalClear => "Red Clear", + DanClearState.RedFullComboClear => "Red Full Combo", + DanClearState.RedPerfectClear => "Red Donderful Combo", + DanClearState.GoldNormalClear => "Gold Clear", + DanClearState.GoldFullComboClear => "Gold Full Combo", + DanClearState.GoldPerfectClear => "Gold Donderful Combo", + _ => "" + }; + } + private static string GetDanRequirementString(DanConditionType danConditionType) { return danConditionType switch @@ -182,6 +198,18 @@ public partial class DaniDojo return icon; } + private DanClearState GetDanResultState(uint danId) + { + if (bestDataMap.ContainsKey(danId)) + { + return bestDataMap[danId].ClearState; + } + else + { + return DanClearState.NotClear; + } + } + private static uint GetSoulGauge(DanData data, bool isGold) { var borders = data.OdaiBorderList; diff --git a/TaikoWebUI/wwwroot/images/dani_GoldFullComboClear.png b/TaikoWebUI/wwwroot/images/dani_GoldFullComboClear.png index 4d836a0..5c4eaa0 100644 Binary files a/TaikoWebUI/wwwroot/images/dani_GoldFullComboClear.png and b/TaikoWebUI/wwwroot/images/dani_GoldFullComboClear.png differ diff --git a/TaikoWebUI/wwwroot/images/dani_GoldNormalClear.png b/TaikoWebUI/wwwroot/images/dani_GoldNormalClear.png index 825de1b..63959cd 100644 Binary files a/TaikoWebUI/wwwroot/images/dani_GoldNormalClear.png and b/TaikoWebUI/wwwroot/images/dani_GoldNormalClear.png differ diff --git a/TaikoWebUI/wwwroot/images/dani_GoldPerfectClear.png b/TaikoWebUI/wwwroot/images/dani_GoldPerfectClear.png index 7c77e49..86f319e 100644 Binary files a/TaikoWebUI/wwwroot/images/dani_GoldPerfectClear.png and b/TaikoWebUI/wwwroot/images/dani_GoldPerfectClear.png differ diff --git a/TaikoWebUI/wwwroot/images/dani_NotClear.png b/TaikoWebUI/wwwroot/images/dani_NotClear.png new file mode 100644 index 0000000..2de8e77 Binary files /dev/null and b/TaikoWebUI/wwwroot/images/dani_NotClear.png differ diff --git a/TaikoWebUI/wwwroot/images/dani_RedFullComboClear.png b/TaikoWebUI/wwwroot/images/dani_RedFullComboClear.png index c061e45..f4f5f67 100644 Binary files a/TaikoWebUI/wwwroot/images/dani_RedFullComboClear.png and b/TaikoWebUI/wwwroot/images/dani_RedFullComboClear.png differ diff --git a/TaikoWebUI/wwwroot/images/dani_RedNormalClear.png b/TaikoWebUI/wwwroot/images/dani_RedNormalClear.png index 593776b..a274206 100644 Binary files a/TaikoWebUI/wwwroot/images/dani_RedNormalClear.png and b/TaikoWebUI/wwwroot/images/dani_RedNormalClear.png differ diff --git a/TaikoWebUI/wwwroot/images/dani_RedPerfectClear.png b/TaikoWebUI/wwwroot/images/dani_RedPerfectClear.png index 1972ead..aa14cb7 100644 Binary files a/TaikoWebUI/wwwroot/images/dani_RedPerfectClear.png and b/TaikoWebUI/wwwroot/images/dani_RedPerfectClear.png differ