def round3(): ## 主力队向上1格 pot2_2() Delay(0, 1) pot3_2() Delay(18, 19) CombatWindow.Combat_EndClear() ## 狗粮队1向上1格 pot1_2() Delay(0, 1) pot2_2() Delay(1, 2) ## 狗粮队2向上1格 Headquarters_2() Delay(0, 1) pot1_2() Delay(2, 3) CombatWindow.Choose_Cancel() ## 部署狗粮队3 Headquarters_2() Delay(1, 2) CombatWindow.Deploy_Confirm() ## 第三回合结束 CombatWindow.Round_End() # 等待 Delay(21, 23) CombatWindow.Combat_EndClear() Delay(6, 7)
def round4(): # 往上拖动界面 moveTo(randint(1400, 1600), randint(250, 400)) dragRel(randint(-50, 50), randint(400, 500), 0.5) Delay(0, 1) Airport() Delay(1, 2) Airport() Delay(1, 2) CombatWindow.Supply() CombatWindow.PlanMode() pot4_1() Delay(1, 2) CombatWindow.Plan_Confirm() Delay(54, 56) while(1): # 检测是否在战斗中 matching = image.match('e:/code/girls_frontline_script/images/round_end.png', image.capture_screen()) # 战斗中 if (matching[0] < 100000000): Delay(1, 2) else: break CombatWindow.Round_End() Delay(12, 14) CombatWindow.Combat_Animation()
def round3(): CombatWindow.Round_End() Delay(21, 22) CombatWindow.Combat_EndClear() Delay(3, 4) # 检测是否进入战斗 matching = image.match('e:/code/girls_frontline_script/images/round_end.png', image.capture_screen()) # 进入战斗 if (matching[0] < 100000000): Delay(11, 12) CombatWindow.Combat_EndClear() Delay(6, 7)
def round4(): ## 补充弹药 pot3_2() Delay(0, 1) pot2_2() Delay(1, 2) click(randint(453, 664), randint(509, 573)) Delay(1, 2) pot1_2() Delay(1, 2) click(randint(406, 611), randint(591, 658)) Delay(1, 2) Headquarters_2() Delay(1, 2) click(randint(386, 594), randint(670, 733)) Delay(1, 2) Headquarters_2() Delay(2, 3) CombatWindow.Supply() # 返回 pot1_2() Delay(1, 2) click(randint(406, 611), randint(591, 658)) Delay(1, 2) pot2_2() Delay(1, 2) click(randint(453, 664), randint(509, 573)) Delay(1, 2) pot3_2() Delay(1, 2) click(randint(533, 735), randint(445, 508)) Delay(1, 2) ## 主力队向上1格 pot4_2() Delay(18, 19) CombatWindow.Combat_EndClear() Delay(6, 7) ## 狗粮队1向上1格 pot2_2() Delay(0, 1) pot3_2() Delay(1, 2) ## 第四回合结束 CombatWindow.Round_End() # 等待 Delay(21, 23) CombatWindow.Combat_EndClear() Delay(6, 7)
def Combat_34n(): # 选择关卡 CombatWindow.ChooseLevel(4) # 部署梯队 # 点击指挥部 Headquarters_1() Delay(1, 2) # 点击确定,部署主力队 CombatWindow.Deploy_Confirm() # 开始作战 CombatWindow.Combat_Start() round1() round2()
def Combat_34e(): # 选择关卡 CombatWindow.ChooseLevel(4) # 点击机场 Airport() Delay(1, 2) # 点击确定,部署打手队 CombatWindow.Deploy_Confirm() # 点击指挥部 Headquarters() Delay(1, 2) # 点击确定,部署狗粮队 CombatWindow.Deploy_Confirm() # 开始作战 CombatWindow.Combat_Start() # 点击梯队2次 Airport() Delay(1, 2) Airport() Delay(1, 2) # 补充弹药 CombatWindow.Supply() # 进入计划模式 CombatWindow.PlanMode() # 规划路径 pot1() Delay(0, 1) pot2() Delay(0, 1) # 执行计划 CombatWindow.Plan_Confirm() Delay(2, 4) #TODO
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 round1(): # 点击梯队2次 Headquarters_1() Delay(1, 2) Headquarters_1() Delay(1, 2) # 补充弹药 CombatWindow.Supply() # 行动 pot1_1() Delay(2, 3) CombatWindow.Choose_Cancel() # 部署狗粮队1 Headquarters_1() Delay(1, 2) CombatWindow.Deploy_Confirm() # 第一回合结束 CombatWindow.Round_End() Delay(21, 23)
def Combat_64e(): # 选择关卡 CombatWindow.ChooseLevel(4) # 点击指挥部 Headquarters_1() Delay(1, 2) # 部署主力队 CombatWindow.Deploy_Confirm() # 开始作战 CombatWindow.Combat_Start() round1() round2() round3() round4() round5() round6() round7()
def Combat_13(): # 选择关卡 CombatSet.ChooseLevel(3) # 往上拖动界面 moveTo(randint(1400, 1600), randint(250, 400)) dragRel(randint(-50, 50), randint(400, 500), 0.5) Delay(0, 1) # 点击指挥部 Headquarters() Delay(1, 2) # 部署主力队 CombatWindow.Deploy_Confirm() # 开始作战 CombatWindow.Combat_Start() round1() round2() round3() round4()
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 round1(): # 点击主力队2次 Headquarters_1() Delay(1, 2) Headquarters_1() Delay(1, 2) # 补充弹药 CombatWindow.Supply() # 移动到左下机场 pot1_1() # 战斗 Delay(16, 18) CombatWindow.Combat_EndClear() # 部署守家队伍 # 取消选择 CombatWindow.Choose_Cancel() # 点击指挥部 Headquarters_2() Delay(1, 2) # 点击确定,部署梯队 CombatWindow.Deploy_Confirm() # 点击守家队2次 Headquarters_2() Delay(1, 2) Headquarters_2() Delay(1, 2) # 补充弹药 CombatWindow.Supply() # 结束回合 CombatWindow.Round_End() Delay(4, 5) # 检测是否进入下一回合 matching = image.match( 'e:/code/girls_frontline_script/images/round_end.png', image.capture_screen()) # 未进入下一回合 if (matching[0] < 100000000): Delay(22, 23) CombatWindow.Combat_EndClear() Delay(6, 7) # 检测是否进入下一回合 matching = image.match( 'e:/code/girls_frontline_script/images/round_end.png', image.capture_screen()) # 未进入下一回合 if (matching[0] < 100000000): Delay(22, 23) CombatWindow.Combat_EndClear() Delay(6, 7)
def Combat_11(): # 选择关卡 CombatSet.ChooseLevel(1) # 部署主力队 Headquarters() Delay(1, 2) CombatWindow.Deploy_Confirm() CombatWindow.Combat_Start() # 补充弹药 Headquarters() Delay(1, 2) Headquarters() Delay(1, 2) CombatWindow.Supply() CombatWindow.PlanMode() pot1() Delay(1, 2) pot2() Delay(1, 2) pot3() Delay(1, 2) CombatWindow.Plan_Confirm() Delay(135, 136) # 结束回合 CombatWindow.Combat_Animation()
def round1(): # 主力队补充弹药 Headquarters() Delay(1, 2) Headquarters() Delay(1, 2) CombatWindow.Supply() # 前进 pot1_1() Delay(2, 3) CombatWindow.Choose_Cancel() # 部署守家队并补充弹药 Headquarters() Delay(1, 2) CombatWindow.Deploy_Confirm() Headquarters() Delay(1, 2) Headquarters() Delay(1, 2) CombatWindow.Supply() # 结束回合 CombatWindow.Round_End() Delay(19, 20) # 检测是否进入下一回合 matching = image.match('e:/code/girls_frontline_script/images/round_end.png', image.capture_screen()) # 未进入下一回合 if (matching[0] < 100000000): Delay(15, 16) CombatWindow.Combat_EndClear() Delay(6, 7)
def round6(): ## 补给 pot5_6() Delay(1, 2) pot5_6() Delay(1, 2) CombatWindow.Supply() ## 计划模式 CombatWindow.PlanMode() pot7_6() Delay(0, 1) pot8_6() Delay(0, 1) CombatWindow.Choose_Cancel() pot6_6() Delay(0, 1) pot9_6() Delay(0, 1) CombatWindow.Plan_Confirm() Delay(65, 67) ## 第六回合结束 CombatWindow.Round_End() # 等待 Delay(21, 23) CombatWindow.Combat_EndClear() Delay(6, 7)
def Combat_46(): # 选择关卡 CombatWindow.ChooseLevel(6) # 向上拖动 moveTo(randint(627, 1715), randint(200, 450)) dragRel(randint(-50, 50), randint(800, 900), 0.5) Delay(0, 1) # 点击机场 Airport() Delay(1, 2) # 点击确定,部署打手队 CombatWindow.Deploy_Confirm() # 点击指挥部 Headquarters() Delay(1, 2) # 点击确定,部署狗粮队 CombatWindow.Deploy_Confirm() # 开始作战 CombatWindow.Combat_Start() # 点击梯队2次 Airport() Delay(1, 2) Airport() Delay(1, 2) # 补充弹药 CombatWindow.Supply() # 进入计划模式 CombatWindow.PlanMode() pot1() Delay(1, 2) # 执行计划 CombatWindow.Plan_Confirm() # 等待 Delay(100, 102) # 结束回合 CombatWindow.Round_End() Delay(12, 14) # 结算动画 CombatWindow.Combat_Animation()
def Combat_24e(): # 选择关卡 CombatWindow.ChooseLevel(4) # 点击普通作战 CombatWindow.NormalCombat() # 点击指挥部 Headquarters() Delay(2, 4) # 点击确定,部署第一梯队 CombatWindow.Deploy_Confirm() # 开始作战 CombatWindow.Combat_Start() # 点击梯队2次 Headquarters() Delay(2, 4) Headquarters() Delay(2, 4) # 补充弹药 CombatWindow.Supply() # 进入计划模式 CombatWindow.PlanMode() # 规划路径 pot1() Delay(2, 4) # 执行计划 CombatWindow.Plan_Confirm() # 等待 Delay(95, 97) # 结束回合 CombatWindow.Round_End() Delay(12, 14) # 结算动画 CombatWindow.Combat_Animation()
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 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_2(): # 选择关卡 CombatSet.ChooseLevel(2) # 部署梯队 # 点击指挥部 Headquarters() 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) # 执行计划 CombatWindow.Plan_Confirm() # 等待 Delay(83, 85) # 回合结束 CombatWindow.Round_End() Delay(12, 14) # 结算动画 CombatWindow.Combat_Animation() ## 如果有碎片就取消注释 click(randint(1800, 1900), randint(750, 900)) Delay(1, 2) click(randint(1800, 1900), randint(750, 900)) Delay(2, 3)
def round2(): # 主力队上前 pot1_1() Delay(1, 2) pot2_1() Delay(2, 3) # 检测是否进入战斗 matching = image.match('e:/code/girls_frontline_script/images/round_end.png', image.capture_screen()) # 进入战斗 if (matching[0] < 100000000): Delay(13, 14) CombatWindow.Combat_EndClear() # 部署狗粮 Headquarters() Delay(1, 2) pot1_1() Delay(2, 3) CombatWindow.Choose_Cancel() Headquarters() Delay(1, 2) CombatWindow.Deploy_Confirm() # 交换 Headquarters() Delay(1, 2) pot1_1() Delay(1, 2) click(randint(685, 861), randint(560, 623)) Delay(2, 3) CombatWindow.Choose_Cancel() CombatWindow.PlanMode() pot2_1() Delay(1, 2) Airport() Delay(1, 2) CombatWindow.Choose_Cancel() pot1_1() Delay(1, 2) pot3_1() Delay(1, 2) CombatWindow.Plan_Confirm() Delay(67, 68)
def round5(): ## 计划模式 CombatWindow.PlanMode() pot4_2() Delay(0, 1) pot5_2() Delay(0, 1) CombatWindow.Choose_Cancel() pot3_2() Delay(0, 1) pot6_2() Delay(0, 1) CombatWindow.Plan_Confirm() Delay(50, 52) # 打开妖精 CombatWindow.Fairy_AUTO() ## 第五回合结束 CombatWindow.Round_End() # 等待 Delay(21, 23) CombatWindow.Combat_EndClear() Delay(6, 7)
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()
def Combat_16(): # 选择关卡 CombatWindow.ChooseLevel(6) # 点击普通作战 CombatWindow.NormalCombat() # 点击指挥部 Headquarters() Delay(2, 4) # 点击确定,部署第一梯队 CombatWindow.Deploy_Confirm() # 开始作战 CombatWindow.Combat_Start() # 点击梯队2次 Headquarters() Delay(2, 4) Headquarters() Delay(2, 4) # 补充弹药 CombatWindow.Supply() # 进入计划模式 CombatWindow.PlanMode() # 规划路径 pot1() Delay(2, 4) # 执行计划 CombatWindow.Plan_Confirm() # 等待 Delay(70, 75) # 结束回合 CombatWindow.Round_End() Delay(25, 27) # 结算动画 click(randint(1200, 1500), randint(600, 750)) Delay(2, 4) click(randint(1200, 1500), randint(600, 750)) Delay(2, 4) # 点击梯队2次 Airport() Delay(2, 4) Airport() Delay(2, 4) # 补充弹药 CombatWindow.Supply() # 进入计划模式 CombatWindow.PlanMode() # 规划路径 pot2() Delay(2, 4) pot3() Delay(2, 4) # 执行计划 CombatWindow.Plan_Confirm() # 等待 Delay(120, 122) click(randint(1200, 1500), randint(600, 750)) Delay(2, 4) # 结束回合 CombatWindow.Round_End() Delay(12, 14) # 结算动画 CombatWindow.Combat_Animation()
def Combat_02(current_times): # 选择关卡 CombatWindow.ChooseLevel(2) # 交换打手 # 点击指挥部 Headquarters() Delay(1, 2) # 点击队伍编成 CombatWindow.Team_Form() # 交换打手 FormationWindow.ChooseFigure(3) FormationWindow.FigureKindDisplay('AR', True) if current_times % 2 == 0:# 偶数次 HK416 FormationWindow.Figure(2, 1) else:# 奇数次 RFB FormationWindow.Figure(1, 5) Delay(1, 2) # 返回 general.Cancel() # 部署梯队 # 点击指挥部 Headquarters() Delay(1, 2) # 点击确定,部署打手队 CombatWindow.Deploy_Confirm() # 点击机场 Airport() Delay(1, 2) # 点击确定,部署狗粮 CombatWindow.Deploy_Confirm() # 开始作战 CombatWindow.Combat_Start() # 点击狗粮2次 Airport() Delay(1, 2) Airport() Delay(1, 2) # 补充弹药 CombatWindow.Supply() # 随意点击 CombatWindow.Choose_Cancel() # 进入计划模式 CombatWindow.PlanMode() # 点击打手队 Headquarters() Delay(1, 2) # 规划路径 pot1() Delay(1, 2) pot2() Delay(1, 2) # 执行计划 CombatWindow.Plan_Confirm() # 等待 if current_times % 2 == 0:# 偶数次 HK416 Delay(193, 194) else:# 奇数次 RFB Delay(197, 198) # 结束回合 CombatWindow.Round_End() Delay(12, 14) # 结算动画 CombatWindow.Combat_Animation()
def Combat_44e(current_times): # 选择关卡 CombatWindow.ChooseLevel(4) # 交换打手 # 点击指挥部 click(randint(1244, 1281), randint(520, 566)) Delay(1, 2) # 点击队伍编成 CombatWindow.Team_Form() # 交换打手TODO if current_times % 2 == 0: # 偶数次 15 # 点击3号位打手 FormationWindow.ChooseFigure(3) # 选择替补1 FormationWindow.Figure(1, 4) else: # 奇数次 M4 # 点击3号位打手 FormationWindow.ChooseFigure(3) # 选择替补1 FormationWindow.Figure(1, 3) # 返回 general.Cancel() # 向上拖动 moveTo(randint(627, 1715), randint(200, 450)) dragRel(randint(-50, 50), randint(800, 900), 0.5) Delay(0, 1) # 点击机场 Airport() Delay(1, 2) # 点击确定,部署打手队 CombatWindow.Deploy_Confirm() # 点击指挥部 Headquarters() Delay(1, 2) # 点击确定,部署狗粮队 CombatWindow.Deploy_Confirm() # 开始作战 CombatWindow.Combat_Start() # 点击梯队2次 Headquarters() Delay(1, 2) Headquarters() Delay(1, 2) # 补充弹药 CombatWindow.Supply() # 随意点击 click(randint(1300, 1700), randint(750, 900)) Delay(0, 1) # 进入计划模式 CombatWindow.PlanMode() # 规划路径 Airport() Delay(1, 2) pot1() Delay(1, 2) # 执行计划 CombatWindow.Plan_Confirm() # 等待 Delay(97, 100) # 结束回合 CombatWindow.Round_End() Delay(12, 14) # 结算动画 CombatWindow.Combat_Animation()
def Combat_1(): # 选择关卡 CombatSet.ChooseLevel(1) # 部署梯队 # 点击指挥部 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() # 随意点击 click(randint(1600, 1800), randint(750, 900)) Delay(0, 1) # 点击机场2次 Airport() Delay(1, 2) Airport() Delay(1, 2) # 补充弹药 CombatWindow.Supply() # 进入计划模式 CombatWindow.PlanMode() # 规划路径 pot1() Delay(1, 2) # 随意点击 click(randint(1600, 1800), randint(750, 900)) Delay(0, 1) Headquarters() Delay(0, 1) pot2() Delay(1, 2) # 随意点击 click(randint(1600, 1800), randint(750, 900)) Airport() Delay(0, 1) pot3() Delay(1, 2) # 执行计划 CombatWindow.Plan_Confirm() # 等待 Delay(110, 112) # 结算动画 CombatWindow.Combat_Animation() ## 如果有碎片就取消注释 # click(randint(1800, 1900), randint(750, 900)) # Delay(1, 2) click(randint(1800, 1900), randint(750, 900))