Exemple #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")
Exemple #2
0
def is_at_has_enemy_window():
    return gc.has_pic("enemy")
def is_left_0_break_count():
    if bc.has_pic("num0") == 0:
        return 1
    else:
        return 0
def click_2_union():
    return bc.click_pic_plus("unionmode", -200, 250)
def is_at_breaked_window():
    return bc.has_pic("breakwin")
def is_at_1_union_window():
    return bc.has_pic("union1")
Exemple #7
0
def click_enemy():
    return gc.click_pic("enemy")
Exemple #8
0
def click_boss():
    return gc.click_pic("boss")
Exemple #9
0
def is_at_union_break_door_window():
    return gc.has_pic("unionmode")
Exemple #10
0
def is_at_self_break_door_window():
    return gc.has_pic("selfmode")
Exemple #11
0
def is_at_enchantment_break_door_window():
    return gc.has_pic("enchantmentbreakdoor")
Exemple #12
0
def is_at_open_box_window():
    return gc.has_pic("openbox")
Exemple #13
0
def is_at_end_fight_window():
    return gc.has_pic("endfight")
Exemple #14
0
def is_at_has_box_window():
    return gc.has_pic("box")
Exemple #15
0
def is_at_has_boss_window():
    return gc.has_pic("boss")
Exemple #16
0
def has_section(section_num):
    return gc.has_pic("section%s" % section_num)
Exemple #17
0
def click_box():
    return gc.click_pic("box")
Exemple #18
0
def is_at_attack_break_window():
    res = gc.has_pic("attackbreak")
    return res
Exemple #19
0
def is_at_section_door():
    return gc.has_pic("exploreratdoor")
Exemple #20
0
def is_at_explorer_window():
    return gc.has_pic("enchantmentbreak")
Exemple #21
0
def click_pve_cost():
    return gc.click_pic("pvecost")
Exemple #22
0
def is_at_readyforfight_window():
    return gc.has_pic("readyforfight")
def is_at_3_union_window():
    return bc.has_pic("union3")
Exemple #24
0
def is_at_lose_window():
    return gc.has_pic("losewindow")
def click_1_union():
    return bc.click_pic_plus("unionmode", -200, 100)
Exemple #26
0
def click_section17():
    return gc.click_pic("section17")
def click_3_union():
    return bc.click_pic_plus("unionmode", -200, 420)
Exemple #28
0
def click_section(section_num):
    return gc.click_pic("section%s" % section_num)
Exemple #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:
Exemple #30
0
def click_win_window():
    return gc.db_click_pic("winwindow")