Nihlatak test (#312)

* nihlatak eye at a robustness?

* revert stuff
This commit is contained in:
aeon0
2021-12-21 19:23:45 +01:00
committed by GitHub
parent 616e6b25b9
commit 44d9cb40f2
2 changed files with 8 additions and 5 deletions
+6 -4
View File
@@ -150,12 +150,14 @@ class IChar:
wait(0.3, 0.35)
keyboard.send(self._char_config["battle_command"])
wait(0.1, 0.19)
mouse.click(button="right")
wait(self._cast_duration + 0.16, self._cast_duration + 0.18)
for _ in range(2):
mouse.click(button="right")
wait(self._cast_duration + 0.16, self._cast_duration + 0.18)
keyboard.send(self._char_config["battle_orders"])
wait(0.1, 0.19)
mouse.click(button="right")
wait(self._cast_duration + 0.16, self._cast_duration + 0.18)
for _ in range(2):
mouse.click(button="right")
wait(self._cast_duration + 0.16, self._cast_duration + 0.18)
keyboard.send(self._char_config["weapon_switch"])
wait(0.3, 0.35)
# Make sure that we are back at the previous skill
+2 -1
View File
@@ -59,6 +59,7 @@ class Nihlatak:
# Wait until templates in lvl 2 entrance are found
if not self._template_finder.search_and_wait(["NI2_SEARCH_0", "NI2_SEARCH_1", "NI2_SEARCH_2"], threshold=0.8, time_out=20).valid:
return False
wait(1.0) # wait to make sure the red writing is gone once we check for the eye
@dataclass
class EyeCheckData:
template_name: list[str]
@@ -79,7 +80,7 @@ class Nihlatak:
# Move to spot where eye would be visible
self._pather.traverse_nodes_fixed(data.circle_static_path_key, self._char)
# Search for eye
template_match = self._template_finder.search_and_wait(data.template_name, threshold=0.72, best_match=True, time_out=3)
template_match = self._template_finder.search_and_wait(data.template_name, threshold=0.7, best_match=True, time_out=3)
# If it is found, move down that hallway
if template_match.valid and template_match.name.endswith("_SAFE_DIST"):
self._pather.traverse_nodes_fixed(data.destination_static_path_key, self._char)