Просмотр исходного кода

Update BT25_029.cs

Fixed nor refreshing OPT.
x89rt2 3 месяцев назад
Родитель
Сommit
8d6ddd5c2d
1 измененных файлов с 12 добавлено и 3 удалено
  1. 12 3
      Assets/Scripts/CardEffect/BT25/Blue/BT25_029.cs

+ 12 - 3
Assets/Scripts/CardEffect/BT25/Blue/BT25_029.cs

@@ -38,7 +38,7 @@ namespace DCGO.CardEffects.BT25
             #region Shared WD/WA
             string SharedEffectName = "May return 1 enemy level 5 or lower digimon to hand, then by trashing bottom face down under a tamer, return 1 enemy lowest level digimon to hand";
             string SharedEffectDescription(string tag) => $"[{tag}] [Once Per Turn] You may return 1 of your opponent's level 5 or lower Digimon to the hand. Then, by trashing the bottom face-down card under any of your Tamers, return 1 of your opponent's lowest level Digimon to the hand.";
-            string SharedHashValue = "BT25-029-WD/WA";
+            string SharedHashValue = "BT25_029_WD_WA";
 
             CardEffectFactory.ActivateClassesForSharedEffects
                 (ref cardEffects, timing, card,
@@ -62,6 +62,8 @@ namespace DCGO.CardEffects.BT25
 
                 bool LowestLevelPermanentCondition(Permanent permanent) => CardEffectCommons.IsMinLevel(permanent, card.Owner.Enemy);
 
+                bool Used = false;
+
                 if (CardEffectCommons.HasMatchConditionOpponentsPermanent(card, Level5OrLowerPermanentCondition))
                 {
                     SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
@@ -74,12 +76,18 @@ namespace DCGO.CardEffects.BT25
                         canNoSelect: true,
                         canEndNotMax: false,
                         selectPermanentCoroutine: null,
-                        afterSelectPermanentCoroutine: null,
+                        afterSelectPermanentCoroutine: AfterSelectPermanentCoroutine,
                         mode: SelectPermanentEffect.Mode.Bounce,
                         cardEffect: activateClass);
 
                     selectPermanentEffect.SetUpCustomMessage("Select 1 opponent's Digimon to return to hand", "The opponent is selecting 1 Digimon to return to hand");
                     yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                    IEnumerator AfterSelectPermanentCoroutine(List<Permanent> permanent)
+                    {
+                        Used = true;
+                        return null;
+                    }
                 }
 
                 if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, TamerWithFaceDownCardCondition))
@@ -141,12 +149,13 @@ namespace DCGO.CardEffects.BT25
                                 yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
                             }
 
+                            Used = true;
                         }
                     }
                 }
 
+                if (!Used) activateClass.RemoveUse();
             }
-
             #endregion
 
             #region All Turns