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 000000000..1fa4f98db Binary files /dev/null and b/assets/share/forgotten_hall/ui/SEAT_1.png differ diff --git a/assets/share/forgotten_hall/ui/SEAT_2.png b/assets/share/forgotten_hall/ui/SEAT_2.png new file mode 100644 index 000000000..27ff36d4a Binary files /dev/null and b/assets/share/forgotten_hall/ui/SEAT_2.png differ 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 000000000..7ae643e16 Binary files /dev/null and b/assets/share/forgotten_hall/ui/SEAT_3.png differ 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 000000000..fcd496b8d Binary files /dev/null and b/assets/share/forgotten_hall/ui/SEAT_4.png differ 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/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 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='鱗淵境',