Refactor: Rest of the farming tasks

- Load server from config
This commit is contained in:
LmeSzinc 2021-09-27 22:39:59 +08:00
parent f10d54296a
commit 2627da413d
12 changed files with 2373 additions and 87 deletions

83
alas.py
View File

@ -6,29 +6,13 @@ from datetime import datetime
import inflection
from cached_property import cached_property
from module.campaign.gems_farming import GemsFarming
from module.campaign.run import CampaignRun
from module.commission.commission import RewardCommission
import module.config.server as server
from module.config.config import AzurLaneConfig, TaskEnd
from module.config.config_updater import ConfigUpdater
from module.daily.daily import Daily
from module.device.device import Device
from module.dorm.dorm import RewardDorm
from module.config.utils import deep_get
from module.exception import *
from module.exercise.exercise import Exercise
from module.guild.guild_reward import RewardGuild
from module.handler.login import LoginHandler
from module.handler.sensitive_info import handle_sensitive_image, handle_sensitive_logs
from module.hard.hard import CampaignHard
from module.logger import logger, log_file
from module.meowfficer.meowfficer import RewardMeowfficer
from module.os_ash.ash import AshBeaconAssist
from module.research.research import RewardResearch
from module.reward.reward import Reward
from module.shop.shop_reward import RewardShop
from module.sos.sos import CampaignSos
from module.tactical.tactical_class import RewardTacticalClass
from module.campaign.os_run import OSCampaignRun
class AzurLaneAutoScript:
def __init__(self, config_name='alas'):
@ -38,10 +22,13 @@ class AzurLaneAutoScript:
@cached_property
def config(self):
config = AzurLaneConfig(config_name=self.config_name)
# Set server before loading any buttons.
server.server = deep_get(config.data, keys='Alas.Emulator.Server', default='cn')
return config
@cached_property
def device(self):
from module.device.device import Device
device = Device(config=self.config)
return device
@ -86,6 +73,7 @@ class AzurLaneAutoScript:
Save last 60 screenshots in ./log/error/<timestamp>
Save logs to ./log/error/<timestamp>/log.txt
"""
from module.handler.sensitive_info import handle_sensitive_image, handle_sensitive_logs
if self.config.Error_SaveError:
folder = f'./log/error/{int(time.time() * 1000)}'
logger.warning(f'Saving error: {folder}')
@ -106,76 +94,115 @@ class AzurLaneAutoScript:
f.writelines(lines)
def restart(self):
from module.handler.login import LoginHandler
LoginHandler(self.config, device=self.device).app_restart()
def research(self):
from module.research.research import RewardResearch
RewardResearch(config=self.config, device=self.device).run()
def commission(self):
from module.commission.commission import RewardCommission
RewardCommission(config=self.config, device=self.device).run()
def tactical(self):
from module.tactical.tactical_class import RewardTacticalClass
RewardTacticalClass(config=self.config, device=self.device).run()
def dorm(self):
from module.dorm.dorm import RewardDorm
RewardDorm(config=self.config, device=self.device).run()
def meowfficer(self):
from module.meowfficer.meowfficer import RewardMeowfficer
RewardMeowfficer(config=self.config, device=self.device).run()
def guild(self):
from module.guild.guild_reward import RewardGuild
RewardGuild(config=self.config, device=self.device).run()
def reward(self):
from module.reward.reward import Reward
Reward(config=self.config, device=self.device).run()
def shop(self):
from module.shop.shop_reward import RewardShop
RewardShop(config=self.config, device=self.device).run()
def daily(self):
from module.daily.daily import Daily
Daily(config=self.config, device=self.device).run()
def hard(self):
from module.hard.hard import CampaignHard
CampaignHard(config=self.config, device=self.device).run()
def exercise(self):
from module.exercise.exercise import Exercise
Exercise(config=self.config, device=self.device).run()
def sos(self):
from module.sos.sos import CampaignSos
CampaignSos(config=self.config, device=self.device).run()
def opsi_ash_assist(self):
from module.os_ash.ash import AshBeaconAssist
AshBeaconAssist(config=self.config, device=self.device).run()
def opsi_explore(self):
from module.campaign.os_run import OSCampaignRun
OSCampaignRun(config=self.config, device=self.device).opsi_explore()
def opsi_daily(self):
from module.campaign.os_run import OSCampaignRun
OSCampaignRun(config=self.config, device=self.device).opsi_daily()
def opsi_obscure(self):
from module.campaign.os_run import OSCampaignRun
OSCampaignRun(config=self.config, device=self.device).opsi_obscure()
def opsi_meowfficer_farming(self):
from module.campaign.os_run import OSCampaignRun
OSCampaignRun(config=self.config, device=self.device).opsi_meowfficer_farming()
def main(self):
from module.campaign.run import CampaignRun
CampaignRun(config=self.config, device=self.device).run(
name=self.config.Campaign_Name,
folder=self.config.Campaign_Event,
mode=self.config.Campaign_Mode)
name=self.config.Campaign_Name, folder=self.config.Campaign_Event, mode=self.config.Campaign_Mode)
def event(self):
from module.campaign.run import CampaignRun
CampaignRun(config=self.config, device=self.device).run(
name=self.config.Campaign_Name, folder=self.config.Campaign_Event, mode=self.config.Campaign_Mode)
def raid(self):
from module.raid.run import RaidRun
RaidRun(config=self.config, device=self.device).run()
def c11_affinity_farming(self):
from module.campaign.run import CampaignRun
CampaignRun(config=self.config, device=self.device).run(
name=self.config.Campaign_Name, folder=self.config.Campaign_Event, mode=self.config.Campaign_Mode)
def c72_mystery_farming(self):
from module.campaign.run import CampaignRun
CampaignRun(config=self.config, device=self.device).run(
name=self.config.Campaign_Name,
folder=self.config.Campaign_Event,
mode=self.config.Campaign_Mode)
name=self.config.Campaign_Name, folder=self.config.Campaign_Event, mode=self.config.Campaign_Mode)
def c122_medium_leveling(self):
from module.campaign.run import CampaignRun
CampaignRun(config=self.config, device=self.device).run(
name=self.config.Campaign_Name, folder=self.config.Campaign_Event, mode=self.config.Campaign_Mode)
def c124_large_leveling(self):
from module.campaign.run import CampaignRun
CampaignRun(config=self.config, device=self.device).run(
name=self.config.Campaign_Name, folder=self.config.Campaign_Event, mode=self.config.Campaign_Mode)
def gems_farming(self):
from module.campaign.gems_farming import GemsFarming
GemsFarming(config=self.config, device=self.device).run(
name=self.config.Campaign_Name,
folder=self.config.Campaign_Event,
mode=self.config.Campaign_Mode)
name=self.config.Campaign_Name, folder=self.config.Campaign_Event, mode=self.config.Campaign_Mode)
def loop(self):
is_first = True

View File

@ -3,6 +3,7 @@
"Emulator": {
"Serial": "127.0.0.1:5555",
"PackageName": "com.bilibili.azurlane",
"Server": "cn",
"ScreenshotMethod": "ADB",
"ControlMethod": "minitouch"
},
@ -115,6 +116,179 @@
"LowHpRetreatThreshold": 0.3
}
},
"Event": {
"Scheduler": {
"Enable": false,
"NextRun": "2020-01-01 00:00:00",
"Command": "Event",
"SuccessInterval": 0,
"FailureInterval": 120,
"ServerUpdate": "00:00"
},
"Campaign": {
"Name": "7-2",
"Event": "campaign_main",
"Mode": "normal",
"UseClearMode": true,
"UseFleetLock": true,
"UseAutoSearch": false,
"Use2xBook": false,
"AmbushEvade": true
},
"StopCondition": {
"RunCount": 0,
"OilLimit": 1000,
"MapAchievement": "non_stop",
"GetNewShip": false,
"ReachLevel120": false
},
"Fleet": {
"Fleet1": 1,
"Fleet1Formation": "double_line",
"Fleet1Mode": "combat_auto",
"Fleet1Step": 3,
"Fleet2": 2,
"Fleet2Formation": "double_line",
"Fleet2Mode": "combat_auto",
"Fleet2Step": 2,
"FleetOrder": "fleet1_mob_fleet2_boss",
"AutoSearchFleetOrder": "fleet1_mob_fleet2_boss"
},
"Submarine": {
"Fleet": 0,
"Mode": "do_not_use"
},
"Emotion": {
"CalculateEmotion": true,
"IgnoreLowEmotionWarn": false,
"Fleet1Value": 119,
"Fleet1Record": "2020-01-01 00:00:00",
"Fleet1Control": "prevent_yellow_face",
"Fleet1Recover": "not_in_dormitory",
"Fleet1Oath": false,
"Fleet2Value": 119,
"Fleet2Record": "2020-01-01 00:00:00",
"Fleet2Control": "prevent_yellow_face",
"Fleet2Recover": "not_in_dormitory",
"Fleet2Oath": false
},
"HpControl": {
"UseHpBalance": false,
"UseEmergencyRepair": false,
"UseLowHpRetreat": false,
"HpBalanceThreshold": 0.2,
"HpBalanceWeight": "1000, 1000, 1000",
"RepairUseSingleThreshold": 0.3,
"RepairUseMultiThreshold": 0.6,
"LowHpRetreatThreshold": 0.3
}
},
"Raid": {
"Scheduler": {
"Enable": false,
"NextRun": "2020-01-01 00:00:00",
"Command": "Raid",
"SuccessInterval": 0,
"FailureInterval": 120,
"ServerUpdate": "00:00"
},
"Raid": {
"Event": "raid_20200624",
"Mode": "hard",
"UseTicket": false
},
"StopCondition": {
"RunCount": 0,
"OilLimit": 1000,
"MapAchievement": "non_stop",
"GetNewShip": false,
"ReachLevel120": false
},
"Emotion": {
"CalculateEmotion": true,
"IgnoreLowEmotionWarn": false,
"Fleet1Value": 119,
"Fleet1Record": "2020-01-01 00:00:00",
"Fleet1Control": "prevent_yellow_face",
"Fleet1Recover": "not_in_dormitory",
"Fleet1Oath": false,
"Fleet2Value": 119,
"Fleet2Record": "2020-01-01 00:00:00",
"Fleet2Control": "prevent_yellow_face",
"Fleet2Recover": "not_in_dormitory",
"Fleet2Oath": false
}
},
"C11AffinityFarming": {
"Scheduler": {
"Enable": false,
"NextRun": "2020-01-01 00:00:00",
"Command": "C11AffinityFarming",
"SuccessInterval": 0,
"FailureInterval": 120,
"ServerUpdate": "00:00"
},
"C11AffinityFarming": {
"RunCount": 32
},
"Campaign": {
"Name": "campaign_1_1_affinity_farming",
"Event": "campaign_main",
"Mode": "normal",
"UseClearMode": false,
"UseFleetLock": true,
"UseAutoSearch": false,
"Use2xBook": false,
"AmbushEvade": false
},
"StopCondition": {
"RunCount": 0,
"OilLimit": 1000,
"MapAchievement": "non_stop",
"GetNewShip": false,
"ReachLevel120": false
},
"Fleet": {
"Fleet1": 1,
"Fleet1Formation": "double_line",
"Fleet1Mode": "combat_auto",
"Fleet1Step": 3,
"Fleet2": 2,
"Fleet2Formation": "double_line",
"Fleet2Mode": "combat_auto",
"Fleet2Step": 2,
"FleetOrder": "fleet1_all_fleet2_standby",
"AutoSearchFleetOrder": "fleet1_all_fleet2_standby"
},
"Submarine": {
"Fleet": 0,
"Mode": "do_not_use"
},
"Emotion": {
"CalculateEmotion": true,
"IgnoreLowEmotionWarn": false,
"Fleet1Value": 119,
"Fleet1Record": "2020-01-01 00:00:00",
"Fleet1Control": "prevent_yellow_face",
"Fleet1Recover": "not_in_dormitory",
"Fleet1Oath": false,
"Fleet2Value": 119,
"Fleet2Record": "2020-01-01 00:00:00",
"Fleet2Control": "prevent_yellow_face",
"Fleet2Recover": "not_in_dormitory",
"Fleet2Oath": false
},
"HpControl": {
"UseHpBalance": false,
"UseEmergencyRepair": false,
"UseLowHpRetreat": false,
"HpBalanceThreshold": 0.2,
"HpBalanceWeight": "1000, 1000, 1000",
"RepairUseSingleThreshold": 0.3,
"RepairUseMultiThreshold": 0.6,
"LowHpRetreatThreshold": 0.3
}
},
"C72MysteryFarming": {
"Scheduler": {
"Enable": false,
@ -185,6 +359,148 @@
"LowHpRetreatThreshold": 0.3
}
},
"C122MediumLeveling": {
"Scheduler": {
"Enable": false,
"NextRun": "2020-01-01 00:00:00",
"Command": "C122MediumLeveling",
"SuccessInterval": 0,
"FailureInterval": 120,
"ServerUpdate": "00:00"
},
"C122MediumLeveling": {
"LargeEnemyTolerance": 1
},
"Campaign": {
"Name": "campaign_12_2_leveling",
"Event": "campaign_main",
"Mode": "normal",
"UseClearMode": true,
"UseFleetLock": true,
"UseAutoSearch": false,
"Use2xBook": false,
"AmbushEvade": true
},
"StopCondition": {
"RunCount": 0,
"OilLimit": 1000,
"MapAchievement": "non_stop",
"GetNewShip": false,
"ReachLevel120": false
},
"Fleet": {
"Fleet1": 1,
"Fleet1Formation": "double_line",
"Fleet1Mode": "combat_auto",
"Fleet1Step": 3,
"Fleet2": 2,
"Fleet2Formation": "double_line",
"Fleet2Mode": "combat_auto",
"Fleet2Step": 2,
"FleetOrder": "fleet1_all_fleet2_standby",
"AutoSearchFleetOrder": "fleet1_all_fleet2_standby"
},
"Submarine": {
"Fleet": 0,
"Mode": "do_not_use"
},
"Emotion": {
"CalculateEmotion": true,
"IgnoreLowEmotionWarn": false,
"Fleet1Value": 119,
"Fleet1Record": "2020-01-01 00:00:00",
"Fleet1Control": "prevent_yellow_face",
"Fleet1Recover": "not_in_dormitory",
"Fleet1Oath": false,
"Fleet2Value": 119,
"Fleet2Record": "2020-01-01 00:00:00",
"Fleet2Control": "prevent_yellow_face",
"Fleet2Recover": "not_in_dormitory",
"Fleet2Oath": false
},
"HpControl": {
"UseHpBalance": false,
"UseEmergencyRepair": false,
"UseLowHpRetreat": false,
"HpBalanceThreshold": 0.2,
"HpBalanceWeight": "1000, 1000, 1000",
"RepairUseSingleThreshold": 0.3,
"RepairUseMultiThreshold": 0.6,
"LowHpRetreatThreshold": 0.3
}
},
"C124LargeLeveling": {
"Scheduler": {
"Enable": false,
"NextRun": "2020-01-01 00:00:00",
"Command": "C124LargeLeveling",
"SuccessInterval": 0,
"FailureInterval": 120,
"ServerUpdate": "00:00"
},
"C124LargeLeveling": {
"NonLargeEnterTolerance": 1,
"NonLargeRetreatTolerance": 1,
"PickupAmmo": 3
},
"Campaign": {
"Name": "campaign_12_4_leveling",
"Event": "campaign_main",
"Mode": "normal",
"UseClearMode": true,
"UseFleetLock": true,
"UseAutoSearch": false,
"Use2xBook": false,
"AmbushEvade": true
},
"StopCondition": {
"RunCount": 0,
"OilLimit": 1000,
"MapAchievement": "non_stop",
"GetNewShip": false,
"ReachLevel120": false
},
"Fleet": {
"Fleet1": 1,
"Fleet1Formation": "double_line",
"Fleet1Mode": "combat_auto",
"Fleet1Step": 3,
"Fleet2": 2,
"Fleet2Formation": "double_line",
"Fleet2Mode": "combat_auto",
"Fleet2Step": 2,
"FleetOrder": "fleet1_all_fleet2_standby",
"AutoSearchFleetOrder": "fleet1_all_fleet2_standby"
},
"Submarine": {
"Fleet": 0,
"Mode": "do_not_use"
},
"Emotion": {
"CalculateEmotion": true,
"IgnoreLowEmotionWarn": false,
"Fleet1Value": 119,
"Fleet1Record": "2020-01-01 00:00:00",
"Fleet1Control": "prevent_yellow_face",
"Fleet1Recover": "not_in_dormitory",
"Fleet1Oath": false,
"Fleet2Value": 119,
"Fleet2Record": "2020-01-01 00:00:00",
"Fleet2Control": "prevent_yellow_face",
"Fleet2Recover": "not_in_dormitory",
"Fleet2Oath": false
},
"HpControl": {
"UseHpBalance": false,
"UseEmergencyRepair": false,
"UseLowHpRetreat": false,
"HpBalanceThreshold": 0.2,
"HpBalanceWeight": "1000, 1000, 1000",
"RepairUseSingleThreshold": 0.3,
"RepairUseMultiThreshold": 0.6,
"LowHpRetreatThreshold": 0.3
}
},
"GemsFarming": {
"Scheduler": {
"Enable": false,

File diff suppressed because it is too large Load Diff

View File

@ -14,12 +14,15 @@ Scheduler:
Emulator:
Serial: 127.0.0.1:5555
PackageName: com.bilibili.azurlane
Server:
value: cn
option: [cn, en, jp, tw]
ScreenshotMethod:
value: ADB
option: ['ADB', 'uiautomator2', 'aScreenCap']
option: [ADB, uiautomator2, aScreenCap]
ControlMethod:
value: minitouch
option: ['ADB', 'uiautomator2', 'minitouch']
option: [ADB, uiautomator2, minitouch]
Error:
HandleError: true
SaveError: true
@ -38,12 +41,12 @@ Retirement:
Enable: true
RetireMode:
value: one_click_retire
option: ['one_click_retire', 'enhance', 'old_retire']
option: [one_click_retire, enhance, old_retire]
RetireAmount:
value: retire_all
option: ['retire_all', 'retire_10']
option: [retire_all, retire_10]
EnhanceFavourite: false
EnhanceFilter: ''
EnhanceFilter:
EnhanceCheckPerCategory: 2
OldRetireN: true
OldRetireR: true
@ -57,7 +60,7 @@ Campaign:
Event: campaign_main
Mode:
value: normal
option: ['normal', 'hard']
option: [normal, hard]
UseClearMode: true
UseFleetLock: true
UseAutoSearch: false
@ -68,7 +71,7 @@ StopCondition:
OilLimit: 1000
MapAchievement:
value: non_stop
option: ['non_stop', '100_percent_clear', 'map_3_stars', 'threat_safe', 'threat_safe_without_3_stars']
option: [non_stop, 100_percent_clear, map_3_stars, threat_safe, threat_safe_without_3_stars]
GetNewShip: false
ReachLevel120: false
Fleet:
@ -77,10 +80,10 @@ Fleet:
option: [1, 2, 3, 4, 5, 6]
Fleet1Formation:
value: double_line
option: ['line_ahead', 'double_line', 'diamond']
option: [line_ahead, double_line, diamond]
Fleet1Mode:
value: combat_auto
option: ['combat_auto', 'combat_manual', 'stand_still_in_the_middle', 'hide_in_bottom_left']
option: [combat_auto, combat_manual, stand_still_in_the_middle, hide_in_bottom_left]
Fleet1Step:
value: 3
option: [2, 3, 4, 5]
@ -89,26 +92,26 @@ Fleet:
option: [0, 1, 2, 3, 4, 5, 6]
Fleet2Formation:
value: double_line
option: ['line_ahead', 'double_line', 'diamond']
option: [line_ahead, double_line, diamond]
Fleet2Mode:
value: combat_auto
option: ['combat_auto', 'combat_manual', 'stand_still_in_the_middle', 'hide_in_bottom_left']
option: [combat_auto, combat_manual, stand_still_in_the_middle, hide_in_bottom_left]
Fleet2Step:
value: 2
option: [2, 3, 4, 5]
FleetOrder:
value: fleet1_mob_fleet2_boss
option: ['fleet1_mob_fleet2_boss', 'fleet1_all_fleet2_standby']
option: [fleet1_mob_fleet2_boss, fleet1_all_fleet2_standby]
AutoSearchFleetOrder:
value: fleet1_mob_fleet2_boss
option: ['fleet1_mob_fleet2_boss', 'fleet1_boss_fleet2_mob', 'fleet1_all_fleet2_standby', 'fleet1_standby_fleet2_all']
option: [fleet1_mob_fleet2_boss, fleet1_boss_fleet2_mob, fleet1_all_fleet2_standby, fleet1_standby_fleet2_all]
Submarine:
Fleet:
value: 0
option: [0, 1, 2]
Mode:
value: do_not_use
option: ['do_not_use','hunt_only', 'every_combat']
option: [do_not_use,hunt_only, every_combat]
Emotion:
CalculateEmotion: true
IgnoreLowEmotionWarn: false
@ -116,19 +119,19 @@ Emotion:
Fleet1Record: 2020-01-01 00:00:00
Fleet1Control:
value: prevent_yellow_face
option: ['keep_exp_bonus', 'prevent_green_face', 'prevent_yellow_face', 'prevent_red_face']
option: [keep_exp_bonus, prevent_green_face, prevent_yellow_face, prevent_red_face]
Fleet1Recover:
value: not_in_dormitory
option: ['not_in_dormitory', 'dormitory_floor_1', 'dormitory_floor_2']
option: [not_in_dormitory, dormitory_floor_1, dormitory_floor_2]
Fleet1Oath: false
Fleet2Value: 119
Fleet2Record: 2020-01-01 00:00:00
Fleet2Control:
value: prevent_yellow_face
option: ['keep_exp_bonus', 'prevent_green_face', 'prevent_yellow_face', 'prevent_red_face']
option: [keep_exp_bonus, prevent_green_face, prevent_yellow_face, prevent_red_face]
Fleet2Recover:
value: not_in_dormitory
option: ['not_in_dormitory', 'dormitory_floor_1', 'dormitory_floor_2']
option: [not_in_dormitory, dormitory_floor_1, dormitory_floor_2]
Fleet2Oath: false
HpControl:
UseHpBalance: false
@ -139,8 +142,30 @@ HpControl:
RepairUseSingleThreshold: 0.3
RepairUseMultiThreshold: 0.6
LowHpRetreatThreshold: 0.3
Raid:
Event: raid_20200624
Mode:
value: hard
option: [easy, normal, hard]
UseTicket: false
C11AffinityFarming:
RunCount: 32
C72MysteryFarming:
StepOnA3: true
C122MediumLeveling:
LargeEnemyTolerance:
value: 1
option: [0, 1, 2, 10]
C124LargeLeveling:
NonLargeEnterTolerance:
value: 1
option: [0, 1, 2]
NonLargeRetreatTolerance:
value: 1
option: [0, 1, 2, 10]
PickupAmmo:
value: 3
option: [3, 4, 5]
GemsFarming:
FlagshipChange: true
FlagshipEquipChange: false
@ -149,7 +174,7 @@ GemsFarming:
LowEmotionRetreat: true
CommonCV:
value: any
option: ['any', 'langley', 'bogue', 'ranger', 'hermes']
option: [any, langley, bogue, ranger, hermes]
# ==================== Reward ====================
@ -277,32 +302,32 @@ Shipyard:
Daily:
UseDailySkip: true
EscortMission:
value: 'first'
option: ['no', 'first', 'second', 'third']
value: first
option: [skip, first, second, third]
EscortMissionFleet:
value: 5
option: [1, 2, 3, 4, 5, 6]
AdvanceMission:
value: 'first'
option: ['no', 'first', 'second', 'third']
value: first
option: [skip, first, second, third]
AdvanceMissionFleet:
value: 5
option: [1, 2, 3, 4, 5, 6]
FierceAssault:
value: 'first'
option: ['no', 'first', 'second', 'third']
value: first
option: [skip, first, second, third]
FierceAssaultFleet:
value: 5
option: [1, 2, 3, 4, 5, 6]
TacticalTraining:
value: 'second'
option: ['no', 'first', 'second', 'third']
value: second
option: [skip, first, second, third]
TacticalTrainingFleet:
value: 5
option: [1, 2, 3, 4, 5, 6]
SupplyLineDisruption:
value: 'second'
option: ['no', 'first', 'second', 'third']
value: second
option: [skip, first, second, third]
Hard:
HardStage: 11-4
HardFleet:
@ -311,7 +336,7 @@ Hard:
Exercise:
OpponentChooseMode:
value: max_exp
option: ['max_exp', 'easiest', 'leftmost', 'easiest_else_exp']
option: [max_exp, easiest, leftmost, easiest_else_exp]
OpponentTrial: 1
ExercisePreserve: 0
LowHpThreshold: 0.4

View File

@ -7,7 +7,12 @@
],
"Reward": [
"Main",
"Event",
"Raid",
"C11AffinityFarming",
"C72MysteryFarming",
"C122MediumLeveling",
"C124LargeLeveling",
"GemsFarming"
],
"Daily": [

View File

@ -15,6 +15,31 @@ Restart:
Main:
Campaign:
Event: campaign_main
Event:
Campaign:
Mode: normal
AmbushEvade: true
C11AffinityFarming:
Campaign:
Name: campaign_1_1_affinity_farming
Event: campaign_main
Mode: normal
UseClearMode: false
UseFleetLock: true
UseAutoSearch: false
Use2xBook: false
AmbushEvade: false
StopCondition:
RunCount: 0
MapAchievement: non_stop
GetNewShip: false
ReachLevel120: false
Fleet:
FleetOrder: fleet1_all_fleet2_standby
AutoSearchFleetOrder: fleet1_all_fleet2_standby
Submarine:
Fleet: 0
Mode: do_not_use
C72MysteryFarming:
Campaign:
Name: campaign_7_2_mystery_farming
@ -34,6 +59,34 @@ C72MysteryFarming:
Submarine:
Fleet: 0
Mode: do_not_use
C122MediumLeveling:
Campaign:
Name: campaign_12_2_leveling
Event: campaign_main
Mode: normal
UseClearMode: true
UseFleetLock: true
UseAutoSearch: false
AmbushEvade: true
StopCondition:
MapAchievement: non_stop
Fleet:
FleetOrder: fleet1_all_fleet2_standby
AutoSearchFleetOrder: fleet1_all_fleet2_standby
C124LargeLeveling:
Campaign:
Name: campaign_12_4_leveling
Event: campaign_main
Mode: normal
UseClearMode: true
UseFleetLock: true
UseAutoSearch: false
AmbushEvade: true
StopCondition:
MapAchievement: non_stop
Fleet:
FleetOrder: fleet1_all_fleet2_standby
AutoSearchFleetOrder: fleet1_all_fleet2_standby
GemsFarming:
Campaign:
Mode: normal

View File

@ -24,6 +24,28 @@ Main:
- Submarine
- Emotion
- HpControl
Event:
- Scheduler
- Campaign
- StopCondition
- Fleet
- Submarine
- Emotion
- HpControl
Raid:
- Scheduler
- Raid
- StopCondition
- Emotion
C11AffinityFarming:
- Scheduler
- C11AffinityFarming
- Campaign
- StopCondition
- Fleet
- Submarine
- Emotion
- HpControl
C72MysteryFarming:
- Scheduler
- C72MysteryFarming
@ -33,6 +55,24 @@ C72MysteryFarming:
- Submarine
- Emotion
- HpControl
C122MediumLeveling:
- Scheduler
- C122MediumLeveling
- Campaign
- StopCondition
- Fleet
- Submarine
- Emotion
- HpControl
C124LargeLeveling:
- Scheduler
- C124LargeLeveling
- Campaign
- StopCondition
- Fleet
- Submarine
- Emotion
- HpControl
GemsFarming:
- Scheduler
- GemsFarming

View File

@ -20,6 +20,7 @@ class GeneratedConfig:
# Group `Emulator`
Emulator_Serial = '127.0.0.1:5555'
Emulator_PackageName = 'com.bilibili.azurlane'
Emulator_Server = 'cn' # cn, en, jp, tw
Emulator_ScreenshotMethod = 'ADB' # ADB, uiautomator2, aScreenCap
Emulator_ControlMethod = 'minitouch' # ADB, uiautomator2, minitouch
@ -109,9 +110,25 @@ class GeneratedConfig:
HpControl_RepairUseMultiThreshold = 0.6
HpControl_LowHpRetreatThreshold = 0.3
# Group `Raid`
Raid_Event = 'raid_20200624'
Raid_Mode = 'hard' # easy, normal, hard
Raid_UseTicket = False
# Group `C11AffinityFarming`
C11AffinityFarming_RunCount = 32
# Group `C72MysteryFarming`
C72MysteryFarming_StepOnA3 = True
# Group `C122MediumLeveling`
C122MediumLeveling_LargeEnemyTolerance = 1 # 0, 1, 2, 10
# Group `C124LargeLeveling`
C124LargeLeveling_NonLargeEnterTolerance = 1 # 0, 1, 2
C124LargeLeveling_NonLargeRetreatTolerance = 1 # 0, 1, 2, 10
C124LargeLeveling_PickupAmmo = 3 # 3, 4, 5
# Group `GemsFarming`
GemsFarming_FlagshipChange = True
GemsFarming_FlagshipEquipChange = False
@ -194,15 +211,15 @@ class GeneratedConfig:
# Group `Daily`
Daily_UseDailySkip = True
Daily_EscortMission = 'first' # no, first, second, third
Daily_EscortMission = 'first' # skip, first, second, third
Daily_EscortMissionFleet = 5 # 1, 2, 3, 4, 5, 6
Daily_AdvanceMission = 'first' # no, first, second, third
Daily_AdvanceMission = 'first' # skip, first, second, third
Daily_AdvanceMissionFleet = 5 # 1, 2, 3, 4, 5, 6
Daily_FierceAssault = 'first' # no, first, second, third
Daily_FierceAssault = 'first' # skip, first, second, third
Daily_FierceAssaultFleet = 5 # 1, 2, 3, 4, 5, 6
Daily_TacticalTraining = 'second' # no, first, second, third
Daily_TacticalTraining = 'second' # skip, first, second, third
Daily_TacticalTrainingFleet = 5 # 1, 2, 3, 4, 5, 6
Daily_SupplyLineDisruption = 'second' # no, first, second, third
Daily_SupplyLineDisruption = 'second' # skip, first, second, third
# Group `Hard`
Hard_HardStage = '11-4'

View File

@ -38,10 +38,30 @@
"name": "Task.Main.name",
"help": "Task.Main.help"
},
"Event": {
"name": "Task.Event.name",
"help": "Task.Event.help"
},
"Raid": {
"name": "Task.Raid.name",
"help": "Task.Raid.help"
},
"C11AffinityFarming": {
"name": "Task.C11AffinityFarming.name",
"help": "Task.C11AffinityFarming.help"
},
"C72MysteryFarming": {
"name": "Task.C72MysteryFarming.name",
"help": "Task.C72MysteryFarming.help"
},
"C122MediumLeveling": {
"name": "Task.C122MediumLeveling.name",
"help": "Task.C122MediumLeveling.help"
},
"C124LargeLeveling": {
"name": "Task.C124LargeLeveling.name",
"help": "Task.C124LargeLeveling.help"
},
"GemsFarming": {
"name": "Task.GemsFarming.name",
"help": "Task.GemsFarming.help"
@ -150,6 +170,14 @@
"name": "Emulator.PackageName.name",
"help": "Emulator.PackageName.help"
},
"Server": {
"name": "Emulator.Server.name",
"help": "Emulator.Server.help",
"cn": "cn",
"en": "en",
"jp": "jp",
"tw": "tw"
},
"ScreenshotMethod": {
"name": "Emulator.ScreenshotMethod.name",
"help": "Emulator.ScreenshotMethod.help",
@ -562,6 +590,37 @@
"help": "HpControl.LowHpRetreatThreshold.help"
}
},
"Raid": {
"_info": {
"name": "Raid._info.name",
"help": "Raid._info.help"
},
"Event": {
"name": "Raid.Event.name",
"help": "Raid.Event.help"
},
"Mode": {
"name": "Raid.Mode.name",
"help": "Raid.Mode.help",
"easy": "easy",
"normal": "normal",
"hard": "hard"
},
"UseTicket": {
"name": "Raid.UseTicket.name",
"help": "Raid.UseTicket.help"
}
},
"C11AffinityFarming": {
"_info": {
"name": "C11AffinityFarming._info.name",
"help": "C11AffinityFarming._info.help"
},
"RunCount": {
"name": "C11AffinityFarming.RunCount.name",
"help": "C11AffinityFarming.RunCount.help"
}
},
"C72MysteryFarming": {
"_info": {
"name": "C72MysteryFarming._info.name",
@ -572,6 +631,48 @@
"help": "C72MysteryFarming.StepOnA3.help"
}
},
"C122MediumLeveling": {
"_info": {
"name": "C122MediumLeveling._info.name",
"help": "C122MediumLeveling._info.help"
},
"LargeEnemyTolerance": {
"name": "C122MediumLeveling.LargeEnemyTolerance.name",
"help": "C122MediumLeveling.LargeEnemyTolerance.help",
"0": "0",
"1": "1",
"2": "2",
"10": "10"
}
},
"C124LargeLeveling": {
"_info": {
"name": "C124LargeLeveling._info.name",
"help": "C124LargeLeveling._info.help"
},
"NonLargeEnterTolerance": {
"name": "C124LargeLeveling.NonLargeEnterTolerance.name",
"help": "C124LargeLeveling.NonLargeEnterTolerance.help",
"0": "0",
"1": "1",
"2": "2"
},
"NonLargeRetreatTolerance": {
"name": "C124LargeLeveling.NonLargeRetreatTolerance.name",
"help": "C124LargeLeveling.NonLargeRetreatTolerance.help",
"0": "0",
"1": "1",
"2": "2",
"10": "10"
},
"PickupAmmo": {
"name": "C124LargeLeveling.PickupAmmo.name",
"help": "C124LargeLeveling.PickupAmmo.help",
"3": "3",
"4": "4",
"5": "5"
}
},
"GemsFarming": {
"_info": {
"name": "GemsFarming._info.name",
@ -936,7 +1037,7 @@
"EscortMission": {
"name": "Daily.EscortMission.name",
"help": "Daily.EscortMission.help",
"no": "no",
"skip": "skip",
"first": "first",
"second": "second",
"third": "third"
@ -954,7 +1055,7 @@
"AdvanceMission": {
"name": "Daily.AdvanceMission.name",
"help": "Daily.AdvanceMission.help",
"no": "no",
"skip": "skip",
"first": "first",
"second": "second",
"third": "third"
@ -972,7 +1073,7 @@
"FierceAssault": {
"name": "Daily.FierceAssault.name",
"help": "Daily.FierceAssault.help",
"no": "no",
"skip": "skip",
"first": "first",
"second": "second",
"third": "third"
@ -990,7 +1091,7 @@
"TacticalTraining": {
"name": "Daily.TacticalTraining.name",
"help": "Daily.TacticalTraining.help",
"no": "no",
"skip": "skip",
"first": "first",
"second": "second",
"third": "third"
@ -1008,7 +1109,7 @@
"SupplyLineDisruption": {
"name": "Daily.SupplyLineDisruption.name",
"help": "Daily.SupplyLineDisruption.help",
"no": "no",
"skip": "skip",
"first": "first",
"second": "second",
"third": "third"

View File

@ -38,10 +38,30 @@
"name": "Task.Main.name",
"help": "Task.Main.help"
},
"Event": {
"name": "Task.Event.name",
"help": "Task.Event.help"
},
"Raid": {
"name": "Task.Raid.name",
"help": "Task.Raid.help"
},
"C11AffinityFarming": {
"name": "Task.C11AffinityFarming.name",
"help": "Task.C11AffinityFarming.help"
},
"C72MysteryFarming": {
"name": "Task.C72MysteryFarming.name",
"help": "Task.C72MysteryFarming.help"
},
"C122MediumLeveling": {
"name": "Task.C122MediumLeveling.name",
"help": "Task.C122MediumLeveling.help"
},
"C124LargeLeveling": {
"name": "Task.C124LargeLeveling.name",
"help": "Task.C124LargeLeveling.help"
},
"GemsFarming": {
"name": "Task.GemsFarming.name",
"help": "Task.GemsFarming.help"
@ -150,6 +170,14 @@
"name": "Emulator.PackageName.name",
"help": "Emulator.PackageName.help"
},
"Server": {
"name": "Emulator.Server.name",
"help": "Emulator.Server.help",
"cn": "cn",
"en": "en",
"jp": "jp",
"tw": "tw"
},
"ScreenshotMethod": {
"name": "Emulator.ScreenshotMethod.name",
"help": "Emulator.ScreenshotMethod.help",
@ -562,6 +590,37 @@
"help": "HpControl.LowHpRetreatThreshold.help"
}
},
"Raid": {
"_info": {
"name": "Raid._info.name",
"help": "Raid._info.help"
},
"Event": {
"name": "Raid.Event.name",
"help": "Raid.Event.help"
},
"Mode": {
"name": "Raid.Mode.name",
"help": "Raid.Mode.help",
"easy": "easy",
"normal": "normal",
"hard": "hard"
},
"UseTicket": {
"name": "Raid.UseTicket.name",
"help": "Raid.UseTicket.help"
}
},
"C11AffinityFarming": {
"_info": {
"name": "C11AffinityFarming._info.name",
"help": "C11AffinityFarming._info.help"
},
"RunCount": {
"name": "C11AffinityFarming.RunCount.name",
"help": "C11AffinityFarming.RunCount.help"
}
},
"C72MysteryFarming": {
"_info": {
"name": "C72MysteryFarming._info.name",
@ -572,6 +631,48 @@
"help": "C72MysteryFarming.StepOnA3.help"
}
},
"C122MediumLeveling": {
"_info": {
"name": "C122MediumLeveling._info.name",
"help": "C122MediumLeveling._info.help"
},
"LargeEnemyTolerance": {
"name": "C122MediumLeveling.LargeEnemyTolerance.name",
"help": "C122MediumLeveling.LargeEnemyTolerance.help",
"0": "0",
"1": "1",
"2": "2",
"10": "10"
}
},
"C124LargeLeveling": {
"_info": {
"name": "C124LargeLeveling._info.name",
"help": "C124LargeLeveling._info.help"
},
"NonLargeEnterTolerance": {
"name": "C124LargeLeveling.NonLargeEnterTolerance.name",
"help": "C124LargeLeveling.NonLargeEnterTolerance.help",
"0": "0",
"1": "1",
"2": "2"
},
"NonLargeRetreatTolerance": {
"name": "C124LargeLeveling.NonLargeRetreatTolerance.name",
"help": "C124LargeLeveling.NonLargeRetreatTolerance.help",
"0": "0",
"1": "1",
"2": "2",
"10": "10"
},
"PickupAmmo": {
"name": "C124LargeLeveling.PickupAmmo.name",
"help": "C124LargeLeveling.PickupAmmo.help",
"3": "3",
"4": "4",
"5": "5"
}
},
"GemsFarming": {
"_info": {
"name": "GemsFarming._info.name",
@ -936,7 +1037,7 @@
"EscortMission": {
"name": "Daily.EscortMission.name",
"help": "Daily.EscortMission.help",
"no": "no",
"skip": "skip",
"first": "first",
"second": "second",
"third": "third"
@ -954,7 +1055,7 @@
"AdvanceMission": {
"name": "Daily.AdvanceMission.name",
"help": "Daily.AdvanceMission.help",
"no": "no",
"skip": "skip",
"first": "first",
"second": "second",
"third": "third"
@ -972,7 +1073,7 @@
"FierceAssault": {
"name": "Daily.FierceAssault.name",
"help": "Daily.FierceAssault.help",
"no": "no",
"skip": "skip",
"first": "first",
"second": "second",
"third": "third"
@ -990,7 +1091,7 @@
"TacticalTraining": {
"name": "Daily.TacticalTraining.name",
"help": "Daily.TacticalTraining.help",
"no": "no",
"skip": "skip",
"first": "first",
"second": "second",
"third": "third"
@ -1008,7 +1109,7 @@
"SupplyLineDisruption": {
"name": "Daily.SupplyLineDisruption.name",
"help": "Daily.SupplyLineDisruption.help",
"no": "no",
"skip": "skip",
"first": "first",
"second": "second",
"third": "third"

View File

@ -38,10 +38,30 @@
"name": "Task.Main.name",
"help": "Task.Main.help"
},
"Event": {
"name": "Task.Event.name",
"help": "Task.Event.help"
},
"Raid": {
"name": "Task.Raid.name",
"help": "Task.Raid.help"
},
"C11AffinityFarming": {
"name": "Task.C11AffinityFarming.name",
"help": "Task.C11AffinityFarming.help"
},
"C72MysteryFarming": {
"name": "Task.C72MysteryFarming.name",
"help": "Task.C72MysteryFarming.help"
},
"C122MediumLeveling": {
"name": "Task.C122MediumLeveling.name",
"help": "Task.C122MediumLeveling.help"
},
"C124LargeLeveling": {
"name": "Task.C124LargeLeveling.name",
"help": "Task.C124LargeLeveling.help"
},
"GemsFarming": {
"name": "Task.GemsFarming.name",
"help": "Task.GemsFarming.help"
@ -150,6 +170,14 @@
"name": "Emulator.PackageName.name",
"help": "Emulator.PackageName.help"
},
"Server": {
"name": "Emulator.Server.name",
"help": "Emulator.Server.help",
"cn": "cn",
"en": "en",
"jp": "jp",
"tw": "tw"
},
"ScreenshotMethod": {
"name": "Emulator.ScreenshotMethod.name",
"help": "Emulator.ScreenshotMethod.help",
@ -562,6 +590,37 @@
"help": "HpControl.LowHpRetreatThreshold.help"
}
},
"Raid": {
"_info": {
"name": "Raid._info.name",
"help": "Raid._info.help"
},
"Event": {
"name": "Raid.Event.name",
"help": "Raid.Event.help"
},
"Mode": {
"name": "Raid.Mode.name",
"help": "Raid.Mode.help",
"easy": "easy",
"normal": "normal",
"hard": "hard"
},
"UseTicket": {
"name": "Raid.UseTicket.name",
"help": "Raid.UseTicket.help"
}
},
"C11AffinityFarming": {
"_info": {
"name": "C11AffinityFarming._info.name",
"help": "C11AffinityFarming._info.help"
},
"RunCount": {
"name": "C11AffinityFarming.RunCount.name",
"help": "C11AffinityFarming.RunCount.help"
}
},
"C72MysteryFarming": {
"_info": {
"name": "C72MysteryFarming._info.name",
@ -572,6 +631,48 @@
"help": "C72MysteryFarming.StepOnA3.help"
}
},
"C122MediumLeveling": {
"_info": {
"name": "C122MediumLeveling._info.name",
"help": "C122MediumLeveling._info.help"
},
"LargeEnemyTolerance": {
"name": "C122MediumLeveling.LargeEnemyTolerance.name",
"help": "C122MediumLeveling.LargeEnemyTolerance.help",
"0": "0",
"1": "1",
"2": "2",
"10": "10"
}
},
"C124LargeLeveling": {
"_info": {
"name": "C124LargeLeveling._info.name",
"help": "C124LargeLeveling._info.help"
},
"NonLargeEnterTolerance": {
"name": "C124LargeLeveling.NonLargeEnterTolerance.name",
"help": "C124LargeLeveling.NonLargeEnterTolerance.help",
"0": "0",
"1": "1",
"2": "2"
},
"NonLargeRetreatTolerance": {
"name": "C124LargeLeveling.NonLargeRetreatTolerance.name",
"help": "C124LargeLeveling.NonLargeRetreatTolerance.help",
"0": "0",
"1": "1",
"2": "2",
"10": "10"
},
"PickupAmmo": {
"name": "C124LargeLeveling.PickupAmmo.name",
"help": "C124LargeLeveling.PickupAmmo.help",
"3": "3",
"4": "4",
"5": "5"
}
},
"GemsFarming": {
"_info": {
"name": "GemsFarming._info.name",
@ -936,7 +1037,7 @@
"EscortMission": {
"name": "Daily.EscortMission.name",
"help": "Daily.EscortMission.help",
"no": "no",
"skip": "skip",
"first": "first",
"second": "second",
"third": "third"
@ -954,7 +1055,7 @@
"AdvanceMission": {
"name": "Daily.AdvanceMission.name",
"help": "Daily.AdvanceMission.help",
"no": "no",
"skip": "skip",
"first": "first",
"second": "second",
"third": "third"
@ -972,7 +1073,7 @@
"FierceAssault": {
"name": "Daily.FierceAssault.name",
"help": "Daily.FierceAssault.help",
"no": "no",
"skip": "skip",
"first": "first",
"second": "second",
"third": "third"
@ -990,7 +1091,7 @@
"TacticalTraining": {
"name": "Daily.TacticalTraining.name",
"help": "Daily.TacticalTraining.help",
"no": "no",
"skip": "skip",
"first": "first",
"second": "second",
"third": "third"
@ -1008,7 +1109,7 @@
"SupplyLineDisruption": {
"name": "Daily.SupplyLineDisruption.name",
"help": "Daily.SupplyLineDisruption.help",
"no": "no",
"skip": "skip",
"first": "first",
"second": "second",
"third": "third"

View File

@ -12,8 +12,6 @@ from module.ui.ui import page_daily, page_campaign_menu, BACK_ARROW, DAILY_CHECK
DAILY_MISSION_LIST = [DAILY_MISSION_1, DAILY_MISSION_2, DAILY_MISSION_3]
OCR_REMAIN = Digit(OCR_REMAIN, threshold=128, alphabet='0123')
OCR_DAILY_FLEET_INDEX = Digit(OCR_DAILY_FLEET_INDEX, letter=(90, 154, 255), threshold=128, alphabet='123456')
RECORD_OPTION = ('DailyRecord', 'daily')
RECORD_SINCE = (0,)
class Daily(Combat, DailyEquipment):
@ -81,7 +79,7 @@ class Daily(Combat, DailyEquipment):
0
]
dic = {
'no': 0,
'skip': 0,
'first': 1,
'second': 2,
'third': 3,