diff --git a/assets/en/template/TEMPLATE_AMBUSH_EVADE_FAILED.png b/assets/en/template/TEMPLATE_AMBUSH_EVADE_FAILED.png index 8b236e5bb..5835fd3db 100644 Binary files a/assets/en/template/TEMPLATE_AMBUSH_EVADE_FAILED.png and b/assets/en/template/TEMPLATE_AMBUSH_EVADE_FAILED.png differ diff --git a/assets/en/template/TEMPLATE_AMBUSH_EVADE_SUCCESS.png b/assets/en/template/TEMPLATE_AMBUSH_EVADE_SUCCESS.png index feca3e7bd..9a9a2ef17 100644 Binary files a/assets/en/template/TEMPLATE_AMBUSH_EVADE_SUCCESS.png and b/assets/en/template/TEMPLATE_AMBUSH_EVADE_SUCCESS.png differ diff --git a/assets/en/template/TEMPLATE_CAUGHT_BY_SIREN.png b/assets/en/template/TEMPLATE_CAUGHT_BY_SIREN.png index 2ef39ad38..ae65cd04d 100644 Binary files a/assets/en/template/TEMPLATE_CAUGHT_BY_SIREN.png and b/assets/en/template/TEMPLATE_CAUGHT_BY_SIREN.png differ diff --git a/assets/en/template/TEMPLATE_MAP_WALK_OUT_OF_STEP.png b/assets/en/template/TEMPLATE_MAP_WALK_OUT_OF_STEP.png index 9a2bdd7e1..52b286a6a 100644 Binary files a/assets/en/template/TEMPLATE_MAP_WALK_OUT_OF_STEP.png and b/assets/en/template/TEMPLATE_MAP_WALK_OUT_OF_STEP.png differ diff --git a/campaign/campaign_main/campaign_12_4.py b/campaign/campaign_main/campaign_12_4.py new file mode 100644 index 000000000..2dfa9c716 --- /dev/null +++ b/campaign/campaign_main/campaign_12_4.py @@ -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() \ No newline at end of file diff --git a/campaign/campaign_main/campaign_7_2_mystery_farming.py b/campaign/campaign_main/campaign_7_2_mystery_farming.py index 1fff36dad..20f5c6167 100644 --- a/campaign/campaign_main/campaign_7_2_mystery_farming.py +++ b/campaign/campaign_main/campaign_7_2_mystery_farming.py @@ -15,6 +15,7 @@ A5, B5, C5, D5, E5, F5, G5, H5 = MAP.flatten() ROAD_MAIN = RoadGrids([A3, [C3, B4, C5], [F1, G2, G3]]) GRIDS_FOR_FASTER = SelectedGrids([A3, C3, E3, G3]) FLEET_2_STEP_ON = SelectedGrids([A3, G3, C3, E3]) +MAP.camera_data_spawn_point = ['A1'] class Campaign(CampaignBase): diff --git a/doc/Getting_Started.md b/doc/Getting_Started.md new file mode 100644 index 000000000..5fe830d82 --- /dev/null +++ b/doc/Getting_Started.md @@ -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. + + diff --git a/doc/Quick_guide.md b/doc/Quick_guide.md index bbb872abe..d413e0882 100644 --- a/doc/Quick_guide.md +++ b/doc/Quick_guide.md @@ -9,9 +9,9 @@ * 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.** -* -# 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`) * Then it will install everything and download ALAS diff --git a/doc/Readme.md b/doc/Readme.md new file mode 100644 index 000000000..e450feeba --- /dev/null +++ b/doc/Readme.md @@ -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. \ No newline at end of file diff --git a/doc/misc.assets/config_icon.png b/doc/misc.assets/config_icon.png new file mode 100644 index 000000000..3bc142e9e Binary files /dev/null and b/doc/misc.assets/config_icon.png differ diff --git a/doc/misc.assets/running_icon.png b/doc/misc.assets/running_icon.png new file mode 100644 index 000000000..3bc142e9e Binary files /dev/null and b/doc/misc.assets/running_icon.png differ diff --git a/module/config/argparser.py b/module/config/argparser.py index fba088a33..bfb524983 100644 --- a/module/config/argparser.py +++ b/module/config/argparser.py @@ -52,7 +52,7 @@ def update_config_from_template(config, file): @Gooey( optional_cols=2, - program_name=pyw_name.capitalize(), + program_name=pyw_name.capitalize(), image_dir='doc/misc.assets', sidebar_title='功能', terminal_font_family='Consolas', language='chinese', diff --git a/module/config/argparser_en.py b/module/config/argparser_en.py index b974be834..7bfb019f3 100644 --- a/module/config/argparser_en.py +++ b/module/config/argparser_en.py @@ -50,7 +50,7 @@ def update_config_from_template(config, file): @Gooey( optional_cols=2, - program_name=pyw_name.capitalize(), + program_name=pyw_name.capitalize(), image_dir='doc/misc.assets', sidebar_title='Function', terminal_font_family='Consolas', language='english', @@ -121,7 +121,7 @@ def main(ini_name=''): 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_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_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('--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_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('--package_name', default='com.YoStarEN.AzurLane', help='') diff --git a/module/config/argparser_jp.py b/module/config/argparser_jp.py index f495f06e0..978df2498 100644 --- a/module/config/argparser_jp.py +++ b/module/config/argparser_jp.py @@ -49,7 +49,7 @@ def update_config_from_template(config, file): @Gooey( optional_cols=2, - program_name=pyw_name.capitalize(), + program_name=pyw_name.capitalize(), image_dir='doc/misc.assets', sidebar_title='Function', terminal_font_family='Consolas', language='english', diff --git a/version.txt b/version.txt index e69de29bb..05ba528d3 100644 --- a/version.txt +++ b/version.txt @@ -0,0 +1,2 @@ +0.9.0 +20200615.01 \ No newline at end of file