Пример #1
0
def click_goto_fb(team_mode):
    if team_mode == 1:
        print("click zudui")
        return gc.click_pic("teamatdoor")
    else:
        print("click tansuo")
        return gc.click_pic("exploreratdoor")
Пример #2
0
def is_at_has_enemy_window():
    return gc.has_pic("enemy")
Пример #3
0
def is_left_0_break_count():
    if bc.has_pic("num0") == 0:
        return 1
    else:
        return 0
Пример #4
0
def click_2_union():
    return bc.click_pic_plus("unionmode", -200, 250)
Пример #5
0
def is_at_breaked_window():
    return bc.has_pic("breakwin")
Пример #6
0
def is_at_1_union_window():
    return bc.has_pic("union1")
Пример #7
0
def click_enemy():
    return gc.click_pic("enemy")
Пример #8
0
def click_boss():
    return gc.click_pic("boss")
Пример #9
0
def is_at_union_break_door_window():
    return gc.has_pic("unionmode")
Пример #10
0
def is_at_self_break_door_window():
    return gc.has_pic("selfmode")
Пример #11
0
def is_at_enchantment_break_door_window():
    return gc.has_pic("enchantmentbreakdoor")
Пример #12
0
def is_at_open_box_window():
    return gc.has_pic("openbox")
Пример #13
0
def is_at_end_fight_window():
    return gc.has_pic("endfight")
Пример #14
0
def is_at_has_box_window():
    return gc.has_pic("box")
Пример #15
0
def is_at_has_boss_window():
    return gc.has_pic("boss")
Пример #16
0
def has_section(section_num):
    return gc.has_pic("section%s" % section_num)
Пример #17
0
def click_box():
    return gc.click_pic("box")
Пример #18
0
def is_at_attack_break_window():
    res = gc.has_pic("attackbreak")
    return res
Пример #19
0
def is_at_section_door():
    return gc.has_pic("exploreratdoor")
Пример #20
0
def is_at_explorer_window():
    return gc.has_pic("enchantmentbreak")
Пример #21
0
def click_pve_cost():
    return gc.click_pic("pvecost")
Пример #22
0
def is_at_readyforfight_window():
    return gc.has_pic("readyforfight")
Пример #23
0
def is_at_3_union_window():
    return bc.has_pic("union3")
Пример #24
0
def is_at_lose_window():
    return gc.has_pic("losewindow")
Пример #25
0
def click_1_union():
    return bc.click_pic_plus("unionmode", -200, 100)
Пример #26
0
def click_section17():
    return gc.click_pic("section17")
Пример #27
0
def click_3_union():
    return bc.click_pic_plus("unionmode", -200, 420)
Пример #28
0
def click_section(section_num):
    return gc.click_pic("section%s" % section_num)
Пример #29
0
import os
import cv2
from matplotlib import pyplot as plt
from Biz import BaseControl

BaseControl.save_screentshot()
project_dir = os.path.dirname(os.getcwd()) + "\\Resource"
img = cv2.imread(project_dir + "\\1.png", 0)

img2 = img.copy()
template = cv2.imread(project_dir + "\\attackbreak.png", 0)
w, h = template.shape[::-1]

# 6 中匹配效果对比算法
methods = ['cv2.TM_CCOEFF_NORMED']
#methods = [ 'cv2.TM_CCOEFF_NORMED', 'cv2.TM_CCORR_NORMED', 'cv2.TM_SQDIFF_NORMED']
# methods = ['cv2.TM_CCOEFF', 'cv2.TM_CCOEFF_NORMED', 'cv2.TM_CCORR', 'cv2.TM_CCORR_NORMED', 'cv2.TM_SQDIFF', 'cv2.TM_SQDIFF_NORMED']

for meth in methods:
    img = img2.copy()

    method = eval(meth)

    res = cv2.matchTemplate(img, template, method)

    min_val, max_val, min_loc, max_loc = cv2.minMaxLoc(res)

    if method in [cv2.TM_SQDIFF, cv2.TM_SQDIFF_NORMED]:
        top_left = min_loc
        print(1 - min_val)
    else:
Пример #30
0
def click_win_window():
    return gc.db_click_pic("winwindow")