From 3635bbca123467b6542234a7ab12200b9e65b82a Mon Sep 17 00:00:00 2001 From: Yinhr <110515845+Yinhaoran1128@users.noreply.github.com> Date: Thu, 23 Nov 2023 12:37:46 +0800 Subject: [PATCH 1/2] Fix: enter forgottenhall if seats are full (#204) * Fix: enter forgottenhall if seats are full * Fix: Delete the test image * Fix: choose characters in forgotten * Fix: delete test function --- assets/share/forgotten_hall/ui/SEAT_1.png | Bin 0 -> 4927 bytes assets/share/forgotten_hall/ui/SEAT_2.png | Bin 0 -> 4930 bytes assets/share/forgotten_hall/ui/SEAT_3.png | Bin 0 -> 4911 bytes assets/share/forgotten_hall/ui/SEAT_4.png | Bin 0 -> 4910 bytes .../assets/assets_forgotten_hall_ui.py | 40 ++++++++++++++++++ tasks/forgotten_hall/team.py | 11 +++-- 6 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 assets/share/forgotten_hall/ui/SEAT_1.png create mode 100644 assets/share/forgotten_hall/ui/SEAT_2.png create mode 100644 assets/share/forgotten_hall/ui/SEAT_3.png create mode 100644 assets/share/forgotten_hall/ui/SEAT_4.png diff --git a/assets/share/forgotten_hall/ui/SEAT_1.png b/assets/share/forgotten_hall/ui/SEAT_1.png new file mode 100644 index 0000000000000000000000000000000000000000..1fa4f98db94a41dca7c9be25cf36eb337e214b53 GIT binary patch literal 4927 zcmeHKYitx%6rRdMDMebSu|lAeAyKN%&ST#LOR3#LOI)n&61F@-XJ_tqhwjcSGqaC2 zsUV4@5)H~DkW!+dCB>LRj44uT022WTR0K)nB?S>lrHG-(!y;tB;phL6_1 zX-Gq34uTBr6r3*A<#?0fB)^X3B{$GT`~iqYkjeRx0LxVa6?KCuL9}6)J9c5Hz}v9d zMhEE#6aueMTq}d}+L=zSwwkl@SpF1ra)f~a{6J;Vh~FnFOvHvo<1%opO%oUzg{ajw ztUybMx*Vlwp(F#;sv~iZBuUh4)lp`Oqs^YzQJSP_g0v8n38yR!NizmL8vkH0oy>cf zGW)c6GWcf0ys8>t2qGK~>%w}S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 zlLbA@s-U12ihR#fAciBavGsSSet(HK9QE5u=Rv3^Waa#V|Fxq zoYzY#UT#I}pU(WK&o?T#`?c`0wuLLVcXs-NT%B+0)G7PBJ{Ze?7|lGp?_^W^$b94O zOt-WGX$8^>q!majkXGQoQJ^pDWC%u9j!9?Eo<953%!cdA_m;K|Jr}~82d}EO=F_2^ z?Opv0gzOMK$G&7DGbX;Br~YVJ{?MNrzx#Axs=p&63qf`d{`9xk?G{$Iev)^nxA)9D z>pPoAlL&IfJ8d$yk>}mrSpQC2c3+d%2?u*WZ|kWjT@i9`oj1_+XKOX4yZb5F{A@ literal 0 HcmV?d00001 diff --git a/assets/share/forgotten_hall/ui/SEAT_3.png b/assets/share/forgotten_hall/ui/SEAT_3.png new file mode 100644 index 0000000000000000000000000000000000000000..7ae643e1666ac15e3f51f35eb6b03d7abb00ac27 GIT binary patch literal 4911 zcmeHLYitx%6rL94O~oLQKm(I$f;KQakDcA^PFb*YD{Wy*AKRDG(%G52-AQ*I&dheF zjTVB&poS7+eKifB$irgL#880-;Sa8L zclb!3S`0#BX{QEiIxGBqXB+PpuocVEWhM(9NWkDwQwqyEYkIJ_Ulu-F!vu!LAx4`A zE3yKj4ZcdWSkVCLwvjkbk|gSK+b9>s)2`rBlqPAKAPWe}iBknENwbU{Oq(uUVuZ=51Z5+woZ>)%Pvg{x7LErOcmjlh1Y|>pSSpQG zLyDp3A!P#BY4f-MP+Olb9pkQCBq<$2H%i)J8c9L!iq`!dDj=$Xu0%8*l(a*dd8up+ zF?dVPakDMUI9|XMCxBX(G*o4aHNY8)=2w((YW*uyLZCEbqtK`8MOjdydcH*?IRSV% z19&i43wE5MaGLT{4%R`jc5(>`i-Jr*eTpCkJN^xIvNXdo~_ZM-qcB8g?s5P}Xgafr zu%)673#}u$N7R59l22g~jrRr1@rf*Wt0aMdC5OektlopEpKu!u0jSqKN;Lt~m7o#j zG*HwEMZRw<5EGHtx%PWgf3U)vi25C^^DxwtvhpELZUyl4ATTQ#!rEpNi$dJFUUA!P zTXG5x_j&6veZs((^ce+Y=vsp((8s4ndl6*j)G}|8-|V}5wraJ%DEH(KH~aDehevFV6)rgRTonbt+t6ZSQa#81J@S4M%1 z0vQD|3S<<>DDYn>F#Om@28??=yyflfTVCBYGV+vUf45>NcJ!v&$$H$eCFf2=_LonA zkW=5Ze0u2ML2CX$e*b_p(5x_04f}fb%oYUMIa*h@aFw@wTb_14_rh1dzI>+Y39_Dr zlUfF}?w;!I-2A;?=Jy|If6|=ej#&7`Z|*v93ByW^ruq?)zEK4oT|8s`j{fZ0-obNC zCqm5Tp8lTYzijyZ&z~-R^2XTi!9((75^fMNw)6&PZ@YPVM{fS;yqxb~N-fAF1o1@8>vlRCo`pY}xb=Q`QFr literal 0 HcmV?d00001 diff --git a/assets/share/forgotten_hall/ui/SEAT_4.png b/assets/share/forgotten_hall/ui/SEAT_4.png new file mode 100644 index 0000000000000000000000000000000000000000..fcd496b8d7faf4ee8fc59d41dafb1dcd9745491a GIT binary patch literal 4910 zcmeHLeQXnD7{93ufq@#Q0y4QA#xUSM+gsa%GH|VIjIyti6$85K^=*5sy}R9A*KUas z1tVh65ZoUQaB3!zEr5{-!kA)W_(SKwfS>3H5fB6l66IsU^u2z;kOAQzW7137yL+GC z^E|)z_dd`2rhTPy{+!Vx$B#r1WOP}nqZ&bm!N!hEUZ8@g3Kt6DZEe*bkqw1qGZR;bbX4UqR)=i zvM$P{lz^aE+N^?_=J{@+xn8jOu;Q8Mj2H(4gn`bZv2aMzxR@PF#O2_#F-&4;0;1R3 zvDrpK)Z?l|OJo(GHiE(hilR`9ji4>Gz*zj#P=;a{lCqL?5l&k5tE3+lSUkz_O)C88!mRs$q$v)M?BAsGgT2wZEDbUubl+N5*@2hapnRCH06 zP$MGml_R8cf1W;R-E0g1fT*Bc@3Qc!5!fB)gxglC}Hz|Ou2AUjE1>kIiG$*BJ zql^Blat`t~EQ5G~m^cK~uw?^f&z*TEsDCjx`U0!bPU7)XLQn!=9J7@8RL7^M=5BnK@F>{g1Tjqj9w z;VtY}%?l(EippT9Q6WhkYv6_hg)CxO6Pp^Z6k{Odafnb4ElGs2!dwZTgl*w9Hps{5 z=tPrnrJ@E4ttquf)PRQ6Q%FP;eZlcUau$M7lE8ysssMk$OH3`#X zzaHgPFgpN6zGW+rLy_0`#+y^Wy}}!c`gN^yC)8823PD~90C;+km@ygB*k+T9LSDaK z3EMSWavBczdE+s2!oZiz83iO5T7@UjtNIh4AV}WuGRJIpY~AUfE6N|L8oT@Og`O4f z^flylzV!C}rFG7Y&Vfq<@s3sP%bkwpeVy3*z|$)}@aKqjZQNS{_RB-(?Pm_pyC-oB zX1}ruWEIFNkX0b7KvseOLV@=;*T zp3fa8;5Z`H^e%R+%r88eUxC-0`v=Ibx>eQ~8 z+<52m9P6SNauMYCdUu6;Z`-CL6FTcFI(MG``(SaBT(#@K+DA`r-RfF7!({LNeF?sx zulO}8!K3HfJ`)ZVHEh39@+)b-Jhry)fv42B$U*)Z<%U%iED{Kv*^b$c&t6f^N%j%9 literal 0 HcmV?d00001 diff --git a/tasks/forgotten_hall/assets/assets_forgotten_hall_ui.py b/tasks/forgotten_hall/assets/assets_forgotten_hall_ui.py index 37fd727db..a1627f557 100644 --- a/tasks/forgotten_hall/assets/assets_forgotten_hall_ui.py +++ b/tasks/forgotten_hall/assets/assets_forgotten_hall_ui.py @@ -93,6 +93,46 @@ OCR_STAGE = ButtonWrapper( button=(0, 0, 1000, 100), ), ) +SEAT_1 = ButtonWrapper( + name='SEAT_1', + share=Button( + file='./assets/share/forgotten_hall/ui/SEAT_1.png', + area=(946, 518, 953, 533), + search=(926, 498, 973, 553), + color=(66, 68, 89), + button=(946, 518, 953, 533), + ), +) +SEAT_2 = ButtonWrapper( + name='SEAT_2', + share=Button( + file='./assets/share/forgotten_hall/ui/SEAT_2.png', + area=(1026, 518, 1033, 533), + search=(1006, 498, 1053, 553), + color=(68, 70, 92), + button=(1026, 518, 1033, 533), + ), +) +SEAT_3 = ButtonWrapper( + name='SEAT_3', + share=Button( + file='./assets/share/forgotten_hall/ui/SEAT_3.png', + area=(1106, 518, 1113, 532), + search=(1086, 498, 1133, 552), + color=(67, 69, 87), + button=(1106, 518, 1113, 532), + ), +) +SEAT_4 = ButtonWrapper( + name='SEAT_4', + share=Button( + file='./assets/share/forgotten_hall/ui/SEAT_4.png', + area=(1186, 518, 1193, 532), + search=(1166, 498, 1213, 552), + color=(67, 69, 86), + button=(1186, 518, 1193, 532), + ), +) TELEPORT = ButtonWrapper( name='TELEPORT', share=Button( diff --git a/tasks/forgotten_hall/team.py b/tasks/forgotten_hall/team.py index 0d4cfe34d..4ba10c185 100644 --- a/tasks/forgotten_hall/team.py +++ b/tasks/forgotten_hall/team.py @@ -6,7 +6,7 @@ from module.base.utils import color_similarity_2d, get_color from module.logger import logger from tasks.base.ui import UI from tasks.forgotten_hall.assets.assets_forgotten_hall_team import * -from tasks.forgotten_hall.assets.assets_forgotten_hall_ui import ENTER_FORGOTTEN_HALL_DUNGEON, ENTRANCE_CHECKED +from tasks.forgotten_hall.assets.assets_forgotten_hall_ui import ENTER_FORGOTTEN_HALL_DUNGEON, ENTRANCE_CHECKED, SEAT_1, SEAT_2, SEAT_3, SEAT_4 class ForgottenHallTeam(UI): @@ -57,6 +57,7 @@ class ForgottenHallTeam(UI): logger.info('Team choose first 4') self.interval_clear(ENTRANCE_CHECKED) characters = [CHARACTER_1, CHARACTER_2, CHARACTER_3, CHARACTER_4] + seats = [SEAT_1, SEAT_2, SEAT_3, SEAT_4] while 1: if skip_first_screenshot: skip_first_screenshot = False @@ -64,9 +65,13 @@ class ForgottenHallTeam(UI): self.device.screenshot() chosen_list = [self.is_character_chosen(c) for c in characters] + seat_list = [not self.appear(s) for s in seats] if all(chosen_list): logger.info("First 4 characters are chosen") break + if all(seat_list): + logger.info("4 characters are chosen") + break if self.appear(ENTRANCE_CHECKED, interval=2): for character, chosen in zip(characters, chosen_list): if not chosen: @@ -79,7 +84,7 @@ class ForgottenHallTeam(UI): Pages: in: ENTRANCE_CHECKED, ENTER_FORGOTTEN_HALL_DUNGEON """ - characters = [CHARACTER_1, CHARACTER_2, CHARACTER_3, CHARACTER_4] + seats = [SEAT_1, SEAT_2, SEAT_3, SEAT_4] timeout = Timer(1, count=5).start() while 1: if skip_first_screenshot: @@ -90,7 +95,7 @@ class ForgottenHallTeam(UI): if timeout.reached(): logger.info('Team not prepared') return False - chosen_list = [self.is_character_chosen(c) for c in characters] + chosen_list = [not self.appear(s) for s in seats] if all(chosen_list): logger.info("Team already prepared") return True From 76ce5317829a0dc818d2c6ab5deb627ab31c2997 Mon Sep 17 00:00:00 2001 From: LmeSzinc <37934724+LmeSzinc@users.noreply.github.com> Date: Fri, 24 Nov 2023 02:30:24 +0800 Subject: [PATCH 2/2] Upd: Map planes in 1.5 (#205) --- dev_tools/keyword_extract.py | 3 ++- tasks/map/keywords/__init__.py | 1 + tasks/map/keywords/plane.py | 13 +++++++++++-- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/dev_tools/keyword_extract.py b/dev_tools/keyword_extract.py index 18bf6ff24..c64ebd4ae 100644 --- a/dev_tools/keyword_extract.py +++ b/dev_tools/keyword_extract.py @@ -349,7 +349,8 @@ class KeywordExtract: 'Herta': ['观景车厢', '主控舱段', '基座舱段', '收容舱段', '支援舱段'], 'Jarilo': ['行政区', '城郊雪原', '边缘通路', '铁卫禁区', '残响回廊', '永冬岭', '造物之柱', '旧武器试验场', '磐岩镇', '大矿区', '铆钉镇', '机械聚落'], - 'Luofu': ['星槎海中枢', '流云渡', '迴星港', '长乐天', '金人巷', '太卜司', '工造司', '丹鼎司', '鳞渊境'], + 'Luofu': ['星槎海中枢', '流云渡', '迴星港', '长乐天', '金人巷', '太卜司', + '工造司', '绥园', '丹鼎司', '鳞渊境'], } def text_convert(world_): diff --git a/tasks/map/keywords/__init__.py b/tasks/map/keywords/__init__.py index 2e3c25971..4ced7ff09 100644 --- a/tasks/map/keywords/__init__.py +++ b/tasks/map/keywords/__init__.py @@ -22,5 +22,6 @@ KEYWORDS_MAP_PLANE.Luofu_StargazerNavalia.floors = ['F1', 'F2'] KEYWORDS_MAP_PLANE.Luofu_DivinationCommission.floors = ['F1', 'F2'] KEYWORDS_MAP_PLANE.Luofu_AlchemyCommission.floors = ['F1', 'F2'] KEYWORDS_MAP_PLANE.Luofu_ArtisanshipCommission.page = 'bottom' +KEYWORDS_MAP_PLANE.Luofu_FyxestrollGarden.page = 'bottom' KEYWORDS_MAP_PLANE.Luofu_AlchemyCommission.page = 'bottom' KEYWORDS_MAP_PLANE.Luofu_ScalegorgeWaterscape.page = 'bottom' diff --git a/tasks/map/keywords/plane.py b/tasks/map/keywords/plane.py index e03a94aea..a6668f3ce 100644 --- a/tasks/map/keywords/plane.py +++ b/tasks/map/keywords/plane.py @@ -300,8 +300,17 @@ Luofu_ArtisanshipCommission = MapPlane( jp='工造司', es='Comisión de Artesanía', ) -Luofu_AlchemyCommission = MapPlane( +Luofu_FyxestrollGarden = MapPlane( id=34, + name='Luofu_FyxestrollGarden', + cn='绥园', + cht='綏園', + en='Fyxestroll Garden', + jp='綏園', + es='Jardín del Sosiego', +) +Luofu_AlchemyCommission = MapPlane( + id=35, name='Luofu_AlchemyCommission', cn='丹鼎司', cht='丹鼎司', @@ -310,7 +319,7 @@ Luofu_AlchemyCommission = MapPlane( es='Comisión de Alquimia', ) Luofu_ScalegorgeWaterscape = MapPlane( - id=35, + id=36, name='Luofu_ScalegorgeWaterscape', cn='鳞渊境', cht='鱗淵境',