mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-16 06:25:24 +00:00
Fix: Trying to fix use_Q() exit (#108)
This commit is contained in:
parent
3200938cd1
commit
1d7efd424c
@ -47,6 +47,9 @@ class Route(RouteBase, Combat, CharacterTrial):
|
||||
# To achieve In_a_single_battle_inflict_3_Weakness_Break_of_different_Types
|
||||
self.use_A()
|
||||
self.wait_next_skill()
|
||||
# Just whoever user A, in case Himeko Q didn't kill it, usually to be Herta
|
||||
self.use_A()
|
||||
self.wait_next_skill()
|
||||
# Himeko Q
|
||||
# To achieve Use_an_Ultimate_to_deal_the_final_blow_1_time
|
||||
# May kill the enemy
|
||||
@ -62,10 +65,14 @@ class Route(RouteBase, Combat, CharacterTrial):
|
||||
|
||||
# Combat should end here, just incase
|
||||
logger.warning(f'Himeko trial is not going as expected')
|
||||
for _ in range(3):
|
||||
for _ in range(2):
|
||||
self.use_E()
|
||||
if not self.wait_next_skill():
|
||||
return
|
||||
for _ in range(10):
|
||||
self.use_A()
|
||||
if not self.wait_next_skill():
|
||||
return
|
||||
|
||||
def route_item_enemy(self):
|
||||
self.enter_himeko_trial()
|
||||
@ -114,11 +121,11 @@ class Route(RouteBase, Combat, CharacterTrial):
|
||||
# Goto boss
|
||||
self.clear_enemy(
|
||||
# Before the corner, turn right
|
||||
Waypoint((571.7, 371.3)).run_2x(),
|
||||
Waypoint((571.7, 371.3)).run(),
|
||||
# Go through arched door
|
||||
Waypoint((581.5, 383.3)).run_2x(),
|
||||
Waypoint((581.5, 383.3)).run(),
|
||||
# Boss
|
||||
Waypoint((613.5, 427.3)).run_2x(),
|
||||
Waypoint((613.5, 427.3)),
|
||||
)
|
||||
|
||||
def exit(self):
|
||||
|
@ -43,13 +43,13 @@ class CombatSkill(UI):
|
||||
else:
|
||||
# Skill animation on going
|
||||
if clicked:
|
||||
logger.info(f'Skill used: {button}')
|
||||
break
|
||||
# New skill icon
|
||||
if prev_image is not None:
|
||||
if not match_template(self.image_crop(button), prev_image):
|
||||
logger.info(f'Skill used: {button}')
|
||||
logger.info(f'Skill used: {button} (skill ongoing)')
|
||||
break
|
||||
# New skill icon
|
||||
if prev_image is not None:
|
||||
if not match_template(self.image_crop(button), prev_image):
|
||||
logger.info(f'Skill used: {button} (icon changed)')
|
||||
break
|
||||
|
||||
def _is_skill_active(self, button):
|
||||
flag = self.image_color_count(button, color=(220, 196, 145), threshold=221, count=50)
|
||||
@ -126,5 +126,6 @@ class CombatSkill(UI):
|
||||
return False
|
||||
|
||||
self._skill_click(button)
|
||||
self.wait_next_skill()
|
||||
self._skill_click(USE_Q_AIM)
|
||||
return True
|
||||
|
Loading…
Reference in New Issue
Block a user