示例#1
0
文件: kauto.py 项目: yukixz/kauto
def auto_15_single():
    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(1, 5)
        game.sortie_confirm()

        game.combat_map_loading()
        game.combat_map_moving()
        game.combat_formation_abreast()

        game.combat_battle(False)
        game.combat_result()
        request = game.combat_retreat()

        game.port_open_panel_supply()
        time.sleep(7)
        game.supply_current_fleet()

        if battle.port_has_damaged_ship(request):
            game.dock_open_panel_organize()
            break
示例#2
0
文件: kauto.py 项目: yukixz/kauto
def auto_52c():
    game.set_foremost()

    damaged = False
    request = game.dock_back_to_port()

    while True:
        # for i in range(1, 18):
        for i in range(1, 5):
            if battle.port_has_damaged_ship(request):
                damaged = True
                break

            game.port_open_panel_sortie()
            game.sortie_select(5, 2)
            game.sortie_confirm()

            game.combat_map_loading()
            game.combat_compass()
            game.combat_map_moving()
            game.combat_map_moving()
            game.combat_formation_diamond()

            game.combat_battle(False)
            game.combat_result()
            request = game.combat_retreat()

        if (damaged or battle.port_has_damaged_ship(request)):
            game.port_open_panel_organize()
            break
        else:
            game.port_open_panel_supply()
            time.sleep(1.3)
            game.supply_current_fleet()
            game.dock_back_to_port()
示例#3
0
文件: kauto.py 项目: yukixz/kauto
def auto_3_2():
    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(3, 2)
        game.sortie_confirm()

        game.combat_map_loading()
        game.combat_compass()
        game.combat_map_moving()
        game.combat_formation_double()

        game.combat_result()
        request = game.combat_retreat()

        game.port_open_panel_supply()
        game.supply_current_fleet()

        if battle.port_has_damaged_ship(request):
            game.dock_open_panel_organize()
            break
示例#4
0
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
示例#5
0
    def start(self):
        while True:
            request = api_server.wait(("/kcsapi/api_req_map/next",
                                       "/kcsapi/api_req_map/start",
                                       "/kcsapi/api_port/port"))
            if request.path == "/kcsapi/api_port/port":
                if battle.port_has_damaged_ship(request):
                    self.fleet_status = battle.BattleResult.Ship_Damaged
                else:
                    self.fleet_status = battle.BattleResult.Safe
                return self.start

            if request.path == "/kcsapi/api_req_map/start":
                if request.body['api_maparea_id'] != self.map_area or \
                   request.body['api_mapinfo_no'] != self.map_no or \
                   self.fleet_status != battle.BattleResult.Safe:
                    return None
                else:
                    self.spot_no = request.body["api_no"]
                    game.combat_map_loading()
                    return self.spot_dispatcher

            if request.path == "/kcsapi/api_req_map/next":
                if request.body['api_maparea_id'] != self.map_area or \
                   request.body['api_mapinfo_no'] != self.map_no:
                    return None
                else:
                    self.spot_no = request.body["api_no"]
                    return self.spot_dispatcher
示例#6
0
文件: kauto.py 项目: yukixz/kauto
    def start(self):
        game.set_foremost()

        request = game.dock_back_to_port()
        if battle.port_has_damaged_ship(request):
            game.port_open_panel_organize()
            return None

        game.port_open_panel_sortie()
        game.sortie_select(2, 3)
        req_next = game.sortie_confirm()
        game.poi_switch_panel_prophet()
        game.combat_map_loading()

        self.cell_no = req_next.body["api_no"]
        return self.path_dict.get(self.cell_no, None)