Upd: remove 'the' in RoguePath keywords

This commit is contained in:
Hengyu 2023-08-20 22:43:07 +08:00
parent 39f161af10
commit 961e225bb1
2 changed files with 4 additions and 2 deletions

View File

@ -22,6 +22,8 @@ BLESSING_FILTER_ATTR = tuple()
PATH_ATTR_NAME = 'path_name' PATH_ATTR_NAME = 'path_name'
path_regex = get_regex_from_keyword_name(RoguePath, PATH_ATTR_NAME) path_regex = get_regex_from_keyword_name(RoguePath, PATH_ATTR_NAME)
pattern += path_regex pattern += path_regex
# remove 'the' in path 'the hunt'
pattern = pattern.lower().replace('the', '')
BLESSING_FILTER_ATTR += (PATH_ATTR_NAME,) BLESSING_FILTER_ATTR += (PATH_ATTR_NAME,)
# rarity # rarity
@ -111,7 +113,7 @@ class RogueBlessingSelector(RogueSelector):
return keyword != KEYWORDS_ROGUE_ENHANCEMENT.Already_Enhanced return keyword != KEYWORDS_ROGUE_ENHANCEMENT.Already_Enhanced
self.ocr_results = [] self.ocr_results = []
# self._wait_until_blessing_loaded() self._wait_until_blessing_loaded()
ocr = RogueBuffOcr(OCR_ROGUE_BUFF) ocr = RogueBuffOcr(OCR_ROGUE_BUFF)
results = ocr.matched_ocr(self.main.device.image, results = ocr.matched_ocr(self.main.device.image,
[RogueBlessing, RogueResonance, RogueEnhancement]) [RogueBlessing, RogueResonance, RogueEnhancement])

View File

@ -29,7 +29,7 @@ class RoguePath(Keyword):
@property @property
def path_name(self): def path_name(self):
return [self.__getattribute__(f"{server}_parsed") return [self.__getattribute__(f"{server}_parsed").replace("the", '')
for server in UI_LANGUAGES if hasattr(self, f"{server}_parsed")] for server in UI_LANGUAGES if hasattr(self, f"{server}_parsed")]