Selaa lähdekoodia

refactor(SwitchSoul): Reuse shared confirm button across costume flows
- replace dedicated soul switch confirmation assets with self.I_UI_CONFIRM
- remove duplicate confirmation templates from all shikigami costumes
- update related assets, JSON metadata, and task call sites

neptine 1 kuukausi sitten
vanhempi
sitoutus
71e332654e
35 muutettua tiedostoa jossa 37 lisäystä ja 172 poistoa
  1. 2 3
      tasks/AbyssShadows/script_task.py
  2. 0 1
      tasks/Component/Costume/costume_base.py
  3. 1 1
      tasks/Component/Costume/costume_test_shikigami.py
  4. 0 12
      tasks/Component/CostumeShikigami/assets.py
  5. 1 10
      tasks/Component/CostumeShikigami/sk1/image.json
  6. BIN
      tasks/Component/CostumeShikigami/sk1/sk1_sou_switch_sure_1.png
  7. 1 10
      tasks/Component/CostumeShikigami/sk10/image.json
  8. BIN
      tasks/Component/CostumeShikigami/sk10/sk10_sou_switch_sure_10.png
  9. 1 10
      tasks/Component/CostumeShikigami/sk11/image.json
  10. BIN
      tasks/Component/CostumeShikigami/sk11/sk11_sou_switch_sure_11.png
  11. 1 10
      tasks/Component/CostumeShikigami/sk12/image.json
  12. BIN
      tasks/Component/CostumeShikigami/sk12/sk12_sou_switch_sure_12.png
  13. 1 10
      tasks/Component/CostumeShikigami/sk2/image.json
  14. BIN
      tasks/Component/CostumeShikigami/sk2/sk2_sou_switch_sure_2.png
  15. 1 10
      tasks/Component/CostumeShikigami/sk3/image.json
  16. BIN
      tasks/Component/CostumeShikigami/sk3/sk3_sou_switch_sure_3.png
  17. 1 10
      tasks/Component/CostumeShikigami/sk4/image.json
  18. BIN
      tasks/Component/CostumeShikigami/sk4/sk4_sou_switch_sure_4.png
  19. 1 10
      tasks/Component/CostumeShikigami/sk5/image.json
  20. BIN
      tasks/Component/CostumeShikigami/sk5/sk5_sou_switch_sure_5.png
  21. 1 10
      tasks/Component/CostumeShikigami/sk6/image.json
  22. BIN
      tasks/Component/CostumeShikigami/sk6/sk6_sou_switch_sure_6.png
  23. 1 10
      tasks/Component/CostumeShikigami/sk7/image.json
  24. BIN
      tasks/Component/CostumeShikigami/sk7/sk7_sou_switch_sure_7.png
  25. 1 10
      tasks/Component/CostumeShikigami/sk8/image.json
  26. BIN
      tasks/Component/CostumeShikigami/sk8/sk8_sou_switch_sure_8.png
  27. 1 10
      tasks/Component/CostumeShikigami/sk9/image.json
  28. BIN
      tasks/Component/CostumeShikigami/sk9/sk9_sou_switch_sure_9.png
  29. 5 6
      tasks/Component/GeneralBattle/general_battle.py
  30. 0 1
      tasks/Component/SwitchSoul/assets.py
  31. 1 10
      tasks/Component/SwitchSoul/ss/image.json
  32. BIN
      tasks/Component/SwitchSoul/ss/ss_sou_switch_sure.png
  33. 5 5
      tasks/Component/SwitchSoul/switch_soul.py
  34. 1 2
      tasks/Duel/script_task.py
  35. 10 11
      tasks/RealmRaid/script_task.py

+ 2 - 3
tasks/AbyssShadows/script_task.py

@@ -21,7 +21,6 @@ from tasks.GameUi.page import page_main, page_kekkai_toppa, page_shikigami_recor
 from tasks.RealmRaid.assets import RealmRaidAssets
 from tasks.RealmRaid.assets import RealmRaidAssets
 
 
 from module.logger import logger
 from module.logger import logger
-from tasks.GlobalGame.assets import GlobalGameAssets
 from module.exception import TaskEnd
 from module.exception import TaskEnd
 from module.atom.image_grid import ImageGrid
 from module.atom.image_grid import ImageGrid
 from module.base.utils import point2str
 from module.base.utils import point2str
@@ -548,13 +547,13 @@ class ScriptTask(GeneralBattle, GameUi, SwitchSoul, AbyssShadowsAssets):
             self.screenshot()
             self.screenshot()
             if self.appear_then_click(self.I_EXIT, interval=2):
             if self.appear_then_click(self.I_EXIT, interval=2):
                 continue
                 continue
-            if self.appear_then_click(GlobalGameAssets.I_UI_CONFIRM, interval=2):
+            if self.appear_then_click(self.I_UI_CONFIRM, interval=2):
                 continue
                 continue
             if self.appear_then_click(self.I_WIN, interval=2):
             if self.appear_then_click(self.I_WIN, interval=2):
                 continue
                 continue
             if self.appear(self.I_ABYSS_NAVIGATION):
             if self.appear(self.I_ABYSS_NAVIGATION):
                 break
                 break
-        logger.info(f"Click {GlobalGameAssets.I_UI_CONFIRM.name}")
+        logger.info(f"Click {self.I_UI_CONFIRM.name}")
 
 
         return True
         return True
 
 

+ 0 - 1
tasks/Component/Costume/costume_base.py

@@ -89,7 +89,6 @@ shikigami_costume_model = {
         'I_SOU_CHECK_IN': f'I_SOU_CHECK_IN_{i}',
         'I_SOU_CHECK_IN': f'I_SOU_CHECK_IN_{i}',
         'I_SOU_TEAM_PRESENT': f'I_SOU_TEAM_PRESENT_{i}',
         'I_SOU_TEAM_PRESENT': f'I_SOU_TEAM_PRESENT_{i}',
         'I_SOU_CLICK_PRESENT': f'I_SOU_CLICK_PRESENT_{i}',
         'I_SOU_CLICK_PRESENT': f'I_SOU_CLICK_PRESENT_{i}',
-        'I_SOU_SWITCH_SURE': f'I_SOU_SWITCH_SURE_{i}',
         # SwitchSoul 分组相关 (1-7组)
         # SwitchSoul 分组相关 (1-7组)
         **{f'I_SOU_CHECK_GROUP_{g}': f'I_SOU_CHECK_GROUP_{g}_{i}' for g in range(1, 8)},
         **{f'I_SOU_CHECK_GROUP_{g}': f'I_SOU_CHECK_GROUP_{g}_{i}' for g in range(1, 8)},
         # SwitchSoul 队伍相关 (1-4队)
         # SwitchSoul 队伍相关 (1-4队)

+ 1 - 1
tasks/Component/Costume/costume_test_shikigami.py

@@ -36,7 +36,7 @@ class ScriptTask(GameUi, SwitchSoul, SwitchSoulAssets, SoulsTidyAssets):
             [self.I_SOU_SWITCH_2, 0],
             [self.I_SOU_SWITCH_2, 0],
             [self.I_SOU_SWITCH_3, 0],
             [self.I_SOU_SWITCH_3, 0],
             [self.I_SOU_SWITCH_4, 0],
             [self.I_SOU_SWITCH_4, 0],
-            [self.I_SOU_SWITCH_SURE, 0],
+            [self.I_UI_CONFIRM, 0],
             # SoulsTidy - 御魂页面关键元素
             # SoulsTidy - 御魂页面关键元素
             [self.I_ST_SOULS, 0],
             [self.I_ST_SOULS, 0],
             [self.I_ST_REPLACE, 0],
             [self.I_ST_REPLACE, 0],

+ 0 - 12
tasks/Component/CostumeShikigami/assets.py

@@ -26,7 +26,6 @@ class CostumeShikigamiAssets:
 	# description 
 	# description 
 	I_SOU_SWITCH_4_1 = RuleImage(roi_front=(977,603,33,20), roi_back=(962,592,53,34), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk1/sk1_sou_switch_4_1.png")
 	I_SOU_SWITCH_4_1 = RuleImage(roi_front=(977,603,33,20), roi_back=(962,592,53,34), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk1/sk1_sou_switch_4_1.png")
 	# description 
 	# description 
-	I_SOU_SWITCH_SURE_1 = RuleImage(roi_front=(668,401,180,61), roi_back=(668,401,180,61), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk1/sk1_sou_switch_sure_1.png")
 	# 用于判断是否在式神录里面 
 	# 用于判断是否在式神录里面 
 	I_SOU_CHECK_IN_1 = RuleImage(roi_front=(269,69,50,49), roi_back=(269,69,50,49), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk1/sk1_sou_check_in_1.png")
 	I_SOU_CHECK_IN_1 = RuleImage(roi_front=(269,69,50,49), roi_back=(269,69,50,49), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk1/sk1_sou_check_in_1.png")
 	# 检查是否为第一组 
 	# 检查是否为第一组 
@@ -69,7 +68,6 @@ class CostumeShikigamiAssets:
 	# 第四组切换 
 	# 第四组切换 
 	I_SOU_SWITCH_4_10 = RuleImage(roi_front=(979,602,25,27), roi_back=(960,592,60,50), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk10/sk10_sou_switch_4_10.png")
 	I_SOU_SWITCH_4_10 = RuleImage(roi_front=(979,602,25,27), roi_back=(960,592,60,50), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk10/sk10_sou_switch_4_10.png")
 	# 确认切换 
 	# 确认切换 
-	I_SOU_SWITCH_SURE_10 = RuleImage(roi_front=(669,401,190,61), roi_back=(669,401,190,61), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk10/sk10_sou_switch_sure_10.png")
 	# 用于判断是否在式神录里面 
 	# 用于判断是否在式神录里面 
 	I_SOU_CHECK_IN_10 = RuleImage(roi_front=(277,79,34,36), roi_back=(265,71,60,50), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk10/sk10_sou_check_in_10.png")
 	I_SOU_CHECK_IN_10 = RuleImage(roi_front=(277,79,34,36), roi_back=(265,71,60,50), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk10/sk10_sou_check_in_10.png")
 	# 检查是否为第一组 
 	# 检查是否为第一组 
@@ -126,7 +124,6 @@ class CostumeShikigamiAssets:
 	# description 
 	# description 
 	I_SOU_TEAM_PRESENT_11 = RuleImage(roi_front=(734,77,100,41), roi_back=(726,71,115,54), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk11/sk11_sou_team_present_11.png")
 	I_SOU_TEAM_PRESENT_11 = RuleImage(roi_front=(734,77,100,41), roi_back=(726,71,115,54), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk11/sk11_sou_team_present_11.png")
 	# description 
 	# description 
-	I_SOU_SWITCH_SURE_11 = RuleImage(roi_front=(702,401,116,55), roi_back=(690,399,148,64), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk11/sk11_sou_switch_sure_11.png")
 	# description 
 	# description 
 	I_SOUL_PRESET_11 = RuleImage(roi_front=(342,85,74,31), roi_back=(338,77,83,44), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk11/sk11_soul_preset_11.png")
 	I_SOUL_PRESET_11 = RuleImage(roi_front=(342,85,74,31), roi_back=(338,77,83,44), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk11/sk11_soul_preset_11.png")
 	# description 
 	# description 
@@ -169,7 +166,6 @@ class CostumeShikigamiAssets:
 	# description 
 	# description 
 	I_SOU_TEAM_PRESENT_12 = RuleImage(roi_front=(734,77,100,41), roi_back=(726,71,115,54), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk12/sk12_sou_team_present_12.png")
 	I_SOU_TEAM_PRESENT_12 = RuleImage(roi_front=(734,77,100,41), roi_back=(726,71,115,54), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk12/sk12_sou_team_present_12.png")
 	# description 
 	# description 
-	I_SOU_SWITCH_SURE_12 = RuleImage(roi_front=(702,401,116,55), roi_back=(690,399,148,64), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk12/sk12_sou_switch_sure_12.png")
 	# description 
 	# description 
 	I_SOUL_PRESET_12 = RuleImage(roi_front=(342,85,74,31), roi_back=(338,77,83,44), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk12/sk12_soul_preset_12.png")
 	I_SOUL_PRESET_12 = RuleImage(roi_front=(342,85,74,31), roi_back=(338,77,83,44), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk12/sk12_soul_preset_12.png")
 	# description 
 	# description 
@@ -198,7 +194,6 @@ class CostumeShikigamiAssets:
 	# description 
 	# description 
 	I_SOU_SWITCH_4_2 = RuleImage(roi_front=(977,603,32,21), roi_back=(962,592,56,40), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk2/sk2_sou_switch_4_2.png")
 	I_SOU_SWITCH_4_2 = RuleImage(roi_front=(977,603,32,21), roi_back=(962,592,56,40), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk2/sk2_sou_switch_4_2.png")
 	# description 
 	# description 
-	I_SOU_SWITCH_SURE_2 = RuleImage(roi_front=(668,401,180,61), roi_back=(668,401,180,61), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk2/sk2_sou_switch_sure_2.png")
 	# 用于判断是否在式神录里面 
 	# 用于判断是否在式神录里面 
 	I_SOU_CHECK_IN_2 = RuleImage(roi_front=(268,74,50,49), roi_back=(268,74,50,49), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk2/sk2_sou_check_in_2.png")
 	I_SOU_CHECK_IN_2 = RuleImage(roi_front=(268,74,50,49), roi_back=(268,74,50,49), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk2/sk2_sou_check_in_2.png")
 	# 检查是否为第一组 
 	# 检查是否为第一组 
@@ -241,7 +236,6 @@ class CostumeShikigamiAssets:
 	# description 
 	# description 
 	I_SOU_SWITCH_4_3 = RuleImage(roi_front=(978,603,31,19), roi_back=(962,592,53,34), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk3/sk3_sou_switch_4_3.png")
 	I_SOU_SWITCH_4_3 = RuleImage(roi_front=(978,603,31,19), roi_back=(962,592,53,34), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk3/sk3_sou_switch_4_3.png")
 	# description 
 	# description 
-	I_SOU_SWITCH_SURE_3 = RuleImage(roi_front=(668,401,180,61), roi_back=(668,401,180,61), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk3/sk3_sou_switch_sure_3.png")
 	# 用于判断是否在式神录里面 
 	# 用于判断是否在式神录里面 
 	I_SOU_CHECK_IN_3 = RuleImage(roi_front=(268,74,50,49), roi_back=(268,74,50,49), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk3/sk3_sou_check_in_3.png")
 	I_SOU_CHECK_IN_3 = RuleImage(roi_front=(268,74,50,49), roi_back=(268,74,50,49), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk3/sk3_sou_check_in_3.png")
 	# 检查是否为第一组 
 	# 检查是否为第一组 
@@ -284,7 +278,6 @@ class CostumeShikigamiAssets:
 	# description 
 	# description 
 	I_SOU_SWITCH_4_4 = RuleImage(roi_front=(978,602,31,20), roi_back=(962,592,53,34), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk4/sk4_sou_switch_4_4.png")
 	I_SOU_SWITCH_4_4 = RuleImage(roi_front=(978,602,31,20), roi_back=(962,592,53,34), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk4/sk4_sou_switch_4_4.png")
 	# description 
 	# description 
-	I_SOU_SWITCH_SURE_4 = RuleImage(roi_front=(668,401,180,61), roi_back=(668,401,180,61), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk4/sk4_sou_switch_sure_4.png")
 	# 用于判断是否在式神录里面 
 	# 用于判断是否在式神录里面 
 	I_SOU_CHECK_IN_4 = RuleImage(roi_front=(268,74,50,49), roi_back=(268,74,50,49), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk4/sk4_sou_check_in_4.png")
 	I_SOU_CHECK_IN_4 = RuleImage(roi_front=(268,74,50,49), roi_back=(268,74,50,49), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk4/sk4_sou_check_in_4.png")
 	# 检查是否为第一组 
 	# 检查是否为第一组 
@@ -327,7 +320,6 @@ class CostumeShikigamiAssets:
 	# description 
 	# description 
 	I_SOU_SWITCH_4_5 = RuleImage(roi_front=(978,602,31,20), roi_back=(962,592,53,34), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk5/sk5_sou_switch_4_5.png")
 	I_SOU_SWITCH_4_5 = RuleImage(roi_front=(978,602,31,20), roi_back=(962,592,53,34), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk5/sk5_sou_switch_4_5.png")
 	# description 
 	# description 
-	I_SOU_SWITCH_SURE_5 = RuleImage(roi_front=(668,401,180,61), roi_back=(668,401,180,61), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk5/sk5_sou_switch_sure_5.png")
 	# 用于判断是否在式神录里面 
 	# 用于判断是否在式神录里面 
 	I_SOU_CHECK_IN_5 = RuleImage(roi_front=(268,74,50,49), roi_back=(268,74,50,49), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk5/sk5_sou_check_in_5.png")
 	I_SOU_CHECK_IN_5 = RuleImage(roi_front=(268,74,50,49), roi_back=(268,74,50,49), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk5/sk5_sou_check_in_5.png")
 	# 检查是否为第一组 
 	# 检查是否为第一组 
@@ -370,7 +362,6 @@ class CostumeShikigamiAssets:
 	# description 
 	# description 
 	I_SOU_SWITCH_4_6 = RuleImage(roi_front=(977,601,32,21), roi_back=(962,592,53,34), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk6/sk6_sou_switch_4_6.png")
 	I_SOU_SWITCH_4_6 = RuleImage(roi_front=(977,601,32,21), roi_back=(962,592,53,34), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk6/sk6_sou_switch_4_6.png")
 	# description 
 	# description 
-	I_SOU_SWITCH_SURE_6 = RuleImage(roi_front=(668,401,180,61), roi_back=(668,401,180,61), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk6/sk6_sou_switch_sure_6.png")
 	# 用于判断是否在式神录里面 
 	# 用于判断是否在式神录里面 
 	I_SOU_CHECK_IN_6 = RuleImage(roi_front=(269,69,50,49), roi_back=(269,69,50,49), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk6/sk6_sou_check_in_6.png")
 	I_SOU_CHECK_IN_6 = RuleImage(roi_front=(269,69,50,49), roi_back=(269,69,50,49), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk6/sk6_sou_check_in_6.png")
 	# 检查是否为第一组 
 	# 检查是否为第一组 
@@ -413,7 +404,6 @@ class CostumeShikigamiAssets:
 	# description 
 	# description 
 	I_SOU_SWITCH_4_7 = RuleImage(roi_front=(975,604,37,23), roi_back=(963,589,61,48), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk7/sk7_sou_switch_4_7.png")
 	I_SOU_SWITCH_4_7 = RuleImage(roi_front=(975,604,37,23), roi_back=(963,589,61,48), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk7/sk7_sou_switch_4_7.png")
 	# description 
 	# description 
-	I_SOU_SWITCH_SURE_7 = RuleImage(roi_front=(668,401,180,61), roi_back=(668,401,180,61), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk7/sk7_sou_switch_sure_7.png")
 	# 用于判断是否在式神录里面 
 	# 用于判断是否在式神录里面 
 	I_SOU_CHECK_IN_7 = RuleImage(roi_front=(268,74,50,49), roi_back=(268,74,50,49), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk7/sk7_sou_check_in_7.png")
 	I_SOU_CHECK_IN_7 = RuleImage(roi_front=(268,74,50,49), roi_back=(268,74,50,49), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk7/sk7_sou_check_in_7.png")
 	# 检查是否为第一组 
 	# 检查是否为第一组 
@@ -456,7 +446,6 @@ class CostumeShikigamiAssets:
 	# 第四组切换 
 	# 第四组切换 
 	I_SOU_SWITCH_4_8 = RuleImage(roi_front=(981,603,25,27), roi_back=(960,592,60,50), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk8/sk8_sou_switch_4_8.png")
 	I_SOU_SWITCH_4_8 = RuleImage(roi_front=(981,603,25,27), roi_back=(960,592,60,50), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk8/sk8_sou_switch_4_8.png")
 	# 确认切换 
 	# 确认切换 
-	I_SOU_SWITCH_SURE_8 = RuleImage(roi_front=(668,401,180,61), roi_back=(668,401,180,61), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk8/sk8_sou_switch_sure_8.png")
 	# 用于判断是否在式神录里面 
 	# 用于判断是否在式神录里面 
 	I_SOU_CHECK_IN_8 = RuleImage(roi_front=(265,71,34,36), roi_back=(265,71,60,50), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk8/sk8_sou_check_in_8.png")
 	I_SOU_CHECK_IN_8 = RuleImage(roi_front=(265,71,34,36), roi_back=(265,71,60,50), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk8/sk8_sou_check_in_8.png")
 	# 检查是否为第一组 
 	# 检查是否为第一组 
@@ -499,7 +488,6 @@ class CostumeShikigamiAssets:
 	# 第四组切换 
 	# 第四组切换 
 	I_SOU_SWITCH_4_9 = RuleImage(roi_front=(979,602,25,27), roi_back=(960,592,60,50), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk9/sk9_sou_switch_4_9.png")
 	I_SOU_SWITCH_4_9 = RuleImage(roi_front=(979,602,25,27), roi_back=(960,592,60,50), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk9/sk9_sou_switch_4_9.png")
 	# 确认切换 
 	# 确认切换 
-	I_SOU_SWITCH_SURE_9 = RuleImage(roi_front=(669,401,190,61), roi_back=(669,401,190,61), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk9/sk9_sou_switch_sure_9.png")
 	# 用于判断是否在式神录里面 
 	# 用于判断是否在式神录里面 
 	I_SOU_CHECK_IN_9 = RuleImage(roi_front=(277,79,34,36), roi_back=(265,71,60,50), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk9/sk9_sou_check_in_9.png")
 	I_SOU_CHECK_IN_9 = RuleImage(roi_front=(277,79,34,36), roi_back=(265,71,60,50), threshold=0.8, method="Template matching", file="./tasks/Component/CostumeShikigami/sk9/sk9_sou_check_in_9.png")
 	# 检查是否为第一组 
 	# 检查是否为第一组 

+ 1 - 10
tasks/Component/CostumeShikigami/sk1/image.json

@@ -62,15 +62,6 @@
     "threshold": 0.8,
     "threshold": 0.8,
     "description": "description"
     "description": "description"
   },
   },
-  {
-    "itemName": "sou_switch_sure_1",
-    "imageName": "sk1_sou_switch_sure_1.png",
-    "roiFront": "668,401,180,61",
-    "roiBack": "668,401,180,61",
-    "method": "Template matching",
-    "threshold": 0.8,
-    "description": "description"
-  },
   {
   {
     "itemName": "sou_check_in_1",
     "itemName": "sou_check_in_1",
     "imageName": "sk1_sou_check_in_1.png",
     "imageName": "sk1_sou_check_in_1.png",
@@ -179,4 +170,4 @@
     "threshold": 0.8,
     "threshold": 0.8,
     "description": "更换"
     "description": "更换"
   }
   }
-]
+]

BIN
tasks/Component/CostumeShikigami/sk1/sk1_sou_switch_sure_1.png


+ 1 - 10
tasks/Component/CostumeShikigami/sk10/image.json

@@ -62,15 +62,6 @@
     "threshold": 0.8,
     "threshold": 0.8,
     "description": "第四组切换"
     "description": "第四组切换"
   },
   },
-  {
-    "itemName": "sou_switch_sure_10",
-    "imageName": "sk10_sou_switch_sure_10.png",
-    "roiFront": "669,401,190,61",
-    "roiBack": "669,401,190,61",
-    "method": "Template matching",
-    "threshold": 0.8,
-    "description": "确认切换"
-  },
   {
   {
     "itemName": "sou_check_in_10",
     "itemName": "sou_check_in_10",
     "imageName": "sk10_sou_check_in_10.png",
     "imageName": "sk10_sou_check_in_10.png",
@@ -179,4 +170,4 @@
     "threshold": 0.8,
     "threshold": 0.8,
     "description": "更换"
     "description": "更换"
   }
   }
-]
+]

BIN
tasks/Component/CostumeShikigami/sk10/sk10_sou_switch_sure_10.png


+ 1 - 10
tasks/Component/CostumeShikigami/sk11/image.json

@@ -125,15 +125,6 @@
     "threshold": 0.8,
     "threshold": 0.8,
     "description": "description"
     "description": "description"
   },
   },
-  {
-    "itemName": "sou_switch_sure_11",
-    "imageName": "sk11_sou_switch_sure_11.png",
-    "roiFront": "702,401,116,55",
-    "roiBack": "690,399,148,64",
-    "method": "Template matching",
-    "threshold": 0.8,
-    "description": "description"
-  },
   {
   {
     "itemName": "soul_preset_11",
     "itemName": "soul_preset_11",
     "imageName": "sk11_soul_preset_11.png",
     "imageName": "sk11_soul_preset_11.png",
@@ -179,4 +170,4 @@
     "threshold": 0.8,
     "threshold": 0.8,
     "description": "description"
     "description": "description"
   }
   }
-]
+]

BIN
tasks/Component/CostumeShikigami/sk11/sk11_sou_switch_sure_11.png


+ 1 - 10
tasks/Component/CostumeShikigami/sk12/image.json

@@ -125,15 +125,6 @@
     "threshold": 0.8,
     "threshold": 0.8,
     "description": "description"
     "description": "description"
   },
   },
-  {
-    "itemName": "sou_switch_sure_12",
-    "imageName": "sk12_sou_switch_sure_12.png",
-    "roiFront": "702,401,116,55",
-    "roiBack": "690,399,148,64",
-    "method": "Template matching",
-    "threshold": 0.8,
-    "description": "description"
-  },
   {
   {
     "itemName": "soul_preset_12",
     "itemName": "soul_preset_12",
     "imageName": "sk12_soul_preset_12.png",
     "imageName": "sk12_soul_preset_12.png",
@@ -179,4 +170,4 @@
     "threshold": 0.8,
     "threshold": 0.8,
     "description": "description"
     "description": "description"
   }
   }
-]
+]

BIN
tasks/Component/CostumeShikigami/sk12/sk12_sou_switch_sure_12.png


+ 1 - 10
tasks/Component/CostumeShikigami/sk2/image.json

@@ -62,15 +62,6 @@
     "threshold": 0.8,
     "threshold": 0.8,
     "description": "description"
     "description": "description"
   },
   },
-  {
-    "itemName": "sou_switch_sure_2",
-    "imageName": "sk2_sou_switch_sure_2.png",
-    "roiFront": "668,401,180,61",
-    "roiBack": "668,401,180,61",
-    "method": "Template matching",
-    "threshold": 0.8,
-    "description": "description"
-  },
   {
   {
     "itemName": "sou_check_in_2",
     "itemName": "sou_check_in_2",
     "imageName": "sk2_sou_check_in_2.png",
     "imageName": "sk2_sou_check_in_2.png",
@@ -179,4 +170,4 @@
     "threshold": 0.8,
     "threshold": 0.8,
     "description": "更换"
     "description": "更换"
   }
   }
-]
+]

BIN
tasks/Component/CostumeShikigami/sk2/sk2_sou_switch_sure_2.png


+ 1 - 10
tasks/Component/CostumeShikigami/sk3/image.json

@@ -62,15 +62,6 @@
     "threshold": 0.8,
     "threshold": 0.8,
     "description": "description"
     "description": "description"
   },
   },
-  {
-    "itemName": "sou_switch_sure_3",
-    "imageName": "sk3_sou_switch_sure_3.png",
-    "roiFront": "668,401,180,61",
-    "roiBack": "668,401,180,61",
-    "method": "Template matching",
-    "threshold": 0.8,
-    "description": "description"
-  },
   {
   {
     "itemName": "sou_check_in_3",
     "itemName": "sou_check_in_3",
     "imageName": "sk3_sou_check_in_3.png",
     "imageName": "sk3_sou_check_in_3.png",
@@ -179,4 +170,4 @@
     "threshold": 0.8,
     "threshold": 0.8,
     "description": "更换"
     "description": "更换"
   }
   }
-]
+]

BIN
tasks/Component/CostumeShikigami/sk3/sk3_sou_switch_sure_3.png


+ 1 - 10
tasks/Component/CostumeShikigami/sk4/image.json

@@ -62,15 +62,6 @@
     "threshold": 0.8,
     "threshold": 0.8,
     "description": "description"
     "description": "description"
   },
   },
-  {
-    "itemName": "sou_switch_sure_4",
-    "imageName": "sk4_sou_switch_sure_4.png",
-    "roiFront": "668,401,180,61",
-    "roiBack": "668,401,180,61",
-    "method": "Template matching",
-    "threshold": 0.8,
-    "description": "description"
-  },
   {
   {
     "itemName": "sou_check_in_4",
     "itemName": "sou_check_in_4",
     "imageName": "sk4_sou_check_in_4.png",
     "imageName": "sk4_sou_check_in_4.png",
@@ -179,4 +170,4 @@
     "threshold": 0.8,
     "threshold": 0.8,
     "description": "更换"
     "description": "更换"
   }
   }
-]
+]

BIN
tasks/Component/CostumeShikigami/sk4/sk4_sou_switch_sure_4.png


+ 1 - 10
tasks/Component/CostumeShikigami/sk5/image.json

@@ -62,15 +62,6 @@
     "threshold": 0.8,
     "threshold": 0.8,
     "description": "description"
     "description": "description"
   },
   },
-  {
-    "itemName": "sou_switch_sure_5",
-    "imageName": "sk5_sou_switch_sure_5.png",
-    "roiFront": "668,401,180,61",
-    "roiBack": "668,401,180,61",
-    "method": "Template matching",
-    "threshold": 0.8,
-    "description": "description"
-  },
   {
   {
     "itemName": "sou_check_in_5",
     "itemName": "sou_check_in_5",
     "imageName": "sk5_sou_check_in_5.png",
     "imageName": "sk5_sou_check_in_5.png",
@@ -179,4 +170,4 @@
     "threshold": 0.8,
     "threshold": 0.8,
     "description": "更换"
     "description": "更换"
   }
   }
-]
+]

BIN
tasks/Component/CostumeShikigami/sk5/sk5_sou_switch_sure_5.png


+ 1 - 10
tasks/Component/CostumeShikigami/sk6/image.json

@@ -62,15 +62,6 @@
     "threshold": 0.8,
     "threshold": 0.8,
     "description": "description"
     "description": "description"
   },
   },
-  {
-    "itemName": "sou_switch_sure_6",
-    "imageName": "sk6_sou_switch_sure_6.png",
-    "roiFront": "668,401,180,61",
-    "roiBack": "668,401,180,61",
-    "method": "Template matching",
-    "threshold": 0.8,
-    "description": "description"
-  },
   {
   {
     "itemName": "sou_check_in_6",
     "itemName": "sou_check_in_6",
     "imageName": "sk6_sou_check_in_6.png",
     "imageName": "sk6_sou_check_in_6.png",
@@ -179,4 +170,4 @@
     "threshold": 0.8,
     "threshold": 0.8,
     "description": "更换"
     "description": "更换"
   }
   }
-]
+]

BIN
tasks/Component/CostumeShikigami/sk6/sk6_sou_switch_sure_6.png


+ 1 - 10
tasks/Component/CostumeShikigami/sk7/image.json

@@ -62,15 +62,6 @@
     "threshold": 0.8,
     "threshold": 0.8,
     "description": "description"
     "description": "description"
   },
   },
-  {
-    "itemName": "sou_switch_sure_7",
-    "imageName": "sk7_sou_switch_sure_7.png",
-    "roiFront": "668,401,180,61",
-    "roiBack": "668,401,180,61",
-    "method": "Template matching",
-    "threshold": 0.8,
-    "description": "description"
-  },
   {
   {
     "itemName": "sou_check_in_7",
     "itemName": "sou_check_in_7",
     "imageName": "sk7_sou_check_in_7.png",
     "imageName": "sk7_sou_check_in_7.png",
@@ -179,4 +170,4 @@
     "threshold": 0.8,
     "threshold": 0.8,
     "description": "更换"
     "description": "更换"
   }
   }
-]
+]

BIN
tasks/Component/CostumeShikigami/sk7/sk7_sou_switch_sure_7.png


+ 1 - 10
tasks/Component/CostumeShikigami/sk8/image.json

@@ -62,15 +62,6 @@
     "threshold": 0.8,
     "threshold": 0.8,
     "description": "第四组切换"
     "description": "第四组切换"
   },
   },
-  {
-    "itemName": "sou_switch_sure_8",
-    "imageName": "sk8_sou_switch_sure_8.png",
-    "roiFront": "668,401,180,61",
-    "roiBack": "668,401,180,61",
-    "method": "Template matching",
-    "threshold": 0.8,
-    "description": "确认切换"
-  },
   {
   {
     "itemName": "sou_check_in_8",
     "itemName": "sou_check_in_8",
     "imageName": "sk8_sou_check_in_8.png",
     "imageName": "sk8_sou_check_in_8.png",
@@ -179,4 +170,4 @@
     "threshold": 0.8,
     "threshold": 0.8,
     "description": "更换"
     "description": "更换"
   }
   }
-]
+]

BIN
tasks/Component/CostumeShikigami/sk8/sk8_sou_switch_sure_8.png


+ 1 - 10
tasks/Component/CostumeShikigami/sk9/image.json

@@ -62,15 +62,6 @@
     "threshold": 0.8,
     "threshold": 0.8,
     "description": "第四组切换"
     "description": "第四组切换"
   },
   },
-  {
-    "itemName": "sou_switch_sure_9",
-    "imageName": "sk9_sou_switch_sure_9.png",
-    "roiFront": "669,401,190,61",
-    "roiBack": "669,401,190,61",
-    "method": "Template matching",
-    "threshold": 0.8,
-    "description": "确认切换"
-  },
   {
   {
     "itemName": "sou_check_in_9",
     "itemName": "sou_check_in_9",
     "imageName": "sk9_sou_check_in_9.png",
     "imageName": "sk9_sou_check_in_9.png",
@@ -179,4 +170,4 @@
     "threshold": 0.8,
     "threshold": 0.8,
     "description": "更换"
     "description": "更换"
   }
   }
-]
+]

BIN
tasks/Component/CostumeShikigami/sk9/sk9_sou_switch_sure_9.png


+ 5 - 6
tasks/Component/GeneralBattle/general_battle.py

@@ -19,7 +19,6 @@ from tasks.Component.GeneralBuff.general_buff import GeneralBuff
 from tasks.Component.GeneralBattle.battle_wait import BattleWait
 from tasks.Component.GeneralBattle.battle_wait import BattleWait
 
 
 from module.logger import logger
 from module.logger import logger
-from tasks.GlobalGame.assets import GlobalGameAssets
 
 
 
 
 class GeneralBattle(BattleWait, GeneralBuff):
 class GeneralBattle(BattleWait, GeneralBuff):
@@ -103,18 +102,18 @@ class GeneralBattle(BattleWait, GeneralBuff):
             self.screenshot()
             self.screenshot()
             if self.appear_then_click(self.I_EXIT, interval=1.5):
             if self.appear_then_click(self.I_EXIT, interval=1.5):
                 continue
                 continue
-            if self.appear(GlobalGameAssets.I_UI_CONFIRM):
+            if self.appear(self.I_UI_CONFIRM):
                 break
                 break
         logger.info(f"Click {self.I_EXIT.name}")
         logger.info(f"Click {self.I_EXIT.name}")
 
 
         # 点击返回确认
         # 点击返回确认
         while 1:
         while 1:
             self.screenshot()
             self.screenshot()
-            if self.appear_then_click(GlobalGameAssets.I_UI_CONFIRM, interval=1.5):
+            if self.appear_then_click(self.I_UI_CONFIRM, interval=1.5):
                 continue
                 continue
             if self.appear(self.I_FALSE):
             if self.appear(self.I_FALSE):
                 break
                 break
-        logger.info(f"Click {GlobalGameAssets.I_UI_CONFIRM.name}")
+        logger.info(f"Click {self.I_UI_CONFIRM.name}")
 
 
         # 点击失败确认
         # 点击失败确认
         self.wait_until_appear(self.I_FALSE)
         self.wait_until_appear(self.I_FALSE)
@@ -145,13 +144,13 @@ class GeneralBattle(BattleWait, GeneralBuff):
             self.screenshot()
             self.screenshot()
             if self.appear_then_click(self.I_EXIT, interval=1.5):
             if self.appear_then_click(self.I_EXIT, interval=1.5):
                 continue
                 continue
-            if self.appear(GlobalGameAssets.I_UI_CONFIRM):
+            if self.appear(self.I_UI_CONFIRM):
                 break
                 break
 
 
         # 点击返回确认
         # 点击返回确认
         while 1:
         while 1:
             self.screenshot()
             self.screenshot()
-            if self.appear_then_click(GlobalGameAssets.I_UI_CONFIRM, interval=1.5):
+            if self.appear_then_click(self.I_UI_CONFIRM, interval=1.5):
                 continue
                 continue
             if self.appear_then_click(self.I_FALSE, interval=1.5):
             if self.appear_then_click(self.I_FALSE, interval=1.5):
                 continue
                 continue

+ 0 - 1
tasks/Component/SwitchSoul/assets.py

@@ -43,7 +43,6 @@ class SwitchSoulAssets:
 	# description 
 	# description 
 	I_SOU_SWITCH_4 = RuleImage(roi_front=(978,603,25,22), roi_back=(962,592,53,34), threshold=0.8, method="Template matching", file="./tasks/Component/SwitchSoul/ss/ss_sou_switch_4.png")
 	I_SOU_SWITCH_4 = RuleImage(roi_front=(978,603,25,22), roi_back=(962,592,53,34), threshold=0.8, method="Template matching", file="./tasks/Component/SwitchSoul/ss/ss_sou_switch_4.png")
 	# description 
 	# description 
-	I_SOU_SWITCH_SURE = RuleImage(roi_front=(668,401,180,61), roi_back=(668,401,180,61), threshold=0.8, method="Template matching", file="./tasks/Component/SwitchSoul/ss/ss_sou_switch_sure.png")
 	# 用于判断是否在式神录里面 
 	# 用于判断是否在式神录里面 
 	I_SOU_CHECK_IN = RuleImage(roi_front=(269,69,50,49), roi_back=(269,69,50,49), threshold=0.8, method="Template matching", file="./tasks/Component/SwitchSoul/ss/ss_sou_check_in.png")
 	I_SOU_CHECK_IN = RuleImage(roi_front=(269,69,50,49), roi_back=(269,69,50,49), threshold=0.8, method="Template matching", file="./tasks/Component/SwitchSoul/ss/ss_sou_check_in.png")
 	# description 
 	# description 

+ 1 - 10
tasks/Component/SwitchSoul/ss/image.json

@@ -53,15 +53,6 @@
     "threshold": 0.8,
     "threshold": 0.8,
     "description": "description"
     "description": "description"
   },
   },
-  {
-    "itemName": "sou_switch_sure",
-    "imageName": "ss_sou_switch_sure.png",
-    "roiFront": "668,401,180,61",
-    "roiBack": "668,401,180,61",
-    "method": "Template matching",
-    "threshold": 0.8,
-    "description": "description"
-  },
   {
   {
     "itemName": "sou_check_in",
     "itemName": "sou_check_in",
     "imageName": "ss_sou_check_in.png",
     "imageName": "ss_sou_check_in.png",
@@ -170,4 +161,4 @@
     "threshold": 0.8,
     "threshold": 0.8,
     "description": "通用进入式神录"
     "description": "通用进入式神录"
   }
   }
-]
+]

BIN
tasks/Component/SwitchSoul/ss/ss_sou_switch_sure.png


+ 5 - 5
tasks/Component/SwitchSoul/switch_soul.py

@@ -154,19 +154,19 @@ class SwitchSoul(BaseTask, SwitchSoulAssets):
         for i in range(3):
         for i in range(3):
             sleep(0.8)
             sleep(0.8)
             self.screenshot()
             self.screenshot()
-            if self.appear(self.I_SOU_SWITCH_SURE):
+            if self.appear(self.I_UI_CONFIRM):
                 while 1:
                 while 1:
-                    self.click(self.I_SOU_SWITCH_SURE, 3)
+                    self.click(self.I_UI_CONFIRM, 3)
                     self.screenshot()
                     self.screenshot()
                     if self.appear_then_click(self.I_CHECK_BLOCK, 3):
                     if self.appear_then_click(self.I_CHECK_BLOCK, 3):
                         continue
                         continue
-                    if not self.appear(self.I_SOU_SWITCH_SURE):
+                    if not self.appear(self.I_UI_CONFIRM):
                         break
                         break
                 continue
                 continue
             if not self.appear_then_click(target_team, interval=3):
             if not self.appear_then_click(target_team, interval=3):
                 logger.warning(f'Click team {team} failed in group {group}')
                 logger.warning(f'Click team {team} failed in group {group}')
         # 兜底若还出现确认按钮则点击
         # 兜底若还出现确认按钮则点击
-        self.ui_click_until_disappear(self.I_SOU_SWITCH_SURE)
+        self.ui_click_until_disappear(self.I_UI_CONFIRM)
         logger.info(f'Switch soul_one group {group} team {team}')
         logger.info(f'Switch soul_one group {group} team {team}')
 
 
     def switch_souls(self, target: tuple or list[tuple]) -> None:
     def switch_souls(self, target: tuple or list[tuple]) -> None:
@@ -275,7 +275,7 @@ class SwitchSoul(BaseTask, SwitchSoulAssets):
             self.screenshot()
             self.screenshot()
             if cnt_click >= 4:
             if cnt_click >= 4:
                 break
                 break
-            if self.appear_then_click(self.I_SOU_SWITCH_SURE, interval=0.8):
+            if self.appear_then_click(self.I_UI_CONFIRM, interval=0.8):
                 continue
                 continue
             if self.ocr_appear_click_by_rule(self.O_SS_TEAM_NAME, self.I_SOU_CLICK_PRESENT, interval=1.5):
             if self.ocr_appear_click_by_rule(self.O_SS_TEAM_NAME, self.I_SOU_CLICK_PRESENT, interval=1.5):
                 cnt_click += 1
                 cnt_click += 1

+ 1 - 2
tasks/Duel/script_task.py

@@ -7,7 +7,6 @@ import random
 from datetime import time, datetime, timedelta
 from datetime import time, datetime, timedelta
 
 
 from module.logger import logger
 from module.logger import logger
-from tasks.GlobalGame.assets import GlobalGameAssets
 from module.exception import TaskEnd
 from module.exception import TaskEnd
 from module.base.timer import Timer
 from module.base.timer import Timer
 
 
@@ -208,7 +207,7 @@ class ScriptTask(GameUi, GeneralBattle, SwitchSoul, DuelAssets, SwitchOnmyoji):
             self.screenshot()
             self.screenshot()
             if self.appear(self.I_D_FAIL) or self.appear(self.I_FALSE):
             if self.appear(self.I_D_FAIL) or self.appear(self.I_FALSE):
                 return
                 return
-            if self.appear_then_click(GlobalGameAssets.I_UI_CONFIRM):
+            if self.appear_then_click(self.I_UI_CONFIRM):
                 continue
                 continue
             # 选式神界面退出或战斗内退出
             # 选式神界面退出或战斗内退出
             if self.appear_then_click(self.I_DUEL_EXIT, interval=1) or self.appear_then_click(self.I_EXIT, interval=1):
             if self.appear_then_click(self.I_DUEL_EXIT, interval=1) or self.appear_then_click(self.I_EXIT, interval=1):

+ 10 - 11
tasks/RealmRaid/script_task.py

@@ -10,7 +10,6 @@ from tasks.Component.GeneralBattle.general_battle import GeneralBattle
 from tasks.GameUi.game_ui import GameUi
 from tasks.GameUi.game_ui import GameUi
 from tasks.GameUi.page import page_realm_raid, page_main, page_shikigami_records
 from tasks.GameUi.page import page_realm_raid, page_main, page_shikigami_records
 from tasks.RealmRaid.assets import RealmRaidAssets
 from tasks.RealmRaid.assets import RealmRaidAssets
-from tasks.GlobalGame.assets import GlobalGameAssets
 from tasks.RealmRaid.config import RealmRaid, RaidMode, AttackNumber, WhenAttackFail
 from tasks.RealmRaid.config import RealmRaid, RaidMode, AttackNumber, WhenAttackFail
 from tasks.Component.SwitchSoul.switch_soul import SwitchSoul
 from tasks.Component.SwitchSoul.switch_soul import SwitchSoul
 from tasks.Component.GeneralBattle.battle_wait import battle_wait_strategy
 from tasks.Component.GeneralBattle.battle_wait import battle_wait_strategy
@@ -155,9 +154,9 @@ class ScriptTask(GeneralBattle, GameUi, SwitchSoul, RealmRaidAssets):
         while 1:
         while 1:
             self.screenshot()
             self.screenshot()
             #看到弹窗点掉,不然会卡死
             #看到弹窗点掉,不然会卡死
-            if self.appear(GlobalGameAssets.I_UI_CONFIRM):
+            if self.appear(self.I_UI_CONFIRM):
                 logger.info("Pop-up detected: Refresh Confirmation. Clicking Confirm.")
                 logger.info("Pop-up detected: Refresh Confirmation. Clicking Confirm.")
-                self.appear_then_click(GlobalGameAssets.I_UI_CONFIRM, interval=1.5)
+                self.appear_then_click(self.I_UI_CONFIRM, interval=1.5)
                 continue
                 continue
             # 检查票数
             # 检查票数
             if not self.check_ticket(con.raid_config.number_base):
             if not self.check_ticket(con.raid_config.number_base):
@@ -180,10 +179,10 @@ class ScriptTask(GeneralBattle, GameUi, SwitchSoul, RealmRaidAssets):
                 else:
                 else:
                     logger.info('No one can attack, break')
                     logger.info('No one can attack, break')
                     # 检查是否有“刷新确认”弹窗挡路
                     # 检查是否有“刷新确认”弹窗挡路
-                    if self.appear(GlobalGameAssets.I_UI_CONFIRM):
+                    if self.appear(self.I_UI_CONFIRM):
                         logger.info("Closing obstructing refresh dialog (Click Ensure)...")
                         logger.info("Closing obstructing refresh dialog (Click Ensure)...")
                         # 点击“确定”来完成刷新(或者你可以改成点取消)
                         # 点击“确定”来完成刷新(或者你可以改成点取消)
-                        self.appear_then_click(GlobalGameAssets.I_UI_CONFIRM, interval=2)
+                        self.appear_then_click(self.I_UI_CONFIRM, interval=2)
                     success = False
                     success = False
                     break
                     break
             # 判断是不是左上角第一个
             # 判断是不是左上角第一个
@@ -460,15 +459,15 @@ class ScriptTask(GeneralBattle, GameUi, SwitchSoul, RealmRaidAssets):
             return False
             return False
         while 1:
         while 1:
             self.screenshot()
             self.screenshot()
-            if self.appear(GlobalGameAssets.I_UI_CONFIRM):
+            if self.appear(self.I_UI_CONFIRM):
                 break
                 break
             if self.appear_then_click(self.I_FRESH, interval=1):
             if self.appear_then_click(self.I_FRESH, interval=1):
                 continue
                 continue
         while 1:
         while 1:
             self.screenshot()
             self.screenshot()
-            if not self.appear(GlobalGameAssets.I_UI_CONFIRM):
+            if not self.appear(self.I_UI_CONFIRM):
                 return True
                 return True
-            if self.appear_then_click(GlobalGameAssets.I_UI_CONFIRM, interval=1):
+            if self.appear_then_click(self.I_UI_CONFIRM, interval=1):
                 continue
                 continue
 
 
     def fire(self, order: int):
     def fire(self, order: int):
@@ -484,8 +483,8 @@ class ScriptTask(GeneralBattle, GameUi, SwitchSoul, RealmRaidAssets):
             
             
             logger.info("Title not found! Checking for popups or rewards...")
             logger.info("Title not found! Checking for popups or rewards...")
             
             
-            # 如果看到了“刷新确认”弹窗 (GlobalGameAssets.I_UI_CONFIRM 是右边的确定)
-            if self.appear(GlobalGameAssets.I_UI_CONFIRM):
+            # 如果看到了“刷新确认”弹窗 (self.I_UI_CONFIRM 是右边的确定)
+            if self.appear(self.I_UI_CONFIRM):
                 logger.info("Refresh popup detected! Clicking CANCEL (Red Button).")
                 logger.info("Refresh popup detected! Clicking CANCEL (Red Button).")
                 # 点击“取消”按钮的坐标 (基于1280x720分辨率)
                 # 点击“取消”按钮的坐标 (基于1280x720分辨率)
                 self.device.click(x=530, y=460) 
                 self.device.click(x=530, y=460) 
@@ -507,7 +506,7 @@ class ScriptTask(GeneralBattle, GameUi, SwitchSoul, RealmRaidAssets):
             self.screenshot()
             self.screenshot()
             
             
             # 双重保险:如果在进攻阶段又弹出了窗口,也把它关掉
             # 双重保险:如果在进攻阶段又弹出了窗口,也把它关掉
-            if self.appear(GlobalGameAssets.I_UI_CONFIRM):
+            if self.appear(self.I_UI_CONFIRM):
                 logger.info("Refresh popup blocking attack! Clicking CANCEL.")
                 logger.info("Refresh popup blocking attack! Clicking CANCEL.")
                 self.device.click(x=530, y=460) # 点取消
                 self.device.click(x=530, y=460) # 点取消
                 time.sleep(1.0)
                 time.sleep(1.0)