mbunch_kascope 2 lat temu
rodzic
commit
ca5e26cf55

+ 124 - 64
Assets/CardEffect/BT16/Black/Ankylomon_BT16_053.cs

@@ -23,103 +23,163 @@ namespace DCGO.CardEffects.BT16
             #endregion
 
             #region Barrier
-            if(timing == EffectTiming.None)
+            if(timing == EffectTiming.WhenPermanentWouldBeDeleted)
             {
                 cardEffects.Add(CardEffectFactory.BarrierSelfEffect(false, card, null));
             }
             #endregion
 
-            #region On Play/When Digivolving Shared
-            ActivateClass activateClass = new ActivateClass();
-
-            string EffectDiscription()
+            #region On Play
+            if (timing == EffectTiming.OnEnterFieldAnyone)
             {
-                return "[On Play] [When Digivolving] 1 of your opponent's Digimon can't attack players until the end of your opponent's turn.";
-            }
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("1 of your opponent's Digimon can't attack players", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                cardEffects.Add(activateClass);
 
-            bool CanSelectPermanentCondition(Permanent permanent)
-            {
-                return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card);
-            }
+                string EffectDiscription()
+                {
+                    return "[On Play] 1 of your opponent's Digimon can't attack players until the end of your opponent's turn.";
+                }
 
-            bool CanActivateCondition(Hashtable hashtable)
-            {
-                if (CardEffectCommons.IsExistOnBattleArea(card))
+                bool CanSelectPermanentCondition(Permanent permanent)
                 {
-                    if (card.Owner.Enemy.GetBattleAreaDigimons().Count >= 1)
-                        return true;
+                    return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card);
                 }
 
-                return false;
-            }
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
+                }
 
-            IEnumerator ActivateCoroutine(Hashtable hashtable)
-            {
-                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 Digimon that will get effects.",
-                                    "The opponent is selecting Digimon that will get effects.");
-
-                yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
-
-                IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                bool CanActivateCondition(Hashtable hashtable)
                 {
-                    bool DefenderCondition(Permanent defender)
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
                     {
-                        return defender == null;
+                        if (card.Owner.Enemy.GetBattleAreaDigimons().Count >= 1)
+                            return true;
                     }
 
-                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCanNotAttack(
-                        targetPermanent: permanent,
-                        defenderCondition: DefenderCondition,
-                        effectDuration: EffectDuration.UntilOwnerTurnEnd,
-                        activateClass: activateClass,
-                        effectName: "Can't Attack to player"));
+                    return false;
                 }
-            }
-            #endregion
 
-            #region On Play
-            if (timing == EffectTiming.OnEnterFieldAnyone)
-            {
-                activateClass.SetUpICardEffect("1 of your opponent's Digimon can't attack players", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
-                cardEffects.Add(activateClass);
-
-                bool CanUseCondition(Hashtable hashtable)
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
                 {
-                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
-                }                
+                    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 Digimon that will get effects.",
+                                        "The opponent is selecting Digimon that will get effects.");
+
+                    yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                    IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                    {
+                        bool DefenderCondition(Permanent defender)
+                        {
+                            return defender == null;
+                        }
+
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCanNotAttack(
+                            targetPermanent: permanent,
+                            defenderCondition: DefenderCondition,
+                            effectDuration: EffectDuration.UntilOwnerTurnEnd,
+                            activateClass: activateClass,
+                            effectName: "Can't Attack to player"));
+                    }
+                }
             }
             #endregion
 
             #region When Digivolving
             if (timing == EffectTiming.OnEnterFieldAnyone)
             {
+                ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("1 of your opponent's Digimon can't attack players", CanUseCondition, card);
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
                 cardEffects.Add(activateClass);
 
+                string EffectDiscription()
+                {
+                    return "[When Digivolving] 1 of your opponent's Digimon can't attack players until the end of your opponent's turn.";
+                }
+
+                bool CanSelectPermanentCondition(Permanent permanent)
+                {
+                    return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card);
+                }
+
                 bool CanUseCondition(Hashtable hashtable)
                 {
                     return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
                 }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (card.Owner.Enemy.GetBattleAreaDigimons().Count >= 1)
+                            return true;
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    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 Digimon that will get effects.",
+                                        "The opponent is selecting Digimon that will get effects.");
+
+                    yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                    IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                    {
+                        bool DefenderCondition(Permanent defender)
+                        {
+                            return defender == null;
+                        }
+
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCanNotAttack(
+                            targetPermanent: permanent,
+                            defenderCondition: DefenderCondition,
+                            effectDuration: EffectDuration.UntilOwnerTurnEnd,
+                            activateClass: activateClass,
+                            effectName: "Can't Attack to player"));
+                    }
+                }
             }
             #endregion
 

+ 1 - 1
Assets/CardEffect/BT16/Black/CodyHidaAndTKTakaishi_BT16_088.cs

@@ -43,7 +43,7 @@ namespace DCGO.CardEffects.BT16
 
                 bool CanUseCondition(Hashtable hashtable)
                 {
-                    return true;
+                    return CardEffectCommons.IsOwnerTurn(card);
                 }
 
                 bool CanActivateCondition(Hashtable hashtable)

+ 4 - 2
Assets/CardEffect/BT16/Black/Commandramon_BT16_050.cs

@@ -10,6 +10,7 @@ namespace DCGO.CardEffects.BT16
         {
             List<ICardEffect> cardEffects = new List<ICardEffect>();
 
+            #region Shared Effect
             string EffectDiscription()
             {
                 return "[All Turns] All of your other Digimon with the [D-Brigade] or [DigiPolice] trait get +1000 DP.";
@@ -40,13 +41,14 @@ namespace DCGO.CardEffects.BT16
 
                 return false;
             }
+            #endregion
 
             #region All Turns
             if (timing == EffectTiming.None)
             {
                 cardEffects.Add(CardEffectFactory.ChangeDPStaticEffect(
                 permanentCondition: PermanentCondition,
-                changeValue: 2000,
+                changeValue: 1000,
                 isInheritedEffect: false,
                 card: card,
                 condition: Condition,
@@ -59,7 +61,7 @@ namespace DCGO.CardEffects.BT16
             {
                 cardEffects.Add(CardEffectFactory.ChangeDPStaticEffect(
                 permanentCondition: PermanentCondition,
-                changeValue: 2000,
+                changeValue: 1000,
                 isInheritedEffect: true,
                 card: card,
                 condition: Condition,

+ 1 - 1
Assets/CardEffect/BT16/Black/Darkdramon_BT16_065.cs

@@ -467,7 +467,7 @@ namespace DCGO.CardEffects.BT16
 
                 bool CanUseCondition(Hashtable hashtable)
                 {
-                    return true;
+                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
                 }
 
                 bool CanActivateCondition(Hashtable hashtable)

+ 8 - 3
Assets/CardEffect/BT16/Black/Dorimon_BT16_005.cs

@@ -28,9 +28,9 @@ namespace DCGO.CardEffects.BT16
                     {
                         if (permanent.IsDigimon)
                         {
-                            if (permanent != card.PermanentOfThisCard())
+                            if (permanent.HasBlocker) 
                             {
-                                if(permanent.HasBlocker)
+                                if (permanent != card.PermanentOfThisCard())
                                 {
                                     return true;
                                 }
@@ -77,7 +77,12 @@ namespace DCGO.CardEffects.BT16
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
                 {
-                    yield return ContinuousController.instance.StartCoroutine(card.Owner.AddMemory(1, activateClass));
+                    List<Hashtable> hashtables = CardEffectCommons.GetHashtablesFromHashtable(hashtable);
+
+                    if (hashtables != null)
+                    {
+                        yield return ContinuousController.instance.StartCoroutine(card.Owner.AddMemory(hashtables.Count, activateClass));
+                    }
                 }
             }
 

+ 2 - 4
Assets/CardEffect/BT16/Black/DoruDjinn_BT16_098.cs

@@ -93,12 +93,10 @@ namespace DCGO.CardEffects.BT16
 
                             yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
                         }
-
-                        List<Permanent> destroyTargetPermanents = card.Owner.Enemy.GetBattleAreaDigimons().Filter(LowestPlayCostCondition);
-                        yield return ContinuousController.instance.StartCoroutine(new DestroyPermanentsClass(destroyTargetPermanents, CardEffectCommons.CardEffectHashtable(activateClass)).Destroy());
                     }
 
-                    yield return null;
+                    List<Permanent> destroyTargetPermanents = card.Owner.Enemy.GetBattleAreaDigimons().Filter(LowestPlayCostCondition);
+                    yield return ContinuousController.instance.StartCoroutine(new DestroyPermanentsClass(destroyTargetPermanents, CardEffectCommons.CardEffectHashtable(activateClass)).Destroy());
                 }
             }
             #endregion

+ 2 - 2
Assets/CardEffect/BT16/Black/DoruGreymon_BT16_061.cs

@@ -38,9 +38,9 @@ namespace DCGO.CardEffects.BT16
             #endregion
 
             #region Collision
-            if(timing == EffectTiming.None)
+            if(timing == EffectTiming.OnAllyAttack)
             {
-                cardEffects.Add(CardEffectFactory.CollisionSelfStaticEffect(false,card));
+                cardEffects.Add(CardEffectFactory.CollisionSelfStaticEffect(false,card, null));
             }
             #endregion
 

+ 464 - 0
Assets/CardEffect/BT16/Black/Dorugamon_BT16_058.cs

@@ -0,0 +1,464 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace DCGO.CardEffects.BT16
+{
+    public class Dorugamon_BT16_058 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            #region Alternate Digivolution Requirement
+            if (timing == EffectTiming.None)
+            {
+                bool PermanentCondition(Permanent targetPermanent)
+                {
+                    if (targetPermanent.TopCard.CardNames.Contains("Dorumon"))
+                    {
+                        return true;
+                    }
+
+                    if (targetPermanent.TopCard.Level == 3 && targetPermanent.TopCard.ContainsTraits("SoC"))
+                    {
+                        return true;
+                    }
+
+                    return false;
+                }
+
+                cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(
+                    permanentCondition: PermanentCondition,
+                    digivolutionCost: 2,
+                    ignoreDigivolutionRequirement: false,
+                    card: card,
+                    condition: null));
+            }
+            #endregion
+
+            #region Collision
+            if (timing == EffectTiming.OnAllyAttack)
+            {
+                cardEffects.Add(CardEffectFactory.CollisionSelfStaticEffect(false, card, null));
+            }
+            #endregion
+
+            #region On Play
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Draw 1", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[On Play] By trashing 1 card in your hand, <Draw 1>. Then, if this Digimon has a Tamer with the [SoC] trait in its digivolution cards, 1 of your opponent's Digimon gains \"[Start of Your Main Phase] This Digimon attacks.\" until the end of their turn.";
+                }
+
+                bool HasTamerCardCondition(CardSource cardSource)
+                {
+                    if (cardSource.CardTraits.Contains("SoC"))
+                    {
+                        if (cardSource.IsTamer)
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanSelectPermanentCondition(Permanent permanent)
+                {
+                    return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card);
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnBattleArea(card);
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    bool trashed = false;
+
+                    SelectCardEffect selectCardEffect = ContinuousController.instance.GetComponent<SelectCardEffect>();
+
+                    selectCardEffect.SetUp(
+                        canTargetCondition: null,
+                        canTargetCondition_ByPreSelecetedList: null,
+                        canEndSelectCondition: null,
+                        canNoSelect: null,
+                        selectCardCoroutine: SelectCardCoroutine,
+                        afterSelectCardCoroutine: null,
+                        message: "Select 1 card to trash",
+                        maxCount: 1,
+                        canEndNotMax: false,
+                        isShowOpponent: false,
+                        mode: SelectCardEffect.Mode.Discard,
+                        root: SelectCardEffect.Root.Hand,
+                        customRootCardList: null,
+                        canLookReverseCard: false,
+                        selectPlayer: card.Owner,
+                        cardEffect: activateClass);
+
+                    yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
+
+                    IEnumerator SelectCardCoroutine(CardSource cardSource)
+                    {
+                        if (cardSource != null)
+                            trashed = true;
+
+                        yield return null;
+                    }
+
+                    if (trashed)
+                    {
+                        if (card.Owner.LibraryCards.Count > 0)
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(new DrawClass(card.Owner, 1, activateClass).Draw());
+                        }
+
+                        #region Has Tamer with [SoC] Trait - grant Start of Your Main Phase Effect
+                        if (card.PermanentOfThisCard().DigivolutionCards.Count(HasTamerCardCondition) >= 1)
+                        {
+                            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("Selcect 1 Digimon that will get effects.", "The opponent is selecting 1 Digimon that will get effects.");
+                                yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                                IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                                {
+                                    Permanent selectedPermanent = permanent;
+
+                                    if (selectedPermanent != null)
+                                    {
+                                        ActivateClass activateClass1 = new ActivateClass();
+                                        activateClass1.SetUpICardEffect("Attack with this Digimon", CanUseCondition1, selectedPermanent.TopCard);
+                                        activateClass1.SetUpActivateClass(CanActivateCondition1, ActivateCoroutine1, -1, false, EffectDiscription1());
+                                        activateClass1.SetEffectSourcePermanent(selectedPermanent);
+                                        selectedPermanent.UntilOwnerTurnEndEffects.Add(GetCardEffect);
+
+                                        if (!permanent.TopCard.CanNotBeAffected(activateClass))
+                                        {
+                                            yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().CreateDebuffEffect(selectedPermanent));
+                                        }
+
+                                        string EffectDiscription1()
+                                        {
+                                            return "[Start of Your Main Phase] Attack with this Digimon.";
+                                        }
+
+                                        bool CanUseCondition1(Hashtable hashtable1)
+                                        {
+                                            if (CardEffectCommons.IsPermanentExistsOnBattleArea(selectedPermanent))
+                                            {
+                                                if (selectedPermanent.TopCard.Owner.GetBattleAreaDigimons().Contains(selectedPermanent))
+                                                {
+                                                    if (GManager.instance.turnStateMachine.gameContext.TurnPlayer == selectedPermanent.TopCard.Owner)
+                                                    {
+                                                        return true;
+                                                    }
+                                                }
+                                            }
+
+                                            return false;
+                                        }
+
+                                        bool CanActivateCondition1(Hashtable hashtable1)
+                                        {
+                                            if (CardEffectCommons.IsPermanentExistsOnBattleArea(selectedPermanent))
+                                            {
+                                                if (!permanent.TopCard.CanNotBeAffected(activateClass))
+                                                {
+                                                    if (permanent.CanAttack(activateClass1))
+                                                    {
+                                                        return true;
+                                                    }
+                                                }
+                                            }
+
+                                            return false;
+                                        }
+
+                                        IEnumerator ActivateCoroutine1(Hashtable _hashtable1)
+                                        {
+                                            if (CardEffectCommons.IsPermanentExistsOnBattleArea(selectedPermanent))
+                                            {
+                                                if (permanent.CanAttack(activateClass1))
+                                                {
+                                                    SelectAttackEffect selectAttackEffect = GManager.instance.GetComponent<SelectAttackEffect>();
+
+                                                    selectAttackEffect.SetUp(
+                                                        attacker: selectedPermanent,
+                                                        canAttackPlayerCondition: () => true,
+                                                        defenderCondition: (permanent) => true,
+                                                        cardEffect: activateClass1);
+
+                                                    selectAttackEffect.SetCanNotSelectNotAttack();
+
+                                                    yield return ContinuousController.instance.StartCoroutine(selectAttackEffect.Activate());
+                                                }
+                                            }
+                                        }
+
+                                        ICardEffect GetCardEffect(EffectTiming _timing)
+                                        {
+                                            if (_timing == EffectTiming.OnStartMainPhase)
+                                            {
+                                                return activateClass1;
+                                            }
+
+                                            return null;
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                        #endregion
+                    }
+                }
+            }
+            #endregion
+
+            #region When Digivolving
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Draw 1", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[When Digivolving] By trashing 1 card in your hand, <Draw 1>. Then, if this Digimon has a Tamer with the [SoC] trait in its digivolution cards, 1 of your opponent's Digimon gains \"[Start of Your Main Phase] This Digimon attacks.\" until the end of their turn.";
+                }
+
+                bool HasTamerCardCondition(CardSource cardSource)
+                {
+                    if (cardSource.CardTraits.Contains("SoC"))
+                    {
+                        if (cardSource.IsTamer)
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanSelectPermanentCondition(Permanent permanent)
+                {
+                    return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card);
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnBattleArea(card);
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    bool trashed = false;
+
+                    SelectCardEffect selectCardEffect = ContinuousController.instance.GetComponent<SelectCardEffect>();
+
+                    selectCardEffect.SetUp(
+                        canTargetCondition: null,
+                        canTargetCondition_ByPreSelecetedList: null,
+                        canEndSelectCondition: null,
+                        canNoSelect: null,
+                        selectCardCoroutine: SelectCardCoroutine,
+                        afterSelectCardCoroutine: null,
+                        message: "Select 1 card to trash",
+                        maxCount: 1,
+                        canEndNotMax: false,
+                        isShowOpponent: false,
+                        mode: SelectCardEffect.Mode.Discard,
+                        root: SelectCardEffect.Root.Hand,
+                        customRootCardList: null,
+                        canLookReverseCard: false,
+                        selectPlayer: card.Owner,
+                        cardEffect: activateClass);
+
+                    yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
+
+                    IEnumerator SelectCardCoroutine(CardSource cardSource)
+                    {
+                        if (cardSource != null)
+                            trashed = true;
+
+                        yield return null;
+                    }
+
+                    if (trashed)
+                    {
+                        if (card.Owner.LibraryCards.Count > 0)
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(new DrawClass(card.Owner, 1, activateClass).Draw());
+                        }
+
+                        #region Has Tamer with [SoC] Trait - grant Start of Your Main Phase Effect
+                        if (card.PermanentOfThisCard().DigivolutionCards.Count(HasTamerCardCondition) >= 1)
+                        {
+                            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("Selcect 1 Digimon that will get effects.", "The opponent is selecting 1 Digimon that will get effects.");
+                                yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                                IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                                {
+                                    Permanent selectedPermanent = permanent;
+
+                                    if (selectedPermanent != null)
+                                    {
+                                        ActivateClass activateClass1 = new ActivateClass();
+                                        activateClass1.SetUpICardEffect("Attack with this Digimon", CanUseCondition1, selectedPermanent.TopCard);
+                                        activateClass1.SetUpActivateClass(CanActivateCondition1, ActivateCoroutine1, -1, false, EffectDiscription1());
+                                        activateClass1.SetEffectSourcePermanent(selectedPermanent);
+                                        selectedPermanent.UntilOwnerTurnEndEffects.Add(GetCardEffect);
+
+                                        if (!permanent.TopCard.CanNotBeAffected(activateClass))
+                                        {
+                                            yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().CreateDebuffEffect(selectedPermanent));
+                                        }
+
+                                        string EffectDiscription1()
+                                        {
+                                            return "[Start of Your Main Phase] Attack with this Digimon.";
+                                        }
+
+                                        bool CanUseCondition1(Hashtable hashtable1)
+                                        {
+                                            if (CardEffectCommons.IsPermanentExistsOnBattleArea(selectedPermanent))
+                                            {
+                                                if (selectedPermanent.TopCard.Owner.GetBattleAreaDigimons().Contains(selectedPermanent))
+                                                {
+                                                    if (GManager.instance.turnStateMachine.gameContext.TurnPlayer == selectedPermanent.TopCard.Owner)
+                                                    {
+                                                        return true;
+                                                    }
+                                                }
+                                            }
+
+                                            return false;
+                                        }
+
+                                        bool CanActivateCondition1(Hashtable hashtable1)
+                                        {
+                                            if (CardEffectCommons.IsPermanentExistsOnBattleArea(selectedPermanent))
+                                            {
+                                                if (!permanent.TopCard.CanNotBeAffected(activateClass))
+                                                {
+                                                    if (permanent.CanAttack(activateClass1))
+                                                    {
+                                                        return true;
+                                                    }
+                                                }
+                                            }
+
+                                            return false;
+                                        }
+
+                                        IEnumerator ActivateCoroutine1(Hashtable _hashtable1)
+                                        {
+                                            if (CardEffectCommons.IsPermanentExistsOnBattleArea(selectedPermanent))
+                                            {
+                                                if (permanent.CanAttack(activateClass1))
+                                                {
+                                                    SelectAttackEffect selectAttackEffect = GManager.instance.GetComponent<SelectAttackEffect>();
+
+                                                    selectAttackEffect.SetUp(
+                                                        attacker: selectedPermanent,
+                                                        canAttackPlayerCondition: () => true,
+                                                        defenderCondition: (permanent) => true,
+                                                        cardEffect: activateClass1);
+
+                                                    selectAttackEffect.SetCanNotSelectNotAttack();
+
+                                                    yield return ContinuousController.instance.StartCoroutine(selectAttackEffect.Activate());
+                                                }
+                                            }
+                                        }
+
+                                        ICardEffect GetCardEffect(EffectTiming _timing)
+                                        {
+                                            if (_timing == EffectTiming.OnStartMainPhase)
+                                            {
+                                                return activateClass1;
+                                            }
+
+                                            return null;
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                        #endregion
+                    }
+                }
+            }
+            #endregion
+
+            #region Inherited Effect
+            if (timing == EffectTiming.None)
+            {
+                cardEffects.Add(CardEffectFactory.ChangeSelfDPStaticEffect<Func<int>>(
+                    changeValue: () => 1000,
+                    isInheritedEffect: true,
+                    card: card,
+                    condition: null));
+            }
+            #endregion
+
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/BT16/Black/Dorugamon_BT16_058.cs.meta

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

+ 4 - 4
Assets/CardEffect/BT16/Black/Dorugoramon_BT16_064.cs

@@ -43,8 +43,8 @@ namespace DCGO.CardEffects.BT16
             #region Collision - Blocker
             if(timing == EffectTiming.None)
             {
-                cardEffects.Add(CardEffectFactory.CollisionSelfStaticEffect(false,card));
-                cardEffects.Add(CardEffectFactory.BlockerSelfStaticEffect(false,card,null));
+                cardEffects.Add(CardEffectFactory.CollisionSelfStaticEffect(false, card, null));
+                cardEffects.Add(CardEffectFactory.BlockerSelfStaticEffect(false, card, null));
             }
             #endregion
 
@@ -52,7 +52,7 @@ namespace DCGO.CardEffects.BT16
             if (timing == EffectTiming.OnEnterFieldAnyone)
             {
                 ActivateClass activateClass = new ActivateClass();
-                activateClass.SetUpICardEffect("", CanUseCondition, card);
+                activateClass.SetUpICardEffect("Delete Unsuspended Digimon or Tamer", CanUseCondition, card);
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
                 cardEffects.Add(activateClass);
 
@@ -121,7 +121,7 @@ namespace DCGO.CardEffects.BT16
             if(timing == EffectTiming.OnDestroyedAnyone)
             {
                 ActivateClass activateClass = new ActivateClass();
-                activateClass.SetUpICardEffect("", CanUseCondition, card);
+                activateClass.SetUpICardEffect("Unsuspend this Digimon", CanUseCondition, card);
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, true, EffectDiscription());
                 activateClass.SetHashString("BT16_064_Unsuspend");
                 cardEffects.Add(activateClass);

+ 4 - 2
Assets/CardEffect/BT16/Black/HagurumonXAntibody_BT16_052.cs

@@ -22,7 +22,8 @@ namespace DCGO.CardEffects.BT16
             }
             #endregion
 
-            if (timing == EffectTiming.None)
+            #region When Digivolving
+            if (timing == EffectTiming.OnEnterFieldAnyone)
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Play 1 [KoHagurumon] token", CanUseCondition, card);
@@ -57,9 +58,10 @@ namespace DCGO.CardEffects.BT16
                     yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayKoHagurumonToken(activateClass));
                 }
             }
+            #endregion
 
             #region Inherited Effect
-            cardEffects.Add(CardEffectFactory.BlockerSelfStaticEffect(false, card, null));
+            cardEffects.Add(CardEffectFactory.BlockerSelfStaticEffect(true, card, null));
             #endregion
 
             return cardEffects;

+ 1 - 1
Assets/CardEffect/BT16/Black/KoHagurumon_BT16_052_token.cs

@@ -1,7 +1,7 @@
 using System.Collections;
 using System.Collections.Generic;
 
-namespace DCGO.CardEffects
+namespace DCGO.CardEffects.BT16
 {
     public class KoHagurumon_BT16_052_token : CEntity_Effect
     {

+ 12 - 2
Assets/CardEffect/BT16/Black/KosukeKisakata_BT16_087.cs

@@ -1,5 +1,6 @@
 using System.Collections;
 using System.Collections.Generic;
+using UnityEngine;
 using System.Linq;
 
 namespace DCGO.CardEffects.BT16
@@ -103,7 +104,7 @@ namespace DCGO.CardEffects.BT16
             if (timing == EffectTiming.OnEndTurn)
             {
                 ActivateClass activateClass = new ActivateClass();
-                activateClass.SetUpICardEffect("Play 1 [Shuu Yulin] from this Digimon's digivolution cards", CanUseCondition, card);
+                activateClass.SetUpICardEffect("Play 1 [Kosuke Kisakata] from this Digimon's digivolution cards", CanUseCondition, card);
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
                 activateClass.SetIsInheritedEffect(true);
                 cardEffects.Add(activateClass);
@@ -133,8 +134,10 @@ namespace DCGO.CardEffects.BT16
 
                 bool CanUseCondition(Hashtable hashtable)
                 {
+                    Debug.Log($"CanUseCondition: {CardEffectCommons.IsExistOnBattleArea(card)}");
                     if (CardEffectCommons.IsExistOnBattleArea(card))
                     {
+                        Debug.Log($"CanUseCondition: true");
                         return true;
                     }
 
@@ -143,10 +146,13 @@ namespace DCGO.CardEffects.BT16
 
                 bool CanActivateCondition(Hashtable hashtable)
                 {
+                    Debug.Log($"CanActivateCondition: {CardEffectCommons.IsExistOnBattleArea(card)}");
                     if (CardEffectCommons.IsExistOnBattleArea(card))
                     {
+                        Debug.Log($"CanActivateCondition: {card.PermanentOfThisCard().DigivolutionCards.Count(CanSelectCardCondition)}");
                         if (card.PermanentOfThisCard().DigivolutionCards.Count(CanSelectCardCondition) >= 1)
                         {
+                            Debug.Log($"CanActivateCondition: true");
                             return true;
                         }
                     }
@@ -156,14 +162,18 @@ namespace DCGO.CardEffects.BT16
 
                 IEnumerator ActivateCoroutine(Hashtable _hashtable)
                 {
+                    Debug.Log($"ActivateCoroutine: {CardEffectCommons.IsExistOnBattleArea(card)}");
                     if (CardEffectCommons.IsExistOnBattleArea(card))
                     {
+                        Debug.Log($"ActivateCoroutine: {card.BaseENGCardNameFromEntity}");
                         Permanent selectedPermanent = card.PermanentOfThisCard();
-
+                        Debug.Log($"ActivateCoroutine: {(selectedPermanent != null)}");
                         if (selectedPermanent != null)
                         {
+                            Debug.Log($"ActivateCoroutine: {selectedPermanent.DigivolutionCards.Count(CanSelectCardCondition)}");
                             if (selectedPermanent.DigivolutionCards.Count(CanSelectCardCondition) >= 1)
                             {
+                                Debug.Log($"ActivateCoroutine: TRUE");
                                 int maxCount = 1;
 
                                 List<CardSource> selectedCards = new List<CardSource>();

+ 21 - 16
Assets/CardEffect/BT16/Black/MetropolitanPoliceDepartmentCommunitySafetyBureauCyberCrimeDivisionInvestigationUnitElevenDigimonCrimeResponeTeam_BT16_096.cs

@@ -91,34 +91,39 @@ namespace DCGO.CardEffects.BT16
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
                 {
-                    List<CardSource> selectedCards = new List<CardSource>();
+                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.DeletePeremanentAndProcessAccordingToResult(targetPermanents: new List<Permanent>() { card.PermanentOfThisCard() }, activateClass: activateClass, successProcess: permanents => SuccessProcess(), failureProcess: null));
 
-                    if (card.Owner.LibraryCards.Count >= 1)
+                    IEnumerator SuccessProcess()
                     {
-                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.SimplifiedRevealDeckTopCardsAndSelect(
-                        revealCount: 3,
-                        simplifiedSelectCardConditions:
-                        new SimplifiedSelectCardConditionClass[]
+                        List<CardSource> selectedCards = new List<CardSource>();
+
+                        if (card.Owner.LibraryCards.Count >= 1)
                         {
+                            yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.SimplifiedRevealDeckTopCardsAndSelect(
+                            revealCount: 3,
+                            simplifiedSelectCardConditions:
+                            new SimplifiedSelectCardConditionClass[]
+                            {
                         new SimplifiedSelectCardConditionClass(
                             canTargetCondition:CanSelectCardCondition,
                             message: "Select 1 Digimon card.",
                             mode: SelectCardEffect.Mode.Custom,
                             maxCount: 1,
                             selectCardCoroutine: SelectCardCoroutine),
-                        },
-                        remainingCardsPlace: RemainingCardsPlace.DeckTop,
-                        activateClass: activateClass));
-                    }
+                            },
+                            remainingCardsPlace: RemainingCardsPlace.DeckTop,
+                            activateClass: activateClass));
+                        }
 
-                    IEnumerator SelectCardCoroutine(CardSource cardSource)
-                    {
-                        selectedCards.Add(cardSource);
+                        IEnumerator SelectCardCoroutine(CardSource cardSource)
+                        {
+                            selectedCards.Add(cardSource);
 
-                        yield return null;
-                    }
+                            yield return null;
+                        }
 
-                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(cardSources: selectedCards, activateClass: activateClass, payCost: false, isTapped: false, root: SelectCardEffect.Root.Hand, activateETB: true));
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(cardSources: selectedCards, activateClass: activateClass, payCost: false, isTapped: false, root: SelectCardEffect.Root.Hand, activateETB: true));
+                    }
                 }
             }
             #endregion

+ 58 - 31
Assets/CardEffect/BT16/Black/Publimon_BT16_056.cs

@@ -1,8 +1,9 @@
 using System;
 using System.Collections;
 using System.Collections.Generic;
+using UnityEngine;
 
-namespace DCGO.CardEffects
+namespace DCGO.CardEffects.BT16
 {
     public class Publimon_BT16_056 : CEntity_Effect
     {
@@ -10,35 +11,6 @@ namespace DCGO.CardEffects
         {
             List<ICardEffect> cardEffects = new List<ICardEffect>();
 
-            #region On Play/When Digivolving Shared
-            string EffectDiscription()
-            {
-                return "[On Play] [When Digivolving] You may place the top card of 1 of your opponent's Digimon with the [Vaccine] trait at the top of your opponent's security stack.";
-            }
-
-            bool CanSelectPermanentCondition(Permanent permanent)
-            {
-                if(CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
-                {
-                    if(permanent.TopCard.CardTraits.Contains("Vaccine"))
-                        return true;
-                }
-
-                return false;
-            }
-
-            bool CanActivateCondition(Hashtable hashtable)
-            {
-                if (CardEffectCommons.IsExistOnBattleArea(card))
-                {
-                    if (CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition) >= 1)
-                        return true;
-                }
-
-                return true;
-            }
-            #endregion
-
             #region On Play
             if (timing == EffectTiming.OnEnterFieldAnyone)
             {
@@ -47,11 +19,38 @@ namespace DCGO.CardEffects
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
                 cardEffects.Add(activateClass);
 
+                string EffectDiscription()
+                {
+                    return "[On Play] [When Digivolving] You may place the top card of 1 of your opponent's Digimon with the [Vaccine] trait at the top of your opponent's security stack.";
+                }
+
+                bool CanSelectPermanentCondition(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
+                    {
+                        if (permanent.TopCard.CardTraits.Contains("Vaccine"))
+                            return true;
+                    }
+
+                    return false;
+                }
+
                 bool CanUseCondition(Hashtable hashtable)
                 {
                     return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
                 }
 
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition) >= 1)
+                            return true;
+                    }
+
+                    return true;
+                }
+
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
                 {
                     if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
@@ -100,11 +99,38 @@ namespace DCGO.CardEffects
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
                 cardEffects.Add(activateClass);
 
+                string EffectDiscription()
+                {
+                    return "[On Play] [When Digivolving] You may place the top card of 1 of your opponent's Digimon with the [Vaccine] trait at the top of your opponent's security stack.";
+                }
+
+                bool CanSelectPermanentCondition(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
+                    {
+                        if (permanent.TopCard.CardTraits.Contains("Vaccine"))
+                            return true;
+                    }
+
+                    return false;
+                }
+
                 bool CanUseCondition(Hashtable hashtable)
                 {
                     return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
                 }
 
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition) >= 1)
+                        return true;
+                    }
+
+                    return true;
+                }
+
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
                 {
                     if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
@@ -151,6 +177,7 @@ namespace DCGO.CardEffects
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Trash top or bottom of opponents security", CanUseCondition, card);
                 activateClass.SetUpActivateClass(CanActivateAllTurnsCondition, ActivateCoroutine, 1, false, EffectAllTurnsDiscription());
+                activateClass.SetHashString("Publimon_BT16_056_AllTurns");
                 cardEffects.Add(activateClass);
 
                 string EffectAllTurnsDiscription()
@@ -197,7 +224,7 @@ namespace DCGO.CardEffects
                     bool toTop = GManager.instance.userSelectionManager.SelectedBoolValue;
 
                     yield return ContinuousController.instance.StartCoroutine(new IDestroySecurity(
-                        player: card.Owner,
+                        player: card.Owner.Enemy,
                         destroySecurityCount: 1,
                         cardEffect: activateClass,
                         fromTop: toTop).DestroySecurity());

+ 62 - 71
Assets/CardEffect/BT16/Black/Shootmon_BT16_059.cs

@@ -45,14 +45,14 @@ namespace DCGO.CardEffects.BT16
 
                 string EffectDiscription()
                 {
-                    return "[On Play] <De-Digivolve 1> 1 of your opponent's Digimon with DP less than or equal to this Digimon's DP. Then, delete 1 Digimon with a play cost of 3 or less.";
+                    return "[On Play] If you have 3 or more security cards, <De-Digivolve 1> 1 of your opponent's Digimon. If you have 3 or fewer security cards, delete 1 of your opponent's Digimon with a play cost of 6 or less.";
                 }
 
-                bool CanSelectDeDigivolvePermanentCondition(Permanent permanent)
+                bool CanSelectDeletePermanentCondition(Permanent permanent)
                 {
-                    if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
+                    if(CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
                     {
-                        if (permanent.DP <= card.PermanentOfThisCard().DP)
+                        if(permanent.TopCard.HasPlayCost && permanent.TopCard.GetCostItself <= 6)
                         {
                             return true;
                         }
@@ -61,17 +61,9 @@ namespace DCGO.CardEffects.BT16
                     return false;
                 }
 
-                bool CanSelectDeletePermanentCondition(Permanent permanent)
+                bool CanSelectDeDigivolvePermanentCondition(Permanent permanent)
                 {
-                    if(CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
-                    {
-                        if(permanent.TopCard.HasPlayCost && permanent.TopCard.GetCostItself <= 3)
-                        {
-                            return true;
-                        }
-                    }
-
-                    return false;
+                    return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card);
                 }
 
                 bool CanUseCondition(Hashtable hashtable)
@@ -88,7 +80,7 @@ namespace DCGO.CardEffects.BT16
                 {
                     SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
 
-                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectDeDigivolvePermanentCondition))
+                    if(card.Owner.SecurityCards.Count >= 3)
                     {
                         selectPermanentEffect.SetUp(
                             selectPlayer: card.Owner,
@@ -104,31 +96,34 @@ namespace DCGO.CardEffects.BT16
                             cardEffect: activateClass);
 
                         yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
-                    }
 
-                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectDeletePermanentCondition))
-                    {
-                        selectPermanentEffect.SetUp(
-                            selectPlayer: card.Owner,
-                            canTargetCondition: CanSelectDeletePermanentCondition,
-                            canTargetCondition_ByPreSelecetedList: null,
-                            canEndSelectCondition: null,
-                            maxCount: 1,
-                            canNoSelect: false,
-                            canEndNotMax: false,
-                            selectPermanentCoroutine: null,
-                            afterSelectPermanentCoroutine: null,
-                            mode: SelectPermanentEffect.Mode.Destroy,
-                            cardEffect: activateClass);
-
-                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                        IEnumerator AfterSelectDedigivolveCoroutine(List<Permanent> permanents)
+                        {
+                            foreach (Permanent permanent in permanents)
+                            {
+                                yield return ContinuousController.instance.StartCoroutine(new IDegeneration(permanent, 1, activateClass).Degeneration());
+                            }
+                        }
                     }
 
-                    IEnumerator AfterSelectDedigivolveCoroutine(List<Permanent> permanents)
+                    if(card.Owner.SecurityCards.Count <= 3)
                     {
-                        foreach (Permanent permanent in permanents)
+                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectDeletePermanentCondition))
                         {
-                            yield return ContinuousController.instance.StartCoroutine(new IDegeneration(permanent, 1, activateClass).Degeneration());
+                            selectPermanentEffect.SetUp(
+                                selectPlayer: card.Owner,
+                                canTargetCondition: CanSelectDeletePermanentCondition,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                maxCount: 1,
+                                canNoSelect: false,
+                                canEndNotMax: false,
+                                selectPermanentCoroutine: null,
+                                afterSelectPermanentCoroutine: null,
+                                mode: SelectPermanentEffect.Mode.Destroy,
+                                cardEffect: activateClass);
+
+                            yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
                         }
                     }
                 }
@@ -146,14 +141,14 @@ namespace DCGO.CardEffects.BT16
 
                 string EffectDiscription()
                 {
-                    return "[When Digivolving] <De-Digivolve 1> 1 of your opponent's Digimon with DP less than or equal to this Digimon's DP. Then, delete 1 Digimon with a play cost of 3 or less.";
+                    return "[When Digivolving] If you have 3 or more security cards, <De-Digivolve 1> 1 of your opponent's Digimon. If you have 3 or fewer security cards, delete 1 of your opponent's Digimon with a play cost of 6 or less.";
                 }
 
-                bool CanSelectDeDigivolvePermanentCondition(Permanent permanent)
+                bool CanSelectDeletePermanentCondition(Permanent permanent)
                 {
-                    if(CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
+                    if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
                     {
-                        if(permanent.DP <= card.PermanentOfThisCard().DP)
+                        if (permanent.TopCard.HasPlayCost && permanent.TopCard.GetCostItself <= 6)
                         {
                             return true;
                         }
@@ -162,22 +157,14 @@ namespace DCGO.CardEffects.BT16
                     return false;
                 }
 
-                bool CanSelectDeletePermanentCondition(Permanent permanent)
+                bool CanSelectDeDigivolvePermanentCondition(Permanent permanent)
                 {
-                    if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
-                    {
-                        if (permanent.TopCard.HasPlayCost && permanent.TopCard.GetCostItself <= 3)
-                        {
-                            return true;
-                        }
-                    }
-
-                    return false;
+                    return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card);
                 }
 
                 bool CanUseCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
+                    return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
                 }
 
                 bool CanActivateCondition(Hashtable hashtable)
@@ -189,7 +176,7 @@ namespace DCGO.CardEffects.BT16
                 {
                     SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
 
-                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectDeDigivolvePermanentCondition))
+                    if (card.Owner.SecurityCards.Count >= 3)
                     {
                         selectPermanentEffect.SetUp(
                             selectPlayer: card.Owner,
@@ -205,31 +192,34 @@ namespace DCGO.CardEffects.BT16
                             cardEffect: activateClass);
 
                         yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
-                    }
 
-                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectDeletePermanentCondition))
-                    {
-                        selectPermanentEffect.SetUp(
-                            selectPlayer: card.Owner,
-                            canTargetCondition: CanSelectDeletePermanentCondition,
-                            canTargetCondition_ByPreSelecetedList: null,
-                            canEndSelectCondition: null,
-                            maxCount: 1,
-                            canNoSelect: false,
-                            canEndNotMax: false,
-                            selectPermanentCoroutine: null,
-                            afterSelectPermanentCoroutine: null,
-                            mode: SelectPermanentEffect.Mode.Destroy,
-                            cardEffect: activateClass);
-
-                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                        IEnumerator AfterSelectDedigivolveCoroutine(List<Permanent> permanents)
+                        {
+                            foreach (Permanent permanent in permanents)
+                            {
+                                yield return ContinuousController.instance.StartCoroutine(new IDegeneration(permanent, 1, activateClass).Degeneration());
+                            }
+                        }
                     }
 
-                    IEnumerator AfterSelectDedigivolveCoroutine(List<Permanent> permanents)
+                    if (card.Owner.SecurityCards.Count <= 3)
                     {
-                        foreach (Permanent permanent in permanents)
+                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectDeletePermanentCondition))
                         {
-                            yield return ContinuousController.instance.StartCoroutine(new IDegeneration(permanent, 1, activateClass).Degeneration());
+                            selectPermanentEffect.SetUp(
+                                selectPlayer: card.Owner,
+                                canTargetCondition: CanSelectDeletePermanentCondition,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                maxCount: 1,
+                                canNoSelect: false,
+                                canEndNotMax: false,
+                                selectPermanentCoroutine: null,
+                                afterSelectPermanentCoroutine: null,
+                                mode: SelectPermanentEffect.Mode.Destroy,
+                                cardEffect: activateClass);
+
+                            yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
                         }
                     }
                 }
@@ -242,6 +232,7 @@ namespace DCGO.CardEffects.BT16
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Unsuspend this digimon", CanUseCondition, card);
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, true, EffectDiscription());
+                activateClass.SetIsInheritedEffect(true);
 
                 cardEffects.Add(activateClass);
 

+ 46 - 47
Assets/Scripts/CardEffectCommons/KeyWordEffects/Collision.cs

@@ -7,18 +7,18 @@ using UnityEngine;
 public partial class CardEffectCommons
 {
     #region Can activate [Collision]
-    public static bool CanActivateCollision(CardSource cardSource, ICardEffect activateClass)
+    public static bool CanActivateCollision(CardSource cardSource)
     {
+        Debug.Log($"CanActivateCollision: {IsExistOnBattleArea(cardSource)}");
         if (IsExistOnBattleArea(cardSource))
         {
-            if (cardSource.PermanentOfThisCard().CanAttack(activateClass))
+            Debug.Log($"CanActivateCollision: {cardSource.Owner.Enemy.GetBattleAreaDigimons().Count}");
+            if (cardSource.Owner.Enemy.GetBattleAreaDigimons().Count >= 1)
             {
-                if (cardSource.Owner.Enemy.GetBattleAreaDigimons().Count >= 1)
+                Debug.Log($"CanActivateCollision: {GManager.instance.attackProcess.IsAttacking}");
+                if (GManager.instance.attackProcess.IsAttacking)
                 {
-                    if (!GManager.instance.attackProcess.IsAttacking)
-                    {
-                        return true;
-                    }
+                    return true;
                 }
             }
         }
@@ -30,64 +30,63 @@ public partial class CardEffectCommons
     #region Effect process of [Blitz]
     public static IEnumerator CollisionProcess(CardSource cardSource, ICardEffect activateClass, Func<IEnumerator> beforeOnAttackCoroutine = null)
     {
-        if (CanActivateCollision(cardSource, activateClass))
+        if (CanActivateCollision(cardSource))
         {
-            foreach(Permanent enemyDigimon in cardSource.Owner.Enemy.GetBattleAreaDigimons())
+            foreach (Permanent enemyDigimon in cardSource.Owner.Enemy.GetBattleAreaDigimons())
             {
-                if (!enemyDigimon.TopCard.CanNotBeAffected(activateClass))
-                {
-                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainBlocker(
+                if (enemyDigimon.TopCard.CanNotBeAffected(activateClass))
+                    continue;
+
+                yield return ContinuousController.instance.StartCoroutine(GainBlocker(
                         targetPermanent: enemyDigimon,
                         effectDuration: EffectDuration.UntilEndAttack,
                         activateClass: activateClass));
+            }
 
-                    int maxCount = 1;
+            int maxCount = 1;
 
-                    Permanent selectedPermanent = null;
+            Permanent selectedPermanent = null;
 
-                    SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+            SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
 
-                    selectPermanentEffect.SetUp(
-                        selectPlayer: cardSource.Owner.Enemy,
-                        canTargetCondition: CanSelectBlockerCondition,
-                        canTargetCondition_ByPreSelecetedList: null,
-                        canEndSelectCondition: null,
-                        maxCount: maxCount,
-                        canNoSelect: false,
-                        canEndNotMax: false,
-                        selectPermanentCoroutine: SelectPermanentCoroutine,
-                        afterSelectPermanentCoroutine: null,
-                        mode: SelectPermanentEffect.Mode.Custom,
-                        cardEffect: null);
+            selectPermanentEffect.SetUp(
+                selectPlayer: cardSource.Owner.Enemy,
+                canTargetCondition: CanSelectBlockerCondition,
+                canTargetCondition_ByPreSelecetedList: null,
+                canEndSelectCondition: null,
+                maxCount: maxCount,
+                canNoSelect: false,
+                canEndNotMax: false,
+                selectPermanentCoroutine: SelectPermanentCoroutine,
+                afterSelectPermanentCoroutine: null,
+                mode: SelectPermanentEffect.Mode.Custom,
+                cardEffect: null);
 
-                    selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon that will block.", "The opponent is selecting 1 Digimon that will block.");
-                    selectPermanentEffect.SetUpCustomBackButtonMessage("Not Block");
+            selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon that will block.", "The opponent is selecting 1 Digimon that will block.");
 
-                    yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+            yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
 
-                    bool CanSelectBlockerCondition(Permanent permanent)
+            bool CanSelectBlockerCondition(Permanent permanent)
+            {
+                if (CardEffectCommons.IsPermanentExistsOnBattleArea(permanent))
+                {
+                    if (permanent.TopCard.Owner.isYou)
                     {
-                        if (CardEffectCommons.IsPermanentExistsOnBattleArea(permanent))
+                        if (permanent.HasBlocker && permanent.CanBlock(cardSource.PermanentOfThisCard()))
                         {
-                            if (permanent.TopCard.Owner.isYou)
-                            {
-                                if (permanent.HasBlocker && permanent.CanBlock(cardSource.PermanentOfThisCard()))
-                                {
-                                    return true;
-                                }
-                            }
+                            return true;
                         }
-
-                        return false;
                     }
+                }
 
-                    IEnumerator SelectPermanentCoroutine(Permanent permanent)
-                    {
-                        selectedPermanent = permanent;
+                return false;
+            }
 
-                        yield return ContinuousController.instance.StartCoroutine(GManager.instance.attackProcess.SwitchDefender(null, true, selectedPermanent));
-                    }
-                }
+            IEnumerator SelectPermanentCoroutine(Permanent permanent)
+            {
+                selectedPermanent = permanent;
+
+                yield return ContinuousController.instance.StartCoroutine(GManager.instance.attackProcess.SwitchDefender(null, true, selectedPermanent));
             }
         }
     }

+ 20 - 9
Assets/Scripts/CardEffectFactory/KeyWordEffects/Collision.cs

@@ -7,24 +7,27 @@ using UnityEngine;
 public partial class CardEffectFactory
 {
     #region Static effect of [Collision] on oneself
-    public static ActivateClass CollisionSelfStaticEffect(bool isInheritedEffect, CardSource card, Func<IEnumerator> beforeOnAttackCoroutine = null)
+    public static ActivateClass CollisionSelfStaticEffect(bool isInheritedEffect, CardSource card, Func<bool> condition)
     {
-        bool PermanentCondition(Permanent permanent) => permanent == card.PermanentOfThisCard();
+        Permanent targetPermanent = card.PermanentOfThisCard();
 
         bool CanUseCondition()
         {
             if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
             {
-                if(card.Owner.Enemy.GetBattleAreaDigimons().Count() > 0)
+                if (card.Owner.Enemy.GetBattleAreaDigimons().Count() > 0)
                 {
-                    return true;
+                    if (condition == null || condition())
+                    {
+                        return true;
+                    }
                 }
             }
 
             return false;
         }
 
-        return CollisionStaticEffect(isInheritedEffect: isInheritedEffect, card: card, beforeOnAttackCoroutine: beforeOnAttackCoroutine);
+        return CollisionStaticEffect(isInheritedEffect: isInheritedEffect, card: card, condition: CanUseCondition);
     }
     #endregion
 
@@ -32,11 +35,11 @@ public partial class CardEffectFactory
     public static ActivateClass CollisionStaticEffect(
         bool isInheritedEffect,
         CardSource card,
-        Func<IEnumerator> beforeOnAttackCoroutine = null)
+        Func<bool> condition)
     {
         ActivateClass activateClass = new ActivateClass();
         activateClass.SetUpICardEffect("Collision", CanUseCondition, card);
-        activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+        activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
         activateClass.SetIsInheritedEffect(isInheritedEffect);
 
         string EffectDiscription()
@@ -46,7 +49,15 @@ public partial class CardEffectFactory
 
         bool CanUseCondition(Hashtable hashtable)
         {
-            return CardEffectCommons.CanTriggerOnAttack(hashtable, card);
+            if(CardEffectCommons.CanTriggerOnAttack(hashtable, card))
+            {
+                if (condition == null || condition())
+                {
+                    return true;
+                }
+            }
+            
+            return false;
         }
 
         bool CanActivateCondition(Hashtable hashtable)
@@ -56,7 +67,7 @@ public partial class CardEffectFactory
 
         IEnumerator ActivateCoroutine(Hashtable _hashtable)
         {
-            return CardEffectCommons.CollisionProcess(card, activateClass, beforeOnAttackCoroutine);
+            return CardEffectCommons.CollisionProcess(card, activateClass);
         }
 
         return activateClass;