From 94dca8b9cef1671742c90823e9f6d687dbe9bac4 Mon Sep 17 00:00:00 2001 From: LmeSzinc <37934724+LmeSzinc@users.noreply.github.com> Date: Sat, 24 Feb 2024 17:26:22 +0800 Subject: [PATCH] Refactor: Select next support character --- .../combat/support/SUPPORT_SELECTED.2.png | Bin 0 -> 5828 bytes .../combat/support/SUPPORT_SELECTED.3.png | Bin 0 -> 5861 bytes .../combat/support/SUPPORT_SELECTED.4.png | Bin 0 -> 5999 bytes .../support/SUPPORT_SELECTED.SEARCH.png | Bin 0 -> 11754 bytes .../share/combat/support/SUPPORT_SELECTED.png | Bin 0 -> 5833 bytes tasks/combat/assets/assets_combat_support.py | 33 +++++++ tasks/combat/support.py | 92 +++++------------- 7 files changed, 60 insertions(+), 65 deletions(-) create mode 100644 assets/share/combat/support/SUPPORT_SELECTED.2.png create mode 100644 assets/share/combat/support/SUPPORT_SELECTED.3.png create mode 100644 assets/share/combat/support/SUPPORT_SELECTED.4.png create mode 100644 assets/share/combat/support/SUPPORT_SELECTED.SEARCH.png create mode 100644 assets/share/combat/support/SUPPORT_SELECTED.png diff --git a/assets/share/combat/support/SUPPORT_SELECTED.2.png b/assets/share/combat/support/SUPPORT_SELECTED.2.png new file mode 100644 index 0000000000000000000000000000000000000000..1b74ed76d0968aaa6b63dbc4759cc7afd61f640f GIT binary patch literal 5828 zcmeI0`8O2c_s1Vw3|X>`eT^0*qGiew$*92?yT}%@%RaIu5!tuKGTF+~kfcl)l-*b& zWX*1pW$d!{oj&LLAAElM9QT~(+~?eT&wZZfb)FyYc|S+$XfiYMF#-UXwcxi<0MJpk z)ZZAWDNa@R4i&{gJm98Y05EaWc7K;m4o=^78WjkNsLw7U`fH-NPDsid`~sKF!MdE!?Gx@G`YY0&<`-sLI>RPWpYHSid?aGJe!>Th^8 zQqmZRB!WpXb`ld+0t&QUFlgfhZ9Je{|HA`DkOF`UI#5jvlrV#(O)X_QFjSm81_eWT z0>um9z z=s7lf$gEgadZsuBoJ51@J_!KdZts_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BYl35^;*rSxc z-y^5`G&?m1#BYno#%Bu)^E2}i)*o~yPZd@aa`bcr8~sHudc7r098T}w?J+qRT4mae z>8US67jJly-xj}vwTib2*LI_o*4`YHc8>;;@#N}>R)R3*?1AbLa-(<8wzcq^?v64k z@aRBx=jq12MBl4Rlxb7M7LL*eAV30u&~N~D|5E${06rH1_-zFM>?HtD_aw{a+mvZ^ zP3zW81OJhwaTTXgD}fV}2WvL4%0T>=j^8ZNOd1Nd@_Q_zS5DPEeK*NO8wiPC`Sx1o zP5*017^Bk}rx`Vu5W$n=c72^!(|f++72Hu2uh@g1Xx5*YbBA;dYo^! z%p@tHelOr)dYLcQ=0$y4eJfezKW`IUG7bTjmX>E)TP@vV$T2ltl30S)zzF~v^cBws zPe`^n^jOyJZ_YjX*vCz2a%{&0{u=_SgagX={`;2(q~v11ho|Wc{OhKrp>wND&Fabj E0fB1~c>n+a literal 0 HcmV?d00001 diff --git a/assets/share/combat/support/SUPPORT_SELECTED.3.png b/assets/share/combat/support/SUPPORT_SELECTED.3.png new file mode 100644 index 0000000000000000000000000000000000000000..716dedc85df603dfe1c43666f03d0f87d3d38bc8 GIT binary patch literal 5861 zcmeI0`9Boi_s6d-gDlyXWQ!J3L}|)22t(E>W8cdE`%n1(`gIi*;+y~gZUe*>BmiuT zE%P@BGsD5944D{?!yjQC2mqJBzr_Tyb43B*H1^cdF*Eb%}~)Xl=VARedeeJHV~X-h2w=gfv7BP zr4Asi!3=bc2z0VY8?h9e>1`S>bM%iTAeaD=l-`+nwfC$bA^n?p$lA*Iq|D?e^lNQr zkrRAw9MiJ7nK^O-h&dLcu7d!G(|SJcXBOReY&)a(ivD zcj!qcdM4Fg+bIb>T(x>YFq1WI!@ftRT#@;bKFL3SM|D*ygU*o}!VU2EO^GJ&*x!=S z#K>hP<^&$A-e3TaTtD?loGS(JxvQySsQ{!l(URecOrSHfWD0=#U!ry|(nO3}Apl${ zxO?)I7W=`Ef_NfN?nlXbq6o9|fh+KXM~RpCv=2;29p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tnr6gLhcLqmUIpzBO_6@4g6%Ra^!2ku4g@8{*=X`NbiIx{djn%C|0Uu-sQ z(%!+Lv9VE^w6?KPiFzMKk0k0vMl-U&zs`0`2YnbVb;ps(t_$=((K7oA# j|4#_Ov-cQE|NdnGv$G}B#nCp3|AZUpnp~;Uc8dNV$JHRn literal 0 HcmV?d00001 diff --git a/assets/share/combat/support/SUPPORT_SELECTED.4.png b/assets/share/combat/support/SUPPORT_SELECTED.4.png new file mode 100644 index 0000000000000000000000000000000000000000..c46abcc9d769920b670c5b9f84a5ac53b9c5d2a6 GIT binary patch literal 5999 zcmeI0`8O2)_s3th>`S(>uhF8iL<`xIA;QR3*|Ux@$~v}25+#gmS;k(-Af-$)NVXbA z$dV9dJP5u!{L?o z2NUg~(-JqNIdsfEP#a$WSb6>(8jz7C004`zhpw)vsXNjS>FbX4kucEJmGF6hboKCZ z0U&4)YaVEww8gJ6y5+)YsWY%#ndTJ%q@;07ZCp0_TrYs*V=iv3=BOAJOJ2U?Sx}3n zN4+diY|KRNDZHEZvzXhl7I!Z%i4PZj2n(hxF7EX2)RMEvyChU6C;B+IY~oD5C%6KO zx~e)Lo?rrP`bI$0@b^F)3~`D-8w)+Roo<;{|O3;H~-ldn_Os054Rijud#q4i?r8G#J1@NzyO`4CITH zFo8H4kbX-41g+L*;9wB}J4@Tp2y$^+Qs?O#%4yIxAC>fJ(F6t%5O0m))N%mmbe*&9 zK;kkj&=uq9pp!77%T?&EA1kr6e40&d1e8!dRMOkmo--jB#e9u;_pW;oWj9XEkV2RfxzokrY&puRI5l`J?P6}iPxF;qJH$O6dAbK@~ zFVWD(a#(i<0Il$~bI*lX69Jc-vJz?wfTVhAf|eW&=twJ^1fcehz}@0xh*1j@0M~LO z&b-xTWc$L4Yv9QGB3j!3p>;fVO^fYB!&NSwV^e4mmOOz}ZNXa&ssr>N-qH!>9?ux( zs`{dMnVmeweK%s>2Xf3oAiGhZ_6ak+b{i9qqoiugai{nJDH0PTJ)U055vu$GT_`ad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YsQw>`hMd&f8GCe?n-i2 za#jJ1-6OS1u3w@0RJDn#oLmz76lwI@TN#cwW&KR&y`N zW4Sww=uUi>x@S6J4YOGFL=CUT!y>z1z0#F?WTl)^lKhS6UA}(%lQW-V$~_B;XIk$a z%ZFzmDfT!YTygo|x7YDA6IM6vdqX!+h{3_%hSlE}=b`h3^WL~EoB9evf~R)xk0;CQ zWx^|Q)57)$!{2^+!JZrO9aSCQJLps#RTl5Gf5Z)~=3Ok<48}gRC0g#4l~&jNk{#@; z9|;Uu*%I7zJF_(*eoIEx_FLc9ev=bymur32rM8@gWU6nJ zsh6wkhx_b}Lo4ne=Uujli&j_5{nm}=)w(D>54SxVdVTx<_Mf-SK@lh|3&PdjvLhmR znVOBi0h^1EK$az=VcXz@po-nP!M!=gZO*xeRr{4L4T!P74h;^SUu`%k9L&+#`^g7A z(c|6v?fSja*QMhUu;Svv>_UXqd!(fCqIX3+o!`SP4^Z>IrR34QiJcpr*1H4Ctkl@f z`f^ms+5<{yNrh^wbgOtR38lXBdbf-;6h^^QYDQZL;_0V$wf0Tdy0)ELi+-4FX^=zr zcjdPpukFZm=Uh0PHYJ>)Fk=9MWdJ}&0zf@D^s@l?D*!O(0D$UC03gU0_RZG;V9PSN zrhO}DaACv*$?Gq2YzVF-o#@z_Va^r2l( z#=>lO?X>&PmPkhDpW7$9S_DFFd$BVrHzn(+za4pL7_~%N;$XB#e=)y64Ym7nsna)@ zqdq<2-za=!M+A-t91%Doa6|xofEgmSe#kgTCaU%IUlNLInVTCqVbC4E6z5w}%6{0k zT2n?zts6TdR4Ov5Fl=EU@oO~vRX54WBbs!GuWb;J$ZKVma8J*{kDM2Gnt~Xbtes#6IaKD}U!baYf$$<<3+ z24w;6E-wC#}Ma6kvBV-;Vx!9>Hq=LUK=ua)aK GJo-P*A9z&& literal 0 HcmV?d00001 diff --git a/assets/share/combat/support/SUPPORT_SELECTED.SEARCH.png b/assets/share/combat/support/SUPPORT_SELECTED.SEARCH.png new file mode 100644 index 0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7ON(>CUAew)P|16K_8_j>en)<-XB^nUh6c zE&hut*%^tJTnm4zP=S3luoVF-Tdc$<(e6|K!|KPWT^v&f9usX#K0>0oEy0)?L3$QT z)9>h(|Ic7U@pSqwT_j7MXoFH#1nAbHgBevZcM<22r09k%6J!r%EWgMQOus^TOpoII zAo=43MDJp{;8?HBX26*`)tJcti#{B=W+dxUJuFoZi^F!>54k%=^532rL9Wpt1T~Scf9v8YUhn5G|#X>4i;Q*8`VZ zI8THm_(uBCPM(8!cr-#(;Ts%+?QOcOMguZyC=OCsknMSpz8GBP#?cr3pkFu9+kQYl z)+KP`ybS^;b?CACB#4e-lGjzJ_V&^dY8Cz0E+PLPm}N`12Cr&^;-Q!VrEUi}x`Tef zqXmR)$Of$zk#IAT6caL`EZs0ua~TdMDlL7pLTt91lc;?<;2?s_^4vH}b4H-ZH~$~|=ULPM literal 0 HcmV?d00001 diff --git a/assets/share/combat/support/SUPPORT_SELECTED.png b/assets/share/combat/support/SUPPORT_SELECTED.png new file mode 100644 index 0000000000000000000000000000000000000000..38ed41ddb7eb93692f24dfe5d7dab185b383d00c GIT binary patch literal 5833 zcmeH~_fr$h*2kA7p(8EyDm*Gp5D<}$O3+XY(m|S1Ly;atstAfekS0}{A{tN-AtFub zhK>~JJz{{+BmKr_-uEB4zg~7`=j@!_J?A^0nVmi7iIIUW6Fo0I0Dwskb`=2t4S7k~ z3!x+%O`#hUWJBi-v+xCgf&K5K0GZj`0MP5Z>gX65xp?_``MP*{3+w6V2z&c@Ik_V5 z0T48rV;pFnOyW|XBHd##)gD%fdY*H?J~F9IY2u%_+b3;E^pNgjuSkplh_ z2#BWu8E19RP-=bwb|w)BDayugAP=J{Dns2^MiFjNC9g{vUPl8063o#onsy*OLtCm7 z2rE+p9YOXkDq%QP-i7{#=@MJ-Xe^8ZG~!ab(r@-( zI?>IGW~XO~vBU6G@NPx`cz6509w}>}@r&~_i%xhXajT`^$bHRAR9$3!>ZtY^B{g6* z=pl~UE-VaDdACt~@NaN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/assets_combat_support.py index c27e78bcc..10dc25671 100644 --- a/tasks/combat/assets/assets_combat_support.py +++ b/tasks/combat/assets/assets_combat_support.py @@ -53,3 +53,36 @@ COMBAT_SUPPORT_SELECTED = ButtonWrapper( button=(69, 114, 91, 116), ), ) +SUPPORT_SELECTED = ButtonWrapper( + name='SUPPORT_SELECTED', + share=[ + Button( + file='./assets/share/combat/support/SUPPORT_SELECTED.png', + area=(54, 202, 60, 220), + search=(40, 146, 68, 628), + color=(125, 126, 131), + button=(54, 202, 60, 220), + ), + Button( + file='./assets/share/combat/support/SUPPORT_SELECTED.2.png', + area=(53, 547, 59, 565), + search=(40, 146, 68, 628), + color=(144, 146, 147), + button=(53, 547, 59, 565), + ), + Button( + file='./assets/share/combat/support/SUPPORT_SELECTED.3.png', + area=(54, 432, 61, 450), + search=(40, 146, 68, 628), + color=(139, 139, 141), + button=(54, 432, 61, 450), + ), + Button( + file='./assets/share/combat/support/SUPPORT_SELECTED.4.png', + area=(52, 417, 59, 435), + search=(40, 146, 68, 628), + color=(140, 138, 145), + button=(52, 417, 59, 435), + ), + ], +) diff --git a/tasks/combat/support.py b/tasks/combat/support.py index 8c63d4f23..ff628217d 100644 --- a/tasks/combat/support.py +++ b/tasks/combat/support.py @@ -2,15 +2,15 @@ import cv2 import numpy as np from scipy import signal -from module.base.button import Button, ButtonWrapper +from module.base.button import ClickButton from module.base.timer import Timer -from module.base.utils import area_size, crop, load_image, rgb2luma +from module.base.utils import area_offset, area_size, crop, load_image, rgb2luma from module.logger import logger from module.ui.scroll import Scroll from tasks.base.assets.assets_base_popup import POPUP_CANCEL from tasks.base.ui import UI from tasks.combat.assets.assets_combat_support import COMBAT_SUPPORT_ADD, COMBAT_SUPPORT_LIST, \ - COMBAT_SUPPORT_LIST_GRID, COMBAT_SUPPORT_LIST_SCROLL, COMBAT_SUPPORT_SELECTED + COMBAT_SUPPORT_LIST_GRID, COMBAT_SUPPORT_LIST_SCROLL, COMBAT_SUPPORT_SELECTED, SUPPORT_SELECTED from tasks.combat.assets.assets_combat_team import COMBAT_TEAM_DISMISSSUPPORT, COMBAT_TEAM_SUPPORT @@ -84,64 +84,36 @@ class SupportCharacter: self.button[0], self.button[1] - 5, self.button[0] + 30, self.button[1]) if self.button else None -class ArrowWrapper(ButtonWrapper): - - def find_center(self, image): - res = cv2.matchTemplate( - self.matched_button.image, image, cv2.TM_CCOEFF_NORMED) - _, max_val, _, max_loc = cv2.minMaxLoc(res) - return ( - ( - (max_loc[0] + self.matched_button.image.shape[1] / 2), - (max_loc[1] + self.matched_button.image.shape[0] / 2), - ) - if max_val > 0.75 - else None - ) - - class NextSupportCharacter: - _arrow = ArrowWrapper( - name="NextSupportCharacterArrow", - share=Button( - file='./assets/support/selected_character_arrow.png', - area=None, - search=None, - color=None, - button=None, - ) - ) - _crop_area = (290, 115, 435, 634) - def __init__(self, screenshot): - self.name = "SupportCharacterArrow" - self.screenshot = crop(screenshot, NextSupportCharacter._crop_area) - self.arrow_center = self._find_center() - self.button = self._get_next_support_character_button() + self.name = "NextSupportCharacter" + self.button = self.get_next_support_character_button(screenshot) def __bool__(self): return self.button is not None - def _find_center(self): - center = NextSupportCharacter._arrow.find_center(self.screenshot) - center = get_position_in_original_image( - center, NextSupportCharacter._crop_area) if center else None - return center + def get_next_support_character_button(self, screenshot) -> ClickButton | None: + if SUPPORT_SELECTED.match_template(screenshot, similarity=0.75): + # Move area to the next character card center + area = SUPPORT_SELECTED.button + area = area_offset((105, 85, 255, 170), offset=area[:2]) + if area[3] < COMBAT_SUPPORT_LIST_GRID.area[3]: + return ClickButton(area, name=self.name) + else: + # Out of list + logger.info('Next character is out of list') + return None + else: + return None - def _get_next_support_character_button(self): - area = (self.arrow_center[0] - 200, min(self.arrow_center[1] + 65, 615), self.arrow_center[0] + 10, min( - self.arrow_center[1] + 80, 620)) if self.arrow_center and self.arrow_center[1] < 510 else None - return ButtonWrapper( - name="NextSupportCharacterButton", - share=Button( - file='./assets/support/selected_character_arrow.png', - area=area, - search=area, - # if next support was selected, the average color of the button will larger than 220 - color=(220, 220, 220), - button=area, - ) - ) if self.arrow_center and self.arrow_center[1] < 510 else None + def is_next_support_character_selected(self, screenshot) -> bool: + if self.button is None: + return False + area = self.button.area + # Move area from the card center to the left edge of the card + area = area_offset(area, offset=(-120, 0)) + image = crop(screenshot, area, copy=False) + return SUPPORT_SELECTED.match_template(image, similarity=0.75, direct_match=True) class SupportListScroll(Scroll): @@ -351,7 +323,7 @@ class CombatSupport(UI): self.device.screenshot() # End - if next_support and self._next_support_selected(next_support): + if next_support is not None and next_support.is_next_support_character_selected(self.device.image): return if interval.reached(): @@ -367,13 +339,3 @@ class CombatSupport(UI): interval.reset() continue - - def _next_support_selected(self, next_support: NextSupportCharacter): - """ - Returns: - bool: True if selected else False - """ - if self.match_color(next_support.button, threshold=20): - logger.info("Next support selected") - return True - return False