1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-17 16:55:27 +08:00

Merge pull request #1114 from Horizon101011/dev

Fix: Handle exception caused by multiple tries without material
This commit is contained in:
LmeSzinc
2022-05-10 13:01:34 +08:00
committed by GitHub

View File

@@ -217,9 +217,9 @@ class Enhancement(Dock):
if state == "state_enhance_check":
# Avoid too_many_click exception caused by multiple tries without material
if state_list[-3:-1] == ["state_enhance_recommend", "state_enhance_fail"]:
self.device.click_record.pop()
self.device.click_record.pop()
if state_list[-2:] == ["state_enhance_recommend", "state_enhance_fail"]:
while self.device.click_record[-1] in ['ENHANCE_RECOMMEND', 'EQUIP_SWIPE']:
self.device.click_record.pop()
state_list.clear()
state_list.append(state)
if len(state_list) > 30: