Browse Source

fix orochi_lock and update ryou toppa

endlesswxk 3 năm trước cách đây
mục cha
commit
bc9db279eb

+ 1 - 1
script.py

@@ -321,7 +321,7 @@ class Script:
                     if not self.wait_until(task.next_run):
                     if not self.wait_until(task.next_run):
                         del_cached_property(self, 'config')
                         del_cached_property(self, 'config')
                         continue
                         continue
-                    self.run('start')
+                    self.run('Restart')
                 elif method == 'goto_main':
                 elif method == 'goto_main':
                     logger.info('Goto main page during wait')
                     logger.info('Goto main page during wait')
                     self.run('GotoMain')
                     self.run('GotoMain')

+ 4 - 4
tasks/Orochi/o/image.json

@@ -20,8 +20,8 @@
   {
   {
     "itemName": "orochi_lock",
     "itemName": "orochi_lock",
     "imageName": "o_orochi_lock.png",
     "imageName": "o_orochi_lock.png",
-    "roiFront": "573,559,31,32",
-    "roiBack": "548,554,65,54",
+    "roiFront": "557,563,31,32",
+    "roiBack": "548,554,101,54",
     "method": "Template matching",
     "method": "Template matching",
     "threshold": 0.8,
     "threshold": 0.8,
     "description": "description"
     "description": "description"
@@ -29,8 +29,8 @@
   {
   {
     "itemName": "orochi_unlock",
     "itemName": "orochi_unlock",
     "imageName": "o_orochi_unlock.png",
     "imageName": "o_orochi_unlock.png",
-    "roiFront": "575,558,26,29",
-    "roiBack": "560,553,56,40",
+    "roiFront": "562,564,26,29",
+    "roiBack": "550,553,100,51",
     "method": "Template matching",
     "method": "Template matching",
     "threshold": 0.8,
     "threshold": 0.8,
     "description": "description"
     "description": "description"

BIN
tasks/Orochi/o/o_orochi_lock.png


BIN
tasks/Orochi/o/o_orochi_unlock.png


+ 1 - 1
tasks/RealmRaid/res/image.json

@@ -56,7 +56,7 @@
   {
   {
     "itemName": "medal_0",
     "itemName": "medal_0",
     "imageName": "res_medal_0.png",
     "imageName": "res_medal_0.png",
-    "roiFront": "510,336,202,51",
+    "roiFront": "536,336,176,51",
     "roiBack": "231,200,898,336",
     "roiBack": "231,200,898,336",
     "method": "Template matching",
     "method": "Template matching",
     "threshold": 0.8,
     "threshold": 0.8,

BIN
tasks/RealmRaid/res/res_medal_0.png


+ 8 - 1
tasks/RyouToppa/script_task.py

@@ -42,6 +42,7 @@ class ScriptTask(GeneralBattle, GameUi, SwitchSoul, RyouToppaAssets):
         self.ui_get_current_page()
         self.ui_get_current_page()
         self.ui_goto(page_kekkai_toppa)
         self.ui_goto(page_kekkai_toppa)
         ryou_toppa_start_flag = True
         ryou_toppa_start_flag = True
+        ryou_toppa_success_penetration = False
         # 点击突破
         # 点击突破
         while 1:
         while 1:
             self.screenshot()
             self.screenshot()
@@ -55,6 +56,7 @@ class ScriptTask(GeneralBattle, GameUi, SwitchSoul, RyouToppaAssets):
             # 攻破阴阳寮,说明寮突已开,则退出
             # 攻破阴阳寮,说明寮突已开,则退出
             elif self.appear(self.I_SUCCESS_PENETRATION, threshold=0.8):
             elif self.appear(self.I_SUCCESS_PENETRATION, threshold=0.8):
                 ryou_toppa_start_flag = True
                 ryou_toppa_start_flag = True
+                ryou_toppa_success_penetration = True
                 break
                 break
             # 出现选择寮突说明寮突未开
             # 出现选择寮突说明寮突未开
             elif self.appear(self.I_SELECT_RYOU_BUTTON, threshold=0.8):
             elif self.appear(self.I_SELECT_RYOU_BUTTON, threshold=0.8):
@@ -70,6 +72,11 @@ class ScriptTask(GeneralBattle, GameUi, SwitchSoul, RyouToppaAssets):
             # 开寮突
             # 开寮突
             self.start_ryou_toppa()
             self.start_ryou_toppa()
 
 
+        # 100% 攻破, 第二天再执行
+        if ryou_toppa_success_penetration:
+            self.set_next_run(task='RyouToppa', finish=True, success=True)
+            raise TaskEnd
+
         # 开始突破
         # 开始突破
         while 1:
         while 1:
             if self.execute_round():
             if self.execute_round():
@@ -81,7 +88,7 @@ class ScriptTask(GeneralBattle, GameUi, SwitchSoul, RyouToppaAssets):
         # self.ui_current = page_ryou_toppa
         # self.ui_current = page_ryou_toppa
         # self.ui_goto(page_main)
         # self.ui_goto(page_main)
 
 
-        self.set_next_run(task='RyouToppa', finish=True, success=True)
+        self.set_next_run(task='RyouToppa', finish=True, server=False, success=True)
         raise TaskEnd
         raise TaskEnd
 
 
     def start_ryou_toppa(self):
     def start_ryou_toppa(self):