Sfoglia il codice sorgente

Merge pull request #679 from rwerplus/feature/dev

适配鏖刀禁府庭院皮肤
huangrunheng 1 anno fa
parent
commit
3907b1d925

BIN
tasks/ActivityShikigami/as/as_antivity_win.png


BIN
tasks/ActivityShikigami/as/as_shi.png


+ 1 - 1
tasks/ActivityShikigami/as/image.json

@@ -2,7 +2,7 @@
   {
     "itemName": "shi",
     "imageName": "as_shi.png",
-    "roiFront": "520,265,33,34",
+    "roiFront": "476,387,33,34",
     "roiBack": "64,115,1110,427",
     "method": "Template matching",
     "threshold": 0.7,

+ 1 - 1
tasks/ActivityShikigami/assets.py

@@ -45,7 +45,7 @@ class ActivityShikigamiAssets:
 
 	# Image Rule Assets
 	# 进入活动 
-	I_SHI = RuleImage(roi_front=(520,265,33,34), roi_back=(64,115,1110,427), threshold=0.7, method="Template matching", file="./tasks/ActivityShikigami/as/as_shi.png")
+	I_SHI = RuleImage(roi_front=(476,387,33,34), roi_back=(64,115,1110,427), threshold=0.7, method="Template matching", file="./tasks/ActivityShikigami/as/as_shi.png")
 	# 左上角返回 
 	I_BACK_GREEN = RuleImage(roi_front=(23,27,44,44), roi_back=(23,27,44,44), threshold=0.8, method="Template matching", file="./tasks/ActivityShikigami/as/as_back_green.png")
 	# 进入爬塔 

+ 13 - 0
tasks/Component/Costume/assets.py

@@ -36,6 +36,19 @@ class CostumeAssets:
 	I_PET_HOUSE_10 = RuleImage(roi_front=(954,425,40,35), roi_back=(737,401,440,69), threshold=0.8, method="Template matching", file="./tasks/Component/Costume/main10/main10_pet_house_10.png")
 
 
+	# Image Rule Assets
+	# description 
+	I_CHECK_MAIN_11 = RuleImage(roi_front=(680,128,83,33), roi_back=(149,109,1099,100), threshold=0.8, method="Template matching", file="./tasks/Component/Costume/main11/main11_check_main_11.png")
+	# description 
+	I_MAIN_GOTO_EXPLORATION_11 = RuleImage(roi_front=(522,113,21,34), roi_back=(192,105,904,66), threshold=0.6, method="Template matching", file="./tasks/Component/Costume/main11/main11_main_goto_exploration_11.png")
+	#  
+	I_MAIN_GOTO_SUMMON_11 = RuleImage(roi_front=(946,111,20,37), roi_back=(500,102,623,68), threshold=0.6, method="Template matching", file="./tasks/Component/Costume/main11/main11_main_goto_summon_11.png")
+	# 町中 
+	I_MAIN_GOTO_TOWN_11 = RuleImage(roi_front=(701,164,36,20), roi_back=(262,145,999,78), threshold=0.7, method="Template matching", file="./tasks/Component/Costume/main11/main11_main_goto_town_11.png")
+	# 宠物室 
+	I_PET_HOUSE_11 = RuleImage(roi_front=(946,335,40,35), roi_back=(729,323,440,69), threshold=0.8, method="Template matching", file="./tasks/Component/Costume/main11/main11_pet_house_11.png")
+
+
 	# Image Rule Assets
 	# description 
 	I_CHECK_MAIN_2 = RuleImage(roi_front=(1090,146,48,55), roi_back=(880,108,271,100), threshold=0.8, method="Template matching", file="./tasks/Component/Costume/main2/main2_check_main_2.png")

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

@@ -17,6 +17,7 @@ class MainType(str, Enum):
     COSTUME_MAIN_8 = 'costume_main_8'  # 远海航船
     COSTUME_MAIN_9 = 'costume_main_9'  # 结缘神社
     COSTUME_MAIN_10 = 'costume_main_10'  # 望月幽庭
+    COSTUME_MAIN_11 = 'costume_main_11'  # 鏖刀禁府
 
 # 结界皮肤
 class RealmType(str, Enum):

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

@@ -63,6 +63,11 @@ main_costume_model = {
                                'I_MAIN_GOTO_SUMMON': 'I_MAIN_GOTO_SUMMON_10',
                                'I_MAIN_GOTO_TOWN': 'I_MAIN_GOTO_TOWN_10',
                                'I_PET_HOUSE': 'I_PET_HOUSE_10', },
+    MainType.COSTUME_MAIN_11: {'I_CHECK_MAIN': 'I_CHECK_MAIN_11',
+                               'I_MAIN_GOTO_EXPLORATION': 'I_MAIN_GOTO_EXPLORATION_11',
+                               'I_MAIN_GOTO_SUMMON': 'I_MAIN_GOTO_SUMMON_11',
+                               'I_MAIN_GOTO_TOWN': 'I_MAIN_GOTO_TOWN_11',
+                               'I_PET_HOUSE': 'I_PET_HOUSE_11', },
 }
 
 # 结界皮肤

+ 47 - 0
tasks/Component/Costume/main11/image.json

@@ -0,0 +1,47 @@
+[
+  {
+    "itemName": "check_main_11",
+    "imageName": "main11_check_main_11.png",
+    "roiFront": "680,128,83,33",
+    "roiBack": "149,109,1099,100",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "description"
+  },
+  {
+    "itemName": "main_goto_exploration_11",
+    "imageName": "main11_main_goto_exploration_11.png",
+    "roiFront": "522,113,21,34",
+    "roiBack": "192,105,904,66",
+    "method": "Template matching",
+    "threshold": 0.6,
+    "description": "description"
+  },
+  {
+    "itemName": "main_goto_summon_11",
+    "imageName": "main11_main_goto_summon_11.png",
+    "roiFront": "946,111,20,37",
+    "roiBack": "500,102,623,68",
+    "method": "Template matching",
+    "threshold": 0.6,
+    "description": ""
+  },
+  {
+    "itemName": "main_goto_town_11",
+    "imageName": "main11_main_goto_town_11.png",
+    "roiFront": "701,164,36,20",
+    "roiBack": "262,145,999,78",
+    "method": "Template matching",
+    "threshold": 0.7,
+    "description": "町中"
+  },
+  {
+    "itemName": "pet_house_11",
+    "imageName": "main11_pet_house_11.png",
+    "roiFront": "946,335,40,35",
+    "roiBack": "729,323,440,69",
+    "method": "Template matching",
+    "threshold": 0.8,
+    "description": "宠物室"
+  }
+]

BIN
tasks/Component/Costume/main11/main11_check_main_11.png


BIN
tasks/Component/Costume/main11/main11_main_goto_exploration_11.png


BIN
tasks/Component/Costume/main11/main11_main_goto_summon_11.png


BIN
tasks/Component/Costume/main11/main11_main_goto_town_11.png


BIN
tasks/Component/Costume/main11/main11_pet_house_11.png


+ 3 - 3
tasks/Component/GeneralBattle/general_battle.py

@@ -73,14 +73,14 @@ class GeneralBattle(GeneralBuff, GeneralBattleAssets):
         else:
             return False
 
-    def run_general_battle_back(self, config: GeneralBattleConfig = None) -> bool:
+    def run_general_battle_back(self, config: GeneralBattleConfig = None, exit_four: bool = False) -> bool:
         """
         进入挑战然后直接返回
         :param config:
         :return:
         """
-        # 如果没有锁定队伍那么在点击准备后才退出的
-        if not config.lock_team_enable:
+        # 如果没有锁定队伍那么在点击准备后才退出的,退四的话就直接退出
+        if not config.lock_team_enable and not exit_four:
             # 点击准备按钮
             self.wait_until_appear(self.I_PREPARE_HIGHLIGHT)
             while 1:

+ 4 - 4
tasks/RealmRaid/script_task.py

@@ -184,13 +184,13 @@ class ScriptTask(GeneralBattle, GameUi, SwitchSoul, RealmRaidAssets):
                 if con.raid_config.exit_four:
                     logger.info('Exit four enable')
                     self.fire(index)
-                    self.run_general_battle_back(con.general_battle_config)
+                    self.run_general_battle_back(con.general_battle_config, exit_four=True)
                     self.fire(index)
-                    self.run_general_battle_back(con.general_battle_config)
+                    self.run_general_battle_back(con.general_battle_config, exit_four=True)
                     self.fire(index)
-                    self.run_general_battle_back(con.general_battle_config)
+                    self.run_general_battle_back(con.general_battle_config, exit_four=True)
                     self.fire(index)
-                    self.run_general_battle_back(con.general_battle_config)
+                    self.run_general_battle_back(con.general_battle_config, exit_four=True)
             elif self.check_medal_is_frog(frog, medal, index):
                 # 如果挑战的这只是呱太的话,就要把锁定改为不锁定
                 con.general_battle_config.lock_team_enable = False

+ 4 - 3
tasks/WantedQuests/script_task.py

@@ -192,10 +192,11 @@ class ScriptTask(WQExplore, SecretScriptTask, WantedQuestsAssets):
             if self.special_main and self.click(self.C_SPECIAL_MAIN, interval=3):
                 logger.info('Click special main left to find wanted quests')
                 continue
+            if not (self.appear(self.I_WQ_INVITE_1) or self.appear(self.I_WQ_INVITE_2) or self.appear(
+                    self.I_WQ_INVITE_3)):
+                logger.info("there is no cooperation quest")
+                break
         #
-        if not (self.appear(self.I_WQ_INVITE_1) or self.appear(self.I_WQ_INVITE_2) or self.appear(self.I_WQ_INVITE_3)):
-            logger.info("there is no cooperation quest")
-            return False
 
         # if self.appear(self.I_WQ_INVITE_1):
         #     self.trace_one(self.I_WQ_INVITE_1)