mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-09 12:49:03 +08:00
Upd: clear exercise every Thursday
This commit is contained in:
parent
65455dfb8b
commit
a0ee26d1c8
@ -171,6 +171,18 @@ class Exercise(ExerciseCombat):
|
||||
self.config.set_record(Exercise_OpponentRefreshValue=0)
|
||||
return 0
|
||||
|
||||
def _get_thursday_strategy(self, remain_time):
|
||||
"""
|
||||
Args:
|
||||
remain_time(datetime.timedelta):
|
||||
|
||||
Returns:
|
||||
bool: if use Thursday strategy
|
||||
"""
|
||||
if 96 > remain_time >= 84 or 264 > remain_time >= 252:
|
||||
return True
|
||||
return False
|
||||
|
||||
def server_support_ocr_reset_remain(self) -> bool:
|
||||
return self.config.SERVER in ['cn', 'en', 'jp']
|
||||
|
||||
@ -217,10 +229,14 @@ class Exercise(ExerciseCombat):
|
||||
if admiral_interval is not None and remain_time:
|
||||
admiral_start, admiral_end = admiral_interval
|
||||
|
||||
if admiral_start > int(remain_time.total_seconds() // 3600) >= admiral_end: # set time for getting admiral
|
||||
if self._get_thursday_strategy(int(remain_time.total_seconds() // 3600)):
|
||||
logger.info('Reach Thursday for admiral trial, using all attempts.')
|
||||
self.preserve = 0
|
||||
forced_run = True
|
||||
elif admiral_start > int(remain_time.total_seconds() // 3600) >= admiral_end: # set time for getting admiral
|
||||
logger.info('Reach set time for admiral trial, using all attempts.')
|
||||
self.preserve = 0
|
||||
forced_run =True
|
||||
forced_run = True
|
||||
elif int(remain_time.total_seconds() // 3600) < 6: # if not set to "sun18", still depleting at sunday 18pm.
|
||||
logger.info('Exercise period remain less than 6 hours, using all attempts.')
|
||||
self.preserve = 0
|
||||
|
||||
Loading…
Reference in New Issue
Block a user