diff --git a/tasks/combat/obtain.py b/tasks/combat/obtain.py index 2f5799fc2..b73b5f8e6 100644 --- a/tasks/combat/obtain.py +++ b/tasks/combat/obtain.py @@ -228,14 +228,17 @@ class CombatObtain(PlannerMixin): self._obtain_enter(entry, appear_button=COMBAT_PREPARE) item = self._obtain_parse() - if item.item == KEYWORDS_ITEM_CURRENCY.Trailblaze_EXP: - logger.warning('Trailblaze_EXP is in obtain list, OBTAIN_TRAILBLAZE_EXP may need to verify') + if item is not None: + if item.item == KEYWORDS_ITEM_CURRENCY.Trailblaze_EXP: + logger.warning('Trailblaze_EXP is in obtain list, OBTAIN_TRAILBLAZE_EXP may need to verify') + index += 1 + prev = item + else: + items.append(item) + index += 1 + prev = item + else: index += 1 - prev = item - elif item is not None: - items.append(item) - index += 1 - prev = item self._obtain_close(check_button=MAY_OBTAIN) logger.hr('Obtained Result') diff --git a/tasks/planner/scan.py b/tasks/planner/scan.py index 353c51904..ddda92178 100644 --- a/tasks/planner/scan.py +++ b/tasks/planner/scan.py @@ -1,5 +1,6 @@ import re +import cv2 from pponnxcr.predict_system import BoxedResult from module.base.utils import area_center, area_in_area @@ -24,6 +25,10 @@ class OcrItemName(Ocr): result = re.sub('工造机$', '工造机杼', result) result = re.sub('工造迥?轮', '工造迴轮', result) result = re.sub('月狂[療撩]?牙', '月狂獠牙', result) + # 毁灭者的未路 思绪末屑 + result = result.replace('未路', '末路') + result = result.replace('未屑', '末屑') + result = result.replace('粉未', '粉末') # Error words on blank background result = re.sub('^[國東]', '', result) result = re.sub('時$', '', result) @@ -70,10 +75,7 @@ class OcrPlannerResult(OcrWhiteLetterOnComplexBackground, OcrItemName): return super().detect_and_ocr(image, *args, **kwargs) def pre_process(self, image): - # gray = rgb2gray(image) - # from PIL import Image - # Image.fromarray(gray).show() - # image = cv2.merge([gray, gray, gray]) + image = cv2.subtract((255, 255, 255, 0), image) return image diff --git a/tasks/rogue/blessing/blessing.py b/tasks/rogue/blessing/blessing.py index 416723e31..597187ad2 100644 --- a/tasks/rogue/blessing/blessing.py +++ b/tasks/rogue/blessing/blessing.py @@ -88,6 +88,8 @@ class RogueBuffOcr(Ocr): "回馈底护": "回馈庇护", "[范茫]+白夜": "茫茫白夜", "阅下": "阈下", + '未日': '末日', + '尚末': '尚未', } elif self.lang == 'en': replace_pattern_dict = { diff --git a/tasks/rogue/entry/entry.py b/tasks/rogue/entry/entry.py index 12856df89..2e87c5e2c 100644 --- a/tasks/rogue/entry/entry.py +++ b/tasks/rogue/entry/entry.py @@ -377,6 +377,9 @@ class RogueEntry(RouteBase, RogueRewardHandler, RoguePathHandler, DungeonUI): 'Reached weekly point limit but still continue to farm materials') logger.attr( "Farming Counter", self.config.stored.SimulatedUniverseFarm.to_counter()) + if self.config.is_cloud_game and not self.config.stored.CloudRemainSeasonPass: + logger.warning('Running WeeklyFarming on cloud game without season pass may cause fee, skip') + raise RogueReachedWeeklyPointLimit else: raise RogueReachedWeeklyPointLimit else: