mirror of
https://github.com/TheFunny/ArisuAutoSweeper
synced 2025-12-16 19:55:12 +00:00
Compare commits
5 Commits
4582406ef2
...
4ce8073096
| Author | SHA1 | Date | |
|---|---|---|---|
| 4ce8073096 | |||
| aa872c890d | |||
| 25e0559171 | |||
| df6da1f77a | |||
| fc49adc859 |
@ -22,7 +22,12 @@ The script is still under active development. The following features have been i
|
||||
Supported servers:
|
||||
|
||||
- [x] JP
|
||||
- [x] OVERSEA - Global
|
||||
- [x] OVERSEA
|
||||
|
||||
Supported in-game languages:
|
||||
|
||||
- [x] Japanese
|
||||
- [x] English
|
||||
|
||||
## Relative projects
|
||||
|
||||
|
||||
10
README.md
10
README.md
@ -22,12 +22,18 @@
|
||||
目前支持的服务器:
|
||||
|
||||
- [x] 日服
|
||||
- [x] 国际服 - 全球
|
||||
- [x] 国际服
|
||||
|
||||
目前支持的游戏内语言:
|
||||
|
||||
- [x] 日语
|
||||
- [x] 英语
|
||||
|
||||
## 已知问题
|
||||
|
||||
若愿意提供其他服务器支持,请开 PR 或 Issue。
|
||||
若愿意提供其他语言或国服支持,请开 PR 或 Issue。
|
||||
|
||||
- **国际服登录的全屏通知**:未实现自动关闭,正在研究中
|
||||
- **大小月卡**:未实现自动领取,~~因为没买过~~,可能不影响使用。愿意提供图片的请开 Issue
|
||||
- **月卡的额外悬赏券和学院交流券**:不太清楚月卡领取额外券的机制,~~因为没买过~~,可能影响相关任务使用券和体力的计算。愿意提供相关信息的请开
|
||||
Issue
|
||||
|
||||
@ -12,6 +12,10 @@
|
||||
"option": [
|
||||
"auto",
|
||||
"JP-Official",
|
||||
"OVERSEA-TWHKMO",
|
||||
"OVERSEA-Korea",
|
||||
"OVERSEA-Asia",
|
||||
"OVERSEA-America",
|
||||
"OVERSEA-Global"
|
||||
]
|
||||
},
|
||||
|
||||
@ -17,7 +17,7 @@ class GeneratedConfig:
|
||||
|
||||
# Group `Emulator`
|
||||
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_ScreenshotMethod = 'auto' # auto, ADB, ADB_nc, uiautomator2, aScreenCap, aScreenCap_nc, DroidCast, DroidCast_raw, scrcpy
|
||||
Emulator_ControlMethod = 'MaaTouch' # minitouch, MaaTouch
|
||||
|
||||
@ -85,11 +85,15 @@
|
||||
"help": "Can't distinguish different regions of oversea servers, please select the server manually.",
|
||||
"auto": "Auto-detect",
|
||||
"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"
|
||||
},
|
||||
"GameLanguage": {
|
||||
"name": "In-game Text Language",
|
||||
"help": "",
|
||||
"help": "Can't detect language automatically, please select the language manually.",
|
||||
"auto": "Auto-detect",
|
||||
"jp": "Japanese",
|
||||
"en": "English"
|
||||
|
||||
@ -85,11 +85,15 @@
|
||||
"help": "无法区分国际服的不同地区,请手动选择服务器",
|
||||
"auto": "自动检测",
|
||||
"JP-Official": "[日服]-官服",
|
||||
"OVERSEA-TWHKMO": "[国际服]-港澳台",
|
||||
"OVERSEA-Korea": "[国际服]-韩国",
|
||||
"OVERSEA-Asia": "[国际服]-亚洲",
|
||||
"OVERSEA-America": "[国际服]-北美",
|
||||
"OVERSEA-Global": "[国际服]-全球"
|
||||
},
|
||||
"GameLanguage": {
|
||||
"name": "游戏内文本语言",
|
||||
"help": "",
|
||||
"help": "无法自动检测语言,请手动选择语言",
|
||||
"auto": "自动检测",
|
||||
"jp": "日语",
|
||||
"en": "英语"
|
||||
|
||||
@ -8,6 +8,10 @@ server = 'JP-Official'
|
||||
VALID_LANG = ['jp', 'en']
|
||||
VALID_SERVER = {
|
||||
'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',
|
||||
}
|
||||
VALID_PACKAGE = set(list(VALID_SERVER.values()))
|
||||
|
||||
@ -13,7 +13,11 @@ from module.config.atomicwrites import atomic_write
|
||||
LANGUAGES = ['zh-CN', 'en-US']
|
||||
SERVER_TO_TIMEZONE = {
|
||||
'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)
|
||||
|
||||
|
||||
@ -36,9 +36,7 @@ class Cafe(CafeUI):
|
||||
def _is_second_cafe_on(self):
|
||||
return False
|
||||
|
||||
@property
|
||||
def is_second_cafe_on(self):
|
||||
return self._is_second_cafe_on
|
||||
is_second_cafe_on = property(_is_second_cafe_on)
|
||||
|
||||
def _handle_cafe(self, status):
|
||||
match status:
|
||||
|
||||
@ -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)
|
||||
|
||||
def load_sweep_num(self, main: ModuleBase):
|
||||
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
|
||||
self.current_sweep = self.num.ocr_single_line(main.device.image)
|
||||
|
||||
def set_sweep_num(self, main: ModuleBase, skip_first_screenshot=True) -> bool:
|
||||
num = self.sweep_num
|
||||
|
||||
Loading…
Reference in New Issue
Block a user