mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-16 09:50:40 +08:00
feat: 增加肉鸽单独凹精二模式
This commit is contained in:
@@ -215,6 +215,7 @@ AsstTaskId ASSTAPI AsstAppendTask(AsstHandle handle, const char* type, const cha
|
||||
// 2 - 【即将弃用】两者兼顾,投资过后再退出,没有投资就继续往后打
|
||||
// 3 - 开发中...
|
||||
// 4 - 烧热水,到达第三层后直接退出
|
||||
// 5 - 凹精二,不进行后续作战
|
||||
"starts_count": int, // 开始探索 次数,可选,默认 INT_MAX。达到后自动停止任务
|
||||
"investment_enabled": bool, // 是否投资源石锭,默认开
|
||||
"investments_count": int,
|
||||
|
||||
@@ -13,6 +13,7 @@ namespace asst
|
||||
// 2 - 【已移除】两者兼顾,投资过后再退出,没有投资就继续往后打
|
||||
// 3 - 尝试通关,激进策略(TODO)
|
||||
Collectible = 4, // 4 - 刷开局藏品,以获得热水壶或者演讲稿开局,不期而遇采用保守策略
|
||||
StartEliteTwo = 5, // 5 - 只刷直升,有直升就结束任务
|
||||
};
|
||||
|
||||
class RoguelikeTheme
|
||||
@@ -41,7 +42,7 @@ namespace asst
|
||||
static constexpr bool is_valid_mode(RoguelikeMode mode)
|
||||
{
|
||||
return mode == RoguelikeMode::Exp || mode == RoguelikeMode::Investment ||
|
||||
mode == RoguelikeMode::Collectible;
|
||||
mode == RoguelikeMode::Collectible || mode == RoguelikeMode::StartEliteTwo;
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
@@ -431,6 +431,8 @@ bool asst::RoguelikeRecruitTaskPlugin::recruit_appointed_char(const std::string&
|
||||
bool start_with_elite_two = m_config->get_start_with_elite_two();
|
||||
// 当前肉鸽难度
|
||||
int difficulty = m_config->get_difficulty();
|
||||
// 当前肉鸽模式
|
||||
RoguelikeMode mode = m_config->get_mode();
|
||||
|
||||
for (; i != SwipeTimes; ++i) {
|
||||
if (need_exit()) {
|
||||
@@ -453,14 +455,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 (mode == RoguelikeMode::StartEliteTwo || (start_with_elite_two && difficulty == INT_MAX)) {
|
||||
if (it->elite == 2) {
|
||||
m_task_ptr->set_enable(false);
|
||||
}
|
||||
else {
|
||||
// 重置难度并放弃
|
||||
m_config->set_difficulty(0);
|
||||
// 烧开水模式时重置难度并放弃
|
||||
if (mode == RoguelikeMode::Collectible) {
|
||||
m_config->set_difficulty(0);
|
||||
}
|
||||
ProcessTask(*this, { m_config->get_theme() + "@Roguelike@ExitThenAbandon" })
|
||||
.set_times_limit("Roguelike@Abandon", 0)
|
||||
.run();
|
||||
|
||||
@@ -103,6 +103,7 @@
|
||||
<system:String x:Key="RoguelikeStrategyExp">Gain Experience Points, clear as many nodes as possible</system:String>
|
||||
<system:String x:Key="RoguelikeStrategyGold">Invests coins, exits after arriving at the second floor</system:String>
|
||||
<system:String x:Key="RoguelikeLastReward">Fight to obtain starting rewards, reach the third floor then exit</system:String>
|
||||
<system:String x:Key="RoguelikeStartEliteTwo">Repeat for Starting Operator Elite 2</system:String>
|
||||
<system:String x:Key="StartingSquad">Starting Squad</system:String>
|
||||
<system:String x:Key="StartingRoles">Starting Roles</system:String>
|
||||
<system:String x:Key="StartingCoreChar">Starting Operator (CN name only)</system:String>
|
||||
|
||||
@@ -103,6 +103,7 @@
|
||||
<system:String x:Key="RoguelikeStrategyExp">経験値を取得し、できるだけクリア</system:String>
|
||||
<system:String x:Key="RoguelikeStrategyGold">源石錐の収集、2階到着後終了</system:String>
|
||||
<system:String x:Key="RoguelikeLastReward">序盤の報酬を得るために戦い、3階到着後終了</system:String>
|
||||
<system:String x:Key="RoguelikeStartEliteTwo">凹精二、後続作戦は行わない</system:String>
|
||||
<system:String x:Key="StartingSquad">最初の分隊</system:String>
|
||||
<system:String x:Key="StartingRoles">最初の職業</system:String>
|
||||
<system:String x:Key="StartingCoreChar">最初のオペレーター(一人だけ、中国名のみを入力可能)</system:String>
|
||||
|
||||
@@ -103,6 +103,7 @@
|
||||
<system:String x:Key="RoguelikeStrategyExp">레벨 우선, 최대한 많은 구역 클리어</system:String>
|
||||
<system:String x:Key="RoguelikeStrategyGold">오리지늄각뿔 우선, 2번째 구역 도달 즉시 탐험 중도 포기</system:String>
|
||||
<system:String x:Key="RoguelikeLastReward">전기주전자 획득, 3번째 구역 도달 즉시 탐험 중도 포기</system:String>
|
||||
<system:String x:Key="RoguelikeStartEliteTwo">요정 2 는 후속 작전 을 하지 않는다</system:String>
|
||||
<system:String x:Key="StartingSquad">시작 분대</system:String>
|
||||
<system:String x:Key="StartingRoles">모집 조합</system:String>
|
||||
<system:String x:Key="StartingCoreChar">시작 오퍼레이터 (1명)</system:String>
|
||||
|
||||
@@ -103,6 +103,7 @@
|
||||
<system:String x:Key="RoguelikeStrategyExp">刷等级,尽可能稳定地打更多层数</system:String>
|
||||
<system:String x:Key="RoguelikeStrategyGold">刷源石锭,到达第二层后直接退出</system:String>
|
||||
<system:String x:Key="RoguelikeLastReward">烧热水,到达第三层后直接退出</system:String>
|
||||
<system:String x:Key="RoguelikeStartEliteTwo">凹精二,不进行后续作战</system:String>
|
||||
<system:String x:Key="StartingSquad">开局分队</system:String>
|
||||
<system:String x:Key="StartingRoles">开局职业组</system:String>
|
||||
<system:String x:Key="StartingCoreChar">开局干员 (单个)</system:String>
|
||||
|
||||
@@ -103,6 +103,7 @@
|
||||
<system:String x:Key="RoguelikeStrategyExp">刷等級,盡可能穩定地打更多層數</system:String>
|
||||
<system:String x:Key="RoguelikeStrategyGold">刷源石錠,到達第二層後直接退出</system:String>
|
||||
<system:String x:Key="RoguelikeLastReward">燒熱水,到達第三層後直接退出</system:String>
|
||||
<system:String x:Key="RoguelikeStartEliteTwo">凹靜二,不進行後續作戰</system:String>
|
||||
<system:String x:Key="StartingSquad">開局分隊</system:String>
|
||||
<system:String x:Key="StartingRoles">開局職業組</system:String>
|
||||
<system:String x:Key="StartingCoreChar">開局幹員(單個)</system:String>
|
||||
|
||||
@@ -260,6 +260,7 @@ namespace MaaWpfGui.ViewModels.UI
|
||||
// new CombData { Display = "两者兼顾,投资过后退出", Value = "2" } // 弃用
|
||||
// new CombData { Display = Localization.GetString("3"), Value = "3" }, // 开发中
|
||||
new CombinedData { Display = LocalizationHelper.GetString("RoguelikeLastReward"), Value = "4" },
|
||||
new CombinedData { Display = LocalizationHelper.GetString("RoguelikeStartEliteTwo"), Value = "5" },
|
||||
};
|
||||
|
||||
RoguelikeThemeList = new List<CombinedData>
|
||||
|
||||
@@ -125,8 +125,9 @@
|
||||
ToolTip="{DynamicResource StartingCoreCharTip}" />
|
||||
<CheckBox
|
||||
Margin="0,10"
|
||||
IsChecked="{Binding RoguelikeStartWithEliteTwo}"
|
||||
Visibility="{c:Binding 'RoguelikeMode == "4" and RoguelikeTheme != "Phantom"'}">
|
||||
IsChecked="{c:Binding 'RoguelikeStartWithEliteTwo or RoguelikeMode == "5"'}"
|
||||
IsEnabled="{c:Binding 'RoguelikeMode != "5"'}"
|
||||
Visibility="{c:Binding '(RoguelikeMode == "4" or RoguelikeMode == "5") and RoguelikeTheme != "Phantom"'}">
|
||||
<TextBlock
|
||||
Block.TextAlignment="Left"
|
||||
Text="{DynamicResource RoguelikeStartWithEliteTwo}"
|
||||
|
||||
Reference in New Issue
Block a user