瀏覽代碼

Merge pull request #174 from DCGO2/BT22-Blue

BT22 Blue
Michael8818 1 年之前
父節點
當前提交
053a77ef2a

+ 277 - 0
Assets/CardEffect/BT22/Blue/BT22_021.cs

@@ -0,0 +1,277 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+// Shellmon
+namespace DCGO.CardEffects.BT22
+{
+    public class BT22_021 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            #region Decode
+
+            if (timing == EffectTiming.WhenRemoveField)
+            {
+                bool SourceCondition(CardSource source)
+                {
+                    return source.IsDigimon
+                    && source.HasLevel && source.IsLevel3
+                    && (source.HasSeaAnimalTraits || source.HasAquaTraits);
+                }
+
+                string[] decodeStrings = { "(Lv.3 w/[Aqua]/[Sea Animal] trait)", "Level 3 Digimon card with [Aqua] or [Sea Animal] " };
+                cardEffects.Add(CardEffectFactory.DecodeSelfEffect(card: card, isInheritedEffect: false, decodeStrings: decodeStrings, sourceCondition: SourceCondition, condition: null));
+            }
+
+            #endregion
+
+            #region On Play
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Place 1 level 5 or lower [Aqua]/[Sea Animal] digimon from hand under any digimon", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[On Play] You may place 1 level 5 or lower Digimon card with [Aqua] or [Sea Animal] in any of its traits from your hand as any of your Digimon's bottom digivolution card.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnField(card)
+                        && CardEffectCommons.HasMatchConditionOwnersPermanent(card, IsValidDigimonCondition)
+                        && CardEffectCommons.HasMatchConditionOwnersHand(card, IsValidHandCardCondition);
+                }
+
+                bool IsValidDigimonCondition(Permanent permanent)
+                {
+                    return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card);
+                }
+
+                bool IsValidHandCardCondition(CardSource source)
+                {
+                    return source.IsDigimon
+                        && source.HasLevel && source.Level <= 5
+                        && (source.HasSeaAnimalTraits || source.HasAquaTraits);
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.HasMatchConditionOwnersHand(card, IsValidHandCardCondition) && CardEffectCommons.HasMatchConditionOwnersPermanent(card, IsValidDigimonCondition))
+                    {
+                        #region Select Hand Card
+
+                        CardSource selectedCard = null;
+                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionOwnersCardCountInHand(card, IsValidHandCardCondition));
+                        SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
+
+                        selectHandEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: IsValidHandCardCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: maxCount,
+                            canNoSelect: true,
+                            canEndNotMax: false,
+                            isShowOpponent: true,
+                            selectCardCoroutine: SelectCardCoroutine,
+                            afterSelectCardCoroutine: null,
+                            mode: SelectHandEffect.Mode.Custom,
+                            cardEffect: activateClass);
+
+                        IEnumerator SelectCardCoroutine(CardSource cardSource)
+                        {
+                            selectedCard = cardSource;
+                            yield return null;
+                        }
+                        selectHandEffect.SetUpCustomMessage("Select 1 card to add as digivolution card,", "The opponent is selecting 1 card to add as digivolution card,");
+                        selectHandEffect.SetUpCustomMessage_ShowCard("Selected Card");
+                        yield return StartCoroutine(selectHandEffect.Activate());
+
+                        #endregion
+
+                        if (selectedCard != null)
+                        {
+                            #region Select Permanent
+
+                            Permanent selectedPermanent = null;
+                            int maxCount1 = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(IsValidDigimonCondition));
+
+                            SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                            selectPermanentEffect.SetUp(
+                                selectPlayer: card.Owner,
+                                canTargetCondition: IsValidDigimonCondition,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                maxCount: maxCount1,
+                                canNoSelect: false,
+                                canEndNotMax: false,
+                                selectPermanentCoroutine: SelectPermanentCoroutine,
+                                afterSelectPermanentCoroutine: null,
+                                mode: SelectPermanentEffect.Mode.Custom,
+                                cardEffect: activateClass);
+
+                            IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                            {
+                                selectedPermanent = permanent;
+                                yield return null;
+                            }
+                            selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to add digivolution source.", "The opponent is selecting 1 Digimon to add digivolution source.");
+
+                            yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                            #endregion
+
+                            if (selectedPermanent != null && selectedCard != null)
+                            {
+                                yield return ContinuousController.instance.StartCoroutine(selectedPermanent.AddDigivolutionCardsBottom(new List<CardSource>() { selectedCard }, activateClass));
+                            }
+                        }
+                    }
+                }
+            }
+
+            #endregion
+
+            #region When Digivolving
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Place 1 level 5 or lower [Aqua]/[Sea Animal] digimon from hand under any digimon", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[When Digivolging] You may place 1 level 5 or lower Digimon card with [Aqua] or [Sea Animal] in any of its traits from your hand as any of your Digimon's bottom digivolution card.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnField(card)
+                        && CardEffectCommons.HasMatchConditionOwnersPermanent(card, IsValidDigimonCondition)
+                        && CardEffectCommons.HasMatchConditionOwnersHand(card, IsValidHandCardCondition);
+                }
+
+                bool IsValidDigimonCondition(Permanent permanent)
+                {
+                    return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card);
+                }
+
+                bool IsValidHandCardCondition(CardSource source)
+                {
+                    return source.IsDigimon
+                        && source.HasLevel && source.Level <= 5
+                        && (source.HasSeaAnimalTraits || source.HasAquaTraits);
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.HasMatchConditionOwnersHand(card, IsValidHandCardCondition) && CardEffectCommons.HasMatchConditionOwnersPermanent(card, IsValidDigimonCondition))
+                    {
+                        #region Select Hand Card
+
+                        CardSource selectedCard = null;
+                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionOwnersCardCountInHand(card, IsValidHandCardCondition));
+                        SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
+
+                        selectHandEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: IsValidHandCardCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: maxCount,
+                            canNoSelect: true,
+                            canEndNotMax: false,
+                            isShowOpponent: true,
+                            selectCardCoroutine: SelectCardCoroutine,
+                            afterSelectCardCoroutine: null,
+                            mode: SelectHandEffect.Mode.Custom,
+                            cardEffect: activateClass);
+
+                        IEnumerator SelectCardCoroutine(CardSource cardSource)
+                        {
+                            selectedCard = cardSource;
+                            yield return null;
+                        }
+                        selectHandEffect.SetUpCustomMessage("Select 1 card to add as digivolution card,", "The opponent is selecting 1 card to add as digivolution card,");
+                        selectHandEffect.SetUpCustomMessage_ShowCard("Selected Card");
+                        yield return StartCoroutine(selectHandEffect.Activate());
+
+                        #endregion
+
+                        if (selectedCard != null)
+                        {
+                            #region Select Permanent
+
+                            Permanent selectedPermanent = null;
+                            int maxCount1 = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(IsValidDigimonCondition));
+
+                            SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                            selectPermanentEffect.SetUp(
+                                selectPlayer: card.Owner,
+                                canTargetCondition: IsValidDigimonCondition,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                maxCount: maxCount1,
+                                canNoSelect: false,
+                                canEndNotMax: false,
+                                selectPermanentCoroutine: SelectPermanentCoroutine,
+                                afterSelectPermanentCoroutine: null,
+                                mode: SelectPermanentEffect.Mode.Custom,
+                                cardEffect: activateClass);
+
+                            IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                            {
+                                selectedPermanent = permanent;
+                                yield return null;
+                            }
+                            selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to add digivolution source.", "The opponent is selecting 1 Digimon to add digivolution source.");
+
+                            yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                            #endregion
+
+                            if (selectedPermanent != null && selectedCard != null)
+                            {
+                                yield return ContinuousController.instance.StartCoroutine(selectedPermanent.AddDigivolutionCardsBottom(new List<CardSource>() { selectedCard }, activateClass));
+                            }
+                        }
+                    }
+                }
+            }
+
+            #endregion
+
+            #region ESS
+
+            if (timing == EffectTiming.None)
+            {
+                cardEffects.Add(CardEffectFactory.JammingSelfStaticEffect(isInheritedEffect: true, card: card, condition: null));
+            }
+
+            #endregion
+
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/BT22/Blue/BT22_021.cs.meta

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

+ 260 - 0
Assets/CardEffect/BT22/Blue/BT22_023.cs

@@ -0,0 +1,260 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+// AeroVeedramon
+namespace DCGO.CardEffects.BT22
+{
+    public class BT22_023 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            #region Alternative Digivolution Condition
+
+            if (timing == EffectTiming.None)
+            {
+                bool PermanentCondition(Permanent targetPermanent)
+                {
+                    return targetPermanent.TopCard.HasLevel && targetPermanent.TopCard.IsLevel4
+                        && targetPermanent.TopCard.HasCSTraits;
+                }
+
+                cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(permanentCondition: PermanentCondition, digivolutionCost: 3, ignoreDigivolutionRequirement: false, card: card, condition: null));
+            }
+
+            #endregion
+
+            #region On Play
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Bottom deck 1 level 4 or lower digimon", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[On Play] Return 1 of your opponent's level 4 or lower Digimon to the bottom of the deck.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnField(card)
+                        && CardEffectCommons.HasMatchConditionOpponentsPermanent(card, CanSelectPermanentCondition);
+                }
+
+                bool CanSelectPermanentCondition(Permanent permanent)
+                {
+                    return CardEffectCommons.IsPermanentExistsOnBattleAreaDigimon(permanent)
+                        && permanent.TopCard.HasLevel && permanent.TopCard.Level <= 4;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.HasMatchConditionOpponentsPermanent(card, CanSelectPermanentCondition))
+                    {
+                        int maxCount1 = 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: maxCount1,
+                            canNoSelect: false,
+                            canEndNotMax: false,
+                            selectPermanentCoroutine: null,
+                            afterSelectPermanentCoroutine: null,
+                            mode: SelectPermanentEffect.Mode.PutLibraryBottom,
+                            cardEffect: activateClass);
+
+                        selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to bottom deck.", "The opponent is selecting 1 Digimon to bottom deck.");
+
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                    }
+                }
+            }
+
+            #endregion
+
+            #region When Digivolving
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Bottom deck 1 level 4 or lower digimon", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[When Digivolving] Return 1 of your opponent's level 4 or lower Digimon to the bottom of the deck.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnField(card)
+                        && CardEffectCommons.HasMatchConditionOpponentsPermanent(card, CanSelectPermanentCondition);
+                }
+
+                bool CanSelectPermanentCondition(Permanent permanent)
+                {
+                    return CardEffectCommons.IsPermanentExistsOnBattleAreaDigimon(permanent)
+                        && permanent.TopCard.HasLevel && permanent.TopCard.Level <= 4;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.HasMatchConditionOpponentsPermanent(card, CanSelectPermanentCondition))
+                    {
+                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionOpponentsPermanentCount(card, 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.PutLibraryBottom,
+                            cardEffect: activateClass);
+
+                        selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to bottom deck.", "The opponent is selecting 1 Digimon to bottom deck.");
+
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                    }
+                }
+            }
+
+            #endregion
+
+            #region End of Turn
+
+            if (timing == EffectTiming.OnEndTurn)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Unsuspend 1 blue tamer or digimon", null, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, true, EffectDiscription());
+                activateClass.SetHashString("BT22_023_OnEndTurn");
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[End of Your Turn] [Once Per Turn] 1 of your blue Digimon or Tamers may unsuspend.";
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnField(card)
+                        && CardEffectCommons.IsOwnerTurn(card)
+                        && CardEffectCommons.HasMatchConditionOwnersPermanent(card, CanSelectPermanentCondition);
+                }
+
+                bool CanSelectPermanentCondition(Permanent permanent)
+                {
+                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(permanent, card)
+                        && CardEffectCommons.CanUnsuspend(permanent)
+                        && permanent.TopCard.CardColors.Contains(CardColor.Blue)
+                        && permanent.IsDigimon || permanent.IsTamer
+                        && permanent.IsSuspended;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, CanSelectPermanentCondition))
+                    {
+                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionOwnersPermanentCount(card, 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);
+
+                        selectPermanentEffect.SetUpCustomMessage("Select 1 card to unsuspend.", "The opponent is selecting 1 card to unsuspend.");
+
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                    }
+                }
+            }
+
+            #endregion
+
+            #region ESS
+
+            if (timing == EffectTiming.OnTappedAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Unsuspend this digimon", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, true, EffectDiscription());
+                activateClass.SetHashString("BT22_023_ESS");
+                activateClass.SetIsInheritedEffect(true);
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[All Turns] [Once Per Turn] When this Digimon with [Veedramon] in its name suspends, if you have a blue Tamer, this Digimon may unsuspend.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerWhenPermanentSuspends(hashtable, IsVeedramon);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnField(card)
+                        && CardEffectCommons.HasMatchConditionOwnersPermanent(card, IsBlueTamer);
+                }
+
+                bool IsVeedramon(Permanent permanent)
+                {
+                    return permanent.TopCard.ContainsCardName("Veedramon")
+                        && card.PermanentOfThisCard() == permanent;
+                }
+
+                bool IsBlueTamer(Permanent permanent)
+                {
+                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(permanent, card)
+                        && permanent.IsTamer
+                        && permanent.TopCard.CardColors.Contains(CardColor.Blue);
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    yield return ContinuousController.instance.StartCoroutine(new IUnsuspendPermanents(new List<Permanent>() { card.PermanentOfThisCard() }, activateClass).Unsuspend());
+                }
+            }
+
+            #endregion
+
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/BT22/Blue/BT22_023.cs.meta

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

+ 257 - 0
Assets/CardEffect/BT22/Blue/BT22_024.cs

@@ -0,0 +1,257 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+// MarineBullmon
+namespace DCGO.CardEffects.BT22
+{
+    public class BT22_024 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            #region Decode
+
+            if (timing == EffectTiming.WhenRemoveField)
+            {
+                bool SourceCondition(CardSource source)
+                {
+                    return source.IsDigimon
+                    && source.HasLevel && source.IsLevel4
+                    && (source.HasSeaAnimalTraits || source.HasAquaTraits);
+                }
+
+                string[] decodeStrings = { "(Lv.4 w/[Aqua]/[Sea Animal] trait)", "Level 4 Digimon card with [Aqua] or [Sea Animal] " };
+                cardEffects.Add(CardEffectFactory.DecodeSelfEffect(card: card, isInheritedEffect: false, decodeStrings: decodeStrings, sourceCondition: SourceCondition, condition: null));
+            }
+
+            #endregion
+
+            #region Hand Main
+
+            if (timing == EffectTiming.OnDeclaration)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Place 1 [Shellmon] from trash under 1 [Sangomon], to digivolve for 3", null, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[Hand] [Main] If you have [Yao Qinglan], by placing 1 [Shellmon] from your trash as any of your [Sangomon]'s bottom digivolution card, it digivolves into this card for a digivolution cost of 3, ignoring digivolution requirements.";
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnHand(card)
+                        && CardEffectCommons.IsOwnerTurn(card)
+                        && CardEffectCommons.HasMatchConditionOwnersPermanent(card, IsYaoQinglan)
+                        && CardEffectCommons.HasMatchConditionOwnersPermanent(card, IsSangomon)
+                        && CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, IsShellmon);
+                }
+
+                bool IsYaoQinglan(Permanent permanent)
+                {
+                    return permanent.IsTamer && permanent.TopCard.EqualsCardName("Yao Qinglan");
+                }
+
+                bool IsSangomon(Permanent permanent)
+                {
+                    return permanent.IsDigimon && permanent.TopCard.EqualsCardName("Sangomon");
+                }
+
+                bool IsShellmon(CardSource source)
+                {
+                    return source.IsDigimon && source.EqualsCardName("Shellmon");
+                }
+
+                bool IsMarineBullmon(CardSource cardSource)
+                {
+                    return CardEffectCommons.IsExistOnHand(cardSource) && cardSource == card;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, IsYaoQinglan))
+                    {
+                        Permanent sangomon = null;
+                        CardSource shellmon = null;
+
+                        #region Select Shellmon From Trash
+
+                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionOwnersCardCountInTrash(card, IsShellmon));
+                        SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+                        selectCardEffect.SetUp(
+                                    canTargetCondition: IsShellmon,
+                                    canTargetCondition_ByPreSelecetedList: null,
+                                    canEndSelectCondition: null,
+                                    canNoSelect: () => false,
+                                    selectCardCoroutine: SelectCardCoroutine,
+                                    afterSelectCardCoroutine: null,
+                                    message: "Select 1 [Shellmon] to add as digivolution source",
+                                    maxCount: maxCount,
+                                    canEndNotMax: false,
+                                    isShowOpponent: true,
+                                    mode: SelectCardEffect.Mode.Custom,
+                                    root: SelectCardEffect.Root.Trash,
+                                    customRootCardList: null,
+                                    canLookReverseCard: true,
+                                    selectPlayer: card.Owner,
+                                    cardEffect: activateClass);
+
+                        IEnumerator SelectCardCoroutine(CardSource cardSource)
+                        {
+                            shellmon = cardSource;
+                            yield return null;
+                        }
+
+                        selectCardEffect.SetUpCustomMessage("Select 1 [Shellmon] to add as digivolution source.", "The opponent is selecting 1 [Shellmon] to add as digivolution source.");
+                        yield return StartCoroutine(selectCardEffect.Activate());
+
+                        #endregion
+
+                        if (shellmon != null)
+                        {
+                            #region Select Sangomon Permanent
+
+                            int maxCount1 = Math.Min(1, CardEffectCommons.MatchConditionOwnersPermanentCount(card, IsSangomon));
+
+                            SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                            selectPermanentEffect.SetUp(
+                                selectPlayer: card.Owner,
+                                canTargetCondition: IsSangomon,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                maxCount: maxCount1,
+                                canNoSelect: false,
+                                canEndNotMax: false,
+                                selectPermanentCoroutine: SelectPermanentCoroutine,
+                                afterSelectPermanentCoroutine: null,
+                                mode: SelectPermanentEffect.Mode.Custom,
+                                cardEffect: activateClass);
+
+                            IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                            {
+                                sangomon = permanent;
+                                yield return null;
+                            }
+
+                            selectPermanentEffect.SetUpCustomMessage("Select 1 [Sangomon] to add digivolution sources.", "The opponent is selecting 1 [Sangomon] to add digivolution sources.");
+                            yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                            #endregion
+
+                            if (sangomon != null)
+                            {
+                                yield return ContinuousController.instance.StartCoroutine(sangomon.AddDigivolutionCardsBottom(new List<CardSource>() { shellmon }, activateClass));
+                                if (sangomon.DigivolutionCards.Contains(shellmon))
+                                {
+                                    #region Digivolve into MarineBullmon
+
+                                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.DigivolveIntoHandOrTrashCard(
+                                        sangomon,
+                                        IsMarineBullmon,
+                                        payCost: true,
+                                        reduceCostTuple: null,
+                                        fixedCostTuple: null,
+                                        ignoreDigivolutionRequirementFixedCost: 3,
+                                        isHand: true,
+                                        activateClass: activateClass,
+                                        successProcess: null));
+
+                                    #endregion
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+
+            #endregion
+
+            #region ESS
+
+            if (timing == EffectTiming.OnEndAttack)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Play 1 level 4 or lower [Aqua]/[Sea Animal] digimon from sources", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, true, EffectDiscription());
+                activateClass.SetHashString("BT22_024_OnEndAttack");
+                activateClass.SetIsInheritedEffect(true);
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[End of Attack] [Once Per Turn] You may play 1 level 4 or lower Digimon card with [Aqua] or [Sea Animal] in any of its traits from this Digimon's digivolution cards without paying the cost.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnEndAttack(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnField(card)
+                        && card.PermanentOfThisCard().DigivolutionCards.Filter(x => CanSelectCardCondition(x)).Count >= 1;
+                }
+
+                bool CanSelectCardCondition(CardSource source)
+                {
+                    return source.IsDigimon
+                        && source.HasLevel && source.Level <= 4
+                        && (source.HasSeaAnimalTraits || source.HasAquaTraits);
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (card.PermanentOfThisCard().DigivolutionCards.Filter(x => CanSelectCardCondition(x)).Count >= 1)
+                    {
+                        CardSource selectedCard = null;
+
+                        #region Select Digimon From Digivolution Cards
+
+                        SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+                        selectCardEffect.SetUp(
+                                    canTargetCondition: CanSelectCardCondition,
+                                    canTargetCondition_ByPreSelecetedList: null,
+                                    canEndSelectCondition: null,
+                                    canNoSelect: () => true,
+                                    selectCardCoroutine: SelectCardCoroutine,
+                                    afterSelectCardCoroutine: null,
+                                    message: "Select 1 digimon to play",
+                                    maxCount: 1,
+                                    canEndNotMax: false,
+                                    isShowOpponent: true,
+                                    mode: SelectCardEffect.Mode.Custom,
+                                    root: SelectCardEffect.Root.Custom,
+                                    customRootCardList: card.PermanentOfThisCard().DigivolutionCards,
+                                    canLookReverseCard: true,
+                                    selectPlayer: card.Owner,
+                                    cardEffect: activateClass);
+
+                        IEnumerator SelectCardCoroutine(CardSource cardSource)
+                        {
+                            selectedCard = cardSource;
+                            yield return null;
+                        }
+
+                        selectCardEffect.SetUpCustomMessage("Select 1 digimon to play.", "The opponent is selecting 1 digimon to play.");
+                        selectCardEffect.SetUpCustomMessage_ShowCard("Selected Card");
+                        yield return StartCoroutine(selectCardEffect.Activate());
+
+                        #endregion
+
+                        if (selectedCard != null) yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(cardSources: new List<CardSource>() { selectedCard }, activateClass: activateClass, payCost: false, isTapped: false, root: SelectCardEffect.Root.DigivolutionCards, activateETB: true));
+                    }
+                }
+            }
+
+            #endregion
+
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/BT22/Blue/BT22_024.cs.meta

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

+ 372 - 0
Assets/CardEffect/BT22/Blue/BT22_025.cs

@@ -0,0 +1,372 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+// UlforceVeedramon
+namespace DCGO.CardEffects.BT22
+{
+    public class BT22_025 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            #region Alternative Digivolution Condition
+
+            if (timing == EffectTiming.None)
+            {
+                bool PermanentCondition(Permanent targetPermanent)
+                {
+                    return targetPermanent.TopCard.HasLevel && targetPermanent.TopCard.IsLevel5
+                        && targetPermanent.TopCard.HasCSTraits;
+                }
+
+                cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(permanentCondition: PermanentCondition, digivolutionCost: 3, ignoreDigivolutionRequirement: false, card: card, condition: null));
+            }
+
+            #endregion
+
+            #region Blast Digivolve
+
+            if (timing == EffectTiming.OnCounterTiming)
+            {
+                cardEffects.Add(CardEffectFactory.BlastDigivolveEffect(card: card, condition: null));
+            }
+
+            #endregion
+
+            #region On Play
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Bottom deck lowest level digimon or play 1 blue tamer from hand", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[On Play] Activate 1 of the effects below: Return 1 of your opponent's lowest level Digimon to the bottom of the deck or You may play 1 play cost 4 or lower blue Tamer card from your hand without paying the cost.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnField(card);
+                }
+
+                bool CanSelectOpponentDigimon(Permanent permanent)
+                {
+                    return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card)
+                        && CardEffectCommons.IsMinLevel(permanent, card.Owner.Enemy);
+                }
+
+                bool CanSelectBlueTamer(CardSource cardSource)
+                {
+                    return CardEffectCommons.IsExistOnHand(cardSource)
+                        && CardEffectCommons.CanPlayAsNewPermanent(cardSource, false, activateClass)
+                        && cardSource.IsTamer
+                        && cardSource.CardColors.Contains(CardColor.Blue);
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    bool CanBottomDeck = CardEffectCommons.HasMatchConditionOpponentsPermanent(card, CanSelectOpponentDigimon);
+                    bool CanPlayBlueTamer = CardEffectCommons.HasMatchConditionOwnersHand(card, CanSelectBlueTamer);
+
+                    #region Option Selection
+
+                    if (CanBottomDeck || CanPlayBlueTamer)
+                    {
+                        List<SelectionElement<int>> selectionElements = new List<SelectionElement<int>>()
+                        {
+                            new(message: "Return 1 of your opponent's lowest level Digimon to the bottom of the deck.", value: 0, spriteIndex: 0),
+                            new(message: "You may play 1 play cost 4 or lower blue Tamer card from your hand without paying the cost", value: 1, spriteIndex: 0),
+                        };
+
+                        string selectPlayerMessage = "Which effect will you activate?";
+                        string notSelectPlayerMessage = "The opponent is choosing which effect to activate.";
+
+                        if (CanBottomDeck && CanPlayBlueTamer)
+                        {
+                            GManager.instance.userSelectionManager.SetIntSelection(selectionElements: selectionElements,
+                                selectPlayer: card.Owner, selectPlayerMessage: selectPlayerMessage,
+                                notSelectPlayerMessage: notSelectPlayerMessage);
+
+                            yield return ContinuousController.instance.StartCoroutine(GManager.instance.userSelectionManager.WaitForEndSelect());
+                        }
+                        else
+                        {
+                            GManager.instance.userSelectionManager.SetInt(CanBottomDeck ? 0 : 1);
+                        }
+                        int actionID = GManager.instance.userSelectionManager.SelectedIntValue;
+
+                        #region Bottom Deck
+
+                        if (actionID == 0 && CanBottomDeck)
+                        {
+                            int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectOpponentDigimon));
+                            SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                            selectPermanentEffect.SetUp(
+                                selectPlayer: card.Owner,
+                                canTargetCondition: CanSelectOpponentDigimon,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                maxCount: maxCount,
+                                canNoSelect: false,
+                                canEndNotMax: false,
+                                selectPermanentCoroutine: null,
+                                afterSelectPermanentCoroutine: null,
+                                mode: SelectPermanentEffect.Mode.PutLibraryBottom,
+                                cardEffect: activateClass);
+
+                            selectPermanentEffect.SetUpCustomMessage("Select 1 digimon to bottom deck.", "The opponent is selecting a digimon to bottom deck.");
+                            yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                        }
+
+                        #endregion
+
+                        #region Play Blue Tamer
+
+                        if (actionID == 1 && CanPlayBlueTamer)
+                        {
+                            CardSource blueTamer = null;
+                            int maxCount = Math.Min(1, CardEffectCommons.MatchConditionOwnersCardCountInHand(card, CanSelectBlueTamer));
+
+                            SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
+
+                            selectHandEffect.SetUp(
+                                selectPlayer: card.Owner,
+                                canTargetCondition: CanSelectBlueTamer,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                maxCount: maxCount,
+                                canNoSelect: true,
+                                canEndNotMax: false,
+                                isShowOpponent: true,
+                                selectCardCoroutine: SelectCardCoroutine,
+                                afterSelectCardCoroutine: null,
+                                mode: SelectHandEffect.Mode.Custom,
+                                cardEffect: activateClass);
+
+                            IEnumerator SelectCardCoroutine(CardSource cardSource)
+                            {
+                                blueTamer = cardSource;
+                                yield return null;
+                            }
+
+                            selectHandEffect.SetUpCustomMessage("Select 1 card to play.", "The opponent is selecting 1 card to play.");
+                            selectHandEffect.SetUpCustomMessage_ShowCard("Played Card");
+
+                            yield return StartCoroutine(selectHandEffect.Activate());
+
+                            if (blueTamer != null) yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(
+                                cardSources: new List<CardSource>() { blueTamer },
+                                activateClass: activateClass,
+                                payCost: false,
+                                isTapped: false,
+                                root: SelectCardEffect.Root.Hand,
+                                activateETB: true
+                            ));
+                        }
+
+                        #endregion
+                    }
+
+                    #endregion
+                }
+            }
+
+            #endregion
+
+            #region When Digivolving
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Bottom deck lowest level digimon or play 1 blue tamer from hand", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[When Digivolving] Activate 1 of the effects below: Return 1 of your opponent's lowest level Digimon to the bottom of the deck or You may play 1 play cost 4 or lower blue Tamer card from your hand without paying the cost.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnField(card);
+                }
+
+                bool CanSelectOpponentDigimon(Permanent permanent)
+                {
+                    return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card)
+                        && CardEffectCommons.IsMinLevel(permanent, card.Owner.Enemy);
+                }
+
+                bool CanSelectBlueTamer(CardSource cardSource)
+                {
+                    return CardEffectCommons.IsExistOnHand(cardSource)
+                        && CardEffectCommons.CanPlayAsNewPermanent(cardSource, false, activateClass)
+                        && cardSource.IsTamer
+                        && cardSource.CardColors.Contains(CardColor.Blue);
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    bool CanBottomDeck = CardEffectCommons.HasMatchConditionOpponentsPermanent(card, CanSelectOpponentDigimon);
+                    bool CanPlayBlueTamer = CardEffectCommons.HasMatchConditionOwnersHand(card, CanSelectBlueTamer);
+
+                    #region Option Selection
+
+                    if (CanBottomDeck || CanPlayBlueTamer)
+                    {
+                        List<SelectionElement<int>> selectionElements = new List<SelectionElement<int>>()
+                        {
+                            new(message: "Return 1 of your opponent's lowest level Digimon to the bottom of the deck.", value: 0, spriteIndex: 0),
+                            new(message: "You may play 1 play cost 4 or lower blue Tamer card from your hand without paying the cost", value: 1, spriteIndex: 0),
+                        };
+
+                        string selectPlayerMessage = "Which effect will you activate?";
+                        string notSelectPlayerMessage = "The opponent is choosing which effect to activate.";
+
+                        if (CanBottomDeck && CanPlayBlueTamer)
+                        {
+                            GManager.instance.userSelectionManager.SetIntSelection(selectionElements: selectionElements,
+                                selectPlayer: card.Owner, selectPlayerMessage: selectPlayerMessage,
+                                notSelectPlayerMessage: notSelectPlayerMessage);
+
+                            yield return ContinuousController.instance.StartCoroutine(GManager.instance.userSelectionManager.WaitForEndSelect());
+                        }
+                        else
+                        {
+                            GManager.instance.userSelectionManager.SetInt(CanBottomDeck ? 0 : 1);
+                        }
+                        int actionID = GManager.instance.userSelectionManager.SelectedIntValue;
+
+                        #region Bottom Deck
+
+                        if (actionID == 0 && CanBottomDeck)
+                        {
+                            int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectOpponentDigimon));
+                            SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                            selectPermanentEffect.SetUp(
+                                selectPlayer: card.Owner,
+                                canTargetCondition: CanSelectOpponentDigimon,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                maxCount: maxCount,
+                                canNoSelect: false,
+                                canEndNotMax: false,
+                                selectPermanentCoroutine: null,
+                                afterSelectPermanentCoroutine: null,
+                                mode: SelectPermanentEffect.Mode.PutLibraryBottom,
+                                cardEffect: activateClass);
+
+                            selectPermanentEffect.SetUpCustomMessage("Select 1 digimon to bottom deck.", "The opponent is selecting a digimon to bottom deck.");
+                            yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                        }
+
+                        #endregion
+
+                        #region Play Blue Tamer
+
+                        if (actionID == 1 && CanPlayBlueTamer)
+                        {
+                            CardSource blueTamer = null;
+                            int maxCount = Math.Min(1, CardEffectCommons.MatchConditionOwnersCardCountInHand(card, CanSelectBlueTamer));
+
+                            SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
+
+                            selectHandEffect.SetUp(
+                                selectPlayer: card.Owner,
+                                canTargetCondition: CanSelectBlueTamer,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                maxCount: maxCount,
+                                canNoSelect: true,
+                                canEndNotMax: false,
+                                isShowOpponent: true,
+                                selectCardCoroutine: SelectCardCoroutine,
+                                afterSelectCardCoroutine: null,
+                                mode: SelectHandEffect.Mode.Custom,
+                                cardEffect: activateClass);
+
+                            IEnumerator SelectCardCoroutine(CardSource cardSource)
+                            {
+                                blueTamer = cardSource;
+                                yield return null;
+                            }
+
+                            selectHandEffect.SetUpCustomMessage("Select 1 card to play.", "The opponent is selecting 1 card to play.");
+                            selectHandEffect.SetUpCustomMessage_ShowCard("Played Card");
+                            yield return ContinuousController.instance.StartCoroutine(selectHandEffect.Activate());
+
+                            if (blueTamer != null) yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(
+                                cardSources: new List<CardSource>() { blueTamer },
+                                activateClass: activateClass,
+                                payCost: false,
+                                isTapped: false,
+                                root: SelectCardEffect.Root.Hand,
+                                activateETB: true
+                            ));
+                        }
+
+                        #endregion
+                    }
+
+                    #endregion
+                }
+            }
+
+            #endregion
+
+            #region When Attacking
+
+            if (timing == EffectTiming.OnAllyAttack)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Unsuspend this digimon", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, true, EffectDiscription());
+                activateClass.SetHashString("BT22_025_Unsuspend");
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[When Attacking] [Once Per Turn] This Digimon may unsuspend.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnAttack(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnField(card)
+                        && CardEffectCommons.CanUnsuspend(card.PermanentOfThisCard());
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.CanUnsuspend(card.PermanentOfThisCard())) yield return ContinuousController.instance.StartCoroutine(new IUnsuspendPermanents(new List<Permanent>() { card.PermanentOfThisCard() }, activateClass).Unsuspend());
+                }
+            }
+
+            #endregion
+
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/BT22/Blue/BT22_025.cs.meta

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

+ 313 - 0
Assets/CardEffect/BT22/Blue/BT22_026.cs

@@ -0,0 +1,313 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+// MetalGarurumon
+namespace DCGO.CardEffects.BT22
+{
+    public class BT22_026 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            #region Alternative Digivolution Condition
+
+            if (timing == EffectTiming.None)
+            {
+                bool PermanentCondition(Permanent targetPermanent)
+                {
+                    return targetPermanent.TopCard.HasLevel && targetPermanent.TopCard.IsLevel5
+                        && (targetPermanent.TopCard.ContainsCardName("Garurumon") || targetPermanent.TopCard.HasCSTraits);
+                }
+
+                cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(permanentCondition: PermanentCondition, digivolutionCost: 3, ignoreDigivolutionRequirement: false, card: card, condition: null));
+            }
+
+            #endregion
+
+            #region Hand Main
+
+            if (timing == EffectTiming.OnDeclaration)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Digivolve 1 [Gabumon] into this card for 6", null, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[Hand] [Main] If you have [Nokia Shiramine], 1 of your [Gabumon] digivolves into this card for a digivolution cost of 6, ignoring digivolution requirements.";
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsOwnerTurn(card)
+                        && CardEffectCommons.HasMatchConditionOwnersHand(card, IsMetalGarurumon)
+                        && CardEffectCommons.HasMatchConditionOwnersPermanent(card, IsNokiaShiramine)
+                        && CardEffectCommons.HasMatchConditionOwnersPermanent(card, IsGabumon);
+                }
+
+                bool IsNokiaShiramine(Permanent permanent)
+                {
+                    return permanent.IsTamer && permanent.TopCard.EqualsCardName("Nokia Shiramine");
+                }
+
+                bool IsGabumon(Permanent permanent)
+                {
+                    return permanent.IsDigimon && permanent.TopCard.EqualsCardName("Gabumon");
+                }
+
+                bool IsMetalGarurumon(CardSource cardSource)
+                {
+                    return CardEffectCommons.IsExistOnHand(cardSource) && cardSource == card;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, IsNokiaShiramine))
+                    {
+                        Permanent gabumon = null;
+
+                        #region Select Gabumon Permanent
+
+                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionOwnersPermanentCount(card, IsGabumon));
+                        SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: IsGabumon,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: maxCount,
+                            canNoSelect: false,
+                            canEndNotMax: false,
+                            selectPermanentCoroutine: SelectPermanentCoroutine,
+                            afterSelectPermanentCoroutine: null,
+                            mode: SelectPermanentEffect.Mode.Custom,
+                            cardEffect: activateClass);
+
+                        IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                        {
+                            gabumon = permanent;
+                            yield return null;
+                        }
+
+                        selectPermanentEffect.SetUpCustomMessage("Select 1 [Gabumon] to digivolve", "The opponent is selecting 1 [Gabumon] to digivolve.");
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                        #endregion
+
+                        if (gabumon != null)
+                        {
+                            #region Digivolve into MetalGarurumon
+
+                            yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.DigivolveIntoHandOrTrashCard(
+                                gabumon,
+                                IsMetalGarurumon,
+                                payCost: true,
+                                reduceCostTuple: null,
+                                fixedCostTuple: null,
+                                ignoreDigivolutionRequirementFixedCost: 6,
+                                isHand: true,
+                                activateClass: activateClass,
+                                successProcess: null));
+
+                            #endregion
+                        }
+                    }
+                }
+            }
+
+            #endregion
+
+            #region When Digivolving
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Digivolve 1 [Agumon] into [WarGreymon], or bounce lowest level digimon to hand", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[When Digivolving] Activate 1 of the effects below: 1 of your [Agumon] may digivolve into [WarGreymon] in the hand, ignoring digivolution requirements and without paying the cost. or Return 1 of your opponent's Digimon with the lowest level to the hand.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnField(card);
+                }
+
+                bool IsAgumon(Permanent permanent)
+                {
+                    return permanent.IsDigimon && permanent.TopCard.EqualsCardName("Agumon");
+                }
+
+                bool IsWarGreymon(CardSource cardSource)
+                {
+                    return CardEffectCommons.IsExistOnHand(cardSource) && cardSource.EqualsCardName("WarGreymon");
+                }
+
+                bool CanSelectOpponentDigimon(Permanent permanent)
+                {
+                    return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card)
+                        && CardEffectCommons.IsMinLevel(permanent, card.Owner.Enemy);
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    bool canDigivolve = CardEffectCommons.HasMatchConditionOwnersPermanent(card, IsAgumon) && CardEffectCommons.HasMatchConditionOwnersHand(card, IsWarGreymon);
+                    bool canBounce = CardEffectCommons.HasMatchConditionOpponentsPermanent(card, CanSelectOpponentDigimon);
+
+                    #region Option Selection
+
+                    if (canBounce || canDigivolve)
+                    {
+                        List<SelectionElement<int>> selectionElements = new List<SelectionElement<int>>()
+                        {
+                            new(message: "Return 1 of your opponent's Digimon with the lowest level to the hand.", value: 0, spriteIndex: 0),
+                            new(message: "1 of your [Agumon] may digivolve into [WarGreymon] in the hand, ignoring digivolution requirements and without paying the cost.", value: 1, spriteIndex: 0),
+                        };
+
+                        string selectPlayerMessage = "Which effect will you activate?";
+                        string notSelectPlayerMessage = "The opponent is choosing which effect to activate.";
+
+                        if (canBounce && canDigivolve)
+                        {
+                            GManager.instance.userSelectionManager.SetIntSelection(selectionElements: selectionElements,
+                                selectPlayer: card.Owner, selectPlayerMessage: selectPlayerMessage,
+                                notSelectPlayerMessage: notSelectPlayerMessage);
+
+                            yield return ContinuousController.instance.StartCoroutine(GManager.instance.userSelectionManager.WaitForEndSelect());
+                        }
+                        else
+                        {
+                            GManager.instance.userSelectionManager.SetInt(canBounce ? 0 : 1);
+                        }
+                        int actionID = GManager.instance.userSelectionManager.SelectedIntValue;
+
+                        #region Bounce digimon to hand
+
+                        if (actionID == 0 && canBounce)
+                        {
+                            int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectOpponentDigimon));
+                            SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                            selectPermanentEffect.SetUp(
+                                selectPlayer: card.Owner,
+                                canTargetCondition: CanSelectOpponentDigimon,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                maxCount: maxCount,
+                                canNoSelect: false,
+                                canEndNotMax: false,
+                                selectPermanentCoroutine: null,
+                                afterSelectPermanentCoroutine: null,
+                                mode: SelectPermanentEffect.Mode.Bounce,
+                                cardEffect: activateClass);
+
+                            selectPermanentEffect.SetUpCustomMessage("Select 1 digimon to bounce to hand.", "The opponent is selecting a digimon to bounce to hand..");
+                            yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                        }
+
+                        #endregion
+
+                        #region Digivolve
+
+                        if (actionID == 1 && canDigivolve)
+                        {
+                            Permanent agumon = null;
+                            int maxCount = Math.Min(1, CardEffectCommons.MatchConditionOwnersPermanentCount(card, IsAgumon));
+                            SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                            selectPermanentEffect.SetUp(
+                                selectPlayer: card.Owner,
+                                canTargetCondition: IsAgumon,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                maxCount: maxCount,
+                                canNoSelect: false,
+                                canEndNotMax: false,
+                                selectPermanentCoroutine: SelectPermanentCoroutine,
+                                afterSelectPermanentCoroutine: null,
+                                mode: SelectPermanentEffect.Mode.Custom,
+                                cardEffect: activateClass);
+
+                            IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                            {
+                                agumon = permanent;
+                                yield return null;
+                            }
+
+                            selectPermanentEffect.SetUpCustomMessage("Select 1 [Agumon] to digivolve.", "The opponent is selecting 1 [Agumon] to digivolve.");
+                            yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                            if (agumon != null) yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.DigivolveIntoHandOrTrashCard(
+                                targetPermanent: agumon,
+                                cardCondition: IsWarGreymon,
+                                payCost: false,
+                                reduceCostTuple: null,
+                                fixedCostTuple: null,
+                                ignoreDigivolutionRequirementFixedCost: -1,
+                                isHand: true,
+                                activateClass: activateClass,
+                                successProcess: null
+                            ));
+                        }
+
+                        #endregion
+                    }
+
+                    #endregion
+                }
+            }
+
+            #endregion
+
+            #region When Attacking
+
+            if (timing == EffectTiming.OnAllyAttack)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Unsuspend this digimon", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDiscription());
+                activateClass.SetHashString("BT22_026_Unsuspend");
+                activateClass.SetIsInheritedEffect(true);
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[When Attacking] [Once Per Turn] If this Digimon has [Omnimon] in its name, it unsuspends.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnAttack(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnField(card)
+                        && CardEffectCommons.CanUnsuspend(card.PermanentOfThisCard())
+                        && card.PermanentOfThisCard().TopCard.ContainsCardName("Omnimon");
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.CanUnsuspend(card.PermanentOfThisCard())) yield return ContinuousController.instance.StartCoroutine(new IUnsuspendPermanents(new List<Permanent>() { card.PermanentOfThisCard() }, activateClass).Unsuspend());
+                }
+            }
+
+            #endregion
+
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/BT22/Blue/BT22_026.cs.meta

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

+ 430 - 0
Assets/CardEffect/BT22/Blue/BT22_027.cs

@@ -0,0 +1,430 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+// Ryugumon
+namespace DCGO.CardEffects.BT22
+{
+    public class BT22_027 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            #region Decode
+
+            if (timing == EffectTiming.WhenRemoveField)
+            {
+                bool SourceCondition(CardSource source)
+                {
+                    return source.IsDigimon
+                    && source.HasLevel && source.IsLevel5
+                    && (source.HasSeaAnimalTraits || source.HasAquaTraits);
+                }
+
+                string[] decodeStrings = { "(Lv.5 w/[Aqua]/[Sea Animal] trait)", "Level 5 Digimon card with [Aqua] or [Sea Animal] " };
+                cardEffects.Add(CardEffectFactory.DecodeSelfEffect(card: card, isInheritedEffect: false, decodeStrings: decodeStrings, sourceCondition: SourceCondition, condition: null));
+            }
+
+            #endregion
+
+            #region On Play
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Place 1 level 5 or lower [Aqua]/[Sea Animal] digimon in sources, 1 digimon or tamer cant suspend", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[On Play] By placing 1 level 5 or lower Digimon card with [Aqua] or [Sea Animal] in any of its traits from your hand as this Digimon's bottom digivolution card, 1 of your opponent's Digimon or Tamers can't suspend until their turn ends.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnField(card)
+                        && CardEffectCommons.HasMatchConditionOwnersHand(card, HandCondition)
+                        && CardEffectCommons.HasMatchConditionOpponentsPermanent(card, PermanentCondition);
+                }
+
+                bool HandCondition(CardSource source)
+                {
+                    return CardEffectCommons.IsExistOnHand(card)
+                        && source.IsDigimon
+                        && source.HasLevel && source.Level <= 5
+                        && (source.HasSeaAnimalTraits || source.HasAquaTraits);
+                }
+
+                bool PermanentCondition(Permanent permanent)
+                {
+                    return CardEffectCommons.IsPermanentExistsOnOpponentBattleArea(permanent, card)
+                        && (permanent.IsDigimon || permanent.IsTamer);
+                }
+
+                bool IsRyugumon(Permanent permanent)
+                {
+                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card)
+                        && permanent == card.PermanentOfThisCard();
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.HasMatchConditionOwnersHand(card, HandCondition) && CardEffectCommons.HasMatchConditionOwnersPermanent(card, IsRyugumon))
+                    {
+                        #region Select Hand Card
+
+                        CardSource selectedCard = null;
+                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionOwnersCardCountInHand(card, HandCondition));
+                        SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
+
+                        selectHandEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: HandCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: maxCount,
+                            canNoSelect: true,
+                            canEndNotMax: false,
+                            isShowOpponent: true,
+                            selectCardCoroutine: SelectCardCoroutine,
+                            afterSelectCardCoroutine: null,
+                            mode: SelectHandEffect.Mode.Custom,
+                            cardEffect: activateClass);
+
+                        IEnumerator SelectCardCoroutine(CardSource cardSource)
+                        {
+                            selectedCard = cardSource;
+                            yield return null;
+                        }
+                        selectHandEffect.SetUpCustomMessage("Select 1 card to add as digivolution card,", "The opponent is selecting 1 card to add as digivolution card,");
+                        selectHandEffect.SetUpCustomMessage_ShowCard("Selected Card");
+                        yield return StartCoroutine(selectHandEffect.Activate());
+
+                        #endregion
+
+                        if (selectedCard != null)
+                        {
+                            #region Select Permanent
+
+                            Permanent selectedPermanent = null;
+                            int maxCount1 = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(IsRyugumon));
+
+                            SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                            selectPermanentEffect.SetUp(
+                                selectPlayer: card.Owner,
+                                canTargetCondition: IsRyugumon,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                maxCount: maxCount1,
+                                canNoSelect: false,
+                                canEndNotMax: false,
+                                selectPermanentCoroutine: SelectPermanentCoroutine,
+                                afterSelectPermanentCoroutine: null,
+                                mode: SelectPermanentEffect.Mode.Custom,
+                                cardEffect: activateClass);
+
+                            IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                            {
+                                selectedPermanent = permanent;
+                                yield return null;
+                            }
+                            selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to add digivolution source.", "The opponent is selecting 1 Digimon to add digivolution source.");
+
+                            yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                            #endregion
+
+                            if (selectedPermanent != null && selectedCard != null)
+                            {
+                                yield return ContinuousController.instance.StartCoroutine(selectedPermanent.AddDigivolutionCardsBottom(new List<CardSource>() { selectedCard }, activateClass));
+
+                                if (CardEffectCommons.HasMatchConditionOpponentsPermanent(card, PermanentCondition))
+                                {
+                                    #region Select Opponent Permanent
+
+                                    Permanent opponentPermanent = null;
+                                    int maxCount2 = Math.Min(1, CardEffectCommons.MatchConditionOpponentsPermanentCount(card, PermanentCondition));
+
+                                    SelectPermanentEffect selectPermanentEffect1 = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                                    selectPermanentEffect1.SetUp(
+                                        selectPlayer: card.Owner,
+                                        canTargetCondition: PermanentCondition,
+                                        canTargetCondition_ByPreSelecetedList: null,
+                                        canEndSelectCondition: null,
+                                        maxCount: maxCount2,
+                                        canNoSelect: false,
+                                        canEndNotMax: false,
+                                        selectPermanentCoroutine: SelectPermanentCoroutine1,
+                                        afterSelectPermanentCoroutine: null,
+                                        mode: SelectPermanentEffect.Mode.Custom,
+                                        cardEffect: activateClass);
+
+                                    IEnumerator SelectPermanentCoroutine1(Permanent permanent)
+                                    {
+                                        opponentPermanent = permanent;
+                                        yield return null;
+                                    }
+                                    selectPermanentEffect1.SetUpCustomMessage("Select 1 Digimon to add digivolution source.", "The opponent is selecting 1 Digimon to add digivolution source.");
+
+                                    yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect1.Activate());
+
+                                    #endregion
+
+                                    if (opponentPermanent != null)
+                                    {
+                                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCantUnsuspendUntilOpponentTurnEnd(
+                                            targetPermanent: opponentPermanent,
+                                            activateClass: activateClass
+                                        ));
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+
+            #endregion
+
+            #region When Digivolving
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Place 1 level 5 or lower [Aqua]/[Sea Animal] digimon in sources, 1 digimon or tamer cant suspend", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[When Digivolving] By placing 1 level 5 or lower Digimon card with [Aqua] or [Sea Animal] in any of its traits from your hand as this Digimon's bottom digivolution card, 1 of your opponent's Digimon or Tamers can't suspend until their turn ends.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnField(card)
+                        && CardEffectCommons.HasMatchConditionOwnersHand(card, HandCondition)
+                        && CardEffectCommons.HasMatchConditionOpponentsPermanent(card, PermanentCondition);
+                }
+
+                bool HandCondition(CardSource source)
+                {
+                    return CardEffectCommons.IsExistOnHand(card)
+                        && source.IsDigimon
+                        && source.HasLevel && source.Level <= 5
+                        && (source.HasSeaAnimalTraits || source.HasAquaTraits);
+                }
+
+                bool PermanentCondition(Permanent permanent)
+                {
+                    return CardEffectCommons.IsPermanentExistsOnOpponentBattleArea(permanent, card)
+                        && (permanent.IsDigimon || permanent.IsTamer);
+                }
+
+                bool IsRyugumon(Permanent permanent)
+                {
+                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card)
+                        && permanent == card.PermanentOfThisCard();
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.HasMatchConditionOwnersHand(card, HandCondition) && CardEffectCommons.HasMatchConditionOwnersPermanent(card, IsRyugumon))
+                    {
+                        #region Select Hand Card
+
+                        CardSource selectedCard = null;
+                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionOwnersCardCountInHand(card, HandCondition));
+                        SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
+
+                        selectHandEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: HandCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: maxCount,
+                            canNoSelect: true,
+                            canEndNotMax: false,
+                            isShowOpponent: true,
+                            selectCardCoroutine: SelectCardCoroutine,
+                            afterSelectCardCoroutine: null,
+                            mode: SelectHandEffect.Mode.Custom,
+                            cardEffect: activateClass);
+
+                        IEnumerator SelectCardCoroutine(CardSource cardSource)
+                        {
+                            selectedCard = cardSource;
+                            yield return null;
+                        }
+                        selectHandEffect.SetUpCustomMessage("Select 1 card to add as digivolution card,", "The opponent is selecting 1 card to add as digivolution card,");
+                        selectHandEffect.SetUpCustomMessage_ShowCard("Selected Card");
+                        yield return StartCoroutine(selectHandEffect.Activate());
+
+                        #endregion
+
+                        if (selectedCard != null)
+                        {
+                            #region Select Permanent
+
+                            Permanent selectedPermanent = null;
+                            int maxCount1 = Math.Min(1, CardEffectCommons.MatchConditionOwnersPermanentCount(card, IsRyugumon));
+
+                            SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                            selectPermanentEffect.SetUp(
+                                selectPlayer: card.Owner,
+                                canTargetCondition: IsRyugumon,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                maxCount: maxCount1,
+                                canNoSelect: false,
+                                canEndNotMax: false,
+                                selectPermanentCoroutine: SelectPermanentCoroutine,
+                                afterSelectPermanentCoroutine: null,
+                                mode: SelectPermanentEffect.Mode.Custom,
+                                cardEffect: activateClass);
+
+                            IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                            {
+                                selectedPermanent = permanent;
+                                yield return null;
+                            }
+                            selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to add digivolution source.", "The opponent is selecting 1 Digimon to add digivolution source.");
+
+                            yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                            #endregion
+
+                            if (selectedPermanent != null && selectedCard != null)
+                            {
+                                yield return ContinuousController.instance.StartCoroutine(selectedPermanent.AddDigivolutionCardsBottom(new List<CardSource>() { selectedCard }, activateClass));
+
+                                if (CardEffectCommons.HasMatchConditionOpponentsPermanent(card, PermanentCondition))
+                                {
+                                    #region Select Opponent Permanent
+
+                                    Permanent opponentPermanent = null;
+                                    int maxCount2 = Math.Min(1, CardEffectCommons.MatchConditionOpponentsPermanentCount(card, PermanentCondition));
+
+                                    SelectPermanentEffect selectPermanentEffect1 = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                                    selectPermanentEffect1.SetUp(
+                                        selectPlayer: card.Owner,
+                                        canTargetCondition: PermanentCondition,
+                                        canTargetCondition_ByPreSelecetedList: null,
+                                        canEndSelectCondition: null,
+                                        maxCount: maxCount2,
+                                        canNoSelect: false,
+                                        canEndNotMax: false,
+                                        selectPermanentCoroutine: SelectPermanentCoroutine1,
+                                        afterSelectPermanentCoroutine: null,
+                                        mode: SelectPermanentEffect.Mode.Custom,
+                                        cardEffect: activateClass);
+
+                                    IEnumerator SelectPermanentCoroutine1(Permanent permanent)
+                                    {
+                                        opponentPermanent = permanent;
+                                        yield return null;
+                                    }
+                                    selectPermanentEffect1.SetUpCustomMessage("Select 1 Digimon to add digivolution source.", "The opponent is selecting 1 Digimon to add digivolution source.");
+
+                                    yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect1.Activate());
+
+                                    #endregion
+
+                                    if (opponentPermanent != null)
+                                    {
+                                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCantUnsuspendUntilOpponentTurnEnd(
+                                            targetPermanent: opponentPermanent,
+                                            activateClass: activateClass
+                                        ));
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+
+            #endregion
+
+            #region All Turns
+
+            if (timing == EffectTiming.OnAddDigivolutionCards)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Bottom deck 1 level 5 or lower digimon", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDiscription());
+                activateClass.SetHashString("BT22_027_OnAddDigivolutionCards");
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[All Turns] [Once Per Turn] When effects add to this Digimon's digivolution cards, return 1 of your opponent's level 5 or lower Digimon to the bottom of the deck.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnAddDigivolutionCard(hashtable, IsRyugumon, null, null);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
+                }
+
+                bool IsRyugumon(Permanent permanent)
+                {
+                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card)
+                        && permanent == card.PermanentOfThisCard();
+                }
+
+                bool CanSelectPermanentCondition(Permanent permanent)
+                {
+                    return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card)
+                        && permanent.TopCard.HasLevel && permanent.TopCard.Level <= 5;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    int maxCount = Math.Min(1, CardEffectCommons.MatchConditionOpponentsPermanentCount(card, 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.PutLibraryBottom,
+                        cardEffect: activateClass);
+
+                    selectPermanentEffect.SetUpCustomMessage("Select 1 digimon to bottom deck.", "The opponent is selecting 1 digimon to bottom deck.");
+                    yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                }
+            }
+
+            #endregion
+
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/BT22/Blue/BT22_027.cs.meta

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

+ 420 - 0
Assets/CardEffect/BT22/Blue/BT22_028.cs

@@ -0,0 +1,420 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+// Ariemon
+namespace DCGO.CardEffects.BT22
+{
+    public class BT22_028 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            #region Decode
+
+            if (timing == EffectTiming.WhenRemoveField)
+            {
+                bool SourceCondition(CardSource source)
+                {
+                    return source.IsDigimon
+                    && source.HasLevel && source.Level <= 6
+                    && (source.HasSeaAnimalTraits || source.HasAquaTraits);
+                }
+
+                string[] decodeStrings = { "(Lv.6 or lower w/[Aqua]/[Sea Animal] trait)", "Level 6 or lower Digimon card with [Aqua] or [Sea Animal] " };
+                cardEffects.Add(CardEffectFactory.DecodeSelfEffect(card: card, isInheritedEffect: false, decodeStrings: decodeStrings, sourceCondition: SourceCondition, condition: null));
+            }
+
+            #endregion
+
+            #region Alternate Digivolution
+
+            if (timing == EffectTiming.None)
+            {
+                bool Condition()
+                {
+                    return CardEffectCommons.IsExistOnHand(card) &&
+                           CardEffectCommons.HasMatchConditionOwnersPermanent(card, HasYaoQinglan) &&
+                           CardEffectCommons.HasMatchConditionOwnersPermanent(card, PermanentCondition);
+                }
+
+                bool HasYaoQinglan(Permanent targetPermanent)
+                {
+                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(targetPermanent, card) &&
+                           targetPermanent.TopCard.EqualsCardName("Nokia Shiramine");
+                }
+
+                bool PermanentCondition(Permanent targetPermanent)
+                {
+                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(targetPermanent, card)
+                        && targetPermanent.TopCard.EqualsCardName("MarineBullmon");
+                }
+
+                cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(
+                    permanentCondition: PermanentCondition,
+                    digivolutionCost: 6,
+                    ignoreDigivolutionRequirement: true,
+                    card: card,
+                    condition: Condition)
+                );
+            }
+
+            #endregion
+
+            #region When Digivolving
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Place 1 digimon as bottom source, bottom deck 1 digimon & unsuspend", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[When Digivolving] You may play 1 each of level 3, level 4 and level 5 Digimon cards with [Aqua] or [Sea Animal] in any of their traits from this Digimon's digivolution cards without paying the cost.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnField(card);
+                }
+
+                bool DigimonCondition(int level, CardSource cardSource)
+                {
+                    return CardEffectCommons.CanPlayAsNewPermanent(cardSource, false, activateClass)
+                        && cardSource.IsDigimon
+                        && cardSource.HasLevel && cardSource.Level == level
+                        && (cardSource.HasSeaAnimalTraits || cardSource.HasAquaTraits);
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    List<CardSource> selectedCards = new List<CardSource>();
+                    Permanent thisPermanent = card.PermanentOfThisCard();
+
+                    IEnumerator SelectCardCoroutine(CardSource cardSource)
+                    {
+                        selectedCards.Add(cardSource);
+                        yield return null;
+                    }
+
+                    #region Select Level 3 Digivolution Cards
+
+                    int maxCount = Math.Min(1, thisPermanent.DigivolutionCards.Filter(x => DigimonCondition(3, x)).Count);
+                    SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+
+                    selectCardEffect.SetUp(
+                                canTargetCondition: cs => DigimonCondition(3, cs),
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                canNoSelect: () => false,
+                                selectCardCoroutine: SelectCardCoroutine,
+                                afterSelectCardCoroutine: null,
+                                message: "Select 1 level 3 digivolution card to play.",
+                                maxCount: maxCount,
+                                canEndNotMax: false,
+                                isShowOpponent: true,
+                                mode: SelectCardEffect.Mode.Custom,
+                                root: SelectCardEffect.Root.Custom,
+                                customRootCardList: thisPermanent.DigivolutionCards,
+                                canLookReverseCard: true,
+                                selectPlayer: card.Owner,
+                                cardEffect: activateClass);
+
+                    selectCardEffect.SetUpCustomMessage("Select 1 level 3 digivolution card to play.", "The opponent is selecting 1 level 3 digivolution card to play.");
+
+                    yield return StartCoroutine(selectCardEffect.Activate());
+
+                    #endregion
+
+                    #region Select Level 4 Digivolution Cards
+
+                    int maxCount1 = Math.Min(1, thisPermanent.DigivolutionCards.Filter(x => DigimonCondition(4, x)).Count);
+                    SelectCardEffect selectCardEffect1 = GManager.instance.GetComponent<SelectCardEffect>();
+
+                    selectCardEffect1.SetUp(
+                                canTargetCondition: cs => DigimonCondition(4, cs),
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                canNoSelect: () => false,
+                                selectCardCoroutine: SelectCardCoroutine,
+                                afterSelectCardCoroutine: null,
+                                message: "Select 1 level 4 digivolution card to play.",
+                                maxCount: maxCount1,
+                                canEndNotMax: false,
+                                isShowOpponent: true,
+                                mode: SelectCardEffect.Mode.Custom,
+                                root: SelectCardEffect.Root.Custom,
+                                customRootCardList: thisPermanent.DigivolutionCards,
+                                canLookReverseCard: true,
+                                selectPlayer: card.Owner,
+                                cardEffect: activateClass);
+
+                    selectCardEffect1.SetUpCustomMessage("Select 1 level 4 digivolution card to play.", "The opponent is selecting 1 level 4 digivolution card to play.");
+
+                    yield return StartCoroutine(selectCardEffect1.Activate());
+
+                    #endregion
+
+                    #region Select Level 3 Digivolution Cards
+
+                    int maxCount2 = Math.Min(1, thisPermanent.DigivolutionCards.Filter(x => DigimonCondition(5, x)).Count);
+                    SelectCardEffect selectCardEffect2 = GManager.instance.GetComponent<SelectCardEffect>();
+
+                    selectCardEffect2.SetUp(
+                                canTargetCondition: cs => DigimonCondition(5, cs),
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                canNoSelect: () => false,
+                                selectCardCoroutine: SelectCardCoroutine,
+                                afterSelectCardCoroutine: null,
+                                message: "Select 1 level 5 digivolution card to play.",
+                                maxCount: maxCount2,
+                                canEndNotMax: false,
+                                isShowOpponent: true,
+                                mode: SelectCardEffect.Mode.Custom,
+                                root: SelectCardEffect.Root.Custom,
+                                customRootCardList: thisPermanent.DigivolutionCards,
+                                canLookReverseCard: true,
+                                selectPlayer: card.Owner,
+                                cardEffect: activateClass);
+
+                    selectCardEffect1.SetUpCustomMessage("Select 1 level 5 digivolution card to play.", "The opponent is selecting 1 level 5 digivolution card to play.");
+
+                    yield return StartCoroutine(selectCardEffect1.Activate());
+
+                    #endregion
+
+                    if (selectedCards.Count > 0) yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(cardSources: selectedCards, activateClass: activateClass, payCost: false, isTapped: false, root: SelectCardEffect.Root.DigivolutionCards, activateETB: true));
+                }
+            }
+
+            #endregion
+
+            #region When Digivolving OPT
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Place 1 digimon as bottom source, bottom deck 1 digimon & unsuspend", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, true, EffectDiscription());
+                activateClass.SetHashString("BT22_028_BottomDeck");
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[When Digivolving] [Once Per Turn] By placing 1 of your other Digimon as this Digimon's bottom digivolution card, return 1 of your opponent's Digimon to the bottom of the deck and this Digimon unsuspends.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnField(card)
+                        && CardEffectCommons.HasMatchConditionOwnersPermanent(card, DigimonCondition);
+                }
+
+                bool DigimonCondition(Permanent targetPermanent)
+                {
+                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(targetPermanent, card)
+                        && targetPermanent != card.PermanentOfThisCard();
+                }
+
+                bool OpponentDigimonCondition(Permanent permanent) => CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card);
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, DigimonCondition))
+                    {
+                        Permanent selectedPermanent = null;
+
+                        #region Select Owner Other Permanent
+
+                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionOwnersPermanentCount(card, DigimonCondition));
+
+                        SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: DigimonCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: maxCount,
+                            canNoSelect: false,
+                            canEndNotMax: false,
+                            selectPermanentCoroutine: SelectPermanentCoroutine,
+                            afterSelectPermanentCoroutine: null,
+                            mode: SelectPermanentEffect.Mode.Custom,
+                            cardEffect: activateClass);
+
+                        IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                        {
+                            selectedPermanent = permanent;
+                            yield return null;
+                        }
+                        selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to add digivolution source.", "The opponent is selecting 1 Digimon to add digivolution source.");
+
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                        #endregion
+
+                        if (selectedPermanent != null)
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(new IPlacePermanentToDigivolutionCards(new List<Permanent[]>() { new Permanent[] { selectedPermanent, card.PermanentOfThisCard() } }, false, activateClass).PlacePermanentToDigivolutionCards());
+
+                            #region Bottom Deck Opponent Digimon
+
+                            if (CardEffectCommons.HasMatchConditionOpponentsPermanent(card, OpponentDigimonCondition))
+                            {
+                                int maxCount1 = Math.Min(1, CardEffectCommons.MatchConditionOpponentsPermanentCount(card, OpponentDigimonCondition));
+                                SelectPermanentEffect selectPermanentEffect1 = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                                selectPermanentEffect1.SetUp(
+                                    selectPlayer: card.Owner,
+                                    canTargetCondition: OpponentDigimonCondition,
+                                    canTargetCondition_ByPreSelecetedList: null,
+                                    canEndSelectCondition: null,
+                                    maxCount: maxCount1,
+                                    canNoSelect: false,
+                                    canEndNotMax: false,
+                                    selectPermanentCoroutine: null,
+                                    afterSelectPermanentCoroutine: null,
+                                    mode: SelectPermanentEffect.Mode.PutLibraryBottom,
+                                    cardEffect: activateClass);
+
+                                selectPermanentEffect1.SetUpCustomMessage("Select 1 digimon to bottom deck.", "The opponent is selecting a digimon to bottom deck.");
+                                yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect1.Activate());
+                            }
+
+                            #endregion
+
+                            yield return ContinuousController.instance.StartCoroutine(new IUnsuspendPermanents(new List<Permanent>() { card.PermanentOfThisCard() }, activateClass).Unsuspend());
+                        }
+                    }
+                }
+            }
+
+            #endregion
+
+            #region When Attacking OPT
+
+            if (timing == EffectTiming.OnAllyAttack)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Place 1 digimon as bottom source, bottom deck 1 digimon & unsuspend", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, true, EffectDiscription());
+                activateClass.SetHashString("BT22_028_BottomDeck");
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[When Attacking] [Once Per Turn] By placing 1 of your other Digimon as this Digimon's bottom digivolution card, return 1 of your opponent's Digimon to the bottom of the deck and this Digimon unsuspends.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnAttack(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnField(card)
+                        && CardEffectCommons.HasMatchConditionOwnersPermanent(card, DigimonCondition);
+                }
+
+                bool DigimonCondition(Permanent targetPermanent)
+                {
+                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(targetPermanent, card)
+                        && targetPermanent != card.PermanentOfThisCard();
+                }
+
+                bool OpponentDigimonCondition(Permanent permanent) => CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card);
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, DigimonCondition))
+                    {
+                        Permanent selectedPermanent = null;
+
+                        #region Select Owner Other Permanent
+
+                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionOwnersPermanentCount(card, DigimonCondition));
+
+                        SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: DigimonCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: maxCount,
+                            canNoSelect: false,
+                            canEndNotMax: false,
+                            selectPermanentCoroutine: SelectPermanentCoroutine,
+                            afterSelectPermanentCoroutine: null,
+                            mode: SelectPermanentEffect.Mode.Custom,
+                            cardEffect: activateClass);
+
+                        IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                        {
+                            selectedPermanent = permanent;
+                            yield return null;
+                        }
+                        selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to add digivolution source.", "The opponent is selecting 1 Digimon to add digivolution source.");
+
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                        #endregion
+
+                        if (selectedPermanent != null)
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(new IPlacePermanentToDigivolutionCards(new List<Permanent[]>() { new Permanent[] { selectedPermanent, card.PermanentOfThisCard() } }, false, activateClass).PlacePermanentToDigivolutionCards());
+
+                            #region Bottom Deck Opponent Digimon
+
+                            if (CardEffectCommons.HasMatchConditionOpponentsPermanent(card, OpponentDigimonCondition))
+                            {
+                                int maxCount1 = Math.Min(1, CardEffectCommons.MatchConditionOpponentsPermanentCount(card, OpponentDigimonCondition));
+                                SelectPermanentEffect selectPermanentEffect1 = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                                selectPermanentEffect1.SetUp(
+                                    selectPlayer: card.Owner,
+                                    canTargetCondition: OpponentDigimonCondition,
+                                    canTargetCondition_ByPreSelecetedList: null,
+                                    canEndSelectCondition: null,
+                                    maxCount: maxCount1,
+                                    canNoSelect: false,
+                                    canEndNotMax: false,
+                                    selectPermanentCoroutine: null,
+                                    afterSelectPermanentCoroutine: null,
+                                    mode: SelectPermanentEffect.Mode.PutLibraryBottom,
+                                    cardEffect: activateClass);
+
+                                selectPermanentEffect1.SetUpCustomMessage("Select 1 digimon to bottom deck.", "The opponent is selecting a digimon to bottom deck.");
+                                yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect1.Activate());
+                            }
+
+                            #endregion
+
+                            yield return ContinuousController.instance.StartCoroutine(new IUnsuspendPermanents(new List<Permanent>() { card.PermanentOfThisCard() }, activateClass).Unsuspend());
+                        }
+                    }
+                }
+            }
+
+            #endregion
+
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/BT22/Blue/BT22_028.cs.meta

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

+ 191 - 0
Assets/CardEffect/BT22/Blue/BT22_085.cs

@@ -0,0 +1,191 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+// Rina Shinomiya
+namespace DCGO.CardEffects.BT22
+{
+    public class BT22_085 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            #region 3 Memory Setter
+
+            if (timing == EffectTiming.OnStartTurn)
+            {
+                cardEffects.Add(CardEffectFactory.SetMemoryTo3TamerEffect(card));
+            }
+
+            #endregion
+
+            #region On Play
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("1 digimon with [Veedramon] in name gains +3k DP ", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[On Play] 1 of your Digimon with [Veedramon] in its name gets +3000 DP until your opponent's turn ends.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnField(card)
+                        && CardEffectCommons.HasMatchConditionOwnersPermanent(card, IsVeedramonInName);
+                }
+
+                bool IsVeedramonInName(Permanent permanent)
+                {
+                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card)
+                        && permanent.TopCard.ContainsCardName("Veedramon");
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, IsVeedramonInName))
+                    {
+                        Permanent selectedPermanent = null;
+
+                        #region Select Permanent
+
+                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionOwnersPermanentCount(card, IsVeedramonInName));
+
+                        SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: IsVeedramonInName,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: maxCount,
+                            canNoSelect: false,
+                            canEndNotMax: false,
+                            selectPermanentCoroutine: SelectPermanentCoroutine,
+                            afterSelectPermanentCoroutine: null,
+                            mode: SelectPermanentEffect.Mode.Custom,
+                            cardEffect: activateClass);
+
+                        IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                        {
+                            selectedPermanent = permanent;
+                            yield return null;
+                        }
+                        selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to gain +3K DP.", "The opponent is selecting 1 Digimon to gain +3K DP.");
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                        #endregion
+
+                        if (selectedPermanent != null) yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ChangeDigimonDP(targetPermanent: selectedPermanent, changeValue: 3000, effectDuration: EffectDuration.UntilEachTurnEnd, activateClass: activateClass));
+                    }
+                }
+            }
+
+            #endregion
+
+            #region Your Turn
+
+            if (timing == EffectTiming.OnAllyAttack)
+            {
+                Permanent attackingVeedraInName = null;
+
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Bounce this tamer to hand, give attacking digimon <Jamming>", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[Your Turn] When one of your Digimon with [Veedramon] in its name attacks, by returning this Tamer to the hand, that Digimon gains <Jamming> for the turn. (This Digimon can't be deleted in battles against Security Digimon.)";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnPermanentAttack(hashtable, PermanentAttackCondition);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnField(card)
+                        && CardEffectCommons.IsOwnerTurn(card);
+                }
+
+                bool PermanentAttackCondition(Permanent permanent)
+                {
+                    if (IsVeedramonInName(permanent))
+                    {
+                        attackingVeedraInName = permanent;
+                        return true;
+                    }
+                    return false;
+                }
+
+                bool IsVeedramonInName(Permanent permanent)
+                {
+                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card)
+                        && permanent.TopCard.ContainsCardName("Veedramon");
+                }
+
+                bool BounceTamerCondition(Permanent permanent)
+                {
+                    return CardEffectCommons.IsPermanentExistsOnOpponentBattleArea(permanent, card)
+                        && permanent == card.PermanentOfThisCard();
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    #region Bounce digimon to hand
+
+                    int maxCount = Math.Min(1, CardEffectCommons.MatchConditionOwnersPermanentCount(card, BounceTamerCondition));
+                    SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                    selectPermanentEffect.SetUp(
+                        selectPlayer: card.Owner,
+                        canTargetCondition: BounceTamerCondition,
+                        canTargetCondition_ByPreSelecetedList: null,
+                        canEndSelectCondition: null,
+                        maxCount: maxCount,
+                        canNoSelect: false,
+                        canEndNotMax: false,
+                        selectPermanentCoroutine: null,
+                        afterSelectPermanentCoroutine: null,
+                        mode: SelectPermanentEffect.Mode.Bounce,
+                        cardEffect: activateClass);
+
+                    selectPermanentEffect.SetUpCustomMessage("Select 1 tamer to bounce to hand.", "The opponent is selecting a tamer to bounce to hand.");
+                    yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                    #endregion
+
+                    if (!CardEffectCommons.IsPermanentExistsOnOpponentBattleArea(card.PermanentOfThisCard(), card) && attackingVeedraInName != null)
+                    {
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainJamming(attackingVeedraInName, EffectDuration.UntilEachTurnEnd, activateClass));
+                    }
+                }
+            }
+
+            #endregion
+
+            #region Security
+
+            if (timing == EffectTiming.SecuritySkill)
+            {
+                cardEffects.Add(CardEffectFactory.PlaySelfTamerSecurityEffect(card));
+            }
+
+            #endregion
+
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/BT22/Blue/BT22_085.cs.meta

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

+ 229 - 0
Assets/CardEffect/BT22/Blue/BT22_086.cs

@@ -0,0 +1,229 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+// Yao Qinglan
+namespace DCGO.CardEffects.BT22
+{
+    public class BT22_086 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            #region Start of Your Main Phase
+
+            if (timing == EffectTiming.OnStartMainPhase)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Bottom deck this tamer, play 1 [Yao Qinglan] from hand, Then if no digimon play 1 [Sangomon] from trash", null, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[Start of Your Main Phase] By returning this Tamer to the bottom of the deck, you may play 1 [Yao Qinglan] from your hand without paying the cost. Then, if you don't have a Digimon, you may play 1 [Sangomon] from your trash without paying the cost.";
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnField(card)
+                        && CardEffectCommons.IsOwnerTurn(card);
+                }
+
+                bool BottomDeckCondition(Permanent permanent)
+                {
+                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(permanent, card)
+                        && permanent == card.PermanentOfThisCard();
+                }
+
+                bool IsYaoQinglan(CardSource cardSource)
+                {
+                    return CardEffectCommons.IsExistOnHand(cardSource)
+                        && CardEffectCommons.CanPlayAsNewPermanent(cardSource, false, activateClass)
+                        && cardSource.EqualsCardName("Yao Qinglan");
+                }
+
+                bool IsSangomon(CardSource cardSource)
+                {
+                    return CardEffectCommons.IsExistOnTrash(cardSource)
+                        && CardEffectCommons.CanPlayAsNewPermanent(cardSource, false, activateClass)
+                        && cardSource.EqualsCardName("Sangomon");
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    #region Bottom Deck Yao Qinglan
+
+                    int maxCount = Math.Min(1, CardEffectCommons.MatchConditionOwnersPermanentCount(card, BottomDeckCondition));
+                    SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                    selectPermanentEffect.SetUp(
+                        selectPlayer: card.Owner,
+                        canTargetCondition: BottomDeckCondition,
+                        canTargetCondition_ByPreSelecetedList: null,
+                        canEndSelectCondition: null,
+                        maxCount: maxCount,
+                        canNoSelect: false,
+                        canEndNotMax: false,
+                        selectPermanentCoroutine: null,
+                        afterSelectPermanentCoroutine: null,
+                        mode: SelectPermanentEffect.Mode.PutLibraryBottom,
+                        cardEffect: activateClass);
+
+                    selectPermanentEffect.SetUpCustomMessage("Select 1 tamer to bottom deck.", "The opponent is selecting a tamer to bottom deck.");
+                    yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                    #endregion
+
+                    if (!CardEffectCommons.IsExistOnField(card))
+                    {
+                        if (CardEffectCommons.HasMatchConditionOwnersHand(card, IsYaoQinglan))
+                        {
+                            #region Play Yao Qinglan
+
+                            CardSource yaoQinglan = null;
+                            int maxCount1 = Math.Min(1, CardEffectCommons.MatchConditionOwnersCardCountInHand(card, IsYaoQinglan));
+
+                            SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
+                            selectHandEffect.SetUp(
+                                selectPlayer: card.Owner,
+                                canTargetCondition: IsYaoQinglan,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                maxCount: maxCount1,
+                                canNoSelect: true,
+                                canEndNotMax: false,
+                                isShowOpponent: true,
+                                selectCardCoroutine: SelectCardCoroutine,
+                                afterSelectCardCoroutine: null,
+                                mode: SelectHandEffect.Mode.Custom,
+                                cardEffect: activateClass);
+
+                            IEnumerator SelectCardCoroutine(CardSource cardSource)
+                            {
+                                yaoQinglan = cardSource;
+                                yield return null;
+                            }
+
+                            selectHandEffect.SetUpCustomMessage("Select 1 [Yao Qinglan] to play.", "The opponent is selecting 1 [Yao Qinglan] to play.");
+                            selectHandEffect.SetUpCustomMessage_ShowCard("Played Card");
+
+                            yield return StartCoroutine(selectHandEffect.Activate());
+
+                            if (yaoQinglan != null) yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(
+                                cardSources: new List<CardSource>() { yaoQinglan },
+                                activateClass: activateClass,
+                                payCost: false,
+                                isTapped: false,
+                                root: SelectCardEffect.Root.Hand,
+                                activateETB: true
+                            ));
+
+                            #endregion
+                        }
+
+                        if (card.Owner.GetBattleAreaDigimons().Count == 0 && CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, IsSangomon))
+                        {
+                            #region Play Sangomon From Trash
+
+                            CardSource sangomon = null;
+                            int maxCount2 = Math.Min(1, CardEffectCommons.MatchConditionOwnersCardCountInTrash(card, IsSangomon));
+                            SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+                            selectCardEffect.SetUp(
+                                        canTargetCondition: IsSangomon,
+                                        canTargetCondition_ByPreSelecetedList: null,
+                                        canEndSelectCondition: null,
+                                        canNoSelect: () => false,
+                                        selectCardCoroutine: SelectCardCoroutine1,
+                                        afterSelectCardCoroutine: null,
+                                        message: "Select 1 [Sangomon] to play",
+                                        maxCount: maxCount2,
+                                        canEndNotMax: false,
+                                        isShowOpponent: true,
+                                        mode: SelectCardEffect.Mode.Custom,
+                                        root: SelectCardEffect.Root.Trash,
+                                        customRootCardList: null,
+                                        canLookReverseCard: true,
+                                        selectPlayer: card.Owner,
+                                        cardEffect: activateClass);
+
+                            IEnumerator SelectCardCoroutine1(CardSource cardSource)
+                            {
+                                sangomon = cardSource;
+                                yield return null;
+                            }
+
+                            selectCardEffect.SetUpCustomMessage("Select 1 [Sangomon] to play", "The opponent is selecting 1 [Sangomon] to play.");
+                            yield return StartCoroutine(selectCardEffect.Activate());
+
+                            if (sangomon != null) yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(
+                                cardSources: new List<CardSource>() { sangomon },
+                                activateClass: activateClass,
+                                payCost: false,
+                                isTapped: false,
+                                root: SelectCardEffect.Root.Trash,
+                                activateETB: true
+                            ));
+
+                            #endregion
+                        }
+                    }
+                }
+            }
+
+            #endregion
+
+            #region All Turns
+
+            if (timing == EffectTiming.OnAddDigivolutionCards)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Suspend tamer, Draw 1", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[All Turns] When effects add digivolution cards to any of your Digimon with [Aqua] or [Sea Animal] in any of their traits, by suspending this Tamer, <Draw 1> (Draw 1 card from your deck.)";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnAddDigivolutionCard(hashtable, IsAquaOrSeaAnimalTrait, null, null);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnField(card)
+                        && CardEffectCommons.CanActivateSuspendCostEffect(card);
+                }
+
+                bool IsAquaOrSeaAnimalTrait(Permanent permanent)
+                {
+                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card)
+                        && (permanent.TopCard.HasAquaTraits || permanent.TopCard.HasSeaAnimalTraits);
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    yield return ContinuousController.instance.StartCoroutine(new SuspendPermanentsClass(new List<Permanent>() { card.PermanentOfThisCard() }, hashtable).Tap());
+                    if (card.PermanentOfThisCard().IsSuspended) yield return ContinuousController.instance.StartCoroutine(new DrawClass(card.Owner, 1, activateClass).Draw());
+                }
+            }
+
+            #endregion
+
+            #region Security
+
+            if (timing == EffectTiming.SecuritySkill)
+            {
+                cardEffects.Add(CardEffectFactory.PlaySelfTamerSecurityEffect(card));
+            }
+
+            #endregion
+
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/BT22/Blue/BT22_086.cs.meta

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

+ 293 - 0
Assets/CardEffect/BT22/Blue/BT22_096.cs

@@ -0,0 +1,293 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+// Unique Emblem: Poseidia Lagoon
+namespace DCGO.CardEffects.BT22
+{
+    public class BT22_096 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            #region Shared Main/Security
+
+            IEnumerator SharedActivateCoroutine(Hashtable hashtable, ActivateClass activateClass)
+            {
+                bool IsYaoQinglanOrSangomon(CardSource cardSource)
+                {
+                    return cardSource.EqualsCardName("Sangomon") || cardSource.EqualsCardName("Yao Qinglan");
+                }
+
+                bool canSelectHand = CardEffectCommons.HasMatchConditionOwnersHand(card, IsYaoQinglanOrSangomon);
+                bool canSelectTrash = CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, IsYaoQinglanOrSangomon);
+
+                if (canSelectHand || canSelectTrash)
+                {
+                    #region Option Selection
+
+                    if (canSelectHand && canSelectTrash)
+                    {
+                        List<SelectionElement<bool>> selectionElements = new List<SelectionElement<bool>>()
+                        {
+                            new SelectionElement<bool>(message: $"From hand", value : true, spriteIndex: 0),
+                            new SelectionElement<bool>(message: $"From trash", value : false, spriteIndex: 1),
+                        };
+
+                        string selectPlayerMessage = "From which area do you select a card?";
+                        string notSelectPlayerMessage = "The opponent is choosing from which area to select a card.";
+
+                        GManager.instance.userSelectionManager.SetBoolSelection(selectionElements: selectionElements, selectPlayer: card.Owner, selectPlayerMessage: selectPlayerMessage, notSelectPlayerMessage: notSelectPlayerMessage);
+                    }
+                    else
+                    {
+                        GManager.instance.userSelectionManager.SetBool(canSelectHand);
+                    }
+
+                    yield return ContinuousController.instance.StartCoroutine(GManager.instance.userSelectionManager.WaitForEndSelect());
+
+                    #endregion
+
+                    bool fromHand = GManager.instance.userSelectionManager.SelectedBoolValue;
+
+                    CardSource selectedCard = null;
+                    IEnumerator SelectCardCoroutine(CardSource cardSource)
+                    {
+                        selectedCard = cardSource;
+                        yield return null;
+                    }
+
+                    if (fromHand)
+                    {
+                        #region Play from Hand
+
+                        SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
+
+                        selectHandEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: IsYaoQinglanOrSangomon,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: 1,
+                            canNoSelect: true,
+                            canEndNotMax: false,
+                            isShowOpponent: true,
+                            selectCardCoroutine: SelectCardCoroutine,
+                            afterSelectCardCoroutine: null,
+                            mode: SelectHandEffect.Mode.Custom,
+                            cardEffect: activateClass);
+
+                        selectHandEffect.SetUpCustomMessage("Select 1 card to add as source.", "The opponent is selecting 1 card to add as source.");
+                        yield return StartCoroutine(selectHandEffect.Activate());
+
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(new List<CardSource>() { selectedCard }, activateClass, false, false, SelectCardEffect.Root.Hand, true));
+
+                        #endregion
+                    }
+                    if (!fromHand)
+                    {
+                        #region Play from Trash
+
+                        SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+
+                        selectCardEffect.SetUp(
+                            canTargetCondition: IsYaoQinglanOrSangomon,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            canNoSelect: () => true,
+                            selectCardCoroutine: SelectCardCoroutine,
+                            afterSelectCardCoroutine: null,
+                            message: "Select 1 card to add as source.",
+                            maxCount: 1,
+                            canEndNotMax: false,
+                            isShowOpponent: true,
+                            mode: SelectCardEffect.Mode.Custom,
+                            root: SelectCardEffect.Root.Trash,
+                            customRootCardList: null,
+                            canLookReverseCard: true,
+                            selectPlayer: card.Owner,
+                            cardEffect: activateClass);
+
+                        selectCardEffect.SetUpCustomMessage("Select 1 card to add as source.", "The opponent is selecting 1 card to add as source.");
+
+                        yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(new List<CardSource>() { selectedCard }, activateClass, false, false, SelectCardEffect.Root.Trash, true));
+
+                        #endregion
+                    }
+                }
+            }
+
+            #endregion
+
+            #region Main
+
+            if (timing == EffectTiming.OptionSkill)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Play 1 [Sangomon] or [Yao Qinglan] from hand or trash", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[Main] You may play 1 [Sangomon] or [Yao Qinglan] from your hand or trash without paying the cost. Then, place this card in the battle area.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOptionMainEffect(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnHand(card)
+                        && CardEffectCommons.IsOwnerTurn(card);
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    yield return SharedActivateCoroutine(hashtable, activateClass);
+                }
+            }
+
+            #endregion
+
+            #region Delay
+
+            if (timing == EffectTiming.OnUnTappedAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Digiolve 1 [Aqua]/[Sea Animal] digimon into a [Aquatic]/[Liberator] digimon in your hand for 3 reduced cost", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[Your Turn] When any of your [Yao Qinglan] suspend, <Delay> (By trashing this card after the placing turn, activate the effect below.). 1 of your Digimon with [Aqua] or [Sea Animal] in any of its traits may digivolve into an [Aquatic] and [LIBERATOR] trait Digimon card in the hand with the digivolution cost reduced by 3.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanDeclareOptionDelayEffect(card)
+                        && CardEffectCommons.CanTriggerWhenPermanentSuspends(hashtable, IsYaoQinglan);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnField(card);
+                }
+
+                bool IsYaoQinglan(Permanent permanent)
+                {
+                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(permanent, card)
+                        && permanent.TopCard.EqualsCardName("Yao Qinglan");
+                }
+
+                bool IsAquaOrSeaAnimal(Permanent permanent)
+                {
+                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(permanent, card)
+                        && (permanent.TopCard.HasAquaTraits || permanent.TopCard.HasSeaAnimalTraits);
+                }
+
+                bool IsAquaticOrLiberator(CardSource cardSource, Permanent permanent)
+                {
+                    return CardEffectCommons.IsExistOnHand(cardSource)
+                        && cardSource.CanPlayCardTargetFrame(permanent.PermanentFrame, true, activateClass)
+                        && cardSource.HasAquaticTraits || cardSource.HasLiberatorTraits;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, IsAquaOrSeaAnimal))
+                    {
+                        Permanent selectedPermanent = null;
+
+                        #region Select [Aqua]/[Sea Animal] Permanent
+
+                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionOwnersPermanentCount(card, IsAquaOrSeaAnimal));
+
+                        SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: IsAquaOrSeaAnimal,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: maxCount,
+                            canNoSelect: false,
+                            canEndNotMax: false,
+                            selectPermanentCoroutine: SelectPermanentCoroutine,
+                            afterSelectPermanentCoroutine: null,
+                            mode: SelectPermanentEffect.Mode.Custom,
+                            cardEffect: activateClass);
+
+                        IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                        {
+                            selectedPermanent = permanent;
+                            yield return null;
+                        }
+
+                        selectPermanentEffect.SetUpCustomMessage("Select 1 [Aqua]/[Sea Animal] to digivolve.", "The opponent is selecting 1 [Aqua]/[Sea Animal] to digivolve.");
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                        #endregion
+
+                        if (selectedPermanent != null)
+                        {
+                            #region Digivolve into [Aquatic/LIBERATOR] Digimon
+
+                            yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.DigivolveIntoHandOrTrashCard(
+                                selectedPermanent,
+                                digivolvingCard => IsAquaticOrLiberator(digivolvingCard, selectedPermanent),
+                                payCost: true,
+                                reduceCostTuple: (reduceCost: 3, reduceCostCardCondition: null),
+                                fixedCostTuple: null,
+                                ignoreDigivolutionRequirementFixedCost: -1,
+                                isHand: true,
+                                activateClass: activateClass,
+                                successProcess: null
+                            ));
+
+                            #endregion
+                        }
+                    }
+
+                    yield return null;
+                }
+            }
+
+            #endregion
+
+            #region Security
+
+            if (timing == EffectTiming.SecuritySkill)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Play 1 [Sangomon] or [Yao Qinglan] from hand or trash", null, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[Security] Activate this card's [Main] effects.";
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerSecurityEffect(hashtable, card);
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    yield return SharedActivateCoroutine(hashtable, activateClass);
+                }
+            }
+
+            #endregion
+
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/BT22/Blue/BT22_096.cs.meta

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

+ 24 - 0
Assets/Scripts/CardSource.cs

@@ -3453,6 +3453,30 @@ public class CardSource : MonoBehaviour
     }
 
     #endregion
+
+    #region whether this card has "Aquatic" trait
+
+    public bool HasAquaticTraits
+    {
+        get
+        {
+            return EqualsTraits("Aquatic");
+        }
+    }
+
+    #endregion
+
+    #region whether this card has "LIBERATOR" trait
+
+    public bool HasLiberatorTraits
+    {
+        get
+        {
+            return EqualsTraits("LIBERATOR");
+        }
+    }
+
+    #endregion
 }
 
 public class JogressCondition