def Combat_4():
    # 选择关卡
    CombatSet.ChooseLevel(4)

    # 点击指挥部
    Headquarters()
    Delay(1, 2)
    # 部署梯队
    # 点击指挥部
    Headquarters()
    Delay(1, 2)
    # 点击确定,部署主力
    CombatWindow.Deploy_Confirm()
    # 点击机场
    Airport()
    Delay(1, 2)
    # 点击确定,部署狗粮
    CombatWindow.Deploy_Confirm()

    # 开始作战
    CombatWindow.Combat_Start()
    # 点击主力2次
    Headquarters()
    Delay(1, 2)
    Headquarters()
    Delay(1, 2)
    # 补充弹药
    CombatWindow.Supply()

    # 进入计划模式
    CombatWindow.PlanMode()
    # 规划路径
    pot1()
    Delay(1, 2)
    pot2()
    Delay(1, 2)
    pot1()
    Delay(1, 2)
    Headquarters()
    Delay(1, 2)
    # 执行计划
    CombatWindow.Plan_Confirm()

    # 等待
    Delay(80, 82)

    # 撤退
    Headquarters()
    Delay(0, 1)
    Headquarters()
    Delay(1, 2)
    CombatWindow.Retreat()
    CombatWindow.Combat_Terminate()
def round2():
    # 守家梯队撤退
    Headquarters_2()
    Delay(1, 2)
    Headquarters_2()
    Delay(1, 2)
    CombatWindow.Retreat()
    # 选择主力队
    pot1_2()
    Delay(1, 2)
    # 检测小飞机
    matching = image.match(
        'e:/code/girls_frontline_script/images/Combat/34n_fly.png',
        image.capture_screen())
    if (matching[0] > 20000000):
        CombatWindow.Fairy_release()
    pot2_2()
    Delay(18, 19)
    CombatWindow.Combat_EndClear()
    pot2_2()
    Delay(1, 2)
    # 检测小飞机
    matching = image.match(
        'e:/code/girls_frontline_script/images/Combat/34n_fly.png',
        image.capture_screen())
    if (matching[0] > 20000000):
        CombatWindow.Fairy_release()
    pot3_2()
    Delay(18, 19)
    CombatWindow.Combat_EndClear()
    pot3_2()
    Delay(1, 2)
    # 检测boss
    matching = image.match(
        'e:/code/girls_frontline_script/images/34n_boss.png',
        image.capture_screen())
    # boss出现
    if (matching[0] > 20000000):
        pot4_2()
    else:
        pot5_2()
        Delay(1, 2)
        pot6_2()
    Delay(19, 20)
    CombatWindow.Combat_EndClear()
    # 撤退
    CombatWindow.Combat_Terminate()
def round7():
    ## 计划模式
    CombatWindow.PlanMode()
    pot8_7()
    Delay(0, 1)
    pot10_7()
    Delay(0, 1)
    pot8_7()
    Delay(0, 1)
    CombatWindow.Plan_Confirm()
    Delay(63, 65)
    # 关闭妖精
    CombatWindow.Fairy_AUTO()
    ## 撤退
    pot8_7()
    Delay(1, 2)
    pot8_7()
    Delay(2, 3)
    CombatWindow.Retreat()
    CombatWindow.Combat_Terminate()
def Combat_21():
    # 选择关卡
    CombatSet.ChooseLevel(1)

    # 部署主力队
    Headquarters_1()
    Delay(1, 2)
    CombatWindow.Deploy_Confirm()
    CombatWindow.Combat_Start()

    # 补充弹药
    Headquarters_1()
    Delay(1, 2)
    Headquarters_1()
    Delay(1, 2)
    CombatWindow.Supply()
    CombatWindow.PlanMode()
    pot1_1()
    Delay(1, 2)
    pot2_1()
    Delay(1, 2)
    CombatWindow.Plan_Confirm()

    Delay(102, 103)

    # 撤退
    Headquarters_2()
    Delay(1, 2)
    CombatWindow.Deploy_Confirm()
    pot2_2()
    Delay(1, 2)
    Headquarters_2()
    Delay(1, 2)
    click(randint(767, 933), randint(552, 605))
    Delay(2, 3)
    Headquarters_2()
    Delay(1, 2)
    CombatWindow.Retreat()
    # 结束回合
    CombatWindow.Combat_Terminate()
def Combat_3():
    # 选择关卡
    CombatSet.ChooseLevel(3)

    # 点击指挥部
    Headquarters()
    Delay(1, 2)
    # 点击确定,部署主力
    CombatWindow.Deploy_Confirm()

    # 开始作战
    CombatWindow.Combat_Start()
    # 点击主力2次
    Headquarters()
    Delay(1, 2)
    Headquarters()
    Delay(1, 2)
    # 补充弹药
    CombatWindow.Supply()

    # 移动主力
    pot1()
    Delay(1, 2)
    CombatWindow.Choose_Cancel()
    Headquarters()
    Delay(1, 2)
    # 点击确定,部署狗粮
    CombatWindow.Deploy_Confirm()
    # 进入计划模式
    CombatWindow.PlanMode()
    pot1()
    Delay(1, 2)
    # 规划路径
    pot2()
    Delay(1, 2)
    pot3()
    Delay(1, 2)
    Headquarters()
    Delay(1, 2)
    click(randint(378, 594), randint(447, 503))
    Delay(1, 2)
    # 执行计划
    CombatWindow.Plan_Confirm()

    # 等待
    # Delay(103, 105)

    # 等待TODO
    Delay(72, 73)
    # 第三战撤退k5
    click(randint(249, 328), randint(575, 615))
    Delay(1, 2)
    CombatWindow.SingleFigure_Retreat()
    # 等待
    Delay(30, 32)

    # 撤退
    Headquarters()
    Delay(0, 1)
    Headquarters()
    Delay(1, 2)
    CombatWindow.Retreat()
    CombatWindow.Combat_Terminate()