Add: Several Submarine supports and EnemyFilter; add EventB, EventD

This commit is contained in:
bookbug666 2022-07-22 02:55:03 +08:00
parent 72537d7500
commit 704c27cf4d
22 changed files with 1463 additions and 12 deletions

View File

@ -229,10 +229,18 @@ class AzurLaneAutoScript:
from module.event.campaign_ab import CampaignAB
CampaignAB(config=self.config, device=self.device).run()
def event_b(self):
from module.event.campaign_b import CampaignB
CampaignB(config=self.config, device=self.device).run()
def event_cd(self):
from module.event.campaign_cd import CampaignCD
CampaignCD(config=self.config, device=self.device).run()
def event_d(self):
from module.event.campaign_d import CampaignD
CampaignD(config=self.config, device=self.device).run()
def event_sp(self):
from module.event.campaign_sp import CampaignSP
CampaignSP(config=self.config, device=self.device).run()

View File

@ -62,9 +62,19 @@ class Campaign(CampaignBase):
MAP = MAP
def battle_0(self):
if self.clear_enemy(scale=(1,)):
if self.clear_filter_enemy(self.ENEMY_FILTER, preserve=1):
return True
if self.clear_enemy(scale=(2,), genre=['light', 'carrier', 'enemy', 'treasure', 'main']):
return self.battle_default()
def battle_3(self):
if self.clear_filter_enemy(self.ENEMY_FILTER, preserve=1):
return True
return self.battle_default()
def battle_5(self):
if self.clear_filter_enemy(self.ENEMY_FILTER, preserve=0):
return True
return self.battle_default()

View File

@ -61,7 +61,13 @@ class Campaign(CampaignBase):
MAP = MAP
def battle_0(self):
if self.clear_enemy(scale=(2, 3), genre=['light', 'carrier', 'enemy', 'main']):
if self.clear_filter_enemy(self.ENEMY_FILTER, preserve=1):
return True
return self.battle_default()
def battle_4(self):
if self.clear_filter_enemy(self.ENEMY_FILTER, preserve=0):
return True
return self.battle_default()

View File

@ -64,7 +64,13 @@ class Campaign(CampaignBase):
if self.fleet_2_push_forward():
return True
if self.clear_enemy(scale=(2, 3), genre=['light', 'carrier', 'enemy', 'main']):
if self.clear_filter_enemy(self.ENEMY_FILTER, preserve=1):
return True
return self.battle_default()
def battle_4(self):
if self.clear_filter_enemy(self.ENEMY_FILTER, preserve=0):
return True
return self.battle_default()

View File

@ -60,9 +60,13 @@ class Campaign(CampaignBase):
MAP = MAP
def battle_0(self):
if self.clear_enemy(scale=(1,)):
if self.clear_filter_enemy(self.ENEMY_FILTER, preserve=1):
return True
if self.clear_enemy(scale=(2,), genre=['light', 'carrier', 'enemy', 'treasure', 'main']):
return self.battle_default()
def battle_4(self):
if self.clear_filter_enemy(self.ENEMY_FILTER, preserve=0):
return True
return self.battle_default()

View File

@ -6,6 +6,8 @@ from module.template.assets import TEMPLATE_STAGE_SOS
class CampaignBase(CampaignBase_):
ENEMY_FILTER = '1T > 1L > 1E > 1M > 2T > 2L > 2E > 2M > 3T > 3L > 3E > 3M'
def campaign_get_entrance(self, name):
"""
SOS stages don't have names in game, although players call them X-5 or X-sos.

View File

@ -317,6 +317,12 @@
"Fleet2Step": 2,
"FleetOrder": "fleet1_mob_fleet2_boss"
},
"Submarine": {
"Fleet": 0,
"Mode": "do_not_use",
"AutoSearchMode": "sub_standby",
"DistanceToBoss": "2_grid_to_boss"
},
"Emotion": {
"CalculateEmotion": true,
"IgnoreLowEmotionWarn": false,
@ -556,6 +562,85 @@
"RepairUseSingleThreshold": 0.3,
"RepairUseMultiThreshold": 0.6,
"LowHpRetreatThreshold": 0.3
},
"EnemyPriority": {
"EnemyScaleBalanceWeight": "default_mode"
}
},
"EventB": {
"Scheduler": {
"Enable": false,
"NextRun": "2020-01-01 00:00:00",
"Command": "EventB",
"SuccessInterval": 30,
"FailureInterval": 30,
"ServerUpdate": "00:00"
},
"EventB": {
"StageFilter": "B1 > B2 > B3",
"LastStage": 0
},
"Campaign": {
"Name": "dynamic",
"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"
},
"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"
}
},
"EventCd": {
@ -629,6 +714,85 @@
"RepairUseSingleThreshold": 0.3,
"RepairUseMultiThreshold": 0.6,
"LowHpRetreatThreshold": 0.3
},
"EnemyPriority": {
"EnemyScaleBalanceWeight": "default_mode"
}
},
"EventD": {
"Scheduler": {
"Enable": false,
"NextRun": "2020-01-01 00:00:00",
"Command": "EventD",
"SuccessInterval": 30,
"FailureInterval": 30,
"ServerUpdate": "00:00"
},
"EventD": {
"StageFilter": "D1 > D2 > D3",
"LastStage": 0
},
"Campaign": {
"Name": "dynamic",
"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"
},
"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"
}
},
"EventSp": {
@ -698,6 +862,9 @@
"RepairUseSingleThreshold": 0.3,
"RepairUseMultiThreshold": 0.6,
"LowHpRetreatThreshold": 0.3
},
"EnemyPriority": {
"EnemyScaleBalanceWeight": "default_mode"
}
},
"Raid": {
@ -1210,7 +1377,7 @@
},
"Campaign": {
"Name": "12-4",
"Event": "war_archives_20210325_cn",
"Event": "war_archives_20210624_cn",
"Mode": "normal",
"UseClearMode": true,
"UseFleetLock": true,

View File

@ -88,7 +88,9 @@ class CampaignEvent(UI):
'Event',
'Event2',
'EventAb',
'EventB',
'EventCd',
'EventD',
'EventSp',
'Raid',
'RaidDaily'
@ -121,7 +123,9 @@ class CampaignEvent(UI):
'Event',
'Event2',
'EventAb',
'EventB',
'EventCd',
'EventD',
'EventSp',
'GemsFarming',
'Raid',

View File

@ -1605,6 +1605,45 @@
]
}
},
"Submarine": {
"Fleet": {
"type": "select",
"value": 0,
"option": [
0,
1,
2
]
},
"Mode": {
"type": "select",
"value": "do_not_use",
"option": [
"do_not_use",
"hunt_only",
"boss_only",
"every_combat"
]
},
"AutoSearchMode": {
"type": "select",
"value": "sub_standby",
"option": [
"sub_standby",
"sub_auto_call"
]
},
"DistanceToBoss": {
"type": "select",
"value": "2_grid_to_boss",
"option": [
"to_boss_position",
"1_grid_to_boss",
"2_grid_to_boss",
"use_U522_skill"
]
}
},
"Emotion": {
"CalculateEmotion": {
"type": "checkbox",
@ -2925,6 +2964,435 @@
"type": "input",
"value": 0.3
}
},
"EnemyPriority": {
"EnemyScaleBalanceWeight": {
"type": "select",
"value": "default_mode",
"option": [
"default_mode",
"S3_enemy_first",
"S1_enemy_first"
]
}
}
},
"EventB": {
"Scheduler": {
"Enable": {
"type": "checkbox",
"value": false
},
"NextRun": {
"type": "input",
"value": "2020-01-01 00:00:00",
"validate": "datetime"
},
"Command": {
"type": "hide",
"value": "EventB"
},
"SuccessInterval": {
"type": "hide",
"value": 30
},
"FailureInterval": {
"type": "hide",
"value": 30
},
"ServerUpdate": {
"type": "hide",
"value": "00:00"
}
},
"EventB": {
"StageFilter": {
"type": "textarea",
"value": "B1 > B2 > B3"
},
"LastStage": {
"type": "input",
"value": 0
}
},
"Campaign": {
"Name": {
"type": "hide",
"value": "dynamic"
},
"Event": {
"type": "select",
"value": "campaign_main",
"option": [
"event_20200917_cn",
"event_20201029_cn",
"event_20200820_cn",
"event_20201012_cn",
"event_20210527_cn",
"event_20220526_cn",
"event_20220428_cn",
"event_20220414_cn",
"event_20220407_tw",
"event_20210422_cn",
"event_20220324_cn",
"event_20220310_tw",
"event_20200603_cn",
"event_20220224_cn",
"event_20210225_cn",
"event_20220210_cn",
"event_20201229_cn",
"event_20211229_cn",
"event_20211125_cn",
"event_20211111_cn",
"event_20211028_tw",
"event_20211028_cn",
"event_20210916_cn",
"event_20210722_cn",
"event_20210819_cn",
"event_20200806_cn",
"event_20200723_cn",
"event_20200903_en",
"event_20210624_cn",
"event_20210624_tw",
"event_20210610_tw",
"event_20210527_tw",
"event_20210429_tw",
"event_20210415_tw",
"event_20210325_cn",
"event_20210225_tw",
"event_20210121_cn",
"event_20201126_cn",
"event_20200312_cn",
"event_20201002_en",
"event_20200716_en",
"event_20200611_en",
"event_20200603_en",
"event_20200521_en",
"event_20200521_cn",
"event_20200507_cn",
"event_20200423_cn",
"event_20200326_cn",
"event_20200227_cn"
],
"cn": "event_20200917_cn",
"en": "event_20200917_cn",
"jp": "event_20200917_cn",
"tw": "event_20201029_cn"
},
"Mode": {
"type": "hide",
"value": "normal",
"option": [
"normal",
"hard"
]
},
"UseClearMode": {
"type": "checkbox",
"value": true
},
"UseFleetLock": {
"type": "checkbox",
"value": true
},
"UseAutoSearch": {
"type": "checkbox",
"value": true
},
"Use2xBook": {
"type": "hide",
"value": false
},
"AmbushEvade": {
"type": "hide",
"value": true
}
},
"StopCondition": {
"RunCount": {
"type": "hide",
"value": 0
},
"OilLimit": {
"type": "input",
"value": 1000
},
"MapAchievement": {
"type": "hide",
"value": "non_stop",
"option": [
"non_stop",
"100_percent_clear",
"map_3_stars",
"threat_safe",
"threat_safe_without_3_stars"
]
},
"StageIncrease": {
"type": "hide",
"value": false
},
"GetNewShip": {
"type": "hide",
"value": false
},
"ReachLevel": {
"type": "hide",
"value": 0
}
},
"Fleet": {
"Fleet1": {
"type": "select",
"value": 1,
"option": [
1,
2,
3,
4,
5,
6
]
},
"Fleet1Formation": {
"type": "select",
"value": "double_line",
"option": [
"line_ahead",
"double_line",
"diamond"
]
},
"Fleet1Mode": {
"type": "select",
"value": "combat_auto",
"option": [
"combat_auto",
"combat_manual",
"stand_still_in_the_middle",
"hide_in_bottom_left"
]
},
"Fleet1Step": {
"type": "select",
"value": 3,
"option": [
2,
3,
4,
5
]
},
"Fleet2": {
"type": "select",
"value": 2,
"option": [
0,
1,
2,
3,
4,
5,
6
]
},
"Fleet2Formation": {
"type": "select",
"value": "double_line",
"option": [
"line_ahead",
"double_line",
"diamond"
]
},
"Fleet2Mode": {
"type": "select",
"value": "combat_auto",
"option": [
"combat_auto",
"combat_manual",
"stand_still_in_the_middle",
"hide_in_bottom_left"
]
},
"Fleet2Step": {
"type": "select",
"value": 2,
"option": [
2,
3,
4,
5
]
},
"FleetOrder": {
"type": "select",
"value": "fleet1_mob_fleet2_boss",
"option": [
"fleet1_mob_fleet2_boss",
"fleet1_boss_fleet2_mob",
"fleet1_all_fleet2_standby",
"fleet1_standby_fleet2_all"
]
}
},
"Submarine": {
"Fleet": {
"type": "select",
"value": 0,
"option": [
0,
1,
2
]
},
"Mode": {
"type": "select",
"value": "do_not_use",
"option": [
"do_not_use",
"hunt_only",
"boss_only",
"every_combat"
]
},
"AutoSearchMode": {
"type": "select",
"value": "sub_standby",
"option": [
"sub_standby",
"sub_auto_call"
]
},
"DistanceToBoss": {
"type": "select",
"value": "2_grid_to_boss",
"option": [
"to_boss_position",
"1_grid_to_boss",
"2_grid_to_boss",
"use_U522_skill"
]
}
},
"Emotion": {
"CalculateEmotion": {
"type": "checkbox",
"value": true
},
"IgnoreLowEmotionWarn": {
"type": "checkbox",
"value": false
},
"Fleet1Value": {
"type": "input",
"value": 119
},
"Fleet1Record": {
"type": "disable",
"value": "2020-01-01 00:00:00",
"validate": "datetime"
},
"Fleet1Control": {
"type": "select",
"value": "prevent_yellow_face",
"option": [
"keep_exp_bonus",
"prevent_green_face",
"prevent_yellow_face",
"prevent_red_face"
]
},
"Fleet1Recover": {
"type": "select",
"value": "not_in_dormitory",
"option": [
"not_in_dormitory",
"dormitory_floor_1",
"dormitory_floor_2"
]
},
"Fleet1Oath": {
"type": "checkbox",
"value": false
},
"Fleet2Value": {
"type": "input",
"value": 119
},
"Fleet2Record": {
"type": "disable",
"value": "2020-01-01 00:00:00",
"validate": "datetime"
},
"Fleet2Control": {
"type": "select",
"value": "prevent_yellow_face",
"option": [
"keep_exp_bonus",
"prevent_green_face",
"prevent_yellow_face",
"prevent_red_face"
]
},
"Fleet2Recover": {
"type": "select",
"value": "not_in_dormitory",
"option": [
"not_in_dormitory",
"dormitory_floor_1",
"dormitory_floor_2"
]
},
"Fleet2Oath": {
"type": "checkbox",
"value": false
}
},
"HpControl": {
"UseHpBalance": {
"type": "checkbox",
"value": false
},
"UseEmergencyRepair": {
"type": "checkbox",
"value": false
},
"UseLowHpRetreat": {
"type": "checkbox",
"value": false
},
"HpBalanceThreshold": {
"type": "input",
"value": 0.2
},
"HpBalanceWeight": {
"type": "input",
"value": "1000, 1000, 1000"
},
"RepairUseSingleThreshold": {
"type": "input",
"value": 0.3
},
"RepairUseMultiThreshold": {
"type": "input",
"value": 0.6
},
"LowHpRetreatThreshold": {
"type": "input",
"value": 0.3
}
},
"EnemyPriority": {
"EnemyScaleBalanceWeight": {
"type": "select",
"value": "default_mode",
"option": [
"default_mode",
"S3_enemy_first",
"S1_enemy_first"
]
}
}
},
"EventCd": {
@ -3332,6 +3800,435 @@
"type": "input",
"value": 0.3
}
},
"EnemyPriority": {
"EnemyScaleBalanceWeight": {
"type": "select",
"value": "default_mode",
"option": [
"default_mode",
"S3_enemy_first",
"S1_enemy_first"
]
}
}
},
"EventD": {
"Scheduler": {
"Enable": {
"type": "checkbox",
"value": false
},
"NextRun": {
"type": "input",
"value": "2020-01-01 00:00:00",
"validate": "datetime"
},
"Command": {
"type": "hide",
"value": "EventD"
},
"SuccessInterval": {
"type": "hide",
"value": 30
},
"FailureInterval": {
"type": "hide",
"value": 30
},
"ServerUpdate": {
"type": "hide",
"value": "00:00"
}
},
"EventD": {
"StageFilter": {
"type": "textarea",
"value": "D1 > D2 > D3"
},
"LastStage": {
"type": "input",
"value": 0
}
},
"Campaign": {
"Name": {
"type": "hide",
"value": "dynamic"
},
"Event": {
"type": "select",
"value": "campaign_main",
"option": [
"event_20200917_cn",
"event_20201029_cn",
"event_20200820_cn",
"event_20201012_cn",
"event_20210527_cn",
"event_20220526_cn",
"event_20220428_cn",
"event_20220414_cn",
"event_20220407_tw",
"event_20210422_cn",
"event_20220324_cn",
"event_20220310_tw",
"event_20200603_cn",
"event_20220224_cn",
"event_20210225_cn",
"event_20220210_cn",
"event_20201229_cn",
"event_20211229_cn",
"event_20211125_cn",
"event_20211111_cn",
"event_20211028_tw",
"event_20211028_cn",
"event_20210916_cn",
"event_20210722_cn",
"event_20210819_cn",
"event_20200806_cn",
"event_20200723_cn",
"event_20200903_en",
"event_20210624_cn",
"event_20210624_tw",
"event_20210610_tw",
"event_20210527_tw",
"event_20210429_tw",
"event_20210415_tw",
"event_20210325_cn",
"event_20210225_tw",
"event_20210121_cn",
"event_20201126_cn",
"event_20200312_cn",
"event_20201002_en",
"event_20200716_en",
"event_20200611_en",
"event_20200603_en",
"event_20200521_en",
"event_20200521_cn",
"event_20200507_cn",
"event_20200423_cn",
"event_20200326_cn",
"event_20200227_cn"
],
"cn": "event_20200917_cn",
"en": "event_20200917_cn",
"jp": "event_20200917_cn",
"tw": "event_20201029_cn"
},
"Mode": {
"type": "hide",
"value": "normal",
"option": [
"normal",
"hard"
]
},
"UseClearMode": {
"type": "checkbox",
"value": true
},
"UseFleetLock": {
"type": "checkbox",
"value": true
},
"UseAutoSearch": {
"type": "checkbox",
"value": true
},
"Use2xBook": {
"type": "hide",
"value": false
},
"AmbushEvade": {
"type": "hide",
"value": true
}
},
"StopCondition": {
"RunCount": {
"type": "hide",
"value": 0
},
"OilLimit": {
"type": "input",
"value": 1000
},
"MapAchievement": {
"type": "hide",
"value": "non_stop",
"option": [
"non_stop",
"100_percent_clear",
"map_3_stars",
"threat_safe",
"threat_safe_without_3_stars"
]
},
"StageIncrease": {
"type": "hide",
"value": false
},
"GetNewShip": {
"type": "hide",
"value": false
},
"ReachLevel": {
"type": "hide",
"value": 0
}
},
"Fleet": {
"Fleet1": {
"type": "select",
"value": 1,
"option": [
1,
2,
3,
4,
5,
6
]
},
"Fleet1Formation": {
"type": "select",
"value": "double_line",
"option": [
"line_ahead",
"double_line",
"diamond"
]
},
"Fleet1Mode": {
"type": "select",
"value": "combat_auto",
"option": [
"combat_auto",
"combat_manual",
"stand_still_in_the_middle",
"hide_in_bottom_left"
]
},
"Fleet1Step": {
"type": "select",
"value": 3,
"option": [
2,
3,
4,
5
]
},
"Fleet2": {
"type": "select",
"value": 2,
"option": [
0,
1,
2,
3,
4,
5,
6
]
},
"Fleet2Formation": {
"type": "select",
"value": "double_line",
"option": [
"line_ahead",
"double_line",
"diamond"
]
},
"Fleet2Mode": {
"type": "select",
"value": "combat_auto",
"option": [
"combat_auto",
"combat_manual",
"stand_still_in_the_middle",
"hide_in_bottom_left"
]
},
"Fleet2Step": {
"type": "select",
"value": 2,
"option": [
2,
3,
4,
5
]
},
"FleetOrder": {
"type": "select",
"value": "fleet1_mob_fleet2_boss",
"option": [
"fleet1_mob_fleet2_boss",
"fleet1_boss_fleet2_mob",
"fleet1_all_fleet2_standby",
"fleet1_standby_fleet2_all"
]
}
},
"Submarine": {
"Fleet": {
"type": "select",
"value": 0,
"option": [
0,
1,
2
]
},
"Mode": {
"type": "select",
"value": "do_not_use",
"option": [
"do_not_use",
"hunt_only",
"boss_only",
"every_combat"
]
},
"AutoSearchMode": {
"type": "select",
"value": "sub_standby",
"option": [
"sub_standby",
"sub_auto_call"
]
},
"DistanceToBoss": {
"type": "select",
"value": "2_grid_to_boss",
"option": [
"to_boss_position",
"1_grid_to_boss",
"2_grid_to_boss",
"use_U522_skill"
]
}
},
"Emotion": {
"CalculateEmotion": {
"type": "checkbox",
"value": true
},
"IgnoreLowEmotionWarn": {
"type": "checkbox",
"value": false
},
"Fleet1Value": {
"type": "input",
"value": 119
},
"Fleet1Record": {
"type": "disable",
"value": "2020-01-01 00:00:00",
"validate": "datetime"
},
"Fleet1Control": {
"type": "select",
"value": "prevent_yellow_face",
"option": [
"keep_exp_bonus",
"prevent_green_face",
"prevent_yellow_face",
"prevent_red_face"
]
},
"Fleet1Recover": {
"type": "select",
"value": "not_in_dormitory",
"option": [
"not_in_dormitory",
"dormitory_floor_1",
"dormitory_floor_2"
]
},
"Fleet1Oath": {
"type": "checkbox",
"value": false
},
"Fleet2Value": {
"type": "input",
"value": 119
},
"Fleet2Record": {
"type": "disable",
"value": "2020-01-01 00:00:00",
"validate": "datetime"
},
"Fleet2Control": {
"type": "select",
"value": "prevent_yellow_face",
"option": [
"keep_exp_bonus",
"prevent_green_face",
"prevent_yellow_face",
"prevent_red_face"
]
},
"Fleet2Recover": {
"type": "select",
"value": "not_in_dormitory",
"option": [
"not_in_dormitory",
"dormitory_floor_1",
"dormitory_floor_2"
]
},
"Fleet2Oath": {
"type": "checkbox",
"value": false
}
},
"HpControl": {
"UseHpBalance": {
"type": "checkbox",
"value": false
},
"UseEmergencyRepair": {
"type": "checkbox",
"value": false
},
"UseLowHpRetreat": {
"type": "checkbox",
"value": false
},
"HpBalanceThreshold": {
"type": "input",
"value": 0.2
},
"HpBalanceWeight": {
"type": "input",
"value": "1000, 1000, 1000"
},
"RepairUseSingleThreshold": {
"type": "input",
"value": 0.3
},
"RepairUseMultiThreshold": {
"type": "input",
"value": 0.6
},
"LowHpRetreatThreshold": {
"type": "input",
"value": 0.3
}
},
"EnemyPriority": {
"EnemyScaleBalanceWeight": {
"type": "select",
"value": "default_mode",
"option": [
"default_mode",
"S3_enemy_first",
"S1_enemy_first"
]
}
}
},
"EventSp": {
@ -3729,6 +4626,17 @@
"type": "input",
"value": 0.3
}
},
"EnemyPriority": {
"EnemyScaleBalanceWeight": {
"type": "select",
"value": "default_mode",
"option": [
"default_mode",
"S3_enemy_first",
"S1_enemy_first"
]
}
}
},
"Raid": {
@ -5782,8 +6690,8 @@
"war_archives_20181020_en"
],
"cn": "war_archives_20210624_cn",
"en": "war_archives_20210325_cn",
"jp": "war_archives_20210325_cn",
"en": "war_archives_20210624_cn",
"jp": "war_archives_20210624_cn",
"tw": "war_archives_20181227_cn"
},
"Mode": {

View File

@ -223,10 +223,18 @@ EventAb:
StageFilter: |-
A1 > A2 > A3 > B1 > B2 > B3
LastStage: 0
EventB:
StageFilter: |-
B1 > B2 > B3
LastStage: 0
EventCd:
StageFilter: |-
C1 > C2 > C3 > D1 > D2 > D3
LastStage: 0
EventD:
StageFilter: |-
D1 > D2 > D3
LastStage: 0
Raid:
Mode:
value: hard

View File

@ -16,7 +16,9 @@
"Event",
"Event2",
"EventAb",
"EventB",
"EventCd",
"EventD",
"EventSp",
"Raid",
"RaidDaily",

View File

@ -59,6 +59,22 @@ EventAb:
StageIncrease: false
GetNewShip: false
ReachLevel: 0
EventB:
Scheduler:
SuccessInterval: 30
FailureInterval: 30
ServerUpdate: 00:00
Campaign:
Name: dynamic
Mode: normal
Use2xBook: false
AmbushEvade: true
StopCondition:
RunCount: 0
MapAchievement: non_stop
StageIncrease: false
GetNewShip: false
ReachLevel: 0
EventCd:
Scheduler:
SuccessInterval: 30
@ -75,6 +91,22 @@ EventCd:
StageIncrease: false
GetNewShip: false
ReachLevel: 0
EventD:
Scheduler:
SuccessInterval: 30
FailureInterval: 30
ServerUpdate: 00:00
Campaign:
Name: dynamic
Mode: normal
Use2xBook: false
AmbushEvade: true
StopCondition:
RunCount: 0
MapAchievement: non_stop
StageIncrease: false
GetNewShip: false
ReachLevel: 0
EventSp:
Scheduler:
SuccessInterval: 30

View File

@ -49,6 +49,7 @@ GemsFarming:
- Campaign
- StopCondition
- Fleet
- Submarine
- Emotion
- EnemyPriority
@ -83,6 +84,17 @@ EventAb:
- Submarine
- Emotion
- HpControl
- EnemyPriority
EventB:
- Scheduler
- EventB
- Campaign
- StopCondition
- Fleet
- Submarine
- Emotion
- HpControl
- EnemyPriority
EventCd:
- Scheduler
- EventCd
@ -92,6 +104,17 @@ EventCd:
- Submarine
- Emotion
- HpControl
- EnemyPriority
EventD:
- Scheduler
- EventD
- Campaign
- StopCondition
- Fleet
- Submarine
- Emotion
- HpControl
- EnemyPriority
EventSp:
- Scheduler
- Campaign
@ -100,6 +123,7 @@ EventSp:
- Submarine
- Emotion
- HpControl
- EnemyPriority
Raid:
- Scheduler
- Raid

View File

@ -151,10 +151,18 @@ class GeneratedConfig:
EventAb_StageFilter = 'A1 > A2 > A3 > B1 > B2 > B3'
EventAb_LastStage = 0
# Group `EventB`
EventB_StageFilter = 'B1 > B2 > B3'
EventB_LastStage = 0
# Group `EventCd`
EventCd_StageFilter = 'C1 > C2 > C3 > D1 > D2 > D3'
EventCd_LastStage = 0
# Group `EventD`
EventD_StageFilter = 'D1 > D2 > D3'
EventD_LastStage = 0
# Group `Raid`
Raid_Mode = 'hard' # easy, normal, hard
Raid_UseTicket = False

View File

@ -19,7 +19,7 @@ class ManualConfig:
> OpsiDaily > OpsiShop
> OpsiAbyssal > OpsiStronghold > OpsiObscure
> Daily > Hard > OpsiAshAssist
> Sos > EventSp > EventAb > EventCd > RaidDaily > WarArchives > MaritimeEscort
> Sos > EventSp > EventAb > EventB > EventCd > EventD > RaidDaily > WarArchives > MaritimeEscort
> Event > Event2 > Raid > Main > Main2 > Main3
> OpsiMeowfficerFarming
> GemsFarming

View File

@ -363,12 +363,14 @@ class ConfigGenerator:
insert('Event')
insert('Event2')
insert('EventAb')
insert('EventB')
insert('EventCd')
insert('EventD')
insert('EventSp')
insert('GemsFarming')
# Remove campaign_main from event list
for task in ['Event', 'Event2', 'EventAb', 'EventCd', 'EventSp', 'Raid', 'RaidDaily', 'WarArchives']:
for task in ['Event', 'Event2', 'EventAb', 'EventB', 'EventCd', 'EventD', '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)
@ -485,7 +487,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', 'Event2', 'EventAb', 'EventCd', 'EventSp', 'Raid', 'RaidDaily']:
for task in ['Event', 'Event2', 'EventAb', 'EventB', 'EventCd', 'EventD', 'EventSp', 'Raid', 'RaidDaily']:
deep_set(new,
keys=f'{task}.Campaign.Event',
value=deep_get(self.args, f'{task}.Campaign.Event.{server}'))

View File

@ -82,10 +82,18 @@
"name": "Event AB",
"help": ""
},
"EventB": {
"name": "Task.EventB.name",
"help": "Task.EventB.help"
},
"EventCd": {
"name": "Event CD",
"help": ""
},
"EventD": {
"name": "Task.EventD.name",
"help": "Task.EventD.help"
},
"EventSp": {
"name": "Event SP",
"help": ""
@ -987,6 +995,20 @@
"help": "Automatically updated, skips completed levels in the filter, and resets at server reset time (00:00)"
}
},
"EventB": {
"_info": {
"name": "EventB Settings",
"help": "Low cost fleets, like 0 limit break DD+ 0 limit break CVL, often having trouble with no ammo boss fight in B2 and B3\nSelecting different fleets may help deal such situation"
},
"StageFilter": {
"name": "EventB Stage Filter",
"help": ""
},
"LastStage": {
"name": "Last EventB Stage",
"help": "Automatically updated, skips completed levels in the filter, and resets at server reset time (00:00)"
}
},
"EventCd": {
"_info": {
"name": "EventCD Settings",
@ -1001,6 +1023,20 @@
"help": "Automatically updated, skips completed levels in the filter, and resets at server reset time (00:00)"
}
},
"EventD": {
"_info": {
"name": "EventD Settings",
"help": "Due to the different ship requirements between map C and D, a separate module is created to handle it."
},
"StageFilter": {
"name": "EventD Stage Filter",
"help": ""
},
"LastStage": {
"name": "Last EventD Stage",
"help": "Automatically updated, skips completed levels in the filter, and resets at server reset time (00:00)"
}
},
"Raid": {
"_info": {
"name": "Raid Settings",

View File

@ -82,10 +82,18 @@
"name": "Task.EventAb.name",
"help": "Task.EventAb.help"
},
"EventB": {
"name": "Task.EventB.name",
"help": "Task.EventB.help"
},
"EventCd": {
"name": "Task.EventCd.name",
"help": "Task.EventCd.help"
},
"EventD": {
"name": "Task.EventD.name",
"help": "Task.EventD.help"
},
"EventSp": {
"name": "Task.EventSp.name",
"help": "Task.EventSp.help"
@ -987,6 +995,20 @@
"help": "EventAb.LastStage.help"
}
},
"EventB": {
"_info": {
"name": "EventB._info.name",
"help": "EventB._info.help"
},
"StageFilter": {
"name": "EventB.StageFilter.name",
"help": "EventB.StageFilter.help"
},
"LastStage": {
"name": "EventB.LastStage.name",
"help": "EventB.LastStage.help"
}
},
"EventCd": {
"_info": {
"name": "EventCd._info.name",
@ -1001,6 +1023,20 @@
"help": "EventCd.LastStage.help"
}
},
"EventD": {
"_info": {
"name": "EventD._info.name",
"help": "EventD._info.help"
},
"StageFilter": {
"name": "EventD.StageFilter.name",
"help": "EventD.StageFilter.help"
},
"LastStage": {
"name": "EventD.LastStage.name",
"help": "EventD.LastStage.help"
}
},
"Raid": {
"_info": {
"name": "Raid._info.name",

View File

@ -82,10 +82,18 @@
"name": "活动每日AB图",
"help": ""
},
"EventB": {
"name": "活动每日B图",
"help": ""
},
"EventCd": {
"name": "活动每日CD图",
"help": ""
},
"EventD": {
"name": "活动每日D图",
"help": ""
},
"EventSp": {
"name": "活动每日SP图",
"help": ""
@ -987,6 +995,20 @@
"help": "自动更新的数值将跳过过滤器中已完成的关卡过0点重置"
}
},
"EventB": {
"_info": {
"name": "活动每日B图",
"help": "由于3油低耗队伍在B2.B3等地图会需要空弹打王容易翻车\n故制作一个从每日AB分离的单独模块来处理地图B2.B3"
},
"StageFilter": {
"name": "活动每日过滤器",
"help": "按过滤器顺序出击"
},
"LastStage": {
"name": "上一个完成的关卡",
"help": "自动更新的数值将跳过过滤器中已完成的关卡过0点重置"
}
},
"EventCd": {
"_info": {
"name": "活动每日CD图",
@ -1001,6 +1023,20 @@
"help": "自动更新的数值将跳过过滤器中已完成的关卡过0点重置"
}
},
"EventD": {
"_info": {
"name": "活动每日D图",
"help": "由于CD图锁船种的要求不同故制作一个从每日CD分离的单独模块来处理"
},
"StageFilter": {
"name": "活动每日过滤器",
"help": "按过滤器顺序出击"
},
"LastStage": {
"name": "上一个完成的关卡",
"help": "自动更新的数值将跳过过滤器中已完成的关卡过0点重置"
}
},
"Raid": {
"_info": {
"name": "共斗活动设置",

View File

@ -82,10 +82,18 @@
"name": "活動每日AB圖",
"help": ""
},
"EventB": {
"name": "活動每日B圖",
"help": ""
},
"EventCd": {
"name": "活動每日CD圖",
"help": ""
},
"EventD": {
"name": "活動每日D圖",
"help": ""
},
"EventSp": {
"name": "活動每日SP圖",
"help": ""
@ -987,6 +995,20 @@
"help": "自動更新的數值將跳過過濾器中已完成的地圖過0點重置"
}
},
"EventB": {
"_info": {
"name": "活動每日AB圖",
"help": "由於3油低耗隊伍在B2.B3等地圖會需要空彈打王容易翻車\n故製作一個從每日AB分離的單獨模塊來處理地圖B2.B3"
},
"StageFilter": {
"name": "活動每日過濾器",
"help": "按活動過濾器順序出擊"
},
"LastStage": {
"name": "上一個完成的地圖",
"help": "自動更新的數值將跳過過濾器中已完成的地圖過0點重置"
}
},
"EventCd": {
"_info": {
"name": "活動每日CD圖",
@ -1001,6 +1023,20 @@
"help": "自動更新的數值將跳過過濾器中已完成的地圖過0點重置"
}
},
"EventD": {
"_info": {
"name": "活動每日D圖",
"help": "由於CD圖鎖船種的要求不同故製作一個從每日CD分離的單獨模塊來處理"
},
"StageFilter": {
"name": "活動每日過濾器",
"help": "按活動過濾器順序出擊"
},
"LastStage": {
"name": "上一個完成的地圖",
"help": "自動更新的數值將跳過過濾器中已完成的地圖過0點重置"
}
},
"Raid": {
"_info": {
"name": "共鬥活動設定",

View File

@ -0,0 +1,58 @@
import os
from module.config.config import TaskEnd
from module.config.utils import get_server_last_update
from module.event.base import STAGE_FILTER, EventBase, EventStage
from module.logger import logger
class CampaignB(EventBase):
def run(self, *args, **kwargs):
# Filter map files
stages = [EventStage(file) for file in os.listdir(f'./campaign/{self.config.Campaign_Event}')]
stages = self.convert_stages(stages)
logger.attr('Stage', [str(stage) for stage in stages])
logger.attr('StageFilter', self.config.EventB_StageFilter)
STAGE_FILTER.load(self.config.EventB_StageFilter)
self.convert_stages(STAGE_FILTER)
stages = [str(stage) for stage in STAGE_FILTER.apply(stages)]
logger.attr('Filter sort', ' > '.join(stages))
if not stages:
logger.warning('No stage satisfy current filter')
self.config.Scheduler_Enable = False
self.config.task_stop()
# Start from last stage
logger.info(f'LastStage {self.config.EventB_LastStage}, recorded at {self.config.Scheduler_NextRun}')
if get_server_last_update(self.config.Scheduler_ServerUpdate) >= self.config.Scheduler_NextRun:
logger.info('LastStage outdated, reset')
self.config.EventB_LastStage = 0
else:
last = str(self.config.EventB_LastStage).lower()
last = self.convert_stages(last)
if last in stages:
stages = stages[stages.index(last) + 1:]
logger.attr('Filter sort', ' > '.join(stages))
else:
logger.info('Start from the beginning')
# Run
for stage in stages:
stage = str(stage)
try:
super().run(name=stage, folder=self.config.Campaign_Event, total=1)
except TaskEnd:
# Catch task switch
pass
if self.run_count > 0:
with self.config.multi_set():
self.config.EventB_LastStage = stage
self.config.task_delay(minute=0)
else:
self.config.task_stop()
if self.config.task_switched():
self.config.task_stop()
# Scheduler
self.config.task_delay(server_update=True)

View File

@ -0,0 +1,58 @@
import os
from module.config.config import TaskEnd
from module.config.utils import get_server_last_update
from module.event.base import STAGE_FILTER, EventBase, EventStage
from module.logger import logger
class CampaignD(EventBase):
def run(self, *args, **kwargs):
# Filter map files
stages = [EventStage(file) for file in os.listdir(f'./campaign/{self.config.Campaign_Event}')]
stages = self.convert_stages(stages)
logger.attr('Stage', [str(stage) for stage in stages])
logger.attr('StageFilter', self.config.EventD_StageFilter)
STAGE_FILTER.load(self.config.EventD_StageFilter)
self.convert_stages(STAGE_FILTER)
stages = [str(stage) for stage in STAGE_FILTER.apply(stages)]
logger.attr('Filter sort', ' > '.join(stages))
if not stages:
logger.warning('No stage satisfy current filter')
self.config.Scheduler_Enable = False
self.config.task_stop()
# Start from last stage
logger.info(f'LastStage {self.config.EventD_LastStage}, recorded at {self.config.Scheduler_NextRun}')
if get_server_last_update(self.config.Scheduler_ServerUpdate) >= self.config.Scheduler_NextRun:
logger.info('LastStage outdated, reset')
self.config.EventD_LastStage = 0
else:
last = str(self.config.EventD_LastStage).lower()
last = self.convert_stages(last)
if last in stages:
stages = stages[stages.index(last) + 1:]
logger.attr('Filter sort', ' > '.join(stages))
else:
logger.info('Start from the beginning')
# Run
for stage in stages:
stage = str(stage)
try:
super().run(name=stage, folder=self.config.Campaign_Event, total=1)
except TaskEnd:
# Catch task switch
pass
if self.run_count > 0:
with self.config.multi_set():
self.config.EventD_LastStage = stage
self.config.task_delay(minute=0)
else:
self.config.task_stop()
if self.config.task_switched():
self.config.task_stop()
# Scheduler
self.config.task_delay(server_update=True)