Просмотр исходного кода

separated all on play and when digivolving effects (for venusmon)

mbunch_kascope 2 лет назад
Родитель
Сommit
1f6fb110af

+ 133 - 3
Assets/CardEffect/BT15/Red/Brachiomon_BT15_016.cs

@@ -11,7 +11,7 @@ public class Brachiomon_BT15_016 : CEntity_Effect
     {
         List<ICardEffect> cardEffects = new List<ICardEffect>();
 
-        #region On Play - When Digivolving
+        #region On Play
         if (timing == EffectTiming.OnEnterFieldAnyone)
         {
             ActivateClass activateClass = new ActivateClass();
@@ -21,7 +21,7 @@ public class Brachiomon_BT15_016 : CEntity_Effect
 
             string EffectDiscription()
             {
-                return "[On Play] [When Digivolving] If your opponent has 4 or less memory, 1 of your opponent's Digimon with 8000 DP or more can't attack until the end of their turn. If they have 4 or more, delete 1 of their Digimon with 6000 DP or less.";
+                return "[On Play] If your opponent has 4 or less memory, 1 of your opponent's Digimon with 8000 DP or more can't attack until the end of their turn. If they have 4 or more, delete 1 of their Digimon with 6000 DP or less.";
             }
 
             bool CanSelectPermanentCondition(Permanent permanent)
@@ -52,7 +52,137 @@ public class Brachiomon_BT15_016 : CEntity_Effect
 
             bool CanUseCondition(Hashtable hashtable)
             {
-                return CardEffectCommons.CanTriggerOnPlay(hashtable, card) || CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
+            }
+
+            bool CanActivateCondition(Hashtable hashtable)
+            {
+                if (CardEffectCommons.IsExistOnBattleArea(card))
+                {
+                    if (card.Owner.Enemy.MemoryForPlayer <= 4)
+                    {
+                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                        {
+                            return true;
+                        }
+                    }
+
+                    if (card.Owner.Enemy.MemoryForPlayer >= 4)
+                    {
+                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition1))
+                        {
+                            return true;
+                        }
+                    }
+                }
+
+                return false;
+            }
+
+            IEnumerator ActivateCoroutine(Hashtable _hashtable)
+            {
+                if (card.Owner.Enemy.MemoryForPlayer <= 4)
+                {
+                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                    {
+                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
+
+                        SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectPermanentCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: maxCount,
+                            canNoSelect: false,
+                            canEndNotMax: false,
+                            selectPermanentCoroutine: SelectPermanentCoroutine,
+                            afterSelectPermanentCoroutine: null,
+                            mode: SelectPermanentEffect.Mode.Custom,
+                            cardEffect: activateClass);
+
+                        selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon that can't attack", "The opponent is selecting 1 Digimon that can't attack.");
+
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                        IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCanNotAttack(targetPermanent: permanent, defenderCondition: null, effectDuration: EffectDuration.UntilOpponentTurnEnd, activateClass: activateClass, effectName: "Can't Attack"));
+                        }
+                    }
+                }
+
+                if (card.Owner.Enemy.MemoryForPlayer >= 4)
+                {
+                    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: null,
+                            afterSelectPermanentCoroutine: null,
+                            mode: SelectPermanentEffect.Mode.Destroy,
+                            cardEffect: activateClass);
+
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                    }
+                }
+            }
+        }
+        #endregion
+
+        #region When Digivolving
+        if (timing == EffectTiming.OnEnterFieldAnyone)
+        {
+            ActivateClass activateClass = new ActivateClass();
+            activateClass.SetUpICardEffect("Opponent's 1 Digimon with 8000 DP or more can't attak and delete 1 Digimon with 6000 DP or less", CanUseCondition, card);
+            activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+            cardEffects.Add(activateClass);
+
+            string EffectDiscription()
+            {
+                return "[When Digivolving] If your opponent has 4 or less memory, 1 of your opponent's Digimon with 8000 DP or more can't attack until the end of their turn. If they have 4 or more, delete 1 of their Digimon with 6000 DP or less.";
+            }
+
+            bool CanSelectPermanentCondition(Permanent permanent)
+            {
+                if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
+                {
+                    if (permanent.DP >= 8000)
+                    {
+                        return true;
+                    }
+                }
+
+                return false;
+            }
+
+            bool CanSelectPermanentCondition1(Permanent permanent)
+            {
+                if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
+                {
+                    if (permanent.DP <= card.Owner.MaxDP_DeleteEffect(6000, activateClass))
+                    {
+                        return true;
+                    }
+                }
+
+                return false;
+            }
+
+            bool CanUseCondition(Hashtable hashtable)
+            {
+                return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
             }
 
             bool CanActivateCondition(Hashtable hashtable)

+ 74 - 4
Assets/CardEffect/BT16/Blue/Angemon_BT16_019.cs

@@ -32,7 +32,7 @@ namespace DCGO.CardEffects.BT16
             }
             #endregion
 
-            #region On Play/When Digivolving
+            #region On Play
             if (timing == EffectTiming.OnEnterFieldAnyone)
             {
                 ActivateClass activateClass = new ActivateClass();
@@ -42,7 +42,7 @@ namespace DCGO.CardEffects.BT16
 
                 string EffectDiscription()
                 {
-                    return "[On Play] [When Digivolving] Unsuspend 1 of your level 4 or lower Digimon.";
+                    return "[On Play] Unsuspend 1 of your level 4 or lower Digimon.";
                 }
 
                 bool CanSelectPermanentCondition(Permanent permanent)
@@ -63,7 +63,7 @@ namespace DCGO.CardEffects.BT16
 
                 bool CanUseCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card) || CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
                 }
 
                 bool CanActivateCondition(Hashtable hashtable)
@@ -101,7 +101,77 @@ namespace DCGO.CardEffects.BT16
                 }
             }
             #endregion
-            
+
+            #region When Digivolving
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Unsuspend 1 level 4 or lower Digimon", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[When Digivolving] Unsuspend 1 of your level 4 or lower Digimon.";
+                }
+
+                bool CanSelectPermanentCondition(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
+                    {
+                        if (permanent.Level <= 4)
+                        {
+                            if (permanent.TopCard.HasLevel)
+                            {
+                                return true;
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable _hashtable)
+                {
+                    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: null,
+                        afterSelectPermanentCoroutine: null,
+                        mode: SelectPermanentEffect.Mode.UnTap,
+                        cardEffect: activateClass);
+                    yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                }
+            }
+            #endregion
+
             #region Inherited Effect
             if (timing == EffectTiming.OnAllyAttack)
             {

+ 108 - 3
Assets/CardEffect/BT16/Blue/Divemon_BT16_023.cs

@@ -30,7 +30,7 @@ namespace DCGO.CardEffects.BT16
             }
             #endregion
 
-            #region On Play/When Digivolving
+            #region On Play
             if (timing == EffectTiming.OnEnterFieldAnyone)
             {
                 ActivateClass activateClass = new ActivateClass();
@@ -40,7 +40,7 @@ namespace DCGO.CardEffects.BT16
 
                 string EffectDiscription()
                 {
-                    return "[On Play] [When Digivolving] If you have 3 or more security cards, unsuspend 1 of your Digimon. If " +
+                    return "[On Play] If you have 3 or more security cards, unsuspend 1 of your Digimon. If " +
                            "you have 3 or fewer, return 1 of your opponent's level 4 or lower Digimon to the bottom of the deck.";
                 }
 
@@ -72,7 +72,7 @@ namespace DCGO.CardEffects.BT16
 
                 bool CanUseCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card) || CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card)
                 }
 
                 bool CanActivateCondition(Hashtable hashtable)
@@ -135,6 +135,111 @@ namespace DCGO.CardEffects.BT16
             }
             #endregion
 
+            #region When Digivolving
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Unsuspend 1 Digimon and/or bottom deck an opponent's Level 4 or lower Digimon", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[When Digivolving] If you have 3 or more security cards, unsuspend 1 of your Digimon. If " +
+                           "you have 3 or fewer, return 1 of your opponent's level 4 or lower Digimon to the bottom of the deck.";
+                }
+
+                bool CanSelectPermanentUnsuspendCondition(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
+                    {
+                        if (permanent.TopCard.HasLevel)
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanSelectPermanentBounceCondition(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
+                    {
+                        if (permanent.Level <= 4)
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        return true;
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable _hashtable)
+                {
+                    if (isExistOnField(card))
+                    {
+                        if (card.Owner.GetBattleAreaDigimons().Contains(card.PermanentOfThisCard()))
+                        {
+                            if (card.Owner.SecurityCards.Count >= 3)
+                            {
+                                SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                                selectPermanentEffect.SetUp(
+                                    selectPlayer: card.Owner,
+                                    canTargetCondition: CanSelectPermanentUnsuspendCondition,
+                                    canTargetCondition_ByPreSelecetedList: null,
+                                    canEndSelectCondition: null,
+                                    maxCount: 1,
+                                    canNoSelect: false,
+                                    canEndNotMax: false,
+                                    selectPermanentCoroutine: null,
+                                    afterSelectPermanentCoroutine: null,
+                                    mode: SelectPermanentEffect.Mode.UnTap,
+                                    cardEffect: activateClass);
+                                yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                            }
+
+                            if (card.Owner.SecurityCards.Count <= 3)
+                            {
+                                SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                                selectPermanentEffect.SetUp(
+                                    selectPlayer: card.Owner,
+                                    canTargetCondition: CanSelectPermanentBounceCondition,
+                                    canTargetCondition_ByPreSelecetedList: null,
+                                    canEndSelectCondition: null,
+                                    maxCount: 1,
+                                    canNoSelect: false,
+                                    canEndNotMax: false,
+                                    selectPermanentCoroutine: null,
+                                    afterSelectPermanentCoroutine: null,
+                                    mode: SelectPermanentEffect.Mode.PutLibraryBottom,
+                                    cardEffect: activateClass);
+
+                                yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                            }
+                        }
+                    }
+                }
+            }
+            #endregion
+
             #region Inherit
             if (timing == EffectTiming.OnEndAttack)
             {

+ 199 - 3
Assets/CardEffect/BT16/Blue/MagnaAngemon_BT16_024.cs

@@ -30,7 +30,7 @@ namespace DCGO.CardEffects.BT16
             }
             #endregion
 
-            #region On Play/When Digivolving
+            #region On Play
             
             if (timing == EffectTiming.OnEnterFieldAnyone)
             {
@@ -43,7 +43,7 @@ namespace DCGO.CardEffects.BT16
                 string EffectDiscription()
                 {
                     return
-                        "[On Play] [When Digivolving] If it's your turn, search your security stack. This Digimon may digivolve into a Digimon card with the [Angel] " +
+                        "[On Play] If it's your turn, search your security stack. This Digimon may digivolve into a Digimon card with the [Angel] " +
                         "or [Three Great Angels] trait among them with the digivolution cost reduced by 2. Then, shuffle your security stack. If this effect digivolved, " +
                         "you may place 1 Digimon card with the [Angel], [Archangel] or [Three Great Angels] trait from your hand at the bottom of your security stack.";
                 }
@@ -79,7 +79,203 @@ namespace DCGO.CardEffects.BT16
                 
                 bool CanUseCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.IsOwnerTurn(card) && (CardEffectCommons.CanTriggerOnPlay(hashtable, card) || CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card));
+                    return CardEffectCommons.IsOwnerTurn(card) && CardEffectCommons.CanTriggerOnPlay(hashtable, card);
+                }
+                
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (card.Owner.SecurityCards.Count >= 1)
+                        {
+                            return true;
+                        }
+                    }
+                    
+                    return false;
+                }
+                
+                IEnumerator ActivateCoroutine(Hashtable _hashtable)
+                {
+                    if (card.Owner.SecurityCards.Count >= 1)
+                    {
+                        int maxCount = Math.Min(1, card.Owner.SecurityCards.Count);
+                        
+                        CardSource selectedCard = null;
+                        
+                        SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+                        
+                        selectCardEffect.SetUp(
+                            canTargetCondition: CanSelectCardDigivolutionCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            canNoSelect: () => true,
+                            selectCardCoroutine: SelectCardCoroutine,
+                            afterSelectCardCoroutine: null,
+                            message: "Select 1 card to digivolve.",
+                            maxCount: maxCount,
+                            canEndNotMax: false,
+                            isShowOpponent: true,
+                            mode: SelectCardEffect.Mode.Custom,
+                            root: SelectCardEffect.Root.Security,
+                            customRootCardList: null,
+                            canLookReverseCard: true,
+                            selectPlayer: card.Owner,
+                            cardEffect: activateClass);
+                        
+                        yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
+                        
+                        IEnumerator SelectCardCoroutine(CardSource cardSource)
+                        {
+                            selectedCard = cardSource;
+                            
+                            yield return null;
+                        }
+                        
+                        ContinuousController.instance.PlaySE(GManager.instance.ShuffleSE);
+                        
+                        card.Owner.SecurityCards = RandomUtility.ShuffledDeckCards(card.Owner.SecurityCards);
+                        
+                        if (selectedCard != null)
+                        {
+                            if (CardEffectCommons.IsExistOnBattleArea(card))
+                            {
+                                GManager.instance.turnStateMachine.gameContext.IsSecurityLooking = true;
+                                
+                                if (selectedCard.CanPlayCardTargetFrame(card.PermanentOfThisCard().PermanentFrame,
+                                        PayCost: false, activateClass, root: SelectCardEffect.Root.Security))
+                                {
+                                    PlayCardClass playCardClass = new PlayCardClass(
+                                        cardSources: new List<CardSource>() { selectedCard },
+                                        hashtable: CardEffectCommons.CardEffectHashtable(activateClass),
+                                        payCost: true,
+                                        targetPermanent: card.PermanentOfThisCard(),
+                                        isTapped: false,
+                                        root: SelectCardEffect.Root.Security,
+                                        activateETB: true);
+
+                                    playCardClass.SetReducedCost(2);
+
+                                    yield return ContinuousController.instance.StartCoroutine(playCardClass.PlayCard());
+                                }
+                                
+                                GManager.instance.turnStateMachine.gameContext.IsSecurityLooking = false;
+                                
+                                if (CardEffectCommons.IsDigivolvedByTheEffect(card.PermanentOfThisCard(), selectedCard,
+                                        activateClass))
+                                {
+                                    if (card.Owner.CanAddSecurity(activateClass))
+                                    {
+                                        if (card.Owner.HandCards.Count(CanSelectCardRecoverCondition) >= 1)
+                                        {
+                                            List<CardSource> selectedCards = new List<CardSource>();
+                                            
+                                            maxCount = 1;
+                                            
+                                            SelectHandEffect selectHandEffect =
+                                                GManager.instance.GetComponent<SelectHandEffect>();
+                                            
+                                            selectHandEffect.SetUp(
+                                                selectPlayer: card.Owner,
+                                                canTargetCondition: CanSelectCardRecoverCondition,
+                                                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 card to place at the bottom of security.",
+                                                "The opponent is selecting 1 card to place at the bottom of security.");
+                                            selectHandEffect.SetUpCustomMessage_ShowCard("Security Bottom Card");
+                                            
+                                            yield return StartCoroutine(selectHandEffect.Activate());
+                                            
+                                            IEnumerator SelectCardCoroutine1(CardSource cardSource)
+                                            {
+                                                selectedCards.Add(cardSource);
+                                                
+                                                yield return null;
+                                            }
+                                            
+                                            foreach (CardSource cardSource in selectedCards)
+                                            {
+                                                yield return ContinuousController.instance.StartCoroutine(
+                                                    CardObjectController.AddSecurityCard(cardSource, toTop: false));
+                                                
+                                                yield return ContinuousController.instance.StartCoroutine(GManager
+                                                    .instance.GetComponent<Effects>()
+                                                    .CreateRecoveryEffect(cardSource.Owner));
+                                                
+                                                yield return ContinuousController.instance.StartCoroutine(
+                                                    new IAddSecurity(cardSource.Owner).AddSecurity());
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+            
+            #endregion
+
+            #region When Digivolving
+            
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("This Digimon digivolves into a Digimon card from security", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                activateClass.SetHashString("MagnaAngemon_BT16_024_OnPlay_WhenDigivolving");
+                cardEffects.Add(activateClass);
+                
+                string EffectDiscription()
+                {
+                    return
+                        "[When Digivolving] If it's your turn, search your security stack. This Digimon may digivolve into a Digimon card with the [Angel] " +
+                        "or [Three Great Angels] trait among them with the digivolution cost reduced by 2. Then, shuffle your security stack. If this effect digivolved, " +
+                        "you may place 1 Digimon card with the [Angel], [Archangel] or [Three Great Angels] trait from your hand at the bottom of your security stack.";
+                }
+                
+                bool CanSelectCardDigivolutionCondition(CardSource cardSource)
+                {
+                    if (cardSource.CardTraits.Contains("Angel") || cardSource.CardTraits.Contains("Three Great Angels") || cardSource.CardTraits.Contains("ThreeGreatAngels"))
+                    {
+                        if (cardSource.IsDigimon)
+                        {
+                            if (CardEffectCommons.IsExistOnBattleArea(card))
+                            {
+                                if (cardSource.CanPlayCardTargetFrame(card.PermanentOfThisCard().PermanentFrame, false, activateClass))
+                                {
+                                    return true;
+                                }
+                            }
+                        }
+                    }
+                    
+                    return false;
+                }
+                
+                bool CanSelectCardRecoverCondition(CardSource cardSource)
+                {
+                    if (cardSource.HasAngelTraitRestrictive)
+                    {
+                        return true;
+                    }
+                    
+                    return false;
+                }
+                
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsOwnerTurn(card) && CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
                 }
                 
                 bool CanActivateCondition(Hashtable hashtable)

+ 75 - 3
Assets/CardEffect/BT16/Green/BladeKuwagamon_BT16_042.cs

@@ -39,7 +39,7 @@ namespace DCGO.CardEffects.BT16
             }
             #endregion
 
-            #region On Play/When Digivolving
+            #region On Play
             if (timing == EffectTiming.OnEnterFieldAnyone)
             {
                 ActivateClass activateClass = new ActivateClass();
@@ -49,7 +49,7 @@ namespace DCGO.CardEffects.BT16
 
                 string EffectDiscription()
                 {
-                    return "[On Play] [When Digivolving] 1 of your Digimon gets +3000 DP until the end of your opponent's turn.";
+                    return "[On Play] 1 of your Digimon gets +3000 DP until the end of your opponent's turn.";
                 }
 
                 bool CanSelectPermanentCondition(Permanent permanent)
@@ -59,7 +59,79 @@ namespace DCGO.CardEffects.BT16
 
                 bool CanUseCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card) || CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        return true;
+                    }
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                    {
+                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
+
+                        SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectPermanentCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: maxCount,
+                            canNoSelect: false,
+                            canEndNotMax: false,
+                            selectPermanentCoroutine: SelectPermanentCoroutine,
+                            afterSelectPermanentCoroutine: null,
+                            mode: SelectPermanentEffect.Mode.Custom,
+                            cardEffect: activateClass);
+
+                        selectPermanentEffect.SetUpCustomMessage(
+                            "Select 1 Digimon that will get DP +3000.",
+                            "The opponent is selecting 1 Digimon that will get DP +3000.");
+
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                        IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ChangeDigimonDP(
+                                targetPermanent: permanent,
+                                changeValue: 3000,
+                                effectDuration: EffectDuration.UntilOpponentTurnEnd,
+                                activateClass: activateClass));
+                        }
+                    }
+                }
+            }
+            #endregion
+
+            #region When Digivolving
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Your 1 Digimon gains DP +3000", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[When Digivolving] 1 of your Digimon gets +3000 DP until the end of your opponent's turn.";
+                }
+
+                bool CanSelectPermanentCondition(Permanent permanent)
+                {
+                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card);
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
                 }
 
                 bool CanActivateCondition(Hashtable hashtable)

+ 172 - 3
Assets/CardEffect/BT16/Purple/GesomonXAntibody_BT16_069.cs

@@ -26,7 +26,7 @@ namespace DCGO.CardEffects.BT16
             }
             #endregion
 
-            #region On Play / When Digivolving
+            #region On Play
             if (timing == EffectTiming.OnEnterFieldAnyone)
             {
                 ActivateClass activateClass = new ActivateClass();
@@ -36,12 +36,181 @@ namespace DCGO.CardEffects.BT16
 
                 string EffectDiscription()
                 {
-                    return "[On Play] [When Digivolving] If [Gesomon] or [X-Antibody] is in this Digimon's digivolution cards, trash the bottom 3 cards under 1 of your opponent's Digimon or Tamers. Then, 1 of their Digimon or Tamers without cards under it can't suspend until the end of their turn.";
+                    return "[On Play] If [Gesomon] or [X-Antibody] is in this Digimon's digivolution cards, trash the bottom 3 cards under 1 of your opponent's Digimon or Tamers. Then, 1 of their Digimon or Tamers without cards under it can't suspend until the end of their turn.";
                 }
 
                 bool CanUseCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card) || CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
+                }
+
+                bool CanSelectPermanentCondition(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnOpponentBattleArea(permanent, card))
+                    {
+                        if (permanent.IsDigimon || permanent.IsTamer)
+                        {
+                            if (permanent.DigivolutionCards.Count(CanSelectCardCondition1) >= 1)
+                            {
+                                return true;
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanSelectCardCondition1(CardSource cardSource)
+                {
+                    return !cardSource.CanNotTrashFromDigivolutionCards(activateClass);
+                }
+
+                bool CanSelectPermanentToNoSuspend(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnOpponentBattleArea(permanent, card))
+                    {
+                        if (permanent.IsDigimon || permanent.IsTamer)
+                        {
+                            if (permanent.HasNoDigivolutionCards)
+                            {
+                                return true;
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition) && card.PermanentOfThisCard().DigivolutionCards.Count((cardSource) => cardSource.CardNames.Contains("Gesomon") || cardSource.CardNames.Contains("X Antibody") || cardSource.CardNames.Contains("XAntibody")) >= 1)
+                    {
+                        int maxCountToTrash = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
+
+                        SelectPermanentEffect selectPermanentEffectTrash = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                        selectPermanentEffectTrash.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectPermanentCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: maxCountToTrash,
+                            canNoSelect: false,
+                            canEndNotMax: false,
+                            selectPermanentCoroutine: SelectPermanentCoroutine,
+                            afterSelectPermanentCoroutine: null,
+                            mode: SelectPermanentEffect.Mode.Custom,
+                            cardEffect: activateClass);
+
+                        selectPermanentEffectTrash.SetUpCustomMessage("Select 1 Digimon or Tamer that will trash digivolution cards.", "The opponent is selecting 1 Digimon or Tamer that will trash digivolution cards.");
+
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffectTrash.Activate());
+
+                        IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                        {
+                            Permanent selectedPermanent = permanent;
+
+                            yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.TrashDigivolutionCardsFromTopOrBottom(targetPermanent: selectedPermanent, trashCount: 3, isFromTop: false, activateClass: activateClass));
+                        }
+                    }
+
+                    if (card.Owner.Enemy.GetBattleAreaPermanents().Count(CanSelectPermanentToNoSuspend) >= 1)
+                    {
+                        int maxCount = Math.Min(1, card.Owner.Enemy.GetBattleAreaPermanents().Count(CanSelectPermanentToNoSuspend));
+
+                        SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectPermanentToNoSuspend,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: maxCount,
+                            canNoSelect: false,
+                            canEndNotMax: false,
+                            selectPermanentCoroutine: SelectPermanentCoroutine,
+                            afterSelectPermanentCoroutine: null,
+                            mode: SelectPermanentEffect.Mode.Custom,
+                            cardEffect: activateClass);
+
+                        selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon or Tamer that will get unable to suspend.", "The opponent is selecting 1 Digimon or Tamer that will get unable to suspend.");
+
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                        IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                        {
+                            Permanent selectedPermanent = permanent;
+
+                            if (selectedPermanent != null)
+                            {
+                                CanNotSuspendClass canNotSuspendClass = new CanNotSuspendClass();
+                                canNotSuspendClass.SetUpICardEffect("Can't Suspend", CanUseCondition1, card);
+                                canNotSuspendClass.SetUpCanNotSuspendClass(PermanentCondition: PermanentCondition);
+                                selectedPermanent.UntilOwnerTurnEndEffects.Add((_timing) => canNotSuspendClass);
+
+                                if (!selectedPermanent.TopCard.CanNotBeAffected(activateClass))
+                                {
+                                    yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().CreateDebuffEffect(selectedPermanent));
+                                }
+
+                                bool CanUseCondition1(Hashtable hashtable)
+                                {
+                                    if (selectedPermanent.TopCard != null)
+                                    {
+                                        if (!selectedPermanent.TopCard.CanNotBeAffected(activateClass))
+                                        {
+                                            return true;
+                                        }
+                                    }
+
+                                    return false;
+                                }
+
+                                bool PermanentCondition(Permanent permanent)
+                                {
+                                    if (permanent == selectedPermanent)
+                                    {
+                                        return true;
+                                    }
+
+                                    return false;
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+            #endregion
+
+            #region When Digivolving
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Trash sources and give effects.", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[When Digivolving] If [Gesomon] or [X-Antibody] is in this Digimon's digivolution cards, trash the bottom 3 cards under 1 of your opponent's Digimon or Tamers. Then, 1 of their Digimon or Tamers without cards under it can't suspend until the end of their turn.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
                 }
 
                 bool CanSelectPermanentCondition(Permanent permanent)

+ 122 - 3
Assets/CardEffect/BT16/Purple/LopmonXAntibody_BT16_067.cs

@@ -26,7 +26,7 @@ namespace DCGO.CardEffects.BT16
             }
             #endregion
 
-            #region On Play/When Digivolving
+            #region On Play
             if (timing == EffectTiming.OnEnterFieldAnyone)
             {
                 ActivateClass activateClass = new ActivateClass();
@@ -36,12 +36,131 @@ namespace DCGO.CardEffects.BT16
 
                 string EffectDiscription()
                 {
-                    return "[On Play] [When Digivolving] By trashing 1 card in your hand, 1 of your Digimon gets +3000 DP for the turn.";
+                    return "[On Play] By trashing 1 card in your hand, 1 of your Digimon gets +3000 DP for the turn.";
                 }
 
                 bool CanUseCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card) || CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
+                }
+
+                bool PermanentCondition(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
+                    {
+                        return true;
+                    }
+                    return false;
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (card.Owner.HandCards.Count >= 1)
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (card.Owner.HandCards.Count >= 1)
+                    {
+                        bool discarded = false;
+
+                        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: AfterSelectCardCoroutine,
+                            mode: SelectHandEffect.Mode.Discard,
+                            cardEffect: activateClass);
+
+                        yield return StartCoroutine(selectHandEffect.Activate());
+
+                        IEnumerator AfterSelectCardCoroutine(List<CardSource> cardSources)
+                        {
+                            if (cardSources.Count >= 1)
+                            {
+                                discarded = true;
+
+                                yield return null;
+                            }
+                        }
+
+                        if (discarded)
+                        {
+                            if (CardEffectCommons.HasMatchConditionPermanent(PermanentCondition))
+                            {
+                                int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(PermanentCondition));
+
+                                SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                                selectPermanentEffect.SetUp(
+                                    selectPlayer: card.Owner,
+                                    canTargetCondition: PermanentCondition,
+                                    canTargetCondition_ByPreSelecetedList: null,
+                                    canEndSelectCondition: null,
+                                    maxCount: maxCount,
+                                    canNoSelect: false,
+                                    canEndNotMax: false,
+                                    selectPermanentCoroutine: SelectPermanentCoroutine,
+                                    afterSelectPermanentCoroutine: null,
+                                    mode: SelectPermanentEffect.Mode.Custom,
+                                    cardEffect: activateClass);
+
+                                selectPermanentEffect.SetUpCustomMessage(
+                                    "Select 1 Digimon that will get DP +3000.",
+                                    "The opponent is selecting 1 Digimon that will get DP +3000.");
+
+                                yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                                IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                                {
+                                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ChangeDigimonDP(
+                                        targetPermanent: permanent,
+                                        changeValue: 3000,
+                                        effectDuration: EffectDuration.UntilEachTurnEnd,
+                                        activateClass: activateClass));
+                                }
+                            }
+
+                        }
+                    }
+                }
+            }
+            #endregion
+
+            #region When Digivolving
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Trash a card to give +3000 DP.", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[When Digivolving] By trashing 1 card in your hand, 1 of your Digimon gets +3000 DP for the turn.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
                 }
 
                 bool PermanentCondition(Permanent permanent)

+ 75 - 3
Assets/CardEffect/BT16/Red/Aquilamon_BT16_008.cs

@@ -28,7 +28,7 @@ namespace DCGO.CardEffects.BT16
             }
             #endregion
 
-            #region On Play | When Digivolving
+            #region On Play
             if (timing == EffectTiming.OnEnterFieldAnyone)
             {
                 ActivateClass activateClass = new ActivateClass();
@@ -38,12 +38,84 @@ namespace DCGO.CardEffects.BT16
 
                 string EffectDiscription()
                 {
-                    return "[On Play] [When Digivolving] Delete 1 of your opponent's Digimon with 3000 DP or less.";
+                    return "[On Play] Delete 1 of your opponent's Digimon with 3000 DP or less.";
                 }
 
                 bool CanUseCondition(Hashtable hashtable)
                 {
-                    if (CardEffectCommons.CanTriggerOnPlay(hashtable, card) || CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card))
+                    if (CardEffectCommons.CanTriggerOnPlay(hashtable, card))
+                    {
+                        return true;
+                    }
+
+                    return false;
+                }
+
+                bool CanSelectPermanentCondition(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
+                    {
+                        if (permanent.DP <= 3000)
+                        {
+                            return true;
+                        }
+                    }
+                    return false;
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        return true;
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                    {
+
+                        SelectPermanentEffect selectPermanentEffect =
+                            GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectPermanentCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: 1,
+                            canNoSelect: false,
+                            canEndNotMax: false,
+                            selectPermanentCoroutine: null,
+                            afterSelectPermanentCoroutine: null,
+                            mode: SelectPermanentEffect.Mode.Destroy,
+                            cardEffect: activateClass);
+
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                    }
+                }
+            }
+            #endregion
+
+            #region When Digivolving
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Delete 1 of your opponent's Digimon with 3000 DP or less.", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[When Digivolving] Delete 1 of your opponent's Digimon with 3000 DP or less.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card))
                     {
                         return true;
                     }