This commit is contained in:
parent
54382ef061
commit
c42b763bfa
11 changed files with 22 additions and 26 deletions
BIN
mower/resources/activity_banner.png
(Stored with Git LFS)
BIN
mower/resources/activity_banner.png
(Stored with Git LFS)
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 479 KiB After Width: | Height: | Size: 369 KiB |
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/shop/owned.png
(Stored with Git LFS)
Normal file
BIN
mower/resources/sign_in/shop/owned.png
(Stored with Git LFS)
Normal file
Binary file not shown.
|
@ -18,11 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
from datetime import datetime
|
||||
|
||||
from .headhunting import Headhunting
|
||||
from .orundum import Orundum
|
||||
from .shop import Shop
|
||||
from .spring_festival import SpringFestival
|
||||
from .task import Task
|
||||
|
||||
|
||||
class SignInManager:
|
||||
|
@ -33,12 +29,8 @@ class SignInManager:
|
|||
result = True
|
||||
solver_list = []
|
||||
now = datetime.now()
|
||||
if now < datetime(2025, 2, 5):
|
||||
solver_list += [Orundum(), Headhunting()]
|
||||
if now < datetime(2025, 2, 11):
|
||||
solver_list += [SpringFestival()]
|
||||
if now < datetime(2025, 2, 19):
|
||||
solver_list += [Task(), Shop()]
|
||||
if now < datetime(2025, 2, 24):
|
||||
solver_list += [Shop()]
|
||||
for solver in solver_list:
|
||||
solver.scheduler_stop_time = self.scheduler_stop_time
|
||||
result = result and solver.run()
|
||||
|
|
|
@ -31,6 +31,8 @@ from mower.utils.scene import Scene
|
|||
from mower.utils.solver import BaseSolver
|
||||
from mower.utils.vector import sa, va, vs
|
||||
|
||||
offset = (24, 166)
|
||||
|
||||
|
||||
class Shop(BaseSolver):
|
||||
solver_name = "活动商店购买"
|
||||
|
@ -56,10 +58,13 @@ class Shop(BaseSolver):
|
|||
for y, x in coords:
|
||||
if x > 1425:
|
||||
return None, None
|
||||
top_left = vs((x, y), (22, 170))
|
||||
top_left = vs((x, y), offset)
|
||||
scope = sa(((185, 80), (305, 150)), top_left)
|
||||
if self.find("sign_in/shop/out_of_stock", scope=scope):
|
||||
continue
|
||||
scope = sa(((140, 105), (250, 150)), top_left)
|
||||
if self.find("sign_in/shop/owned", scope=scope):
|
||||
continue
|
||||
name = sa(((5, 5), (260, 60)), top_left)
|
||||
name = cropimg(config.recog.gray, name)
|
||||
name = thres2(name, 127)
|
||||
|
|
|
@ -391,7 +391,7 @@ class Recognizer:
|
|||
self.scene = Scene.SIGN_IN_DAILY
|
||||
# elif self.find("sign_in/moon_festival/banner"):
|
||||
# self.scene = Scene.MOON_FESTIVAL
|
||||
elif self.find("activity_banner"):
|
||||
elif self.find("sign_in/shop/entry"):
|
||||
self.scene = Scene.ACTIVITY_MAIN
|
||||
elif self.find("navigation/activity/banner_normal"):
|
||||
self.scene = Scene.ACTIVITY_NORMAL_CHOOSE_LEVEL
|
||||
|
|
|
@ -2,7 +2,6 @@ color = {
|
|||
"12cadpa": (1810, 21),
|
||||
"1800": (158, 958),
|
||||
"I_know": (898, 803),
|
||||
"activity_banner": (752, 598),
|
||||
"all_in": (1393, 475),
|
||||
"can_not_use_ope": (1653, 184),
|
||||
"choose_agent/battle_confirm": ((1476, 991), (1591, 991)),
|
||||
|
@ -194,8 +193,8 @@ color = {
|
|||
"sign_in/orundum/choose": (1560, 775),
|
||||
"sign_in/orundum/complete": (1561, 776),
|
||||
"sign_in/orundum/confirm": (1561, 778),
|
||||
"sign_in/shop/banner": (847, 88),
|
||||
"sign_in/shop/entry": (300, 779),
|
||||
"sign_in/shop/banner": (732, 62),
|
||||
"sign_in/shop/entry": (48, 521),
|
||||
"sign_in/shop/insufficient": (1573, 158),
|
||||
"sign_in/shop/max": (1566, 617),
|
||||
"sign_in/shop/price_black": (1238, 279),
|
||||
|
@ -421,6 +420,7 @@ template_matching = {
|
|||
"sign_in/shop/0": (1341, 618),
|
||||
"sign_in/shop/buy": ((1250, 800), (1390, 895)),
|
||||
"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)),
|
||||
"sss/abandon": ((0, 504), (289, 564)),
|
||||
|
@ -491,4 +491,3 @@ template_matching_score = {
|
|||
"sss/drop_EC": 0.8,
|
||||
"story_skip": 0.7,
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@ Res = Literal[
|
|||
"1800",
|
||||
"I_know",
|
||||
"activity",
|
||||
"activity_banner",
|
||||
"all_in",
|
||||
"announcement_close",
|
||||
"arrange_blue_yes",
|
||||
|
@ -580,6 +579,7 @@ Res = Literal[
|
|||
"sign_in/shop/insufficient",
|
||||
"sign_in/shop/max",
|
||||
"sign_in/shop/out_of_stock",
|
||||
"sign_in/shop/owned",
|
||||
"sign_in/shop/price_black",
|
||||
"sign_in/shop/price_white",
|
||||
"sign_in/spring_festival/collect",
|
||||
|
|
Loading…
Add table
Reference in a new issue