执行 :return:
(self)
| 19 | medal_grid: ImageGrid = None |
| 20 | |
| 21 | def run(self): |
| 22 | """ |
| 23 | 执行 |
| 24 | :return: |
| 25 | """ |
| 26 | # 探索的 config |
| 27 | explorationConfig = self.config.exploration |
| 28 | |
| 29 | # 切换御魂 |
| 30 | if explorationConfig.switch_soul_config.enable: |
| 31 | self.ui_get_current_page() |
| 32 | self.ui_goto(page_shikigami_records) |
| 33 | self.run_switch_soul(explorationConfig.switch_soul_config.switch_group_team) |
| 34 | |
| 35 | if explorationConfig.switch_soul_config.enable_switch_by_name: |
| 36 | self.ui_get_current_page() |
| 37 | self.ui_goto(page_shikigami_records) |
| 38 | self.run_switch_soul_by_name(explorationConfig.switch_soul_config.group_name, |
| 39 | explorationConfig.switch_soul_config.team_name) |
| 40 | |
| 41 | # 开启加成 |
| 42 | con = self.config.exploration.exploration_config |
| 43 | if con.buff_gold_50_click or con.buff_gold_100_click: |
| 44 | self.ui_get_current_page() |
| 45 | self.ui_goto(page_main) |
| 46 | self.open_buff() |
| 47 | if con.buff_gold_50_click: |
| 48 | self.gold_50() |
| 49 | if con.buff_gold_100_click: |
| 50 | self.gold_100() |
| 51 | self.close_buff() |
| 52 | |
| 53 | self.ui_get_current_page() |
| 54 | # 探索页面 |
| 55 | self.ui_goto(page_exploration) |
| 56 | |
| 57 | # ************************* 跳转至对应指定章节并进入 ******************* |
| 58 | # 默认全部解锁, 当前处于第二十八章 |
| 59 | # 查找指定的章节: |
| 60 | if not self.open_expect_level(): |
| 61 | logger.critical(f'Not find {explorationConfig.exploration_config.exploration_level} or' |
| 62 | f' Enter {explorationConfig.exploration_config.exploration_level} failed!') |
| 63 | raise RequestHumanTakeover |
| 64 | |
| 65 | # 只探索7次 |
| 66 | if explorationConfig.exploration_config.attack_number == AttackNumber.SEVEN: |
| 67 | count = 0 |
| 68 | while count < 7: |
| 69 | if self.wait_until_appear(self.I_E_EXPLORATION_CLICK, wait_time=1): |
| 70 | self.click(self.I_E_EXPLORATION_CLICK) |
| 71 | count += 1 |
| 72 | # 进入战斗环节 |
| 73 | self.battle_process() |
| 74 | if self.appear_then_click(self.I_EXPLORATION_TITLE): |
| 75 | self.open_expect_level() |
| 76 | |
| 77 | # 查找指定的章节: |
| 78 | def open_expect_level(self): |
no test coverage detected