集成回顾傀影签到+红丝绒关卡导航/奖励领取/活动商店
All checks were successful
ci/woodpecker/push/check_format Pipeline was successful
All checks were successful
ci/woodpecker/push/check_format Pipeline was successful
This commit is contained in:
parent
e7b55f0e39
commit
fe4cb802b2
16 changed files with 77 additions and 87 deletions
BIN
mower/resources/navigation/activity/banner_normal.png
(Stored with Git LFS)
BIN
mower/resources/navigation/activity/banner_normal.png
(Stored with Git LFS)
Binary file not shown.
BIN
mower/resources/navigation/activity/entry_normal.png
(Stored with Git LFS)
BIN
mower/resources/navigation/activity/entry_normal.png
(Stored with Git LFS)
Binary file not shown.
BIN
mower/resources/navigation/activity/terminal.jpg
(Stored with Git LFS)
BIN
mower/resources/navigation/activity/terminal.jpg
(Stored with Git LFS)
Binary file not shown.
BIN
mower/resources/sign_in/banner.png
(Stored with Git LFS)
BIN
mower/resources/sign_in/banner.png
(Stored with Git LFS)
Binary file not shown.
BIN
mower/resources/sign_in/collect.png
(Stored with Git LFS)
BIN
mower/resources/sign_in/collect.png
(Stored with Git LFS)
Binary file not shown.
BIN
mower/resources/sign_in/entry.png
(Stored with Git LFS)
BIN
mower/resources/sign_in/entry.png
(Stored with Git LFS)
Binary file not shown.
BIN
mower/resources/sign_in/shop/banner.png
(Stored with Git LFS)
BIN
mower/resources/sign_in/shop/banner.png
(Stored with Git LFS)
Binary file not shown.
BIN
mower/resources/sign_in/shop/coin.png
(Stored with Git LFS)
BIN
mower/resources/sign_in/shop/coin.png
(Stored with Git LFS)
Binary file not shown.
BIN
mower/resources/sign_in/shop/entry.png
(Stored with Git LFS)
BIN
mower/resources/sign_in/shop/entry.png
(Stored with Git LFS)
Binary file not shown.
BIN
mower/resources/sign_in/task/entry.png
(Stored with Git LFS)
BIN
mower/resources/sign_in/task/entry.png
(Stored with Git LFS)
Binary file not shown.
|
@ -29,16 +29,14 @@ class ActivityNavigation(BaseSolver):
|
|||
|
||||
_location = {
|
||||
"normal": {
|
||||
"MT-1": (0, 0),
|
||||
"MT-2": [330, -1],
|
||||
"MT-3": [694, -1],
|
||||
"MT-4": [1044, 0],
|
||||
"MT-5": [1394, 0],
|
||||
"MT-6": [1836, -1],
|
||||
"MT-7": [2249, -25],
|
||||
"MT-8": [2568, -101],
|
||||
"MT-9": [2868, -212],
|
||||
"MT-10": [3091, -388],
|
||||
"AD-1": (0, 0),
|
||||
"AD-2": (248, -215),
|
||||
"AD-3": (633, -23),
|
||||
"AD-4": (867, -201),
|
||||
"AD-5": (1346, 8),
|
||||
"AD-6": (1698, -181),
|
||||
"AD-7": (2119, 145),
|
||||
"AD-8": (2317, -198),
|
||||
},
|
||||
"ex": {},
|
||||
}
|
||||
|
@ -46,9 +44,9 @@ class ActivityNavigation(BaseSolver):
|
|||
@classproperty
|
||||
def location(cls):
|
||||
result = {"normal": {}, "ex": {}}
|
||||
if (now := datetime.now()) < datetime(2025, 5, 22, 4):
|
||||
if (now := datetime.now()) < datetime(2025, 6, 19, 4):
|
||||
result["normal"] = cls._location["normal"]
|
||||
if now > datetime(2025, 5, 8, 16):
|
||||
if now > datetime(2025, 6, 12, 16):
|
||||
result["ex"] = cls._location["ex"]
|
||||
return result
|
||||
|
||||
|
|
|
@ -18,9 +18,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
from datetime import datetime
|
||||
|
||||
from .box import Box
|
||||
from .headhunting import Headhunting
|
||||
from .orundum import Orundum
|
||||
from .shop import Shop
|
||||
from .sign_in import SignIn
|
||||
from .special_access import SpecialAccess
|
||||
|
@ -37,10 +34,10 @@ class SignInManager:
|
|||
now = datetime.now()
|
||||
if now < datetime(2025, 6, 9):
|
||||
solver_list += [SpecialAccess()]
|
||||
if now < datetime(2025, 5, 15):
|
||||
solver_list += [SignIn(), Orundum(), Headhunting()]
|
||||
if now < datetime(2025, 5, 29):
|
||||
solver_list += [Task(), Shop(), Box()]
|
||||
if now < datetime(2025, 6, 19):
|
||||
solver_list += [SignIn()]
|
||||
if now < datetime(2025, 6, 26):
|
||||
solver_list += [Task(), Shop()]
|
||||
for solver in solver_list:
|
||||
solver.scheduler_stop_time = self.scheduler_stop_time
|
||||
result = result and solver.run()
|
||||
|
|
|
@ -30,8 +30,8 @@ from mower.utils.scene import Scene
|
|||
from mower.utils.solver import BaseSolver
|
||||
from mower.utils.vector import sa, va, vs
|
||||
|
||||
offset = (24, 165)
|
||||
task_name = "众生行记"
|
||||
offset = (21, 181)
|
||||
task_name = "红丝绒"
|
||||
|
||||
|
||||
class Shop(BaseSolver):
|
||||
|
|
|
@ -18,18 +18,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
from datetime import timedelta
|
||||
|
||||
import cv2
|
||||
|
||||
from mower.utils import config
|
||||
from mower.utils.email import notify
|
||||
from mower.utils.image import cropimg
|
||||
from mower.utils.scene import Scene
|
||||
from mower.utils.solver import BaseSolver
|
||||
from mower.utils.vector import sa, va
|
||||
|
||||
from .utils import index_entry
|
||||
|
||||
activity_name = "六周年庆典签到活动"
|
||||
activity_name = "集成回顾傀影"
|
||||
|
||||
|
||||
class SignIn(BaseSolver):
|
||||
|
@ -59,37 +54,37 @@ class SignIn(BaseSolver):
|
|||
elif scene == Scene.ANNOUNCEMENT:
|
||||
if self.animation():
|
||||
return
|
||||
top_left = 680, 500
|
||||
img = cropimg(config.recog.hsv, (top_left, (1800, 540)))
|
||||
img = cv2.inRange(img, (85, 100, 100), (95, 255, 255))
|
||||
contours, _ = cv2.findContours(
|
||||
img, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE
|
||||
)
|
||||
rect = [cv2.boundingRect(c) for c in contours]
|
||||
rect = [r for r in rect if r[2] > 200]
|
||||
if len(rect) == 0:
|
||||
if self.finish_email:
|
||||
notify(f"{activity_name}奖励已领完")
|
||||
return True
|
||||
rect.sort(key=lambda c: c[0])
|
||||
x, y, w, h = rect[0]
|
||||
scope = sa(((x, y), va((x, y), (w, h))), top_left)
|
||||
if self.ctap(scope):
|
||||
self.materiel_email = True
|
||||
self.skin_email = True
|
||||
self.finish_email = False
|
||||
# if not self.find("sign_in/banner"):
|
||||
# self.scene_graph_step(Scene.INDEX)
|
||||
# return
|
||||
# if pos := self.find("sign_in/collect"):
|
||||
# if self.ctap(pos, 5):
|
||||
# self.materiel_email = True
|
||||
# self.skin_email = True
|
||||
# self.finish_email = False
|
||||
# return
|
||||
# top_left = 680, 500
|
||||
# img = cropimg(config.recog.hsv, (top_left, (1800, 540)))
|
||||
# img = cv2.inRange(img, (85, 100, 100), (95, 255, 255))
|
||||
# contours, _ = cv2.findContours(
|
||||
# img, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE
|
||||
# )
|
||||
# rect = [cv2.boundingRect(c) for c in contours]
|
||||
# rect = [r for r in rect if r[2] > 200]
|
||||
# if len(rect) == 0:
|
||||
# if self.finish_email:
|
||||
# notify(f"{activity_name}奖励已领完")
|
||||
# return True
|
||||
# rect.sort(key=lambda c: c[0])
|
||||
# x, y, w, h = rect[0]
|
||||
# scope = sa(((x, y), va((x, y), (w, h))), top_left)
|
||||
# if self.ctap(scope):
|
||||
# self.materiel_email = True
|
||||
# self.skin_email = True
|
||||
# self.finish_email = False
|
||||
if not self.find("sign_in/banner"):
|
||||
self.scene_graph_step(Scene.INDEX)
|
||||
return
|
||||
if pos := self.find("sign_in/collect"):
|
||||
if self.ctap(pos, 5):
|
||||
self.materiel_email = True
|
||||
self.skin_email = True
|
||||
self.finish_email = False
|
||||
return
|
||||
if self.finish_email:
|
||||
notify(f"{activity_name}奖励已领完")
|
||||
return True
|
||||
elif scene == Scene.ROGUE_AGENT:
|
||||
if self.skin_email:
|
||||
self.skin_email = False
|
||||
|
|
|
@ -25,7 +25,7 @@ from mower.utils.rapidocr import ocr_rec
|
|||
from mower.utils.scene import Scene
|
||||
from mower.utils.solver import BaseSolver
|
||||
|
||||
task_name = "众生行记"
|
||||
task_name = "红丝绒"
|
||||
|
||||
|
||||
class Task(BaseSolver):
|
||||
|
@ -42,7 +42,7 @@ class Task(BaseSolver):
|
|||
if (scene := self.scene()) == Scene.ACTIVITY_TASK:
|
||||
if self.animation():
|
||||
return
|
||||
scope = ((1500, 230), (1700, 280))
|
||||
scope = ((1500, 230), (1800, 280))
|
||||
if "键" in ocr_rec(cropimg(config.recog.img, scope)):
|
||||
self.notify_task = True
|
||||
self.notify_operator = True
|
||||
|
|
|
@ -78,7 +78,7 @@ color = {
|
|||
"nav_bar": (655, 0),
|
||||
"nav_button": (26, 20),
|
||||
"navigation/activity/entry_ex": (1540, 904),
|
||||
"navigation/activity/entry_normal": (1030, 972),
|
||||
"navigation/activity/entry_normal": (1656, 676),
|
||||
"navigation/activity/entry_s": (1709, 804),
|
||||
"navigation/collection/AP-1": (203, 821),
|
||||
"navigation/collection/CA-1": (203, 821),
|
||||
|
@ -192,18 +192,18 @@ color = {
|
|||
"shop/token": (1097, 120),
|
||||
"shop/trade_token_button": (15, 998),
|
||||
"shop/trade_token_dialog": (717, 694),
|
||||
"sign_in/banner": (96, 468),
|
||||
"sign_in/banner": (132, 278),
|
||||
"sign_in/box/banner": (166, 593),
|
||||
"sign_in/box/collect": (97, 912),
|
||||
"sign_in/box/complete": (208, 937),
|
||||
"sign_in/collect": (1429, 875),
|
||||
"sign_in/collect": (1493, 289),
|
||||
"sign_in/headhunting/available": (1251, 949),
|
||||
"sign_in/moon_festival/moon_cake": (1216, 503),
|
||||
"sign_in/orundum/banner": (100, 837),
|
||||
"sign_in/orundum/choose": (1561, 776),
|
||||
"sign_in/orundum/complete": (1561, 776),
|
||||
"sign_in/orundum/confirm": (1561, 778),
|
||||
"sign_in/shop/banner": (870, 74),
|
||||
"sign_in/shop/banner": (1155, 109),
|
||||
"sign_in/shop/max": (1566, 617),
|
||||
"sign_in/shop/price_black": (1238, 279),
|
||||
"sign_in/shop/price_white": (1258, 237),
|
||||
|
@ -341,7 +341,7 @@ template_matching = {
|
|||
"mission_weekly": ((685, 15), (1910, 100)),
|
||||
"mission_weekly_on": ((685, 15), (1910, 100)),
|
||||
"navigation/activity/banner_ex": (1644, 941),
|
||||
"navigation/activity/banner_normal": (1290, 970),
|
||||
"navigation/activity/banner_normal": (1402, 922),
|
||||
"navigation/activity/banner_s": (1735, 896),
|
||||
"navigation/collection/AP_entry": ((0, 170), (1920, 870)),
|
||||
"navigation/collection/CA_entry": ((0, 170), (1920, 870)),
|
||||
|
@ -488,14 +488,14 @@ template_matching = {
|
|||
"sign_in/moon_festival/banner": (704, 92),
|
||||
"sign_in/shop/0": (1341, 618),
|
||||
"sign_in/shop/buy": ((1250, 800), (1390, 895)),
|
||||
"sign_in/shop/entry": (1694, 443),
|
||||
"sign_in/shop/entry": (99, 677),
|
||||
"sign_in/shop/insufficient": ((1560, 140), (1920, 210)),
|
||||
"sign_in/shop/out_of_stock": None,
|
||||
"sign_in/shop/owned": None,
|
||||
"sign_in/spring_festival/done": None,
|
||||
"sign_in/spring_festival/login_day": ((1270, 160), (1460, 980)),
|
||||
"sign_in/task/banner": (645, 27),
|
||||
"sign_in/task/entry": (1682, 186),
|
||||
"sign_in/task/entry": (191, 887),
|
||||
"skill_collect_confirm": (1164, 837),
|
||||
"sss/abandon": ((0, 504), (289, 564)),
|
||||
"sss/accomplished": (640, 381),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue