def spot_battle(self): spot = self.spot_list[self.spot_no] if spot.compass: game.combat_compass() game.combat_map_moving() if spot.enemy_detection: game.combat_map_enemy_animation() if spot.enemy_animation: game.combat_map_enemy_animation() if self.auto_formation and spot.formation is not None: spot.formation() if spot.boss_dialog: game.combat_boss_dialog() if self.auto_night: battle_request = game.combat_battle(self.should_night_battle()) else: battle_request = api_server.wait('/kcsapi/api_req_sortie/battle') self.fleet_status = battle.battle_analyze( battle_request, combined=self.fleet_combined) game.combat_result() if spot.final: api_server.wait("/kcsapi/api_get_member/useitem") self.spot_no = 0 return self.end elif self.auto_advance: if self.fleet_status == battle.BattleResult.Flagship_Damaged: game.combat_retreat_flagship_damaged() self.spot_no = 0 return self.end if self.fleet_status == battle.BattleResult.Ship_Damaged: game.combat_retreat() self.spot_no = 0 return self.end if self.should_retreat(): game.combat_retreat() self.spot_no = 0 return self.end if self.fleet_status == battle.BattleResult.Safe: req_ship_deck, req_next = game.combat_advance() if battle.advance_has_damaged_ship(req_ship_deck): self.fleet_status = battle.BattleResult.Ship_Damaged game.poi_refresh_page() raise Exception("BattleAnalyzeFailure") else: self.spot_no = req_next.body["api_no"] return self.spot_dispatcher else: req_next = game.combat_map_next() self.spot_no = req_next.body["api_no"] return self.spot_dispatcher
def spot_avoid(self): spot = self.spot_list[self.spot_no] if spot.compass: game.combat_compass() if spot.final: game.combat_summary() self.spot_no = 0 return self.end else: req_next = game.combat_map_next() self.spot_no = req_next.body["api_no"] return self.spot_dispatcher
def path_normal(self): game.combat_map_moving() req_next = game.combat_map_next() self.cell_no = req_next.body["api_no"] return self.path_dict.get(self.cell_no, None)
def spot_select(self): spot = self.spot_list[self.spot_no] spot.click_next() req_next = game.combat_map_next() self.spot_no = req_next.body["api_no"] return self.spot_dispatcher