From 9d282b23b7a0e0855c9edc7bf9975479ff5299a1 Mon Sep 17 00:00:00 2001 From: LmeSzinc <37934724+LmeSzinc@users.noreply.github.com> Date: Fri, 3 Nov 2023 13:35:14 +0800 Subject: [PATCH] Fix: Handle Herta drop in rogue rewards --- assets/cn/base/popup/GET_CHARACTER.png | Bin 0 -> 7037 bytes assets/en/base/popup/GET_CHARACTER.png | Bin 0 -> 6850 bytes tasks/base/assets/assets_base_popup.py | 17 +++++++++++++++++ tasks/base/popup.py | 17 +++++++++++++++++ tasks/rogue/route/base.py | 3 +++ 5 files changed, 37 insertions(+) create mode 100644 assets/cn/base/popup/GET_CHARACTER.png create mode 100644 assets/en/base/popup/GET_CHARACTER.png diff --git a/assets/cn/base/popup/GET_CHARACTER.png b/assets/cn/base/popup/GET_CHARACTER.png new file mode 100644 index 0000000000000000000000000000000000000000..e521e00290b63c4c47b334bbdaa1dce3c6a837e8 GIT binary patch literal 7037 zcmeI0hf~wd)4;zJl}@CEB3+OoO#uaIf=CerLvMzn^bn+nCJKT|RhqN_(hOCQ4k4&C z2_%A2r1#K658Yp$|KfdT+?kubnVZ?${oKy(&Au^ysKZFdO$Pt~qn_?P2mo9lZz+G$ zP?D7fzdi+7(R%Az`2qkv>wk*^$js&h06IfAEiGeXSGXVC*A?z9pr@rJ;Ozryvf#>`jb0wXKQ9oaPFID zwWb4D9OO*9Ae5b+CCsWzpfbQQ008&Vz}NHJ>Pdv9h1n%%f+umW^W(Y47F<_cQn?7IFJjgAbW++@r#K zg^r$nL&Py3Eju5p_V?y2d?q&hfP8vB9=ruS%hbrIXfKF7d*}sQqF6 zr8=xoTY9rxdV3 z7YzX1%X=a5`R*l#uWaS*Oxa&~Tid~u4j1ofFkEd{0cl=bh`2(R&zW|Y%d}m2l)COS z6?fj{%vn(FSGn7agc%mw7i-?&i}swzZ=9{swA6QdXjmNtm0w?WOc)iy(SS1&sD&JK z<=;mX3aq?ldnDA^<5Nh9(sX}krz^Z8<-?{FZ>w>fG~Od{HK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RVEH2HRn+~89U@adbF5a+q5H~szn!uR871h3m2WBu2L_YV%D zLD5XS))J{*394sZJaFsJ_FuD=e50B9+X9JGCqxXUtV}X0sWYhvq`ADZVs+3_C2AY= z)vVtFsqC}R0B`<54!2$JA-z0RWmT0-6v!z~&YWp+N@d}wWHJ*mizeY(7Kb&f&vW95 zeMr@i?u3JMXgH!bMZB)APOeKkmgAP9BA?gW^HmF(T=lAN}nXFZyEvwYxrC^r0&| z{J2mLJTyG)HC|s~D{T?Oz@xanjG@jAoI;SV6^ufMw0M{x9g*Mi2{usw#akDLhRk-1 z#eQq!?^2RcBI#tQD(j0Cql{6er7%1KX~F7_B=F;liXd8HD8a4|F~-R?#l>n6N5H#IswcWHiEZ~O*PVSqO7>>7vom{*4 zn==viF2P~E{&^a9k?W>&9JfNL_58*ty2YA;iNB1*7pA`r27sTG{ShrQFX>B+a@*X8 zN=uN(h9M^yX|&&c{b!54scR!u>OosGDL+iO^^1&J^~_Y%C}J)P-!D#iY>PgAzmlFU z=QVLanufM6yV%+BhwXsr+sXM4^wHLn3mp!JBjS2r3HX$RO7Natt>e@e99w zrcbsl0N9WVV{vhDN$&YZZ>nT&*a3-LVVMNu$UzR5TR}0WJC4c`PkHG%{0#}IBRKQ~wbvOv2nf;$XdfE@~ JRchM5{2v6!tzQ5D literal 0 HcmV?d00001 diff --git a/assets/en/base/popup/GET_CHARACTER.png b/assets/en/base/popup/GET_CHARACTER.png new file mode 100644 index 0000000000000000000000000000000000000000..2afa603c3fc5d78c173ff0289033bbfbdcd78f04 GIT binary patch literal 6850 zcmeI02UF9{7Ki^7rB{IAi$r4IK#t0ukv| zP>|js^w1;y=6&aWh&yxLnVqvUJ9Flo=lphO_k7gWRH30{qXYneMirv00{~YDOX45o z!~~4*;OL_Rk~&(lS^9fKtOjNl9D#6%+>bcm;LiR#j5sc6$xAb8xl= z0H29WU2mg!Jd4~c-j>clacrk5+4(I1=0%Wq(HrN|#{pLF=@}K;L>zn3x$dAo^|Z zMkpbf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?PED>57)- z@`3`}?zpT^tirjoGtl*?VPBno*VWYxq(6j?l!DZrJ)^=8!etv>r=1w8{0@5~2p?*4 z40RPD5JL;I{fkqap`KpTZU+w6a(U7EeGnvMK2>RTzV@>Sbl=->W;6m>z}AA%RwLz54J+7Ky}XJ0lN$B4`-*03?Eu#5&^-DJLF;^ zIfZuHVO$r7Ew~o!mi*}G=#x14z>@=%X9b6RP{3HF)z`0I6B83d_p9Uhr2Gz64J`u2 zy*9^CC{**?pGAYk6%}}LF+xux&@1>lwTsJT*GrKG({hxbf#;!;yJ)L~goItq_>)K$ zWtw(psp>iW;Hv?8 z6#u#*=TlW~>yE!QPT^91^EY zpbrqGW>@sVaK%-1 zl+*8WvqrB#sKCh8fB6iId@N@^B?__yw@(8xE zzP{aHzm5q=KcGVE7HR7LH+8f1wU6N>WHYC8AuUrg7l*$sEyv!w-&# z44Y<)Kk$c3sqS66Cld4&LPl3AL3lXyO`<_$q+{r}?Q+1c&n z%6jBojzamZ&~bIW>~UQg*!dmrG1kUQWkp?M<7RWd)r$*xD{9nri;ndu7l$uG}1ba<(rhVrv`Pp;uar z1FOcJpUz78>{vD2|u9yR~v3LDkzf(Hd|W zTMQ>oumVw1@#aWvyT@#Xl+(ae=Jisz`(g(b=70Q7{~O+40)GkoCGdYi0CTx&K}huS ak_5Q1KP4u5T^;gI-l|VDmCF?^-~9(2<5=VX literal 0 HcmV?d00001 diff --git a/tasks/base/assets/assets_base_popup.py b/tasks/base/assets/assets_base_popup.py index 89ac6b632..1d9d97666 100644 --- a/tasks/base/assets/assets_base_popup.py +++ b/tasks/base/assets/assets_base_popup.py @@ -13,6 +13,23 @@ BATTLE_PASS_NOTIFICATION = ButtonWrapper( button=(895, 595, 1180, 630), ), ) +GET_CHARACTER = ButtonWrapper( + name='GET_CHARACTER', + cn=Button( + file='./assets/cn/base/popup/GET_CHARACTER.png', + area=(204, 322, 249, 338), + search=(184, 302, 269, 358), + color=(156, 155, 154), + button=(204, 322, 249, 338), + ), + en=Button( + file='./assets/en/base/popup/GET_CHARACTER.png', + area=(205, 321, 242, 339), + search=(185, 301, 262, 359), + color=(126, 127, 127), + button=(205, 321, 242, 339), + ), +) GET_LIGHT_CONE = ButtonWrapper( name='GET_LIGHT_CONE', cn=Button( diff --git a/tasks/base/popup.py b/tasks/base/popup.py index 928ee4f09..7d61c7247 100644 --- a/tasks/base/popup.py +++ b/tasks/base/popup.py @@ -117,6 +117,23 @@ class PopupHandler(ModuleBase): return False + def handle_get_character(self, interval=2) -> bool: + """ + Popup when getting a character from rogue rewards. + + Args: + interval: + + Returns: + If handled. + """ + if self.appear(GET_CHARACTER, interval=interval): + logger.info(f'{GET_CHARACTER} -> {GET_REWARD}') + self.device.click(GET_REWARD) + return True + + return False + def handle_ui_close(self, appear_button: ButtonWrapper | Callable, interval=2) -> bool: """ Args: diff --git a/tasks/rogue/route/base.py b/tasks/rogue/route/base.py index 9ecb88861..888d892a8 100644 --- a/tasks/rogue/route/base.py +++ b/tasks/rogue/route/base.py @@ -255,6 +255,9 @@ class RouteBase(RouteBase_, RogueExit, RogueEvent, RogueReward): # First-time cleared reward if self.handle_reward(): continue + # Get Herta + if self.handle_get_character(): + continue def domain_single_exit(self, *waypoints): """