mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-25 01:49:41 +00:00
Merge branch 'master' into dev
This commit is contained in:
commit
fb80418348
BIN
assets/share/forgotten_hall/ui/SEAT_1.png
Normal file
BIN
assets/share/forgotten_hall/ui/SEAT_1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.8 KiB |
BIN
assets/share/forgotten_hall/ui/SEAT_2.png
Normal file
BIN
assets/share/forgotten_hall/ui/SEAT_2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.8 KiB |
BIN
assets/share/forgotten_hall/ui/SEAT_3.png
Normal file
BIN
assets/share/forgotten_hall/ui/SEAT_3.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.8 KiB |
BIN
assets/share/forgotten_hall/ui/SEAT_4.png
Normal file
BIN
assets/share/forgotten_hall/ui/SEAT_4.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.8 KiB |
@ -356,7 +356,8 @@ class KeywordExtract:
|
||||
'Herta': ['观景车厢', '主控舱段', '基座舱段', '收容舱段', '支援舱段'],
|
||||
'Jarilo': ['行政区', '城郊雪原', '边缘通路', '铁卫禁区', '残响回廊', '永冬岭',
|
||||
'造物之柱', '旧武器试验场', '磐岩镇', '大矿区', '铆钉镇', '机械聚落'],
|
||||
'Luofu': ['星槎海中枢', '流云渡', '迴星港', '长乐天', '金人巷', '太卜司', '工造司', '丹鼎司', '鳞渊境'],
|
||||
'Luofu': ['星槎海中枢', '流云渡', '迴星港', '长乐天', '金人巷', '太卜司',
|
||||
'工造司', '绥园', '丹鼎司', '鳞渊境'],
|
||||
}
|
||||
|
||||
def text_convert(world_):
|
||||
|
@ -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(
|
||||
|
@ -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
|
||||
|
@ -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'
|
||||
|
@ -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='鱗淵境',
|
||||
|
Loading…
Reference in New Issue
Block a user