mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-23 00:52:22 +00:00
Fix: 修复剧情跳过
- 增加黑屏带文字剧情的跳过 - 增加战斗开始时的剧情跳过
This commit is contained in:
parent
2c10f77e4d
commit
290e755432
BIN
assets/handler/STORY_LETTERS_ONLY.png
Normal file
BIN
assets/handler/STORY_LETTERS_ONLY.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 10 KiB |
BIN
assets/handler/STORY_LETTER_BLACK.png
Normal file
BIN
assets/handler/STORY_LETTER_BLACK.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.6 KiB |
@ -126,6 +126,9 @@ class Combat(HPBalancer, UrgentCommissionHandler, EnemySearchingHandler, Retirem
|
|||||||
if self.handle_combat_automation_confirm():
|
if self.handle_combat_automation_confirm():
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
if self.handle_story_skip():
|
||||||
|
continue
|
||||||
|
|
||||||
# End
|
# End
|
||||||
if self.is_combat_executing():
|
if self.is_combat_executing():
|
||||||
if emotion_reduce:
|
if emotion_reduce:
|
||||||
|
@ -40,6 +40,8 @@ POPUP_CANCEL = Button(area=(404, 493, 576, 550), color=(166, 169, 172), button=(
|
|||||||
POPUP_CONFIRM = Button(area=(704, 493, 876, 550), color=(94, 144, 204), button=(704, 493, 876, 550), file='./assets/handler/POPUP_CONFIRM.png')
|
POPUP_CONFIRM = Button(area=(704, 493, 876, 550), color=(94, 144, 204), button=(704, 493, 876, 550), file='./assets/handler/POPUP_CONFIRM.png')
|
||||||
STORY_CHOOCE = Button(area=(902, 344, 959, 357), color=(98, 122, 156), button=(902, 344, 959, 357), file='./assets/handler/STORY_CHOOCE.png')
|
STORY_CHOOCE = Button(area=(902, 344, 959, 357), color=(98, 122, 156), button=(902, 344, 959, 357), file='./assets/handler/STORY_CHOOCE.png')
|
||||||
STORY_CHOOCE_2 = Button(area=(903, 388, 959, 399), color=(98, 121, 156), button=(903, 388, 959, 399), file='./assets/handler/STORY_CHOOCE_2.png')
|
STORY_CHOOCE_2 = Button(area=(903, 388, 959, 399), color=(98, 121, 156), button=(903, 388, 959, 399), file='./assets/handler/STORY_CHOOCE_2.png')
|
||||||
|
STORY_LETTERS_ONLY = Button(area=(1159, 26, 1264, 52), color=(123, 128, 141), button=(1159, 26, 1264, 52), file='./assets/handler/STORY_LETTERS_ONLY.png')
|
||||||
|
STORY_LETTER_BLACK = Button(area=(1145, 585, 1280, 720), color=(16, 20, 16), button=(1145, 585, 1280, 720), file='./assets/handler/STORY_LETTER_BLACK.png')
|
||||||
STORY_SKIP = Button(area=(1216, 676, 1258, 708), color=(148, 159, 178), button=(1180, 30, 1256, 49), file='./assets/handler/STORY_SKIP.png')
|
STORY_SKIP = Button(area=(1216, 676, 1258, 708), color=(148, 159, 178), button=(1180, 30, 1256, 49), file='./assets/handler/STORY_SKIP.png')
|
||||||
STRATEGY_OPEN = Button(area=(1198, 411, 1269, 471), color=(81, 85, 101), button=(1198, 411, 1269, 471), file='./assets/handler/STRATEGY_OPEN.png')
|
STRATEGY_OPEN = Button(area=(1198, 411, 1269, 471), color=(81, 85, 101), button=(1198, 411, 1269, 471), file='./assets/handler/STRATEGY_OPEN.png')
|
||||||
STRATEGY_OPENED = Button(area=(1176, 366, 1275, 393), color=(128, 155, 218), button=(1060, 406, 1092, 485), file='./assets/handler/STRATEGY_OPENED.png')
|
STRATEGY_OPENED = Button(area=(1176, 366, 1275, 393), color=(128, 155, 218), button=(1060, 406, 1092, 485), file='./assets/handler/STRATEGY_OPENED.png')
|
||||||
|
@ -4,9 +4,11 @@ from module.handler.popup import PopupHandler
|
|||||||
|
|
||||||
class StoryHandler(PopupHandler):
|
class StoryHandler(PopupHandler):
|
||||||
def story_skip(self):
|
def story_skip(self):
|
||||||
|
if self.handle_popup_confirm():
|
||||||
|
return True
|
||||||
if self.appear_then_click(STORY_SKIP, offset=True, interval=2):
|
if self.appear_then_click(STORY_SKIP, offset=True, interval=2):
|
||||||
return True
|
return True
|
||||||
if self.handle_popup_confirm():
|
if self.appear(STORY_LETTER_BLACK) and self.appear_then_click(STORY_LETTERS_ONLY, offset=True, interval=2):
|
||||||
return True
|
return True
|
||||||
if self.appear_then_click(STORY_CHOOCE, offset=True, interval=2):
|
if self.appear_then_click(STORY_CHOOCE, offset=True, interval=2):
|
||||||
return True
|
return True
|
||||||
|
@ -47,12 +47,6 @@ class MapOperation(UrgentCommissionHandler, MysteryHandler, FleetPreparation, Re
|
|||||||
else:
|
else:
|
||||||
checked_in_map = True
|
checked_in_map = True
|
||||||
|
|
||||||
# Enter campaign
|
|
||||||
if campaign_timer.reached() and self.is_in_stage():
|
|
||||||
self.device.click(button)
|
|
||||||
campaign_timer.reset()
|
|
||||||
continue
|
|
||||||
|
|
||||||
# Map preparation
|
# Map preparation
|
||||||
if map_timer.reached() and self.appear(MAP_PREPARATION):
|
if map_timer.reached() and self.appear(MAP_PREPARATION):
|
||||||
self.device.sleep(0.3) # Wait for map information.
|
self.device.sleep(0.3) # Wait for map information.
|
||||||
@ -90,6 +84,13 @@ class MapOperation(UrgentCommissionHandler, MysteryHandler, FleetPreparation, Re
|
|||||||
|
|
||||||
# Story skip
|
# Story skip
|
||||||
if self.handle_story_skip():
|
if self.handle_story_skip():
|
||||||
|
campaign_timer.reset()
|
||||||
|
continue
|
||||||
|
|
||||||
|
# Enter campaign
|
||||||
|
if campaign_timer.reached() and self.is_in_stage():
|
||||||
|
self.device.click(button)
|
||||||
|
campaign_timer.reset()
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# End
|
# End
|
||||||
|
Loading…
Reference in New Issue
Block a user