1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-14 09:36:03 +08:00

Add: W16 preparations

This commit is contained in:
guoh064
2026-01-18 00:36:32 +08:00
parent ad651eca4c
commit 1158a0535a
31 changed files with 560 additions and 14 deletions

View File

@@ -21,6 +21,7 @@ SUBMARINE_VIEW.add_state('on', check_button=SUBMARINE_VIEW_ON)
SUBMARINE_VIEW.add_state('off', check_button=SUBMARINE_VIEW_OFF)
MOB_MOVE_OFFSET = (120, 200)
AIR_STRIKE_OFFSET = (120, 200)
class StrategyHandler(InfoHandler):
@@ -259,3 +260,43 @@ class StrategyHandler(InfoHandler):
if self.appear_then_click(MOB_MOVE_CANCEL, offset=(20, 20), interval=5):
continue
def is_in_strategy_air_strike(self):
return self.appear(AIR_STRIKE_CONFIRM, offset=(20, 20))
def strategy_has_air_strike(self):
"""
Pages:
in: STRATEGY_OPENED
out: STRATEGY_OPENED
"""
if self.match_template_color(AIR_STRIKE_ENTER, offset=(150, 200)):
return True
else:
return False
def strategy_air_strike_enter(self, skip_first_screenshot=True):
"""
Pages:
in: STRATEGY_OPENED, AIR_STRIKE_ENTER
out: AIR_STRIKE_CONFIRM
"""
logger.info('Air strike enter')
for _ in self.loop(skip_first=skip_first_screenshot):
if self.appear(AIR_STRIKE_CONFIRM, offset=(20, 20)):
break
if self.appear_then_click(AIR_STRIKE_ENTER, offset=(150, 200), interval=5):
continue
def strategy_air_strike_cancel(self, skip_first_screenshot=True):
"""
Pages:
in: AIR_STRIKE_CONFIRM
out: STRATEGY_OPENED, AIR_STRIKE_ENTER
"""
logger.info('Air strike cancel')
for _ in self.loop(skip_first=skip_first_screenshot):
if self.appear(AIR_STRIKE_ENTER, offset=(150, 200)):
break
if self.appear_then_click(AIR_STRIKE_CANCEL, offset=(20, 20), interval=5):
continue