Skip to content

Commit

Permalink
修复我已经忘记是什么的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
HSLix committed Oct 31, 2023
1 parent 7a75810 commit 08094fb
Show file tree
Hide file tree
Showing 3 changed files with 96 additions and 29 deletions.
4 changes: 2 additions & 2 deletions src/gui/myGUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
exeCfg = {"EXPCount": 0, "ThreadCount": 0, "MirrorCount": 0,
"setWinSwitch": 0, "setPrizeSwitch": 0, "MirrorSwitch": 0, "ActivityCount": 0}

version = "V2.1.8_Realease"
version = "V2.1.9_Realease"



Expand Down Expand Up @@ -260,7 +260,7 @@ def setMainPageRightFrame(self):
self.LunacyToEnkephalinSet.place(width=180, height=40, x=0, y=45)


tk.Label(settingFrame, text="更多设置,等我用qt重构图形化界面再加\n承蒙各位厚爱!\n现在准备要加的设置有:\n1、镜牢第三层提前退出;\n2、镜牢可选择是否使用加成;\n3、会保留上次使用的设置;\n4、还有什么可以github提issue\n但记得看看有无重复\n\n!!为了奖励最大化\n尽量用完每周加成再使用本程序!!\nPS:月计11月将大改UI\n到时请自行到github更新2.1.9\n",
tk.Label(settingFrame, text="更多设置,等我用qt重构图形化界面再加\n承蒙各位厚爱!\n现在准备要加的设置有:\n1、镜牢第三层提前退出;\n2、镜牢可选择是否使用加成;\n3、会保留上次使用的设置;\n4、还有什么可以github提issue\n但记得看看有无重复\n\n!!为了奖励最大化\n尽量用完每周加成再使用本程序!!\nPS:近期时间安排紧张\n一段时间内只能不定期维护LALC现有功能\n",
font=("微软雅黑", 10),
justify="left",
anchor="w").place(width=400, height=390, x=0, y=100)
Expand Down
96 changes: 77 additions & 19 deletions src/script/classMir.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def ScriptTaskMirror1(self):

msg = "Mirror1 Loop " + str(loopCount) + " Times!"
myLog("info", msg)
myTimeSleep(5)
# myTimeSleep(2)



Expand All @@ -130,7 +130,7 @@ class _MirrorOfMirrors():
__slots__ = ("noWayFlag")

def __init__(self):
noWayFlag = False
self.noWayFlag = False
pass


Expand Down Expand Up @@ -202,18 +202,47 @@ def mirror2Entry(self):
getPic.winCap()
afc.autoSinClick("./pic/mirror/mirror2/ego/SelectEGOGift.png", "SelectEGOGift")
getPic.winCap()
afc.autoSinClick("./pic/mirror/mirror2/Preset.png", "Preset")
getPic.winCap()
if(afc.autoFind("./pic/error/noSavedPreset.png", "noPreset")):
raise noSavedPresetsError("没有预选队伍")
self.mirror2PrepareBattle()
if afc.autoSinClick("./pic/mirror/mirror2/Preset.png", "Preset"):
getPic.winCap()
if(afc.autoFind("./pic/error/noSavedPreset.png", "noPreset")):
raise noSavedPresetsError("没有预选队伍")
self.mirror2ChoosePreset()
afc.autoSinClick("./pic/mirror/mirror2/blackConfirm.png", "Confirm", 0, 0, 3)
getPic.winCap()
afc.autoSinClick("./pic/mirror/mirror2/BuyCoin.png", "BuyCoin", 0, 0, 8)
if(afc.autoFind("./pic/Wait.png", "Wait Sign")):
myWait()


def mirror2ChoosePreset(self):
'''镜牢2预选人的流程'''
i = 1
countFlag = 0
while(not afc.autoFind("./pic/team/FullTeam77.png", "7/7PresetFullSign")):
#i的归零
if(i > 12):
i = 1
countFlag += 1
if(countFlag > 1):
from src.log.myLog import myLog
myLog("warning","Preset Fail")
break
getPic.winCap()
if(i < 7):
addX = i * 140
addY = 0
else:
addX = (i - 6) * 140
addY = 200

afc.autoSinClick("./pic/team/Announcer.png", "Member", addX, addY + 100, 0.2)
getPic.winCap()
i += 1

afc.autoSinClick("./pic/team/Announcer.png", "Confirm", 1000, 400, 3)




def mirror2Cope(self):
'''处理镜牢2交互的各种情况'''
Expand Down Expand Up @@ -360,7 +389,7 @@ def mirror2BattlePart(self):
if (afc.autoSinClick("./pic/battle/Start.png", "Start")):
condition = True
elif(afc.autoFind("./pic/battle/battlePause.png", "Fighting Sign")):
myTimeSleep(3)
myTimeSleep(2)
condition = True
elif(afc.autoSinClick("./pic/battle/trianglePause.png", "Continue Fight!")):
condition = True
Expand All @@ -370,7 +399,6 @@ def mirror2BattlePart(self):
elif(afc.autoFind("./pic/Wait.png", "Wait Sign")):
myWait()
condition = True
myTimeSleep(1)
if(not condition):
loopCount += 1
if(loopCount > 2):
Expand All @@ -381,6 +409,7 @@ def mirror2BattlePart(self):
loopCount = 0
else:
loopCount = 0
myTimeSleep(0.9)


@checkAndExit
Expand Down Expand Up @@ -716,13 +745,12 @@ def mirror2SinCoreFight(self):




class _MirrorOfTheBeginning():
'''镜牢1相关函数集合类'''
__slots__ = ("noWayFlag")

def __init__(self):
noWayFlag = False
self.noWayFlag = False
pass

def Mirror1(self):
Expand All @@ -741,6 +769,8 @@ def Mirror1(self):

return result



@checkAndExit
@beginAndFinishLog
def mirror1Entry(self):
Expand All @@ -765,22 +795,50 @@ def mirror1Entry(self):
getPic.winCap()
afc.autoSinClick("./pic/mirror/mirror1/ego/SelectEGOGift.png", "SelectEGOGift")
getPic.winCap()
afc.autoSinClick("./pic/mirror/mirror1/Preset.png", "Preset")
getPic.winCap()
if(afc.autoFind("./pic/error/noSavedPreset.png", "noPreset")):
raise noSavedPresetsError("没有预选队伍")
self.mirror1PrepareBattle()
if afc.autoSinClick("./pic/mirror/mirror1/Preset.png", "Preset"):
getPic.winCap()
if(afc.autoFind("./pic/error/noSavedPreset.png", "noPreset")):
raise noSavedPresetsError("没有预选队伍")
self.mirror1ChoosePreset()
afc.autoSinClick("./pic/mirror/mirror1/blackConfirm.png", "blackConfirm", 0, 0, 3)
getPic.winCap()
afc.autoSinClick("./pic/mirror/mirror1/BuyCoin.png", "BuyCoin", 0, 0, 8)
if(afc.autoFind("./pic/Wait.png", "Wait Sign")):
myWait()


def mirror1ChoosePreset(self):
'''镜牢1预选人的流程'''
i = 1
countFlag = 0
while(not afc.autoFind("./pic/team/FullTeam55.png", "5/5PresetFullSign")):
#i的归零
if(i > 12):
i = 1
countFlag += 1
if(countFlag > 1):
from src.log.myLog import myLog
myLog("warning","Preset Fail")
break
getPic.winCap()
if(i < 7):
addX = i * 140
addY = 0
else:
addX = (i - 6) * 140
addY = 200

afc.autoSinClick("./pic/team/Announcer.png", "Member", addX, addY + 100, 0.2)
getPic.winCap()
i += 1

afc.autoSinClick("./pic/team/Announcer.png", "Confirm", 1000, 400, 3)


@checkAndExit
@beginAndFinishLog
def mirror1Leave(self):
'''镜牢2离开时处理notFullFlag'''
'''镜牢1离开时处理notFullFlag'''
global notFullFlag
notFullFlag = 0

Expand Down Expand Up @@ -948,7 +1006,7 @@ def mirror1BattlePart(self):
if (afc.autoSinClick("./pic/battle/Start.png", "Start")):
condition = True
elif(afc.autoFind("./pic/battle/battlePause.png", "Fighting Sign")):
myTimeSleep(3)
myTimeSleep(2)
condition = True
elif(afc.autoSinClick("./pic/battle/trianglePause.png", "Continue Fight!")):
condition = True
Expand All @@ -958,7 +1016,6 @@ def mirror1BattlePart(self):
elif(afc.autoFind("./pic/Wait.png", "Wait Sign")):
myWait()
condition = True
myTimeSleep(1)
if(not condition):
loopCount += 1
if(loopCount > 2):
Expand All @@ -969,6 +1026,7 @@ def mirror1BattlePart(self):
loopCount = 0
else:
loopCount = 0
myTimeSleep(0.9)



Expand Down
25 changes: 17 additions & 8 deletions src/script/classScript.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ def ScriptBackToInitMenu(self):
elif afc.autoSinClick("./pic/battle/confirm.png", "Confirm"):
# 战斗结算
loopCount = 0
elif afc.autoSinClick("./pic/battle/Confirm.png", "LevelUpConfirm"):
elif afc.autoSinClick("./pic/battle/levelUpConfirm.png", "LevelUpConfirm"):
# 升级结算
loopCount = 0
elif afc.autoSinClick("./pic/scene/QuitScene.png", "QuitScene"):
Expand Down Expand Up @@ -276,13 +276,22 @@ def ScriptBackToInitMenu(self):
# 镜牢的情况
elif(afc.autoFind("./pic/mirror/mirror2/way/mirror2MapSign.png", "mirror2MapSign")
or afc.autoFind("./pic/mirror/mirror2/EGOGiftOwned.png", "EGOGiftOwned")):
afc.autoSinClick("./pic/mirror/mirror2/Gear.png", "ExitGear")
getPic.winCap()
afc.autoSinClick(
"./pic/mirror/mirror2/LeftArrow.png", "ToWindow")
getPic.winCap()
afc.autoSinClick("./pic/mirror/mirror2/whiteConfirm.png", "Confirm", 0, 0, 5)
loopCount = 0
if afc.autoSinClick("./pic/mirror/mirror2/Gear.png", "ExitGear"):
getPic.winCap()
afc.autoSinClick(
"./pic/mirror/mirror2/LeftArrow.png", "ToWindow")
getPic.winCap()
afc.autoSinClick("./pic/mirror/mirror2/whiteConfirm.png", "Confirm", 0, 0, 5)
loopCount = 0
elif afc.autoSinClick("./pic/mirror/mirror2/ClaimRewards.png","ClaimRewards", 0, 0, 0.7, 1, 0.7):
getPic.winCap()
afc.autoSinClick("./pic/mirror/mirror2/Receive.png","Receive")
getPic.winCap()
if afc.autoSinClick("./pic/mirror/mirror2/whiteConfirm.png","FirstConfirm"):
getPic.winCap()
if afc.autoSinClick("./pic/mirror/mirror2/way/Confirm.png","SecondConfirm"):
loopCount = 0

#在循环里必须有应对错误的情况
self.errorRetry()
getPic.winCap()
Expand Down

0 comments on commit 08094fb

Please sign in to comment.