|
@@ -15,6 +15,7 @@ from tasks.Exploration.config import ChooseRarity, AutoRotate, UserStatus, Explo
|
|
|
class SoloExploration(BaseExploration):
|
|
class SoloExploration(BaseExploration):
|
|
|
INVITE_FLAG_OFF = (157, 109, 83)
|
|
INVITE_FLAG_OFF = (157, 109, 83)
|
|
|
INVITE_FLAG_ON = (227, 193, 153)
|
|
INVITE_FLAG_ON = (227, 193, 153)
|
|
|
|
|
+ explore_init = False
|
|
|
|
|
|
|
|
@cached_property
|
|
@cached_property
|
|
|
def _invite_config(self) -> InviteConfig:
|
|
def _invite_config(self) -> InviteConfig:
|
|
@@ -29,7 +30,6 @@ class SoloExploration(BaseExploration):
|
|
|
|
|
|
|
|
def run_solo(self):
|
|
def run_solo(self):
|
|
|
logger.hr('solo')
|
|
logger.hr('solo')
|
|
|
- explore_init = False
|
|
|
|
|
search_fail_cnt = 0
|
|
search_fail_cnt = 0
|
|
|
|
|
|
|
|
while 1:
|
|
while 1:
|
|
@@ -48,22 +48,20 @@ class SoloExploration(BaseExploration):
|
|
|
if self.check_exit():
|
|
if self.check_exit():
|
|
|
break
|
|
break
|
|
|
self.open_expect_level()
|
|
self.open_expect_level()
|
|
|
- explore_init = False
|
|
|
|
|
continue
|
|
continue
|
|
|
#
|
|
#
|
|
|
elif scene == Scene.ENTRANCE:
|
|
elif scene == Scene.ENTRANCE:
|
|
|
if self.check_exit():
|
|
if self.check_exit():
|
|
|
break
|
|
break
|
|
|
self.ui_click(self.I_E_EXPLORATION_CLICK, stop=self.I_E_SETTINGS_BUTTON)
|
|
self.ui_click(self.I_E_EXPLORATION_CLICK, stop=self.I_E_SETTINGS_BUTTON)
|
|
|
- explore_init = False
|
|
|
|
|
continue
|
|
continue
|
|
|
#
|
|
#
|
|
|
elif scene == Scene.MAIN:
|
|
elif scene == Scene.MAIN:
|
|
|
- if not explore_init:
|
|
|
|
|
- self.ui_click(self.I_E_AUTO_ROTATE_OFF, stop=self.I_E_AUTO_ROTATE_ON)
|
|
|
|
|
|
|
+ if not self.explore_init:
|
|
|
if self._config.exploration_config.auto_rotate == AutoRotate.yes:
|
|
if self._config.exploration_config.auto_rotate == AutoRotate.yes:
|
|
|
self.enter_settings_and_do_operations()
|
|
self.enter_settings_and_do_operations()
|
|
|
- explore_init = True
|
|
|
|
|
|
|
+ self.ui_click(self.I_E_AUTO_ROTATE_OFF, stop=self.I_E_AUTO_ROTATE_ON)
|
|
|
|
|
+ self.explore_init = True
|
|
|
continue
|
|
continue
|
|
|
# 小纸人
|
|
# 小纸人
|
|
|
if self.appear(self.I_BATTLE_REWARD):
|
|
if self.appear(self.I_BATTLE_REWARD):
|
|
@@ -100,7 +98,6 @@ class SoloExploration(BaseExploration):
|
|
|
|
|
|
|
|
def run_leader(self):
|
|
def run_leader(self):
|
|
|
logger.hr('leader')
|
|
logger.hr('leader')
|
|
|
- explore_init = False
|
|
|
|
|
search_fail_cnt = 0
|
|
search_fail_cnt = 0
|
|
|
friend_leave_timer = Timer(10)
|
|
friend_leave_timer = Timer(10)
|
|
|
|
|
|
|
@@ -139,7 +136,7 @@ class SoloExploration(BaseExploration):
|
|
|
# 可以加一下,清空第一次 explore_init
|
|
# 可以加一下,清空第一次 explore_init
|
|
|
continue
|
|
continue
|
|
|
self.open_expect_level()
|
|
self.open_expect_level()
|
|
|
- explore_init = False
|
|
|
|
|
|
|
+ # explore_init = False
|
|
|
continue
|
|
continue
|
|
|
|
|
|
|
|
# 邀请好友, 非常有可能是后面邀请好友,然后直接跳到组队了
|
|
# 邀请好友, 非常有可能是后面邀请好友,然后直接跳到组队了
|
|
@@ -179,12 +176,12 @@ class SoloExploration(BaseExploration):
|
|
|
break
|
|
break
|
|
|
##
|
|
##
|
|
|
elif scene == Scene.MAIN:
|
|
elif scene == Scene.MAIN:
|
|
|
- if not explore_init:
|
|
|
|
|
- self.ui_click(self.I_E_AUTO_ROTATE_OFF, stop=self.I_E_AUTO_ROTATE_ON)
|
|
|
|
|
|
|
+ if not self.explore_init:
|
|
|
if self._config.exploration_config.auto_rotate == AutoRotate.yes:
|
|
if self._config.exploration_config.auto_rotate == AutoRotate.yes:
|
|
|
self.enter_settings_and_do_operations()
|
|
self.enter_settings_and_do_operations()
|
|
|
|
|
+ self.ui_click(self.I_E_AUTO_ROTATE_OFF, stop=self.I_E_AUTO_ROTATE_ON)
|
|
|
friend_leave_timer = Timer(10)
|
|
friend_leave_timer = Timer(10)
|
|
|
- explore_init = True
|
|
|
|
|
|
|
+ self.explore_init = True
|
|
|
continue
|
|
continue
|
|
|
# 小纸人
|
|
# 小纸人
|
|
|
if self.appear(self.I_BATTLE_REWARD):
|
|
if self.appear(self.I_BATTLE_REWARD):
|
|
@@ -235,7 +232,6 @@ class SoloExploration(BaseExploration):
|
|
|
|
|
|
|
|
def run_member(self):
|
|
def run_member(self):
|
|
|
logger.hr('member')
|
|
logger.hr('member')
|
|
|
- explore_init = False
|
|
|
|
|
wait_timer = Timer(50)
|
|
wait_timer = Timer(50)
|
|
|
friend_leave_timer = Timer(10)
|
|
friend_leave_timer = Timer(10)
|
|
|
|
|
|
|
@@ -260,7 +256,6 @@ class SoloExploration(BaseExploration):
|
|
|
logger.warning('Wait timer reached')
|
|
logger.warning('Wait timer reached')
|
|
|
break
|
|
break
|
|
|
|
|
|
|
|
- explore_init = False
|
|
|
|
|
continue
|
|
continue
|
|
|
#
|
|
#
|
|
|
elif scene == Scene.ENTRANCE:
|
|
elif scene == Scene.ENTRANCE:
|
|
@@ -270,11 +265,11 @@ class SoloExploration(BaseExploration):
|
|
|
continue
|
|
continue
|
|
|
#
|
|
#
|
|
|
elif scene == Scene.MAIN:
|
|
elif scene == Scene.MAIN:
|
|
|
- if not explore_init:
|
|
|
|
|
- self.ui_click(self.I_E_AUTO_ROTATE_OFF, stop=self.I_E_AUTO_ROTATE_ON)
|
|
|
|
|
|
|
+ if not self.explore_init:
|
|
|
if self._config.exploration_config.auto_rotate == AutoRotate.yes:
|
|
if self._config.exploration_config.auto_rotate == AutoRotate.yes:
|
|
|
self.enter_settings_and_do_operations()
|
|
self.enter_settings_and_do_operations()
|
|
|
- explore_init = True
|
|
|
|
|
|
|
+ self.ui_click(self.I_E_AUTO_ROTATE_OFF, stop=self.I_E_AUTO_ROTATE_ON)
|
|
|
|
|
+ self.explore_init = True
|
|
|
continue
|
|
continue
|
|
|
# 小纸人
|
|
# 小纸人
|
|
|
if self.appear(self.I_BATTLE_REWARD):
|
|
if self.appear(self.I_BATTLE_REWARD):
|