mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-16 01:07:22 +08:00
Fix: Handle reward of last beacon when entering ash beacon
This commit is contained in:
@@ -191,6 +191,8 @@ class OSAsh(UI):
|
|||||||
continue
|
continue
|
||||||
if self.appear_then_click(BEACON_ENTER, offset=(20, 20), interval=2):
|
if self.appear_then_click(BEACON_ENTER, offset=(20, 20), interval=2):
|
||||||
continue
|
continue
|
||||||
|
if self._handle_ash_beacon_reward():
|
||||||
|
continue
|
||||||
|
|
||||||
# End:
|
# End:
|
||||||
if self.appear(ASH_START, offset=(30, 30)):
|
if self.appear(ASH_START, offset=(30, 30)):
|
||||||
@@ -213,6 +215,19 @@ class OSAsh(UI):
|
|||||||
self.device.click(HELP_3)
|
self.device.click(HELP_3)
|
||||||
self.ui_click(click_button=HELP_CONFIRM, check_button=HELP_ENTER)
|
self.ui_click(click_button=HELP_CONFIRM, check_button=HELP_ENTER)
|
||||||
|
|
||||||
|
def _handle_ash_beacon_reward(self):
|
||||||
|
"""
|
||||||
|
Returns:
|
||||||
|
bool: If clicked
|
||||||
|
"""
|
||||||
|
if self.appear_then_click(BEACON_REWARD, interval=2):
|
||||||
|
return True
|
||||||
|
if self.appear(GET_ITEMS_1, interval=2):
|
||||||
|
self.device.click(BEACON_REWARD)
|
||||||
|
return True
|
||||||
|
|
||||||
|
return False
|
||||||
|
|
||||||
def _ash_beacon_attack(self):
|
def _ash_beacon_attack(self):
|
||||||
"""
|
"""
|
||||||
Attack ash beacon until it's killed.
|
Attack ash beacon until it's killed.
|
||||||
@@ -248,10 +263,7 @@ class OSAsh(UI):
|
|||||||
else:
|
else:
|
||||||
confirm_timer.reset()
|
confirm_timer.reset()
|
||||||
|
|
||||||
if self.appear_then_click(BEACON_REWARD, interval=2):
|
if self._handle_ash_beacon_reward():
|
||||||
continue
|
|
||||||
if self.appear(GET_ITEMS_1, interval=2):
|
|
||||||
self.device.click(BEACON_REWARD)
|
|
||||||
continue
|
continue
|
||||||
if self.appear(ASH_START, offset=(30, 30)):
|
if self.appear(ASH_START, offset=(30, 30)):
|
||||||
self.ui_click(ASH_START, check_button=BATTLE_PREPARATION, offset=(30, 30), skip_first_screenshot=True)
|
self.ui_click(ASH_START, check_button=BATTLE_PREPARATION, offset=(30, 30), skip_first_screenshot=True)
|
||||||
|
|||||||
Reference in New Issue
Block a user