@inject IGameDataService GameDataService
@inject HttpClient Client
@page "/Cards/{baid:int}/DaniDojo"
Dani Dojo
Card: @Baid
@for (uint i = 1; i <= 19; i++)
{
var danId = i;
var danData = GameDataService.GetDanDataById(danId);
Details
Result
@{
var danResultState = GetDanResultState(danId);
var danClearStateString = GetDanClearStateString(danResultState);
}
@danClearStateString
High Score
@{
var totalScore = GetTotalScore(danId);
}
@totalScore
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);
}
Good
@totalGoods
OK
@totalOks
Bad
@totalBads
Drumroll
@totalDrumroll
MAX Combo
@totalMaxCombo
Total Hits
@totalHits
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
@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)
{
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
}
}
}
Conditions
Soul Gauge
@{
var redRequirement = GetSoulGauge(danData, false);
var goldRequirement = GetSoulGauge(danData, true);
var barClass = "bar-default";
var resultText = "Failed";
}
Result
@if (bestDataMap.ContainsKey(danId))
{
var danBestData = bestDataMap[danId];
if (danBestData.SoulGaugeTotal >= redRequirement) {
barClass = "bar-pass-red";
resultText = "Pass";
}
if (danBestData.SoulGaugeTotal >= goldRequirement) {
barClass = "bar-pass-gold";
resultText = "Gold";
}
@(danBestData.SoulGaugeTotal)%
@resultText
} else {
0%
N/A
}
Conditions
Red
> @redRequirement%
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 = "Failed";
}
Result
@if (bestDataMap.ContainsKey(danId))
{
var danBestData = bestDataMap[danId];
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 = "Pass";
}
if (bestData <= goldRequirement)
{
barClass = "bar-pass-gold";
resultText = "Gold";
}
var resultValue = redRequirement - bestData;
if (resultValue < 0) resultValue = 0;
@resultValue
@resultText
}
else
{
if (bestData >= redRequirement)
{
barClass = "bar-pass-red";
resultText = "Pass";
}
if (bestData >= goldRequirement)
{
barClass = "bar-pass-gold";
resultText = "Gold";
}
@bestData
@resultText
}
}
else
{
0
N/A
}
@{
var conditionOperator = GetDanConditionOperator((DanConditionType)border.OdaiType);
}
Conditions
Red
@conditionOperator @redRequirement
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 = "Failed";
Stage @(songNumber + 1)
Result
@if (bestDataMap.ContainsKey(danId))
{
var danBestData = bestDataMap[danId];
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 = "Pass";
}
if (bestData <= goldRequirement)
{
barClass = "bar-pass-gold";
resultText = "Gold";
}
var resultValue = redRequirement - bestData;
if (resultValue < 0) resultValue = 0;
@resultValue
@resultText
}
else
{
if (bestData >= redRequirement)
{
barClass = "bar-pass-red";
resultText = "Pass";
}
if (bestData >= goldRequirement)
{
barClass = "bar-pass-gold";
resultText = "Gold";
}
@bestData
@resultText
}
}
else
{
0
N/A
}
@{
var conditionOperator = GetDanConditionOperator((DanConditionType)border.OdaiType);
if (redRequirement == 0) {
conditionOperator = "";
}
}
Conditions
Red
@conditionOperator @redRequirement
Gold
@conditionOperator @goldRequirement
}
}
}
}