diff --git a/docs/协议文档/集成文档.md b/docs/协议文档/集成文档.md
index 56d0edb329..d54412502e 100644
--- a/docs/协议文档/集成文档.md
+++ b/docs/协议文档/集成文档.md
@@ -214,7 +214,7 @@ AsstTaskId ASSTAPI AsstAppendTask(AsstHandle handle, const char* type, const cha
// 1 - 刷源石锭,第一层投资完就退出
// 2 - 【即将弃用】两者兼顾,投资过后再退出,没有投资就继续往后打
// 3 - 开发中...
- // 4 - 烧热水,到达第三层后直接退出
+ // 4 - 刷开局,到达第三层后直接退出
"starts_count": int, // 开始探索 次数,可选,默认 INT_MAX。达到后自动停止任务
"investment_enabled": bool, // 是否投资源石锭,默认开
"investments_count": int,
@@ -224,6 +224,8 @@ AsstTaskId ASSTAPI AsstAppendTask(AsstHandle handle, const char* type, const cha
"squad": string, // 开局分队,可选,例如 "突击战术分队" 等,默认 "指挥分队"
"roles": string, // 开局职业组,可选,例如 "先手必胜" 等,默认 "取长补短"
"core_char": string, // 开局干员名,可选,仅支持单个干员中!文!名!。默认识别练度自动选择
+ "start_with_elite_two": bool // 是否在刷开局模式下凹开局干员精二直升,可选,默认 false
+ "only_start_with_elite_two": bool // 是否只凹开局干员精二直升且不进行作战,可选,默认 false,start_with_elite_two为true时有效
"use_support": bool, // 开局干员是否为助战干员,可选,默认 false
"use_nonfriend_support": bool, // 是否可以是非好友助战干员,可选,默认 false,use_support为true时有效
"refresh_trader_with_dice": bool // 是否用骰子刷新商店购买特殊商品,目前支持水月肉鸽的指路鳞,可选,默认 false
diff --git a/src/MaaCore/Task/Interface/RoguelikeTask.cpp b/src/MaaCore/Task/Interface/RoguelikeTask.cpp
index f17e0165ec..0627575e9e 100644
--- a/src/MaaCore/Task/Interface/RoguelikeTask.cpp
+++ b/src/MaaCore/Task/Interface/RoguelikeTask.cpp
@@ -95,6 +95,7 @@ bool asst::RoguelikeTask::set_params(const json::value& params)
m_roguelike_config_ptr->set_difficulty(0);
// 是否凹指定干员开局直升
m_roguelike_config_ptr->set_start_with_elite_two(params.get("start_with_elite_two", false));
+ m_roguelike_config_ptr->set_only_start_with_elite_two(params.get("only_start_with_elite_two", false));
// 设置层数选点策略,相关逻辑在 RoguelikeStrategyChangeTaskPlugin
{
diff --git a/src/MaaCore/Task/Roguelike/RoguelikeConfig.h b/src/MaaCore/Task/Roguelike/RoguelikeConfig.h
index ce0b650aef..80361a8dab 100644
--- a/src/MaaCore/Task/Roguelike/RoguelikeConfig.h
+++ b/src/MaaCore/Task/Roguelike/RoguelikeConfig.h
@@ -12,7 +12,7 @@ namespace asst
Investment = 1, // 1 - 刷源石锭,第一层投资完就退出,不期而遇采用保守策略
// 2 - 【已移除】两者兼顾,投资过后再退出,没有投资就继续往后打
// 3 - 尝试通关,激进策略(TODO)
- Collectible = 4, // 4 - 刷开局藏品,以获得热水壶或者演讲稿开局,不期而遇采用保守策略
+ Collectible = 4, // 4 - 刷开局,以获得热水壶或者演讲稿开局或只凹直升,不期而遇采用保守策略
};
class RoguelikeTheme
@@ -53,12 +53,15 @@ namespace asst
int get_difficulty() { return m_difficulty; }
void set_start_with_elite_two(bool start_with_elite_two) { m_start_with_elite_two = start_with_elite_two; }
bool get_start_with_elite_two() { return m_start_with_elite_two; }
+ void set_only_start_with_elite_two(bool only_start_with_elite_two) { m_only_start_with_elite_two = only_start_with_elite_two; }
+ bool get_only_start_with_elite_two() { return m_only_start_with_elite_two; }
private:
std::string m_theme; // 肉鸽主题
RoguelikeMode m_mode = RoguelikeMode::Exp;
int m_difficulty = 0;
bool m_start_with_elite_two = false;
+ bool m_only_start_with_elite_two = false;
/* 以下为每次重置 */
public:
diff --git a/src/MaaCore/Task/Roguelike/RoguelikeDifficultySelectionTaskPlugin.cpp b/src/MaaCore/Task/Roguelike/RoguelikeDifficultySelectionTaskPlugin.cpp
index f064606737..97fb858510 100644
--- a/src/MaaCore/Task/Roguelike/RoguelikeDifficultySelectionTaskPlugin.cpp
+++ b/src/MaaCore/Task/Roguelike/RoguelikeDifficultySelectionTaskPlugin.cpp
@@ -37,7 +37,9 @@ bool asst::RoguelikeDifficultySelectionTaskPlugin::_run()
// 当前难度
int difficulty = m_config->get_difficulty();
- if (m_config->get_theme() != RoguelikeTheme::Phantom && mode == RoguelikeMode::Collectible) {
+ // 是否只凹直升
+ bool only_start_with_elite_two = m_config->get_only_start_with_elite_two();
+ if (m_config->get_theme() != RoguelikeTheme::Phantom && mode == RoguelikeMode::Collectible && !only_start_with_elite_two) {
if (difficulty == INT_MAX) {
ProcessTask(*this, { m_config->get_theme() + "@Roguelike@ChooseDifficulty_Hardest" }).run();
}
diff --git a/src/MaaCore/Task/Roguelike/RoguelikeRecruitTaskPlugin.cpp b/src/MaaCore/Task/Roguelike/RoguelikeRecruitTaskPlugin.cpp
index 10dad87db4..dbea5c195c 100644
--- a/src/MaaCore/Task/Roguelike/RoguelikeRecruitTaskPlugin.cpp
+++ b/src/MaaCore/Task/Roguelike/RoguelikeRecruitTaskPlugin.cpp
@@ -429,6 +429,7 @@ bool asst::RoguelikeRecruitTaskPlugin::recruit_appointed_char(const std::string&
int i = 0;
// 是否凹直升
bool start_with_elite_two = m_config->get_start_with_elite_two();
+ bool only_start_with_elite_two = m_config->get_only_start_with_elite_two();
// 当前肉鸽难度
int difficulty = m_config->get_difficulty();
@@ -453,14 +454,16 @@ bool asst::RoguelikeRecruitTaskPlugin::recruit_appointed_char(const std::string&
Log.info(__FUNCTION__, "| Oper list:", oper_names);
if (it != chars.cend()) {
- // 需要凹直升且当前为max难度时
- if (start_with_elite_two && difficulty == INT_MAX) {
+ // 需要凹直升且当前为max难度或者只凹直升时
+ if (start_with_elite_two && (difficulty == INT_MAX || only_start_with_elite_two)) {
if (it->elite == 2) {
m_task_ptr->set_enable(false);
}
else {
- // 重置难度并放弃
- m_config->set_difficulty(0);
+ // 非只凹直升时重置难度并放弃
+ if (!only_start_with_elite_two) {
+ m_config->set_difficulty(0);
+ }
ProcessTask(*this, { m_config->get_theme() + "@Roguelike@ExitThenAbandon" })
.set_times_limit("Roguelike@Abandon", 0)
.run();
diff --git a/src/MaaWpfGui/Constants/ConfigurationKeys.cs b/src/MaaWpfGui/Constants/ConfigurationKeys.cs
index bb1962da62..3e0a0b7e22 100644
--- a/src/MaaWpfGui/Constants/ConfigurationKeys.cs
+++ b/src/MaaWpfGui/Constants/ConfigurationKeys.cs
@@ -103,6 +103,7 @@ namespace MaaWpfGui.Constants
public const string RoguelikeRoles = "Roguelike.Roles";
public const string RoguelikeCoreChar = "Roguelike.CoreChar";
public const string RoguelikeStartWithEliteTwo = "Roguelike.RoguelikeStartWithEliteTwo";
+ public const string RoguelikeOnlyStartWithEliteTwo = "Roguelike.RoguelikeOnlyStartWithEliteTwo";
public const string RoguelikeUseSupportUnit = "Roguelike.RoguelikeUseSupportUnit";
public const string RoguelikeEnableNonfriendSupport = "Roguelike.RoguelikeEnableNonfriendSupport";
public const string RoguelikeDelayAbortUntilCombatComplete = "Roguelike.RoguelikeDelayAbortUntilCombatComplete";
diff --git a/src/MaaWpfGui/Main/AsstProxy.cs b/src/MaaWpfGui/Main/AsstProxy.cs
index 9cc32ff935..6e56299565 100644
--- a/src/MaaWpfGui/Main/AsstProxy.cs
+++ b/src/MaaWpfGui/Main/AsstProxy.cs
@@ -1972,13 +1972,14 @@ namespace MaaWpfGui.Main
/// TODO.
/// TODO.
/// 是否凹开局直升
+ /// 是否只凹开局直升,不进行作战
/// 是否core_char使用好友助战
/// 是否允许使用非好友助战
/// 肉鸽名字。["Phantom", "Mizuki", "Sami"]
/// 是否用骰子刷新商店购买特殊商品,目前支持水月肉鸽的指路鳞
/// 是否成功。
public bool AsstAppendRoguelike(int mode, int starts, bool investmentEnabled, bool investmentEnterSecondFloor, int invests, bool stopWhenFull,
- string squad, string roles, string coreChar, bool startWithEliteTwo, bool useSupport, bool enableNonFriendSupport, string theme, bool refreshTraderWithDice)
+ string squad, string roles, string coreChar, bool startWithEliteTwo, bool onlyStartWithEliteTwo, bool useSupport, bool enableNonFriendSupport, string theme, bool refreshTraderWithDice)
{
var taskParams = new JObject
{
@@ -2011,7 +2012,8 @@ namespace MaaWpfGui.Main
taskParams["core_char"] = coreChar;
}
- taskParams["start_with_elite_two"] = startWithEliteTwo;
+ taskParams["start_with_elite_two"] = mode == 4 && theme != "Phantom" && startWithEliteTwo;
+ taskParams["only_start_with_elite_two"] = mode == 4 && theme != "Phantom" && startWithEliteTwo && onlyStartWithEliteTwo;
taskParams["use_support"] = useSupport;
taskParams["use_nonfriend_support"] = enableNonFriendSupport;
taskParams["refresh_trader_with_dice"] = theme == "Mizuki" && refreshTraderWithDice;
diff --git a/src/MaaWpfGui/Res/Localizations/en-us.xaml b/src/MaaWpfGui/Res/Localizations/en-us.xaml
index 4c9925e1f2..eb9ab05464 100644
--- a/src/MaaWpfGui/Res/Localizations/en-us.xaml
+++ b/src/MaaWpfGui/Res/Localizations/en-us.xaml
@@ -108,6 +108,7 @@
Starting Operator (CN name only)
Only supports the CN name of a single operator, default if not filled.
Repeat for「Starting Operator」Elite 2
+ Only Repeat for「Starting Operator」Elite 2, No Battle
Select 「Starting Operator」 from support unit list
Enable non-friend support
Stops after clearing the combat
diff --git a/src/MaaWpfGui/Res/Localizations/ja-jp.xaml b/src/MaaWpfGui/Res/Localizations/ja-jp.xaml
index f48a9488bb..5d7280d4d2 100644
--- a/src/MaaWpfGui/Res/Localizations/ja-jp.xaml
+++ b/src/MaaWpfGui/Res/Localizations/ja-jp.xaml
@@ -108,6 +108,7 @@
最初のオペレーター(一人だけ、中国名のみを入力可能)
一人のオペレーターの中国名のみをサポートします。入力されていない場合はデフォルトになります。
「最初のオペレーター」直接昇進
+ 指定オペレーターの昇進招集までリセマラし、戦闘を行わない
「最初のオペレーター」をサポートから選択
フレンド以外のサポートの使用を許可
戦闘クリアで止まる
diff --git a/src/MaaWpfGui/Res/Localizations/ko-kr.xaml b/src/MaaWpfGui/Res/Localizations/ko-kr.xaml
index e4158239a6..9ab0046ac4 100644
--- a/src/MaaWpfGui/Res/Localizations/ko-kr.xaml
+++ b/src/MaaWpfGui/Res/Localizations/ko-kr.xaml
@@ -108,6 +108,7 @@
시작 오퍼레이터 (1명)
단일 오퍼레이터의 중국어 이름만 지원하며, 입력하지 않으면 기본값이 선택됩니다.
시초 에 간부 가 직진 하다
+ 오로지 시초 오퍼레이터의 직진만을 요구하고 전투를 진행하지 않음
시작 오퍼레이터로 지원 유닛 사용
친구가 아니어도 지원 유닛 사용
전투 클리어 후 정지
diff --git a/src/MaaWpfGui/Res/Localizations/zh-cn.xaml b/src/MaaWpfGui/Res/Localizations/zh-cn.xaml
index be586cad85..179b7d6a90 100644
--- a/src/MaaWpfGui/Res/Localizations/zh-cn.xaml
+++ b/src/MaaWpfGui/Res/Localizations/zh-cn.xaml
@@ -102,12 +102,13 @@
若启用自定义换班,该字段仅针对 autofill 和使用干员编组的房间有效
刷等级,尽可能稳定地打更多层数
刷源石锭,到达第二层后直接退出
- 烧热水,到达第三层后直接退出
+ 刷开局,刷取热水壶或精二干员开局
开局分队
开局职业组
开局干员 (单个)
仅支持单个干员中文名,不填写则默认选择。
凹「开局干员」直升精二
+ 只凹「开局干员」直升精二,不进行作战
「开局干员」使用助战
可以使用非好友助战
在战斗结束前延迟「停止」动作
diff --git a/src/MaaWpfGui/Res/Localizations/zh-tw.xaml b/src/MaaWpfGui/Res/Localizations/zh-tw.xaml
index 82154f2da5..d38c8a26d2 100644
--- a/src/MaaWpfGui/Res/Localizations/zh-tw.xaml
+++ b/src/MaaWpfGui/Res/Localizations/zh-tw.xaml
@@ -102,12 +102,13 @@
若啟用自定義換班,該欄位僅針對 autofill 和 幹員編組 的房間有效
刷等級,盡可能穩定地打更多層數
刷源石錠,到達第二層後直接退出
- 燒熱水,到達第三層後直接退出
+ 刷開局,刷取熱水壺或精二幹員開局
開局分隊
開局職業組
開局幹員(單個)
僅支持單個幹員中文名,不填寫則預設選擇。
凹「開局幹員」直升精二
+ 只凹「開局幹員」直升精二,不進行作戰
「開局幹員」使用助戰
可以使用非好友助戰
中止行為等待至當前戰鬥結束後
diff --git a/src/MaaWpfGui/ViewModels/UI/SettingsViewModel.cs b/src/MaaWpfGui/ViewModels/UI/SettingsViewModel.cs
index 49140d3610..c429df14e2 100644
--- a/src/MaaWpfGui/ViewModels/UI/SettingsViewModel.cs
+++ b/src/MaaWpfGui/ViewModels/UI/SettingsViewModel.cs
@@ -1908,7 +1908,7 @@ namespace MaaWpfGui.ViewModels.UI
private string _roguelikeStartWithEliteTwo = ConfigurationHelper.GetValue(ConfigurationKeys.RoguelikeStartWithEliteTwo, false.ToString());
///
- /// Gets or sets a value indicating whether use support unit.
+ /// Gets or sets a value indicating whether core char need start with elite two.
///
public bool RoguelikeStartWithEliteTwo
{
@@ -1920,11 +1920,31 @@ namespace MaaWpfGui.ViewModels.UI
RoguelikeUseSupportUnit = false;
}
+ if (!value && RoguelikeOnlyStartWithEliteTwo)
+ {
+ RoguelikeOnlyStartWithEliteTwo = false;
+ }
+
SetAndNotify(ref _roguelikeStartWithEliteTwo, value.ToString());
ConfigurationHelper.SetValue(ConfigurationKeys.RoguelikeStartWithEliteTwo, value.ToString());
}
}
+ private string _roguelikeOnlyStartWithEliteTwo = ConfigurationHelper.GetValue(ConfigurationKeys.RoguelikeOnlyStartWithEliteTwo, false.ToString());
+
+ ///
+ /// Gets or sets a value indicating whether only need with elite two's core char.
+ ///
+ public bool RoguelikeOnlyStartWithEliteTwo
+ {
+ get => bool.Parse(_roguelikeOnlyStartWithEliteTwo);
+ set
+ {
+ SetAndNotify(ref _roguelikeOnlyStartWithEliteTwo, value.ToString());
+ ConfigurationHelper.SetValue(ConfigurationKeys.RoguelikeOnlyStartWithEliteTwo, value.ToString());
+ }
+ }
+
private string _roguelikeUseSupportUnit = ConfigurationHelper.GetValue(ConfigurationKeys.RoguelikeUseSupportUnit, false.ToString());
///
diff --git a/src/MaaWpfGui/ViewModels/UI/TaskQueueViewModel.cs b/src/MaaWpfGui/ViewModels/UI/TaskQueueViewModel.cs
index cd262e353b..d7e0bc58e1 100644
--- a/src/MaaWpfGui/ViewModels/UI/TaskQueueViewModel.cs
+++ b/src/MaaWpfGui/ViewModels/UI/TaskQueueViewModel.cs
@@ -1350,7 +1350,7 @@ namespace MaaWpfGui.ViewModels.UI
mode, Instances.SettingsViewModel.RoguelikeStartsCount,
Instances.SettingsViewModel.RoguelikeInvestmentEnabled, Instances.SettingsViewModel.RoguelikeInvestmentEnterSecondFloor, Instances.SettingsViewModel.RoguelikeInvestsCount, Instances.SettingsViewModel.RoguelikeStopWhenInvestmentFull,
Instances.SettingsViewModel.RoguelikeSquad, Instances.SettingsViewModel.RoguelikeRoles, Instances.SettingsViewModel.RoguelikeCoreChar,
- Instances.SettingsViewModel.RoguelikeStartWithEliteTwo, Instances.SettingsViewModel.RoguelikeUseSupportUnit,
+ Instances.SettingsViewModel.RoguelikeStartWithEliteTwo, Instances.SettingsViewModel.RoguelikeOnlyStartWithEliteTwo, Instances.SettingsViewModel.RoguelikeUseSupportUnit,
Instances.SettingsViewModel.RoguelikeEnableNonfriendSupport, Instances.SettingsViewModel.RoguelikeTheme, Instances.SettingsViewModel.RoguelikeRefreshTraderWithDice);
}
diff --git a/src/MaaWpfGui/Views/UserControl/RoguelikeSettingsUserControl.xaml b/src/MaaWpfGui/Views/UserControl/RoguelikeSettingsUserControl.xaml
index 95a8e97779..4af1092898 100644
--- a/src/MaaWpfGui/Views/UserControl/RoguelikeSettingsUserControl.xaml
+++ b/src/MaaWpfGui/Views/UserControl/RoguelikeSettingsUserControl.xaml
@@ -132,6 +132,16 @@
Text="{DynamicResource RoguelikeStartWithEliteTwo}"
TextWrapping="Wrap" />
+
+
+