Fix: 优化低心情处理与活动困难图编队流程#5759
Open
wan300 wants to merge 3 commits into
Open
Conversation
Contributor
|
搞这么复杂可能会出现意想不到的bug |
Author
|
那我把识别心情那块的去了,只保留低心情弹窗兜底这里的,这样也能解决心情账本出现问题时不会直接卡死退出这个问题#5248 |
LmeSzinc
reviewed
Jul 1, 2026
Comment on lines
187
to
203
| def handle_combat_low_emotion(self): | ||
| if not self.emotion.is_ignore: | ||
| def handle_combat_low_emotion(self, fleet_index=None): | ||
| if self.emotion.is_ignore: | ||
| result = self.handle_popup_confirm('IGNORE_LOW_EMOTION') | ||
| if result: | ||
| # Avoid clicking AUTO_SEARCH_MAP_OPTION_OFF | ||
| self.interval_reset(AUTO_SEARCH_MAP_OPTION_OFF) | ||
| return result | ||
|
|
||
| if not self.emotion.is_calculate: | ||
| return False | ||
|
|
||
| result = self.handle_popup_confirm('IGNORE_LOW_EMOTION') | ||
| result = self.handle_popup_cancel('LOW_EMOTION_CONTROL') | ||
| if result: | ||
| # Avoid clicking AUTO_SEARCH_MAP_OPTION_OFF | ||
| self.interval_reset(AUTO_SEARCH_MAP_OPTION_OFF) | ||
| self.emotion.delay_after_low_emotion(fleet_index=fleet_index) | ||
| return result |
Comment on lines
+227
to
+240
| indexes = self._fleet_indexes(fleet_index=fleet_index) | ||
| if len(indexes) > 1: | ||
| logger.warning('Unable to identify low-emotion fleet, reset both fleet ledgers') | ||
|
|
||
| logger.hr('Emotion control') | ||
| self.update() | ||
| fleets = [self.fleets[index - 1] for index in indexes] | ||
| for fleet in fleets: | ||
| fleet.current = max(fleet.limit - 1, 0) | ||
| logger.info(f'Reset emotion fleet {fleet.fleet} to {fleet.current}') | ||
|
|
||
| self.record() | ||
| self.show() | ||
| return fleets |
Owner
There was a problem hiding this comment.
不是,ai写的代码自己审一下啊,弹低心情就把心情设置为最大,那计算心情的意义是什么呢
设置为0,然后让 Emotion.wait() 在图内等待,然后等到下一场战斗的心情再继续,结束关卡之后等待下一把的预期心情消耗再进图
Author
There was a problem hiding this comment.
抱歉这个是我记错了,我记成心情40点以下就出现弹窗,所以max(fleet.limit - 1, 0)这设成出现弹窗就默认心情到了39点
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
这次改动主要优化情绪控制链路,并适配活动困难图中低心情弹窗与推荐编队的处理流程。
主要改动
Emotion_PopupOnly/should_track判定,避免活动困难图等 popup-only 场景误触发心情等待或扣减。fleet_index,使combat、raid、event_hospital、gems_farming、auto_search_combat、map的低心情处理能定位到对应舰队。event_*下ht/c/d前缀关卡,并在推荐编队流程中处理确认弹窗,避免卡在推荐/确认界面。POPUP_CANCEL_WHITE被误点为POPUP_CONFIRM_WHITE。