@ -1,3 +1,6 @@
|
||||
[English Quick Guide](doc%2FQuick_guide.md)
|
||||
|
||||
[English Readme](README_en.md) `Translation in progress`
|
||||
# AzurLaneAutoScript
|
||||
|
||||
Alas, an Azur Lane automation tool with GUI (For CN server, can support other server).
|
||||
|
@ -1,3 +1,5 @@
|
||||
- Under process of localization
|
||||
|
||||
# AzurLaneAutoScript
|
||||
|
||||
Alas, an Azur Lane automation tool with GUI (For CN server, can support other server).
|
||||
|
BIN
assets/cn/template/TEMPLATE_SIREN_DD.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
assets/en/combat/BATTLE_STATUS_C.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
assets/en/combat/BATTLE_STATUS_D.png
Normal file
After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 9.9 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 9.8 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 9.8 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 7.9 KiB |
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 8.5 KiB |
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 9.5 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 13 KiB |
BIN
assets/en/template/TEMPLATE_SIREN_DD.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 8.7 KiB |
@ -14,9 +14,7 @@ MAP.map_data = '''
|
||||
SP -- -- ME ++ -- ME -- MB
|
||||
'''
|
||||
|
||||
|
||||
class Config:
|
||||
SUBMARINE = 1
|
||||
POOR_MAP_DATA = True
|
||||
MAP_HAS_AMBUSH = False
|
||||
MAP_HAS_FLEET_STEP = True
|
||||
|
@ -15,7 +15,6 @@ MAP.map_data = '''
|
||||
'''
|
||||
|
||||
class Config:
|
||||
SUBMARINE = 1
|
||||
POOR_MAP_DATA = True
|
||||
MAP_HAS_AMBUSH = False
|
||||
MAP_HAS_FLEET_STEP = True
|
||||
|
@ -2,58 +2,61 @@ from module.campaign.campaign_base import CampaignBase
|
||||
from module.map.map_base import CampaignMap
|
||||
from module.map.map_grids import SelectedGrids, RoadGrids
|
||||
from module.logger import logger
|
||||
# from campaign.event_20200521_en.a1 import Config
|
||||
|
||||
MAP = CampaignMap('a3')
|
||||
# MAP.shape = 'K7'
|
||||
MAP.shape = 'K7'
|
||||
# MAP.camera_data = ['D2', 'D5', 'F3', 'F5']
|
||||
# MAP.map_data = '''
|
||||
# SP ++ ++ ++ ME -- -- -- ME -- MM
|
||||
# -- -- -- -- -- -- ME -- -- -- --
|
||||
# ME -- ++ ME -- -- -- -- ++ ++ --
|
||||
# ME -- -- -- MS ++ __ -- MB ++ --
|
||||
# -- -- ME -- -- -- -- -- -- -- --
|
||||
# -- -- ++ ++ ME ME -- ME ++ ++ ++
|
||||
# SP -- ++ MM ME -- -- -- -- ME MM
|
||||
# '''
|
||||
MAP.map_data = '''
|
||||
SP ++ ++ ++ -- -- -- -- -- -- MM
|
||||
-- -- -- -- -- -- -- -- -- -- --
|
||||
-- -- ++ -- -- -- -- -- ++ ++ --
|
||||
-- -- -- -- MS ++ -- -- MB ++ --
|
||||
-- -- -- -- -- -- -- -- -- -- --
|
||||
-- -- ++ ++ -- -- -- -- ++ ++ ++
|
||||
SP -- ++ ++ -- -- -- -- -- -- MM
|
||||
SP ++ ++ ++ ME -- -- -- ME -- MM
|
||||
-- -- -- -- -- -- ME -- -- -- --
|
||||
ME -- ++ ME -- -- -- -- ++ ++ --
|
||||
ME -- -- -- MS ++ __ -- MB ++ --
|
||||
-- -- ME -- -- -- -- -- -- -- --
|
||||
-- -- ++ ++ ME ME -- ME ++ ++ ++
|
||||
SP -- ++ MM ME -- -- -- -- ME MM
|
||||
'''
|
||||
|
||||
# MAP.spawn_data = [
|
||||
# {'battle': 0, 'enemy': 2, 'siren': 1},
|
||||
# {'battle': 1, 'enemy': 1},
|
||||
# {'battle': 2, 'enemy': 1},
|
||||
# {'battle': 3, 'enemy': 1},
|
||||
# {'battle': 4, 'enemy': 1, 'boss': 1},
|
||||
# ]
|
||||
|
||||
# A1, B1, C1, D1, E1, F1, G1, H1, I1, J1, K1, \
|
||||
# A2, B2, C2, D2, E2, F2, G2, H2, I2, J2, K2, \
|
||||
# A3, B3, C3, D3, E3, F3, G3, H3, I3, J3, K3, \
|
||||
# A4, B4, C4, D4, E4, F4, G4, H4, I4, J4, K4, \
|
||||
# A5, B5, C5, D5, E5, F5, G5, H5, I5, J5, K5, \
|
||||
# A6, B6, C6, D6, E6, F6, G6, H6, I6, J6, K6, \
|
||||
# A7, B7, C7, D7, E7, F7, G7, H7, I7, J7, K7, \
|
||||
# = MAP.flatten()
|
||||
# MAP.map_data = '''
|
||||
# SP ++ ++ ++ -- -- -- -- -- -- --
|
||||
# -- -- -- -- -- -- -- -- -- -- --
|
||||
# -- -- ++ -- -- -- -- -- ++ ++ --
|
||||
# -- -- -- -- -- ++ -- -- -- ++ --
|
||||
# -- -- -- -- -- -- -- -- -- -- --
|
||||
# -- -- ++ ++ -- -- -- -- ++ ++ ++
|
||||
# SP -- ++ ++ -- -- -- -- -- -- --
|
||||
# '''
|
||||
|
||||
class Config:
|
||||
SUBMARINE = 0
|
||||
FLEET_BOSS = 2
|
||||
|
||||
POOR_MAP_DATA = True
|
||||
MAP_HAS_AMBUSH = False
|
||||
MAP_HAS_FLEET_STEP = True
|
||||
MAP_HAS_MOVABLE_ENEMY = True
|
||||
MAP_HAS_FLEET_STEP = False
|
||||
MAP_HAS_MOVABLE_ENEMY = False
|
||||
MAP_HAS_SIREN = True
|
||||
MAP_HAS_DYNAMIC_RED_BORDER = True
|
||||
MAP_SIREN_COUNT = 1
|
||||
MAP_GRID_CENTER_TOLERANCE = 0.3
|
||||
MAP_SIREN_TEMPLATE = ['1', '2', '3', 'DD']
|
||||
|
||||
INTERNAL_LINES_HOUGHLINES_THRESHOLD = 50
|
||||
MID_DIFF_RANGE_H = (45, 70)
|
||||
MID_DIFF_RANGE_V = (97 - 3, 97 + 3)
|
||||
TRUST_EDGE_LINES = True
|
||||
|
||||
VANISH_POINT_RANGE = ((540, 740), (-4000, -2000))
|
||||
DISTANCE_POINT_X_RANGE = ((-2000, -1000),)
|
||||
INTERNAL_LINES_FIND_PEAKS_PARAMETERS = {
|
||||
'height': (80, 255 - 40),
|
||||
'width': (0.9, 10),
|
||||
'prominence': 10,
|
||||
'distance': 35,
|
||||
'wlen': 100,
|
||||
}
|
||||
EDGE_LINES_FIND_PEAKS_PARAMETERS = {
|
||||
'height': (255 - 40, 255),
|
||||
'prominence': 10,
|
||||
'distance': 50,
|
||||
'wlen': 1000
|
||||
}
|
||||
|
||||
|
||||
class Campaign(CampaignBase):
|
||||
MAP = MAP
|
@ -19,7 +19,6 @@ MAP.map_data = '''
|
||||
'''
|
||||
|
||||
class Config:
|
||||
SUBMARINE = 1
|
||||
POOR_MAP_DATA = True
|
||||
MAP_HAS_AMBUSH = False
|
||||
MAP_HAS_FLEET_STEP = False
|
||||
|
@ -17,31 +17,39 @@ MAP.map_data = '''
|
||||
SP -- ++ ++ ME -- -- -- -- ME MM
|
||||
'''
|
||||
|
||||
A1, B1, C1, D1, E1, F1, G1, H1, I1, J1, K1, \
|
||||
A2, B2, C2, D2, E2, F2, G2, H2, I2, J2, K2, \
|
||||
A3, B3, C3, D3, E3, F3, G3, H3, I3, J3, K3, \
|
||||
A4, B4, C4, D4, E4, F4, G4, H4, I4, J4, K4, \
|
||||
A5, B5, C5, D5, E5, F5, G5, H5, I5, J5, K5, \
|
||||
A6, B6, C6, D6, E6, F6, G6, H6, I6, J6, K6, \
|
||||
A7, B7, C7, D7, E7, F7, G7, H7, I7, J7, K7, \
|
||||
= MAP.flatten()
|
||||
# A1, B1, C1, D1, E1, F1, G1, H1, I1, J1, K1, \
|
||||
# A2, B2, C2, D2, E2, F2, G2, H2, I2, J2, K2, \
|
||||
# A3, B3, C3, D3, E3, F3, G3, H3, I3, J3, K3, \
|
||||
# A4, B4, C4, D4, E4, F4, G4, H4, I4, J4, K4, \
|
||||
# A5, B5, C5, D5, E5, F5, G5, H5, I5, J5, K5, \
|
||||
# A6, B6, C6, D6, E6, F6, G6, H6, I6, J6, K6, \
|
||||
# A7, B7, C7, D7, E7, F7, G7, H7, I7, J7, K7, \
|
||||
# = MAP.flatten()
|
||||
|
||||
class Config:
|
||||
POOR_MAP_DATA = True
|
||||
MAP_HAS_AMBUSH = False
|
||||
MAP_HAS_FLEET_STEP = True
|
||||
MAP_HAS_MOVABLE_ENEMY = True
|
||||
MAP_HAS_FLEET_STEP = False
|
||||
MAP_HAS_MOVABLE_ENEMY = False
|
||||
MAP_HAS_SIREN = True
|
||||
MAP_HAS_DYNAMIC_RED_BORDER = True
|
||||
# MAP_HAS_DYNAMIC_RED_BORDER = False
|
||||
MAP_SIREN_COUNT = 2
|
||||
MAP_GRID_CENTER_TOLERANCE = 0.3
|
||||
MAP_SIREN_TEMPLATE = ['1', '2', '3', 'DD']
|
||||
|
||||
INTERNAL_LINES_HOUGHLINES_THRESHOLD = 50
|
||||
MID_DIFF_RANGE_H = (45, 70)
|
||||
MID_DIFF_RANGE_V = (97 - 3, 97 + 3)
|
||||
TRUST_EDGE_LINES = True
|
||||
|
||||
VANISH_POINT_RANGE = ((540, 740), (-4000, -2000))
|
||||
DISTANCE_POINT_X_RANGE = ((-2000, -1000),)
|
||||
INTERNAL_LINES_FIND_PEAKS_PARAMETERS = {
|
||||
'height': (80, 255 - 40),
|
||||
'width': (0.9, 10),
|
||||
'prominence': 10,
|
||||
'distance': 35,
|
||||
'wlen': 100,
|
||||
}
|
||||
EDGE_LINES_FIND_PEAKS_PARAMETERS = {
|
||||
'height': (255 - 40, 255),
|
||||
|
@ -33,9 +33,8 @@ MAP.spawn_data = [
|
||||
]
|
||||
|
||||
class Config:
|
||||
SUBMARINE = 1
|
||||
FLEET_BOSS = 2
|
||||
|
||||
SUBMARINE = 0
|
||||
FLEET_BOSS = 0
|
||||
MAP_HAS_AMBUSH = False
|
||||
MAP_HAS_FLEET_STEP = False
|
||||
MAP_HAS_MOVABLE_ENEMY = False
|
||||
|
113
doc/Quick_guide.md
Normal file
@ -0,0 +1,113 @@
|
||||
# Quick guide
|
||||
|
||||
#### Requirements
|
||||
|
||||
* A good PC (Potato PC may have problems running the emulator correctly)
|
||||
* [Python](https://www.python.org/downloads/release/python-376/) installed and added to PATH (recommended 3.7.6 64bit version only)
|
||||
* Latest [ADB](https://developer.android.com/studio/releases/platform-tools) added to PATH.
|
||||
* [I don't know how to add to PATH](https://www.youtube.com/watch?v=Y2q_b4ugPWk)
|
||||
* The use of a virtual environment (venv) in python is highly recommended
|
||||
* ADB debugging enabled and emulator with 1280x720 resolution
|
||||
* **Read the entire guide before asking any questions.**
|
||||
|
||||
|
||||
# How to create e python virtual environment
|
||||
|
||||
* First install [Python](https://www.python.org/ftp/python/3.7.6/python-3.7.6-amd64.exe)
|
||||
|
||||
* Create a folder where you will put the virtual environment, I recommend creating a folder `venv` in the project's root directory
|
||||
* Go to project root in command line
|
||||
* type `python -m venv path_to_your_folder\venv`
|
||||
|
||||
![venv](quickguide.assets/venv.png)
|
||||
|
||||
You can see that now python has created some folders and files in the venv folder, it has created a completely clean virtual environment, thus preventing any conflicts.
|
||||
* Now, it is necessary to activate the virtual environment in command line, go to project root (the same where you have the file alas.py) and type `.\venv\scripts\activate.bat`
|
||||
|
||||
![venv_activate](quickguide.assets/venv_activate.png)
|
||||
|
||||
Look that a `(venv)`, with that we know that we are in a virtual environment.
|
||||
|
||||
If you type `pip list` should get this output:
|
||||
|
||||
![pip_list](quickguide.assets/pip_list.png)
|
||||
|
||||
Now, you can proceed with the installation of the requirements through `pip install -r requirements.txt`
|
||||
|
||||
|
||||
|
||||
#### Installation
|
||||
|
||||
* Clone this repository
|
||||
* Install the requirements.txt (`pip install -r requirements.txt`)
|
||||
* Install an android emulator (Tested on BlueStacks)
|
||||
* The android emulator resolution must be set to `1280x720`
|
||||
|
||||
* Test if the ADB is working correctly `adb devices`
|
||||
|
||||
The output must be something like this
|
||||
|
||||
![ADB](quickguide.assets/adb_test.png)
|
||||
|
||||
Test if your Python is working correctly `python --version`
|
||||
|
||||
![Python](quickguide.assets/python_test.png)
|
||||
|
||||
* Install uiautomator2
|
||||
|
||||
uiautomator2, is an automated test library that can speed up screenshots and clicks. You can also use ADB to perform screenshots and clicks, but it is a slower way.
|
||||
|
||||
For performance optimization, it is recommended to use ADB screenshots, uiautomat2 screenshot slightly faster than adb screenshot, but cpu consumption double.
|
||||
|
||||
* Perform
|
||||
|
||||
`python -m uiautomator2 init`
|
||||
|
||||
The output must be something like this:
|
||||
|
||||
![U2](quickguide.assets/u2_test.png)
|
||||
(in this case, I had already installed)
|
||||
|
||||
* Check if uiautomator2 was installed successfully
|
||||
|
||||
Modify the `serial` in \dev_tools\emulator_test.py line 31 and, execute from root project directory (the same where you have the file alas.py)
|
||||
|
||||
`python -m dev_tools.emulator_test`
|
||||
|
||||
The output must be something like this:
|
||||
|
||||
![emulator_test](quickguide.assets/emulator_test.png)
|
||||
|
||||
The default `serial` for some emulators:
|
||||
|
||||
| Android Emulator | serial |
|
||||
|------------------|-----------------|
|
||||
| NoxPlayer | 127.0.0.1:62001 |
|
||||
| MuMuPlayer | 127.0.0.1:7555 |
|
||||
| Bluestacks | 127.0.0.1:5555 |
|
||||
| LDPlayer | emulator-5554 |
|
||||
|
||||
You can check a new app installed in your emulator:
|
||||
|
||||
![emulator_test](quickguide.assets/atx.png)
|
||||
|
||||
If you open up can check if are running:
|
||||
|
||||
![emulator_test](quickguide.assets/atx_running.png)
|
||||
|
||||
If are not running, you cannot use U2 and will get error.
|
||||
|
||||
|
||||
## How to use Use
|
||||
|
||||
Double-click alas.pyw to run via graphical interface (GUI), If dont work you can double-click alas.bat or type `py alas_en.pyw` from command line to open the GUI
|
||||
|
||||
Multi-usage: copy alas.pyw, and rename, double-click run on it. The settings of template.ini are copied when the first run runs. The script runtime uses the ini profile of the same name.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
BIN
doc/quickguide.assets/adb_test.png
Normal file
After Width: | Height: | Size: 4.7 KiB |
BIN
doc/quickguide.assets/atx.png
Normal file
After Width: | Height: | Size: 9.1 KiB |
BIN
doc/quickguide.assets/atx_running.png
Normal file
After Width: | Height: | Size: 54 KiB |
BIN
doc/quickguide.assets/emulator_test.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
doc/quickguide.assets/pip_list.png
Normal file
After Width: | Height: | Size: 9.4 KiB |
BIN
doc/quickguide.assets/python_test.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
doc/quickguide.assets/u2_test.png
Normal file
After Width: | Height: | Size: 80 KiB |
BIN
doc/quickguide.assets/venv.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
doc/quickguide.assets/venv_activate.png
Normal file
After Width: | Height: | Size: 5.2 KiB |
@ -53,7 +53,7 @@ def update_config_from_template(config, file):
|
||||
sidebar_title='Function',
|
||||
terminal_font_family='Consolas',
|
||||
language='english',
|
||||
default_size=(800, 950),
|
||||
default_size=(1000, 720),
|
||||
navigation='SIDEBAR',
|
||||
tabbed_groups=True,
|
||||
show_success_modal=False,
|
||||
@ -136,17 +136,17 @@ def main(ini_name=''):
|
||||
f1 = fleet.add_argument_group('Road Fleet', 'Players can choose a formation before battle. Though it has no effect appearance-wise, the formations applies buffs to certain stats.\nLine Ahead: Increases Firepower and Torpedo by 15%, but reduces Evasion by 10% (Applies only to Vanguard fleet)\nDouble Line: Increases Evasion by 30%, but decreases Firepower and Torpedo by 5% (Applies only to Vanguard fleet)\nDiamond: Increases Anti-Air by 20% (no penalties, applies to entire fleet)')
|
||||
f1.add_argument('--fleet_index_1', default=default('--fleet_index_1'), choices=['1', '2', '3', '4', '5', '6'])
|
||||
f1.add_argument('--fleet_formation_1', default=default('--fleet_formation_1'), choices=['Line Ahead', 'Double Line', 'Diamond'])
|
||||
f1.add_argument('--fleet_step_1', default=default('--fleet_step_1'), choices=['1', '2', '3', '4', '5', '6'])
|
||||
f1.add_argument('--fleet_step_1', default=default('--fleet_step_1'), choices=['1', '2', '3', '4', '5', '6'], help='In event map, fleet has limit on moving, so fleet_step is how far can a fleet goes in one operation, if map cleared, it will be ignored')
|
||||
|
||||
f2 = fleet.add_argument_group('Boss Fleet')
|
||||
f2.add_argument('--fleet_index_2', default=default('--fleet_index_2'), choices=['do_not_use', '1', '2', '3', '4', '5', '6'])
|
||||
f2.add_argument('--fleet_formation_2', default=default('--fleet_formation_2'), choices=['Line Ahead', 'Double Line', 'Diamond'])
|
||||
f2.add_argument('--fleet_step_2', default=default('--fleet_step_2'), choices=['1', '2', '3', '4', '5', '6'])
|
||||
f2.add_argument('--fleet_step_2', default=default('--fleet_step_2'), choices=['1', '2', '3', '4', '5', '6'], help='In event map, fleet has limit on moving, so fleet_step is how far can a fleet goes in one operation, if map cleared, it will be ignored')
|
||||
|
||||
f3 = fleet.add_argument_group('Alternate Road Fleet')
|
||||
f3.add_argument('--fleet_index_3', default=default('--fleet_index_3'), choices=['do_not_use', '1', '2', '3', '4', '5', '6'])
|
||||
f3.add_argument('--fleet_formation_3', default=default('--fleet_formation_3'), choices=['Line Ahead', 'Double Line', 'Diamond'])
|
||||
f3.add_argument('--fleet_step_3', default=default('--fleet_step_3'), choices=['1', '2', '3', '4', '5', '6'])
|
||||
f3.add_argument('--fleet_step_3', default=default('--fleet_step_3'), choices=['1', '2', '3', '4', '5', '6'], help='In event map, fleet has limit on moving, so fleet_step is how far can a fleet goes in one operation, if map cleared, it will be ignored')
|
||||
|
||||
f4 = fleet.add_argument_group('Auto-mode')
|
||||
f4.add_argument('--combat_auto_mode', default=default('--combat_auto_mode'), choices=['combat_auto', 'combat_manual', 'stand_still_in_the_middle'])
|
||||
@ -288,10 +288,10 @@ def main(ini_name=''):
|
||||
|
||||
# 每日设置
|
||||
daily_task = daily_parser.add_argument_group('Daily settings', 'Does not support submarine daily')
|
||||
daily_task.add_argument('--daily_mission_1', default=default('--daily_mission_1'), choices=['daily_air', 'daily_gun', 'daily_torpedo'])
|
||||
daily_task.add_argument('--daily_mission_2', default=default('--daily_mission_2'), choices=['index_1', 'index_2', 'index_3'])
|
||||
daily_task.add_argument('--daily_mission_4', default=default('--daily_mission_4'), choices=['index_1', 'index_2', 'index_3'])
|
||||
daily_task.add_argument('--daily_mission_5', default=default('--daily_mission_5'), choices=['index_1', 'index_2', 'index_3'])
|
||||
daily_task.add_argument('--tactical_training', default=default('--tactical_training'), choices=['daily_air', 'daily_gun', 'daily_torpedo'])
|
||||
daily_task.add_argument('--fierce_assault', default=default('--fierce_assault'), choices=['index_1', 'index_2', 'index_3'])
|
||||
daily_task.add_argument('--escort_mission', default=default('--escort_mission'), choices=['index_1', 'index_2', 'index_3'])
|
||||
daily_task.add_argument('--advance_mission', default=default('--advance_mission'), choices=['index_1', 'index_2', 'index_3'])
|
||||
daily_task.add_argument('--daily_fleet', default=default('--daily_fleet'), choices=['1', '2', '3', '4', '5', '6'])
|
||||
daily_task.add_argument('--daily_equipment', default=default('--daily_equipment'), help='Change equipment before playing, unload equipment after playing, do not need to fill in 0 \ncomma, such as 3, 1, 0, 1, 1, 0')
|
||||
|
||||
@ -312,8 +312,8 @@ def main(ini_name=''):
|
||||
|
||||
# ==========event_daily_ab==========
|
||||
event_ab_parser = subs.add_parser('event_daily_ab')
|
||||
event_name = event_ab_parser.add_argument_group('Choose an event', '')
|
||||
event_name.add_argument('--event_name_ab', default=default('--event_name_ab'), choices=event_folder, help='E.g event_20200326_cn')
|
||||
event_name = event_ab_parser.add_argument_group('Choose an event', 'bonus for first clear each day')
|
||||
event_name.add_argument('--event_name_ab', default=default('--event_name_ab'), choices=event_folder, help='There a dropdown menu with many options')
|
||||
|
||||
# ==========main==========
|
||||
main_parser = subs.add_parser('main')
|
||||
@ -325,9 +325,7 @@ def main(ini_name=''):
|
||||
event_parser = subs.add_parser('event')
|
||||
|
||||
description = """
|
||||
Support "Songs under the dome" (event_20200521_cn), optimized for D1D3
|
||||
D3 has a plot battle when he first enters the picture and clears 100%, which will cause an error.
|
||||
When the attack level is not optimized or the map does not reach the safe sea area, use the wasteland mode to run (slower)
|
||||
Support "Iris of Light and Dark Rerun" (event_20200521_en), optimized for D2
|
||||
"""
|
||||
event = event_parser.add_argument_group(
|
||||
'Choose a level', '\n'.join([line.strip() for line in description.strip().split('\n')]))
|
||||
@ -337,7 +335,7 @@ def main(ini_name=''):
|
||||
event.add_argument('--sp_stage', default=default('--sp_stage'),
|
||||
choices=['sp1', 'sp2', 'sp3'],
|
||||
help='E.g sp3')
|
||||
event.add_argument('--event_name', default=default('--event_name'), choices=event_folder, help='E.g event_20200312_cn')
|
||||
event.add_argument('--event_name', default=default('--event_name'), choices=event_folder, help='There a dropdown menu with many options')
|
||||
|
||||
# ==========半自动==========
|
||||
semi_parser = subs.add_parser('semi_auto')
|
||||
|
@ -208,7 +208,7 @@ class AzurLaneConfig:
|
||||
MAP_HAS_MAP_STORY = False # event_20200521_cn(穹顶下的圣咏曲) adds after-combat story.
|
||||
MAP_HAS_WALL = False # event_20200521_cn(穹顶下的圣咏曲) adds wall between grids.
|
||||
MAP_SIREN_MOVE_WAIT = 1.5 # The enemy moving takes about 1.2 ~ 1.5s.
|
||||
MAP_SIREN_TEMPLATE = ['1', '2', '3']
|
||||
MAP_SIREN_TEMPLATE = ['1', '2', '3', 'DD']
|
||||
MAP_SIREN_COUNT = 0
|
||||
MAP_MYSTERY_HAS_CARRIER = False
|
||||
MAP_GRID_CENTER_TOLERANCE = 0.1
|
||||
|
@ -129,10 +129,10 @@ dic_true_eng_to_eng = {
|
||||
'enable_daily_mission': 'enable_daily_mission',
|
||||
'enable_hard_campaign': 'enable_hard_campaign',
|
||||
'enable_exercise': 'enable_exercise',
|
||||
'daily_mission_1': 'daily_mission_1',
|
||||
'daily_mission_2': 'daily_mission_2',
|
||||
'daily_mission_4': 'daily_mission_4',
|
||||
'daily_mission_5': 'daily_mission_5',
|
||||
'tactical_training': 'daily_mission_1',
|
||||
'fierce_assault': 'daily_mission_2',
|
||||
'escort_mission': 'daily_mission_4',
|
||||
'advance_mission': 'daily_mission_5',
|
||||
'daily_fleet': 'daily_fleet',
|
||||
'daily_equipment': 'daily_equipment',
|
||||
'hard_campaign': 'hard_campaign',
|
||||
@ -162,7 +162,7 @@ dic_true_eng_to_eng = {
|
||||
'no': 'no',
|
||||
'Line Ahead': 'formation_1',
|
||||
'Double Line': 'formation_2',
|
||||
'Diamond': 'formation_3',
|
||||
'formation_3': 'formation_3',
|
||||
'combat_auto': 'combat_auto',
|
||||
'combat_manual': 'combat_manual',
|
||||
'stand_still_in_the_middle': 'stand_still_in_the_middle',
|
||||
|
@ -36,8 +36,8 @@ MAP_STAR_2 = Button(area={'cn': (532, 377, 540, 384), 'en': (518, 382, 526, 389)
|
||||
MAP_STAR_3 = Button(area={'cn': (818, 377, 827, 384), 'en': (804, 382, 812, 389)}, color={'cn': (251, 233, 143), 'en': (252, 234, 144)}, button={'cn': (818, 377, 827, 384), 'en': (804, 382, 812, 389)}, file={'cn': './assets/cn/handler/MAP_STAR_3.png', 'en': './assets/en/handler/MAP_STAR_3.png'})
|
||||
MAP_WALK_OUT_OF_STEP = Button(area={'cn': (654, 312, 704, 335), 'en': (654, 312, 704, 335)}, color={'cn': (109, 113, 120), 'en': (109, 113, 120)}, button={'cn': (654, 312, 704, 335), 'en': (654, 312, 704, 335)}, file={'cn': './assets/cn/handler/MAP_WALK_OUT_OF_STEP.png', 'en': './assets/en/handler/MAP_WALK_OUT_OF_STEP.png'})
|
||||
MYSTERY_ITEM = Button(area={'cn': (589, 294, 691, 427), 'en': (589, 294, 691, 427)}, color={'cn': (144, 127, 83), 'en': (144, 127, 83)}, button={'cn': (589, 294, 691, 427), 'en': (589, 294, 691, 427)}, file={'cn': './assets/cn/handler/MYSTERY_ITEM.png', 'en': './assets/en/handler/MYSTERY_ITEM.png'})
|
||||
POPUP_CANCEL = Button(area={'cn': (404, 493, 576, 550), 'en': (378, 452, 544, 510)}, color={'cn': (166, 169, 172), 'en': (168, 170, 172)}, button={'cn': (404, 493, 576, 550), 'en': (378, 452, 544, 510)}, file={'cn': './assets/cn/handler/POPUP_CANCEL.png', 'en': './assets/en/handler/POPUP_CANCEL.png'})
|
||||
POPUP_CONFIRM = Button(area={'cn': (704, 493, 876, 550), 'en': (660, 452, 826, 510)}, color={'cn': (94, 144, 204), 'en': (107, 151, 205)}, button={'cn': (704, 493, 876, 550), 'en': (660, 452, 826, 510)}, file={'cn': './assets/cn/handler/POPUP_CONFIRM.png', 'en': './assets/en/handler/POPUP_CONFIRM.png'})
|
||||
POPUP_CANCEL = Button(area={'cn': (404, 493, 576, 550), 'en': (403, 481, 577, 541)}, color={'cn': (166, 169, 172), 'en': (170, 172, 174)}, button={'cn': (404, 493, 576, 550), 'en': (403, 481, 577, 541)}, file={'cn': './assets/cn/handler/POPUP_CANCEL.png', 'en': './assets/en/handler/POPUP_CANCEL.png'})
|
||||
POPUP_CONFIRM = Button(area={'cn': (704, 493, 876, 550), 'en': (703, 481, 877, 541)}, color={'cn': (94, 144, 204), 'en': (107, 152, 207)}, button={'cn': (704, 493, 876, 550), 'en': (703, 481, 877, 541)}, file={'cn': './assets/cn/handler/POPUP_CONFIRM.png', 'en': './assets/en/handler/POPUP_CONFIRM.png'})
|
||||
STORY_CHOOSE = Button(area={'cn': (902, 344, 959, 357), 'en': (902, 344, 959, 357)}, color={'cn': (98, 122, 156), 'en': (98, 122, 156)}, button={'cn': (902, 344, 959, 357), 'en': (902, 344, 959, 357)}, file={'cn': './assets/cn/handler/STORY_CHOOSE.png', 'en': './assets/en/handler/STORY_CHOOSE.png'})
|
||||
STORY_CHOOSE_2 = Button(area={'cn': (903, 388, 959, 399), 'en': (903, 388, 959, 399)}, color={'cn': (98, 121, 156), 'en': (98, 121, 156)}, button={'cn': (903, 388, 959, 399), 'en': (903, 388, 959, 399)}, file={'cn': './assets/cn/handler/STORY_CHOOSE_2.png', 'en': './assets/en/handler/STORY_CHOOSE_2.png'})
|
||||
STORY_LETTERS_ONLY = Button(area={'cn': (1159, 26, 1264, 52), 'en': (1159, 26, 1264, 52)}, color={'cn': (123, 128, 141), 'en': (123, 128, 141)}, button={'cn': (1159, 26, 1264, 52), 'en': (1159, 26, 1264, 52)}, file={'cn': './assets/cn/handler/STORY_LETTERS_ONLY.png', 'en': './assets/en/handler/STORY_LETTERS_ONLY.png'})
|
||||
|
@ -6,16 +6,16 @@ from module.base.template import Template
|
||||
|
||||
COMMON_SHIP_FILTER_DISABLE = Button(area={'cn': (666, 6, 802, 48), 'en': (665, 5, 803, 49)}, color={'cn': (71, 88, 125), 'en': (74, 90, 125)}, button={'cn': (666, 6, 802, 48), 'en': (665, 5, 803, 49)}, file={'cn': './assets/cn/retire/COMMON_SHIP_FILTER_DISABLE.png', 'en': './assets/en/retire/COMMON_SHIP_FILTER_DISABLE.png'})
|
||||
COMMON_SHIP_FILTER_ENABLE = Button(area={'cn': (666, 6, 802, 48), 'en': (665, 5, 803, 49)}, color={'cn': (182, 145, 96), 'en': (183, 145, 94)}, button={'cn': (666, 6, 802, 48), 'en': (665, 5, 803, 49)}, file={'cn': './assets/cn/retire/COMMON_SHIP_FILTER_ENABLE.png', 'en': './assets/en/retire/COMMON_SHIP_FILTER_ENABLE.png'})
|
||||
EQUIP_CONFIRM = Button(area={'cn': (871, 516, 1044, 573), 'en': (871, 516, 1044, 573)}, color={'cn': (95, 143, 203), 'en': (95, 143, 203)}, button={'cn': (871, 516, 1044, 573), 'en': (871, 516, 1044, 573)}, file={'cn': './assets/cn/retire/EQUIP_CONFIRM.png', 'en': './assets/en/retire/EQUIP_CONFIRM.png'})
|
||||
EQUIP_CONFIRM_2 = Button(area={'cn': (720, 541, 893, 598), 'en': (720, 541, 893, 598)}, color={'cn': (94, 142, 202), 'en': (94, 142, 202)}, button={'cn': (720, 541, 893, 598), 'en': (720, 541, 893, 598)}, file={'cn': './assets/cn/retire/EQUIP_CONFIRM_2.png', 'en': './assets/en/retire/EQUIP_CONFIRM_2.png'})
|
||||
EQUIP_CONFIRM = Button(area={'cn': (871, 516, 1044, 573), 'en': (870, 515, 1045, 574)}, color={'cn': (95, 143, 203), 'en': (103, 150, 208)}, button={'cn': (871, 516, 1044, 573), 'en': (870, 515, 1045, 574)}, file={'cn': './assets/cn/retire/EQUIP_CONFIRM.png', 'en': './assets/en/retire/EQUIP_CONFIRM.png'})
|
||||
EQUIP_CONFIRM_2 = Button(area={'cn': (720, 541, 893, 598), 'en': (719, 540, 894, 600)}, color={'cn': (94, 142, 202), 'en': (108, 153, 208)}, button={'cn': (720, 541, 893, 598), 'en': (719, 540, 894, 600)}, file={'cn': './assets/cn/retire/EQUIP_CONFIRM_2.png', 'en': './assets/en/retire/EQUIP_CONFIRM_2.png'})
|
||||
GET_ITEMS_1_RETIREMENT_SAVE = Button(area={'cn': (1031, 656, 1063, 688), 'en': (1031, 656, 1063, 688)}, color={'cn': (49, 44, 54), 'en': (49, 44, 54)}, button={'cn': (1031, 656, 1063, 688), 'en': (1031, 656, 1063, 688)}, file={'cn': './assets/cn/retire/GET_ITEMS_1_RETIREMENT_SAVE.png', 'en': './assets/en/retire/GET_ITEMS_1_RETIREMENT_SAVE.png'})
|
||||
IN_RETIREMENT_CHECK = Button(area={'cn': (854, 641, 1027, 698), 'en': (853, 640, 1028, 700)}, color={'cn': (184, 99, 89), 'en': (184, 101, 92)}, button={'cn': (854, 641, 1027, 698), 'en': (853, 640, 1028, 700)}, file={'cn': './assets/cn/retire/IN_RETIREMENT_CHECK.png', 'en': './assets/en/retire/IN_RETIREMENT_CHECK.png'})
|
||||
ONE_CLICK_RETIREMENT = Button(area={'cn': (639, 641, 811, 698), 'en': (637, 640, 813, 700)}, color={'cn': (94, 138, 194), 'en': (93, 136, 192)}, button={'cn': (639, 641, 811, 698), 'en': (637, 640, 813, 700)}, file={'cn': './assets/cn/retire/ONE_CLICK_RETIREMENT.png', 'en': './assets/en/retire/ONE_CLICK_RETIREMENT.png'})
|
||||
RETIRE_APPEAR_1 = Button(area={'cn': (353, 492, 527, 550), 'en': (353, 492, 527, 550)}, color={'cn': (96, 144, 204), 'en': (96, 144, 204)}, button={'cn': (353, 492, 527, 550), 'en': (353, 492, 527, 550)}, file={'cn': './assets/cn/retire/RETIRE_APPEAR_1.png', 'en': './assets/en/retire/RETIRE_APPEAR_1.png'})
|
||||
RETIRE_APPEAR_2 = Button(area={'cn': (553, 492, 727, 550), 'en': (553, 492, 727, 550)}, color={'cn': (94, 143, 204), 'en': (94, 143, 204)}, button={'cn': (553, 492, 727, 550), 'en': (553, 492, 727, 550)}, file={'cn': './assets/cn/retire/RETIRE_APPEAR_2.png', 'en': './assets/en/retire/RETIRE_APPEAR_2.png'})
|
||||
RETIRE_APPEAR_3 = Button(area={'cn': (753, 492, 927, 550), 'en': (753, 492, 927, 550)}, color={'cn': (94, 143, 202), 'en': (94, 143, 202)}, button={'cn': (753, 492, 927, 550), 'en': (753, 492, 927, 550)}, file={'cn': './assets/cn/retire/RETIRE_APPEAR_3.png', 'en': './assets/en/retire/RETIRE_APPEAR_3.png'})
|
||||
SHIP_CONFIRM = Button(area={'cn': (1069, 641, 1241, 698), 'en': (1069, 641, 1241, 698)}, color={'cn': (84, 131, 190), 'en': (84, 131, 190)}, button={'cn': (1069, 641, 1241, 698), 'en': (1069, 641, 1241, 698)}, file={'cn': './assets/cn/retire/SHIP_CONFIRM.png', 'en': './assets/en/retire/SHIP_CONFIRM.png'})
|
||||
SHIP_CONFIRM_2 = Button(area={'cn': (928, 617, 1100, 674), 'en': (928, 617, 1100, 674)}, color={'cn': (95, 143, 203), 'en': (95, 143, 203)}, button={'cn': (928, 617, 1100, 674), 'en': (928, 617, 1100, 674)}, file={'cn': './assets/cn/retire/SHIP_CONFIRM_2.png', 'en': './assets/en/retire/SHIP_CONFIRM_2.png'})
|
||||
RETIRE_APPEAR_1 = Button(area={'cn': (353, 492, 527, 550), 'en': (352, 481, 527, 541)}, color={'cn': (96, 144, 204), 'en': (97, 146, 205)}, button={'cn': (353, 492, 527, 550), 'en': (352, 481, 527, 541)}, file={'cn': './assets/cn/retire/RETIRE_APPEAR_1.png', 'en': './assets/en/retire/RETIRE_APPEAR_1.png'})
|
||||
RETIRE_APPEAR_2 = Button(area={'cn': (553, 492, 727, 550), 'en': (553, 481, 727, 541)}, color={'cn': (94, 143, 204), 'en': (110, 154, 209)}, button={'cn': (553, 492, 727, 550), 'en': (553, 481, 727, 541)}, file={'cn': './assets/cn/retire/RETIRE_APPEAR_2.png', 'en': './assets/en/retire/RETIRE_APPEAR_2.png'})
|
||||
RETIRE_APPEAR_3 = Button(area={'cn': (753, 492, 927, 550), 'en': (753, 481, 927, 541)}, color={'cn': (94, 143, 202), 'en': (109, 152, 204)}, button={'cn': (753, 492, 927, 550), 'en': (753, 481, 927, 541)}, file={'cn': './assets/cn/retire/RETIRE_APPEAR_3.png', 'en': './assets/en/retire/RETIRE_APPEAR_3.png'})
|
||||
SHIP_CONFIRM = Button(area={'cn': (1069, 641, 1241, 698), 'en': (1068, 640, 1243, 700)}, color={'cn': (84, 131, 190), 'en': (92, 136, 192)}, button={'cn': (1069, 641, 1241, 698), 'en': (1068, 640, 1243, 700)}, file={'cn': './assets/cn/retire/SHIP_CONFIRM.png', 'en': './assets/en/retire/SHIP_CONFIRM.png'})
|
||||
SHIP_CONFIRM_2 = Button(area={'cn': (928, 617, 1100, 674), 'en': (927, 615, 1101, 675)}, color={'cn': (95, 143, 203), 'en': (104, 149, 206)}, button={'cn': (928, 617, 1100, 674), 'en': (927, 615, 1101, 675)}, file={'cn': './assets/cn/retire/SHIP_CONFIRM_2.png', 'en': './assets/en/retire/SHIP_CONFIRM_2.png'})
|
||||
SORTING_CLICK = Button(area={'cn': (1004, 14, 1096, 42), 'en': (1002, 12, 1058, 44)}, color={'cn': (49, 54, 67), 'en': (47, 51, 65)}, button={'cn': (1004, 14, 1096, 42), 'en': (1002, 12, 1058, 44)}, file={'cn': './assets/cn/retire/SORTING_CLICK.png', 'en': './assets/en/retire/SORTING_CLICK.png'})
|
||||
SORT_ASC = Button(area={'cn': (1014, 22, 1019, 26), 'en': (1014, 22, 1019, 26)}, color={'cn': (189, 207, 231), 'en': (189, 207, 231)}, button={'cn': (1014, 22, 1019, 26), 'en': (1014, 22, 1019, 26)}, file={'cn': './assets/cn/retire/SORT_ASC.png', 'en': './assets/en/retire/SORT_ASC.png'})
|
||||
SORT_DESC = Button(area={'cn': (1014, 29, 1019, 33), 'en': (1014, 29, 1019, 33)}, color={'cn': (189, 207, 231), 'en': (189, 207, 231)}, button={'cn': (1014, 29, 1019, 33), 'en': (1014, 29, 1019, 33)}, file={'cn': './assets/cn/retire/SORT_DESC.png', 'en': './assets/en/retire/SORT_DESC.png'})
|
||||
|
@ -7,19 +7,19 @@ from module.base.template import Template
|
||||
COIN = Button(area={'cn': (403, 64, 436, 88), 'en': (403, 64, 436, 88)}, color={'cn': (226, 173, 72), 'en': (226, 173, 72)}, button={'cn': (403, 64, 436, 88), 'en': (403, 64, 436, 88)}, file={'cn': './assets/cn/reward/COIN.png', 'en': './assets/en/reward/COIN.png'})
|
||||
COMMISSION_ADVICE = Button(area={'cn': (871, 322, 999, 383), 'en': (871, 328, 1000, 379)}, color={'cn': (230, 177, 116), 'en': (231, 178, 117)}, button={'cn': (871, 322, 999, 383), 'en': (871, 328, 1000, 379)}, file={'cn': './assets/cn/reward/COMMISSION_ADVICE.png', 'en': './assets/en/reward/COMMISSION_ADVICE.png'})
|
||||
COMMISSION_DAILY = Button(area={'cn': (35, 132, 67, 186), 'en': (30, 126, 75, 188)}, color={'cn': (208, 172, 118), 'en': (170, 132, 92)}, button={'cn': (35, 132, 67, 186), 'en': (30, 126, 75, 188)}, file={'cn': './assets/cn/reward/COMMISSION_DAILY.png', 'en': './assets/en/reward/COMMISSION_DAILY.png'})
|
||||
COMMISSION_HAS_PENDING = Button(area={'cn': (357, 300, 359, 330), 'en': (32, 129, 69, 166)}, color={'cn': (86, 201, 173), 'en': (127, 110, 131)}, button={'cn': (357, 300, 359, 330), 'en': (32, 129, 69, 166)}, file={'cn': './assets/cn/reward/COMMISSION_HAS_PENDING.png', 'en': './assets/en/reward/COMMISSION_HAS_PENDING.png'})
|
||||
COMMISSION_HAS_PENDING = Button(area={'cn': (357, 300, 359, 330), 'en': (357, 300, 359, 330)}, color={'cn': (86, 201, 173), 'en': (81, 205, 174)}, button={'cn': (357, 300, 359, 330), 'en': (357, 300, 359, 330)}, file={'cn': './assets/cn/reward/COMMISSION_HAS_PENDING.png', 'en': './assets/en/reward/COMMISSION_HAS_PENDING.png'})
|
||||
COMMISSION_NOTICE_AT_CAMPAIGN = Button(area={'cn': (1054, 647, 1061, 654), 'en': (1054, 647, 1061, 654)}, color={'cn': (197, 89, 64), 'en': (197, 89, 64)}, button={'cn': (1054, 647, 1061, 654), 'en': (1054, 647, 1061, 654)}, file={'cn': './assets/cn/reward/COMMISSION_NOTICE_AT_CAMPAIGN.png', 'en': './assets/en/reward/COMMISSION_NOTICE_AT_CAMPAIGN.png'})
|
||||
COMMISSION_START = Button(area={'cn': (1028, 322, 1156, 383), 'en': (1031, 333, 1147, 383)}, color={'cn': (229, 175, 113), 'en': (227, 169, 108)}, button={'cn': (1028, 322, 1156, 383), 'en': (1031, 333, 1147, 383)}, file={'cn': './assets/cn/reward/COMMISSION_START.png', 'en': './assets/en/reward/COMMISSION_START.png'})
|
||||
COMMISSION_STOP_SCROLLING = Button(area={'cn': (115, 236, 179, 487), 'en': (115, 236, 179, 487)}, color={'cn': (50, 55, 74), 'en': (50, 55, 74)}, button={'cn': (115, 236, 179, 487), 'en': (115, 236, 179, 487)}, file={'cn': './assets/cn/reward/COMMISSION_STOP_SCROLLING.png', 'en': './assets/en/reward/COMMISSION_STOP_SCROLLING.png'})
|
||||
COMMISSION_URGENT = Button(area={'cn': (35, 231, 68, 281), 'en': (28, 221, 76, 283)}, color={'cn': (215, 188, 124), 'en': (169, 138, 95)}, button={'cn': (35, 231, 68, 281), 'en': (28, 221, 76, 283)}, file={'cn': './assets/cn/reward/COMMISSION_URGENT.png', 'en': './assets/en/reward/COMMISSION_URGENT.png'})
|
||||
EXP_INFO_S_REWARD = Button(area={'cn': (498, 140, 557, 154), 'en': (474, 132, 523, 144)}, color={'cn': (233, 241, 127), 'en': (233, 241, 125)}, button={'cn': (498, 140, 557, 154), 'en': (474, 132, 523, 144)}, file={'cn': './assets/cn/reward/EXP_INFO_S_REWARD.png', 'en': './assets/en/reward/EXP_INFO_S_REWARD.png'})
|
||||
EXP_INFO_S_REWARD = Button(area={'cn': (498, 140, 557, 154), 'en': (498, 140, 557, 154)}, color={'cn': (233, 241, 127), 'en': (105, 119, 139)}, button={'cn': (498, 140, 557, 154), 'en': (498, 140, 557, 154)}, file={'cn': './assets/cn/reward/EXP_INFO_S_REWARD.png', 'en': './assets/en/reward/EXP_INFO_S_REWARD.png'})
|
||||
MISSION_MULTI = Button(area={'cn': (1041, 8, 1101, 39), 'en': (1041, 8, 1101, 39)}, color={'cn': (226, 192, 142), 'en': (226, 192, 142)}, button={'cn': (1041, 8, 1101, 39), 'en': (1041, 8, 1101, 39)}, file={'cn': './assets/cn/reward/MISSION_MULTI.png', 'en': './assets/en/reward/MISSION_MULTI.png'})
|
||||
MISSION_NOTICE = Button(area={'cn': (940, 670, 945, 681), 'en': (940, 670, 945, 681)}, color={'cn': (183, 83, 66), 'en': (183, 83, 66)}, button={'cn': (940, 670, 945, 681), 'en': (940, 670, 945, 681)}, file={'cn': './assets/cn/reward/MISSION_NOTICE.png', 'en': './assets/en/reward/MISSION_NOTICE.png'})
|
||||
MISSION_SINGLE = Button(area={'cn': (1093, 118, 1179, 177), 'en': (1093, 118, 1179, 177)}, color={'cn': (115, 155, 218), 'en': (115, 155, 218)}, button={'cn': (1093, 118, 1179, 177), 'en': (1093, 118, 1179, 177)}, file={'cn': './assets/cn/reward/MISSION_SINGLE.png', 'en': './assets/en/reward/MISSION_SINGLE.png'})
|
||||
OIL = Button(area={'cn': (162, 64, 182, 91), 'en': (162, 64, 182, 91)}, color={'cn': (71, 72, 71), 'en': (71, 72, 71)}, button={'cn': (162, 64, 182, 91), 'en': (162, 64, 182, 91)}, file={'cn': './assets/cn/reward/OIL.png', 'en': './assets/en/reward/OIL.png'})
|
||||
REWARD_1 = Button(area={'cn': (383, 285, 503, 297), 'en': (383, 283, 503, 294)}, color={'cn': (238, 168, 81), 'en': (241, 187, 120)}, button={'cn': (383, 285, 503, 297), 'en': (383, 283, 503, 294)}, file={'cn': './assets/cn/reward/REWARD_1.png', 'en': './assets/en/reward/REWARD_1.png'})
|
||||
REWARD_2 = Button(area={'cn': (383, 404, 503, 444), 'en': (382, 403, 504, 445)}, color={'cn': (233, 165, 67), 'en': (236, 177, 92)}, button={'cn': (383, 404, 503, 444), 'en': (382, 403, 504, 445)}, file={'cn': './assets/cn/reward/REWARD_2.png', 'en': './assets/en/reward/REWARD_2.png'})
|
||||
REWARD_3 = Button(area={'cn': (383, 546, 503, 586), 'en': (383, 546, 503, 586)}, color={'cn': (234, 163, 69), 'en': (234, 163, 69)}, button={'cn': (383, 546, 503, 586), 'en': (383, 546, 503, 586)}, file={'cn': './assets/cn/reward/REWARD_3.png', 'en': './assets/en/reward/REWARD_3.png'})
|
||||
REWARD_3 = Button(area={'cn': (383, 546, 503, 586), 'en': (382, 545, 504, 587)}, color={'cn': (234, 163, 69), 'en': (235, 174, 92)}, button={'cn': (383, 546, 503, 586), 'en': (382, 545, 504, 587)}, file={'cn': './assets/cn/reward/REWARD_3.png', 'en': './assets/en/reward/REWARD_3.png'})
|
||||
REWARD_SAVE_CLICK = Button(area={'cn': (415, 184, 496, 214), 'en': (415, 184, 496, 214)}, color={'cn': (152, 150, 168), 'en': (152, 150, 168)}, button={'cn': (415, 184, 496, 214), 'en': (415, 184, 496, 214)}, file={'cn': './assets/cn/reward/REWARD_SAVE_CLICK.png', 'en': './assets/en/reward/REWARD_SAVE_CLICK.png'})
|
||||
TACTICAL_CLASS_CANCEL = Button(area={'cn': (818, 590, 990, 648), 'en': (818, 590, 990, 648)}, color={'cn': (153, 153, 154), 'en': (153, 153, 154)}, button={'cn': (818, 590, 990, 648), 'en': (818, 590, 990, 648)}, file={'cn': './assets/cn/reward/TACTICAL_CLASS_CANCEL.png', 'en': './assets/en/reward/TACTICAL_CLASS_CANCEL.png'})
|
||||
TACTICAL_CLASS_START = Button(area={'cn': (1024, 590, 1197, 648), 'en': (1024, 590, 1197, 648)}, color={'cn': (96, 139, 194), 'en': (96, 139, 194)}, button={'cn': (1024, 590, 1197, 648), 'en': (1024, 590, 1197, 648)}, file={'cn': './assets/cn/reward/TACTICAL_CLASS_START.png', 'en': './assets/en/reward/TACTICAL_CLASS_START.png'})
|
||||
TACTICAL_CLASS_CANCEL = Button(area={'cn': (818, 590, 990, 648), 'en': (867, 589, 1042, 649)}, color={'cn': (153, 153, 154), 'en': (159, 160, 160)}, button={'cn': (818, 590, 990, 648), 'en': (867, 589, 1042, 649)}, file={'cn': './assets/cn/reward/TACTICAL_CLASS_CANCEL.png', 'en': './assets/en/reward/TACTICAL_CLASS_CANCEL.png'})
|
||||
TACTICAL_CLASS_START = Button(area={'cn': (1024, 590, 1197, 648), 'en': (1068, 589, 1243, 649)}, color={'cn': (96, 139, 194), 'en': (85, 132, 191)}, button={'cn': (1024, 590, 1197, 648), 'en': (1068, 589, 1243, 649)}, file={'cn': './assets/cn/reward/TACTICAL_CLASS_START.png', 'en': './assets/en/reward/TACTICAL_CLASS_START.png'})
|
||||
|
@ -32,20 +32,20 @@ dictionary_cn = {
|
||||
'urgent_ship': ['观舰']
|
||||
}
|
||||
dictionary_en = {
|
||||
'major_comm': ['Self Training', 'Defense Exercise', 'Research Mission', 'Tool Prep', 'Tactical Class', 'Cargo Transport'],
|
||||
'daily_comm': ['Daily Resource Extraction', 'Awakening Tactical Research'],
|
||||
'extra_drill': ['Sailing Training', 'Defense Patrol', 'Buoy Inspection'],
|
||||
'extra_part': ['Commission'],
|
||||
'major_comm': ['SelfTrainingl', 'Defense Exercise', 'Research Mission', 'Prep', 'Class', 'Cargo Transport'],
|
||||
'daily_comm': ['Daily', 'Awakening'],
|
||||
'extra_drill': ['Sailing', 'Defense Patrol', 'Buoy'],
|
||||
'extra_part': ['veinprotectoncommisionll', 'Forestprtectoncommisionl', 'Forestprotectoncommisionll'],
|
||||
'extra_cube': ['Exercise'],
|
||||
'extra_oil': ['Oil Extraction'],
|
||||
'extra_book': ['Merchant Escort'],
|
||||
'urgent_drill': ['Cargo Defense', 'Enemy Scouts', 'Enemy Force', 'Enemy Elites'],
|
||||
'urgent_part': ['Lavella', 'Maui', 'Rendova', 'Kongbanna'],
|
||||
'urgent_book': ['Tyrant', 'Poro', 'Makira', 'Kapolo', 'Manne ', 'Mary', 'Isle', 'Kotlin'],
|
||||
'urgent_box': ['Gear', 'Handover'],
|
||||
'urgent_cube': ['Merchant Rescue', 'Enemy Attack'],
|
||||
'urgent_gem': ['VIP Escort', 'Holiday Escort', 'Patrol Escort'],
|
||||
'urgent_ship': ['Launch Ceremony']
|
||||
'extra_oil': ['Large-saleoilExtractionlll', 'FleetCargoTransport', 'Large-saleoilExtractianl', 'Large-saleoilExtractionl', 'Large-saleoilExtractiaonll'],
|
||||
'extra_book': ['LargeMerchantEscort'],
|
||||
'urgent_drill': ['Cargo Defense', 'Scouts', 'Force', 'Elites', 'FrontierDefensePatrol'],
|
||||
'urgent_part': ['Lavella', 'Maui', 'Rendova', 'AidingWongbanna'],
|
||||
'urgent_book': ['Tyrant', 'Poro', 'Makira', 'Kapolo', 'Manne ', 'St.', 'Isle', 'Kotlin'],
|
||||
'urgent_box': ['Gear Transport', 'Handover'],
|
||||
'urgent_cube': ['MerchantRescuel', 'Attack'],
|
||||
'urgent_gem': ['VIP ', 'Holiday', 'Patrol Escort'],
|
||||
'urgent_ship': ['Launch']
|
||||
}
|
||||
|
||||
|
||||
@ -69,7 +69,8 @@ class Commission:
|
||||
@Config.when(SERVER='en')
|
||||
def commission_parse(self):
|
||||
# Name
|
||||
area = area_offset((176, 23, 420, 51), self.area[0:2]) # This is different from CN, EN has longer names
|
||||
# This is different from CN, EN has longer names
|
||||
area = area_offset((176, 23, 420, 51), self.area[0:2])
|
||||
button = Button(area=area, color=(), button=area, name='COMMISSION')
|
||||
ocr = Ocr(button, lang='cnocr', back=(74, 97, 148), use_binary=False)
|
||||
self.button = button
|
||||
@ -84,7 +85,8 @@ class Commission:
|
||||
|
||||
# Expire time
|
||||
area = area_offset((-49, 68, -45, 84), self.area[0:2])
|
||||
button = Button(area=area, color=(189, 65, 66), button=area, name='IS_URGENT')
|
||||
button = Button(area=area, color=(189, 65, 66),
|
||||
button=area, name='IS_URGENT')
|
||||
if button.appear_on(self.image):
|
||||
area = area_offset((-49, 73, 45, 91), self.area[0:2])
|
||||
button = Button(area=area, color=(), button=area, name='EXPIRE')
|
||||
@ -105,7 +107,7 @@ class Commission:
|
||||
@Config.when(SERVER=None)
|
||||
def commission_parse(self):
|
||||
# Name
|
||||
area = area_offset((211, 26, 415, 49), self.area[0:2])
|
||||
area = area_offset((176, 23, 420, 50), self.area[0:2])
|
||||
button = Button(area=area, color=(), button=area, name='COMMISSION')
|
||||
ocr = Ocr(button, lang='cnocr', back=(74, 97, 148), use_binary=False)
|
||||
self.button = button
|
||||
@ -120,7 +122,8 @@ class Commission:
|
||||
|
||||
# Expire time
|
||||
area = area_offset((-49, 68, -45, 84), self.area[0:2])
|
||||
button = Button(area=area, color=(189, 65, 66), button=area, name='IS_URGENT')
|
||||
button = Button(area=area, color=(189, 65, 66),
|
||||
button=area, name='IS_URGENT')
|
||||
if button.appear_on(self.image):
|
||||
area = area_offset((-49, 73, 45, 91), self.area[0:2])
|
||||
button = Button(area=area, color=(), button=area, name='EXPIRE')
|
||||
@ -267,15 +270,18 @@ class CommissionGroup:
|
||||
if self.template is None:
|
||||
self.template = np.array(image.crop(self.template_area))
|
||||
self.swipe = 0
|
||||
res = cv2.matchTemplate(self.template, np.array(image), cv2.TM_CCOEFF_NORMED)
|
||||
res = cv2.matchTemplate(
|
||||
self.template, np.array(image), cv2.TM_CCOEFF_NORMED)
|
||||
_, similarity, _, position = cv2.minMaxLoc(res)
|
||||
if similarity < 0.85:
|
||||
logger.warning(f'Low similarity when finding swipe. Similarity: {similarity}, Position: {position}')
|
||||
logger.warning(
|
||||
f'Low similarity when finding swipe. Similarity: {similarity}, Position: {position}')
|
||||
self.swipe -= position[1] - self.template_area[1]
|
||||
self.template = np.array(image.crop(self.template_area))
|
||||
|
||||
# Find commission position
|
||||
color_height = np.mean(image.crop((597, 0, 619, 720)).convert('L'), axis=1)
|
||||
color_height = np.mean(image.crop(
|
||||
(597, 0, 619, 720)).convert('L'), axis=1)
|
||||
parameters = {'height': 200}
|
||||
peaks, _ = signal.find_peaks(color_height, **parameters)
|
||||
peaks = [y for y in peaks if y > 67 + 117]
|
||||
@ -311,13 +317,15 @@ class RewardCommission(UI, InfoHandler):
|
||||
"""
|
||||
# Count Commission
|
||||
commission = daily.commission + urgent.commission
|
||||
running_count = int(np.sum([1 for c in commission if c.status == 'running']))
|
||||
running_count = int(
|
||||
np.sum([1 for c in commission if c.status == 'running']))
|
||||
logger.attr('Running', running_count)
|
||||
if running_count >= 4:
|
||||
return [], []
|
||||
|
||||
# Calculate priority
|
||||
commission = [c for c in commission if c.valid and c.status == 'pending']
|
||||
commission = [
|
||||
c for c in commission if c.valid and c.status == 'pending']
|
||||
comm_priority = []
|
||||
for comm in commission:
|
||||
pri = priority[comm.genre]
|
||||
@ -333,11 +341,14 @@ class RewardCommission(UI, InfoHandler):
|
||||
comm_priority.append(pri)
|
||||
|
||||
# Sort
|
||||
commission = list(np.array(commission)[np.argsort(comm_priority)])[::-1]
|
||||
commission = list(np.array(commission)[
|
||||
np.argsort(comm_priority)])[::-1]
|
||||
if time_limit:
|
||||
commission = [comm for comm in commission if datetime.now() + comm.duration <= time_limit]
|
||||
commission = [
|
||||
comm for comm in commission if datetime.now() + comm.duration <= time_limit]
|
||||
commission = commission[:4 - running_count]
|
||||
daily_choose, urgent_choose = CommissionGroup(self.config), CommissionGroup(self.config)
|
||||
daily_choose, urgent_choose = CommissionGroup(
|
||||
self.config), CommissionGroup(self.config)
|
||||
for comm in commission:
|
||||
if comm in daily:
|
||||
daily_choose.commission.append(comm)
|
||||
@ -394,8 +405,10 @@ class RewardCommission(UI, InfoHandler):
|
||||
|
||||
def _commission_swipe(self, distance=300):
|
||||
# Distance of two commission is 146px
|
||||
p1, p2 = random_rectangle_vector((0, -distance), box=(620, 67, 1154, 692), random_range=(-20, -5, 20, 5))
|
||||
self.device.drag(p1, p2, segments=2, shake=(25, 0), point_random=(0, 0, 0, 0), shake_random=(-5, 0, 5, 0))
|
||||
p1, p2 = random_rectangle_vector(
|
||||
(0, -distance), box=(620, 67, 1154, 692), random_range=(-20, -5, 20, 5))
|
||||
self.device.drag(p1, p2, segments=2, shake=(25, 0),
|
||||
point_random=(0, 0, 0, 0), shake_random=(-5, 0, 5, 0))
|
||||
self.device.sleep(0.3)
|
||||
self.device.screenshot()
|
||||
|
||||
|
@ -24,6 +24,7 @@ TEMPLATE_SIREN_1 = Template(file={'cn': './assets/cn/template/TEMPLATE_SIREN_1.p
|
||||
TEMPLATE_SIREN_2 = Template(file={'cn': './assets/cn/template/TEMPLATE_SIREN_2.png', 'en': './assets/en/template/TEMPLATE_SIREN_2.png'})
|
||||
TEMPLATE_SIREN_3 = Template(file={'cn': './assets/cn/template/TEMPLATE_SIREN_3.png', 'en': './assets/en/template/TEMPLATE_SIREN_3.png'})
|
||||
TEMPLATE_SIREN_Algerie = Template(file={'cn': './assets/cn/template/TEMPLATE_SIREN_Algerie.png', 'en': './assets/en/template/TEMPLATE_SIREN_Algerie.png'})
|
||||
TEMPLATE_SIREN_DD = Template(file={'cn': './assets/cn/template/TEMPLATE_SIREN_DD.png', 'en': './assets/en/template/TEMPLATE_SIREN_DD.png'})
|
||||
TEMPLATE_SIREN_LaGalissonniere = Template(file={'cn': './assets/cn/template/TEMPLATE_SIREN_LaGalissonniere.png', 'en': './assets/en/template/TEMPLATE_SIREN_LaGalissonniere.png'})
|
||||
TEMPLATE_SIREN_Vauquelin = Template(file={'cn': './assets/cn/template/TEMPLATE_SIREN_Vauquelin.png', 'en': './assets/en/template/TEMPLATE_SIREN_Vauquelin.png'})
|
||||
TEMPLATE_STAGE_CLEAR = Template(file={'cn': './assets/cn/template/TEMPLATE_STAGE_CLEAR.png', 'en': './assets/en/template/TEMPLATE_STAGE_CLEAR.png'})
|
||||
|
@ -24,7 +24,7 @@ MAIN_GOTO_REWARD = Button(area={'cn': (11, 139, 30, 189), 'en': (11, 139, 30, 18
|
||||
MISSION_CHECK = Button(area={'cn': (120, 15, 173, 40), 'en': (123, 18, 221, 37)}, color={'cn': (141, 156, 194), 'en': (104, 117, 158)}, button={'cn': (120, 15, 173, 40), 'en': (123, 18, 221, 37)}, file={'cn': './assets/cn/ui/MISSION_CHECK.png', 'en': './assets/en/ui/MISSION_CHECK.png'})
|
||||
REWARD_CHECK = Button(area={'cn': (302, 119, 371, 195), 'en': (302, 119, 371, 195)}, color={'cn': (146, 118, 120), 'en': (146, 118, 120)}, button={'cn': (302, 119, 371, 195), 'en': (302, 119, 371, 195)}, file={'cn': './assets/cn/ui/REWARD_CHECK.png', 'en': './assets/en/ui/REWARD_CHECK.png'})
|
||||
REWARD_GOTO_COMMISSION = Button(area={'cn': (383, 262, 503, 302), 'en': (384, 261, 503, 304)}, color={'cn': (91, 136, 199), 'en': (89, 133, 197)}, button={'cn': (383, 262, 503, 302), 'en': (384, 261, 503, 304)}, file={'cn': './assets/cn/ui/REWARD_GOTO_COMMISSION.png', 'en': './assets/en/ui/REWARD_GOTO_COMMISSION.png'})
|
||||
REWARD_GOTO_MAIN = Button(area={'cn': (1037, 611, 1107, 656), 'en': (1037, 611, 1107, 656)}, color={'cn': (134, 122, 127), 'en': (134, 122, 127)}, button={'cn': (1037, 611, 1107, 656), 'en': (1037, 611, 1107, 656)}, file={'cn': './assets/cn/ui/REWARD_GOTO_MAIN.png', 'en': './assets/en/ui/REWARD_GOTO_MAIN.png'})
|
||||
REWARD_GOTO_MAIN = Button(area={'cn': (1037, 611, 1107, 656), 'en': (1037, 612, 1107, 657)}, color={'cn': (134, 122, 127), 'en': (41, 31, 32)}, button={'cn': (1037, 611, 1107, 656), 'en': (1037, 612, 1107, 657)}, file={'cn': './assets/cn/ui/REWARD_GOTO_MAIN.png', 'en': './assets/en/ui/REWARD_GOTO_MAIN.png'})
|
||||
REWARD_GOTO_TACTICAL = Button(area={'cn': (383, 404, 503, 444), 'en': (385, 404, 502, 444)}, color={'cn': (89, 140, 198), 'en': (84, 137, 196)}, button={'cn': (383, 404, 503, 444), 'en': (385, 404, 502, 444)}, file={'cn': './assets/cn/ui/REWARD_GOTO_TACTICAL.png', 'en': './assets/en/ui/REWARD_GOTO_TACTICAL.png'})
|
||||
SP_CHECK = Button(area={'cn': (123, 63, 206, 109), 'en': (123, 63, 206, 109)}, color={'cn': (95, 110, 145), 'en': (95, 110, 145)}, button={'cn': (123, 63, 206, 109), 'en': (123, 63, 206, 109)}, file={'cn': './assets/cn/ui/SP_CHECK.png', 'en': './assets/en/ui/SP_CHECK.png'})
|
||||
TACTICAL_CHECK = Button(area={'cn': (122, 14, 231, 38), 'en': (120, 16, 292, 40)}, color={'cn': (145, 161, 200), 'en': (94, 107, 144)}, button={'cn': (122, 14, 231, 38), 'en': (120, 16, 292, 40)}, file={'cn': './assets/cn/ui/TACTICAL_CHECK.png', 'en': './assets/en/ui/TACTICAL_CHECK.png'})
|
||||
|