mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-16 06:25:24 +00:00
Fix: Handle Herta drop in rogue rewards
This commit is contained in:
parent
548d938cf0
commit
9d282b23b7
BIN
assets/cn/base/popup/GET_CHARACTER.png
Normal file
BIN
assets/cn/base/popup/GET_CHARACTER.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.9 KiB |
BIN
assets/en/base/popup/GET_CHARACTER.png
Normal file
BIN
assets/en/base/popup/GET_CHARACTER.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.7 KiB |
@ -13,6 +13,23 @@ BATTLE_PASS_NOTIFICATION = ButtonWrapper(
|
||||
button=(895, 595, 1180, 630),
|
||||
),
|
||||
)
|
||||
GET_CHARACTER = ButtonWrapper(
|
||||
name='GET_CHARACTER',
|
||||
cn=Button(
|
||||
file='./assets/cn/base/popup/GET_CHARACTER.png',
|
||||
area=(204, 322, 249, 338),
|
||||
search=(184, 302, 269, 358),
|
||||
color=(156, 155, 154),
|
||||
button=(204, 322, 249, 338),
|
||||
),
|
||||
en=Button(
|
||||
file='./assets/en/base/popup/GET_CHARACTER.png',
|
||||
area=(205, 321, 242, 339),
|
||||
search=(185, 301, 262, 359),
|
||||
color=(126, 127, 127),
|
||||
button=(205, 321, 242, 339),
|
||||
),
|
||||
)
|
||||
GET_LIGHT_CONE = ButtonWrapper(
|
||||
name='GET_LIGHT_CONE',
|
||||
cn=Button(
|
||||
|
@ -117,6 +117,23 @@ class PopupHandler(ModuleBase):
|
||||
|
||||
return False
|
||||
|
||||
def handle_get_character(self, interval=2) -> bool:
|
||||
"""
|
||||
Popup when getting a character from rogue rewards.
|
||||
|
||||
Args:
|
||||
interval:
|
||||
|
||||
Returns:
|
||||
If handled.
|
||||
"""
|
||||
if self.appear(GET_CHARACTER, interval=interval):
|
||||
logger.info(f'{GET_CHARACTER} -> {GET_REWARD}')
|
||||
self.device.click(GET_REWARD)
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
def handle_ui_close(self, appear_button: ButtonWrapper | Callable, interval=2) -> bool:
|
||||
"""
|
||||
Args:
|
||||
|
@ -255,6 +255,9 @@ class RouteBase(RouteBase_, RogueExit, RogueEvent, RogueReward):
|
||||
# First-time cleared reward
|
||||
if self.handle_reward():
|
||||
continue
|
||||
# Get Herta
|
||||
if self.handle_get_character():
|
||||
continue
|
||||
|
||||
def domain_single_exit(self, *waypoints):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user