mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-27 14:25:38 +08:00
ADD equip change when COMMON_CV_NAME == 'ANY'
This commit is contained in:
@@ -121,7 +121,10 @@ class GemsFarming(CampaignRun, EquipmentChange):
|
|||||||
level_grids = CARD_LEVEL_GRIDS
|
level_grids = CARD_LEVEL_GRIDS
|
||||||
card_grids = CARD_GRIDS
|
card_grids = CARD_GRIDS
|
||||||
|
|
||||||
if self.config.COMMON_CV_NAME == 'any':
|
if self.config.COMMON_CV_NAME == 'ANY':
|
||||||
|
|
||||||
|
self.dock_sort_method_dsc_set()
|
||||||
|
|
||||||
level_ocr = LevelOcr(level_grids.buttons, name='DOCK_LEVEL_OCR', threshold=64)
|
level_ocr = LevelOcr(level_grids.buttons, name='DOCK_LEVEL_OCR', threshold=64)
|
||||||
list_level = level_ocr.ocr(self.device.image)
|
list_level = level_ocr.ocr(self.device.image)
|
||||||
for button, level in list(zip(card_grids.buttons, list_level))[::-1]:
|
for button, level in list(zip(card_grids.buttons, list_level))[::-1]:
|
||||||
|
|||||||
@@ -301,7 +301,7 @@ class AzurLaneConfig:
|
|||||||
RETIRE_SR = False
|
RETIRE_SR = False
|
||||||
RETIRE_SSR = False
|
RETIRE_SSR = False
|
||||||
RETIRE_KEEP_COMMON_CV = True
|
RETIRE_KEEP_COMMON_CV = True
|
||||||
COMMON_CV_NAME = 'HERMES'
|
COMMON_CV_NAME = 'ANY'
|
||||||
COMMON_CV_THRESHOLD = 0.9
|
COMMON_CV_THRESHOLD = 0.9
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -28,7 +28,12 @@ class EquipmentChange(Equipment):
|
|||||||
|
|
||||||
self.equip_side_navbar_ensure(bottom=1)
|
self.equip_side_navbar_ensure(bottom=1)
|
||||||
|
|
||||||
for index in range(0, 5):
|
if self.config.COMMON_CV_NAME == 'ANY':
|
||||||
|
index_list = range(3,5)
|
||||||
|
else:
|
||||||
|
index_list = range(0,5)
|
||||||
|
|
||||||
|
for index in index_list:
|
||||||
|
|
||||||
while 1:
|
while 1:
|
||||||
if skip_first_screenshot:
|
if skip_first_screenshot:
|
||||||
@@ -60,7 +65,12 @@ class EquipmentChange(Equipment):
|
|||||||
|
|
||||||
self.ensure_no_info_bar(1)
|
self.ensure_no_info_bar(1)
|
||||||
|
|
||||||
for index in range(0, 5):
|
if self.config.COMMON_CV_NAME == 'ANY':
|
||||||
|
index_list = range(3,5)
|
||||||
|
else:
|
||||||
|
index_list = range(0,5)
|
||||||
|
|
||||||
|
for index in index_list:
|
||||||
|
|
||||||
enter_button = globals()[
|
enter_button = globals()[
|
||||||
'EQUIP_TAKE_ON_{index}'.format(index=index)]
|
'EQUIP_TAKE_ON_{index}'.format(index=index)]
|
||||||
|
|||||||
@@ -328,7 +328,7 @@ class Retirement(Enhancement):
|
|||||||
Returns:
|
Returns:
|
||||||
Button:
|
Button:
|
||||||
"""
|
"""
|
||||||
if self.config.COMMON_CV_NAME == 'any':
|
if self.config.COMMON_CV_NAME == 'ANY':
|
||||||
for commen_cv_name in ['BOGUE', 'HERMES', 'LANGLEY', 'RANGER']:
|
for commen_cv_name in ['BOGUE', 'HERMES', 'LANGLEY', 'RANGER']:
|
||||||
template = globals()[f'TEMPLATE_{commen_cv_name}']
|
template = globals()[f'TEMPLATE_{commen_cv_name}']
|
||||||
sim, button = template.match_result(self.device.image.resize(size=(1189, 669)))
|
sim, button = template.match_result(self.device.image.resize(size=(1189, 669)))
|
||||||
|
|||||||
Reference in New Issue
Block a user