Pārlūkot izejas kodu

Merge pull request #30 from DCGO2/BT17-Red

BT17-Red-Blue into BT17
Michael8818 2 gadi atpakaļ
vecāks
revīzija
d5cdb0a56d
74 mainītis faili ar 10515 papildinājumiem un 10 dzēšanām
  1. 2 2
      Assets/CardBaseEntity/BT17/Red/Digimon/Gallantmon_Crimson_Mode-BT17-018.asset
  2. 2 2
      Assets/CardBaseEntity/BT17/Red/Digimon/Gallantmon_Crimson_Mode-BT17-018_P1.asset
  3. 2 2
      Assets/CardBaseEntity/BT17/Red/Digimon/Gallantmon_Crimson_Mode-BT17-018_P2.asset
  4. 2 2
      Assets/CardEffect/BT16/Green/Wormmon_BT16_040.cs
  5. 467 0
      Assets/CardEffect/BT17/Blue/AncientGarurumon_BT17_028.cs
  6. 11 0
      Assets/CardEffect/BT17/Blue/AncientGarurumon_BT17_028.cs.meta
  7. 633 0
      Assets/CardEffect/BT17/Blue/Beowolfmon_BT17_026.cs
  8. 11 0
      Assets/CardEffect/BT17/Blue/Beowolfmon_BT17_026.cs.meta
  9. 372 0
      Assets/CardEffect/BT17/Blue/CerberusmonWerewolfMode_BT17_025.cs
  10. 11 0
      Assets/CardEffect/BT17/Blue/CerberusmonWerewolfMode_BT17_025.cs.meta
  11. 308 0
      Assets/CardEffect/BT17/Blue/DavisMotomiyaAndKenIchijoji_BT17_084.cs
  12. 11 0
      Assets/CardEffect/BT17/Blue/DavisMotomiyaAndKenIchijoji_BT17_084.cs.meta
  13. 340 0
      Assets/CardEffect/BT17/Blue/Gabumon_BT17_019.cs
  14. 11 0
      Assets/CardEffect/BT17/Blue/Gabumon_BT17_019.cs.meta
  15. 220 0
      Assets/CardEffect/BT17/Blue/KendoGarurumon_BT17_023.cs
  16. 11 0
      Assets/CardEffect/BT17/Blue/KendoGarurumon_BT17_023.cs.meta
  17. 83 0
      Assets/CardEffect/BT17/Blue/KojiMinamoto_BT17_083.cs
  18. 11 0
      Assets/CardEffect/BT17/Blue/KojiMinamoto_BT17_083.cs.meta
  19. 157 0
      Assets/CardEffect/BT17/Blue/Labramon_BT17_021.cs
  20. 11 0
      Assets/CardEffect/BT17/Blue/Labramon_BT17_021.cs.meta
  21. 228 0
      Assets/CardEffect/BT17/Blue/Lobomon_BT17_022.cs
  22. 11 0
      Assets/CardEffect/BT17/Blue/Lobomon_BT17_022.cs.meta
  23. 608 0
      Assets/CardEffect/BT17/Blue/MetalGarurumon_BT17_027.cs
  24. 11 0
      Assets/CardEffect/BT17/Blue/MetalGarurumon_BT17_027.cs.meta
  25. 332 0
      Assets/CardEffect/BT17/Blue/MinamiUehara_BT17_082.cs
  26. 11 0
      Assets/CardEffect/BT17/Blue/MinamiUehara_BT17_082.cs.meta
  27. 371 0
      Assets/CardEffect/BT17/Blue/ReturntothePrimogenitor_BT17_097.cs
  28. 11 0
      Assets/CardEffect/BT17/Blue/ReturntothePrimogenitor_BT17_097.cs.meta
  29. 275 0
      Assets/CardEffect/BT17/Blue/Seasarmon_BT17_024.cs
  30. 11 0
      Assets/CardEffect/BT17/Blue/Seasarmon_BT17_024.cs.meta
  31. 272 0
      Assets/CardEffect/BT17/Blue/Strabimon_BT17_020.cs
  32. 11 0
      Assets/CardEffect/BT17/Blue/Strabimon_BT17_020.cs.meta
  33. 75 0
      Assets/CardEffect/BT17/Blue/Xiaomon_BT17_002.cs
  34. 11 0
      Assets/CardEffect/BT17/Blue/Xiaomon_BT17_002.cs.meta
  35. 383 0
      Assets/CardEffect/BT17/Red/Agumon_BT17_007.cs
  36. 11 0
      Assets/CardEffect/BT17/Red/Agumon_BT17_007.cs.meta
  37. 204 0
      Assets/CardEffect/BT17/Red/Agunimon_BT17_011.cs
  38. 11 0
      Assets/CardEffect/BT17/Red/Agunimon_BT17_011.cs.meta
  39. 535 0
      Assets/CardEffect/BT17/Red/Aldamon_BT17_014.cs
  40. 11 0
      Assets/CardEffect/BT17/Red/Aldamon_BT17_014.cs.meta
  41. 410 0
      Assets/CardEffect/BT17/Red/AncientGreymon_BT17_017.cs
  42. 11 0
      Assets/CardEffect/BT17/Red/AncientGreymon_BT17_017.cs.meta
  43. 363 0
      Assets/CardEffect/BT17/Red/AncientGuardianDeity_BT17_094.cs
  44. 11 0
      Assets/CardEffect/BT17/Red/AncientGuardianDeity_BT17_094.cs.meta
  45. 164 0
      Assets/CardEffect/BT17/Red/BurningGreymon_BT17_012.cs
  46. 11 0
      Assets/CardEffect/BT17/Red/BurningGreymon_BT17_012.cs.meta
  47. 293 0
      Assets/CardEffect/BT17/Red/CrimsonSavior_BT17_096.cs
  48. 11 0
      Assets/CardEffect/BT17/Red/CrimsonSavior_BT17_096.cs.meta
  49. 202 0
      Assets/CardEffect/BT17/Red/Flamemon_BT17_009.cs
  50. 11 0
      Assets/CardEffect/BT17/Red/Flamemon_BT17_009.cs.meta
  51. 344 0
      Assets/CardEffect/BT17/Red/GallantmonCrimsonModeAce_BT17_018.cs
  52. 11 0
      Assets/CardEffect/BT17/Red/GallantmonCrimsonModeAce_BT17_018.cs.meta
  53. 271 0
      Assets/CardEffect/BT17/Red/Gallantmon_BT17_016.cs
  54. 11 0
      Assets/CardEffect/BT17/Red/Gallantmon_BT17_016.cs.meta
  55. 91 0
      Assets/CardEffect/BT17/Red/Gigimon_BT17_001.cs
  56. 11 0
      Assets/CardEffect/BT17/Red/Gigimon_BT17_001.cs.meta
  57. 156 0
      Assets/CardEffect/BT17/Red/Growlmon_BT17_010.cs
  58. 11 0
      Assets/CardEffect/BT17/Red/Growlmon_BT17_010.cs.meta
  59. 186 0
      Assets/CardEffect/BT17/Red/Guilmon_BT17_008.cs
  60. 11 0
      Assets/CardEffect/BT17/Red/Guilmon_BT17_008.cs.meta
  61. 378 0
      Assets/CardEffect/BT17/Red/MiraculousMegaKnight_BT17_095.cs
  62. 11 0
      Assets/CardEffect/BT17/Red/MiraculousMegaKnight_BT17_095.cs.meta
  63. 221 0
      Assets/CardEffect/BT17/Red/TaiKamiyaAndMattIshida_BT17_081.cs
  64. 11 0
      Assets/CardEffect/BT17/Red/TaiKamiyaAndMattIshida_BT17_081.cs.meta
  65. 349 0
      Assets/CardEffect/BT17/Red/TakatoMatsuki_BT17_080.cs
  66. 11 0
      Assets/CardEffect/BT17/Red/TakatoMatsuki_BT17_080.cs.meta
  67. 119 0
      Assets/CardEffect/BT17/Red/TakuyaKanbara_BT17_079.cs
  68. 11 0
      Assets/CardEffect/BT17/Red/TakuyaKanbara_BT17_079.cs.meta
  69. 532 0
      Assets/CardEffect/BT17/Red/WarGreymon_BT17_015.cs
  70. 11 0
      Assets/CardEffect/BT17/Red/WarGreymon_BT17_015.cs.meta
  71. 189 0
      Assets/CardEffect/BT17/Red/WarGrowlmon_BT17_013.cs
  72. 11 0
      Assets/CardEffect/BT17/Red/WarGrowlmon_BT17_013.cs.meta
  73. 1 1
      Assets/CardEffect/EX6/Yellow/Dominimon_EX6_030.cs
  74. 1 1
      Assets/CardEffect/EX6/Yellow/Sagomon_EX6_024.cs

+ 2 - 2
Assets/CardBaseEntity/BT17/Red/Digimon/Gallantmon_Crimson_Mode-BT17-018.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:12a94ac1546ff3829004544f61590eac2b995c802ec9cd9c85d7e2f1854acd13
-size 1497
+oid sha256:46689827d050719948ce306686da2b47d4536d14ee3f3e13faff6c49d50d2a93
+size 1500

+ 2 - 2
Assets/CardBaseEntity/BT17/Red/Digimon/Gallantmon_Crimson_Mode-BT17-018_P1.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:3f101ef684e9d0a8690bc75fcfef03ba5e2f29925ee8edc1bddab535b5f3d6b9
-size 1503
+oid sha256:aa69c9899bbe25066590d1bff5c9d2b258baa1f829e692967813346043024998
+size 1506

+ 2 - 2
Assets/CardBaseEntity/BT17/Red/Digimon/Gallantmon_Crimson_Mode-BT17-018_P2.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:0a745466fd7d424de7d5fd36da22ebfa77e06978f6796e0511b0aad480382d8a
-size 1503
+oid sha256:58b96a9f4b6750220a7ca89f1b1ea671182e2a1cf16c28260af6851ff67cc957
+size 1506

+ 2 - 2
Assets/CardEffect/BT16/Green/Wormmon_BT16_040.cs

@@ -235,13 +235,13 @@ namespace DCGO.CardEffects.BT16
 
                 string EffectDiscription()
                 {
-                    return "[On Play] If it's your turn, 1 of your Digimomn may digivolve into a level 4 Digimon card with the [Insectiod] or [Free] trait from your trash with the digivolution cost reduced by 1.";
+                    return "[On Play] If it's your turn, 1 of your Digimon may digivolve into a level 4 Digimon card with the [Insectoid] or [Free] trait from your trash with the digivolution cost reduced by 1.";
                 }
 
 
                 bool CanSelectCardCondition(CardSource cardSource)
                 {
-                    if (cardSource.CardTraits.Contains("Insectiod") || cardSource.CardTraits.Contains("Free"))
+                    if (cardSource.CardTraits.Contains("Insectoid") || cardSource.CardTraits.Contains("Free"))
                     {
                         if (cardSource.HasLevel && cardSource.Level == 4)
                         {

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

@@ -0,0 +1,467 @@
+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))
+                    {
+                        if (CardEffectCommons.IsOwnerTurn(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: 

+ 372 - 0
Assets/CardEffect/BT17/Blue/CerberusmonWerewolfMode_BT17_025.cs

@@ -0,0 +1,372 @@
+using System.Collections;
+using System.Collections.Generic;
+using System;
+using System.Linq;
+
+namespace DCGO.CardEffects.BT17
+{
+    public class CerberusmonWerewolfMode_BT17_025 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            #region Alternate Digivolution/ Rule Trait
+
+            if (timing == EffectTiming.None)
+            {
+                // Alternate Digivolution
+                bool PermanentCondition(Permanent targetPermanent)
+                {
+                    return targetPermanent.TopCard.CardNames.Contains("Cerberusmon");
+                }
+
+                cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(
+                    permanentCondition: PermanentCondition, digivolutionCost: 1, ignoreDigivolutionRequirement: true,
+                    card: card, condition: null));
+
+                // Rule Trait
+                ChangeTraitsClass changeTraitsClass = new ChangeTraitsClass();
+                changeTraitsClass.SetUpICardEffect("Trait: Has [Dark Animal] Type", CanUseCondition, card);
+                changeTraitsClass.SetUpChangeTraitsClass(changeeTraits: ChangeTraits);
+                cardEffects.Add(changeTraitsClass);
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return true;
+                }
+
+                List<string> ChangeTraits(CardSource cardSource, List<string> cardTraits)
+                {
+                    if (cardSource == card)
+                    {
+                        cardTraits.Add("Dark Animal");
+                    }
+
+                    return cardTraits;
+                }
+            }
+
+            #endregion
+
+            #region When Digivolving
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Play 1 level 3 blue or purple Digimon card from your trash or digivolution cards",
+                    CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDescription());
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[When Digivolving] You may play 1 level 3 blue or purple Digimon card from your trash or from one of your Digimon's digivolution cards without paying the cost. At the next end of your opponent's turn, return it to the hand.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                }
+
+                bool CanSelectCardCondition(CardSource cardSource)
+                {
+                    return CardEffectCommons.CanPlayAsNewPermanent(cardSource: cardSource, payCost: false, cardEffect: activateClass) &&
+                           cardSource.IsDigimon &&
+                           cardSource.IsLevel3 &&
+                           (cardSource.CardColors.Contains(CardColor.Blue) || cardSource.CardColors.Contains(CardColor.Purple));
+                }
+
+                bool CanSelectPermanentCondition(Permanent permanent)
+                {
+                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card) &&
+                           permanent.DigivolutionCards.Count(CanSelectCardCondition) >= 1;
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        return CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectCardCondition) ||
+                               CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition);
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    bool canSelectTrash = CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectCardCondition);
+                    bool canSelectDigivolutionCards = CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition);
+
+                    if (canSelectTrash || canSelectDigivolutionCards)
+                    {
+                        if (canSelectTrash && canSelectDigivolutionCards)
+                        {
+                            List<SelectionElement<bool>> selectionElements = new List<SelectionElement<bool>>
+                            {
+                                new(message: "From trash", value: true, spriteIndex: 0),
+                                new(message: "From digivolution cards", value: false, spriteIndex: 1),
+                            };
+
+                            string selectPlayerMessage = "From which area do you play a card?";
+                            string notSelectPlayerMessage = "The opponent is choosing from which area to play a card.";
+
+                            GManager.instance.userSelectionManager.SetBoolSelection(selectionElements: selectionElements,
+                                selectPlayer: card.Owner, selectPlayerMessage: selectPlayerMessage,
+                                notSelectPlayerMessage: notSelectPlayerMessage);
+                        }
+
+                        else
+                        {
+                            GManager.instance.userSelectionManager.SetBool(canSelectTrash);
+                        }
+
+                        yield return ContinuousController.instance.StartCoroutine(GManager.instance.userSelectionManager
+                            .WaitForEndSelect());
+
+                        bool fromTrash = GManager.instance.userSelectionManager.SelectedBoolValue;
+
+                        List<CardSource> selectedCards = new List<CardSource>();
+
+                        IEnumerator SelectCardCoroutine(CardSource cardSource)
+                        {
+                            selectedCards.Add(cardSource);
+                            yield return null;
+                        }
+
+                        if (fromTrash)
+                        {
+                            SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+
+                            selectCardEffect.SetUp(
+                                canTargetCondition: CanSelectCardCondition,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                canNoSelect: () => true,
+                                selectCardCoroutine: SelectCardCoroutine,
+                                afterSelectCardCoroutine: null,
+                                message: "Select 1 card to play.",
+                                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 play.", "The opponent is selecting 1 card to play.");
+                            selectCardEffect.SetUpCustomMessage_ShowCard("Played Card");
+
+                            yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
+                        }
+
+                        else
+                        {
+                            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: true,
+                                canEndNotMax: false,
+                                selectPermanentCoroutine: SelectPermanentCoroutine,
+                                afterSelectPermanentCoroutine: null,
+                                mode: SelectPermanentEffect.Mode.Custom,
+                                cardEffect: activateClass);
+
+                            selectPermanentEffect.SetUpCustomMessage(
+                                "Select 1 Digimon which has digivolution cards.",
+                                "The opponent is selecting 1 Digimon which has digivolution cards.");
+
+                            yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                            IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                            {
+                                if (permanent.DigivolutionCards.Count(CanSelectCardCondition) >= 1)
+                                {
+                                    maxCount = Math.Min(1,
+                                        permanent.DigivolutionCards.Count(CanSelectCardCondition));
+
+                                    SelectCardEffect selectCardEffect =
+                                        GManager.instance.GetComponent<SelectCardEffect>();
+
+                                    selectCardEffect.SetUp(
+                                        canTargetCondition: CanSelectCardCondition,
+                                        canTargetCondition_ByPreSelecetedList: null,
+                                        canEndSelectCondition: null,
+                                        canNoSelect: () => true,
+                                        selectCardCoroutine: SelectCardCoroutine,
+                                        afterSelectCardCoroutine: null,
+                                        message: "Select 1 digivolution card to play.",
+                                        maxCount: maxCount,
+                                        canEndNotMax: false,
+                                        isShowOpponent: true,
+                                        mode: SelectCardEffect.Mode.Custom,
+                                        root: SelectCardEffect.Root.Custom,
+                                        customRootCardList: permanent.DigivolutionCards,
+                                        canLookReverseCard: true,
+                                        selectPlayer: card.Owner,
+                                        cardEffect: activateClass);
+
+                                    selectCardEffect.SetUpCustomMessage(
+                                        "Select 1 digivolution card to play.",
+                                        "The opponent is selecting 1 digivolution card to play.");
+                                    selectCardEffect.SetUpCustomMessage_ShowCard("Played Card");
+
+                                    yield return StartCoroutine(selectCardEffect.Activate());
+                                }
+                            }
+                        }
+
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(
+                            cardSources: selectedCards, activateClass: activateClass, payCost: false, isTapped: false,
+                            root: (fromTrash) ? SelectCardEffect.Root.Trash : SelectCardEffect.Root.DigivolutionCards,
+                            activateETB: true));
+
+                        if (selectedCards.Count > 0)
+                        {
+                            Permanent selectedPermanent = selectedCards[0].PermanentOfThisCard();
+
+                            ActivateClass activateDebuffClass = new ActivateClass();
+                            activateDebuffClass.SetUpICardEffect("Return this Digimon to the hand", CanUseDebuffCondition,
+                                selectedPermanent.TopCard);
+                            activateDebuffClass.SetUpActivateClass(CanActivateDebuffCondition, ActivateDebuffCoroutine, -1, false,
+                                EffectDebuffDescription());
+                            activateDebuffClass.SetEffectSourcePermanent(selectedPermanent);
+                            selectedPermanent.UntilOpponentTurnEndEffects.Add(GetCardEffect);
+
+                            if (!selectedPermanent.TopCard.CanNotBeAffected(activateClass))
+                            {
+                                yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>()
+                                    .CreateDebuffEffect(selectedPermanent));
+                            }
+
+                            string EffectDebuffDescription()
+                            {
+                                return "[End of Opponent's Turn] Return this Digimon to the hand.";
+                            }
+
+                            bool CanUseDebuffCondition(Hashtable debuffHashtable)
+                            {
+                                return CardEffectCommons.IsPermanentExistsOnBattleArea(selectedPermanent) &&
+                                       GManager.instance.turnStateMachine.gameContext.TurnPlayer != selectedPermanent.TopCard.Owner;
+                            }
+
+                            bool CanActivateDebuffCondition(Hashtable debuffHashtable)
+                            {
+                                return CardEffectCommons.IsPermanentExistsOnBattleArea(selectedPermanent) &&
+                                       !selectedPermanent.TopCard.CanNotBeAffected(activateClass);
+                            }
+
+                            IEnumerator ActivateDebuffCoroutine(Hashtable debuffHashtable)
+                            {
+                                if (CardEffectCommons.IsPermanentExistsOnBattleArea(selectedPermanent))
+                                {
+                                    yield return ContinuousController.instance.StartCoroutine(
+                                        CardEffectCommons.BouncePeremanentAndProcessAccordingToResult(
+                                            targetPermanents: new List<Permanent>() { selectedPermanent },
+                                            activateClass: activateDebuffClass,
+                                            successProcess: null,
+                                            failureProcess: null));
+                                }
+                            }
+
+                            ICardEffect GetCardEffect(EffectTiming debuffTiming)
+                            {
+                                if (debuffTiming == EffectTiming.OnEndTurn)
+                                {
+                                    return activateDebuffClass;
+                                }
+
+                                return null;
+                            }
+                        }
+                    }
+                }
+            }
+
+            #endregion
+
+            #region All Turns - ESS
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Return 1 of your opponent's level 3 Digimon to the hand", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDescription());
+                activateClass.SetIsInheritedEffect(true);
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[All Turns] When an effect plays or digivolves an opponent's Digimon, if you have a Tamer, this Digimon may digivolve into [Imperialdramon: Fighter Mode] in your hand without paying the cost.";
+                }
+
+                bool IsOwnDigimon(Permanent permanent)
+                {
+                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card);
+                }
+
+                bool CanSelectOpponentPermanentCondition(Permanent permanent)
+                {
+                    return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card) &&
+                           permanent.TopCard.HasLevel &&
+                           permanent.TopCard.IsLevel3;
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnPermanentPlay(hashtable, IsOwnDigimon) &&
+                           CardEffectCommons.IsByEffect(hashtable, null);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card) &&
+                           CardEffectCommons.HasMatchConditionPermanent(CanSelectOpponentPermanentCondition);
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectOpponentPermanentCondition))
+                    {
+                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectOpponentPermanentCondition));
+
+                        SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectOpponentPermanentCondition,
+                            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/CerberusmonWerewolfMode_BT17_025.cs.meta

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

+ 308 - 0
Assets/CardEffect/BT17/Blue/DavisMotomiyaAndKenIchijoji_BT17_084.cs

@@ -0,0 +1,308 @@
+using System.Collections;
+using System.Collections.Generic;
+using System;
+using System.Linq;
+
+namespace DCGO.CardEffects.BT17
+{
+    public class DavisMotomiyaAndKenIchijoji_BT17_084 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            #region Start of Your Turn
+
+            if (timing == EffectTiming.OnStartTurn)
+            {
+                cardEffects.Add(CardEffectFactory.SetMemoryTo3TamerEffect(card));
+            }
+
+            #endregion
+
+            #region All Turns
+
+            if (timing == EffectTiming.WhenPermanentWouldBeDeleted)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Play level 4 or lower Digimon card from digivolution cards of deleted Digimon",
+                    CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDescription());
+                activateClass.SetHashString("PlaySource_BT17_084");
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[All Turns] When one of your level 5 or higher Digimon with the [Free] trait would be deleted in battle, by suspending this Tamer, you may play 1 level 4 or lower Digimon card from that Digimon's digivolution cards without paying the cost.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.CanTriggerWhenPermanentRemoveField(hashtable, IsOwnerPermanentCondition))
+                        {
+                            if (CardEffectCommons.IsByBattle(hashtable))
+                            {
+                                return true;
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool IsOwnerPermanentCondition(Permanent permanent)
+                {
+                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card) &&
+                           permanent.Level <= 5 &&
+                           permanent.TopCard.ContainsTraits("Free") &&
+                           permanent.DigivolutionCards.Count(CanSelectSourceCardCondition) >= 1;
+                }
+
+                bool IsOwnerPermanentToBeDeletedCondition(Permanent permanent)
+                {
+                    return IsOwnerPermanentCondition(permanent) && permanent.willBeRemoveField;
+                }
+
+                bool CanSelectSourceCardCondition(CardSource cardSource)
+                {
+                    return cardSource.IsDigimon && cardSource.Level <= 4;
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.CanActivateSuspendCostEffect(card))
+                        {
+                            return CardEffectCommons.HasMatchConditionOwnersPermanent(card, IsOwnerPermanentCondition);
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    yield return ContinuousController.instance.StartCoroutine(
+                        new SuspendPermanentsClass(new List<Permanent>() { card.PermanentOfThisCard() },
+                            CardEffectCommons.CardEffectHashtable(activateClass)).Tap());
+
+                    if (CardEffectCommons.HasMatchConditionPermanent(IsOwnerPermanentToBeDeletedCondition))
+                    {
+                        int maxCount = Math.Min(1,
+                            CardEffectCommons.MatchConditionPermanentCount(IsOwnerPermanentToBeDeletedCondition));
+
+                        SelectPermanentEffect selectPermanentEffect =
+                            GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: IsOwnerPermanentToBeDeletedCondition,
+                            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 which has digivolution cards.",
+                            "The opponent is selecting 1 Digimon which has digivolution cards.");
+
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                        IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                        {
+                            if (permanent != null)
+                            {
+                                if (permanent.DigivolutionCards.Count(CanSelectSourceCardCondition) >= 1)
+                                {
+                                    maxCount = Math.Min(1,
+                                        permanent.DigivolutionCards.Count(CanSelectSourceCardCondition));
+
+                                    List<CardSource> selectedCards = new List<CardSource>();
+
+                                    SelectCardEffect selectCardEffect =
+                                        GManager.instance.GetComponent<SelectCardEffect>();
+
+                                    selectCardEffect.SetUp(
+                                        canTargetCondition: CanSelectSourceCardCondition,
+                                        canTargetCondition_ByPreSelecetedList: null,
+                                        canEndSelectCondition: null,
+                                        canNoSelect: () => true,
+                                        selectCardCoroutine: SelectCardCoroutine,
+                                        afterSelectCardCoroutine: null,
+                                        message: "Select 1 digivolution card to play.",
+                                        maxCount: maxCount,
+                                        canEndNotMax: false,
+                                        isShowOpponent: true,
+                                        mode: SelectCardEffect.Mode.Custom,
+                                        root: SelectCardEffect.Root.Custom,
+                                        customRootCardList: permanent.DigivolutionCards,
+                                        canLookReverseCard: true,
+                                        selectPlayer: card.Owner,
+                                        cardEffect: activateClass);
+
+                                    selectCardEffect.SetUpCustomMessage(
+                                        "Select 1 digivolution card to play.",
+                                        "The opponent is selecting 1 digivolution card to play.");
+                                    selectCardEffect.SetUpCustomMessage_ShowCard("Played Card");
+
+                                    yield return StartCoroutine(selectCardEffect.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.DigivolutionCards,
+                                            activateETB: true));
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+
+            #endregion
+
+            #region End of Your Turn
+
+            if (timing == EffectTiming.OnEndTurn)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("1 of your Digimon with the [Free] trait can attack a Digimon", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDescription());
+                activateClass.SetHashString("Attack_BT17_084");
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[End of Your Turn] 1 of your Digimon with the [Free] trait may attack an opponent's Digimon.";
+                }
+
+                bool IsFreePermanentCondition(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
+                    {
+                        if (permanent.TopCard.ContainsTraits("Free"))
+                        {
+                            return permanent.CanAttack(activateClass);
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.IsOwnerTurn(card))
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.HasMatchConditionPermanent(IsFreePermanentCondition))
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.HasMatchConditionPermanent(IsFreePermanentCondition))
+                    {
+                        Permanent selectedPermanent = null;
+
+                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(IsFreePermanentCondition));
+
+                        SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: IsFreePermanentCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: maxCount,
+                            canNoSelect: false,
+                            canEndNotMax: false,
+                            selectPermanentCoroutine: SelectPermanentCoroutine,
+                            afterSelectPermanentCoroutine: null,
+                            mode: SelectPermanentEffect.Mode.Custom,
+                            cardEffect: activateClass);
+
+                        selectPermanentEffect.SetUpCustomMessage(
+                            "Select 1 Digimon that will attack.",
+                            "The opponent is selecting 1 Digimon that will attack.");
+
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                        IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                        {
+                            selectedPermanent = permanent;
+                            yield return null;
+                        }
+
+                        if (selectedPermanent != null)
+                        {
+                            if (selectedPermanent.CanAttack(activateClass))
+                            {
+                                if (selectedPermanent.CanAttackTargetDigimon(null, activateClass))
+                                {
+                                    SelectAttackEffect selectAttackEffect = GManager.instance.GetComponent<SelectAttackEffect>();
+
+                                    selectAttackEffect.SetUp(
+                                        attacker: selectedPermanent,
+                                        canAttackPlayerCondition: () => false,
+                                        defenderCondition: _ => true,
+                                        cardEffect: activateClass);
+
+                                    yield return ContinuousController.instance.StartCoroutine(selectAttackEffect.Activate());
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+
+            #endregion
+
+            #region Security Effect
+
+            if (timing == EffectTiming.SecuritySkill)
+            {
+                cardEffects.Add(CardEffectFactory.PlaySelfTamerSecurityEffect(card));
+            }
+
+            #endregion
+
+            return cardEffects;
+        }
+    }
+}

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

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

+ 340 - 0
Assets/CardEffect/BT17/Blue/Gabumon_BT17_019.cs

@@ -0,0 +1,340 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using System.Linq;
+using System;
+using Photon.Pun;
+
+namespace DCGO.CardEffects.BT17
+{
+    public class Gabumon_BT17_019 : 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.CardNames.Contains("Tsunomon");
+                }
+
+                cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(
+                    permanentCondition: PermanentCondition, digivolutionCost: 0, ignoreDigivolutionRequirement: false,
+                    card: card, condition: null));
+            }
+
+            #endregion
+
+            #region Start of Your Main Phase
+
+            if (timing == EffectTiming.OnStartMainPhase)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Draw 1", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false,
+                    EffectDescription());
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[Start of Your Main Phase] If you have a Tamer with [Matt Ishida] in its name, [Draw 1].";
+                }
+
+                bool OwnTamerPermanentCondition(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(permanent, card))
+                    {
+                        if (permanent.IsTamer)
+                        {
+                            if (permanent.TopCard.ContainsCardName("Matt Ishida") || permanent.TopCard.ContainsCardName("MattIshida"))
+
+                            {
+                                return true;
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.IsOwnerTurn(card))
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, OwnTamerPermanentCondition))
+                        {
+                            if (card.Owner.LibraryCards.Count >= 1)
+                            {
+                                return true;
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    yield return ContinuousController.instance.StartCoroutine(
+                        new DrawClass(card.Owner, 1, activateClass).Draw());
+                }
+            }
+
+            #endregion
+
+            #region End of Your Turn - ESS
+
+            if (timing == EffectTiming.OnEndTurn)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("DNA digivolve this Digimon", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true,
+                    EffectDescription());
+                activateClass.SetIsInheritedEffect(true);
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[End of Your Turn] This Digimon and another of your Digimon may DNA digivolve into a Digimon card in the hand.";
+                }
+
+                bool CanSelectCardCondition(CardSource cardSource)
+                {
+                    if (cardSource != null)
+                    {
+                        if (cardSource.IsDigimon)
+                        {
+                            if (cardSource.Owner == card.Owner)
+                            {
+                                if (cardSource.CanPlayJogress(true))
+                                {
+                                    if (isExistOnField(card))
+                                    {
+                                        if (cardSource.CanJogressFromTargetPermanent(card.PermanentOfThisCard(), true))
+                                        {
+                                            return true;
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if (isExistOnField(card))
+                    {
+                        return true;
+                    }
+
+                    return false;
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.IsOwnerTurn(card))
+                        {
+                            if (card.Owner.HandCards.Count >= 1)
+                            {
+                                if (CardEffectCommons.HasMatchConditionOwnersPermanent(card,
+                                        (permanent) => permanent.IsDigimon && permanent != card.PermanentOfThisCard()))
+                                {
+                                    return true;
+                                }
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (isExistOnField(card))
+                    {
+                        if (card.Owner.GetBattleAreaDigimons().Contains(card.PermanentOfThisCard()))
+                        {
+                            if (card.Owner.HandCards.Count(CanSelectCardCondition) >= 1)
+                            {
+                                List<CardSource> selectedCards = new List<CardSource>();
+
+                                int maxCount = 1;
+
+                                SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
+
+                                selectHandEffect.SetUp(
+                                    selectPlayer: card.Owner,
+                                    canTargetCondition: CanSelectCardCondition,
+                                    canTargetCondition_ByPreSelecetedList: null,
+                                    canEndSelectCondition: null,
+                                    maxCount: maxCount,
+                                    canNoSelect: true,
+                                    canEndNotMax: false,
+                                    isShowOpponent: true,
+                                    selectCardCoroutine: SelectCardCoroutine,
+                                    afterSelectCardCoroutine: null,
+                                    mode: SelectHandEffect.Mode.Custom,
+                                    cardEffect: activateClass);
+
+                                selectHandEffect.SetUpCustomMessage("Select 1 card to DNA digivolve.",
+                                    "The opponent is selecting 1 card to DNA digivolve.");
+                                selectHandEffect.SetNotShowCard();
+
+                                yield return StartCoroutine(selectHandEffect.Activate());
+
+                                IEnumerator SelectCardCoroutine(CardSource cardSource)
+                                {
+                                    selectedCards.Add(cardSource);
+
+                                    yield return null;
+                                }
+
+                                if (selectedCards.Count >= 1)
+                                {
+                                    foreach (CardSource selectedCard in selectedCards)
+                                    {
+                                        if (selectedCard.CanPlayJogress(true) &&
+                                            selectedCard.CanJogressFromTargetPermanent(card.PermanentOfThisCard(),
+                                                true))
+                                        {
+                                            JogressEvoRootsFrameIDs = Array.Empty<int>();
+
+                                            yield return GManager.instance.photonWaitController.StartWait(
+                                                "Gabumon_BT17_019");
+
+                                            if (card.Owner.isYou || GManager.instance.IsAI)
+                                            {
+                                                GManager.instance.selectJogressEffect.SetUp_SelectDigivolutionRoots
+                                                (card: selectedCard,
+                                                    isLocal: true,
+                                                    isPayCost: true,
+                                                    canNoSelect: true,
+                                                    endSelectCoroutine_SelectDigivolutionRoots:
+                                                    EndSelectCoroutineSelectDigivolutionRoots,
+                                                    noSelectCoroutine: null);
+
+                                                GManager.instance.selectJogressEffect.SetUpCustomPermanentConditions(
+                                                    new Func<Permanent, bool>[]
+                                                        { (permanent) => permanent == card.PermanentOfThisCard() });
+
+                                                yield return ContinuousController.instance.StartCoroutine(
+                                                    GManager.instance.selectJogressEffect.SelectDigivolutionRoots());
+
+                                                IEnumerator EndSelectCoroutineSelectDigivolutionRoots(
+                                                    List<Permanent> permanents)
+                                                {
+                                                    permanents = permanents.Distinct().ToList();
+
+                                                    if (permanents.Count == 2)
+                                                    {
+                                                        JogressEvoRootsFrameIDs = new int[2];
+
+                                                        for (int i = 0; i < permanents.Count; i++)
+                                                        {
+                                                            if (i < JogressEvoRootsFrameIDs.Length)
+                                                            {
+                                                                JogressEvoRootsFrameIDs[i] =
+                                                                    permanents[i].PermanentFrame.FrameID;
+                                                            }
+                                                        }
+                                                    }
+
+                                                    if (!permanents.Contains(card.PermanentOfThisCard()))
+                                                    {
+                                                        JogressEvoRootsFrameIDs = Array.Empty<int>();
+                                                    }
+
+                                                    yield return null;
+                                                }
+
+                                                photonView.RPC("SetJogressEvoRootsFrameIDs", RpcTarget.All,
+                                                    JogressEvoRootsFrameIDs);
+                                            }
+
+                                            else
+                                            {
+                                                GManager.instance.commandText.OpenCommandText(
+                                                    "The opponent is choosing a card to DNA digivolve.");
+                                            }
+
+                                            yield return new WaitWhile(() => !endSelect);
+                                            endSelect = false;
+
+                                            GManager.instance.commandText.CloseCommandText();
+                                            yield return new WaitWhile(() =>
+                                                GManager.instance.commandText.gameObject.activeSelf);
+
+                                            if (JogressEvoRootsFrameIDs.Length == 2)
+                                            {
+                                                yield return ContinuousController.instance.StartCoroutine(GManager
+                                                    .instance.GetComponent<Effects>()
+                                                    .ShowCardEffect(new List<CardSource>() { selectedCard },
+                                                        "Played Card", true, true));
+
+                                                PlayCardClass playCard = new PlayCardClass(
+                                                    cardSources: new List<CardSource>() { selectedCard },
+                                                    hashtable: CardEffectCommons.CardEffectHashtable(activateClass),
+                                                    payCost: true,
+                                                    targetPermanent: null,
+                                                    isTapped: false,
+                                                    root: SelectCardEffect.Root.Hand,
+                                                    activateETB: true);
+
+                                                playCard.SetJogress(JogressEvoRootsFrameIDs);
+
+                                                yield return ContinuousController.instance.StartCoroutine(
+                                                    playCard.PlayCard());
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+
+            #endregion
+
+            return cardEffects;
+        }
+
+        #region Photon DNA ESS
+
+        bool endSelect;
+        int[] JogressEvoRootsFrameIDs = Array.Empty<int>();
+
+        [PunRPC]
+        public void SetJogressEvoRootsFrameIDs(int[] jogressEvoRootsFrameIDs)
+        {
+            this.JogressEvoRootsFrameIDs = jogressEvoRootsFrameIDs;
+            endSelect = true;
+        }
+
+        #endregion
+    }
+}

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

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

+ 220 - 0
Assets/CardEffect/BT17/Blue/KendoGarurumon_BT17_023.cs

@@ -0,0 +1,220 @@
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace DCGO.CardEffects.BT17
+{
+    public class KendoGarurumon_BT17_023 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            #region Alternate Digivolution
+
+            // Koji Minamoto
+            if (timing == EffectTiming.None)
+            {
+                bool Condition()
+                {
+                    return card.Owner.HandCards.Contains(card);
+                }
+
+                bool PermanentCondition(Permanent targetPermanent)
+                {
+                    return targetPermanent.TopCard.ContainsCardName("Koji  Minamoto") ||
+                           targetPermanent.TopCard.ContainsCardName("KojiMinamoto");
+                }
+
+                cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(
+                    permanentCondition: PermanentCondition, digivolutionCost: 2, ignoreDigivolutionRequirement: false,
+                    card: card, condition: Condition));
+            }
+
+            // Lobomon
+            if (timing == EffectTiming.None)
+            {
+                bool PermanentCondition(Permanent targetPermanent)
+                {
+                    return targetPermanent.TopCard.ContainsCardName("Lobomon");
+                }
+
+                cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(
+                    permanentCondition: PermanentCondition, digivolutionCost: 1, ignoreDigivolutionRequirement: false,
+                    card: card, condition: null));
+            }
+
+            // Any yellow tamer
+            if (timing == EffectTiming.None)
+            {
+                bool Condition()
+                {
+                    return card.Owner.HandCards.Contains(card);
+                }
+
+                bool PermanentCondition(Permanent targetPermanent)
+                {
+                    return targetPermanent.IsTamer && targetPermanent.TopCard.CardColors.Contains(CardColor.Yellow);
+                }
+
+                cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(
+                    permanentCondition: PermanentCondition, digivolutionCost: 3, ignoreDigivolutionRequirement: false,
+                    card: card, condition: Condition));
+            }
+
+            #endregion
+
+            #region When Attacking Draw 1
+
+            if (timing == EffectTiming.OnAllyAttack)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Draw 1", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false,
+                    EffectDescription());
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[When Attacking] [Draw 1].";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnAttack(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (card.Owner.LibraryCards.Count >= 1)
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    yield return ContinuousController.instance.StartCoroutine(
+                        new DrawClass(card.Owner, 1, activateClass).Draw());
+                }
+            }
+
+            #endregion
+
+            #region When Attacking
+
+            if (timing == EffectTiming.OnAllyAttack)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("This Digimon digivolves", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true,
+                    EffectDescription());
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[When Attacking] This Digimon may digivolve into a Digimon card with the [Hybrid] trait in the hand with the digivolution cost reduced by 1.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnAttack(hashtable, card);
+                }
+
+                bool IsHybridDigimonCardCondition(CardSource cardSource)
+                {
+                    return cardSource.IsDigimon && cardSource.ContainsTraits("Hybrid");
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (card.Owner.HandCards.Count(IsHybridDigimonCardCondition) >= 1)
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (card.Owner.HandCards.Count(IsHybridDigimonCardCondition) >= 1)
+                    {
+                        yield return ContinuousController.instance.StartCoroutine(
+                            CardEffectCommons.DigivolveIntoHandOrTrashCard(
+                                targetPermanent: card.PermanentOfThisCard(),
+                                cardCondition: IsHybridDigimonCardCondition,
+                                payCost: true,
+                                reduceCostTuple: (reduceCost: 1, reduceCostCardCondition: null),
+                                fixedCostTuple: null,
+                                ignoreDigivolutionRequirementFixedCost: -1,
+                                isHand: true,
+                                activateClass: activateClass,
+                                successProcess: null));
+                    }
+                }
+            }
+
+            #endregion
+
+            #region When Attacking - ESS
+
+            if (timing == EffectTiming.OnAllyAttack)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Draw 1", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false,
+                    EffectDescription());
+                activateClass.SetIsInheritedEffect(true);
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[When Attacking] If you have 7 or fewer cards in your hand, [Draw 1].";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnAttack(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (card.Owner.HandCards.Count <= 7)
+                        {
+                            if (card.Owner.LibraryCards.Count >= 1)
+                            {
+                                return true;
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    yield return ContinuousController.instance.StartCoroutine(
+                        new DrawClass(card.Owner, 1, activateClass).Draw());
+                }
+            }
+
+            #endregion
+
+            return cardEffects;
+        }
+    }
+}

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

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

+ 83 - 0
Assets/CardEffect/BT17/Blue/KojiMinamoto_BT17_083.cs

@@ -0,0 +1,83 @@
+using System.Collections;
+using System.Collections.Generic;
+
+namespace DCGO.CardEffects.BT17
+{
+    public class KojiMinamoto_BT17_083 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            #region Security Effect
+
+            if (timing == EffectTiming.SecuritySkill)
+            {
+                cardEffects.Add(CardEffectFactory.PlaySelfTamerSecurityEffect(card));
+            }
+
+            #endregion
+
+            #region Start of Your Turn
+
+            if (timing == EffectTiming.OnStartTurn)
+            {
+                cardEffects.Add(CardEffectFactory.SetMemoryTo3TamerEffect(card));
+            }
+
+            #endregion
+
+            #region Your Turn
+
+            if (timing == EffectTiming.OnAddHand)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Gain 1 Memory and Jamming", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDiscription());
+                activateClass.SetIsInheritedEffect(true);
+                activateClass.SetHashString("Gain1MemoryJamming_BT17_083");
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return
+                        "[Your Turn] [Once Per Turn] When an effect adds cards to your hand, gain 1 memory. Then, this Digimon gains [Jamming] for the turn.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.IsOwnerTurn(card))
+                        {
+                            return CardEffectCommons.CanTriggerWhenAddHand(hashtable,
+                                player => player == card.Owner,
+                                cardEffect => cardEffect != null);
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnBattleArea(card);
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    yield return ContinuousController.instance.StartCoroutine(
+                        card.Owner.AddMemory(1, activateClass));
+
+                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainJamming(
+                        targetPermanent: card.PermanentOfThisCard(), effectDuration: EffectDuration.UntilEachTurnEnd,
+                        activateClass: activateClass));
+                }
+            }
+
+            #endregion
+
+            return cardEffects;
+        }
+    }
+}

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

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

+ 157 - 0
Assets/CardEffect/BT17/Blue/Labramon_BT17_021.cs

@@ -0,0 +1,157 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace DCGO.CardEffects.BT17
+{
+    public class Labramon_BT17_021 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            #region On Play
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Place 1 card to digivolution cards to Draw 1", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDescription());
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[On Play]  By placing 1 [Seasarmon] or 1 level 3 blue Digimon card from your hand as this Digimon's bottom digivolution card, <Draw 1>.";
+                }
+
+                bool CanSelectHandCardCondition(CardSource cardSource)
+                {
+                    if (cardSource.IsDigimon)
+                    {
+                        return cardSource.ContainsCardName("Seasarmon") ||
+                               (cardSource.IsLevel3 && cardSource.CardColors.Contains(CardColor.Blue));
+                    }
+
+                    return false;
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (card.Owner.HandCards.Count(CanSelectHandCardCondition) >= 1)
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (card.Owner.HandCards.Count(CanSelectHandCardCondition) >= 1)
+                        {
+                            List<CardSource> selectedCards = new List<CardSource>();
+
+                            int maxCount = Math.Min(1, card.Owner.HandCards.Count(CanSelectHandCardCondition));
+
+                            SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
+
+                            selectHandEffect.SetUp(
+                                selectPlayer: card.Owner,
+                                canTargetCondition: CanSelectHandCardCondition,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                maxCount: maxCount,
+                                canNoSelect: true,
+                                canEndNotMax: false,
+                                isShowOpponent: true,
+                                selectCardCoroutine: SelectCardCoroutine,
+                                afterSelectCardCoroutine: null,
+                                mode: SelectHandEffect.Mode.Custom,
+                                cardEffect: activateClass);
+
+                            selectHandEffect.SetUpCustomMessage("Select 1 card to place on bottom of digivolution cards.",
+                                "The opponent is selecting 1 card to place on bottom of digivolution cards.");
+                            selectHandEffect.SetUpCustomMessage_ShowCard("Digivolution Card");
+
+                            yield return StartCoroutine(selectHandEffect.Activate());
+
+                            IEnumerator SelectCardCoroutine(CardSource cardSource)
+                            {
+                                selectedCards.Add(cardSource);
+                                yield return null;
+                            }
+
+                            if (selectedCards.Count >= 1)
+                            {
+                                yield return ContinuousController.instance.StartCoroutine(card.PermanentOfThisCard()
+                                    .AddDigivolutionCardsBottom(
+                                        selectedCards,
+                                        activateClass));
+
+                                yield return ContinuousController.instance.StartCoroutine(
+                                    new DrawClass(card.Owner, 1, activateClass).Draw());
+                            }
+                        }
+                    }
+                }
+            }
+
+            #endregion
+
+            #region When Attacking - ESS
+
+            if (timing == EffectTiming.OnAllyAttack)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Gain 1 Memory", 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 <Jamming>, gain 1 memory.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnAttack(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (card.PermanentOfThisCard().HasJamming)
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    yield return ContinuousController.instance.StartCoroutine(card.Owner.AddMemory(1, activateClass));
+                }
+            }
+
+            #endregion
+
+            return cardEffects;
+        }
+    }
+}

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

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

+ 228 - 0
Assets/CardEffect/BT17/Blue/Lobomon_BT17_022.cs

@@ -0,0 +1,228 @@
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace DCGO.CardEffects.BT17
+{
+    public class Lobomon_BT17_022 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            #region Alternate Digivolution
+
+            // Koji Minamoto
+            if (timing == EffectTiming.None)
+            {
+                bool Condition()
+                {
+                    return card.Owner.HandCards.Contains(card);
+                }
+
+                bool PermanentCondition(Permanent targetPermanent)
+                {
+                    return targetPermanent.TopCard.ContainsCardName("Koji  Minamoto") ||
+                           targetPermanent.TopCard.ContainsCardName("KojiMinamoto");
+                }
+
+                cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(
+                    permanentCondition: PermanentCondition, digivolutionCost: 2, ignoreDigivolutionRequirement: false,
+                    card: card, condition: Condition));
+            }
+
+            // KendoGarurumon
+            if (timing == EffectTiming.None)
+            {
+                bool PermanentCondition(Permanent targetPermanent)
+                {
+                    return targetPermanent.TopCard.ContainsCardName("KendoGarurumon");
+                }
+
+                cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(
+                    permanentCondition: PermanentCondition, digivolutionCost: 1, ignoreDigivolutionRequirement: false,
+                    card: card, condition: null));
+            }
+
+            // Any yellow tamer
+            if (timing == EffectTiming.None)
+            {
+                bool Condition()
+                {
+                    return card.Owner.HandCards.Contains(card);
+                }
+
+                bool PermanentCondition(Permanent targetPermanent)
+                {
+                    return targetPermanent.IsTamer && targetPermanent.TopCard.CardColors.Contains(CardColor.Yellow);
+                }
+
+                cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(
+                    permanentCondition: PermanentCondition, digivolutionCost: 3, ignoreDigivolutionRequirement: false,
+                    card: card, condition: Condition));
+            }
+
+            #endregion
+
+            #region When Digivolving
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("This Digimon digivolves into [AncientGarurumon]", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true,
+                    EffectDescription());
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[When Digivolving] If [KendoGarurumon] is in this Digimon's digivolution cards or you have a black or purple Digimon or Tamer, this Digimon may digivolve into [KendoGarurumon] in the hand for a digivolution cost of 3, ignoring its digivolution requirements. If digivolved by this effect, delete this Digimon at the end of the turn.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (card.PermanentOfThisCard().DigivolutionCards.Count(cardSource =>
+                                cardSource.CardNames.Contains("KendoGarurumon")) >= 1)
+                        {
+                            return true;
+                        }
+
+                        if (card.Owner.HandCards.Count >= 1)
+                        {
+                            if (CardEffectCommons.HasMatchConditionOwnersPermanent(card,
+                                    permanent =>
+                                        permanent.TopCard.CardColors.Contains(CardColor.Black) ||
+                                        permanent.TopCard.CardColors.Contains(CardColor.Purple)))
+                            {
+                                return true;
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        Permanent thisPermanent = card.PermanentOfThisCard();
+
+                        yield return ContinuousController.instance.StartCoroutine(
+                            CardEffectCommons.DigivolveIntoHandOrTrashCard(
+                                targetPermanent: thisPermanent,
+                                cardCondition: cardSource =>
+                                    cardSource.IsDigimon && cardSource.ContainsCardName("AncientGarurumon"),
+                                payCost: true,
+                                reduceCostTuple: null,
+                                fixedCostTuple: null,
+                                ignoreDigivolutionRequirementFixedCost: 3,
+                                isHand: true,
+                                activateClass: activateClass,
+                                successProcess: SuccessProcess()));
+
+                        IEnumerator SuccessProcess()
+                        {
+                            ActivateClass activateClass1 = new ActivateClass();
+                            activateClass1.SetUpICardEffect("Delete this Digimon", CanUseSuccessCondition, card);
+                            activateClass1.SetUpActivateClass(CanActivateSuccessCondition, ActivateSuccessCoroutine, -1,
+                                false, "");
+                            activateClass1.SetEffectSourcePermanent(thisPermanent);
+                            CardEffectCommons.AddEffectToPlayer(effectDuration: EffectDuration.UntilEachTurnEnd,
+                                card: card, cardEffect: activateClass1, timing: EffectTiming.OnEndTurn);
+
+                            bool CanUseSuccessCondition(Hashtable successHashtable)
+                            {
+                                return true;
+                            }
+
+                            bool CanActivateSuccessCondition(Hashtable successHashtable)
+                            {
+                                if (thisPermanent.TopCard != null)
+                                {
+                                    if (thisPermanent.CanBeDestroyedBySkill(activateClass1))
+                                    {
+                                        if (!thisPermanent.TopCard.CanNotBeAffected(activateClass1))
+                                        {
+                                            return true;
+                                        }
+                                    }
+                                }
+
+                                return false;
+                            }
+
+                            IEnumerator ActivateSuccessCoroutine(Hashtable successHashtable)
+                            {
+                                yield return ContinuousController.instance.StartCoroutine(
+                                    new DestroyPermanentsClass(new List<Permanent>() { thisPermanent },
+                                        CardEffectCommons.CardEffectHashtable(activateClass1)).Destroy());
+                            }
+
+                            yield return null;
+                        }
+                    }
+                }
+            }
+
+            #endregion
+
+            #region When Attacking - ESS
+
+            if (timing == EffectTiming.OnAllyAttack)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Draw 1", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false,
+                    EffectDescription());
+                activateClass.SetIsInheritedEffect(true);
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[When Attacking] If you have 7 or fewer cards in your hand, [Draw 1].";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnAttack(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (card.Owner.HandCards.Count <= 7)
+                        {
+                            if (card.Owner.LibraryCards.Count >= 1)
+                            {
+                                return true;
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    yield return ContinuousController.instance.StartCoroutine(
+                        new DrawClass(card.Owner, 1, activateClass).Draw());
+                }
+            }
+
+            #endregion
+
+            return cardEffects;
+        }
+    }
+}

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

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 3330d4f957a19a64984f868c169b685f
+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.BT17
+{
+    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: 

+ 332 - 0
Assets/CardEffect/BT17/Blue/MinamiUehara_BT17_082.cs

@@ -0,0 +1,332 @@
+using System.Collections;
+using System.Collections.Generic;
+using System;
+using System.Linq;
+
+namespace DCGO.CardEffects.BT17
+{
+    public class MinamiUehara_BT17_082 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            #region On Play
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Play 1 [Labramon] or [Seasarmon] from hand or digivolution cards", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDescription());
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[On Play] You may play 1 [Labramon]/[Seasarmon] from your hand or from one of your Digimon's digivolution cards without paying the cost.";
+                }
+
+                bool CanSelectCardCondition(CardSource cardSource)
+                {
+                    if (CardEffectCommons.CanPlayAsNewPermanent(cardSource: cardSource, payCost: false, cardEffect: activateClass))
+                    {
+                        if (cardSource.IsDigimon)
+                        {
+                            return cardSource.ContainsCardName("Labramon") ||
+                                   cardSource.ContainsCardName("Seasarmon");
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanSelectPermanentCondition(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
+                    {
+                        if (permanent.DigivolutionCards.Count(CanSelectCardCondition) >= 1)
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (card.Owner.HandCards.Count >= 1)
+                        {
+                            return true;
+                        }
+
+                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    bool canSelectHand = card.Owner.HandCards.Count(CanSelectCardCondition) >= 1;
+                    bool canSelectDigivolutionCards = CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition);
+
+                    if (canSelectHand || canSelectDigivolutionCards)
+                    {
+                        if (canSelectHand && canSelectDigivolutionCards)
+                        {
+                            List<SelectionElement<bool>> selectionElements = new List<SelectionElement<bool>>
+                            {
+                                new(message: "From hand", value: true, spriteIndex: 0),
+                                new(message: "From digivolution cards", value: false, spriteIndex: 1),
+                            };
+
+                            string selectPlayerMessage = "From which area do you play a card?";
+                            string notSelectPlayerMessage = "The opponent is choosing from which area to play 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());
+
+                        bool fromHand = GManager.instance.userSelectionManager.SelectedBoolValue;
+
+                        List<CardSource> selectedCards = new List<CardSource>();
+
+                        IEnumerator SelectCardCoroutine(CardSource cardSource)
+                        {
+                            selectedCards.Add(cardSource);
+                            yield return null;
+                        }
+
+                        if (fromHand)
+                        {
+                            int maxCount = Math.Min(1, card.Owner.HandCards.Count(CanSelectCardCondition));
+
+                            SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
+
+                            selectHandEffect.SetUp(
+                                selectPlayer: card.Owner,
+                                canTargetCondition: CanSelectCardCondition,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                maxCount: maxCount,
+                                canNoSelect: true,
+                                canEndNotMax: false,
+                                isShowOpponent: true,
+                                selectCardCoroutine: SelectCardCoroutine,
+                                afterSelectCardCoroutine: null,
+                                mode: SelectHandEffect.Mode.Custom,
+                                cardEffect: activateClass);
+
+                            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());
+                        }
+
+                        else
+                        {
+                            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: true,
+                                canEndNotMax: false,
+                                selectPermanentCoroutine: SelectPermanentCoroutine,
+                                afterSelectPermanentCoroutine: null,
+                                mode: SelectPermanentEffect.Mode.Custom,
+                                cardEffect: activateClass);
+
+                            selectPermanentEffect.SetUpCustomMessage(
+                                "Select 1 Digimon which has digivolution cards.",
+                                "The opponent is selecting 1 Digimon which has digivolution cards.");
+
+                            yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                            IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                            {
+                                if (permanent.DigivolutionCards.Count(CanSelectCardCondition) >= 1)
+                                {
+                                    maxCount = Math.Min(1,
+                                        permanent.DigivolutionCards.Count(CanSelectCardCondition));
+
+                                    SelectCardEffect selectCardEffect =
+                                        GManager.instance.GetComponent<SelectCardEffect>();
+
+                                    selectCardEffect.SetUp(
+                                        canTargetCondition: CanSelectCardCondition,
+                                        canTargetCondition_ByPreSelecetedList: null,
+                                        canEndSelectCondition: null,
+                                        canNoSelect: () => true,
+                                        selectCardCoroutine: SelectCardCoroutine,
+                                        afterSelectCardCoroutine: null,
+                                        message: "Select 1 digivolution card to play.",
+                                        maxCount: maxCount,
+                                        canEndNotMax: false,
+                                        isShowOpponent: true,
+                                        mode: SelectCardEffect.Mode.Custom,
+                                        root: SelectCardEffect.Root.Custom,
+                                        customRootCardList: permanent.DigivolutionCards,
+                                        canLookReverseCard: true,
+                                        selectPlayer: card.Owner,
+                                        cardEffect: activateClass);
+
+                                    selectCardEffect.SetUpCustomMessage(
+                                        "Select 1 digivolution card to play.",
+                                        "The opponent is selecting 1 digivolution card to play.");
+                                    selectCardEffect.SetUpCustomMessage_ShowCard("Played Card");
+
+                                    yield return StartCoroutine(selectCardEffect.Activate());
+                                }
+                            }
+                        }
+
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(
+                            cardSources: selectedCards, activateClass: activateClass, payCost: false, isTapped: false,
+                            root: (fromHand) ? SelectCardEffect.Root.Hand : SelectCardEffect.Root.DigivolutionCards,
+                            activateETB: true));
+                    }
+                }
+            }
+
+            #endregion
+
+            #region Your Turn
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("1 of your blue Digimon gains [Rush] for the turn", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true,
+                    EffectDescription());
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[All Turns] When one of your Digimon is played from digivolution cards, by suspending this Tamer, 1 of your blue Digimon gains for the turn.";
+                }
+
+                bool PermanentCondition(Permanent permanent)
+                {
+                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card);
+                }
+
+                bool IsBluePermanentCondition(Permanent permanent)
+                {
+                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card) &&
+                           permanent.IsDigimon &&
+                           permanent.TopCard.CardColors.Contains(CardColor.Blue);
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.IsOwnerTurn(card))
+                        {
+                            if (CardEffectCommons.CanTriggerOnPermanentPlay(hashtable, PermanentCondition))
+                            {
+                                return CardEffectCommons.IsFromDigimonDigivolutionCards(hashtable);
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.CanActivateSuspendCostEffect(card))
+                        {
+                            return CardEffectCommons.HasMatchConditionOwnersPermanent(card, IsBluePermanentCondition);
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    yield return ContinuousController.instance.StartCoroutine(
+                        new SuspendPermanentsClass(new List<Permanent>() { card.PermanentOfThisCard() },
+                            CardEffectCommons.CardEffectHashtable(activateClass)).Tap());
+
+                    if (CardEffectCommons.HasMatchConditionPermanent(IsBluePermanentCondition))
+                    {
+                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(IsBluePermanentCondition));
+
+                        SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: IsBluePermanentCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: maxCount,
+                            canNoSelect: false,
+                            canEndNotMax: false,
+                            selectPermanentCoroutine: SelectPermanentCoroutine,
+                            afterSelectPermanentCoroutine: null,
+                            mode: SelectPermanentEffect.Mode.Custom,
+                            cardEffect: activateClass);
+
+                        selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon that will gain Rush.",
+                            "The opponent is selecting 1 Digimon that will gain Rush.");
+
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                        IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainRush(targetPermanent: permanent,
+                                effectDuration: EffectDuration.UntilEachTurnEnd, activateClass: activateClass));
+                        }
+                    }
+                }
+            }
+
+            #endregion
+
+            #region Security Effect
+
+            if (timing == EffectTiming.SecuritySkill)
+            {
+                cardEffects.Add(CardEffectFactory.PlaySelfTamerSecurityEffect(card));
+            }
+
+            #endregion
+
+            return cardEffects;
+        }
+    }
+}

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

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

+ 371 - 0
Assets/CardEffect/BT17/Blue/ReturntothePrimogenitor_BT17_097.cs

@@ -0,0 +1,371 @@
+using System.Collections;
+using System.Collections.Generic;
+using System;
+using System.Linq;
+
+namespace DCGO.CardEffects.BT17
+{
+    public class ReturntothePrimogenitor_BT17_097 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            #region Main Effect
+
+            if (timing == EffectTiming.OptionSkill)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Digivolve into level 5 or higher [Free] trait Digimon",
+                    CanUseCondition, card);
+                activateClass.SetUpActivateClass(null, ActivateCoroutine, -1, true, EffectDescription());
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[Main] 1 of your Digimon may digivolve into a level 5 or higher Digimon card with the [Free] trait in your hand with the digivolution cost reduced by 4. Then, place this card in the battle area.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOptionMainEffect(hashtable, card);
+                }
+
+                bool CanSelectHandCardCondition(CardSource cardSource)
+                {
+                    return cardSource.IsDigimon &&
+                           cardSource.Level >= 5 &&
+                           cardSource.CardTraits.Contains("Free");
+                }
+
+                bool CanSelectOwnPermanentCondition(Permanent permanent)
+                {
+                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card) &&
+                           card.Owner.HandCards.Where(CanSelectHandCardCondition).Any(cardSource =>
+                               cardSource.CanPlayCardTargetFrame(permanent.PermanentFrame, false, activateClass));
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectOwnPermanentCondition))
+                    {
+                        Permanent selectedPermanent = null;
+
+                        SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectOwnPermanentCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: 1,
+                            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: CanSelectHandCardCondition,
+                                payCost: true,
+                                reduceCostTuple: (reduceCost: 4, reduceCostCardCondition: null),
+                                fixedCostTuple: null,
+                                ignoreDigivolutionRequirementFixedCost: -1,
+                                isHand: true,
+                                activateClass: activateClass,
+                                successProcess: null));
+                        }
+                    }
+
+                    yield return ContinuousController.instance.StartCoroutine(
+                        CardEffectCommons.PlaceDelayOptionCards(card: card, cardEffect: activateClass));
+                }
+            }
+
+            #endregion
+
+            #region Delay Effect
+
+            if (timing == EffectTiming.WhenPermanentWouldBeDeleted)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect(
+                    "Digivolve into a Digimon card with [Imperialdramon] in its name in your hand to prevent deletion",
+                    CanUseCondition, card);
+                activateClass.SetUpActivateClass(null, ActivateCoroutine, -1, true, EffectDescription());
+                activateClass.SetHashString("DigivolveIntoImperialdramon_BT17_097");
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[All Turns] When one of your Digimon with the [Free] trait would be deleted other than by one of your effects, [Delay] • By digivolving that Digimon into a Digimon card with [Imperialdramon] in its name in your hand without paying the cost, prevent that deletion.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanDeclareOptionDelayEffect(card) &&
+                           CardEffectCommons.CanTriggerWhenPermanentRemoveField(hashtable, IsOwnerPermanentCondition) &&
+                           !CardEffectCommons.IsByEffect(hashtable,
+                               cardEffect => CardEffectCommons.IsOwnerEffect(cardEffect, card));
+                }
+
+                bool CanSelectHandCardCondition(CardSource cardSource)
+                {
+                    return cardSource.IsDigimon &&
+                           cardSource.ContainsCardName("Imperialdramon");
+                }
+
+
+                bool IsOwnerPermanentCondition(Permanent permanent)
+                {
+                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card) &&
+                           permanent.TopCard.ContainsTraits("Free") &&
+                           card.Owner.HandCards.Where(CanSelectHandCardCondition).Any(cardSource =>
+                               cardSource.CanPlayCardTargetFrame(permanent.PermanentFrame, false, activateClass));
+                }
+
+                bool IsOwnerPermanentToBeDeletedCondition(Permanent permanent)
+                {
+                    return IsOwnerPermanentCondition(permanent) && permanent.willBeRemoveField;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    yield return ContinuousController.instance.StartCoroutine(
+                        CardEffectCommons.DeletePeremanentAndProcessAccordingToResult(
+                            targetPermanents: new List<Permanent>() { card.PermanentOfThisCard() },
+                            activateClass: activateClass, successProcess: permanents => SuccessProcess(),
+                            failureProcess: null));
+                }
+
+                IEnumerator SuccessProcess()
+                {
+                    if (CardEffectCommons.HasMatchConditionPermanent(IsOwnerPermanentToBeDeletedCondition))
+                    {
+                        Permanent selectedPermanent = null;
+
+                        int maxCount = Math.Min(1,
+                            CardEffectCommons.MatchConditionPermanentCount(IsOwnerPermanentToBeDeletedCondition));
+
+                        SelectPermanentEffect selectPermanentEffect =
+                            GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: IsOwnerPermanentToBeDeletedCondition,
+                            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 to digivolve.",
+                            "The opponent is selecting 1 Digimon to 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: CanSelectHandCardCondition,
+                                payCost: false,
+                                reduceCostTuple: null,
+                                fixedCostTuple: null,
+                                ignoreDigivolutionRequirementFixedCost: -1,
+                                isHand: true,
+                                activateClass: activateClass,
+                                successProcess: null));
+                            
+                            selectedPermanent.willBeRemoveField = false;
+                            selectedPermanent.HideDeleteEffect();
+                        }
+                    }
+                }
+            }
+
+            #endregion
+
+            #region Security Effect
+
+            if (timing == EffectTiming.SecuritySkill)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect(
+                    $"Play 1 [Davis Motomiya] or [Ken Ichijoji] from hand or trash and place this card in the battle area",
+                    CanUseCondition, card);
+                activateClass.SetUpActivateClass(null, ActivateCoroutine, -1, true, EffectDescription());
+                activateClass.SetIsSecurityEffect(true);
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[Security] You may play 1 Tamer card with [Davis Motomiya]/[Ken Ichijoji] in its name from your hand or trash without paying the cost. Then, place this card in the battle area.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerSecurityEffect(hashtable, card);
+                }
+
+                bool CanSelectCardCondition(CardSource cardSource)
+                {
+                    if (CardEffectCommons.CanPlayAsNewPermanent(cardSource: cardSource, payCost: false, cardEffect: activateClass))
+                    {
+                        if (cardSource.IsTamer)
+                        {
+                            return cardSource.ContainsCardName("Davis Motomiya") ||
+                                   cardSource.ContainsCardName("DavisMotomiya") ||
+                                   cardSource.ContainsCardName("Ken Ichijoji") ||
+                                   cardSource.ContainsCardName("KenIchijoji");
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    bool canSelectHand = card.Owner.HandCards.Count(CanSelectCardCondition) >= 1;
+                    bool canSelectTrash = CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectCardCondition);
+
+                    if (canSelectHand || canSelectTrash)
+                    {
+                        if (canSelectHand && canSelectTrash)
+                        {
+                            List<SelectionElement<bool>> selectionElements = new List<SelectionElement<bool>>
+                            {
+                                new(message: "From hand", value: true, spriteIndex: 0),
+                                new(message: "From trash", value: false, spriteIndex: 1),
+                            };
+
+                            string selectPlayerMessage = "From which area do you play a card?";
+                            string notSelectPlayerMessage = "The opponent is choosing from which area to play 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());
+
+                        bool fromHand = GManager.instance.userSelectionManager.SelectedBoolValue;
+
+                        List<CardSource> selectedCards = new List<CardSource>();
+
+                        IEnumerator SelectCardCoroutine(CardSource cardSource)
+                        {
+                            selectedCards.Add(cardSource);
+                            yield return null;
+                        }
+
+                        if (fromHand)
+                        {
+                            SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
+
+                            selectHandEffect.SetUp(
+                                selectPlayer: card.Owner,
+                                canTargetCondition: CanSelectCardCondition,
+                                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 play.", "The opponent is selecting 1 card to play.");
+                            selectHandEffect.SetUpCustomMessage_ShowCard("Played Card");
+
+                            yield return StartCoroutine(selectHandEffect.Activate());
+                        }
+
+                        else
+                        {
+                            SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+
+                            selectCardEffect.SetUp(
+                                canTargetCondition: CanSelectCardCondition,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                canNoSelect: () => true,
+                                selectCardCoroutine: SelectCardCoroutine,
+                                afterSelectCardCoroutine: null,
+                                message: "Select 1 card to play.",
+                                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 play.", "The opponent is selecting 1 card to play.");
+                            selectCardEffect.SetUpCustomMessage_ShowCard("Played Card");
+
+                            yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
+                        }
+
+                        SelectCardEffect.Root root = SelectCardEffect.Root.Hand;
+
+                        if (!fromHand)
+                        {
+                            root = SelectCardEffect.Root.Trash;
+                        }
+
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(
+                            cardSources: selectedCards, activateClass: activateClass, payCost: false, isTapped: false, root: root,
+                            activateETB: true));
+                    }
+
+                    yield return ContinuousController.instance.StartCoroutine(
+                        CardEffectCommons.PlaceDelayOptionCards(card: card, cardEffect: activateClass));
+                }
+            }
+
+            #endregion
+
+            return cardEffects;
+        }
+    }
+}

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

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

+ 275 - 0
Assets/CardEffect/BT17/Blue/Seasarmon_BT17_024.cs

@@ -0,0 +1,275 @@
+using System.Collections;
+using System.Collections.Generic;
+using System;
+using System.Linq;
+
+namespace DCGO.CardEffects.BT17
+{
+    public class Seasarmon_BT17_024 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            #region On Play/ When Digivolving Shared
+
+            bool CanSelectOwnPermanentSharedCondition(Permanent permanent)
+            {
+                return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card);
+            }
+
+            bool CanSelectHandCardSharedCondition(CardSource cardSource)
+            {
+                return cardSource.IsDigimon &&
+                       cardSource.IsLevel3 &&
+                       cardSource.CardColors.Contains(CardColor.Blue);
+            }
+
+            #endregion
+
+            #region On Play
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Place 1 card to digivolution cards to give [Jamming]", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDescription());
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[On Play] By placing 1 level 3 blue Digimon card from your hand as this Digimon's bottom digivolution card, 1 of your Digimon gains [Jamming] for the turn.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (card.Owner.HandCards.Count(CanSelectHandCardSharedCondition) >= 1)
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (card.Owner.HandCards.Count(CanSelectHandCardSharedCondition) >= 1)
+                        {
+                            List<CardSource> selectedCards = new List<CardSource>();
+
+                            int maxCount = Math.Min(1, card.Owner.HandCards.Count(CanSelectHandCardSharedCondition));
+
+                            SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
+
+                            selectHandEffect.SetUp(
+                                selectPlayer: card.Owner,
+                                canTargetCondition: CanSelectHandCardSharedCondition,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                maxCount: maxCount,
+                                canNoSelect: true,
+                                canEndNotMax: false,
+                                isShowOpponent: true,
+                                selectCardCoroutine: SelectCardCoroutine,
+                                afterSelectCardCoroutine: null,
+                                mode: SelectHandEffect.Mode.Custom,
+                                cardEffect: activateClass);
+
+                            selectHandEffect.SetUpCustomMessage("Select 1 card to place on bottom of digivolution cards.",
+                                "The opponent is selecting 1 card to place on bottom of digivolution cards.");
+                            selectHandEffect.SetUpCustomMessage_ShowCard("Digivolution Card");
+
+                            yield return StartCoroutine(selectHandEffect.Activate());
+
+                            IEnumerator SelectCardCoroutine(CardSource cardSource)
+                            {
+                                selectedCards.Add(cardSource);
+                                yield return null;
+                            }
+
+                            if (selectedCards.Count >= 1)
+                            {
+                                yield return ContinuousController.instance.StartCoroutine(card.PermanentOfThisCard()
+                                    .AddDigivolutionCardsBottom(
+                                        selectedCards,
+                                        activateClass));
+
+                                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: false,
+                                    canEndNotMax: false,
+                                    selectPermanentCoroutine: SelectPermanentCoroutine,
+                                    afterSelectPermanentCoroutine: null,
+                                    mode: SelectPermanentEffect.Mode.Custom,
+                                    cardEffect: activateClass);
+
+                                selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon that will gain Jamming.",
+                                    "The opponent is selecting 1 Digimon that will gain Jamming.");
+
+                                yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                                IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                                {
+                                    yield return ContinuousController.instance.StartCoroutine(
+                                        CardEffectCommons.GainJamming(targetPermanent: permanent,
+                                            effectDuration: EffectDuration.UntilEachTurnEnd, activateClass: activateClass));
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+
+            #endregion
+
+            #region When Digivolving
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Place 1 card to digivolution cards to give [Jamming]", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDescription());
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[When Digivolving] By placing 1 level 3 blue Digimon card from your hand as this Digimon's bottom digivolution card, 1 of your Digimon gains [Jamming] for the turn.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (card.Owner.HandCards.Count(CanSelectHandCardSharedCondition) >= 1)
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (card.Owner.HandCards.Count(CanSelectHandCardSharedCondition) >= 1)
+                        {
+                            List<CardSource> selectedCards = new List<CardSource>();
+
+                            int maxCount = Math.Min(1, card.Owner.HandCards.Count(CanSelectHandCardSharedCondition));
+
+                            SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
+
+                            selectHandEffect.SetUp(
+                                selectPlayer: card.Owner,
+                                canTargetCondition: CanSelectHandCardSharedCondition,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                maxCount: maxCount,
+                                canNoSelect: true,
+                                canEndNotMax: false,
+                                isShowOpponent: true,
+                                selectCardCoroutine: SelectCardCoroutine,
+                                afterSelectCardCoroutine: null,
+                                mode: SelectHandEffect.Mode.Custom,
+                                cardEffect: activateClass);
+
+                            selectHandEffect.SetUpCustomMessage("Select 1 card to place on bottom of digivolution cards.",
+                                "The opponent is selecting 1 card to place on bottom of digivolution cards.");
+                            selectHandEffect.SetUpCustomMessage_ShowCard("Digivolution Card");
+
+                            yield return StartCoroutine(selectHandEffect.Activate());
+
+                            IEnumerator SelectCardCoroutine(CardSource cardSource)
+                            {
+                                selectedCards.Add(cardSource);
+                                yield return null;
+                            }
+
+                            if (selectedCards.Count >= 1)
+                            {
+                                yield return ContinuousController.instance.StartCoroutine(card.PermanentOfThisCard()
+                                    .AddDigivolutionCardsBottom(
+                                        selectedCards,
+                                        activateClass));
+
+                                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: false,
+                                    canEndNotMax: false,
+                                    selectPermanentCoroutine: SelectPermanentCoroutine,
+                                    afterSelectPermanentCoroutine: null,
+                                    mode: SelectPermanentEffect.Mode.Custom,
+                                    cardEffect: activateClass);
+
+                                selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon that will gain Jamming.",
+                                    "The opponent is selecting 1 Digimon that will gain Jamming.");
+
+                                yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                                IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                                {
+                                    yield return ContinuousController.instance.StartCoroutine(
+                                        CardEffectCommons.GainJamming(targetPermanent: permanent,
+                                            effectDuration: EffectDuration.UntilEachTurnEnd, activateClass: activateClass));
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+
+            #endregion
+
+            #region Jamming Static Effect - ESS
+
+            if (timing == EffectTiming.None)
+            {
+                cardEffects.Add(CardEffectFactory.JammingSelfStaticEffect(
+                    isInheritedEffect: true,
+                    card: card,
+                    condition: null));
+            }
+
+            #endregion
+
+            return cardEffects;
+        }
+    }
+}

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

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

+ 272 - 0
Assets/CardEffect/BT17/Blue/Strabimon_BT17_020.cs

@@ -0,0 +1,272 @@
+using System.Collections;
+using System.Collections.Generic;
+using System;
+using System.Linq;
+
+namespace DCGO.CardEffects.BT17
+{
+    public class Strabimon_BT17_020 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            #region On Play
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Reveal the top 3 cards of deck", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false,
+                    EffectDescription());
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[On Play] Reveal the top 3 cards of your deck. Add 1 card with the [Hybrid]/[Ten Warriors] trait and 1 Tamer card with an inherited effect among them to the hand. Return the rest to the bottom of the deck.";
+                }
+
+                bool CanSelectDigimonCardCondition(CardSource cardSource)
+                {
+                    if (cardSource.IsDigimon)
+                    {
+                        if (cardSource.ContainsTraits("Hybrid") ||
+                            cardSource.ContainsTraits("Ten Warriors") ||
+                            cardSource.ContainsTraits("TenWarriors"))
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanSelectTamerCardCondition(CardSource cardSource)
+                {
+                    if (cardSource.IsTamer)
+                    {
+                        if (cardSource.HasInheritedEffect)
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (card.Owner.LibraryCards.Count >= 1)
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    yield return ContinuousController.instance.StartCoroutine(
+                        CardEffectCommons.SimplifiedRevealDeckTopCardsAndSelect(
+                            revealCount: 3,
+                            simplifiedSelectCardConditions:
+                            new SimplifiedSelectCardConditionClass[]
+                            {
+                                new(
+                                    canTargetCondition: CanSelectDigimonCardCondition,
+                                    message: "Select 1 Digimon card with the [Hybrid]/[Ten Warriors] trait.",
+                                    mode: SelectCardEffect.Mode.AddHand,
+                                    maxCount: 1,
+                                    selectCardCoroutine: null),
+                                new(
+                                    canTargetCondition: CanSelectTamerCardCondition,
+                                    message: "Select 1 Tamer card with an inherited effect.",
+                                    mode: SelectCardEffect.Mode.AddHand,
+                                    maxCount: 1,
+                                    selectCardCoroutine: null),
+                            },
+                            remainingCardsPlace: RemainingCardsPlace.DeckBottom,
+                            activateClass: activateClass
+                        ));
+                }
+            }
+
+            #endregion
+
+            #region When Attacking - ESS
+
+            if (timing == EffectTiming.OnAllyAttack)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Play Tamer card from hand", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, true,
+                    EffectDescription());
+                activateClass.SetIsInheritedEffect(true);
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[When Attacking] [Once Per Turn] You may play 1 Tamer card with an inherited effect from your hand with the play cost reduced by 2.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnAttack(hashtable, card);
+                }
+
+                bool CanSelectHandCardCondition(CardSource cardSource)
+                {
+                    if (cardSource.IsTamer)
+                    {
+                        if (cardSource.HasInheritedEffect)
+                        {
+                            if (CardEffectCommons.CanPlayAsNewPermanent(cardSource: cardSource, payCost: true,
+                                    cardEffect: activateClass))
+                            {
+                                return true;
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (card.Owner.HandCards.Count(CanSelectHandCardCondition) >= 1)
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    #region Reduce Play Cost
+
+                    ChangeCostClass changeCostClass = new ChangeCostClass();
+                    changeCostClass.SetUpICardEffect($"Play Cost -2", _ => true, card);
+                    changeCostClass.SetUpChangeCostClass(changeCostFunc: ChangeCost, cardSourceCondition: CardSourceCondition,
+                        rootCondition: RootCondition, isUpDown: () => true, isCheckAvailability: () => false,
+                        isChangePayingCost: () => true);
+                    Func<EffectTiming, ICardEffect> getCardEffect = GetCardEffect;
+                    card.Owner.UntilCalculateFixedCostEffect.Add(getCardEffect);
+
+                    ICardEffect GetCardEffect(EffectTiming rcTiming)
+                    {
+                        if (rcTiming == EffectTiming.None)
+                        {
+                            return changeCostClass;
+                        }
+
+                        return null;
+                    }
+
+                    int ChangeCost(CardSource cardSource, int cost, SelectCardEffect.Root root, List<Permanent> targetPermanents)
+                    {
+                        if (CardSourceCondition(cardSource))
+                        {
+                            if (RootCondition(root))
+                            {
+                                if (PermanentsCondition(targetPermanents))
+                                {
+                                    cost -= 2;
+                                }
+                            }
+                        }
+
+                        return cost;
+                    }
+
+                    bool PermanentsCondition(List<Permanent> targetPermanents)
+                    {
+                        if (targetPermanents == null)
+                        {
+                            return true;
+                        }
+
+                        return targetPermanents.Count((targetPermanent) => targetPermanent != null) == 0;
+                    }
+
+                    bool CardSourceCondition(CardSource cardSource)
+                    {
+                        if (cardSource.HasPlayCost)
+                        {
+                            return CanSelectHandCardCondition(cardSource);
+                        }
+
+                        return false;
+                    }
+
+                    bool RootCondition(SelectCardEffect.Root root)
+                    {
+                        return true;
+                    }
+
+                    #endregion
+
+                    if (card.Owner.HandCards.Count(CanSelectHandCardCondition) >= 1)
+                    {
+                        List<CardSource> selectedCards = new List<CardSource>();
+
+                        SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
+
+                        selectHandEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectHandCardCondition,
+                            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: true, isTapped: false, root: SelectCardEffect.Root.Hand, activateETB: true));
+                    }
+
+                    #region Remove Reduce Cost effect
+
+                    card.Owner.UntilCalculateFixedCostEffect.Remove(getCardEffect);
+
+                    #endregion
+                }
+            }
+
+            #endregion
+
+            return cardEffects;
+        }
+    }
+}

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

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

+ 75 - 0
Assets/CardEffect/BT17/Blue/Xiaomon_BT17_002.cs

@@ -0,0 +1,75 @@
+using System.Collections;
+using System.Collections.Generic;
+
+namespace DCGO.CardEffects.BT17
+{
+    public class Xiaomon_BT17_002 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            #region Your Turn - ESS
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("[Draw 1]", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false,
+                    EffectDescription());
+                activateClass.SetIsInheritedEffect(true);
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[All Turns] [Once Per Turn] When one of your Digimon is played from digivolution cards, [Draw 1].";
+                }
+
+                bool PermanentCondition(Permanent permanent)
+                {
+                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card);
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.IsOwnerTurn(card))
+                        {
+                            if (CardEffectCommons.CanTriggerOnPermanentPlay(hashtable, PermanentCondition))
+                            {
+                                return CardEffectCommons.IsFromDigimonDigivolutionCards(hashtable);
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (card.Owner.LibraryCards.Count >= 1)
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    yield return ContinuousController.instance.StartCoroutine(
+                        new DrawClass(card.Owner, 1, activateClass).Draw());
+                }
+            }
+
+            #endregion
+
+            return cardEffects;
+        }
+    }
+}

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

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

+ 383 - 0
Assets/CardEffect/BT17/Red/Agumon_BT17_007.cs

@@ -0,0 +1,383 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using System.Linq;
+using System;
+using Photon.Pun;
+
+namespace DCGO.CardEffects.BT17
+{
+    public class Agumon_BT17_007 : 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.CardNames.Contains("Koromon");
+                }
+
+                cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(
+                    permanentCondition: PermanentCondition, digivolutionCost: 0, ignoreDigivolutionRequirement: false,
+                    card: card, condition: null));
+            }
+
+            #endregion
+
+            #region Start of Your Main Phase
+
+            if (timing == EffectTiming.OnStartMainPhase)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect(
+                    "Return 1 card with [Garurumon]/[Greymon]/[Omnimon] in its name from your trash to the hand",
+                    CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false,
+                    EffectDescription());
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[Start of Your Main Phase] If you have a Tamer with [Tai Kamiya] in its name, return 1 card with [Garurumon]/[Greymon]/[Omnimon] in its name from your trash to the hand.";
+                }
+
+                bool CanSelectCardCondition(CardSource cardSource)
+                {
+                    if (cardSource.IsDigimon)
+                    {
+                        if (cardSource.ContainsCardName("Garurumon") ||
+                            cardSource.ContainsCardName("Greymon") ||
+                            cardSource.ContainsCardName("Omnimon"))
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool OwnTamerPermanentCondition(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(permanent, card))
+                    {
+                        if (permanent.IsTamer)
+                        {
+                            if (permanent.TopCard.ContainsCardName("Tai Kamiya") || permanent.TopCard.ContainsCardName("TaiKamiya"))
+                            {
+                                return true;
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.IsOwnerTurn(card))
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, OwnTamerPermanentCondition))
+                        {
+                            if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectCardCondition))
+                            {
+                                return true;
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, OwnTamerPermanentCondition))
+                    {
+                        if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectCardCondition))
+                        {
+                            int maxCount = Math.Min(1, card.Owner.TrashCards.Count(CanSelectCardCondition));
+
+                            SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+
+                            selectCardEffect.SetUp(
+                                canTargetCondition: CanSelectCardCondition,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                canNoSelect: () => false,
+                                selectCardCoroutine: null,
+                                afterSelectCardCoroutine: null,
+                                message: "Select 1 card to add to your hand.",
+                                maxCount: maxCount,
+                                canEndNotMax: false,
+                                isShowOpponent: true,
+                                mode: SelectCardEffect.Mode.AddHand,
+                                root: SelectCardEffect.Root.Trash,
+                                customRootCardList: null,
+                                canLookReverseCard: true,
+                                selectPlayer: card.Owner,
+                                cardEffect: activateClass);
+
+                            yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
+                        }
+                    }
+                }
+            }
+
+            #endregion
+
+            #region End of Your Turn - ESS
+
+            if (timing == EffectTiming.OnEndTurn)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("DNA digivolve this Digimon", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true,
+                    EffectDescription());
+                activateClass.SetIsInheritedEffect(true);
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[End of Your Turn] This Digimon and another of your Digimon may DNA digivolve into a Digimon card in the hand.";
+                }
+
+                bool CanSelectCardCondition(CardSource cardSource)
+                {
+                    if (cardSource != null)
+                    {
+                        if (cardSource.IsDigimon)
+                        {
+                            if (cardSource.Owner == card.Owner)
+                            {
+                                if (cardSource.CanPlayJogress(true))
+                                {
+                                    if (isExistOnField(card))
+                                    {
+                                        if (cardSource.CanJogressFromTargetPermanent(card.PermanentOfThisCard(), true))
+                                        {
+                                            return true;
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if (isExistOnField(card))
+                    {
+                        return true;
+                    }
+
+                    return false;
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.IsOwnerTurn(card))
+                        {
+                            if (card.Owner.HandCards.Count >= 1)
+                            {
+                                if (CardEffectCommons.HasMatchConditionOwnersPermanent(card,
+                                        (permanent) => permanent.IsDigimon && permanent != card.PermanentOfThisCard()))
+                                {
+                                    return true;
+                                }
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (isExistOnField(card))
+                    {
+                        if (card.Owner.GetBattleAreaDigimons().Contains(card.PermanentOfThisCard()))
+                        {
+                            if (card.Owner.HandCards.Count(CanSelectCardCondition) >= 1)
+                            {
+                                List<CardSource> selectedCards = new List<CardSource>();
+
+                                int maxCount = 1;
+
+                                SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
+
+                                selectHandEffect.SetUp(
+                                    selectPlayer: card.Owner,
+                                    canTargetCondition: CanSelectCardCondition,
+                                    canTargetCondition_ByPreSelecetedList: null,
+                                    canEndSelectCondition: null,
+                                    maxCount: maxCount,
+                                    canNoSelect: true,
+                                    canEndNotMax: false,
+                                    isShowOpponent: true,
+                                    selectCardCoroutine: SelectCardCoroutine,
+                                    afterSelectCardCoroutine: null,
+                                    mode: SelectHandEffect.Mode.Custom,
+                                    cardEffect: activateClass);
+
+                                selectHandEffect.SetUpCustomMessage("Select 1 card to DNA digivolve.",
+                                    "The opponent is selecting 1 card to DNA digivolve.");
+                                selectHandEffect.SetNotShowCard();
+
+                                yield return StartCoroutine(selectHandEffect.Activate());
+
+                                IEnumerator SelectCardCoroutine(CardSource cardSource)
+                                {
+                                    selectedCards.Add(cardSource);
+
+                                    yield return null;
+                                }
+
+                                if (selectedCards.Count >= 1)
+                                {
+                                    foreach (CardSource selectedCard in selectedCards)
+                                    {
+                                        if (selectedCard.CanPlayJogress(true) &&
+                                            selectedCard.CanJogressFromTargetPermanent(card.PermanentOfThisCard(),
+                                                true))
+                                        {
+                                            JogressEvoRootsFrameIDs = Array.Empty<int>();
+
+                                            yield return GManager.instance.photonWaitController.StartWait(
+                                                "Agumon_BT17_007");
+
+                                            if (card.Owner.isYou || GManager.instance.IsAI)
+                                            {
+                                                GManager.instance.selectJogressEffect.SetUp_SelectDigivolutionRoots
+                                                (card: selectedCard,
+                                                    isLocal: true,
+                                                    isPayCost: true,
+                                                    canNoSelect: true,
+                                                    endSelectCoroutine_SelectDigivolutionRoots:
+                                                    EndSelectCoroutineSelectDigivolutionRoots,
+                                                    noSelectCoroutine: null);
+
+                                                GManager.instance.selectJogressEffect.SetUpCustomPermanentConditions(
+                                                    new Func<Permanent, bool>[]
+                                                        { (permanent) => permanent == card.PermanentOfThisCard() });
+
+                                                yield return ContinuousController.instance.StartCoroutine(
+                                                    GManager.instance.selectJogressEffect.SelectDigivolutionRoots());
+
+                                                IEnumerator EndSelectCoroutineSelectDigivolutionRoots(
+                                                    List<Permanent> permanents)
+                                                {
+                                                    permanents = permanents.Distinct().ToList();
+
+                                                    if (permanents.Count == 2)
+                                                    {
+                                                        JogressEvoRootsFrameIDs = new int[2];
+
+                                                        for (int i = 0; i < permanents.Count; i++)
+                                                        {
+                                                            if (i < JogressEvoRootsFrameIDs.Length)
+                                                            {
+                                                                JogressEvoRootsFrameIDs[i] =
+                                                                    permanents[i].PermanentFrame.FrameID;
+                                                            }
+                                                        }
+                                                    }
+
+                                                    if (!permanents.Contains(card.PermanentOfThisCard()))
+                                                    {
+                                                        JogressEvoRootsFrameIDs = Array.Empty<int>();
+                                                    }
+
+                                                    yield return null;
+                                                }
+
+                                                photonView.RPC("SetJogressEvoRootsFrameIDs", RpcTarget.All,
+                                                    JogressEvoRootsFrameIDs);
+                                            }
+
+                                            else
+                                            {
+                                                GManager.instance.commandText.OpenCommandText(
+                                                    "The opponent is choosing a card to DNA digivolve.");
+                                            }
+
+                                            yield return new WaitWhile(() => !endSelect);
+                                            endSelect = false;
+
+                                            GManager.instance.commandText.CloseCommandText();
+                                            yield return new WaitWhile(() =>
+                                                GManager.instance.commandText.gameObject.activeSelf);
+
+                                            if (JogressEvoRootsFrameIDs.Length == 2)
+                                            {
+                                                yield return ContinuousController.instance.StartCoroutine(GManager
+                                                    .instance.GetComponent<Effects>()
+                                                    .ShowCardEffect(new List<CardSource>() { selectedCard },
+                                                        "Played Card", true, true));
+
+                                                PlayCardClass playCard = new PlayCardClass(
+                                                    cardSources: new List<CardSource>() { selectedCard },
+                                                    hashtable: CardEffectCommons.CardEffectHashtable(activateClass),
+                                                    payCost: true,
+                                                    targetPermanent: null,
+                                                    isTapped: false,
+                                                    root: SelectCardEffect.Root.Hand,
+                                                    activateETB: true);
+
+                                                playCard.SetJogress(JogressEvoRootsFrameIDs);
+
+                                                yield return ContinuousController.instance.StartCoroutine(
+                                                    playCard.PlayCard());
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+
+            #endregion
+
+            return cardEffects;
+        }
+
+        #region Photon DNA ESS
+
+        bool endSelect;
+        int[] JogressEvoRootsFrameIDs = Array.Empty<int>();
+
+        [PunRPC]
+        public void SetJogressEvoRootsFrameIDs(int[] jogressEvoRootsFrameIDs)
+        {
+            this.JogressEvoRootsFrameIDs = jogressEvoRootsFrameIDs;
+            endSelect = true;
+        }
+
+        #endregion
+    }
+}

+ 11 - 0
Assets/CardEffect/BT17/Red/Agumon_BT17_007.cs.meta

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

+ 204 - 0
Assets/CardEffect/BT17/Red/Agunimon_BT17_011.cs

@@ -0,0 +1,204 @@
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace DCGO.CardEffects.BT17
+{
+    public class Agunimon_BT17_011 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            #region Alternate Digivolution
+
+            // Takuya Kanbara
+            if (timing == EffectTiming.None)
+            {
+                bool Condition()
+                {
+                    return card.Owner.HandCards.Contains(card);
+                }
+
+                bool PermanentCondition(Permanent targetPermanent)
+                {
+                    return targetPermanent.TopCard.ContainsCardName("Takuya Kanbara") ||
+                           targetPermanent.TopCard.ContainsCardName("TakuyaKanbara");
+                }
+
+                cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(
+                    permanentCondition: PermanentCondition, digivolutionCost: 2, ignoreDigivolutionRequirement: false,
+                    card: card, condition: Condition));
+            }
+
+            // BurningGreymon
+            if (timing == EffectTiming.None)
+            {
+                bool PermanentCondition(Permanent targetPermanent)
+                {
+                    return targetPermanent.TopCard.ContainsCardName("BurningGreymon");
+                }
+
+                cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(
+                    permanentCondition: PermanentCondition, digivolutionCost: 1, ignoreDigivolutionRequirement: false,
+                    card: card, condition: null));
+            }
+
+            // Any red tamer
+            if (timing == EffectTiming.None)
+            {
+                bool Condition()
+                {
+                    return card.Owner.HandCards.Contains(card);
+                }
+
+                bool PermanentCondition(Permanent targetPermanent)
+                {
+                    return targetPermanent.IsTamer && targetPermanent.TopCard.CardColors.Contains(CardColor.Red);
+                }
+
+                cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(
+                    permanentCondition: PermanentCondition, digivolutionCost: 3, ignoreDigivolutionRequirement: false,
+                    card: card, condition: Condition));
+            }
+
+            #endregion
+
+            #region When Digivolving
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("This Digimon digivolves into [AncientGreymon]", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true,
+                    EffectDescription());
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[When Digivolving] If [BurningGreymon] is in this Digimon's digivolution cards or you have a blue or green Digimon or Tamer, this Digimon may digivolve into [AncientGreymon] in the hand for a digivolution cost of 3, ignoring its digivolution requirements. If digivolved by this effect, delete this Digimon at the end of the turn.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (card.PermanentOfThisCard().DigivolutionCards.Count(cardSource =>
+                                cardSource.CardNames.Contains("BurningGreymon")) >= 1)
+                        {
+                            return true;
+                        }
+
+                        if (card.Owner.HandCards.Count >= 1)
+                        {
+                            if (CardEffectCommons.HasMatchConditionOwnersPermanent(card,
+                                    permanent =>
+                                        permanent.TopCard.CardColors.Contains(CardColor.Blue) ||
+                                        permanent.TopCard.CardColors.Contains(CardColor.Green)))
+                            {
+                                return true;
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        Permanent thisPermanent = card.PermanentOfThisCard();
+
+                        yield return ContinuousController.instance.StartCoroutine(
+                            CardEffectCommons.DigivolveIntoHandOrTrashCard(
+                                targetPermanent: thisPermanent,
+                                cardCondition: cardSource =>
+                                    cardSource.IsDigimon && cardSource.ContainsCardName("AncientGreymon"),
+                                payCost: true,
+                                reduceCostTuple: null,
+                                fixedCostTuple: null,
+                                ignoreDigivolutionRequirementFixedCost: 3,
+                                isHand: true,
+                                activateClass: activateClass,
+                                successProcess: SuccessProcess()));
+
+                        IEnumerator SuccessProcess()
+                        {
+                            ActivateClass activateClass1 = new ActivateClass();
+                            activateClass1.SetUpICardEffect("Delete this Digimon", CanUseSuccessCondition, card);
+                            activateClass1.SetUpActivateClass(CanActivateSuccessCondition, ActivateSuccessCoroutine, -1,
+                                false, "");
+                            activateClass1.SetEffectSourcePermanent(thisPermanent);
+                            CardEffectCommons.AddEffectToPlayer(effectDuration: EffectDuration.UntilEachTurnEnd,
+                                card: card, cardEffect: activateClass1, timing: EffectTiming.OnEndTurn);
+
+                            bool CanUseSuccessCondition(Hashtable successHashtable)
+                            {
+                                return true;
+                            }
+
+                            bool CanActivateSuccessCondition(Hashtable successHashtable)
+                            {
+                                if (thisPermanent.TopCard != null)
+                                {
+                                    if (thisPermanent.CanBeDestroyedBySkill(activateClass1))
+                                    {
+                                        if (!thisPermanent.TopCard.CanNotBeAffected(activateClass1))
+                                        {
+                                            return true;
+                                        }
+                                    }
+                                }
+
+                                return false;
+                            }
+
+                            IEnumerator ActivateSuccessCoroutine(Hashtable successHashtable)
+                            {
+                                yield return ContinuousController.instance.StartCoroutine(
+                                    new DestroyPermanentsClass(new List<Permanent>() { thisPermanent },
+                                        CardEffectCommons.CardEffectHashtable(activateClass1)).Destroy());
+                            }
+
+                            yield return null;
+                        }
+                    }
+                }
+            }
+
+            #endregion
+
+            #region Your Turn - ESS
+
+            if (timing == EffectTiming.None)
+            {
+                bool Condition()
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.IsOwnerTurn(card))
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                cardEffects.Add(CardEffectFactory.ChangeSelfDPStaticEffect(changeValue: 2000, isInheritedEffect: true,
+                    card: card, condition: Condition));
+            }
+
+            #endregion
+
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/BT17/Red/Agunimon_BT17_011.cs.meta

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

+ 535 - 0
Assets/CardEffect/BT17/Red/Aldamon_BT17_014.cs

@@ -0,0 +1,535 @@
+using System.Collections;
+using System.Collections.Generic;
+using System;
+using System.Linq;
+
+namespace DCGO.CardEffects.BT17
+{
+    public class Aldamon_BT17_014 : 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 [Takuya Kanbara] digivolves into this card", CanUseCondition,
+                    card);
+                activateClass.SetUpActivateClass(null, ActivateCoroutine, -1, false, EffectDescription());
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[Hand] [Main] By placing 1 [Agunimon] and [BurningGreymon] from your trash under 1 of your [Takuya Kanbara]s, digivolve it into this card as if that card is a level 4 red Digimon for a digivolution cost of 3.";
+                }
+
+                bool CanSelectAgunimonCardCondition(CardSource cardSource)
+                {
+                    if (cardSource != null)
+                    {
+                        if (cardSource.Owner == card.Owner)
+                        {
+                            if (cardSource.CardNames.Contains("Agunimon"))
+                            {
+                                return true;
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanSelectBurningGreymonCardCondition(CardSource cardSource)
+                {
+                    if (cardSource != null)
+                    {
+                        if (cardSource.Owner == card.Owner)
+                        {
+                            if (cardSource.CardNames.Contains("BurningGreymon"))
+                            {
+                                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("Takuya Kanbara") || 
+                                            permanent.TopCard.CardNames.Contains("TakuyaKanbara"))
+                                        {
+                                            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,
+                                    CanSelectAgunimonCardCondition))
+                            {
+                                if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card,
+                                        CanSelectBurningGreymonCardCondition))
+                                {
+                                    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) =>
+                                            CanSelectAgunimonCardCondition(cardSource) ||
+                                            CanSelectBurningGreymonCardCondition(cardSource)))
+                                {
+                                    bool digivolve = false;
+
+                                    maxCount = 2;
+
+                                    if (card.Owner.TrashCards.Count((cardSource) =>
+                                            CanSelectAgunimonCardCondition(cardSource) ||
+                                            CanSelectBurningGreymonCardCondition(cardSource)) <
+                                        maxCount)
+                                    {
+                                        maxCount = card.Owner.TrashCards.Count((cardSource) =>
+                                            CanSelectAgunimonCardCondition(cardSource) ||
+                                            CanSelectBurningGreymonCardCondition(cardSource));
+                                    }
+
+                                    List<CardSource> selectedCards = new List<CardSource>();
+
+                                    SelectCardEffect selectCardEffect =
+                                        GManager.instance.GetComponent<SelectCardEffect>();
+
+                                    selectCardEffect.SetUp(
+                                        canTargetCondition: (cardSource) =>
+                                            CanSelectAgunimonCardCondition(cardSource) ||
+                                            CanSelectBurningGreymonCardCondition(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(CanSelectAgunimonCardCondition) >= 1)
+                                        {
+                                            if (CanSelectAgunimonCardCondition(cardSource))
+                                            {
+                                                return false;
+                                            }
+                                        }
+
+                                        if (cardSources.Count(CanSelectBurningGreymonCardCondition) >= 1)
+                                        {
+                                            if (CanSelectBurningGreymonCardCondition(cardSource))
+                                            {
+                                                return false;
+                                            }
+                                        }
+
+                                        return true;
+                                    }
+
+                                    bool CanEndSelectCondition(List<CardSource> cardSources)
+                                    {
+                                        if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card,
+                                                CanSelectAgunimonCardCondition))
+                                        {
+                                            if (cardSources.Count(CanSelectAgunimonCardCondition) == 0)
+                                            {
+                                                return false;
+                                            }
+                                        }
+
+                                        if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card,
+                                                CanSelectBurningGreymonCardCondition))
+                                        {
+                                            if (cardSources.Count(CanSelectBurningGreymonCardCondition) == 0)
+                                            {
+                                                return false;
+                                            }
+                                        }
+
+                                        if (cardSources.Count(CanSelectAgunimonCardCondition) >= 2)
+                                        {
+                                            return false;
+                                        }
+
+                                        if (cardSources.Count(CanSelectBurningGreymonCardCondition) >= 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 red",
+                                            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(
+                    "Delete 1 Digimon with 6000 DP or less",
+                    CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false,
+                    EffectDescription());
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[When Digivolving] Delete 1 of your opponent's Digimon with 6000 DP or less.";
+                }
+
+                bool CanSelectOpponentPermanentCondition(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
+                    {
+                        if (permanent.DP <= card.Owner.MaxDP_DeleteEffect(6000, activateClass))
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectOpponentPermanentCondition))
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectOpponentPermanentCondition))
+                    {
+                        int enemyCount = Math.Min(1,
+                            CardEffectCommons.MatchConditionPermanentCount(CanSelectOpponentPermanentCondition));
+
+                        SelectPermanentEffect selectEnemyEffect =
+                            GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                        selectEnemyEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectOpponentPermanentCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: enemyCount,
+                            canNoSelect: false,
+                            canEndNotMax: false,
+                            selectPermanentCoroutine: null,
+                            afterSelectPermanentCoroutine: null,
+                            mode: SelectPermanentEffect.Mode.Destroy,
+                            cardEffect: activateClass);
+
+                        yield return ContinuousController.instance.StartCoroutine(selectEnemyEffect.Activate());
+                    }
+                }
+            }
+
+            #endregion
+
+            #region Your Turn - ESS
+
+            if (timing == EffectTiming.None)
+            {
+                DisableEffectClass invalidationClass = new DisableEffectClass();
+                invalidationClass.SetUpICardEffect("Ignore Security effects on Option cards", CanUseCondition, card);
+                invalidationClass.SetUpDisableEffectClass(DisableCondition: InvalidateCondition);
+                invalidationClass.SetIsInheritedEffect(true);
+
+                cardEffects.Add(invalidationClass);
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return true;
+                }
+
+                bool InvalidateCondition(ICardEffect cardEffect)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.IsOwnerTurn(card))
+                        {
+                            if (card.PermanentOfThisCard().TopCard.ContainsTraits("Hybrid") ||
+                                card.PermanentOfThisCard().TopCard.ContainsTraits("TenWarriors") ||
+                                card.PermanentOfThisCard().TopCard.ContainsTraits("Ten Warriors"))
+                            {
+                                if (cardEffect != null)
+                                {
+                                    if (cardEffect.EffectSourceCard != null)
+                                    {
+                                        if (cardEffect.EffectSourceCard.IsOption)
+                                        {
+                                            if (cardEffect.IsSecurityEffect)
+                                            {
+                                                if (GManager.instance.attackProcess.AttackingPermanent == card.PermanentOfThisCard())
+                                                {
+                                                    return true;
+                                                }
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+            }
+
+            #endregion
+
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/BT17/Red/Aldamon_BT17_014.cs.meta

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

+ 410 - 0
Assets/CardEffect/BT17/Red/AncientGreymon_BT17_017.cs

@@ -0,0 +1,410 @@
+using System.Collections;
+using System.Collections.Generic;
+using System;
+using System.Linq;
+
+namespace DCGO.CardEffects.BT17
+{
+    public class AncientGreymon_BT17_017 : 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 elementAgunimon =
+                            new DigiXrosConditionElement(CanSelectCardConditionAgunimon, "Agunimon");
+
+                        bool CanSelectCardConditionAgunimon(CardSource conditionCardSource)
+                        {
+                            if (conditionCardSource != null)
+                            {
+                                if (conditionCardSource.Owner == card.Owner)
+                                {
+                                    if (conditionCardSource.IsDigimon)
+                                    {
+                                        if (conditionCardSource.CardNames_DigiXros.Contains("Agunimon"))
+                                        {
+                                            return true;
+                                        }
+                                    }
+                                }
+                            }
+
+                            return false;
+                        }
+
+                        DigiXrosConditionElement elementBurningGreymon =
+                            new DigiXrosConditionElement(CanSelectCardConditionBurningGreymon, "BurningGreymon");
+
+                        bool CanSelectCardConditionBurningGreymon(CardSource conditionCardSource)
+                        {
+                            if (conditionCardSource != null)
+                            {
+                                if (conditionCardSource.Owner == card.Owner)
+                                {
+                                    if (conditionCardSource.IsDigimon)
+                                    {
+                                        if (conditionCardSource.CardNames_DigiXros.Contains("BurningGreymon"))
+                                        {
+                                            return true;
+                                        }
+                                    }
+                                }
+                            }
+
+                            return false;
+                        }
+
+                        List<DigiXrosConditionElement> elements = new List<DigiXrosConditionElement>()
+                            { elementAgunimon, elementBurningGreymon };
+
+                        DigiXrosCondition digiXrosCondition = new DigiXrosCondition(elements, null, 3);
+
+                        return digiXrosCondition;
+                    }
+
+                    return null;
+                }
+            }
+
+            #endregion
+
+            #region Security Attack +1
+
+            if (timing == EffectTiming.None)
+            {
+                cardEffects.Add(CardEffectFactory.ChangeSelfSAttackStaticEffect(changeValue: 1, isInheritedEffect: false, card: card,
+                    condition: null));
+            }
+
+            #endregion
+
+            #region On Play/ When Digivolving Shared
+
+            bool IsEnemyPermanentWithAsMuchOrLessDpSharedCondition(Permanent permanent)
+            {
+                if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
+                {
+                    if (permanent.DP <= card.PermanentOfThisCard().DP)
+                    {
+                        return true;
+                    }
+                }
+
+                return false;
+            }
+
+            #endregion
+
+            #region On Play
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Delete 1 Digimon", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDescription());
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[On Play] Delete 1 of your opponent's Digimon with as much or less DP than this Digimon.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.HasMatchConditionPermanent(IsEnemyPermanentWithAsMuchOrLessDpSharedCondition))
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.HasMatchConditionPermanent(IsEnemyPermanentWithAsMuchOrLessDpSharedCondition))
+                    {
+                        int maxCount = Math.Min(1,
+                            CardEffectCommons.MatchConditionPermanentCount(IsEnemyPermanentWithAsMuchOrLessDpSharedCondition));
+
+                        SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: IsEnemyPermanentWithAsMuchOrLessDpSharedCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: maxCount,
+                            canNoSelect: false,
+                            canEndNotMax: false,
+                            selectPermanentCoroutine: null,
+                            afterSelectPermanentCoroutine: null,
+                            mode: SelectPermanentEffect.Mode.Destroy,
+                            cardEffect: activateClass);
+
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                    }
+                }
+            }
+
+            #endregion
+
+            #region When Digivolving
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Delete 1 Digimon", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDescription());
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[When Digivolving] Delete 1 of your opponent's Digimon with as much or less DP than this Digimon.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.HasMatchConditionPermanent(IsEnemyPermanentWithAsMuchOrLessDpSharedCondition))
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.HasMatchConditionPermanent(IsEnemyPermanentWithAsMuchOrLessDpSharedCondition))
+                    {
+                        int maxCount = Math.Min(1,
+                            CardEffectCommons.MatchConditionPermanentCount(IsEnemyPermanentWithAsMuchOrLessDpSharedCondition));
+
+                        SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: IsEnemyPermanentWithAsMuchOrLessDpSharedCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: maxCount,
+                            canNoSelect: false,
+                            canEndNotMax: false,
+                            selectPermanentCoroutine: null,
+                            afterSelectPermanentCoroutine: null,
+                            mode: SelectPermanentEffect.Mode.Destroy,
+                            cardEffect: activateClass);
+
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                    }
+                }
+            }
+
+            #endregion
+
+            #region 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/Red/AncientGreymon_BT17_017.cs.meta

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

+ 363 - 0
Assets/CardEffect/BT17/Red/AncientGuardianDeity_BT17_094.cs

@@ -0,0 +1,363 @@
+using System.Collections;
+using System.Collections.Generic;
+using System;
+using System.Linq;
+
+namespace DCGO.CardEffects.BT17
+{
+    public class AncientGuardianDeity_BT17_094 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            #region Ignore color requirements
+
+            if (timing == EffectTiming.None)
+            {
+                IgnoreColorConditionClass ignoreColorConditionClass = new IgnoreColorConditionClass();
+                ignoreColorConditionClass.SetUpICardEffect("Ignore color requirements", CanUseCondition, card);
+                ignoreColorConditionClass.SetUpIgnoreColorConditionClass(cardCondition: CardCondition);
+                cardEffects.Add(ignoreColorConditionClass);
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.HasMatchConditionOwnersPermanent(card,
+                        permanent =>
+                            permanent.IsTamer ||
+                            permanent.TopCard.ContainsTraits("Hybrid"));
+                }
+
+                bool CardCondition(CardSource cardSource)
+                {
+                    return cardSource == card;
+                }
+            }
+
+            #endregion
+
+            #region Main Effect
+
+            if (timing == EffectTiming.OptionSkill)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect(card.BaseENGCardNameFromEntity, CanUseCondition, card);
+                activateClass.SetUpActivateClass(null, ActivateCoroutine, -1, false, EffectDescription());
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[Main] You may return 1 Digimon card with the [Hybrid] trait or [Ten Warriors] trait from your trash to the hand. Then, you may play 1 Digimon card with the [Ten Warriors] trait or 1 Tamer card with inherited effects from your hand with the play cost reduced by 4.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOptionMainEffect(hashtable, card);
+                }
+
+                bool CanSelectTrashCardCondition(CardSource cardSource)
+                {
+                    return cardSource.IsDigimon && (cardSource.ContainsTraits("Hybrid") ||
+                                                    cardSource.ContainsTraits("Ten Warriors") ||
+                                                    cardSource.ContainsTraits("TenWarriors"));
+                }
+
+                bool CanSelectHandCardCondition(CardSource cardSource)
+                {
+                    if (CardEffectCommons.CanPlayAsNewPermanent(cardSource: cardSource, payCost: false, cardEffect: activateClass))
+                    {
+                        return cardSource.IsTamer ||
+                               cardSource.IsDigimon && (cardSource.ContainsTraits("Ten Warriors") ||
+                                                        cardSource.ContainsTraits("TenWarriors"));
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectTrashCardCondition))
+                    {
+                        int maxCount = Math.Min(1, card.Owner.TrashCards.Count(CanSelectTrashCardCondition));
+
+                        SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+
+                        selectCardEffect.SetUp(
+                            canTargetCondition: CanSelectTrashCardCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            canNoSelect: () => false,
+                            selectCardCoroutine: null,
+                            afterSelectCardCoroutine: null,
+                            message: "Select 1 Digimon card with the Hybrid or Ten Warriors trait 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());
+                    }
+
+                    #region Reduce Play Cost
+
+                    ChangeCostClass changeCostClass = new ChangeCostClass();
+                    changeCostClass.SetUpICardEffect($"Play Cost -4", _ => true, card);
+                    changeCostClass.SetUpChangeCostClass(changeCostFunc: ChangeCost, cardSourceCondition: CardSourceCondition,
+                        rootCondition: RootCondition, isUpDown: () => true, isCheckAvailability: () => false,
+                        isChangePayingCost: () => true);
+                    Func<EffectTiming, ICardEffect> getCardEffect = GetCardEffect;
+                    card.Owner.UntilCalculateFixedCostEffect.Add(getCardEffect);
+
+                    ICardEffect GetCardEffect(EffectTiming rcTiming)
+                    {
+                        if (rcTiming == EffectTiming.None)
+                        {
+                            return changeCostClass;
+                        }
+
+                        return null;
+                    }
+
+                    int ChangeCost(CardSource cardSource, int cost, SelectCardEffect.Root root, List<Permanent> targetPermanents)
+                    {
+                        if (CardSourceCondition(cardSource))
+                        {
+                            if (RootCondition(root))
+                            {
+                                if (PermanentsCondition(targetPermanents))
+                                {
+                                    cost -= 4;
+                                }
+                            }
+                        }
+
+                        return cost;
+                    }
+
+                    bool PermanentsCondition(List<Permanent> targetPermanents)
+                    {
+                        if (targetPermanents == null)
+                        {
+                            return true;
+                        }
+
+                        return targetPermanents.Count((targetPermanent) => targetPermanent != null) == 0;
+                    }
+
+                    bool CardSourceCondition(CardSource cardSource)
+                    {
+                        if (cardSource.HasPlayCost)
+                        {
+                            return CanSelectHandCardCondition(cardSource);
+                        }
+
+                        return false;
+                    }
+
+                    bool RootCondition(SelectCardEffect.Root root)
+                    {
+                        return true;
+                    }
+
+                    #endregion
+
+                    if (card.Owner.HandCards.Count(CanSelectHandCardCondition) >= 1)
+                    {
+                        List<CardSource> selectedCards = new List<CardSource>();
+
+                        SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
+
+                        selectHandEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectHandCardCondition,
+                            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 play.",
+                            "The opponent is selecting 1 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: true, isTapped: false, root: SelectCardEffect.Root.Hand, activateETB: true));
+                    }
+
+                    #region Remove Reduce Cost effect
+
+                    card.Owner.UntilCalculateFixedCostEffect.Remove(getCardEffect);
+
+                    #endregion
+                }
+            }
+
+            #endregion
+
+            #region Security Effect
+
+            if (timing == EffectTiming.SecuritySkill)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect($"Play 1 Tamer card with an inherited effect from hand or trash and add this card to hand",
+                    CanUseCondition, card);
+                activateClass.SetUpActivateClass(null, ActivateCoroutine, -1, true, EffectDescription());
+                activateClass.SetIsSecurityEffect(true);
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[Security] You may play 1 Tamer card with an inherited effect from your hand or trash without paying the cost. Then, add this card to the hand.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerSecurityEffect(hashtable, card);
+                }
+
+                bool CanSelectCardCondition(CardSource cardSource)
+                {
+                    if (CardEffectCommons.CanPlayAsNewPermanent(cardSource: cardSource, payCost: false, cardEffect: activateClass))
+                    {
+                        return cardSource.IsTamer && cardSource.HasInheritedEffect;
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    bool canSelectHand = card.Owner.HandCards.Count(CanSelectCardCondition) >= 1;
+                    bool canSelectTrash = CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectCardCondition);
+
+                    if (canSelectHand || canSelectTrash)
+                    {
+                        if (canSelectHand && canSelectTrash)
+                        {
+                            List<SelectionElement<bool>> selectionElements = new List<SelectionElement<bool>>
+                            {
+                                new(message: "From hand", value: true, spriteIndex: 0),
+                                new(message: "From trash", value: false, spriteIndex: 1),
+                            };
+
+                            string selectPlayerMessage = "From which area do you play a card?";
+                            string notSelectPlayerMessage = "The opponent is choosing from which area to play 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());
+
+                        bool fromHand = GManager.instance.userSelectionManager.SelectedBoolValue;
+
+                        List<CardSource> selectedCards = new List<CardSource>();
+
+                        IEnumerator SelectCardCoroutine(CardSource cardSource)
+                        {
+                            selectedCards.Add(cardSource);
+                            yield return null;
+                        }
+
+                        if (fromHand)
+                        {
+                            SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
+
+                            selectHandEffect.SetUp(
+                                selectPlayer: card.Owner,
+                                canTargetCondition: CanSelectCardCondition,
+                                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 play.", "The opponent is selecting 1 card to play.");
+                            selectHandEffect.SetUpCustomMessage_ShowCard("Played Card");
+
+                            yield return StartCoroutine(selectHandEffect.Activate());
+                        }
+
+                        else
+                        {
+                            SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+
+                            selectCardEffect.SetUp(
+                                canTargetCondition: CanSelectCardCondition,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                canNoSelect: () => true,
+                                selectCardCoroutine: SelectCardCoroutine,
+                                afterSelectCardCoroutine: null,
+                                message: "Select 1 card to play.",
+                                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 play.", "The opponent is selecting 1 card to play.");
+                            selectCardEffect.SetUpCustomMessage_ShowCard("Played Card");
+
+                            yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
+                        }
+
+                        SelectCardEffect.Root root = SelectCardEffect.Root.Hand;
+
+                        if (!fromHand)
+                        {
+                            root = SelectCardEffect.Root.Trash;
+                        }
+
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(
+                            cardSources: selectedCards, activateClass: activateClass, payCost: false, isTapped: false, root: root,
+                            activateETB: true));
+                    }
+
+                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.AddThisCardToHand(card, activateClass));
+                }
+            }
+
+            #endregion
+
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/BT17/Red/AncientGuardianDeity_BT17_094.cs.meta

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

+ 164 - 0
Assets/CardEffect/BT17/Red/BurningGreymon_BT17_012.cs

@@ -0,0 +1,164 @@
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace DCGO.CardEffects.BT17
+{
+    public class BurningGreymon_BT17_012 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            #region Alternate Digivolution
+
+            // Takuya Kanbara
+            if (timing == EffectTiming.None)
+            {
+                bool Condition()
+                {
+                    return card.Owner.HandCards.Contains(card);
+                }
+
+                bool PermanentCondition(Permanent targetPermanent)
+                {
+                    return targetPermanent.TopCard.ContainsCardName("Takuya Kanbara") ||
+                           targetPermanent.TopCard.ContainsCardName("TakuyaKanbara");
+                }
+
+                cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(
+                    permanentCondition: PermanentCondition, digivolutionCost: 2, ignoreDigivolutionRequirement: false,
+                    card: card, condition: Condition));
+            }
+
+            // Agunimon
+            if (timing == EffectTiming.None)
+            {
+                bool PermanentCondition(Permanent targetPermanent)
+                {
+                    return targetPermanent.TopCard.ContainsCardName("Agunimon");
+                }
+
+                cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(
+                    permanentCondition: PermanentCondition, digivolutionCost: 1, ignoreDigivolutionRequirement: false,
+                    card: card, condition: null));
+            }
+
+            // Any red tamer
+            if (timing == EffectTiming.None)
+            {
+                bool Condition()
+                {
+                    return card.Owner.HandCards.Contains(card);
+                }
+
+                bool PermanentCondition(Permanent targetPermanent)
+                {
+                    return targetPermanent.IsTamer && targetPermanent.TopCard.CardColors.Contains(CardColor.Red);
+                }
+
+                cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(
+                    permanentCondition: PermanentCondition, digivolutionCost: 3, ignoreDigivolutionRequirement: false,
+                    card: card, condition: Condition));
+            }
+
+            #endregion
+
+            #region Raid
+
+            if (timing == EffectTiming.OnAllyAttack)
+            {
+                cardEffects.Add(CardEffectFactory.RaidSelfEffect(isInheritedEffect: false, card: card,
+                    condition: null));
+            }
+
+            #endregion
+
+            #region When Attacking
+
+            if (timing == EffectTiming.OnAllyAttack)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("This Digimon digivolves", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true,
+                    EffectDescription());
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[When Attacking] This Digimon may digivolve into a Digimon card with the [Hybrid] trait in the hand with the digivolution cost reduced by 1.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnAttack(hashtable, card);
+                }
+
+                bool IsHybridDigimonCardCondition(CardSource cardSource)
+                {
+                    return cardSource.IsDigimon && cardSource.ContainsTraits("Hybrid");
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (card.Owner.HandCards.Count(IsHybridDigimonCardCondition) >= 1)
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (card.Owner.HandCards.Count(IsHybridDigimonCardCondition) >= 1)
+                    {
+                        yield return ContinuousController.instance.StartCoroutine(
+                            CardEffectCommons.DigivolveIntoHandOrTrashCard(
+                                targetPermanent: card.PermanentOfThisCard(),
+                                cardCondition: IsHybridDigimonCardCondition,
+                                payCost: true,
+                                reduceCostTuple: (reduceCost: 1, reduceCostCardCondition: null),
+                                fixedCostTuple: null,
+                                ignoreDigivolutionRequirementFixedCost: -1,
+                                isHand: true,
+                                activateClass: activateClass,
+                                successProcess: null));
+                    }
+                    
+                }
+            }
+
+            #endregion
+
+            #region Your Turn - ESS
+
+            if (timing == EffectTiming.None)
+            {
+                bool Condition()
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.IsOwnerTurn(card))
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                cardEffects.Add(CardEffectFactory.ChangeSelfDPStaticEffect(changeValue: 2000, isInheritedEffect: true,
+                    card: card, condition: Condition));
+            }
+
+            #endregion
+
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/BT17/Red/BurningGreymon_BT17_012.cs.meta

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

+ 293 - 0
Assets/CardEffect/BT17/Red/CrimsonSavior_BT17_096.cs

@@ -0,0 +1,293 @@
+using System.Collections;
+using System.Collections.Generic;
+using System;
+using System.Linq;
+
+namespace DCGO.CardEffects.BT17
+{
+    public class CrimsonSavior_BT17_096 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            #region Main Effect
+
+            if (timing == EffectTiming.OptionSkill)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect($"Play 1 [Guilmon] or [Takato Matsuki] from your hand or trash",
+                    CanUseCondition, card);
+                activateClass.SetUpActivateClass(null, ActivateCoroutine, -1, true, EffectDescription());
+                activateClass.SetIsSecurityEffect(true);
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[Main] You may play 1 [Guilmon]/[Takato Matsuki] 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 CanSelectCardCondition(CardSource cardSource)
+                {
+                    if (CardEffectCommons.CanPlayAsNewPermanent(cardSource: cardSource, payCost: false, cardEffect: activateClass))
+                    {
+                        if (cardSource.IsDigimon)
+                        {
+                            return cardSource.ContainsCardName("Guilmon");
+                        }
+
+                        if (cardSource.IsTamer)
+                        {
+                            return cardSource.ContainsCardName("Takato Matsuki") ||
+                                   cardSource.ContainsCardName("TakatoMatsuki");
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    bool canSelectHand = card.Owner.HandCards.Count(CanSelectCardCondition) >= 1;
+                    bool canSelectTrash = CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectCardCondition);
+
+                    if (canSelectHand || canSelectTrash)
+                    {
+                        if (canSelectHand && canSelectTrash)
+                        {
+                            List<SelectionElement<bool>> selectionElements = new List<SelectionElement<bool>>
+                            {
+                                new(message: "From hand", value: true, spriteIndex: 0),
+                                new(message: "From trash", value: false, spriteIndex: 1),
+                            };
+
+                            string selectPlayerMessage = "From which area do you play a card?";
+                            string notSelectPlayerMessage = "The opponent is choosing from which area to play 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());
+
+                        bool fromHand = GManager.instance.userSelectionManager.SelectedBoolValue;
+
+                        List<CardSource> selectedCards = new List<CardSource>();
+
+                        IEnumerator SelectCardCoroutine(CardSource cardSource)
+                        {
+                            selectedCards.Add(cardSource);
+                            yield return null;
+                        }
+
+                        if (fromHand)
+                        {
+                            SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
+
+                            selectHandEffect.SetUp(
+                                selectPlayer: card.Owner,
+                                canTargetCondition: CanSelectCardCondition,
+                                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 play.", "The opponent is selecting 1 card to play.");
+                            selectHandEffect.SetUpCustomMessage_ShowCard("Played Card");
+
+                            yield return StartCoroutine(selectHandEffect.Activate());
+                        }
+
+                        else
+                        {
+                            SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+
+                            selectCardEffect.SetUp(
+                                canTargetCondition: CanSelectCardCondition,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                canNoSelect: () => true,
+                                selectCardCoroutine: SelectCardCoroutine,
+                                afterSelectCardCoroutine: null,
+                                message: "Select 1 card to play.",
+                                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 play.", "The opponent is selecting 1 card to play.");
+                            selectCardEffect.SetUpCustomMessage_ShowCard("Played Card");
+
+                            yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
+                        }
+
+                        SelectCardEffect.Root root = SelectCardEffect.Root.Hand;
+
+                        if (!fromHand)
+                        {
+                            root = SelectCardEffect.Root.Trash;
+                        }
+
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(
+                            cardSources: selectedCards, activateClass: activateClass, payCost: false, isTapped: false, root: root,
+                            activateETB: true));
+                    }
+
+                    yield return ContinuousController.instance.StartCoroutine(
+                        CardEffectCommons.PlaceDelayOptionCards(card: card, cardEffect: activateClass));
+                }
+            }
+
+            #endregion
+
+            #region Delay Effect
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect(
+                    "Digivolve into a Digimon card with [Gallantmon] in its name",
+                    CanUseCondition, card);
+                activateClass.SetUpActivateClass(null, ActivateCoroutine, -1, true, EffectDescription());
+                activateClass.SetHashString("DigivolveGallantmon_BT17_096");
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[All Turns] When an opponent's level 5 or higher Digimon is played, [Delay]. ・1 of your Digimon may digivolve into a Digimon card with [Gallantmon] in its name in the hand without paying the cost.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnPermanentPlay(hashtable,
+                        permanent =>
+                            CardEffectCommons.IsOpponentPermanent(permanent, card) &&
+                            permanent.IsDigimon &&
+                            permanent.Level >= 5);
+                }
+
+                bool IsGallantmonCardCondition(CardSource cardSource)
+                {
+                    return cardSource.ContainsCardName("Gallantmon");
+                }
+
+                bool OwnDigimonCondition(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
+                    {
+                        foreach (CardSource cardSource in card.Owner.HandCards)
+                        {
+                            if (IsGallantmonCardCondition(cardSource))
+                            {
+                                if (cardSource.CanPlayCardTargetFrame(permanent.PermanentFrame, false, activateClass))
+                                {
+                                    return true;
+                                }
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    yield return ContinuousController.instance.StartCoroutine(
+                        CardEffectCommons.DeletePeremanentAndProcessAccordingToResult(
+                            targetPermanents: new List<Permanent>() { card.PermanentOfThisCard() },
+                            activateClass: activateClass, successProcess: _ => SuccessProcess(),
+                            failureProcess: null));
+                }
+
+                IEnumerator SuccessProcess()
+                {
+                    if (CardEffectCommons.HasMatchConditionPermanent(OwnDigimonCondition))
+                    {
+                        Permanent selectedPermanent = null;
+
+                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(OwnDigimonCondition));
+
+                        SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: OwnDigimonCondition,
+                            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: IsGallantmonCardCondition,
+                                payCost: false,
+                                reduceCostTuple: null,
+                                fixedCostTuple: null,
+                                ignoreDigivolutionRequirementFixedCost: -1,
+                                isHand: true,
+                                activateClass: activateClass,
+                                successProcess: null));
+                        }
+                    }
+                }
+            }
+
+            #endregion
+
+            #region Security Effect
+
+            if (timing == EffectTiming.SecuritySkill)
+            {
+                CardEffectCommons.AddActivateMainOptionSecurityEffect(card: card, cardEffects: ref cardEffects,
+                    effectName: "Play 1 [Guilmon] or [Takato Matsuki] from your hand or trash");
+            }
+
+            #endregion
+
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/BT17/Red/CrimsonSavior_BT17_096.cs.meta

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

+ 202 - 0
Assets/CardEffect/BT17/Red/Flamemon_BT17_009.cs

@@ -0,0 +1,202 @@
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace DCGO.CardEffects.BT17
+{
+    public class Flamemon_BT17_009 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            #region On Play
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Reveal the top 3 cards of deck", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false,
+                    EffectDescription());
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[On Play] Reveal the top 3 cards of your deck. Add 1 card with the [Hybrid]/[Ten Warriors] trait and 1 Tamer card with an inherited effect among them to the hand. Return the rest to the bottom of the deck.";
+                }
+
+                bool CanSelectDigimonCardCondition(CardSource cardSource)
+                {
+                    if (cardSource.IsDigimon)
+                    {
+                        if (cardSource.ContainsTraits("Hybrid") ||
+                            cardSource.ContainsTraits("Ten Warriors") ||
+                            cardSource.ContainsTraits("TenWarriors"))
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanSelectTamerCardCondition(CardSource cardSource)
+                {
+                    if (cardSource.IsTamer)
+                    {
+                        if (cardSource.HasInheritedEffect)
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (card.Owner.LibraryCards.Count >= 1)
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    yield return ContinuousController.instance.StartCoroutine(
+                        CardEffectCommons.SimplifiedRevealDeckTopCardsAndSelect(
+                            revealCount: 3,
+                            simplifiedSelectCardConditions:
+                            new SimplifiedSelectCardConditionClass[]
+                            {
+                                new(
+                                    canTargetCondition: CanSelectDigimonCardCondition,
+                                    message: "Select 1 Digimon card with the [Hybrid]/[Ten Warriors] trait.",
+                                    mode: SelectCardEffect.Mode.AddHand,
+                                    maxCount: 1,
+                                    selectCardCoroutine: null),
+                                new(
+                                    canTargetCondition: CanSelectTamerCardCondition,
+                                    message: "Select 1 Tamer card with an inherited effect.",
+                                    mode: SelectCardEffect.Mode.AddHand,
+                                    maxCount: 1,
+                                    selectCardCoroutine: null),
+                            },
+                            remainingCardsPlace: RemainingCardsPlace.DeckBottom,
+                            activateClass: activateClass
+                        ));
+                }
+            }
+
+            #endregion
+
+            #region On Deletion - ESS
+
+            if (timing == EffectTiming.OnDestroyedAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Play 1 Tamer card from hand", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true,
+                    EffectDescription());
+                activateClass.SetIsInheritedEffect(true);
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[On Deletion] You may play 1 Tamer card with inherited effects from your hand without paying the cost.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnDeletion(hashtable, card);
+                }
+
+                bool CanSelectCardCondition(CardSource cardSource)
+                {
+                    if (cardSource.IsTamer)
+                    {
+                        if (cardSource.HasInheritedEffect)
+                        {
+                            if (CardEffectCommons.CanPlayAsNewPermanent(cardSource: cardSource, payCost: false,
+                                    cardEffect: activateClass))
+                            {
+                                return true;
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.CanActivateOnDeletionInherited(hashtable, card))
+                    {
+                        if (card.Owner.HandCards.Count(CanSelectCardCondition) >= 1)
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (card.Owner.HandCards.Count(CanSelectCardCondition) >= 1)
+                    {
+                        List<CardSource> selectedCards = new List<CardSource>();
+
+                        SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
+
+                        selectHandEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectCardCondition,
+                            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/Red/Flamemon_BT17_009.cs.meta

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

+ 344 - 0
Assets/CardEffect/BT17/Red/GallantmonCrimsonModeAce_BT17_018.cs

@@ -0,0 +1,344 @@
+using System.Collections;
+using System.Collections.Generic;
+using System;
+using System.Linq;
+
+namespace DCGO.CardEffects.BT17
+{
+    public class GallantmonCrimsonModeAce_BT17_018 : 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.IsLevel6 && targetPermanent.TopCard.ContainsCardName("Gallantmon");
+                }
+
+                cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(
+                    permanentCondition: PermanentCondition,
+                    digivolutionCost: 4,
+                    ignoreDigivolutionRequirement: false,
+                    card: card,
+                    condition: null)
+                );
+            }
+
+            #endregion
+
+            #region Ace - Blast Digivolve
+
+            if (timing == EffectTiming.OnCounterTiming)
+            {
+                cardEffects.Add(CardEffectFactory.BlastDigivolveEffect(card: card, condition: null));
+            }
+
+            #endregion
+
+            #region On Play/ When Digivolving Shared
+
+            int maxDPDeletionValue = 15000;
+            
+            #endregion
+
+            #region On Play
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Delete opponent's Digimon whose total DP adds up to 15000 or less", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDescription());
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[On Play] Choose any number of your opponent's Digimon whose total DP adds up to 15000 or less and delete them.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
+                }
+
+                bool CanSelectPermanentCondition(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
+                    {
+                        if (permanent.DP <= card.Owner.MaxDP_DeleteEffect(maxDPDeletionValue, activateClass))
+                        {
+                            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.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                        {
+                            int maxCount = Math.Min(card.Owner.Enemy.GetBattleAreaDigimons().Count(CanSelectPermanentCondition),
+                                CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
+
+                            SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                            selectPermanentEffect.SetUp(
+                                selectPlayer: card.Owner,
+                                canTargetCondition: CanSelectPermanentCondition,
+                                canTargetCondition_ByPreSelecetedList: CanTargetConditionByPreSelectedList,
+                                canEndSelectCondition: CanEndSelectCondition,
+                                maxCount: maxCount,
+                                canNoSelect: false,
+                                canEndNotMax: true,
+                                selectPermanentCoroutine: null,
+                                afterSelectPermanentCoroutine: null,
+                                mode: SelectPermanentEffect.Mode.Destroy,
+                                cardEffect: activateClass);
+
+                            yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                            bool CanEndSelectCondition(List<Permanent> permanents)
+                            {
+                                if (permanents.Count <= 0)
+                                {
+                                    return false;
+                                }
+
+                                int sumDP = 0;
+
+                                foreach (Permanent permanent in permanents)
+                                {
+                                    sumDP += permanent.DP;
+                                }
+
+                                if (sumDP > card.Owner.MaxDP_DeleteEffect(maxDPDeletionValue, activateClass))
+                                {
+                                    return false;
+                                }
+
+                                return true;
+                            }
+
+                            bool CanTargetConditionByPreSelectedList(List<Permanent> permanents, Permanent permanent)
+                            {
+                                int sumDP = 0;
+
+                                foreach (Permanent permanent1 in permanents)
+                                {
+                                    sumDP += permanent1.DP;
+                                }
+
+                                sumDP += permanent.DP;
+
+                                if (sumDP > card.Owner.MaxDP_DeleteEffect(maxDPDeletionValue, activateClass))
+                                {
+                                    return false;
+                                }
+
+                                return true;
+                            }
+                        }
+                    }
+                }
+            }
+
+            #endregion
+
+            #region When Digivolving
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Delete opponent's Digimon whose total DP adds up to 15000 or less", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDescription());
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[When Digivolving] Choose any number of your opponent's Digimon whose total DP adds up to 15000 or less and delete them.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                }
+
+                bool CanSelectPermanentCondition(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
+                    {
+                        if (permanent.DP <= card.Owner.MaxDP_DeleteEffect(maxDPDeletionValue, activateClass))
+                        {
+                            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.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                        {
+                            int maxCount = Math.Min(card.Owner.Enemy.GetBattleAreaDigimons().Count(CanSelectPermanentCondition),
+                                CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
+
+                            SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                            selectPermanentEffect.SetUp(
+                                selectPlayer: card.Owner,
+                                canTargetCondition: CanSelectPermanentCondition,
+                                canTargetCondition_ByPreSelecetedList: CanTargetConditionByPreSelectedList,
+                                canEndSelectCondition: CanEndSelectCondition,
+                                maxCount: maxCount,
+                                canNoSelect: false,
+                                canEndNotMax: true,
+                                selectPermanentCoroutine: null,
+                                afterSelectPermanentCoroutine: null,
+                                mode: SelectPermanentEffect.Mode.Destroy,
+                                cardEffect: activateClass);
+
+                            yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                            bool CanEndSelectCondition(List<Permanent> permanents)
+                            {
+                                if (permanents.Count <= 0)
+                                {
+                                    return false;
+                                }
+
+                                int sumDP = 0;
+
+                                foreach (Permanent permanent in permanents)
+                                {
+                                    sumDP += permanent.DP;
+                                }
+
+                                if (sumDP > card.Owner.MaxDP_DeleteEffect(maxDPDeletionValue, activateClass))
+                                {
+                                    return false;
+                                }
+
+                                return true;
+                            }
+
+                            bool CanTargetConditionByPreSelectedList(List<Permanent> permanents, Permanent permanent)
+                            {
+                                int sumDP = 0;
+
+                                foreach (Permanent permanent1 in permanents)
+                                {
+                                    sumDP += permanent1.DP;
+                                }
+
+                                sumDP += permanent.DP;
+
+                                if (sumDP > card.Owner.MaxDP_DeleteEffect(maxDPDeletionValue, activateClass))
+                                {
+                                    return false;
+                                }
+
+                                return true;
+                            }
+                        }
+                    }
+                }
+            }
+
+            #endregion
+            
+            #region When Attacking
+
+            if (timing == EffectTiming.OnAllyAttack)
+            {
+                int Count()
+                {
+                    return (card.Owner.TrashCards.Count + card.Owner.Enemy.TrashCards.Count) / 10;
+                }
+
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect($"Trash {Count()} cards from the top of your opponent's security stack", CanUseCondition,
+                    card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDescription());
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[When Attacking] [Once Per Turn] For every 10 cards in both player's trash, trash 1 card from the top of your opponent's security stack.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnAttack(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (card.Owner.Enemy.SecurityCards.Count >= 1)
+                        {
+                            if (Count() >= 1)
+                            {
+                                return true;
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    yield return ContinuousController.instance.StartCoroutine(new IDestroySecurity(
+                        player: card.Owner.Enemy,
+                        destroySecurityCount: Count(),
+                        cardEffect: activateClass,
+                        fromTop: true).DestroySecurity());
+                }
+            }
+
+            #endregion
+
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/BT17/Red/GallantmonCrimsonModeAce_BT17_018.cs.meta

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

+ 271 - 0
Assets/CardEffect/BT17/Red/Gallantmon_BT17_016.cs

@@ -0,0 +1,271 @@
+using System.Collections;
+using System.Collections.Generic;
+using System;
+
+namespace DCGO.CardEffects.BT17
+{
+    public class Gallantmon_BT17_016 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            #region When Digivolving
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect(
+                    "Delete 1 Digimon with 8000 DP or less, or get +3000 DP and [Blocker] until the end of your opponent's turn",
+                    CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false,
+                    EffectDescription());
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[When Digivolving] Delete 1 of your opponent's Digimon with 8000 DP or less. If this effect didn't delete, this Digimon gets +3000 DP and gains [Blocker] until the end of your opponent's turn.";
+                }
+
+                bool CanSelectOpponentPermanentCondition(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
+                    {
+                        if (permanent.DP <= card.Owner.MaxDP_DeleteEffect(8000, activateClass))
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnBattleArea(card);
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    List<Permanent> deleteTargetPermanents = new List<Permanent>();
+
+                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectOpponentPermanentCondition))
+                    {
+                        int maxCount = Math.Min(1,
+                            CardEffectCommons.MatchConditionPermanentCount(CanSelectOpponentPermanentCondition));
+
+                        SelectPermanentEffect selectPermanentEffect =
+                            GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectOpponentPermanentCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: maxCount,
+                            canNoSelect: false,
+                            canEndNotMax: false,
+                            selectPermanentCoroutine: null,
+                            afterSelectPermanentCoroutine: AfterSelectPermanentCoroutine,
+                            mode: SelectPermanentEffect.Mode.Custom,
+                            cardEffect: activateClass);
+
+                        selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to delete.",
+                            "The opponent is selecting 1 Digimon to delete.");
+
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                        IEnumerator AfterSelectPermanentCoroutine(List<Permanent> permanents)
+                        {
+                            deleteTargetPermanents = permanents.Clone();
+                            yield return null;
+                        }
+                    }
+
+                    yield return ContinuousController.instance.StartCoroutine(
+                        CardEffectCommons.DeletePeremanentAndProcessAccordingToResult(
+                            targetPermanents: deleteTargetPermanents, activateClass: activateClass,
+                            successProcess: null, failureProcess: FailureProcess));
+
+                    IEnumerator FailureProcess()
+                    {
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ChangeDigimonDP(
+                            targetPermanent: card.PermanentOfThisCard(),
+                            changeValue: 3000,
+                            effectDuration: EffectDuration.UntilOpponentTurnEnd,
+                            activateClass: activateClass));
+
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainBlocker(
+                            targetPermanent: card.PermanentOfThisCard(),
+                            effectDuration: EffectDuration.UntilOpponentTurnEnd,
+                            activateClass: activateClass));
+                    }
+                }
+            }
+
+            #endregion
+
+            #region When Attacking
+
+            if (timing == EffectTiming.OnAllyAttack)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect(
+                    "Delete 1 Digimon with 8000 DP or less, or get +3000 DP and [Blocker] until the end of your opponent's turn",
+                    CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false,
+                    EffectDescription());
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[When Digivolving] Delete 1 of your opponent's Digimon with 8000 DP or less. If this effect didn't delete, this Digimon gets +3000 DP and gains [Blocker] until the end of your opponent's turn.";
+                }
+
+                bool CanSelectOpponentPermanentCondition(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
+                    {
+                        if (permanent.DP <= card.Owner.MaxDP_DeleteEffect(8000, activateClass))
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnAttack(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectOpponentPermanentCondition))
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    List<Permanent> deleteTargetPermanents = new List<Permanent>();
+
+                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectOpponentPermanentCondition))
+                    {
+                        int maxCount = Math.Min(1,
+                            CardEffectCommons.MatchConditionPermanentCount(CanSelectOpponentPermanentCondition));
+
+                        SelectPermanentEffect selectPermanentEffect =
+                            GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectOpponentPermanentCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: maxCount,
+                            canNoSelect: false,
+                            canEndNotMax: false,
+                            selectPermanentCoroutine: null,
+                            afterSelectPermanentCoroutine: AfterSelectPermanentCoroutine,
+                            mode: SelectPermanentEffect.Mode.Custom,
+                            cardEffect: activateClass);
+
+                        selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to delete.",
+                            "The opponent is selecting 1 Digimon to delete.");
+
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                        IEnumerator AfterSelectPermanentCoroutine(List<Permanent> permanents)
+                        {
+                            deleteTargetPermanents = permanents.Clone();
+                            yield return null;
+                        }
+                    }
+
+                    yield return ContinuousController.instance.StartCoroutine(
+                        CardEffectCommons.DeletePeremanentAndProcessAccordingToResult(
+                            targetPermanents: deleteTargetPermanents, activateClass: activateClass,
+                            successProcess: null, failureProcess: FailureProcess));
+
+                    IEnumerator FailureProcess()
+                    {
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ChangeDigimonDP(
+                            targetPermanent: card.PermanentOfThisCard(),
+                            changeValue: 3000,
+                            effectDuration: EffectDuration.UntilOpponentTurnEnd,
+                            activateClass: activateClass));
+
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainBlocker(
+                            targetPermanent: card.PermanentOfThisCard(),
+                            effectDuration: EffectDuration.UntilOpponentTurnEnd,
+                            activateClass: activateClass));
+                    }
+                }
+            }
+
+            #endregion
+
+            #region Your Turn
+
+            if (timing == EffectTiming.None)
+            {
+                CanNotAffectedClass canNotAffectedClass = new CanNotAffectedClass();
+                canNotAffectedClass.SetUpICardEffect("Isn't affected by opponent's effects", CanUseCondition, card);
+                canNotAffectedClass.SetUpCanNotAffectedClass(CardCondition: CardCondition, SkillCondition: SkillCondition);
+
+                cardEffects.Add(canNotAffectedClass);
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnBattleArea(card);
+                }
+
+                bool CardCondition(CardSource cardSource)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.IsOwnerTurn(card))
+                        {
+                            if (card.Owner.MemoryForPlayer <= 0)
+                            {
+                                if (card == card.PermanentOfThisCard().TopCard)
+                                {
+                                    if (cardSource == card.PermanentOfThisCard().TopCard)
+                                    {
+                                        return true;
+                                    }
+                                }
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool SkillCondition(ICardEffect cardEffect)
+                {
+                    return CardEffectCommons.IsOpponentEffect(cardEffect, card);
+                }
+            }
+
+            #endregion
+
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/BT17/Red/Gallantmon_BT17_016.cs.meta

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

+ 91 - 0
Assets/CardEffect/BT17/Red/Gigimon_BT17_001.cs

@@ -0,0 +1,91 @@
+using System.Collections;
+using System.Collections.Generic;
+using System;
+
+namespace DCGO.CardEffects.BT17
+{
+    public class Gigimon_BT17_001 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            #region When Attacking - ESS
+
+            if (timing == EffectTiming.OnAllyAttack)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Pay 1 to delete opponents' Digimon with 3000 DP or less",
+                    CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true,
+                    EffectDescription());
+                activateClass.SetIsInheritedEffect(true);
+                activateClass.SetHashString("Pay1Delete3000DP_BT17_001");
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[When Attacking] By paying 1 cost, delete 1 of your opponent's Digimon with 3000 DP or less.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnAttack(hashtable, card);
+                }
+
+                bool CanSelectOpponentPermanentCondition(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
+                    {
+                        if (permanent.DP <= card.Owner.MaxDP_DeleteEffect(3000, activateClass))
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.HasMatchConditionPermanent(CanSelectOpponentPermanentCondition);
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectOpponentPermanentCondition))
+                    {
+                        yield return ContinuousController.instance.StartCoroutine(
+                            card.Owner.AddMemory(-1, activateClass));
+
+                        int maxCount = Math.Min(1,
+                            CardEffectCommons.MatchConditionPermanentCount(CanSelectOpponentPermanentCondition));
+
+                        SelectPermanentEffect selectPermanentEffect =
+                            GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectOpponentPermanentCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: maxCount,
+                            canNoSelect: false,
+                            canEndNotMax: false,
+                            selectPermanentCoroutine: null,
+                            afterSelectPermanentCoroutine: null,
+                            mode: SelectPermanentEffect.Mode.Destroy,
+                            cardEffect: activateClass);
+
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                    }
+                }
+            }
+
+            #endregion
+
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/BT17/Red/Gigimon_BT17_001.cs.meta

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

+ 156 - 0
Assets/CardEffect/BT17/Red/Growlmon_BT17_010.cs

@@ -0,0 +1,156 @@
+using System.Collections;
+using System.Collections.Generic;
+using System;
+
+namespace DCGO.CardEffects.BT17
+{
+    public class Growlmon_BT17_010 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            #region When Digivolving
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Delete 1 Digimon with 4000 DP or less, or get +3000 DP for the turn", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false,
+                    EffectDescription());
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return "[When Digivolving] Delete 1 of your opponent's Digimon with 4000 DP or less. If this effect didn't delete, this Digimon gets +3000 DP for the turn.";
+                }
+
+                bool CanSelectOpponentPermanentCondition(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
+                    {
+                        if (permanent.DP <= card.Owner.MaxDP_DeleteEffect(4000, activateClass))
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnBattleArea(card);
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    List<Permanent> deleteTargetPermanents = new List<Permanent>();
+
+                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectOpponentPermanentCondition))
+                    {
+                        int maxCount = Math.Min(1,
+                            CardEffectCommons.MatchConditionPermanentCount(CanSelectOpponentPermanentCondition));
+
+                        SelectPermanentEffect selectPermanentEffect =
+                            GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectOpponentPermanentCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: maxCount,
+                            canNoSelect: false,
+                            canEndNotMax: false,
+                            selectPermanentCoroutine: null,
+                            afterSelectPermanentCoroutine: AfterSelectPermanentCoroutine,
+                            mode: SelectPermanentEffect.Mode.Custom,
+                            cardEffect: activateClass);
+
+                        selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to delete.",
+                            "The opponent is selecting 1 Digimon to delete.");
+
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                        IEnumerator AfterSelectPermanentCoroutine(List<Permanent> permanents)
+                        {
+                            deleteTargetPermanents = permanents.Clone();
+                            yield return null;
+                        }
+                    }
+
+                    yield return ContinuousController.instance.StartCoroutine(
+                        CardEffectCommons.DeletePeremanentAndProcessAccordingToResult(
+                            targetPermanents: deleteTargetPermanents, activateClass: activateClass,
+                            successProcess: null, failureProcess: FailureProcess));
+
+                    IEnumerator FailureProcess()
+                    {
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ChangeDigimonDP(
+                            targetPermanent: card.PermanentOfThisCard(),
+                            changeValue: 3000,
+                            effectDuration: EffectDuration.UntilEachTurnEnd,
+                            activateClass: activateClass));
+                    }
+                }
+            }
+
+            #endregion
+
+            #region All Turns - ESS
+
+            if (timing == EffectTiming.None)
+            {
+                ChangeDPDeleteEffectMaxDPClass changeDPDeleteEffectMaxDPClass = new ChangeDPDeleteEffectMaxDPClass();
+                changeDPDeleteEffectMaxDPClass.SetUpICardEffect(
+                    "Maximum DP of DP-based deletion effects gets +2000 DP if 0 or less memory",
+                    CanUseCondition, card);
+                changeDPDeleteEffectMaxDPClass.SetUpChangeDPDeleteEffectMaxDPClass(changeMaxDP: ChangeMaxDP);
+                changeDPDeleteEffectMaxDPClass.SetIsInheritedEffect(true);
+                cardEffects.Add(changeDPDeleteEffectMaxDPClass);
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if (isExistOnField(card))
+                    {
+                        if (card.Owner.MemoryForPlayer <= 0)
+                        {
+                            if (card.Owner.GetBattleAreaDigimons().Contains(card.PermanentOfThisCard()))
+                            {
+                                return true;
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                int ChangeMaxDP(int maxDP, ICardEffect cardEffect)
+                {
+                    if (cardEffect != null)
+                    {
+                        if (cardEffect.EffectSourceCard != null)
+                        {
+                            if (cardEffect.EffectSourceCard.Owner == card.Owner)
+                            {
+                                maxDP += 2000;
+                            }
+                        }
+                    }
+
+                    return maxDP;
+                }
+            }
+
+            #endregion
+
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/BT17/Red/Growlmon_BT17_010.cs.meta

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

+ 186 - 0
Assets/CardEffect/BT17/Red/Guilmon_BT17_008.cs

@@ -0,0 +1,186 @@
+using System.Collections;
+using System.Collections.Generic;
+using System;
+
+namespace DCGO.CardEffects.BT17
+{
+    public class Guilmon_BT17_008 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            #region Your Turn
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect(
+                    "Delete 1 of your opponent's Digimon with 3000 DP or less, or gain 1 memory", CanUseCondition,
+                    card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false,
+                    EffectDescription());
+                activateClass.SetHashString("Delete3000Gain1Memory_BT17_008");
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[Your Turn] [Once Per Turn] When one of your [Calumon] or Tamers with [Takato Matsuki] in their name is played, delete 1 of your opponent's Digimon with 3000 DP or less. If this effect didn't delete, gain 1 memory.";
+                }
+
+                bool PlayedPermanentCondition(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(permanent, card))
+                    {
+                        if (permanent.IsDigimon)
+                        {
+                            return permanent.TopCard.ContainsCardName("Calumon");
+                        }
+
+                        if (permanent.IsTamer)
+                        {
+                            return permanent.TopCard.ContainsCardName("Takato Matsuki") ||
+                                   permanent.TopCard.ContainsCardName("TakatoMatsuki");
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanSelectOpponentPermanentCondition(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
+                    {
+                        if (permanent.DP <= card.Owner.MaxDP_DeleteEffect(3000, activateClass))
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.CanTriggerOnPermanentPlay(hashtable, PlayedPermanentCondition))
+                        {
+                            if (CardEffectCommons.IsOwnerTurn(card))
+                            {
+                                return true;
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnBattleArea(card);
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    List<Permanent> deleteTargetPermanents = new List<Permanent>();
+
+                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectOpponentPermanentCondition))
+                    {
+                        int maxCount = Math.Min(1,
+                            CardEffectCommons.MatchConditionPermanentCount(CanSelectOpponentPermanentCondition));
+
+                        SelectPermanentEffect selectPermanentEffect =
+                            GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectOpponentPermanentCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: maxCount,
+                            canNoSelect: false,
+                            canEndNotMax: false,
+                            selectPermanentCoroutine: null,
+                            afterSelectPermanentCoroutine: AfterSelectPermanentCoroutine,
+                            mode: SelectPermanentEffect.Mode.Custom,
+                            cardEffect: activateClass);
+
+                        selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to delete.",
+                            "The opponent is selecting 1 Digimon to delete.");
+
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                        IEnumerator AfterSelectPermanentCoroutine(List<Permanent> permanents)
+                        {
+                            deleteTargetPermanents = permanents.Clone();
+                            yield return null;
+                        }
+                    }
+
+                    yield return ContinuousController.instance.StartCoroutine(
+                        CardEffectCommons.DeletePeremanentAndProcessAccordingToResult(
+                            targetPermanents: deleteTargetPermanents, activateClass: activateClass,
+                            successProcess: null, failureProcess: FailureProcess));
+
+                    IEnumerator FailureProcess()
+                    {
+                        yield return ContinuousController.instance.StartCoroutine(
+                            card.Owner.AddMemory(1, activateClass));
+                    }
+                }
+            }
+
+            #endregion
+
+            #region All Turns - ESS
+
+            if (timing == EffectTiming.None)
+            {
+                ChangeDPDeleteEffectMaxDPClass changeDPDeleteEffectMaxDPClass = new ChangeDPDeleteEffectMaxDPClass();
+                changeDPDeleteEffectMaxDPClass.SetUpICardEffect("Maximum DP of DP-based deletion effects gets +2000 DP if 0 or less memory",
+                    CanUseCondition, card);
+                changeDPDeleteEffectMaxDPClass.SetUpChangeDPDeleteEffectMaxDPClass(changeMaxDP: ChangeMaxDP);
+                changeDPDeleteEffectMaxDPClass.SetIsInheritedEffect(true);
+                cardEffects.Add(changeDPDeleteEffectMaxDPClass);
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if (isExistOnField(card))
+                    {
+                        if (card.Owner.MemoryForPlayer <= 0)
+                        {
+                            if (card.Owner.GetBattleAreaDigimons().Contains(card.PermanentOfThisCard()))
+                            {
+                                return true;
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                int ChangeMaxDP(int maxDP, ICardEffect cardEffect)
+                {
+                    if (cardEffect != null)
+                    {
+                        if (cardEffect.EffectSourceCard != null)
+                        {
+                            if (cardEffect.EffectSourceCard.Owner == card.Owner)
+                            {
+                                maxDP += 2000;
+                            }
+                        }
+                    }
+
+                    return maxDP;
+                }
+            }
+
+            #endregion
+
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/BT17/Red/Guilmon_BT17_008.cs.meta

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

+ 378 - 0
Assets/CardEffect/BT17/Red/MiraculousMegaKnight_BT17_095.cs

@@ -0,0 +1,378 @@
+using System.Collections;
+using System.Collections.Generic;
+using System;
+using System.Linq;
+
+namespace DCGO.CardEffects.BT17
+{
+    public class MiraculousMegaKnight_BT17_095 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            #region Main Effect
+
+            if (timing == EffectTiming.OptionSkill)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect($"Play 1 [Agumon] or [Gabumon] from your hand or trash",
+                    CanUseCondition, card);
+                activateClass.SetUpActivateClass(null, ActivateCoroutine, -1, true, EffectDescription());
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[Main] You may play 1 [Agumon]/[Gabumon] 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 CanSelectCardCondition(CardSource cardSource)
+                {
+                    if (CardEffectCommons.CanPlayAsNewPermanent(cardSource: cardSource, payCost: false, cardEffect: activateClass))
+                    {
+                        if (cardSource.IsDigimon)
+                        {
+                            return cardSource.ContainsCardName("Agumon") ||
+                                   cardSource.ContainsCardName("Gabumon");
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    bool canSelectHand = card.Owner.HandCards.Count(CanSelectCardCondition) >= 1;
+                    bool canSelectTrash = CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectCardCondition);
+
+                    if (canSelectHand || canSelectTrash)
+                    {
+                        if (canSelectHand && canSelectTrash)
+                        {
+                            List<SelectionElement<bool>> selectionElements = new List<SelectionElement<bool>>
+                            {
+                                new(message: "From hand", value: true, spriteIndex: 0),
+                                new(message: "From trash", value: false, spriteIndex: 1),
+                            };
+
+                            string selectPlayerMessage = "From which area do you play a card?";
+                            string notSelectPlayerMessage = "The opponent is choosing from which area to play 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());
+
+                        bool fromHand = GManager.instance.userSelectionManager.SelectedBoolValue;
+
+                        List<CardSource> selectedCards = new List<CardSource>();
+
+                        IEnumerator SelectCardCoroutine(CardSource cardSource)
+                        {
+                            selectedCards.Add(cardSource);
+                            yield return null;
+                        }
+
+                        if (fromHand)
+                        {
+                            int maxCount = card.Owner.HandCards.Count(CanSelectCardCondition);
+                            
+                            SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
+
+                            selectHandEffect.SetUp(
+                                selectPlayer: card.Owner,
+                                canTargetCondition: CanSelectCardCondition,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                maxCount: maxCount,
+                                canNoSelect: true,
+                                canEndNotMax: false,
+                                isShowOpponent: true,
+                                selectCardCoroutine: SelectCardCoroutine,
+                                afterSelectCardCoroutine: null,
+                                mode: SelectHandEffect.Mode.Custom,
+                                cardEffect: activateClass);
+
+                            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());
+                        }
+
+                        else
+                        {
+                            SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+
+                            selectCardEffect.SetUp(
+                                canTargetCondition: CanSelectCardCondition,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                canNoSelect: () => true,
+                                selectCardCoroutine: SelectCardCoroutine,
+                                afterSelectCardCoroutine: null,
+                                message: "Select 1 card to play.",
+                                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 play.", "The opponent is selecting 1 card to play.");
+                            selectCardEffect.SetUpCustomMessage_ShowCard("Played Card");
+
+                            yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
+                        }
+
+                        SelectCardEffect.Root root = SelectCardEffect.Root.Hand;
+
+                        if (!fromHand)
+                        {
+                            root = SelectCardEffect.Root.Trash;
+                        }
+
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(
+                            cardSources: selectedCards, activateClass: activateClass, payCost: false, isTapped: false, root: root,
+                            activateETB: true));
+                    }
+
+                    yield return ContinuousController.instance.StartCoroutine(
+                        CardEffectCommons.PlaceDelayOptionCards(card: card, cardEffect: activateClass));
+                }
+            }
+
+            #endregion
+
+            #region Delay Effect
+
+            if (timing == EffectTiming.WhenRemoveField)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect(
+                    "DNA digivolve into a Digimon card with [Omnimon] in its name",
+                    CanUseCondition, card);
+                activateClass.SetUpActivateClass(null, ActivateCoroutine, -1, true, EffectDescription());
+                activateClass.SetHashString("DNAOmnimon_BT17_095");
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[All Turns] When one of your level 6 Digimon with [Greymon]/[Garurumon] in its name would leave the battle area outside of a battle, [Delay]. ・That Digimon and a card in the hand may DNA digivolve into a Digimon card with [Omnimon] in its name in the hand.";
+                }
+
+                bool IsOwnerPermanentCondition(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
+                    {
+                        return permanent.TopCard.IsLevel6 && (permanent.TopCard.ContainsCardName("Greymon") ||
+                                                              permanent.TopCard.ContainsCardName("Garurumon"));
+                    }
+
+                    return false;
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
+                    {
+                        if (CardEffectCommons.CanTriggerWhenPermanentRemoveField(hashtable, IsOwnerPermanentCondition))
+                        {
+                            if (!CardEffectCommons.IsByBattle(hashtable))
+                            {
+                                return true;
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    yield return ContinuousController.instance.StartCoroutine(
+                        CardEffectCommons.DeletePeremanentAndProcessAccordingToResult(
+                            targetPermanents: new List<Permanent>() { card.PermanentOfThisCard() },
+                            activateClass: activateClass, successProcess: permanents => SuccessProcess(),
+                            failureProcess: null));
+                }
+
+                IEnumerator SuccessProcess()
+                {
+                    // TODO DNA
+                    yield return null;
+                }
+            }
+
+            #endregion
+
+            #region Security Effect
+
+            if (timing == EffectTiming.SecuritySkill)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect($"Play 1 [Tai Kamiya] or [Matt Ishida] from hand or trash and add this card to hand",
+                    CanUseCondition, card);
+                activateClass.SetUpActivateClass(null, ActivateCoroutine, -1, true, EffectDescription());
+                activateClass.SetIsSecurityEffect(true);
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[Security] You may play 1 card with [Tai Kamiya]/[Matt Ishida] in its name from your hand or trash without paying the cost. Then, add this card to the hand.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerSecurityEffect(hashtable, card);
+                }
+
+                bool CanSelectCardCondition(CardSource cardSource)
+                {
+                    if (CardEffectCommons.CanPlayAsNewPermanent(cardSource: cardSource, payCost: false, cardEffect: activateClass))
+                    {
+                        if (cardSource.IsTamer)
+                        {
+                            return cardSource.ContainsCardName("Tai Kamiya") ||
+                                   cardSource.ContainsCardName("TaiKamiya") ||
+                                   cardSource.ContainsCardName("Matt Ishida") ||
+                                   cardSource.ContainsCardName("MattIshida");
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    bool canSelectHand = card.Owner.HandCards.Count(CanSelectCardCondition) >= 1;
+                    bool canSelectTrash = CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectCardCondition);
+
+                    if (canSelectHand || canSelectTrash)
+                    {
+                        if (canSelectHand && canSelectTrash)
+                        {
+                            List<SelectionElement<bool>> selectionElements = new List<SelectionElement<bool>>
+                            {
+                                new(message: "From hand", value: true, spriteIndex: 0),
+                                new(message: "From trash", value: false, spriteIndex: 1),
+                            };
+
+                            string selectPlayerMessage = "From which area do you play a card?";
+                            string notSelectPlayerMessage = "The opponent is choosing from which area to play 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());
+
+                        bool fromHand = GManager.instance.userSelectionManager.SelectedBoolValue;
+
+                        List<CardSource> selectedCards = new List<CardSource>();
+
+                        IEnumerator SelectCardCoroutine(CardSource cardSource)
+                        {
+                            selectedCards.Add(cardSource);
+                            yield return null;
+                        }
+
+                        if (fromHand)
+                        {
+                            SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
+
+                            selectHandEffect.SetUp(
+                                selectPlayer: card.Owner,
+                                canTargetCondition: CanSelectCardCondition,
+                                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 play.", "The opponent is selecting 1 card to play.");
+                            selectHandEffect.SetUpCustomMessage_ShowCard("Played Card");
+
+                            yield return StartCoroutine(selectHandEffect.Activate());
+                        }
+
+                        else
+                        {
+                            SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+
+                            selectCardEffect.SetUp(
+                                canTargetCondition: CanSelectCardCondition,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                canNoSelect: () => true,
+                                selectCardCoroutine: SelectCardCoroutine,
+                                afterSelectCardCoroutine: null,
+                                message: "Select 1 card to play.",
+                                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 play.", "The opponent is selecting 1 card to play.");
+                            selectCardEffect.SetUpCustomMessage_ShowCard("Played Card");
+
+                            yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
+                        }
+
+                        SelectCardEffect.Root root = SelectCardEffect.Root.Hand;
+
+                        if (!fromHand)
+                        {
+                            root = SelectCardEffect.Root.Trash;
+                        }
+
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(
+                            cardSources: selectedCards, activateClass: activateClass, payCost: false, isTapped: false, root: root,
+                            activateETB: true));
+                    }
+
+                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.AddThisCardToHand(card, activateClass));
+                }
+            }
+
+            #endregion
+
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/BT17/Red/MiraculousMegaKnight_BT17_095.cs.meta

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

+ 221 - 0
Assets/CardEffect/BT17/Red/TaiKamiyaAndMattIshida_BT17_081.cs

@@ -0,0 +1,221 @@
+using System.Collections;
+using System.Collections.Generic;
+using System;
+
+namespace DCGO.CardEffects.BT17
+{
+    public class TaiKamiyaAndMattIshida_BT17_081 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            #region All Turns
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Gain Memory", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true,
+                    EffectDescription());
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[All Turns] When one of your Digimon is played or digivolves, by suspending this Tamer, if you have a Digimon with [Greymon] in its name, gain 1 memory. If you have a Digimon with [Garurumon] in its name, gain 1 memory.";
+                }
+
+                bool PermanentCondition(Permanent permanent)
+                {
+                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card);
+                }
+
+                bool IsGreymonPermanentCondition(Permanent permanent)
+                {
+                    return permanent.IsDigimon && permanent.TopCard.ContainsCardName("Greymon");
+                }
+
+                bool IsGarurumonPermanentCondition(Permanent permanent)
+                {
+                    return permanent.IsDigimon && permanent.TopCard.ContainsCardName("Garurumon");
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.IsOwnerTurn(card))
+                        {
+                            if (CardEffectCommons.CanTriggerOnPermanentPlay(hashtable, PermanentCondition) ||
+                                CardEffectCommons.CanTriggerWhenPermanentDigivolving(hashtable, PermanentCondition))
+                            {
+                                return true;
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.CanActivateSuspendCostEffect(card))
+                        {
+                            return CardEffectCommons.HasMatchConditionOwnersPermanent(card, IsGreymonPermanentCondition) ||
+                                   CardEffectCommons.HasMatchConditionOwnersPermanent(card, IsGarurumonPermanentCondition);
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    yield return ContinuousController.instance.StartCoroutine(
+                        new SuspendPermanentsClass(new List<Permanent>() { card.PermanentOfThisCard() },
+                            CardEffectCommons.CardEffectHashtable(activateClass)).Tap());
+
+                    if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, IsGreymonPermanentCondition))
+                    {
+                        yield return ContinuousController.instance.StartCoroutine(card.Owner.AddMemory(1, activateClass));
+                    }
+
+                    if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, IsGarurumonPermanentCondition))
+                    {
+                        yield return ContinuousController.instance.StartCoroutine(card.Owner.AddMemory(1, activateClass));
+                    }
+                }
+            }
+
+            #endregion
+
+            #region End of Your Turn
+
+            if (timing == EffectTiming.OnEndTurn)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("1 of your [Omnimon] can attack a player", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, true, EffectDescription());
+                activateClass.SetHashString("Attack_BT17_081");
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[End of Your Turn] [Once Per Turn] 1 of your Digimon with [Omnimon] in its name may attack a player.";
+                }
+
+                bool IsOmnimonPermanentCondition(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
+                    {
+                        if (permanent.TopCard.ContainsCardName("Omnimon"))
+                        {
+                            return permanent.CanAttack(activateClass);
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.IsOwnerTurn(card))
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.HasMatchConditionPermanent(IsOmnimonPermanentCondition))
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.HasMatchConditionPermanent(IsOmnimonPermanentCondition))
+                    {
+                        Permanent selectedPermanent = null;
+
+                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(IsOmnimonPermanentCondition));
+
+                        SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: IsOmnimonPermanentCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: maxCount,
+                            canNoSelect: false,
+                            canEndNotMax: false,
+                            selectPermanentCoroutine: SelectPermanentCoroutine,
+                            afterSelectPermanentCoroutine: null,
+                            mode: SelectPermanentEffect.Mode.Custom,
+                            cardEffect: activateClass);
+
+                        selectPermanentEffect.SetUpCustomMessage(
+                            "Select 1 Digimon that will attack.",
+                            "The opponent is selecting 1 Digimon that will attack.");
+
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                        IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                        {
+                            selectedPermanent = permanent;
+                            yield return null;
+                        }
+
+                        if (selectedPermanent != null)
+                        {
+                            if (selectedPermanent.CanAttack(activateClass))
+                            {
+                                if (selectedPermanent.CanAttackTargetDigimon(null, activateClass))
+                                {
+                                    SelectAttackEffect selectAttackEffect = GManager.instance.GetComponent<SelectAttackEffect>();
+
+                                    selectAttackEffect.SetUp(
+                                        attacker: selectedPermanent,
+                                        canAttackPlayerCondition: () => true,
+                                        defenderCondition: _ => false,
+                                        cardEffect: activateClass);
+
+                                    yield return ContinuousController.instance.StartCoroutine(selectAttackEffect.Activate());
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+
+            #endregion
+
+            #region Security Effect
+
+            if (timing == EffectTiming.SecuritySkill)
+            {
+                cardEffects.Add(CardEffectFactory.PlaySelfTamerSecurityEffect(card));
+            }
+
+            #endregion
+
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/BT17/Red/TaiKamiyaAndMattIshida_BT17_081.cs.meta

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

+ 349 - 0
Assets/CardEffect/BT17/Red/TakatoMatsuki_BT17_080.cs

@@ -0,0 +1,349 @@
+using System.Collections;
+using System.Collections.Generic;
+
+namespace DCGO.CardEffects.BT17
+{
+    public class TakatoMatsuki_BT17_080 : 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("Memory +1", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDescription());
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[Start of Your Main Phase] If you have a Digimon with [Guilmon]/[Growlmon]/[Gallantmon] in its name, gain 1 memory.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.IsOwnerTurn(card))
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (card.Owner.CanAddMemory(activateClass))
+                        {
+                            if (CardEffectCommons.HasMatchConditionOwnersPermanent(card,
+                                    permanent =>
+                                        permanent.IsDigimon &&
+                                        (permanent.TopCard.ContainsCardName("Guilmon") ||
+                                         permanent.TopCard.ContainsCardName("Growlmon") ||
+                                         permanent.TopCard.ContainsCardName("Gallantmon"))))
+                            {
+                                return true;
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    yield return ContinuousController.instance.StartCoroutine(card.Owner.AddMemory(1, activateClass));
+                }
+            }
+
+            #endregion
+
+            #region End of Your Turn
+
+            if (timing == EffectTiming.OnEndTurn)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Digivolve your [Guilmon] into [Gallantmon]", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDescription());
+                activateClass.SetHashString("Digivolution_BT17_080");
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[End of Your Turn] By placing this Tamer and 1 [Growlmon] and 1 [WarGrowlmon] from your trash as the bottom digivolution cards of 1 of your [Guilmon], that Digimon may digivolve into [Gallantmon] in the hand, ignoring its digivolution requirements and without paying the cost.";
+                }
+
+                bool CanSelectPermanentCondition(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
+                    {
+                        if (permanent.TopCard.ContainsCardName("Guilmon"))
+                        {
+                            if (!permanent.IsToken)
+                            {
+                                return true;
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanSelectGrowlmonCardCondition(CardSource cardSource)
+                {
+                    return cardSource.ContainsCardName("Growlmon");
+                }
+
+                bool CanSelectWarGrowlmonCardCondition(CardSource cardSource)
+                {
+                    return cardSource.ContainsCardName("WarGrowlmon");
+                }
+
+                bool CanSelectGallantmonCardCondition(CardSource cardSource)
+                {
+                    if (cardSource.ContainsCardName("Gallantmon"))
+                    {
+                        if (cardSource.Level == 6)
+                        {
+                            if (cardSource.HasLevel)
+                            {
+                                if (cardSource.IsDigimon)
+                                {
+                                    return true;
+                                }
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card) && CardEffectCommons.IsOwnerTurn(card))
+                    {
+                        if (!card.PermanentOfThisCard().IsToken)
+                        {
+                            if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                            {
+                                return CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectGrowlmonCardCondition) &&
+                                       CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectWarGrowlmonCardCondition);
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        return true;
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        List<CardSource> selectedCards = new List<CardSource>() { card };
+
+                        bool added = false;
+
+                        Permanent selectedPermanent = null;
+
+                        if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectGrowlmonCardCondition))
+                        {
+                            SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+
+                            selectCardEffect.SetUp(
+                                canTargetCondition: CanSelectGrowlmonCardCondition,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                canNoSelect: () => false,
+                                selectCardCoroutine: SelectCardCoroutine,
+                                afterSelectCardCoroutine: null,
+                                message: "Select 1 [Growlmon] to place in Digivolution cards.",
+                                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 [Growlmon] to place in Digivolution cards.",
+                                "The opponent is selecting 1 [Growlmon] to place in Digivolution cards.");
+                            selectCardEffect.SetUpCustomMessage_ShowCard("Digivolution Card");
+
+                            yield return StartCoroutine(selectCardEffect.Activate());
+
+                            IEnumerator SelectCardCoroutine(CardSource cardSource)
+                            {
+                                selectedCards.Add(cardSource);
+                                yield return null;
+                            }
+                        }
+
+                        if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectWarGrowlmonCardCondition))
+                        {
+                            SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+
+                            selectCardEffect.SetUp(
+                                canTargetCondition: CanSelectWarGrowlmonCardCondition,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                canNoSelect: () => false,
+                                selectCardCoroutine: SelectCardCoroutine,
+                                afterSelectCardCoroutine: null,
+                                message: "Select 1 [WarGrowlmon] to place in Digivolution cards.",
+                                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 [WarGrowlmon] to place in Digivolution cards.",
+                                "The opponent is selecting 1 [WarGrowlmon] to place in Digivolution cards.");
+                            selectCardEffect.SetUpCustomMessage_ShowCard("Digivolution Card");
+
+                            yield return StartCoroutine(selectCardEffect.Activate());
+
+                            IEnumerator SelectCardCoroutine(CardSource cardSource)
+                            {
+                                selectedCards.Add(cardSource);
+                                yield return null;
+                            }
+                        }
+
+                        if (selectedCards.Count == 3)
+                        {
+                            if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                            {
+                                SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                                selectPermanentEffect.SetUp(
+                                    selectPlayer: card.Owner,
+                                    canTargetCondition: CanSelectPermanentCondition,
+                                    canTargetCondition_ByPreSelecetedList: null,
+                                    canEndSelectCondition: null,
+                                    maxCount: 1,
+                                    canNoSelect: false,
+                                    canEndNotMax: false,
+                                    selectPermanentCoroutine: SelectPermanentCoroutine,
+                                    afterSelectPermanentCoroutine: null,
+                                    mode: SelectPermanentEffect.Mode.Custom,
+                                    cardEffect: activateClass);
+
+                                selectPermanentEffect.SetUpCustomMessage("Select 1 [Guilmon].", "The opponent is selecting 1 [Guilmon].");
+
+                                yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                                IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                                {
+                                    selectedPermanent = permanent;
+
+                                    yield return null;
+                                }
+                            }
+
+                            if (selectedPermanent != null)
+                            {
+                                if (selectedCards.Count == 3)
+                                {
+                                    List<CardSource> digivolutionCards = new List<CardSource>();
+
+                                    SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+
+                                    selectCardEffect.SetUp(
+                                        canTargetCondition: _ => true,
+                                        canTargetCondition_ByPreSelecetedList: null,
+                                        canEndSelectCondition: null,
+                                        canNoSelect: () => false,
+                                        selectCardCoroutine: null,
+                                        afterSelectCardCoroutine: AfterSelectCardCoroutine1,
+                                        message:
+                                        "Specify the order to place the cards in the digivolution cards\n(cards will be placed so that cards with lower numbers are on top).",
+                                        maxCount: selectedCards.Count,
+                                        canEndNotMax: false,
+                                        isShowOpponent: false,
+                                        mode: SelectCardEffect.Mode.Custom,
+                                        root: SelectCardEffect.Root.Custom,
+                                        customRootCardList: selectedCards,
+                                        canLookReverseCard: true,
+                                        selectPlayer: card.Owner,
+                                        cardEffect: activateClass);
+
+                                    selectCardEffect.SetUpCustomMessage_ShowCard("Digivolution Cards");
+
+                                    yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
+
+                                    IEnumerator AfterSelectCardCoroutine1(List<CardSource> cardSources)
+                                    {
+                                        digivolutionCards = cardSources.Clone();
+
+                                        yield return null;
+                                    }
+
+                                    if (selectedPermanent.TopCard != null)
+                                    {
+                                        yield return ContinuousController.instance.StartCoroutine(
+                                            selectedPermanent.AddDigivolutionCardsBottom(digivolutionCards, activateClass));
+
+                                        added = true;
+                                    }
+                                }
+                            }
+                        }
+
+                        if (added)
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.DigivolveIntoHandOrTrashCard(
+                                targetPermanent: selectedPermanent,
+                                cardCondition: CanSelectGallantmonCardCondition,
+                                payCost: false,
+                                reduceCostTuple: null,
+                                fixedCostTuple: null,
+                                ignoreDigivolutionRequirementFixedCost: -1,
+                                isHand: true,
+                                activateClass: activateClass,
+                                successProcess: null,
+                                ignoreLevel: true));
+                        }
+                    }
+                }
+            }
+
+            #endregion
+
+            #region Security Effect
+
+            if (timing == EffectTiming.SecuritySkill)
+            {
+                cardEffects.Add(CardEffectFactory.PlaySelfTamerSecurityEffect(card));
+            }
+
+            #endregion
+
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/BT17/Red/TakatoMatsuki_BT17_080.cs.meta

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

+ 119 - 0
Assets/CardEffect/BT17/Red/TakuyaKanbara_BT17_079.cs

@@ -0,0 +1,119 @@
+using System.Collections;
+using System.Collections.Generic;
+
+namespace DCGO.CardEffects.BT17
+{
+    public class TakuyaKanbara_BT17_079 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            #region Security Effect
+
+            if (timing == EffectTiming.SecuritySkill)
+            {
+                cardEffects.Add(CardEffectFactory.PlaySelfTamerSecurityEffect(card));
+            }
+
+            #endregion
+
+            #region Start of Your Main Phase
+
+            if (timing == EffectTiming.OnStartMainPhase)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Memory +1", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDescription());
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return "[Start of Your Main Phase] If your opponent has a Digimon, gain 1 memory.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.IsOwnerTurn(card))
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (card.Owner.Enemy.GetBattleAreaDigimons().Count >= 1)
+                        {
+                            if (card.Owner.CanAddMemory(activateClass))
+                            {
+                                return true;
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    yield return ContinuousController.instance.StartCoroutine(card.Owner.AddMemory(1, activateClass));
+                }
+            }
+
+            #endregion
+
+            #region Your Turn - ESS
+
+            if (timing == EffectTiming.None)
+            {
+                bool Condition()
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.IsOwnerTurn(card))
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                cardEffects.Add(CardEffectFactory.ChangeSelfDPStaticEffect(changeValue: 2000, isInheritedEffect: true, card: card,
+                    condition: Condition));
+            }
+
+            if (timing == EffectTiming.OnDetermineDoSecurityCheck)
+            {
+                bool Condition()
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.IsOwnerTurn(card))
+                        {
+                            if (card.PermanentOfThisCard().DP >= 10000)
+                            {
+                                return true;
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                cardEffects.Add(CardEffectFactory.PierceSelfEffect(isInheritedEffect: true, card: card, condition: Condition));
+            }
+
+            #endregion
+
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/BT17/Red/TakuyaKanbara_BT17_079.cs.meta

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

+ 532 - 0
Assets/CardEffect/BT17/Red/WarGreymon_BT17_015.cs

@@ -0,0 +1,532 @@
+using System.Collections;
+using System.Collections.Generic;
+using System;
+using System.Linq;
+
+namespace DCGO.CardEffects.BT17
+{
+    public class WarGreymon_BT17_015 : 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("Greymon");
+                }
+
+                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("Tai Kamiya") ||
+                                                 permanent.TopCard.ContainsCardName("TaiKamiya"));
+                }
+
+                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("Gabumon"))
+                    {
+                        return true;
+                    }
+                }
+
+                return false;
+            }
+
+            bool CanSelectHandCardSharedCondition(CardSource cardSource)
+            {
+                return cardSource.IsDigimon && cardSource.ContainsCardName("MetalGarurumon");
+            }
+
+            #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: ・Delete 1 of your opponent's Digimon with 8000 DP or less. ・1 of your [Gabumon] may digivolve into [MetalGarurumon] 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.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
+                    {
+                        if (permanent.DP <= card.Owner.MaxDP_DeleteEffect(8000, activateClass))
+                        {
+                            return true;
+                        }
+                    }
+
+                    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("WarGreymon_BT17");
+
+                        List<SelectionElement<int>> selectionElements = new List<SelectionElement<int>>()
+                        {
+                            new(message: "Delete 1 of your opponent's Digimon with 8000 DP or less",
+                                value: 0, spriteIndex: 0),
+                            new(
+                                message: "1 of your [Gabumon] may digivolve into [MetalGarurumon] 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.HasMatchConditionPermanent(CanSelectOpponentPermanentCondition))
+                                {
+                                    int maxCount = Math.Min(1,
+                                        CardEffectCommons.MatchConditionPermanentCount(CanSelectOpponentPermanentCondition));
+
+                                    SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                                    selectPermanentEffect.SetUp(
+                                        selectPlayer: card.Owner,
+                                        canTargetCondition: CanSelectOpponentPermanentCondition,
+                                        canTargetCondition_ByPreSelecetedList: null,
+                                        canEndSelectCondition: null,
+                                        maxCount: maxCount,
+                                        canNoSelect: false,
+                                        canEndNotMax: false,
+                                        selectPermanentCoroutine: null,
+                                        afterSelectPermanentCoroutine: null,
+                                        mode: SelectPermanentEffect.Mode.Destroy,
+                                        cardEffect: activateClass);
+
+                                    yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                                }
+
+                                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: ・Delete 1 of your opponent's Digimon with 8000 DP or less. ・1 of your [Gabumon] may digivolve into [MetalGarurumon] 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.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
+                    {
+                        if (permanent.DP <= card.Owner.MaxDP_DeleteEffect(8000, activateClass))
+                        {
+                            return true;
+                        }
+                    }
+
+                    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("WarGreymon_BT17");
+
+                        List<SelectionElement<int>> selectionElements = new List<SelectionElement<int>>()
+                        {
+                            new(message: "Delete 1 of your opponent's Digimon with 8000 DP or less",
+                                value: 0, spriteIndex: 0),
+                            new(
+                                message: "1 of your [Gabumon] may digivolve into [MetalGarurumon] 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.HasMatchConditionPermanent(CanSelectOpponentPermanentCondition))
+                                {
+                                    int maxCount = Math.Min(1,
+                                        CardEffectCommons.MatchConditionPermanentCount(CanSelectOpponentPermanentCondition));
+
+                                    SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                                    selectPermanentEffect.SetUp(
+                                        selectPlayer: card.Owner,
+                                        canTargetCondition: CanSelectOpponentPermanentCondition,
+                                        canTargetCondition_ByPreSelecetedList: null,
+                                        canEndSelectCondition: null,
+                                        maxCount: maxCount,
+                                        canNoSelect: false,
+                                        canEndNotMax: false,
+                                        selectPermanentCoroutine: null,
+                                        afterSelectPermanentCoroutine: null,
+                                        mode: SelectPermanentEffect.Mode.Destroy,
+                                        cardEffect: activateClass);
+
+                                    yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                                }
+
+                                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("Trash the top card of opponent's security", 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, trash the top card of your opponent's security stack.";
+                }
+
+                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 IDestroySecurity(
+                        player: card.Owner.Enemy,
+                        destroySecurityCount: 1,
+                        cardEffect: activateClass,
+                        fromTop: true).DestroySecurity());
+                }
+            }
+
+            #endregion
+
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/BT17/Red/WarGreymon_BT17_015.cs.meta

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

+ 189 - 0
Assets/CardEffect/BT17/Red/WarGrowlmon_BT17_013.cs

@@ -0,0 +1,189 @@
+using System.Collections;
+using System.Collections.Generic;
+using System;
+
+namespace DCGO.CardEffects.BT17
+{
+    public class WarGrowlmon_BT17_013 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            #region When Digivolving
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect(
+                    "Delete 1 Digimon with 6000 DP or less, or get [Security Attack +1] for the turn",
+                    CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false,
+                    EffectDescription());
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[When Digivolving] Delete 1 of your opponent's Digimon with 6000 DP or less. If this effect didn't delete, this Digimon gains [Security Attack +1] for the turn.";
+                }
+
+                bool CanSelectOpponentPermanentCondition(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
+                    {
+                        if (permanent.DP <= card.Owner.MaxDP_DeleteEffect(6000, activateClass))
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnBattleArea(card);
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    List<Permanent> deleteTargetPermanents = new List<Permanent>();
+
+                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectOpponentPermanentCondition))
+                    {
+                        int maxCount = Math.Min(1,
+                            CardEffectCommons.MatchConditionPermanentCount(CanSelectOpponentPermanentCondition));
+
+                        SelectPermanentEffect selectPermanentEffect =
+                            GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectOpponentPermanentCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: maxCount,
+                            canNoSelect: false,
+                            canEndNotMax: false,
+                            selectPermanentCoroutine: null,
+                            afterSelectPermanentCoroutine: AfterSelectPermanentCoroutine,
+                            mode: SelectPermanentEffect.Mode.Custom,
+                            cardEffect: activateClass);
+
+                        selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to delete.",
+                            "The opponent is selecting 1 Digimon to delete.");
+
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                        IEnumerator AfterSelectPermanentCoroutine(List<Permanent> permanents)
+                        {
+                            deleteTargetPermanents = permanents.Clone();
+                            yield return null;
+                        }
+                    }
+
+                    yield return ContinuousController.instance.StartCoroutine(
+                        CardEffectCommons.DeletePeremanentAndProcessAccordingToResult(
+                            targetPermanents: deleteTargetPermanents, activateClass: activateClass,
+                            successProcess: null, failureProcess: FailureProcess));
+
+                    IEnumerator FailureProcess()
+                    {
+                        yield return ContinuousController.instance.StartCoroutine(
+                            CardEffectCommons.ChangeDigimonSAttack(
+                                targetPermanent: card.PermanentOfThisCard(),
+                                changeValue: 1,
+                                effectDuration: EffectDuration.UntilEachTurnEnd,
+                                activateClass: activateClass));
+                    }
+                }
+            }
+
+            #endregion
+
+            #region Your Turn - ESS
+
+            if (timing == EffectTiming.OnDestroyedAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect(
+                    "Unsuspend this Digimon with [Gallantmon] in its name.", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, true, EffectDescription());
+                activateClass.SetIsInheritedEffect(true);
+                activateClass.SetHashString("Unsuspend_BT17_010");
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[All Turns] [Once Per Turn] When an effect deletes an opponent's Digimon, you may unsuspend this Digimon with [Gallantmon] in its name.";
+                }
+
+                bool OpponentPermanentCondition(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnOpponentBattleArea(permanent, card))
+                    {
+                        if (permanent.IsDigimon)
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.CanTriggerOnPermanentDeleted(hashtable, OpponentPermanentCondition))
+                        {
+                            if (CardEffectCommons.IsByEffect(hashtable, null))
+                            {
+                                return true;
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (card.PermanentOfThisCard().TopCard.ContainsCardName("Gallantmon"))
+                        {
+                            if (card.PermanentOfThisCard().IsSuspended)
+                            {
+                                return true;
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        yield return ContinuousController.instance.StartCoroutine(
+                            new IUnsuspendPermanents(new List<Permanent>() { card.PermanentOfThisCard() },
+                                activateClass).Unsuspend());
+                    }
+                }
+            }
+
+            #endregion
+
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/BT17/Red/WarGrowlmon_BT17_013.cs.meta

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

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

@@ -214,7 +214,7 @@ namespace DCGO.CardEffects.EX6
                 string EffectDescription()
                 {
                     return
-                        "[All Turns] When one of your Digimon with the[Angel]/[Archangel]/[Three Great Angels] trait would leave the battle area other than in battle, by trashing the top card of your security stack, prevent it from leaving.";
+                        "[All Turns] When one of your Digimon with the [Angel]/[Archangel]/[Three Great Angels] trait would leave the battle area other than in battle, by trashing the top card of your security stack, prevent it from leaving.";
                 }
 
                 bool PermanentCondition(Permanent permanent)

+ 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>();