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

Method _battle

tasks/DemonEncounter/script_task.py:305–326  ·  view source on GitHub ↗
(self, target_click)

Source from the content-addressed store, hash-verified

303 time.sleep(0.5)
304
305 def _battle(self, target_click):
306 config = self.con
307 while 1:
308 self.screenshot()
309 if not self.appear(self.I_DE_LOCATION):
310 logger.info('Battle Start')
311 break
312 if self.appear(self.I_DE_SMALL_FIRE):
313 # 小鬼王
314 logger.info('Small Boss')
315 while 1:
316 self.screenshot()
317 if not self.appear(self.I_DE_SMALL_FIRE):
318 break
319 if self.appear_then_click(self.I_DE_SMALL_FIRE, interval=1):
320 continue
321 break
322
323 if self.click(target_click, interval=1):
324 continue
325 if self.run_general_battle(config):
326 logger.info('Battle End')
327
328 def _realm(self, target_click):
329 # 结界

Callers 1

execute_lanternMethod · 0.95

Calls 5

appearMethod · 0.80
appear_then_clickMethod · 0.80
run_general_battleMethod · 0.80
screenshotMethod · 0.45
clickMethod · 0.45

Tested by

no test coverage detected