MCPcopy Create free account
hub / github.com/runhey/OnmyojiAutoScript / run

Method run

tasks/AreaBoss/script_task.py:20–58  ·  view source on GitHub ↗

运行脚本 :return:

(self)

Source from the content-addressed store, hash-verified

18class ScriptTask(GeneralBattle, GameUi, SwitchSoul, AreaBossAssets):
19
20 def run(self) -> bool:
21 """
22 运行脚本
23 :return:
24 """
25 # 直接手动关闭这个锁定阵容的设置
26 self.config.area_boss.general_battle.lock_team_enable = False
27 con = self.config.area_boss.boss
28
29 if self.config.area_boss.switch_soul.enable:
30 self.ui_get_current_page()
31 self.ui_goto(page_shikigami_records)
32 self.run_switch_soul(self.config.area_boss.switch_soul.switch_group_team)
33
34 if self.config.area_boss.switch_soul.enable_switch_by_name:
35 self.ui_get_current_page()
36 self.ui_goto(page_shikigami_records)
37 self.run_switch_soul_by_name(self.config.area_boss.switch_soul.group_name,
38 self.config.area_boss.switch_soul.team_name)
39
40 self.ui_get_current_page()
41 self.ui_goto(page_area_boss)
42
43 if con.boss_number == 3:
44 self.boss(self.I_BATTLE_1)
45 self.boss(self.I_BATTLE_2)
46 self.boss(self.I_BATTLE_3)
47 elif con.boss_number == 2:
48 self.boss(self.I_BATTLE_1, collect=True)
49 self.boss(self.I_BATTLE_2, collect=True)
50 elif con.boss_number == 1:
51 self.boss(self.I_BATTLE_1, collect=True)
52
53 # 退出
54 self.go_back()
55 self.set_next_run(task='AreaBoss', success=True, finish=False)
56
57 # 以抛出异常的形式结束
58 raise TaskEnd
59
60 def go_back(self) -> None:
61 """

Callers 1

script_task.pyFile · 0.45

Calls 7

bossMethod · 0.95
go_backMethod · 0.95
ui_get_current_pageMethod · 0.80
ui_gotoMethod · 0.80
run_switch_soulMethod · 0.80
set_next_runMethod · 0.80

Tested by

no test coverage detected