mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-15 22:19:18 +00:00
Fix: synthesize_confirm() ends with SYNTHESIZE_INSUFFICIENT
This commit is contained in:
parent
a7bebab04d
commit
68c918b221
BIN
assets/share/item/synthesize/SYNTHESIZE_INSUFFICIENT.png
Normal file
BIN
assets/share/item/synthesize/SYNTHESIZE_INSUFFICIENT.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 28 KiB |
@ -63,6 +63,16 @@ SYNTHESIZE_CONFIRM = ButtonWrapper(
|
||||
button=(730, 641, 998, 675),
|
||||
),
|
||||
)
|
||||
SYNTHESIZE_INSUFFICIENT = ButtonWrapper(
|
||||
name='SYNTHESIZE_INSUFFICIENT',
|
||||
share=Button(
|
||||
file='./assets/share/item/synthesize/SYNTHESIZE_INSUFFICIENT.png',
|
||||
area=(510, 564, 1220, 594),
|
||||
search=(490, 544, 1240, 614),
|
||||
color=(177, 102, 95),
|
||||
button=(510, 564, 1220, 594),
|
||||
),
|
||||
)
|
||||
SYNTHESIZE_INVENTORY = ButtonWrapper(
|
||||
name='SYNTHESIZE_INVENTORY',
|
||||
share=Button(
|
||||
|
@ -392,6 +392,9 @@ class Synthesize(CombatObtain, ItemUI):
|
||||
def appear_confirm():
|
||||
return self.image_color_count(SYNTHESIZE_CONFIRM, color=(226, 229, 232), threshold=221, count=1000)
|
||||
|
||||
def appear_insufficient():
|
||||
return self.image_color_count(SYNTHESIZE_INSUFFICIENT, color=(172, 95, 87), threshold=221, count=5000)
|
||||
|
||||
# SYNTHESIZE_CONFIRM -> reward_appear
|
||||
while 1:
|
||||
if skip_first_screenshot:
|
||||
@ -423,6 +426,9 @@ class Synthesize(CombatObtain, ItemUI):
|
||||
if appear_confirm():
|
||||
logger.info('Synthesize end')
|
||||
break
|
||||
if appear_insufficient():
|
||||
logger.info('Synthesize end, item insufficient')
|
||||
break
|
||||
# Click
|
||||
if self.handle_reward(click_button=SYNTHESIZE_MINUS):
|
||||
continue
|
||||
|
Loading…
Reference in New Issue
Block a user