فهرست منبع

Merge pull request #421 from yEs1do/fix(KA&KU_too_many_card)

跳过相同星级结界卡
huangrunheng 2 سال پیش
والد
کامیت
1204baa0bd
2فایلهای تغییر یافته به همراه4 افزوده شده و 4 حذف شده
  1. 2 2
      tasks/KekkaiActivation/script_task.py
  2. 2 2
      tasks/KekkaiUtilize/script_task.py

+ 2 - 2
tasks/KekkaiActivation/script_task.py

@@ -317,8 +317,8 @@ class ScriptTask(KU, KekkaiActivationAssets):
         if last_best is not None:
         if last_best is not None:
             last_index = self.order_cards.index(last_best)
             last_index = self.order_cards.index(last_best)
             current_index = self.order_cards.index(current_card)
             current_index = self.order_cards.index(current_card)
-            if current_index > last_index:
-                # 不比上一张卡好就退出不执行操作
+            if current_index >= last_index:
+                # 不比上一张卡好就退出不执行操作,相同星级卡亦跳过
                 logger.info('Current card is not better than last best card')
                 logger.info('Current card is not better than last best card')
                 return last_best
                 return last_best
 
 

+ 2 - 2
tasks/KekkaiUtilize/script_task.py

@@ -365,8 +365,8 @@ class ScriptTask(GameUi, ReplaceShikigami, KekkaiUtilizeAssets):
             if last_best is not None:
             if last_best is not None:
                 last_index = self.order_cards.index(last_best)
                 last_index = self.order_cards.index(last_best)
                 current_index = self.order_cards.index(card_class)
                 current_index = self.order_cards.index(card_class)
-                if current_index > last_index:
-                    # 不比上一张卡好就退出不执行操作
+                if current_index >= last_index:
+                    # 不比上一张卡好就退出不执行操作,相同星级卡亦跳过
                     logger.info('Current card is not better than last best card')
                     logger.info('Current card is not better than last best card')
                     return last_best
                     return last_best
             logger.info('Current select card: %s', card_class)
             logger.info('Current select card: %s', card_class)