feat: 新增活动图相关配置项和短猫设置

- 在 StopCondition 中添加 EventSwitch 配置项,用于控制是否在活动图开荒完成后刷PT
- 在 EventDaily 中添加 SyncEmotion 配置项,用于同步心情到活动图2
- 在 OpsiMeowfficerFarming 中添加 IgnoreStory 配置项,用于忽略剧情主线未完成的情况
This commit is contained in:
POLAR me 2025-01-23 02:21:13 +08:00
parent b9ceddbca1
commit af99cc97e1
13 changed files with 231 additions and 11 deletions

View File

@ -175,6 +175,7 @@
"MapAchievement": "non_stop", "MapAchievement": "non_stop",
"StageIncrease": false, "StageIncrease": false,
"GetNewShip": false, "GetNewShip": false,
"EventSwitch": false,
"ReachLevel": 0 "ReachLevel": 0
}, },
"Fleet": { "Fleet": {
@ -249,6 +250,7 @@
"MapAchievement": "non_stop", "MapAchievement": "non_stop",
"StageIncrease": false, "StageIncrease": false,
"GetNewShip": false, "GetNewShip": false,
"EventSwitch": false,
"ReachLevel": 0 "ReachLevel": 0
}, },
"Fleet": { "Fleet": {
@ -323,6 +325,7 @@
"MapAchievement": "non_stop", "MapAchievement": "non_stop",
"StageIncrease": false, "StageIncrease": false,
"GetNewShip": false, "GetNewShip": false,
"EventSwitch": false,
"ReachLevel": 0 "ReachLevel": 0
}, },
"Fleet": { "Fleet": {
@ -404,6 +407,7 @@
"MapAchievement": "non_stop", "MapAchievement": "non_stop",
"StageIncrease": false, "StageIncrease": false,
"GetNewShip": false, "GetNewShip": false,
"EventSwitch": false,
"ReachLevel": 0 "ReachLevel": 0
}, },
"Fleet": { "Fleet": {
@ -460,6 +464,7 @@
"MapAchievement": "non_stop", "MapAchievement": "non_stop",
"StageIncrease": false, "StageIncrease": false,
"GetNewShip": false, "GetNewShip": false,
"EventSwitch": false,
"ReachLevel": 0 "ReachLevel": 0
}, },
"Fleet": { "Fleet": {
@ -534,6 +539,7 @@
"MapAchievement": "non_stop", "MapAchievement": "non_stop",
"StageIncrease": false, "StageIncrease": false,
"GetNewShip": false, "GetNewShip": false,
"EventSwitch": false,
"ReachLevel": 0 "ReachLevel": 0
}, },
"Fleet": { "Fleet": {
@ -608,6 +614,7 @@
"MapAchievement": "non_stop", "MapAchievement": "non_stop",
"StageIncrease": false, "StageIncrease": false,
"GetNewShip": false, "GetNewShip": false,
"EventSwitch": false,
"ReachLevel": 0 "ReachLevel": 0
}, },
"Fleet": { "Fleet": {
@ -686,6 +693,7 @@
"MapAchievement": "non_stop", "MapAchievement": "non_stop",
"StageIncrease": false, "StageIncrease": false,
"GetNewShip": false, "GetNewShip": false,
"EventSwitch": false,
"ReachLevel": 0 "ReachLevel": 0
}, },
"Emotion": { "Emotion": {
@ -734,6 +742,7 @@
"MapAchievement": "non_stop", "MapAchievement": "non_stop",
"StageIncrease": false, "StageIncrease": false,
"GetNewShip": false, "GetNewShip": false,
"EventSwitch": false,
"ReachLevel": 0 "ReachLevel": 0
}, },
"Emotion": { "Emotion": {
@ -794,6 +803,7 @@
"MapAchievement": "non_stop", "MapAchievement": "non_stop",
"StageIncrease": false, "StageIncrease": false,
"GetNewShip": false, "GetNewShip": false,
"EventSwitch": false,
"ReachLevel": 0 "ReachLevel": 0
}, },
"Fleet": { "Fleet": {
@ -854,7 +864,8 @@
}, },
"EventDaily": { "EventDaily": {
"StageFilter": "A1 > A2 > A3", "StageFilter": "A1 > A2 > A3",
"LastStage": 0 "LastStage": 0,
"SyncEmotion": false
}, },
"Campaign": { "Campaign": {
"Name": "dynamic", "Name": "dynamic",
@ -872,6 +883,7 @@
"MapAchievement": "non_stop", "MapAchievement": "non_stop",
"StageIncrease": false, "StageIncrease": false,
"GetNewShip": false, "GetNewShip": false,
"EventSwitch": false,
"ReachLevel": 0 "ReachLevel": 0
}, },
"Fleet": { "Fleet": {
@ -932,7 +944,8 @@
}, },
"EventDaily": { "EventDaily": {
"StageFilter": "B1 > B2 > B3", "StageFilter": "B1 > B2 > B3",
"LastStage": 0 "LastStage": 0,
"SyncEmotion": false
}, },
"Campaign": { "Campaign": {
"Name": "dynamic", "Name": "dynamic",
@ -950,6 +963,7 @@
"MapAchievement": "non_stop", "MapAchievement": "non_stop",
"StageIncrease": false, "StageIncrease": false,
"GetNewShip": false, "GetNewShip": false,
"EventSwitch": false,
"ReachLevel": 0 "ReachLevel": 0
}, },
"Fleet": { "Fleet": {
@ -1010,7 +1024,8 @@
}, },
"EventDaily": { "EventDaily": {
"StageFilter": "C1 > C2 > C3", "StageFilter": "C1 > C2 > C3",
"LastStage": 0 "LastStage": 0,
"SyncEmotion": false
}, },
"Campaign": { "Campaign": {
"Name": "dynamic", "Name": "dynamic",
@ -1028,6 +1043,7 @@
"MapAchievement": "non_stop", "MapAchievement": "non_stop",
"StageIncrease": false, "StageIncrease": false,
"GetNewShip": false, "GetNewShip": false,
"EventSwitch": false,
"ReachLevel": 0 "ReachLevel": 0
}, },
"Fleet": { "Fleet": {
@ -1088,7 +1104,8 @@
}, },
"EventDaily": { "EventDaily": {
"StageFilter": "D1 > D2 > D3", "StageFilter": "D1 > D2 > D3",
"LastStage": 0 "LastStage": 0,
"SyncEmotion": false
}, },
"Campaign": { "Campaign": {
"Name": "dynamic", "Name": "dynamic",
@ -1106,6 +1123,7 @@
"MapAchievement": "non_stop", "MapAchievement": "non_stop",
"StageIncrease": false, "StageIncrease": false,
"GetNewShip": false, "GetNewShip": false,
"EventSwitch": false,
"ReachLevel": 0 "ReachLevel": 0
}, },
"Fleet": { "Fleet": {
@ -1166,7 +1184,8 @@
}, },
"EventDaily": { "EventDaily": {
"StageFilter": "SP", "StageFilter": "SP",
"LastStage": 0 "LastStage": 0,
"SyncEmotion": false
}, },
"Campaign": { "Campaign": {
"Name": "dynamic", "Name": "dynamic",
@ -1184,6 +1203,7 @@
"MapAchievement": "non_stop", "MapAchievement": "non_stop",
"StageIncrease": false, "StageIncrease": false,
"GetNewShip": false, "GetNewShip": false,
"EventSwitch": false,
"ReachLevel": 0 "ReachLevel": 0
}, },
"Fleet": { "Fleet": {
@ -1261,6 +1281,7 @@
"MapAchievement": "non_stop", "MapAchievement": "non_stop",
"StageIncrease": false, "StageIncrease": false,
"GetNewShip": false, "GetNewShip": false,
"EventSwitch": false,
"ReachLevel": 0 "ReachLevel": 0
}, },
"Emotion": { "Emotion": {
@ -1309,6 +1330,7 @@
"MapAchievement": "non_stop", "MapAchievement": "non_stop",
"StageIncrease": false, "StageIncrease": false,
"GetNewShip": false, "GetNewShip": false,
"EventSwitch": false,
"ReachLevel": 0 "ReachLevel": 0
}, },
"Emotion": { "Emotion": {
@ -1975,7 +1997,8 @@
"OpsiMeowfficerFarming": { "OpsiMeowfficerFarming": {
"ActionPointPreserve": 1000, "ActionPointPreserve": 1000,
"HazardLevel": 5, "HazardLevel": 5,
"TargetZone": 0 "TargetZone": 0,
"IgnoreStory": false
}, },
"OpsiFleet": { "OpsiFleet": {
"Fleet": 1, "Fleet": 1,

View File

@ -331,6 +331,14 @@ class CampaignRun(CampaignEvent, ShopStatus):
self.config.task_call('Commission', force_call=True) self.config.task_call('Commission', force_call=True)
self.config.task_stop('Commission notice found') self.config.task_stop('Commission notice found')
def sync_emotion(self):
KEYS = ['.Emotion.Fleet1Value','.Emotion.Fleet1Record','.Emotion.Fleet1Recover','.Emotion.Fleet2Value','.Emotion.Fleet2Record','.Emotion.Fleet2Recover']
DATA =[self.config.Emotion_Fleet1Value,self.config.Emotion_Fleet1Record,self.config.Emotion_Fleet1Recover,self.config.Emotion_Fleet2Value,self.config.Emotion_Fleet2Record,self.config.Emotion_Fleet2Recover]
for i, key in enumerate(KEYS):
data = DATA[i]
self.config.cross_set(keys=f'Event2{key}', value=f'{data}')
logger.hr('detect emotion delay,sync emotion to event2')
def detect_low_emotion(self,name): def detect_low_emotion(self,name):
EMOTION_TIP_L1=Button(area=(352, 311, 929, 348), color=(), button=(352, 311, 929, 348)) EMOTION_TIP_L1=Button(area=(352, 311, 929, 348), color=(), button=(352, 311, 929, 348))
EMOTION_TIP_L2=Button(area=(352, 350, 929, 387), color=(), button=(352, 350, 929, 387)) EMOTION_TIP_L2=Button(area=(352, 350, 929, 387), color=(), button=(352, 350, 929, 387))
@ -377,7 +385,7 @@ class CampaignRun(CampaignEvent, ShopStatus):
logger.warning("Game stuck, but not emotion error") logger.warning("Game stuck, but not emotion error")
raise GameStuckError(f'Wait too long but not emotion error') raise GameStuckError(f'Wait too long but not emotion error')
def run(self, name, folder='campaign_main', mode='normal', total=0): def run(self, name, folder='campaign_main', mode='normal', total=0,from_eventDaily=False):
""" """
Args: Args:
name (str): Name of .py file. name (str): Name of .py file.
@ -399,6 +407,7 @@ class CampaignRun(CampaignEvent, ShopStatus):
# Log # Log
logger.hr(name, level=1) logger.hr(name, level=1)
self.campaign.handle_map_stop()
if self.config.StopCondition_RunCount > 0: if self.config.StopCondition_RunCount > 0:
logger.info(f'Count remain: {self.config.StopCondition_RunCount}') logger.info(f'Count remain: {self.config.StopCondition_RunCount}')
else: else:
@ -454,6 +463,9 @@ class CampaignRun(CampaignEvent, ShopStatus):
except ScriptEnd as e: except ScriptEnd as e:
logger.hr('Script end') logger.hr('Script end')
logger.info(str(e)) logger.info(str(e))
if from_eventDaily == True:
if str(e) == 'Emotion control':
self.sync_emotion()
break break
except GameStuckError as e: except GameStuckError as e:
if self.detect_low_emotion(name): if self.detect_low_emotion(name):

View File

@ -741,6 +741,10 @@
"type": "checkbox", "type": "checkbox",
"value": false "value": false
}, },
"EventSwitch": {
"type": "checkbox",
"value": false
},
"ReachLevel": { "ReachLevel": {
"type": "input", "type": "input",
"value": 0 "value": 0
@ -1118,6 +1122,10 @@
"type": "checkbox", "type": "checkbox",
"value": false "value": false
}, },
"EventSwitch": {
"type": "checkbox",
"value": false
},
"ReachLevel": { "ReachLevel": {
"type": "input", "type": "input",
"value": 0 "value": 0
@ -1495,6 +1503,10 @@
"type": "checkbox", "type": "checkbox",
"value": false "value": false
}, },
"EventSwitch": {
"type": "checkbox",
"value": false
},
"ReachLevel": { "ReachLevel": {
"type": "input", "type": "input",
"value": 0 "value": 0
@ -2005,6 +2017,10 @@
"value": false, "value": false,
"display": "hide" "display": "hide"
}, },
"EventSwitch": {
"type": "checkbox",
"value": false
},
"ReachLevel": { "ReachLevel": {
"type": "input", "type": "input",
"value": 0, "value": 0,
@ -2340,6 +2356,10 @@
"type": "checkbox", "type": "checkbox",
"value": false "value": false
}, },
"EventSwitch": {
"type": "checkbox",
"value": false
},
"ReachLevel": { "ReachLevel": {
"type": "input", "type": "input",
"value": 0 "value": 0
@ -2797,6 +2817,10 @@
"type": "checkbox", "type": "checkbox",
"value": false "value": false
}, },
"EventSwitch": {
"type": "checkbox",
"value": false
},
"ReachLevel": { "ReachLevel": {
"type": "input", "type": "input",
"value": 0 "value": 0
@ -3254,6 +3278,10 @@
"type": "checkbox", "type": "checkbox",
"value": false "value": false
}, },
"EventSwitch": {
"type": "checkbox",
"value": false
},
"ReachLevel": { "ReachLevel": {
"type": "input", "type": "input",
"value": 0 "value": 0
@ -3673,6 +3701,10 @@
"value": false, "value": false,
"display": "hide" "display": "hide"
}, },
"EventSwitch": {
"type": "checkbox",
"value": false
},
"ReachLevel": { "ReachLevel": {
"type": "input", "type": "input",
"value": 0, "value": 0,
@ -3912,6 +3944,10 @@
"value": false, "value": false,
"display": "hide" "display": "hide"
}, },
"EventSwitch": {
"type": "checkbox",
"value": false
},
"ReachLevel": { "ReachLevel": {
"type": "input", "type": "input",
"value": 0, "value": 0,
@ -4208,6 +4244,10 @@
"type": "checkbox", "type": "checkbox",
"value": false "value": false
}, },
"EventSwitch": {
"type": "checkbox",
"value": false
},
"ReachLevel": { "ReachLevel": {
"type": "input", "type": "input",
"value": 0 "value": 0
@ -4523,6 +4563,10 @@
"LastStage": { "LastStage": {
"type": "input", "type": "input",
"value": 0 "value": 0
},
"SyncEmotion": {
"type": "checkbox",
"value": false
} }
}, },
"Campaign": { "Campaign": {
@ -4681,6 +4725,10 @@
"value": false, "value": false,
"display": "hide" "display": "hide"
}, },
"EventSwitch": {
"type": "checkbox",
"value": false
},
"ReachLevel": { "ReachLevel": {
"type": "input", "type": "input",
"value": 0, "value": 0,
@ -4997,6 +5045,10 @@
"LastStage": { "LastStage": {
"type": "input", "type": "input",
"value": 0 "value": 0
},
"SyncEmotion": {
"type": "checkbox",
"value": false
} }
}, },
"Campaign": { "Campaign": {
@ -5155,6 +5207,10 @@
"value": false, "value": false,
"display": "hide" "display": "hide"
}, },
"EventSwitch": {
"type": "checkbox",
"value": false
},
"ReachLevel": { "ReachLevel": {
"type": "input", "type": "input",
"value": 0, "value": 0,
@ -5471,6 +5527,10 @@
"LastStage": { "LastStage": {
"type": "input", "type": "input",
"value": 0 "value": 0
},
"SyncEmotion": {
"type": "checkbox",
"value": false
} }
}, },
"Campaign": { "Campaign": {
@ -5629,6 +5689,10 @@
"value": false, "value": false,
"display": "hide" "display": "hide"
}, },
"EventSwitch": {
"type": "checkbox",
"value": false
},
"ReachLevel": { "ReachLevel": {
"type": "input", "type": "input",
"value": 0, "value": 0,
@ -5945,6 +6009,10 @@
"LastStage": { "LastStage": {
"type": "input", "type": "input",
"value": 0 "value": 0
},
"SyncEmotion": {
"type": "checkbox",
"value": false
} }
}, },
"Campaign": { "Campaign": {
@ -6103,6 +6171,10 @@
"value": false, "value": false,
"display": "hide" "display": "hide"
}, },
"EventSwitch": {
"type": "checkbox",
"value": false
},
"ReachLevel": { "ReachLevel": {
"type": "input", "type": "input",
"value": 0, "value": 0,
@ -6419,6 +6491,10 @@
"LastStage": { "LastStage": {
"type": "input", "type": "input",
"value": 0 "value": 0
},
"SyncEmotion": {
"type": "checkbox",
"value": false
} }
}, },
"Campaign": { "Campaign": {
@ -6577,6 +6653,10 @@
"value": false, "value": false,
"display": "hide" "display": "hide"
}, },
"EventSwitch": {
"type": "checkbox",
"value": false
},
"ReachLevel": { "ReachLevel": {
"type": "input", "type": "input",
"value": 0, "value": 0,
@ -6989,6 +7069,10 @@
"value": false, "value": false,
"display": "hide" "display": "hide"
}, },
"EventSwitch": {
"type": "checkbox",
"value": false
},
"ReachLevel": { "ReachLevel": {
"type": "input", "type": "input",
"value": 0, "value": 0,
@ -7229,6 +7313,10 @@
"value": false, "value": false,
"display": "hide" "display": "hide"
}, },
"EventSwitch": {
"type": "checkbox",
"value": false
},
"ReachLevel": { "ReachLevel": {
"type": "input", "type": "input",
"value": 0, "value": 0,
@ -9829,6 +9917,10 @@
"TargetZone": { "TargetZone": {
"type": "input", "type": "input",
"value": 0 "value": 0
},
"IgnoreStory": {
"type": "checkbox",
"value": false
} }
}, },
"OpsiFleet": { "OpsiFleet": {

View File

@ -218,6 +218,7 @@ StopCondition:
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 ]
StageIncrease: false StageIncrease: false
GetNewShip: false GetNewShip: false
EventSwitch: false
ReachLevel: 0 ReachLevel: 0
Fleet: Fleet:
Fleet1: Fleet1:
@ -347,6 +348,7 @@ EventDaily:
StageFilter: |- StageFilter: |-
A1 > A2 > A3 A1 > A2 > A3
LastStage: 0 LastStage: 0
SyncEmotion: False
Raid: Raid:
Mode: Mode:
value: hard value: hard
@ -773,6 +775,7 @@ OpsiMeowfficerFarming:
option: [ 3, 4, 5, 6, 10 ] option: [ 3, 4, 5, 6, 10 ]
TargetZone: TargetZone:
value: 0 value: 0
IgnoreStory: false
OpsiHazard1Leveling: OpsiHazard1Leveling:
TargetZone: TargetZone:
value: 0 value: 0

View File

@ -151,6 +151,7 @@ class GeneratedConfig:
StopCondition_MapAchievement = 'non_stop' # non_stop, 100_percent_clear, map_3_stars, threat_safe, threat_safe_without_3_stars StopCondition_MapAchievement = 'non_stop' # non_stop, 100_percent_clear, map_3_stars, threat_safe, threat_safe_without_3_stars
StopCondition_StageIncrease = False StopCondition_StageIncrease = False
StopCondition_GetNewShip = False StopCondition_GetNewShip = False
StopCondition_EventSwitch = False
StopCondition_ReachLevel = 0 StopCondition_ReachLevel = 0
# Group `Fleet` # Group `Fleet`
@ -229,6 +230,7 @@ class GeneratedConfig:
# Group `EventDaily` # Group `EventDaily`
EventDaily_StageFilter = 'A1 > A2 > A3' EventDaily_StageFilter = 'A1 > A2 > A3'
EventDaily_LastStage = 0 EventDaily_LastStage = 0
EventDaily_SyncEmotion = False
# Group `Raid` # Group `Raid`
Raid_Mode = 'hard' # easy, normal, hard, ex Raid_Mode = 'hard' # easy, normal, hard, ex
@ -489,6 +491,7 @@ class GeneratedConfig:
OpsiMeowfficerFarming_ActionPointPreserve = 1000 OpsiMeowfficerFarming_ActionPointPreserve = 1000
OpsiMeowfficerFarming_HazardLevel = 5 # 3, 4, 5, 6, 10 OpsiMeowfficerFarming_HazardLevel = 5 # 3, 4, 5, 6, 10
OpsiMeowfficerFarming_TargetZone = 0 OpsiMeowfficerFarming_TargetZone = 0
OpsiMeowfficerFarming_IgnoreStory = False
# Group `OpsiHazard1Leveling` # Group `OpsiHazard1Leveling`
OpsiHazard1Leveling_TargetZone = 0 # 0, 44, 22 OpsiHazard1Leveling_TargetZone = 0 # 0, 44, 22

View File

@ -1079,6 +1079,10 @@
"name": "New Ship Get", "name": "New Ship Get",
"help": "Stop current task if detected new ship has been acquired" "help": "Stop current task if detected new ship has been acquired"
}, },
"EventSwitch": {
"name": "StopCondition.EventSwitch.name",
"help": "StopCondition.EventSwitch.help"
},
"ReachLevel": { "ReachLevel": {
"name": "Level X Reached", "name": "Level X Reached",
"help": "Stop current task if any ship under level X has reached level X; saving as 0 implies no limit to the level." "help": "Stop current task if any ship under level X has reached level X; saving as 0 implies no limit to the level."
@ -1469,6 +1473,10 @@
"LastStage": { "LastStage": {
"name": "Last Event Daily Stage", "name": "Last Event Daily Stage",
"help": "Automatically updated, skips completed levels in the filter, and resets at server reset time (00:00)" "help": "Automatically updated, skips completed levels in the filter, and resets at server reset time (00:00)"
},
"SyncEmotion": {
"name": "EventDaily.SyncEmotion.name",
"help": "EventDaily.SyncEmotion.help"
} }
}, },
"Raid": { "Raid": {
@ -2700,6 +2708,10 @@
"TargetZone": { "TargetZone": {
"name": "Target Zone ID", "name": "Target Zone ID",
"help": "Supports either Zone ID or Name in CN/EN/JP/TW, i.e. \"51\", \"NA Ocean SE Sector E\"\nIf specified, Alas will loop on this same zone after each clear\nUse default value 0 or clear the field to remove the specification\nZone information can be acquired from <./module/os/map_data.py>" "help": "Supports either Zone ID or Name in CN/EN/JP/TW, i.e. \"51\", \"NA Ocean SE Sector E\"\nIf specified, Alas will loop on this same zone after each clear\nUse default value 0 or clear the field to remove the specification\nZone information can be acquired from <./module/os/map_data.py>"
},
"IgnoreStory": {
"name": "OpsiMeowfficerFarming.IgnoreStory.name",
"help": "OpsiMeowfficerFarming.IgnoreStory.help"
} }
}, },
"OpsiHazard1Leveling": { "OpsiHazard1Leveling": {

View File

@ -1079,6 +1079,10 @@
"name": "StopCondition.GetNewShip.name", "name": "StopCondition.GetNewShip.name",
"help": "StopCondition.GetNewShip.help" "help": "StopCondition.GetNewShip.help"
}, },
"EventSwitch": {
"name": "StopCondition.EventSwitch.name",
"help": "StopCondition.EventSwitch.help"
},
"ReachLevel": { "ReachLevel": {
"name": "StopCondition.ReachLevel.name", "name": "StopCondition.ReachLevel.name",
"help": "StopCondition.ReachLevel.help" "help": "StopCondition.ReachLevel.help"
@ -1469,6 +1473,10 @@
"LastStage": { "LastStage": {
"name": "EventDaily.LastStage.name", "name": "EventDaily.LastStage.name",
"help": "EventDaily.LastStage.help" "help": "EventDaily.LastStage.help"
},
"SyncEmotion": {
"name": "EventDaily.SyncEmotion.name",
"help": "EventDaily.SyncEmotion.help"
} }
}, },
"Raid": { "Raid": {
@ -2700,6 +2708,10 @@
"TargetZone": { "TargetZone": {
"name": "OpsiMeowfficerFarming.TargetZone.name", "name": "OpsiMeowfficerFarming.TargetZone.name",
"help": "OpsiMeowfficerFarming.TargetZone.help" "help": "OpsiMeowfficerFarming.TargetZone.help"
},
"IgnoreStory": {
"name": "OpsiMeowfficerFarming.IgnoreStory.name",
"help": "OpsiMeowfficerFarming.IgnoreStory.help"
} }
}, },
"OpsiHazard1Leveling": { "OpsiHazard1Leveling": {

View File

@ -1079,6 +1079,10 @@
"name": "获得新船后停止", "name": "获得新船后停止",
"help": "" "help": ""
}, },
"EventSwitch": {
"name": "刷活动PT",
"help": "开荒完毕后开启活动图每日和活动图2刷pt(仅限活动图-1内开关有效)"
},
"ReachLevel": { "ReachLevel": {
"name": "舰船升至 X 级后停止", "name": "舰船升至 X 级后停止",
"help": "任意等级低于 X 的舰船升级至 X 级后停止\n0 表示不限制等级" "help": "任意等级低于 X 的舰船升级至 X 级后停止\n0 表示不限制等级"
@ -1469,6 +1473,10 @@
"LastStage": { "LastStage": {
"name": "上一个完成的关卡", "name": "上一个完成的关卡",
"help": "自动更新的数值将跳过过滤器中已完成的关卡过0点重置" "help": "自动更新的数值将跳过过滤器中已完成的关卡过0点重置"
},
"SyncEmotion": {
"name": "同步心情设置至活动图-2",
"help": "在结束或延迟该任务时会同步心情设置给活动图-2"
} }
}, },
"Raid": { "Raid": {
@ -2700,6 +2708,10 @@
"TargetZone": { "TargetZone": {
"name": "指定海域", "name": "指定海域",
"help": "仅出击指定的海域,可以用来获取大世界成就星星\n支持海域ID、国服/国际服/日服/台服海域名称,例如 \"51\", \"NA海域东南E\", \"NA Ocean SE Sector E\"\n填入默认值0或者删除数值即可取消指定" "help": "仅出击指定的海域,可以用来获取大世界成就星星\n支持海域ID、国服/国际服/日服/台服海域名称,例如 \"51\", \"NA海域东南E\", \"NA Ocean SE Sector E\"\n填入默认值0或者删除数值即可取消指定"
},
"IgnoreStory": {
"name": "忽略剧情主线未完成",
"help": "开启后即使剧情主线未完成,Alas也会继续执行刷侵蚀"
} }
}, },
"OpsiHazard1Leveling": { "OpsiHazard1Leveling": {

View File

@ -1079,6 +1079,10 @@
"name": "獲得新船後停止", "name": "獲得新船後停止",
"help": "" "help": ""
}, },
"EventSwitch": {
"name": "StopCondition.EventSwitch.name",
"help": "StopCondition.EventSwitch.help"
},
"ReachLevel": { "ReachLevel": {
"name": "艦船升至 X 級後停止", "name": "艦船升至 X 級後停止",
"help": "任意等級低於 X 的艦船升級至 X 級後停止\n0 表示不限制等級" "help": "任意等級低於 X 的艦船升級至 X 級後停止\n0 表示不限制等級"
@ -1469,6 +1473,10 @@
"LastStage": { "LastStage": {
"name": "上一個完成的地圖", "name": "上一個完成的地圖",
"help": "自動更新的數值將跳過過濾器中已完成的地圖過0點重置" "help": "自動更新的數值將跳過過濾器中已完成的地圖過0點重置"
},
"SyncEmotion": {
"name": "EventDaily.SyncEmotion.name",
"help": "EventDaily.SyncEmotion.help"
} }
}, },
"Raid": { "Raid": {
@ -2700,6 +2708,10 @@
"TargetZone": { "TargetZone": {
"name": "指定海域", "name": "指定海域",
"help": "僅出擊指定的海域,可以用來獲取大世界成就星星\n自動更新的數值填0可重置進度重置後自動跳過已開荒的海域\n支援海域ID、國服/國際服/日服/台服海域名稱,例如 \"51\", \"NA海域東南E\", \"NA Ocean SE Sector E\"\n填入默認值0或者刪除數值即可取消指定" "help": "僅出擊指定的海域,可以用來獲取大世界成就星星\n自動更新的數值填0可重置進度重置後自動跳過已開荒的海域\n支援海域ID、國服/國際服/日服/台服海域名稱,例如 \"51\", \"NA海域東南E\", \"NA Ocean SE Sector E\"\n填入默認值0或者刪除數值即可取消指定"
},
"IgnoreStory": {
"name": "OpsiMeowfficerFarming.IgnoreStory.name",
"help": "OpsiMeowfficerFarming.IgnoreStory.help"
} }
}, },
"OpsiHazard1Leveling": { "OpsiHazard1Leveling": {

View File

@ -42,7 +42,10 @@ class CampaignABCD(EventBase):
for stage in stages: for stage in stages:
stage = str(stage) stage = str(stage)
try: try:
super().run(name=stage, folder=self.config.Campaign_Event, total=1) if self.config.EventDaily_SyncEmotion == True:
super().run(name=stage, folder=self.config.Campaign_Event, total=1,from_eventDaily=True)
else:
super().run(name=stage, folder=self.config.Campaign_Event, total=1)
except TaskEnd: except TaskEnd:
# Catch task switch # Catch task switch
pass pass
@ -66,6 +69,8 @@ class CampaignABCD(EventBase):
self.config.task_stop() self.config.task_stop()
if self.config.task_switched(): if self.config.task_switched():
self.config.task_stop() self.config.task_stop()
if self.config.EventDaily_SyncEmotion == True:
super().sync_emotion()#任务完成时的心情传递
# Scheduler # Scheduler
self.config.task_delay(server_update=True) self.config.task_delay(server_update=True)

View File

@ -402,6 +402,35 @@ class FastForwardHandler(AutoSearchHandler):
content=f"<{self.config.config_name}> {prev_stage} reached end" content=f"<{self.config.config_name}> {prev_stage} reached end"
) )
self.config.Scheduler_Enable = False self.config.Scheduler_Enable = False
# logger.warning(f'{self.config.StopCondition_EventSwitch}')
if self.config.task.command == 'Event'and self.config.StopCondition_EventSwitch == True:
# 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:#只传舰队和心情恢复情况,不传心情值
data = self.config.cross_get(keys=f'Event{key}')
self.config.cross_set(keys=f'EventA{key}', value=f'{data}')
# self.config.cross_set(keys=f'EventB{key}', value=f'{data}')
self.config.cross_set(keys=f'EventC{key}', value=f'{data}')
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}")
KEYS2 = ['.Emotion.Fleet1Value','.Emotion.Fleet2Value',]
for key in KEYS2:#单独给每日D和活动图2传心情值(因为结尾关D3心情一致)
data = self.config.cross_get(keys=f'Event{key}')
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"
self.config.cross_set(keys=f'EventA.EventDaily.StageFilter', value=f'{eventDailyStageFilter_A}') #ab图一般用同一队,所以为了心情同步用同一队
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')
# logger.info(f"{self.config.Fleet_FleetOrder},{self.config.Emotion_Fleet1Value},{self.config.Emotion_Fleet1Recover}")
else: else:
self.config.Scheduler_Enable = False self.config.Scheduler_Enable = False

View File

@ -169,6 +169,7 @@ class InfoHandler(ModuleBase):
drop.add(self.device.image) drop.add(self.device.image)
self.device.click(GET_MISSION) self.device.click(GET_MISSION)
self._hot_fix_check_wait.reset() self._hot_fix_check_wait.reset()
return False
if appear2 or appear3: if appear2 or appear3:
from module.base.resource import release_resources from module.base.resource import release_resources
logger.warning('Other login in') logger.warning('Other login in')
@ -177,7 +178,7 @@ class InfoHandler(ModuleBase):
self.device.app_stop() self.device.app_stop()
release_resources() release_resources()
self.device.release_during_wait() self.device.release_during_wait()
self.device.sleep(60*40) self.device.sleep(60*15)
return True return True
# Check game client existence after 3s to 6s # Check game client existence after 3s to 6s

View File

@ -491,7 +491,11 @@ class OSMap(OSFleet, Map, GlobeCamera, StrategicSearchHandler):
logger.critical('Unable to use auto search in current zone') logger.critical('Unable to use auto search in current zone')
logger.critical('Please finish the story mode of OpSi to unlock auto search ' logger.critical('Please finish the story mode of OpSi to unlock auto search '
'before using any OpSi functions') 'before using any OpSi functions')
raise RequestHumanTakeover if self.config.OpsiMeowfficerFarming_IgnoreStory == True:
logger.hr('ignore the story mode waring')
break
else:
raise RequestHumanTakeover
if self.is_in_map(): if self.is_in_map():
self.device.stuck_record_clear() self.device.stuck_record_clear()
if not success: if not success: