Andrej Erdelsky 2 лет назад
Родитель
Сommit
bbc32355e7

+ 464 - 0
Assets/CardEffect/BT17/Blue/AncientGarurumon_BT17_028.cs

@@ -0,0 +1,464 @@
+using System.Collections;
+using System.Collections.Generic;
+using System;
+using System.Linq;
+
+namespace DCGO.CardEffects.BT17
+{
+    public class AncientGarurumon_BT17_028 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            #region DigiXros
+
+            if (timing == EffectTiming.None)
+            {
+                AddDigiXrosConditionClass addDigiXrosConditionClass = new AddDigiXrosConditionClass();
+                addDigiXrosConditionClass.SetUpICardEffect($"DigiXros -3", CanUseCondition, card);
+                addDigiXrosConditionClass.SetUpAddDigiXrosConditionClass(getDigiXrosCondition: GetDigiXros);
+                addDigiXrosConditionClass.SetNotShowUI(true);
+                cardEffects.Add(addDigiXrosConditionClass);
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return true;
+                }
+
+                DigiXrosCondition GetDigiXros(CardSource cardSource)
+                {
+                    if (cardSource == card)
+                    {
+                        DigiXrosConditionElement elementLobomon =
+                            new DigiXrosConditionElement(CanSelectCardConditionLobomon, "Lobomon");
+
+                        bool CanSelectCardConditionLobomon(CardSource conditionCardSource)
+                        {
+                            if (conditionCardSource != null)
+                            {
+                                if (conditionCardSource.Owner == card.Owner)
+                                {
+                                    if (conditionCardSource.IsDigimon)
+                                    {
+                                        if (conditionCardSource.CardNames_DigiXros.Contains("Lobomon"))
+                                        {
+                                            return true;
+                                        }
+                                    }
+                                }
+                            }
+
+                            return false;
+                        }
+
+                        DigiXrosConditionElement elementKendoGarurumon =
+                            new DigiXrosConditionElement(CanSelectCardConditionKendoGarurumon, "KendoGarurumon");
+
+                        bool CanSelectCardConditionKendoGarurumon(CardSource conditionCardSource)
+                        {
+                            if (conditionCardSource != null)
+                            {
+                                if (conditionCardSource.Owner == card.Owner)
+                                {
+                                    if (conditionCardSource.IsDigimon)
+                                    {
+                                        if (conditionCardSource.CardNames_DigiXros.Contains("KendoGarurumon"))
+                                        {
+                                            return true;
+                                        }
+                                    }
+                                }
+                            }
+
+                            return false;
+                        }
+
+                        List<DigiXrosConditionElement> elements = new List<DigiXrosConditionElement>()
+                            { elementLobomon, elementKendoGarurumon };
+
+                        DigiXrosCondition digiXrosCondition = new DigiXrosCondition(elements, null, 3);
+
+                        return digiXrosCondition;
+                    }
+
+                    return null;
+                }
+            }
+
+            #endregion
+
+            #region On Play
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Return 1 of your opponent's Digimon to hand", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDescription());
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[On Play] Return 1 of your opponent's Digimon with the lowest level to the hand.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
+                }
+
+                bool CanSelectPermanentCondition(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
+                    {
+                        if (CardEffectCommons.IsMinLevel(permanent, card.Owner.Enemy))
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                    {
+                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
+
+                        SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectPermanentCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: maxCount,
+                            canNoSelect: false,
+                            canEndNotMax: false,
+                            selectPermanentCoroutine: null,
+                            afterSelectPermanentCoroutine: null,
+                            mode: SelectPermanentEffect.Mode.Bounce,
+                            cardEffect: activateClass);
+
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                    }
+                }
+            }
+
+            #endregion
+            
+            #region When Digivolving
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Return 1 of your opponent's Digimon to hand", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDescription());
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[When Digivolving] Return 1 of your opponent's Digimon with the lowest level to the hand.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                }
+
+                bool CanSelectPermanentCondition(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
+                    {
+                        if (CardEffectCommons.IsMinLevel(permanent, card.Owner.Enemy))
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                    {
+                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
+
+                        SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectPermanentCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: maxCount,
+                            canNoSelect: false,
+                            canEndNotMax: false,
+                            selectPermanentCoroutine: null,
+                            afterSelectPermanentCoroutine: null,
+                            mode: SelectPermanentEffect.Mode.Bounce,
+                            cardEffect: activateClass);
+
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                    }
+                }
+            }
+
+            #endregion
+
+            #region Your Turn
+
+            if (timing == EffectTiming.OnAddHand)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Your opponent adds the top card of their security stack to the hand", CanUseCondition,
+                    card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDescription());
+                activateClass.SetHashString("AddOpponentSecurityToHand_BT17_028");
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[Your Turn] [Once Per Turn] When an effect adds cards to your or your opponent's hand, your opponent adds the top card of their security stack to the hand.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        return CardEffectCommons.CanTriggerWhenAddHand(hashtable,
+                            player => player == card.Owner || player == card.Owner.Enemy,
+                            cardEffect => cardEffect != null);
+                    }
+
+                    return false;
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        return card.Owner.Enemy.SecurityCards.Count >= 1;
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (card.Owner.Enemy.SecurityCards.Count >= 1)
+                    {
+                        CardSource topCard = card.Owner.Enemy.SecurityCards[0];
+
+                        yield return ContinuousController.instance.StartCoroutine(
+                            CardObjectController.AddHandCards(new List<CardSource>() { topCard }, false, activateClass));
+
+                        yield return ContinuousController.instance.StartCoroutine(new IReduceSecurity(
+                            player: card.Owner.Enemy,
+                            refSkillInfos: ref ContinuousController.instance.nullSkillInfos).ReduceSecurity());
+                    }
+                }
+            }
+
+            #endregion
+
+            #region On Deletion
+
+            if (timing == EffectTiming.OnDestroyedAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect(
+                    "Return 1 Tamer card and 1 Hybrid trait Digimon card from trash to hand, then play 1 Tamer from hand", CanUseCondition,
+                    card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDescription());
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[On Deletion] You may return 1 Tamer card and 1 [Hybrid] trait Digimon card from your trash to the hand. Then, you may play 1 Tamer card from your hand without paying the cost.";
+                }
+
+                bool IsTamerCardCondition(CardSource cardSource)
+                {
+                    return cardSource.IsTamer;
+                }
+
+                bool IsHybridDigimonCardCondition(CardSource cardSource)
+                {
+                    return cardSource.IsDigimon && cardSource.ContainsTraits("Hybrid");
+                }
+
+                bool CanSelectHandTamerCardCondition(CardSource cardSource)
+                {
+                    if (cardSource.IsTamer)
+                    {
+                        if (CardEffectCommons.CanPlayAsNewPermanent(cardSource: cardSource, payCost: false, cardEffect: activateClass))
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnDeletion(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnTrash(card))
+                    {
+                        if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, IsTamerCardCondition))
+                        {
+                            return true;
+                        }
+
+                        if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, IsHybridDigimonCardCondition))
+                        {
+                            return true;
+                        }
+
+                        if (card.Owner.HandCards.Count(CanSelectHandTamerCardCondition) >= 1)
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, IsTamerCardCondition))
+                    {
+                        int maxCount = Math.Min(1, card.Owner.TrashCards.Count(IsTamerCardCondition));
+
+                        SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+
+                        selectCardEffect.SetUp(
+                            canTargetCondition: IsTamerCardCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            canNoSelect: () => false,
+                            selectCardCoroutine: null,
+                            afterSelectCardCoroutine: null,
+                            message: "Select 1 Tamer card to add to your hand.",
+                            maxCount: maxCount,
+                            canEndNotMax: false,
+                            isShowOpponent: true,
+                            mode: SelectCardEffect.Mode.AddHand,
+                            root: SelectCardEffect.Root.Trash,
+                            customRootCardList: null,
+                            canLookReverseCard: true,
+                            selectPlayer: card.Owner,
+                            cardEffect: activateClass);
+
+                        yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
+                    }
+
+                    if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, IsHybridDigimonCardCondition))
+                    {
+                        int maxCount = Math.Min(1, card.Owner.TrashCards.Count(IsHybridDigimonCardCondition));
+
+                        SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+
+                        selectCardEffect.SetUp(
+                            canTargetCondition: IsHybridDigimonCardCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            canNoSelect: () => false,
+                            selectCardCoroutine: null,
+                            afterSelectCardCoroutine: null,
+                            message: "Select 1 Hybrid Digimon card to add to your hand.",
+                            maxCount: maxCount,
+                            canEndNotMax: false,
+                            isShowOpponent: true,
+                            mode: SelectCardEffect.Mode.AddHand,
+                            root: SelectCardEffect.Root.Trash,
+                            customRootCardList: null,
+                            canLookReverseCard: true,
+                            selectPlayer: card.Owner,
+                            cardEffect: activateClass);
+
+                        yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
+                    }
+
+                    if (card.Owner.HandCards.Count(CanSelectHandTamerCardCondition) >= 1)
+                    {
+                        List<CardSource> selectedCards = new List<CardSource>();
+
+                        SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
+
+                        selectHandEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectHandTamerCardCondition,
+                            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 Tamer card to play.",
+                            "The opponent is selecting 1 Tamer card to play.");
+                        selectHandEffect.SetUpCustomMessage_ShowCard("Played Card");
+
+                        yield return StartCoroutine(selectHandEffect.Activate());
+
+                        IEnumerator SelectCardCoroutine(CardSource cardSource)
+                        {
+                            selectedCards.Add(cardSource);
+                            yield return null;
+                        }
+
+                        yield return ContinuousController.instance.StartCoroutine(
+                            CardEffectCommons.PlayPermanentCards(cardSources: selectedCards, activateClass: activateClass,
+                                payCost: false, isTapped: false, root: SelectCardEffect.Root.Hand, activateETB: true));
+                    }
+                }
+            }
+
+            #endregion
+
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/BT17/Blue/AncientGarurumon_BT17_028.cs.meta

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

+ 633 - 0
Assets/CardEffect/BT17/Blue/Beowolfmon_BT17_026.cs

@@ -0,0 +1,633 @@
+using System.Collections;
+using System.Collections.Generic;
+using System;
+using System.Linq;
+
+namespace DCGO.CardEffects.BT17
+{
+    public class Beowolfmon_BT17_026 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            #region Hand - Main
+
+            if (timing == EffectTiming.OnDeclaration)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Your [Koji Minamoto] digivolves into this card", CanUseCondition,
+                    card);
+                activateClass.SetUpActivateClass(null, ActivateCoroutine, -1, false, EffectDescription());
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[Hand] [Main] By placing 1 [Lobomon] and [KendoGarurumon] from your trash under 1 of your [Koji Minamoto]s, digivolve it into this card as if that card is a level 4 blue Digimon for a digivolution cost of 3.";
+                }
+
+                bool CanSelectLobomonCardCondition(CardSource cardSource)
+                {
+                    if (cardSource != null)
+                    {
+                        if (cardSource.Owner == card.Owner)
+                        {
+                            if (cardSource.CardNames.Contains("Lobomon"))
+                            {
+                                return true;
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanSelectKendoGarurumonCardCondition(CardSource cardSource)
+                {
+                    if (cardSource != null)
+                    {
+                        if (cardSource.Owner == card.Owner)
+                        {
+                            if (cardSource.CardNames.Contains("KendoGarurumon"))
+                            {
+                                return true;
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanSelectPermanentCondition(Permanent permanent)
+                {
+                    if (permanent != null)
+                    {
+                        if (permanent.TopCard != null)
+                        {
+                            if (permanent.TopCard.Owner == card.Owner)
+                            {
+                                if (permanent.TopCard.Owner.GetBattleAreaPermanents().Contains(permanent))
+                                {
+                                    if (!permanent.IsToken)
+                                    {
+                                        if (permanent.TopCard.CardNames.Contains("Koji Minamoto") ||
+                                            permanent.TopCard.CardNames.Contains("KojiMinamoto"))
+                                        {
+                                            return true;
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if (card.Owner.HandCards.Contains(card))
+                    {
+                        if (card.Owner.GetBattleAreaPermanents().Count(CanSelectPermanentCondition) >= 1)
+                        {
+                            if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card,
+                                    CanSelectLobomonCardCondition))
+                            {
+                                if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card,
+                                        CanSelectKendoGarurumonCardCondition))
+                                {
+                                    return true;
+                                }
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (card.Owner.HandCards.Contains(card))
+                    {
+                        if (card.Owner.GetBattleAreaPermanents().Count(CanSelectPermanentCondition) >= 1)
+                        {
+                            Permanent selectedPermanent = null;
+
+                            int maxCount = Math.Min(1,
+                                card.Owner.GetBattleAreaPermanents().Count(CanSelectPermanentCondition));
+
+                            SelectPermanentEffect selectPermanentEffect =
+                                GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                            selectPermanentEffect.SetUp(
+                                selectPlayer: card.Owner,
+                                canTargetCondition: CanSelectPermanentCondition,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                maxCount: maxCount,
+                                canNoSelect: false,
+                                canEndNotMax: false,
+                                selectPermanentCoroutine: SelectPermanentCoroutine,
+                                afterSelectPermanentCoroutine: null,
+                                mode: SelectPermanentEffect.Mode.Custom,
+                                cardEffect: activateClass);
+
+                            selectPermanentEffect.SetUpCustomMessage("Select 1 [Takuya Kanbara].",
+                                "The opponent is selecting 1 [Takuya Kanbara].");
+
+                            yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                            IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                            {
+                                selectedPermanent = permanent;
+                                yield return null;
+                            }
+
+                            if (selectedPermanent != null)
+                            {
+                                if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card,
+                                        (cardSource) =>
+                                            CanSelectLobomonCardCondition(cardSource) ||
+                                            CanSelectKendoGarurumonCardCondition(cardSource)))
+                                {
+                                    bool digivolve = false;
+
+                                    maxCount = 2;
+
+                                    if (card.Owner.TrashCards.Count((cardSource) =>
+                                            CanSelectLobomonCardCondition(cardSource) ||
+                                            CanSelectKendoGarurumonCardCondition(cardSource)) <
+                                        maxCount)
+                                    {
+                                        maxCount = card.Owner.TrashCards.Count((cardSource) =>
+                                            CanSelectLobomonCardCondition(cardSource) ||
+                                            CanSelectKendoGarurumonCardCondition(cardSource));
+                                    }
+
+                                    List<CardSource> selectedCards = new List<CardSource>();
+
+                                    SelectCardEffect selectCardEffect =
+                                        GManager.instance.GetComponent<SelectCardEffect>();
+
+                                    selectCardEffect.SetUp(
+                                        canTargetCondition: (cardSource) =>
+                                            CanSelectLobomonCardCondition(cardSource) ||
+                                            CanSelectKendoGarurumonCardCondition(cardSource),
+                                        canTargetCondition_ByPreSelecetedList: CanTargetConditionByPreSelectedList,
+                                        canEndSelectCondition: CanEndSelectCondition,
+                                        canNoSelect: () => false,
+                                        selectCardCoroutine: SelectCardCoroutine,
+                                        afterSelectCardCoroutine: null,
+                                        message:
+                                        "Select cards to place on the bottom of Digivolution cards\n(cards will be placed in the digivolution cards so that cards with lower numbers are on top).",
+                                        maxCount: maxCount,
+                                        canEndNotMax: false,
+                                        isShowOpponent: true,
+                                        mode: SelectCardEffect.Mode.Custom,
+                                        root: SelectCardEffect.Root.Trash,
+                                        customRootCardList: null,
+                                        canLookReverseCard: true,
+                                        selectPlayer: card.Owner,
+                                        cardEffect: activateClass);
+
+                                    yield return ContinuousController.instance.StartCoroutine(
+                                        selectCardEffect.Activate());
+
+                                    bool CanTargetConditionByPreSelectedList(List<CardSource> cardSources,
+                                        CardSource cardSource)
+                                    {
+                                        if (cardSources.Count(CanSelectLobomonCardCondition) >= 1)
+                                        {
+                                            if (CanSelectLobomonCardCondition(cardSource))
+                                            {
+                                                return false;
+                                            }
+                                        }
+
+                                        if (cardSources.Count(CanSelectKendoGarurumonCardCondition) >= 1)
+                                        {
+                                            if (CanSelectKendoGarurumonCardCondition(cardSource))
+                                            {
+                                                return false;
+                                            }
+                                        }
+
+                                        return true;
+                                    }
+
+                                    bool CanEndSelectCondition(List<CardSource> cardSources)
+                                    {
+                                        if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card,
+                                                CanSelectLobomonCardCondition))
+                                        {
+                                            if (cardSources.Count(CanSelectLobomonCardCondition) == 0)
+                                            {
+                                                return false;
+                                            }
+                                        }
+
+                                        if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card,
+                                                CanSelectKendoGarurumonCardCondition))
+                                        {
+                                            if (cardSources.Count(CanSelectKendoGarurumonCardCondition) == 0)
+                                            {
+                                                return false;
+                                            }
+                                        }
+
+                                        if (cardSources.Count(CanSelectLobomonCardCondition) >= 2)
+                                        {
+                                            return false;
+                                        }
+
+                                        if (cardSources.Count(CanSelectKendoGarurumonCardCondition) >= 2)
+                                        {
+                                            return false;
+                                        }
+
+                                        return true;
+                                    }
+
+                                    IEnumerator SelectCardCoroutine(CardSource cardSource)
+                                    {
+                                        selectedCards.Add(cardSource);
+                                        yield return null;
+                                    }
+
+                                    if (selectedCards.Count >= 1)
+                                    {
+                                        yield return ContinuousController.instance.StartCoroutine(
+                                            selectedPermanent.AddDigivolutionCardsBottom(selectedCards, activateClass));
+
+                                        if (selectedCards.Count == 2)
+                                        {
+                                            digivolve = true;
+                                        }
+                                    }
+
+                                    if (digivolve)
+                                    {
+                                        CardSource topCard = selectedPermanent.TopCard;
+
+                                        ChangeCardColorClass changeCardColorClass = new ChangeCardColorClass();
+                                        changeCardColorClass.SetUpICardEffect($"Treated as blue",
+                                            CanUseChangeColorCondition,
+                                            card);
+                                        changeCardColorClass.SetUpChangeCardColorClass(
+                                            ChangeCardColors: ChangeCardColors);
+                                        changeCardColorClass.SetNotShowUI(true);
+
+                                        bool CanUseChangeColorCondition(Hashtable ccHashtable)
+                                        {
+                                            if (selectedPermanent.TopCard != null)
+                                            {
+                                                if (card.Owner.GetBattleAreaPermanents().Contains(selectedPermanent))
+                                                {
+                                                    if (topCard == selectedPermanent.TopCard)
+                                                    {
+                                                        return true;
+                                                    }
+                                                }
+                                            }
+
+                                            return false;
+                                        }
+
+                                        List<CardColor> ChangeCardColors(CardSource cardSource,
+                                            List<CardColor> cardColors)
+                                        {
+                                            if (cardSource == selectedPermanent.TopCard)
+                                            {
+                                                cardColors.Add(CardColor.Red);
+                                            }
+
+                                            return cardColors;
+                                        }
+
+
+                                        ChangePermanentLevelClass changePermanentLevelClass =
+                                            new ChangePermanentLevelClass();
+                                        changePermanentLevelClass.SetUpICardEffect($"Treated as level 4",
+                                            CanUseChangeColorCondition, card);
+                                        changePermanentLevelClass.SetUpChangePermanentLevelClass(GetLevel: GetLevel);
+                                        changePermanentLevelClass.SetNotShowUI(true);
+
+                                        int GetLevel(Permanent permanent, int level)
+                                        {
+                                            if (selectedPermanent.TopCard != null)
+                                            {
+                                                if (permanent == selectedPermanent)
+                                                {
+                                                    level = 4;
+                                                }
+                                            }
+
+                                            return level;
+                                        }
+
+
+                                        TreatAsDigimonClass treatAsDigimonClass = new TreatAsDigimonClass();
+                                        treatAsDigimonClass.SetUpICardEffect($"Treated as Digimon",
+                                            CanUseChangeColorCondition,
+                                            card);
+                                        treatAsDigimonClass.SetUpTreatAsDigimonClass(
+                                            permanentCondition: PermanentCondition);
+                                        treatAsDigimonClass.SetNotShowUI(true);
+
+                                        bool PermanentCondition(Permanent permanent)
+                                        {
+                                            if (selectedPermanent.TopCard != null)
+                                            {
+                                                if (permanent == selectedPermanent)
+                                                {
+                                                    return true;
+                                                }
+                                            }
+
+                                            return false;
+                                        }
+
+
+                                        DontHaveDPClass dontHaveDPClass = new DontHaveDPClass();
+                                        dontHaveDPClass.SetUpICardEffect("Don't have DP", CanUseChangeColorCondition,
+                                            card);
+                                        dontHaveDPClass.SetUpDontHaveDPClass(PermanentCondition: PermanentCondition);
+                                        dontHaveDPClass.SetNotShowUI(true);
+
+
+                                        List<Func<EffectTiming, ICardEffect>> getCardEffects =
+                                            new List<Func<EffectTiming, ICardEffect>>()
+                                            {
+                                                _ => changeCardColorClass,
+                                                _ => changePermanentLevelClass,
+                                                _ => treatAsDigimonClass,
+                                                _ => dontHaveDPClass,
+                                            };
+
+                                        foreach (Func<EffectTiming, ICardEffect> getCardEffect in getCardEffects)
+                                        {
+                                            card.Owner.PermanentEffects.Add(getCardEffect);
+                                        }
+
+
+                                        if (card.CanPlayCardTargetFrame(selectedPermanent.PermanentFrame, true,
+                                                activateClass))
+                                        {
+                                            yield return ContinuousController.instance.StartCoroutine(new PlayCardClass(
+                                                cardSources: new List<CardSource>() { card },
+                                                hashtable: CardEffectCommons.CardEffectHashtable(activateClass),
+                                                payCost: true,
+                                                targetPermanent: selectedPermanent,
+                                                isTapped: false,
+                                                root: SelectCardEffect.Root.Hand,
+                                                activateETB: true).PlayCard());
+                                        }
+
+                                        foreach (Func<EffectTiming, ICardEffect> getCardEffect in getCardEffects)
+                                        {
+                                            card.Owner.PermanentEffects.Remove(getCardEffect);
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+
+            #endregion
+
+            #region When Digivolving
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Return 1 digivolution card and 1 of your opponent's Digimon can't suspend", CanUseCondition,
+                    card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDescription());
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[When Digivolving] By returning 1 card with the [Hybrid] trait from this Digimon's digivolution cards to the hand, 1 of your opponent's Digimon or Tamers can't suspend until the end of their turn.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                }
+
+                bool CanSelectSourceCardCondition(CardSource cardSource)
+                {
+                    return cardSource.CardTraits.Contains("Hybrid");
+                }
+
+                bool CanSelectOpponentPermanentCondition(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnOpponentBattleArea(permanent, card))
+                    {
+                        return permanent.IsDigimon || permanent.IsTamer;
+                    }
+
+                    return false;
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (card.PermanentOfThisCard().DigivolutionCards.Count(CanSelectSourceCardCondition) >= 1)
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    Permanent selectedPermanent = card.PermanentOfThisCard();
+
+                    if (selectedPermanent.DigivolutionCards.Count(CanSelectSourceCardCondition) >= 1)
+                    {
+                        int maxCount = Math.Min(1, selectedPermanent.DigivolutionCards.Count(CanSelectSourceCardCondition));
+
+                        SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+
+                        selectCardEffect.SetUp(
+                            canTargetCondition: CanSelectSourceCardCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            canNoSelect: () => false,
+                            selectCardCoroutine: null,
+                            afterSelectCardCoroutine: null,
+                            message: "Select 1 card to add to your hand.",
+                            maxCount: maxCount,
+                            canEndNotMax: false,
+                            isShowOpponent: true,
+                            mode: SelectCardEffect.Mode.AddHand,
+                            root: SelectCardEffect.Root.Custom,
+                            customRootCardList: selectedPermanent.DigivolutionCards,
+                            canLookReverseCard: true,
+                            selectPlayer: card.Owner,
+                            cardEffect: activateClass);
+
+                        yield return StartCoroutine(selectCardEffect.Activate());
+                        
+                        if (CardEffectCommons.HasMatchConditionOpponentsPermanent(card, CanSelectOpponentPermanentCondition))
+                        {
+                            maxCount = Math.Min(1,
+                                CardEffectCommons.MatchConditionPermanentCount(CanSelectOpponentPermanentCondition));
+
+                            SelectPermanentEffect selectPermanentEffect =
+                                GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                            selectPermanentEffect.SetUp(
+                                selectPlayer: card.Owner,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canTargetCondition: CanSelectOpponentPermanentCondition,
+                                canEndSelectCondition: null,
+                                maxCount: maxCount,
+                                canNoSelect: false,
+                                canEndNotMax: false,
+                                selectPermanentCoroutine: SelectPermanentCoroutine,
+                                afterSelectPermanentCoroutine: null,
+                                mode: SelectPermanentEffect.Mode.Custom,
+                                cardEffect: activateClass);
+
+                            selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon/Tamer that will be unable to suspend.",
+                                "The opponent is selecting 1 Digimon/Tamer that will be unable to suspend.");
+
+                            yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                            IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                            {
+                                selectedPermanent = permanent;
+                                CanNotSuspendClass canNotSuspendClass = new CanNotSuspendClass();
+                                canNotSuspendClass.SetUpICardEffect("Can't Suspend", CanUseCanNotSuspendCondition, card);
+                                canNotSuspendClass.SetUpCanNotSuspendClass(PermanentCondition: PermanentCanNotSuspendCondition);
+                                selectedPermanent.UntilOwnerTurnEndEffects.Add(_ => canNotSuspendClass);
+
+                                if (!selectedPermanent.TopCard.CanNotBeAffected(activateClass))
+                                {
+                                    yield return ContinuousController.instance.StartCoroutine(GManager.instance
+                                        .GetComponent<Effects>().CreateDebuffEffect(selectedPermanent));
+                                }
+
+                                bool CanUseCanNotSuspendCondition(Hashtable hashtableCanNotSuspend)
+                                {
+                                    if (selectedPermanent.TopCard != null)
+                                    {
+                                        if (!selectedPermanent.TopCard.CanNotBeAffected(activateClass))
+                                        {
+                                            return true;
+                                        }
+                                    }
+
+                                    return false;
+                                }
+
+                                bool PermanentCanNotSuspendCondition(Permanent permanentCanNotSuspend)
+                                {
+                                    if (permanentCanNotSuspend == selectedPermanent)
+                                    {
+                                        return true;
+                                    }
+
+                                    return false;
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+
+            #endregion
+
+            #region When Attacking - ESS
+
+            if (timing == EffectTiming.OnAllyAttack)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Return 1 of your opponent's Digimon to hand", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDescription());
+                activateClass.SetIsInheritedEffect(true);
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[When Attacking] [Once Per Turn] If this Digimon has the [Hybrid]/[Ten Warriors] trait, return 1 of your opponent's level 4 or lower Digimon to the hand.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnAttack(hashtable, card);
+                }
+
+                bool CanSelectPermanentCondition(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
+                    {
+                        if (permanent.Level <= 4)
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (card.PermanentOfThisCard().TopCard.ContainsTraits("Hybrid") ||
+                            card.PermanentOfThisCard().TopCard.ContainsTraits("Ten Warriors") ||
+                            card.PermanentOfThisCard().TopCard.ContainsTraits("TenWarriors"))
+                        {
+                            if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                            {
+                                return true;
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                    {
+                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
+
+                        SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectPermanentCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: maxCount,
+                            canNoSelect: false,
+                            canEndNotMax: false,
+                            selectPermanentCoroutine: null,
+                            afterSelectPermanentCoroutine: null,
+                            mode: SelectPermanentEffect.Mode.Bounce,
+                            cardEffect: activateClass);
+
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                    }
+                }
+            }
+
+            #endregion
+
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/BT17/Blue/Beowolfmon_BT17_026.cs.meta

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

+ 608 - 0
Assets/CardEffect/BT17/Blue/MetalGarurumon_BT17_027.cs

@@ -0,0 +1,608 @@
+using System.Collections;
+using System.Collections.Generic;
+using System;
+using System.Linq;
+
+namespace DCGO.CardEffects
+{
+    public class MetalGarurumon_BT17_027 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            #region Alternate Digivolution
+
+            if (timing == EffectTiming.None)
+            {
+                bool PermanentCondition(Permanent targetPermanent)
+                {
+                    return targetPermanent.TopCard.IsLevel5 && targetPermanent.TopCard.ContainsCardName("Garurumon");
+                }
+
+                cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(
+                    permanentCondition: PermanentCondition,
+                    digivolutionCost: 3,
+                    ignoreDigivolutionRequirement: false,
+                    card: card,
+                    condition: null)
+                );
+            }
+
+            #endregion
+
+            #region Play Cost Reduction
+
+            if (timing == EffectTiming.None)
+            {
+                ChangeCostClass changeCostClass = new ChangeCostClass();
+                changeCostClass.SetUpICardEffect($"Play Cost -3", CanUseCondition, card);
+                changeCostClass.SetUpChangeCostClass(changeCostFunc: ChangeCost,
+                    cardSourceCondition: CardSourceCondition, rootCondition: RootCondition, isUpDown: IsUpDown,
+                    isCheckAvailability: () => false, isChangePayingCost: () => true);
+
+                cardEffects.Add(changeCostClass);
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if (card.Owner.HandCards.Contains(card))
+                    {
+                        if (!CardEffectCommons.HasMatchConditionOwnersPermanent(card, IsCorrectTamer))
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool IsCorrectTamer(Permanent permanent)
+                {
+                    return permanent.IsTamer && (permanent.TopCard.ContainsCardName("Matt Ishida") ||
+                                                 permanent.TopCard.ContainsCardName("MattIshida"));
+                }
+
+                int ChangeCost(CardSource cardSource, int cost, SelectCardEffect.Root root,
+                    List<Permanent> targetPermanents)
+                {
+                    if (CardSourceCondition(cardSource))
+                    {
+                        if (RootCondition(root))
+                        {
+                            if (PermanentsCondition(targetPermanents))
+                            {
+                                cost -= 3;
+                            }
+                        }
+                    }
+
+                    return cost;
+                }
+
+                bool PermanentsCondition(List<Permanent> targetPermanents)
+                {
+                    if (targetPermanents == null)
+                    {
+                        return true;
+                    }
+
+                    if (targetPermanents.Count((targetPermanent) => targetPermanent != null) == 0)
+                    {
+                        return true;
+                    }
+
+                    return false;
+                }
+
+                bool CardSourceCondition(CardSource cardSource)
+                {
+                    return cardSource == card;
+                }
+
+                bool RootCondition(SelectCardEffect.Root root)
+                {
+                    return true;
+                }
+
+                bool IsUpDown()
+                {
+                    return true;
+                }
+            }
+
+            #endregion
+
+            #region On Play/ When Digivolving Shared
+
+            bool CanSelectOwnPermanentSharedCondition(Permanent permanent)
+            {
+                if (CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(permanent, card))
+                {
+                    if (permanent.TopCard.ContainsCardName("Agumon"))
+                    {
+                        return true;
+                    }
+                }
+
+                return false;
+            }
+
+            bool CanSelectHandCardSharedCondition(CardSource cardSource)
+            {
+                return cardSource.IsDigimon && cardSource.ContainsCardName("WarGreymon");
+            }
+
+            #endregion
+
+            #region On Play
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Choose 1 effect", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDescription());
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[On Play] Activate 1 of the effects below: ・1 of your opponent's Digimon or Tamers can't suspend until the end of their turn. ・1 of your [Agumon] may digivolve into [WarGreymon] in your hand, ignoring its digivolution requirements and without paying the cost.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
+                }
+
+                bool CanSelectOpponentPermanentCondition(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnOpponentBattleArea(permanent, card))
+                    {
+                        return permanent.IsDigimon || permanent.IsTamer;
+                    }
+
+                    return false;
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectOpponentPermanentCondition))
+                        {
+                            return true;
+                        }
+
+                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectOwnPermanentSharedCondition) &&
+                            card.Owner.HandCards.Count(CanSelectHandCardSharedCondition) >= 1)
+                        {
+                            return true;
+                        }
+                    }
+
+                    return CardEffectCommons.IsExistOnBattleArea(card);
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        yield return GManager.instance.photonWaitController.StartWait("MetalGarurumon_BT17");
+
+                        List<SelectionElement<int>> selectionElements = new List<SelectionElement<int>>()
+                        {
+                            new(message: "1 of your opponent's Digimon or Tamers can't suspend until the end of their turn. ",
+                                value: 0, spriteIndex: 0),
+                            new(
+                                message: "1 of your [Agumon] may digivolve into [WarGreymon] in your hand",
+                                value: 1, spriteIndex: 0),
+                        };
+
+                        string selectPlayerMessage = "Which effect will you activate?";
+                        string notSelectPlayerMessage = "The opponent is choosing which effect to activate.";
+
+                        GManager.instance.userSelectionManager.SetIntSelection(selectionElements: selectionElements,
+                            selectPlayer: card.Owner, selectPlayerMessage: selectPlayerMessage,
+                            notSelectPlayerMessage: notSelectPlayerMessage);
+
+                        yield return ContinuousController.instance.StartCoroutine(GManager.instance.userSelectionManager
+                            .WaitForEndSelect());
+
+                        int actionID = GManager.instance.userSelectionManager.SelectedIntValue;
+
+                        switch (actionID)
+                        {
+                            case 0:
+                            {
+                                if (CardEffectCommons.HasMatchConditionOpponentsPermanent(card, CanSelectOpponentPermanentCondition))
+                                {
+                                    int maxCount = Math.Min(1,
+                                        CardEffectCommons.MatchConditionPermanentCount(CanSelectOpponentPermanentCondition));
+
+                                    SelectPermanentEffect selectPermanentEffect =
+                                        GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                                    selectPermanentEffect.SetUp(
+                                        selectPlayer: card.Owner,
+                                        canTargetCondition_ByPreSelecetedList: null,
+                                        canTargetCondition: CanSelectOpponentPermanentCondition,
+                                        canEndSelectCondition: null,
+                                        maxCount: maxCount,
+                                        canNoSelect: false,
+                                        canEndNotMax: false,
+                                        selectPermanentCoroutine: SelectPermanentCoroutine,
+                                        afterSelectPermanentCoroutine: null,
+                                        mode: SelectPermanentEffect.Mode.Custom,
+                                        cardEffect: activateClass);
+
+                                    selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon/Tamer that will be unable to suspend.",
+                                        "The opponent is selecting 1 Digimon/Tamer that will be unable to suspend.");
+
+                                    yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                                    IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                                    {
+                                        Permanent selectedPermanent = permanent;
+                                        CanNotSuspendClass canNotSuspendClass = new CanNotSuspendClass();
+                                        canNotSuspendClass.SetUpICardEffect("Can't Suspend", CanUseCanNotSuspendCondition, card);
+                                        canNotSuspendClass.SetUpCanNotSuspendClass(PermanentCondition: PermanentCanNotSuspendCondition);
+                                        selectedPermanent.UntilOwnerTurnEndEffects.Add(_ => canNotSuspendClass);
+
+                                        if (!selectedPermanent.TopCard.CanNotBeAffected(activateClass))
+                                        {
+                                            yield return ContinuousController.instance.StartCoroutine(GManager.instance
+                                                .GetComponent<Effects>().CreateDebuffEffect(selectedPermanent));
+                                        }
+
+                                        bool CanUseCanNotSuspendCondition(Hashtable hashtableCanNotSuspend)
+                                        {
+                                            if (selectedPermanent.TopCard != null)
+                                            {
+                                                if (!selectedPermanent.TopCard.CanNotBeAffected(activateClass))
+                                                {
+                                                    return true;
+                                                }
+                                            }
+
+                                            return false;
+                                        }
+
+                                        bool PermanentCanNotSuspendCondition(Permanent permanentCanNotSuspend)
+                                        {
+                                            if (permanentCanNotSuspend == selectedPermanent)
+                                            {
+                                                return true;
+                                            }
+
+                                            return false;
+                                        }
+                                    }
+                                }
+
+                                break;
+                            }
+
+                            case 1:
+                            {
+                                if (CardEffectCommons.HasMatchConditionPermanent(CanSelectOwnPermanentSharedCondition) &&
+                                    card.Owner.HandCards.Count(CanSelectHandCardSharedCondition) >= 1)
+                                {
+                                    Permanent selectedPermanent = null;
+
+                                    int maxCount = Math.Min(1,
+                                        CardEffectCommons.MatchConditionPermanentCount(CanSelectOwnPermanentSharedCondition));
+
+                                    SelectPermanentEffect selectPermanentEffect =
+                                        GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                                    selectPermanentEffect.SetUp(
+                                        selectPlayer: card.Owner,
+                                        canTargetCondition: CanSelectOwnPermanentSharedCondition,
+                                        canTargetCondition_ByPreSelecetedList: null,
+                                        canEndSelectCondition: null,
+                                        maxCount: maxCount,
+                                        canNoSelect: true,
+                                        canEndNotMax: false,
+                                        selectPermanentCoroutine: SelectPermanentCoroutine,
+                                        afterSelectPermanentCoroutine: null,
+                                        mode: SelectPermanentEffect.Mode.Custom,
+                                        cardEffect: activateClass);
+
+                                    selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon that will digivolve.",
+                                        "The opponent is selecting 1 Digimon that will digivolve.");
+
+                                    yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                                    IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                                    {
+                                        selectedPermanent = permanent;
+                                        yield return null;
+                                    }
+
+                                    if (selectedPermanent != null)
+                                    {
+                                        yield return ContinuousController.instance.StartCoroutine(
+                                            CardEffectCommons.DigivolveIntoHandOrTrashCard(
+                                                targetPermanent: selectedPermanent,
+                                                cardCondition: CanSelectHandCardSharedCondition,
+                                                payCost: false,
+                                                reduceCostTuple: null,
+                                                fixedCostTuple: null,
+                                                ignoreDigivolutionRequirementFixedCost: -1,
+                                                isHand: true,
+                                                activateClass: activateClass,
+                                                successProcess: null,
+                                                ignoreLevel: true,
+                                                ignoreSelection: true));
+                                    }
+                                }
+
+                                break;
+                            }
+                        }
+                    }
+                }
+            }
+
+            #endregion
+            
+            #region When Digivolving
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Choose 1 effect", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDescription());
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[When Digivolving] Activate 1 of the effects below: ・1 of your opponent's Digimon or Tamers can't suspend until the end of their turn. ・1 of your [Agumon] may digivolve into [WarGreymon] in your hand, ignoring its digivolution requirements and without paying the cost.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                }
+
+                bool CanSelectOpponentPermanentCondition(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnOpponentBattleArea(permanent, card))
+                    {
+                        return permanent.IsDigimon || permanent.IsTamer;
+                    }
+
+                    return false;
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectOpponentPermanentCondition))
+                        {
+                            return true;
+                        }
+
+                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectOwnPermanentSharedCondition) &&
+                            card.Owner.HandCards.Count(CanSelectHandCardSharedCondition) >= 1)
+                        {
+                            return true;
+                        }
+                    }
+
+                    return CardEffectCommons.IsExistOnBattleArea(card);
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        yield return GManager.instance.photonWaitController.StartWait("MetalGarurumon_BT17");
+
+                        List<SelectionElement<int>> selectionElements = new List<SelectionElement<int>>()
+                        {
+                            new(message: "1 of your opponent's Digimon or Tamers can't suspend until the end of their turn. ",
+                                value: 0, spriteIndex: 0),
+                            new(
+                                message: "1 of your [Agumon] may digivolve into [WarGreymon] in your hand",
+                                value: 1, spriteIndex: 0),
+                        };
+
+                        string selectPlayerMessage = "Which effect will you activate?";
+                        string notSelectPlayerMessage = "The opponent is choosing which effect to activate.";
+
+                        GManager.instance.userSelectionManager.SetIntSelection(selectionElements: selectionElements,
+                            selectPlayer: card.Owner, selectPlayerMessage: selectPlayerMessage,
+                            notSelectPlayerMessage: notSelectPlayerMessage);
+
+                        yield return ContinuousController.instance.StartCoroutine(GManager.instance.userSelectionManager
+                            .WaitForEndSelect());
+
+                        int actionID = GManager.instance.userSelectionManager.SelectedIntValue;
+
+                        switch (actionID)
+                        {
+                            case 0:
+                            {
+                                if (CardEffectCommons.HasMatchConditionOpponentsPermanent(card, CanSelectOpponentPermanentCondition))
+                                {
+                                    int maxCount = Math.Min(1,
+                                        CardEffectCommons.MatchConditionPermanentCount(CanSelectOpponentPermanentCondition));
+
+                                    SelectPermanentEffect selectPermanentEffect =
+                                        GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                                    selectPermanentEffect.SetUp(
+                                        selectPlayer: card.Owner,
+                                        canTargetCondition_ByPreSelecetedList: null,
+                                        canTargetCondition: CanSelectOpponentPermanentCondition,
+                                        canEndSelectCondition: null,
+                                        maxCount: maxCount,
+                                        canNoSelect: false,
+                                        canEndNotMax: false,
+                                        selectPermanentCoroutine: SelectPermanentCoroutine,
+                                        afterSelectPermanentCoroutine: null,
+                                        mode: SelectPermanentEffect.Mode.Custom,
+                                        cardEffect: activateClass);
+
+                                    selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon/Tamer that will be unable to suspend.",
+                                        "The opponent is selecting 1 Digimon/Tamer that will be unable to suspend.");
+
+                                    yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                                    IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                                    {
+                                        Permanent selectedPermanent = permanent;
+                                        CanNotSuspendClass canNotSuspendClass = new CanNotSuspendClass();
+                                        canNotSuspendClass.SetUpICardEffect("Can't Suspend", CanUseCanNotSuspendCondition, card);
+                                        canNotSuspendClass.SetUpCanNotSuspendClass(PermanentCondition: PermanentCanNotSuspendCondition);
+                                        selectedPermanent.UntilOwnerTurnEndEffects.Add(_ => canNotSuspendClass);
+
+                                        if (!selectedPermanent.TopCard.CanNotBeAffected(activateClass))
+                                        {
+                                            yield return ContinuousController.instance.StartCoroutine(GManager.instance
+                                                .GetComponent<Effects>().CreateDebuffEffect(selectedPermanent));
+                                        }
+
+                                        bool CanUseCanNotSuspendCondition(Hashtable hashtableCanNotSuspend)
+                                        {
+                                            if (selectedPermanent.TopCard != null)
+                                            {
+                                                if (!selectedPermanent.TopCard.CanNotBeAffected(activateClass))
+                                                {
+                                                    return true;
+                                                }
+                                            }
+
+                                            return false;
+                                        }
+
+                                        bool PermanentCanNotSuspendCondition(Permanent permanentCanNotSuspend)
+                                        {
+                                            if (permanentCanNotSuspend == selectedPermanent)
+                                            {
+                                                return true;
+                                            }
+
+                                            return false;
+                                        }
+                                    }
+                                }
+
+                                break;
+                            }
+
+                            case 1:
+                            {
+                                if (CardEffectCommons.HasMatchConditionPermanent(CanSelectOwnPermanentSharedCondition) &&
+                                    card.Owner.HandCards.Count(CanSelectHandCardSharedCondition) >= 1)
+                                {
+                                    Permanent selectedPermanent = null;
+
+                                    int maxCount = Math.Min(1,
+                                        CardEffectCommons.MatchConditionPermanentCount(CanSelectOwnPermanentSharedCondition));
+
+                                    SelectPermanentEffect selectPermanentEffect =
+                                        GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                                    selectPermanentEffect.SetUp(
+                                        selectPlayer: card.Owner,
+                                        canTargetCondition: CanSelectOwnPermanentSharedCondition,
+                                        canTargetCondition_ByPreSelecetedList: null,
+                                        canEndSelectCondition: null,
+                                        maxCount: maxCount,
+                                        canNoSelect: true,
+                                        canEndNotMax: false,
+                                        selectPermanentCoroutine: SelectPermanentCoroutine,
+                                        afterSelectPermanentCoroutine: null,
+                                        mode: SelectPermanentEffect.Mode.Custom,
+                                        cardEffect: activateClass);
+
+                                    selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon that will digivolve.",
+                                        "The opponent is selecting 1 Digimon that will digivolve.");
+
+                                    yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                                    IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                                    {
+                                        selectedPermanent = permanent;
+                                        yield return null;
+                                    }
+
+                                    if (selectedPermanent != null)
+                                    {
+                                        yield return ContinuousController.instance.StartCoroutine(
+                                            CardEffectCommons.DigivolveIntoHandOrTrashCard(
+                                                targetPermanent: selectedPermanent,
+                                                cardCondition: CanSelectHandCardSharedCondition,
+                                                payCost: false,
+                                                reduceCostTuple: null,
+                                                fixedCostTuple: null,
+                                                ignoreDigivolutionRequirementFixedCost: -1,
+                                                isHand: true,
+                                                activateClass: activateClass,
+                                                successProcess: null,
+                                                ignoreLevel: true,
+                                                ignoreSelection: true));
+                                    }
+                                }
+
+                                break;
+                            }
+                        }
+                    }
+                }
+            }
+
+            #endregion
+
+            #region When Attacking - ESS
+
+            if (timing == EffectTiming.OnAllyAttack)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Unsuspend", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDescription());
+                activateClass.SetIsInheritedEffect(true);
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[When Attacking][Once Per Turn] If this Digimon has [Omnimon] in its name, unsuspend this Digimon.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnAttack(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (card.PermanentOfThisCard().TopCard.ContainsCardName("Omnimon"))
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                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/BT17/Blue/MetalGarurumon_BT17_027.cs.meta

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

+ 2 - 6
Assets/CardEffect/BT17/Red/Aldamon_BT17_014.cs

@@ -71,12 +71,8 @@ namespace DCGO.CardEffects.BT17
                                 {
                                     if (!permanent.IsToken)
                                     {
-                                        if (permanent.TopCard.CardNames.Contains("Takuya Kanbara"))
-                                        {
-                                            return true;
-                                        }
-
-                                        if (permanent.TopCard.CardNames.Contains("TakuyaKanbara"))
+                                        if (permanent.TopCard.CardNames.Contains("Takuya Kanbara") || 
+                                            permanent.TopCard.CardNames.Contains("TakuyaKanbara"))
                                         {
                                             return true;
                                         }

+ 1 - 1
Assets/CardEffect/BT17/Red/AncientGreymon_BT17_017.cs

@@ -253,7 +253,7 @@ namespace DCGO.CardEffects.BT17
                 string EffectDescription()
                 {
                     return
-                        "[On Deletion] Return 1 Tamer card and 1 [Hybrid] trait Digimon card from your trash to the hand. Then, you may play 1 Tamer card from your hand without paying the cost.";
+                        "[On Deletion] You may return 1 Tamer card and 1 [Hybrid] trait Digimon card from your trash to the hand. Then, you may play 1 Tamer card from your hand without paying the cost.";
                 }
 
                 bool IsTamerCardCondition(CardSource cardSource)

+ 1 - 1
Assets/CardEffect/EX6/Yellow/Sagomon_EX6_024.cs

@@ -180,7 +180,7 @@ namespace DCGO.CardEffects.EX6
                         if (CardEffectCommons.HasMatchConditionOpponentsPermanent(card, CanSelectOpponentPermanentCondition))
                         {
                             int maxCount = Math.Min(1,
-                                CardEffectCommons.MatchConditionPermanentCount(CanSelectSecMinusPermanentSharedCondition));
+                                CardEffectCommons.MatchConditionPermanentCount(CanSelectOpponentPermanentCondition));
                             
                             SelectPermanentEffect selectPermanentEffect =
                                 GManager.instance.GetComponent<SelectPermanentEffect>();