perf.优化肉鸽战斗技能使用,特种、无人机的摆放

This commit is contained in:
MistEO
2022-02-07 01:48:26 +08:00
parent f4a6eff6af
commit d119b97871
2 changed files with 22 additions and 15 deletions

View File

@@ -3515,6 +3515,14 @@
40
]
},
"BattleUseSkillBegin": {
"algorithm": "JustReturn",
"action": "doNothing",
"rearDelay": 1000,
"next": [
"BattleUseSkill"
]
},
"BattleUseSkill": {
"algorithm": "OcrDetect",
"text": [
@@ -3532,9 +3540,7 @@
380,
100,
100
],
"preDelay": 1000,
"rearDelay": 0
]
},
"StartToWakeUpToRoguelike1": {
"template": "StartToWakeUp.png",

View File

@@ -217,17 +217,18 @@ bool asst::RoguelikeBattleTaskPlugin::auto_battle()
default:
// 特种和无人机,有的只能放地面,有的又只能放高台,不好判断
// 笨办法,都试试,总有一次能成的
{
static Loc static_loc = Loc::Melee;
loc = static_loc;
if (static_loc == Loc::Melee) {
static_loc = Loc::Ranged;
}
else {
static_loc = Loc::Melee;
}
}
break;
//{
// static Loc static_loc = Loc::Melee;
// loc = static_loc;
// if (static_loc == Loc::Melee) {
// static_loc = Loc::Ranged;
// }
// else {
// static_loc = Loc::Melee;
// }
//}
loc = Loc::Melee;
break;
}
Point placed_loc = get_placed(loc);
@@ -273,7 +274,7 @@ bool asst::RoguelikeBattleTaskPlugin::use_skill(const asst::Rect& rect)
{
Ctrler.click(rect);
ProcessTask task(*this, { "BattleUseSkill" });
ProcessTask task(*this, { "BattleUseSkillBegin" });
task.set_retry_times(0);
return task.run();
}