mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-17 15:45:26 +08:00
Fix: Avoid too_many_click exception caused by enhancement failure on in-battle ships (#4217)
This commit is contained in:
@@ -220,9 +220,12 @@ class Enhancement(Dock):
|
|||||||
if state == "state_enhance_check":
|
if state == "state_enhance_check":
|
||||||
# Avoid too_many_click exception caused by multiple tries without material
|
# Avoid too_many_click exception caused by multiple tries without material
|
||||||
if state_list[-2:] == ["state_enhance_recommend", "state_enhance_fail"]:
|
if state_list[-2:] == ["state_enhance_recommend", "state_enhance_fail"]:
|
||||||
if len(self.device.click_record):
|
while self.device.click_record and (self.device.click_record[-1] in ['ENHANCE_RECOMMEND', 'SHIP_SWIPE']):
|
||||||
while self.device.click_record[-1] in ['ENHANCE_RECOMMEND', 'SHIP_SWIPE']:
|
self.device.click_record.pop()
|
||||||
self.device.click_record.pop()
|
# Avoid too_many_click exception caused by enhancement failure on in-battle ships
|
||||||
|
elif state_list[-3:] == ["state_enhance_attempt", "state_enhance_confirm", "state_enhance_fail"]:
|
||||||
|
while self.device.click_record and (self.device.click_record[-1] in ['ENHANCE_RECOMMEND', 'SHIP_SWIPE', 'ENHANCE_CONFIRM']):
|
||||||
|
self.device.click_record.pop()
|
||||||
state_list.clear()
|
state_list.clear()
|
||||||
state_list.append(state)
|
state_list.append(state)
|
||||||
if len(state_list) > 30:
|
if len(state_list) > 30:
|
||||||
|
|||||||
Reference in New Issue
Block a user