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

Removed double instance of exist on field checks

BennAbbot 5 месяцев назад
Родитель
Сommit
e455d42012

+ 1 - 4
Assets/Scripts/CardEffect/BT12/Blue/BT12_021.cs

@@ -171,9 +171,7 @@ namespace DCGO.CardEffects.BT12
                 {
                     if (isExistOnField(card))
                     {
-                        if (card.Owner.GetBattleAreaDigimons().Contains(card.PermanentOfThisCard()))
-                        {
-                            yield return ContinuousController.instance.StartCoroutine(
+                        yield return ContinuousController.instance.StartCoroutine(
                              CardEffectCommons.DNADigivolvePermanentsIntoHandOrTrashCard(
                                  CanSelectCardCondition,
                                  payCost: true,
@@ -181,7 +179,6 @@ namespace DCGO.CardEffects.BT12
                                  activateClass,
                                  permanentConditions: new Func<Permanent, bool>[] { (permanent) => permanent == card.PermanentOfThisCard() }
                              ));
-                        }
                     }
                 }
             }

+ 8 - 11
Assets/Scripts/CardEffect/BT12/Green/BT12_047.cs

@@ -171,17 +171,14 @@ namespace DCGO.CardEffects.BT12
                 {
                     if (isExistOnField(card))
                     {
-                        if (card.Owner.GetBattleAreaDigimons().Contains(card.PermanentOfThisCard()))
-                        {
-                            yield return ContinuousController.instance.StartCoroutine(
-                             CardEffectCommons.DNADigivolvePermanentsIntoHandOrTrashCard(
-                                 CanSelectCardCondition,
-                                 payCost: true,
-                                 isHand: true,
-                                 activateClass,
-                                 permanentConditions: new Func<Permanent, bool>[] { (permanent) => permanent == card.PermanentOfThisCard() }
-                             ));
-                        }
+                        yield return ContinuousController.instance.StartCoroutine(
+                            CardEffectCommons.DNADigivolvePermanentsIntoHandOrTrashCard(
+                                CanSelectCardCondition,
+                                payCost: true,
+                                isHand: true,
+                                activateClass,
+                                permanentConditions: new Func<Permanent, bool>[] { (permanent) => permanent == card.PermanentOfThisCard() }
+                            ));
                     }
                 }
             }

+ 8 - 11
Assets/Scripts/CardEffect/BT17/Blue/BT17_019.cs

@@ -176,17 +176,14 @@ namespace DCGO.CardEffects.BT17
                 {
                     if (isExistOnField(card))
                     {
-                        if (card.Owner.GetBattleAreaDigimons().Contains(card.PermanentOfThisCard()))
-                        {
-                            yield return ContinuousController.instance.StartCoroutine(
-                                  CardEffectCommons.DNADigivolvePermanentsIntoHandOrTrashCard(
-                                      CanSelectCardCondition,
-                                      payCost: true,
-                                      isHand: true,
-                                      activateClass,
-                                      permanentConditions: new Func<Permanent, bool>[] { (permanent) => permanent == card.PermanentOfThisCard() }
-                                  ));
-                        }
+                        yield return ContinuousController.instance.StartCoroutine(
+                              CardEffectCommons.DNADigivolvePermanentsIntoHandOrTrashCard(
+                                  CanSelectCardCondition,
+                                  payCost: true,
+                                  isHand: true,
+                                  activateClass,
+                                  permanentConditions: new Func<Permanent, bool>[] { (permanent) => permanent == card.PermanentOfThisCard() }
+                              ));
                     }
                 }
             }

+ 1 - 4
Assets/Scripts/CardEffect/BT17/Red/BT17_007.cs

@@ -219,9 +219,7 @@ namespace DCGO.CardEffects.BT17
                 {
                     if (isExistOnField(card))
                     {
-                        if (card.Owner.GetBattleAreaDigimons().Contains(card.PermanentOfThisCard()))
-                        {
-                            yield return ContinuousController.instance.StartCoroutine(
+                        yield return ContinuousController.instance.StartCoroutine(
                                              CardEffectCommons.DNADigivolvePermanentsIntoHandOrTrashCard(
                                                  CanSelectCardCondition,
                                                  payCost: true,
@@ -229,7 +227,6 @@ namespace DCGO.CardEffects.BT17
                                                  activateClass,
                                                  permanentConditions: new Func<Permanent, bool>[] { (permanent) => permanent == card.PermanentOfThisCard() }
                                              ));
-                        }
                     }
                 }
             }

+ 1 - 4
Assets/Scripts/CardEffect/BT21/Green/BT21_046.cs

@@ -189,9 +189,7 @@ namespace DCGO.CardEffects.BT21
                 {
                     if (isExistOnField(card))
                     {
-                        if (card.Owner.GetBattleAreaDigimons().Contains(card.PermanentOfThisCard()))
-                        {
-                            yield return ContinuousController.instance.StartCoroutine(
+                        yield return ContinuousController.instance.StartCoroutine(
                                              CardEffectCommons.DNADigivolvePermanentsIntoHandOrTrashCard(
                                                  CanSelectCardCondition,
                                                  payCost: true,
@@ -199,7 +197,6 @@ namespace DCGO.CardEffects.BT21
                                                  activateClass,
                                                  permanentConditions: new Func<Permanent, bool>[] { (permanent) => permanent == card.PermanentOfThisCard() }
                                              ));
-                        }
                     }
                 }
             }

+ 8 - 11
Assets/Scripts/CardEffect/BT22/Blue/BT22_017.cs

@@ -168,17 +168,14 @@ namespace DCGO.CardEffects.BT22
                 {
                     if (isExistOnField(card))
                     {
-                        if (card.Owner.GetBattleAreaDigimons().Contains(card.PermanentOfThisCard()))
-                        {
-                            yield return ContinuousController.instance.StartCoroutine(
-                                             CardEffectCommons.DNADigivolvePermanentsIntoHandOrTrashCard(
-                                                 CanSelectCardCondition,
-                                                 payCost: true,
-                                                 isHand: true,
-                                                 activateClass,
-                                                 permanentConditions: new Func<Permanent, bool>[] { (permanent) => permanent == card.PermanentOfThisCard() }
-                                             ));
-                        }
+                        yield return ContinuousController.instance.StartCoroutine(
+                                            CardEffectCommons.DNADigivolvePermanentsIntoHandOrTrashCard(
+                                                CanSelectCardCondition,
+                                                payCost: true,
+                                                isHand: true,
+                                                activateClass,
+                                                permanentConditions: new Func<Permanent, bool>[] { (permanent) => permanent == card.PermanentOfThisCard() }
+                                            ));
                     }
                 }
             }

+ 8 - 11
Assets/Scripts/CardEffect/BT22/Red/BT22_008.cs

@@ -172,17 +172,14 @@ namespace DCGO.CardEffects.BT22
                 {
                     if (isExistOnField(card))
                     {
-                        if (card.Owner.GetBattleAreaDigimons().Contains(card.PermanentOfThisCard()))
-                        {
-                            yield return ContinuousController.instance.StartCoroutine(
-                                             CardEffectCommons.DNADigivolvePermanentsIntoHandOrTrashCard(
-                                                 CanSelectCardCondition,
-                                                 payCost: true,
-                                                 isHand: true,
-                                                 activateClass,
-                                                 permanentConditions: new Func<Permanent, bool>[] { (permanent) => permanent == card.PermanentOfThisCard() }
-                                             ));
-                        }
+                        yield return ContinuousController.instance.StartCoroutine(
+                                         CardEffectCommons.DNADigivolvePermanentsIntoHandOrTrashCard(
+                                             CanSelectCardCondition,
+                                             payCost: true,
+                                             isHand: true,
+                                             activateClass,
+                                             permanentConditions: new Func<Permanent, bool>[] { (permanent) => permanent == card.PermanentOfThisCard() }
+                                         ));
                     }
                 }
             }

+ 9 - 12
Assets/Scripts/CardEffect/BT8/Blue/BT8_020.cs

@@ -75,19 +75,16 @@ public class BT8_020 : CEntity_Effect
 
             IEnumerator ActivateCoroutine(Hashtable _hashtable)
             {
-                if (CardEffectCommons.IsExistOnBattleArea(card))
+                if (isExistOnField(card))
                 {
-                    if (card.Owner.GetBattleAreaDigimons().Contains(card.PermanentOfThisCard()))
-                    {
-                        yield return ContinuousController.instance.StartCoroutine(
-                                         CardEffectCommons.DNADigivolvePermanentsIntoHandOrTrashCard(
-                                             CanSelectCardCondition,
-                                             payCost: true,
-                                             isHand: true,
-                                             activateClass,
-                                             permanentConditions: new Func<Permanent, bool>[] { (permanent) => permanent == card.PermanentOfThisCard() }
-                                         ));
-                    }
+                    yield return ContinuousController.instance.StartCoroutine(
+                                     CardEffectCommons.DNADigivolvePermanentsIntoHandOrTrashCard(
+                                         CanSelectCardCondition,
+                                         payCost: true,
+                                         isHand: true,
+                                         activateClass,
+                                         permanentConditions: new Func<Permanent, bool>[] { (permanent) => permanent == card.PermanentOfThisCard() }
+                                     ));
                 }
             }
         }

+ 8 - 11
Assets/Scripts/CardEffect/BT9/Purple/BT9_080.cs

@@ -228,17 +228,14 @@ public class BT9_080 : CEntity_Effect
             {
                 if (isExistOnField(card))
                 {
-                    if (card.Owner.GetBattleAreaDigimons().Contains(card.PermanentOfThisCard()))
-                    {
-                        yield return ContinuousController.instance.StartCoroutine(
-                                         CardEffectCommons.DNADigivolvePermanentsIntoHandOrTrashCard(
-                                             CanSelectCardCondition,
-                                             payCost: true,
-                                             isHand: true,
-                                             activateClass,
-                                             permanentConditions: new Func<Permanent, bool>[] { (permanent) => permanent == card.PermanentOfThisCard() }
-                                         ));
-                    }
+                    yield return ContinuousController.instance.StartCoroutine(
+                                        CardEffectCommons.DNADigivolvePermanentsIntoHandOrTrashCard(
+                                            CanSelectCardCondition,
+                                            payCost: true,
+                                            isHand: true,
+                                            activateClass,
+                                            permanentConditions: new Func<Permanent, bool>[] { (permanent) => permanent == card.PermanentOfThisCard() }
+                                        ));
                 }
             }
         }

+ 1 - 4
Assets/Scripts/CardEffect/EX3/Blue/EX3_020.cs

@@ -161,9 +161,7 @@ namespace DCGO.CardEffects.EX3
                 {
                     if (isExistOnField(card))
                     {
-                        if (card.Owner.GetBattleAreaDigimons().Contains(card.PermanentOfThisCard()))
-                        {
-                            yield return ContinuousController.instance.StartCoroutine(
+                        yield return ContinuousController.instance.StartCoroutine(
                                              CardEffectCommons.DNADigivolvePermanentsIntoHandOrTrashCard(
                                                  CanSelectCardCondition,
                                                  payCost: true,
@@ -171,7 +169,6 @@ namespace DCGO.CardEffects.EX3
                                                  activateClass,
                                                  permanentConditions: new Func<Permanent, bool>[] { (permanent) => permanent == card.PermanentOfThisCard(), (permanent) => permanent != card.PermanentOfThisCard() && permanent.TopCard.HasDramonName }
                                              ));
-                        }
                     }
                 }
             }

+ 8 - 11
Assets/Scripts/CardEffect/EX3/Green/EX3_041.cs

@@ -161,17 +161,14 @@ namespace DCGO.CardEffects.EX3
                 {
                     if (isExistOnField(card))
                     {
-                        if (card.Owner.GetBattleAreaDigimons().Contains(card.PermanentOfThisCard()))
-                        {
-                            yield return ContinuousController.instance.StartCoroutine(
-                                             CardEffectCommons.DNADigivolvePermanentsIntoHandOrTrashCard(
-                                                 CanSelectCardCondition,
-                                                 payCost: true,
-                                                 isHand: true,
-                                                 activateClass,
-                                                 permanentConditions: new Func<Permanent, bool>[] { (permanent) => permanent == card.PermanentOfThisCard(), (permanent) => permanent != card.PermanentOfThisCard() && permanent.TopCard.HasDramonName }
-                                             ));
-                        }
+                        yield return ContinuousController.instance.StartCoroutine(
+                                              CardEffectCommons.DNADigivolvePermanentsIntoHandOrTrashCard(
+                                                  CanSelectCardCondition,
+                                                  payCost: true,
+                                                  isHand: true,
+                                                  activateClass,
+                                                  permanentConditions: new Func<Permanent, bool>[] { (permanent) => permanent == card.PermanentOfThisCard(), (permanent) => permanent != card.PermanentOfThisCard() && permanent.TopCard.HasDramonName }
+                                              ));
                     }
                 }
             }

+ 8 - 11
Assets/Scripts/CardEffect/ST10/Yellow/ST10_04.cs

@@ -212,17 +212,14 @@ public class ST10_04 : CEntity_Effect
             {
                 if (isExistOnField(card))
                 {
-                    if (card.Owner.GetBattleAreaDigimons().Contains(card.PermanentOfThisCard()))
-                    {
-                        yield return ContinuousController.instance.StartCoroutine(
-                         CardEffectCommons.DNADigivolvePermanentsIntoHandOrTrashCard(
-                             CanSelectCardCondition,
-                             payCost: true,
-                             isHand: true,
-                             activateClass,
-                             permanentConditions: new Func<Permanent, bool>[] { (permanent) => permanent == card.PermanentOfThisCard() }
-                         ));
-                    }
+                    yield return ContinuousController.instance.StartCoroutine(
+                        CardEffectCommons.DNADigivolvePermanentsIntoHandOrTrashCard(
+                            CanSelectCardCondition,
+                            payCost: true,
+                            isHand: true,
+                            activateClass,
+                            permanentConditions: new Func<Permanent, bool>[] { (permanent) => permanent == card.PermanentOfThisCard() }
+                        ));
                 }
             }
         }

+ 1 - 4
Assets/Scripts/CardEffect/ST13/Black/ST13_13.cs

@@ -121,9 +121,7 @@ public class ST13_13 : CEntity_Effect
             {
                 if (isExistOnField(card))
                 {
-                    if (card.Owner.GetBattleAreaDigimons().Contains(card.PermanentOfThisCard()))
-                    {
-                        yield return ContinuousController.instance.StartCoroutine(
+                    yield return ContinuousController.instance.StartCoroutine(
                                          CardEffectCommons.DNADigivolvePermanentsIntoHandOrTrashCard(
                                              CanSelectCardCondition,
                                              payCost: true,
@@ -131,7 +129,6 @@ public class ST13_13 : CEntity_Effect
                                              activateClass,
                                              permanentConditions: new Func<Permanent, bool>[] { (permanent) => permanent == card.PermanentOfThisCard() }
                                          ));
-                    }
                 }
             }
         }

+ 8 - 11
Assets/Scripts/CardEffect/ST13/Red/ST13_04.cs

@@ -129,17 +129,14 @@ public class ST13_04 : CEntity_Effect
             {
                 if (isExistOnField(card))
                 {
-                    if (card.Owner.GetBattleAreaDigimons().Contains(card.PermanentOfThisCard()))
-                    {
-                        yield return ContinuousController.instance.StartCoroutine(
-                                         CardEffectCommons.DNADigivolvePermanentsIntoHandOrTrashCard(
-                                             CanSelectCardCondition,
-                                             payCost: true,
-                                             isHand: true,
-                                             activateClass,
-                                             permanentConditions: new Func<Permanent, bool>[] { (permanent) => permanent == card.PermanentOfThisCard() }
-                                         ));
-                    }
+                    yield return ContinuousController.instance.StartCoroutine(
+                                          CardEffectCommons.DNADigivolvePermanentsIntoHandOrTrashCard(
+                                              CanSelectCardCondition,
+                                              payCost: true,
+                                              isHand: true,
+                                              activateClass,
+                                              permanentConditions: new Func<Permanent, bool>[] { (permanent) => permanent == card.PermanentOfThisCard() }
+                                          ));
                 }
             }
         }