Lewisaaronwelch 11 місяців тому
батько
коміт
4f57c09e3a

+ 79 - 67
Assets/CardEffect/EX10/Black/EX10_031.cs

@@ -28,6 +28,7 @@ namespace DCGO.CardEffects.EX10
             #endregion
 
             #region Digixros
+
             if (timing == EffectTiming.None)
             {
                 AddDigiXrosConditionClass addDigiXrosConditionClass = new AddDigiXrosConditionClass();
@@ -97,6 +98,75 @@ namespace DCGO.CardEffects.EX10
                     return null;
                 }
             }
+
+            #endregion
+
+            #region Shared OP/WD
+
+            bool SharedPermamentCondition(Permanent permanent)
+            {
+                return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card);
+            }
+
+            IEnumerator SharedActivateCoroutine(Hashtable hashtable, ActivateClass activateClass)
+            {
+                if (CardEffectCommons.HasMatchConditionPermanent(SharedPermamentCondition))
+                {
+                    Permanent selectedPermament = null;
+
+                    int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(SharedPermamentCondition));
+
+                    SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                    selectPermanentEffect.SetUp(
+                        selectPlayer: card.Owner,
+                        canTargetCondition: SharedPermamentCondition,
+                        canTargetCondition_ByPreSelecetedList: null,
+                        canEndSelectCondition: null,
+                        maxCount: maxCount,
+                        canNoSelect: false,
+                        canEndNotMax: false,
+                        selectPermanentCoroutine: SelectPermanentCoroutine,
+                        afterSelectPermanentCoroutine: null,
+                        mode: SelectPermanentEffect.Mode.Custom,
+                        cardEffect: activateClass);
+
+                    IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                    {
+                        selectedPermament = permanent;
+                        yield return null;
+                    }
+
+                    selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to gain De-Digivolve immunity & 3K DP", "The opponent is selecting 1 Digimon to gain De-Digivolve immunity & 3K DP");
+                    yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                    if (selectedPermament != null)
+                    {
+                        bool CanUseImmunityCondition(Hashtable hashtable1)
+                        {
+                            return selectedPermament.TopCard != null;
+                        }
+
+                        bool PermanentImmunityCondition(Permanent permanent)
+                        {
+                            return permanent == selectedPermament;
+                        }
+
+                        ImmuneFromDeDigivolveClass immuneFromDeDigivolveClass = new ImmuneFromDeDigivolveClass();
+                        immuneFromDeDigivolveClass.SetUpICardEffect("Isn't affected by <De-Digivolve>", CanUseImmunityCondition, selectedPermament.TopCard);
+                        immuneFromDeDigivolveClass.SetUpImmuneFromDeDigivolveClass(PermanentCondition: PermanentImmunityCondition);
+                        selectedPermament.UntilOpponentTurnEndEffects.Add((_timing) => immuneFromDeDigivolveClass);
+
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ChangeDigimonDP(
+                            targetPermanent: selectedPermament,
+                            changeValue: 3000,
+                            effectDuration: EffectDuration.UntilOpponentTurnEnd,
+                            activateClass: activateClass
+                        ));
+                    }
+                }
+            }
+
             #endregion
 
             #region On Play
@@ -105,7 +175,7 @@ namespace DCGO.CardEffects.EX10
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Gain immunity to De-Digivolve & gain 3k DP", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                activateClass.SetUpActivateClass(CanActivateCondition, (hashtable) => SharedActivateCoroutine(hashtable, activateClass), -1, false, EffectDiscription());
                 cardEffects.Add(activateClass);
 
                 string EffectDiscription()
@@ -121,38 +191,8 @@ namespace DCGO.CardEffects.EX10
 
                 bool CanActivateCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
-                }
-
-                void ActivateDeDigivolveProtection()
-                {
-                    Permanent thisPermanent = card.PermanentOfThisCard();
-
-                    bool CanUseImmunityCondition(Hashtable hashtable1)
-                    {
-                        return thisPermanent.TopCard != null;
-                    }
-
-                    bool PermanentImmunityCondition(Permanent permanent)
-                    {
-                        return permanent == thisPermanent;
-                    }
-
-                    ImmuneFromDeDigivolveClass immuneFromDeDigivolveClass = new ImmuneFromDeDigivolveClass();
-                    immuneFromDeDigivolveClass.SetUpICardEffect("Isn't affected by <De-Digivolve>", CanUseImmunityCondition, thisPermanent.TopCard);
-                    immuneFromDeDigivolveClass.SetUpImmuneFromDeDigivolveClass(PermanentCondition: PermanentImmunityCondition);
-                    thisPermanent.UntilOpponentTurnEndEffects.Add(_ => immuneFromDeDigivolveClass);
-                }
-
-                IEnumerator ActivateCoroutine(Hashtable hashtable)
-                {
-                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ChangeDigimonDP(
-                        targetPermanent: card.PermanentOfThisCard(), 
-                        changeValue: 3000, 
-                        effectDuration: EffectDuration.UntilOpponentTurnEnd, 
-                        activateClass: activateClass));
-
-                    ActivateDeDigivolveProtection();
+                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card)
+                        && CardEffectCommons.HasMatchConditionPermanent(SharedPermamentCondition);
                 }
             }
 
@@ -164,7 +204,7 @@ namespace DCGO.CardEffects.EX10
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Gain immunity to De-Digivolve & gain 3k DP", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                activateClass.SetUpActivateClass(CanActivateCondition, (hashtable) => SharedActivateCoroutine(hashtable, activateClass), -1, false, EffectDiscription());
                 cardEffects.Add(activateClass);
 
                 string EffectDiscription()
@@ -180,44 +220,15 @@ namespace DCGO.CardEffects.EX10
 
                 bool CanActivateCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
-                }
-
-                void ActivateDeDigivolveProtection()
-                {
-                    Permanent thisPermanent = card.PermanentOfThisCard();
-
-                    bool CanUseImmunityCondition(Hashtable hashtable1)
-                    {
-                        return thisPermanent.TopCard != null;
-                    }
-
-                    bool PermanentImmunityCondition(Permanent permanent)
-                    {
-                        return permanent == thisPermanent;
-                    }
-
-                    ImmuneFromDeDigivolveClass immuneFromDeDigivolveClass = new ImmuneFromDeDigivolveClass();
-                    immuneFromDeDigivolveClass.SetUpICardEffect("Isn't affected by <De-Digivolve>", CanUseImmunityCondition, thisPermanent.TopCard);
-                    immuneFromDeDigivolveClass.SetUpImmuneFromDeDigivolveClass(PermanentCondition: PermanentImmunityCondition);
-                    thisPermanent.UntilOpponentTurnEndEffects.Add(_ => immuneFromDeDigivolveClass);
-                }
-
-                IEnumerator ActivateCoroutine(Hashtable hashtable)
-                {
-                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ChangeDigimonDP(
-                        targetPermanent: card.PermanentOfThisCard(),
-                        changeValue: 3000,
-                        effectDuration: EffectDuration.UntilOpponentTurnEnd,
-                        activateClass: activateClass));
-
-                    ActivateDeDigivolveProtection();
+                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card)
+                        && CardEffectCommons.HasMatchConditionPermanent(SharedPermamentCondition);
                 }
             }
 
             #endregion
 
             #region All Turns - OPT
+
             if (timing == EffectTiming.WhenPermanentWouldBeDeleted)
             {
                 ActivateClass activateClass = new ActivateClass();
@@ -235,7 +246,7 @@ namespace DCGO.CardEffects.EX10
                 {
                     return cardSource.IsDigimon &&
                            cardSource.HasPlayCost && cardSource.GetCostItself <= 4 &&
-                           CardEffectCommons.CanPlayAsNewPermanent(cardSource, false, activateClass,SelectCardEffect.Root.DigivolutionCards);
+                           CardEffectCommons.CanPlayAsNewPermanent(cardSource, false, activateClass, SelectCardEffect.Root.DigivolutionCards);
                 }
 
                 bool CanUseCondition(Hashtable hashtable)
@@ -312,6 +323,7 @@ namespace DCGO.CardEffects.EX10
                                         activateETB: true));
                 }
             }
+
             #endregion
 
             #region ESS

+ 74 - 175
Assets/CardEffect/EX10/Black/EX10_035.cs

@@ -10,8 +10,10 @@ namespace DCGO.CardEffects.EX10
         public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
         {
             List<ICardEffect> cardEffects = new List<ICardEffect>();
+            ActivateClass deleteDigimonActivateClass = null;
 
             #region Hand - Main
+
             if (timing == EffectTiming.OnDeclaration)
             {
                 ActivateClass activateClass = new ActivateClass();
@@ -40,6 +42,7 @@ namespace DCGO.CardEffects.EX10
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
                 {
                     #region reduce play cost
+
                     if (card.Owner.CanReduceCost(null, card))
                         ContinuousController.instance.PlaySE(GManager.instance.GetComponent<Effects>().BuffSE);
 
@@ -77,7 +80,6 @@ namespace DCGO.CardEffects.EX10
                         {
                             return true;
                         }
-
                         else
                         {
                             if (targetPermanents.Count((targetPermanent) => targetPermanent != null) == 0)
@@ -103,6 +105,7 @@ namespace DCGO.CardEffects.EX10
                     {
                         return true;
                     }
+
                     #endregion
 
                     yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(
@@ -114,13 +117,12 @@ namespace DCGO.CardEffects.EX10
                                             activateETB: true));
 
                     #region Delete Digimon Played
+
                     Permanent selectedPermanent = card.PermanentOfThisCard();
 
-                    ActivateClass activateClass1 = new ActivateClass();
-                    activateClass1.SetUpICardEffect("Delete this Digimon", CanUseCondition2, selectedPermanent.TopCard);
-                    activateClass1.SetUpActivateClass(CanActivateCondition1, ActivateCoroutine1, -1, false, EffectDiscription1());
-                    activateClass1.SetEffectSourcePermanent(selectedPermanent);
-                    selectedPermanent.UntilOwnerTurnEndEffects.Add(GetCardEffect);
+                    deleteDigimonActivateClass.SetUpICardEffect("Delete this Digimon", CanUseCondition2, selectedPermanent.TopCard);
+                    deleteDigimonActivateClass.SetUpActivateClass(CanActivateCondition1, ActivateCoroutine1, -1, false, EffectDiscription1());
+                    deleteDigimonActivateClass.SetEffectSourcePermanent(selectedPermanent);
 
                     if (!selectedPermanent.TopCard.CanNotBeAffected(activateClass))
                     {
@@ -134,27 +136,19 @@ namespace DCGO.CardEffects.EX10
 
                     bool CanUseCondition2(Hashtable hashtable1)
                     {
-                        if (CardEffectCommons.IsOpponentTurn(card))
-                        {
-                            if (CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(selectedPermanent, selectedPermanent.TopCard))
-                            {
-                                if (CardEffectCommons.CanTriggerOnEndAttack(hashtable1, selectedPermanent.TopCard))
-                                {
-                                    return true;
-                                }
-                            }
-                        }
-
-                        return false;
+                        return CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(selectedPermanent, selectedPermanent.TopCard);
                     }
 
                     bool CanActivateCondition1(Hashtable hashtable1)
                     {
                         if (CardEffectCommons.IsPermanentExistsOnBattleArea(selectedPermanent))
                         {
-                            if (!selectedPermanent.TopCard.CanNotBeAffected(activateClass))
+                            if (CardEffectCommons.IsOwnerTurn(selectedPermanent.TopCard))
                             {
-                                return true;
+                                if (!selectedPermanent.TopCard.CanNotBeAffected(activateClass))
+                                {
+                                    return true;
+                                }
                             }
                         }
 
@@ -167,22 +161,23 @@ namespace DCGO.CardEffects.EX10
                         {
                             yield return ContinuousController.instance.StartCoroutine(new DestroyPermanentsClass(
                             new List<Permanent>() { selectedPermanent },
-                            CardEffectCommons.CardEffectHashtable(activateClass1)).Destroy());
+                            CardEffectCommons.CardEffectHashtable(deleteDigimonActivateClass)).Destroy());
                         }
                     }
 
-                    ICardEffect GetCardEffect(EffectTiming _timing)
-                    {
-                        if (_timing == EffectTiming.OnEndTurn)
-                        {
-                            return activateClass1;
-                        }
-
-                        return null;
-                    }
                     #endregion
                 }
             }
+
+            #endregion
+
+            #region End of Turn (Only used if Hand - Main was activated)
+
+            if (timing == EffectTiming.OnEndTurn && deleteDigimonActivateClass != null)
+            {
+                cardEffects.Add(deleteDigimonActivateClass);
+            }
+
             #endregion
 
             #region On Play/When Attacking Shared
@@ -194,62 +189,15 @@ namespace DCGO.CardEffects.EX10
 
             bool CanActivateSharedCondition(Hashtable hashtable)
             {
-                if (CardEffectCommons.IsExistOnBattleArea(card))
-                {
-                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
-                        return true;
-                }
-
-                return false;
+                return CardEffectCommons.IsExistOnBattleArea(card)
+                    && CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition);
             }
 
-            #endregion
-
-            #region On Play
-
-            if (timing == EffectTiming.OnEnterFieldAnyone)
+            IEnumerator SharedActivateCoroutine(Hashtable _hashtable, ActivateClass activateClass)
             {
-                ActivateClass activateClass = new ActivateClass();
-                activateClass.SetUpICardEffect("Return 1 suspended Digimon to the bottom of deck", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateSharedCondition, ActivateCoroutine, -1, false, EffectDescription());
-                cardEffects.Add(activateClass);
-
-                string EffectDescription()
-                {
-                    return "[On Play] Return 1 of your opponent's suspended Digimon to the bottom of the deck.";
-                }
-
-                bool CanUseCondition(Hashtable hashtable)
+                if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
                 {
-                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
-                }
-
-                IEnumerator ActivateCoroutine(Hashtable _hashtable)
-                {
-                    int degenrationMaxCount = 2;
-                    int degenrationCount = 0;
-
-                    SelectCountEffect selectCountEffect = GManager.instance.GetComponent<SelectCountEffect>();
-                    if (selectCountEffect != null)
-                    {
-                        selectCountEffect.SetUp(
-                            SelectPlayer: card.Owner,
-                            targetPermanent: null,
-                            MaxCount: degenrationMaxCount,
-                            CanNoSelect: false,
-                            Message: "How much will you De-Digivolve?",
-                            Message_Enemy: "The opponent is choosing how much to De-Digivolve.",
-                            SelectCountCoroutine: SelectCountCoroutine);
-
-                        yield return ContinuousController.instance.StartCoroutine(selectCountEffect.Activate());
-
-                        IEnumerator SelectCountCoroutine(int count)
-                        {
-                            degenrationCount = count;
-                            yield return null;
-                        }
-                    }
-
+                    List<Permanent> selectedPermaments = new List<Permanent>();
                     int maxCount = Math.Min(2, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
 
                     SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
@@ -258,140 +206,87 @@ namespace DCGO.CardEffects.EX10
                         selectPlayer: card.Owner,
                         canTargetCondition: CanSelectPermanentCondition,
                         canTargetCondition_ByPreSelecetedList: null,
-                        canEndSelectCondition: CanEndSelectCondition,
+                        canEndSelectCondition: null,
                         maxCount: maxCount,
                         canNoSelect: false,
-                        canEndNotMax: false,
+                        canEndNotMax: true,
                         selectPermanentCoroutine: SelectPermanentCoroutine,
                         afterSelectPermanentCoroutine: null,
                         mode: SelectPermanentEffect.Mode.Custom,
                         cardEffect: activateClass);
 
-                    selectPermanentEffect.SetUpCustomMessage("Select Digimons to De-Digivolve.", "The opponent is selecting Digimons to De-Digivolve.");
-
+                    selectPermanentEffect.SetUpCustomMessage("Select 2 Digimon to De-Digivolve.", "The opponent is selecting 2 Digimon to De-Digivolve.");
                     yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
 
-                    bool CanEndSelectCondition(List<Permanent> permanents)
+                    IEnumerator SelectPermanentCoroutine(Permanent permanent)
                     {
-                        if (permanents.Count <= 0)
-                        {
-                            return false;
-                        }
-
-                        return true;
-
+                        selectedPermaments.Add(permanent);
+                        yield return null;
                     }
 
-                    IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                    if (selectedPermaments.Any())
                     {
-                        Permanent selectedPermanent = permanent;
-
-                        if (selectedPermanent != null)
+                        foreach (var selectedPermanent in selectedPermaments)
                         {
-                            yield return ContinuousController.instance.StartCoroutine(new IDegeneration(selectedPermanent, degenrationCount, activateClass).Degeneration());
+                            if (selectedPermanent != null)
+                            {
+                                yield return ContinuousController.instance.StartCoroutine(new IDegeneration(selectedPermanent, 2, activateClass, true).Degeneration());
+                            }
                         }
-
-                        yield return null;
                     }
                 }
             }
 
             #endregion
 
-            #region When Attacking
+            #region On Play
 
-            if (timing == EffectTiming.OnAllyAttack)
+            if (timing == EffectTiming.OnEnterFieldAnyone)
             {
                 ActivateClass activateClass = new ActivateClass();
-                activateClass.SetUpICardEffect("Return 1 suspended Digimon to the bottom of deck", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateSharedCondition, ActivateCoroutine, -1, false, EffectDescription());
+                activateClass.SetUpICardEffect("De-digivolve 2, 2 digimon", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateSharedCondition, (hashtable) => SharedActivateCoroutine(hashtable, activateClass), -1, false, EffectDescription());
                 cardEffects.Add(activateClass);
 
                 string EffectDescription()
                 {
-                    return "[When Attacking] Return 1 of your opponent's suspended Digimon to the bottom of the deck.";
+                    return "[On Play] <De-Digivolve 2> 2 of your opponent's Digimon. (Trash up to 2 cards from the top. You can't trash past level 3 cards.)";
                 }
 
                 bool CanUseCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.CanTriggerOnAttack(hashtable, card);
+                    return CardEffectCommons.IsExistOnBattleArea(card)
+                        && CardEffectCommons.CanTriggerOnPlay(hashtable, card);
                 }
+            }
 
-                IEnumerator ActivateCoroutine(Hashtable _hashtable)
-                {
-                    int degenrationMaxCount = 2;
-                    int degenrationCount = 0;
-
-                    SelectCountEffect selectCountEffect = GManager.instance.GetComponent<SelectCountEffect>();
-                    if (selectCountEffect != null)
-                    {
-                        selectCountEffect.SetUp(
-                            SelectPlayer: card.Owner,
-                            targetPermanent: null,
-                            MaxCount: degenrationMaxCount,
-                            CanNoSelect: false,
-                            Message: "How much will you De-Digivolve?",
-                            Message_Enemy: "The opponent is choosing how much to De-Digivolve.",
-                            SelectCountCoroutine: SelectCountCoroutine);
-
-                        yield return ContinuousController.instance.StartCoroutine(selectCountEffect.Activate());
-
-                        IEnumerator SelectCountCoroutine(int count)
-                        {
-                            degenrationCount = count;
-                            yield return null;
-                        }
-                    }
-
-                    int maxCount = Math.Min(2, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
-
-                    SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
-
-                    selectPermanentEffect.SetUp(
-                        selectPlayer: card.Owner,
-                        canTargetCondition: CanSelectPermanentCondition,
-                        canTargetCondition_ByPreSelecetedList: null,
-                        canEndSelectCondition: CanEndSelectCondition,
-                        maxCount: maxCount,
-                        canNoSelect: false,
-                        canEndNotMax: false,
-                        selectPermanentCoroutine: SelectPermanentCoroutine,
-                        afterSelectPermanentCoroutine: null,
-                        mode: SelectPermanentEffect.Mode.Custom,
-                        cardEffect: activateClass);
-
-                    selectPermanentEffect.SetUpCustomMessage("Select Digimons to De-Digivolve.", "The opponent is selecting Digimons to De-Digivolve.");
-
-                    yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
-
-                    bool CanEndSelectCondition(List<Permanent> permanents)
-                    {
-                        if (permanents.Count <= 0)
-                        {
-                            return false;
-                        }
-
-                        return true;
+            #endregion
 
-                    }
+            #region When Attacking
 
-                    IEnumerator SelectPermanentCoroutine(Permanent permanent)
-                    {
-                        Permanent selectedPermanent = permanent;
+            if (timing == EffectTiming.OnAllyAttack)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("De-digivolve 2, 2 digimon", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateSharedCondition, (hashtable) => SharedActivateCoroutine(hashtable, activateClass), -1, false, EffectDescription());
+                cardEffects.Add(activateClass);
 
-                        if (selectedPermanent != null)
-                        {
-                            yield return ContinuousController.instance.StartCoroutine(new IDegeneration(selectedPermanent, degenrationCount, activateClass).Degeneration());
-                        }
+                string EffectDescription()
+                {
+                    return "[When Attacking] <De-Digivolve 2> 2 of your opponent's Digimon. (Trash up to 2 cards from the top. You can't trash past level 3 cards.)";
+                }
 
-                        yield return null;
-                    }
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnBattleArea(card)
+                        && CardEffectCommons.CanTriggerOnAttack(hashtable, card);
                 }
             }
 
             #endregion
 
             #region All Turns
+
             if (timing == EffectTiming.None)
             {
                 bool Condition()
@@ -420,15 +315,16 @@ namespace DCGO.CardEffects.EX10
                 effectName: "[All Turns] This Digimon can only digivolve into [Apocalymon].")
                 );
             }
+
             #endregion
 
             #region On Deletion
+
             if (timing == EffectTiming.OnDestroyedAnyone)
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Place this Digimon face up as bottom security, add top security to hand", CanUseCondition, card);
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
-                activateClass.SetIsInheritedEffect(true);
                 cardEffects.Add(activateClass);
 
                 string EffectDiscription()
@@ -436,7 +332,7 @@ namespace DCGO.CardEffects.EX10
                     return "[On Deletion] If you have no black face-up security cards, place this Digimon face up as the bottom security card.";
                 }
 
-                bool FaceUpGreen(CardSource card)
+                bool FaceUpBlack(CardSource card)
                 {
                     return card.IsFlipped &&
                            card.CardColors.Contains(CardColor.Black);
@@ -445,7 +341,7 @@ namespace DCGO.CardEffects.EX10
                 bool CanUseCondition(Hashtable hashtable)
                 {
                     return CardEffectCommons.CanTriggerOnDeletion(hashtable, card) &&
-                           !CardEffectCommons.HasMatchConditionOwnersSecurity(card, FaceUpGreen);
+                           !CardEffectCommons.HasMatchConditionOwnersSecurity(card, FaceUpBlack);
                 }
 
                 bool CanActivateCondition(Hashtable hashtable)
@@ -458,9 +354,11 @@ namespace DCGO.CardEffects.EX10
                     yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddSecurityCard(card, false, true));
                 }
             }
+
             #endregion
 
             #region Security
+
             if (timing == EffectTiming.SecuritySkill)
             {
                 ActivateClass activateClass = new ActivateClass();
@@ -485,6 +383,7 @@ namespace DCGO.CardEffects.EX10
                     yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.AddThisCardToHand(card, activateClass));
                 }
             }
+
             #endregion
 
             return cardEffects;

+ 3 - 3
Assets/CardEffect/EX10/Blue/EX10_012.cs

@@ -468,10 +468,10 @@ namespace DCGO.CardEffects.EX10
 
                 string EffectDiscription()
                 {
-                    return "[On Deletion] If you have no black face-up security cards, place this Digimon face up as the bottom security card.";
+                    return "[On Deletion] If you have no blue face-up security cards, place this Digimon face up as the bottom security card.";
                 }
 
-                bool FaceUpBlack(CardSource card)
+                bool FaceUpBlue(CardSource card)
                 {
                     return card.IsFlipped &&
                            card.CardColors.Contains(CardColor.Black);
@@ -480,7 +480,7 @@ namespace DCGO.CardEffects.EX10
                 bool CanUseCondition(Hashtable hashtable)
                 {
                     return CardEffectCommons.CanTriggerOnDeletion(hashtable, card) &&
-                           !CardEffectCommons.HasMatchConditionOwnersSecurity(card, FaceUpBlack);
+                           !CardEffectCommons.HasMatchConditionOwnersSecurity(card, FaceUpBlue);
                 }
 
                 bool CanActivateCondition(Hashtable hashtable)

+ 2 - 3
Assets/CardEffect/EX10/Purple/EX10_037.cs

@@ -120,9 +120,8 @@ namespace DCGO.CardEffects.EX10
 
                 int GetDPChangeValue()
                 {
-                    int count = card.Owner.LibraryCards.Count;
-                    int roundedCount = (count % 10 == 0) ? count : (count / 10) * 10;
-                    return roundedCount * 1000;
+                    int stacksOf10 = card.Owner.TrashCards.Count / 10;
+                    return stacksOf10 * 1000;
                 }
 
                 cardEffects.Add(CardEffectFactory.ChangeSelfDPStaticEffect(changeValue: GetDPChangeValue(), isInheritedEffect: true, card: card, condition: Condition));

+ 1 - 1
Assets/CardEffect/EX10/Purple/EX10_038.cs

@@ -91,7 +91,7 @@ namespace DCGO.CardEffects.EX10
                 IEnumerator ActivateCoroutine(Hashtable _hashtable)
                 {
                     yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.SimplifiedRevealDeckTopCardsAndSelect(
-                        revealCount: 4,
+                        revealCount: 3,
                         simplifiedSelectCardConditions:
                         new SimplifiedSelectCardConditionClass[]
                         {

+ 31 - 4
Assets/CardEffect/EX10/Purple/EX10_043.cs

@@ -12,6 +12,22 @@ namespace DCGO.CardEffects.EX10
         {
             List<ICardEffect> cardEffects = new List<ICardEffect>();
 
+            #region Static Effects
+
+            #region Stnd Appmon Alternative Digivolution Requirement
+
+            if (timing == EffectTiming.None)
+            {
+                bool PermanentCondition(Permanent targetPermanent)
+                {
+                    return targetPermanent.TopCard.HasStandardAppTraits;
+                }
+
+                cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(permanentCondition: PermanentCondition, digivolutionCost: 2, ignoreDigivolutionRequirement: false, card: card, condition: null));
+            }
+
+            #endregion
+
             #region Link Condition
 
             if (timing == EffectTiming.None)
@@ -26,16 +42,19 @@ namespace DCGO.CardEffects.EX10
 
             #endregion
 
-
             #region Link
+
             if (timing == EffectTiming.OnDeclaration)
             {
                 cardEffects.Add(CardEffectFactory.LinkEffect(card));
             }
+
             #endregion
 
+            #endregion
 
             #region On Play/When Digivolving shared
+
             bool CanSelectPermanentOPWDCondition(Permanent permanent)
             {
                 if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
@@ -64,9 +83,11 @@ namespace DCGO.CardEffects.EX10
 
                 return false;
             }
+
             #endregion
 
             #region On Play
+
             if (timing == EffectTiming.OnEnterFieldAnyone)
             {
                 ActivateClass activateClass = new ActivateClass();
@@ -109,9 +130,11 @@ namespace DCGO.CardEffects.EX10
                     }
                 }
             }
+
             #endregion
 
             #region When Digivolving
+
             if (timing == EffectTiming.OnEnterFieldAnyone)
             {
                 ActivateClass activateClass = new ActivateClass();
@@ -154,9 +177,11 @@ namespace DCGO.CardEffects.EX10
                     }
                 }
             }
+
             #endregion
 
             #region All Turns
+
             if (timing == EffectTiming.OnLinkCardDiscarded)
             {
                 ActivateClass activateClass = new ActivateClass();
@@ -186,9 +211,10 @@ namespace DCGO.CardEffects.EX10
                     yield return ContinuousController.instance.StartCoroutine(card.Owner.AddMemory(1, activateClass));
                 }
             }
+
             #endregion
 
-            #region When Attacking
+            #region Link - When Attacking
 
             if (timing == EffectTiming.OnAllyAttack)
             {
@@ -202,12 +228,13 @@ namespace DCGO.CardEffects.EX10
 
                 bool CanUseCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.CanTriggerWhenLinking(hashtable, null, card);
+                    return CardEffectCommons.IsExistLinked(card)
+                        && CardEffectCommons.CanTriggerOnAttack(hashtable, card);
                 }
 
                 bool CanActivateCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card) &&
+                    return CardEffectCommons.IsExistLinked(card) &&
                            !card.PermanentOfThisCard().HasNoLinkCards;
                 }
 

+ 11 - 13
Assets/CardEffect/EX10/Purple/EX10_044.cs

@@ -12,7 +12,8 @@ namespace DCGO.CardEffects.EX10
         {
             List<ICardEffect> cardEffects = new List<ICardEffect>();
 
-            #region Start of Your Main Phase
+            #region On Play
+
             if (timing == EffectTiming.OnEnterFieldAnyone)
             {
                 ActivateClass activateClass = new ActivateClass();
@@ -31,26 +32,20 @@ namespace DCGO.CardEffects.EX10
 
                 bool CanActivateCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
+                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card)
+                        && CardEffectCommons.HasMatchConditionPermanent(CanSelectTamerCondition)
+                        && CardEffectCommons.HasMatchConditionOwnersHand(card, CanSelectCardCondition) || CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectCardCondition);
                 }
 
                 bool CanSelectTamerCondition(Permanent permanent)
                 {
-                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(permanent, card)
-                           && (permanent.IsTamer || permanent.IsDigimon) &&
-                           permanent.TopCard.HasBagraArmyTraits;
+                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaTamer(permanent, card);
                 }
 
                 bool CanSelectCardCondition(CardSource cardSource)
                 {
-                    if (cardSource.IsDigimon)
-                    {
-                        if (cardSource.HasBagraArmyTraits)
-                        {
-                            return true;
-                        }
-                    }
-                    return false;
+                    return cardSource.IsDigimon
+                        && cardSource.HasBagraArmyTraits;
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
@@ -155,6 +150,7 @@ namespace DCGO.CardEffects.EX10
                     }
                 }
             }
+
             #endregion
 
             #region On Deletion
@@ -295,6 +291,7 @@ namespace DCGO.CardEffects.EX10
             #endregion
 
             #region ESS
+
             if (timing == EffectTiming.OnDigivolutionCardDiscarded)
             {
                 ActivateClass activateClass = new ActivateClass();
@@ -325,6 +322,7 @@ namespace DCGO.CardEffects.EX10
                     yield return ContinuousController.instance.StartCoroutine(new DrawClass(card.Owner, 1, activateClass).Draw());
                 }
             }
+
             #endregion
 
             return cardEffects;

+ 63 - 48
Assets/CardEffect/EX10/Purple/EX10_048.cs

@@ -19,14 +19,12 @@ namespace DCGO.CardEffects.EX10
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Delete 1 of your Myotis-in-text Digimon to get Play Cost -4", CanUseCondition, card);
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDescription());
-                cardEffects.Add(activateClass);
-
                 activateClass.SetIsDigimonEffect(true);
+                cardEffects.Add(activateClass);
 
                 string EffectDescription()
                 {
-                    return
-                        "When this card would be played, by deleting 1 of your Digimon with [Myotismon] in its text, reduce the play cost by 4.";
+                    return "When this card would be played, by deleting 1 of your Digimon with [Myotismon] in its text, reduce the play cost by 4.";
                 }
 
                 bool CanUseCondition(Hashtable hashtable)
@@ -42,10 +40,7 @@ namespace DCGO.CardEffects.EX10
                 bool CanSelectPermanentCondition(Permanent permanent)
                 {
                     return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card) &&
-                           permanent != null &&
-                           permanent.TopCard &&
                            !permanent.TopCard.CanNotBeAffected(activateClass) &&
-                           !permanent.IsSuspended && permanent.CanSuspend &&
                            permanent.TopCard.HasText("Myotismon");
                 }
 
@@ -96,57 +91,69 @@ namespace DCGO.CardEffects.EX10
                     // If the player selected a Digimon, continue with the rest of the effect
                     if (selectedPermanent != null)
                     {
-                        yield return ContinuousController.instance.StartCoroutine(new SuspendPermanentsClass(new List<Permanent>() { selectedPermanent }, CardEffectCommons.CardEffectHashtable(activateClass)).Tap());
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.DeletePeremanentAndProcessAccordingToResult(
+                            targetPermanents: new List<Permanent>() { selectedPermanent },
+                            activateClass: activateClass,
+                            successProcess: SuccessProcess,
+                            failureProcess: null
+                        ));
 
-                        if (card.Owner.CanReduceCost(null, card))
+                        IEnumerator SuccessProcess(List<Permanent> permanents)
                         {
-                            ContinuousController.instance.PlaySE(GManager.instance.GetComponent<Effects>().BuffSE);
-                            ChangeCostClass changeCostClass = new ChangeCostClass();
-                            changeCostClass.SetUpICardEffect("Play Cost -4", CanUseCondition1, card);
-                            changeCostClass.SetUpChangeCostClass(changeCostFunc: ChangeCost, cardSourceCondition: CardSourceCondition,
-                                rootCondition: RootCondition, isUpDown: IsUpDown, isCheckAvailability: () => false,
-                                isChangePayingCost: () => true);
-                            card.Owner.UntilCalculateFixedCostEffect.Add(_ => changeCostClass);
-
-                            yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ShowReducedCost(hashtable));
-                        }
+                            #region Setup Reduce Cost Effect
 
-                        bool CanUseCondition1(Hashtable hashtable1)
-                        {
-                            return true;
-                        }
+                            bool CanUseCondition1(Hashtable hashtable1)
+                            {
+                                return true;
+                            }
 
-                        int ChangeCost(CardSource cardSource, int cost, SelectCardEffect.Root root,
-                            List<Permanent> targetPermanents)
-                        {
-                            if (CardSourceCondition(cardSource) &&
-                                RootCondition(root) &&
-                                PermanentsCondition(targetPermanents))
+                            int ChangeCost(CardSource cardSource, int cost, SelectCardEffect.Root root,
+                                List<Permanent> targetPermanents)
                             {
-                                cost -= 4;
+                                if (CardSourceCondition(cardSource) &&
+                                    RootCondition(root) &&
+                                    PermanentsCondition(targetPermanents))
+                                {
+                                    cost -= 4;
+                                }
+
+                                return cost;
                             }
 
-                            return cost;
-                        }
+                            bool PermanentsCondition(List<Permanent> targetPermanents)
+                            {
+                                return targetPermanents == null || targetPermanents.Count(targetPermanent => targetPermanent != null) == 0;
+                            }
 
-                        bool PermanentsCondition(List<Permanent> targetPermanents)
-                        {
-                            return targetPermanents == null || targetPermanents.Count(targetPermanent => targetPermanent != null) == 0;
-                        }
+                            bool CardSourceCondition(CardSource cardSource)
+                            {
+                                return cardSource == card;
+                            }
 
-                        bool CardSourceCondition(CardSource cardSource)
-                        {
-                            return cardSource == card;
-                        }
+                            bool RootCondition(SelectCardEffect.Root root)
+                            {
+                                return true;
+                            }
 
-                        bool RootCondition(SelectCardEffect.Root root)
-                        {
-                            return true;
-                        }
+                            bool IsUpDown()
+                            {
+                                return true;
+                            }
 
-                        bool IsUpDown()
-                        {
-                            return true;
+                            #endregion
+
+                            if (card.Owner.CanReduceCost(null, card))
+                            {
+                                ContinuousController.instance.PlaySE(GManager.instance.GetComponent<Effects>().BuffSE);
+                                ChangeCostClass changeCostClass = new ChangeCostClass();
+                                changeCostClass.SetUpICardEffect("Play Cost -4", CanUseCondition1, card);
+                                changeCostClass.SetUpChangeCostClass(changeCostFunc: ChangeCost, cardSourceCondition: CardSourceCondition,
+                                    rootCondition: RootCondition, isUpDown: IsUpDown, isCheckAvailability: () => false,
+                                    isChangePayingCost: () => true);
+                                card.Owner.UntilCalculateFixedCostEffect.Add(_ => changeCostClass);
+
+                                yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ShowReducedCost(hashtable));
+                            }
                         }
                     }
                 }
@@ -222,6 +229,7 @@ namespace DCGO.CardEffects.EX10
             #endregion
 
             #region On Play/On Deletion Shared
+
             bool CanSelectPurplePermanentCondition(Permanent permanent)
             {
                 if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
@@ -270,9 +278,11 @@ namespace DCGO.CardEffects.EX10
                     }
                 }
             }
+
             #endregion
 
             #region On Play
+
             if (timing == EffectTiming.OnEnterFieldAnyone)
             {
                 ActivateClass activateClass = new ActivateClass();
@@ -283,7 +293,7 @@ namespace DCGO.CardEffects.EX10
                 string EffectDiscription()
                 {
                     return "[On Play] 1 of your purple Digimon gains <Blocker> and <Retaliation> until your opponent's turn ends.";
-                }                
+                }
 
                 bool CanUseCondition(Hashtable hashtable)
                 {
@@ -303,9 +313,11 @@ namespace DCGO.CardEffects.EX10
                     return false;
                 }
             }
+
             #endregion
 
             #region On Deletion non-inherit
+
             if (timing == EffectTiming.OnDestroyedAnyone)
             {
                 ActivateClass activateClass = new ActivateClass();
@@ -336,9 +348,11 @@ namespace DCGO.CardEffects.EX10
                     return false;
                 }
             }
+
             #endregion
 
             #region On Deletion inherit
+
             if (timing == EffectTiming.OnDestroyedAnyone)
             {
                 ActivateClass activateClass = new ActivateClass();
@@ -436,6 +450,7 @@ namespace DCGO.CardEffects.EX10
                     }
                 }
             }
+
             #endregion
 
             return cardEffects;

+ 2 - 3
Assets/CardEffect/EX10/Purple/EX10_050.cs

@@ -207,9 +207,8 @@ namespace DCGO.CardEffects.EX10
 
                 int GetDPChangeValue()
                 {
-                    int count = card.Owner.LibraryCards.Count;
-                    int roundedCount = (count % 10 == 0) ? count : (count / 10) * 10;
-                    return roundedCount * 1000;
+                    int stacksOf10 = card.Owner.TrashCards.Count / 10;
+                    return stacksOf10 * 1000;
                 }
 
                 cardEffects.Add(CardEffectFactory.ChangeSelfDPStaticEffect(changeValue: GetDPChangeValue(), isInheritedEffect: true, card: card, condition: Condition));

+ 46 - 34
Assets/CardEffect/EX10/Purple/EX10_052.cs

@@ -14,10 +14,16 @@ namespace DCGO.CardEffects.EX10
 
             #region Shared Methods
 
-            bool IsOpponentDigimonOrTamer(Permanent permanent)
+            bool CanSelectPermanentConditionShared(Permanent permanent)
             {
-                return CardEffectCommons.IsPermanentExistsOnOpponentBattleArea(permanent, card)
-                    && permanent.IsDigimon || permanent.IsTamer;
+                if (CardEffectCommons.IsPermanentExistsOnOpponentBattleArea(permanent, card))
+                {
+                    if (permanent.IsDigimon || permanent.IsTamer)
+                    {
+                        return true;
+                    }
+                }
+                return false;
             }
 
             IEnumerator SharedActivateCoroutine(Hashtable hashtable, ActivateClass activateClass)
@@ -46,58 +52,64 @@ namespace DCGO.CardEffects.EX10
 
                 #endregion
 
-                if (CardEffectCommons.HasMatchConditionPermanent(IsOpponentDigimonOrTamer))
-                {
-                    bool hasOpponentDeleted = false;
-                    Permanent selectedPermanent = null;
+                List<Permanent> deleteTargetPermanents = new List<Permanent>();
+                bool attemptedToDelete = false;
+                bool failedToDelete = false;
 
-                    #region Opponent Selects 1 Digimon or Tamer
-
-                    int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(IsOpponentDigimonOrTamer));
+                if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentConditionShared))
+                {
+                    int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentConditionShared));
 
                     SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
 
                     selectPermanentEffect.SetUp(
                         selectPlayer: card.Owner.Enemy,
-                        canTargetCondition: IsOpponentDigimonOrTamer,
+                        canTargetCondition: CanSelectPermanentConditionShared,
                         canTargetCondition_ByPreSelecetedList: null,
                         canEndSelectCondition: null,
                         maxCount: maxCount,
                         canNoSelect: true,
                         canEndNotMax: false,
                         selectPermanentCoroutine: null,
-                        afterSelectPermanentCoroutine: null,
-                        mode: SelectPermanentEffect.Mode.Destroy,
+                        afterSelectPermanentCoroutine: AfterSelectPermanentCoroutine,
+                        mode: SelectPermanentEffect.Mode.Custom,
                         cardEffect: activateClass);
 
-                    yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
-
-                    #endregion
+                    selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon or Tamer to delete.", "The opponent is selecting 1 Digimon or Tamer to delete.");
 
-                    #region Attempt to delete selected permanent
+                    yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
 
-                    IEnumerator SuccessProcess(List<Permanent> deletedPermanents)
+                    IEnumerator AfterSelectPermanentCoroutine(List<Permanent> permanents)
                     {
-                        hasOpponentDeleted = true;
+                        deleteTargetPermanents = permanents.Clone();
+                        attemptedToDelete = true;
+
                         yield return null;
                     }
+                }
 
-                    if (selectedPermanent != null) yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.DeletePeremanentAndProcessAccordingToResult(
-                        targetPermanents: new List<Permanent> { selectedPermanent },
+                if (attemptedToDelete)
+                {
+                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.DeletePeremanentAndProcessAccordingToResult(
+                        targetPermanents: deleteTargetPermanents,
                         activateClass: activateClass,
-                        successProcess: SuccessProcess,
-                        failureProcess: null));
+                        successProcess: null,
+                        failureProcess: FailureProcess));
 
-                    #endregion
-
-                    if (!hasOpponentDeleted)
+                    IEnumerator FailureProcess()
                     {
-                        yield return ContinuousController.instance.StartCoroutine(new IRecovery(
-                            player: card.Owner,
-                            AddLifeCount: 1,
-                            cardEffect: activateClass).Recovery());
+                        failedToDelete = true;
+                        yield return null;
                     }
                 }
+                if (!attemptedToDelete || failedToDelete)
+                {
+                    yield return ContinuousController.instance.StartCoroutine(new IRecovery(
+                        player: card.Owner,
+                        AddLifeCount: 1,
+                        cardEffect: activateClass).Recovery()
+                    );
+                }
             }
 
             #endregion
@@ -198,25 +210,25 @@ namespace DCGO.CardEffects.EX10
                 bool CanActivateCondition(Hashtable hashtable)
                 {
                     return CardEffectCommons.IsExistOnBattleAreaDigimon(card)
-                        && CardEffectCommons.HasMatchConditionPermanent(IsOpponentDigimonOrTamer);
+                        && CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentConditionShared);
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
                 {
-                    if (CardEffectCommons.HasMatchConditionPermanent(IsOpponentDigimonOrTamer))
+                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentConditionShared))
                     {
                         bool hasOpponentDeleted = false;
                         Permanent selectedPermanent = null;
 
                         #region Opponent Selects 1 Digimon or Tamer
 
-                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(IsOpponentDigimonOrTamer));
+                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentConditionShared));
 
                         SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
 
                         selectPermanentEffect.SetUp(
                             selectPlayer: card.Owner.Enemy,
-                            canTargetCondition: IsOpponentDigimonOrTamer,
+                            canTargetCondition: CanSelectPermanentConditionShared,
                             canTargetCondition_ByPreSelecetedList: null,
                             canEndSelectCondition: null,
                             maxCount: maxCount,

+ 24 - 37
Assets/CardEffect/EX10/Purple/EX10_053.cs

@@ -28,15 +28,18 @@ namespace DCGO.CardEffects.EX10
             #endregion
 
             #region Static Effects
+
             //Rush/Blocker
             if (timing == EffectTiming.None)
             {
                 cardEffects.Add(CardEffectFactory.RushSelfStaticEffect(isInheritedEffect: false, card: card, condition: null));
                 cardEffects.Add(CardEffectFactory.BlockerSelfStaticEffect(isInheritedEffect: false, card: card, condition: null));
             }
+
             #endregion
 
             #region On Play
+
             if (timing == EffectTiming.OnEnterFieldAnyone)
             {
                 ActivateClass activateClass = new ActivateClass();
@@ -94,55 +97,34 @@ namespace DCGO.CardEffects.EX10
                             selectPlayer: card.Owner,
                             cardEffect: activateClass);
 
-                        selectCardEffect.SetUpCustomMessage_ShowCard("Digivolution Cards");
-                        selectCardEffect.SetUpCustomMessage("Select cards to place on bottom of digivolution cards.", "The opponent is selecting cards to place on bottom of digivolution cards.");
-
-                        yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
-
                         IEnumerator SelectCardCoroutine(CardSource cardSource)
                         {
                             selectedCards.Add(cardSource);
-
                             yield return null;
                         }
 
                         bool CanTargetCondition_ByPreSelecetedList(List<CardSource> cardSources, CardSource cardSource)
                         {
-                            List<string> cardNames = new List<string>();
+                            var allSources = (cardSources ?? Enumerable.Empty<CardSource>())
+                                .Concat(selectedCards ?? Enumerable.Empty<CardSource>());
 
-                            foreach (CardSource cardSource1 in cardSources)
-                            {
-                                foreach(string cardName in cardSource1.CardNames)
-                                {
-                                    if (!cardNames.Contains(cardName))
-                                    {
-                                        cardNames.Add(cardName);
-                                    }
-                                }                                
-                            }
+                            var nameSet = new HashSet<string>(
+                                allSources.SelectMany(s => s.CardNames ?? Enumerable.Empty<string>())
+                                          .Where(n => !string.IsNullOrWhiteSpace(n)));
 
-                            foreach (CardSource cardSource1 in selectedCards)
-                            {
-                                foreach (string cardName in cardSource1.CardNames)
-                                {
-                                    if (!cardNames.Contains(cardName))
-                                    {
-                                        cardNames.Add(cardName);
-                                    }
-                                }
-                            }
-
-                            foreach (string cardName in cardSource.CardNames)
-                            {
-                                if (cardNames.Contains(cardSource.CardID))
-                                {
-                                    return false;
-                                }
-                            }
+                            var idSet = new HashSet<string>(
+                                allSources.Select(s => s.CardID)
+                                          .Where(id => !string.IsNullOrWhiteSpace(id)));
 
+                            if (cardSource.CardNames.Exists(nameSet.Contains) || idSet.Contains(cardSource.CardID)) return false;
                             return true;
                         }
 
+                        selectCardEffect.SetUpCustomMessage_ShowCard("Digivolution Cards");
+                        selectCardEffect.SetUpCustomMessage("Select cards to place on bottom of digivolution cards.", "The opponent is selecting cards to place on bottom of digivolution cards.");
+
+                        yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
+
                         if (selectedCards.Count >= 1)
                         {
                             yield return ContinuousController.instance.StartCoroutine(card.PermanentOfThisCard().AddDigivolutionCardsBottom(selectedCards, activateClass));
@@ -153,7 +135,6 @@ namespace DCGO.CardEffects.EX10
                             {
                                 if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
                                 {
-                                    
                                     if (permanent.DP <= card.Owner.MaxDP_DeleteEffect(card.PermanentOfThisCard().DP, activateClass))
                                     {
                                         return true;
@@ -187,9 +168,11 @@ namespace DCGO.CardEffects.EX10
                     }
                 }
             }
+
             #endregion
 
             #region When Digivolving
+
             if (timing == EffectTiming.OnEnterFieldAnyone)
             {
                 ActivateClass activateClass = new ActivateClass();
@@ -306,7 +289,6 @@ namespace DCGO.CardEffects.EX10
                             {
                                 if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
                                 {
-
                                     if (permanent.DP <= card.Owner.MaxDP_DeleteEffect(card.PermanentOfThisCard().DP, activateClass))
                                     {
                                         return true;
@@ -340,9 +322,11 @@ namespace DCGO.CardEffects.EX10
                     }
                 }
             }
+
             #endregion
 
             #region End of Turn
+
             if (timing == EffectTiming.OnEndTurn)
             {
                 ActivateClass activateClass = new ActivateClass();
@@ -382,9 +366,11 @@ namespace DCGO.CardEffects.EX10
                     yield return ContinuousController.instance.StartCoroutine(selectAttackEffect.Activate());
                 }
             }
+
             #endregion
 
             #region ESS
+
             if (timing == EffectTiming.OnDestroyedAnyone)
             {
                 ActivateClass activateClass = new ActivateClass();
@@ -435,6 +421,7 @@ namespace DCGO.CardEffects.EX10
                     yield return ContinuousController.instance.StartCoroutine(card.Owner.AddMemory(1, activateClass));
                 }
             }
+
             #endregion
 
             return cardEffects;