From ce9841f22b075f32b9dfd0dfbec9a5415c01a896 Mon Sep 17 00:00:00 2001 From: POLAR me Date: Fri, 25 Apr 2025 04:22:42 +0800 Subject: [PATCH] =?UTF-8?q?Opt(eventForward)=EF=BC=9A=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E5=88=B7PT=E9=80=89=E9=A1=B9=E7=9A=84?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- campaign/event_20250424_cn/ht1.py | 4 +- campaign/event_20250424_cn/t1.py | 4 +- config/template.json | 72 ++++-- module/config/argument/args.json | 358 ++++++++++++++++++++++++--- module/config/argument/argument.yaml | 12 +- module/config/argument/override.yaml | 73 ++++-- module/config/config_generated.py | 4 +- module/config/config_updater.py | 21 +- module/config/i18n/en-US.json | 14 +- module/config/i18n/ja-JP.json | 14 +- module/config/i18n/zh-CN.json | 14 +- module/config/i18n/zh-TW.json | 14 +- module/handler/fast_forward.py | 25 +- 13 files changed, 538 insertions(+), 91 deletions(-) diff --git a/campaign/event_20250424_cn/ht1.py b/campaign/event_20250424_cn/ht1.py index 45d48a7f3..b56f4ca17 100644 --- a/campaign/event_20250424_cn/ht1.py +++ b/campaign/event_20250424_cn/ht1.py @@ -81,7 +81,9 @@ class Config: MAP_SWIPE_MULTIPLY = (1.124, 1.145) MAP_SWIPE_MULTIPLY_MINITOUCH = (1.087, 1.107) MAP_SWIPE_MULTIPLY_MAATOUCH = (1.055, 1.074) - + STAGE_INCREASE_CUSTOM = [ + 'h1 > h2 > h3 > ht1 > ht2 > ht3', + ] class Campaign(CampaignBase): MAP = MAP diff --git a/campaign/event_20250424_cn/t1.py b/campaign/event_20250424_cn/t1.py index 4bbfed362..c9413f6bd 100644 --- a/campaign/event_20250424_cn/t1.py +++ b/campaign/event_20250424_cn/t1.py @@ -80,7 +80,9 @@ class Config: MAP_SWIPE_MULTIPLY = (1.124, 1.145) MAP_SWIPE_MULTIPLY_MINITOUCH = (1.087, 1.107) MAP_SWIPE_MULTIPLY_MAATOUCH = (1.055, 1.074) - + STAGE_INCREASE_CUSTOM = [ + 'h1 > h2 > h3 > ht1 > ht2 > ht3', + ] class Campaign(CampaignBase): MAP = MAP diff --git a/config/template.json b/config/template.json index f62bd379f..e7cf11c75 100644 --- a/config/template.json +++ b/config/template.json @@ -184,7 +184,9 @@ "MapAchievement": "non_stop", "StageIncrease": false, "GetNewShip": false, - "EventSwitch": false, + "EventSwitch": "none", + "Event2MapName": "D3", + "EventAMapName": "A1", "ReachLevel": 0 }, "Fleet": { @@ -259,7 +261,9 @@ "MapAchievement": "non_stop", "StageIncrease": false, "GetNewShip": false, - "EventSwitch": false, + "EventSwitch": "none", + "Event2MapName": "D3", + "EventAMapName": "A1", "ReachLevel": 0 }, "Fleet": { @@ -334,7 +338,9 @@ "MapAchievement": "non_stop", "StageIncrease": false, "GetNewShip": false, - "EventSwitch": false, + "EventSwitch": "none", + "Event2MapName": "D3", + "EventAMapName": "A1", "ReachLevel": 0 }, "Fleet": { @@ -416,7 +422,9 @@ "MapAchievement": "non_stop", "StageIncrease": false, "GetNewShip": false, - "EventSwitch": false, + "EventSwitch": "none", + "Event2MapName": "D3", + "EventAMapName": "A1", "ReachLevel": 0 }, "Fleet": { @@ -473,7 +481,9 @@ "MapAchievement": "non_stop", "StageIncrease": false, "GetNewShip": false, - "EventSwitch": false, + "EventSwitch": "none", + "Event2MapName": "ht3", + "EventAMapName": null, "ReachLevel": 0 }, "Fleet": { @@ -548,7 +558,9 @@ "MapAchievement": "non_stop", "StageIncrease": false, "GetNewShip": false, - "EventSwitch": false, + "EventSwitch": "none", + "Event2MapName": "D3", + "EventAMapName": "A1", "ReachLevel": 0 }, "Fleet": { @@ -623,7 +635,9 @@ "MapAchievement": "non_stop", "StageIncrease": false, "GetNewShip": false, - "EventSwitch": false, + "EventSwitch": "none", + "Event2MapName": "D3", + "EventAMapName": "A1", "ReachLevel": 0 }, "Fleet": { @@ -702,7 +716,9 @@ "MapAchievement": "non_stop", "StageIncrease": false, "GetNewShip": false, - "EventSwitch": false, + "EventSwitch": "none", + "Event2MapName": "D3", + "EventAMapName": "A1", "ReachLevel": 0 }, "Emotion": { @@ -741,7 +757,9 @@ "MapAchievement": "non_stop", "StageIncrease": false, "GetNewShip": false, - "EventSwitch": false, + "EventSwitch": "none", + "Event2MapName": "D3", + "EventAMapName": "A1", "ReachLevel": 0 }, "Emotion": { @@ -791,7 +809,9 @@ "MapAchievement": "non_stop", "StageIncrease": false, "GetNewShip": false, - "EventSwitch": false, + "EventSwitch": "none", + "Event2MapName": "D3", + "EventAMapName": "A1>A2>A3\nB1>B2>B3", "ReachLevel": 0 }, "Emotion": { @@ -852,7 +872,9 @@ "MapAchievement": "non_stop", "StageIncrease": false, "GetNewShip": false, - "EventSwitch": false, + "EventSwitch": "none", + "Event2MapName": "D3", + "EventAMapName": "A1", "ReachLevel": 0 }, "Fleet": { @@ -932,7 +954,9 @@ "MapAchievement": "non_stop", "StageIncrease": false, "GetNewShip": false, - "EventSwitch": false, + "EventSwitch": "none", + "Event2MapName": "D3", + "EventAMapName": "A1", "ReachLevel": 0 }, "Fleet": { @@ -1012,7 +1036,9 @@ "MapAchievement": "non_stop", "StageIncrease": false, "GetNewShip": false, - "EventSwitch": false, + "EventSwitch": "none", + "Event2MapName": "D3", + "EventAMapName": "A1", "ReachLevel": 0 }, "Fleet": { @@ -1092,7 +1118,9 @@ "MapAchievement": "non_stop", "StageIncrease": false, "GetNewShip": false, - "EventSwitch": false, + "EventSwitch": "none", + "Event2MapName": "D3", + "EventAMapName": "A1", "ReachLevel": 0 }, "Fleet": { @@ -1172,7 +1200,9 @@ "MapAchievement": "non_stop", "StageIncrease": false, "GetNewShip": false, - "EventSwitch": false, + "EventSwitch": "none", + "Event2MapName": "D3", + "EventAMapName": "A1", "ReachLevel": 0 }, "Fleet": { @@ -1252,7 +1282,9 @@ "MapAchievement": "non_stop", "StageIncrease": false, "GetNewShip": false, - "EventSwitch": false, + "EventSwitch": "none", + "Event2MapName": "D3", + "EventAMapName": "A1", "ReachLevel": 0 }, "Fleet": { @@ -1330,7 +1362,9 @@ "MapAchievement": "non_stop", "StageIncrease": false, "GetNewShip": false, - "EventSwitch": false, + "EventSwitch": "none", + "Event2MapName": "D3", + "EventAMapName": "A1", "ReachLevel": 0 }, "Emotion": { @@ -1380,7 +1414,9 @@ "MapAchievement": "non_stop", "StageIncrease": false, "GetNewShip": false, - "EventSwitch": false, + "EventSwitch": "none", + "Event2MapName": "D3", + "EventAMapName": "A1", "ReachLevel": 0 }, "Emotion": { diff --git a/module/config/argument/args.json b/module/config/argument/args.json index bcd718a94..a9dd61923 100644 --- a/module/config/argument/args.json +++ b/module/config/argument/args.json @@ -784,8 +784,24 @@ "value": false }, "EventSwitch": { - "type": "checkbox", - "value": false, + "type": "select", + "value": "none", + "option": [ + "none", + "event2", + "event2_and_daily", + "event2_and_daily_fork" + ], + "display": "hide" + }, + "Event2MapName": { + "type": "textarea", + "value": "D3", + "display": "hide" + }, + "EventAMapName": { + "type": "textarea", + "value": "A1", "display": "hide" }, "ReachLevel": { @@ -1166,8 +1182,24 @@ "value": false }, "EventSwitch": { - "type": "checkbox", - "value": false, + "type": "select", + "value": "none", + "option": [ + "none", + "event2", + "event2_and_daily", + "event2_and_daily_fork" + ], + "display": "hide" + }, + "Event2MapName": { + "type": "textarea", + "value": "D3", + "display": "hide" + }, + "EventAMapName": { + "type": "textarea", + "value": "A1", "display": "hide" }, "ReachLevel": { @@ -1548,8 +1580,24 @@ "value": false }, "EventSwitch": { - "type": "checkbox", - "value": false, + "type": "select", + "value": "none", + "option": [ + "none", + "event2", + "event2_and_daily", + "event2_and_daily_fork" + ], + "display": "hide" + }, + "Event2MapName": { + "type": "textarea", + "value": "D3", + "display": "hide" + }, + "EventAMapName": { + "type": "textarea", + "value": "A1", "display": "hide" }, "ReachLevel": { @@ -2065,8 +2113,24 @@ "display": "hide" }, "EventSwitch": { - "type": "checkbox", - "value": false, + "type": "select", + "value": "none", + "option": [ + "none", + "event2", + "event2_and_daily", + "event2_and_daily_fork" + ], + "display": "hide" + }, + "Event2MapName": { + "type": "textarea", + "value": "D3", + "display": "hide" + }, + "EventAMapName": { + "type": "textarea", + "value": "A1", "display": "hide" }, "ReachLevel": { @@ -2407,8 +2471,24 @@ "value": false }, "EventSwitch": { - "type": "checkbox", - "value": false + "type": "select", + "value": "none", + "option": [ + "none", + "event2", + "event2_and_daily", + "event2_and_daily_fork" + ] + }, + "Event2MapName": { + "type": "state", + "value": "ht3", + "display": "display" + }, + "EventAMapName": { + "type": "state", + "value": null, + "display": "display" }, "ReachLevel": { "type": "input", @@ -2870,8 +2950,24 @@ "value": false }, "EventSwitch": { - "type": "checkbox", - "value": false, + "type": "select", + "value": "none", + "option": [ + "none", + "event2", + "event2_and_daily", + "event2_and_daily_fork" + ], + "display": "hide" + }, + "Event2MapName": { + "type": "textarea", + "value": "D3", + "display": "hide" + }, + "EventAMapName": { + "type": "textarea", + "value": "A1", "display": "hide" }, "ReachLevel": { @@ -3334,8 +3430,24 @@ "value": false }, "EventSwitch": { - "type": "checkbox", - "value": false, + "type": "select", + "value": "none", + "option": [ + "none", + "event2", + "event2_and_daily", + "event2_and_daily_fork" + ], + "display": "hide" + }, + "Event2MapName": { + "type": "textarea", + "value": "D3", + "display": "hide" + }, + "EventAMapName": { + "type": "textarea", + "value": "A1", "display": "hide" }, "ReachLevel": { @@ -3757,8 +3869,24 @@ "display": "hide" }, "EventSwitch": { - "type": "checkbox", - "value": false, + "type": "select", + "value": "none", + "option": [ + "none", + "event2", + "event2_and_daily", + "event2_and_daily_fork" + ], + "display": "hide" + }, + "Event2MapName": { + "type": "textarea", + "value": "D3", + "display": "hide" + }, + "EventAMapName": { + "type": "textarea", + "value": "A1", "display": "hide" }, "ReachLevel": { @@ -3936,8 +4064,24 @@ "display": "hide" }, "EventSwitch": { - "type": "checkbox", - "value": false, + "type": "select", + "value": "none", + "option": [ + "none", + "event2", + "event2_and_daily", + "event2_and_daily_fork" + ], + "display": "hide" + }, + "Event2MapName": { + "type": "textarea", + "value": "D3", + "display": "hide" + }, + "EventAMapName": { + "type": "textarea", + "value": "A1", "display": "hide" }, "ReachLevel": { @@ -4187,8 +4331,22 @@ "display": "hide" }, "EventSwitch": { - "type": "checkbox", - "value": false + "type": "select", + "value": "none", + "option": [ + "none", + "event2", + "event2_and_daily", + "event2_and_daily_fork" + ] + }, + "Event2MapName": { + "type": "textarea", + "value": "D3" + }, + "EventAMapName": { + "type": "textarea", + "value": "A1>A2>A3\nB1>B2>B3" }, "ReachLevel": { "type": "input", @@ -4489,8 +4647,24 @@ "value": false }, "EventSwitch": { - "type": "checkbox", - "value": false, + "type": "select", + "value": "none", + "option": [ + "none", + "event2", + "event2_and_daily", + "event2_and_daily_fork" + ], + "display": "hide" + }, + "Event2MapName": { + "type": "textarea", + "value": "D3", + "display": "hide" + }, + "EventAMapName": { + "type": "textarea", + "value": "A1", "display": "hide" }, "ReachLevel": { @@ -4973,8 +5147,24 @@ "display": "hide" }, "EventSwitch": { - "type": "checkbox", - "value": false, + "type": "select", + "value": "none", + "option": [ + "none", + "event2", + "event2_and_daily", + "event2_and_daily_fork" + ], + "display": "hide" + }, + "Event2MapName": { + "type": "textarea", + "value": "D3", + "display": "hide" + }, + "EventAMapName": { + "type": "textarea", + "value": "A1", "display": "hide" }, "ReachLevel": { @@ -5458,8 +5648,24 @@ "display": "hide" }, "EventSwitch": { - "type": "checkbox", - "value": false, + "type": "select", + "value": "none", + "option": [ + "none", + "event2", + "event2_and_daily", + "event2_and_daily_fork" + ], + "display": "hide" + }, + "Event2MapName": { + "type": "textarea", + "value": "D3", + "display": "hide" + }, + "EventAMapName": { + "type": "textarea", + "value": "A1", "display": "hide" }, "ReachLevel": { @@ -5943,8 +6149,24 @@ "display": "hide" }, "EventSwitch": { - "type": "checkbox", - "value": false, + "type": "select", + "value": "none", + "option": [ + "none", + "event2", + "event2_and_daily", + "event2_and_daily_fork" + ], + "display": "hide" + }, + "Event2MapName": { + "type": "textarea", + "value": "D3", + "display": "hide" + }, + "EventAMapName": { + "type": "textarea", + "value": "A1", "display": "hide" }, "ReachLevel": { @@ -6428,8 +6650,24 @@ "display": "hide" }, "EventSwitch": { - "type": "checkbox", - "value": false, + "type": "select", + "value": "none", + "option": [ + "none", + "event2", + "event2_and_daily", + "event2_and_daily_fork" + ], + "display": "hide" + }, + "Event2MapName": { + "type": "textarea", + "value": "D3", + "display": "hide" + }, + "EventAMapName": { + "type": "textarea", + "value": "A1", "display": "hide" }, "ReachLevel": { @@ -6913,8 +7151,24 @@ "display": "hide" }, "EventSwitch": { - "type": "checkbox", - "value": false, + "type": "select", + "value": "none", + "option": [ + "none", + "event2", + "event2_and_daily", + "event2_and_daily_fork" + ], + "display": "hide" + }, + "Event2MapName": { + "type": "textarea", + "value": "D3", + "display": "hide" + }, + "EventAMapName": { + "type": "textarea", + "value": "A1", "display": "hide" }, "ReachLevel": { @@ -7329,8 +7583,24 @@ "display": "hide" }, "EventSwitch": { - "type": "checkbox", - "value": false, + "type": "select", + "value": "none", + "option": [ + "none", + "event2", + "event2_and_daily", + "event2_and_daily_fork" + ], + "display": "hide" + }, + "Event2MapName": { + "type": "textarea", + "value": "D3", + "display": "hide" + }, + "EventAMapName": { + "type": "textarea", + "value": "A1", "display": "hide" }, "ReachLevel": { @@ -7580,8 +7850,24 @@ "display": "hide" }, "EventSwitch": { - "type": "checkbox", - "value": false, + "type": "select", + "value": "none", + "option": [ + "none", + "event2", + "event2_and_daily", + "event2_and_daily_fork" + ], + "display": "hide" + }, + "Event2MapName": { + "type": "textarea", + "value": "D3", + "display": "hide" + }, + "EventAMapName": { + "type": "textarea", + "value": "A1", "display": "hide" }, "ReachLevel": { diff --git a/module/config/argument/argument.yaml b/module/config/argument/argument.yaml index 6202e817d..e40ca91bf 100644 --- a/module/config/argument/argument.yaml +++ b/module/config/argument/argument.yaml @@ -235,7 +235,17 @@ StopCondition: option: [ non_stop, 100_percent_clear, map_3_stars, threat_safe, threat_safe_without_3_stars ] StageIncrease: false GetNewShip: false - EventSwitch: false + EventSwitch: + value: none + option: [ none, event2, event2_and_daily, event2_and_daily_fork] + Event2MapName: + value: D3 + type: textarea + EventAMapName: + value: |- + A1>A2>A3 + B1>B2>B3 + type: textarea ReachLevel: 0 Fleet: Fleet1: diff --git a/module/config/argument/override.yaml b/module/config/argument/override.yaml index 558789bd5..cb5e7478a 100644 --- a/module/config/argument/override.yaml +++ b/module/config/argument/override.yaml @@ -21,17 +21,23 @@ Main: Campaign: Event: campaign_main StopCondition: - EventSwitch: false + EventSwitch: none + Event2MapName: D3 + EventAMapName: A1 Main2: Campaign: Event: campaign_main StopCondition: - EventSwitch: false + EventSwitch: none + Event2MapName: D3 + EventAMapName: A1 Main3: Campaign: Event: campaign_main StopCondition: - EventSwitch: false + EventSwitch: none + Event2MapName: D3 + EventAMapName: A1 GemsFarming: Campaign: Event: @@ -47,7 +53,9 @@ GemsFarming: StageIncrease: false GetNewShip: false ReachLevel: 0 - EventSwitch: false + EventSwitch: none + Event2MapName: D3 + EventAMapName: A1 Fleet: FleetOrder: display: display @@ -62,6 +70,15 @@ Event: Event: type: state AmbushEvade: true + StopCondition: + Event2MapName: + value: ht3 + type: state + display: display + EventAMapName: + value: null + type: state + display: display Event2: Campaign: Mode: normal @@ -69,7 +86,9 @@ Event2: type: state AmbushEvade: true StopCondition: - EventSwitch: false + EventSwitch: none + Event2MapName: D3 + EventAMapName: A1 Event3: Campaign: Mode: normal @@ -77,7 +96,9 @@ Event3: type: state AmbushEvade: true StopCondition: - EventSwitch: false + EventSwitch: none + Event2MapName: D3 + EventAMapName: A1 EventA: Scheduler: SuccessInterval: 30 @@ -96,7 +117,9 @@ EventA: StageIncrease: false GetNewShip: false ReachLevel: 0 - EventSwitch: false + EventSwitch: none + Event2MapName: D3 + EventAMapName: A1 EventB: Scheduler: SuccessInterval: 30 @@ -115,7 +138,9 @@ EventB: StageIncrease: false GetNewShip: false ReachLevel: 0 - EventSwitch: false + EventSwitch: none + Event2MapName: D3 + EventAMapName: A1 EventC: Scheduler: SuccessInterval: 30 @@ -134,7 +159,9 @@ EventC: StageIncrease: false GetNewShip: false ReachLevel: 0 - EventSwitch: false + EventSwitch: none + Event2MapName: D3 + EventAMapName: A1 EventD: Scheduler: SuccessInterval: 30 @@ -153,7 +180,9 @@ EventD: StageIncrease: false GetNewShip: false ReachLevel: 0 - EventSwitch: false + EventSwitch: none + Event2MapName: D3 + EventAMapName: A1 EventSp: Scheduler: SuccessInterval: 30 @@ -172,7 +201,9 @@ EventSp: StageIncrease: false GetNewShip: false ReachLevel: 0 - EventSwitch: false + EventSwitch: none + Event2MapName: D3 + EventAMapName: A1 Submarine: AutoSearchMode: sub_standby Raid: @@ -191,7 +222,9 @@ Raid: StageIncrease: false GetNewShip: false ReachLevel: 0 - EventSwitch: false + EventSwitch: none + Event2MapName: D3 + EventAMapName: A1 Emotion: Fleet2Value: 119 Fleet2Record: 2020-01-01 00:00:00 @@ -205,7 +238,9 @@ Hospital: StageIncrease: false GetNewShip: false ReachLevel: 0 - EventSwitch: false + EventSwitch: none + Event2MapName: D3 + EventAMapName: A1 Emotion: Fleet1Control: prevent_yellow_face Fleet1Recover: not_in_dormitory @@ -236,7 +271,9 @@ RaidDaily: StageIncrease: false GetNewShip: false ReachLevel: 0 - EventSwitch: false + EventSwitch: none + Event2MapName: D3 + EventAMapName: A1 Emotion: Fleet2Value: 119 Fleet2Record: 2020-01-01 00:00:00 @@ -299,7 +336,9 @@ CoalitionSp: StageIncrease: false GetNewShip: false ReachLevel: 0 - EventSwitch: false + EventSwitch: none + Event2MapName: D3 + EventAMapName: A1 Emotion: Fleet2Value: 119 Fleet2Record: 2020-01-01 00:00:00 @@ -416,7 +455,9 @@ WarArchives: Mode: normal AmbushEvade: true StopCondition: - EventSwitch: false + EventSwitch: none + Event2MapName: D3 + EventAMapName: A1 # ==================== Opsi ==================== diff --git a/module/config/config_generated.py b/module/config/config_generated.py index 8edce2372..15d72ef34 100644 --- a/module/config/config_generated.py +++ b/module/config/config_generated.py @@ -160,7 +160,9 @@ class GeneratedConfig: StopCondition_MapAchievement = 'non_stop' # non_stop, 100_percent_clear, map_3_stars, threat_safe, threat_safe_without_3_stars StopCondition_StageIncrease = False StopCondition_GetNewShip = False - StopCondition_EventSwitch = False + StopCondition_EventSwitch = 'none' # none, event2, event2_and_daily, event2_and_daily_fork + StopCondition_Event2MapName = 'D3' + StopCondition_EventAMapName = 'A1>A2>A3\nB1>B2>B3' StopCondition_ReachLevel = 0 # Group `Fleet` diff --git a/module/config/config_updater.py b/module/config/config_updater.py index 0ed09e070..f6b9a4ea4 100644 --- a/module/config/config_updater.py +++ b/module/config/config_updater.py @@ -174,12 +174,25 @@ class ConfigGenerator: """ # Construct args data = {} + # Add dashboard to args - dashboard_and_task = {**self.dashboard,**self.task} - for path, groups in deep_iter(dashboard_and_task, depth=3): - if 'tasks' not in path and 'Dashboard' not in path: + for dashboard_key, dashboard_groups in self.dashboard.items(): + if isinstance(dashboard_groups, list): + task = dashboard_key + # Add storage to dashboard task + if 'Storage' not in dashboard_groups: + dashboard_groups.append('Storage') + for group in dashboard_groups: + if group not in self.argument: + print(f'`{task}.{group}` is not related to any argument group') + continue + deep_set(data, keys=[task, group], value=deepcopy(self.argument[group])) + + # Add task to args + for path, groups in deep_iter(self.task, depth=3): + if 'tasks' not in path: continue - task = path[2] if 'tasks' in path else path[0] + task = path[2] # Add storage to all task groups.append('Storage') for group in groups: diff --git a/module/config/i18n/en-US.json b/module/config/i18n/en-US.json index 09b9e2ead..eb1c4f546 100644 --- a/module/config/i18n/en-US.json +++ b/module/config/i18n/en-US.json @@ -1136,7 +1136,19 @@ }, "EventSwitch": { "name": "StopCondition.EventSwitch.name", - "help": "StopCondition.EventSwitch.help" + "help": "StopCondition.EventSwitch.help", + "none": "none", + "event2": "event2", + "event2_and_daily": "event2_and_daily", + "event2_and_daily_fork": "event2_and_daily_fork" + }, + "Event2MapName": { + "name": "StopCondition.Event2MapName.name", + "help": "StopCondition.Event2MapName.help" + }, + "EventAMapName": { + "name": "StopCondition.EventAMapName.name", + "help": "StopCondition.EventAMapName.help" }, "ReachLevel": { "name": "Level X Reached", diff --git a/module/config/i18n/ja-JP.json b/module/config/i18n/ja-JP.json index 3be65fc52..4db9a2880 100644 --- a/module/config/i18n/ja-JP.json +++ b/module/config/i18n/ja-JP.json @@ -1136,7 +1136,19 @@ }, "EventSwitch": { "name": "StopCondition.EventSwitch.name", - "help": "StopCondition.EventSwitch.help" + "help": "StopCondition.EventSwitch.help", + "none": "none", + "event2": "event2", + "event2_and_daily": "event2_and_daily", + "event2_and_daily_fork": "event2_and_daily_fork" + }, + "Event2MapName": { + "name": "StopCondition.Event2MapName.name", + "help": "StopCondition.Event2MapName.help" + }, + "EventAMapName": { + "name": "StopCondition.EventAMapName.name", + "help": "StopCondition.EventAMapName.help" }, "ReachLevel": { "name": "StopCondition.ReachLevel.name", diff --git a/module/config/i18n/zh-CN.json b/module/config/i18n/zh-CN.json index 6c77add87..29b492333 100644 --- a/module/config/i18n/zh-CN.json +++ b/module/config/i18n/zh-CN.json @@ -1136,7 +1136,19 @@ }, "EventSwitch": { "name": "刷活动PT", - "help": "开荒完毕后开启活动图每日和活动图2刷pt" + "help": "开荒完毕后开启活动图每日和活动图2刷pt", + "none": "否", + "event2": "活动图2", + "event2_and_daily": "活动图2和活动每日", + "event2_and_daily_fork": "活动图2和活动每日(复刻)" + }, + "Event2MapName": { + "name": "刷pt关卡名称", + "help": "" + }, + "EventAMapName": { + "name": "每日活动图关卡顺序", + "help": "" }, "ReachLevel": { "name": "舰船升至 X 级后停止", diff --git a/module/config/i18n/zh-TW.json b/module/config/i18n/zh-TW.json index 84e6590ee..6fd7917da 100644 --- a/module/config/i18n/zh-TW.json +++ b/module/config/i18n/zh-TW.json @@ -1136,7 +1136,19 @@ }, "EventSwitch": { "name": "StopCondition.EventSwitch.name", - "help": "StopCondition.EventSwitch.help" + "help": "StopCondition.EventSwitch.help", + "none": "none", + "event2": "event2", + "event2_and_daily": "event2_and_daily", + "event2_and_daily_fork": "event2_and_daily_fork" + }, + "Event2MapName": { + "name": "StopCondition.Event2MapName.name", + "help": "StopCondition.Event2MapName.help" + }, + "EventAMapName": { + "name": "StopCondition.EventAMapName.name", + "help": "StopCondition.EventAMapName.help" }, "ReachLevel": { "name": "艦船升至 X 級後停止", diff --git a/module/handler/fast_forward.py b/module/handler/fast_forward.py index 0e5d36d72..404746787 100644 --- a/module/handler/fast_forward.py +++ b/module/handler/fast_forward.py @@ -418,7 +418,7 @@ class FastForwardHandler(AutoSearchHandler): ) self.config.Scheduler_Enable = False # logger.warning(f'{self.config.StopCondition_EventSwitch}') - if self.config.task.command == 'Event'and self.config.StopCondition_EventSwitch == True: + if self.config.task.command == 'Event'and self.config.StopCondition_EventSwitch != 'none': # logger.warning(f'{self.config.task.command}') KEYS = ['.Fleet.Fleet1','.Fleet.Fleet2','.Fleet.FleetOrder','.Emotion.Fleet1Record','.Emotion.Fleet1Recover','.Emotion.Fleet2Record','.Emotion.Fleet2Recover',] for key in KEYS:#只传舰队和心情恢复情况,不传心情值 @@ -435,17 +435,24 @@ class FastForwardHandler(AutoSearchHandler): self.config.cross_set(keys=f'EventD{key}', value=f'{data}') self.config.cross_set(keys=f'Event2{key}', value=f'{data}') logger.hr(f"copy:{key},{data}") - eventDailyStageFilter_A = "A1>A2>A3 >B1>B2>B3" - event2MapName = "D3" + eventDailyStageFilter_A = self.config.StopCondition_EventAMapName + event2MapName = self.config.StopCondition_Event2MapName self.config.cross_set(keys=f'EventA.EventDaily.StageFilter', value=f'{eventDailyStageFilter_A}') #ab图一般用同一队,所以为了心情同步用同一队 self.config.cross_set(keys=f'Event2.Campaign.Name',value = f'{event2MapName}') self.config.cross_set(keys=f'EventSp.EventDaily.StageFilter',value = f'SP') - self.config.task_call('EventA') - # self.config.task_call('EventB') - self.config.task_call('EventC') #######复刻活动开/新活动关 - self.config.task_call('EventD') #######复刻活动开/新活动关 - self.config.task_call('EventSp') - self.config.task_call('Event2') + if self.config.StopCondition_EventSwitch == 'event2': + self.config.task_call('Event2') + elif self.config.StopCondition_EventSwitch == 'event2_and_daily': + self.config.task_call('Event2') + self.config.task_call('EventA') + self.config.task_call('EventSp') + elif self.config.StopCondition_EventSwitch == 'event2_and_daily_fork': + self.config.task_call('Event2') + self.config.task_call('EventA') + self.config.task_call('EventC') + self.config.task_call('EventD') + self.config.task_call('EventSp') + # logger.info(f"{self.config.Fleet_FleetOrder},{self.config.Emotion_Fleet1Value},{self.config.Emotion_Fleet1Recover}")