MCPcopy Create free account
hub / github.com/runhey/OnmyojiAutoScript / battle_process

Method battle_process

tasks/Exploration/script_task.py:207–231  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

205
206 # 战斗流程
207 def battle_process(self):
208 # 进入指定章节
209 self.screenshot()
210 if self.appear_then_click(self.I_E_EXPLORATION_CLICK):
211 self.appear_then_click(self.I_E_SETTINGS_BUTTON)
212
213 # ************************* 进入设置并操作 *******************
214 # 候补以及自动轮换打开:
215 # 自动轮换功能打开
216 while 1:
217 self.screenshot()
218 # 自动轮换开着 则跳过
219 if self.appear(self.I_E_AUTO_ROTATE_ON):
220 break
221 # 自动轮换关着 则打开
222 if self.appear_then_click(self.I_E_AUTO_ROTATE_OFF):
223 if self.appear(self.I_E_AUTO_ROTATE_ON):
224 break
225
226 # 自动添加候补式神
227 if self.config.exploration.exploration_config.auto_rotate == AutoRotate.yes:
228 self.enter_settings_and_do_operations()
229
230 # 进入战斗环节
231 self.do_battle()
232
233
234if __name__ == "__main__":

Callers 1

runMethod · 0.95

Calls 5

do_battleMethod · 0.95
appear_then_clickMethod · 0.80
appearMethod · 0.80
screenshotMethod · 0.45

Tested by

no test coverage detected