Skip to content
This repository has been archived by the owner on Sep 3, 2020. It is now read-only.

Commit

Permalink
fixed critical bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Meowcolm024 committed Oct 27, 2018
1 parent a10c6d5 commit 0e48ee9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
7 changes: 3 additions & 4 deletions cards/Combat.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import time
from extra.find_servant import get_servant
from extra.matching import matching
from config import script_mode
Expand All @@ -19,13 +20,11 @@ def __init__(self):
self.card_crd = self.get_np()

def get_np(self):
time.sleep(0.7)
if not self.turns:
return self.get_arrangement()
a = self.turns[0]
if len(self.turns) == 3:
b = self.turns[2]
else:
b = self.turns[1]
b = self.turns[len(self.turns)-1]
npcrd = []
if float(a) / float(b) == 1:
nps = match_np()
Expand Down
5 changes: 2 additions & 3 deletions phantasms/detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ def match_servants():
templ = f"./temp/servant{servant}.png"
for i in range(3):
img = f"./temp/np{i}.png"
if check(img, templ, 0.7) == 1:
nobles[i].ready = 1
if check(img, templ, 0.75) == 1:
x = orgx + i * length
y = exacty
nobles[i].crd = [x, y]
Expand Down Expand Up @@ -66,6 +65,6 @@ def match_np():
match_servants()

for i in range(len(nobles)):
print(nobles[i].crd)
print("npcrd: ", nobles[i].crd)

return nobles
4 changes: 2 additions & 2 deletions util/anti.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ def long_tap(x, y): # random length tap


def tap_card(x, y): # tap on random location of the card
x0 = x + random.uniform(0, 100)
y0 = y + random.uniform(-150, 0)
x0 = x + random.uniform(0, 75)
y0 = y + random.uniform(-90, 0)
x0 = int(x0)
y0 = int(y0)
tap(x0, y0)
Expand Down

0 comments on commit 0e48ee9

Please sign in to comment.