fix(alas): 添加GameDied的重启行为

This commit is contained in:
W1NDes 2025-08-18 16:54:45 +08:00
parent cb0442f59c
commit 0a2cb7e0e1
3 changed files with 20 additions and 2 deletions

14
alas.py
View File

@ -712,6 +712,20 @@ class AzurLaneAutoScript:
content=f"<{self.config_name}> RequestHumanTakeover",
)
exit(1)
except GameNotRunningError as e:
if str(e) == "Game died":
logger.warning("Game died when restarting")
self.is_first_task = False
continue
else:
logger.exception(e)
self.save_error_log()
handle_notify(
self.config.Error_OnePushConfig,
title=f"Alas <{self.config_name}> crashed",
content=f"<{self.config_name}> Exception occured",
)
exit(1)
except Exception as e:
logger.exception(e)
self.save_error_log()

View File

@ -73,7 +73,9 @@ class Config:
MAP_SWIPE_MULTIPLY = (1.267, 1.290)
MAP_SWIPE_MULTIPLY_MINITOUCH = (1.225, 1.248)
MAP_SWIPE_MULTIPLY_MAATOUCH = (1.189, 1.211)
STAGE_INCREASE_CUSTOM = [
'HT1 > HT2 > HT3 > HT4 > HT5 > HT6',
]
class Campaign(CampaignBase):
MAP = MAP

View File

@ -73,7 +73,9 @@ class Config:
MAP_SWIPE_MULTIPLY = (1.267, 1.290)
MAP_SWIPE_MULTIPLY_MINITOUCH = (1.225, 1.248)
MAP_SWIPE_MULTIPLY_MAATOUCH = (1.189, 1.211)
STAGE_INCREASE_CUSTOM = [
'HT1 > HT2 > HT3 > HT4 > HT5 > HT6',
]
class Campaign(CampaignBase):
MAP = MAP