diff --git a/src/MaaCore/Task/Interface/RoguelikeTask.cpp b/src/MaaCore/Task/Interface/RoguelikeTask.cpp index b21747c384..8d49272e25 100644 --- a/src/MaaCore/Task/Interface/RoguelikeTask.cpp +++ b/src/MaaCore/Task/Interface/RoguelikeTask.cpp @@ -144,14 +144,24 @@ bool asst::RoguelikeTask::set_params(const json::value& params) if (mode == RoguelikeMode::Investment) { m_debug_plugin_ptr->set_enable(false); - // 战斗后奖励只拿钱 - Task.set_task_base(theme + "@Roguelike@DropsFlag", theme + "@Roguelike@DropsFlag_mode1"); + bool investment_with_more_score = params.get("investment_with_more_score", false); + if (!params.contains("investment_with_more_score") && params.contains("investment_enter_second_floor")) { + investment_with_more_score = params.get("investment_enter_second_floor", true); + Log.warn("================ DEPRECATED ================"); + Log.warn("`investment_enter_second_floor` has been deprecated since v5.2.1; Please use 'investment_with_more_score'"); + Log.warn("================ DEPRECATED ================"); + } + m_roguelike_config_ptr->set_invest_with_more_score(investment_with_more_score); // 刷源石锭模式是否进入第二层 - if (params.get("investment_enter_second_floor", true)) { + if (investment_with_more_score) { + // 战斗后奖励默认 + Task.set_task_base(theme + "@Roguelike@DropsFlag", theme + "@Roguelike@DropsFlag_default"); m_roguelike_task_ptr->set_times_limit("StageTraderInvestCancel", INT_MAX); m_roguelike_task_ptr->set_times_limit("StageTraderLeaveConfirm", 0, ProcessTask::TimesLimitType::Post); } else { + // 战斗后奖励只拿钱 + Task.set_task_base(theme + "@Roguelike@DropsFlag", theme + "@Roguelike@DropsFlag_mode1"); m_roguelike_task_ptr->set_times_limit("StageTraderInvestCancel", 0); m_roguelike_task_ptr->set_times_limit("StageTraderLeaveConfirm", INT_MAX); } diff --git a/src/MaaCore/Task/Roguelike/RoguelikeConfig.h b/src/MaaCore/Task/Roguelike/RoguelikeConfig.h index 82d0e7803e..4ea116e6a9 100644 --- a/src/MaaCore/Task/Roguelike/RoguelikeConfig.h +++ b/src/MaaCore/Task/Roguelike/RoguelikeConfig.h @@ -67,6 +67,8 @@ namespace asst int get_invest_maximum() const { return m_invest_maximum; } void set_invest_stop_when_full(bool value) { m_invest_stop_when_full = value; } bool get_invest_stop_when_full() const { return m_invest_stop_when_full; } + void set_invest_with_more_score(bool value) { m_invest_with_more_score = value; } + bool get_invest_with_more_score() const { return m_invest_with_more_score; } private: std::string m_theme; // 主题 @@ -80,6 +82,7 @@ namespace asst std::vector m_start_foldartal_list; // 需要凹的板子 int m_invest_maximum = 0; // 投资次数上限 bool m_invest_stop_when_full = false; // 存款满了就停止 + bool m_invest_with_more_score = false; // 投资时招募、购物刷分 /* 以下为每次重置 */ public: diff --git a/src/MaaCore/Task/Roguelike/RoguelikeShoppingTaskPlugin.cpp b/src/MaaCore/Task/Roguelike/RoguelikeShoppingTaskPlugin.cpp index 58735c565d..130e158251 100644 --- a/src/MaaCore/Task/Roguelike/RoguelikeShoppingTaskPlugin.cpp +++ b/src/MaaCore/Task/Roguelike/RoguelikeShoppingTaskPlugin.cpp @@ -22,7 +22,7 @@ bool asst::RoguelikeShoppingTaskPlugin::verify(AsstMsg msg, const json::value& d } if (details.get("details", "task", "").ends_with("Roguelike@TraderRandomShopping")) { - return m_config->get_mode() != RoguelikeMode::Investment; + return m_config->get_mode() != RoguelikeMode::Investment || m_config->get_invest_with_more_score(); } else { return false; diff --git a/src/MaaWpfGui/Main/AsstProxy.cs b/src/MaaWpfGui/Main/AsstProxy.cs index 48704dc078..36dacde386 100644 --- a/src/MaaWpfGui/Main/AsstProxy.cs +++ b/src/MaaWpfGui/Main/AsstProxy.cs @@ -2045,7 +2045,7 @@ namespace MaaWpfGui.Main /// /// 开始探索次数。 /// 是否投资源石锭 - /// 是否进入第二层 + /// 投资时候刷更多分 /// 投资源石锭次数。 /// 投资满了自动停止任务。 /// TODO. @@ -2062,7 +2062,7 @@ namespace MaaWpfGui.Main /// 肉鸽主题["Phantom", "Mizuki", "Sami"] /// 是否用骰子刷新商店购买特殊商品,目前支持水月肉鸽的指路鳞 /// 是否成功。 - public bool AsstAppendRoguelike(int mode, int starts, bool investmentEnabled, bool investmentEnterSecondFloor, int invests, bool stopWhenFull, + public bool AsstAppendRoguelike(int mode, int starts, bool investmentEnabled, bool investmentWithMoreScore, int invests, bool stopWhenFull, string squad, string roles, string coreChar, bool startWithEliteTwo, bool onlyStartWithEliteTwo, bool roguelike3FirstFloorFoldartal, string roguelike3StartFloorFoldartal, bool roguelike3NewSquad2StartingFoldartal, string roguelike3NewSquad2StartingFoldartals, bool useSupport, bool enableNonFriendSupport, string theme, bool refreshTraderWithDice) @@ -2078,7 +2078,7 @@ namespace MaaWpfGui.Main if (mode == 1 || investmentEnabled) { taskParams["investment_enabled"] = true; - taskParams["investment_enter_second_floor"] = investmentEnterSecondFloor; + taskParams["investment_with_more_score"] = investmentWithMoreScore; taskParams["investments_count"] = invests; taskParams["stop_when_investment_full"] = stopWhenFull; } diff --git a/src/MaaWpfGui/Res/Localizations/en-us.xaml b/src/MaaWpfGui/Res/Localizations/en-us.xaml index 2067cfe902..1cbfb8aa53 100644 --- a/src/MaaWpfGui/Res/Localizations/en-us.xaml +++ b/src/MaaWpfGui/Res/Localizations/en-us.xaml @@ -261,7 +261,7 @@ Stops after investing N times Stops when invested coins reach limit Invest coins - Enter 2nd floor after investing + Investment mode enables shopping, recruiting Refresh Rogue Trader with Dice Penguin Report ID (Number part only) Report Penguin diff --git a/src/MaaWpfGui/Res/Localizations/ja-jp.xaml b/src/MaaWpfGui/Res/Localizations/ja-jp.xaml index be7f2b3474..70d598533d 100644 --- a/src/MaaWpfGui/Res/Localizations/ja-jp.xaml +++ b/src/MaaWpfGui/Res/Localizations/ja-jp.xaml @@ -261,7 +261,7 @@ N回投資した後に停止する 源石錐が上限に達した後に停止する 源石錐を投資する - 投資後に階層2へ + 投資モードではショッピングや人材募集が可能 ダイスで品揃えを更新する Penguin-StatsのレポートのID(デジタル部分のみ) Penguin-Statsの報告 diff --git a/src/MaaWpfGui/Res/Localizations/ko-kr.xaml b/src/MaaWpfGui/Res/Localizations/ko-kr.xaml index 2fa2df6a50..8f9bb23119 100644 --- a/src/MaaWpfGui/Res/Localizations/ko-kr.xaml +++ b/src/MaaWpfGui/Res/Localizations/ko-kr.xaml @@ -261,7 +261,7 @@ N번 투자 후 작업 중지 오리지늄각뿔이 한계 도달 시 중지 오리지늄각뿔 투자 - 투자 후 2층 진입 + 투자 모드에서는 쇼핑, 채용이 가능합니다. 상점 새로고침 Penguin-Stats 보고 ID (숫자만) Penguin-Stats 보고 diff --git a/src/MaaWpfGui/Res/Localizations/zh-cn.xaml b/src/MaaWpfGui/Res/Localizations/zh-cn.xaml index 9dbfb919d0..4b5a119c4c 100644 --- a/src/MaaWpfGui/Res/Localizations/zh-cn.xaml +++ b/src/MaaWpfGui/Res/Localizations/zh-cn.xaml @@ -261,7 +261,7 @@ 投资 N 个源石锭后停止任务 储备源石锭达到上限时停止 投资源石锭 - 投资后进入第二层 + 投资模式启用购物、招募 刷新商店(指路鳞) 企鹅物流汇报ID(仅数字部分) 上报企鹅物流 diff --git a/src/MaaWpfGui/Res/Localizations/zh-tw.xaml b/src/MaaWpfGui/Res/Localizations/zh-tw.xaml index bfd0003541..5226a091e9 100644 --- a/src/MaaWpfGui/Res/Localizations/zh-tw.xaml +++ b/src/MaaWpfGui/Res/Localizations/zh-tw.xaml @@ -261,7 +261,7 @@ 投資 N 個源石錠後停止任務 源石錠達到上限停止 投資源石錠 - 投資後進入第二層 + 投資模式啟用購物、招募 刷新商店(指路鱗) 企鵝物流匯報 ID(僅數字部分) 上報企鵝物流 diff --git a/src/MaaWpfGui/ViewModels/UI/SettingsViewModel.cs b/src/MaaWpfGui/ViewModels/UI/SettingsViewModel.cs index bb86914822..50501efe42 100644 --- a/src/MaaWpfGui/ViewModels/UI/SettingsViewModel.cs +++ b/src/MaaWpfGui/ViewModels/UI/SettingsViewModel.cs @@ -2063,17 +2063,17 @@ namespace MaaWpfGui.ViewModels.UI } } - private string _roguelikeInvestmentEnterSecondFloor = ConfigurationHelper.GetValue(ConfigurationKeys.RoguelikeInvestmentEnterSecondFloor, true.ToString()); + private string _roguelikeInvestmentWithMoreScore = ConfigurationHelper.GetValue(ConfigurationKeys.RoguelikeInvestmentEnterSecondFloor, true.ToString()); /// /// Gets or sets a value indicating whether investment is enabled. /// - public bool RoguelikeInvestmentEnterSecondFloor + public bool RoguelikeInvestmentWithMoreScore { - get => bool.Parse(_roguelikeInvestmentEnterSecondFloor); + get => bool.Parse(_roguelikeInvestmentWithMoreScore); set { - SetAndNotify(ref _roguelikeInvestmentEnterSecondFloor, value.ToString()); + SetAndNotify(ref _roguelikeInvestmentWithMoreScore, value.ToString()); ConfigurationHelper.SetValue(ConfigurationKeys.RoguelikeInvestmentEnterSecondFloor, value.ToString()); } } diff --git a/src/MaaWpfGui/ViewModels/UI/TaskQueueViewModel.cs b/src/MaaWpfGui/ViewModels/UI/TaskQueueViewModel.cs index 58d3fa969a..d8440bf962 100644 --- a/src/MaaWpfGui/ViewModels/UI/TaskQueueViewModel.cs +++ b/src/MaaWpfGui/ViewModels/UI/TaskQueueViewModel.cs @@ -1392,7 +1392,7 @@ namespace MaaWpfGui.ViewModels.UI return Instances.AsstProxy.AsstAppendRoguelike( mode, Instances.SettingsViewModel.RoguelikeStartsCount, - Instances.SettingsViewModel.RoguelikeInvestmentEnabled, Instances.SettingsViewModel.RoguelikeInvestmentEnterSecondFloor, Instances.SettingsViewModel.RoguelikeInvestsCount, Instances.SettingsViewModel.RoguelikeStopWhenInvestmentFull, + Instances.SettingsViewModel.RoguelikeInvestmentEnabled, Instances.SettingsViewModel.RoguelikeInvestmentWithMoreScore, Instances.SettingsViewModel.RoguelikeInvestsCount, Instances.SettingsViewModel.RoguelikeStopWhenInvestmentFull, Instances.SettingsViewModel.RoguelikeSquad, Instances.SettingsViewModel.RoguelikeRoles, DataHelper.GetCharacterByNameOrAlias(Instances.SettingsViewModel.RoguelikeCoreChar)?.Name ?? Instances.SettingsViewModel.RoguelikeCoreChar, Instances.SettingsViewModel.RoguelikeStartWithEliteTwo, Instances.SettingsViewModel.RoguelikeOnlyStartWithEliteTwo, Instances.SettingsViewModel.Roguelike3FirstFloorFoldartal, Instances.SettingsViewModel.Roguelike3StartFloorFoldartal, diff --git a/src/MaaWpfGui/Views/UserControl/RoguelikeSettingsUserControl.xaml b/src/MaaWpfGui/Views/UserControl/RoguelikeSettingsUserControl.xaml index b1a96093d3..d1f5c75578 100644 --- a/src/MaaWpfGui/Views/UserControl/RoguelikeSettingsUserControl.xaml +++ b/src/MaaWpfGui/Views/UserControl/RoguelikeSettingsUserControl.xaml @@ -92,9 +92,13 @@ + IsChecked="{Binding RoguelikeInvestmentWithMoreScore}" + Visibility="{c:Binding 'RoguelikeMode == "1"'}" > + +