Przeglądaj źródła

card bug fixes, updated logs for larger issues, let familiar tokens spawn multiple at same time

mbunch_kascope 1 rok temu
rodzic
commit
01ab94144b

+ 2 - 2
Assets/CardBaseEntity/EX7/Yellow/Digimon/SaberLeomon-EX7-029.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:d4583048905fee49e4aa9dbcc6acbd8b1e3633e10f04024590a0a628aead85f5
-size 1505
+oid sha256:4b6782d5771c7373f40cd1aeac637799fe8f337255f5a5472f74501aacf38d4e
+size 1553

+ 2 - 2
Assets/CardBaseEntity/EX7/Yellow/Digimon/SaberLeomon-EX7-029_P1.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:c0b760e03b8f556077fcc72a7251b3b206063d801228bf075ee9334a88476627
-size 1511
+oid sha256:b8bae26fa5ec6c22fd24632fcc06c405d5878fa9a4117848e2520ff10a6f61dd
+size 1559

+ 0 - 6
Assets/CardEffect/BT17/Purple/Fenriloogamon_BT17_069.cs

@@ -46,10 +46,8 @@ namespace DCGO.CardEffects.BT17
 
                 bool CanUseCondition(Hashtable hashtable)
                 {
-                    UnityEngine.Debug.Log($"CanUseCondition: {CardEffectCommons.IsExistOnBattleAreaDigimon(card)}");
                     if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
                     {
-                        UnityEngine.Debug.Log($"CanUseCondition: {CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card)}");
                         return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
                     }
 
@@ -72,10 +70,6 @@ namespace DCGO.CardEffects.BT17
 
                 bool CanActivateCondition(Hashtable hashtable)
                 {
-                    UnityEngine.Debug.Log($"CanUseCondition: {CardEffectCommons.IsExistOnBattleAreaDigimon(card)}");
-                    UnityEngine.Debug.Log($"CanUseCondition: {card.PermanentOfThisCard().DigivolutionCards.Some(IsEijiCardCondition)}");
-                    UnityEngine.Debug.Log($"CanUseCondition: {CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectTrashCardCondition)}");
-                    UnityEngine.Debug.Log($"CanUseCondition: {CardEffectCommons.IsExistOnBattleAreaDigimon(card) && card.PermanentOfThisCard().DigivolutionCards.Some(IsEijiCardCondition) && CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectTrashCardCondition)}");
                     return CardEffectCommons.IsExistOnBattleAreaDigimon(card) &&
                            card.PermanentOfThisCard().DigivolutionCards.Some(IsEijiCardCondition) &&
                            CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectTrashCardCondition);

+ 1 - 0
Assets/CardEffect/EX7/Black/DerBlitz_EX7_070.cs

@@ -16,6 +16,7 @@ namespace DCGO.CardEffects.EX7
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("De-Digivolve 1", CanUseCondition, card);
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDescription());
+                activateClass.SetIsInheritedEffect(true);
                 cardEffects.Add(activateClass);
 
                 string EffectDescription()

+ 27 - 21
Assets/CardEffect/EX7/Blue/Hexeblaumon_EX7_023.cs

@@ -76,7 +76,10 @@ namespace DCGO.CardEffects.EX7
 
                 bool CanSelectTamerCondition(Permanent permanent)
                 {
-                    return permanent.IsTamer;
+                    if(!CardEffectCommons.IsOwnerPermanent(permanent, card))
+                        return permanent.IsTamer;
+
+                    return false;
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
@@ -123,11 +126,12 @@ namespace DCGO.CardEffects.EX7
             
             #region Opponent's Turn Effect
 
-            if (timing == EffectTiming.None)
+            if (timing == EffectTiming.OnStartTurn)
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Opponent's digimon can't suspend", CanUseCondition, card);
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                activateClass.SetIsBackgroundProcess(true);
                 cardEffects.Add(activateClass);
 
                 string EffectDiscription()
@@ -135,38 +139,42 @@ namespace DCGO.CardEffects.EX7
                     return "[Opponent's Turn] None of your opponent's Digimon with as many or fewer digivolution cards as this Digimon can suspend.";
                 }
 
-                bool CanUseCondition(Hashtable hashtable)
+                bool CantSuspendCondition(Permanent permanent)
                 {
-                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
+                    if (CardEffectCommons.IsPermanentExistsOnOpponentBattleArea(permanent, card))
                     {
-                        return CardEffectCommons.IsOpponentTurn(card);
+                        if (permanent.IsDigimon && permanent.DigivolutionCards.Count <= card.PermanentOfThisCard().DigivolutionCards.Count)
+                            return true;
                     }
 
                     return false;
                 }
-                
-                bool CanActivateCondition(Hashtable hashtable)
-                {
-                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
-                        return true;
 
-                    return false;
-                }
-                
-                bool CanSelectPermanentToNoSuspend(Permanent permanent)
+                bool CanUseCondition(Hashtable hashtable)
                 {
-                    if (CardEffectCommons.IsPermanentExistsOnOpponentBattleArea(permanent, card))
+                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
                     {
-                        if (permanent.IsDigimon && permanent.DigivolutionCards.Count <= card.PermanentOfThisCard().DigivolutionCards.Count)
-                            return true;
+                        return CardEffectCommons.IsOpponentTurn(card);
                     }
 
                     return false;
                 }
+                
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
+                }               
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
                 {
-                    if (card.Owner.Enemy.GetBattleAreaPermanents().Count(CanSelectPermanentToNoSuspend) >= 1)
+                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCanNotSuspendPlayerEffect(
+                        permanentCondition: CantSuspendCondition,
+                        effectDuration: EffectDuration.UntilOpponentTurnEnd,
+                        activateClass: activateClass,
+                        isOnlyActivePhase: false,
+                        effectName: "Can't Suspend"));
+
+                    /*if (card.Owner.Enemy.GetBattleAreaPermanents().Count(CanSelectPermanentToNoSuspend) >= 1)
                     {
                         foreach (Permanent affected in card.Owner.Enemy.GetBattleAreaPermanents())
                         {
@@ -202,9 +210,7 @@ namespace DCGO.CardEffects.EX7
                                 return true;
                             }
                         }
-                    }
-
-                    yield return null;
+                    }*/
                 }
             }
 

+ 5 - 2
Assets/CardEffect/EX7/Blue/ShogunGekomon_EX7_022.cs

@@ -16,7 +16,10 @@ namespace DCGO.CardEffects.EX7
             {
                 bool PermanentCondition(Permanent targetPermanent)
                 {
-                    return targetPermanent.TopCard.CardTraits.Contains("NSp");
+                    if(targetPermanent.TopCard.HasLevel && targetPermanent.Level == 4)
+                        return targetPermanent.TopCard.CardTraits.Contains("NSp");
+
+                    return false;
                 }
 
                 cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(
@@ -182,7 +185,7 @@ namespace DCGO.CardEffects.EX7
 
                     foreach (Permanent toCheck in card.Owner.GetBattleAreaPermanents())
                     {
-                        if (toCheck.TopCard.CardTraits.Contains("NSp"))
+                        if (toCheck.TopCard.EqualsTraits("NSp"))
                             validCards.Add(toCheck);
                     }
 

+ 1 - 1
Assets/CardEffect/EX7/Blue/SummonFrost_EX7_067.cs

@@ -99,7 +99,7 @@ namespace DCGO.CardEffects.EX7
                         {
                             List<CardSource> selectedCards = new List<CardSource>();
 
-                            int maxCount = Math.Min(1, card.Owner.HandCards.Count(CanSelectCardCondition);
+                            int maxCount = Math.Min(1, card.Owner.HandCards.Count(CanSelectCardCondition));
 
                             SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
 

+ 80 - 83
Assets/CardEffect/EX7/Purple/BeelStarmon_EX7_059.cs

@@ -321,7 +321,7 @@ namespace DCGO.CardEffects.EX7
 
             #region When Attacking
             if (timing == EffectTiming.OnAllyAttack)
-                {
+            {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Return 1 digivolution card to play 1 Option", CanUseCondition, card);
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, true, EffectDiscription());
@@ -368,7 +368,7 @@ namespace DCGO.CardEffects.EX7
                 {
                     if (cardSource.IsOption)
                     {
-                        if (cardSource.CardTraits.Contains("Three Musketeers") || cardSource.CardTraits.Contains("ThreeMusketeers"))
+                        if (cardSource.EqualsTraits("Three Musketeers"))
                         {
                             if (cardSource.HasUseCost)
                             {
@@ -385,99 +385,96 @@ namespace DCGO.CardEffects.EX7
 
                 IEnumerator ActivateCoroutine(Hashtable _hashtable)
                 {
-                    if (CardEffectCommons.IsExistOnBattleArea(card))
-                    {
-                        bool trashed = false;
+                    bool trashed = false;
 
-                        List<CardSource> selectedCards = new List<CardSource>();
+                    List<CardSource> selectedCards = new List<CardSource>();
 
-                        SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+                    SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+
+                    selectCardEffect.SetUp(
+                                canTargetCondition: CanSelectCardCondition,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                canNoSelect: () => true,
+                                selectCardCoroutine: SelectCardCoroutine,
+                                afterSelectCardCoroutine: null,
+                                message: "Select 1 Option card to discard.",
+                                maxCount: 1,
+                                canEndNotMax: false,
+                                isShowOpponent: true,
+                                mode: SelectCardEffect.Mode.Custom,
+                                root: SelectCardEffect.Root.Custom,
+                                customRootCardList: card.PermanentOfThisCard().DigivolutionCards,
+                                canLookReverseCard: true,
+                                selectPlayer: card.Owner,
+                                cardEffect: null);
+
+                    selectCardEffect.SetUpCustomMessage("Select 1 Option card to discard.", "The opponent is selecting 1 Option card to discard.");
+
+                    yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
+
+                    IEnumerator SelectCardCoroutine(CardSource cardSource)
+                    {
+                        selectedCards.Add(cardSource);
 
-                        selectCardEffect.SetUp(
-                                    canTargetCondition: CanSelectCardCondition,
-                                    canTargetCondition_ByPreSelecetedList: null,
-                                    canEndSelectCondition: null,
-                                    canNoSelect: () => true,
-                                    selectCardCoroutine: SelectCardCoroutine,
-                                    afterSelectCardCoroutine: null,
-                                    message: "Select 1 Option card to discard.",
-                                    maxCount: 1,
-                                    canEndNotMax: false,
-                                    isShowOpponent: true,
-                                    mode: SelectCardEffect.Mode.Custom,
-                                    root: SelectCardEffect.Root.Custom,
-                                    customRootCardList: card.PermanentOfThisCard().DigivolutionCards,
-                                    canLookReverseCard: true,
-                                    selectPlayer: card.Owner,
-                                    cardEffect: null);
-
-                        selectCardEffect.SetUpCustomMessage("Select 1 Option card to discard.", "The opponent is selecting 1 Option card to discard.");
+                        yield return null;
+                    }
 
-                        yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
+                    if (selectedCards.Count >= 1)
+                    {
+                        yield return ContinuousController.instance.StartCoroutine(new ITrashDigivolutionCards(card.PermanentOfThisCard(), selectedCards, activateClass).TrashDigivolutionCards());
 
-                        IEnumerator SelectCardCoroutine(CardSource cardSource)
+                        trashed = true;
+                    }
+
+                    if (trashed)
+                    {
+                        if (card.Owner.HandCards.Count(CanSelectCardCondition1) >= 1)
                         {
-                            selectedCards.Add(cardSource);
+                            int maxCount = 1;
+
+                            SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
+
+                            selectHandEffect.SetUp(
+                                selectPlayer: card.Owner,
+                                canTargetCondition: CanSelectCardCondition1,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                maxCount: maxCount,
+                                canNoSelect: true,
+                                canEndNotMax: false,
+                                isShowOpponent: true,
+                                selectCardCoroutine: SelectCardCoroutine1,
+                                afterSelectCardCoroutine: null,
+                                mode: SelectHandEffect.Mode.Custom,
+                                cardEffect: activateClass);
+
+                            selectHandEffect.SetUpCustomMessage(
+                                "Select 1 option card to use.",
+                                "The opponent is selecting 1 option card to use.");
+                            selectHandEffect.SetUpCustomMessage_ShowCard("Used Card");
+
+                            yield return StartCoroutine(selectHandEffect.Activate());
+
+                            IEnumerator SelectCardCoroutine1(CardSource cardSource)
+                            {
+                                selectedCards.Add(cardSource);
 
-                            yield return null;
+                                yield return null;
+                            }
                         }
 
                         if (selectedCards.Count >= 1)
                         {
-                            yield return ContinuousController.instance.StartCoroutine(new ITrashDigivolutionCards(card.PermanentOfThisCard(), selectedCards, activateClass).TrashDigivolutionCards());
-
-                            trashed = true;
+                            yield return ContinuousController.instance.StartCoroutine(
+                                CardEffectCommons.PlayOptionCards(
+                                    cardSources: selectedCards,
+                                    activateClass: activateClass,
+                                    payCost: false,
+                                    root: SelectCardEffect.Root.Hand
+                                )
+                            );
                         }
-
-                        if (trashed)
-                        {
-                            if (card.Owner.HandCards.Count(CanSelectCardCondition1) >= 1)
-                            {
-                                int maxCount = 1;
-
-                                SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
-
-                                selectHandEffect.SetUp(
-                                    selectPlayer: card.Owner,
-                                    canTargetCondition: CanSelectCardCondition1,
-                                    canTargetCondition_ByPreSelecetedList: null,
-                                    canEndSelectCondition: null,
-                                    maxCount: maxCount,
-                                    canNoSelect: true,
-                                    canEndNotMax: false,
-                                    isShowOpponent: true,
-                                    selectCardCoroutine: SelectCardCoroutine1,
-                                    afterSelectCardCoroutine: null,
-                                    mode: SelectHandEffect.Mode.Custom,
-                                    cardEffect: activateClass);
-
-                                selectHandEffect.SetUpCustomMessage(
-                                    "Select 1 option card to use.",
-                                    "The opponent is selecting 1 option card to use.");
-                                selectHandEffect.SetUpCustomMessage_ShowCard("Used Card");
-
-                                yield return StartCoroutine(selectHandEffect.Activate());
-
-                                IEnumerator SelectCardCoroutine1(CardSource cardSource)
-                                {
-                                    selectedCards.Add(cardSource);
-
-                                    yield return null;
-                                }
-                            }
-
-                            if (selectedCards.Count >= 1)
-                            {
-                                yield return ContinuousController.instance.StartCoroutine(
-                                    CardEffectCommons.PlayOptionCards(
-                                        cardSources: selectedCards,
-                                        activateClass: activateClass,
-                                        payCost: false,
-                                        root: SelectCardEffect.Root.Hand
-                                    )
-                                );
-                            }
-                        }                   
                     }
                 }
             }

+ 54 - 65
Assets/CardEffect/EX7/Purple/EyesmonScatterMode_EX7_053.cs

@@ -11,7 +11,7 @@ namespace DCGO.CardEffects.EX7
         {
             List<ICardEffect> cardEffects = new List<ICardEffect>();
 
-            #region On PLay
+            #region On Play
             if (timing == EffectTiming.OnEnterFieldAnyone)
             {
                 ActivateClass activateClass = new ActivateClass();
@@ -32,7 +32,7 @@ namespace DCGO.CardEffects.EX7
                         {
                             if (cardSource.Owner == card.Owner)
                             {
-                                if (cardSource.CardTraits.Contains("Evil") || cardSource.CardTraits.Contains("Dark Dragon") || cardSource.CardTraits.Contains("Evil Dragon"))
+                                if (cardSource.EqualsTraits("Evil") || cardSource.EqualsTraits("Dark Dragon") || cardSource.EqualsTraits("Evil Dragon"))
                                 {
                                     return true;
                                 }
@@ -45,78 +45,67 @@ namespace DCGO.CardEffects.EX7
 
                 bool CanUseCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
+                    if(CardEffectCommons.IsExistOnBattleAreaDigimon(card))
+                        return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
+
+                    return false;
                 }
 
                 bool CanActivateCondition(Hashtable hashtable)
                 {
-                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
-                    {
-                        if (card.Owner.HandCards.Count >= 1)
-                        {
-                            return true;
-                        }
-                    }
-
-                    return false;
+                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable _hashtable)
                 {
-                    if (isExistOnField(card))
+                    if (card.Owner.HandCards.Count >= 1)
                     {
-                        if (card.Owner.GetBattleAreaDigimons().Contains(card.PermanentOfThisCard()))
-                        {
-                            if (card.Owner.HandCards.Count >= 1)
-                            {
-                                int discardCount = 1;
-
-                                SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
-
-                                selectHandEffect.SetUp(
-                                    selectPlayer: card.Owner,
-                                    canTargetCondition: (cardSource) => true,
-                                    canTargetCondition_ByPreSelecetedList: null,
-                                    canEndSelectCondition: null,
-                                    maxCount: discardCount,
-                                    canNoSelect: true,
-                                    canEndNotMax: false,
-                                    isShowOpponent: true,
-                                    selectCardCoroutine: null,
-                                    afterSelectCardCoroutine: null,
-                                    mode: SelectHandEffect.Mode.Discard,
-                                    cardEffect: activateClass);
-
-                                yield return StartCoroutine(selectHandEffect.Activate());
-
-                                if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectCardCondition))
-                                {
-                                    int maxCount = Math.Min(1, card.Owner.TrashCards.Count(CanSelectCardCondition));
-
-                                    SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
-
-                                    selectCardEffect.SetUp(
-                                        canTargetCondition: CanSelectCardCondition,
-                                        canTargetCondition_ByPreSelecetedList: null,
-                                        canEndSelectCondition: null,
-                                        canNoSelect: () => false,
-                                        selectCardCoroutine: null,
-                                        afterSelectCardCoroutine: null,
-                                        message: "Select 1 card to add to your hand.",
-                                        maxCount: maxCount,
-                                        canEndNotMax: false,
-                                        isShowOpponent: true,
-                                        mode: SelectCardEffect.Mode.AddHand,
-                                        root: SelectCardEffect.Root.Trash,
-                                        customRootCardList: null,
-                                        canLookReverseCard: true,
-                                        selectPlayer: card.Owner,
-                                        cardEffect: activateClass);
-
-                                    yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
-                                }                               
-                            }
-                        }
+                        int discardCount = 1;
+
+                        SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
+
+                        selectHandEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: (cardSource) => true,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: discardCount,
+                            canNoSelect: true,
+                            canEndNotMax: false,
+                            isShowOpponent: true,
+                            selectCardCoroutine: null,
+                            afterSelectCardCoroutine: null,
+                            mode: SelectHandEffect.Mode.Discard,
+                            cardEffect: activateClass);
+
+                        yield return StartCoroutine(selectHandEffect.Activate()); 
+                    }
+
+                    if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectCardCondition))
+                    {
+                        int maxCount = Math.Min(1, card.Owner.TrashCards.Count(CanSelectCardCondition));
+
+                        SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+
+                        selectCardEffect.SetUp(
+                            canTargetCondition: CanSelectCardCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            canNoSelect: () => false,
+                            selectCardCoroutine: null,
+                            afterSelectCardCoroutine: null,
+                            message: "Select 1 card to add to your hand.",
+                            maxCount: maxCount,
+                            canEndNotMax: false,
+                            isShowOpponent: true,
+                            mode: SelectCardEffect.Mode.AddHand,
+                            root: SelectCardEffect.Root.Trash,
+                            customRootCardList: null,
+                            canLookReverseCard: true,
+                            selectPlayer: card.Owner,
+                            cardEffect: activateClass);
+
+                        yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
                     }
                 }
             }

+ 189 - 237
Assets/CardEffect/EX7/Purple/HurricaneScrewShot_EX7_071.cs

@@ -17,6 +17,7 @@ namespace DCGO.CardEffects.EX7
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Memory +1", CanUseCondition, card);
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                activateClass.SetIsInheritedEffect(true);
                 cardEffects.Add(activateClass);
 
                 string EffectDiscription()
@@ -85,69 +86,71 @@ namespace DCGO.CardEffects.EX7
             }
             #endregion
 
-            #region Main
-            if (timing == EffectTiming.OptionSkill)
+            #region Shared Conditions
+            bool CanSelectLevel3Condition(Permanent permanent)
             {
-                ActivateClass activateClass = new ActivateClass();
-                activateClass.SetUpICardEffect(card.BaseENGCardNameFromEntity, CanUseCondition, card);
-                activateClass.SetUpActivateClass(null, ActivateCoroutine, -1, false, EffectDiscription());
-                cardEffects.Add(activateClass);
-
-                string EffectDiscription()
-                {
-                    return "[Main] Delete 1 of your opponent's level 3 Digimon, level 4 Digimon, and level 5 Digimon. Then, place this card as the bottom digivolution card of 1 of your Digimon with the [Three Musketeers] trait.";
-                }
-
-                bool CanSelectLevel3Condition(Permanent permanent)
+                if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
                 {
-                    if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
+                    if (permanent.TopCard.HasLevel)
                     {
-                        if (permanent.TopCard.HasLevel)
+                        if (permanent.Level == 3)
                         {
-                            if (permanent.Level == 3)
-                            {
-                                return true;
-                            }
+                            return true;
                         }
                     }
-                    return false;
                 }
+                return false;
+            }
 
-                bool CanSelectLevel4Condition(Permanent permanent)
+            bool CanSelectLevel4Condition(Permanent permanent)
+            {
+                if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
                 {
-                    if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
+                    if (permanent.TopCard.HasLevel)
                     {
-                        if (permanent.TopCard.HasLevel)
+                        if (permanent.Level == 4)
                         {
-                            if (permanent.Level == 4)
-                            {
-                                return true;
-                            }
+                            return true;
                         }
                     }
-                    return false;
                 }
+                return false;
+            }
 
-                bool CanSelectLevel5Condition(Permanent permanent)
+            bool CanSelectLevel5Condition(Permanent permanent)
+            {
+                if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
                 {
-                    if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
+                    if (permanent.TopCard.HasLevel)
                     {
-                        if (permanent.TopCard.HasLevel)
+                        if (permanent.Level == 5)
                         {
-                            if (permanent.Level == 5)
-                            {
-                                return true;
-                            }
+                            return true;
                         }
                     }
-                    return false;
+                }
+                return false;
+            }
+            #endregion
+
+            #region Main
+            if (timing == EffectTiming.OptionSkill)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect(card.BaseENGCardNameFromEntity, CanUseCondition, card);
+                activateClass.SetUpActivateClass(null, ActivateCoroutine, -1, false, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[Main] Delete 1 of your opponent's level 3 Digimon, level 4 Digimon, and level 5 Digimon. Then, place this card as the bottom digivolution card of 1 of your Digimon with the [Three Musketeers] trait.";
                 }
 
                 bool CanSelectPermanentCondition(Permanent permanent)
                 {
                     if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
                     {
-                        if (permanent.TopCard.CardTraits.Contains("Three Musketeers") || permanent.TopCard.CardTraits.Contains("ThreeMusketeers"))
+                        if (permanent.TopCard.EqualsTraits("Three Musketeers"))
                         {
                             return true;
                         }
@@ -163,93 +166,90 @@ namespace DCGO.CardEffects.EX7
 
                 IEnumerator ActivateCoroutine(Hashtable _hashtable)
                 {
-                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
+                    List<Permanent> selectedPermanents = new List<Permanent>();
+
+                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectLevel3Condition))
                     {
-                        List<Permanent> selectedPermanents = new List<Permanent>();
+                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectLevel3Condition));
 
-                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectLevel3Condition))
-                        {
-                            int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectLevel3Condition));
-
-                            SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
-
-                            selectPermanentEffect.SetUp(
-                                selectPlayer: card.Owner,
-                                canTargetCondition: CanSelectLevel3Condition,
-                                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 level 3 Digimon to delete.", "The opponent is selecting 1 level 3 Digimon to delete.");
-
-                            yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
-                        }
+                        SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
 
-                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectLevel4Condition))
-                        {
-                            int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectLevel4Condition));
-
-                            SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
-
-                            selectPermanentEffect.SetUp(
-                                selectPlayer: card.Owner,
-                                canTargetCondition: CanSelectLevel4Condition,
-                                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 level 4 Digimon to delete.", "The opponent is selecting 1 level 4 Digimon to delete.");
-
-                            yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
-                        }
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectLevel3Condition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: maxCount,
+                            canNoSelect: false,
+                            canEndNotMax: false,
+                            selectPermanentCoroutine: SelectDeletionCoroutine,
+                            afterSelectPermanentCoroutine: null,
+                            mode: SelectPermanentEffect.Mode.Custom,
+                            cardEffect: activateClass);
 
-                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectLevel5Condition))
-                        {
-                            int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectLevel5Condition));
-
-                            SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
-
-                            selectPermanentEffect.SetUp(
-                                selectPlayer: card.Owner,
-                                canTargetCondition: CanSelectLevel5Condition,
-                                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 level 5 Digimon to delete.", "The opponent is selecting 1 level 5 Digimon to delete.");
-
-                            yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
-                        }
+                        selectPermanentEffect.SetUpCustomMessage("Select 1 level 3 Digimon to delete.", "The opponent is selecting 1 level 3 Digimon to delete.");
 
-                        IEnumerator SelectPermanentCoroutine(Permanent permanent)
-                        {
-                            selectedPermanents.Add(permanent);
-                            yield return null;
-                        }
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                    }
+
+                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectLevel4Condition))
+                    {
+                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectLevel4Condition));
+
+                        SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectLevel4Condition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: maxCount,
+                            canNoSelect: false,
+                            canEndNotMax: false,
+                            selectPermanentCoroutine: SelectDeletionCoroutine,
+                            afterSelectPermanentCoroutine: null,
+                            mode: SelectPermanentEffect.Mode.Custom,
+                            cardEffect: activateClass);
+
+                        selectPermanentEffect.SetUpCustomMessage("Select 1 level 4 Digimon to delete.", "The opponent is selecting 1 level 4 Digimon to delete.");
+
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                    }
+
+                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectLevel5Condition))
+                    {
+                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectLevel5Condition));
+
+                        SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectLevel5Condition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: maxCount,
+                            canNoSelect: false,
+                            canEndNotMax: false,
+                            selectPermanentCoroutine: SelectDeletionCoroutine,
+                            afterSelectPermanentCoroutine: null,
+                            mode: SelectPermanentEffect.Mode.Custom,
+                            cardEffect: activateClass);
 
-                        yield return ContinuousController.instance.StartCoroutine(new DestroyPermanentsClass(
-                            selectedPermanents,
-                            CardEffectCommons.CardEffectHashtable(activateClass)).Destroy());
+                        selectPermanentEffect.SetUpCustomMessage("Select 1 level 5 Digimon to delete.", "The opponent is selecting 1 level 5 Digimon to delete.");
+
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                    }
+
+                    IEnumerator SelectDeletionCoroutine(Permanent permanent)
+                    {
+                        selectedPermanents.Add(permanent);
+                        yield return null;
                     }
 
+                    yield return ContinuousController.instance.StartCoroutine(new DestroyPermanentsClass(
+                        selectedPermanents,
+                        CardEffectCommons.CardEffectHashtable(activateClass)).Destroy());
+
                     if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
                     {
                         int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
@@ -301,144 +301,96 @@ namespace DCGO.CardEffects.EX7
                     return "[Security] Delete 1 of your opponent's level 3 Digimon, level 4 Digimon, and level 5 Digimon.";
                 }
 
-                bool CanSelectLevel3Condition(Permanent permanent)
+                bool CanUseCondition(Hashtable hashtable)
                 {
-                    if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
-                    {
-                        if (permanent.TopCard.HasLevel)
-                        {
-                            if (permanent.Level == 3)
-                            {
-                                return true;
-                            }
-                        }
-                    }
-                    return false;
+                    return CardEffectCommons.CanTriggerSecurityEffect(hashtable, card);
                 }
 
-                bool CanSelectLevel4Condition(Permanent permanent)
+                IEnumerator ActivateCoroutine(Hashtable _hashtable)
                 {
-                    if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
+                    List<Permanent> selectedPermanents = new List<Permanent>();
+
+                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectLevel3Condition))
                     {
-                        if (permanent.TopCard.HasLevel)
-                        {
-                            if (permanent.Level == 4)
-                            {
-                                return true;
-                            }
-                        }
+                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectLevel3Condition));
+
+                        SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectLevel3Condition,
+                            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 level 3 Digimon to delete.", "The opponent is selecting 1 level 3 Digimon to delete.");
+
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
                     }
-                    return false;
-                }
 
-                bool CanSelectLevel5Condition(Permanent permanent)
-                {
-                    if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
+                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectLevel4Condition))
                     {
-                        if (permanent.TopCard.HasLevel)
-                        {
-                            if (permanent.Level == 5)
-                            {
-                                return true;
-                            }
-                        }
-                    }
-                    return false;
-                }
+                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectLevel4Condition));
 
-                bool CanUseCondition(Hashtable hashtable)
-                {
-                    return CardEffectCommons.CanTriggerSecurityEffect(hashtable, card);
-                }
+                        SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
 
-                IEnumerator ActivateCoroutine(Hashtable _hashtable)
-                {
-                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectLevel4Condition,
+                            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 level 4 Digimon to delete.", "The opponent is selecting 1 level 4 Digimon to delete.");
+
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                    }
+
+                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectLevel5Condition))
                     {
-                        List<Permanent> selectedPermanents = new List<Permanent>();
+                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectLevel5Condition));
 
-                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectLevel3Condition))
-                        {
-                            int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectLevel3Condition));
-
-                            SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
-
-                            selectPermanentEffect.SetUp(
-                                selectPlayer: card.Owner,
-                                canTargetCondition: CanSelectLevel3Condition,
-                                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 level 3 Digimon to delete.", "The opponent is selecting 1 level 3 Digimon to delete.");
-
-                            yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
-                        }
+                        SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
 
-                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectLevel4Condition))
-                        {
-                            int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectLevel4Condition));
-
-                            SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
-
-                            selectPermanentEffect.SetUp(
-                                selectPlayer: card.Owner,
-                                canTargetCondition: CanSelectLevel4Condition,
-                                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 level 4 Digimon to delete.", "The opponent is selecting 1 level 4 Digimon to delete.");
-
-                            yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
-                        }
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectLevel5Condition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: maxCount,
+                            canNoSelect: false,
+                            canEndNotMax: false,
+                            selectPermanentCoroutine: SelectPermanentCoroutine,
+                            afterSelectPermanentCoroutine: null,
+                            mode: SelectPermanentEffect.Mode.Custom,
+                            cardEffect: activateClass);
 
-                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectLevel5Condition))
-                        {
-                            int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectLevel5Condition));
-
-                            SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
-
-                            selectPermanentEffect.SetUp(
-                                selectPlayer: card.Owner,
-                                canTargetCondition: CanSelectLevel5Condition,
-                                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 level 5 Digimon to delete.", "The opponent is selecting 1 level 5 Digimon to delete.");
-
-                            yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
-                        }
+                        selectPermanentEffect.SetUpCustomMessage("Select 1 level 5 Digimon to delete.", "The opponent is selecting 1 level 5 Digimon to delete.");
 
-                        IEnumerator SelectPermanentCoroutine(Permanent permanent)
-                        {
-                            selectedPermanents.Add(permanent);
-                            yield return null;
-                        }
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                    }
 
-                        yield return ContinuousController.instance.StartCoroutine(new DestroyPermanentsClass(
-                            selectedPermanents,
-                            CardEffectCommons.CardEffectHashtable(activateClass)).Destroy());
+                    IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                    {
+                        selectedPermanents.Add(permanent);
+                        yield return null;
                     }
+
+                    yield return ContinuousController.instance.StartCoroutine(new DestroyPermanentsClass(
+                        selectedPermanents,
+                        CardEffectCommons.CardEffectHashtable(activateClass)).Destroy());
                 }
             }
             #endregion

+ 77 - 91
Assets/CardEffect/EX7/Purple/Orochimon_EX7_056.cs

@@ -41,15 +41,7 @@ namespace DCGO.CardEffects.EX7
 
                 bool CanActivateCondition(Hashtable hashtable)
                 {
-                    if (CardEffectCommons.CanActivateOnDeletion(card))
-                    {
-                        if (card.Owner.HandCards.Count >= 1)
-                        {
-                            return true;
-                        }
-                    }
-
-                    return false;
+                    return CardEffectCommons.CanActivateOnDeletion(card);
                 }
 
                 bool CanSelectPermanentCondition(Permanent permanent)
@@ -84,94 +76,88 @@ namespace DCGO.CardEffects.EX7
 
                 IEnumerator ActivateCoroutine(Hashtable _hashtable)
                 {
-                    if (isExistOnField(card))
+                    if (card.Owner.HandCards.Count >= 1)
                     {
-                        if (card.Owner.GetBattleAreaDigimons().Contains(card.PermanentOfThisCard()))
-                        {
-                            if (card.Owner.HandCards.Count >= 1)
-                            {
-                                int discardCount = 1;
-
-                                SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
-
-                                selectHandEffect.SetUp(
-                                    selectPlayer: card.Owner,
-                                    canTargetCondition: (cardSource) => true,
-                                    canTargetCondition_ByPreSelecetedList: null,
-                                    canEndSelectCondition: null,
-                                    maxCount: discardCount,
-                                    canNoSelect: false,
-                                    canEndNotMax: false,
-                                    isShowOpponent: true,
-                                    selectCardCoroutine: null,
-                                    afterSelectCardCoroutine: null,
-                                    mode: SelectHandEffect.Mode.Discard,
-                                    cardEffect: activateClass);
-
-                                yield return StartCoroutine(selectHandEffect.Activate());
-                            }
-
-                            List<Permanent> selectedPermanents = new List<Permanent>();
+                        int discardCount = 1;
+
+                        SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
+
+                        selectHandEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: (cardSource) => true,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: discardCount,
+                            canNoSelect: false,
+                            canEndNotMax: false,
+                            isShowOpponent: true,
+                            selectCardCoroutine: null,
+                            afterSelectCardCoroutine: null,
+                            mode: SelectHandEffect.Mode.Discard,
+                            cardEffect: activateClass);
+
+                        yield return StartCoroutine(selectHandEffect.Activate());
+                    }
 
-                            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 level 3 Digimon to delete.", "The opponent is selecting 1 level 3 Digimon to delete.");
-
-                                yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
-                            }
+                    List<Permanent> selectedPermanents = new List<Permanent>();
 
-                            if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition1))
-                            {
-                                int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition1));
-
-                                SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
-
-                                selectPermanentEffect.SetUp(
-                                    selectPlayer: card.Owner,
-                                    canTargetCondition: CanSelectPermanentCondition1,
-                                    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 level 4 Digimon to delete.", "The opponent is selecting 1 level 4 Digimon to delete.");
-
-                                yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
-                            }
+                    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 level 3 Digimon to delete.", "The opponent is selecting 1 level 3 Digimon to delete.");
+
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                    }
 
-                            IEnumerator SelectPermanentCoroutine(Permanent permanent)
-                            {
-                                selectedPermanents.Add(permanent);
-                                yield return null;
-                            }
+                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition1))
+                    {
+                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition1));
+
+                        SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectPermanentCondition1,
+                            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 level 4 Digimon to delete.", "The opponent is selecting 1 level 4 Digimon to delete.");
+
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                    }
 
-                            yield return ContinuousController.instance.StartCoroutine(new DestroyPermanentsClass(
-                                selectedPermanents,
-                                CardEffectCommons.CardEffectHashtable(activateClass)).Destroy());
-                        }
+                    IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                    {
+                        selectedPermanents.Add(permanent);
+                        yield return null;
                     }
+
+                    yield return ContinuousController.instance.StartCoroutine(new DestroyPermanentsClass(
+                        selectedPermanents,
+                        CardEffectCommons.CardEffectHashtable(activateClass)).Destroy());
                 }
             }
             #endregion

+ 1 - 1
Assets/CardEffect/EX7/Purple/Tsukaimon_EX7_052.cs

@@ -24,7 +24,7 @@ namespace DCGO.CardEffects.EX7
 
                 bool CanSelectCardCondition(CardSource cardSource)
                 {
-                    if (cardSource.name.Contains("Lilithmon"))
+                    if (cardSource.HasText("Lilithmon"))
                     {
                         return true;
                     }                  

+ 6 - 10
Assets/CardEffect/EX7/Red/ChaosTriangular_EX7_066.cs

@@ -18,6 +18,7 @@ namespace DCGO.CardEffects.EX7
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("+3000DP", CanUseCondition, card);
                 activateClass.SetUpActivateClass(null, ActivateCoroutine, -1, false, EffectDiscription());
+                activateClass.SetIsInheritedEffect(true);
                 cardEffects.Add(activateClass);
 
                 string EffectDiscription()
@@ -25,21 +26,16 @@ namespace DCGO.CardEffects.EX7
                     return "When an effect trashes this digivolution card, 1 of your Digimon gets +3000 DP until the end of your opponent's turn.";
                 }
 
-                bool CanUseCondition(Hashtable hashtable)
-                {    
-                    if (CardEffectCommons.CanTriggerOnTrashSelfDigivolutionCard(hashtable, cardEffect => cardEffect != null, card))
-                    {
-                        return true;
-                    }                        
-                     
-                    return false;
-                }
-
                 bool CanSelectPermanentCondition(Permanent permanent)
                 {
                     return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card);
                 }
 
+                bool CanUseCondition(Hashtable hashtable)
+                {                   
+                    return CardEffectCommons.CanTriggerOnTrashSelfDigivolutionCard(hashtable, cardEffect => cardEffect != null, card);
+                }
+
                 IEnumerator ActivateCoroutine(Hashtable _hashtable)
                 {
                     if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))

+ 1 - 1
Assets/CardEffect/EX7/Red/Vorvomon_EX7_007.cs

@@ -24,7 +24,7 @@ namespace DCGO.CardEffects.EX7
 
                 bool CanSelectCardCondition(CardSource cardSource)
                 {
-                    if (cardSource.CardTraits.Contains("Rock Dragon") || cardSource.CardTraits.Contains("Earth Dragon") || cardSource.CardTraits.Contains("Machine Dragon") || cardSource.CardTraits.Contains("Sky Dragon"))
+                    if (cardSource.ContainsTraits("Rock Dragon") || cardSource.ContainsTraits("Earth Dragon") || cardSource.ContainsTraits("Machine Dragon") || cardSource.ContainsTraits("Sky Dragon"))
                     {
                         return true;
                     }

+ 6 - 7
Assets/CardEffect/EX7/Yellow/Familiar_EX7_030_token.cs

@@ -23,20 +23,19 @@ namespace DCGO.CardEffects.Tokens
                     return "[On Deletion] 1 of your opponent's Digimon gets -3000 DP for the turn.";
                 }
 
-                bool CanUseCondition(Hashtable hashtable)
-                {
-                    return CardEffectCommons.CanTriggerOnDeletion(hashtable, card);
-                }
-                
                 bool CanSelectPermanentCondition(Permanent permanent)
                 {
                     return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card);
                 }
 
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnDeletion(hashtable, card);
+                }
+                
                 bool CanActivateCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.CanActivateOnDeletion(card) &&
-                           CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition);
+                    return CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition);
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)

+ 9 - 7
Assets/CardEffect/ST18/Green/Fluffymon_ST18_01.cs

@@ -22,19 +22,21 @@ namespace DCGO.CardEffects.ST18
 
                 string EffectDescription()
                 {
-                    return
-                        "[When Attacking] (Once Per Turn) You may suspend 1 other Digimon with DP less than or equal to this Digimon.";
+                    return "[When Attacking] (Once Per Turn) You may suspend 1 other Digimon with DP less than or equal to this Digimon.";
                 }
 
-                bool CanUseCondition(Hashtable hashtable)
+                bool CanSelectPermanentCondition(Permanent permanent)
                 {
-                    return CardEffectCommons.CanTriggerOnAttack(hashtable, card);
+                    if(CardEffectCommons.IsPermanentExistsOnBattleAreaDigimon(permanent))
+                        return  permanent != card.PermanentOfThisCard() && 
+                                permanent.DP <= card.PermanentOfThisCard().DP;
+
+                    return false;
                 }
 
-                bool CanSelectPermanentCondition(Permanent permanent)
+                bool CanUseCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.IsPermanentExistsOnBattleAreaDigimon(permanent) &&
-                           permanent.DP <= card.PermanentOfThisCard().DP;
+                    return CardEffectCommons.CanTriggerOnAttack(hashtable, card);
                 }
 
                 bool CanActivateCondition(Hashtable hashtable)

+ 9 - 4
Assets/CardEffect/ST18/Green/Muchomon_ST18_05.cs

@@ -35,10 +35,15 @@ namespace DCGO.CardEffects.ST18
 
                 bool CanSelectPermanentCondition(Permanent permanent)
                 {
-                    return permanent.IsDigimon &&
-                           (permanent.TopCard.ContainsTraits("Avian") || 
-                            permanent.TopCard.ContainsTraits("Bird") || 
-                            permanent.TopCard.ContainsTraits("Vortex Warriors"));
+                    if(CardEffectCommons.IsOwnerPermanent(permanent, card))
+                    {
+                        return permanent.IsDigimon &&
+                            (permanent.TopCard.ContainsTraits("Avian") ||
+                             permanent.TopCard.ContainsTraits("Bird") ||
+                             permanent.TopCard.ContainsTraits("Vortex Warriors"));
+                    }
+                    
+                    return false;
                 }
 
                 bool CanActivateCondition(Hashtable hashtable)

+ 1 - 3
Assets/CardEffect/ST19/Yellow/Cendrillmon_ST19_12.cs

@@ -60,9 +60,7 @@ namespace DCGO.CardEffects.ST19
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
                 {
-                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayFamiliarToken(activateClass));
-                    
-                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayFamiliarToken(activateClass));
+                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayFamiliarToken(activateClass, 2));                    
                 }
             }
 

+ 1 - 0
Assets/Scripts/AutoProcessing.cs

@@ -789,6 +789,7 @@ public class AutoProcessing : MonoBehaviourPunCallbacks
 
         if (cardEffect.CanActivate(hashtable) || cardEffect.IsDeclarative)
         {
+            UnityEngine.Debug.Log($"ActivateEffectProcess - Passing CanActivate: {cardEffect.EffectSourceCard.BaseENGCardNameFromEntity}");
             bool isEffectProcessing = MainProcessingEffect != null;
 
             if (!isEffectProcessing)

+ 3 - 2
Assets/Scripts/CardEffectCommons.cs

@@ -217,13 +217,14 @@ public partial class CardEffectCommons
     #endregion
     
     #region Play 1 [Familiar] Token
-    public static IEnumerator PlayFamiliarToken(ICardEffect activateClass)
+    public static IEnumerator PlayFamiliarToken(ICardEffect activateClass, int quantity = 1)
     {
         yield return ContinuousController.instance.StartCoroutine(PlayToken(
             tokenData: ContinuousController.instance.FamiliarToken,
             activateClass: activateClass,
             isOwnerPermanent: true,
-            isTapped: false
+            isTapped: false,
+            quantity: quantity
         ));
     }
     #endregion

+ 32 - 0
Assets/Scripts/CardSource.cs

@@ -1119,6 +1119,11 @@ public class CardSource : MonoBehaviour
     #endregion
 
     #region whether this card has at least 1 card name that equals the string
+    /// <summary>
+    /// Used to check if specified name is exactly in cards name values ("dra" is not "Commandramon") 
+    /// </summary>
+    /// <param name="string">value to check for</param>
+    /// <author>Mike Bunch</author>
     public bool EqualsCardName(string name)
     {
         if (string.IsNullOrEmpty(name))
@@ -1138,6 +1143,11 @@ public class CardSource : MonoBehaviour
     #endregion
 
     #region whether this card has at least 1 card name that contains the string
+    /// <summary>
+    /// Used to check if specified trait is within cards name values ("dra" is in "Commandramon") 
+    /// </summary>
+    /// <param trait="string">value to check for</param>
+    /// <author>Mike Bunch</author>
     public bool ContainsCardName(string name)
     {
         if (string.IsNullOrEmpty(name))
@@ -1226,7 +1236,29 @@ public class CardSource : MonoBehaviour
     public bool HasXAntiBodyName => CardNames.Some(DataBase.IsContainingXAntibodyString);
     #endregion
 
+    #region whether this card has at least 1 trait that equals the string
+    /// <summary>
+    /// Used to check if specified trait is exactly in cards trait values ("Sky Dragon" is not "Dragon") 
+    /// </summary>
+    /// <param trait="string">value to check for</param>
+    /// <author>Mike Bunch</author>
+    public bool EqualsTraits(string trait)
+    {
+        if (string.IsNullOrEmpty(trait))
+            return false;
+
+        string replaced = trait.Replace(" ", "");
+
+        return CardTraits.Some(cardTrait => cardTrait.Equals(trait) || cardTrait.Equals(replaced));
+    }
+    #endregion
+
     #region whether this card has at least 1 trait that contains the string
+    /// <summary>
+    /// Used to check if specified trait is within cards trait values ("Sky Dragon" contains "Dragon") 
+    /// </summary>
+    /// <param trait="string">value to check for</param>
+    /// <author>Mike Bunch</author>
     public bool ContainsTraits(string trait)
     {
         if (string.IsNullOrEmpty(trait))

+ 2 - 1
Assets/Scripts/ICardEffect.cs

@@ -916,9 +916,10 @@ public static class ActivateICardEffectExtensionClass
                 }
             }
         }
-
+        UnityEngine.Debug.Log($"Activate_Optional_Effect_Execute: {(activateICardEffect is ICardEffect)}");
         if (activateICardEffect is ICardEffect)
         {
+            UnityEngine.Debug.Log($"Activate_Optional_Effect_Execute: {((ICardEffect)activateICardEffect).EffectSourceCard.BaseENGCardNameFromEntity}");
             //Optional effect activation selection
             if (((ICardEffect)activateICardEffect).IsOptional)
             {

+ 4 - 3
Assets/Scripts/TurnStateMachine.cs

@@ -9,6 +9,7 @@ using UnityEngine;
 //using Hashtable = ExitGames.Client.Photon.Hashtable;
 using UnityEngine.EventSystems;
 using UnityEngine.UI;
+using static UnityEngine.UIElements.UxmlAttributeDescription;
 public class TurnStateMachine : MonoBehaviourPunCallbacks
 {
     //Class to manage battle status
@@ -1147,7 +1148,7 @@ public class TurnStateMachine : MonoBehaviourPunCallbacks
             yield return new WaitWhile(() => GManager.instance.commandText.gameObject.activeSelf);
             #endregion
 
-            #region 起動効果使用
+            #region Use activation effect
             if (UseCardEffect != null)
             {
                 if (UseCardEffect is ActivateICardEffect)
@@ -1156,14 +1157,14 @@ public class TurnStateMachine : MonoBehaviourPunCallbacks
                     {
                         UseCardEffect.SetIsDeclarative(true);
 
-                        //使用回数をカウントアップ
+                        //Count up the number of uses
                         if (UseCardEffect.MaxCountPerTurn < 100)
                         {
                             UseCardEffect.EffectSourceCard.cEntity_EffectController.RegisterUseEfffectThisTurn(UseCardEffect);
                         }
 
                         // yield return StartCoroutine(((ActivateICardEffect)UseCardEffect).Activate_Optional_Effect_Execute(null));
-
+                        UnityEngine.Debug.Log($"MainPhase: UseCardEffect - {UseCardEffect.EffectSourceCard.BaseENGCardNameFromEntity}, {UseCardEffect.MaxCountPerTurn}");
                         yield return ContinuousController.instance.StartCoroutine(GManager.instance.autoProcessing.ActivateEffectProcess(
                                 UseCardEffect,
                                 null));