Opt: Remove 7-2 mystery farming, 12-2 leveling, 12-4 leveling; add multiple Main and Event tasks

This commit is contained in:
LmeSzinc 2022-04-23 14:32:31 +08:00
parent cd49c097b6
commit d30da01a10
15 changed files with 654 additions and 598 deletions

15
alas.py
View File

@ -277,11 +277,26 @@ class AzurLaneAutoScript:
CampaignRun(config=self.config, device=self.device).run(
name=self.config.Campaign_Name, folder=self.config.Campaign_Event, mode=self.config.Campaign_Mode)
def main2(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 main3(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 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 event2(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()

View File

@ -64,7 +64,7 @@
"ServerUpdate": "00:00"
},
"Campaign": {
"Name": "7-2",
"Name": "12-4",
"Event": "campaign_main",
"Mode": "normal",
"UseClearMode": true,
@ -127,25 +127,22 @@
"EnemyScaleBalanceWeight": "default_mode"
}
},
"C72MysteryFarming": {
"Main2": {
"Scheduler": {
"Enable": false,
"NextRun": "2020-01-01 00:00:00",
"Command": "C72MysteryFarming",
"Command": "Main2",
"SuccessInterval": 0,
"FailureInterval": 120,
"ServerUpdate": "00:00"
},
"C72MysteryFarming": {
"StepOnA3": true
},
"Campaign": {
"Name": "campaign_7_2_mystery_farming",
"Name": "12-4",
"Event": "campaign_main",
"Mode": "normal",
"UseClearMode": true,
"UseFleetLock": true,
"UseAutoSearch": false,
"UseAutoSearch": true,
"Use2xBook": false,
"AmbushEvade": true
},
@ -169,6 +166,12 @@
"FleetOrder": "fleet1_mob_fleet2_boss",
"AutoSearchFleetOrder": "fleet1_mob_fleet2_boss"
},
"Submarine": {
"Fleet": 0,
"Mode": "do_not_use",
"AutoSearchMode": "sub_standby",
"DistanceToBoss": "2_grid_to_boss"
},
"Emotion": {
"CalculateEmotion": true,
"IgnoreLowEmotionWarn": false,
@ -192,27 +195,27 @@
"RepairUseSingleThreshold": 0.3,
"RepairUseMultiThreshold": 0.6,
"LowHpRetreatThreshold": 0.3
},
"EnemyPriority": {
"EnemyScaleBalanceWeight": "default_mode"
}
},
"C122MediumLeveling": {
"Main3": {
"Scheduler": {
"Enable": false,
"NextRun": "2020-01-01 00:00:00",
"Command": "C122MediumLeveling",
"Command": "Main3",
"SuccessInterval": 0,
"FailureInterval": 120,
"ServerUpdate": "00:00"
},
"C122MediumLeveling": {
"LargeEnemyTolerance": 1
},
"Campaign": {
"Name": "campaign_12_2_leveling",
"Name": "12-4",
"Event": "campaign_main",
"Mode": "normal",
"UseClearMode": true,
"UseFleetLock": true,
"UseAutoSearch": false,
"UseAutoSearch": true,
"Use2xBook": false,
"AmbushEvade": true
},
@ -233,8 +236,8 @@
"Fleet2Formation": "double_line",
"Fleet2Mode": "combat_auto",
"Fleet2Step": 2,
"FleetOrder": "fleet1_all_fleet2_standby",
"AutoSearchFleetOrder": "fleet1_all_fleet2_standby"
"FleetOrder": "fleet1_mob_fleet2_boss",
"AutoSearchFleetOrder": "fleet1_mob_fleet2_boss"
},
"Submarine": {
"Fleet": 0,
@ -265,81 +268,9 @@
"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",
"StageIncrease": false,
"GetNewShip": false,
"ReachLevel": 0
},
"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",
"AutoSearchMode": "sub_standby",
"DistanceToBoss": "2_grid_to_boss"
},
"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
"EnemyPriority": {
"EnemyScaleBalanceWeight": "default_mode"
}
},
"GemsFarming": {
@ -360,7 +291,7 @@
"CommonCV": "any"
},
"Campaign": {
"Name": "7-2",
"Name": "12-4",
"Event": "campaign_main",
"Mode": "normal",
"UseClearMode": true,
@ -423,7 +354,80 @@
"ServerUpdate": "00:00"
},
"Campaign": {
"Name": "7-2",
"Name": "12-4",
"Event": "campaign_main",
"Mode": "normal",
"UseClearMode": true,
"UseFleetLock": true,
"UseAutoSearch": true,
"Use2xBook": false,
"AmbushEvade": true
},
"StopCondition": {
"RunCount": 0,
"OilLimit": 1000,
"MapAchievement": "non_stop",
"StageIncrease": false,
"GetNewShip": false,
"ReachLevel": 0
},
"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",
"AutoSearchMode": "sub_standby",
"DistanceToBoss": "2_grid_to_boss"
},
"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
},
"EnemyPriority": {
"EnemyScaleBalanceWeight": "default_mode"
}
},
"Event2": {
"Scheduler": {
"Enable": false,
"NextRun": "2020-01-01 00:00:00",
"Command": "Event2",
"SuccessInterval": 0,
"FailureInterval": 120,
"ServerUpdate": "00:00"
},
"Campaign": {
"Name": "12-4",
"Event": "campaign_main",
"Mode": "normal",
"UseClearMode": true,
@ -1204,7 +1208,7 @@
"ServerUpdate": "00:00"
},
"Campaign": {
"Name": "7-2",
"Name": "12-4",
"Event": "war_archives_20210325_cn",
"Mode": "normal",
"UseClearMode": true,

View File

@ -86,6 +86,7 @@ class CampaignEvent(UI):
limit = int(self.config.EventGeneral_PtLimit)
tasks = [
'Event',
'Event2',
'EventAb',
'EventCd',
'EventSp',
@ -116,6 +117,7 @@ class CampaignEvent(UI):
limit = self.config.EventGeneral_TimeLimit
tasks = [
'Event',
'Event2',
'EventAb',
'EventCd',
'EventSp',

File diff suppressed because it is too large Load Diff

View File

@ -65,7 +65,7 @@ Retirement:
# ==================== Farm ====================
Campaign:
Name: 7-2
Name: 12-4
Event:
value: campaign_main
option: [campaign_main]

View File

@ -7,14 +7,14 @@
],
"Farm": [
"Main",
"C72MysteryFarming",
"C122MediumLeveling",
"C124LargeLeveling",
"Main2",
"Main3",
"GemsFarming"
],
"Event": [
"EventGeneral",
"Event",
"Event2",
"EventAb",
"EventCd",
"EventSp",

View File

@ -15,57 +15,12 @@ Restart:
Main:
Campaign:
Event: campaign_main
C72MysteryFarming:
Main2:
Campaign:
Name: campaign_7_2_mystery_farming
Event: campaign_main
Mode: normal
UseClearMode: true
UseFleetLock: true
UseAutoSearch: false
Use2xBook: false
AmbushEvade: true
StopCondition:
MapAchievement: non_stop
StageIncrease: false
GetNewShip: false
Fleet:
FleetOrder: fleet1_mob_fleet2_boss
AutoSearchFleetOrder: fleet1_mob_fleet2_boss
C122MediumLeveling:
Main3:
Campaign:
Name: campaign_12_2_leveling
Event: campaign_main
Mode: normal
UseClearMode: true
UseFleetLock: true
UseAutoSearch: false
AmbushEvade: true
StopCondition:
MapAchievement: non_stop
StageIncrease: false
Fleet:
FleetOrder: fleet1_all_fleet2_standby
AutoSearchFleetOrder: fleet1_all_fleet2_standby
Submarine:
AutoSearchMode: sub_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
StageIncrease: false
Fleet:
FleetOrder: fleet1_all_fleet2_standby
AutoSearchFleetOrder: fleet1_all_fleet2_standby
Submarine:
AutoSearchMode: sub_standby
GemsFarming:
Campaign:
Mode: normal
@ -81,6 +36,10 @@ Event:
Campaign:
Mode: normal
AmbushEvade: true
Event2:
Campaign:
Mode: normal
AmbushEvade: true
EventAb:
Scheduler:
SuccessInterval: 30

View File

@ -25,32 +25,24 @@ Main:
- Emotion
- HpControl
- EnemyPriority
C72MysteryFarming:
Main2:
- Scheduler
- C72MysteryFarming
- Campaign
- StopCondition
- Fleet
- Emotion
- HpControl
C122MediumLeveling:
- Scheduler
- C122MediumLeveling
- Campaign
- StopCondition
- Fleet
- Submarine
- Emotion
- HpControl
C124LargeLeveling:
- EnemyPriority
Main3:
- Scheduler
- C124LargeLeveling
- Campaign
- StopCondition
- Fleet
- Submarine
- Emotion
- HpControl
- EnemyPriority
GemsFarming:
- Scheduler
- GemsFarming
@ -73,6 +65,15 @@ Event:
- Emotion
- HpControl
- EnemyPriority
Event2:
- Scheduler
- Campaign
- StopCondition
- Fleet
- Submarine
- Emotion
- HpControl
- EnemyPriority
EventAb:
- Scheduler
- EventAb

View File

@ -59,7 +59,7 @@ class GeneratedConfig:
Retirement_OldRetireSSR = False
# Group `Campaign`
Campaign_Name = '7-2'
Campaign_Name = '12-4'
Campaign_Event = 'campaign_main' # campaign_main
Campaign_Mode = 'normal' # normal, hard
Campaign_UseClearMode = True

View File

@ -21,8 +21,8 @@ class ManualConfig:
> Daily > Hard > OpsiAshAssist
> Sos > EventSp > EventAb > EventCd > RaidDaily > WarArchives > MaritimeEscort
> OpsiMeowfficerFarming > MetaReward
> Event > Raid > Main
> C124LargeLeveling > C122MediumLeveling > C72MysteryFarming > GemsFarming
> Event > Event2 > Raid > Main > Main2 > Main3
> GemsFarming
"""
"""

View File

@ -355,13 +355,14 @@ class ConfigGenerator:
insert('WarArchives')
else:
insert('Event')
insert('Event2')
insert('EventAb')
insert('EventCd')
insert('EventSp')
insert('GemsFarming')
# Remove campaign_main from event list
for task in ['Event', 'EventAb', 'EventCd', 'EventSp', 'Raid', 'RaidDaily', 'WarArchives']:
for task in ['Event', 'Event2', 'EventAb', 'EventCd', 'EventSp', 'Raid', 'RaidDaily', 'WarArchives']:
options = deep_get(self.args, keys=f'{task}.Campaign.Event.option')
options = [option for option in options if option != 'campaign_main']
deep_set(self.args, keys=f'{task}.Campaign.Event.option', value=options)
@ -461,7 +462,7 @@ class ConfigUpdater:
# Update to latest event
server = to_server(deep_get(new, 'Alas.Emulator.PackageName', 'cn'))
if not is_template:
for task in ['Event', 'EventAb', 'EventCd', 'EventSp', 'Raid', 'RaidDaily']:
for task in ['Event', 'Event2', 'EventAb', 'EventCd', 'EventSp', 'Raid', 'RaidDaily']:
deep_set(new,
keys=f'{task}.Campaign.Event',
value=deep_get(self.args, f'{task}.Campaign.Event.{server}'))

View File

@ -54,16 +54,12 @@
"name": "Main",
"help": ""
},
"C72MysteryFarming": {
"name": "7-2 Mystery Farming",
"Main2": {
"name": "Main-2",
"help": ""
},
"C122MediumLeveling": {
"name": "12-2 Leveling",
"help": ""
},
"C124LargeLeveling": {
"name": "12-4 Leveling",
"Main3": {
"name": "Main-3",
"help": ""
},
"GemsFarming": {
@ -78,6 +74,10 @@
"name": "Event",
"help": ""
},
"Event2": {
"name": "Event-2",
"help": ""
},
"EventAb": {
"name": "Event AB",
"help": ""

View File

@ -54,17 +54,13 @@
"name": "Task.Main.name",
"help": "Task.Main.help"
},
"C72MysteryFarming": {
"name": "Task.C72MysteryFarming.name",
"help": "Task.C72MysteryFarming.help"
"Main2": {
"name": "Task.Main2.name",
"help": "Task.Main2.help"
},
"C122MediumLeveling": {
"name": "Task.C122MediumLeveling.name",
"help": "Task.C122MediumLeveling.help"
},
"C124LargeLeveling": {
"name": "Task.C124LargeLeveling.name",
"help": "Task.C124LargeLeveling.help"
"Main3": {
"name": "Task.Main3.name",
"help": "Task.Main3.help"
},
"GemsFarming": {
"name": "Task.GemsFarming.name",
@ -78,6 +74,10 @@
"name": "Task.Event.name",
"help": "Task.Event.help"
},
"Event2": {
"name": "Task.Event2.name",
"help": "Task.Event2.help"
},
"EventAb": {
"name": "Task.EventAb.name",
"help": "Task.EventAb.help"

View File

@ -54,16 +54,12 @@
"name": "主线图",
"help": ""
},
"C72MysteryFarming": {
"name": "7-2 三战捡垃圾",
"Main2": {
"name": "主线图-2",
"help": ""
},
"C122MediumLeveling": {
"name": "12-2 中型练级",
"help": ""
},
"C124LargeLeveling": {
"name": "12-4 大型练级",
"Main3": {
"name": "主线图-3",
"help": ""
},
"GemsFarming": {
@ -78,6 +74,10 @@
"name": "活动图",
"help": ""
},
"Event2": {
"name": "活动图-2",
"help": ""
},
"EventAb": {
"name": "活动每日AB图",
"help": ""

View File

@ -54,16 +54,12 @@
"name": "主線圖",
"help": ""
},
"C72MysteryFarming": {
"name": "7-2 三戰撿垃圾",
"Main2": {
"name": "主線圖-2",
"help": ""
},
"C122MediumLeveling": {
"name": "12-2 中型練級",
"help": ""
},
"C124LargeLeveling": {
"name": "12-4 大型練級",
"Main3": {
"name": "主線圖-3",
"help": ""
},
"GemsFarming": {
@ -78,6 +74,10 @@
"name": "活動圖",
"help": ""
},
"Event2": {
"name": "活動圖-2",
"help": ""
},
"EventAb": {
"name": "活動每日AB圖",
"help": ""