mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-16 06:25:24 +00:00
commit
7e8ff48f6c
@ -228,14 +228,17 @@ class CombatObtain(PlannerMixin):
|
|||||||
|
|
||||||
self._obtain_enter(entry, appear_button=COMBAT_PREPARE)
|
self._obtain_enter(entry, appear_button=COMBAT_PREPARE)
|
||||||
item = self._obtain_parse()
|
item = self._obtain_parse()
|
||||||
if item.item == KEYWORDS_ITEM_CURRENCY.Trailblaze_EXP:
|
if item is not None:
|
||||||
logger.warning('Trailblaze_EXP is in obtain list, OBTAIN_TRAILBLAZE_EXP may need to verify')
|
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
|
index += 1
|
||||||
prev = item
|
|
||||||
elif item is not None:
|
|
||||||
items.append(item)
|
|
||||||
index += 1
|
|
||||||
prev = item
|
|
||||||
self._obtain_close(check_button=MAY_OBTAIN)
|
self._obtain_close(check_button=MAY_OBTAIN)
|
||||||
|
|
||||||
logger.hr('Obtained Result')
|
logger.hr('Obtained Result')
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import re
|
import re
|
||||||
|
|
||||||
|
import cv2
|
||||||
from pponnxcr.predict_system import BoxedResult
|
from pponnxcr.predict_system import BoxedResult
|
||||||
|
|
||||||
from module.base.utils import area_center, area_in_area
|
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 = 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
|
# Error words on blank background
|
||||||
result = re.sub('^[國東]', '', result)
|
result = re.sub('^[國東]', '', result)
|
||||||
result = re.sub('時$', '', result)
|
result = re.sub('時$', '', result)
|
||||||
@ -70,10 +75,7 @@ class OcrPlannerResult(OcrWhiteLetterOnComplexBackground, OcrItemName):
|
|||||||
return super().detect_and_ocr(image, *args, **kwargs)
|
return super().detect_and_ocr(image, *args, **kwargs)
|
||||||
|
|
||||||
def pre_process(self, image):
|
def pre_process(self, image):
|
||||||
# gray = rgb2gray(image)
|
image = cv2.subtract((255, 255, 255, 0), image)
|
||||||
# from PIL import Image
|
|
||||||
# Image.fromarray(gray).show()
|
|
||||||
# image = cv2.merge([gray, gray, gray])
|
|
||||||
return image
|
return image
|
||||||
|
|
||||||
|
|
||||||
|
@ -88,6 +88,8 @@ class RogueBuffOcr(Ocr):
|
|||||||
"回馈底护": "回馈庇护",
|
"回馈底护": "回馈庇护",
|
||||||
"[范茫]+白夜": "茫茫白夜",
|
"[范茫]+白夜": "茫茫白夜",
|
||||||
"阅下": "阈下",
|
"阅下": "阈下",
|
||||||
|
'未日': '末日',
|
||||||
|
'尚末': '尚未',
|
||||||
}
|
}
|
||||||
elif self.lang == 'en':
|
elif self.lang == 'en':
|
||||||
replace_pattern_dict = {
|
replace_pattern_dict = {
|
||||||
|
@ -377,6 +377,9 @@ class RogueEntry(RouteBase, RogueRewardHandler, RoguePathHandler, DungeonUI):
|
|||||||
'Reached weekly point limit but still continue to farm materials')
|
'Reached weekly point limit but still continue to farm materials')
|
||||||
logger.attr(
|
logger.attr(
|
||||||
"Farming Counter", self.config.stored.SimulatedUniverseFarm.to_counter())
|
"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:
|
else:
|
||||||
raise RogueReachedWeeklyPointLimit
|
raise RogueReachedWeeklyPointLimit
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user