|
@@ -8,6 +8,7 @@ from tasks.Component.BaseActivity.base_activity import BaseActivity
|
|
|
from tasks.HeroTest.assets import HeroTestAssets
|
|
from tasks.HeroTest.assets import HeroTestAssets
|
|
|
from tasks.GameUi.page import page_main, page_shikigami_records
|
|
from tasks.GameUi.page import page_main, page_shikigami_records
|
|
|
from tasks.GameUi.game_ui import GameUi
|
|
from tasks.GameUi.game_ui import GameUi
|
|
|
|
|
+from tasks.GameUi.page import page_exploration
|
|
|
from tasks.Component.SwitchSoul.switch_soul import SwitchSoul
|
|
from tasks.Component.SwitchSoul.switch_soul import SwitchSoul
|
|
|
|
|
|
|
|
from module.logger import logger
|
|
from module.logger import logger
|
|
@@ -52,6 +53,13 @@ class ScriptTask(GameUi, BaseActivity, HeroTestAssets, SwitchSoul):
|
|
|
|
|
|
|
|
self.ui_get_current_page()
|
|
self.ui_get_current_page()
|
|
|
self.ui_goto(page_main)
|
|
self.ui_goto(page_main)
|
|
|
|
|
+ # 启动经验加成
|
|
|
|
|
+ if is_update:
|
|
|
|
|
+ self.open_buff()
|
|
|
|
|
+ self.exp_100(True)
|
|
|
|
|
+ self.exp_50(True)
|
|
|
|
|
+ self.close_buff()
|
|
|
|
|
+ self.ui_goto(page_exploration)
|
|
|
self.home_main()
|
|
self.home_main()
|
|
|
# 设定是否锁定阵容
|
|
# 设定是否锁定阵容
|
|
|
if is_update:
|
|
if is_update:
|
|
@@ -109,7 +117,7 @@ class ScriptTask(GameUi, BaseActivity, HeroTestAssets, SwitchSoul):
|
|
|
# 如果是兵藏秘境 看看是否有兵道帖
|
|
# 如果是兵藏秘境 看看是否有兵道帖
|
|
|
if is_skill:
|
|
if is_skill:
|
|
|
if not self.check_art_war_card():
|
|
if not self.check_art_war_card():
|
|
|
- logger.info("Art war card is enough")
|
|
|
|
|
|
|
+ logger.info("Art war card is not enough")
|
|
|
break
|
|
break
|
|
|
# 点击战斗
|
|
# 点击战斗
|
|
|
logger.info("Click battle")
|
|
logger.info("Click battle")
|
|
@@ -122,6 +130,11 @@ class ScriptTask(GameUi, BaseActivity, HeroTestAssets, SwitchSoul):
|
|
|
if not self.appear(self.I_BATTLE):
|
|
if not self.appear(self.I_BATTLE):
|
|
|
break
|
|
break
|
|
|
elif is_skill:
|
|
elif is_skill:
|
|
|
|
|
+ if not self.check_art_war_card():
|
|
|
|
|
+ logger.info("Art war card is not nough")
|
|
|
|
|
+ break
|
|
|
|
|
+ if self.appear_then_click(self.I_START_CHALLENGE, interval=1):
|
|
|
|
|
+ continue
|
|
|
if self.appear_then_click(self.I_BCMJ_RESET_CONFIRM, interval=1):
|
|
if self.appear_then_click(self.I_BCMJ_RESET_CONFIRM, interval=1):
|
|
|
continue
|
|
continue
|
|
|
if self.appear_then_click(self.I_BCMJ_BATTLE, interval=2):
|
|
if self.appear_then_click(self.I_BCMJ_BATTLE, interval=2):
|
|
@@ -258,12 +271,6 @@ class ScriptTask(GameUi, BaseActivity, HeroTestAssets, SwitchSoul):
|
|
|
logger.hr("Enter HeroTest", 2)
|
|
logger.hr("Enter HeroTest", 2)
|
|
|
global is_update
|
|
global is_update
|
|
|
global is_skill
|
|
global is_skill
|
|
|
- # 启动经验加成
|
|
|
|
|
- if is_update:
|
|
|
|
|
- self.open_buff()
|
|
|
|
|
- self.exp_100(True)
|
|
|
|
|
- self.exp_50(True)
|
|
|
|
|
- self.close_buff()
|
|
|
|
|
while 1:
|
|
while 1:
|
|
|
self.screenshot()
|
|
self.screenshot()
|
|
|
if is_update:
|
|
if is_update:
|
|
@@ -272,8 +279,6 @@ class ScriptTask(GameUi, BaseActivity, HeroTestAssets, SwitchSoul):
|
|
|
if is_skill:
|
|
if is_skill:
|
|
|
if self.appear(self.I_BCMJ_BATTLE):
|
|
if self.appear(self.I_BCMJ_BATTLE):
|
|
|
break
|
|
break
|
|
|
- if self.appear_then_click(self.I_ONE, interval=1):
|
|
|
|
|
- continue
|
|
|
|
|
if self.appear_then_click(self.I_TWO, interval=1):
|
|
if self.appear_then_click(self.I_TWO, interval=1):
|
|
|
continue
|
|
continue
|
|
|
if is_update:
|
|
if is_update:
|
|
@@ -292,14 +297,6 @@ class ScriptTask(GameUi, BaseActivity, HeroTestAssets, SwitchSoul):
|
|
|
global is_update
|
|
global is_update
|
|
|
while 1:
|
|
while 1:
|
|
|
self.screenshot()
|
|
self.screenshot()
|
|
|
- if self.appear(self.I_ONE):
|
|
|
|
|
- if is_update:
|
|
|
|
|
- # 关闭经验加成
|
|
|
|
|
- self.open_buff()
|
|
|
|
|
- self.exp_100(False)
|
|
|
|
|
- self.exp_50(False)
|
|
|
|
|
- self.close_buff()
|
|
|
|
|
- break
|
|
|
|
|
if self.appear_then_click(self.I_UI_BACK_RED, interval=2):
|
|
if self.appear_then_click(self.I_UI_BACK_RED, interval=2):
|
|
|
continue
|
|
continue
|
|
|
if self.appear_then_click(self.I_UI_BACK_YELLOW, interval=2):
|
|
if self.appear_then_click(self.I_UI_BACK_YELLOW, interval=2):
|
|
@@ -308,13 +305,23 @@ class ScriptTask(GameUi, BaseActivity, HeroTestAssets, SwitchSoul):
|
|
|
continue
|
|
continue
|
|
|
if self.appear_then_click(self.I_GBB_BACK, interval=2):
|
|
if self.appear_then_click(self.I_GBB_BACK, interval=2):
|
|
|
continue
|
|
continue
|
|
|
|
|
+ self.ui_get_current_page()
|
|
|
|
|
+ self.ui_goto(page_main)
|
|
|
|
|
+ if is_update:
|
|
|
|
|
+ # 关闭经验加成
|
|
|
|
|
+ self.open_buff()
|
|
|
|
|
+ self.exp_100(False)
|
|
|
|
|
+ self.exp_50(False)
|
|
|
|
|
+ self.close_buff()
|
|
|
|
|
+ break
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
if __name__ == "__main__":
|
|
|
from module.config.config import Config
|
|
from module.config.config import Config
|
|
|
from module.device.device import Device
|
|
from module.device.device import Device
|
|
|
|
|
|
|
|
- c = Config("oas1")
|
|
|
|
|
|
|
+ c = Config("oas2")
|
|
|
d = Device(c)
|
|
d = Device(c)
|
|
|
t = ScriptTask(c, d)
|
|
t = ScriptTask(c, d)
|
|
|
|
|
|