mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-17 18:01:26 +08:00
feat: 肉鸽模式支持设置开始次数、投资次数、投满停止
This commit is contained in:
28
src/MeoAssistant/RoguelikeControlTaskPlugin.cpp
Normal file
28
src/MeoAssistant/RoguelikeControlTaskPlugin.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
#include "RoguelikeControlTaskPlugin.h"
|
||||
|
||||
bool asst::RoguelikeControlTaskPlugin::verify(AsstMsg msg, const json::value& details) const
|
||||
{
|
||||
if (msg != AsstMsg::SubTaskExtraInfo
|
||||
|| details.get("subtask", std::string()) != "ProcessTask") {
|
||||
return false;
|
||||
}
|
||||
const std::string what = details.get("what", std::string());
|
||||
if (what != "ExceededLimit") {
|
||||
return false;
|
||||
}
|
||||
|
||||
const std::string task = details.at("details").at("task").as_string();
|
||||
if (task == "Roguelike1Start" ||
|
||||
task == "Roguelike1StageTraderInvestConfirm" ||
|
||||
task == "Roguelike1StageTraderInvestSystemFull") {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool asst::RoguelikeControlTaskPlugin::_run()
|
||||
{
|
||||
m_task_ptr->set_enable(false);
|
||||
return true;
|
||||
}
|
||||
Reference in New Issue
Block a user