mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-18 05:41:29 +08:00
Merge branch 'nightly' of https://github.com/whoamikyo/AzurLaneAutoScript into nightly
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
|
from module.base.timer import Timer
|
||||||
from module.base.utils import get_color
|
from module.base.utils import get_color
|
||||||
from module.combat.assets import GET_ITEMS_1, GET_ITEMS_2, GET_ITEMS_3
|
from module.combat.assets import GET_ITEMS_1, GET_ITEMS_2, GET_ITEMS_3
|
||||||
from module.logger import logger
|
from module.logger import logger
|
||||||
@@ -108,14 +109,17 @@ class RewardResearch(ResearchSelector):
|
|||||||
|
|
||||||
def research_project_start(self, index, skip_first_screenshot=True):
|
def research_project_start(self, index, skip_first_screenshot=True):
|
||||||
logger.info(f'Research project: {index}')
|
logger.info(f'Research project: {index}')
|
||||||
|
click_timer = Timer(10)
|
||||||
while 1:
|
while 1:
|
||||||
if skip_first_screenshot:
|
if skip_first_screenshot:
|
||||||
skip_first_screenshot = False
|
skip_first_screenshot = False
|
||||||
else:
|
else:
|
||||||
self.device.screenshot()
|
self.device.screenshot()
|
||||||
|
|
||||||
if self.appear(RESEARCH_CHECK, interval=10):
|
# Don't use interval here, RESEARCH_CHECK already appeared 5 seconds ago
|
||||||
|
if click_timer.reached() and self.appear(RESEARCH_CHECK, offset=(20, 20)):
|
||||||
self.device.click(RESEARCH_ENTRANCE[index])
|
self.device.click(RESEARCH_ENTRANCE[index])
|
||||||
|
click_timer.reset()
|
||||||
continue
|
continue
|
||||||
if self.appear_then_click(RESEARCH_START, interval=10):
|
if self.appear_then_click(RESEARCH_START, interval=10):
|
||||||
continue
|
continue
|
||||||
|
|||||||
@@ -59,14 +59,6 @@ class Reward(RewardCommission, RewardTacticalClass, RewardResearch, LoginHandler
|
|||||||
reward = False
|
reward = False
|
||||||
exit_timer = Timer(1, count=3).start()
|
exit_timer = Timer(1, count=3).start()
|
||||||
click_timer = Timer(1)
|
click_timer = Timer(1)
|
||||||
btn = []
|
|
||||||
if self.config.ENABLE_COMMISSION_REWARD:
|
|
||||||
btn.append(REWARD_1)
|
|
||||||
if self.config.ENABLE_OIL_REWARD:
|
|
||||||
btn.append(OIL)
|
|
||||||
if self.config.ENABLE_COIN_REWARD:
|
|
||||||
btn.append(COIN)
|
|
||||||
|
|
||||||
while 1:
|
while 1:
|
||||||
self.device.screenshot()
|
self.device.screenshot()
|
||||||
|
|
||||||
@@ -83,7 +75,6 @@ class Reward(RewardCommission, RewardTacticalClass, RewardResearch, LoginHandler
|
|||||||
(self.config.ENABLE_OIL_REWARD and self.appear_then_click(OIL, interval=60))
|
(self.config.ENABLE_OIL_REWARD and self.appear_then_click(OIL, interval=60))
|
||||||
or (self.config.ENABLE_COIN_REWARD and self.appear_then_click(COIN, interval=60))
|
or (self.config.ENABLE_COIN_REWARD and self.appear_then_click(COIN, interval=60))
|
||||||
or (self.config.ENABLE_COMMISSION_REWARD and self.appear_then_click(REWARD_1, interval=1))
|
or (self.config.ENABLE_COMMISSION_REWARD and self.appear_then_click(REWARD_1, interval=1))
|
||||||
or (self.config.ENABLE_REWARD and self.appear_then_click(REWARD_3, interval=1))
|
|
||||||
):
|
):
|
||||||
exit_timer.reset()
|
exit_timer.reset()
|
||||||
click_timer.reset()
|
click_timer.reset()
|
||||||
|
|||||||
Reference in New Issue
Block a user