(self, random_click_swipt_enable: bool)
| 239 | continue |
| 240 | |
| 241 | def battle_wait(self, random_click_swipt_enable: bool) -> bool: |
| 242 | # 重写 |
| 243 | self.device.stuck_record_add('BATTLE_STATUS_S') |
| 244 | self.device.click_record_clear() |
| 245 | # 战斗过程 随机点击和滑动 防封 |
| 246 | logger.info("Start battle process") |
| 247 | while 1: |
| 248 | self.screenshot() |
| 249 | if self.appear(self.I_SE_BATTLE_WIN): |
| 250 | logger.info('Win battle') |
| 251 | self.ui_click_until_disappear(self.I_SE_BATTLE_WIN) |
| 252 | return True |
| 253 | if self.appear_then_click(self.I_WIN, interval=1): |
| 254 | continue |
| 255 | if self.appear(self.I_REWARD): |
| 256 | logger.info('Win battle') |
| 257 | self.ui_click_until_disappear(self.I_REWARD) |
| 258 | return True |
| 259 | |
| 260 | if self.appear(self.I_FALSE): |
| 261 | logger.warning('False battle') |
| 262 | self.ui_click_until_disappear(self.I_FALSE) |
| 263 | return False |
| 264 | |
| 265 | |
| 266 | if __name__ == '__main__': |
nothing calls this directly
no test coverage detected