From 576276e2dac917b76a849e28a68be5c2f23981f2 Mon Sep 17 00:00:00 2001 From: LmeSzinc <37934724+LmeSzinc@users.noreply.github.com> Date: Mon, 15 Jan 2024 03:15:38 +0800 Subject: [PATCH] Fix: Combat auto on cloud game --- assets/share/combat/state/COMBAT_PAUSE.png | Bin 6449 -> 5906 bytes tasks/combat/assets/assets_combat_state.py | 8 ++++---- tasks/combat/state.py | 5 +++++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/assets/share/combat/state/COMBAT_PAUSE.png b/assets/share/combat/state/COMBAT_PAUSE.png index 6d3050731c83485e69d24bed20072810470e90bb..2abaeb2e88e5afe82b21c6e9ce83685427c958a9 100644 GIT binary patch delta 538 zcmV+#0_FX&GLkN^y$U%DKS@MERCwC#-NA|^We|nY8__Q-GNLHzLkx<-D5B5me_dqu z*fXo?P0@>UHd&CBP*klxA~PxhlVJ~^fB0hKD*ylh;LCmU{ZBKKCX;i{>GYgGe}8|S z{rcM<+cUGLr)OuH_OB1WTxY*}_d|EmrgI%K^Y@2eAM?rAj|Tt%z-u~k(=?MN$xd^< zy0v-g)wY|qv;R+Co0&Gv&K1G)$)y4q004luW7^~n*_myV*_Zu$#qI8D}j54X*1pD(^9!U7lo0Dw0cz>}Vy z)3j}8rtN2iyt#+KZT6G-@Rh{(5cuWY(GOq=761SMukh}>pPMt;<|NacUQOK2T#dQy z>1=w^ot)>JrO)o3b2>Xc?PgAUfByO7x5s>P6JP)U0A8Uz{n)*^Hd-ag?&f}`w|(A} z_58H&Ce3bppK3F6(#||CO9e0h006HE;Oty$peJqag56Cf*-6{8)3&qQv{wta*Av4} zbFGF>)BC@W1TX*q0B_Jv(z&|#uHR;pwv$}vn$ww=3$w2I@b1$!I&PEpF#aoG0So{D zz#G&%fe^8Ql9LFDW&R?^pUNy~4Z)14vHg({9jz}>p8_gfLrnT%$*9hbcIKx0heavfm zo~DCTe^}{L3hyx2h`230m~vaMSsw`#Yc( z-oqH~t-E*b9fwh2WN4lE*;XI`0I!#7JqF@Bw z0AOgZF7EdkXF;e)JSw#a#B>6V^lE;Vp0|?U?1CCBLX79Phh)?{08n>5aPCySF;#w> zmp4JfTBJALa=4`vHvs>tMyLx3Ur1X5wEmuyIh|Nj0M0^xfWE1(&Q8HaHXC zS7#kI-8|+_teohwMs-m4aq3V2u-?LWQS;$*t2XTV*`$FFex?+=YfZwm!yT|P^6Rh^ zA64wGAWnuNRM`TcF&2ZJEzK` zPndHK*4jxAI9G6G!F#sZbvb=zCA=ED*#mlBVg{Uzn&E4{x2^_*+^2{>awPOXasz|Ff z&gIS2qy1_0$8rgR_BY&Dt83wMgbBJP#CDs3FoaXpJn=+y1(x`b25(XOCgBpfMoF5m zhs%|S$d;5vHpVQcG1;6kV5) zmex%(5T4vofBuNGciFKvQt+q6mi3}L_#mNuV|3()AYY@s4p8m+mW440$b22rWZ-5M z(s>6EQAL7f^5Yt|OQ4&!(mr*xyVaVlgB9n`b^a*%GQ2YcemiW}d+QZm->=~H1^|bm8u)l&YLVy4O diff --git a/tasks/combat/assets/assets_combat_state.py b/tasks/combat/assets/assets_combat_state.py index 4103c6487..a21444b19 100644 --- a/tasks/combat/assets/assets_combat_state.py +++ b/tasks/combat/assets/assets_combat_state.py @@ -17,10 +17,10 @@ COMBAT_PAUSE = ButtonWrapper( name='COMBAT_PAUSE', share=Button( file='./assets/share/combat/state/COMBAT_PAUSE.png', - area=(1218, 27, 1245, 53), - search=(1198, 7, 1265, 73), - color=(125, 129, 134), - button=(1218, 27, 1245, 53), + area=(1218, 43, 1245, 53), + search=(1198, 23, 1265, 73), + color=(121, 126, 131), + button=(1218, 43, 1245, 53), ), ) COMBAT_SPEED_2X = ButtonWrapper( diff --git a/tasks/combat/state.py b/tasks/combat/state.py index 9c21b3251..ed11c418f 100644 --- a/tasks/combat/state.py +++ b/tasks/combat/state.py @@ -54,6 +54,7 @@ class CombatState(UI): def combat_state_reset(self): self._combat_auto_checked = False self._combat_2x_checked = False + self._combat_click_interval.clear() def handle_combat_state(self, auto=True, speed_2x=True): """ @@ -65,6 +66,10 @@ class CombatState(UI): if self._combat_auto_checked and self._combat_2x_checked: return False if not self.is_combat_executing(): + if not self._combat_auto_checked and auto: + if self._combat_click_interval.started() and not self._combat_click_interval.reached(): + logger.info('Combat on going, _combat_auto_checked') + self._combat_auto_checked = True return False if not self._combat_2x_checked: