Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 5.9 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 27 KiB |
After Width: | Height: | Size: 6.0 KiB |
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 8.9 KiB |
@ -38,14 +38,14 @@ MAY_OBTAIN = ButtonWrapper(
|
|||||||
cn=Button(
|
cn=Button(
|
||||||
file='./assets/cn/combat/obtain/MAY_OBTAIN.png',
|
file='./assets/cn/combat/obtain/MAY_OBTAIN.png',
|
||||||
area=(813, 379, 893, 397),
|
area=(813, 379, 893, 397),
|
||||||
search=(812, 330, 895, 468),
|
search=(800, 166, 975, 545),
|
||||||
color=(63, 71, 87),
|
color=(63, 71, 87),
|
||||||
button=(813, 379, 893, 397),
|
button=(813, 379, 893, 397),
|
||||||
),
|
),
|
||||||
en=Button(
|
en=Button(
|
||||||
file='./assets/en/combat/obtain/MAY_OBTAIN.png',
|
file='./assets/en/combat/obtain/MAY_OBTAIN.png',
|
||||||
area=(813, 379, 922, 397),
|
area=(813, 379, 922, 397),
|
||||||
search=(812, 330, 922, 468),
|
search=(800, 166, 975, 545),
|
||||||
color=(53, 61, 78),
|
color=(53, 61, 78),
|
||||||
button=(813, 379, 922, 397),
|
button=(813, 379, 922, 397),
|
||||||
),
|
),
|
||||||
|
@ -37,10 +37,10 @@ OCR_DOUBLE_EVENT_REMAIN = ButtonWrapper(
|
|||||||
name='OCR_DOUBLE_EVENT_REMAIN',
|
name='OCR_DOUBLE_EVENT_REMAIN',
|
||||||
share=Button(
|
share=Button(
|
||||||
file='./assets/share/dungeon/event/OCR_DOUBLE_EVENT_REMAIN.png',
|
file='./assets/share/dungeon/event/OCR_DOUBLE_EVENT_REMAIN.png',
|
||||||
area=(517, 239, 1081, 261),
|
area=(517, 177, 1087, 199),
|
||||||
search=(497, 219, 1101, 281),
|
search=(497, 157, 1107, 219),
|
||||||
color=(198, 161, 90),
|
color=(198, 163, 97),
|
||||||
button=(517, 239, 1081, 261),
|
button=(517, 177, 1087, 199),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
OCR_DOUBLE_EVENT_REMAIN_AT_COMBAT = ButtonWrapper(
|
OCR_DOUBLE_EVENT_REMAIN_AT_COMBAT = ButtonWrapper(
|
||||||
|
@ -37,10 +37,10 @@ SIMULATED_UNIVERSE_LOADED_CLASSIC = ButtonWrapper(
|
|||||||
name='SIMULATED_UNIVERSE_LOADED_CLASSIC',
|
name='SIMULATED_UNIVERSE_LOADED_CLASSIC',
|
||||||
share=Button(
|
share=Button(
|
||||||
file='./assets/share/dungeon/ui_rogue/SIMULATED_UNIVERSE_LOADED_CLASSIC.png',
|
file='./assets/share/dungeon/ui_rogue/SIMULATED_UNIVERSE_LOADED_CLASSIC.png',
|
||||||
area=(549, 607, 572, 629),
|
area=(507, 501, 547, 541),
|
||||||
search=(529, 587, 592, 649),
|
search=(465, 172, 588, 656),
|
||||||
color=(147, 137, 157),
|
color=(157, 155, 157),
|
||||||
button=(549, 607, 572, 629),
|
button=(507, 501, 547, 541),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
SURVIVAL_INDEX_OE_LOADED = ButtonWrapper(
|
SURVIVAL_INDEX_OE_LOADED = ButtonWrapper(
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
from module.base.timer import Timer
|
from module.base.timer import Timer
|
||||||
from module.base.utils import random_rectangle_vector
|
from module.base.utils import area_in_area, random_rectangle_vector
|
||||||
from module.logger import logger
|
from module.logger import logger
|
||||||
from tasks.base.page import page_guide
|
from tasks.base.page import page_guide
|
||||||
from tasks.dungeon.assets.assets_dungeon_ui import *
|
from tasks.dungeon.assets.assets_dungeon_ui import *
|
||||||
@ -94,17 +94,6 @@ class DungeonRogueUI(DungeonUI):
|
|||||||
Swipe down to find teleport button of classic rogue
|
Swipe down to find teleport button of classic rogue
|
||||||
Note that this method will change SIMULATED_UNIVERSE_LOADED_CLASSIC.search, original value should have a backup
|
Note that this method will change SIMULATED_UNIVERSE_LOADED_CLASSIC.search, original value should have a backup
|
||||||
"""
|
"""
|
||||||
# Already having classic rogue entry insight
|
|
||||||
SIMULATED_UNIVERSE_LOADED_CLASSIC.load_search(OCR_DUNGEON_LIST.button)
|
|
||||||
if self.appear(SIMULATED_UNIVERSE_LOADED_CLASSIC):
|
|
||||||
buttons = TELEPORT.match_multi_template(self.device.image)
|
|
||||||
y = SIMULATED_UNIVERSE_LOADED_CLASSIC.button[1]
|
|
||||||
for button in buttons:
|
|
||||||
# And having a teleport button below
|
|
||||||
if button.button[1] > y:
|
|
||||||
logger.info('Classic rogue teleport already in sight')
|
|
||||||
return True
|
|
||||||
|
|
||||||
logger.info('Dungeon rogue swipe down')
|
logger.info('Dungeon rogue swipe down')
|
||||||
interval = Timer(2, count=4)
|
interval = Timer(2, count=4)
|
||||||
while 1:
|
while 1:
|
||||||
@ -114,10 +103,20 @@ class DungeonRogueUI(DungeonUI):
|
|||||||
self.device.screenshot()
|
self.device.screenshot()
|
||||||
|
|
||||||
# End
|
# End
|
||||||
if self.appear(SIMULATED_UNIVERSE_LOADED_CLASSIC):
|
if self.appear(SIMULATED_UNIVERSE_LOADED_CLASSIC, interval=3):
|
||||||
if self.appear(LAST_TELEPORT):
|
logger.info('Found rogue icon')
|
||||||
logger.info('Classic rogue teleport at end')
|
# Search teleport button on the right
|
||||||
|
_, y1, _, y2 = SIMULATED_UNIVERSE_LOADED_CLASSIC.button
|
||||||
|
x1, _, x2, _ = TELEPORT.area
|
||||||
|
search = (x1 - 50, y1 - 120, x2 + 50, y2 + 120)
|
||||||
|
# Check if button in search area
|
||||||
|
for button in TELEPORT.match_multi_template(self.device.image):
|
||||||
|
if area_in_area(button.button, search, threshold=0):
|
||||||
|
logger.info('Found rogue TELEPORT')
|
||||||
|
self.device.click(button)
|
||||||
return True
|
return True
|
||||||
|
# TELEPORT not found
|
||||||
|
self.interval_clear(SIMULATED_UNIVERSE_LOADED_CLASSIC)
|
||||||
|
|
||||||
# Swipe
|
# Swipe
|
||||||
if interval.reached():
|
if interval.reached():
|
||||||
|