mirror of
https://github.com/sui-feng-cb/AzurLaneAutoScript1.git
synced 2026-07-12 18:44:22 +08:00
Merge branch 'master' into dev
This commit is contained in:
@@ -72,8 +72,8 @@ class GitManager(DeployConfig):
|
|||||||
def goc_client(self):
|
def goc_client(self):
|
||||||
client = GitOverCdnClient(
|
client = GitOverCdnClient(
|
||||||
url=[
|
url=[
|
||||||
|
'https://1818706573.cdn.123clouddisk.com/1818706573/pack/LmeSzinc_AzurLaneAutoScript_master',
|
||||||
'https://vip.123pan.cn/1818706573/pack/LmeSzinc_AzurLaneAutoScript_master',
|
'https://vip.123pan.cn/1818706573/pack/LmeSzinc_AzurLaneAutoScript_master',
|
||||||
'https://1818706573.v.123yx.com/1818706573/pack/LmeSzinc_AzurLaneAutoScript_master',
|
|
||||||
],
|
],
|
||||||
folder=self.root_filepath,
|
folder=self.root_filepath,
|
||||||
source='origin',
|
source='origin',
|
||||||
|
|||||||
@@ -29,6 +29,8 @@ class CoalitionCombat(CoalitionUI, CampaignBase):
|
|||||||
# End
|
# End
|
||||||
if self.is_combat_loading():
|
if self.is_combat_loading():
|
||||||
break
|
break
|
||||||
|
if self.is_combat_executing():
|
||||||
|
break
|
||||||
if self.in_coalition():
|
if self.in_coalition():
|
||||||
raise CampaignEnd
|
raise CampaignEnd
|
||||||
|
|
||||||
@@ -52,6 +54,11 @@ class CoalitionCombat(CoalitionUI, CampaignBase):
|
|||||||
self.device.click(BATTLE_STATUS)
|
self.device.click(BATTLE_STATUS)
|
||||||
click_timer.reset()
|
click_timer.reset()
|
||||||
|
|
||||||
|
def auto_search_combat_end(self):
|
||||||
|
if self.appear(BATTLE_STATUS, offset=(80, 20)):
|
||||||
|
return True
|
||||||
|
return False
|
||||||
|
|
||||||
def coalition_combat(self):
|
def coalition_combat(self):
|
||||||
"""
|
"""
|
||||||
Pages:
|
Pages:
|
||||||
|
|||||||
@@ -199,6 +199,12 @@ class AutoSearchCombat(MapOperation, Combat, CampaignStatus):
|
|||||||
if self.is_in_auto_search_menu() or self._handle_auto_search_menu_missing():
|
if self.is_in_auto_search_menu() or self._handle_auto_search_menu_missing():
|
||||||
raise CampaignEnd
|
raise CampaignEnd
|
||||||
|
|
||||||
|
def auto_search_combat_end(self):
|
||||||
|
"""
|
||||||
|
A custom combat end that used in coalition
|
||||||
|
"""
|
||||||
|
return False
|
||||||
|
|
||||||
def auto_search_combat_execute(self, emotion_reduce, fleet_index):
|
def auto_search_combat_execute(self, emotion_reduce, fleet_index):
|
||||||
"""
|
"""
|
||||||
Args:
|
Args:
|
||||||
@@ -281,6 +287,8 @@ class AutoSearchCombat(MapOperation, Combat, CampaignStatus):
|
|||||||
or self.is_auto_search_running():
|
or self.is_auto_search_running():
|
||||||
self.device.screenshot_interval_set()
|
self.device.screenshot_interval_set()
|
||||||
break
|
break
|
||||||
|
if self.auto_search_combat_end():
|
||||||
|
break
|
||||||
|
|
||||||
def auto_search_combat_status(self):
|
def auto_search_combat_status(self):
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import module.config.server as server
|
import module.config.server as server
|
||||||
|
|
||||||
from module.base.button import ButtonGrid, get_color, color_similar
|
from module.base.button import ButtonGrid, get_color, color_similar
|
||||||
from module.base.decorator import cached_property
|
from module.base.decorator import Config, cached_property
|
||||||
from module.base.timer import Timer
|
from module.base.timer import Timer
|
||||||
from module.combat.assets import GET_ITEMS_1
|
from module.combat.assets import GET_ITEMS_1
|
||||||
from module.equipment.equipment import Equipment
|
from module.equipment.equipment import Equipment
|
||||||
@@ -84,7 +84,7 @@ class Dock(Equipment):
|
|||||||
logger.info('Dock filter enter')
|
logger.info('Dock filter enter')
|
||||||
self.interval_clear(DOCK_CHECK)
|
self.interval_clear(DOCK_CHECK)
|
||||||
for _ in self.loop():
|
for _ in self.loop():
|
||||||
if self.appear(DOCK_FILTER_CONFIRM, offset=(20, 20)):
|
if self.appear(DOCK_FILTER_CONFIRM, offset=(20, 60)):
|
||||||
break
|
break
|
||||||
if self.appear(DOCK_CHECK, offset=(20, 20), interval=5):
|
if self.appear(DOCK_CHECK, offset=(20, 20), interval=5):
|
||||||
self.device.click(DOCK_FILTER)
|
self.device.click(DOCK_FILTER)
|
||||||
@@ -116,16 +116,17 @@ class Dock(Equipment):
|
|||||||
# End
|
# End
|
||||||
# sometimes you have dock filter without black-blurred background
|
# sometimes you have dock filter without black-blurred background
|
||||||
# DOCK_FILTER_CONFIRM and DOCK_CHECK appears
|
# DOCK_FILTER_CONFIRM and DOCK_CHECK appears
|
||||||
if not self.appear(DOCK_FILTER_CONFIRM, offset=(20, 20)):
|
if not self.appear(DOCK_FILTER_CONFIRM, offset=(20, 60)):
|
||||||
if self.appear(DOCK_CHECK, offset=(20, 20)):
|
if self.appear(DOCK_CHECK, offset=(20, 20)):
|
||||||
break
|
break
|
||||||
if self.appear_then_click(DOCK_FILTER_CONFIRM, offset=(20, 20), interval=3):
|
if self.appear_then_click(DOCK_FILTER_CONFIRM, offset=(20, 60), interval=3):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if wait_loading:
|
if wait_loading:
|
||||||
self.handle_dock_cards_loading()
|
self.handle_dock_cards_loading()
|
||||||
|
|
||||||
@cached_property
|
@cached_property
|
||||||
|
@Config.when(SERVER='tw')
|
||||||
def dock_filter(self) -> Setting:
|
def dock_filter(self) -> Setting:
|
||||||
delta = (147 + 1 / 3, 57)
|
delta = (147 + 1 / 3, 57)
|
||||||
button_shape = (139, 42)
|
button_shape = (139, 42)
|
||||||
@@ -171,6 +172,54 @@ class Dock(Equipment):
|
|||||||
)
|
)
|
||||||
return setting
|
return setting
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
@Config.when(SERVER=None)
|
||||||
|
def dock_filter(self) -> Setting:
|
||||||
|
delta = (147 + 1 / 3, 57)
|
||||||
|
button_shape = (139, 42)
|
||||||
|
setting = Setting(name='DOCK', main=self)
|
||||||
|
setting.add_setting(
|
||||||
|
setting='sort',
|
||||||
|
option_buttons=ButtonGrid(
|
||||||
|
origin=(218, 36), delta=delta, button_shape=button_shape, grid_shape=(7, 1), name='FILTER_SORT'),
|
||||||
|
# stat has extra grid, not worth pursuing
|
||||||
|
option_names=['rarity', 'level', 'total', 'join', 'intimacy', 'mood', 'stat'],
|
||||||
|
option_default='level'
|
||||||
|
)
|
||||||
|
setting.add_setting(
|
||||||
|
setting='index',
|
||||||
|
option_buttons=ButtonGrid(
|
||||||
|
origin=(218, 109), delta=delta, button_shape=button_shape, grid_shape=(7, 2), name='FILTER_INDEX'),
|
||||||
|
option_names=['all', 'vanguard', 'main', 'dd', 'cl', 'ca', 'bb',
|
||||||
|
'cv', 'repair', 'ss', 'others', 'not_available', 'not_available', 'not_available'],
|
||||||
|
option_default='all'
|
||||||
|
)
|
||||||
|
setting.add_setting(
|
||||||
|
setting='faction',
|
||||||
|
option_buttons=ButtonGrid(
|
||||||
|
origin=(218, 239), delta=delta, button_shape=button_shape, grid_shape=(7, 3), name='FILTER_FACTION'),
|
||||||
|
option_names=['all', 'eagle', 'royal', 'sakura', 'iron', 'dragon', 'sardegna',
|
||||||
|
'northern', 'iris', 'vichya', 'tulipa', 'pedreria', 'meta', 'tempesta',
|
||||||
|
'other', 'not_available', 'not_available', 'not_available', 'not_available', 'not_available', 'not_available'],
|
||||||
|
option_default='all'
|
||||||
|
)
|
||||||
|
setting.add_setting(
|
||||||
|
setting='rarity',
|
||||||
|
option_buttons=ButtonGrid(
|
||||||
|
origin=(218, 427), delta=delta, button_shape=button_shape, grid_shape=(7, 1), name='FILTER_RARITY'),
|
||||||
|
option_names=['all', 'common', 'rare', 'elite', 'super_rare', 'ultra', 'not_available'],
|
||||||
|
option_default='all'
|
||||||
|
)
|
||||||
|
setting.add_setting(
|
||||||
|
setting='extra',
|
||||||
|
option_buttons=ButtonGrid(
|
||||||
|
origin=(218, 499), delta=delta, button_shape=button_shape, grid_shape=(7, 2), name='FILTER_EXTRA'),
|
||||||
|
option_names=['no_limit', 'has_skin', 'can_retrofit', 'enhanceable', 'can_limit_break', 'not_level_max', 'can_awaken',
|
||||||
|
'can_awaken_plus', 'special', 'oath_skin', 'unique_augment_module', 'wear_skin', 'oathed', 'not_available'],
|
||||||
|
option_default='no_limit'
|
||||||
|
)
|
||||||
|
return setting
|
||||||
|
|
||||||
def dock_filter_set(
|
def dock_filter_set(
|
||||||
self,
|
self,
|
||||||
sort='level',
|
sort='level',
|
||||||
@@ -191,12 +240,13 @@ class Dock(Equipment):
|
|||||||
'cv', 'repair', 'ss', 'others', 'not_available', 'not_available', 'not_available']
|
'cv', 'repair', 'ss', 'others', 'not_available', 'not_available', 'not_available']
|
||||||
faction (str, list):
|
faction (str, list):
|
||||||
['all', 'eagle', 'royal', 'sakura', 'iron', 'dragon', 'sardegna',
|
['all', 'eagle', 'royal', 'sakura', 'iron', 'dragon', 'sardegna',
|
||||||
'northern', 'iris', 'vichya', 'other', 'not_available', 'not_available', 'not_available']
|
'northern', 'iris', 'vichya', 'tulipa', 'pedreria', 'meta', 'tempesta',
|
||||||
|
'other', 'not_available', 'not_available', 'not_available', 'not_available', 'not_available', 'not_available']
|
||||||
rarity (str, list):
|
rarity (str, list):
|
||||||
['all', 'common', 'rare', 'elite', 'super_rare', 'ultra', 'not_available']
|
['all', 'common', 'rare', 'elite', 'super_rare', 'ultra', 'not_available']
|
||||||
extra (str, list):
|
extra (str, list):
|
||||||
['no_limit', 'has_skin', 'can_retrofit', 'enhanceable', 'can_limit_break', 'not_level_max', 'can_awaken',
|
['no_limit', 'has_skin', 'can_retrofit', 'enhanceable', 'can_limit_break', 'not_level_max', 'can_awaken',
|
||||||
'can_awaken_plus', 'special', 'oath_skin', 'unique_augment_module', 'not_available', 'not_available', 'not_available'],
|
'can_awaken_plus', 'special', 'oath_skin', 'unique_augment_module', 'wear_skin', 'oathed', 'not_available'],
|
||||||
|
|
||||||
Pages:
|
Pages:
|
||||||
in: page_dock
|
in: page_dock
|
||||||
|
|||||||
Reference in New Issue
Block a user