From 0e95c16f5b353e3bb41bd436b8da60aaec5daa67 Mon Sep 17 00:00:00 2001 From: Wang Xiang Date: Thu, 23 Jun 2022 17:51:40 +0800 Subject: [PATCH] Update diablo.py _sealdance() I watched 10 hours of diablo run by 4 fohdins. About 30% were fail games which aborted in middle run, especially on detecting that if the seal is openned. In almost every fail game caused by this reason, the seal was openned successfully, but the decisions were closed for 5 times and the game was aborted. By increasing the numbers of try and reduce the seal_opentemplates threshold to 0.7, the incorrect judgements on seal's open status seldom occur, and the ratio of failed games typically reduced. Now it is about 12% mostly caused by temporary high latency or getting lost after teleport to pick item. --- src/run/diablo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/run/diablo.py b/src/run/diablo.py index 2c40635a7..d5aa8053f 100644 --- a/src/run/diablo.py +++ b/src/run/diablo.py @@ -113,11 +113,11 @@ def _cs_town_visit(self, location:str) -> bool: # OPEN SEALS def _sealdance(self, seal_opentemplates: list[str], seal_closedtemplates: list[str], seal_layout: str, seal_node: str) -> bool: i = 0 - while i < 4: + while i < 8: Logger.debug(seal_layout + ": trying to open (try #" + str(i+1)+")") self._char.select_by_template(seal_closedtemplates, threshold=0.5, timeout=0.1, telekinesis=True) wait(i*0.5) - found = template_finder.search_and_wait(seal_opentemplates, threshold=0.75, timeout=0.1).valid + found = template_finder.search_and_wait(seal_opentemplates, threshold=0.7, timeout=0.1).valid if found: Logger.info(seal_layout +": is open - "+'\033[92m'+" open"+'\033[0m') break