diff --git a/gui/choose.py b/gui/choose.py index df252be..ce42ed3 100644 --- a/gui/choose.py +++ b/gui/choose.py @@ -68,7 +68,7 @@ def start(_e): int(config.debug_mode), int(config.show_map_mode), int(config.speed_mode), - 1, + unlock = True, bonus=config.bonus, gui=1, ) diff --git a/states.py b/states.py index 9863644..6bd8a86 100644 --- a/states.py +++ b/states.py @@ -27,7 +27,7 @@ from utils.mylib import get_direc_only_minimap, ban, isrun # 版本号 -version = "v5.82 Omega" +version = "v5.9 Max" class SimulatedUniverse(UniverseUtils): @@ -301,7 +301,7 @@ def normal(self): if res_up[1] == 2: self.click(self.calc_point((0.5047, 0.5491), res_up[0])) chose = 1 - elif res_down[1] == 2 and (res_up[1] != 3 or self.fate != "毁灭"): + elif res_down[1] == 2: self.click(self.calc_point((0.5042, 0.3204), res_down[0])) chose = 1 if not chose: diff --git a/utils/ocr.py b/utils/ocr.py index d2dc0df..9254e06 100644 --- a/utils/ocr.py +++ b/utils/ocr.py @@ -87,7 +87,6 @@ def split_and_find(self,key_list,img,mode=None,bless_skip=1): rcx,rcy,find=-1,-1,0 res='' text_res='' - ff=0 for c,contour in enumerate(contours): x, y, w, h = cv.boundingRect(contour) if h==binary_image.shape[0] or w<55: @@ -95,23 +94,18 @@ def split_and_find(self,key_list,img,mode=None,bless_skip=1): roi = enhance_image[y:y+h, x:x+w] cx = x + w // 2 cy = y + h // 2 + if c == 0 and len(self.text.strip()) > 1: + rcx,rcy,find = cx,cy,1 self.input(roi) res+='|'+self.text - if len(contours)>1: - if (self.sim('回归不等式') and bless_skip) or self.sim_list(['大乐透','普通八卦','愚者面具']): - ff=1 - continue - #cv.imwrite('tmp'+str(c)+'.jpg',roi) + if (self.sim('回归不等式') and bless_skip) or self.sim_list(['大乐透','普通八卦','愚者面具','机械齿轮']): + continue for i,text in enumerate(key_list): - if (self.sim(text) and prior>i) or rcx==-1: - rcx,rcy,find=cx,cy,1+(self.sim(text) and prior>i) + if self.sim(text) and prior>i: + rcx,rcy,find=cx,cy,2 text_res=text if find==2: prior=i - if ff and find==1: - find=3 - if find<2: - text_res='' print('识别结果:',res+'|',' 识别到:',text_res) return (rcx-img.shape[1]//2,rcy-img.shape[0]//2),find