Compare commits
No commits in common. "1b83b7077f8f238b5282325f8d1bf82ba39bc11b" and "db813c9efbefb6bb4313b11c254ce30cbbd43091" have entirely different histories.
1b83b7077f
...
db813c9efb
@ -6,8 +6,6 @@
|
|||||||
|
|
||||||
**| English | [简体中文](README.md) |**
|
**| English | [简体中文](README.md) |**
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
The script is still under active development. The following features have been implemented:
|
The script is still under active development. The following features have been implemented:
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 9.5 KiB |
|
Before Width: | Height: | Size: 215 KiB |
@ -13,16 +13,6 @@ AFFECTION_LEVEL_UP = ButtonWrapper(
|
|||||||
button=(882, 244, 1176, 476),
|
button=(882, 244, 1176, 476),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
AP_EXCEED = ButtonWrapper(
|
|
||||||
name='AP_EXCEED',
|
|
||||||
jp=Button(
|
|
||||||
file='./assets/jp/base/popup/AP_EXCEED.png',
|
|
||||||
area=(610, 124, 669, 153),
|
|
||||||
search=(590, 104, 689, 173),
|
|
||||||
color=(139, 153, 168),
|
|
||||||
button=(535, 494, 746, 565),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
DAILY_NEWS = ButtonWrapper(
|
DAILY_NEWS = ButtonWrapper(
|
||||||
name='DAILY_NEWS',
|
name='DAILY_NEWS',
|
||||||
jp=Button(
|
jp=Button(
|
||||||
@ -73,16 +63,6 @@ GET_REWARD_SKIP = ButtonWrapper(
|
|||||||
button=(1137, 34, 1243, 65),
|
button=(1137, 34, 1243, 65),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
ITEM_EXPIRED = ButtonWrapper(
|
|
||||||
name='ITEM_EXPIRED',
|
|
||||||
jp=Button(
|
|
||||||
file='./assets/jp/base/popup/ITEM_EXPIRED.png',
|
|
||||||
area=(612, 147, 668, 175),
|
|
||||||
search=(592, 127, 688, 195),
|
|
||||||
color=(131, 145, 162),
|
|
||||||
button=(537, 487, 742, 553),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
NETWORK_RECONNECT = ButtonWrapper(
|
NETWORK_RECONNECT = ButtonWrapper(
|
||||||
name='NETWORK_RECONNECT',
|
name='NETWORK_RECONNECT',
|
||||||
jp=Button(
|
jp=Button(
|
||||||
|
|||||||
@ -87,15 +87,3 @@ class PopupHandler(ModuleBase):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def handle_ap_exceed(self, interval=5) -> bool:
|
|
||||||
if self.appear_then_click(AP_EXCEED, interval=interval):
|
|
||||||
return True
|
|
||||||
|
|
||||||
return False
|
|
||||||
|
|
||||||
def handle_item_expired(self, interval=5) -> bool:
|
|
||||||
if self.appear_then_click(ITEM_EXPIRED, interval=interval):
|
|
||||||
return True
|
|
||||||
|
|
||||||
return False
|
|
||||||
|
|||||||
@ -343,10 +343,6 @@ class UI(MainPage):
|
|||||||
return True
|
return True
|
||||||
if self.handle_new_student():
|
if self.handle_new_student():
|
||||||
return True
|
return True
|
||||||
if self.handle_ap_exceed():
|
|
||||||
return True
|
|
||||||
if self.handle_item_expired():
|
|
||||||
return True
|
|
||||||
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|||||||
@ -23,13 +23,3 @@ LOGIN_LOADING = ButtonWrapper(
|
|||||||
button=(34, 682, 60, 707),
|
button=(34, 682, 60, 707),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
UPDATE = ButtonWrapper(
|
|
||||||
name='UPDATE',
|
|
||||||
jp=Button(
|
|
||||||
file='./assets/jp/login/UPDATE.png',
|
|
||||||
area=(526, 87, 756, 117),
|
|
||||||
search=(506, 67, 776, 137),
|
|
||||||
color=(183, 192, 201),
|
|
||||||
button=(666, 527, 872, 595),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
|
|||||||
@ -3,7 +3,8 @@ from module.exception import GameNotRunningError
|
|||||||
from module.logger import logger
|
from module.logger import logger
|
||||||
from tasks.base.page import page_main
|
from tasks.base.page import page_main
|
||||||
from tasks.base.ui import UI
|
from tasks.base.ui import UI
|
||||||
from tasks.login.assets.assets_login import LOGIN_CONFIRM, LOGIN_LOADING, UPDATE
|
# from tasks.login.assets.assets_login import LOGIN_CONFIRM, USER_AGREEMENT_ACCEPT, LOGIN_LOADING
|
||||||
|
from tasks.login.assets.assets_login import LOGIN_CONFIRM, LOGIN_LOADING
|
||||||
|
|
||||||
|
|
||||||
class Login(UI):
|
class Login(UI):
|
||||||
@ -76,8 +77,6 @@ class Login(UI):
|
|||||||
# continue
|
# continue
|
||||||
# if self.handle_popup_confirm():
|
# if self.handle_popup_confirm():
|
||||||
# continue
|
# continue
|
||||||
if self.appear_then_click(UPDATE):
|
|
||||||
continue
|
|
||||||
if self.ui_additional():
|
if self.ui_additional():
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|||||||
@ -116,8 +116,8 @@ class TacticalChallenge(UI):
|
|||||||
if self.appear_then_click(CHALLENGE_LOSE):
|
if self.appear_then_click(CHALLENGE_LOSE):
|
||||||
return TCStatus.LOSE
|
return TCStatus.LOSE
|
||||||
case TCStatus.WIN | TCStatus.LOSE:
|
case TCStatus.WIN | TCStatus.LOSE:
|
||||||
if self.appear_then_click(CHALLENGE_WIN) or self.appear_then_click(CHALLENGE_LOSE):
|
if self.appear(CHALLENGE_WIN) or self.appear(CHALLENGE_LOSE):
|
||||||
return status
|
return TCStatus.RESULT
|
||||||
is_valid, ticket = self._get_ticket()
|
is_valid, ticket = self._get_ticket()
|
||||||
if not is_valid:
|
if not is_valid:
|
||||||
return status
|
return status
|
||||||
|
|||||||