From d1abb199824234bb1df3419e66c249bbc13d996c Mon Sep 17 00:00:00 2001 From: LmeSzinc <37934724+LmeSzinc@users.noreply.github.com> Date: Tue, 3 Oct 2023 02:25:22 +0800 Subject: [PATCH] Add: is_map_loading() --- .../combat/interact/MAP_LOADING.SEARCH.png | Bin 0 -> 8528 bytes assets/share/combat/interact/MAP_LOADING.png | Bin 0 -> 6667 bytes tasks/combat/assets/assets_combat_interact.py | 10 ++++++++++ tasks/combat/interact.py | 16 +++++++++++++++- tasks/rogue/assets/assets_rogue_reward.py | 2 +- 5 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 assets/share/combat/interact/MAP_LOADING.SEARCH.png create mode 100644 assets/share/combat/interact/MAP_LOADING.png diff --git a/assets/share/combat/interact/MAP_LOADING.SEARCH.png b/assets/share/combat/interact/MAP_LOADING.SEARCH.png new file mode 100644 index 0000000000000000000000000000000000000000..9a1c84aa5aef70d35196c332210fa476759c825a GIT binary patch literal 8528 zcmeH}hgVZu(6_F*>XX0^kkj~`w{8Ja!V5SS>a3JD|<2#3Rm^-Gyc)SdtwTlj^G zHxd@VIs*^EkqUAn0&#j;%^m1)T28I$GgsLcvA-P7wgA8;U4Vb6cd0U!ro;oF1w04u zT)Wsda}rUjf5RBKngC1-U0ga(6AuR3?>ukk0NS~MQiBRxCLjp_Tmyntg#b7Uu)h0P z=`1i(m^c9fM!sGtWB_7lfV7*M*JxGh04u}SU~$^UUqB8*Md;3%#$uXq$d7xPwBhKp zfN!ixJe!IY5T2$g-UVEJKntkxU+Sj2szaA^w;wZIXz3YQtwjSgVw1a5pY-47s7~(X z@!Q^rg@W=Jhv}XWzT^w=Da$#YJ&a;iC)Cc2IXbOxO0giZz`TcRmoEJ>Jft09# z2UHdQtS|cQ3Vc_X&Yve-xA}s;I~S#Na(~8SIx2MU^zZR_;3n`gT_p|Km>Y5Q(%Rj( z7#zEVJ)bc)U*=%X z;ZAvU`FW$<$eF5AI-Z;h=`-w=KP4ZqEKOfDd%flfI%mb5^^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yp-4Z2p{(JPXJZ z%J7(z6RIqRoa=C^<$u;60)GhnA@IMFK(P0*AD|b+JftE#i})vk$LhL&6{}jk`G0KO B4ut>! literal 0 HcmV?d00001 diff --git a/assets/share/combat/interact/MAP_LOADING.png b/assets/share/combat/interact/MAP_LOADING.png new file mode 100644 index 0000000000000000000000000000000000000000..c8b993d638e79559b78e8ba1e53775289eec6c22 GIT binary patch literal 6667 zcmeH}_fr$f*T$D7O^UQANN*}2C?XiDAP^J*k>1M{q$53aR6wOm@4bhp2n12XZoSy;U zH<|s^*C>(5rZ7i*#$cd4zV#{9ISlaeBdEF=jSCpx1MAm}OiCT$Z)glySTAM4^xI#K z(!jFcEaqLSx4-}HjY*Wgnan2lbZKpnKVf6zc_jJSM zpyS+e+OYPX=1@{r*gQE8;|iwDo}vSQEi$-Yu-8Y$6Os>ZfE2io-V|W!TKMy-K}X0C z@FakFJ|-M3NxUxTzNy#E0=h4Qk551ULj#fkaE1pe^MMLFu)e3EKmo?f6Q?0yyx?j% z6^J1L>DSZ+NR=9am42A6C~0dO$U`Xc-6U^Cl7t%9-Bu?JZKeP|u}1L>N>(5=U0Jjb z@W_w?6)xs}G9FE`Jc$wXe7U82cs+~+v|^I`Qy+~;veYLJvHR|9%`fsUwmE-NwuW41 zw4+|)%Sz4UXNKX(GzTsMzbInJvzw6q(7 zHu=pGKcf`>NG`a|M+G08-=0nRZ-EyXO6gUtg|ALuSiAZlbz^ZDa^+jDL>&KFS9r*2 z?DgTrJDJ6Ny{*^bd)x*8qMPu5w9OQ|*04M8LyLG; z->^L4>*)3TOfZM>?}&M@+>0?&I*Om_=DGduChPn?+6P0s-BkB<_&lH!* zi*s))r{`5X=`YXuK~?bvnrourlINo%{xq_j`HpvnV1Fi?3Z_V`aC9ic!QO%RTzu85 zfqLc@mul)z>WI@X%2nLzt3BU~bP;r~x?ncft~gx@xKernmfpI8>QSf0K-vZbqz2v^ICfEDW5qB^g{@UnH@ezt9-jP)=e z!;3nlJ+?8eK3v!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!?s6q+%oA5Utt-2K+4GjHqm)Q!qPtqDae$I)ZU|28;`lzSC zW0vMgfa#~kkqY~m%G7GnMu}jx2OtlSwMyN}|BM(dn`5YV5sXDNd9Swp9@;sS*2>}BbgeU~l?f(3UD%fH68fMgK>qIxn9&v(%tp8U zkhNDl?)h3gW6UHB&xvGwU-Xf%z%5;9eTn2>C(n`5;A4x^m>rpcsA3bBqsT_IiKgt? z;o8CgazJjd6lr#brwxhzUd40{dk69yq&-vD&V}B)Ytdg_6CaIe%14(9FTt_1Il>wl z0wUPioq0naB-hc9q_&(wgU{X*@#6c@K0j*qpgWEWx`*<3@A_8RE71AFFJPs{cL}tv z`{REMS5lrtFjk8mfBQU`qu}9(A2@E1g|-FYOJj4#QMh3=_xi(;4MW2N?r8xi&~ zg(_88$O68)6;>J&u+*Uvz7uQUB=DNZ8B_$w{%6nHU!%VS{u200;QyJxR>+3sd4xZI Z$bf5p-c0TV?)`rgX{c&FKq_0k{6BQz;Lrd7 literal 0 HcmV?d00001 diff --git a/tasks/combat/assets/assets_combat_interact.py b/tasks/combat/assets/assets_combat_interact.py index 0feaece7e..5b575ed58 100644 --- a/tasks/combat/assets/assets_combat_interact.py +++ b/tasks/combat/assets/assets_combat_interact.py @@ -13,3 +13,13 @@ DUNGEON_COMBAT_INTERACT = ButtonWrapper( button=(750, 411, 997, 448), ), ) +MAP_LOADING = ButtonWrapper( + name='MAP_LOADING', + share=Button( + file='./assets/share/combat/interact/MAP_LOADING.png', + area=(644, 367, 662, 389), + search=(639, 347, 667, 394), + color=(159, 141, 149), + button=(644, 367, 662, 389), + ), +) diff --git a/tasks/combat/interact.py b/tasks/combat/interact.py index d2521cae0..5d60b3c1c 100644 --- a/tasks/combat/interact.py +++ b/tasks/combat/interact.py @@ -1,5 +1,7 @@ +from module.base.utils import color_similar, get_color from tasks.base.ui import UI -from tasks.combat.assets.assets_combat_interact import DUNGEON_COMBAT_INTERACT +from tasks.combat.assets.assets_combat_interact import DUNGEON_COMBAT_INTERACT, MAP_LOADING +from tasks.map.assets.assets_map_control import A_BUTTON class CombatInteract(UI): @@ -12,3 +14,15 @@ class CombatInteract(UI): return True return False + + def is_map_loading(self): + if self.appear(MAP_LOADING, similarity=0.75): + return True + + return False + + def is_map_loading_black(self): + color = get_color(self.device.image, A_BUTTON.area) + if color_similar(color, (0, 0, 0)): + return True + return False diff --git a/tasks/rogue/assets/assets_rogue_reward.py b/tasks/rogue/assets/assets_rogue_reward.py index 29aa8d2cf..77c5494af 100644 --- a/tasks/rogue/assets/assets_rogue_reward.py +++ b/tasks/rogue/assets/assets_rogue_reward.py @@ -10,6 +10,6 @@ ROGUE_REPORT = ButtonWrapper( area=(1198, 19, 1223, 42), search=(1178, 0, 1243, 62), color=(203, 165, 119), - button=(382, 645, 894, 700), + button=(1198, 19, 1223, 42), ), )