mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-23 02:53:44 +08:00
Fix: inverse condition can exit prematurely without reward collect; change to image_color_count
Fix: expected_end default bool on return
This commit is contained in:
@@ -82,9 +82,8 @@ class MetaReward(Combat, UI):
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
# End
|
# End
|
||||||
if self.appear(REWARD_CHECK, offset=(20, 20)) and not (
|
if self.appear(REWARD_CHECK, offset=(20, 20)) and \
|
||||||
self.appear(REWARD_RECEIVE, offset=(20, 20)) and REWARD_RECEIVE.match_appear_on(self.device.image)
|
self.image_color_count(REWARD_RECEIVE, color=(49, 52, 49), threshold=221, count=400):
|
||||||
):
|
|
||||||
if confirm_timer.reached():
|
if confirm_timer.reached():
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -134,6 +134,8 @@ class OpsiAshBeacon(Meta):
|
|||||||
logger.info('Meta combat finished and in correct page.')
|
logger.info('Meta combat finished and in correct page.')
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
return False
|
||||||
|
|
||||||
# Attack
|
# Attack
|
||||||
combat = AshCombat(config=self.config, device=self.device)
|
combat = AshCombat(config=self.config, device=self.device)
|
||||||
combat.combat(expected_end=expected_end, save_get_items=False, emotion_reduce=False)
|
combat.combat(expected_end=expected_end, save_get_items=False, emotion_reduce=False)
|
||||||
@@ -458,6 +460,8 @@ class AshBeaconAssist(Meta):
|
|||||||
logger.info('Meta combat finished and in correct page.')
|
logger.info('Meta combat finished and in correct page.')
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
return False
|
||||||
|
|
||||||
# Attack
|
# Attack
|
||||||
combat = AshCombat(config=self.config, device=self.device)
|
combat = AshCombat(config=self.config, device=self.device)
|
||||||
combat.combat(expected_end=expected_end, save_get_items=False, emotion_reduce=False)
|
combat.combat(expected_end=expected_end, save_get_items=False, emotion_reduce=False)
|
||||||
|
|||||||
Reference in New Issue
Block a user