1
0
mirror of https://github.com/TheFunny/ArisuAutoSweeper synced 2026-02-06 17:35:12 +00:00

Compare commits

..

No commits in common. "4ce807309654bd6274a0bb57d1e31a39ce36a9fc" and "4582406ef206c479f9fadc1b9633b5747e246996" have entirely different histories.

10 changed files with 22 additions and 40 deletions

View File

@ -22,12 +22,7 @@ The script is still under active development. The following features have been i
Supported servers: Supported servers:
- [x] JP - [x] JP
- [x] OVERSEA - [x] OVERSEA - Global
Supported in-game languages:
- [x] Japanese
- [x] English
## Relative projects ## Relative projects

View File

@ -22,18 +22,12 @@
目前支持的服务器: 目前支持的服务器:
- [x] 日服 - [x] 日服
- [x] 国际服 - [x] 国际服 - 全球
目前支持的游戏内语言:
- [x] 日语
- [x] 英语
## 已知问题 ## 已知问题
若愿意提供其他语言或国服支持,请开 PR 或 Issue。 若愿意提供其他服务器支持,请开 PR 或 Issue。
- **国际服登录的全屏通知**:未实现自动关闭,正在研究中
- **大小月卡**:未实现自动领取,~~因为没买过~~,可能不影响使用。愿意提供图片的请开 Issue - **大小月卡**:未实现自动领取,~~因为没买过~~,可能不影响使用。愿意提供图片的请开 Issue
- **月卡的额外悬赏券和学院交流券**:不太清楚月卡领取额外券的机制,~~因为没买过~~,可能影响相关任务使用券和体力的计算。愿意提供相关信息的请开 - **月卡的额外悬赏券和学院交流券**:不太清楚月卡领取额外券的机制,~~因为没买过~~,可能影响相关任务使用券和体力的计算。愿意提供相关信息的请开
Issue Issue

View File

@ -12,10 +12,6 @@
"option": [ "option": [
"auto", "auto",
"JP-Official", "JP-Official",
"OVERSEA-TWHKMO",
"OVERSEA-Korea",
"OVERSEA-Asia",
"OVERSEA-America",
"OVERSEA-Global" "OVERSEA-Global"
] ]
}, },

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-TWHKMO, OVERSEA-Korea, OVERSEA-Asia, OVERSEA-America, OVERSEA-Global Emulator_PackageName = 'auto' # auto, JP-Official, 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

View File

@ -85,15 +85,11 @@
"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": "Can't detect language automatically, please select the language manually.", "help": "",
"auto": "Auto-detect", "auto": "Auto-detect",
"jp": "Japanese", "jp": "Japanese",
"en": "English" "en": "English"

View File

@ -85,15 +85,11 @@
"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": "英语"

View File

@ -8,10 +8,6 @@ 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()))

View File

@ -13,11 +13,7 @@ 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-TWHKMO': timedelta(hours=9), 'OVERSEA-Global': timedelta(hours=0),
'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)

View File

@ -36,7 +36,9 @@ class Cafe(CafeUI):
def _is_second_cafe_on(self): def _is_second_cafe_on(self):
return False return False
is_second_cafe_on = property(_is_second_cafe_on) @property
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:

View File

@ -119,7 +119,18 @@ 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):
self.current_sweep = self.num.ocr_single_line(main.device.image) timer = Timer(0.5, 2).start()
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