Skip to content

Commit d2a474e

Browse files
committed
Fix: check_reduce in GemsFarming
1 parent 1d30b63 commit d2a474e

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

module/campaign/gems_farming.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,13 @@ def check_reduce(self, battle):
3737
Raise:
3838
CampaignEnd: Pause current task to prevent emotion control in the future.
3939
"""
40-
41-
try:
42-
super().check_reduce(battle)
43-
except ScriptEnd:
40+
if not self.is_calculate:
41+
return
42+
43+
recovered, delay = self._check_reduce(battle)
44+
if delay:
4445
self.config.GEMS_EMOTION_TRIGGERED = True
45-
self.config.task_delay(minute=0) # to undo emotion delay
46+
logger.info('Detect low emotion, pause current task')
4647
raise CampaignEnd('Emotion control')
4748

4849
def wait(self, fleet_index):

0 commit comments

Comments
 (0)