1
0
mirror of https://github.com/TheFunny/ArisuAutoSweeper synced 2026-06-23 20:34:51 +00:00

18 Commits

Author SHA1 Message Date
YoursFunny 15bf77da3d fix(cafe): expand search box 2023-11-23 16:21:58 +08:00
YoursFunny 4ce8073096 perf(sweep): simplify sweep num ocr 2023-11-23 16:08:51 +08:00
YoursFunny aa872c890d doc: update readme 2023-11-23 14:45:31 +08:00
YoursFunny 25e0559171 feat: add oversea servers 2023-11-23 14:23:52 +08:00
YoursFunny df6da1f77a fix(cafe): adjust property of second cafe setting 2023-11-23 14:06:38 +08:00
YoursFunny fc49adc859 doc: update readme 2023-11-22 22:23:09 +08:00
YoursFunny 4582406ef2 perf(tc): improve status check stability 2023-11-22 22:04:50 +08:00
YoursFunny 256dc96598 fix(tc): restrict count frequency of claim reward 2023-11-22 22:01:07 +08:00
YoursFunny 04744d6f8c fix(scrimmage): add missing multiply of ap count 2023-11-22 22:01:06 +08:00
YoursFunny 8fe578615d fix: change webui port 2023-11-22 21:02:00 +08:00
YoursFunny 5e9615542c fix: set repo when update 2023-11-22 20:47:18 +08:00
YoursFunny 36c5f60eb3 fix(cafe): adjust property of second cafe setting 2023-11-22 19:05:36 +08:00
YoursFunny 91650cc584 feat: add en assets for bounty scrimmage and sweep 2023-11-22 19:04:50 +08:00
YoursFunny 67881568dd perf(button): combine shared assets 2023-11-22 13:13:39 +08:00
YoursFunny f8404edd9e fix: set repo of build-in update 2023-11-21 23:15:06 +08:00
YoursFunny ff3ec041d2 refactor(cafe): separate ui operation and simplify template extraction 2023-11-21 22:18:28 +08:00
YoursFunny 99074a1575 feat(cafe): add template search area 2023-11-21 21:31:01 +08:00
YoursFunny 7862fa6cb8 fix(scrimmage): fix typo 2023-11-21 20:56:39 +08:00
105 changed files with 448 additions and 378 deletions
+6 -1
View File
@@ -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
+8 -2
View File
@@ -22,12 +22,18 @@
目前支持的服务器:
- [x] 日服
- [x] 国际服 - 全球
- [x] 国际服
目前支持的游戏内语言:
- [x] 日语
- [x] 英语
## 已知问题
若愿意提供其他服务器支持,请开 PR 或 Issue。
若愿意提供其他语言或国服支持,请开 PR 或 Issue。
- **国际服登录的全屏通知**:未实现自动关闭,正在研究中
- **大小月卡**:未实现自动领取,~~因为没买过~~,可能不影响使用。愿意提供图片的请开 Issue
- **月卡的额外悬赏券和学院交流券**:不太清楚月卡领取额外券的机制,~~因为没买过~~,可能影响相关任务使用券和体力的计算。愿意提供相关信息的请开
Issue
Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 905 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

Before

Width:  |  Height:  |  Size: 7.8 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

Before

Width:  |  Height:  |  Size: 905 KiB

After

Width:  |  Height:  |  Size: 905 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1016 KiB

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

+2 -2
View File
@@ -128,8 +128,8 @@ Deploy:
WebuiHost: 0.0.0.0
# --port. Port to listen
# You will be able to access webui via `http://{host}:{port}`
# [In most cases] Default to 22367
WebuiPort: 22367
# [In most cases] Default to 23467
WebuiPort: 23467
# Language to use on web ui
# 'zh-CN' for Chinese simplified
# 'en-US' for English
+2 -2
View File
@@ -128,8 +128,8 @@ Deploy:
WebuiHost: 0.0.0.0
# --port. Port to listen
# You will be able to access webui via `http://{host}:{port}`
# [In most cases] Default to 22367
WebuiPort: 22367
# [In most cases] Default to 23467
WebuiPort: 23467
# Language to use on web ui
# 'zh-CN' for Chinese simplified
# 'en-US' for English
+7 -4
View File
@@ -55,7 +55,7 @@ class ConfigModel:
# Webui
WebuiHost: str = "0.0.0.0"
WebuiPort: int = 22367
WebuiPort: int = 23467
Language: str = "en-US"
Theme: str = "default"
DpiScaling: bool = True
@@ -77,6 +77,12 @@ class DeployConfig(ConfigModel):
self.config_template = {}
self.read()
self.set_repo()
self.write()
self.show_config()
def set_repo(self):
# Bypass webui.config.DeployConfig.__setattr__()
# Don't write these into deploy.yaml
if self.Repository == 'cn':
@@ -84,9 +90,6 @@ class DeployConfig(ConfigModel):
if self.Repository == 'global':
super().__setattr__('Repository', 'https://github.com/TheFunny/ArisuAutoSweeper')
self.write()
self.show_config()
def show_config(self):
logger.hr("Show deploy config", 1)
for k, v in self.config.items():
+2 -2
View File
@@ -128,8 +128,8 @@ Deploy:
WebuiHost: 0.0.0.0
# --port. Port to listen
# You will be able to access webui via `http://{host}:{port}`
# [In most cases] Default to 22367
WebuiPort: 22367
# [In most cases] Default to 23467
WebuiPort: 23467
# Language to use on web ui
# 'zh-CN' for Chinese simplified
# 'en-US' for English
+1 -1
View File
@@ -49,7 +49,7 @@ def func(ev: threading.Event):
args, _ = parser.parse_known_args()
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
logger.hr("Launcher config")
+4
View File
@@ -12,6 +12,10 @@
"option": [
"auto",
"JP-Official",
"OVERSEA-TWHKMO",
"OVERSEA-Korea",
"OVERSEA-Asia",
"OVERSEA-America",
"OVERSEA-Global"
]
},
+1 -1
View File
@@ -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
+5 -1
View File
@@ -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"
+5 -1
View File
@@ -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": "英语"
+4
View File
@@ -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()))
+5 -1
View File
@@ -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)
+2 -2
View File
@@ -16,8 +16,8 @@ import time
from subprocess import PIPE, Popen
from typing import TYPE_CHECKING
from module.logger import logger
from module.config.utils import random_id
from module.logger import logger
from module.webui.setting import State
if TYPE_CHECKING:
@@ -41,7 +41,7 @@ def am_i_the_only_thread() -> bool:
def remote_access_service(
local_host="127.0.0.1",
local_port=22367,
local_port=23467,
server="app.pywebio.online",
server_port=1022,
remote_port="/",
+3
View File
@@ -5,6 +5,7 @@ import time
from typing import Generator, List, Tuple
import requests
from deploy.Windows.config import ExecutionError
from deploy.Windows.git import GitManager
from deploy.Windows.pip import PipManager
@@ -20,6 +21,7 @@ from module.webui.utils import TaskHandler, get_next_time
class Updater(DeployConfig, GitManager, PipManager):
def __init__(self, file=DEPLOY_CONFIG):
super().__init__(file=file)
self.set_repo()
self.state = 0
self.event: threading.Event = None
@@ -194,6 +196,7 @@ class Updater(DeployConfig, GitManager, PipManager):
def update(self):
logger.hr("Run update")
self.set_repo()
try:
self.git_install()
self.pip_install()
+30 -135
View File
@@ -22,15 +22,8 @@ ACCOUNT_INFO_CHECK = ButtonWrapper(
)
BACK = ButtonWrapper(
name='BACK',
jp=Button(
file='./assets/jp/base/page/BACK.png',
area=(34, 19, 81, 56),
search=(14, 0, 101, 76),
color=(93, 118, 164),
button=(34, 19, 81, 56),
),
en=Button(
file='./assets/en/base/page/BACK.png',
share=Button(
file='./assets/share/base/page/BACK.png',
area=(34, 19, 81, 56),
search=(14, 0, 101, 76),
color=(93, 118, 164),
@@ -141,15 +134,8 @@ GACHA_CHECK = ButtonWrapper(
)
HOME = ButtonWrapper(
name='HOME',
jp=Button(
file='./assets/jp/base/page/HOME.png',
area=(1218, 8, 1253, 41),
search=(1198, 0, 1273, 61),
color=(168, 182, 205),
button=(1218, 8, 1253, 41),
),
en=Button(
file='./assets/en/base/page/HOME.png',
share=Button(
file='./assets/share/base/page/HOME.png',
area=(1218, 8, 1253, 41),
search=(1198, 0, 1273, 61),
color=(168, 182, 205),
@@ -158,15 +144,8 @@ HOME = ButtonWrapper(
)
LOADING_CHECK = ButtonWrapper(
name='LOADING_CHECK',
jp=Button(
file='./assets/jp/base/page/LOADING_CHECK.png',
area=(1084, 659, 1120, 674),
search=(1064, 639, 1140, 694),
color=(173, 196, 219),
button=(1084, 659, 1120, 674),
),
en=Button(
file='./assets/en/base/page/LOADING_CHECK.png',
share=Button(
file='./assets/share/base/page/LOADING_CHECK.png',
area=(1084, 659, 1120, 674),
search=(1064, 639, 1140, 694),
color=(173, 196, 219),
@@ -192,15 +171,8 @@ MAIL_CHECK = ButtonWrapper(
)
MAIN_GO_TO_CAFE = ButtonWrapper(
name='MAIN_GO_TO_CAFE',
jp=Button(
file='./assets/jp/base/page/MAIN_GO_TO_CAFE.png',
area=(81, 638, 102, 668),
search=(61, 618, 122, 688),
color=(156, 209, 233),
button=(81, 638, 102, 668),
),
en=Button(
file='./assets/en/base/page/MAIN_GO_TO_CAFE.png',
share=Button(
file='./assets/share/base/page/MAIN_GO_TO_CAFE.png',
area=(81, 638, 102, 668),
search=(61, 618, 122, 688),
color=(156, 209, 233),
@@ -209,15 +181,8 @@ MAIN_GO_TO_CAFE = ButtonWrapper(
)
MAIN_GO_TO_CIRCLE = ButtonWrapper(
name='MAIN_GO_TO_CIRCLE',
jp=Button(
file='./assets/jp/base/page/MAIN_GO_TO_CIRCLE.png',
area=(540, 631, 583, 660),
search=(520, 611, 603, 680),
color=(131, 204, 234),
button=(540, 631, 583, 660),
),
en=Button(
file='./assets/en/base/page/MAIN_GO_TO_CIRCLE.png',
share=Button(
file='./assets/share/base/page/MAIN_GO_TO_CIRCLE.png',
area=(540, 631, 583, 660),
search=(520, 611, 603, 680),
color=(131, 204, 234),
@@ -226,15 +191,8 @@ MAIN_GO_TO_CIRCLE = ButtonWrapper(
)
MAIN_GO_TO_CRAFTING = ButtonWrapper(
name='MAIN_GO_TO_CRAFTING',
jp=Button(
file='./assets/jp/base/page/MAIN_GO_TO_CRAFTING.png',
area=(665, 622, 693, 664),
search=(645, 602, 713, 684),
color=(192, 229, 241),
button=(665, 622, 693, 664),
),
en=Button(
file='./assets/en/base/page/MAIN_GO_TO_CRAFTING.png',
share=Button(
file='./assets/share/base/page/MAIN_GO_TO_CRAFTING.png',
area=(665, 622, 693, 664),
search=(645, 602, 713, 684),
color=(192, 229, 241),
@@ -243,15 +201,8 @@ MAIN_GO_TO_CRAFTING = ButtonWrapper(
)
MAIN_GO_TO_GACHA = ButtonWrapper(
name='MAIN_GO_TO_GACHA',
jp=Button(
file='./assets/jp/base/page/MAIN_GO_TO_GACHA.png',
area=(900, 623, 924, 670),
search=(880, 603, 944, 690),
color=(157, 219, 241),
button=(900, 623, 924, 670),
),
en=Button(
file='./assets/en/base/page/MAIN_GO_TO_GACHA.png',
share=Button(
file='./assets/share/base/page/MAIN_GO_TO_GACHA.png',
area=(900, 623, 924, 670),
search=(880, 603, 944, 690),
color=(157, 219, 241),
@@ -260,15 +211,8 @@ MAIN_GO_TO_GACHA = ButtonWrapper(
)
MAIN_GO_TO_MAIL = ButtonWrapper(
name='MAIN_GO_TO_MAIL',
jp=Button(
file='./assets/jp/base/page/MAIN_GO_TO_MAIL.png',
area=(1130, 29, 1156, 49),
search=(1110, 9, 1176, 69),
color=(94, 121, 166),
button=(1130, 29, 1156, 49),
),
en=Button(
file='./assets/en/base/page/MAIN_GO_TO_MAIL.png',
share=Button(
file='./assets/share/base/page/MAIN_GO_TO_MAIL.png',
area=(1130, 29, 1156, 49),
search=(1110, 9, 1176, 69),
color=(94, 121, 166),
@@ -277,15 +221,8 @@ MAIN_GO_TO_MAIL = ButtonWrapper(
)
MAIN_GO_TO_MOMOTALK = ButtonWrapper(
name='MAIN_GO_TO_MOMOTALK',
jp=Button(
file='./assets/jp/base/page/MAIN_GO_TO_MOMOTALK.png',
area=(154, 134, 177, 158),
search=(134, 114, 197, 178),
color=(255, 219, 227),
button=(154, 134, 177, 158),
),
en=Button(
file='./assets/en/base/page/MAIN_GO_TO_MOMOTALK.png',
share=Button(
file='./assets/share/base/page/MAIN_GO_TO_MOMOTALK.png',
area=(154, 134, 177, 158),
search=(134, 114, 197, 178),
color=(255, 219, 227),
@@ -294,15 +231,8 @@ MAIN_GO_TO_MOMOTALK = ButtonWrapper(
)
MAIN_GO_TO_PURCHASE = ButtonWrapper(
name='MAIN_GO_TO_PURCHASE',
jp=Button(
file='./assets/jp/base/page/MAIN_GO_TO_PURCHASE.png',
area=(148, 204, 183, 253),
search=(128, 184, 203, 273),
color=(172, 214, 239),
button=(148, 204, 183, 253),
),
en=Button(
file='./assets/en/base/page/MAIN_GO_TO_PURCHASE.png',
share=Button(
file='./assets/share/base/page/MAIN_GO_TO_PURCHASE.png',
area=(148, 204, 183, 253),
search=(128, 184, 203, 273),
color=(172, 214, 239),
@@ -311,15 +241,8 @@ MAIN_GO_TO_PURCHASE = ButtonWrapper(
)
MAIN_GO_TO_SCHEDULE = ButtonWrapper(
name='MAIN_GO_TO_SCHEDULE',
jp=Button(
file='./assets/jp/base/page/MAIN_GO_TO_SCHEDULE.png',
area=(194, 638, 216, 672),
search=(174, 618, 236, 692),
color=(149, 194, 222),
button=(194, 638, 216, 672),
),
en=Button(
file='./assets/en/base/page/MAIN_GO_TO_SCHEDULE.png',
share=Button(
file='./assets/share/base/page/MAIN_GO_TO_SCHEDULE.png',
area=(194, 638, 216, 672),
search=(174, 618, 236, 692),
color=(149, 194, 222),
@@ -328,15 +251,8 @@ MAIN_GO_TO_SCHEDULE = ButtonWrapper(
)
MAIN_GO_TO_SHOP = ButtonWrapper(
name='MAIN_GO_TO_SHOP',
jp=Button(
file='./assets/jp/base/page/MAIN_GO_TO_SHOP.png',
area=(773, 630, 816, 667),
search=(753, 610, 836, 687),
color=(146, 208, 235),
button=(773, 630, 816, 667),
),
en=Button(
file='./assets/en/base/page/MAIN_GO_TO_SHOP.png',
share=Button(
file='./assets/share/base/page/MAIN_GO_TO_SHOP.png',
area=(773, 630, 816, 667),
search=(753, 610, 836, 687),
color=(146, 208, 235),
@@ -345,15 +261,8 @@ MAIN_GO_TO_SHOP = ButtonWrapper(
)
MAIN_GO_TO_TASK = ButtonWrapper(
name='MAIN_GO_TO_TASK',
jp=Button(
file='./assets/jp/base/page/MAIN_GO_TO_TASK.png',
area=(52, 220, 78, 248),
search=(32, 200, 98, 268),
color=(226, 207, 203),
button=(52, 220, 78, 248),
),
en=Button(
file='./assets/en/base/page/MAIN_GO_TO_TASK.png',
share=Button(
file='./assets/share/base/page/MAIN_GO_TO_TASK.png',
area=(52, 220, 78, 248),
search=(32, 200, 98, 268),
color=(226, 207, 203),
@@ -396,15 +305,8 @@ MISSION_CHECK = ButtonWrapper(
)
MOMOTALK_CHECK = ButtonWrapper(
name='MOMOTALK_CHECK',
jp=Button(
file='./assets/jp/base/page/MOMOTALK_CHECK.png',
area=(144, 107, 169, 130),
search=(124, 87, 189, 150),
color=(253, 211, 219),
button=(144, 107, 169, 130),
),
en=Button(
file='./assets/en/base/page/MOMOTALK_CHECK.png',
share=Button(
file='./assets/share/base/page/MOMOTALK_CHECK.png',
area=(144, 107, 169, 130),
search=(124, 87, 189, 150),
color=(253, 211, 219),
@@ -413,15 +315,8 @@ MOMOTALK_CHECK = ButtonWrapper(
)
MOMOTALK_GO_TO_MAIN = ButtonWrapper(
name='MOMOTALK_GO_TO_MAIN',
jp=Button(
file='./assets/jp/base/page/MOMOTALK_GO_TO_MAIN.png',
area=(1108, 105, 1134, 131),
search=(1088, 85, 1154, 151),
color=(252, 182, 194),
button=(1108, 105, 1134, 131),
),
en=Button(
file='./assets/en/base/page/MOMOTALK_GO_TO_MAIN.png',
share=Button(
file='./assets/share/base/page/MOMOTALK_GO_TO_MAIN.png',
area=(1108, 105, 1134, 131),
search=(1088, 85, 1154, 151),
color=(252, 182, 194),
+6 -27
View File
@@ -39,15 +39,8 @@ AP_EXCEED = ButtonWrapper(
)
DAILY_NEWS = ButtonWrapper(
name='DAILY_NEWS',
jp=Button(
file='./assets/jp/base/popup/DAILY_NEWS.png',
area=(120, 89, 326, 113),
search=(100, 69, 346, 133),
color=(150, 204, 253),
button=(1128, 89, 1156, 117),
),
en=Button(
file='./assets/en/base/popup/DAILY_NEWS.png',
share=Button(
file='./assets/share/base/popup/DAILY_NEWS.png',
area=(120, 89, 326, 113),
search=(100, 69, 346, 133),
color=(150, 204, 253),
@@ -56,15 +49,8 @@ DAILY_NEWS = ButtonWrapper(
)
DAILY_REWARD = ButtonWrapper(
name='DAILY_REWARD',
jp=Button(
file='./assets/jp/base/popup/DAILY_REWARD.png',
area=(416, 165, 434, 216),
search=(396, 145, 454, 236),
color=(203, 227, 237),
button=(920, 632, 1140, 712),
),
en=Button(
file='./assets/en/base/popup/DAILY_REWARD.png',
share=Button(
file='./assets/share/base/popup/DAILY_REWARD.png',
area=(416, 165, 434, 216),
search=(396, 145, 454, 236),
color=(203, 227, 237),
@@ -73,15 +59,8 @@ DAILY_REWARD = ButtonWrapper(
)
GET_NEW_STUDENT = ButtonWrapper(
name='GET_NEW_STUDENT',
jp=Button(
file='./assets/jp/base/popup/GET_NEW_STUDENT.png',
area=(32, 93, 158, 114),
search=(12, 73, 178, 134),
color=(125, 132, 92),
button=(934, 643, 1263, 714),
),
en=Button(
file='./assets/en/base/popup/GET_NEW_STUDENT.png',
share=Button(
file='./assets/share/base/popup/GET_NEW_STUDENT.png',
area=(32, 93, 158, 114),
search=(12, 73, 178, 134),
color=(125, 132, 92),
+56 -8
View File
@@ -12,7 +12,13 @@ CHECK_BOUNTY = ButtonWrapper(
color=(88, 113, 139),
button=(654, 87, 889, 129),
),
en=None,
en=Button(
file='./assets/en/bounty/CHECK_BOUNTY.png',
area=(654, 87, 891, 126),
search=(634, 67, 911, 146),
color=(92, 116, 141),
button=(654, 87, 891, 126),
),
)
CHECK_DESERT_RAILROAD = ButtonWrapper(
name='CHECK_DESERT_RAILROAD',
@@ -23,7 +29,13 @@ CHECK_DESERT_RAILROAD = ButtonWrapper(
color=(172, 179, 183),
button=(106, 147, 401, 179),
),
en=None,
en=Button(
file='./assets/en/bounty/CHECK_DESERT_RAILROAD.png',
area=(105, 144, 490, 183),
search=(85, 124, 510, 203),
color=(200, 207, 211),
button=(105, 144, 490, 183),
),
)
CHECK_HIGHWAY = ButtonWrapper(
name='CHECK_HIGHWAY',
@@ -34,7 +46,13 @@ CHECK_HIGHWAY = ButtonWrapper(
color=(191, 199, 203),
button=(107, 147, 400, 179),
),
en=None,
en=Button(
file='./assets/en/bounty/CHECK_HIGHWAY.png',
area=(104, 143, 391, 188),
search=(84, 123, 411, 208),
color=(206, 213, 217),
button=(104, 143, 391, 188),
),
)
CHECK_SCHOOLHOUSE = ButtonWrapper(
name='CHECK_SCHOOLHOUSE',
@@ -45,7 +63,13 @@ CHECK_SCHOOLHOUSE = ButtonWrapper(
color=(176, 183, 187),
button=(106, 147, 314, 179),
),
en=None,
en=Button(
file='./assets/en/bounty/CHECK_SCHOOLHOUSE.png',
area=(102, 144, 408, 185),
search=(82, 124, 428, 205),
color=(203, 210, 214),
button=(102, 144, 408, 185),
),
)
OCR_TICKET = ButtonWrapper(
name='OCR_TICKET',
@@ -56,7 +80,13 @@ OCR_TICKET = ButtonWrapper(
color=(197, 206, 213),
button=(195, 85, 237, 113),
),
en=None,
en=Button(
file='./assets/en/bounty/OCR_TICKET.png',
area=(225, 85, 267, 114),
search=(205, 65, 287, 134),
color=(197, 206, 213),
button=(225, 85, 267, 114),
),
)
SELECT_DESERT_RAILROAD = ButtonWrapper(
name='SELECT_DESERT_RAILROAD',
@@ -67,7 +97,13 @@ SELECT_DESERT_RAILROAD = ButtonWrapper(
color=(178, 188, 199),
button=(1066, 271, 1224, 311),
),
en=None,
en=Button(
file='./assets/en/bounty/SELECT_DESERT_RAILROAD.png',
area=(989, 270, 1223, 308),
search=(969, 250, 1243, 328),
color=(196, 203, 212),
button=(989, 270, 1223, 308),
),
)
SELECT_HIGHWAY = ButtonWrapper(
name='SELECT_HIGHWAY',
@@ -78,7 +114,13 @@ SELECT_HIGHWAY = ButtonWrapper(
color=(214, 221, 228),
button=(1065, 165, 1223, 203),
),
en=None,
en=Button(
file='./assets/en/bounty/SELECT_HIGHWAY.png',
area=(1073, 167, 1223, 202),
search=(1053, 147, 1243, 222),
color=(192, 201, 211),
button=(1073, 167, 1223, 202),
),
)
SELECT_SCHOOLHOUSE = ButtonWrapper(
name='SELECT_SCHOOLHOUSE',
@@ -89,5 +131,11 @@ SELECT_SCHOOLHOUSE = ButtonWrapper(
color=(173, 185, 198),
button=(1154, 381, 1223, 417),
),
en=None,
en=Button(
file='./assets/en/bounty/SELECT_SCHOOLHOUSE.png',
area=(1055, 378, 1226, 415),
search=(1035, 358, 1246, 435),
color=(198, 206, 215),
button=(1055, 378, 1226, 415),
),
)
+13 -17
View File
@@ -5,19 +5,22 @@ from module.base.button import Button, ButtonWrapper
BOX_CAFE = ButtonWrapper(
name='BOX_CAFE',
jp=Button(
file='./assets/jp/cafe/BOX_CAFE.png',
share=Button(
file='./assets/share/cafe/BOX_CAFE.png',
area=(33, 130, 1247, 569),
search=(13, 110, 1267, 589),
color=(175, 181, 186),
button=(33, 130, 1247, 569),
),
en=Button(
file='./assets/en/cafe/BOX_CAFE.png',
area=(33, 130, 1247, 569),
search=(13, 110, 1267, 589),
color=(175, 181, 186),
button=(33, 130, 1247, 569),
)
BOX_SEARCH = ButtonWrapper(
name='BOX_SEARCH',
share=Button(
file='./assets/share/cafe/BOX_SEARCH.png',
area=(12, 71, 1176, 654),
search=(0, 51, 1196, 674),
color=(175, 183, 190),
button=(12, 71, 1176, 654),
),
)
CAFE_FIRST = ButtonWrapper(
@@ -107,15 +110,8 @@ CHECK_REWARD = ButtonWrapper(
)
CLICKABLE_TEMPLATE = ButtonWrapper(
name='CLICKABLE_TEMPLATE',
jp=Button(
file='./assets/jp/cafe/CLICKABLE_TEMPLATE.png',
area=(619, 332, 660, 387),
search=(599, 312, 680, 407),
color=(79, 65, 1),
button=(619, 332, 660, 387),
),
en=Button(
file='./assets/en/cafe/CLICKABLE_TEMPLATE.png',
share=Button(
file='./assets/share/cafe/CLICKABLE_TEMPLATE.png',
area=(619, 332, 660, 387),
search=(599, 312, 680, 407),
color=(79, 65, 1),
+20 -122
View File
@@ -1,18 +1,12 @@
import cv2
import numpy as np
from enum import Enum
from module.logger import logger
from module.base.timer import Timer
from module.base.button import ClickButton
from module.base.decorator import Config
from module.base.utils.utils import area_offset
from module.ocr.ocr import Digit
from module.base.timer import Timer
from module.logger import logger
from module.ui.switch import Switch
from tasks.base.page import page_cafe
from tasks.base.ui import UI
from tasks.cafe.assets.assets_cafe import *
from tasks.cafe.ui import CafeUI
SWITCH_CAFE = Switch('Cafe_switch')
SWITCH_CAFE.add_state('off', CHANGE_CAFE_NOT_SELECTED)
@@ -33,103 +27,17 @@ class CafeStatus(Enum):
FINISHED = -1
class Cafe(UI):
template = CLICKABLE_TEMPLATE
class Cafe(CafeUI):
@Config.when(Emulator_GameLanguage='jp')
def _is_second_cafe_on(self):
return self.config.Cafe_SecondCafe
@staticmethod
def merge_points(points, threshold=3):
if len(points) <= 1:
return points
result = []
for point in points:
if not result:
result.append(point)
continue
if point[0] - result[-1][0] < threshold and point[1] - result[-1][1] < threshold:
result[-1] = ((point[0] + result[-1][0]) // 2, (point[1] + result[-1][1]) // 2)
continue
result.append(point)
return result
@staticmethod
def _extract_clickable_from_image(image):
# convert to hsv for better color matching
hsv = cv2.cvtColor(image, cv2.COLOR_RGB2HSV)
# set color range
lower_hsv = np.array([18, 200, 220])
upper_hsv = np.array([30, 255, 255])
# get mask
mask = cv2.inRange(hsv, lower_hsv, upper_hsv)
# generate result
return cv2.bitwise_and(image, image, mask=mask)
def _match_clickable_points(self, image, threshold=0.8):
image = cv2.cvtColor(image, cv2.COLOR_RGB2GRAY)
template = cv2.cvtColor(self.template.matched_button.image, cv2.COLOR_RGB2GRAY)
res = cv2.matchTemplate(image, template, cv2.TM_CCOEFF_NORMED)
loc = np.where(res >= threshold)
return [point for point in zip(*loc[::-1])]
def _get_clickable_buttons(self, threshold=0.8, offset=(0, 0)):
image = self.device.image
h, w = image.shape[:2]
image = cv2.rectangle(image, (0, 10), (w - 25, h - 10), (0, 0, 0), 50)
image = self._extract_clickable_from_image(image)
points = self._match_clickable_points(image, threshold)
points = self.merge_points(points)
if not points:
return []
area = area_offset((0, 0, self.template.width, self.template.height), offset)
return [
ClickButton(
button=area_offset(area, offset=point),
name=self.template.name
)
for point in points
]
def _reset_cafe_position(self, direction: str):
width = BOX_CAFE.width
height = BOX_CAFE.height
r = np.random.uniform(0.6, 0.8)
vector_down = (width * r, height * r)
vector_up = (width * r, -height * r)
vector_left = (-width * r, 0)
vector_right = (width * r, 0)
random_r = (-5, -5, 5, 5)
match direction:
case 'init':
self.device.pinch()
self.device.swipe_vector(vector_down, box=BOX_CAFE.area, random_range=random_r, padding=5)
self.device.swipe_vector(vector_right, box=BOX_CAFE.area, random_range=random_r, padding=5)
self.device.swipe_vector(vector_up, box=BOX_CAFE.area, random_range=random_r, padding=5)
self.device.swipe_vector(vector_up, box=BOX_CAFE.area, random_range=random_r, padding=5)
case 'left':
self.device.swipe_vector(vector_left, box=BOX_CAFE.area, random_range=random_r, padding=5)
self.device.swipe_vector(vector_left, box=BOX_CAFE.area, random_range=random_r, padding=5)
case 'right':
self.device.swipe_vector(vector_right, box=BOX_CAFE.area, random_range=random_r, padding=5)
self.device.swipe_vector(vector_right, box=BOX_CAFE.area, random_range=random_r, padding=5)
# solve too much swipe causing restart
self.device.click_record_clear()
def _get_reward_num(self):
ocr = Digit(OCR_CAFE)
num = ocr.detect_and_ocr(self.device.image)
if len(num) != 1:
logger.warning(f'Invalid reward num: {num}')
num = float(num[0].ocr_text.rstrip('%'))
logger.attr('Reward', num)
return num
def _cafe_additional(self) -> bool:
if self.appear_then_click(INVENTORY):
return True
if self.appear_then_click(MOMOTALK_CLOSE):
return True
@Config.when(Emulator_GameLanguage=None)
def _is_second_cafe_on(self):
return False
is_second_cafe_on = property(_is_second_cafe_on)
def _handle_cafe(self, status):
match status:
case CafeStatus.STUDENT_LIST:
@@ -137,7 +45,7 @@ class Cafe(UI):
if not self.appear(STUDENT_LIST):
return CafeStatus.OCR
case CafeStatus.OCR:
reward = self._get_reward_num()
reward = self.get_reward_num()
if reward == 0:
return CafeStatus.GOT
if self.appear_then_click(CHECK_REWARD):
@@ -157,14 +65,14 @@ class Cafe(UI):
if not self.appear(GET_REWARD_CLOSE):
return CafeStatus.CLICK
case CafeStatus.CLICK:
buttons = self._get_clickable_buttons(offset=(45, 10))
buttons = self.get_clickable_buttons(offset=(45, 10))
self.click = len(buttons)
logger.attr('Clickable', self.click)
if not buttons:
return CafeStatus.CHECK
self.click_with_interval(buttons[0], interval=1)
case CafeStatus.CHECK:
buttons = self._get_clickable_buttons()
buttons = self.get_clickable_buttons()
if not self.is_adjust_on:
if not buttons:
return CafeStatus.FINISHED
@@ -177,11 +85,11 @@ class Cafe(UI):
return CafeStatus.CLICK
match self.check:
case 1:
self._reset_cafe_position('left')
self.reset_cafe_position('left')
case 2:
self._reset_cafe_position('right')
self.reset_cafe_position('right')
case 3:
self._reset_cafe_position('init')
self.reset_cafe_position('init')
case 4:
return CafeStatus.FINISHED
case CafeStatus.FINISHED:
@@ -190,16 +98,6 @@ class Cafe(UI):
logger.warning(f'Invalid status: {status}')
return status
@Config.when(Emulator_GameLanguage='jp')
def is_second_cafe_on(self):
return self.config.Cafe_SecondCafe
@Config.when(Emulator_GameLanguage=None)
def is_second_cafe_on(self):
return False
is_second_cafe_on = property(is_second_cafe_on)
def run(self):
self.click = 0
self.check = 0
@@ -212,7 +110,7 @@ class Cafe(UI):
status = CafeStatus.STUDENT_LIST
loading_timer = Timer(2).start()
action_timer = Timer(1, count=1) # cant be too fast
action_timer = Timer(1, count=1)
is_list = False
is_reset = False
is_second = False
@@ -224,7 +122,7 @@ class Cafe(UI):
self.device.screenshot()
if self.ui_additional() or self._cafe_additional():
if self.ui_additional() or self.cafe_additional():
continue
if not loading_timer.reached():
@@ -246,7 +144,7 @@ class Cafe(UI):
continue
if is_touch_on and not is_reset and status == CafeStatus.CLICK:
self._reset_cafe_position('init')
self.reset_cafe_position('init')
is_reset = True
continue
+72
View File
@@ -0,0 +1,72 @@
import cv2
import numpy as np
from module.logger import logger
from module.ocr.ocr import Digit
from tasks.base.ui import UI
from tasks.cafe.assets.assets_cafe import *
class CafeUI(UI):
template = CLICKABLE_TEMPLATE
def get_reward_num(self):
ocr = Digit(OCR_CAFE)
num = ocr.detect_and_ocr(self.device.image)
if len(num) != 1:
logger.warning(f'Invalid reward num: {num}')
num = float(num[0].ocr_text.rstrip('%'))
logger.attr('Reward', num)
return num
@staticmethod
def extract_clickable_from_image(image):
# convert to hsv for better color matching
hsv = cv2.cvtColor(image, cv2.COLOR_RGB2HSV)
# set color range
lower_hsv = np.array([18, 200, 220])
upper_hsv = np.array([30, 255, 255])
# get mask
mask = cv2.inRange(hsv, lower_hsv, upper_hsv)
# generate result
return cv2.bitwise_and(image, image, mask=mask)
def get_clickable_buttons(self, similarity=0.8, offset=(45, 10)):
image = self.extract_clickable_from_image(self.device.image)
self.template.matched_button._button_offset = offset
self.template.load_offset(self.template)
self.template.load_search(BOX_SEARCH.area)
points = self.template.match_multi_template(image, similarity)
return points
def reset_cafe_position(self, direction: str):
width = BOX_CAFE.width
height = BOX_CAFE.height
r = np.random.uniform(0.6, 0.8)
vector_down = (width * r, height * r)
vector_up = (width * r, -height * r)
vector_left = (-width * r, 0)
vector_right = (width * r, 0)
random_r = (-5, -5, 5, 5)
match direction:
case 'init':
self.device.pinch()
self.device.swipe_vector(vector_down, box=BOX_CAFE.area, random_range=random_r, padding=5)
self.device.swipe_vector(vector_right, box=BOX_CAFE.area, random_range=random_r, padding=5)
self.device.swipe_vector(vector_up, box=BOX_CAFE.area, random_range=random_r, padding=5)
self.device.swipe_vector(vector_up, box=BOX_CAFE.area, random_range=random_r, padding=5)
case 'left':
self.device.swipe_vector(vector_left, box=BOX_CAFE.area, random_range=random_r, padding=5)
self.device.swipe_vector(vector_left, box=BOX_CAFE.area, random_range=random_r, padding=5)
case 'right':
self.device.swipe_vector(vector_right, box=BOX_CAFE.area, random_range=random_r, padding=5)
self.device.swipe_vector(vector_right, box=BOX_CAFE.area, random_range=random_r, padding=5)
# solve too much swipe causing restart
self.device.click_record_clear()
def cafe_additional(self) -> bool:
if self.appear_then_click(INVENTORY):
return True
if self.appear_then_click(MOMOTALK_CLOSE):
return True
return False
+56 -8
View File
@@ -12,7 +12,13 @@ CHECK_GEHENNA = ButtonWrapper(
color=(201, 205, 206),
button=(109, 149, 195, 177),
),
en=None,
en=Button(
file='./assets/en/scrimmage/CHECK_GEHENNA.png',
area=(103, 145, 252, 182),
search=(83, 125, 272, 202),
color=(202, 206, 208),
button=(103, 145, 252, 182),
),
)
CHECK_MILLENNIUM = ButtonWrapper(
name='CHECK_MILLENNIUM',
@@ -23,7 +29,13 @@ CHECK_MILLENNIUM = ButtonWrapper(
color=(202, 206, 208),
button=(108, 148, 254, 178),
),
en=None,
en=Button(
file='./assets/en/scrimmage/CHECK_MILLENNIUM.png',
area=(104, 145, 283, 182),
search=(84, 125, 303, 202),
color=(199, 202, 204),
button=(104, 145, 283, 182),
),
)
CHECK_SCRIMMAGE = ButtonWrapper(
name='CHECK_SCRIMMAGE',
@@ -34,7 +46,13 @@ CHECK_SCRIMMAGE = ButtonWrapper(
color=(96, 119, 144),
button=(651, 90, 889, 130),
),
en=None,
en=Button(
file='./assets/en/scrimmage/CHECK_SCRIMMAGE.png',
area=(651, 88, 891, 130),
search=(631, 68, 911, 150),
color=(92, 116, 141),
button=(651, 88, 891, 130),
),
)
CHECK_TRINITY = ButtonWrapper(
name='CHECK_TRINITY',
@@ -45,7 +63,13 @@ CHECK_TRINITY = ButtonWrapper(
color=(204, 208, 210),
button=(115, 148, 250, 178),
),
en=None,
en=Button(
file='./assets/en/scrimmage/CHECK_TRINITY.png',
area=(100, 143, 219, 187),
search=(80, 123, 239, 207),
color=(212, 216, 217),
button=(100, 143, 219, 187),
),
)
OCR_TICKET = ButtonWrapper(
name='OCR_TICKET',
@@ -56,7 +80,13 @@ OCR_TICKET = ButtonWrapper(
color=(206, 211, 215),
button=(195, 85, 235, 113),
),
en=None,
en=Button(
file='./assets/en/scrimmage/OCR_TICKET.png',
area=(227, 84, 265, 115),
search=(207, 64, 285, 135),
color=(207, 212, 216),
button=(227, 84, 265, 115),
),
)
SELECT_GEHENNA = ButtonWrapper(
name='SELECT_GEHENNA',
@@ -67,7 +97,13 @@ SELECT_GEHENNA = ButtonWrapper(
color=(207, 217, 225),
button=(1125, 275, 1224, 310),
),
en=None,
en=Button(
file='./assets/en/scrimmage/SELECT_GEHENNA.png',
area=(1076, 273, 1223, 313),
search=(1056, 253, 1243, 333),
color=(199, 208, 216),
button=(1076, 273, 1223, 313),
),
)
SELECT_MILLENNIUM = ButtonWrapper(
name='SELECT_MILLENNIUM',
@@ -78,7 +114,13 @@ SELECT_MILLENNIUM = ButtonWrapper(
color=(206, 214, 222),
button=(1069, 381, 1217, 417),
),
en=None,
en=Button(
file='./assets/en/scrimmage/SELECT_MILLENNIUM.png',
area=(1045, 380, 1224, 417),
search=(1025, 360, 1244, 437),
color=(193, 202, 211),
button=(1045, 380, 1224, 417),
),
)
SELECT_TRINITY = ButtonWrapper(
name='SELECT_TRINITY',
@@ -89,5 +131,11 @@ SELECT_TRINITY = ButtonWrapper(
color=(213, 221, 228),
button=(1074, 165, 1221, 204),
),
en=None,
en=Button(
file='./assets/en/scrimmage/SELECT_TRINITY.png',
area=(1118, 164, 1224, 205),
search=(1098, 144, 1244, 225),
color=(200, 209, 218),
button=(1118, 164, 1224, 205),
),
)
+4 -4
View File
@@ -21,12 +21,12 @@ class ScrimmageStatus(Enum):
class Scrimmage(ScrimmageUI):
@property
def scrimmage_info(self):
bounty = (SELECT_TRINITY, SELECT_GEHENNA, SELECT_MILLENNIUM)
scrimmage = (SELECT_TRINITY, SELECT_GEHENNA, SELECT_MILLENNIUM)
check = (CHECK_TRINITY, CHECK_GEHENNA, CHECK_MILLENNIUM)
stage = (self.config.Trinity_Stage, self.config.Gehenna_Stage, self.config.Millennium_Stage)
count = (self.config.Trinity_Count, self.config.Gehenna_Count, self.config.Millennium_Count)
ap = (10 if stage == 1 else 15 for stage in stage)
info = zip(bounty, check, stage, count, ap)
info = zip(scrimmage, check, stage, count, ap)
return filter(lambda x: x[3] > 0, info)
@property
@@ -38,7 +38,7 @@ class Scrimmage(ScrimmageUI):
return task
def error_handler(self):
action = self.config.Bounty_OnError
action = self.config.Scrimmage_OnError
if action == 'stop':
raise RequestHumanTakeover
elif action == 'skip':
@@ -67,7 +67,7 @@ class Scrimmage(ScrimmageUI):
@property
def current_task_ap(self):
return self.task[0][4]
return self.task[0][4] * self.current_count
@property
def current_ticket(self):
+35 -5
View File
@@ -12,7 +12,13 @@ OCR_INDEX = ButtonWrapper(
color=(195, 196, 193),
button=(701, 149, 740, 656),
),
en=None,
en=Button(
file='./assets/en/stage/list/OCR_INDEX.png',
area=(701, 149, 740, 656),
search=(681, 129, 760, 676),
color=(195, 196, 193),
button=(701, 149, 740, 656),
),
)
STAGE_ENTER = ButtonWrapper(
name='STAGE_ENTER',
@@ -23,7 +29,13 @@ STAGE_ENTER = ButtonWrapper(
color=(106, 171, 200),
button=(1093, 173, 1142, 199),
),
en=None,
en=Button(
file='./assets/en/stage/list/STAGE_ENTER.png',
area=(1080, 168, 1156, 204),
search=(1060, 148, 1176, 224),
color=(118, 195, 226),
button=(1080, 168, 1156, 204),
),
)
STAGE_ITEM = ButtonWrapper(
name='STAGE_ITEM',
@@ -34,7 +46,13 @@ STAGE_ITEM = ButtonWrapper(
color=(212, 228, 233),
button=(687, 148, 1181, 227),
),
en=None,
en=Button(
file='./assets/en/stage/list/STAGE_ITEM.png',
area=(687, 148, 1181, 227),
search=(667, 128, 1201, 247),
color=(212, 228, 233),
button=(687, 148, 1181, 227),
),
)
STAGE_LIST = ButtonWrapper(
name='STAGE_LIST',
@@ -45,7 +63,13 @@ STAGE_LIST = ButtonWrapper(
color=(194, 204, 209),
button=(675, 136, 1190, 676),
),
en=None,
en=Button(
file='./assets/en/stage/list/STAGE_LIST.png',
area=(675, 136, 1190, 676),
search=(655, 116, 1210, 696),
color=(194, 204, 209),
button=(675, 136, 1190, 676),
),
)
STAGE_STARS = ButtonWrapper(
name='STAGE_STARS',
@@ -56,5 +80,11 @@ STAGE_STARS = ButtonWrapper(
color=(225, 214, 166),
button=(693, 192, 746, 212),
),
en=None,
en=Button(
file='./assets/en/stage/list/STAGE_STARS.png',
area=(693, 192, 746, 212),
search=(673, 172, 766, 232),
color=(225, 214, 166),
button=(693, 192, 746, 212),
),
)
+91 -13
View File
@@ -12,7 +12,13 @@ CHECK_SWEEP = ButtonWrapper(
color=(174, 184, 197),
button=(638, 188, 722, 212),
),
en=None,
en=Button(
file='./assets/en/stage/sweep/CHECK_SWEEP.png',
area=(654, 187, 706, 215),
search=(634, 167, 726, 235),
color=(169, 180, 194),
button=(654, 187, 706, 215),
),
)
ENTER = ButtonWrapper(
name='ENTER',
@@ -23,7 +29,13 @@ ENTER = ButtonWrapper(
color=(223, 207, 68),
button=(791, 514, 1080, 568),
),
en=None,
en=Button(
file='./assets/en/stage/sweep/ENTER.png',
area=(781, 508, 1085, 572),
search=(761, 488, 1105, 592),
color=(226, 211, 69),
button=(781, 508, 1085, 572),
),
)
EXIT = ButtonWrapper(
name='EXIT',
@@ -34,7 +46,13 @@ EXIT = ButtonWrapper(
color=(185, 193, 203),
button=(1114, 127, 1141, 154),
),
en=None,
en=Button(
file='./assets/en/stage/sweep/EXIT.png',
area=(1114, 127, 1141, 154),
search=(1094, 107, 1161, 174),
color=(185, 193, 203),
button=(1114, 127, 1141, 154),
),
)
MAX = ButtonWrapper(
name='MAX',
@@ -45,7 +63,13 @@ MAX = ButtonWrapper(
color=(216, 222, 228),
button=(1054, 279, 1111, 321),
),
en=None,
en=Button(
file='./assets/en/stage/sweep/MAX.png',
area=(1054, 279, 1111, 321),
search=(1034, 259, 1131, 341),
color=(216, 222, 228),
button=(1054, 279, 1111, 321),
),
)
MIN = ButtonWrapper(
name='MIN',
@@ -56,7 +80,13 @@ MIN = ButtonWrapper(
color=(194, 194, 194),
button=(760, 278, 816, 322),
),
en=None,
en=Button(
file='./assets/en/stage/sweep/MIN.png',
area=(760, 278, 816, 322),
search=(740, 258, 836, 342),
color=(194, 194, 194),
button=(760, 278, 816, 322),
),
)
MINUS = ButtonWrapper(
name='MINUS',
@@ -67,7 +97,13 @@ MINUS = ButtonWrapper(
color=(221, 222, 222),
button=(838, 279, 876, 320),
),
en=None,
en=Button(
file='./assets/en/stage/sweep/MINUS.png',
area=(838, 279, 876, 320),
search=(818, 259, 896, 340),
color=(221, 222, 222),
button=(838, 279, 876, 320),
),
)
OCR_NUM = ButtonWrapper(
name='OCR_NUM',
@@ -78,7 +114,13 @@ OCR_NUM = ButtonWrapper(
color=(81, 94, 113),
button=(896, 281, 975, 323),
),
en=None,
en=Button(
file='./assets/en/stage/sweep/OCR_NUM.png',
area=(896, 281, 975, 323),
search=(876, 261, 995, 343),
color=(81, 94, 113),
button=(896, 281, 975, 323),
),
)
PLUS = ButtonWrapper(
name='PLUS',
@@ -89,7 +131,13 @@ PLUS = ButtonWrapper(
color=(233, 243, 246),
button=(995, 278, 1034, 322),
),
en=None,
en=Button(
file='./assets/en/stage/sweep/PLUS.png',
area=(995, 278, 1034, 322),
search=(975, 258, 1054, 342),
color=(233, 243, 246),
button=(995, 278, 1034, 322),
),
)
SKIP_OK_LOWER = ButtonWrapper(
name='SKIP_OK_LOWER',
@@ -100,7 +148,13 @@ SKIP_OK_LOWER = ButtonWrapper(
color=(112, 212, 247),
button=(541, 551, 740, 616),
),
en=None,
en=Button(
file='./assets/en/stage/sweep/SKIP_OK_LOWER.png',
area=(540, 548, 741, 619),
search=(520, 528, 761, 639),
color=(108, 204, 240),
button=(540, 548, 741, 619),
),
)
SKIP_OK_UPPER = ButtonWrapper(
name='SKIP_OK_UPPER',
@@ -111,7 +165,13 @@ SKIP_OK_UPPER = ButtonWrapper(
color=(112, 212, 248),
button=(542, 474, 738, 545),
),
en=None,
en=Button(
file='./assets/en/stage/sweep/SKIP_OK_UPPER.png',
area=(541, 476, 741, 542),
search=(521, 456, 761, 562),
color=(107, 203, 239),
button=(541, 476, 741, 542),
),
)
SKIP_SKIP = ButtonWrapper(
name='SKIP_SKIP',
@@ -122,7 +182,13 @@ SKIP_SKIP = ButtonWrapper(
color=(110, 207, 243),
button=(545, 475, 736, 540),
),
en=None,
en=Button(
file='./assets/en/stage/sweep/SKIP_SKIP.png',
area=(543, 477, 739, 542),
search=(523, 457, 759, 562),
color=(110, 209, 244),
button=(543, 477, 739, 542),
),
)
SWEEP = ButtonWrapper(
name='SWEEP',
@@ -133,7 +199,13 @@ SWEEP = ButtonWrapper(
color=(109, 202, 235),
button=(796, 385, 1067, 427),
),
en=None,
en=Button(
file='./assets/en/stage/sweep/SWEEP.png',
area=(795, 382, 1066, 431),
search=(775, 362, 1086, 451),
color=(108, 202, 236),
button=(795, 382, 1066, 431),
),
)
SWEEP_CONFIRM = ButtonWrapper(
name='SWEEP_CONFIRM',
@@ -144,5 +216,11 @@ SWEEP_CONFIRM = ButtonWrapper(
color=(143, 156, 170),
button=(664, 470, 871, 534),
),
en=None,
en=Button(
file='./assets/en/stage/sweep/SWEEP_CONFIRM.png',
area=(587, 143, 695, 182),
search=(567, 123, 715, 202),
color=(196, 203, 211),
button=(665, 471, 871, 535),
),
)

Some files were not shown because too many files have changed in this diff Show More