From e8e6a3f2b98521ba529fdd4dadff6b8954acb6df Mon Sep 17 00:00:00 2001 From: LmeSzinc <37934724+LmeSzinc@users.noreply.github.com> Date: Fri, 22 Nov 2024 23:20:07 +0800 Subject: [PATCH] Fix: Enter classic rogue as more rogue mode was added --- ...MULATED_UNIVERSE_LOADED_CLASSIC.SEARCH.png | Bin 0 -> 6165 bytes .../SIMULATED_UNIVERSE_LOADED_CLASSIC.png | Bin 7003 -> 9134 bytes .../dungeon/assets/assets_dungeon_ui_rogue.py | 8 ++--- tasks/dungeon/ui/ui_rogue.py | 31 +++++++++--------- 4 files changed, 19 insertions(+), 20 deletions(-) create mode 100644 assets/share/dungeon/ui_rogue/SIMULATED_UNIVERSE_LOADED_CLASSIC.SEARCH.png diff --git a/assets/share/dungeon/ui_rogue/SIMULATED_UNIVERSE_LOADED_CLASSIC.SEARCH.png b/assets/share/dungeon/ui_rogue/SIMULATED_UNIVERSE_LOADED_CLASSIC.SEARCH.png new file mode 100644 index 0000000000000000000000000000000000000000..3954dedae4478a537bb64564fc3dfa3b762efdbc GIT binary patch literal 6165 zcmeHLc{J2(AAbxoW6w60WQ!JLiIO5qGGv)X21&NE4`M7MB(jt+vSrOyQbS0YWKaK$zBrb}}O}qlUBh5gj#eMxBc`J+Cq=(pT^_D1b6Ev-WYVY9eD| zy%pES5wep@DtWrYfFrg0)x^s6GLO~22NZqHq2cq!;*qB~J$v|pffoy_?_(6u+V!9BEXNtOz z5E3KsjWx$}XxM;|R4tiiAgTfZ+Pk@1=tT|av*kN#1`Dk{!-)twP)kl~Njcqdh=-W; zPS9^*Zg5y^_?26!mMwfgrvq$MJR>Dtf*UbGZ_vsLfZ$5|%T1LN_=)k+p>c-^H_EsA z+)dXx4{>#|`GL)!ZtC;b^h9vCwzwuf7UDhst6c^W+Rl_R!lW&r(JBf zcqzuFLLh*QAa|3hj z2a?kg(jb9!#6Y4L-Fy<)X0>{TvElT zQhi{RhbzxihFA9bw0%{7Z$E{bge|>YVxR19*ImMV%U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}_7&QJoQ$!ptR=Z^{TzXsJmll=R+?w5Pew(0(}%k+=r?tf1+Al>~(+|d%xU#N8t(thx7ZP5dK-j2pDk}u~^YuD2;I$5k`6Z#JZ6%nEU literal 0 HcmV?d00001 diff --git a/assets/share/dungeon/ui_rogue/SIMULATED_UNIVERSE_LOADED_CLASSIC.png b/assets/share/dungeon/ui_rogue/SIMULATED_UNIVERSE_LOADED_CLASSIC.png index edd967cda2738eda3513fab888ea9c5198cd5181..f64697fcaae314e2ecb1c5bb4450229d07ccf45d 100644 GIT binary patch delta 3903 zcmXw+eLT~9|Hr3Jr4kO6RpPg+LyaRja3P4ozzAN(dRb8)m*_2J zJ2p3ojLo+0a3WjLQqAnRncXmVGs9-PzIFYs@1Ng4-jDC+{e8Wjuh)m?*l_GAV-o=7 zc^&@Osr0W?d|X{6s={{md8G)CwGF=R0dF~KI`>C4aoBN_L(8cXb?b_M%?&lqg~vt} zf7p7=Qu^n=-oDH!jM{2HMraqG+;`I1@xh}g(|v2Fyk}lX4n+Isp5JU!zg?2bnrZ&D z93f*)ohz0L4&t7G+Jalht zw^CfDfBqAP-73M>C}mG$NKAY)C~sAh0z;jVcE+r99(o^lf-fD+O?`h8M-5- zX>=`Q4R8Rmmm^gL<{KWWV81CaR!;MIvD5~};@1(Uy0fWaA*jI+Y>3xiWucjp4-wsD z=Y{ge!KO~xLj!*9yCY8coMmLD>YkH4t44^DUXOU@57wix3!j?`j5&v%YX3=Zv?V-E z`C`<$0dn+;_eRLkg5q$VY%y103U$H+hj0;FfOUh!q}cvvk;ltRd*Zuq?RH68_&2*& zna)N8&MnQ29n&|57f=TzKcAufZEVDgZ+gm@%o<+Bfpb@Sz@vaC z;dZ-eno5&(A2moZ1Mlu3_5?P);gcJBHi;;WOshb(q33~9Nv129n?Pr82 zkZ;8}5BWY%L~>t_DFm7t$c7%I0mM@Pc-u1aX3fMSQ*@_M-0@Ssh;HYP`=%{M=3#+$ zqG0M-p{9mMFuY}kH1crHR;N=i4)E1+lK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logger.info('Classic rogue teleport already in sight') - return True - logger.info('Dungeon rogue swipe down') interval = Timer(2, count=4) while 1: @@ -114,10 +103,20 @@ class DungeonRogueUI(DungeonUI): self.device.screenshot() # End - if self.appear(SIMULATED_UNIVERSE_LOADED_CLASSIC): - if self.appear(LAST_TELEPORT): - logger.info('Classic rogue teleport at end') - return True + if self.appear(SIMULATED_UNIVERSE_LOADED_CLASSIC, interval=3): + logger.info('Found rogue icon') + # Search teleport button on the right + _, y1, _, y2 = SIMULATED_UNIVERSE_LOADED_CLASSIC.button + x1, _, x2, _ = TELEPORT.area + search = (x1 - 50, y1 - 120, x2 + 50, y2 + 120) + # Check if button in search area + for button in TELEPORT.match_multi_template(self.device.image): + if area_in_area(button.button, search, threshold=0): + logger.info('Found rogue TELEPORT') + self.device.click(button) + return True + # TELEPORT not found + self.interval_clear(SIMULATED_UNIVERSE_LOADED_CLASSIC) # Swipe if interval.reached():