From 52c06a1c47c41e50621a14200391caf0cf2a5578 Mon Sep 17 00:00:00 2001 From: huiyadanli Date: Tue, 8 Aug 2023 00:15:56 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9C=80=E5=90=8E=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E8=A7=92=E8=89=B2=E5=87=BA=E6=88=98=E7=9A=84=E6=97=B6=E5=80=99?= =?UTF-8?q?=E6=98=AF=E8=87=AA=E5=8A=A8=E7=9A=84=EF=BC=8C=E6=89=80=E4=BB=A5?= =?UTF-8?q?=E8=A6=81=E9=A2=9D=E5=A4=96=E6=B7=BB=E5=8A=A0=E8=A7=92=E8=89=B2?= =?UTF-8?q?=E8=A2=AB=E5=87=BB=E8=B4=A5=E7=9A=84=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- GeniusInvokationAutoToy/Core/GameControl.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/GeniusInvokationAutoToy/Core/GameControl.cs b/GeniusInvokationAutoToy/Core/GameControl.cs index efe7497..5a4d3d2 100644 --- a/GeniusInvokationAutoToy/Core/GameControl.cs +++ b/GeniusInvokationAutoToy/Core/GameControl.cs @@ -921,7 +921,7 @@ public void WaitForMyTurn(Duel duel, int waitTime = 0) } else { - // 多延迟2s // 保证阵亡提示已经完成显示 + // 多延迟2s // 保证被击败提示已经完成显示 inMyActionCount++; if (inMyActionCount == 3) { @@ -1162,6 +1162,12 @@ public void AppendCharacterStatus(Character character, Mat srcMat) public Character WhichCharacterActiveWithRetry(Duel duel) { + // 检查角色是否被击败 // 这里又检查一次是因为最后一个角色存活的情况下,会自动出战 + bool[] defeatedArray = WhatCharacterDefeated(duel.CharacterCardRects); + for (int i = defeatedArray.Length - 1; i >= 0; i--) + { + duel.Characters[i + 1].IsDefeated = defeatedArray[i]; + } return Retry.Do(() => WhichCharacterActiveByHpWord(duel), TimeSpan.FromSeconds(0.3), 2); }