mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-21 11:25:36 +08:00
Fix: Failed to select ships using ONE_CLICK_RETIREMENT because of game bug (#1575)
This commit is contained in:
@@ -152,7 +152,6 @@ class Retirement(Enhancement):
|
|||||||
amount = self._retire_amount
|
amount = self._retire_amount
|
||||||
end = False
|
end = False
|
||||||
total = 0
|
total = 0
|
||||||
click_count = 0
|
|
||||||
|
|
||||||
if self.config.RETIRE_KEEP_COMMON_CV:
|
if self.config.RETIRE_KEEP_COMMON_CV:
|
||||||
self._have_kept_cv = False
|
self._have_kept_cv = False
|
||||||
@@ -161,6 +160,7 @@ class Retirement(Enhancement):
|
|||||||
self.handle_info_bar()
|
self.handle_info_bar()
|
||||||
|
|
||||||
skip_first_screenshot = True
|
skip_first_screenshot = True
|
||||||
|
click_count = 0
|
||||||
while 1:
|
while 1:
|
||||||
if skip_first_screenshot:
|
if skip_first_screenshot:
|
||||||
skip_first_screenshot = False
|
skip_first_screenshot = False
|
||||||
@@ -173,14 +173,16 @@ class Retirement(Enhancement):
|
|||||||
logger.info('No more ships to retire.')
|
logger.info('No more ships to retire.')
|
||||||
end = True
|
end = True
|
||||||
break
|
break
|
||||||
|
|
||||||
|
# Click
|
||||||
if click_count >= 3:
|
if click_count >= 3:
|
||||||
logger.warning('Failed to select ships using ONE_CLICK_RETIREMENT after 3 trial, '
|
logger.warning('Failed to select ships using ONE_CLICK_RETIREMENT after 3 trial, '
|
||||||
'probably because game bugged, a re-enter should fix it')
|
'probably because game bugged, a re-enter should fix it')
|
||||||
# Mark as retire finished, higher level will call retires
|
# Mark as retire finished, higher level will call retires
|
||||||
end = True
|
end = True
|
||||||
|
total = 10
|
||||||
break
|
break
|
||||||
# Click
|
elif self.appear_then_click(ONE_CLICK_RETIREMENT, interval=2):
|
||||||
if self.appear_then_click(ONE_CLICK_RETIREMENT, interval=2):
|
|
||||||
click_count += 1
|
click_count += 1
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user