mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-22 08:37:42 +00:00
Fix: Character trial ended at page_main
This commit is contained in:
parent
82f5e8b6ab
commit
fa209e1cf5
@ -16,7 +16,13 @@ class Route(RouteBase, Combat, CharacterTrial):
|
|||||||
def wait_next_skill(self, expected_end=None, skip_first_screenshot=True):
|
def wait_next_skill(self, expected_end=None, skip_first_screenshot=True):
|
||||||
# Ended at START_TRIAL
|
# Ended at START_TRIAL
|
||||||
def combat_end():
|
def combat_end():
|
||||||
return self.match_template_color(START_TRIAL)
|
if self.match_template_color(START_TRIAL):
|
||||||
|
logger.info('Trial ended at START_TRIAL')
|
||||||
|
return True
|
||||||
|
if self.is_in_main():
|
||||||
|
logger.warning('Trial ended at is_in_main()')
|
||||||
|
return True
|
||||||
|
return False
|
||||||
|
|
||||||
return super().wait_next_skill(expected_end=combat_end, skip_first_screenshot=skip_first_screenshot)
|
return super().wait_next_skill(expected_end=combat_end, skip_first_screenshot=skip_first_screenshot)
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ class CombatSkill(UI):
|
|||||||
if not self.appear(IN_SKILL):
|
if not self.appear(IN_SKILL):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if not self.image_color_count(IN_SKILL, color=(255, 255, 255), threshold=221, count=50):
|
if not self.image_color_count(IN_SKILL, color=(255, 255, 255), threshold=180, count=50):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
return True
|
return True
|
||||||
@ -51,6 +51,10 @@ class CombatSkill(UI):
|
|||||||
logger.info(f'Skill used: {button} (icon changed)')
|
logger.info(f'Skill used: {button} (icon changed)')
|
||||||
break
|
break
|
||||||
|
|
||||||
|
if self.is_in_main():
|
||||||
|
logger.warning('_skill_click ended at is_in_main')
|
||||||
|
break
|
||||||
|
|
||||||
def _is_skill_active(self, button):
|
def _is_skill_active(self, button):
|
||||||
flag = self.image_color_count(button, color=(220, 196, 145), threshold=221, count=50)
|
flag = self.image_color_count(button, color=(220, 196, 145), threshold=221, count=50)
|
||||||
return flag
|
return flag
|
||||||
|
Loading…
Reference in New Issue
Block a user