diff --git a/tasks/rogue/bleesing/blessing.py b/tasks/rogue/bleesing/blessing.py index f68fa8a52..9b061fbaf 100644 --- a/tasks/rogue/bleesing/blessing.py +++ b/tasks/rogue/bleesing/blessing.py @@ -6,14 +6,14 @@ from module.base.filter import MultiLangFilter from module.base.timer import Timer from module.base.utils import get_color from module.logger import logger -from module.ocr.ocr import Ocr, OcrResultButton, DigitCounter, Digit +from module.ocr.ocr import Digit, DigitCounter, Ocr, OcrResultButton from module.ocr.utils import split_and_pair_buttons from tasks.rogue.assets.assets_rogue_blessing import * from tasks.rogue.assets.assets_rogue_ui import BLESSING_CONFIRM -from tasks.rogue.keywords import * from tasks.rogue.bleesing.preset import * from tasks.rogue.bleesing.selector import RogueSelector -from tasks.rogue.bleesing.utils import get_regex_from_keyword_name, parse_name, is_card_selected +from tasks.rogue.bleesing.utils import get_regex_from_keyword_name, is_card_selected, parse_name +from tasks.rogue.keywords import * # normal blessing filter # path name @@ -133,6 +133,7 @@ class RogueBlessingSelector(RogueSelector): if blessing_count != len(results): logger.warning(f"The OCR result does not match the blessing count. " f"Expect {blessing_count}, but recognized {len(results)} only.") + exit(1) for result in results: if result in enhanced_blessing: result.matched_keyword.enhancement = KEYWORDS_ROGUE_ENHANCEMENT.Already_Enhanced.enhancement_keyword diff --git a/tasks/rogue/bleesing/bonus.py b/tasks/rogue/bleesing/bonus.py index 85a5ddffa..57821189c 100644 --- a/tasks/rogue/bleesing/bonus.py +++ b/tasks/rogue/bleesing/bonus.py @@ -5,10 +5,10 @@ from module.logger import logger from module.ocr.ocr import OcrResultButton from tasks.rogue.assets.assets_rogue_blessing import OCR_ROGUE_BUFF from tasks.rogue.assets.assets_rogue_bonus import BONUS_BOTTOM_WHITE_BAR, BONUS_CONFIRM -from tasks.rogue.keywords import RogueBonus from tasks.rogue.bleesing.selector import RogueSelector from tasks.rogue.bleesing.ui import RogueBonusOcr from tasks.rogue.bleesing.utils import is_card_selected +from tasks.rogue.keywords import RogueBonus class RogueBonusSelector(RogueSelector): diff --git a/tasks/rogue/bleesing/curio.py b/tasks/rogue/bleesing/curio.py index 35b337a33..32a5763d6 100644 --- a/tasks/rogue/bleesing/curio.py +++ b/tasks/rogue/bleesing/curio.py @@ -7,12 +7,12 @@ from module.base.timer import Timer from module.base.utils import get_color from module.logger import logger from module.ocr.ocr import Ocr, OcrResultButton -from tasks.rogue.assets.assets_rogue_curio import * +from tasks.rogue.assets.assets_rogue_curio import CURIO_ENFORCE, OCR_ROGUE_CURIO from tasks.rogue.assets.assets_rogue_ui import BLESSING_CONFIRM -from tasks.rogue.keywords import RogueCurio from tasks.rogue.bleesing.preset import CURIO_PRESET_1 from tasks.rogue.bleesing.selector import RogueSelector from tasks.rogue.bleesing.utils import get_regex_from_keyword_name, parse_name +from tasks.rogue.keywords import RogueCurio CURIO_FILTER_ATTR = tuple() CURIO_ATTR_NAME = 'curio_name' diff --git a/tasks/rogue/bleesing/ui.py b/tasks/rogue/bleesing/ui.py index fa0299686..8ce5e2842 100644 --- a/tasks/rogue/bleesing/ui.py +++ b/tasks/rogue/bleesing/ui.py @@ -4,7 +4,7 @@ from module.base.utils import area_offset from module.ocr.ocr import Digit, Ocr, OcrResultButton from tasks.base.ui import UI from tasks.rogue.assets.assets_rogue_ui import * -from tasks.rogue.keywords import * +from tasks.rogue.keywords import RoguePath class RogueBonusOcr(Ocr): diff --git a/tasks/rogue/route/base.py b/tasks/rogue/route/base.py index a64fbbc37..150d28994 100644 --- a/tasks/rogue/route/base.py +++ b/tasks/rogue/route/base.py @@ -252,8 +252,8 @@ class RouteBase(RouteBase_, RogueExit, RogueEvent): direction = self.predict_door_by_name(self.device.image) direction_limit = 55 if direction is not None: - logger.warning(f'Unexpected direction to go: {direction}, limited in {direction_limit}') if abs(direction) > direction_limit: + logger.warning(f'Unexpected direction to go: {direction}, limited in {direction_limit}') if direction > 0: direction = direction_limit elif direction < 0: diff --git a/tasks/rogue/route/exit.py b/tasks/rogue/route/exit.py index 06d55b52e..be74d1f0e 100644 --- a/tasks/rogue/route/exit.py +++ b/tasks/rogue/route/exit.py @@ -200,6 +200,8 @@ class RogueExit(CombatInteract): logger.warning('Found multiple doors but has unique domain in it') logger.info(f'Goto next domain: {domain}') return direction + + logger.attr('DomainStrategy', self.config.RoguePath_DomainStrategy) if self.config.RoguePath_DomainStrategy == 'leave': for expect in [ KEYWORDS_MAP_PLANE.Rogue_DomainTransaction,