def path_battle(self): game.combat_map_moving() game.combat_formation_line() request = game.combat_battle(self.should_night_battle()) game.combat_result() battle_result = battle.battle_analyze(request) if battle_result == battle.BattleResult.Flagship_Damaged: game.combat_retreat_flagship_damaged() self.cell_no = 0 return self.port if battle_result == battle.BattleResult.Ship_Damaged: game.combat_retreat() self.cell_no = 0 return self.port if battle_result == battle.BattleResult.Safe: req_ship_deck, req_next = game.combat_advance() if battle.advance_has_damaged_ship(req_ship_deck): game.poi_refresh_page() raise Exception("battle_analyze_failure") else: self.cell_no = req_next.body["api_no"] return self.path_dict.get(self.cell_no, None)
def auto_22(): game.set_foremost() while True: request = game.dock_back_to_port() if battle.port_has_damaged_ship(request): break game.port_open_panel_sortie() game.sortie_select(2, 2) game.sortie_confirm() game.combat_map_loading() game.combat_map_moving() game.combat_compass() game.combat_map_moving() game.combat_formation_line() # point B game.combat_result() game.combat_advance() # point A game.combat_map_moving() game.combat_map_moving() request = game.combat_summary() game.port_open_panel_supply() game.supply_current_fleet() if battle.port_has_damaged_ship(request): game.dock_open_panel_organize() break
def path_compass_final_battle(self): game.combat_compass() game.combat_map_moving() game.combat_formation_line() game.combat_battle(self.should_night_battle()) game.combat_result() api_server.wait("/kcsapi/api_get_member/useitem") self.cell_no = 0 return self.port
def help_5_4(): while True: request = api_server.wait( ("/kcsapi/api_req_map/next", "/kcsapi/api_req_map/start")) # HS: c1d c7 12d c18 19d # SS: c2 4d 6n 9 c10d 15d if request.body["api_no"] in (1, ): game.combat_map_loading() game.combat_compass() game.combat_map_moving() game.combat_formation_line() game.combat_move_to_button_left() game.combat_result() game.combat_move_to_button_left() if request.body["api_no"] in (2, ): game.combat_map_loading() game.combat_compass() if request.body["api_no"] in (7, 18): utils.random_sleep(2) game.combat_compass() if request.body["api_no"] in (10, ): game.combat_compass() game.combat_map_moving() game.combat_formation_line() game.combat_move_to_button_left() game.combat_result() game.combat_move_to_button_left() if request.body["api_no"] in (4, 6, 10, 12, 15, 19): game.combat_map_moving() game.combat_formation_line() game.combat_move_to_button_left() game.combat_result() game.combat_move_to_button_left()