1
0
mirror of https://github.com/TheFunny/ArisuAutoSweeper synced 2026-07-02 10:04:51 +00:00

11 Commits

24 changed files with 63 additions and 44 deletions
+6 -1
View File
@@ -22,7 +22,12 @@ The script is still under active development. The following features have been i
Supported servers: Supported servers:
- [x] JP - [x] JP
- [x] OVERSEA - Global - [x] OVERSEA
Supported in-game languages:
- [x] Japanese
- [x] English
## Relative projects ## Relative projects
+8 -2
View File
@@ -22,12 +22,18 @@
目前支持的服务器: 目前支持的服务器:
- [x] 日服 - [x] 日服
- [x] 国际服 - 全球 - [x] 国际服
目前支持的游戏内语言:
- [x] 日语
- [x] 英语
## 已知问题 ## 已知问题
若愿意提供其他服务器支持,请开 PR 或 Issue。 若愿意提供其他语言或国服支持,请开 PR 或 Issue。
- **国际服登录的全屏通知**:未实现自动关闭,正在研究中
- **大小月卡**:未实现自动领取,~~因为没买过~~,可能不影响使用。愿意提供图片的请开 Issue - **大小月卡**:未实现自动领取,~~因为没买过~~,可能不影响使用。愿意提供图片的请开 Issue
- **月卡的额外悬赏券和学院交流券**:不太清楚月卡领取额外券的机制,~~因为没买过~~,可能影响相关任务使用券和体力的计算。愿意提供相关信息的请开 - **月卡的额外悬赏券和学院交流券**:不太清楚月卡领取额外券的机制,~~因为没买过~~,可能影响相关任务使用券和体力的计算。愿意提供相关信息的请开
Issue Issue
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1018 KiB

After

Width:  |  Height:  |  Size: 1016 KiB

+2 -2
View File
@@ -128,8 +128,8 @@ Deploy:
WebuiHost: 0.0.0.0 WebuiHost: 0.0.0.0
# --port. Port to listen # --port. Port to listen
# You will be able to access webui via `http://{host}:{port}` # You will be able to access webui via `http://{host}:{port}`
# [In most cases] Default to 22367 # [In most cases] Default to 23467
WebuiPort: 22367 WebuiPort: 23467
# Language to use on web ui # Language to use on web ui
# 'zh-CN' for Chinese simplified # 'zh-CN' for Chinese simplified
# 'en-US' for English # 'en-US' for English
+2 -2
View File
@@ -128,8 +128,8 @@ Deploy:
WebuiHost: 0.0.0.0 WebuiHost: 0.0.0.0
# --port. Port to listen # --port. Port to listen
# You will be able to access webui via `http://{host}:{port}` # You will be able to access webui via `http://{host}:{port}`
# [In most cases] Default to 22367 # [In most cases] Default to 23467
WebuiPort: 22367 WebuiPort: 23467
# Language to use on web ui # Language to use on web ui
# 'zh-CN' for Chinese simplified # 'zh-CN' for Chinese simplified
# 'en-US' for English # 'en-US' for English
+1 -1
View File
@@ -55,7 +55,7 @@ class ConfigModel:
# Webui # Webui
WebuiHost: str = "0.0.0.0" WebuiHost: str = "0.0.0.0"
WebuiPort: int = 22367 WebuiPort: int = 23467
Language: str = "en-US" Language: str = "en-US"
Theme: str = "default" Theme: str = "default"
DpiScaling: bool = True DpiScaling: bool = True
+2 -2
View File
@@ -128,8 +128,8 @@ Deploy:
WebuiHost: 0.0.0.0 WebuiHost: 0.0.0.0
# --port. Port to listen # --port. Port to listen
# You will be able to access webui via `http://{host}:{port}` # You will be able to access webui via `http://{host}:{port}`
# [In most cases] Default to 22367 # [In most cases] Default to 23467
WebuiPort: 22367 WebuiPort: 23467
# Language to use on web ui # Language to use on web ui
# 'zh-CN' for Chinese simplified # 'zh-CN' for Chinese simplified
# 'en-US' for English # 'en-US' for English
+1 -1
View File
@@ -49,7 +49,7 @@ def func(ev: threading.Event):
args, _ = parser.parse_known_args() args, _ = parser.parse_known_args()
host = args.host or State.deploy_config.WebuiHost or "0.0.0.0" host = args.host or State.deploy_config.WebuiHost or "0.0.0.0"
port = args.port or int(State.deploy_config.WebuiPort) or 22367 port = args.port or int(State.deploy_config.WebuiPort) or 23467
State.electron = args.electron State.electron = args.electron
logger.hr("Launcher config") logger.hr("Launcher config")
+4
View File
@@ -12,6 +12,10 @@
"option": [ "option": [
"auto", "auto",
"JP-Official", "JP-Official",
"OVERSEA-TWHKMO",
"OVERSEA-Korea",
"OVERSEA-Asia",
"OVERSEA-America",
"OVERSEA-Global" "OVERSEA-Global"
] ]
}, },
+1 -1
View File
@@ -17,7 +17,7 @@ class GeneratedConfig:
# Group `Emulator` # Group `Emulator`
Emulator_Serial = 'auto' Emulator_Serial = 'auto'
Emulator_PackageName = 'auto' # auto, JP-Official, OVERSEA-Global Emulator_PackageName = 'auto' # auto, JP-Official, OVERSEA-TWHKMO, OVERSEA-Korea, OVERSEA-Asia, OVERSEA-America, OVERSEA-Global
Emulator_GameLanguage = 'auto' # auto, jp, en Emulator_GameLanguage = 'auto' # auto, jp, en
Emulator_ScreenshotMethod = 'auto' # auto, ADB, ADB_nc, uiautomator2, aScreenCap, aScreenCap_nc, DroidCast, DroidCast_raw, scrcpy Emulator_ScreenshotMethod = 'auto' # auto, ADB, ADB_nc, uiautomator2, aScreenCap, aScreenCap_nc, DroidCast, DroidCast_raw, scrcpy
Emulator_ControlMethod = 'MaaTouch' # minitouch, MaaTouch Emulator_ControlMethod = 'MaaTouch' # minitouch, MaaTouch
+5 -1
View File
@@ -85,11 +85,15 @@
"help": "Can't distinguish different regions of oversea servers, please select the server manually.", "help": "Can't distinguish different regions of oversea servers, please select the server manually.",
"auto": "Auto-detect", "auto": "Auto-detect",
"JP-Official": "[JP]-Official", "JP-Official": "[JP]-Official",
"OVERSEA-TWHKMO": "[OVERSEA]-TW/HK/MO",
"OVERSEA-Korea": "[OVERSEA]-Korea",
"OVERSEA-Asia": "[OVERSEA]-Asia",
"OVERSEA-America": "[OVERSEA]-North America",
"OVERSEA-Global": "[OVERSEA]-Global" "OVERSEA-Global": "[OVERSEA]-Global"
}, },
"GameLanguage": { "GameLanguage": {
"name": "In-game Text Language", "name": "In-game Text Language",
"help": "", "help": "Can't detect language automatically, please select the language manually.",
"auto": "Auto-detect", "auto": "Auto-detect",
"jp": "Japanese", "jp": "Japanese",
"en": "English" "en": "English"
+5 -1
View File
@@ -85,11 +85,15 @@
"help": "无法区分国际服的不同地区,请手动选择服务器", "help": "无法区分国际服的不同地区,请手动选择服务器",
"auto": "自动检测", "auto": "自动检测",
"JP-Official": "[日服]-官服", "JP-Official": "[日服]-官服",
"OVERSEA-TWHKMO": "[国际服]-港澳台",
"OVERSEA-Korea": "[国际服]-韩国",
"OVERSEA-Asia": "[国际服]-亚洲",
"OVERSEA-America": "[国际服]-北美",
"OVERSEA-Global": "[国际服]-全球" "OVERSEA-Global": "[国际服]-全球"
}, },
"GameLanguage": { "GameLanguage": {
"name": "游戏内文本语言", "name": "游戏内文本语言",
"help": "", "help": "无法自动检测语言,请手动选择语言",
"auto": "自动检测", "auto": "自动检测",
"jp": "日语", "jp": "日语",
"en": "英语" "en": "英语"
+4
View File
@@ -8,6 +8,10 @@ server = 'JP-Official'
VALID_LANG = ['jp', 'en'] VALID_LANG = ['jp', 'en']
VALID_SERVER = { VALID_SERVER = {
'JP-Official': 'com.YostarJP.BlueArchive', 'JP-Official': 'com.YostarJP.BlueArchive',
'OVERSEA-TWHKMO': 'com.nexon.bluearchive',
'OVERSEA-Korea': 'com.nexon.bluearchive',
'OVERSEA-Asia': 'com.nexon.bluearchive',
'OVERSEA-America': 'com.nexon.bluearchive',
'OVERSEA-Global': 'com.nexon.bluearchive', 'OVERSEA-Global': 'com.nexon.bluearchive',
} }
VALID_PACKAGE = set(list(VALID_SERVER.values())) VALID_PACKAGE = set(list(VALID_SERVER.values()))
+5 -1
View File
@@ -13,7 +13,11 @@ from module.config.atomicwrites import atomic_write
LANGUAGES = ['zh-CN', 'en-US'] LANGUAGES = ['zh-CN', 'en-US']
SERVER_TO_TIMEZONE = { SERVER_TO_TIMEZONE = {
'JP-Official': timedelta(hours=9), 'JP-Official': timedelta(hours=9),
'OVERSEA-Global': timedelta(hours=0), 'OVERSEA-TWHKMO': timedelta(hours=9),
'OVERSEA-Korea': timedelta(hours=9),
'OVERSEA-Asia': timedelta(hours=9),
'OVERSEA-America': timedelta(hours=9),
'OVERSEA-Global': timedelta(hours=9),
} }
DEFAULT_TIME = datetime(2020, 1, 1, 0, 0) DEFAULT_TIME = datetime(2020, 1, 1, 0, 0)
+2 -2
View File
@@ -16,8 +16,8 @@ import time
from subprocess import PIPE, Popen from subprocess import PIPE, Popen
from typing import TYPE_CHECKING from typing import TYPE_CHECKING
from module.logger import logger
from module.config.utils import random_id from module.config.utils import random_id
from module.logger import logger
from module.webui.setting import State from module.webui.setting import State
if TYPE_CHECKING: if TYPE_CHECKING:
@@ -41,7 +41,7 @@ def am_i_the_only_thread() -> bool:
def remote_access_service( def remote_access_service(
local_host="127.0.0.1", local_host="127.0.0.1",
local_port=22367, local_port=23467,
server="app.pywebio.online", server="app.pywebio.online",
server_port=1022, server_port=1022,
remote_port="/", remote_port="/",
+1
View File
@@ -196,6 +196,7 @@ class Updater(DeployConfig, GitManager, PipManager):
def update(self): def update(self):
logger.hr("Run update") logger.hr("Run update")
self.set_repo()
try: try:
self.git_install() self.git_install()
self.pip_install() self.pip_install()
+4 -4
View File
@@ -17,10 +17,10 @@ BOX_SEARCH = ButtonWrapper(
name='BOX_SEARCH', name='BOX_SEARCH',
share=Button( share=Button(
file='./assets/share/cafe/BOX_SEARCH.png', file='./assets/share/cafe/BOX_SEARCH.png',
area=(61, 72, 1176, 653), area=(12, 71, 1176, 654),
search=(41, 52, 1196, 673), search=(0, 51, 1196, 674),
color=(172, 180, 188), color=(175, 183, 190),
button=(61, 72, 1176, 653), button=(12, 71, 1176, 654),
), ),
) )
CAFE_FIRST = ButtonWrapper( CAFE_FIRST = ButtonWrapper(
+1 -3
View File
@@ -36,9 +36,7 @@ class Cafe(CafeUI):
def _is_second_cafe_on(self): def _is_second_cafe_on(self):
return False return False
@property is_second_cafe_on = property(_is_second_cafe_on)
def is_second_cafe_on(self):
return self._is_second_cafe_on
def _handle_cafe(self, status): def _handle_cafe(self, status):
match status: match status:
+1 -1
View File
@@ -67,7 +67,7 @@ class Scrimmage(ScrimmageUI):
@property @property
def current_task_ap(self): def current_task_ap(self):
return self.task[0][4] return self.task[0][4] * self.current_count
@property @property
def current_ticket(self): def current_ticket(self):
+1 -12
View File
@@ -119,18 +119,7 @@ class StageSweep:
return main.appear(self.skip_skip) or main.appear(self.skip_ok_upper) or main.appear(self.skip_ok_lower) return main.appear(self.skip_skip) or main.appear(self.skip_ok_upper) or main.appear(self.skip_ok_lower)
def load_sweep_num(self, main: ModuleBase): def load_sweep_num(self, main: ModuleBase):
timer = Timer(0.5, 2).start() self.current_sweep = self.num.ocr_single_line(main.device.image)
while 1:
main.device.screenshot()
if not timer.reached_and_reset():
continue
ocr_result = list(filter(lambda x: x.ocr_text.isdigit(), self.num.detect_and_ocr(main.device.image)))
if not ocr_result:
logger.warning(f'No valid num in {self.num.name}')
continue
if len(ocr_result) == 1:
self.current_sweep = int(ocr_result[0].ocr_text)
return
def set_sweep_num(self, main: ModuleBase, skip_first_screenshot=True) -> bool: def set_sweep_num(self, main: ModuleBase, skip_first_screenshot=True) -> bool:
num = self.sweep_num num = self.sweep_num
@@ -54,7 +54,7 @@ class TacticalChallenge(TacticalChallengeUI):
return TCStatus.PREPARE return TCStatus.PREPARE
case TCStatus.PREPARE: case TCStatus.PREPARE:
self.appear_then_click(PREPARE_CHALLENGE) self.appear_then_click(PREPARE_CHALLENGE)
if not self.appear(PREPARE_CHALLENGE): if self.appear(START_CHALLENGE):
return TCStatus.SKIP return TCStatus.SKIP
case TCStatus.SKIP: case TCStatus.SKIP:
if not self.set_skip(): if not self.set_skip():
@@ -62,7 +62,7 @@ class TacticalChallenge(TacticalChallengeUI):
return TCStatus.START return TCStatus.START
case TCStatus.START: case TCStatus.START:
self.appear_then_click(START_CHALLENGE) self.appear_then_click(START_CHALLENGE)
if not self.appear(START_CHALLENGE): if self.appear(CHALLENGE_WIN) or self.appear(CHALLENGE_LOSE):
return TCStatus.RESULT return TCStatus.RESULT
case TCStatus.RESULT: case TCStatus.RESULT:
if self.appear_then_click(CHALLENGE_WIN): if self.appear_then_click(CHALLENGE_WIN):
+2 -2
View File
@@ -32,10 +32,10 @@ class TacticalChallengeUI(UI):
if self.match_color(GOT_REWARD_DAILY) and self.match_color(GOT_REWARD_CREDIT): if self.match_color(GOT_REWARD_DAILY) and self.match_color(GOT_REWARD_CREDIT):
return True return True
if self.match_color(GET_REWARD_DAILY): if self.match_color(GET_REWARD_DAILY):
self.device.click(GET_REWARD_DAILY) self.click_with_interval(GET_REWARD_DAILY, 0.3)
logger.info('Get daily reward') logger.info('Get daily reward')
if self.match_color(GET_REWARD_CREDIT): if self.match_color(GET_REWARD_CREDIT):
self.device.click(GET_REWARD_CREDIT) self.click_with_interval(GET_REWARD_CREDIT, 0.3)
logger.info('Get credit reward') logger.info('Get credit reward')
if timer.reached(): if timer.reached():
return False return False
+2 -2
View File
@@ -128,8 +128,8 @@ Deploy:
WebuiHost: 0.0.0.0 WebuiHost: 0.0.0.0
# --port. Port to listen # --port. Port to listen
# You will be able to access webui via `http://{host}:{port}` # You will be able to access webui via `http://{host}:{port}`
# [In most cases] Default to 22367 # [In most cases] Default to 23467
WebuiPort: 22367 WebuiPort: 23467
# Language to use on web ui # Language to use on web ui
# 'zh-CN' for Chinese simplified # 'zh-CN' for Chinese simplified
# 'en-US' for English # 'en-US' for English
@@ -9,6 +9,6 @@ export async function initAppConfigStore() {
appStore.setRepository( appStore.setRepository(
(repositoryValueMap[config?.repository] as 'global' | 'china') ?? 'global', (repositoryValueMap[config?.repository] as 'global' | 'china') ?? 'global',
); );
appStore.setWebuiUrl(config?.webuiUrl ?? '127.0.0.1:22367'); appStore.setWebuiUrl(config?.webuiUrl ?? '127.0.0.1:23467');
appStore.setAlasPath(config?.alasPath ?? ''); appStore.setAlasPath(config?.alasPath ?? '');
} }