mbunch_kascope 11 месяцев назад
Родитель
Сommit
f2530d2791

+ 1 - 1
Assets/CardEffect/EX10/Green/EX10_021.cs

@@ -367,7 +367,7 @@ namespace DCGO.CardEffects
             #endregion
 
             #region Opponent's Turn - OPT
-            if (timing == EffectTiming.None)
+            if (timing == EffectTiming.OnTappedAnyone)
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Trash 2, Suspend 2", CanUseCondition, card);

+ 268 - 0
Assets/CardEffect/EX10/Green/EX10_023.cs

@@ -0,0 +1,268 @@
+using System.Collections;
+using System.Collections.Generic;
+
+namespace DCGO.CardEffects.EX10
+{
+    public class EX10_023 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            #region Digivolution Requirements
+            if (timing == EffectTiming.None)
+            {
+                bool Condition()
+                {
+                    return CardEffectCommons.HasMatchConditionPermanent(HasRyomaMogami);
+                }
+
+                bool HasRyomaMogami(Permanent permanent)
+                {
+                    return CardEffectCommons.IsOwnerPermanent(permanent, card) &&
+                           permanent.TopCard.EqualsCardName("Ryoma Mogami");
+                }
+
+                bool PermanentCondition(Permanent targetPermanent)
+                {
+                    return targetPermanent.TopCard.EqualsCardName("Astamon");
+                }
+
+                cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(permanentCondition: PermanentCondition, digivolutionCost: 7, ignoreDigivolutionRequirement: false, card: card, condition: Condition));
+            }
+            #endregion
+
+            #region Blast Digivolve
+            if (timing == EffectTiming.OnCounterTiming)
+            {
+                cardEffects.Add(CardEffectFactory.BlastDigivolveEffect(card: card, condition: null));
+            }
+            #endregion
+
+            #region On Play
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Suspend all other Digimon", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[On Play] Suspend all other Digimon and Tamers.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card) &&
+                           CardEffectCommons.CanTriggerOnPlay(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    #region Suspend All Digimon
+                    List<Permanent> tappedPermanents = new List<Permanent>();
+
+                    tappedPermanents.AddRange(card.Owner.GetBattleAreaPermanents());
+                    tappedPermanents.AddRange(card.Owner.Enemy.GetBattleAreaPermanents());
+
+                    tappedPermanents = tappedPermanents.Filter(x => x.IsTamer || x.IsDigimon);
+
+                    tappedPermanents.Remove(card.PermanentOfThisCard());
+
+                    yield return ContinuousController.instance.StartCoroutine(new SuspendPermanentsClass(tappedPermanents, hashtable).Tap());
+                    #endregion
+                }
+            }
+            #endregion
+
+            #region When Digivolving
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Suspend all other Digimon", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[When Digivolving] Suspend all other Digimon and Tamers.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card) &&
+                           CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    #region Suspend All Digimon
+                    List<Permanent> tappedPermanents = new List<Permanent>();
+
+                    tappedPermanents.AddRange(card.Owner.GetBattleAreaPermanents());
+                    tappedPermanents.AddRange(card.Owner.Enemy.GetBattleAreaPermanents());
+
+                    tappedPermanents = tappedPermanents.Filter(x => x.IsTamer || x.IsDigimon);
+
+                    tappedPermanents.Remove(card.PermanentOfThisCard());
+
+                    yield return ContinuousController.instance.StartCoroutine(new SuspendPermanentsClass(tappedPermanents, hashtable).Tap());
+                    #endregion
+                }
+            }
+            #endregion
+
+            #region When Digivolving/When Attacking Shared
+            string SharedEffectDiscription(string tag)
+            {
+                return $"[{tag}] Delete 1 of your opponent's suspended Digimon.";
+            }
+
+            bool SharedCanActivateCondition(Hashtable hashtable)
+            {
+                return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
+            }
+
+            bool SharedCanSelectPermanentCondition(Permanent permanent)
+            {
+                return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card) &&
+                       permanent.IsSuspended;
+            }
+
+            IEnumerator SharedActivateCoroutine(Hashtable hashtable, ActivateClass activateClass)
+            {
+                if (CardEffectCommons.HasMatchConditionPermanent(SharedCanSelectPermanentCondition))
+                {
+                    SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                    selectPermanentEffect.SetUp(
+                        selectPlayer: card.Owner,
+                        canTargetCondition: SharedCanSelectPermanentCondition,
+                        canTargetCondition_ByPreSelecetedList: null,
+                        canEndSelectCondition: null,
+                        maxCount: 1,
+                        canNoSelect: false,
+                        canEndNotMax: false,
+                        selectPermanentCoroutine: null,
+                        afterSelectPermanentCoroutine: null,
+                        mode: SelectPermanentEffect.Mode.Destroy,
+                        cardEffect: activateClass);
+
+                    yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                }
+            }
+            #endregion
+
+            #region When Digivolving
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Delete 1 Suspended Digimon", CanUseCondition, card);
+                activateClass.SetUpActivateClass(SharedCanActivateCondition, hashtable => SharedActivateCoroutine(hashtable, activateClass), 1, false, SharedEffectDiscription("When Digivolving"));
+                activateClass.SetHashString("WD_EX10-023");
+                cardEffects.Add(activateClass);
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card) &&
+                           CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                }
+            }
+            #endregion
+
+            #region When Attacking
+            if (timing == EffectTiming.OnAllyAttack)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Delete 1 Suspended Digimon/Tamer", CanUseCondition, card);
+                activateClass.SetUpActivateClass(SharedCanActivateCondition, hashtable => SharedActivateCoroutine(hashtable, activateClass), 1, false, SharedEffectDiscription("When Attacking"));
+                activateClass.SetHashString("WD_EX10-023");
+                cardEffects.Add(activateClass);
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card) &&
+                           CardEffectCommons.CanTriggerOnAttack(hashtable, card);
+                }
+            }
+            #endregion
+
+            #region All Turns
+            if (timing == EffectTiming.None)
+            {
+                bool PermanentCondition(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnBattleArea(permanent))
+                    {
+                        if (permanent != card.PermanentOfThisCard())
+                        {
+                            if (permanent.IsDigimon || permanent.IsTamer)
+                            {
+                                return true;
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanUseCondition()
+                {
+                    return CardEffectCommons.IsExistOnBattleArea(card) &&
+                           GManager.instance.turnStateMachine.gameContext.TurnPhase == GameContext.phase.Active;
+                }
+
+                string effectName = "[All Turns] Other than this Digimon, no Digimon or Tamers can unsuspend in the unsuspend phase.";
+
+                cardEffects.Add(CardEffectFactory.CantUnsuspendStaticEffect(
+                    permanentCondition: PermanentCondition,
+                    isInheritedEffect: false,
+                    card: card, 
+                    condition: CanUseCondition,
+                    effectName: effectName));
+            }
+            #endregion
+
+            if (timing == EffectTiming.None)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return true;
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    return true;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    yield return null;
+                }
+            }
+
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/EX10/Green/EX10_023.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 586bd2ae94c60364896a3c1b18d20f44
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 782 - 0
Assets/CardEffect/EX10/White/EX10_061.cs

@@ -0,0 +1,782 @@
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+using System;
+
+namespace DCGO.CardEffects.EX10
+{
+    public class EX10_061 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            #region Digivolution Requirements
+            if (timing == EffectTiming.None)
+            {
+                bool PermanentCondition(Permanent targetPermanent)
+                {
+                    return targetPermanent.TopCard.EqualsTraits("Dark Masters") &&
+                           targetPermanent.TopCard.IsLevel6;
+                }
+
+                cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(permanentCondition: PermanentCondition, digivolutionCost: 7, ignoreDigivolutionRequirement: false, card: card, condition: null));
+            }
+            #endregion
+
+            #region Cost Reduction
+            #region Before Pay Cost - Condition Effect
+
+            if (timing == EffectTiming.BeforePayCost)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Placing 1 [Dark Masters] to get Play Cost -4", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                activateClass.SetHashString("PlayCost-12_BT15_102");
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "When this card would be played, by placing 1 of each face-up [Dark Masters] trait card with different names from your security stack under this card, reduce the play cost by 4 for each card placed.";
+                }
+
+                bool CanSelectCardCondition(CardSource cardSource)
+                {
+                    return cardSource.IsDigimon &&
+                           cardSource.IsFlipped &&
+                           cardSource.EqualsTraits("Dark Masters");
+                }
+
+                bool CardCondition(CardSource cardSource)
+                {
+                    if (cardSource == card)
+                    {
+                        if (CardEffectCommons.IsExistOnHand(cardSource))
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanNoSelect(CardSource cardSource)
+                {
+                    if (cardSource != null)
+                    {
+                        if (cardSource.PayingCost(SelectCardEffect.Root.Hand, null, checkAvailability: false) > cardSource.Owner.MaxMemoryCost)
+                        {
+                            return false;
+                        }
+                    }
+
+                    return true;
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerWhenPermanentWouldPlay(hashtable, CardCondition);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnHand(card) &&
+                           CardEffectCommons.HasMatchConditionOwnersSecurity(card, CanSelectCardCondition);
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable _hashtable)
+                {
+                    List<CardSource> digivolutionCards = new List<CardSource>();
+
+                    bool CanSelectSecurityCardCondition(CardSource cardSource)
+                    {
+                        if (CanSelectCardCondition(cardSource))
+                        {
+                            if (digivolutionCards.Count((filteredCard) => filteredCard.CardNames.Contains(cardSource.CardNames[0])) == 0)
+                            {
+                                return true;
+                            }
+                        }
+
+                        return false;
+                    }
+
+                    if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, (cardSource) => CanSelectSecurityCardCondition(cardSource)))
+                    {
+                        bool noSelect = CanNoSelect(CardEffectCommons.GetCardFromHashtable(_hashtable));
+                        List<CardSource> selectedCards = new List<CardSource>();
+
+                        int maxCount = Math.Min(3 - digivolutionCards.Count, card.Owner.SecurityCards.Count((cardSource) => CanSelectSecurityCardCondition(cardSource)));
+
+                        if (maxCount >= 1)
+                        {
+                            SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+
+                            selectCardEffect.SetUp(
+                                canTargetCondition: CanSelectSecurityCardCondition,
+                                canTargetCondition_ByPreSelecetedList: CanTargetCondition_ByPreSelecetedList,
+                                canEndSelectCondition: CanEndSelectCondition,
+                                canNoSelect: () => noSelect,
+                                selectCardCoroutine: SelectCardCoroutine,
+                                afterSelectCardCoroutine: null,
+                                message: "Select cards to place in Digivolution cards.",
+                                maxCount: maxCount,
+                                canEndNotMax: true,
+                                isShowOpponent: true,
+                                mode: SelectCardEffect.Mode.Custom,
+                                root: SelectCardEffect.Root.Security,
+                                customRootCardList: null,
+                                canLookReverseCard: true,
+                                selectPlayer: card.Owner,
+                                cardEffect: activateClass);
+
+                            yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
+
+                            bool CanTargetCondition_ByPreSelecetedList(List<CardSource> cardSources, CardSource cardSource)
+                            {
+                                List<string> cardNames = new List<string>();
+
+                                foreach (CardSource cardSource1 in cardSources)
+                                {
+                                    if (!cardNames.Contains(cardSource1.CardNames[0]))
+                                    {
+                                        cardNames.Add(cardSource1.CardNames[0]);
+                                    }
+                                }
+
+                                foreach (CardSource cardSource1 in digivolutionCards)
+                                {
+                                    if (!cardNames.Contains(cardSource1.CardNames[0]))
+                                    {
+                                        cardNames.Add(cardSource1.CardNames[0]);
+                                    }
+                                }
+
+                                if (cardNames.Contains(cardSource.CardNames[0]))
+                                {
+                                    return false;
+                                }
+
+                                return true;
+                            }
+
+                            bool CanEndSelectCondition(List<CardSource> cardSources)
+                            {
+                                List<string> cardNames = new List<string>();
+
+                                foreach (CardSource cardSource1 in cardSources)
+                                {
+                                    if (!cardNames.Contains(cardSource1.CardNames[0]))
+                                    {
+                                        cardNames.Add(cardSource1.CardNames[0]);
+                                    }
+                                }
+
+                                foreach (CardSource cardSource1 in digivolutionCards)
+                                {
+                                    if (!cardNames.Contains(cardSource1.CardNames[0]))
+                                    {
+                                        cardNames.Add(cardSource1.CardNames[0]);
+                                    }
+                                }
+
+                                if (cardNames.Count != cardSources.Count + digivolutionCards.Count)
+                                {
+                                    return false;
+                                }
+
+                                return true;
+                            }
+
+                            IEnumerator SelectCardCoroutine(CardSource cardSource)
+                            {
+                                selectedCards.Add(cardSource);
+                                digivolutionCards.Add(cardSource);
+                                yield return null;
+                            }
+
+                            if (selectedCards.Count >= 1)
+                            {
+                                GManager.instance.GetComponent<SelectDigiXrosClass>().AddDigivolutionCardInfos(new AddDigivolutionCardsInfo(activateClass, selectedCards));
+
+                                yield return StartCoroutine(AfterSelectCardCoroutine(selectedCards));
+                            }
+                        }
+                    }
+
+                    IEnumerator AfterSelectCardCoroutine(List<CardSource> cardSources)
+                    {
+                        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((_timing) => changeCostClass);
+
+                        bool CanUseCondition1(Hashtable hashtable)
+                        {
+                            return true;
+                        }
+
+                        int ChangeCost(CardSource cardSource, int Cost, SelectCardEffect.Root root, List<Permanent> targetPermanents)
+                        {
+                            if (CardSourceCondition(cardSource))
+                            {
+                                if (RootCondition(root))
+                                {
+                                    if (PermanentsCondition(targetPermanents))
+                                    {
+                                        Cost -= cardSources.Count * 4;
+                                    }
+                                }
+                            }
+
+                            return Cost;
+                        }
+
+                        bool PermanentsCondition(List<Permanent> targetPermanents)
+                        {
+                            if (targetPermanents == null)
+                            {
+                                return true;
+                            }
+                            else
+                            {
+                                if (targetPermanents.Count((targetPermanent) => targetPermanent != null) == 0)
+                                {
+                                    return true;
+                                }
+                            }
+
+                            return false;
+                        }
+
+                        bool CardSourceCondition(CardSource cardSource)
+                        {
+                            return cardSource == card;
+                        }
+
+                        bool RootCondition(SelectCardEffect.Root root)
+                        {
+                            return true;
+                        }
+
+                        bool isUpDown()
+                        {
+                            return true;
+                        }
+
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ShowReducedCost(_hashtable));
+
+                        yield return null;
+                    }
+                }
+            }
+
+            #endregion
+
+            #region Reduce Play Cost - Not Shown
+
+            if (timing == EffectTiming.None)
+            {
+                ChangeCostClass changeCostClass = new ChangeCostClass();
+                changeCostClass.SetUpICardEffect("Play Cost -4", CanUseCondition, card);
+                changeCostClass.SetUpChangeCostClass(changeCostFunc: ChangeCost, cardSourceCondition: CardSourceCondition, rootCondition: RootCondition, isUpDown: isUpDown, isCheckAvailability: () => true, isChangePayingCost: () => true);
+                changeCostClass.SetNotShowUI(true);
+                cardEffects.Add(changeCostClass);
+
+                bool CanSelectCardCondition(CardSource cardSource)
+                {
+                    return cardSource.IsDigimon &&
+                           cardSource.IsFlipped &&
+                           cardSource.EqualsTraits("Dark Masters");
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if (card.Owner.HandCards.Contains(card))
+                    {
+                        ICardEffect activateClass = card.EffectList(EffectTiming.BeforePayCost).Find(cardEffect => cardEffect.EffectName == "Placing 1 [Dark Masters] to get Play Cost -4");
+
+                        if (activateClass != null)
+                        {
+                            if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectCardCondition))
+                            {
+                                return true;
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                int ChangeCost(CardSource cardSource, int Cost, SelectCardEffect.Root root, List<Permanent> targetPermanents)
+                {
+                    if (CardSourceCondition(cardSource))
+                    {
+                        if (RootCondition(root))
+                        {
+                            if (PermanentsCondition(targetPermanents))
+                            {
+                                List<CardSource> securitySources = card.Owner.SecurityCards.Filter(CanSelectCardCondition);
+                                int targetCount = (from securityCard in securitySources select securityCard.CardNames).Distinct().Count();
+
+                                Cost -= targetCount * 4;
+                            }
+                        }
+                    }
+
+                    return Cost;
+                }
+
+                bool PermanentsCondition(List<Permanent> targetPermanents)
+                {
+                    if (targetPermanents == null)
+                    {
+                        return true;
+                    }
+                    else
+                    {
+                        if (targetPermanents.Count((targetPermanent) => targetPermanent != null) == 0)
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CardSourceCondition(CardSource cardSource)
+                {
+                    if (cardSource != null)
+                    {
+                        if (cardSource == card)
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool RootCondition(SelectCardEffect.Root root)
+                {
+                    return true;
+                }
+
+                bool isUpDown()
+                {
+                    return true;
+                }
+            }
+
+            #endregion
+            #endregion
+
+            #region On Play
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Play 1 [Dark Masters] from sources, give <Rush>, Delete them at end of turn", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[On Play] You may play 1 of each [Dark Masters] trait card with different names from this Digimon's digivolution cards without paying the costs. Then, all of your [Dark Masters] trait Digimon gain <Rush> for the turn. (This Digimon can attack the turn it comes into play.) At turn end, delete the Digimon this effect played.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card) &&
+                           CardEffectCommons.CanTriggerOnPlay(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
+                }
+
+                bool CanSelectCardCondition(CardSource cardSource)
+                {
+                    return cardSource.IsDigimon &&
+                           cardSource.EqualsTraits("Dark Masters") &&
+                           CardEffectCommons.CanPlayAsNewPermanent(cardSource: cardSource, payCost: false, cardEffect: activateClass);
+                }
+
+                bool CanTargetCondition_ByPreSelecetedList(List<CardSource> cardSources, CardSource cardSource)
+                {
+                    List<string> cardNames = GetNamesList(cardSources);
+
+                    foreach (string name in cardNames)
+                    {
+                        if (cardSource.CardNames.Contains(name))
+                            return false;
+                    }
+
+                    return true;
+                }
+
+                List<string> GetNamesList(List<CardSource> cardSources)
+                {
+                    List<string> cardNames = new List<string>();
+
+                    foreach (CardSource cardName in cardSources)
+                    {
+                        foreach (string name in cardName.CardNames)
+                        {
+                            if (!cardNames.Contains(name))
+                            {
+                                cardNames.Add(name);
+                            }
+                        }
+                    }
+
+                    return cardNames;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    Permanent selectedPermanent = card.PermanentOfThisCard();
+
+                    if (selectedPermanent.DigivolutionCards.Count(CanSelectCardCondition) >= 1)
+                    {
+                        int maxCount = Math.Min(4, selectedPermanent.DigivolutionCards.Count(CanSelectCardCondition));
+
+                        List<CardSource> selectedCards = new List<CardSource>();
+
+                        SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+
+                        selectCardEffect.SetUp(
+                                    canTargetCondition: CanSelectCardCondition,
+                                    canTargetCondition_ByPreSelecetedList: CanTargetCondition_ByPreSelecetedList,
+                                    canEndSelectCondition: null,
+                                    canNoSelect: () => true,
+                                    selectCardCoroutine: SelectCardCoroutine,
+                                    afterSelectCardCoroutine: null,
+                                    message: "Select 1 digivolution card to play.",
+                                    maxCount: maxCount,
+                                    canEndNotMax: false,
+                                    isShowOpponent: true,
+                                    mode: SelectCardEffect.Mode.Custom,
+                                    root: SelectCardEffect.Root.Custom,
+                                    customRootCardList: selectedPermanent.DigivolutionCards,
+                                    canLookReverseCard: true,
+                                    selectPlayer: card.Owner,
+                                    cardEffect: activateClass);
+
+                        selectCardEffect.SetUpCustomMessage("Select 1 digivolution card to play.", "The opponent is selecting 1 digivolution card to play.");
+                        selectCardEffect.SetUpCustomMessage_ShowCard("Played Card");
+
+                        yield return StartCoroutine(selectCardEffect.Activate());
+
+                        IEnumerator SelectCardCoroutine(CardSource cardSource)
+                        {
+                            selectedCards.Add(cardSource);
+
+                            yield return null;
+                        }
+
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(
+                                    cardSources: selectedCards,
+                                    activateClass: activateClass,
+                                    payCost: false,
+                                    isTapped: false,
+                                    root: SelectCardEffect.Root.DigivolutionCards,
+                                    activateETB: true));
+
+                        bool PermanentCondition(Permanent permanent)
+                        {
+                            return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card) &&
+                                   permanent.TopCard.EqualsTraits("Dark Masters");
+                        }
+
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainRushPlayerEffect(
+                                    permanentCondition: PermanentCondition,
+                                    effectDuration: EffectDuration.UntilEachTurnEnd,
+                                    activateClass: activateClass));
+
+                        #region Delete Digimon Played
+                        foreach(CardSource source in selectedCards)
+                        {
+                            Permanent playedPermanent = source.PermanentOfThisCard();
+
+                            ActivateClass activateClass1 = new ActivateClass();
+                            activateClass1.SetUpICardEffect("Delete the Digimon", CanUseCondition2, selectedPermanent.TopCard);
+                            activateClass1.SetUpActivateClass(CanActivateCondition1, ActivateCoroutine1, -1, false, EffectDiscription1());
+                            activateClass1.SetEffectSourcePermanent(selectedPermanent);
+                            selectedPermanent.UntilOwnerTurnEndEffects.Add(GetCardEffect);
+
+                            if (!selectedPermanent.TopCard.CanNotBeAffected(activateClass))
+                            {
+                                yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().CreateDebuffEffect(selectedPermanent));
+                            }
+
+                            string EffectDiscription1()
+                            {
+                                return "[End of Your Turn] Delete this Digimon.";
+                            }
+
+                            bool CanUseCondition2(Hashtable hashtable1)
+                            {
+                                if (CardEffectCommons.IsOpponentTurn(card))
+                                {
+                                    if (CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(selectedPermanent, selectedPermanent.TopCard))
+                                    {
+                                        if (CardEffectCommons.CanTriggerOnEndAttack(hashtable1, selectedPermanent.TopCard))
+                                        {
+                                            return true;
+                                        }
+                                    }
+                                }
+
+                                return false;
+                            }
+
+                            bool CanActivateCondition1(Hashtable hashtable1)
+                            {
+                                if (CardEffectCommons.IsPermanentExistsOnBattleArea(selectedPermanent))
+                                {
+                                    if (!selectedPermanent.TopCard.CanNotBeAffected(activateClass))
+                                    {
+                                        return true;
+                                    }
+                                }
+
+                                return false;
+                            }
+
+                            IEnumerator ActivateCoroutine1(Hashtable _hashtable1)
+                            {
+                                if (CardEffectCommons.IsPermanentExistsOnBattleArea(selectedPermanent))
+                                {
+                                    yield return ContinuousController.instance.StartCoroutine(new DestroyPermanentsClass(
+                                    new List<Permanent>() { selectedPermanent },
+                                    CardEffectCommons.CardEffectHashtable(activateClass1)).Destroy());
+                                }
+                            }
+
+                            ICardEffect GetCardEffect(EffectTiming _timing)
+                            {
+                                if (_timing == EffectTiming.OnEndTurn)
+                                {
+                                    return activateClass1;
+                                }
+
+                                return null;
+                            }
+                        }
+                        
+                        #endregion
+                    }
+                }
+            }
+            #endregion
+
+            #region When Digivolving
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Play 1 [Dark Masters] from sources, give <Rush>, Delete them at end of turn", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[When Digivolving] You may play 1 of each [Dark Masters] trait card with different names from this Digimon's digivolution cards without paying the costs. Then, all of your [Dark Masters] trait Digimon gain <Rush> for the turn. (This Digimon can attack the turn it comes into play.) At turn end, delete the Digimon this effect played.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card) &&
+                           CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
+                }
+
+                bool CanSelectCardCondition(CardSource cardSource)
+                {
+                    return cardSource.IsDigimon &&
+                           cardSource.EqualsTraits("Dark Masters") &&
+                           CardEffectCommons.CanPlayAsNewPermanent(cardSource: cardSource, payCost: false, cardEffect: activateClass);
+                }
+
+                bool CanTargetCondition_ByPreSelecetedList(List<CardSource> cardSources, CardSource cardSource)
+                {
+                    List<string> cardNames = GetNamesList(cardSources);
+
+                    foreach (string name in cardNames)
+                    {
+                        if (cardSource.CardNames.Contains(name))
+                            return false;
+                    }
+
+                    return true;
+                }
+
+                List<string> GetNamesList(List<CardSource> cardSources)
+                {
+                    List<string> cardNames = new List<string>();
+
+                    foreach (CardSource cardName in cardSources)
+                    {
+                        foreach (string name in cardName.CardNames)
+                        {
+                            if (!cardNames.Contains(name))
+                            {
+                                cardNames.Add(name);
+                            }
+                        }
+                    }
+
+                    return cardNames;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    Permanent selectedPermanent = card.PermanentOfThisCard();
+
+                    if (selectedPermanent.DigivolutionCards.Count(CanSelectCardCondition) >= 1)
+                    {
+                        int maxCount = Math.Min(4, selectedPermanent.DigivolutionCards.Count(CanSelectCardCondition));
+
+                        List<CardSource> selectedCards = new List<CardSource>();
+
+                        SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+
+                        selectCardEffect.SetUp(
+                                    canTargetCondition: CanSelectCardCondition,
+                                    canTargetCondition_ByPreSelecetedList: CanTargetCondition_ByPreSelecetedList,
+                                    canEndSelectCondition: null,
+                                    canNoSelect: () => true,
+                                    selectCardCoroutine: SelectCardCoroutine,
+                                    afterSelectCardCoroutine: null,
+                                    message: "Select 1 digivolution card to play.",
+                                    maxCount: maxCount,
+                                    canEndNotMax: false,
+                                    isShowOpponent: true,
+                                    mode: SelectCardEffect.Mode.Custom,
+                                    root: SelectCardEffect.Root.Custom,
+                                    customRootCardList: selectedPermanent.DigivolutionCards,
+                                    canLookReverseCard: true,
+                                    selectPlayer: card.Owner,
+                                    cardEffect: activateClass);
+
+                        selectCardEffect.SetUpCustomMessage("Select 1 digivolution card to play.", "The opponent is selecting 1 digivolution card to play.");
+                        selectCardEffect.SetUpCustomMessage_ShowCard("Played Card");
+
+                        yield return StartCoroutine(selectCardEffect.Activate());
+
+                        IEnumerator SelectCardCoroutine(CardSource cardSource)
+                        {
+                            selectedCards.Add(cardSource);
+
+                            yield return null;
+                        }
+
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(
+                                    cardSources: selectedCards,
+                                    activateClass: activateClass,
+                                    payCost: false,
+                                    isTapped: false,
+                                    root: SelectCardEffect.Root.DigivolutionCards,
+                                    activateETB: true));
+
+                        bool PermanentCondition(Permanent permanent)
+                        {
+                            return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card) &&
+                                   permanent.TopCard.EqualsTraits("Dark Masters");
+                        }
+
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainRushPlayerEffect(
+                                    permanentCondition: PermanentCondition,
+                                    effectDuration: EffectDuration.UntilEachTurnEnd,
+                                    activateClass: activateClass));
+
+                        #region Delete Digimon Played
+                        foreach (CardSource source in selectedCards)
+                        {
+                            Permanent playedPermanent = source.PermanentOfThisCard();
+
+                            ActivateClass activateClass1 = new ActivateClass();
+                            activateClass1.SetUpICardEffect("Delete the Digimon", CanUseCondition2, selectedPermanent.TopCard);
+                            activateClass1.SetUpActivateClass(CanActivateCondition1, ActivateCoroutine1, -1, false, EffectDiscription1());
+                            activateClass1.SetEffectSourcePermanent(selectedPermanent);
+                            selectedPermanent.UntilOwnerTurnEndEffects.Add(GetCardEffect);
+
+                            if (!selectedPermanent.TopCard.CanNotBeAffected(activateClass))
+                            {
+                                yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().CreateDebuffEffect(selectedPermanent));
+                            }
+
+                            string EffectDiscription1()
+                            {
+                                return "[End of Your Turn] Delete this Digimon.";
+                            }
+
+                            bool CanUseCondition2(Hashtable hashtable1)
+                            {
+                                if (CardEffectCommons.IsOpponentTurn(card))
+                                {
+                                    if (CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(selectedPermanent, selectedPermanent.TopCard))
+                                    {
+                                        if (CardEffectCommons.CanTriggerOnEndAttack(hashtable1, selectedPermanent.TopCard))
+                                        {
+                                            return true;
+                                        }
+                                    }
+                                }
+
+                                return false;
+                            }
+
+                            bool CanActivateCondition1(Hashtable hashtable1)
+                            {
+                                if (CardEffectCommons.IsPermanentExistsOnBattleArea(selectedPermanent))
+                                {
+                                    if (!selectedPermanent.TopCard.CanNotBeAffected(activateClass))
+                                    {
+                                        return true;
+                                    }
+                                }
+
+                                return false;
+                            }
+
+                            IEnumerator ActivateCoroutine1(Hashtable _hashtable1)
+                            {
+                                if (CardEffectCommons.IsPermanentExistsOnBattleArea(selectedPermanent))
+                                {
+                                    yield return ContinuousController.instance.StartCoroutine(new DestroyPermanentsClass(
+                                    new List<Permanent>() { selectedPermanent },
+                                    CardEffectCommons.CardEffectHashtable(activateClass1)).Destroy());
+                                }
+                            }
+
+                            ICardEffect GetCardEffect(EffectTiming _timing)
+                            {
+                                if (_timing == EffectTiming.OnEndTurn)
+                                {
+                                    return activateClass1;
+                                }
+
+                                return null;
+                            }
+                        }
+
+                        #endregion
+                    }
+                }
+            }
+            #endregion
+
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/EX10/White/EX10_061.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: bafac8edc8982504dad20bb49840d8ad
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: