Merge pull request #22 from whoamikyo/master

Mirroring master
This commit is contained in:
Erik 2020-06-16 01:12:16 -03:00 committed by GitHub
commit 185b85a808
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 112 additions and 8 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@ -0,0 +1,83 @@
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
MAP = CampaignMap('12-4')
MAP.shape = 'K8'
MAP.map_data = '''
MB MB ME -- ME ++ ++ ++ MB MB ++
ME ++ -- ME -- MA ++ ++ ME ME ++
-- ME -- ME ME -- ME ME -- ME --
++ -- ME ++ ++ ME ME -- ++ ++ ME
++ ME ME -- ME ME -- ME -- ++ --
++ -- ME ME -- ME ME ++ -- -- ME
ME -- ME -- ME -- ME -- -- ME --
-- -- -- ME SP SP ++ ++ ++ ME --
'''
MAP.weight_data = '''
10 10 10 10 10 10 10 10 10 10 10
10 10 10 10 10 10 10 10 10 10 10
10 10 10 10 10 10 10 10 10 10 10
10 10 10 10 10 10 10 10 10 10 20
10 10 10 10 10 10 10 10 10 10 20
10 10 10 10 10 10 10 10 10 10 10
10 10 10 10 10 10 10 10 10 10 10
10 10 10 10 10 10 10 10 10 10 10
'''
MAP.camera_data = ['D3', 'D6', 'H3', 'H6']
MAP.spawn_data = [
{'battle': 0, 'enemy': 2},
{'battle': 1, 'enemy': 2},
{'battle': 2, 'enemy': 2},
{'battle': 3, 'enemy': 1},
{'battle': 4, 'enemy': 1},
{'battle': 5},
{'battle': 6, 'boss': 1},
]
# MAP.in_map_swipe_preset_data = (2, 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, \
A8, B8, C8, D8, E8, F8, G8, H8, I8, J8, K8, \
= MAP.flatten()
# ROAD_MAIN = RoadGrids([[B6, C5]])
road_main = RoadGrids([[B6, C5]])
class Config:
INTERNAL_LINES_FIND_PEAKS_PARAMETERS = {
'height': (120, 255 - 40),
'width': 2,
'prominence': 10,
'distance': 35,
}
class Campaign(CampaignBase):
MAP = MAP
def battle_0(self):
if self.clear_roadblocks([road_main]):
return True
if self.clear_potential_roadblocks([road_main]):
return True
return self.battle_default()
def battle_6(self):
self.pick_up_ammo()
boss = self.map.select(is_boss=True)
if boss:
if not self.check_accessibility(boss[0], fleet=1):
if self.clear_roadblocks([road_main]):
return True
return self.fleet_1.clear_boss()

View File

@ -15,6 +15,7 @@ A5, B5, C5, D5, E5, F5, G5, H5 = MAP.flatten()
ROAD_MAIN = RoadGrids([A3, [C3, B4, C5], [F1, G2, G3]]) ROAD_MAIN = RoadGrids([A3, [C3, B4, C5], [F1, G2, G3]])
GRIDS_FOR_FASTER = SelectedGrids([A3, C3, E3, G3]) GRIDS_FOR_FASTER = SelectedGrids([A3, C3, E3, G3])
FLEET_2_STEP_ON = SelectedGrids([A3, G3, C3, E3]) FLEET_2_STEP_ON = SelectedGrids([A3, G3, C3, E3])
MAP.camera_data_spawn_point = ['A1']
class Campaign(CampaignBase): class Campaign(CampaignBase):

11
doc/Getting_Started.md Normal file
View File

@ -0,0 +1,11 @@
# Getting Started
* When opening the ALAS GUI you will see a number of different functions on the left side. `Setting` and `Reward` are where you can configure how the script runs. In `Setting` you can choose which fleet is the mob fleet or the boss fleet, retirement and enhancing preferences and you even choose what level of ship morale you would like to farm with. In `Reward` you set when the script will collect oil and coins from your canteen and market and mission rewards. You can also tell the script what commissions you would like to run and what tactical training to do. All of the settings here will be used when you select a `function` to farm. Before choosing a `function` to farm, please press `start` to save your `settings`, so if you go to `function` `setting` and modify some things and dont click in `start` nothing there you change will be write on `alas.ini`, and not run ALAS with `alas.ini` opened, this can cause issues when saving changes to the file.
* The current functions are `Daily` where the script will run your daily missions and hard mode maps of your choice. `Main Campaign` where the script will complete story stages. `Event` where it will run event maps. `7-2 Mystery Farming` will run 7-2 to farm for gold. `12-2 and 12-4 Levelling` will run those maps for exp.
* After you have tweaked your settings and saved them, select a function and press start again and the script will run. For example if you select the `event` function, then press start it will farm an event map of your choice.
* Dont use submarines, When switching the submarine zone, the icon in the strategy don't change because a in-game bug, it's not just to checking `do_not_use` in ALAS, dont have any submarine fleet mounted while using the ALAS.

View File

@ -9,9 +9,9 @@
* The use of a virtual environment (venv) in python is highly recommended * The use of a virtual environment (venv) in python is highly recommended
* ADB debugging enabled and emulator with 1280x720 resolution * ADB debugging enabled and emulator with 1280x720 resolution
* **Read the entire guide before asking any questions.** * **Read the entire guide before asking any questions.**
*
# New installation method
# New installation method (Recommended)
* Just download the file [EasyALAS_CLICK_INSTALL.bat](https://raw.githubusercontent.com/whoamikyo/AzurLaneAutoScript/master/EasyALAS_CLICK_INSTALL.bat), put in some folder and run as administrator (`Right click> Run as administrator`) * Just download the file [EasyALAS_CLICK_INSTALL.bat](https://raw.githubusercontent.com/whoamikyo/AzurLaneAutoScript/master/EasyALAS_CLICK_INSTALL.bat), put in some folder and run as administrator (`Right click> Run as administrator`)
* Then it will install everything and download ALAS * Then it will install everything and download ALAS

7
doc/Readme.md Normal file
View File

@ -0,0 +1,7 @@
# Documentation
Here are some documents to help both beginners and advanced users.
Before asking any questions, make sure that your question has not been answered in any document.
Feel free to add new information through the pull request.

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -52,7 +52,7 @@ def update_config_from_template(config, file):
@Gooey( @Gooey(
optional_cols=2, optional_cols=2,
program_name=pyw_name.capitalize(), program_name=pyw_name.capitalize(), image_dir='doc/misc.assets',
sidebar_title='功能', sidebar_title='功能',
terminal_font_family='Consolas', terminal_font_family='Consolas',
language='chinese', language='chinese',

View File

@ -50,7 +50,7 @@ def update_config_from_template(config, file):
@Gooey( @Gooey(
optional_cols=2, optional_cols=2,
program_name=pyw_name.capitalize(), program_name=pyw_name.capitalize(), image_dir='doc/misc.assets',
sidebar_title='Function', sidebar_title='Function',
terminal_font_family='Consolas', terminal_font_family='Consolas',
language='english', language='english',
@ -121,7 +121,7 @@ def main(ini_name=''):
setting_parser = subs.add_parser('setting') setting_parser = subs.add_parser('setting')
# 选择关卡 # 选择关卡
stage = setting_parser.add_argument_group('Level settings', 'Need to run once to save options') stage = setting_parser.add_argument_group('Level settings', 'Need to Press start to save your settings.')
stage.add_argument('--enable_stop_condition', default=default('--enable_stop_condition'), choices=['yes', 'no']) stage.add_argument('--enable_stop_condition', default=default('--enable_stop_condition'), choices=['yes', 'no'])
stage.add_argument('--enable_fast_forward', default=default('--enable_fast_forward'), choices=['yes', 'no'], help='Enable or disable clearing mode') stage.add_argument('--enable_fast_forward', default=default('--enable_fast_forward'), choices=['yes', 'no'], help='Enable or disable clearing mode')
@ -218,7 +218,7 @@ def main(ini_name=''):
# ==========reward========== # ==========reward==========
reward_parser = subs.add_parser('reward') reward_parser = subs.add_parser('reward')
reward_condition = reward_parser.add_argument_group('Triggering conditions', 'Need to run once to save the options, after running it will enter the on-hook vegetable collection mode') reward_condition = reward_parser.add_argument_group('Triggering conditions', 'Need to Press start to save your settings, after running it will enter the on-hook vegetable collection mode')
reward_condition.add_argument('--enable_reward', default=default('--enable_reward'), choices=['yes', 'no']) reward_condition.add_argument('--enable_reward', default=default('--enable_reward'), choices=['yes', 'no'])
reward_condition.add_argument('--reward_interval', default=default('--reward_interval'), choices=['20', '30', '60'], help='How many minutes to trigger collection') reward_condition.add_argument('--reward_interval', default=default('--reward_interval'), choices=['20', '30', '60'], help='How many minutes to trigger collection')
@ -269,7 +269,7 @@ def main(ini_name=''):
# ==========emulator========== # ==========emulator==========
emulator_parser = subs.add_parser('emulator') emulator_parser = subs.add_parser('emulator')
emulator = emulator_parser.add_argument_group('Emulator', 'Need to run once to save the options, it will check whether the game is started \nIf the game has not started, it will be started') emulator = emulator_parser.add_argument_group('Emulator', 'Need to Press start to save your settings, it will check whether the game is started \nIf the game has not started, it will be started')
emulator.add_argument('--serial', default=default('--serial'), help='Bluestacks 127.0.0.1:5555 \nNox 127.0.0.1:62001') emulator.add_argument('--serial', default=default('--serial'), help='Bluestacks 127.0.0.1:5555 \nNox 127.0.0.1:62001')
emulator.add_argument('--package_name', default='com.YoStarEN.AzurLane', help='') emulator.add_argument('--package_name', default='com.YoStarEN.AzurLane', help='')

View File

@ -49,7 +49,7 @@ def update_config_from_template(config, file):
@Gooey( @Gooey(
optional_cols=2, optional_cols=2,
program_name=pyw_name.capitalize(), program_name=pyw_name.capitalize(), image_dir='doc/misc.assets',
sidebar_title='Function', sidebar_title='Function',
terminal_font_family='Consolas', terminal_font_family='Consolas',
language='english', language='english',

View File

@ -0,0 +1,2 @@
0.9.0
20200615.01