Albert Vasconcellos 2 年 前
コミット
68c552d965

+ 8 - 0
Assets/CardEffect/ST17/Blue.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 1c93bbaf6a545d74c9a43937766dd60f
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 276 - 0
Assets/CardEffect/ST17/Blue/Magnamon_ST17_13.cs

@@ -0,0 +1,276 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using System.Linq;
+using Photon;
+using System;
+using Photon.Pun;
+
+namespace DCGO.CardEffects.ST17
+{
+    public class Magnamon_ST17_13 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            #region Digivolution Condition
+            if (timing == EffectTiming.None)
+            {
+                bool PermanentCondition(Permanent targetPermanent)
+                {
+                    if ((targetPermanent.TopCard.CardNames.Contains("Veemon")))
+                    {
+                        return true;
+                    }
+                    return false;
+                }
+
+                cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(permanentCondition: PermanentCondition, digivolutionCost: 3, ignoreDigivolutionRequirement: false, card: card, condition: null));
+            }
+            #endregion
+
+            #region Security Effect
+            if (timing == EffectTiming.SecuritySkill)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("De-Digivolve 1 to 1 Digimon at the end of the battle", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                activateClass.SetIsSecurityEffect(true);
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[Security] <De-Digivolve 1> on 1 of your opponent's Digimon. At the end of the battle, 1 of your Digimon may Digivolve into this card without paying the cost.";
+                }
+
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerSecurityEffect(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnExecutingArea(card))
+                    {
+                        return true;
+                    }
+
+                    return false;
+                }
+
+                
+
+                IEnumerator ActivateCoroutine(Hashtable _hashtable)
+                {
+                    yield return null;
+
+                    ContinuousController.instance.PlaySE(GManager.instance.GetComponent<Effects>().BuffSE);
+
+                    ActivateClass activateClass1 = new ActivateClass();
+                    activateClass1.SetUpICardEffect("De-Digivolve 1 to 1 Digimon", CanUseCondition1, card);
+                    activateClass1.SetUpActivateClass(CanActivateCondition1, ActivateCoroutine1, -1, false, EffectDiscription1());
+                    card.Owner.UntilEndBattleEffects.Add(GetCardEffect1);
+
+                    string EffectDiscription1()
+                    {
+                        return "Trigger <De-Digivolve 1> on up to 1 of your opponent's Digimon. (Trash a card from the top of one of your opponent's Digimon. If it has no digivolution cards, or becomes a level 3 Digimon, you can't trash any more cards.)";
+                    }
+
+                    bool CanSelectPermanentCondition(Permanent permanent)
+                    {
+                        return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card);
+                    }
+
+                    bool CanUseCondition1(Hashtable hashtable)
+                    {
+                        return true;
+                    }
+
+                    bool CanActivateCondition1(Hashtable hashtable)
+                    {
+                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                        {
+                            return true;
+                        }
+
+                        return false;
+                    }
+
+                    IEnumerator ActivateCoroutine1(Hashtable _hashtable1)
+                    {
+                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                        {
+                            int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
+
+                            SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                            selectPermanentEffect.SetUp(
+                                selectPlayer: card.Owner,
+                                canTargetCondition: CanSelectPermanentCondition,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                maxCount: maxCount,
+                                canNoSelect: false,
+                                canEndNotMax: false,
+                                selectPermanentCoroutine: SelectPermanentCoroutine,
+                                afterSelectPermanentCoroutine: null,
+                                mode: SelectPermanentEffect.Mode.Custom,
+                                cardEffect: activateClass);
+
+                            selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to De-Digivolve.", "The opponent is selecting 1 Digimon to De-Digivolve.");
+                            yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                            IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                            {
+                                Permanent selectedPermanent = permanent;
+
+                                yield return ContinuousController.instance.StartCoroutine(new IDegeneration(selectedPermanent, 1, activateClass1).Degeneration());
+                            }
+                        }
+
+                        
+
+                    }
+
+                    ICardEffect GetCardEffect1(EffectTiming _timing)
+                    {
+                        if (_timing == EffectTiming.OnEndBattle)
+                        {
+                            return activateClass1;
+                        }
+
+                        return null;
+                    }
+                }
+            }
+            #endregion
+
+            #region When Digivolving
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Trash digivolution cards", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[When Digivolving] For each color of 1 of your opponent's Digimon has, trash that Digimon's top digivolution card. Then, return 1 of your opponent's Digimon without digivolution cards to the hand.";
+                }
+
+                bool CanSelectPermanentCondition(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
+                    {
+                        if (permanent.DigivolutionCards.Count((cardSource) => !cardSource.CanNotTrashFromDigivolutionCards(activateClass)) >= 1)
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanSelectPermanentCondition1(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
+                    {
+                        if (permanent.HasNoDigivolutionCards)
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable _hashtable)
+                {
+                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                    {
+                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
+
+                        SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectPermanentCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: maxCount,
+                            canNoSelect: false,
+                            canEndNotMax: false,
+                            selectPermanentCoroutine: SelectPermanentCoroutine,
+                            afterSelectPermanentCoroutine: null,
+                            mode: SelectPermanentEffect.Mode.Custom,
+                            cardEffect: activateClass);
+
+                        selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon that will trash digivolution cards.", "The opponent is selecting 1 Digimon that will trash digivolution cards.");
+
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                        IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                        {
+                            Permanent selectedPermanent = permanent;
+
+                            int count()
+                            {
+                                return selectedPermanent.TopCard.CardColors.Count();
+                            }
+
+                            yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.TrashDigivolutionCardsFromTopOrBottom(targetPermanent: selectedPermanent, trashCount: count(), isFromTop: true, activateClass: activateClass));
+
+                        }
+                    }
+
+                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition1))
+                    {
+                        int maxCount1 = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition1));
+
+                        SelectPermanentEffect selectPermanentEffect1 = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                        selectPermanentEffect1.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectPermanentCondition1,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: maxCount1,
+                            canNoSelect: false,
+                            canEndNotMax: false,
+                            selectPermanentCoroutine: null,
+                            afterSelectPermanentCoroutine: null,
+                            mode: SelectPermanentEffect.Mode.Bounce,
+                            cardEffect: activateClass);
+
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect1.Activate());
+                    }
+                }
+            }
+
+            #endregion
+
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/ST17/Blue/Magnamon_ST17_13.cs.meta

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

+ 123 - 11
Assets/CardEffect/ST17/Green/MegaGargomonAce_ST17_08.cs

@@ -26,7 +26,7 @@ namespace DCGO.CardEffects.ST17
                     return false;
                 }
 
-                cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(permanentCondition: PermanentCondition, digivolutionCost: 5, ignoreDigivolutionRequirement: false, card: card, condition: null));
+                cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(permanentCondition: PermanentCondition, digivolutionCost: 5, ignoreDigivolutionRequirement: true, card: card, condition: null));
             }
 
             if (timing == EffectTiming.None)
@@ -50,7 +50,7 @@ namespace DCGO.CardEffects.ST17
                 cardEffects.Add(CardEffectFactory.BlockerSelfStaticEffect(isInheritedEffect: false, card: card, condition: null));
             }
 
-            if (timing == EffectTiming.WhenPermanentWouldBeDeleted)
+            if (timing == EffectTiming.None)
             {
                 cardEffects.Add(CardEffectFactory.RebootSelfStaticEffect(isInheritedEffect: false, card: card, condition: null));
             }
@@ -70,6 +70,7 @@ namespace DCGO.CardEffects.ST17
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Suspend Digimons and Tamers and give effects", CanUseCondition, card);
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                activateClass.SetHashString("SuspendAndGiveEffects_ST17_08");
                 cardEffects.Add(activateClass);
 
                 string EffectDiscription()
@@ -112,9 +113,14 @@ namespace DCGO.CardEffects.ST17
 
                 bool CanSelectPermanentCondition1(Permanent permanent)
                 {
-                    if (CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(permanent, card))
+                    if (CardEffectCommons.IsPermanentExistsOnOpponentBattleArea(permanent, card))
                     {
-                        if (permanent.CanSelectBySkill(activateClass))
+                        if (permanent.IsDigimon)
+                        {
+                            return true;
+                        }
+
+                        if (permanent.IsTamer)
                         {
                             return true;
                         }
@@ -125,9 +131,9 @@ namespace DCGO.CardEffects.ST17
 
                 IEnumerator ActivateCoroutine(Hashtable _hashtable)
                 {
-                    if (card.Owner.GetBattleAreaPermanents().Count(CanSelectPermanentCondition) + card.Owner.Enemy.GetBattleAreaPermanents().Count(CanSelectPermanentCondition) >= 1)
+                    if (card.Owner.Enemy.GetBattleAreaPermanents().Count(CanSelectPermanentCondition) >= 1)
                     {
-                        int maxCount = Math.Min(2, card.Owner.GetBattleAreaPermanents().Count(CanSelectPermanentCondition) + card.Owner.Enemy.GetBattleAreaPermanents().Count(CanSelectPermanentCondition));
+                        int maxCount = Math.Min(2, card.Owner.Enemy.GetBattleAreaPermanents().Count(CanSelectPermanentCondition));
 
                         SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
 
@@ -187,7 +193,7 @@ namespace DCGO.CardEffects.ST17
                             CanNotDigivolveClass canNotPutFieldClass = new CanNotDigivolveClass();
                             canNotPutFieldClass.SetUpICardEffect("Can't Digivolve", CanUseCondition1, card);
                             canNotPutFieldClass.SetUpCanNotEvolveClass(permanentCondition: PermanentCondition, cardCondition: CardCondition);
-                            card.Owner.Enemy.UntilOwnerTurnEndEffects.Add((_timing) => canNotPutFieldClass);
+                            selectedPermanent.UntilOwnerTurnEndEffects.Add(GetCardEffect);
 
                             ContinuousController.instance.PlaySE(GManager.instance.GetComponent<Effects>().DebuffSE);
 
@@ -204,10 +210,7 @@ namespace DCGO.CardEffects.ST17
                                 {
                                     if (permanent.TopCard != null)
                                     {
-                                        if (permanent.TopCard.Owner == card.Owner.Enemy)
-                                        {
-                                            return true;
-                                        }
+                                        return true;
                                     }
                                 }
 
@@ -216,12 +219,24 @@ namespace DCGO.CardEffects.ST17
 
                             bool CardCondition(CardSource cardSource)
                             {
+
                                 if (cardSource.Owner == card.Owner.Enemy)
                                 {
                                     return true;
                                 }
 
                                 return false;
+                                
+                            }
+
+                            ICardEffect GetCardEffect(EffectTiming _timing)
+                            {
+                                if (_timing == EffectTiming.None)
+                                {
+                                    return canNotPutFieldClass;
+                                }
+
+                                return null;
                             }
 
                             yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCantUnsuspendUntilOpponentTurnEnd(
@@ -233,6 +248,103 @@ namespace DCGO.CardEffects.ST17
                     }
                 }
             }
+            
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Unsuspend this Digimon", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, true, EffectDiscription());
+                activateClass.SetHashString("Unsuspend_ST17_08");
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[When Digivolving] You may unsuspend this Digimon.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        return true;
+                    }
+
+                    return false;
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.CanUnsuspend(card.PermanentOfThisCard()))
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable _hashtable)
+                {
+                    Permanent selectedPermanent = card.PermanentOfThisCard();
+
+                    yield return ContinuousController.instance.StartCoroutine(new IUnsuspendPermanents(new List<Permanent>() { selectedPermanent }, activateClass).Unsuspend());
+                }
+
+            }
+
+
+            #endregion
+
+            #region End of Attack
+
+            if(timing == EffectTiming.OnEndAttack)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Unsuspend this Digimon", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, true, EffectDiscription());
+                activateClass.SetHashString("Unsuspend_ST17_08");
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[End of Attack] You may unsuspend this Digimon.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        return true;
+                    }
+
+                    return false;
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.CanTriggerOnAttack(hashtable, card))
+                        {
+                            if (CardEffectCommons.CanUnsuspend(card.PermanentOfThisCard()))
+                            {
+                                return true;
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable _hashtable)
+                {
+                    Permanent selectedPermanent = card.PermanentOfThisCard();
+
+                    yield return ContinuousController.instance.StartCoroutine(new IUnsuspendPermanents(new List<Permanent>() { selectedPermanent }, activateClass).Unsuspend());
+                }
+            }
 
             #endregion
 

+ 225 - 39
Assets/CardEffect/ST17/Green/Wendigomon_ST17_04.cs

@@ -109,11 +109,17 @@ public class Wendigomon_ST17_04 : CEntity_Effect
 
             IEnumerator ActivateCoroutine(Hashtable _hashtable)
             {
-                List<Permanent> selectedDigimon = new List<Permanent>();
+                Permanent selectedPermanent;
 
                 if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
                 {
                     int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
+                    
+                    bool deletedOwn = false;
+                    
+                    Permanent deletedCard = null;
+
+                    int deleteCount = 1;
 
                     SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
 
@@ -125,60 +131,240 @@ public class Wendigomon_ST17_04 : CEntity_Effect
                         maxCount: maxCount,
                         canNoSelect: false,
                         canEndNotMax: false,
-                        selectPermanentCoroutine: null,
+                        selectPermanentCoroutine: SelectPermanentCoroutine,
                         afterSelectPermanentCoroutine: null,
-                        mode: SelectPermanentEffect.Mode.Destroy,
+                        mode: SelectPermanentEffect.Mode.Custom,
                         cardEffect: activateClass);
 
+                    selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to delete.", "The opponent is selecting 1 Digimon to delete.");
+
                     yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
 
-                    IEnumerator DeleteDigimonCoroutine(List<Permanent> list)
+                    IEnumerator SelectPermanentCoroutine(Permanent permanent)
                     {
-                        if (list.Count == 1 && CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(list[0],card))
+                        if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
                         {
-                            if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, (cardSource) => CanSelectTerrierOrLop(cardSource)))
+                            yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.DeletePeremanentAndProcessAccordingToResult(targetPermanents: new List<Permanent>() { permanent }, activateClass: activateClass, successProcess: permanents => SuccessProcess(), failureProcess: null));
+
+                            IEnumerator SuccessProcess()
                             {
-                                int maxCount = Math.Min(1, card.Owner.TrashCards.Count((cardSource) => CanSelectTerrierOrLop(cardSource)));
-
-                                List<CardSource> selectedCards = new List<CardSource>();
-
-                                SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
-
-                                selectCardEffect.SetUp(
-                                    canTargetCondition: CanSelectTerrierOrLop,
-                                    canTargetCondition_ByPreSelecetedList: null,
-                                    canEndSelectCondition: null,
-                                    canNoSelect: () => false,
-                                    selectCardCoroutine: SelectCardCoroutine,
-                                    afterSelectCardCoroutine: null,
-                                    message: "Select card play.",
-                                    maxCount: maxCount,
-                                    canEndNotMax: true,
-                                    isShowOpponent: true,
-                                    mode: SelectCardEffect.Mode.Custom,
-                                    root: SelectCardEffect.Root.Trash,
-                                    customRootCardList: null,
-                                    canLookReverseCard: true,
-                                    selectPlayer: card.Owner,
-                                    cardEffect: activateClass);
-
-                                selectCardEffect.SetUpCustomMessage("Select 1 card to play.", "The opponent is selecting 1 card to play.");
-                                selectCardEffect.SetUpCustomMessage_ShowCard("Played Card");
-
-                                yield return StartCoroutine(selectCardEffect.Activate());
-
-                                IEnumerator SelectCardCoroutine(CardSource cardSource)
+                                if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectTerrierOrLop))
                                 {
-                                    selectedCards.Add(cardSource);
+                                    bool canSelectTrash = CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectTerrierOrLop);
+
+                                    if (canSelectTrash)
+                                    { 
+                                        List<CardSource> selectedCards = new List<CardSource>();
+
+                                        IEnumerator SelectCardCoroutine(CardSource cardSource)
+                                        {
+                                            selectedCards.Add(cardSource);
+
+                                            yield return null;
+                                        }
+
+                                            int maxCount = 1;
+
+                                            SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
 
-                                    yield return null;
+                                            selectCardEffect.SetUp(
+                                                canTargetCondition: CanSelectTerrierOrLop,
+                                                canTargetCondition_ByPreSelecetedList: null,
+                                                canEndSelectCondition: null,
+                                                canNoSelect: () => true,
+                                                selectCardCoroutine: SelectCardCoroutine,
+                                                afterSelectCardCoroutine: null,
+                                                message: "Select 1 card to play.",
+                                                maxCount: maxCount,
+                                                canEndNotMax: false,
+                                                isShowOpponent: true,
+                                                mode: SelectCardEffect.Mode.Custom,
+                                                root: SelectCardEffect.Root.Trash,
+                                                customRootCardList: null,
+                                                canLookReverseCard: true,
+                                                selectPlayer: card.Owner,
+                                                cardEffect: activateClass);
+
+                                            selectCardEffect.SetUpCustomMessage("Select 1 card to play.", "The opponent is selecting 1 card to play.");
+                                            selectCardEffect.SetUpCustomMessage_ShowCard("Played Card");
+
+                                            yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
+                                        
+
+                                        SelectCardEffect.Root root = SelectCardEffect.Root.Trash;
+
+                                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(cardSources: selectedCards, activateClass: activateClass, payCost: false, isTapped: false, root: root, activateETB: true));
+                                    }
                                 }
+                            }
+                        }
+                        if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.DeletePeremanentAndProcessAccordingToResult(targetPermanents: new List<Permanent>() { permanent }, activateClass: activateClass, successProcess: null, failureProcess: null));
+                        }
+                    }
+                }
+            }
+        }
+        #endregion
+
+        #region When Digivolving
+        if (timing == EffectTiming.OnEnterFieldAnyone)
+        {
+            ActivateClass activateClass = new ActivateClass();
+            activateClass.SetUpICardEffect("Delete 1 level 3 Digimon.", CanUseCondition, card);
+            activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+            cardEffects.Add(activateClass);
+
+            string EffectDiscription()
+            {
+                return "[When Digivolving] Delete 1 level 3 or lower Digimon. If this effect deleted your Digimon , you may play 1 level 3 Digimon card with [Terriermon] or [Lopmon] in its name from your trash without paying the cost.";
+            }
+
+            bool CanSelectPermanentCondition(Permanent permanent)
+            {
+                if (CardEffectCommons.IsPermanentExistsOnBattleArea(permanent))
+                {
+                    if (permanent.Level <= 3)
+                    {
+                        return true;
+                    }
+                }
+
+                return false;
+            }
 
-                                yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(cardSources: selectedCards, activateClass: activateClass, payCost: false, isTapped: false, root: SelectCardEffect.Root.Trash, activateETB: true));
+            bool CanSelectTerrierOrLop(CardSource cardSource)
+            {
+                if (cardSource != null)
+                {
+                    if (cardSource.IsDigimon)
+                    {
+                        if (cardSource.Owner == card.Owner)
+                        {
+                            if (cardSource.CardNames.Contains("Terriermon") || cardSource.CardNames.Contains("Lopmon"))
+                            {
+                                return true;
                             }
                         }
                     }
                 }
+
+                return false;
+            }
+
+            bool CanUseCondition(Hashtable hashtable)
+            {
+                return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+            }
+
+            bool CanActivateCondition(Hashtable hashtable)
+            {
+                if (CardEffectCommons.IsExistOnBattleArea(card))
+                {
+                    return true;
+                }
+
+                return false;
+            }
+
+            IEnumerator ActivateCoroutine(Hashtable _hashtable)
+            {
+                Permanent selectedPermanent;
+
+                if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                {
+                    int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
+
+                    bool deletedOwn = false;
+
+                    Permanent deletedCard = null;
+
+                    int deleteCount = 1;
+
+                    SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                    selectPermanentEffect.SetUp(
+                        selectPlayer: card.Owner,
+                        canTargetCondition: CanSelectPermanentCondition,
+                        canTargetCondition_ByPreSelecetedList: null,
+                        canEndSelectCondition: null,
+                        maxCount: maxCount,
+                        canNoSelect: false,
+                        canEndNotMax: false,
+                        selectPermanentCoroutine: SelectPermanentCoroutine,
+                        afterSelectPermanentCoroutine: null,
+                        mode: SelectPermanentEffect.Mode.Custom,
+                        cardEffect: activateClass);
+
+                    selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to delete.", "The opponent is selecting 1 Digimon to delete.");
+
+                    yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                    IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                    {
+                        if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.DeletePeremanentAndProcessAccordingToResult(targetPermanents: new List<Permanent>() { permanent }, activateClass: activateClass, successProcess: permanents => SuccessProcess(), failureProcess: null));
+
+                            IEnumerator SuccessProcess()
+                            {
+                                if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectTerrierOrLop))
+                                {
+                                    bool canSelectTrash = CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectTerrierOrLop);
+
+                                    if (canSelectTrash)
+                                    {
+                                        List<CardSource> selectedCards = new List<CardSource>();
+
+                                        IEnumerator SelectCardCoroutine(CardSource cardSource)
+                                        {
+                                            selectedCards.Add(cardSource);
+
+                                            yield return null;
+                                        }
+
+                                        int maxCount = 1;
+
+                                        SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+
+                                        selectCardEffect.SetUp(
+                                            canTargetCondition: CanSelectTerrierOrLop,
+                                            canTargetCondition_ByPreSelecetedList: null,
+                                            canEndSelectCondition: null,
+                                            canNoSelect: () => true,
+                                            selectCardCoroutine: SelectCardCoroutine,
+                                            afterSelectCardCoroutine: null,
+                                            message: "Select 1 card to play.",
+                                            maxCount: maxCount,
+                                            canEndNotMax: false,
+                                            isShowOpponent: true,
+                                            mode: SelectCardEffect.Mode.Custom,
+                                            root: SelectCardEffect.Root.Trash,
+                                            customRootCardList: null,
+                                            canLookReverseCard: true,
+                                            selectPlayer: card.Owner,
+                                            cardEffect: activateClass);
+
+                                        selectCardEffect.SetUpCustomMessage("Select 1 card to play.", "The opponent is selecting 1 card to play.");
+                                        selectCardEffect.SetUpCustomMessage_ShowCard("Played Card");
+
+                                        yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
+
+
+                                        SelectCardEffect.Root root = SelectCardEffect.Root.Trash;
+
+                                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(cardSources: selectedCards, activateClass: activateClass, payCost: false, isTapped: false, root: root, activateETB: true));
+                                    }
+                                }
+                            }
+                        }
+                        if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.DeletePeremanentAndProcessAccordingToResult(targetPermanents: new List<Permanent>() { permanent }, activateClass: activateClass, successProcess: null, failureProcess: null));
+                        }
+                    }
+                }
             }
         }
         #endregion