Fix: [EN] Relogin is now working

Optimize: [EN] GUI improved
This commit is contained in:
kyO The NinjA 2020-05-31 04:48:22 -03:00
parent 8449a7210d
commit 6eabcf6a35
14 changed files with 30 additions and 24 deletions

1
.gitignore vendored
View File

@ -10,6 +10,7 @@ config/*.ini
!alas_kr.pyw !alas_kr.pyw
dev_tools/debug_tools dev_tools/debug_tools
.idea .idea
/screenshots
# Created by .ignore support plugin (hsz.mobi) # Created by .ignore support plugin (hsz.mobi)

View File

@ -2,7 +2,7 @@
Alas, an Azur Lane automation tool with GUI (For CN server, can support other server). Alas, an Azur Lane automation tool with GUI (For CN server, can support other server).
![gui](doc/README.assets/gui.png) ![gui](doc/README.assets/gui_en.png)
## Features ## Features

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -18,7 +18,7 @@ MAP.map_data = '''
class Config: class Config:
SUBMARINE = 0 SUBMARINE = 0
FLEET_BOSS = 2 FLEET_BOSS = 0
POOR_MAP_DATA = True POOR_MAP_DATA = True
MAP_HAS_AMBUSH = False MAP_HAS_AMBUSH = False

View File

@ -12,6 +12,8 @@ AUTOMATION_SWITCH = Button(area={'cn': (821, 106, 907, 136), 'en': (823, 109, 90
BATTLE_PREPARATION = Button(area={'cn': (1043, 607, 1241, 667), 'en': (1045, 607, 1241, 667)}, color={'cn': (234, 179, 97), 'en': (235, 182, 102)}, button={'cn': (1043, 607, 1241, 667), 'en': (1045, 607, 1241, 667)}, file={'cn': './assets/cn/combat/BATTLE_PREPARATION.png', 'en': './assets/en/combat/BATTLE_PREPARATION.png'}) BATTLE_PREPARATION = Button(area={'cn': (1043, 607, 1241, 667), 'en': (1045, 607, 1241, 667)}, color={'cn': (234, 179, 97), 'en': (235, 182, 102)}, button={'cn': (1043, 607, 1241, 667), 'en': (1045, 607, 1241, 667)}, file={'cn': './assets/cn/combat/BATTLE_PREPARATION.png', 'en': './assets/en/combat/BATTLE_PREPARATION.png'})
BATTLE_PREPARATION_WITH_OVERLAY = Button(area={'cn': (1058, 622, 1226, 652), 'en': (1058, 622, 1226, 652)}, color={'cn': (96, 74, 39), 'en': (96, 74, 39)}, button={'cn': (1058, 622, 1226, 652), 'en': (1058, 622, 1226, 652)}, file={'cn': './assets/cn/combat/BATTLE_PREPARATION_WITH_OVERLAY.png', 'en': './assets/en/combat/BATTLE_PREPARATION_WITH_OVERLAY.png'}) BATTLE_PREPARATION_WITH_OVERLAY = Button(area={'cn': (1058, 622, 1226, 652), 'en': (1058, 622, 1226, 652)}, color={'cn': (96, 74, 39), 'en': (96, 74, 39)}, button={'cn': (1058, 622, 1226, 652), 'en': (1058, 622, 1226, 652)}, file={'cn': './assets/cn/combat/BATTLE_PREPARATION_WITH_OVERLAY.png', 'en': './assets/en/combat/BATTLE_PREPARATION_WITH_OVERLAY.png'})
BATTLE_STATUS_A = Button(area={'cn': (622, 266, 732, 288), 'en': (622, 266, 732, 288)}, color={'cn': (235, 227, 111), 'en': (235, 227, 111)}, button={'cn': (1000, 631, 1055, 689), 'en': (999, 630, 1047, 691)}, file={'cn': './assets/cn/combat/BATTLE_STATUS_A.png', 'en': './assets/en/combat/BATTLE_STATUS_A.png'}) BATTLE_STATUS_A = Button(area={'cn': (622, 266, 732, 288), 'en': (622, 266, 732, 288)}, color={'cn': (235, 227, 111), 'en': (235, 227, 111)}, button={'cn': (1000, 631, 1055, 689), 'en': (999, 630, 1047, 691)}, file={'cn': './assets/cn/combat/BATTLE_STATUS_A.png', 'en': './assets/en/combat/BATTLE_STATUS_A.png'})
BATTLE_STATUS_C = Button(area={'cn': (431, 257, 514, 329), 'en': (431, 257, 514, 329)}, color={'cn': (169, 161, 164), 'en': (169, 161, 164)}, button={'cn': (431, 257, 514, 329), 'en': (431, 257, 514, 329)}, file={'cn': './assets/cn/combat/BATTLE_STATUS_C.png', 'en': './assets/en/combat/BATTLE_STATUS_C.png'})
BATTLE_STATUS_D = Button(area={'cn': (431, 257, 514, 329), 'en': (431, 257, 514, 329)}, color={'cn': (169, 161, 164), 'en': (169, 161, 164)}, button={'cn': (431, 257, 514, 329), 'en': (431, 257, 514, 329)}, file={'cn': './assets/cn/combat/BATTLE_STATUS_D.png', 'en': './assets/en/combat/BATTLE_STATUS_D.png'})
BATTLE_STATUS_S = Button(area={'cn': (633, 297, 722, 320), 'en': (629, 297, 722, 318)}, color={'cn': (233, 241, 127), 'en': (233, 241, 127)}, button={'cn': (1000, 631, 1055, 689), 'en': (999, 630, 1047, 691)}, file={'cn': './assets/cn/combat/BATTLE_STATUS_S.png', 'en': './assets/en/combat/BATTLE_STATUS_S.png'}) BATTLE_STATUS_S = Button(area={'cn': (633, 297, 722, 320), 'en': (629, 297, 722, 318)}, color={'cn': (233, 241, 127), 'en': (233, 241, 127)}, button={'cn': (1000, 631, 1055, 689), 'en': (999, 630, 1047, 691)}, file={'cn': './assets/cn/combat/BATTLE_STATUS_S.png', 'en': './assets/en/combat/BATTLE_STATUS_S.png'})
COMBAT_AUTO = Button(area={'cn': (136, 573, 167, 604), 'en': (136, 573, 167, 604)}, color={'cn': (229, 242, 255), 'en': (229, 242, 255)}, button={'cn': (136, 573, 167, 604), 'en': (136, 573, 167, 604)}, file={'cn': './assets/cn/combat/COMBAT_AUTO.png', 'en': './assets/en/combat/COMBAT_AUTO.png'}) COMBAT_AUTO = Button(area={'cn': (136, 573, 167, 604), 'en': (136, 573, 167, 604)}, color={'cn': (229, 242, 255), 'en': (229, 242, 255)}, button={'cn': (136, 573, 167, 604), 'en': (136, 573, 167, 604)}, file={'cn': './assets/cn/combat/COMBAT_AUTO.png', 'en': './assets/en/combat/COMBAT_AUTO.png'})
COMBAT_AUTO_SWITCH = Button(area={'cn': (18, 38, 36, 56), 'en': (16, 31, 140, 62)}, color={'cn': (179, 198, 235), 'en': (105, 137, 189)}, button={'cn': (18, 38, 36, 56), 'en': (16, 31, 140, 62)}, file={'cn': './assets/cn/combat/COMBAT_AUTO_SWITCH.png', 'en': './assets/en/combat/COMBAT_AUTO_SWITCH.png'}) COMBAT_AUTO_SWITCH = Button(area={'cn': (18, 38, 36, 56), 'en': (16, 31, 140, 62)}, color={'cn': (179, 198, 235), 'en': (105, 137, 189)}, button={'cn': (18, 38, 36, 56), 'en': (16, 31, 140, 62)}, file={'cn': './assets/cn/combat/COMBAT_AUTO_SWITCH.png', 'en': './assets/en/combat/COMBAT_AUTO_SWITCH.png'})

View File

@ -119,7 +119,7 @@ def main(ini_name=''):
# 选择关卡 # 选择关卡
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 run once to save options')
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']) stage.add_argument('--enable_fast_forward', default=default('--enable_fast_forward'), choices=['yes', 'no'], help='Enable or disable clearing mode')
stop = stage.add_argument_group('Stop condition', 'After triggering, it will not stop immediately. It will complete the current attack first, and fill in 0 if it is not needed.') stop = stage.add_argument_group('Stop condition', 'After triggering, it will not stop immediately. It will complete the current attack first, and fill in 0 if it is not needed.')
stop.add_argument('--if_count_greater_than', default=default('--if_count_greater_than'), help='The previous setting will be used, and the number\n of deductions will be deducted after completion of the attack until it is cleared.') stop.add_argument('--if_count_greater_than', default=default('--if_count_greater_than'), help='The previous setting will be used, and the number\n of deductions will be deducted after completion of the attack until it is cleared.')
@ -133,7 +133,7 @@ def main(ini_name=''):
fleet.add_argument('--enable_fleet_control', default=default('--enable_fleet_control'), choices=['yes', 'no']) fleet.add_argument('--enable_fleet_control', default=default('--enable_fleet_control'), choices=['yes', 'no'])
fleet.add_argument('--enable_map_fleet_lock', default=default('--enable_map_fleet_lock'), choices=['yes', 'no']) fleet.add_argument('--enable_map_fleet_lock', default=default('--enable_map_fleet_lock'), choices=['yes', 'no'])
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 = fleet.add_argument_group('Mob 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_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_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'], 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') 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')
@ -143,7 +143,7 @@ def main(ini_name=''):
f2.add_argument('--fleet_formation_2', default=default('--fleet_formation_2'), choices=['Line Ahead', 'Double Line', 'Diamond']) 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'], 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.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 = fleet.add_argument_group('Alternate Mob 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_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_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'], 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.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')
@ -152,7 +152,7 @@ def main(ini_name=''):
f4.add_argument('--combat_auto_mode', default=default('--combat_auto_mode'), choices=['combat_auto', 'combat_manual', 'stand_still_in_the_middle']) f4.add_argument('--combat_auto_mode', default=default('--combat_auto_mode'), choices=['combat_auto', 'combat_manual', 'stand_still_in_the_middle'])
# 潜艇设置 # 潜艇设置
submarine = setting_parser.add_argument_group('Submarine settings', 'Only supported: hunt_only, do_not_use every_combat') submarine = setting_parser.add_argument_group('Submarine settings', 'Only supported: hunt_only, do_not_use and every_combat')
submarine.add_argument('--fleet_index_4', default=default('--fleet_index_4'), choices=['do_not_use', '1', '2']) submarine.add_argument('--fleet_index_4', default=default('--fleet_index_4'), choices=['do_not_use', '1', '2'])
submarine.add_argument('--submarine_mode', default=default('--submarine_mode'), choices=['do_not_use', 'hunt_only', 'every_combat', 'when_no_ammo', 'when_boss_combat', 'when_boss_combat_boss_appear']) submarine.add_argument('--submarine_mode', default=default('--submarine_mode'), choices=['do_not_use', 'hunt_only', 'every_combat', 'when_no_ammo', 'when_boss_combat', 'when_boss_combat_boss_appear'])
@ -161,7 +161,7 @@ def main(ini_name=''):
emotion.add_argument('--enable_emotion_reduce', default=default('--enable_emotion_reduce'), choices=['yes', 'no']) emotion.add_argument('--enable_emotion_reduce', default=default('--enable_emotion_reduce'), choices=['yes', 'no'])
emotion.add_argument('--ignore_low_emotion_warn', default=default('--ignore_low_emotion_warn'), choices=['yes', 'no']) emotion.add_argument('--ignore_low_emotion_warn', default=default('--ignore_low_emotion_warn'), choices=['yes', 'no'])
e1 = emotion.add_argument_group('Road Fleet') e1 = emotion.add_argument_group('Mob Fleet')
e1.add_argument('--emotion_recover_1', default=default('--emotion_recover_1'), choices=['not_in_dormitory', 'dormitory_floor_1', 'dormitory_floor_2']) e1.add_argument('--emotion_recover_1', default=default('--emotion_recover_1'), choices=['not_in_dormitory', 'dormitory_floor_1', 'dormitory_floor_2'])
e1.add_argument('--emotion_control_1', default=default('--emotion_control_1'), choices=['keep_high_emotion', 'avoid_green_face', 'avoid_yellow_face', 'avoid_red_face']) e1.add_argument('--emotion_control_1', default=default('--emotion_control_1'), choices=['keep_high_emotion', 'avoid_green_face', 'avoid_yellow_face', 'avoid_red_face'])
e1.add_argument('--hole_fleet_married_1', default=default('--hole_fleet_married_1'), choices=['yes', 'no']) e1.add_argument('--hole_fleet_married_1', default=default('--hole_fleet_married_1'), choices=['yes', 'no'])
@ -171,7 +171,7 @@ def main(ini_name=''):
e2.add_argument('--emotion_control_2', default=default('--emotion_control_2'), choices=['keep_high_emotion', 'avoid_green_face', 'avoid_yellow_face', 'avoid_red_face']) e2.add_argument('--emotion_control_2', default=default('--emotion_control_2'), choices=['keep_high_emotion', 'avoid_green_face', 'avoid_yellow_face', 'avoid_red_face'])
e2.add_argument('--hole_fleet_married_2', default=default('--hole_fleet_married_2'), choices=['yes', 'no']) e2.add_argument('--hole_fleet_married_2', default=default('--hole_fleet_married_2'), choices=['yes', 'no'])
e3 = emotion.add_argument_group('Alternate Road Fleet', 'Will be used when the home team triggers mood control') e3 = emotion.add_argument_group('Alternate Mob Fleet', 'Will be used when the first team triggers mood control')
e3.add_argument('--emotion_recover_3', default=default('--emotion_recover_3'), choices=['not_in_dormitory', 'dormitory_floor_1', 'dormitory_floor_2']) e3.add_argument('--emotion_recover_3', default=default('--emotion_recover_3'), choices=['not_in_dormitory', 'dormitory_floor_1', 'dormitory_floor_2'])
e3.add_argument('--emotion_control_3', default=default('--emotion_control_3'), choices=['keep_high_emotion', 'avoid_green_face', 'avoid_yellow_face', 'avoid_red_face']) e3.add_argument('--emotion_control_3', default=default('--emotion_control_3'), choices=['keep_high_emotion', 'avoid_green_face', 'avoid_yellow_face', 'avoid_red_face'])
e3.add_argument('--hole_fleet_married_3', default=default('--hole_fleet_married_3'), choices=['yes', 'no']) e3.add_argument('--hole_fleet_married_3', default=default('--hole_fleet_married_3'), choices=['yes', 'no'])
@ -182,7 +182,7 @@ def main(ini_name=''):
hp.add_argument('--enable_low_hp_withdraw', default=default('--enable_low_hp_withdraw'), choices=['yes', 'no']) hp.add_argument('--enable_low_hp_withdraw', default=default('--enable_low_hp_withdraw'), choices=['yes', 'no'])
hp_balance = hp.add_argument_group('HP Balance', '') hp_balance = hp.add_argument_group('HP Balance', '')
hp_balance.add_argument('--scout_hp_difference_threshold', default=default('--scout_hp_difference_threshold'), help='When the difference in HP volume is greater than the threshold, transpose') hp_balance.add_argument('--scout_hp_difference_threshold', default=default('--scout_hp_difference_threshold'), help='When the difference in HP volume is greater than the threshold, transpose')
hp_balance.add_argument('--scout_hp_weights', default=default('--scout_hp_weights'), help='Pioneer flesh should be modified when there is a difference, the format 1000,1000,1000') hp_balance.add_argument('--scout_hp_weights', default=default('--scout_hp_weights'), help='Should be repaired when there is a difference in Vanguard, format 1000,1000,1000')
hp_add = hp.add_argument_group('Emergency repair', '') hp_add = hp.add_argument_group('Emergency repair', '')
hp_add.add_argument('--emergency_repair_single_threshold', default=default('--emergency_repair_single_threshold'), help='Used when single shipgirl is below the threshold') hp_add.add_argument('--emergency_repair_single_threshold', default=default('--emergency_repair_single_threshold'), help='Used when single shipgirl is below the threshold')
hp_add.add_argument('--emergency_repair_hole_threshold', default=default('--emergency_repair_hole_threshold'), help='Used when all front rows or all back rows are below the threshold') hp_add.add_argument('--emergency_repair_hole_threshold', default=default('--emergency_repair_hole_threshold'), help='Used when all front rows or all back rows are below the threshold')
@ -250,21 +250,21 @@ def main(ini_name=''):
priority4.add_argument('--urgent_part', default=default('--urgent_part'), help='Support Vila Vela Island, support terror Banner') priority4.add_argument('--urgent_part', default=default('--urgent_part'), help='Support Vila Vela Island, support terror Banner')
priority4.add_argument('--urgent_cube', default=default('--urgent_cube'), help='Rescue merchant ship, enemy attack') priority4.add_argument('--urgent_cube', default=default('--urgent_cube'), help='Rescue merchant ship, enemy attack')
priority4.add_argument('--urgent_book', default=default('--urgent_book'), help='Support Tuhaoer Island, support Moe Island') priority4.add_argument('--urgent_book', default=default('--urgent_book'), help='Support Tuhaoer Island, support Moe Island')
priority4.add_argument('--urgent_box', default=default('--urgent_box'), help='BIW equipment transportation, NYB equipment research and development') priority4.add_argument('--urgent_box', default=default('--urgent_box'), help='BIW Gear Transport, NYB Gear Transport')
priority4.add_argument('--urgent_gem', default=default('--urgent_gem'), help='BIW VIP guard, NYB patrol guard') priority4.add_argument('--urgent_gem', default=default('--urgent_gem'), help='BIW VIP Escort, NYB VIP Escort')
priority4.add_argument('--urgent_ship', default=default('--urgent_ship'), help='Small ship watching ceremony, alliance ship watching ceremony') priority4.add_argument('--urgent_ship', default=default('--urgent_ship'), help='Small Launch Ceremony, Fleet Launch Ceremony, Alliance Launch Ceremony')
reward_tactical = reward_parser.add_argument_group('Classroom', 'Only support continuation of skill books, not new skills') reward_tactical = reward_parser.add_argument_group('Classroom', 'Only support continuation of skill books, not new skills')
reward_tactical.add_argument('--enable_tactical_reward', default=default('--enable_tactical_reward'), choices=['yes', 'no']) reward_tactical.add_argument('--enable_tactical_reward', default=default('--enable_tactical_reward'), choices=['yes', 'no'])
reward_tactical.add_argument('--tactical_night_range', default=default('--tactical_night_range'), help='Format 23:30-06:30') reward_tactical.add_argument('--tactical_night_range', default=default('--tactical_night_range'), help='Format 23:30-06:30')
reward_tactical.add_argument('--tactical_book_tier', default=default('--tactical_book_tier'), choices=['3', '2', '1'], help='Skill book that uses at most T a few \nT3 is a gold book, T2 is a purple book, T1 is a blue book') reward_tactical.add_argument('--tactical_book_tier', default=default('--tactical_book_tier'), choices=['3', '2', '1'], help='Wich skill book will use first\nT3 is a gold book, T2 is a purple book, T1 is a blue book')
reward_tactical.add_argument('--tactical_exp_first', default=default('--tactical_exp_first'), choices=['yes', 'no'], help='Choose Yes, give priority to the 150% bonus \nSelect No, give priority to the skills book with the same rarity') reward_tactical.add_argument('--tactical_exp_first', default=default('--tactical_exp_first'), choices=['yes', 'no'], help='Choose Yes, give priority to the 150% bonus \nSelect No, give priority to the skills book with the same rarity')
reward_tactical.add_argument('--tactical_book_tier_night', default=default('--tactical_book_tier_night'), choices=['3', '2', '1']) reward_tactical.add_argument('--tactical_book_tier_night', default=default('--tactical_book_tier_night'), choices=['3', '2', '1'])
reward_tactical.add_argument('--tactical_exp_first_night', default=default('--tactical_exp_first_night'), choices=['yes', 'no']) reward_tactical.add_argument('--tactical_exp_first_night', default=default('--tactical_exp_first_night'), choices=['yes', 'no'])
# ==========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 is started, trigger a collection') 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.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='')
@ -274,7 +274,7 @@ def main(ini_name=''):
adb = emulator_parser.add_argument_group('ADB settings', '') adb = emulator_parser.add_argument_group('ADB settings', '')
adb.add_argument('--use_adb_screenshot', default=default('--use_adb_screenshot'), choices=['yes', 'no'], help='It is recommended to enable it to reduce CPU usage') adb.add_argument('--use_adb_screenshot', default=default('--use_adb_screenshot'), choices=['yes', 'no'], help='It is recommended to enable it to reduce CPU usage')
adb.add_argument('--use_adb_control', default=default('--use_adb_control'), choices=['yes', 'no'], help='Suggest to close, can speed up the click speed') adb.add_argument('--use_adb_control', default=default('--use_adb_control'), choices=['yes', 'no'], help='Recommended off, can speed up the click speed')
adb.add_argument('--combat_screenshot_interval', default=default('--combat_screenshot_interval'), help='Slow down the screenshot speed during battle and reduce CPU') adb.add_argument('--combat_screenshot_interval', default=default('--combat_screenshot_interval'), help='Slow down the screenshot speed during battle and reduce CPU')
# ==========每日任务========== # ==========每日任务==========
@ -296,7 +296,7 @@ def main(ini_name=''):
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') 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')
# 困难设置 # 困难设置
hard = daily_parser.add_argument_group('Difficult setting', 'Need to turn on weekly mode, only support 10-4 temporarily') hard = daily_parser.add_argument_group('Difficult setting', 'Need to turn on weekly mode, only support 10-1, 10-2 and 10-4 temporarily')
hard.add_argument('--hard_campaign', default=default('--hard_campaign'), help='For example 10-4') hard.add_argument('--hard_campaign', default=default('--hard_campaign'), help='For example 10-4')
hard.add_argument('--hard_fleet', default=default('--hard_fleet'), choices=['1', '2']) hard.add_argument('--hard_fleet', default=default('--hard_fleet'), choices=['1', '2'])
hard.add_argument('--hard_equipment', default=default('--hard_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') hard.add_argument('--hard_equipment', default=default('--hard_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')
@ -311,14 +311,15 @@ def main(ini_name=''):
exercise.add_argument('--exercise_equipment', default=default('--exercise_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') exercise.add_argument('--exercise_equipment', default=default('--exercise_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')
# ==========event_daily_ab========== # ==========event_daily_ab==========
event_ab_parser = subs.add_parser('event_daily_ab') event_ab_parser = subs.add_parser('event_daily_bonus')
event_name = event_ab_parser.add_argument_group('Choose an event', 'bonus for first clear each day') 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') event_name.add_argument('--event_name_ab', default=default('--event_name_ab'), choices=event_folder, help='There a dropdown menu with many options')
# event_name.add_argument('--enable_hard_bonus', default=default('--enable_hard_bonus'), choices=['yes', 'no'], help='Will enable Daily bonus for Event hard maps') # Trying implement all event maps
# ==========main========== # ==========main==========
main_parser = subs.add_parser('main') main_parser = subs.add_parser('main')
# 选择关卡 # 选择关卡
stage = main_parser.add_argument_group('Choose a level', 'The main line chart strikes, currently only supports the first six chapters and 7-2') stage = main_parser.add_argument_group('Choose a level', 'Main campaign, currently only supports the first six chapters and 7-2')
stage.add_argument('--main_stage', default=default('--main_stage'), help='E.g 7-2') stage.add_argument('--main_stage', default=default('--main_stage'), help='E.g 7-2')
# ==========event========== # ==========event==========
@ -356,9 +357,9 @@ def main(ini_name=''):
# ==========c124_leveling========== # ==========c124_leveling==========
c_12_4_parser = subs.add_parser('c12-4_leveling') c_12_4_parser = subs.add_parser('c12-4_leveling')
c_12_4 = c_12_4_parser.add_argument_group('12-4 Search enemy settings', 'Need to ensure that the team has a certain strength') c_12_4 = c_12_4_parser.add_argument_group('12-4 Search enemy settings', 'Need to ensure that the team has a certain strength')
c_12_4.add_argument('--non_s3_enemy_enter_tolerance', default=default('--non_s3_enemy_enter_tolerance'), choices=['0', '1', '2'], help='Endure how many battles to enter without big') c_12_4.add_argument('--non_s3_enemy_enter_tolerance', default=default('--non_s3_enemy_enter_tolerance'), choices=['0', '1', '2'], help='Avoid enemy too strong')
c_12_4.add_argument('--non_s3_enemy_withdraw_tolerance', default=default('--non_s3_enemy_withdraw_tolerance'), choices=['0', '1', '2', '10'], help='How many battles will be fought after there is no large scale') c_12_4.add_argument('--non_s3_enemy_withdraw_tolerance', default=default('--non_s3_enemy_withdraw_tolerance'), choices=['0', '1', '2', '10'], help='How many battles will be fought after there is no large scale')
c_12_4.add_argument('--ammo_pick_up_124', default=default('--ammo_pick_up_124'), choices=['2', '3', '4', '5'], help='How much ammunition to pick after the war') c_12_4.add_argument('--ammo_pick_up_124', default=default('--ammo_pick_up_124'), choices=['2', '3', '4', '5'], help='How much ammunition to pick after the battle')
args = parser.parse_args() args = parser.parse_args()

View File

@ -28,7 +28,7 @@ dic_true_eng_to_eng = {
'reward': 'reward', 'reward': 'reward',
'emulator': 'emulator', 'emulator': 'emulator',
'daily': 'daily', 'daily': 'daily',
'event_daily_ab': 'event_daily_ab', 'event_daily_bonus': 'event_daily_ab',
'main': 'main', 'main': 'main',
'event': 'event', 'event': 'event',
'semi_auto': 'semi_auto', 'semi_auto': 'semi_auto',

View File

@ -3,6 +3,8 @@ from module.campaign.run import CampaignRun
RECORD_SINCE = (0,) RECORD_SINCE = (0,)
CAMPAIGN_NAME = ['a1', 'a2', 'a3', 'b1', 'b2', 'b3'] CAMPAIGN_NAME = ['a1', 'a2', 'a3', 'b1', 'b2', 'b3']
# CAMPAIGN_ALL = ['a1', 'a2', 'a3', 'b1', 'b2', 'b3', 'c1', 'c2', 'c3', 'd1', 'd2', 'd3'] # Trying implement all event maps
class CampaignAB(CampaignRun): class CampaignAB(CampaignRun):

View File

@ -20,10 +20,10 @@ INFO_BAR_2 = Button(area={'cn': (194, 234, 1086, 236), 'en': (194, 234, 1086, 23
INFO_BAR_3 = Button(area={'cn': (194, 171, 1086, 173), 'en': (194, 171, 1086, 173)}, color={'cn': (107, 158, 255), 'en': (107, 158, 255)}, button={'cn': (194, 171, 1086, 173), 'en': (194, 171, 1086, 173)}, file={'cn': './assets/cn/handler/INFO_BAR_3.png', 'en': './assets/en/handler/INFO_BAR_3.png'}) INFO_BAR_3 = Button(area={'cn': (194, 171, 1086, 173), 'en': (194, 171, 1086, 173)}, color={'cn': (107, 158, 255), 'en': (107, 158, 255)}, button={'cn': (194, 171, 1086, 173), 'en': (194, 171, 1086, 173)}, file={'cn': './assets/cn/handler/INFO_BAR_3.png', 'en': './assets/en/handler/INFO_BAR_3.png'})
IN_MAP = Button(area={'cn': (749, 654, 921, 707), 'en': (748, 652, 922, 702)}, color={'cn': (213, 124, 124), 'en': (211, 124, 124)}, button={'cn': (749, 654, 921, 707), 'en': (748, 652, 922, 702)}, file={'cn': './assets/cn/handler/IN_MAP.png', 'en': './assets/en/handler/IN_MAP.png'}) IN_MAP = Button(area={'cn': (749, 654, 921, 707), 'en': (748, 652, 922, 702)}, color={'cn': (213, 124, 124), 'en': (211, 124, 124)}, button={'cn': (749, 654, 921, 707), 'en': (748, 652, 922, 702)}, file={'cn': './assets/cn/handler/IN_MAP.png', 'en': './assets/en/handler/IN_MAP.png'})
IN_STAGE = Button(area={'cn': (122, 16, 172, 39), 'en': (120, 18, 208, 40)}, color={'cn': (149, 167, 207), 'en': (104, 118, 157)}, button={'cn': (122, 16, 172, 39), 'en': (120, 18, 208, 40)}, file={'cn': './assets/cn/handler/IN_STAGE.png', 'en': './assets/en/handler/IN_STAGE.png'}) IN_STAGE = Button(area={'cn': (122, 16, 172, 39), 'en': (120, 18, 208, 40)}, color={'cn': (149, 167, 207), 'en': (104, 118, 157)}, button={'cn': (122, 16, 172, 39), 'en': (120, 18, 208, 40)}, file={'cn': './assets/cn/handler/IN_STAGE.png', 'en': './assets/en/handler/IN_STAGE.png'})
LOGIN_ANNOUNCE = Button(area={'cn': (1160, 45, 1227, 90), 'en': (1160, 45, 1227, 90)}, color={'cn': (174, 61, 56), 'en': (174, 61, 56)}, button={'cn': (1160, 45, 1227, 90), 'en': (1160, 45, 1227, 90)}, file={'cn': './assets/cn/handler/LOGIN_ANNOUNCE.png', 'en': './assets/en/handler/LOGIN_ANNOUNCE.png'}) LOGIN_ANNOUNCE = Button(area={'cn': (1160, 45, 1227, 90), 'en': (1159, 44, 1228, 91)}, color={'cn': (174, 61, 56), 'en': (193, 79, 73)}, button={'cn': (1160, 45, 1227, 90), 'en': (1159, 44, 1228, 91)}, file={'cn': './assets/cn/handler/LOGIN_ANNOUNCE.png', 'en': './assets/en/handler/LOGIN_ANNOUNCE.png'})
LOGIN_CHECK = Button(area={'cn': (77, 655, 154, 711), 'en': (77, 655, 154, 711)}, color={'cn': (33, 36, 33), 'en': (33, 36, 33)}, button={'cn': (416, 294, 534, 400), 'en': (416, 294, 534, 400)}, file={'cn': './assets/cn/handler/LOGIN_CHECK.png', 'en': './assets/en/handler/LOGIN_CHECK.png'}) LOGIN_CHECK = Button(area={'cn': (77, 655, 154, 711), 'en': (77, 655, 154, 711)}, color={'cn': (33, 36, 33), 'en': (33, 36, 33)}, button={'cn': (416, 294, 534, 400), 'en': (416, 294, 534, 400)}, file={'cn': './assets/cn/handler/LOGIN_CHECK.png', 'en': './assets/en/handler/LOGIN_CHECK.png'})
LOGIN_GAME_UPDATE = Button(area={'cn': (700, 471, 873, 529), 'en': (700, 471, 873, 529)}, color={'cn': (238, 170, 78), 'en': (238, 170, 78)}, button={'cn': (700, 471, 873, 529), 'en': (700, 471, 873, 529)}, file={'cn': './assets/cn/handler/LOGIN_GAME_UPDATE.png', 'en': './assets/en/handler/LOGIN_GAME_UPDATE.png'}) LOGIN_GAME_UPDATE = Button(area={'cn': (700, 471, 873, 529), 'en': (700, 471, 873, 529)}, color={'cn': (238, 170, 78), 'en': (238, 170, 78)}, button={'cn': (700, 471, 873, 529), 'en': (700, 471, 873, 529)}, file={'cn': './assets/cn/handler/LOGIN_GAME_UPDATE.png', 'en': './assets/en/handler/LOGIN_GAME_UPDATE.png'})
LOGIN_RETURN_SIGN = Button(area={'cn': (1, 7, 104, 47), 'en': (1, 7, 104, 47)}, color={'cn': (158, 214, 229), 'en': (158, 214, 229)}, button={'cn': (1, 7, 104, 47), 'en': (1, 7, 104, 47)}, file={'cn': './assets/cn/handler/LOGIN_RETURN_SIGN.png', 'en': './assets/en/handler/LOGIN_RETURN_SIGN.png'}) LOGIN_RETURN_SIGN = Button(area={'cn': (1, 7, 104, 47), 'en': (1195, 524, 1272, 547)}, color={'cn': (158, 214, 229), 'en': (202, 202, 203)}, button={'cn': (1, 7, 104, 47), 'en': (1195, 524, 1272, 547)}, file={'cn': './assets/cn/handler/LOGIN_RETURN_SIGN.png', 'en': './assets/en/handler/LOGIN_RETURN_SIGN.png'})
MAP_AIR_RAID = Button(area={'cn': (350, 447, 1280, 472), 'en': (350, 447, 1280, 472)}, color={'cn': (154, 43, 46), 'en': (154, 43, 46)}, button={'cn': (350, 447, 1280, 472), 'en': (350, 447, 1280, 472)}, file={'cn': './assets/cn/handler/MAP_AIR_RAID.png', 'en': './assets/en/handler/MAP_AIR_RAID.png'}) MAP_AIR_RAID = Button(area={'cn': (350, 447, 1280, 472), 'en': (350, 447, 1280, 472)}, color={'cn': (154, 43, 46), 'en': (154, 43, 46)}, button={'cn': (350, 447, 1280, 472), 'en': (350, 447, 1280, 472)}, file={'cn': './assets/cn/handler/MAP_AIR_RAID.png', 'en': './assets/en/handler/MAP_AIR_RAID.png'})
MAP_AMBUSH = Button(area={'cn': (261, 433, 1280, 449), 'en': (261, 433, 1280, 449)}, color={'cn': (161, 41, 43), 'en': (161, 41, 43)}, button={'cn': (261, 433, 1280, 449), 'en': (261, 433, 1280, 449)}, file={'cn': './assets/cn/handler/MAP_AMBUSH.png', 'en': './assets/en/handler/MAP_AMBUSH.png'}) MAP_AMBUSH = Button(area={'cn': (261, 433, 1280, 449), 'en': (261, 433, 1280, 449)}, color={'cn': (161, 41, 43), 'en': (161, 41, 43)}, button={'cn': (261, 433, 1280, 449), 'en': (261, 433, 1280, 449)}, file={'cn': './assets/cn/handler/MAP_AMBUSH.png', 'en': './assets/en/handler/MAP_AMBUSH.png'})
MAP_AMBUSH_EVADE = Button(area={'cn': (325, 393, 1280, 395), 'en': (325, 393, 1280, 395)}, color={'cn': (255, 255, 255), 'en': (255, 255, 255)}, button={'cn': (979, 444, 1152, 502), 'en': (979, 444, 1152, 502)}, file={'cn': './assets/cn/handler/MAP_AMBUSH_EVADE.png', 'en': './assets/en/handler/MAP_AMBUSH_EVADE.png'}) MAP_AMBUSH_EVADE = Button(area={'cn': (325, 393, 1280, 395), 'en': (325, 393, 1280, 395)}, color={'cn': (255, 255, 255), 'en': (255, 255, 255)}, button={'cn': (979, 444, 1152, 502), 'en': (979, 444, 1152, 502)}, file={'cn': './assets/cn/handler/MAP_AMBUSH_EVADE.png', 'en': './assets/en/handler/MAP_AMBUSH_EVADE.png'})

View File

@ -12,7 +12,7 @@ CAMPAIGN_GOTO_EXERCISE = Button(area={'cn': (1166, 648, 1248, 703), 'en': (1150,
COMMISSION_CHECK = Button(area={'cn': (122, 16, 175, 39), 'en': (120, 14, 301, 41)}, color={'cn': (157, 173, 210), 'en': (98, 112, 150)}, button={'cn': (122, 16, 175, 39), 'en': (120, 14, 301, 41)}, file={'cn': './assets/cn/ui/COMMISSION_CHECK.png', 'en': './assets/en/ui/COMMISSION_CHECK.png'}) COMMISSION_CHECK = Button(area={'cn': (122, 16, 175, 39), 'en': (120, 14, 301, 41)}, color={'cn': (157, 173, 210), 'en': (98, 112, 150)}, button={'cn': (122, 16, 175, 39), 'en': (120, 14, 301, 41)}, file={'cn': './assets/cn/ui/COMMISSION_CHECK.png', 'en': './assets/en/ui/COMMISSION_CHECK.png'})
DAILY_CHECK = Button(area={'cn': (23, 656, 67, 698), 'en': (23, 656, 67, 698)}, color={'cn': (84, 139, 210), 'en': (84, 139, 210)}, button={'cn': (23, 656, 67, 698), 'en': (23, 656, 67, 698)}, file={'cn': './assets/cn/ui/DAILY_CHECK.png', 'en': './assets/en/ui/DAILY_CHECK.png'}) DAILY_CHECK = Button(area={'cn': (23, 656, 67, 698), 'en': (23, 656, 67, 698)}, color={'cn': (84, 139, 210), 'en': (84, 139, 210)}, button={'cn': (23, 656, 67, 698), 'en': (23, 656, 67, 698)}, file={'cn': './assets/cn/ui/DAILY_CHECK.png', 'en': './assets/en/ui/DAILY_CHECK.png'})
EVENT_CHECK = Button(area={'cn': (123, 63, 206, 109), 'en': (123, 63, 206, 109)}, color={'cn': (88, 104, 138), 'en': (88, 104, 138)}, button={'cn': (123, 63, 206, 109), 'en': (123, 63, 206, 109)}, file={'cn': './assets/cn/ui/EVENT_CHECK.png', 'en': './assets/en/ui/EVENT_CHECK.png'}) EVENT_CHECK = Button(area={'cn': (123, 63, 206, 109), 'en': (123, 63, 206, 109)}, color={'cn': (88, 104, 138), 'en': (88, 104, 138)}, button={'cn': (123, 63, 206, 109), 'en': (123, 63, 206, 109)}, file={'cn': './assets/cn/ui/EVENT_CHECK.png', 'en': './assets/en/ui/EVENT_CHECK.png'})
EVENT_LIST_CHECK = Button(area={'cn': (123, 15, 232, 39), 'en': (123, 15, 232, 39)}, color={'cn': (151, 166, 206), 'en': (151, 166, 206)}, button={'cn': (123, 15, 232, 39), 'en': (123, 15, 232, 39)}, file={'cn': './assets/cn/ui/EVENT_LIST_CHECK.png', 'en': './assets/en/ui/EVENT_LIST_CHECK.png'}) EVENT_LIST_CHECK = Button(area={'cn': (123, 15, 232, 39), 'en': (123, 15, 223, 39)}, color={'cn': (151, 166, 206), 'en': (109, 122, 163)}, button={'cn': (123, 15, 232, 39), 'en': (123, 15, 223, 39)}, file={'cn': './assets/cn/ui/EVENT_LIST_CHECK.png', 'en': './assets/en/ui/EVENT_LIST_CHECK.png'})
EXERCISE_CHECK = Button(area={'cn': (1065, 340, 1204, 382), 'en': (1078, 343, 1190, 382)}, color={'cn': (129, 166, 220), 'en': (138, 174, 225)}, button={'cn': (1065, 340, 1204, 382), 'en': (1078, 343, 1190, 382)}, file={'cn': './assets/cn/ui/EXERCISE_CHECK.png', 'en': './assets/en/ui/EXERCISE_CHECK.png'}) EXERCISE_CHECK = Button(area={'cn': (1065, 340, 1204, 382), 'en': (1078, 343, 1190, 382)}, color={'cn': (129, 166, 220), 'en': (138, 174, 225)}, button={'cn': (1065, 340, 1204, 382), 'en': (1078, 343, 1190, 382)}, file={'cn': './assets/cn/ui/EXERCISE_CHECK.png', 'en': './assets/en/ui/EXERCISE_CHECK.png'})
FLEET_CHECK = Button(area={'cn': (1044, 641, 1243, 702), 'en': (1042, 640, 1244, 703)}, color={'cn': (237, 186, 112), 'en': (236, 187, 113)}, button={'cn': (1044, 641, 1243, 702), 'en': (1042, 640, 1244, 703)}, file={'cn': './assets/cn/ui/FLEET_CHECK.png', 'en': './assets/en/ui/FLEET_CHECK.png'}) FLEET_CHECK = Button(area={'cn': (1044, 641, 1243, 702), 'en': (1042, 640, 1244, 703)}, color={'cn': (237, 186, 112), 'en': (236, 187, 113)}, button={'cn': (1044, 641, 1243, 702), 'en': (1042, 640, 1244, 703)}, file={'cn': './assets/cn/ui/FLEET_CHECK.png', 'en': './assets/en/ui/FLEET_CHECK.png'})
GOTO_MAIN = Button(area={'cn': (1230, 17, 1253, 45), 'en': (1230, 17, 1253, 45)}, color={'cn': (112, 132, 159), 'en': (112, 132, 159)}, button={'cn': (1228, 18, 1255, 49), 'en': (1228, 18, 1255, 49)}, file={'cn': './assets/cn/ui/GOTO_MAIN.png', 'en': './assets/en/ui/GOTO_MAIN.png'}) GOTO_MAIN = Button(area={'cn': (1230, 17, 1253, 45), 'en': (1230, 17, 1253, 45)}, color={'cn': (112, 132, 159), 'en': (112, 132, 159)}, button={'cn': (1228, 18, 1255, 49), 'en': (1228, 18, 1255, 49)}, file={'cn': './assets/cn/ui/GOTO_MAIN.png', 'en': './assets/en/ui/GOTO_MAIN.png'})