From 47a07b0c522e586cce6935c06438e26cda33a710 Mon Sep 17 00:00:00 2001 From: LmeSzinc <37934724+LmeSzinc@users.noreply.github.com> Date: Sun, 11 Aug 2024 02:39:55 +0800 Subject: [PATCH] Fix: Leave OE before running --- .../base/main_page/ROGUE_LEAVE_FOR_NOW_OE.png | Bin 0 -> 7536 bytes assets/share/base/page/MAP_EXIT_OE.png | Bin 0 -> 6166 bytes tasks/base/assets/assets_base_main_page.py | 10 ++++++++++ tasks/base/assets/assets_base_page.py | 10 ++++++++++ tasks/base/ui.py | 11 ++++++++--- 5 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 assets/share/base/main_page/ROGUE_LEAVE_FOR_NOW_OE.png create mode 100644 assets/share/base/page/MAP_EXIT_OE.png diff --git a/assets/share/base/main_page/ROGUE_LEAVE_FOR_NOW_OE.png b/assets/share/base/main_page/ROGUE_LEAVE_FOR_NOW_OE.png new file mode 100644 index 0000000000000000000000000000000000000000..71c09441736d14fc7aa0444d86b7d9928d95fe94 GIT binary patch literal 7536 zcmeH~hf`C}*TyeJ1*xJE6al4(qKH%#q$moB(xikA(rXA(5^6xPBfSZsDIg{!AV`-0 z7Mh_5N`O#8M`|DtLJ9DqzxTiRx-)mq&fJ;1=lSfp&z^l@WT4A)_~c;#0C*taTgCuz zV1LT`gM)QHXo=ln*$&w~98ixw<4aR9F!nLS0;S((7nN*3HAQ0cZDIKk*x-e+2FOsrow8}GILMi6b@)ffW_0jX zrj}^-8>80iBBu^>aV<(Yz9C$mh}PIs9D|QWqt^G|?hb}50}nE^((#RXQ9BPDd=SOP zu`@*WoAN%48HwGNClNcb=ex(1N^LG4f4O4uqS{DYza_ZFIN{crwv=&!*$9OdvD6*T zBqR@jdurHdPi_l2^*2-Q91WWUkMan#|A>hmLx zvHjwm9H8`Ac5w%=QetHO>DlMU?uj?G`sK4?Zh9uzf+c9Oe#frG*l2CV54N6Gc*%TO zrz@ZQulnc~ym~%!wmj5Cxp7h?ZTq;Ch^IMRkYH7TM4({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Nb&L#oq9L$_g6Pg&32=?jD&K2fg`JGmCm5>m8{-6Tz>MPseIE7M-T z2<5zeE${mO7fcAXc8^-@G7)u34Xe}3r^ddaM%n4?YuH^|ujO6mOylPMTUW(X-~w}O zffZ?BKC~qV@01ff9_laVgw>x%lg#ld>i%MA6~?Q2b824fdY$zJ0!u&$;G*79#R{QObZZTpza9t=oqVRI45vJ#|0&6u|yx zLvK?s)9pW9?OxrpG=ruzg>;5$F3%QiZo(ph|H`YbNca__`5sFmBd$=NtZ~7%zFf(!ze@1Vk6XJ? zu^qSP_pV1q?tzNHUx5xC4SUj`D@m0ng0}tIS9LXLR5ZO7+bqPlfAn})$^CClH@78X zM$dHlH4I51<|4KNn{7(%-EKlKhsBr+HFdOwDeHP#ire(23vo_OLd_pBogY(vZy-Mg z+KUxj-8I1f68tOqR`ctkW;zOPMws*&naK`c+638cJYx__A|fayDcryw-+KGLLl2ak zGW4=sbS6M_?ka2rWL=)Wzv dk#D7e4Ty2WLbGn?;Qz3I+%~vXeDnUJ{{w%K0KfnM literal 0 HcmV?d00001 diff --git a/assets/share/base/page/MAP_EXIT_OE.png b/assets/share/base/page/MAP_EXIT_OE.png new file mode 100644 index 0000000000000000000000000000000000000000..6718bb2d2a352d1d4ef1df947732d54239ec89bf GIT binary patch literal 6166 zcmeH~=T}orxW$Lwq<4@mAkw6YAVq564FaJHNRwWI5K2IbB8VbQnsfvdfq+t!7%5Rf zdKW}`kCYfX(r>)~!Toxdv(~KVtU3ERd**k(%zk2e%YdGihZX=pZwS$a0YE`~BpswC zB^E6KBNAev34quJ0YJz4canhId@cZJjlFbqOiexE2zZbuJV4M;M@KLq5bo~f>jpsB zM1gszP5J?c#_WL`qm}mfW^K0b10XDdqV8m}En#{NoF6fB&|0yvGv`Ar+a8Y6 zLJATViZ7!*Zaz)8ooH#V@>^i4{C#9N0gpfaaomK<$DQ;e2N+|RS;W#-O1!~!SlkWO zae)*QNLyEP3@JNgj$DvwrRR$WMLPhSWXP~6#5>IslDB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87 100644 --- a/tasks/base/assets/assets_base_main_page.py +++ b/tasks/base/assets/assets_base_main_page.py @@ -23,3 +23,13 @@ ROGUE_LEAVE_FOR_NOW = ButtonWrapper( button=(729, 475, 765, 519), ), ) +ROGUE_LEAVE_FOR_NOW_OE = ButtonWrapper( + name='ROGUE_LEAVE_FOR_NOW_OE', + share=Button( + file='./assets/share/base/main_page/ROGUE_LEAVE_FOR_NOW_OE.png', + area=(730, 551, 760, 587), + search=(710, 531, 780, 607), + color=(63, 52, 40), + button=(730, 551, 760, 587), + ), +) diff --git a/tasks/base/assets/assets_base_page.py b/tasks/base/assets/assets_base_page.py index 7f8721892..5169979cc 100644 --- a/tasks/base/assets/assets_base_page.py +++ b/tasks/base/assets/assets_base_page.py @@ -297,6 +297,16 @@ MAP_EXIT = ButtonWrapper( ), ], ) +MAP_EXIT_OE = ButtonWrapper( + name='MAP_EXIT_OE', + share=Button( + file='./assets/share/base/page/MAP_EXIT_OE.png', + area=(51, 55, 68, 84), + search=(31, 35, 88, 104), + color=(141, 140, 141), + button=(51, 55, 68, 84), + ), +) MAP_GOTO_WORLD = ButtonWrapper( name='MAP_GOTO_WORLD', share=Button( diff --git a/tasks/base/ui.py b/tasks/base/ui.py index c0614c0d5..b344d5747 100644 --- a/tasks/base/ui.py +++ b/tasks/base/ui.py @@ -4,8 +4,8 @@ from module.base.timer import Timer from module.exception import GameNotRunningError, GamePageUnknownError from module.logger import logger from module.ocr.ocr import Ocr -from tasks.base.assets.assets_base_main_page import ROGUE_LEAVE_FOR_NOW -from tasks.base.assets.assets_base_page import CLOSE, MAIN_GOTO_CHARACTER, MAP_EXIT +from tasks.base.assets.assets_base_main_page import ROGUE_LEAVE_FOR_NOW, ROGUE_LEAVE_FOR_NOW_OE +from tasks.base.assets.assets_base_page import CLOSE, MAIN_GOTO_CHARACTER, MAP_EXIT, MAP_EXIT_OE from tasks.base.main_page import MainPage from tasks.base.page import Page, page_gacha, page_main from tasks.combat.assets.assets_combat_finish import COMBAT_EXIT @@ -344,7 +344,6 @@ class UI(MainPage): return appear - def is_in_map_exit(self, interval=0): self.device.stuck_record_add(MAP_EXIT) @@ -355,6 +354,9 @@ class UI(MainPage): if MAP_EXIT.match_template_luma(self.device.image): if self.image_color_count(MAP_EXIT, color=(235, 235, 235), threshold=221, count=50): appear = True + if MAP_EXIT_OE.match_template_luma(self.device.image): + if self.image_color_count(MAP_EXIT_OE, color=(235, 235, 235), threshold=221, count=50): + appear = True if appear and interval: self.interval_reset(MAP_EXIT, interval=interval) @@ -482,3 +484,6 @@ class UI(MainPage): if self.appear_then_click(ROGUE_LEAVE_FOR_NOW, interval=2): clicked = True continue + if self.appear_then_click(ROGUE_LEAVE_FOR_NOW_OE, interval=2): + clicked = True + continue