mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-19 18:47:55 +08:00
fix.修复自动战斗不能放技能的问题,并修复拖动速度
This commit is contained in:
@@ -4691,7 +4691,7 @@
|
||||
},
|
||||
"BattleSwipeOper": {
|
||||
"algorithm": "JustReturn",
|
||||
"preDelay": 12000,
|
||||
"preDelay": 10000,
|
||||
"rearDelay": 100,
|
||||
"Doc": "pre 是将干员滑动到场上的 duration 系数;rear 是设置干员朝向滑动的 duration"
|
||||
},
|
||||
|
||||
@@ -454,7 +454,7 @@ bool asst::BattleProcessTask::oper_deploy(const BattleAction& action)
|
||||
std::sqrt(
|
||||
(std::abs(placed_point.x - oper_rect.x) << 1)
|
||||
+ (std::abs(placed_point.y - oper_rect.y) << 1)));
|
||||
int duration = static_cast<int>(swipe_oper_task_ptr->pre_delay / 500.0 * dist); // 随便取的一个系数
|
||||
int duration = static_cast<int>(swipe_oper_task_ptr->pre_delay / 1000 * dist); // 随便取的一个系数
|
||||
m_ctrler->swipe(oper_rect, placed_rect, duration, true, 0);
|
||||
|
||||
sleep(use_oper_task_ptr->rear_delay);
|
||||
@@ -503,7 +503,7 @@ bool asst::BattleProcessTask::oper_retreat(const BattleAction& action)
|
||||
const std::string& name = m_group_to_oper_mapping[action.group_name].name;
|
||||
Point pos;
|
||||
if (auto iter = m_used_opers.find(name);
|
||||
action.location.x != 0 && action.location.y != 0 &&
|
||||
action.location.x == 0 && action.location.y == 0 &&
|
||||
iter != m_used_opers.cend()) {
|
||||
pos = iter->second.pos;
|
||||
m_used_opers.erase(name);
|
||||
@@ -522,7 +522,7 @@ bool asst::BattleProcessTask::use_skill(const BattleAction& action)
|
||||
const std::string& name = m_group_to_oper_mapping[action.group_name].name;
|
||||
Point pos;
|
||||
if (auto iter = m_used_opers.find(name);
|
||||
action.location.x != 0 && action.location.y != 0 &&
|
||||
action.location.x == 0 && action.location.y == 0 &&
|
||||
iter != m_used_opers.cend()) {
|
||||
pos = iter->second.pos;
|
||||
m_used_opers.erase(name);
|
||||
|
||||
@@ -296,7 +296,7 @@ bool asst::RoguelikeBattleTaskPlugin::auto_battle()
|
||||
std::sqrt(
|
||||
(std::abs(placed_point.x - opt_oper.rect.x) << 1)
|
||||
+ (std::abs(placed_point.y - opt_oper.rect.y) << 1)));
|
||||
int duration = static_cast<int>(swipe_oper_task_ptr->pre_delay / 1000.0 * dist); // 随便取的一个系数
|
||||
int duration = static_cast<int>(swipe_oper_task_ptr->pre_delay / 800.0 * dist); // 随便取的一个系数
|
||||
m_ctrler->swipe(opt_oper.rect, placed_rect, duration, true, 0);
|
||||
sleep(use_oper_task_ptr->rear_delay);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user