|
@@ -22,7 +22,7 @@ from tasks.Utils.config_enum import ShikigamiClass
|
|
|
|
|
|
|
|
from module.logger import logger
|
|
from module.logger import logger
|
|
|
from module.base.timer import Timer
|
|
from module.base.timer import Timer
|
|
|
-from module.exception import RequestHumanTakeover, TaskEnd
|
|
|
|
|
|
|
+from module.exception import RequestHumanTakeover, TaskEnd, GameStuckError
|
|
|
from module.atom.image_grid import ImageGrid
|
|
from module.atom.image_grid import ImageGrid
|
|
|
from module.atom.animate import RuleAnimate
|
|
from module.atom.animate import RuleAnimate
|
|
|
from module.base.utils import load_image
|
|
from module.base.utils import load_image
|
|
@@ -151,8 +151,14 @@ class BaseExploration(GameUi, GeneralBattle, GeneralRoom, GeneralInvite, Replace
|
|
|
self.device.click_record_clear()
|
|
self.device.click_record_clear()
|
|
|
self.swipe(self.S_SWIPE_LEVEL_UP)
|
|
self.swipe(self.S_SWIPE_LEVEL_UP)
|
|
|
swipeCount += 1
|
|
swipeCount += 1
|
|
|
|
|
+ debug_info = f"Swiped {swipeCount} times, current exploration level: {text1}"
|
|
|
|
|
+ logger.info(debug_info)
|
|
|
if swipeCount >= 25:
|
|
if swipeCount >= 25:
|
|
|
|
|
+ raise GameStuckError(
|
|
|
|
|
+ f"Swiped too many times ({swipeCount}), seems stuck in exploration level selection"
|
|
|
|
|
+ )
|
|
|
return False
|
|
return False
|
|
|
|
|
+ time.sleep(1)
|
|
|
|
|
|
|
|
# 选中对应章节
|
|
# 选中对应章节
|
|
|
while 1:
|
|
while 1:
|