1
0
mirror of synced 2025-01-31 12:03:51 +01:00

Auto difficulty auto adjust for AI battle mode, fix section count bugs to avoid 1-section and ties, reset status when a section is finished

This commit is contained in:
0auBSQ 2023-01-25 02:19:58 +09:00
parent 32f3d81474
commit dd02096637
2 changed files with 14 additions and 2 deletions

View File

@ -994,7 +994,6 @@ namespace TJAPlayer3
TJAPlayer3.latestSongSelect = stage選曲;
ConfigIni.nPlayerCount = 2;
ConfigIni.nAILevel = 2;
ConfigIni.bAIBattleMode = true;
//-----------------------------
#endregion

View File

@ -222,7 +222,15 @@ namespace TJAPlayer3
}
}
int battleSectionCount = (endChip.n発声時刻ms * 5) / 180000;
int battleSectionCount = (endChip.n発声時刻ms * 5) / 120000;
// Avoid single section
if (battleSectionCount <= 1)
battleSectionCount = 3;
// Avoid ties
if (battleSectionCount % 2 == 0)
battleSectionCount -= 1;
int battleSectionTime = 0;
int nowBattleSectionCount = 1;
@ -814,12 +822,17 @@ namespace TJAPlayer3
if (AIBattleState >= 0)
{
NowAIBattleSection.End = AIBattleSection.EndType.Clear;
if (TJAPlayer3.ConfigIni.nAILevel < 10)
TJAPlayer3.ConfigIni.nAILevel++;
}
else
{
NowAIBattleSection.End = AIBattleSection.EndType.Lose;
if (TJAPlayer3.ConfigIni.nAILevel > 1)
TJAPlayer3.ConfigIni.nAILevel--;
}
actAIBattle.BatchAnimeCounter.n現在の値 = 0;
AIBattleState = 0;
}
public void AddMixer( CSound cs, bool _b演奏終了後も再生が続くチップである )