1
0
mirror of synced 2025-02-17 19:09:25 +01:00

AIバトル演奏の本格実装1 (#352)

This commit is contained in:
Takkkom 2023-01-24 17:30:22 +09:00 committed by GitHub
parent b19d22e519
commit 32f3d81474
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
66 changed files with 725 additions and 141 deletions

View File

@ -861,6 +861,7 @@ namespace TJAPlayer3
public bool bAuto先生の連打;
public int nRollsPerSec;
public int nAILevel;
public bool bAIBattleMode;
public CAIPerformances[] apAIPerformances =
{
@ -1452,8 +1453,10 @@ namespace TJAPlayer3
this.n表示可能な最小コンボ数.Bass = 10;
this.n表示可能な最小コンボ数.Taiko = 10;
this.nRollsPerSec = 15;
this.nAILevel = 0;
this.FontName = "MS UI Gothic";
this.nAILevel = 1;
this.bAIBattleMode = false;
this.FontName = "MS UI Gothic";
this.BoxFontName = "MS UI Gothic";
this.ApplyLoudnessMetadata = true;
this.bEnableCountdownTimer = true;
@ -2010,7 +2013,8 @@ namespace TJAPlayer3
sw.WriteLine("TaikoAutoRoll={0}", this.bAuto先生の連打 ? 1 : 0);
sw.WriteLine("RollsPerSec={0}", this.nRollsPerSec);
sw.WriteLine("AILevel={0}", this.nAILevel);
sw.WriteLine();
sw.WriteLine("AIBattleMode={0}", bAIBattleMode ? 1 : 0);
sw.WriteLine();
sw.WriteLine(";-------------------");
#endregion
@ -2830,8 +2834,12 @@ namespace TJAPlayer3
else if (str3.Equals("AILevel"))
{
this.nAILevel = int.Parse(str4);
}
continue;
}
if (str3.Equals("AIBattleMode"))
{
bAIBattleMode = C変換.bONorOFF(str4[0]);
}
continue;
//-----------------------------
#endregion

View File

@ -4076,6 +4076,73 @@ namespace TJAPlayer3
}
#endregion
#region AIBattle
else if (strCommand == "Game_AIBattle_SectionTime_Panel")
{
string[] strSplit = strParam.Split(',');
for (int i = 0; i < 2; i++)
{
Game_AIBattle_SectionTime_Panel[i] = int.Parse(strSplit[i]);
}
}
else if (strCommand == "Game_AIBattle_SectionTime_Bar")
{
string[] strSplit = strParam.Split(',');
for (int i = 0; i < 2; i++)
{
Game_AIBattle_SectionTime_Bar[i] = int.Parse(strSplit[i]);
}
}
else if (strCommand == "Game_AIBattle_Batch_Base")
{
string[] strSplit = strParam.Split(',');
for (int i = 0; i < 2; i++)
{
Game_AIBattle_Batch_Base[i] = int.Parse(strSplit[i]);
}
}
else if (strCommand == "Game_AIBattle_Batch")
{
string[] strSplit = strParam.Split(',');
for (int i = 0; i < 2; i++)
{
Game_AIBattle_Batch[i] = int.Parse(strSplit[i]);
}
}
else if (strCommand == "Game_AIBattle_Batch_Size")
{
string[] strSplit = strParam.Split(',');
for (int i = 0; i < 2; i++)
{
Game_AIBattle_Batch_Size[i] = int.Parse(strSplit[i]);
}
}
else if (strCommand == "Game_AIBattle_Batch_Anime")
{
string[] strSplit = strParam.Split(',');
for (int i = 0; i < 2; i++)
{
Game_AIBattle_Batch_Anime[i] = int.Parse(strSplit[i]);
}
}
else if (strCommand == "Game_AIBattle_Batch_Anime_Size")
{
string[] strSplit = strParam.Split(',');
for (int i = 0; i < 2; i++)
{
Game_AIBattle_Batch_Anime_Size[i] = int.Parse(strSplit[i]);
}
}
else if (strCommand == "Game_AIBattle_Batch_Move")
{
string[] strSplit = strParam.Split(',');
for (int i = 0; i < 2; i++)
{
Game_AIBattle_Batch_Move[i] = int.Parse(strSplit[i]);
}
}
#endregion
#endregion
#region Result
@ -5688,9 +5755,23 @@ namespace TJAPlayer3
public int[] Game_Training_CurrentMeasureCount_XY = { 254, 370 };
public int[] Game_Training_SpeedDisplay_XY = { 110, 370 };
public int Game_Training_SmallNumber_Width = 17;
public int Game_Training_BigNumber_Width = 20;
public int Game_Training_BigNumber_Width = 20;
#endregion
#region AIBattle
public int[] Game_AIBattle_SectionTime_Panel = new int[] { 202, 178 };
public int[] Game_AIBattle_SectionTime_Bar = new int[] { 205, 193 };
public int[] Game_AIBattle_Batch_Base = new int[] { 150, 83 };
public int[] Game_AIBattle_Batch = new int[] { 150, 83 };
public int[] Game_AIBattle_Batch_Size = new int[] { 70, 70 };
public int[] Game_AIBattle_Batch_Anime = new int[] { 260, -35 };
public int[] Game_AIBattle_Batch_Anime_Size = new int[] { 274, 274 };
public int[] Game_AIBattle_Batch_Move = new int[] { 30, 15 };
#endregion
#endregion
#region Result
public int Result_Cloud_Count = 11;

View File

@ -897,6 +897,7 @@ namespace TJAPlayer3
r現在のステージ = stage選曲;
TJAPlayer3.latestSongSelect = stage選曲;
ConfigIni.bAIBattleMode = false;
//-----------------------------
#endregion
break;
@ -979,10 +980,29 @@ namespace TJAPlayer3
r現在のステージ = stage終了;
//-----------------------------
#endregion
break;
case (int)CStageタイトル.E戻り値.AIBATTLEMODE:
#region [ ]
//-----------------------------
r現在のステージ.On非活性化();
Trace.TraceInformation("----------------------");
Trace.TraceInformation("■ 選曲");
stage選曲.On活性化();
r直前のステージ = r現在のステージ;
r現在のステージ = stage選曲;
TJAPlayer3.latestSongSelect = stage選曲;
ConfigIni.nPlayerCount = 2;
ConfigIni.nAILevel = 2;
ConfigIni.bAIBattleMode = true;
//-----------------------------
#endregion
break;
}
foreach( STPlugin pg in this.listプラグイン )
foreach ( STPlugin pg in this.listプラグイン )
{
Directory.SetCurrentDirectory( pg.strプラグインフォルダ );
pg.plugin.Onステージ変更();

View File

@ -55,6 +55,7 @@ namespace TJAPlayer3
const string DANC = @"17_DanC\";
const string TOWER = @"20_Tower\";
const string MODICONS = @"21_ModIcons\";
const string AIBATTLE = @"22_AIBattle\";
// Tower infos
const string TOWERDON = @"Tower_Don\";
@ -861,6 +862,19 @@ namespace TJAPlayer3
#endregion
#region [22_AIBattle]
AIBattle_SectionTime_Panel = TxC(GAME + AIBATTLE + @"SectionTime_Panel.png");
AIBattle_SectionTime_Bar_Base = TxC(GAME + AIBATTLE + @"SectionTime_Bar_Base.png");
AIBattle_SectionTime_Bar_Finish = TxC(GAME + AIBATTLE + @"SectionTime_Bar_Finish.png");
AIBattle_SectionTime_Bar_Normal = TxC(GAME + AIBATTLE + @"SectionTime_Bar_Normal.png");
AIBattle_Batch_Base = TxC(GAME + AIBATTLE + @"Batch_Base.png");
AIBattle_Batch = TxC(GAME + AIBATTLE + @"Batch.png");
#endregion
#endregion
#region 6_
@ -1993,6 +2007,17 @@ namespace TJAPlayer3
#endregion
#region [22_AIBattle]
public CTexture AIBattle_SectionTime_Panel,
AIBattle_SectionTime_Bar_Base,
AIBattle_SectionTime_Bar_Normal,
AIBattle_SectionTime_Bar_Finish,
AIBattle_Batch_Base,
AIBattle_Batch;
#endregion
#endregion

View File

@ -110,7 +110,7 @@ namespace TJAPlayer3
false,
false,
false,
true,
false,
false,
true,
false,
@ -129,7 +129,7 @@ namespace TJAPlayer3
true,
true,
true,
false,
true,
false,
false,
false,

View File

@ -300,7 +300,7 @@ namespace TJAPlayer3
CLangManager.LangInstance.GetString(61));
this.list項目リスト.Add(this.iRollsPerSec);
this.iAILevel = new CItemInteger(CLangManager.LangInstance.GetString(12), 0, 10, TJAPlayer3.ConfigIni.nAILevel,
this.iAILevel = new CItemInteger(CLangManager.LangInstance.GetString(12), 1, 10, TJAPlayer3.ConfigIni.nAILevel,
CLangManager.LangInstance.GetString(13));
this.list項目リスト.Add(this.iAILevel);

View File

@ -197,118 +197,104 @@ namespace TJAPlayer3
#region [ ]
if (this.ctBarAnimeIn.b終了値に達した)
{
if (!bSelect[0] && !isOnOption())
{
if (TJAPlayer3.Pad.b押された(E楽器パート.DRUMS, Eパッド.RightChange) || TJAPlayer3.Input管理.Keyboard.bキーが押された((int)SlimDXKeys.Key.RightArrow))
{
TJAPlayer3.Skin.sound変更音.t再生する();
this.t次に移動(0);
}
else if (TJAPlayer3.Pad.b押された(E楽器パート.DRUMS, Eパッド.LeftChange) || TJAPlayer3.Input管理.Keyboard.bキーが押された((int)SlimDXKeys.Key.LeftArrow))
{
TJAPlayer3.Skin.sound変更音.t再生する();
this.t前に移動(0);
}
if (TJAPlayer3.Pad.b押されたDGB(Eパッド.Decide) ||
(TJAPlayer3.ConfigIni.bEnterがキー割り当てのどこにも使用されていない && TJAPlayer3.Input管理.Keyboard.bキーが押された((int)SlimDXKeys.Key.Return)))
{
if (n現在の選択行[0] == 0)
{
TJAPlayer3.Skin.sound決定音.t再生する();
TJAPlayer3.stage選曲.act曲リスト.ctBarOpen.t開始(100, 260, 2, TJAPlayer3.Timer);
this.bIsDifficltSelect = false;
}
else if (n現在の選択行[0] == 1)
{
TJAPlayer3.Skin.sound決定音.t再生する();
bOption[0] = true;
}
else
{
if (TJAPlayer3.stage選曲.r現在選択中のスコア..nレベル[n現在の選択行[0] - 2] > 0)
{
//TJAPlayer3.stage選曲.ctDonchan_Jump[0].t開始(0, TJAPlayer3.Tx.SongSelect_Donchan_Jump.Length - 1, 1000 / 45, TJAPlayer3.Timer);
CMenuCharacter.tMenuResetTimer(0, CMenuCharacter.ECharacterAnimation.START);
this.bSelect[0] = true;
TJAPlayer3.Skin.sound決定音.t再生する();
TJAPlayer3.Skin.voiceMenuSongDecide[TJAPlayer3.SaveFile]?.t再生する();
if(TJAPlayer3.ConfigIni.nPlayerCount == 2)
{
if (bSelect[1])
{
TJAPlayer3.stage選曲.t曲を選択する(n現在の選択行[0] - 2, 0);
TJAPlayer3.stage選曲.t曲を選択する(n現在の選択行[1] - 2, 1);
}
}
else
{
TJAPlayer3.stage選曲.t曲を選択する(n現在の選択行[0] - 2, 0);
}
}
}
}
if (TJAPlayer3.Pad.b押されたDGB(Eパッド.Cancel) || TJAPlayer3.Input管理.Keyboard.bキーが押された((int)SlimDXKeys.Key.Escape))
{
for (int i = 0; i < TJAPlayer3.ConfigIni.nPlayerCount; i++)
{
if (!bSelect[i] && !isOnOption())
{
TJAPlayer3.Skin.sound決定音.t再生する();
TJAPlayer3.stage選曲.act曲リスト.ctBarOpen.t開始(100, 260, 2, TJAPlayer3.Timer);
this.bIsDifficltSelect = false;
}
}
if (!bSelect[1] && !isOnOption() && TJAPlayer3.ConfigIni.nPlayerCount > 1)
{
if (TJAPlayer3.Pad.b押された(E楽器パート.DRUMS, Eパッド.RBlue2P))
{
TJAPlayer3.Skin.sound変更音.t再生する();
this.t次に移動(1);
}
else if (TJAPlayer3.Pad.b押された(E楽器パート.DRUMS, Eパッド.LBlue2P))
{
TJAPlayer3.Skin.sound変更音.t再生する();
this.t前に移動(1);
}
if (TJAPlayer3.Pad.b押された(E楽器パート.DRUMS, Eパッド.LRed2P) || TJAPlayer3.Pad.b押された(E楽器パート.DRUMS, Eパッド.RRed2P))
{
if (n現在の選択行[1] == 0)
{
TJAPlayer3.Skin.sound決定音.t再生する();
TJAPlayer3.stage選曲.act曲リスト.ctBarOpen.t開始(100, 260, 2, TJAPlayer3.Timer);
this.bIsDifficltSelect = false;
CMenuCharacter.tDisableCounter(CMenuCharacter.ECharacterAnimation.START);
}
else if (n現在の選択行[1] == 1)
{
TJAPlayer3.Skin.sound決定音.t再生する();
bOption[1] = true;
}
else
{
if (TJAPlayer3.stage選曲.r現在選択中のスコア..nレベル[n現在の選択行[1] - 2] > 0)
{
//TJAPlayer3.stage選曲.ctDonchan_Jump[1].t開始(0, TJAPlayer3.Tx.SongSelect_Donchan_Jump.Length - 1, 1000 / 45, TJAPlayer3.Timer);
CMenuCharacter.tMenuResetTimer(1, CMenuCharacter.ECharacterAnimation.START);
bool right = i == 0 ?
(TJAPlayer3.Pad.b押された(E楽器パート.DRUMS, Eパッド.RightChange) || TJAPlayer3.Input管理.Keyboard.bキーが押された((int)SlimDXKeys.Key.RightArrow)) :
(TJAPlayer3.Pad.b押された(E楽器パート.DRUMS, Eパッド.RBlue2P));
this.bSelect[1] = true;
TJAPlayer3.Skin.sound決定音.t再生する();
TJAPlayer3.Skin.voiceMenuSongDecide[TJAPlayer3.GetActualPlayer(1)]?.t再生する();
if (bSelect[0])
{
TJAPlayer3.stage選曲.t曲を選択する(n現在の選択行[0] - 2, 0);
TJAPlayer3.stage選曲.t曲を選択する(n現在の選択行[1] - 2, 1);
}
}
}
}
bool left = i == 0 ?
(TJAPlayer3.Pad.b押された(E楽器パート.DRUMS, Eパッド.LeftChange) || TJAPlayer3.Input管理.Keyboard.bキーが押された((int)SlimDXKeys.Key.LeftArrow)) :
(TJAPlayer3.Pad.b押された(E楽器パート.DRUMS, Eパッド.LBlue2P));
bool decide = i == 0 ?
(TJAPlayer3.Pad.b押されたDGB(Eパッド.Decide) || (TJAPlayer3.ConfigIni.bEnterがキー割り当てのどこにも使用されていない && TJAPlayer3.Input管理.Keyboard.bキーが押された((int)SlimDXKeys.Key.Return))) :
(TJAPlayer3.Pad.b押された(E楽器パート.DRUMS, Eパッド.LRed2P) || TJAPlayer3.Pad.b押された(E楽器パート.DRUMS, Eパッド.RRed2P));
bool cancel = i == 0 ? (TJAPlayer3.Pad.b押されたDGB(Eパッド.Cancel) || TJAPlayer3.Input管理.Keyboard.bキーが押された((int)SlimDXKeys.Key.Escape)) : false;
if (right)
{
TJAPlayer3.Skin.sound変更音.t再生する();
this.t次に移動(i);
}
else if (left)
{
TJAPlayer3.Skin.sound変更音.t再生する();
this.t前に移動(i);
}
if (decide)
{
if (n現在の選択行[i] == 0)
{
TJAPlayer3.Skin.sound決定音.t再生する();
TJAPlayer3.stage選曲.act曲リスト.ctBarOpen.t開始(100, 260, 2, TJAPlayer3.Timer);
this.bIsDifficltSelect = false;
}
else if (n現在の選択行[i] == 1)
{
TJAPlayer3.Skin.sound決定音.t再生する();
bOption[i] = true;
}
else
{
if (TJAPlayer3.stage選曲.r現在選択中のスコア..nレベル[n現在の選択行[0] - 2] > 0)
{
//TJAPlayer3.stage選曲.ctDonchan_Jump[0].t開始(0, TJAPlayer3.Tx.SongSelect_Donchan_Jump.Length - 1, 1000 / 45, TJAPlayer3.Timer);
this.bSelect[i] = true;
TJAPlayer3.Skin.sound決定音.t再生する();
TJAPlayer3.Skin.voiceMenuSongDecide[TJAPlayer3.SaveFile]?.t再生する();
bool allPlayerSelected = true;
for (int i2 = 0; i2 < TJAPlayer3.ConfigIni.nPlayerCount; i2++)
{
if (TJAPlayer3.ConfigIni.bAIBattleMode && i2 == 1) break;
if (!bSelect[i2])
{
allPlayerSelected = false;
break;
}
}
if (allPlayerSelected)
{
for (int i2 = 0; i2 < TJAPlayer3.ConfigIni.nPlayerCount; i2++)
{
CMenuCharacter.tMenuResetTimer(i2, CMenuCharacter.ECharacterAnimation.START);
if (TJAPlayer3.ConfigIni.bAIBattleMode)
{
TJAPlayer3.stage選曲.t曲を選択する(n現在の選択行[0] - 2, i2);
}
else
{
TJAPlayer3.stage選曲.t曲を選択する(n現在の選択行[i2] - 2, i2);
}
}
}
}
}
}
if (cancel)
{
TJAPlayer3.Skin.sound決定音.t再生する();
TJAPlayer3.stage選曲.act曲リスト.ctBarOpen.t開始(100, 260, 2, TJAPlayer3.Timer);
this.bIsDifficltSelect = false;
}
}
}
}
#endregion
bool consideMultiPlay = TJAPlayer3.ConfigIni.nPlayerCount >= 2 && !TJAPlayer3.ConfigIni.bAIBattleMode;
#region [ ]
@ -337,6 +323,8 @@ namespace TJAPlayer3
for(int i = 0; i < TJAPlayer3.ConfigIni.nPlayerCount; i++)
{
if (TJAPlayer3.ConfigIni.bAIBattleMode && i == 1) break;
/*
TJAPlayer3.Tx.Difficulty_Select_Bar[i].Opacity = (int)(ctBarAnimeIn.n現在の値 >= 80 ? (ctBarAnimeIn.n現在の値 - 80) * 2.84f : 0);
TJAPlayer3.Tx.Difficulty_Select_Bar[i].t2D描画(TJAPlayer3.app.Device, (float)this.BarX[n現在の選択行[i]], 242, new RectangleF(0, (n現在の選択行[i] >= 2 ? 114 : 387), 259, 275 - (n現在の選択行[i] >= 2 ? 0 : 164)));
@ -392,6 +380,8 @@ namespace TJAPlayer3
for (int j = 0; j < TJAPlayer3.ConfigIni.nPlayerCount; j++)
{
if (TJAPlayer3.ConfigIni.bAIBattleMode && i == 1) break;
int p = TJAPlayer3.GetActualPlayer(j);
Cスコア.ST譜面情報 idx = TJAPlayer3.stage選曲.r現在選択中のスコア.;
@ -447,7 +437,9 @@ namespace TJAPlayer3
#region [ ]
for(int i = 0; i < TJAPlayer3.ConfigIni.nPlayerCount; i++)
{
{
if (TJAPlayer3.ConfigIni.bAIBattleMode && i == 1) break;
/*
TJAPlayer3.Tx.Difficulty_Select_Bar[i].t2D描画(TJAPlayer3.app.Device,
TJAPlayer3.ConfigIni.nPlayerCount == 2 ? n現在の選択行[0] != n現在の選択行[1] ? (float)this.BarX[n現在の選択行[i]] : i == 0 ? (float)this.BarX[n現在の選択行[i]] - 25 : (float)this.BarX[n現在の選択行[i]] + 25 : (float)this.BarX[n現在の選択行[i]],
@ -455,11 +447,13 @@ namespace TJAPlayer3
new RectangleF(0, 0, 259, 114));
*/
float moveX = n現在の選択行[0] == n現在の選択行[1] ? (i == 0 ? -TJAPlayer3.Skin.SongSelect_Difficulty_Select_Bar_Move[0] : TJAPlayer3.Skin.SongSelect_Difficulty_Select_Bar_Move[0]) : 0;
bool overlap = n現在の選択行[0] == n現在の選択行[1] && consideMultiPlay;
float moveX = overlap ? (i == 0 ? -TJAPlayer3.Skin.SongSelect_Difficulty_Select_Bar_Move[0] : TJAPlayer3.Skin.SongSelect_Difficulty_Select_Bar_Move[0]) : 0;
moveX += (((float)Math.Sin((float)ctBarAnime[i].n現在の値 * (Math.PI / 180)) * TJAPlayer3.Skin.SongSelect_Difficulty_Select_Bar_Anime[0]) -
(((float)Math.Cos((float)ctBarAnimeIn.n現在の値 * (Math.PI / 170)) + 1.0f) * TJAPlayer3.Skin.SongSelect_Difficulty_Select_Bar_AnimeIn[0]));
float moveY = n現在の選択行[0] == n現在の選択行[1] ? (i == 0 ? -TJAPlayer3.Skin.SongSelect_Difficulty_Select_Bar_Move[1] : TJAPlayer3.Skin.SongSelect_Difficulty_Select_Bar_Move[1]) : 0;
float moveY = overlap ? (i == 0 ? -TJAPlayer3.Skin.SongSelect_Difficulty_Select_Bar_Move[1] : TJAPlayer3.Skin.SongSelect_Difficulty_Select_Bar_Move[1]) : 0;
moveY += (((float)Math.Sin((float)ctBarAnime[i].n現在の値 * (Math.PI / 180)) * TJAPlayer3.Skin.SongSelect_Difficulty_Select_Bar_Anime[1]) -
(((float)Math.Cos((float)ctBarAnimeIn.n現在の値 * (Math.PI / 170)) + 1.0f) * TJAPlayer3.Skin.SongSelect_Difficulty_Select_Bar_Anime[1]));

View File

@ -575,6 +575,8 @@ namespace TJAPlayer3
for (int i = 0; i < TJAPlayer3.ConfigIni.nPlayerCount; i++)
{
if (TJAPlayer3.ConfigIni.bAIBattleMode && i == 1) break;
int p = TJAPlayer3.GetActualPlayer(i);
TJAPlayer3.Tx.SongSelect_Table[currentPads[i]]?.t2D描画(TJAPlayer3.app.Device, TJAPlayer3.Skin.SongSelect_Table_X[i], TJAPlayer3.Skin.SongSelect_Table_Y[i]);
@ -592,10 +594,12 @@ namespace TJAPlayer3
}
TJAPlayer3.Tx.SongSelect_Coin_Slot?.t2D描画(TJAPlayer3.app.Device, 0, 0,
new Rectangle(0, 0, (TJAPlayer3.Tx.SongSelect_Coin_Slot.sz画像サイズ.Width / 2) + ((TJAPlayer3.ConfigIni.nPlayerCount > 1) ? (TJAPlayer3.Tx.SongSelect_Coin_Slot.sz画像サイズ.Width / 2) : 0), TJAPlayer3.Tx.SongSelect_Coin_Slot.sz画像サイズ.Height));
new Rectangle(0, 0, (TJAPlayer3.Tx.SongSelect_Coin_Slot.sz画像サイズ.Width / 2) + ((TJAPlayer3.ConfigIni.nPlayerCount > 1 && !TJAPlayer3.ConfigIni.bAIBattleMode) ? (TJAPlayer3.Tx.SongSelect_Coin_Slot.sz画像サイズ.Width / 2) : 0), TJAPlayer3.Tx.SongSelect_Coin_Slot.sz画像サイズ.Height));
for (int i = 0; i < TJAPlayer3.ConfigIni.nPlayerCount; i++)
{
if (TJAPlayer3.ConfigIni.bAIBattleMode && i == 1) break;
int p = TJAPlayer3.GetActualPlayer(i);
if (TJAPlayer3.NamePlateConfig.data.Medals[p] >= 0)

View File

@ -208,6 +208,59 @@ namespace TJAPlayer3
}
}
AIBattleState = 0;
this.AIBattleSections = new List<AIBattleSection>();
CDTX.CChip endChip = null;
for (int i = 0; i < listChip[0].Count; i++)
{
CDTX.CChip chip = listChip[0][i];
if (endChip == null || (chip.n発声時刻ms > endChip.n発声時刻ms && chip.nチャンネル番号 == 0x50))
{
endChip = chip;
}
}
int battleSectionCount = (endChip.n発声時刻ms * 5) / 180000;
int battleSectionTime = 0;
int nowBattleSectionCount = 1;
for (int i = 0; i < listChip[0].Count; i++)
{
CDTX.CChip chip = listChip[0][i];
if (nowBattleSectionCount == battleSectionCount)
{
chip = endChip;
i = listChip[0].Count - 1;
}
int endtime = endChip.n発声時刻ms / battleSectionCount;
bool isAddSection = (nowBattleSectionCount != battleSectionCount) ?
chip.n発声時刻ms >= endtime * nowBattleSectionCount :
i == listChip[0].Count - 1;
if (isAddSection)
{
AIBattleSection aIBattleSection = new AIBattleSection();
aIBattleSection.StartTime = battleSectionTime;
aIBattleSection.EndTime = chip.n発声時刻ms;
aIBattleSection.Length = aIBattleSection.EndTime - aIBattleSection.StartTime;
this.AIBattleSections.Add(aIBattleSection);
battleSectionTime = aIBattleSection.EndTime;
nowBattleSectionCount++;
}
}
NowAIBattleSectionCount = 0;
ctChipAnime = new CCounter[2];
ctChipAnimeLag = new CCounter[2];
for (int i = 0; i < 2; i++)
@ -308,6 +361,7 @@ namespace TJAPlayer3
this.nJPOSSCROLL = new int[ 4 ];
this.bLEVELHOLD = new bool[]{ false, false, false, false };
// Double play set here
this.bDoublePlay = TJAPlayer3.ConfigIni.nPlayerCount >= 2 ? true : false;
@ -601,6 +655,7 @@ namespace TJAPlayer3
public CAct演奏DrumsFooter actFooter;
public CAct演奏DrumsMob actMob;
public Dan_Cert actDan;
public AIBattle actAIBattle;
public CAct演奏Drums特訓モード actTokkun;
public bool bPAUSE;
public bool[] bIsAlreadyCleared;
@ -723,6 +778,50 @@ namespace TJAPlayer3
public double nBranch条件数値B;
private readonly int[] NowProcessingChip = new int[] { 0, 0 };
public int AIBattleState;
public class AIBattleSection
{
public enum EndType
{
None,
Clear,
Lose
}
public int Length;
public int StartTime;
public int EndTime;
public EndType End;
public bool IsAnimated;
}
public List<AIBattleSection> AIBattleSections;
public int NowAIBattleSectionCount;
public int NowAIBattleSectionTime;
public AIBattleSection NowAIBattleSection
{
get
{
return AIBattleSections[Math.Min(NowAIBattleSectionCount, AIBattleSections.Count - 1)];
}
}
private void PassAIBattleSection()
{
if (AIBattleState >= 0)
{
NowAIBattleSection.End = AIBattleSection.EndType.Clear;
}
else
{
NowAIBattleSection.End = AIBattleSection.EndType.Lose;
}
actAIBattle.BatchAnimeCounter.n現在の値 = 0;
}
public void AddMixer( CSound cs, bool _b演奏終了後も再生が続くチップである )
{
stmixer stm = new stmixer()
@ -1391,7 +1490,7 @@ namespace TJAPlayer3
bAutoPlay = TJAPlayer3.ConfigIni.b太鼓パートAutoPlay;
break;
case 1:
bAutoPlay = TJAPlayer3.ConfigIni.b太鼓パートAutoPlay2P || TJAPlayer3.ConfigIni.nAILevel > 0;
bAutoPlay = TJAPlayer3.ConfigIni.b太鼓パートAutoPlay2P || TJAPlayer3.ConfigIni.bAIBattleMode;
break;
}
@ -1435,7 +1534,7 @@ namespace TJAPlayer3
if (bAutoPlay)
{
int rollSpeed = TJAPlayer3.ConfigIni.nRollsPerSec;
if (TJAPlayer3.ConfigIni.nAILevel > 0 && nPlayer == 1)
if (TJAPlayer3.ConfigIni.bAIBattleMode && nPlayer == 1)
rollSpeed = TJAPlayer3.ConfigIni.apAIPerformances[TJAPlayer3.ConfigIni.nAILevel - 1].nRollSpeed;
if (this.bPAUSE == false && rollSpeed > 0) // && TJAPlayer3.ConfigIni.bAuto先生の連打)
@ -1565,7 +1664,7 @@ namespace TJAPlayer3
if (eJudgeResult != E判定.Auto && eJudgeResult != E判定.Miss)
{
this.actJudgeString.Start(nPlayer, (bAutoPlay && TJAPlayer3.ConfigIni.nAILevel == 0) ? E判定.Auto : eJudgeResult);
this.actJudgeString.Start(nPlayer, (bAutoPlay && !TJAPlayer3.ConfigIni.bAIBattleMode) ? E判定.Auto : eJudgeResult);
TJAPlayer3.stage演奏ドラム画面.actLaneTaiko.Start(pChip.nチャンネル番号, eJudgeResult, true, nPlayer);
TJAPlayer3.stage演奏ドラム画面.actChipFireD.Start(pChip.nチャンネル番号, eJudgeResult, nPlayer);
}
@ -1694,6 +1793,19 @@ namespace TJAPlayer3
this.actCombo.ctコンボ加算[nPlayer].n現在の値 = 0;
}
if (nPlayer == 0)
{
AIBattleState += 2;
AIBattleState = Math.Min(AIBattleState, 9);
}
else if (nPlayer == 1)
{
AIBattleState -= 2;
AIBattleState = Math.Max(AIBattleState, -9);
}
if (this.bIsMiss[nPlayer])
{
returnChara();
@ -1729,6 +1841,19 @@ namespace TJAPlayer3
this.actCombo.ctコンボ加算[nPlayer].n現在の値 = 0;
}
if (nPlayer == 0)
{
AIBattleState += 1;
AIBattleState = Math.Min(AIBattleState, 9);
}
else if (nPlayer == 1)
{
AIBattleState -= 1;
AIBattleState = Math.Max(AIBattleState, -9);
}
if (this.bIsMiss[nPlayer])
{
returnChara();
@ -1805,6 +1930,20 @@ namespace TJAPlayer3
this.actCombo.ctコンボ加算[nPlayer].n現在の値 = 0;
}
if (nPlayer == 0)
{
AIBattleState += 2;
AIBattleState = Math.Min(AIBattleState, 9);
}
else if (nPlayer == 1)
{
AIBattleState -= 2;
AIBattleState = Math.Max(AIBattleState, -9);
}
if (this.bIsMiss[nPlayer])
{
returnChara();
@ -1842,6 +1981,20 @@ namespace TJAPlayer3
this.actCombo.ctコンボ加算[nPlayer].n現在の値 = 0;
}
if (nPlayer == 0)
{
AIBattleState += 1;
AIBattleState = Math.Min(AIBattleState, 9);
}
else if (nPlayer == 1)
{
AIBattleState -= 1;
AIBattleState = Math.Max(AIBattleState, -9);
}
if (this.bIsMiss[nPlayer])
{
returnChara();
@ -2979,6 +3132,8 @@ namespace TJAPlayer3
var n現在時刻ms = (long)(CSound管理.rc演奏用タイマ.n現在時刻ms * (((double)TJAPlayer3.ConfigIni.n演奏速度) / 20.0));
NowAIBattleSectionTime = (int)n現在時刻ms - NowAIBattleSection.StartTime;
if ( this.r指定時刻に一番近い未ヒットChip( (long)n現在時刻ms, 0x50, 0, 1000000, nPlayer ) == null )
{
this.actChara.b演奏中[nPlayer] = false;
@ -3005,7 +3160,7 @@ namespace TJAPlayer3
bAutoPlay = configIni.b太鼓パートAutoPlay;
break;
case 1:
bAutoPlay = configIni.b太鼓パートAutoPlay2P || configIni.nAILevel > 0;
bAutoPlay = configIni.b太鼓パートAutoPlay2P || TJAPlayer3.ConfigIni.bAIBattleMode;
dTX = TJAPlayer3.DTX_2P;
break;
default:
@ -3286,7 +3441,21 @@ namespace TJAPlayer3
case 0x50: // 小節線
{
if ( !pChip.bHit && ( pChip.nバーからの距離dot.Taiko < 0 ) )
{
{
if (NowAIBattleSectionTime >= NowAIBattleSection.Length && NowAIBattleSection.End == AIBattleSection.EndType.None && nPlayer == 0)
{
PassAIBattleSection();
NowAIBattleSectionCount++;
if (AIBattleSections.Count > NowAIBattleSectionCount)
{
NowAIBattleSectionTime = 0;
}
NowAIBattleSectionTime = (int)n現在時刻ms - NowAIBattleSection.StartTime;
}
this.actChara.b演奏中[nPlayer] = true;
if( this.actPlayInfo.NowMeasure[nPlayer] == 0 )
{
@ -3915,7 +4084,7 @@ namespace TJAPlayer3
bAutoPlay = configIni.b太鼓パートAutoPlay;
break;
case 1:
bAutoPlay = configIni.b太鼓パートAutoPlay2P || configIni.nAILevel > 0;
bAutoPlay = configIni.b太鼓パートAutoPlay2P || TJAPlayer3.ConfigIni.bAIBattleMode;
dTX = TJAPlayer3.DTX_2P;
break;
default:
@ -4253,7 +4422,18 @@ namespace TJAPlayer3
public void t演奏やりなおし()
{
TJAPlayer3.DTX.t全チップの再生停止とミキサーからの削除();
AIBattleState = 0;
NowAIBattleSectionCount = 0;
NowAIBattleSectionTime = 0;
for (int i = 0; i < AIBattleSections.Count; i++)
{
AIBattleSections[i].End = AIBattleSection.EndType.None;
AIBattleSections[i].IsAnimated = false;
}
TJAPlayer3.DTX.t全チップの再生停止とミキサーからの削除();
this.t数値の初期化( true, true );
this.actAVI.tReset();
this.actPanel.t歌詞テクスチャを削除する();
@ -4644,7 +4824,7 @@ namespace TJAPlayer3
public E判定 AlterJudgement(int player, E判定 judgement, bool reroll)
{
int AILevel = TJAPlayer3.ConfigIni.nAILevel;
if (AILevel > 0 && player == 1)
if (TJAPlayer3.ConfigIni.bAIBattleMode && player == 1)
{
if (reroll)
nDice = TJAPlayer3.Random.Next(1000);

View File

@ -0,0 +1,195 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using FDK;
// Minimalist menu class to use for custom menus
namespace TJAPlayer3
{
class AIBattle : CStage
{
public AIBattle()
{
base.b活性化してない = true;
}
public override void On活性化()
{
// On activation
base.On活性化();
}
public override void On非活性化()
{
// On de-activation
base.On非活性化();
}
public override void OnManagedリソースの作成()
{
// Ressource allocation
if (!base.b活性化してない)
{
BarFlashCounter = new CCounter(0, 1000.0, 0.00035, CSound管理.rc演奏用タイマ);
BatchAnimeCounter = new CCounter(0, 10000.0, 1.0 / 1000.0, CSound管理.rc演奏用タイマ);
base.OnManagedリソースの作成();
}
}
public override void OnManagedリソースの解放()
{
// Ressource freeing
if (!base.b活性化してない)
{
base.OnManagedリソースの解放();
}
}
public override int On進行描画()
{
BarFlashCounter.t進行LoopDb();
BatchAnimeCounter.t進行db();
TJAPlayer3.Tx.AIBattle_SectionTime_Panel?.t2D描画(TJAPlayer3.app.Device, TJAPlayer3.Skin.Game_AIBattle_SectionTime_Panel[0], TJAPlayer3.Skin.Game_AIBattle_SectionTime_Panel[1]);
TJAPlayer3.Tx.AIBattle_SectionTime_Bar_Base?.t2D描画(TJAPlayer3.app.Device, TJAPlayer3.Skin.Game_AIBattle_SectionTime_Bar[0], TJAPlayer3.Skin.Game_AIBattle_SectionTime_Bar[1],
new System.Drawing.RectangleF(0, 0, TJAPlayer3.Tx.AIBattle_SectionTime_Bar_Base.szテクスチャサイズ.Width, TJAPlayer3.Tx.AIBattle_SectionTime_Bar_Base.szテクスチャサイズ.Height));
void drawBar(CTexture barTex, float length)
{
barTex?.t2D描画(TJAPlayer3.app.Device, TJAPlayer3.Skin.Game_AIBattle_SectionTime_Bar[0], TJAPlayer3.Skin.Game_AIBattle_SectionTime_Bar[1],
new System.Drawing.RectangleF(0, 0, barTex.szテクスチャサイズ.Width * length, barTex.szテクスチャサイズ.Height));
}
var nowSection = TJAPlayer3.stage演奏ドラム画面.NowAIBattleSection;
float nowLength = TJAPlayer3.stage演奏ドラム画面.NowAIBattleSectionTime / (float)nowSection.Length;
nowLength = Math.Min(nowLength, 1.0f);
if (nowLength < 0.75)
{
drawBar(TJAPlayer3.Tx.AIBattle_SectionTime_Bar_Normal, nowLength);
}
else
{
TJAPlayer3.Tx.AIBattle_SectionTime_Bar_Finish.Opacity = (int)(Math.Sin((BarFlashCounter.n現在の値 / 1000.0) * Math.PI) * 255);
drawBar(TJAPlayer3.Tx.AIBattle_SectionTime_Bar_Finish, nowLength);
}
for (int i = 0; i < TJAPlayer3.stage演奏ドラム画面.AIBattleSections.Count; i++)
{
int upDown = (i % 2);
int base_width = TJAPlayer3.Tx.AIBattle_Batch_Base.szテクスチャサイズ.Width / 6;
int base_height = TJAPlayer3.Tx.AIBattle_Batch_Base.szテクスチャサイズ.Height;
int base_x = TJAPlayer3.Skin.Game_AIBattle_Batch_Base[0] + (TJAPlayer3.Skin.Game_AIBattle_Batch_Move[0] * i);
int base_y = TJAPlayer3.Skin.Game_AIBattle_Batch_Base[1] + (TJAPlayer3.Skin.Game_AIBattle_Batch_Move[1] * upDown);
int nowBatchBaseRectX;
if (i == 0)
{
nowBatchBaseRectX = 2 + (upDown == 0 ? 0 : 1);
}
else if (i == TJAPlayer3.stage演奏ドラム画面.AIBattleSections.Count - 1)
{
nowBatchBaseRectX = 4 + (upDown == 0 ? 0 : 1);
}
else
{
nowBatchBaseRectX = (upDown == 0 ? 0 : 1);
}
TJAPlayer3.Tx.AIBattle_Batch_Base?.t2D描画(TJAPlayer3.app.Device, base_x, base_y, new System.Drawing.RectangleF(base_width * nowBatchBaseRectX, 0, base_width, base_height));
}
for (int i = 0; i < TJAPlayer3.stage演奏ドラム画面.NowAIBattleSectionCount; i++)
{
var section = TJAPlayer3.stage演奏ドラム画面.AIBattleSections[i];
int upDown = (i % 2);
int width = TJAPlayer3.Tx.AIBattle_Batch.szテクスチャサイズ.Width / 6;
int height = TJAPlayer3.Tx.AIBattle_Batch.szテクスチャサイズ.Height / 2;
float value = 0.0f;
float inScale = 0.0f;
int drawFrame = 5;
if (section.IsAnimated)
{
value = 1.0f;
}
else
{
if (BatchAnimeCounter.n現在の値 < 100)
{
inScale = 1.0f - (BatchAnimeCounter.n現在の値 / 100.0f);
}
else if (BatchAnimeCounter.n現在の値 >= 700 && BatchAnimeCounter.n現在の値 < 1000)
{
drawFrame = (int)(((BatchAnimeCounter.n現在の値 - 700) / 300.0) * 4.0);
}
else if (BatchAnimeCounter.n現在の値 >= 1400 && BatchAnimeCounter.n現在の値 <= 1500)
{
value = Math.Min((BatchAnimeCounter.n現在の値 - 1400) / 100.0f, 1.0f);
}
else if (BatchAnimeCounter.n現在の値 >= 1500)
{
value = 1.0f;
section.IsAnimated = true;
}
}
float _x = TJAPlayer3.Skin.Game_AIBattle_Batch[0] + (TJAPlayer3.Skin.Game_AIBattle_Batch_Move[0] * i);
float _y = TJAPlayer3.Skin.Game_AIBattle_Batch[1] + (TJAPlayer3.Skin.Game_AIBattle_Batch_Move[1] * upDown);
_x = TJAPlayer3.Skin.Game_AIBattle_Batch_Anime[0] + ((_x - TJAPlayer3.Skin.Game_AIBattle_Batch_Anime[0]) * value);
_y = TJAPlayer3.Skin.Game_AIBattle_Batch_Anime[1] + ((_y - TJAPlayer3.Skin.Game_AIBattle_Batch_Anime[1]) * value);
float size_x = TJAPlayer3.Skin.Game_AIBattle_Batch_Anime_Size[0] +
((TJAPlayer3.Skin.Game_AIBattle_Batch_Size[0] - TJAPlayer3.Skin.Game_AIBattle_Batch_Anime_Size[0]) * value);
float size_y = TJAPlayer3.Skin.Game_AIBattle_Batch_Anime_Size[1] +
((TJAPlayer3.Skin.Game_AIBattle_Batch_Size[1] - TJAPlayer3.Skin.Game_AIBattle_Batch_Anime_Size[1]) * value);
TJAPlayer3.Tx.AIBattle_Batch.vc拡大縮小倍率.X = (size_x / (float)width) + inScale;
TJAPlayer3.Tx.AIBattle_Batch.vc拡大縮小倍率.Y = (size_y / (float)height) + inScale;
switch (section.End)
{
case CStage演奏画面共通.AIBattleSection.EndType.Clear:
TJAPlayer3.Tx.AIBattle_Batch?.t2D拡大率考慮中央基準描画(TJAPlayer3.app.Device, _x, _y, new System.Drawing.RectangleF(width * drawFrame, 0, width, height));
break;
case CStage演奏画面共通.AIBattleSection.EndType.Lose:
TJAPlayer3.Tx.AIBattle_Batch?.t2D拡大率考慮中央基準描画(TJAPlayer3.app.Device, _x, _y, new System.Drawing.RectangleF(width * drawFrame, height, width, height));
break;
}
}
return 0;
}
#region [Private]
private CCounter BarFlashCounter;
public CCounter BatchAnimeCounter;
#endregion
}
}

View File

@ -98,7 +98,7 @@ namespace TJAPlayer3
if (TJAPlayer3.stage演奏ドラム画面.bDoublePlay)
{
// 2P
if (TJAPlayer3.ConfigIni.nAILevel == 0 || TJAPlayer3.Tx.Taiko_Background[9] == null)
if (!TJAPlayer3.ConfigIni.bAIBattleMode || TJAPlayer3.Tx.Taiko_Background[9] == null)
TJAPlayer3.Tx.Taiko_Background[1]?.t2D描画(TJAPlayer3.app.Device, TJAPlayer3.Skin.Game_Taiko_Background_X[1], TJAPlayer3.Skin.Game_Taiko_Background_Y[1]);
else
TJAPlayer3.Tx.Taiko_Background[9]?.t2D描画(TJAPlayer3.app.Device, TJAPlayer3.Skin.Game_Taiko_Background_X[1], TJAPlayer3.Skin.Game_Taiko_Background_Y[1]);
@ -292,7 +292,7 @@ namespace TJAPlayer3
bAutoPlay = configIni.b太鼓パートAutoPlay;
break;
case 1:
bAutoPlay = configIni.b太鼓パートAutoPlay2P || configIni.nAILevel > 0;
bAutoPlay = configIni.b太鼓パートAutoPlay2P || TJAPlayer3.ConfigIni.bAIBattleMode;
break;
default:
break;

View File

@ -91,7 +91,7 @@ namespace TJAPlayer3
for (int i = 0; i < TJAPlayer3.ConfigIni.nPlayerCount; i++)
{
if (i == 1 && TJAPlayer3.ConfigIni.nAILevel > 0 && TJAPlayer3.Tx.Lane_Background_AI != null)
if (i == 1 && TJAPlayer3.ConfigIni.bAIBattleMode && TJAPlayer3.Tx.Lane_Background_AI != null)
TJAPlayer3.Tx.Lane_Background_AI?.t2D描画(TJAPlayer3.app.Device, TJAPlayer3.Skin.Game_Lane_X[i], TJAPlayer3.Skin.Game_Lane_Y[i]);
else
TJAPlayer3.Tx.Lane_Background_Main?.t2D描画(TJAPlayer3.app.Device, TJAPlayer3.Skin.Game_Lane_X[i], TJAPlayer3.Skin.Game_Lane_Y[i]);

View File

@ -113,6 +113,10 @@ namespace TJAPlayer3
{
bgOrigindir += "Dan";
}
else if (TJAPlayer3.ConfigIni.bAIBattleMode)
{
bgOrigindir += "AI";
}
else
{
bgOrigindir += "Normal";

View File

@ -70,6 +70,7 @@ namespace TJAPlayer3
base.list子Activities.Add(this.actDan = new Dan_Cert());
base.list子Activities.Add(this.actTokkun = new CAct演奏Drums特訓モード());
base.list子Activities.Add(this.actAIBattle = new AIBattle());
#region[ ]
ST文字位置[] st文字位置Array = new ST文字位置[ 12 ];
ST文字位置 st文字位置 = new ST文字位置();
@ -552,7 +553,13 @@ namespace TJAPlayer3
this.actDan.On進行描画();
this.actMtaiko.On進行描画();
this.actMtaiko.On進行描画();
if (TJAPlayer3.ConfigIni.bAIBattleMode)
{
this.actAIBattle.On進行描画();
}
this.GoGoSplash.On進行描画();
this.t進行描画_リアルタイム判定数表示();
if (TJAPlayer3.ConfigIni.bTokkunMode)
@ -612,6 +619,7 @@ namespace TJAPlayer3
actTokkun.On進行描画();
}
bIsFinishedEndAnime = this.actEnd.On進行描画() == 1 ? true : false;
bIsFinishedFadeout = this.t進行描画_フェードイン_アウト();
@ -978,7 +986,7 @@ namespace TJAPlayer3
if (!TJAPlayer3.ConfigIni.bTokkunMode && TJAPlayer3.ConfigIni.b太鼓パートAutoPlay && isPad1P)//2020.05.18 Mr-Ojii オート時の入力キャンセル
break;
else if ((TJAPlayer3.ConfigIni.b太鼓パートAutoPlay2P || TJAPlayer3.ConfigIni.nAILevel > 0) && isPad2P)
else if ((TJAPlayer3.ConfigIni.b太鼓パートAutoPlay2P || TJAPlayer3.ConfigIni.bAIBattleMode) && isPad2P)
break;
var padTo = nUsePlayer == 0 ? nPad - 12 : nPad - 12 - 4;
var isDon = padTo < 2 ? true : false;
@ -1657,7 +1665,7 @@ namespace TJAPlayer3
bAutoPlay = TJAPlayer3.ConfigIni.b太鼓パートAutoPlay;
break;
case 1:
bAutoPlay = TJAPlayer3.ConfigIni.b太鼓パートAutoPlay2P || TJAPlayer3.ConfigIni.nAILevel > 0;
bAutoPlay = TJAPlayer3.ConfigIni.b太鼓パートAutoPlay2P || TJAPlayer3.ConfigIni.bAIBattleMode;
break;
case 2:
case 3:
@ -2187,7 +2195,7 @@ namespace TJAPlayer3
if (pChip.n発声時刻ms < (CSound管理.rc演奏用タイマ.n現在時刻 * (((double)TJAPlayer3.ConfigIni.n演奏速度) / 20.0)) && pChip.nーツ終了時刻ms > (CSound管理.rc演奏用タイマ.n現在時刻 * (((double)TJAPlayer3.ConfigIni.n演奏速度) / 20.0)))
{
//時間内でかつ0x9Aじゃないならならヒット処理
if (!NotesManager.IsRollEnd(pChip) && (nPlayer == 0 ? TJAPlayer3.ConfigIni.b太鼓パートAutoPlay : (TJAPlayer3.ConfigIni.b太鼓パートAutoPlay2P || TJAPlayer3.ConfigIni.nAILevel > 0)))
if (!NotesManager.IsRollEnd(pChip) && (nPlayer == 0 ? TJAPlayer3.ConfigIni.b太鼓パートAutoPlay : (TJAPlayer3.ConfigIni.b太鼓パートAutoPlay2P || TJAPlayer3.ConfigIni.bAIBattleMode)))
this.tチップのヒット処理(pChip.n発声時刻ms, pChip, E楽器パート.TAIKO, false, 0, nPlayer);
}
}

View File

@ -205,7 +205,7 @@ namespace TJAPlayer3
currentFloorPositionMax140 = Math.Min(TJAPlayer3.stage演奏ドラム画面.actPlayInfo.NowMeasure[0] / (float)nightTime, 1f);
}
LuaUpdateValues.Call(TJAPlayer3.FPS.DeltaTime, TJAPlayer3.FPS.n現在のFPS, TJAPlayer3.stage演奏ドラム画面.bIsAlreadyCleared, (double)currentFloorPositionMax140);
LuaUpdateValues.Call(TJAPlayer3.FPS.DeltaTime, TJAPlayer3.FPS.n現在のFPS, TJAPlayer3.stage演奏ドラム画面.bIsAlreadyCleared, (double)currentFloorPositionMax140, TJAPlayer3.stage演奏ドラム画面.AIBattleState);
/*LuaScript.SetObjectToPath("fps", TJAPlayer3.FPS.n現在のFPS);
LuaScript.SetObjectToPath("deltaTime", TJAPlayer3.FPS.DeltaTime);
LuaScript.SetObjectToPath("isClear", TJAPlayer3.stage演奏ドラム画面.bIsAlreadyCleared);

View File

@ -62,7 +62,7 @@ namespace TJAPlayer3
public bool isAutoDisabled(int player)
{
return ((player == 0 && !TJAPlayer3.ConfigIni.b太鼓パートAutoPlay)
|| (player == 1 && !TJAPlayer3.ConfigIni.b太鼓パートAutoPlay2P && TJAPlayer3.ConfigIni.nAILevel == 0));
|| (player == 1 && !TJAPlayer3.ConfigIni.b太鼓パートAutoPlay2P && !TJAPlayer3.ConfigIni.bAIBattleMode));
}
@ -626,7 +626,7 @@ namespace TJAPlayer3
if (TJAPlayer3.ConfigIni.b太鼓パートAutoPlay)
this.nEarnedMedalsCount[0] = 0;
if (TJAPlayer3.ConfigIni.b太鼓パートAutoPlay2P || TJAPlayer3.ConfigIni.nAILevel > 0)
if (TJAPlayer3.ConfigIni.b太鼓パートAutoPlay2P || TJAPlayer3.ConfigIni.bAIBattleMode)
this.nEarnedMedalsCount[1] = 0;
TJAPlayer3.NamePlateConfig.tEarnCoins(this.nEarnedMedalsCount);
@ -1651,7 +1651,7 @@ namespace TJAPlayer3
for (int i = 0; i < TJAPlayer3.ConfigIni.nPlayerCount; i++)
{
if ((i == 0 && TJAPlayer3.ConfigIni.b太鼓パートAutoPlay)
|| (i == 1 && (TJAPlayer3.ConfigIni.b太鼓パートAutoPlay2P || TJAPlayer3.ConfigIni.nAILevel > 0)))
|| (i == 1 && (TJAPlayer3.ConfigIni.b太鼓パートAutoPlay2P || TJAPlayer3.ConfigIni.bAIBattleMode)))
continue;
int actualPlayer = TJAPlayer3.GetActualPlayer(i);

View File

@ -68,7 +68,7 @@ namespace TJAPlayer3
string title = CLangManager.LangInstance.GetString(911);
string dan = stages[Math.Max(0, TJAPlayer3.ConfigIni.nAILevel - 1)] + "面";
if (TJAPlayer3.ConfigIni.nAILevel == 0 || actualPlayer == 0)
if (!TJAPlayer3.ConfigIni.bAIBattleMode || actualPlayer == 0)
{
name = TJAPlayer3.NamePlateConfig.data.Name[player];
title = TJAPlayer3.NamePlateConfig.data.Title[player];

View File

@ -153,6 +153,7 @@
<Compile Include="Songs\C曲リストードComparers\C曲リストードComparerSubtitle.cs" />
<Compile Include="Stages\01.StartUp\CCharacter.cs" />
<Compile Include="Stages\01.StartUp\CPuchichara.cs" />
<Compile Include="Stages\07.Game\Taiko\AIBattle.cs" />
<Compile Include="Stages\07.Game\Taiko\EndAnimeScript.cs" />
<Compile Include="Stages\07.Game\Taiko\NotesManager.cs" />
<Compile Include="Stages\07.Game\Taiko\ScriptBG.cs" />

View File

@ -5,16 +5,18 @@ local fps = 0
local deltaTime = 0
local isClear = { false, false }
local towerNightNum = 0
local battleState = 0
function setConstValues(_playerCount, _p1IsBlue)
playerCount = _playerCount
p1IsBlue = _p1IsBlue
end
function updateValues(_deltaTime, _fps, _isClear, _towerNightNum)
function updateValues(_deltaTime, _fps, _isClear, _towerNightNum, _battleState)
deltaTime = _deltaTime
fps = _fps
isClear = _isClear
towerNightNum = _towerNightNum
deltaTime = _deltaTime
battleState = _battleState
end

View File

@ -398,4 +398,21 @@ Game_Training_SpeedDisplay_XY=110,370
Game_Training_SmallNumber_Width=26
Game_Training_BigNumber_Width=20
Game_Training_BigNumber_Width=20
Game_AIBattle_SectionTime_Panel=202,178
Game_AIBattle_SectionTime_Bar=205,193
Game_AIBattle_Batch_Base=150,83
Game_AIBattle_Batch=185,118
Game_AIBattle_Batch_Size=70,70
Game_AIBattle_Batch_Anime=397,102
Game_AIBattle_Batch_Anime_Size=274,274
Game_AIBattle_Batch_Move=30,15

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 546 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 497 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@ -0,0 +1,45 @@
--func:DrawText(x, y, text);
--func:DrawNum(x, y, num);
--func:AddGraph("filename");
--func:DrawGraph(x, y, filename);
--func:SetOpacity(opacity, "filename");
--func:SetScale(xscale, yscale, "filename");
--func:SetColor(r, g, b, "filename");
inAnimeCounter = -20
function clearIn(player)
end
function clearOut(player)
end
function init()
func:AddGraph("Base.png")
for i = 0 , 18 do
func:AddGraph("Down_1P/"..tostring(i)..".png")
func:AddGraph("Down_2P/"..tostring(i)..".png")
end
end
function update()
inAnimeCounter = inAnimeCounter + (20 * deltaTime)
end
function draw()
func:DrawGraph(0, 0, "Base.png")
for i = 0 , 18 do
pos = i - 9
if 9 - math.abs(pos) <= inAnimeCounter then
x = -32 + (71 * i)
y = 536
if pos <= battleState then
func:DrawGraph(x, y, "Down_1P/"..tostring(i)..".png")
else
func:DrawGraph(x, y, "Down_2P/"..tostring(i)..".png")
end
end
end
end