4
alas.py
@ -209,6 +209,10 @@ class AzurLaneAutoScript:
|
||||
from module.reward.reward import Reward
|
||||
Reward(config=self.config, device=self.device).run()
|
||||
|
||||
def awaken(self):
|
||||
from module.awaken.awaken import Awaken
|
||||
Awaken(config=self.config, device=self.device).run()
|
||||
|
||||
def shop_frequent(self):
|
||||
from module.shop.shop_reward import RewardShop
|
||||
RewardShop(config=self.config, device=self.device).run_frequent()
|
||||
|
BIN
assets/cn/awaken/AWAKENING.png
Normal file
After Width: | Height: | Size: 9.1 KiB |
BIN
assets/cn/awaken/AWAKEN_CANCEL.png
Normal file
After Width: | Height: | Size: 8.0 KiB |
BIN
assets/cn/awaken/AWAKEN_CONFIRM.png
Normal file
After Width: | Height: | Size: 8.0 KiB |
BIN
assets/cn/awaken/AWAKEN_FINISH.BUTTON.png
Normal file
After Width: | Height: | Size: 5.5 KiB |
BIN
assets/cn/awaken/AWAKEN_FINISH.png
Normal file
After Width: | Height: | Size: 6.9 KiB |
BIN
assets/cn/awaken/COST_ARRAY.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
assets/cn/awaken/COST_CHIP.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
assets/cn/awaken/COST_COIN.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
assets/cn/awaken/LEVEL_UP.png
Normal file
After Width: | Height: | Size: 9.6 KiB |
BIN
assets/cn/awaken/OCR_SHIP_LEVEL.png
Normal file
After Width: | Height: | Size: 7.3 KiB |
BIN
assets/cn/awaken/SHIP_LEVEL_CHECK.png
Normal file
After Width: | Height: | Size: 6.8 KiB |
BIN
assets/cn/ui/MAIN_GOTO_DOCK.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
assets/cn/ui_white/MAIN_GOTO_DOCK_WHITE.png
Normal file
After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 9.6 KiB |
BIN
assets/en/ui/MAIN_GOTO_DOCK.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
assets/en/ui_white/MAIN_GOTO_DOCK_WHITE.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
assets/jp/ui/MAIN_GOTO_DOCK.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
assets/jp/ui_white/MAIN_GOTO_DOCK_WHITE.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
assets/tw/raid/HUANCHANG_OCR_PT.png
Normal file
After Width: | Height: | Size: 5.2 KiB |
BIN
assets/tw/raid/HUANCHANG_OCR_REMAIN_EASY.png
Normal file
After Width: | Height: | Size: 3.7 KiB |
BIN
assets/tw/raid/HUANCHANG_OCR_REMAIN_EX.png
Normal file
After Width: | Height: | Size: 3.5 KiB |
BIN
assets/tw/raid/HUANCHANG_OCR_REMAIN_HARD.png
Normal file
After Width: | Height: | Size: 3.7 KiB |
BIN
assets/tw/raid/HUANCHANG_OCR_REMAIN_NORMAL.png
Normal file
After Width: | Height: | Size: 3.7 KiB |
BIN
assets/tw/raid/HUANCHANG_RAID_EASY.png
Normal file
After Width: | Height: | Size: 8.6 KiB |
BIN
assets/tw/raid/HUANCHANG_RAID_EX.png
Normal file
After Width: | Height: | Size: 6.0 KiB |
BIN
assets/tw/raid/HUANCHANG_RAID_HARD.png
Normal file
After Width: | Height: | Size: 8.9 KiB |
BIN
assets/tw/raid/HUANCHANG_RAID_NORMAL.png
Normal file
After Width: | Height: | Size: 8.7 KiB |
BIN
assets/tw/ui/MAIN_GOTO_DOCK.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
assets/tw/ui_white/MAIN_GOTO_DOCK_WHITE.png
Normal file
After Width: | Height: | Size: 11 KiB |
@ -225,3 +225,4 @@ To add a new event, add a new row in here, and run `python -m module.config.conf
|
||||
| 20241128 | event 20241121 cn | Dangerous Inventions | - | - | - | 危險發明逼近中 |
|
||||
| 20241219 | event 20241219 cn | Substellar Crepuscule | 星光下的余晖 | Substellar Crepuscule | 星降る夕影の残光 | - |
|
||||
| 20241219 | event 20231221 cn | Light-Chasing Sea of Stars | - | - | - | 星海逐光 |
|
||||
| 20250102 | raid 20240130 | Spring Festive Fiasco | - | - | - | 寰昌宇定家事忙 |
|
||||
|
@ -1338,6 +1338,22 @@
|
||||
"Storage": {}
|
||||
}
|
||||
},
|
||||
"Awaken": {
|
||||
"Scheduler": {
|
||||
"Enable": false,
|
||||
"NextRun": "2020-01-01 00:00:00",
|
||||
"Command": "Awaken",
|
||||
"SuccessInterval": 0,
|
||||
"FailureInterval": 120,
|
||||
"ServerUpdate": "00:00"
|
||||
},
|
||||
"Awaken": {
|
||||
"LevelCap": "level120"
|
||||
},
|
||||
"Storage": {
|
||||
"Storage": {}
|
||||
}
|
||||
},
|
||||
"Daily": {
|
||||
"Scheduler": {
|
||||
"Enable": false,
|
||||
|
16
module/awaken/assets.py
Normal file
@ -0,0 +1,16 @@
|
||||
from module.base.button import Button
|
||||
from module.base.template import Template
|
||||
|
||||
# This file was automatically generated by dev_tools/button_extract.py.
|
||||
# Don't modify it manually.
|
||||
|
||||
AWAKENING = Button(area={'cn': (803, 282, 893, 304), 'en': (803, 282, 893, 304), 'jp': (803, 282, 893, 304), 'tw': (803, 282, 893, 304)}, color={'cn': (183, 163, 158), 'en': (183, 163, 158), 'jp': (183, 163, 158), 'tw': (183, 163, 158)}, button={'cn': (803, 282, 893, 304), 'en': (803, 282, 893, 304), 'jp': (803, 282, 893, 304), 'tw': (803, 282, 893, 304)}, file={'cn': './assets/cn/awaken/AWAKENING.png', 'en': './assets/cn/awaken/AWAKENING.png', 'jp': './assets/cn/awaken/AWAKENING.png', 'tw': './assets/cn/awaken/AWAKENING.png'})
|
||||
AWAKEN_CANCEL = Button(area={'cn': (485, 514, 553, 543), 'en': (485, 514, 553, 543), 'jp': (485, 514, 553, 543), 'tw': (485, 514, 553, 543)}, color={'cn': (214, 160, 154), 'en': (214, 160, 154), 'jp': (214, 160, 154), 'tw': (214, 160, 154)}, button={'cn': (485, 514, 553, 543), 'en': (485, 514, 553, 543), 'jp': (485, 514, 553, 543), 'tw': (485, 514, 553, 543)}, file={'cn': './assets/cn/awaken/AWAKEN_CANCEL.png', 'en': './assets/cn/awaken/AWAKEN_CANCEL.png', 'jp': './assets/cn/awaken/AWAKEN_CANCEL.png', 'tw': './assets/cn/awaken/AWAKEN_CANCEL.png'})
|
||||
AWAKEN_CONFIRM = Button(area={'cn': (727, 513, 795, 542), 'en': (727, 513, 795, 542), 'jp': (727, 513, 795, 542), 'tw': (727, 513, 795, 542)}, color={'cn': (151, 182, 222), 'en': (151, 182, 222), 'jp': (151, 182, 222), 'tw': (151, 182, 222)}, button={'cn': (727, 513, 795, 542), 'en': (727, 513, 795, 542), 'jp': (727, 513, 795, 542), 'tw': (727, 513, 795, 542)}, file={'cn': './assets/cn/awaken/AWAKEN_CONFIRM.png', 'en': './assets/cn/awaken/AWAKEN_CONFIRM.png', 'jp': './assets/cn/awaken/AWAKEN_CONFIRM.png', 'tw': './assets/cn/awaken/AWAKEN_CONFIRM.png'})
|
||||
AWAKEN_FINISH = Button(area={'cn': (435, 343, 468, 382), 'en': (435, 343, 468, 382), 'jp': (435, 343, 468, 382), 'tw': (435, 343, 468, 382)}, color={'cn': (58, 152, 193), 'en': (58, 152, 193), 'jp': (58, 152, 193), 'tw': (58, 152, 193)}, button={'cn': (218, 561, 548, 630), 'en': (218, 561, 548, 630), 'jp': (218, 561, 548, 630), 'tw': (218, 561, 548, 630)}, file={'cn': './assets/cn/awaken/AWAKEN_FINISH.png', 'en': './assets/cn/awaken/AWAKEN_FINISH.png', 'jp': './assets/cn/awaken/AWAKEN_FINISH.png', 'tw': './assets/cn/awaken/AWAKEN_FINISH.png'})
|
||||
COST_ARRAY = Button(area={'cn': (720, 374, 780, 434), 'en': (720, 374, 780, 434), 'jp': (720, 374, 780, 434), 'tw': (720, 374, 780, 434)}, color={'cn': (141, 163, 178), 'en': (141, 163, 178), 'jp': (141, 163, 178), 'tw': (141, 163, 178)}, button={'cn': (720, 374, 780, 434), 'en': (720, 374, 780, 434), 'jp': (720, 374, 780, 434), 'tw': (720, 374, 780, 434)}, file={'cn': './assets/cn/awaken/COST_ARRAY.png', 'en': './assets/cn/awaken/COST_ARRAY.png', 'jp': './assets/cn/awaken/COST_ARRAY.png', 'tw': './assets/cn/awaken/COST_ARRAY.png'})
|
||||
COST_CHIP = Button(area={'cn': (610, 375, 670, 435), 'en': (610, 375, 670, 435), 'jp': (610, 375, 670, 435), 'tw': (610, 375, 670, 435)}, color={'cn': (157, 188, 190), 'en': (157, 188, 190), 'jp': (157, 188, 190), 'tw': (157, 188, 190)}, button={'cn': (610, 375, 670, 435), 'en': (610, 375, 670, 435), 'jp': (610, 375, 670, 435), 'tw': (610, 375, 670, 435)}, file={'cn': './assets/cn/awaken/COST_CHIP.png', 'en': './assets/cn/awaken/COST_CHIP.png', 'jp': './assets/cn/awaken/COST_CHIP.png', 'tw': './assets/cn/awaken/COST_CHIP.png'})
|
||||
COST_COIN = Button(area={'cn': (499, 373, 559, 433), 'en': (499, 373, 559, 433), 'jp': (499, 373, 559, 433), 'tw': (499, 373, 559, 433)}, color={'cn': (219, 180, 83), 'en': (219, 180, 83), 'jp': (219, 180, 83), 'tw': (219, 180, 83)}, button={'cn': (499, 373, 559, 433), 'en': (499, 373, 559, 433), 'jp': (499, 373, 559, 433), 'tw': (499, 373, 559, 433)}, file={'cn': './assets/cn/awaken/COST_COIN.png', 'en': './assets/cn/awaken/COST_COIN.png', 'jp': './assets/cn/awaken/COST_COIN.png', 'tw': './assets/cn/awaken/COST_COIN.png'})
|
||||
LEVEL_UP = Button(area={'cn': (804, 282, 897, 304), 'en': (804, 282, 897, 304), 'jp': (804, 282, 897, 304), 'tw': (804, 282, 897, 304)}, color={'cn': (141, 167, 216), 'en': (141, 167, 216), 'jp': (141, 167, 216), 'tw': (141, 167, 216)}, button={'cn': (804, 282, 897, 304), 'en': (804, 282, 897, 304), 'jp': (804, 282, 897, 304), 'tw': (804, 282, 897, 304)}, file={'cn': './assets/cn/awaken/LEVEL_UP.png', 'en': './assets/cn/awaken/LEVEL_UP.png', 'jp': './assets/cn/awaken/LEVEL_UP.png', 'tw': './assets/cn/awaken/LEVEL_UP.png'})
|
||||
OCR_SHIP_LEVEL = Button(area={'cn': (757, 283, 799, 319), 'en': (757, 283, 799, 319), 'jp': (757, 283, 799, 319), 'tw': (757, 283, 799, 319)}, color={'cn': (115, 130, 142), 'en': (115, 130, 142), 'jp': (115, 130, 142), 'tw': (115, 130, 142)}, button={'cn': (757, 283, 799, 319), 'en': (757, 283, 799, 319), 'jp': (757, 283, 799, 319), 'tw': (757, 283, 799, 319)}, file={'cn': './assets/cn/awaken/OCR_SHIP_LEVEL.png', 'en': './assets/cn/awaken/OCR_SHIP_LEVEL.png', 'jp': './assets/cn/awaken/OCR_SHIP_LEVEL.png', 'tw': './assets/cn/awaken/OCR_SHIP_LEVEL.png'})
|
||||
SHIP_LEVEL_CHECK = Button(area={'cn': (694, 287, 748, 316), 'en': (694, 287, 748, 316), 'jp': (694, 287, 748, 316), 'tw': (694, 287, 748, 316)}, color={'cn': (151, 140, 179), 'en': (151, 140, 179), 'jp': (151, 140, 179), 'tw': (151, 140, 179)}, button={'cn': (694, 287, 748, 316), 'en': (694, 287, 748, 316), 'jp': (694, 287, 748, 316), 'tw': (694, 287, 748, 316)}, file={'cn': './assets/cn/awaken/SHIP_LEVEL_CHECK.png', 'en': './assets/cn/awaken/SHIP_LEVEL_CHECK.png', 'jp': './assets/cn/awaken/SHIP_LEVEL_CHECK.png', 'tw': './assets/cn/awaken/SHIP_LEVEL_CHECK.png'})
|
389
module/awaken/awaken.py
Normal file
@ -0,0 +1,389 @@
|
||||
from module.awaken.assets import *
|
||||
from module.base.timer import Timer
|
||||
from module.exception import ScriptError
|
||||
from module.logger import logger
|
||||
from module.ocr.ocr import Digit
|
||||
from module.retire.dock import CARD_GRIDS, DOCK_EMPTY, Dock, SHIP_DETAIL_CHECK
|
||||
from module.ui.assets import BACK_ARROW
|
||||
from module.ui.page import page_dock, page_main
|
||||
|
||||
|
||||
class ShipLevel(Digit):
|
||||
def after_process(self, result):
|
||||
result = super().after_process(result)
|
||||
if result < 100 or result > 125:
|
||||
logger.warning('Unexpected ship level')
|
||||
result = 0
|
||||
return result
|
||||
|
||||
|
||||
class Awaken(Dock):
|
||||
def _get_button_state(self, button: Button):
|
||||
"""
|
||||
Args:
|
||||
button: COST_COIN or COST_CHIP or COST_ARRAY
|
||||
|
||||
Returns:
|
||||
bool: True if having sufficient resource, False if not
|
||||
or None if such resource is not required
|
||||
"""
|
||||
# If COST_ARRAY is absent, COST_COIN and COST_CHIP are right moved 54px
|
||||
if button.match(self.device.image, offset=(75, 20)):
|
||||
# Look down, see if there are red letters
|
||||
area = button.button
|
||||
area = (area[0], area[3], area[2], area[3] + 60)
|
||||
if self.image_color_count(area, color=(214, 53, 33), threshold=180, count=16):
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
else:
|
||||
return None
|
||||
|
||||
def _get_awaken_cost(self, use_array=False):
|
||||
"""
|
||||
Args:
|
||||
use_array: True to awaken to 125, False to 120
|
||||
|
||||
Returns:
|
||||
bool or str:
|
||||
True if all required resource is sufficient,
|
||||
False if any is insufficient,
|
||||
'unexpected_array' if not going to use array but array presents,
|
||||
'invalid' if result valid,
|
||||
"""
|
||||
coin = self._get_button_state(COST_COIN)
|
||||
chip = self._get_button_state(COST_CHIP)
|
||||
array = self._get_button_state(COST_ARRAY)
|
||||
|
||||
logger.attr('AwakenCost', {'coin': coin, 'chip': chip, 'array': array})
|
||||
|
||||
def is_right_moved(button):
|
||||
# If COST_ARRAY is absent, COST_COIN and COST_CHIP are right moved 54px
|
||||
return button.button[0] - button.area[0] > 20
|
||||
|
||||
# Check if result are valid
|
||||
if array is not None:
|
||||
if not use_array:
|
||||
logger.warning('Not going to use array but array presents')
|
||||
return 'unexpected_array'
|
||||
# If array is needed, coin and chip should present
|
||||
if coin is not None and not is_right_moved(COST_COIN) \
|
||||
and chip is not None and not is_right_moved(COST_CHIP):
|
||||
result = coin and chip and array
|
||||
logger.attr('AwakenSufficient', result)
|
||||
return result
|
||||
else:
|
||||
# If array is not needed, coin and chip should both present and right moved
|
||||
if coin is not None and is_right_moved(COST_COIN) \
|
||||
and chip is not None and is_right_moved(COST_CHIP):
|
||||
result = coin and chip
|
||||
logger.attr('AwakenSufficient', result)
|
||||
return result
|
||||
|
||||
logger.warning('Invalid awaken cost')
|
||||
return 'invalid'
|
||||
|
||||
def handle_awaken_finish(self):
|
||||
return self.appear_then_click(AWAKEN_FINISH, offset=(20, 20), interval=1)
|
||||
|
||||
def is_in_awaken(self):
|
||||
return SHIP_LEVEL_CHECK.match_luma(self.device.image)
|
||||
|
||||
def awaken_popup_close(self, skip_first_screenshot=True):
|
||||
logger.info('Awaken popup close')
|
||||
self.interval_clear(AWAKEN_CANCEL)
|
||||
while 1:
|
||||
if skip_first_screenshot:
|
||||
skip_first_screenshot = False
|
||||
else:
|
||||
self.device.screenshot()
|
||||
|
||||
if self.is_in_awaken():
|
||||
break
|
||||
if self.appear_then_click(AWAKEN_CANCEL, offset=(20, 20), interval=3):
|
||||
continue
|
||||
if self.handle_awaken_finish():
|
||||
continue
|
||||
|
||||
def awaken_once(self, use_array=False, skip_first_screenshot=True):
|
||||
"""
|
||||
Args:
|
||||
use_array:
|
||||
skip_first_screenshot:
|
||||
|
||||
Returns:
|
||||
str: Result state, 'no_exp', 'unexpected_array', 'insufficient', 'timeout', 'success'
|
||||
|
||||
Pages:
|
||||
in: is_in_awaken
|
||||
out: is_in_awaken
|
||||
"""
|
||||
logger.hr('Awaken once', level=2)
|
||||
interval = Timer(3, count=6)
|
||||
while 1:
|
||||
if skip_first_screenshot:
|
||||
skip_first_screenshot = False
|
||||
else:
|
||||
self.device.screenshot()
|
||||
|
||||
if self.appear(AWAKEN_CONFIRM):
|
||||
break
|
||||
if LEVEL_UP.match_luma(self.device.image):
|
||||
logger.info(f'awaken_once ended at {LEVEL_UP}')
|
||||
return 'no_exp'
|
||||
if interval.reached() and AWAKENING.match_luma(self.device.image):
|
||||
self.device.click(AWAKENING)
|
||||
interval.reset()
|
||||
continue
|
||||
|
||||
logger.info('Get awaken cost')
|
||||
timeout = Timer(2, count=6).start()
|
||||
skip_first_screenshot = True
|
||||
while 1:
|
||||
if skip_first_screenshot:
|
||||
skip_first_screenshot = False
|
||||
else:
|
||||
self.device.screenshot()
|
||||
|
||||
result = self._get_awaken_cost(use_array)
|
||||
if result == 'unexpected_array':
|
||||
# This shouldn't happen
|
||||
self.awaken_popup_close()
|
||||
return result
|
||||
elif result is False:
|
||||
logger.info('Insufficient resources to awaken')
|
||||
return 'insufficient'
|
||||
elif result is True:
|
||||
# Sufficient resources
|
||||
break
|
||||
elif result == 'invalid':
|
||||
# Retry, and check timeout also
|
||||
pass
|
||||
else:
|
||||
raise ScriptError(f'Unexpected _get_awaken_cost result: {result}')
|
||||
if timeout.reached():
|
||||
logger.warning('Get awaken cost timeout')
|
||||
self.awaken_popup_close()
|
||||
return 'timeout'
|
||||
|
||||
# sufficient is True
|
||||
logger.info('Awaken confirm')
|
||||
self.interval_clear(AWAKEN_CONFIRM)
|
||||
# Awaken popup takes 10s to appear if you have enough EXP to reach next awaken limit
|
||||
# and 2s to dismiss it by clicking
|
||||
# Timeout here is very long
|
||||
timeout = Timer(30, count=30).start()
|
||||
finished = False
|
||||
skip_first_screenshot = True
|
||||
while 1:
|
||||
if skip_first_screenshot:
|
||||
skip_first_screenshot = False
|
||||
else:
|
||||
self.device.screenshot()
|
||||
|
||||
# End
|
||||
if timeout.reached():
|
||||
logger.warning('Awaken confirm timeout')
|
||||
self.awaken_popup_close()
|
||||
break
|
||||
if finished and self.is_in_awaken():
|
||||
logger.info('Awaken finished')
|
||||
break
|
||||
# Click
|
||||
if self.appear_then_click(AWAKEN_CONFIRM, offset=(20, 20), interval=3):
|
||||
continue
|
||||
if self.handle_popup_confirm('AWAKEN'):
|
||||
continue
|
||||
if self.handle_awaken_finish():
|
||||
finished = True
|
||||
continue
|
||||
|
||||
self.device.click_record_clear()
|
||||
return 'success'
|
||||
|
||||
def get_ship_level(self, skip_first_screenshot=True):
|
||||
"""
|
||||
Args:
|
||||
skip_first_screenshot:
|
||||
|
||||
Returns:
|
||||
int: 100~125, or 0 if error
|
||||
"""
|
||||
ocr = ShipLevel(OCR_SHIP_LEVEL, letter=(255, 255, 255), threshold=128, name='ShipLevel')
|
||||
timeout = Timer(2, count=4).start()
|
||||
level = 0
|
||||
while 1:
|
||||
if skip_first_screenshot:
|
||||
skip_first_screenshot = False
|
||||
else:
|
||||
self.device.screenshot()
|
||||
|
||||
if self.is_in_awaken():
|
||||
level = ocr.ocr(self.device.image)
|
||||
if level > 0:
|
||||
return level
|
||||
if timeout.reached():
|
||||
logger.warning('get_ship_level timeout')
|
||||
return level
|
||||
|
||||
def awaken_ship(self, use_array=False, skip_first_screenshot=True):
|
||||
"""
|
||||
Awaken one ship til EXP not enough or reached stop level
|
||||
|
||||
Args:
|
||||
use_array: True to awaken to level 125, False to 120
|
||||
skip_first_screenshot:
|
||||
|
||||
Returns:
|
||||
str: 'level_max', 'insufficient', 'no_exp', 'timeout'
|
||||
|
||||
Pages:
|
||||
in: is_in_awaken
|
||||
out: is_in_awaken
|
||||
"""
|
||||
logger.hr('Awaken ship', level=1)
|
||||
logger.info(f'Awaken ship, use_array={use_array}')
|
||||
|
||||
if use_array:
|
||||
stop_level = 125
|
||||
else:
|
||||
stop_level = 120
|
||||
|
||||
if not skip_first_screenshot:
|
||||
self.device.screenshot()
|
||||
|
||||
for _ in range(7):
|
||||
level = self.get_ship_level()
|
||||
if level > 0:
|
||||
if level >= stop_level:
|
||||
logger.info(f'Awaken ship ended at stop_level')
|
||||
return 'level_max'
|
||||
else:
|
||||
result = self.awaken_once(use_array)
|
||||
# 'no_exp', 'unexpected_array', 'insufficient', 'timeout', 'success'
|
||||
if result == 'success':
|
||||
continue
|
||||
if result in ['insufficient', 'no_exp']:
|
||||
# Return as it is
|
||||
return result
|
||||
if result == 'unexpected_array':
|
||||
# Maybe just accidentally entered awaken confirm
|
||||
# Re-run awaken_once should recheck it
|
||||
continue
|
||||
if result == 'timeout':
|
||||
# Timeout getting resources, retry should fix it
|
||||
continue
|
||||
raise ScriptError(f'Unexpected awaken_once result: {result}')
|
||||
else:
|
||||
# Get level timeout, request exit
|
||||
return 'timeout'
|
||||
|
||||
# Error, request exit
|
||||
logger.warning('Too many awaken trial on one ship')
|
||||
return 'timeout'
|
||||
|
||||
def awaken_exit(self, skip_first_screenshot=True):
|
||||
"""
|
||||
Pages:
|
||||
in: is_in_awaken
|
||||
out: DOCK_CHECK
|
||||
"""
|
||||
logger.info('Awaken exit')
|
||||
interval = Timer(3)
|
||||
while 1:
|
||||
if skip_first_screenshot:
|
||||
skip_first_screenshot = False
|
||||
else:
|
||||
self.device.screenshot()
|
||||
|
||||
if self.ui_page_appear(page_dock):
|
||||
logger.info(f'Awaken exit at {page_dock}')
|
||||
break
|
||||
if interval.reached() and self.is_in_awaken():
|
||||
logger.info(f'is_in_awaken -> {BACK_ARROW}')
|
||||
self.device.click(BACK_ARROW)
|
||||
interval.reset()
|
||||
continue
|
||||
if self.handle_awaken_finish():
|
||||
continue
|
||||
if self.is_in_main(interval=5):
|
||||
self.device.click(page_main.links[page_dock])
|
||||
continue
|
||||
|
||||
def awaken_run(self, use_array=False):
|
||||
"""
|
||||
Awaken all ships in dock until resources exhausted
|
||||
|
||||
Args:
|
||||
use_array: True to awaken to level 125, False to 120
|
||||
|
||||
Returns:
|
||||
str: 'insufficient', 'finish', 'timeout'
|
||||
|
||||
Pages:
|
||||
in: Any
|
||||
out: page_dock
|
||||
"""
|
||||
logger.hr('Awaken run', level=1)
|
||||
self.ui_ensure(page_dock)
|
||||
self.dock_favourite_set(wait_loading=False)
|
||||
self.dock_sort_method_dsc_set(wait_loading=False)
|
||||
if use_array:
|
||||
extra = ['can_awaken_plus']
|
||||
else:
|
||||
extra = ['can_awaken']
|
||||
self.dock_filter_set(extra=extra)
|
||||
|
||||
while 1:
|
||||
# page_dock
|
||||
if self.appear(DOCK_EMPTY, offset=(20, 20)):
|
||||
logger.info('awaken_run finished, no ships to awaken')
|
||||
result = 'finish'
|
||||
break
|
||||
|
||||
# page_dock -> SHIP_DETAIL_CHECK
|
||||
self.ship_info_enter(
|
||||
CARD_GRIDS[(0, 0)], check_button=SHIP_DETAIL_CHECK, long_click=False)
|
||||
|
||||
# is_in_awaken
|
||||
result = self.awaken_ship(use_array)
|
||||
self.awaken_exit()
|
||||
# 'insufficient', 'no_exp', 'timeout'
|
||||
if result in ['no_exp', 'level_max']:
|
||||
# Awaken next ship
|
||||
continue
|
||||
if result == 'insufficient':
|
||||
logger.info('awaken_run finished, resources exhausted')
|
||||
break
|
||||
if result == 'timeout':
|
||||
logger.info(f'awaken_run finished, result={result}')
|
||||
break
|
||||
raise ScriptError(f'Unexpected awaken_ship result: {result}')
|
||||
|
||||
return result
|
||||
|
||||
def run(self):
|
||||
if self.config.SERVER not in ['cn']:
|
||||
logger.error(f'Task "Awaken" is not available on server {self.config.SERVER} yet, '
|
||||
f'please contact server maintainers')
|
||||
self.config.task_stop()
|
||||
|
||||
# Run Awakening+ first
|
||||
if self.config.Awaken_LevelCap == 'level125':
|
||||
# Use Cognitive Arrays
|
||||
result = self.awaken_run(use_array=True)
|
||||
# Use Cognitive Chips
|
||||
if result != 'timeout':
|
||||
self.awaken_run()
|
||||
elif self.config.Awaken_LevelCap == 'level120':
|
||||
# Use Cognitive Chips
|
||||
self.awaken_run()
|
||||
else:
|
||||
raise ScriptError(f'Unknown Awaken_LevelCap={self.config.Awaken_LevelCap}')
|
||||
|
||||
# Reset dock filters
|
||||
logger.hr('Awaken run exit', level=1)
|
||||
self.dock_filter_set(wait_loading=False)
|
||||
|
||||
# Scheduler
|
||||
self.config.task_delay(server_update=True)
|
@ -168,12 +168,11 @@ class GemsFarming(CampaignRun, FleetEquipment, Dock):
|
||||
return success
|
||||
|
||||
def _dock_reset(self):
|
||||
self.dock_favourite_set(False, wait_loading=False)
|
||||
self.dock_sort_method_dsc_set(wait_loading=False)
|
||||
self.dock_filter_set()
|
||||
self.dock_favourite_set(False)
|
||||
self.dock_sort_method_dsc_set()
|
||||
|
||||
def _ship_change_confirm(self, button):
|
||||
|
||||
self.dock_select_one(button)
|
||||
self._dock_reset()
|
||||
self.dock_select_confirm(check_button=page_fleet.check_button)
|
||||
@ -182,9 +181,16 @@ class GemsFarming(CampaignRun, FleetEquipment, Dock):
|
||||
"""
|
||||
Get a common rarity cv by config.GemsFarming_CommonCV
|
||||
If config.GemsFarming_CommonCV == 'any', return a common lv1 ~ lv33 cv
|
||||
|
||||
_dock_reset() needs to be called later.
|
||||
|
||||
Returns:
|
||||
Ship:
|
||||
"""
|
||||
self.dock_favourite_set(False, wait_loading=False)
|
||||
self.dock_sort_method_dsc_set(False, wait_loading=False)
|
||||
self.dock_filter_set(
|
||||
index='cv', rarity='common', extra='enhanceable', sort='total')
|
||||
|
||||
logger.hr('FINDING FLAGSHIP')
|
||||
|
||||
@ -194,13 +200,12 @@ class GemsFarming(CampaignRun, FleetEquipment, Dock):
|
||||
|
||||
if self.config.GemsFarming_CommonCV == 'any':
|
||||
|
||||
self.dock_sort_method_dsc_set(False)
|
||||
|
||||
ships = scanner.scan(self.device.image)
|
||||
if ships:
|
||||
# Don't need to change current
|
||||
return ships
|
||||
|
||||
# Change to any ship
|
||||
scanner.set_limitation(fleet=0)
|
||||
return scanner.scan(self.device.image, output=False)
|
||||
|
||||
@ -212,8 +217,6 @@ class GemsFarming(CampaignRun, FleetEquipment, Dock):
|
||||
'RANGER': TEMPLATE_RANGER
|
||||
}[f'{self.config.GemsFarming_CommonCV.upper()}']
|
||||
|
||||
self.dock_sort_method_dsc_set()
|
||||
|
||||
ships = scanner.scan(self.device.image)
|
||||
if ships:
|
||||
# Don't need to change current
|
||||
@ -224,10 +227,11 @@ class GemsFarming(CampaignRun, FleetEquipment, Dock):
|
||||
if template.match(self.image_crop(ship.button, copy=False), similarity=SIM_VALUE)]
|
||||
|
||||
if candidates:
|
||||
# Change to specific ship
|
||||
return candidates
|
||||
|
||||
logger.info('No specific CV was found, try reversed order.')
|
||||
self.dock_sort_method_dsc_set(False)
|
||||
self.dock_sort_method_dsc_set(True)
|
||||
|
||||
candidates = [ship for ship in scanner.scan(self.device.image)
|
||||
if template.match(self.image_crop(ship.button, copy=False), similarity=SIM_VALUE)]
|
||||
@ -237,9 +241,30 @@ class GemsFarming(CampaignRun, FleetEquipment, Dock):
|
||||
def get_common_rarity_dd(self):
|
||||
"""
|
||||
Get a common rarity dd with level is 100 (70 for servers except CN) and emotion > 10
|
||||
|
||||
_dock_reset() needs to be called later.
|
||||
|
||||
Returns:
|
||||
Ship:
|
||||
"""
|
||||
if self.config.GemsFarming_CommonDD == 'any':
|
||||
faction = ['eagle', 'iron']
|
||||
elif self.config.GemsFarming_CommonDD == 'favourite':
|
||||
faction = 'all'
|
||||
elif self.config.GemsFarming_CommonDD == 'z20_or_z21':
|
||||
faction = 'iron'
|
||||
elif self.config.GemsFarming_CommonDD in ['aulick_or_foote', 'cassin_or_downes']:
|
||||
faction = 'eagle'
|
||||
else:
|
||||
logger.error(f'Invalid CommonDD setting: {self.config.GemsFarming_CommonDD}')
|
||||
raise ScriptError('Invalid GemsFarming_CommonDD')
|
||||
|
||||
favourite = self.config.GemsFarming_CommonDD == 'favourite'
|
||||
self.dock_favourite_set(favourite, wait_loading=False)
|
||||
self.dock_sort_method_dsc_set(True, wait_loading=False)
|
||||
self.dock_filter_set(
|
||||
index='dd', rarity='common', faction=faction, extra='can_limit_break')
|
||||
|
||||
logger.hr('FINDING VANGUARD')
|
||||
|
||||
if self.config.SERVER in ['cn']:
|
||||
@ -251,29 +276,26 @@ class GemsFarming(CampaignRun, FleetEquipment, Dock):
|
||||
fleet=self.fleet_to_attack, status='free')
|
||||
scanner.disable('rarity')
|
||||
|
||||
self.dock_sort_method_dsc_set()
|
||||
|
||||
ships = scanner.scan(self.device.image)
|
||||
if ships:
|
||||
# Don't need to change current
|
||||
return ships
|
||||
|
||||
scanner.set_limitation(fleet=0)
|
||||
self.dock_favourite_set(self.config.GemsFarming_CommonDD == 'favourite')
|
||||
|
||||
if self.config.GemsFarming_CommonDD in ['any', 'favourite', 'z20_or_z21']:
|
||||
if self.config.GemsFarming_CommonDD in ['any', 'favourite']:
|
||||
# Change to any ship
|
||||
return scanner.scan(self.device.image, output=False)
|
||||
|
||||
candidates = self.find_candidates(self.get_templates(self.config.GemsFarming_CommonDD), scanner)
|
||||
|
||||
candidates = self.find_candidates(self.get_templates(self.config.GemsFarming_CommonDD), scanner)
|
||||
if candidates:
|
||||
# Change to specific ship
|
||||
return candidates
|
||||
|
||||
|
||||
logger.info('No specific DD was found, try reversed order.')
|
||||
self.dock_sort_method_dsc_set(False)
|
||||
|
||||
# Change specific ship
|
||||
candidates = self.find_candidates(self.get_templates(self.config.GemsFarming_CommonDD), scanner)
|
||||
|
||||
return candidates
|
||||
|
||||
def find_candidates(self, template, scanner):
|
||||
@ -319,9 +341,6 @@ class GemsFarming(CampaignRun, FleetEquipment, Dock):
|
||||
"""
|
||||
self.ui_click(FLEET_ENTER_FLAGSHIP,
|
||||
appear_button=page_fleet.check_button, check_button=DOCK_CHECK, skip_first_screenshot=True)
|
||||
self.dock_filter_set(
|
||||
index='cv', rarity='common', extra='enhanceable', sort='total')
|
||||
self.dock_favourite_set(False)
|
||||
|
||||
ship = self.get_common_rarity_cv()
|
||||
if ship:
|
||||
@ -347,21 +366,6 @@ class GemsFarming(CampaignRun, FleetEquipment, Dock):
|
||||
self.ui_click(FLEET_ENTER,
|
||||
appear_button=page_fleet.check_button, check_button=DOCK_CHECK, skip_first_screenshot=True)
|
||||
|
||||
if self.config.GemsFarming_CommonDD == 'any':
|
||||
faction = ['eagle', 'iron']
|
||||
elif self.config.GemsFarming_CommonDD == 'favourite':
|
||||
faction = 'all'
|
||||
elif self.config.GemsFarming_CommonDD == 'z20_or_z21':
|
||||
faction = 'iron'
|
||||
elif self.config.GemsFarming_CommonDD in ['aulick_or_foote', 'cassin_or_downes']:
|
||||
faction = 'eagle'
|
||||
else:
|
||||
logger.error(f'Invalid CommonDD setting: {self.config.GemsFarming_CommonDD}')
|
||||
raise ScriptError('Invalid GemsFarming_CommonDD')
|
||||
self.dock_filter_set(
|
||||
index='dd', rarity='common', faction=faction, extra='can_limit_break')
|
||||
self.dock_favourite_set(False)
|
||||
|
||||
ship = self.get_common_rarity_dd()
|
||||
if ship:
|
||||
self._ship_change_confirm(max(ship, key=lambda s: s.emotion).button)
|
||||
|
@ -2926,12 +2926,13 @@
|
||||
"raid_20240328"
|
||||
],
|
||||
"option_bold": [
|
||||
"raid_20240130",
|
||||
"raid_20240328"
|
||||
],
|
||||
"cn": "raid_20240328",
|
||||
"en": "raid_20240328",
|
||||
"jp": "raid_20240328",
|
||||
"tw": "raid_20240328"
|
||||
"tw": "raid_20240130"
|
||||
},
|
||||
"Mode": {
|
||||
"type": "select",
|
||||
@ -6228,12 +6229,13 @@
|
||||
"raid_20240328"
|
||||
],
|
||||
"option_bold": [
|
||||
"raid_20240130",
|
||||
"raid_20240328"
|
||||
],
|
||||
"cn": "raid_20240328",
|
||||
"en": "raid_20240328",
|
||||
"jp": "raid_20240328",
|
||||
"tw": "raid_20240328"
|
||||
"tw": "raid_20240130"
|
||||
},
|
||||
"Mode": {
|
||||
"type": "select",
|
||||
@ -7231,6 +7233,61 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"Awaken": {
|
||||
"Scheduler": {
|
||||
"Enable": {
|
||||
"type": "checkbox",
|
||||
"value": false,
|
||||
"option": [
|
||||
true,
|
||||
false
|
||||
]
|
||||
},
|
||||
"NextRun": {
|
||||
"type": "datetime",
|
||||
"value": "2020-01-01 00:00:00",
|
||||
"validate": "datetime"
|
||||
},
|
||||
"Command": {
|
||||
"type": "input",
|
||||
"value": "Awaken",
|
||||
"display": "hide"
|
||||
},
|
||||
"SuccessInterval": {
|
||||
"type": "input",
|
||||
"value": 0,
|
||||
"display": "hide"
|
||||
},
|
||||
"FailureInterval": {
|
||||
"type": "input",
|
||||
"value": 120,
|
||||
"display": "hide"
|
||||
},
|
||||
"ServerUpdate": {
|
||||
"type": "input",
|
||||
"value": "00:00",
|
||||
"display": "hide"
|
||||
}
|
||||
},
|
||||
"Awaken": {
|
||||
"LevelCap": {
|
||||
"type": "select",
|
||||
"value": "level120",
|
||||
"option": [
|
||||
"level120",
|
||||
"level125"
|
||||
]
|
||||
}
|
||||
},
|
||||
"Storage": {
|
||||
"Storage": {
|
||||
"type": "storage",
|
||||
"value": {},
|
||||
"valuetype": "ignore",
|
||||
"display": "disabled"
|
||||
}
|
||||
}
|
||||
},
|
||||
"Daily": {
|
||||
"Scheduler": {
|
||||
"Enable": {
|
||||
|
@ -449,6 +449,10 @@ Reward:
|
||||
CollectExp: true
|
||||
CollectMission: true
|
||||
CollectWeeklyMission: true
|
||||
Awaken:
|
||||
LevelCap:
|
||||
value: level120
|
||||
option: [ level120, level125 ]
|
||||
GeneralShop:
|
||||
UseGems: false
|
||||
Refresh: false
|
||||
|
@ -54,7 +54,8 @@
|
||||
"Dorm",
|
||||
"Meowfficer",
|
||||
"Guild",
|
||||
"Reward"
|
||||
"Reward",
|
||||
"Awaken"
|
||||
]
|
||||
},
|
||||
"DailyMission": {
|
||||
|
@ -215,6 +215,9 @@ Reward:
|
||||
Reward:
|
||||
- Scheduler
|
||||
- Reward
|
||||
Awaken:
|
||||
- Scheduler
|
||||
- Awaken
|
||||
|
||||
# ==================== DailyMission ====================
|
||||
|
||||
|
@ -251,6 +251,9 @@ class GeneratedConfig:
|
||||
Reward_CollectMission = True
|
||||
Reward_CollectWeeklyMission = True
|
||||
|
||||
# Group `Awaken`
|
||||
Awaken_LevelCap = 'level120' # level120, level125
|
||||
|
||||
# Group `GeneralShop`
|
||||
GeneralShop_UseGems = False
|
||||
GeneralShop_Refresh = False
|
||||
|
@ -15,12 +15,13 @@ class ManualConfig:
|
||||
> Exercise
|
||||
> Dorm > Meowfficer > Guild > Gacha
|
||||
> Reward
|
||||
> ShopFrequent > ShopOnce > Shipyard > Freebies > Minigame
|
||||
> ShopFrequent > ShopOnce > Shipyard > Freebies
|
||||
> OpsiExplore
|
||||
> Minigame > Awaken
|
||||
> OpsiAshBeacon
|
||||
> OpsiDaily > OpsiShop > OpsiVoucher
|
||||
> OpsiAbyssal > OpsiStronghold > OpsiObscure > OpsiArchive
|
||||
> Daily > Hard > OpsiAshBeacon > OpsiAshAssist > OpsiMonthBoss
|
||||
> Daily > Hard > OpsiAshBeacon > OpsiAshAssist > OpsiMonthBoss
|
||||
> Sos > EventSp > EventA > EventB > EventC > EventD
|
||||
> RaidDaily > CoalitionSp > WarArchives > MaritimeEscort
|
||||
> Event > Event2 > Raid > Coalition > Main > Main2 > Main3
|
||||
|
@ -146,6 +146,10 @@
|
||||
"name": "Reward",
|
||||
"help": ""
|
||||
},
|
||||
"Awaken": {
|
||||
"name": "Awaken",
|
||||
"help": ""
|
||||
},
|
||||
"Daily": {
|
||||
"name": "Daily",
|
||||
"help": ""
|
||||
@ -276,7 +280,7 @@
|
||||
},
|
||||
"NextRun": {
|
||||
"name": "Next Run",
|
||||
"help": "Updated automatically after completing the task to set next scheduled run, typically not manually modified\nHowever you can force immediate scheduling if you clear this text field"
|
||||
"help": "Updated automatically after completing the task to set next scheduled run, typically not manually modified\nHowever you can force immediate scheduling if text field cleared"
|
||||
},
|
||||
"Command": {
|
||||
"name": "Command",
|
||||
@ -1591,6 +1595,18 @@
|
||||
"help": ""
|
||||
}
|
||||
},
|
||||
"Awaken": {
|
||||
"_info": {
|
||||
"name": "Cognitive Awakening Settings",
|
||||
"help": "Awaken all ships in dock til cognitive chips/arrays exhausted"
|
||||
},
|
||||
"LevelCap": {
|
||||
"name": "To Level Cap",
|
||||
"help": "",
|
||||
"level120": "Lv.120",
|
||||
"level125": "Lv.125"
|
||||
}
|
||||
},
|
||||
"GeneralShop": {
|
||||
"_info": {
|
||||
"name": "General Shop Settings",
|
||||
|
@ -146,6 +146,10 @@
|
||||
"name": "収穫",
|
||||
"help": ""
|
||||
},
|
||||
"Awaken": {
|
||||
"name": "Task.Awaken.name",
|
||||
"help": "Task.Awaken.help"
|
||||
},
|
||||
"Daily": {
|
||||
"name": "デイリー",
|
||||
"help": ""
|
||||
@ -1591,6 +1595,18 @@
|
||||
"help": "Reward.CollectWeeklyMission.help"
|
||||
}
|
||||
},
|
||||
"Awaken": {
|
||||
"_info": {
|
||||
"name": "Awaken._info.name",
|
||||
"help": "Awaken._info.help"
|
||||
},
|
||||
"LevelCap": {
|
||||
"name": "Awaken.LevelCap.name",
|
||||
"help": "Awaken.LevelCap.help",
|
||||
"level120": "level120",
|
||||
"level125": "level125"
|
||||
}
|
||||
},
|
||||
"GeneralShop": {
|
||||
"_info": {
|
||||
"name": "GeneralShop._info.name",
|
||||
|
@ -146,6 +146,10 @@
|
||||
"name": "收获",
|
||||
"help": ""
|
||||
},
|
||||
"Awaken": {
|
||||
"name": "认知觉醒",
|
||||
"help": ""
|
||||
},
|
||||
"Daily": {
|
||||
"name": "每日任务",
|
||||
"help": ""
|
||||
@ -1591,6 +1595,18 @@
|
||||
"help": ""
|
||||
}
|
||||
},
|
||||
"Awaken": {
|
||||
"_info": {
|
||||
"name": "认知觉醒",
|
||||
"help": "认知觉醒船坞内所有的船直到心智单元耗尽"
|
||||
},
|
||||
"LevelCap": {
|
||||
"name": "觉醒至等级上限",
|
||||
"help": "",
|
||||
"level120": "120级",
|
||||
"level125": "125级"
|
||||
}
|
||||
},
|
||||
"GeneralShop": {
|
||||
"_info": {
|
||||
"name": "军火商(通用商店)",
|
||||
|
@ -146,6 +146,10 @@
|
||||
"name": "收穫",
|
||||
"help": ""
|
||||
},
|
||||
"Awaken": {
|
||||
"name": "認知覺醒",
|
||||
"help": ""
|
||||
},
|
||||
"Daily": {
|
||||
"name": "每日任務",
|
||||
"help": ""
|
||||
@ -743,7 +747,7 @@
|
||||
"raid_20221027": "戰鬥!皇家女僕隊3rd",
|
||||
"raid_20230118": "冬日的尋路人",
|
||||
"raid_20230629": "綠洲往事",
|
||||
"raid_20240130": "Spring Festive Fiasco",
|
||||
"raid_20240130": "寰昌宇定家事忙",
|
||||
"raid_20240328": "從零開始的魔王討伐之旅",
|
||||
"war_archives_20180607_cn": "檔案 墨染的鋼鐵之花",
|
||||
"war_archives_20180726_cn": "檔案 光與影的鳶尾之華",
|
||||
@ -1591,6 +1595,18 @@
|
||||
"help": ""
|
||||
}
|
||||
},
|
||||
"Awaken": {
|
||||
"_info": {
|
||||
"name": "認知覺醒",
|
||||
"help": "認知覺醒船塢內所有的船隻直到心智單元耗盡"
|
||||
},
|
||||
"LevelCap": {
|
||||
"name": "覺醒至等級上限",
|
||||
"help": "",
|
||||
"level120": "120級",
|
||||
"level125": "125級"
|
||||
}
|
||||
},
|
||||
"GeneralShop": {
|
||||
"_info": {
|
||||
"name": "軍火商 (通用商店)",
|
||||
|
@ -56,7 +56,7 @@ class BuyFurniture(UI):
|
||||
if self.appear(DORM_FURNITURE_DETAILS_QUIT, offset=(20, 20)):
|
||||
break
|
||||
|
||||
if self.ui_additional():
|
||||
if self.ui_additional(get_ship=False):
|
||||
self.interval_clear(DORM_CHECK)
|
||||
continue
|
||||
|
||||
|
@ -221,7 +221,7 @@ class RewardDorm(UI):
|
||||
if self.appear_then_click(DORM_MANAGE, offset=(20, 20), interval=3):
|
||||
continue
|
||||
# Handle all popups
|
||||
if self.ui_additional():
|
||||
if self.ui_additional(get_ship=False):
|
||||
continue
|
||||
if self.appear_then_click(DORM_FURNITURE_CONFIRM, offset=(30, 30), interval=3):
|
||||
continue
|
||||
@ -263,7 +263,7 @@ class RewardDorm(UI):
|
||||
self.device.screenshot()
|
||||
|
||||
# Handle all popups
|
||||
if self.ui_additional():
|
||||
if self.ui_additional(get_ship=False):
|
||||
continue
|
||||
|
||||
# Collect coins and loves through the quick collect button
|
||||
@ -423,7 +423,7 @@ class RewardDorm(UI):
|
||||
if self.appear(DORM_FEED_CHECK, offset=(20, 20)):
|
||||
break
|
||||
|
||||
if self.ui_additional():
|
||||
if self.ui_additional(get_ship=False):
|
||||
self.interval_clear(DORM_CHECK)
|
||||
continue
|
||||
if self.appear(DORM_CHECK, offset=(20, 20), interval=5):
|
||||
@ -465,7 +465,7 @@ class RewardDorm(UI):
|
||||
if self.handle_popup_cancel('DORM_FEED'):
|
||||
self.interval_clear(DORM_CHECK)
|
||||
continue
|
||||
if self.ui_additional():
|
||||
if self.ui_additional(get_ship=False):
|
||||
self.interval_clear(DORM_CHECK)
|
||||
continue
|
||||
|
||||
@ -526,7 +526,7 @@ class RewardDorm(UI):
|
||||
if self.appear_then_click(DORM_FURNITURE_CONFIRM, offset=(30, 30), interval=3):
|
||||
timeout.reset()
|
||||
continue
|
||||
if self.ui_additional():
|
||||
if self.ui_additional(get_ship=False):
|
||||
timeout.reset()
|
||||
continue
|
||||
|
||||
|
@ -88,6 +88,8 @@ class Equipment(StorageHandler):
|
||||
else:
|
||||
self.device.click(click_button)
|
||||
enter_timer.reset()
|
||||
if self.handle_game_tips():
|
||||
continue
|
||||
|
||||
@cached_property
|
||||
def _ship_side_navbar(self):
|
||||
|
@ -7,7 +7,7 @@ from module.base.template import Template
|
||||
MEOWFFICER_APPLY_LOCK = Button(area={'cn': (36, 560, 82, 582), 'en': (41, 561, 82, 579), 'jp': (33, 556, 86, 578), 'tw': (35, 559, 83, 581)}, color={'cn': (205, 179, 148), 'en': (209, 183, 130), 'jp': (216, 190, 140), 'tw': (202, 176, 141)}, button={'cn': (36, 560, 82, 582), 'en': (41, 561, 82, 579), 'jp': (33, 556, 86, 578), 'tw': (35, 559, 83, 581)}, file={'cn': './assets/cn/meowfficer/MEOWFFICER_APPLY_LOCK.png', 'en': './assets/en/meowfficer/MEOWFFICER_APPLY_LOCK.png', 'jp': './assets/jp/meowfficer/MEOWFFICER_APPLY_LOCK.png', 'tw': './assets/tw/meowfficer/MEOWFFICER_APPLY_LOCK.png'})
|
||||
MEOWFFICER_APPLY_UNLOCK = Button(area={'cn': (35, 559, 83, 582), 'en': (42, 562, 90, 579), 'jp': (33, 557, 85, 580), 'tw': (35, 558, 81, 580)}, color={'cn': (200, 176, 147), 'en': (198, 170, 124), 'jp': (208, 184, 144), 'tw': (198, 175, 145)}, button={'cn': (35, 559, 83, 582), 'en': (42, 562, 90, 579), 'jp': (33, 557, 85, 580), 'tw': (35, 558, 81, 580)}, file={'cn': './assets/cn/meowfficer/MEOWFFICER_APPLY_UNLOCK.png', 'en': './assets/en/meowfficer/MEOWFFICER_APPLY_UNLOCK.png', 'jp': './assets/jp/meowfficer/MEOWFFICER_APPLY_UNLOCK.png', 'tw': './assets/tw/meowfficer/MEOWFFICER_APPLY_UNLOCK.png'})
|
||||
MEOWFFICER_BUY = Button(area={'cn': (864, 461, 957, 493), 'en': (864, 463, 957, 495), 'jp': (863, 460, 957, 494), 'tw': (879, 463, 935, 493)}, color={'cn': (241, 217, 105), 'en': (231, 206, 102), 'jp': (241, 216, 107), 'tw': (224, 199, 98)}, button={'cn': (864, 461, 957, 493), 'en': (864, 463, 957, 495), 'jp': (863, 460, 957, 494), 'tw': (879, 463, 935, 493)}, file={'cn': './assets/cn/meowfficer/MEOWFFICER_BUY.png', 'en': './assets/en/meowfficer/MEOWFFICER_BUY.png', 'jp': './assets/jp/meowfficer/MEOWFFICER_BUY.png', 'tw': './assets/tw/meowfficer/MEOWFFICER_BUY.png'})
|
||||
MEOWFFICER_BUY_ENTER = Button(area={'cn': (975, 580, 1084, 649), 'en': (1003, 611, 1067, 643), 'jp': (975, 580, 1084, 649), 'tw': (981, 571, 1082, 641)}, color={'cn': (206, 177, 135), 'en': (187, 162, 159), 'jp': (206, 177, 135), 'tw': (211, 176, 134)}, button={'cn': (975, 580, 1084, 649), 'en': (1003, 611, 1067, 643), 'jp': (975, 580, 1084, 649), 'tw': (981, 571, 1082, 641)}, file={'cn': './assets/cn/meowfficer/MEOWFFICER_BUY_ENTER.png', 'en': './assets/en/meowfficer/MEOWFFICER_BUY_ENTER.png', 'jp': './assets/jp/meowfficer/MEOWFFICER_BUY_ENTER.png', 'tw': './assets/tw/meowfficer/MEOWFFICER_BUY_ENTER.png'})
|
||||
MEOWFFICER_BUY_ENTER = Button(area={'cn': (975, 580, 1084, 649), 'en': (1003, 611, 1067, 643), 'jp': (975, 580, 1084, 649), 'tw': (981, 571, 1082, 641)}, color={'cn': (206, 177, 135), 'en': (189, 161, 149), 'jp': (206, 177, 135), 'tw': (211, 176, 134)}, button={'cn': (975, 580, 1084, 649), 'en': (1003, 611, 1067, 643), 'jp': (975, 580, 1084, 649), 'tw': (981, 571, 1082, 641)}, file={'cn': './assets/cn/meowfficer/MEOWFFICER_BUY_ENTER.png', 'en': './assets/en/meowfficer/MEOWFFICER_BUY_ENTER.png', 'jp': './assets/jp/meowfficer/MEOWFFICER_BUY_ENTER.png', 'tw': './assets/tw/meowfficer/MEOWFFICER_BUY_ENTER.png'})
|
||||
MEOWFFICER_BUY_NEXT = Button(area={'cn': (877, 279, 902, 304), 'en': (879, 276, 903, 306), 'jp': (877, 279, 902, 304), 'tw': (877, 279, 902, 304)}, color={'cn': (254, 228, 139), 'en': (254, 226, 137), 'jp': (254, 228, 139), 'tw': (254, 228, 139)}, button={'cn': (877, 279, 902, 304), 'en': (879, 276, 903, 306), 'jp': (877, 279, 902, 304), 'tw': (877, 279, 902, 304)}, file={'cn': './assets/cn/meowfficer/MEOWFFICER_BUY_NEXT.png', 'en': './assets/en/meowfficer/MEOWFFICER_BUY_NEXT.png', 'jp': './assets/jp/meowfficer/MEOWFFICER_BUY_NEXT.png', 'tw': './assets/tw/meowfficer/MEOWFFICER_BUY_NEXT.png'})
|
||||
MEOWFFICER_BUY_PREV = Button(area={'cn': (759, 279, 783, 302), 'en': (759, 277, 783, 307), 'jp': (759, 279, 783, 302), 'tw': (759, 279, 783, 302)}, color={'cn': (254, 224, 124), 'en': (254, 223, 118), 'jp': (254, 224, 124), 'tw': (254, 224, 124)}, button={'cn': (759, 279, 783, 302), 'en': (759, 277, 783, 307), 'jp': (759, 279, 783, 302), 'tw': (759, 279, 783, 302)}, file={'cn': './assets/cn/meowfficer/MEOWFFICER_BUY_PREV.png', 'en': './assets/en/meowfficer/MEOWFFICER_BUY_PREV.png', 'jp': './assets/jp/meowfficer/MEOWFFICER_BUY_PREV.png', 'tw': './assets/tw/meowfficer/MEOWFFICER_BUY_PREV.png'})
|
||||
MEOWFFICER_BUY_SKIP = Button(area={'cn': (594, 462, 687, 494), 'en': (594, 462, 687, 494), 'jp': (599, 466, 685, 493), 'tw': (609, 469, 672, 494)}, color={'cn': (240, 218, 104), 'en': (240, 218, 103), 'jp': (228, 202, 97), 'tw': (222, 200, 87)}, button={'cn': (594, 462, 687, 494), 'en': (594, 462, 687, 494), 'jp': (599, 466, 685, 493), 'tw': (609, 469, 672, 494)}, file={'cn': './assets/cn/meowfficer/MEOWFFICER_BUY_SKIP.png', 'en': './assets/en/meowfficer/MEOWFFICER_BUY_SKIP.png', 'jp': './assets/jp/meowfficer/MEOWFFICER_BUY_SKIP.png', 'tw': './assets/tw/meowfficer/MEOWFFICER_BUY_SKIP.png'})
|
||||
|
@ -32,15 +32,15 @@ GORIZIA_RAID_EASY = Button(area={'cn': (1071, 515, 1118, 538), 'en': (1071, 520,
|
||||
GORIZIA_RAID_EX = Button(area={'cn': (978, 210, 1050, 242), 'en': (978, 210, 1050, 242), 'jp': (978, 210, 1050, 242), 'tw': (978, 210, 1050, 242)}, color={'cn': (166, 186, 137), 'en': (166, 186, 137), 'jp': (166, 186, 137), 'tw': (166, 186, 137)}, button={'cn': (978, 210, 1050, 242), 'en': (978, 210, 1050, 242), 'jp': (978, 210, 1050, 242), 'tw': (978, 210, 1050, 242)}, file={'cn': './assets/cn/raid/GORIZIA_RAID_EX.png', 'en': './assets/en/raid/GORIZIA_RAID_EX.png', 'jp': './assets/jp/raid/GORIZIA_RAID_EX.png', 'tw': './assets/tw/raid/GORIZIA_RAID_EX.png'})
|
||||
GORIZIA_RAID_HARD = Button(area={'cn': (1072, 348, 1118, 370), 'en': (1065, 352, 1116, 368), 'jp': (1056, 345, 1126, 371), 'tw': (1070, 346, 1120, 372)}, color={'cn': (169, 172, 162), 'en': (183, 185, 177), 'jp': (215, 217, 212), 'tw': (179, 182, 173)}, button={'cn': (1072, 348, 1118, 370), 'en': (1065, 352, 1116, 368), 'jp': (1056, 345, 1126, 371), 'tw': (1070, 346, 1120, 372)}, file={'cn': './assets/cn/raid/GORIZIA_RAID_HARD.png', 'en': './assets/en/raid/GORIZIA_RAID_HARD.png', 'jp': './assets/jp/raid/GORIZIA_RAID_HARD.png', 'tw': './assets/tw/raid/GORIZIA_RAID_HARD.png'})
|
||||
GORIZIA_RAID_NORMAL = Button(area={'cn': (1108, 430, 1153, 453), 'en': (1087, 435, 1163, 451), 'jp': (1105, 429, 1157, 454), 'tw': (1107, 429, 1155, 454)}, color={'cn': (177, 179, 171), 'en': (189, 191, 183), 'jp': (196, 198, 192), 'tw': (187, 189, 181)}, button={'cn': (1108, 430, 1153, 453), 'en': (1087, 435, 1163, 451), 'jp': (1105, 429, 1157, 454), 'tw': (1107, 429, 1155, 454)}, file={'cn': './assets/cn/raid/GORIZIA_RAID_NORMAL.png', 'en': './assets/en/raid/GORIZIA_RAID_NORMAL.png', 'jp': './assets/jp/raid/GORIZIA_RAID_NORMAL.png', 'tw': './assets/tw/raid/GORIZIA_RAID_NORMAL.png'})
|
||||
HUANCHANG_OCR_PT = Button(area={'cn': (1166, 604, 1279, 635), 'en': (1166, 604, 1279, 635), 'jp': (1166, 604, 1279, 635), 'tw': (1166, 604, 1279, 635)}, color={'cn': (143, 143, 144), 'en': (143, 143, 144), 'jp': (143, 143, 144), 'tw': (143, 143, 144)}, button={'cn': (1166, 604, 1279, 635), 'en': (1166, 604, 1279, 635), 'jp': (1166, 604, 1279, 635), 'tw': (1166, 604, 1279, 635)}, file={'cn': './assets/cn/raid/HUANCHANG_OCR_PT.png', 'en': './assets/en/raid/HUANCHANG_OCR_PT.png', 'jp': './assets/jp/raid/HUANCHANG_OCR_PT.png', 'tw': './assets/cn/raid/HUANCHANG_OCR_PT.png'})
|
||||
HUANCHANG_OCR_REMAIN_EASY = Button(area={'cn': (961, 548, 983, 567), 'en': (961, 522, 983, 540), 'jp': (961, 548, 983, 567), 'tw': (961, 548, 983, 567)}, color={'cn': (136, 134, 134), 'en': (143, 141, 140), 'jp': (136, 134, 134), 'tw': (136, 134, 134)}, button={'cn': (961, 548, 983, 567), 'en': (961, 522, 983, 540), 'jp': (961, 548, 983, 567), 'tw': (961, 548, 983, 567)}, file={'cn': './assets/cn/raid/HUANCHANG_OCR_REMAIN_EASY.png', 'en': './assets/en/raid/HUANCHANG_OCR_REMAIN_EASY.png', 'jp': './assets/jp/raid/HUANCHANG_OCR_REMAIN_EASY.png', 'tw': './assets/cn/raid/HUANCHANG_OCR_REMAIN_EASY.png'})
|
||||
HUANCHANG_OCR_REMAIN_EX = Button(area={'cn': (1082, 16, 1151, 42), 'en': (1082, 16, 1151, 42), 'jp': (1082, 16, 1151, 42), 'tw': (1082, 16, 1151, 42)}, color={'cn': (54, 54, 54), 'en': (54, 54, 54), 'jp': (54, 54, 54), 'tw': (54, 54, 54)}, button={'cn': (1082, 16, 1151, 42), 'en': (1082, 16, 1151, 42), 'jp': (1082, 16, 1151, 42), 'tw': (1082, 16, 1151, 42)}, file={'cn': './assets/cn/raid/HUANCHANG_OCR_REMAIN_EX.png', 'en': './assets/en/raid/HUANCHANG_OCR_REMAIN_EX.png', 'jp': './assets/jp/raid/HUANCHANG_OCR_REMAIN_EX.png', 'tw': './assets/cn/raid/HUANCHANG_OCR_REMAIN_EX.png'})
|
||||
HUANCHANG_OCR_REMAIN_HARD = Button(area={'cn': (1146, 548, 1168, 567), 'en': (1145, 522, 1167, 540), 'jp': (1146, 548, 1168, 567), 'tw': (1146, 548, 1168, 567)}, color={'cn': (159, 157, 158), 'en': (163, 162, 162), 'jp': (159, 157, 158), 'tw': (159, 157, 158)}, button={'cn': (1146, 548, 1168, 567), 'en': (1145, 522, 1167, 540), 'jp': (1146, 548, 1168, 567), 'tw': (1146, 548, 1168, 567)}, file={'cn': './assets/cn/raid/HUANCHANG_OCR_REMAIN_HARD.png', 'en': './assets/en/raid/HUANCHANG_OCR_REMAIN_HARD.png', 'jp': './assets/jp/raid/HUANCHANG_OCR_REMAIN_HARD.png', 'tw': './assets/cn/raid/HUANCHANG_OCR_REMAIN_HARD.png'})
|
||||
HUANCHANG_OCR_REMAIN_NORMAL = Button(area={'cn': (1054, 548, 1076, 567), 'en': (1054, 522, 1076, 540), 'jp': (1054, 548, 1076, 567), 'tw': (1054, 548, 1076, 567)}, color={'cn': (136, 136, 135), 'en': (146, 148, 147), 'jp': (136, 136, 135), 'tw': (136, 136, 135)}, button={'cn': (1054, 548, 1076, 567), 'en': (1054, 522, 1076, 540), 'jp': (1054, 548, 1076, 567), 'tw': (1054, 548, 1076, 567)}, file={'cn': './assets/cn/raid/HUANCHANG_OCR_REMAIN_NORMAL.png', 'en': './assets/en/raid/HUANCHANG_OCR_REMAIN_NORMAL.png', 'jp': './assets/jp/raid/HUANCHANG_OCR_REMAIN_NORMAL.png', 'tw': './assets/cn/raid/HUANCHANG_OCR_REMAIN_NORMAL.png'})
|
||||
HUANCHANG_RAID_EASY = Button(area={'cn': (951, 487, 995, 536), 'en': (950, 456, 993, 516), 'jp': (952, 484, 995, 538), 'tw': (951, 487, 995, 536)}, color={'cn': (100, 100, 99), 'en': (93, 93, 92), 'jp': (98, 97, 97), 'tw': (100, 100, 99)}, button={'cn': (951, 487, 995, 536), 'en': (950, 456, 993, 516), 'jp': (952, 484, 995, 538), 'tw': (951, 487, 995, 536)}, file={'cn': './assets/cn/raid/HUANCHANG_RAID_EASY.png', 'en': './assets/en/raid/HUANCHANG_RAID_EASY.png', 'jp': './assets/jp/raid/HUANCHANG_RAID_EASY.png', 'tw': './assets/cn/raid/HUANCHANG_RAID_EASY.png'})
|
||||
HUANCHANG_RAID_EX = Button(area={'cn': (1111, 352, 1170, 381), 'en': (1114, 328, 1173, 357), 'jp': (1111, 352, 1170, 381), 'tw': (1111, 352, 1170, 381)}, color={'cn': (126, 160, 161), 'en': (126, 160, 161), 'jp': (126, 160, 161), 'tw': (126, 160, 161)}, button={'cn': (1111, 352, 1170, 381), 'en': (1114, 328, 1173, 357), 'jp': (1111, 352, 1170, 381), 'tw': (1111, 352, 1170, 381)}, file={'cn': './assets/cn/raid/HUANCHANG_RAID_EX.png', 'en': './assets/en/raid/HUANCHANG_RAID_EX.png', 'jp': './assets/jp/raid/HUANCHANG_RAID_EX.png', 'tw': './assets/cn/raid/HUANCHANG_RAID_EX.png'})
|
||||
HUANCHANG_RAID_HARD = Button(area={'cn': (1135, 487, 1178, 536), 'en': (1135, 456, 1179, 516), 'jp': (1135, 484, 1177, 538), 'tw': (1135, 487, 1178, 536)}, color={'cn': (118, 118, 119), 'en': (106, 105, 106), 'jp': (107, 107, 108), 'tw': (118, 118, 119)}, button={'cn': (1135, 487, 1178, 536), 'en': (1135, 456, 1179, 516), 'jp': (1135, 484, 1177, 538), 'tw': (1135, 487, 1178, 536)}, file={'cn': './assets/cn/raid/HUANCHANG_RAID_HARD.png', 'en': './assets/en/raid/HUANCHANG_RAID_HARD.png', 'jp': './assets/jp/raid/HUANCHANG_RAID_HARD.png', 'tw': './assets/cn/raid/HUANCHANG_RAID_HARD.png'})
|
||||
HUANCHANG_RAID_NORMAL = Button(area={'cn': (1044, 487, 1088, 536), 'en': (1044, 456, 1088, 516), 'jp': (1044, 484, 1087, 538), 'tw': (1044, 487, 1088, 536)}, color={'cn': (106, 108, 108), 'en': (109, 110, 110), 'jp': (99, 101, 100), 'tw': (106, 108, 108)}, button={'cn': (1044, 487, 1088, 536), 'en': (1044, 456, 1088, 516), 'jp': (1044, 484, 1087, 538), 'tw': (1044, 487, 1088, 536)}, file={'cn': './assets/cn/raid/HUANCHANG_RAID_NORMAL.png', 'en': './assets/en/raid/HUANCHANG_RAID_NORMAL.png', 'jp': './assets/jp/raid/HUANCHANG_RAID_NORMAL.png', 'tw': './assets/cn/raid/HUANCHANG_RAID_NORMAL.png'})
|
||||
HUANCHANG_OCR_PT = Button(area={'cn': (1166, 604, 1279, 635), 'en': (1166, 604, 1279, 635), 'jp': (1166, 604, 1279, 635), 'tw': (1166, 604, 1279, 635)}, color={'cn': (143, 143, 144), 'en': (143, 143, 144), 'jp': (143, 143, 144), 'tw': (143, 143, 144)}, button={'cn': (1166, 604, 1279, 635), 'en': (1166, 604, 1279, 635), 'jp': (1166, 604, 1279, 635), 'tw': (1166, 604, 1279, 635)}, file={'cn': './assets/cn/raid/HUANCHANG_OCR_PT.png', 'en': './assets/en/raid/HUANCHANG_OCR_PT.png', 'jp': './assets/jp/raid/HUANCHANG_OCR_PT.png', 'tw': './assets/tw/raid/HUANCHANG_OCR_PT.png'})
|
||||
HUANCHANG_OCR_REMAIN_EASY = Button(area={'cn': (961, 548, 983, 567), 'en': (961, 522, 983, 540), 'jp': (961, 548, 983, 567), 'tw': (961, 548, 983, 567)}, color={'cn': (136, 134, 134), 'en': (143, 141, 140), 'jp': (136, 134, 134), 'tw': (136, 134, 134)}, button={'cn': (961, 548, 983, 567), 'en': (961, 522, 983, 540), 'jp': (961, 548, 983, 567), 'tw': (961, 548, 983, 567)}, file={'cn': './assets/cn/raid/HUANCHANG_OCR_REMAIN_EASY.png', 'en': './assets/en/raid/HUANCHANG_OCR_REMAIN_EASY.png', 'jp': './assets/jp/raid/HUANCHANG_OCR_REMAIN_EASY.png', 'tw': './assets/tw/raid/HUANCHANG_OCR_REMAIN_EASY.png'})
|
||||
HUANCHANG_OCR_REMAIN_EX = Button(area={'cn': (1082, 16, 1151, 42), 'en': (1082, 16, 1151, 42), 'jp': (1082, 16, 1151, 42), 'tw': (1082, 16, 1151, 42)}, color={'cn': (54, 54, 54), 'en': (54, 54, 54), 'jp': (54, 54, 54), 'tw': (54, 54, 54)}, button={'cn': (1082, 16, 1151, 42), 'en': (1082, 16, 1151, 42), 'jp': (1082, 16, 1151, 42), 'tw': (1082, 16, 1151, 42)}, file={'cn': './assets/cn/raid/HUANCHANG_OCR_REMAIN_EX.png', 'en': './assets/en/raid/HUANCHANG_OCR_REMAIN_EX.png', 'jp': './assets/jp/raid/HUANCHANG_OCR_REMAIN_EX.png', 'tw': './assets/tw/raid/HUANCHANG_OCR_REMAIN_EX.png'})
|
||||
HUANCHANG_OCR_REMAIN_HARD = Button(area={'cn': (1146, 548, 1168, 567), 'en': (1145, 522, 1167, 540), 'jp': (1146, 548, 1168, 567), 'tw': (1146, 548, 1168, 567)}, color={'cn': (159, 157, 158), 'en': (163, 162, 162), 'jp': (159, 157, 158), 'tw': (159, 157, 158)}, button={'cn': (1146, 548, 1168, 567), 'en': (1145, 522, 1167, 540), 'jp': (1146, 548, 1168, 567), 'tw': (1146, 548, 1168, 567)}, file={'cn': './assets/cn/raid/HUANCHANG_OCR_REMAIN_HARD.png', 'en': './assets/en/raid/HUANCHANG_OCR_REMAIN_HARD.png', 'jp': './assets/jp/raid/HUANCHANG_OCR_REMAIN_HARD.png', 'tw': './assets/tw/raid/HUANCHANG_OCR_REMAIN_HARD.png'})
|
||||
HUANCHANG_OCR_REMAIN_NORMAL = Button(area={'cn': (1054, 548, 1076, 567), 'en': (1054, 522, 1076, 540), 'jp': (1054, 548, 1076, 567), 'tw': (1054, 548, 1076, 567)}, color={'cn': (136, 136, 135), 'en': (146, 148, 147), 'jp': (136, 136, 135), 'tw': (136, 136, 135)}, button={'cn': (1054, 548, 1076, 567), 'en': (1054, 522, 1076, 540), 'jp': (1054, 548, 1076, 567), 'tw': (1054, 548, 1076, 567)}, file={'cn': './assets/cn/raid/HUANCHANG_OCR_REMAIN_NORMAL.png', 'en': './assets/en/raid/HUANCHANG_OCR_REMAIN_NORMAL.png', 'jp': './assets/jp/raid/HUANCHANG_OCR_REMAIN_NORMAL.png', 'tw': './assets/tw/raid/HUANCHANG_OCR_REMAIN_NORMAL.png'})
|
||||
HUANCHANG_RAID_EASY = Button(area={'cn': (951, 487, 995, 536), 'en': (950, 456, 993, 516), 'jp': (952, 484, 995, 538), 'tw': (961, 481, 984, 544)}, color={'cn': (100, 100, 99), 'en': (93, 93, 92), 'jp': (98, 97, 97), 'tw': (112, 112, 111)}, button={'cn': (951, 487, 995, 536), 'en': (950, 456, 993, 516), 'jp': (952, 484, 995, 538), 'tw': (961, 481, 984, 544)}, file={'cn': './assets/cn/raid/HUANCHANG_RAID_EASY.png', 'en': './assets/en/raid/HUANCHANG_RAID_EASY.png', 'jp': './assets/jp/raid/HUANCHANG_RAID_EASY.png', 'tw': './assets/tw/raid/HUANCHANG_RAID_EASY.png'})
|
||||
HUANCHANG_RAID_EX = Button(area={'cn': (1111, 352, 1170, 381), 'en': (1114, 328, 1173, 357), 'jp': (1111, 352, 1170, 381), 'tw': (1111, 352, 1170, 381)}, color={'cn': (126, 160, 161), 'en': (126, 160, 161), 'jp': (126, 160, 161), 'tw': (126, 160, 161)}, button={'cn': (1111, 352, 1170, 381), 'en': (1114, 328, 1173, 357), 'jp': (1111, 352, 1170, 381), 'tw': (1111, 352, 1170, 381)}, file={'cn': './assets/cn/raid/HUANCHANG_RAID_EX.png', 'en': './assets/en/raid/HUANCHANG_RAID_EX.png', 'jp': './assets/jp/raid/HUANCHANG_RAID_EX.png', 'tw': './assets/tw/raid/HUANCHANG_RAID_EX.png'})
|
||||
HUANCHANG_RAID_HARD = Button(area={'cn': (1135, 487, 1178, 536), 'en': (1135, 456, 1179, 516), 'jp': (1135, 484, 1177, 538), 'tw': (1143, 481, 1171, 545)}, color={'cn': (118, 118, 119), 'en': (106, 105, 106), 'jp': (107, 107, 108), 'tw': (120, 121, 121)}, button={'cn': (1135, 487, 1178, 536), 'en': (1135, 456, 1179, 516), 'jp': (1135, 484, 1177, 538), 'tw': (1143, 481, 1171, 545)}, file={'cn': './assets/cn/raid/HUANCHANG_RAID_HARD.png', 'en': './assets/en/raid/HUANCHANG_RAID_HARD.png', 'jp': './assets/jp/raid/HUANCHANG_RAID_HARD.png', 'tw': './assets/tw/raid/HUANCHANG_RAID_HARD.png'})
|
||||
HUANCHANG_RAID_NORMAL = Button(area={'cn': (1044, 487, 1088, 536), 'en': (1044, 456, 1088, 516), 'jp': (1044, 484, 1087, 538), 'tw': (1051, 481, 1078, 543)}, color={'cn': (106, 108, 108), 'en': (109, 110, 110), 'jp': (99, 101, 100), 'tw': (104, 106, 105)}, button={'cn': (1044, 487, 1088, 536), 'en': (1044, 456, 1088, 516), 'jp': (1044, 484, 1087, 538), 'tw': (1051, 481, 1078, 543)}, file={'cn': './assets/cn/raid/HUANCHANG_RAID_NORMAL.png', 'en': './assets/en/raid/HUANCHANG_RAID_NORMAL.png', 'jp': './assets/jp/raid/HUANCHANG_RAID_NORMAL.png', 'tw': './assets/tw/raid/HUANCHANG_RAID_NORMAL.png'})
|
||||
IRIS_OCR_PT = Button(area={'cn': (1140, 607, 1280, 641), 'en': (1140, 607, 1280, 641), 'jp': (1140, 607, 1280, 641), 'tw': (1140, 607, 1280, 641)}, color={'cn': (40, 43, 36), 'en': (40, 43, 36), 'jp': (40, 43, 36), 'tw': (40, 43, 36)}, button={'cn': (1140, 607, 1280, 641), 'en': (1140, 607, 1280, 641), 'jp': (1140, 607, 1280, 641), 'tw': (1140, 607, 1280, 641)}, file={'cn': './assets/cn/raid/IRIS_OCR_PT.png', 'en': './assets/en/raid/IRIS_OCR_PT.png', 'jp': './assets/jp/raid/IRIS_OCR_PT.png', 'tw': './assets/tw/raid/IRIS_OCR_PT.png'})
|
||||
IRIS_OCR_REMAIN_EASY = Button(area={'cn': (1047, 514, 1103, 534), 'en': (1046, 514, 1106, 534), 'jp': (1048, 515, 1113, 535), 'tw': (1046, 515, 1106, 535)}, color={'cn': (50, 49, 44), 'en': (68, 66, 59), 'jp': (56, 56, 50), 'tw': (53, 49, 48)}, button={'cn': (1047, 514, 1103, 534), 'en': (1046, 514, 1106, 534), 'jp': (1048, 515, 1113, 535), 'tw': (1046, 515, 1106, 535)}, file={'cn': './assets/cn/raid/IRIS_OCR_REMAIN_EASY.png', 'en': './assets/en/raid/IRIS_OCR_REMAIN_EASY.png', 'jp': './assets/jp/raid/IRIS_OCR_REMAIN_EASY.png', 'tw': './assets/tw/raid/IRIS_OCR_REMAIN_EASY.png'})
|
||||
IRIS_OCR_REMAIN_HARD = Button(area={'cn': (1166, 312, 1221, 332), 'en': (1165, 312, 1225, 332), 'jp': (1167, 313, 1232, 333), 'tw': (1165, 313, 1222, 332)}, color={'cn': (48, 44, 38), 'en': (65, 61, 53), 'jp': (51, 48, 41), 'tw': (50, 46, 45)}, button={'cn': (1166, 312, 1221, 332), 'en': (1165, 312, 1225, 332), 'jp': (1167, 313, 1232, 333), 'tw': (1165, 313, 1222, 332)}, file={'cn': './assets/cn/raid/IRIS_OCR_REMAIN_HARD.png', 'en': './assets/en/raid/IRIS_OCR_REMAIN_HARD.png', 'jp': './assets/jp/raid/IRIS_OCR_REMAIN_HARD.png', 'tw': './assets/tw/raid/IRIS_OCR_REMAIN_HARD.png'})
|
||||
|
@ -40,9 +40,15 @@ class Dock(Equipment):
|
||||
self.device.sleep((1, 1.5))
|
||||
self.device.screenshot()
|
||||
|
||||
def dock_favourite_set(self, enable=False):
|
||||
def dock_favourite_set(self, enable=False, wait_loading=True):
|
||||
"""
|
||||
Args:
|
||||
enable: True to filter favourite ships only
|
||||
wait_loading: Default to True, use False on continuous operation
|
||||
"""
|
||||
if DOCK_FAVOURITE.set('on' if enable else 'off', main=self):
|
||||
self.handle_dock_cards_loading()
|
||||
if wait_loading:
|
||||
self.handle_dock_cards_loading()
|
||||
|
||||
def _dock_quit_check_func(self):
|
||||
return not self.appear(DOCK_CHECK, offset=(20, 20))
|
||||
@ -50,15 +56,25 @@ class Dock(Equipment):
|
||||
def dock_quit(self):
|
||||
self.ui_back(check_button=self._dock_quit_check_func, skip_first_screenshot=True)
|
||||
|
||||
def dock_sort_method_dsc_set(self, enable=True):
|
||||
def dock_sort_method_dsc_set(self, enable=True, wait_loading=True):
|
||||
"""
|
||||
Args:
|
||||
enable: True to set descending sorting
|
||||
wait_loading: Default to True, use False on continuous operation
|
||||
"""
|
||||
if DOCK_SORTING.set('Descending' if enable else 'Ascending', main=self):
|
||||
self.handle_dock_cards_loading()
|
||||
if wait_loading:
|
||||
self.handle_dock_cards_loading()
|
||||
|
||||
def dock_filter_enter(self):
|
||||
self.ui_click(DOCK_FILTER, appear_button=DOCK_CHECK, check_button=DOCK_FILTER_CONFIRM,
|
||||
skip_first_screenshot=True)
|
||||
|
||||
def dock_filter_confirm(self, wait_loading=True):
|
||||
"""
|
||||
Args:
|
||||
wait_loading: Default to True, use False on continuous operation
|
||||
"""
|
||||
self.ui_click(DOCK_FILTER_CONFIRM, check_button=DOCK_CHECK, skip_first_screenshot=True)
|
||||
if wait_loading:
|
||||
self.handle_dock_cards_loading()
|
||||
@ -122,14 +138,19 @@ class Dock(Equipment):
|
||||
A faster filter set function.
|
||||
|
||||
Args:
|
||||
sort (str, list): ['rarity', 'level', 'total', 'join', 'intimacy', 'stat']
|
||||
index (str, list): [['all', 'vanguard', 'main', 'dd', 'cl', 'ca'],
|
||||
['bb', 'cv', 'repair', 'ss', 'others', 'not_available']]
|
||||
faction (str, list): [['all', 'eagle', 'royal', 'sakura', 'iron', 'dragon'],
|
||||
['sardegna', 'northern', 'iris', 'vichya', 'other', 'not_available']]
|
||||
rarity (str, list): [['all', 'common', 'rare', 'elite', 'super_rare', 'ultra']]
|
||||
extra (str, list): [['no_limit', 'has_skin', 'can_retrofit', 'enhanceable', 'can_limit_break', 'not_level_max'],
|
||||
['can_awaken', 'can_awaken_plus', 'special', 'oath_skin', 'not_available', 'not_available']]
|
||||
sort (str, list):
|
||||
['rarity', 'level', 'total', 'join', 'intimacy', 'mood', 'stat']
|
||||
index (str, list):
|
||||
['all', 'vanguard', 'main', 'dd', 'cl', 'ca', 'bb',
|
||||
'cv', 'repair', 'ss', 'others', 'not_available', 'not_available', 'not_available']
|
||||
faction (str, list):
|
||||
['all', 'eagle', 'royal', 'sakura', 'iron', 'dragon', 'sardegna',
|
||||
'northern', 'iris', 'vichya', 'other', 'not_available', 'not_available', 'not_available']
|
||||
rarity (str, list):
|
||||
['all', 'common', 'rare', 'elite', 'super_rare', 'ultra', 'not_available']
|
||||
extra (str, list):
|
||||
['no_limit', 'has_skin', 'can_retrofit', 'enhanceable', 'can_limit_break', 'not_level_max', 'can_awaken',
|
||||
'can_awaken_plus', 'special', 'oath_skin', 'unique_augment_module', 'not_available', 'not_available', 'not_available'],
|
||||
|
||||
Pages:
|
||||
in: page_dock
|
||||
|
@ -43,7 +43,7 @@ class Enhancement(Dock):
|
||||
available to be picked.
|
||||
"""
|
||||
if favourite:
|
||||
self.dock_favourite_set(enable=True)
|
||||
self.dock_favourite_set(enable=True, wait_loading=False)
|
||||
|
||||
if ship_type is not None:
|
||||
ship_type = str(ship_type)
|
||||
@ -65,7 +65,7 @@ class Enhancement(Dock):
|
||||
out: page_dock
|
||||
"""
|
||||
self.ui_back(DOCK_CHECK)
|
||||
self.dock_favourite_set(enable=False)
|
||||
self.dock_favourite_set(enable=False, wait_loading=False)
|
||||
self.dock_filter_set()
|
||||
|
||||
def _enhance_confirm(self, skip_first_screenshot=True):
|
||||
|
@ -149,13 +149,13 @@ class Retirement(Enhancement, QuickRetireSettingHandler):
|
||||
|
||||
def retirement_appear(self):
|
||||
return self.appear(RETIRE_APPEAR_1, offset=30) \
|
||||
and self.appear(RETIRE_APPEAR_2, offset=30) \
|
||||
and self.appear(RETIRE_APPEAR_3, offset=30)
|
||||
and self.appear(RETIRE_APPEAR_2, offset=30) \
|
||||
and self.appear(RETIRE_APPEAR_3, offset=30)
|
||||
|
||||
def _retirement_quit(self):
|
||||
def check_func():
|
||||
return not self.appear(IN_RETIREMENT_CHECK, offset=(20, 20)) \
|
||||
and not self.appear(DOCK_CHECK, offset=(20, 20))
|
||||
and not self.appear(DOCK_CHECK, offset=(20, 20))
|
||||
|
||||
self.ui_back(check_button=check_func, skip_first_screenshot=True)
|
||||
|
||||
@ -175,7 +175,9 @@ class Retirement(Enhancement, QuickRetireSettingHandler):
|
||||
def retire_ships_one_click(self):
|
||||
logger.hr('Retirement')
|
||||
logger.info('Using one click retirement.')
|
||||
self.dock_favourite_set(False)
|
||||
# No need to wait, one-click-retire doesn't need to check dock
|
||||
self.dock_favourite_set(wait_loading=False)
|
||||
self.dock_sort_method_dsc_set(wait_loading=False)
|
||||
end = False
|
||||
total = 0
|
||||
|
||||
@ -185,6 +187,7 @@ class Retirement(Enhancement, QuickRetireSettingHandler):
|
||||
while 1:
|
||||
self.handle_info_bar()
|
||||
|
||||
# ONE_CLICK_RETIREMENT -> SHIP_CONFIRM_2 or info_bar_count
|
||||
skip_first_screenshot = True
|
||||
click_count = 0
|
||||
while 1:
|
||||
@ -212,8 +215,10 @@ class Retirement(Enhancement, QuickRetireSettingHandler):
|
||||
click_count += 1
|
||||
continue
|
||||
|
||||
# info_bar_count
|
||||
if end:
|
||||
break
|
||||
# SHIP_CONFIRM_2 -> IN_RETIREMENT_CHECK
|
||||
self._retirement_confirm()
|
||||
total += 10
|
||||
# if total >= amount:
|
||||
@ -248,10 +253,11 @@ class Retirement(Enhancement, QuickRetireSettingHandler):
|
||||
'SSR': 'super_rare'
|
||||
}
|
||||
_rarity = [correspond_name[i] for i in rarity]
|
||||
self.dock_filter_set(sort='level', index='all',
|
||||
faction='all', rarity=_rarity, extra='no_limit')
|
||||
self.dock_sort_method_dsc_set(False)
|
||||
self.dock_favourite_set(False)
|
||||
self.dock_sort_method_dsc_set(False, wait_loading=False)
|
||||
self.dock_favourite_set(False, wait_loading=False)
|
||||
self.dock_filter_set(
|
||||
sort='level', index='all', faction='all', rarity=_rarity, extra='no_limit')
|
||||
|
||||
total = 0
|
||||
|
||||
if self.retire_keep_common_cv:
|
||||
@ -277,7 +283,7 @@ class Retirement(Enhancement, QuickRetireSettingHandler):
|
||||
self.handle_dock_cards_loading()
|
||||
continue
|
||||
|
||||
self.dock_sort_method_dsc_set(True)
|
||||
self.dock_sort_method_dsc_set(True, wait_loading=False)
|
||||
self.dock_filter_set()
|
||||
logger.info(f'Total retired: {total}')
|
||||
return total
|
||||
@ -295,8 +301,9 @@ class Retirement(Enhancement, QuickRetireSettingHandler):
|
||||
logger.info('Not in GemsFarming, skip')
|
||||
return 0
|
||||
|
||||
self.dock_favourite_set(wait_loading=False)
|
||||
self.dock_sort_method_dsc_set(wait_loading=False)
|
||||
self.dock_filter_set(index='cv', rarity='common', extra='not_level_max', sort='level')
|
||||
self.dock_favourite_set(False)
|
||||
|
||||
scanner = ShipScanner(
|
||||
rarity='common', fleet=0, status='free', level=(2, 100))
|
||||
@ -326,14 +333,19 @@ class Retirement(Enhancement, QuickRetireSettingHandler):
|
||||
ships.sort(key=lambda s: -s.level)
|
||||
ships = ships[:-1]
|
||||
|
||||
for ship in ships[:10]:
|
||||
for ship in ships:
|
||||
self.device.click(ship.button)
|
||||
self.device.sleep((0.1, 0.15))
|
||||
total += 1
|
||||
|
||||
self._retirement_confirm()
|
||||
|
||||
# Quick exit if there's only a few CV to retire
|
||||
if len(ships) < 10:
|
||||
break
|
||||
|
||||
self._have_kept_cv = _
|
||||
# No need to wait, retire finished, just about to exit
|
||||
self.dock_filter_set(wait_loading=False)
|
||||
|
||||
return total
|
||||
@ -410,8 +422,8 @@ class Retirement(Enhancement, QuickRetireSettingHandler):
|
||||
if not total:
|
||||
logger.warning(
|
||||
'No ship retired, trying to reset dock filter and disable favourite, then retire again')
|
||||
self.dock_favourite_set(False, wait_loading=False)
|
||||
self.dock_filter_set()
|
||||
self.dock_favourite_set(False)
|
||||
total = self.retire_ships_one_click()
|
||||
if self.server_support_quick_retire_setting_fallback():
|
||||
# Some users may have already set filter_5='all', try with it first
|
||||
|
@ -606,12 +606,12 @@ class RewardTacticalClass(Dock):
|
||||
def select_suitable_ship(self):
|
||||
logger.hr(f'Select suitable ship')
|
||||
|
||||
# Set if favorite from config
|
||||
self.dock_favourite_set(enable=self.config.AddNewStudent_Favorite, wait_loading=False)
|
||||
|
||||
# reset filter
|
||||
self.dock_filter_set()
|
||||
|
||||
# Set if favorite from config
|
||||
self.dock_favourite_set(enable=self.config.AddNewStudent_Favorite)
|
||||
|
||||
# No ship in dock
|
||||
if self.appear(DOCK_EMPTY, offset=(30, 30)):
|
||||
logger.info('Dock is empty or favorite ships is empty')
|
||||
|
@ -47,6 +47,7 @@ GUILD_CHECK = Button(area={'cn': (121, 15, 199, 39), 'en': (121, 15, 196, 39), '
|
||||
IDLE = Button(area={'cn': (864, 672, 873, 688), 'en': (864, 672, 873, 688), 'jp': (864, 672, 873, 688), 'tw': (864, 672, 873, 688)}, color={'cn': (158, 159, 167), 'en': (158, 159, 167), 'jp': (158, 159, 167), 'tw': (158, 159, 167)}, button={'cn': (864, 672, 873, 688), 'en': (864, 672, 873, 688), 'jp': (864, 672, 873, 688), 'tw': (864, 672, 873, 688)}, file={'cn': './assets/cn/ui/IDLE.png', 'en': './assets/en/ui/IDLE.png', 'jp': './assets/jp/ui/IDLE.png', 'tw': './assets/tw/ui/IDLE.png'})
|
||||
MAIN_GOTO_BUILD = Button(area={'cn': (958, 665, 1113, 714), 'en': (962, 688, 1109, 711), 'jp': (1035, 674, 1088, 702), 'tw': (963, 671, 1091, 709)}, color={'cn': (129, 83, 76), 'en': (145, 88, 79), 'jp': (187, 131, 125), 'tw': (145, 93, 85)}, button={'cn': (958, 665, 1113, 714), 'en': (962, 688, 1109, 711), 'jp': (1035, 674, 1088, 702), 'tw': (963, 671, 1091, 709)}, file={'cn': './assets/cn/ui/MAIN_GOTO_BUILD.png', 'en': './assets/en/ui/MAIN_GOTO_BUILD.png', 'jp': './assets/jp/ui/MAIN_GOTO_BUILD.png', 'tw': './assets/tw/ui/MAIN_GOTO_BUILD.png'})
|
||||
MAIN_GOTO_CAMPAIGN = Button(area={'cn': (1029, 304, 1102, 342), 'en': (1027, 307, 1118, 333), 'jp': (1019, 305, 1096, 343), 'tw': (1026, 303, 1104, 344)}, color={'cn': (240, 213, 157), 'en': (243, 219, 165), 'jp': (239, 210, 155), 'tw': (240, 213, 162)}, button={'cn': (1021, 292, 1160, 432), 'en': (1018, 293, 1156, 431), 'jp': (1006, 288, 1155, 436), 'tw': (1014, 288, 1159, 433)}, file={'cn': './assets/cn/ui/MAIN_GOTO_CAMPAIGN.png', 'en': './assets/en/ui/MAIN_GOTO_CAMPAIGN.png', 'jp': './assets/jp/ui/MAIN_GOTO_CAMPAIGN.png', 'tw': './assets/tw/ui/MAIN_GOTO_CAMPAIGN.png'})
|
||||
MAIN_GOTO_DOCK = Button(area={'cn': (172, 668, 326, 715), 'en': (172, 668, 326, 715), 'jp': (172, 668, 326, 715), 'tw': (172, 668, 326, 715)}, color={'cn': (72, 90, 122), 'en': (72, 90, 122), 'jp': (72, 90, 122), 'tw': (72, 90, 122)}, button={'cn': (172, 668, 326, 715), 'en': (172, 668, 326, 715), 'jp': (172, 668, 326, 715), 'tw': (172, 668, 326, 715)}, file={'cn': './assets/cn/ui/MAIN_GOTO_DOCK.png', 'en': './assets/en/ui/MAIN_GOTO_DOCK.png', 'jp': './assets/jp/ui/MAIN_GOTO_DOCK.png', 'tw': './assets/tw/ui/MAIN_GOTO_DOCK.png'})
|
||||
MAIN_GOTO_DORMMENU = Button(area={'cn': (1029, 304, 1102, 342), 'en': (1027, 307, 1118, 333), 'jp': (1006, 288, 1155, 436), 'tw': (1026, 303, 1104, 344)}, color={'cn': (240, 213, 157), 'en': (243, 219, 165), 'jp': (216, 171, 100), 'tw': (240, 213, 162)}, button={'cn': (488, 667, 638, 712), 'en': (498, 670, 631, 713), 'jp': (491, 670, 635, 710), 'tw': (488, 667, 638, 712)}, file={'cn': './assets/cn/ui/MAIN_GOTO_DORMMENU.png', 'en': './assets/en/ui/MAIN_GOTO_DORMMENU.png', 'jp': './assets/jp/ui/MAIN_GOTO_DORMMENU.png', 'tw': './assets/tw/ui/MAIN_GOTO_DORMMENU.png'})
|
||||
MAIN_GOTO_EVENT_LIST = Button(area={'cn': (607, 141, 657, 191), 'en': (607, 141, 657, 191), 'jp': (607, 141, 657, 191), 'tw': (607, 141, 657, 191)}, color={'cn': (216, 187, 187), 'en': (216, 187, 187), 'jp': (216, 187, 187), 'tw': (216, 187, 187)}, button={'cn': (607, 141, 657, 191), 'en': (607, 141, 657, 191), 'jp': (607, 141, 657, 191), 'tw': (607, 141, 657, 191)}, file={'cn': './assets/cn/ui/MAIN_GOTO_EVENT_LIST.png', 'en': './assets/en/ui/MAIN_GOTO_EVENT_LIST.png', 'jp': './assets/jp/ui/MAIN_GOTO_EVENT_LIST.png', 'tw': './assets/tw/ui/MAIN_GOTO_EVENT_LIST.png'})
|
||||
MAIN_GOTO_FLEET = Button(area={'cn': (859, 372, 936, 410), 'en': (832, 378, 975, 404), 'jp': (736, 360, 985, 435), 'tw': (855, 371, 936, 411)}, color={'cn': (187, 216, 248), 'en': (183, 215, 247), 'jp': (107, 164, 233), 'tw': (180, 212, 248)}, button={'cn': (749, 364, 992, 430), 'en': (777, 365, 987, 423), 'jp': (736, 360, 985, 435), 'tw': (741, 364, 990, 435)}, file={'cn': './assets/cn/ui/MAIN_GOTO_FLEET.png', 'en': './assets/en/ui/MAIN_GOTO_FLEET.png', 'jp': './assets/jp/ui/MAIN_GOTO_FLEET.png', 'tw': './assets/tw/ui/MAIN_GOTO_FLEET.png'})
|
||||
|
@ -2,6 +2,7 @@ import traceback
|
||||
|
||||
from module.coalition.assets import *
|
||||
from module.raid.assets import *
|
||||
from module.retire.assets import DOCK_CHECK
|
||||
from module.ui.assets import *
|
||||
from module.ui_white.assets import *
|
||||
|
||||
@ -202,6 +203,12 @@ page_raid.link(button=GOTO_MAIN, destination=page_main)
|
||||
page_main.link(button=MAIN_GOTO_RAID, destination=page_raid)
|
||||
# page_main_white.link(button=MAIN_GOTO_RAID_WHITE, destination=page_raid)
|
||||
|
||||
# Dock
|
||||
page_dock = Page(DOCK_CHECK)
|
||||
page_dock.link(button=GOTO_MAIN, destination=page_main)
|
||||
page_main.link(button=MAIN_GOTO_DOCK, destination=page_dock)
|
||||
page_main_white.link(button=MAIN_GOTO_DOCK_WHITE, destination=page_dock)
|
||||
|
||||
# Research
|
||||
# Please don't goto page_research from page_reward.
|
||||
page_research = Page(RESEARCH_CHECK)
|
||||
|
@ -451,7 +451,7 @@ class UI(InfoHandler):
|
||||
|
||||
return False
|
||||
|
||||
def ui_additional(self):
|
||||
def ui_additional(self, get_ship=True):
|
||||
"""
|
||||
Handle all annoying popups during UI switching.
|
||||
"""
|
||||
@ -468,7 +468,7 @@ class UI(InfoHandler):
|
||||
return True
|
||||
|
||||
# Popups appear at page_main, page_reward
|
||||
if self.ui_page_main_popups():
|
||||
if self.ui_page_main_popups(get_ship=get_ship):
|
||||
return True
|
||||
|
||||
# Story
|
||||
|
@ -10,6 +10,7 @@ MAIL_CHECK = Button(area={'cn': (141, 21, 181, 41), 'en': (141, 21, 181, 41), 'j
|
||||
MAIL_ENTER_WHITE = Button(area={'cn': (1018, 22, 1087, 52), 'en': (1018, 22, 1085, 52), 'jp': (1020, 23, 1084, 51), 'tw': (1019, 21, 1086, 52)}, color={'cn': (194, 187, 190), 'en': (196, 194, 194), 'jp': (195, 187, 190), 'tw': (204, 196, 200)}, button={'cn': (1018, 22, 1087, 52), 'en': (1018, 22, 1085, 52), 'jp': (1020, 23, 1084, 51), 'tw': (1019, 21, 1086, 52)}, file={'cn': './assets/cn/ui_white/MAIL_ENTER_WHITE.png', 'en': './assets/en/ui_white/MAIL_ENTER_WHITE.png', 'jp': './assets/jp/ui_white/MAIL_ENTER_WHITE.png', 'tw': './assets/tw/ui_white/MAIL_ENTER_WHITE.png'})
|
||||
MAIN_GOTO_BUILD_WHITE = Button(area={'cn': (959, 657, 1103, 703), 'en': (959, 657, 1104, 703), 'jp': (959, 657, 1105, 703), 'tw': (959, 657, 1105, 703)}, color={'cn': (229, 216, 216), 'en': (226, 220, 222), 'jp': (225, 216, 218), 'tw': (223, 212, 218)}, button={'cn': (959, 657, 1103, 703), 'en': (959, 657, 1104, 703), 'jp': (959, 657, 1105, 703), 'tw': (959, 657, 1105, 703)}, file={'cn': './assets/cn/ui_white/MAIN_GOTO_BUILD_WHITE.png', 'en': './assets/en/ui_white/MAIN_GOTO_BUILD_WHITE.png', 'jp': './assets/jp/ui_white/MAIN_GOTO_BUILD_WHITE.png', 'tw': './assets/tw/ui_white/MAIN_GOTO_BUILD_WHITE.png'})
|
||||
MAIN_GOTO_CAMPAIGN_WHITE = Button(area={'cn': (1132, 529, 1187, 557), 'en': (1126, 549, 1219, 577), 'jp': (1133, 528, 1186, 554), 'tw': (1133, 527, 1188, 554)}, color={'cn': (152, 161, 161), 'en': (156, 164, 165), 'jp': (156, 165, 165), 'tw': (143, 152, 151)}, button={'cn': (1124, 437, 1260, 579), 'en': (1123, 439, 1260, 580), 'jp': (1123, 438, 1260, 580), 'tw': (1124, 437, 1260, 580)}, file={'cn': './assets/cn/ui_white/MAIN_GOTO_CAMPAIGN_WHITE.png', 'en': './assets/en/ui_white/MAIN_GOTO_CAMPAIGN_WHITE.png', 'jp': './assets/jp/ui_white/MAIN_GOTO_CAMPAIGN_WHITE.png', 'tw': './assets/tw/ui_white/MAIN_GOTO_CAMPAIGN_WHITE.png'})
|
||||
MAIN_GOTO_DOCK_WHITE = Button(area={'cn': (176, 656, 322, 703), 'en': (176, 656, 322, 703), 'jp': (176, 656, 322, 703), 'tw': (176, 656, 322, 703)}, color={'cn': (226, 226, 230), 'en': (226, 226, 230), 'jp': (226, 226, 230), 'tw': (226, 226, 230)}, button={'cn': (176, 656, 322, 703), 'en': (176, 656, 322, 703), 'jp': (176, 656, 322, 703), 'tw': (176, 656, 322, 703)}, file={'cn': './assets/cn/ui_white/MAIN_GOTO_DOCK_WHITE.png', 'en': './assets/en/ui_white/MAIN_GOTO_DOCK_WHITE.png', 'jp': './assets/jp/ui_white/MAIN_GOTO_DOCK_WHITE.png', 'tw': './assets/tw/ui_white/MAIN_GOTO_DOCK_WHITE.png'})
|
||||
MAIN_GOTO_DORMMENU_WHITE = Button(area={'cn': (490, 656, 634, 702), 'en': (490, 657, 635, 703), 'jp': (489, 657, 635, 703), 'tw': (489, 656, 635, 703)}, color={'cn': (206, 205, 209), 'en': (218, 216, 217), 'jp': (225, 221, 227), 'tw': (218, 215, 219)}, button={'cn': (490, 656, 634, 702), 'en': (490, 657, 635, 703), 'jp': (489, 657, 635, 703), 'tw': (489, 656, 635, 703)}, file={'cn': './assets/cn/ui_white/MAIN_GOTO_DORMMENU_WHITE.png', 'en': './assets/en/ui_white/MAIN_GOTO_DORMMENU_WHITE.png', 'jp': './assets/jp/ui_white/MAIN_GOTO_DORMMENU_WHITE.png', 'tw': './assets/tw/ui_white/MAIN_GOTO_DORMMENU_WHITE.png'})
|
||||
MAIN_GOTO_EVENT_LIST_WHITE = Button(area={'cn': (1181, 83, 1260, 160), 'en': (1179, 82, 1260, 161), 'jp': (1180, 83, 1261, 161), 'tw': (1179, 82, 1260, 161)}, color={'cn': (147, 155, 186), 'en': (148, 156, 184), 'jp': (146, 155, 186), 'tw': (185, 171, 160)}, button={'cn': (1181, 83, 1260, 160), 'en': (1179, 82, 1260, 161), 'jp': (1180, 83, 1261, 161), 'tw': (1179, 82, 1260, 161)}, file={'cn': './assets/cn/ui_white/MAIN_GOTO_EVENT_LIST_WHITE.png', 'en': './assets/en/ui_white/MAIN_GOTO_EVENT_LIST_WHITE.png', 'jp': './assets/jp/ui_white/MAIN_GOTO_EVENT_LIST_WHITE.png', 'tw': './assets/tw/ui_white/MAIN_GOTO_EVENT_LIST_WHITE.png'})
|
||||
MAIN_GOTO_FLEET_WHITE = Button(area={'cn': (1025, 437, 1097, 579), 'en': (1024, 436, 1099, 580), 'jp': (1024, 437, 1099, 580), 'tw': (1024, 437, 1099, 580)}, color={'cn': (230, 229, 231), 'en': (218, 217, 218), 'jp': (235, 234, 236), 'tw': (232, 230, 233)}, button={'cn': (1025, 437, 1097, 579), 'en': (1024, 436, 1099, 580), 'jp': (1024, 437, 1099, 580), 'tw': (1024, 437, 1099, 580)}, file={'cn': './assets/cn/ui_white/MAIN_GOTO_FLEET_WHITE.png', 'en': './assets/en/ui_white/MAIN_GOTO_FLEET_WHITE.png', 'jp': './assets/jp/ui_white/MAIN_GOTO_FLEET_WHITE.png', 'tw': './assets/tw/ui_white/MAIN_GOTO_FLEET_WHITE.png'})
|
||||
|