Explorar o código

Merge pull request #1350 from DCGO2/x89rt2-patch-2

Update BT25_043.cs
x89rt2 hai 3 meses
pai
achega
fe5d23c7d3
Modificáronse 1 ficheiros con 26 adicións e 26 borrados
  1. 26 26
      Assets/Scripts/CardEffect/BT25/Yellow/BT25_043.cs

+ 26 - 26
Assets/Scripts/CardEffect/BT25/Yellow/BT25_043.cs

@@ -85,7 +85,7 @@ namespace DCGO.CardEffects.BT25
                         IEnumerator SuccessProcess(List<CardSource> cardSources)
                         {
                             yield return ContinuousController.instance.StartCoroutine(new IUnsuspendPermanents(new List<Permanent>() { card.PermanentOfThisCard() }, activateClass).Unsuspend());
-                        }                   
+                        }
                     }
                 }
             }
@@ -134,7 +134,7 @@ namespace DCGO.CardEffects.BT25
                             destroySecurityCount: 1,
                             cardEffect: activateClass,
                             fromTop: true).DestroySecurity());
-                            
+
                     foreach (Permanent permanent in removedPermanents)
                     {
                         permanent.willBeRemoveField = false;
@@ -183,31 +183,31 @@ namespace DCGO.CardEffects.BT25
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
                 {
                     #region DP minus single target
-                    Permanent selectedPermament = null;
-
-                    int maxCount = Math.Min(1, CardEffectCommons.MatchConditionOpponentsPermanentCount(card, CanSelectPermanentCondition));
-                    SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
-
-                    selectPermanentEffect.SetUp(
-                        selectPlayer: card.Owner,
-                        canTargetCondition: CanSelectPermanentCondition,
-                        canTargetCondition_ByPreSelecetedList: null,
-                        canEndSelectCondition: null,
-                        maxCount: maxCount,
-                        canNoSelect: false,
-                        canEndNotMax: false,
-                        selectPermanentCoroutine: null,
-                        afterSelectPermanentCoroutine: AfterSelectPermanentCoroutine,
-                        mode: SelectPermanentEffect.Mode.Custom,
-                        cardEffect: activateClass);
-
-                    selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to -8K DP", "The opponent is selecting 1 Digimon to -8K DP");
-                    yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
-
-                    IEnumerator AfterSelectPermanentCoroutine(List<Permanent> permanents)
+                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
                     {
-                        if (selectedPermament != null) yield return ContinuousController.instance.StartCoroutine(
-                            CardEffectCommons.ChangeDigimonDP(selectedPermament, -8000, EffectDuration.UntilEachTurnEnd, activateClass));
+                        SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectPermanentCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: 1,
+                            canNoSelect: false,
+                            canEndNotMax: false,
+                            selectPermanentCoroutine: SelectPermanentCoroutine,
+                            afterSelectPermanentCoroutine: null,
+                            mode: SelectPermanentEffect.Mode.Custom,
+                            cardEffect: activateClass);
+
+                        selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to -8K DP", "The opponent is selecting 1 Digimon to -8K DP");
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                        IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                        {
+                            if (permanent != null) yield return ContinuousController.instance.StartCoroutine(
+                                CardEffectCommons.ChangeDigimonDP(permanent, -8000, EffectDuration.UntilEachTurnEnd, activateClass));
+                        }
                     }
                     #endregion