feat: 开启备选关卡的情况下剿灭结束后尝试剩余开放的备选关卡

fix #3626
This commit is contained in:
uye
2023-02-07 17:27:46 +08:00
parent 39fe9b7dcc
commit 08c594cf83
4 changed files with 24 additions and 1 deletions

View File

@@ -476,6 +476,11 @@ namespace MaaWpfGui
copilotModel.AddLog(Localization.GetString("CombatError"), UILogColor.Error);
}
if (taskChain == "Fight" && (mainModel.Stage == "Annihilation"))
{
mainModel.AddLog(Localization.GetString("AnnihilationTaskFailed"), UILogColor.Warning);
}
break;
case AsstMsg.TaskChainStart:

View File

@@ -782,6 +782,17 @@ namespace MaaWpfGui
var asstProxy = _container.Get<AsstProxy>();
bool mainFightRet = asstProxy.AsstAppendFight(Stage, medicine, stone, times, DropsItemId, drops_quantity);
if (mainFightRet && (Stage == "Annihilation") && _container.Get<SettingsViewModel>().UseAlternateStage)
{
foreach (var stage in new[] { Stage1, Stage2, Stage3 })
{
if (IsStageOpen(stage) && (stage != Stage))
{
mainFightRet = asstProxy.AsstAppendFight(stage, medicine, 0, int.MaxValue, string.Empty, 0);
}
}
}
if (mainFightRet && UseRemainingSanityStage && (RemainingSanityStage != string.Empty))
{
return asstProxy.AsstAppendFight(RemainingSanityStage, 0, 0, int.MaxValue, string.Empty, 0, false);

View File

@@ -74,7 +74,7 @@
<system:String x:Key="StartingRoles">Starting Roles</system:String>
<system:String x:Key="StartingCoreChar">Starting Oper (single, CN name only)</system:String>
<system:String x:Key="StartingCoreCharTip">Only supports the CN name of a single oper, default if not filled.</system:String>
<system:String x:Key="RoguelikeUseSupportUnit">Select "Starting Oper" from support unit list</system:String>
<system:String x:Key="RoguelikeUseSupportUnit">Select &quot;Starting Oper&quot; from support unit list</system:String>
<system:String x:Key="RoguelikeUseNonFriendSupport">Enable nonfirend support</system:String>
<system:String x:Key="DeploymentWithPause">Deployment with Pause, Works for IS, Copilot and SSS, Beta function, Not recommended yet</system:String>
<system:String x:Key="AdbLiteEnabled">Use Adb Lite (Experimental)</system:String>
@@ -100,6 +100,10 @@
<system:String x:Key="OvercomingYourWeaknesses">Overcoming Your Weaknesses</system:String>
<system:String x:Key="AsYourHeartDesires">As Your Heart Desires</system:String>
<system:String x:Key="AlgorithmFinish">Algorithm Finish</system:String>
<system:String x:Key="AlgorithmBadge">Algorithm Badge</system:String>
<system:String x:Key="AlgorithmConstructionPoint">Algorithm Construction Point</system:String>
<system:String x:Key="NotSelected">Not selected</system:String>
<system:String x:Key="Official">Official (CN)</system:String>
<system:String x:Key="Bilibili">Bilibili</system:String>
@@ -242,6 +246,7 @@
<system:String x:Key="Mall">Credit Store</system:String>
<system:String x:Key="Mission">Collect mission rewards</system:String>
<system:String x:Key="AutoRoguelike">Auto I.S.</system:String>
<system:String x:Key="ReclamationAlgorithm">Reclamation Algorithm</system:String>
<system:String x:Key="SelectAll">Select All</system:String>
<system:String x:Key="Inverse">Inverse</system:String>
@@ -324,6 +329,7 @@
<system:String x:Key="AboutToShutdown">All tasks are completed shutting down. Do you want to cancel?</system:String>
<system:String x:Key="ShutdownPrompt">Tip</system:String>
<system:String x:Key="HibernatePrompt">Task(s) completed, about to hibernate</system:String>
<system:String x:Key="AnnihilationTaskFailed">Annihilation task failed, will try to use alternate stage, some combat settings will not be effective</system:String>
<!-- Logs -->
<!-- Farming -->

View File

@@ -329,6 +329,7 @@
<system:String x:Key="AboutToShutdown">已刷完,即将关机,是否取消?</system:String>
<system:String x:Key="ShutdownPrompt">提示</system:String>
<system:String x:Key="HibernatePrompt">已刷完,即将休眠</system:String>
<system:String x:Key="AnnihilationTaskFailed">剿灭任务失败,将尝试使用剩余备选关卡,部分战斗设置将不生效</system:String>
<!-- 日志 -->
<!-- 一键长草 -->