From dd02096637edd293a9da9518faed78d19de126f8 Mon Sep 17 00:00:00 2001 From: 0auBSQ <58159635+0auBSQ@users.noreply.github.com> Date: Wed, 25 Jan 2023 02:19:58 +0900 Subject: [PATCH] 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 --- TJAPlayer3/Common/TJAPlayer3.cs | 1 - TJAPlayer3/Stages/07.Game/CStage演奏画面共通.cs | 15 ++++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/TJAPlayer3/Common/TJAPlayer3.cs b/TJAPlayer3/Common/TJAPlayer3.cs index f64c6bce..f894b5ed 100644 --- a/TJAPlayer3/Common/TJAPlayer3.cs +++ b/TJAPlayer3/Common/TJAPlayer3.cs @@ -994,7 +994,6 @@ namespace TJAPlayer3 TJAPlayer3.latestSongSelect = stage選曲; ConfigIni.nPlayerCount = 2; - ConfigIni.nAILevel = 2; ConfigIni.bAIBattleMode = true; //----------------------------- #endregion diff --git a/TJAPlayer3/Stages/07.Game/CStage演奏画面共通.cs b/TJAPlayer3/Stages/07.Game/CStage演奏画面共通.cs index 1627dbf7..c03b8bc3 100644 --- a/TJAPlayer3/Stages/07.Game/CStage演奏画面共通.cs +++ b/TJAPlayer3/Stages/07.Game/CStage演奏画面共通.cs @@ -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演奏終了後も再生が続くチップである )