Ver Fonte

Merge pull request #24 from DCGO2/EX6-Yellow

EX6-Yellow into EX6
Michael8818 há 2 anos atrás
pai
commit
fb475288d7
61 ficheiros alterados com 7347 adições e 41 exclusões
  1. 2 2
      Assets/CardBaseEntity/EX6/Yellow/Digimon/Mastemon-EX6-029.asset
  2. 2 2
      Assets/CardBaseEntity/EX6/Yellow/Digimon/Mastemon-EX6-029_P1.asset
  3. 2 2
      Assets/CardBaseEntity/EX6/Yellow/Digimon/Mastemon-EX6-029_P2.asset
  4. 2 2
      Assets/CardBaseEntity/EX6/Yellow/Digimon/Ophanimon-EX6-027.asset
  5. 2 2
      Assets/CardBaseEntity/EX6/Yellow/Digimon/Ophanimon-EX6-027_P1.asset
  6. 2 2
      Assets/CardBaseEntity/EX6/Yellow/Digimon/Ophanimon-EX6-027_P2.asset
  7. 2 2
      Assets/CardBaseEntity/EX6/Yellow/Digimon/Seraphimon-EX6-028.asset
  8. 2 2
      Assets/CardBaseEntity/EX6/Yellow/Digimon/Seraphimon-EX6-028_P1.asset
  9. 2 2
      Assets/CardBaseEntity/EX6/Yellow/Digimon/Seraphimon-EX6-028_P2.asset
  10. 1 1
      Assets/CardEffect/EX6/Red/Mythical_Arms_of_Salvation_EX6_065.cs
  11. 11 10
      Assets/CardEffect/EX6/Red/RagnaLoardmonAce_EX6_011.cs
  12. 76 0
      Assets/CardEffect/EX6/Yellow/Angemon_EX6_019.cs
  13. 11 0
      Assets/CardEffect/EX6/Yellow/Angemon_EX6_019.cs.meta
  14. 186 0
      Assets/CardEffect/EX6/Yellow/Angewomon_EX6_022.cs
  15. 11 0
      Assets/CardEffect/EX6/Yellow/Angewomon_EX6_022.cs.meta
  16. 411 0
      Assets/CardEffect/EX6/Yellow/ArkhaiAngemon_EX6_021.cs
  17. 11 0
      Assets/CardEffect/EX6/Yellow/ArkhaiAngemon_EX6_021.cs.meta
  18. 419 0
      Assets/CardEffect/EX6/Yellow/Cho_Hakkaimon_EX6_026.cs
  19. 11 0
      Assets/CardEffect/EX6/Yellow/Cho_Hakkaimon_EX6_026.cs.meta
  20. 124 0
      Assets/CardEffect/EX6/Yellow/Cupimon_EX6_003.cs
  21. 11 0
      Assets/CardEffect/EX6/Yellow/Cupimon_EX6_003.cs.meta
  22. 246 0
      Assets/CardEffect/EX6/Yellow/Descent_of_the_Three_Great_Angels_EX6_068.cs
  23. 11 0
      Assets/CardEffect/EX6/Yellow/Descent_of_the_Three_Great_Angels_EX6_068.cs.meta
  24. 321 0
      Assets/CardEffect/EX6/Yellow/Dominimon_EX6_030.cs
  25. 11 0
      Assets/CardEffect/EX6/Yellow/Dominimon_EX6_030.cs.meta
  26. 155 0
      Assets/CardEffect/EX6/Yellow/Final_Excalibur_EX6_067.cs
  27. 11 0
      Assets/CardEffect/EX6/Yellow/Final_Excalibur_EX6_067.cs.meta
  28. 236 0
      Assets/CardEffect/EX6/Yellow/Gatomon_EX6_020.cs
  29. 11 0
      Assets/CardEffect/EX6/Yellow/Gatomon_EX6_020.cs.meta
  30. 468 0
      Assets/CardEffect/EX6/Yellow/Gokuumon_EX6_023.cs
  31. 11 0
      Assets/CardEffect/EX6/Yellow/Gokuumon_EX6_023.cs.meta
  32. 390 0
      Assets/CardEffect/EX6/Yellow/Lucemon_EX6_018.cs
  33. 11 0
      Assets/CardEffect/EX6/Yellow/Lucemon_EX6_018.cs.meta
  34. 136 0
      Assets/CardEffect/EX6/Yellow/Luxmon_EX6_017.cs
  35. 11 0
      Assets/CardEffect/EX6/Yellow/Luxmon_EX6_017.cs.meta
  36. 610 0
      Assets/CardEffect/EX6/Yellow/MastemonAce_EX6_029.cs
  37. 11 0
      Assets/CardEffect/EX6/Yellow/MastemonAce_EX6_029.cs.meta
  38. 393 0
      Assets/CardEffect/EX6/Yellow/OphanimonAce_EX6_027.cs
  39. 11 0
      Assets/CardEffect/EX6/Yellow/OphanimonAce_EX6_027.cs.meta
  40. 506 0
      Assets/CardEffect/EX6/Yellow/Sagomon_EX6_024.cs
  41. 11 0
      Assets/CardEffect/EX6/Yellow/Sagomon_EX6_024.cs.meta
  42. 154 0
      Assets/CardEffect/EX6/Yellow/Salamon_EX6_016.cs
  43. 11 0
      Assets/CardEffect/EX6/Yellow/Salamon_EX6_016.cs.meta
  44. 486 0
      Assets/CardEffect/EX6/Yellow/Sanzomon_EX6_025.cs
  45. 11 0
      Assets/CardEffect/EX6/Yellow/Sanzomon_EX6_025.cs.meta
  46. 224 0
      Assets/CardEffect/EX6/Yellow/SeraphimonAce_EX6_028.cs
  47. 11 0
      Assets/CardEffect/EX6/Yellow/SeraphimonAce_EX6_028.cs.meta
  48. 617 0
      Assets/CardEffect/EX6/Yellow/Shakamon_EX6_031.cs
  49. 11 0
      Assets/CardEffect/EX6/Yellow/Shakamon_EX6_031.cs.meta
  50. 228 0
      Assets/CardEffect/EX6/Yellow/Shu_Chong_Wong_EX6_064.cs
  51. 11 0
      Assets/CardEffect/EX6/Yellow/Shu_Chong_Wong_EX6_064.cs.meta
  52. 259 0
      Assets/CardEffect/EX6/Yellow/TK_Takaishi_And_Kari_Kamiya_EX6_063.cs
  53. 11 0
      Assets/CardEffect/EX6/Yellow/TK_Takaishi_And_Kari_Kamiya_EX6_063.cs.meta
  54. 110 0
      Assets/Scripts/CardEffectCommons/GiveEffect/GiveEffectToPermanent/ChangeSAttack.cs
  55. 63 0
      Assets/Scripts/CardEffectCommons/GiveEffect/GiveEffectToPlayer/ChangeSAttack.cs
  56. 122 0
      Assets/Scripts/CardEffectFactory/ChangeSAttack.cs
  57. 9 1
      Assets/Scripts/CardEffectInterfaces.cs
  58. 18 3
      Assets/Scripts/CardEffects/ChangeSAttackClass.cs
  59. 46 0
      Assets/Scripts/CardEffects/InvertSAttackClass.cs
  60. 11 0
      Assets/Scripts/CardEffects/InvertSAttackClass.cs.meta
  61. 62 8
      Assets/Scripts/Permanent.cs

+ 2 - 2
Assets/CardBaseEntity/EX6/Yellow/Digimon/Mastemon-EX6-029.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:a7bd5ee2a634e4008b0ea29cf2f878af49150c95a101f8fea6fb302b16049ca9
-size 1658
+oid sha256:336457219f4b3115307c9466f77da616b95fab4c1396587b5ea615a708e44414
+size 1661

+ 2 - 2
Assets/CardBaseEntity/EX6/Yellow/Digimon/Mastemon-EX6-029_P1.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:4deddf41d3e15dea1d92e91c91a201c92bde41897c2c32efbb6b1f467d4efcc8
-size 1664
+oid sha256:79436c7f1fe7f90b97b26de336d08dd28968e63fceb45ba18c42b07b7109b8d8
+size 1667

+ 2 - 2
Assets/CardBaseEntity/EX6/Yellow/Digimon/Mastemon-EX6-029_P2.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:473ac10dcd8bb22539c3cace7313161cf41facec1e16074c6e0c8f8d612e71f4
-size 1664
+oid sha256:632c770d58a9c7ab04c394a36bf67773edfd78221734f260c21b85cc627cec5a
+size 1667

+ 2 - 2
Assets/CardBaseEntity/EX6/Yellow/Digimon/Ophanimon-EX6-027.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:bc32aac508ec3a07151b3e447176c0309b560b5030e3845d96a80afd8886d960
-size 1648
+oid sha256:9b5f962152b47d4dd7482d1bdee8938b77af879522af3ebc6b9f12b2683548c1
+size 1651

+ 2 - 2
Assets/CardBaseEntity/EX6/Yellow/Digimon/Ophanimon-EX6-027_P1.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:a0ce002df5b3e81666151c023f999c7e2881b4435ae0a3f3ce348e2b3fd9d684
-size 1654
+oid sha256:f11e33b8500eb4bee08d1138b6930574c2a7092f01a8795e4c91879bedd3b0b2
+size 1657

+ 2 - 2
Assets/CardBaseEntity/EX6/Yellow/Digimon/Ophanimon-EX6-027_P2.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:b32b3b06aff29afde19837ec8213890a6af917a4fe8f440bd3a6d6becf5db31f
-size 1654
+oid sha256:3c88e5461fca5a5123dbe3120016e84a407b818e2982c12118ce42a513bbebe7
+size 1657

+ 2 - 2
Assets/CardBaseEntity/EX6/Yellow/Digimon/Seraphimon-EX6-028.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:991b2e80141756d533d1f23a25aa84c4f80b361c8cab468c53f972f1a39345e9
-size 1503
+oid sha256:746e5762bf6ac8de65cbe19d9b80c0bef06c9bd92f8fe5ee92b8ce8d6f9e74ac
+size 1506

+ 2 - 2
Assets/CardBaseEntity/EX6/Yellow/Digimon/Seraphimon-EX6-028_P1.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:a8ffecf45f046973530f7e5783ab62ce62e89033a65f2c23352437eb0a9fc473
-size 1509
+oid sha256:5f9c7a0385db0f3cb6d57d7013cfa17e823a58ea5bfb9682f5b02f0cf73c86cd
+size 1512

+ 2 - 2
Assets/CardBaseEntity/EX6/Yellow/Digimon/Seraphimon-EX6-028_P2.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:21e1ac6a068148a8fcedcbfa5c30d6dba210fe46f07d9dbe973536fc51826ce0
-size 1509
+oid sha256:d5c0bd5a7fca2c5f9a262a28de0bd3705f1bc3e8f9d68d177a8499a6742126f4
+size 1512

+ 1 - 1
Assets/CardEffect/EX6/Red/Mythical_Arms_of_Salvation_EX6_065.cs

@@ -185,7 +185,7 @@ namespace DCGO.CardEffects.EX6
                 activateClass.SetUpICardEffect(
                     "Play 1 card with the [Legend-Arms] trait from the removed Digimon's digivolution cards without paying the cost",
                     CanUseCondition, card);
-                activateClass.SetUpActivateClass(null, ActivateCoroutine, 1, true, EffectDescription());
+                activateClass.SetUpActivateClass(null, ActivateCoroutine, -1, true, EffectDescription());
                 activateClass.SetHashString("PlayDigivolutionCard_EX6_065");
                 cardEffects.Add(activateClass);
                 

+ 11 - 10
Assets/CardEffect/EX6/Red/RagnaLoardmonAce_EX6_011.cs

@@ -11,15 +11,17 @@ namespace DCGO.CardEffects.EX6
         {
             List<ICardEffect> cardEffects = new List<ICardEffect>();
             
-            #region Blast DNA Digivolve
+            #region Ace - Blast DNA Digivolve
             
             if (timing == EffectTiming.OnCounterTiming)
             {
-                List<BlastDNACondition> blastDNAConditions = new List<BlastDNACondition>();
-                blastDNAConditions.Add(new BlastDNACondition("Durandamon"));
-                blastDNAConditions.Add(new BlastDNACondition("Bryweludramon"));
-
-                cardEffects.Add(CardEffectFactory.BlastDNADigivolveEffect(card: card, blastDNAConditions: blastDNAConditions, condition: null));
+                List<BlastDNACondition> blastDNAConditions = new List<BlastDNACondition>
+                {
+                    new("Durandamon"),
+                    new("BryweLudramon")
+                };
+                cardEffects.Add(CardEffectFactory.BlastDNADigivolveEffect(card: card,
+                    blastDNAConditions: blastDNAConditions, condition: null));
             }
             
             #endregion
@@ -101,11 +103,10 @@ namespace DCGO.CardEffects.EX6
                             return false;
                         }
                         
-                        JogressConditionElement[] elements = new JogressConditionElement[]
+                        JogressConditionElement[] elements =
                         {
-                            new JogressConditionElement(PermanentCondition1, "a level 6 Red Digimon"),
-                            
-                            new JogressConditionElement(PermanentCondition2, "a level 6 Black Digimon"),
+                            new(PermanentCondition1, "a level 6 Red Digimon"),
+                            new(PermanentCondition2, "a level 6 Black Digimon")
                         };
                         
                         JogressCondition jogressCondition = new JogressCondition(elements, 0);

+ 76 - 0
Assets/CardEffect/EX6/Yellow/Angemon_EX6_019.cs

@@ -0,0 +1,76 @@
+using System.Collections;
+using System.Collections.Generic;
+
+namespace DCGO.CardEffects.EX6
+{
+    public class Angemon_EX6_019 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+            
+            #region Barrier
+            
+            if (timing == EffectTiming.WhenPermanentWouldBeDeleted)
+            {
+                cardEffects.Add(
+                    CardEffectFactory.BarrierSelfEffect(isInheritedEffect: false, card: card, condition: 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);
+                activateClass.SetHashString("Draw1_EX6_019");
+                cardEffects.Add(activateClass);
+                
+                string EffectDescription()
+                {
+                    return
+                        "[When Attacking] [Once Per Turn] If this Digimon has the [Angel]/[Archangel]/[Three Great Angels] trait, [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)
+                        {
+                            if (card.PermanentOfThisCard().TopCard.ContainsTraits("Angel") ||
+                                card.PermanentOfThisCard().TopCard.ContainsTraits("Archangel") ||
+                                card.PermanentOfThisCard().TopCard.ContainsTraits("Three Great Angels") ||
+                                card.PermanentOfThisCard().TopCard.ContainsTraits("ThreeGreatAngels"))
+                            {
+                                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/EX6/Yellow/Angemon_EX6_019.cs.meta

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

+ 186 - 0
Assets/CardEffect/EX6/Yellow/Angewomon_EX6_022.cs

@@ -0,0 +1,186 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace DCGO.CardEffects.EX6
+{
+    public class Angewomon_EX6_022 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            #region Barrier
+            if (timing == EffectTiming.WhenPermanentWouldBeDeleted)
+            {
+                cardEffects.Add(CardEffectFactory.BarrierSelfEffect(isInheritedEffect: false, card: card, condition: null));
+            }
+            #endregion
+
+            #region On PLay/When Digivolving
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Give a Digimon Security Attack -2 or play [Mirei Mikagura] from hand", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[On Play] [When Digivolving] If you have a [Mirei Mikagura], 1 of your opponent's Digimon gains Security Attack -2 until the end of their turn. If you don't have a [Mirei Mikagura], you may play 1 [Mirei Mikagura] from your hand without paying the cost.";
+                }
+
+                bool CanSelectCardCondition(CardSource cardSource)
+                {
+                    if (cardSource.CardNames.Contains("Mirei Mikagura") || cardSource.CardNames.Contains("MireiMikagura"))
+                    {
+                        if (CardEffectCommons.CanPlayAsNewPermanent(cardSource: cardSource, payCost: false, cardEffect: activateClass))
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanSelectPermanentCondition(Permanent permanent)
+                {
+                    return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card);
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card) || CardEffectCommons.CanTriggerOnPlay(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (card.Owner.GetBattleAreaPermanents().Count((permanent) => permanent.TopCard.CardNames.Contains("Mirei Mikagura") || permanent.TopCard.CardNames.Contains("MireiMikagura")) == 0)
+                        {
+                            if (card.Owner.HandCards.Count >= 1)
+                            {
+                                return true;
+                            }
+                        }
+
+                        else
+                        {
+                            if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                            {
+                                return true;
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable _hashtable)
+                {
+                    if (card.Owner.GetBattleAreaPermanents().Count((permanent) => permanent.TopCard.CardNames.Contains("Mirei Mikagura") || permanent.TopCard.CardNames.Contains("MireiMikagura")) == 0)
+                    {
+                        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 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: false, isTapped: false, root: SelectCardEffect.Root.Hand, activateETB: true));
+                        }
+                    }
+
+                    else
+                    {
+                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                        {
+                            int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
+
+                            SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                            selectPermanentEffect.SetUp(
+                                selectPlayer: card.Owner,
+                                canTargetCondition: CanSelectPermanentCondition,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                maxCount: maxCount,
+                                canNoSelect: false,
+                                canEndNotMax: false,
+                                selectPermanentCoroutine: SelectPermanentCoroutine,
+                                afterSelectPermanentCoroutine: null,
+                                mode: SelectPermanentEffect.Mode.Custom,
+                                cardEffect: activateClass);
+
+                            selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon that will get Security Attack -2.", "The opponent is selecting 1 Digimon that will get Security Attack -2.");
+
+                            yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                            IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                            {
+                                yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ChangeDigimonSAttack(targetPermanent: permanent, changeValue: -2, effectDuration: EffectDuration.UntilOpponentTurnEnd, activateClass: activateClass));
+                            }
+                        }
+                    }
+                }
+            }
+            #endregion
+
+            #region Inherit
+            if (timing == EffectTiming.OnAllyAttack)
+            {
+                bool Condition()
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (card.PermanentOfThisCard().TopCard.CardTraits.Contains("Angel"))
+                        {
+                            return true;
+                        }
+
+                        if (card.PermanentOfThisCard().TopCard.CardTraits.Contains("Three Great Angels") || card.PermanentOfThisCard().TopCard.CardTraits.Contains("ThreeGreatAngels"))
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                cardEffects.Add(CardEffectFactory.AllianceSelfEffect(isInheritedEffect: true, card: card, condition: Condition));
+            }
+            #endregion
+
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/EX6/Yellow/Angewomon_EX6_022.cs.meta

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

+ 411 - 0
Assets/CardEffect/EX6/Yellow/ArkhaiAngemon_EX6_021.cs

@@ -0,0 +1,411 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace DCGO.CardEffects.EX6
+{
+    public class ArkhaiAngemon_EX6_021 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+            
+            #region Rule Text
+            
+            if (timing == EffectTiming.None)
+            {
+                ChangeTraitsClass changeTraitsClass = new ChangeTraitsClass();
+                changeTraitsClass.SetUpICardEffect("Trait: Has [Angel] 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("Angel");
+                    }
+                    
+                    return cardTraits;
+                }
+            }
+            
+            #endregion
+            
+            #region On Play/ When Digivolving Shared
+            
+            string EffectSharedDescription()
+            {
+                return
+                    "[On Play] [When Digivolving] By adding the top or bottom card of your security stack to the hand, 1 of your opponent's Digimon gets -4000 DP for the turn. Then, you may place 1 Digimon card with the [Angel]/[Archangel]/[Three Great Angels] trait from your hand at the bottom of your security stack.";
+            }
+            
+            bool CanSelectPermanentSharedCondition(Permanent permanent)
+            {
+                return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card);
+            }
+            
+            bool CanSelectCardSharedCondition(CardSource cardSource)
+            {
+                if (cardSource.IsDigimon)
+                {
+                    if (cardSource.ContainsTraits("Angel") ||
+                        cardSource.ContainsTraits("Archangel") ||
+                        cardSource.ContainsTraits("Three Great Angels") ||
+                        cardSource.ContainsTraits("ThreeGreatAngels"))
+                    {
+                        return true;
+                    }
+                }
+                
+                return false;
+            }
+            
+            bool CanActivateSharedCondition(Hashtable hashtable)
+            {
+                if (CardEffectCommons.IsExistOnBattleArea(card))
+                {
+                    if (card.Owner.SecurityCards.Count >= 1)
+                    {
+                        return true;
+                    }
+                    
+                    if (card.Owner.HandCards.Count >= 1)
+                    {
+                        return true;
+                    }
+                }
+                
+                return false;
+            }
+            
+            #endregion
+            
+            #region On Play
+            
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect(
+                    "Add 1 card from top or bottom security to hand to -4000 DP an opponent's Digimon, then place 1 card from hand at the bottom of security",
+                    CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateSharedCondition, ActivateCoroutine, -1, true,
+                    EffectSharedDescription());
+                cardEffects.Add(activateClass);
+                
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
+                }
+                
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (card.Owner.SecurityCards.Count >= 1)
+                    {
+                        List<SelectionElement<int>> selectionElements = new List<SelectionElement<int>>()
+                        {
+                            new(message: "Security Top", value: 0, spriteIndex: 0),
+                            new(message: "Security Bottom", value: 1, spriteIndex: 0),
+                            new(message: "No Selection", value: 2, spriteIndex: 1),
+                        };
+                        
+                        string selectPlayerMessage = "Add the top or bottom card of the security stack to hand";
+                        string notSelectPlayerMessage =
+                            "The opponent is selecting the top or bottom card of security stack.";
+                        
+                        GManager.instance.userSelectionManager.SetIntSelection(selectionElements: selectionElements,
+                            selectPlayer: card.Owner, selectPlayerMessage: selectPlayerMessage,
+                            notSelectPlayerMessage: notSelectPlayerMessage);
+                        
+                        yield return ContinuousController.instance.StartCoroutine(GManager.instance.userSelectionManager
+                            .WaitForEndSelect());
+                        
+                        int selectionValue = GManager.instance.userSelectionManager.SelectedIntValue;
+                        
+                        if (selectionValue != 2)
+                        {
+                            CardSource chosenSecurityCard = (selectionValue == 0)
+                                ? card.Owner.SecurityCards[0]
+                                : card.Owner.SecurityCards[^1];
+                            
+                            yield return ContinuousController.instance.StartCoroutine(
+                                CardObjectController.AddHandCards(new List<CardSource>() { chosenSecurityCard }, false,
+                                    activateClass));
+                            
+                            yield return ContinuousController.instance.StartCoroutine(new IReduceSecurity(
+                                player: card.Owner,
+                                refSkillInfos: ref ContinuousController.instance.nullSkillInfos).ReduceSecurity());
+                            
+                            if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentSharedCondition))
+                            {
+                                int maxCount = Math.Min(1,
+                                    CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentSharedCondition));
+                                
+                                SelectPermanentEffect selectPermanentEffect =
+                                    GManager.instance.GetComponent<SelectPermanentEffect>();
+                                
+                                selectPermanentEffect.SetUp(
+                                    selectPlayer: card.Owner,
+                                    canTargetCondition: CanSelectPermanentSharedCondition,
+                                    canTargetCondition_ByPreSelecetedList: null,
+                                    canEndSelectCondition: null,
+                                    maxCount: maxCount,
+                                    canNoSelect: false,
+                                    canEndNotMax: false,
+                                    selectPermanentCoroutine: SelectPermanentCoroutine,
+                                    afterSelectPermanentCoroutine: null,
+                                    mode: SelectPermanentEffect.Mode.Custom,
+                                    cardEffect: activateClass);
+                                
+                                selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon that will get DP -4000.",
+                                    "The opponent is selecting 1 Digimon that will get DP -4000.");
+                                
+                                yield return ContinuousController.instance.StartCoroutine(
+                                    selectPermanentEffect.Activate());
+                                
+                                IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                                {
+                                    yield return ContinuousController.instance.StartCoroutine(
+                                        CardEffectCommons.ChangeDigimonDP(
+                                            targetPermanent: permanent,
+                                            changeValue: -4000,
+                                            effectDuration: EffectDuration.UntilEachTurnEnd,
+                                            activateClass: activateClass));
+                                }
+                            }
+                        }
+                    }
+                    
+                    if (card.Owner.HandCards.Count(CanSelectCardSharedCondition) >= 1)
+                    {
+                        int maxCount = Math.Min(1, card.Owner.HandCards.Count(CanSelectCardSharedCondition));
+                        
+                        SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
+                        
+                        selectHandEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectCardSharedCondition,
+                            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 at the bottom of security.",
+                            "The opponent is selecting 1 card to place at the bottom of security.");
+                        selectHandEffect.SetUpCustomMessage_ShowCard("Security Bottom Card");
+                        
+                        yield return StartCoroutine(selectHandEffect.Activate());
+                        
+                        IEnumerator SelectCardCoroutine(CardSource cardSource)
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(
+                                CardObjectController.AddSecurityCard(cardSource, toTop: false));
+                            
+                            yield return ContinuousController.instance.StartCoroutine(GManager.instance
+                                .GetComponent<Effects>().CreateRecoveryEffect(cardSource.Owner));
+                            
+                            yield return ContinuousController.instance.StartCoroutine(
+                                new IAddSecurity(cardSource.Owner).AddSecurity());
+                        }
+                    }
+                }
+            }
+            
+            #endregion
+            
+            #region When Digivolving
+            
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect(
+                    "Add 1 card from top or bottom security to hand to -4000 DP an opponent's Digimon, then place 1 card from hand at the bottom of security",
+                    CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateSharedCondition, ActivateCoroutine, -1, true,
+                    EffectSharedDescription());
+                cardEffects.Add(activateClass);
+                
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                }
+                
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (card.Owner.SecurityCards.Count >= 1)
+                    {
+                        List<SelectionElement<int>> selectionElements = new List<SelectionElement<int>>()
+                        {
+                            new(message: "Security Top", value: 0, spriteIndex: 0),
+                            new(message: "Security Bottom", value: 1, spriteIndex: 0),
+                            new(message: "No Selection", value: 2, spriteIndex: 1),
+                        };
+                        
+                        string selectPlayerMessage = "Add the top or bottom card of the security stack to hand";
+                        string notSelectPlayerMessage =
+                            "The opponent is selecting the top or bottom card of security stack.";
+                        
+                        GManager.instance.userSelectionManager.SetIntSelection(selectionElements: selectionElements,
+                            selectPlayer: card.Owner, selectPlayerMessage: selectPlayerMessage,
+                            notSelectPlayerMessage: notSelectPlayerMessage);
+                        
+                        yield return ContinuousController.instance.StartCoroutine(GManager.instance.userSelectionManager
+                            .WaitForEndSelect());
+                        
+                        int selectionValue = GManager.instance.userSelectionManager.SelectedIntValue;
+                        
+                        if (selectionValue != 2)
+                        {
+                            CardSource chosenSecurityCard = (selectionValue == 0)
+                                ? card.Owner.SecurityCards[0]
+                                : card.Owner.SecurityCards[^1];
+                            
+                            yield return ContinuousController.instance.StartCoroutine(
+                                CardObjectController.AddHandCards(new List<CardSource>() { chosenSecurityCard }, false,
+                                    activateClass));
+                            
+                            yield return ContinuousController.instance.StartCoroutine(new IReduceSecurity(
+                                player: card.Owner,
+                                refSkillInfos: ref ContinuousController.instance.nullSkillInfos).ReduceSecurity());
+                            
+                            if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentSharedCondition))
+                            {
+                                int maxCount = Math.Min(1,
+                                    CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentSharedCondition));
+                                
+                                SelectPermanentEffect selectPermanentEffect =
+                                    GManager.instance.GetComponent<SelectPermanentEffect>();
+                                
+                                selectPermanentEffect.SetUp(
+                                    selectPlayer: card.Owner,
+                                    canTargetCondition: CanSelectPermanentSharedCondition,
+                                    canTargetCondition_ByPreSelecetedList: null,
+                                    canEndSelectCondition: null,
+                                    maxCount: maxCount,
+                                    canNoSelect: false,
+                                    canEndNotMax: false,
+                                    selectPermanentCoroutine: SelectPermanentCoroutine,
+                                    afterSelectPermanentCoroutine: null,
+                                    mode: SelectPermanentEffect.Mode.Custom,
+                                    cardEffect: activateClass);
+                                
+                                selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon that will get DP -4000.",
+                                    "The opponent is selecting 1 Digimon that will get DP -4000.");
+                                
+                                yield return ContinuousController.instance.StartCoroutine(
+                                    selectPermanentEffect.Activate());
+                                
+                                IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                                {
+                                    yield return ContinuousController.instance.StartCoroutine(
+                                        CardEffectCommons.ChangeDigimonDP(
+                                            targetPermanent: permanent,
+                                            changeValue: -4000,
+                                            effectDuration: EffectDuration.UntilEachTurnEnd,
+                                            activateClass: activateClass));
+                                }
+                            }
+                        }
+                    }
+                    
+                    if (card.Owner.HandCards.Count(CanSelectCardSharedCondition) >= 1)
+                    {
+                        int maxCount = Math.Min(1, card.Owner.HandCards.Count(CanSelectCardSharedCondition));
+                        
+                        SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
+                        
+                        selectHandEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectCardSharedCondition,
+                            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 at the bottom of security.",
+                            "The opponent is selecting 1 card to place at the bottom of security.");
+                        selectHandEffect.SetUpCustomMessage_ShowCard("Security Bottom Card");
+                        
+                        yield return StartCoroutine(selectHandEffect.Activate());
+                        
+                        IEnumerator SelectCardCoroutine(CardSource cardSource)
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(
+                                CardObjectController.AddSecurityCard(cardSource, toTop: false));
+                            
+                            yield return ContinuousController.instance.StartCoroutine(GManager.instance
+                                .GetComponent<Effects>().CreateRecoveryEffect(cardSource.Owner));
+                            
+                            yield return ContinuousController.instance.StartCoroutine(
+                                new IAddSecurity(cardSource.Owner).AddSecurity());
+                        }
+                    }
+                }
+            }
+            
+            #endregion
+            
+            #region Opponent's Turn - ESS
+            
+            if (timing == EffectTiming.None)
+            {
+                bool CanUseCondition()
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.IsOpponentTurn(card))
+                        {
+                            return true;
+                        }
+                    }
+                    
+                    return false;
+                }
+                
+                bool PermanentCondition(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
+                    {
+                        if (permanent.TopCard.ContainsTraits("Angel") ||
+                            permanent.TopCard.ContainsTraits("Archangel") ||
+                            permanent.TopCard.ContainsTraits("Three Great Angels") ||
+                            permanent.TopCard.ContainsTraits("ThreeGreatAngels"))
+                        {
+                            return true;
+                        }
+                    }
+                    
+                    return false;
+                }
+                
+                cardEffects.Add(CardEffectFactory.BlockerStaticEffect(
+                    permanentCondition: PermanentCondition,
+                    isInheritedEffect: true,
+                    card: card,
+                    condition: CanUseCondition));
+            }
+            
+            #endregion
+            
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/EX6/Yellow/ArkhaiAngemon_EX6_021.cs.meta

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

+ 419 - 0
Assets/CardEffect/EX6/Yellow/Cho_Hakkaimon_EX6_026.cs

@@ -0,0 +1,419 @@
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+using System;
+
+namespace DCGO.CardEffects.EX6
+{
+    public class Cho_Hakkaimon_EX6_026 : 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 -2", 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 element = new DigiXrosConditionElement(CanSelectCardCondition,
+                            "[Sanzomon] or [Gokuumon] or [Sagomon]");
+                        
+                        bool CanSelectCardCondition(CardSource xrosCardSource)
+                        {
+                            if (xrosCardSource != null)
+                            {
+                                if (xrosCardSource.Owner == card.Owner)
+                                {
+                                    if (xrosCardSource.IsDigimon)
+                                    {
+                                        if (xrosCardSource.ContainsCardName("Sanzomon") ||
+                                            xrosCardSource.ContainsCardName("Gokuumon") ||
+                                            xrosCardSource.ContainsCardName("Sagomon"))
+                                        {
+                                            return true;
+                                        }
+                                    }
+                                }
+                            }
+                            
+                            return false;
+                        }
+                        
+                        List<DigiXrosConditionElement> elements = new List<DigiXrosConditionElement>() { element };
+                        
+                        DigiXrosCondition digiXrosCondition = new DigiXrosCondition(elements, null, 2);
+                        
+                        return digiXrosCondition;
+                    }
+                    
+                    return null;
+                }
+            }
+            
+            #endregion
+            
+            #region On Play/ When Attacking/ ESS Shared
+            
+            string EffectSharedDescription()
+            {
+                return
+                    "[On Play] [When Attacking] [Once Per Turn] 1 Digimon may gain [Security Attack -1] until the end of your opponent's turn. Then, if DigiXrosing, this Digimon gets +3000 DP and [Blocker] until the end of your opponent's turn.";
+            }
+            
+            bool CanSelectSecMinusPermanentSharedCondition(Permanent permanent)
+            {
+                if (CardEffectCommons.IsPermanentExistsOnBattleArea(permanent))
+                {
+                    if (permanent.IsDigimon)
+                    {
+                        return true;
+                    }
+                }
+                
+                return false;
+            }
+            
+            #endregion
+            
+            #region On Play
+            
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect(
+                    "1 Digimon may gain [Security Attack -1] until the end of your opponent's turn. Then, if DigiXrosing, this Digimon gets +3000 DP and [Blocker] until the end of your opponent's turn.",
+                    CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false,
+                    EffectSharedDescription());
+                activateClass.SetHashString("SecurityAttack-1Buff_EX6-026");
+                cardEffects.Add(activateClass);
+                
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
+                }
+                
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectSecMinusPermanentSharedCondition))
+                        {
+                            return true;
+                        }
+                        
+                        if (CardEffectCommons.IsDijiXros(hashtable, count => count >= 1))
+                        {
+                            return true;
+                        }
+                    }
+                    
+                    return false;
+                }
+                
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectSecMinusPermanentSharedCondition))
+                    {
+                        int maxCount = Math.Min(1,
+                            CardEffectCommons.MatchConditionPermanentCount(CanSelectSecMinusPermanentSharedCondition));
+                        
+                        SelectPermanentEffect selectPermanentEffect =
+                            GManager.instance.GetComponent<SelectPermanentEffect>();
+                        
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectSecMinusPermanentSharedCondition,
+                            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 get Security Attack -1.",
+                            "The opponent is selecting 1 Digimon that will get Security Attack -1.");
+                        
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                        
+                        IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(
+                                CardEffectCommons.ChangeDigimonSAttack(targetPermanent: permanent, changeValue: -1,
+                                    effectDuration: EffectDuration.UntilOpponentTurnEnd, activateClass: activateClass));
+                        }
+                    }
+                    
+                    if (CardEffectCommons.IsDijiXros(hashtable, count => count >= 1))
+                    {
+                        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(
+                    "1 Digimon may gain [Security Attack -1] until the end of your opponent's turn",
+                    CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false,
+                    EffectSharedDescription());
+                activateClass.SetHashString("SecurityAttack-1_EX6-026");
+                cardEffects.Add(activateClass);
+                
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnAttack(hashtable, card);
+                }
+                
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectSecMinusPermanentSharedCondition))
+                        {
+                            return true;
+                        }
+                    }
+                    
+                    return false;
+                }
+                
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectSecMinusPermanentSharedCondition))
+                    {
+                        int maxCount = Math.Min(1,
+                            CardEffectCommons.MatchConditionPermanentCount(CanSelectSecMinusPermanentSharedCondition));
+                        
+                        SelectPermanentEffect selectPermanentEffect =
+                            GManager.instance.GetComponent<SelectPermanentEffect>();
+                        
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectSecMinusPermanentSharedCondition,
+                            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 get Security Attack -1.",
+                            "The opponent is selecting 1 Digimon that will get Security Attack -1.");
+                        
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                        
+                        IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(
+                                CardEffectCommons.ChangeDigimonSAttack(targetPermanent: permanent, changeValue: -1,
+                                    effectDuration: EffectDuration.UntilOpponentTurnEnd, activateClass: activateClass));
+                        }
+                    }
+                }
+            }
+            
+            #endregion
+            
+            #region All Turns
+            
+            if (timing == EffectTiming.WhenRemoveField)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect(
+                    "Return 1 yellow Digimon card from this Digimon's digivolution cards to the hand",
+                    CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false,
+                    EffectDescription());
+                activateClass.SetHashString("AllTurns_EX6_026");
+                cardEffects.Add(activateClass);
+                
+                string EffectDescription()
+                {
+                    return
+                        "[All Turns] When this Digimon would leave the battle area, return 1 yellow Digimon card from this Digimon's digivolution cards to the hand.";
+                }
+                
+                bool CanSelectCardCondition(CardSource cardSource)
+                {
+                    if (cardSource.IsDigimon)
+                    {
+                        if (cardSource.CardColors.Contains(CardColor.Yellow))
+                        {
+                            return true;
+                        }
+                    }
+                    
+                    return false;
+                }
+                
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.CanTriggerWhenRemoveField(hashtable, card))
+                        {
+                            return true;
+                        }
+                    }
+                    
+                    return false;
+                }
+                
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (card.PermanentOfThisCard().DigivolutionCards.Count(CanSelectCardCondition) >= 1)
+                        {
+                            return true;
+                        }
+                    }
+                    
+                    return false;
+                }
+                
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        Permanent cardPermanent = card.PermanentOfThisCard();
+                        
+                        if (cardPermanent.DigivolutionCards.Count(CanSelectCardCondition) >= 1)
+                        {
+                            int maxCount = Math.Min(1, cardPermanent.DigivolutionCards.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 return to hand.",
+                                maxCount: maxCount,
+                                canEndNotMax: false,
+                                isShowOpponent: true,
+                                mode: SelectCardEffect.Mode.AddHand,
+                                root: SelectCardEffect.Root.Custom,
+                                customRootCardList: cardPermanent.DigivolutionCards,
+                                canLookReverseCard: true,
+                                selectPlayer: card.Owner,
+                                cardEffect: activateClass);
+                            
+                            yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
+                        }
+                    }
+                }
+            }
+            
+            #endregion
+            
+            #region When Attacking - ESS
+            
+            if (timing == EffectTiming.OnAllyAttack)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Security Attack -1", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false,
+                    EffectDescription());
+                activateClass.SetIsInheritedEffect(true);
+                activateClass.SetHashString("SecurityAttack-1_EX6-026");
+                cardEffects.Add(activateClass);
+                
+                string EffectDescription()
+                {
+                    return
+                        "[When Attacking][Once Per Turn] 1 Digimon may gain [Security Attack -1] until the end of your opponent's turn.";
+                }
+                
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnAttack(hashtable, card);
+                }
+                
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        return true;
+                    }
+                    
+                    return false;
+                }
+                
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectSecMinusPermanentSharedCondition))
+                    {
+                        int maxCount = Math.Min(1,
+                            CardEffectCommons.MatchConditionPermanentCount(CanSelectSecMinusPermanentSharedCondition));
+                        
+                        SelectPermanentEffect selectPermanentEffect =
+                            GManager.instance.GetComponent<SelectPermanentEffect>();
+                        
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectSecMinusPermanentSharedCondition,
+                            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 get Security Attack -1.",
+                            "The opponent is selecting 1 Digimon that will get Security Attack -1.");
+                        
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                        
+                        IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(
+                                CardEffectCommons.ChangeDigimonSAttack(targetPermanent: permanent, changeValue: -1,
+                                    effectDuration: EffectDuration.UntilOpponentTurnEnd, activateClass: activateClass));
+                        }
+                    }
+                }
+            }
+            
+            #endregion
+            
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/EX6/Yellow/Cho_Hakkaimon_EX6_026.cs.meta

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

+ 124 - 0
Assets/CardEffect/EX6/Yellow/Cupimon_EX6_003.cs

@@ -0,0 +1,124 @@
+using System.Collections;
+using System.Collections.Generic;
+using System;
+using System.Linq;
+
+namespace DCGO.CardEffects.EX6
+{
+    public class Cupimon_EX6_003 : 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(
+                    "Add 1 card from top of security to hand to place 1 card from hand at the bottom of security",
+                    CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, true, EffectDescription());
+                activateClass.SetIsInheritedEffect(true);
+                cardEffects.Add(activateClass);
+                
+                string EffectDescription()
+                {
+                    return
+                        "[When Attacking] [Once Per Turn] By adding the top card of your security stack to the hand, you may place 1 Digimon card with the [Angel]/[Archangel]/[Three Great Angels] trait from your hand at the bottom of your security stack.";
+                }
+                
+                bool CanSelectCardCondition(CardSource cardSource)
+                {
+                    if (cardSource.ContainsTraits("Angel") ||
+                        cardSource.ContainsTraits("Archangel") ||
+                        cardSource.ContainsTraits("Three Great Angels") ||
+                        cardSource.ContainsTraits("ThreeGreatAngels"))
+                    {
+                        return true;
+                    }
+                    
+                    return false;
+                }
+                
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnAttack(hashtable, card);
+                }
+                
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (card.Owner.SecurityCards.Count >= 1)
+                        {
+                            return true;
+                        }
+                    }
+                    
+                    return false;
+                }
+                
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (card.Owner.SecurityCards.Count >= 1)
+                    {
+                        CardSource topCard = card.Owner.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,
+                            refSkillInfos: ref ContinuousController.instance.nullSkillInfos).ReduceSecurity());
+                        
+                        if (card.Owner.HandCards.Count(CanSelectCardCondition) >= 1)
+                        {
+                            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 place at the bottom of security.",
+                                "The opponent is selecting 1 card to place at the bottom of security.");
+                            selectHandEffect.SetUpCustomMessage_ShowCard("Security Bottom Card");
+                            
+                            yield return StartCoroutine(selectHandEffect.Activate());
+                            
+                            IEnumerator SelectCardCoroutine(CardSource cardSource)
+                            {
+                                yield return ContinuousController.instance.StartCoroutine(
+                                    CardObjectController.AddSecurityCard(cardSource, toTop: false));
+                                
+                                yield return ContinuousController.instance.StartCoroutine(GManager.instance
+                                    .GetComponent<Effects>().CreateRecoveryEffect(cardSource.Owner));
+                                
+                                yield return ContinuousController.instance.StartCoroutine(
+                                    new IAddSecurity(cardSource.Owner).AddSecurity());
+                            }
+                        }
+                    }
+                }
+            }
+            
+            #endregion
+            
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/EX6/Yellow/Cupimon_EX6_003.cs.meta

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

+ 246 - 0
Assets/CardEffect/EX6/Yellow/Descent_of_the_Three_Great_Angels_EX6_068.cs

@@ -0,0 +1,246 @@
+using System.Collections;
+using System.Collections.Generic;
+using System;
+using System.Linq;
+
+namespace DCGO.CardEffects.EX6
+{
+    public class Descent_of_the_Three_Great_Angels_EX6_068 : 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(card.BaseENGCardNameFromEntity, CanUseCondition, card);
+                activateClass.SetUpActivateClass(null, ActivateCoroutine, -1, false, EffectDescription());
+                cardEffects.Add(activateClass);
+                
+                string EffectDescription()
+                {
+                    return
+                        "[Main] You may place 1 Digimon card with the [Angel]/[Archangel]/[Three Great Angels] trait from your hand at the bottom of your security stack. Then, place this card in your battle area.";
+                }
+                
+                bool CanSelectCardCondition(CardSource cardSource)
+                {
+                    if (cardSource.IsDigimon)
+                    {
+                        if (cardSource.ContainsTraits("Angel") ||
+                            cardSource.ContainsTraits("Archangel") ||
+                            cardSource.ContainsTraits("Three Great Angels") ||
+                            cardSource.ContainsTraits("ThreeGreatAngels"))
+                        {
+                            return true;
+                        }
+                    }
+                    
+                    return false;
+                }
+                
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOptionMainEffect(hashtable, card);
+                }
+                
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (card.Owner.HandCards.Count(CanSelectCardCondition) >= 1)
+                    {
+                        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 place at the bottom of security.",
+                            "The opponent is selecting 1 card to place at the bottom of security.");
+                        selectHandEffect.SetUpCustomMessage_ShowCard("Security Bottom Card");
+                        
+                        yield return StartCoroutine(selectHandEffect.Activate());
+                        
+                        IEnumerator SelectCardCoroutine(CardSource cardSource)
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(
+                                CardObjectController.AddSecurityCard(cardSource, toTop: false));
+                            
+                            yield return ContinuousController.instance.StartCoroutine(GManager.instance
+                                .GetComponent<Effects>().CreateRecoveryEffect(cardSource.Owner));
+                            
+                            yield return ContinuousController.instance.StartCoroutine(
+                                new IAddSecurity(cardSource.Owner).AddSecurity());
+                        }
+                    }
+                    
+                    yield return ContinuousController.instance.StartCoroutine(
+                        CardEffectCommons.PlaceDelayOptionCards(card: card, cardEffect: activateClass));
+                }
+            }
+            
+            #endregion
+            
+            #region Delay Effect
+            
+            if (timing == EffectTiming.OnDestroyedAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect(
+                    "Play 1 card with the [Three Great Angels] trait from your security stack without paying the cost",
+                    CanUseCondition, card);
+                activateClass.SetUpActivateClass(null, ActivateCoroutine, -1, true, EffectDescription());
+                activateClass.SetHashString("PlaySecurityCard_EX6_068");
+                cardEffects.Add(activateClass);
+                
+                string EffectDescription()
+                {
+                    return
+                        "[All Turns] When one of your Digimon with the [Angel]/[Archangel]/[Three Great Angels] trait is deleted, [Delay] • Search your security stack. You may play 1 Digimon card with the [Three Great Angels] trait among it without paying the cost. Shuffle your security stack.";
+                }
+                
+                bool DeletedPermanentCondition(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
+                    {
+                        if (permanent.TopCard.ContainsTraits("Angel") ||
+                            permanent.TopCard.ContainsTraits("Archangel") ||
+                            permanent.TopCard.ContainsTraits("Three Great Angels") ||
+                            permanent.TopCard.ContainsTraits("ThreeGreatAngels"))
+                        {
+                            return true;
+                        }
+                    }
+                    
+                    return false;
+                }
+                
+                bool IsThreeGreatAngelsDigimonCard(CardSource cardSource)
+                {
+                    if (cardSource.IsDigimon)
+                    {
+                        if (cardSource.ContainsTraits("Three Great Angels") ||
+                            cardSource.ContainsTraits("ThreeGreatAngels"))
+                        {
+                            return true;
+                        }
+                    }
+                    
+                    return false;
+                }
+                
+                
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.CanDeclareOptionDelayEffect(card))
+                    {
+                        if (CardEffectCommons.CanTriggerOnPermanentDeleted(hashtable, DeletedPermanentCondition))
+                        {
+                            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()
+                {
+                    if (card.Owner.SecurityCards.Count(IsThreeGreatAngelsDigimonCard) >= 1)
+                    {
+                        int maxCount = Math.Min(1, card.Owner.SecurityCards.Count(IsThreeGreatAngelsDigimonCard));
+                        
+                        List<CardSource> selectedCards = new List<CardSource>();
+                        
+                        SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+                        
+                        selectCardEffect.SetUp(
+                            canTargetCondition: IsThreeGreatAngelsDigimonCard,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            canNoSelect: () => true,
+                            selectCardCoroutine: SelectCardCoroutine,
+                            afterSelectCardCoroutine: AfterSelectCardCoroutine,
+                            message: "Select 1 Digimon to play.",
+                            maxCount: maxCount,
+                            canEndNotMax: false,
+                            isShowOpponent: true,
+                            mode: SelectCardEffect.Mode.Custom,
+                            root: SelectCardEffect.Root.Security,
+                            customRootCardList: null,
+                            canLookReverseCard: true,
+                            selectPlayer: card.Owner,
+                            cardEffect: activateClass);
+                        
+                        yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
+                        
+                        IEnumerator SelectCardCoroutine(CardSource cardSource)
+                        {
+                            selectedCards.Add(cardSource);
+                            yield return null;
+                        }
+                        
+                        IEnumerator AfterSelectCardCoroutine(List<CardSource> cardSources)
+                        {
+                            if (cardSources.Count >= 1)
+                            {
+                                yield return ContinuousController.instance.StartCoroutine(new IReduceSecurity(
+                                    player: card.Owner,
+                                    refSkillInfos: ref ContinuousController.instance.nullSkillInfos).ReduceSecurity());
+                            }
+                            
+                            yield return null;
+                        }
+                        
+                        yield return ContinuousController.instance.StartCoroutine(
+                            CardEffectCommons.PlayPermanentCards(cardSources: selectedCards,
+                                activateClass: activateClass, payCost: false, isTapped: false,
+                                root: SelectCardEffect.Root.Security, activateETB: true));
+                        
+                        if (card.Owner.SecurityCards.Count >= 1)
+                        {
+                            ContinuousController.instance.PlaySE(GManager.instance.ShuffleSE);
+                            
+                            card.Owner.SecurityCards = RandomUtility.ShuffledDeckCards(card.Owner.SecurityCards);
+                        }
+                    }
+                }
+            }
+            
+            #endregion
+            
+            #region Security Effect
+            
+            if (timing == EffectTiming.SecuritySkill)
+            {
+                cardEffects.Add(CardEffectFactory.PlaceSelfDelayOptionSecurityEffect(card));
+            }
+            
+            #endregion
+            
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/EX6/Yellow/Descent_of_the_Three_Great_Angels_EX6_068.cs.meta

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

+ 321 - 0
Assets/CardEffect/EX6/Yellow/Dominimon_EX6_030.cs

@@ -0,0 +1,321 @@
+using System.Collections;
+using System.Collections.Generic;
+using System;
+using System.Linq;
+
+namespace DCGO.CardEffects.EX6
+{
+    public class Dominimon_EX6_030 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            #region Rule Text
+
+            if (timing == EffectTiming.None)
+            {
+                ChangeTraitsClass changeTraitsClass = new ChangeTraitsClass();
+                changeTraitsClass.SetUpICardEffect("Trait: Has [Angel] 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("Angel");
+                    }
+
+                    return cardTraits;
+                }
+            }
+
+            #endregion
+
+            #region When Digivolving
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect(
+                    "Play 1 level 5 or lower Digimon from security, then 1 of your opponent's Digimon gets -7000 DP until the end of the turn",
+                    CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false,
+                    EffectDescription());
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[When Digivolving] Search your security stack. You may play 1 level 5 or lower Digimon card with the [Angel]/[Archangel] trait among them without paying the cost. Then, shuffle your security stack, and 1 of your opponent's Digimon gets -7000 DP until the end of the turn.";
+                }
+
+                bool CanSelectCardCondition(CardSource cardSource)
+                {
+                    if (cardSource.IsDigimon)
+                    {
+                        if (cardSource.Level <= 5)
+                        {
+                            if (cardSource.ContainsTraits("Angel") || cardSource.ContainsTraits("Archangel"))
+                            {
+                                if (CardEffectCommons.CanPlayAsNewPermanent(cardSource: cardSource, payCost: false,
+                                        cardEffect: activateClass))
+                                {
+                                    return true;
+                                }
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanSelectPermanentCondition(Permanent permanent)
+                {
+                    return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card);
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        return true;
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (card.Owner.SecurityCards.Count >= 1)
+                    {
+                        int maxCount = Math.Min(1, card.Owner.SecurityCards.Count(CanSelectCardCondition));
+
+                        List<CardSource> selectedCards = new List<CardSource>();
+
+                        SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+
+                        selectCardEffect.SetUp(
+                            canTargetCondition: CanSelectCardCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            canNoSelect: () => true,
+                            selectCardCoroutine: SelectCardCoroutine,
+                            afterSelectCardCoroutine: AfterSelectCardCoroutine,
+                            message: "Select 1 Digimon to play.",
+                            maxCount: maxCount,
+                            canEndNotMax: false,
+                            isShowOpponent: true,
+                            mode: SelectCardEffect.Mode.Custom,
+                            root: SelectCardEffect.Root.Security,
+                            customRootCardList: null,
+                            canLookReverseCard: true,
+                            selectPlayer: card.Owner,
+                            cardEffect: activateClass);
+
+                        yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
+
+                        IEnumerator SelectCardCoroutine(CardSource cardSource)
+                        {
+                            selectedCards.Add(cardSource);
+
+                            yield return null;
+                        }
+
+                        IEnumerator AfterSelectCardCoroutine(List<CardSource> cardSources)
+                        {
+                            if (cardSources.Count >= 1)
+                            {
+                                yield return ContinuousController.instance.StartCoroutine(new IReduceSecurity(
+                                    player: card.Owner,
+                                    refSkillInfos: ref ContinuousController.instance.nullSkillInfos).ReduceSecurity());
+                            }
+
+                            yield return null;
+                        }
+
+                        yield return ContinuousController.instance.StartCoroutine(
+                            CardEffectCommons.PlayPermanentCards(cardSources: selectedCards,
+                                activateClass: activateClass, payCost: false, isTapped: false,
+                                root: SelectCardEffect.Root.Security, activateETB: true));
+                    }
+
+                    if (card.Owner.SecurityCards.Count >= 1)
+                    {
+                        ContinuousController.instance.PlaySE(GManager.instance.ShuffleSE);
+
+                        card.Owner.SecurityCards = RandomUtility.ShuffledDeckCards(card.Owner.SecurityCards);
+                    }
+
+                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                    {
+                        int maxCount = Math.Min(1,
+                            CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
+
+                        SelectPermanentEffect selectPermanentEffect =
+                            GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectPermanentCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: maxCount,
+                            canNoSelect: false,
+                            canEndNotMax: false,
+                            selectPermanentCoroutine: SelectPermanentCoroutine,
+                            afterSelectPermanentCoroutine: null,
+                            mode: SelectPermanentEffect.Mode.Custom,
+                            cardEffect: activateClass);
+
+                        selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon that will get DP -7000.",
+                            "The opponent is selecting 1 Digimon that will get DP -7000.");
+
+                        yield return ContinuousController.instance.StartCoroutine(
+                            selectPermanentEffect.Activate());
+
+                        IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(
+                                CardEffectCommons.ChangeDigimonDP(targetPermanent: permanent,
+                                    changeValue: -7000, effectDuration: EffectDuration.UntilEachTurnEnd,
+                                    activateClass: activateClass));
+                        }
+                    }
+                }
+            }
+
+            #endregion
+
+            #region All Turns
+
+            if (timing == EffectTiming.WhenRemoveField)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect(
+                    "By trashing the top card of your security stack, prevent one Digimon from leaving the battle area",
+                    CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true,
+                    EffectDescription());
+                activateClass.SetHashString("TrashSecurityToPreventLeaving_EX6_030");
+                cardEffects.Add(activateClass);
+
+                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.";
+                }
+
+                bool PermanentCondition(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
+                    {
+                        if (permanent.TopCard.ContainsTraits("Angel") ||
+                            permanent.TopCard.ContainsTraits("Archangel") ||
+                            permanent.TopCard.ContainsTraits("Three Great Angels") ||
+                            permanent.TopCard.ContainsTraits("ThreeGreatAngels"))
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
+                    {
+                        if (CardEffectCommons.CanTriggerWhenPermanentRemoveField(hashtable, PermanentCondition))
+                        {
+                            if (!CardEffectCommons.IsByBattle(hashtable) &&
+                                !CardEffectCommons.IsByEffect(hashtable,
+                                    cardEffect => CardEffectCommons.IsOwnerEffect(cardEffect, card)))
+                            {
+                                return true;
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (card.Owner.SecurityCards.Count >= 1)
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.HasMatchConditionPermanent(PermanentCondition))
+                        {
+                            int maxCount = Math.Min(1,
+                                CardEffectCommons.MatchConditionPermanentCount(PermanentCondition));
+
+                            SelectPermanentEffect selectPermanentEffect =
+                                GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                            selectPermanentEffect.SetUp(
+                                selectPlayer: card.Owner,
+                                canTargetCondition: PermanentCondition,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                maxCount: maxCount,
+                                canNoSelect: true,
+                                canEndNotMax: false,
+                                selectPermanentCoroutine: SelectPermanentCoroutine,
+                                afterSelectPermanentCoroutine: null,
+                                mode: SelectPermanentEffect.Mode.Custom,
+                                cardEffect: activateClass);
+
+                            selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to save.",
+                                "The opponent is selecting 1 Digimon to save.");
+
+                            yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                            IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                            {
+                                yield return ContinuousController.instance.StartCoroutine(new IDestroySecurity(
+                                    player: card.Owner,
+                                    destroySecurityCount: 1,
+                                    cardEffect: activateClass,
+                                    fromTop: true).DestroySecurity());
+
+                                permanent.willBeRemoveField = false;
+                                permanent.HideDeleteEffect();
+                                permanent.HideHandBounceEffect();
+                                permanent.HideDeckBounceEffect();
+                                permanent.HideWillRemoveFieldEffect();
+                            }
+                        }
+                    }
+                }
+            }
+
+            #endregion
+
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/EX6/Yellow/Dominimon_EX6_030.cs.meta

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

+ 155 - 0
Assets/CardEffect/EX6/Yellow/Final_Excalibur_EX6_067.cs

@@ -0,0 +1,155 @@
+using System.Collections;
+using System.Collections.Generic;
+using System;
+using System.Linq;
+
+namespace DCGO.CardEffects.EX6
+{
+    public class Final_Excalibur_EX6_067 : 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(card.BaseENGCardNameFromEntity, CanUseCondition, card);
+                activateClass.SetUpActivateClass(null, ActivateCoroutine, -1, false, EffectDescription());
+                cardEffects.Add(activateClass);
+                
+                string EffectDescription()
+                {
+                    return
+                        "[Main] Unsuspend 1 of your Digimon with the [Angel]/[Archangel]/[Three Great Angels] trait. If you have [Dominimon], unsuspend all of your Digimon with the [Angel]/[Archangel]/[Three Great Angels] trait instead.";
+                }
+                
+                bool PermanentIsDominimon(Permanent permanent)
+                {
+                    return permanent.TopCard.ContainsCardName("Dominimon");
+                }
+                
+                bool PermanentIsCorrectTarget(Permanent permanent)
+                {
+                    if (permanent.IsSuspended && permanent.CanUnsuspend)
+                    {
+                        if (permanent.TopCard.ContainsTraits("Angel") ||
+                            permanent.TopCard.ContainsTraits("Archangel") ||
+                            permanent.TopCard.ContainsTraits("Three Great Angels") ||
+                            permanent.TopCard.ContainsTraits("ThreeGreatAngels"))
+                        {
+                            return true;
+                        }
+                    }
+                    
+                    return false;
+                }
+                
+                bool CanSelectPermanentCondition(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
+                    {
+                        return PermanentIsCorrectTarget(permanent);
+                    }
+                    
+                    return false;
+                }
+                
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOptionMainEffect(hashtable, card);
+                }
+                
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                    {
+                        if (card.Owner.GetBattleAreaDigimons().Count(PermanentIsDominimon) >= 1)
+                        {
+                            List<Permanent> untappedPermanents = new List<Permanent>();
+                            
+                            foreach (Permanent permanent in card.Owner.GetBattleAreaDigimons())
+                            {
+                                if (PermanentIsCorrectTarget(permanent))
+                                {
+                                    untappedPermanents.Add(permanent);
+                                }
+                            }
+                            
+                            yield return ContinuousController.instance.StartCoroutine(
+                                new IUnsuspendPermanents(untappedPermanents, activateClass).Unsuspend());
+                        }
+                        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: false,
+                                canEndNotMax: false,
+                                selectPermanentCoroutine: null,
+                                afterSelectPermanentCoroutine: null,
+                                mode: SelectPermanentEffect.Mode.UnTap,
+                                cardEffect: activateClass);
+                            
+                            yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                        }
+                    }
+                }
+            }
+            
+            #endregion
+            
+            #region Security Effect
+            
+            if (timing == EffectTiming.SecuritySkill)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect($"[Recovery +1 <Deck>], then add this card to the hand", CanUseCondition,
+                    card);
+                activateClass.SetUpActivateClass(null, ActivateCoroutine, -1, false, EffectDiscription());
+                activateClass.SetIsSecurityEffect(true);
+                cardEffects.Add(activateClass);
+                
+                string EffectDiscription()
+                {
+                    return "[Security] [Recovery +1 <Deck>]. Then, add this card to the hand";
+                }
+                
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerSecurityEffect(hashtable, card);
+                }
+                
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (card.Owner.LibraryCards.Count >= 1)
+                    {
+                        if (card.Owner.CanAddSecurity(activateClass))
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(
+                                new IRecovery(card.Owner, 1, activateClass).Recovery());
+                        }
+                    }
+                    
+                    yield return ContinuousController.instance.StartCoroutine(
+                        CardEffectCommons.AddThisCardToHand(card, activateClass));
+                }
+            }
+            
+            #endregion
+            
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/EX6/Yellow/Final_Excalibur_EX6_067.cs.meta

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

+ 236 - 0
Assets/CardEffect/EX6/Yellow/Gatomon_EX6_020.cs

@@ -0,0 +1,236 @@
+using System.Collections;
+using System.Collections.Generic;
+using System;
+
+namespace DCGO.CardEffects.EX6
+{
+    public class Gatomon_EX6_020 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+            
+            #region On Play/When Digivolving Shared
+            
+            string EffectSharedDescription()
+            {
+                return
+                    "[On Play] [When Digivolving] Reveal the top 3 cards of your deck. Add 1 card with the [Angel]/[Archangel]/[Fallen Angel] trait and 1 [Mirei Mikagura] among them to the hand. Return the rest to the bottom of the deck.";
+            }
+            
+            bool CanSelectDigimonCardSharedCondition(CardSource cardSource)
+            {
+                if (cardSource.IsDigimon)
+                {
+                    if (cardSource.ContainsTraits("Angel") ||
+                        cardSource.ContainsTraits("Archangel") ||
+                        cardSource.ContainsTraits("Fallen Angel") ||
+                        cardSource.ContainsTraits("FallenAngel"))
+                    {
+                        return true;
+                    }
+                }
+                
+                return false;
+            }
+            
+            bool CanSelectTamerCardSharedCondition(CardSource cardSource)
+            {
+                if (cardSource.IsTamer)
+                {
+                    if (cardSource.ContainsCardName("Mirei Mikagura") ||
+                        cardSource.ContainsCardName("MireiMikagura"))
+                    {
+                        return true;
+                    }
+                }
+                
+                return false;
+            }
+            
+            bool CanActivateSharedCondition(Hashtable hashtable)
+            {
+                if (CardEffectCommons.IsExistOnBattleArea(card))
+                {
+                    if (card.Owner.LibraryCards.Count >= 1)
+                    {
+                        return true;
+                    }
+                }
+                
+                return false;
+            }
+            
+            #endregion
+            
+            #region On Play
+            
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Reveal the top 3 cards of deck", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateSharedCondition, ActivateCoroutine, -1, false,
+                    EffectSharedDescription());
+                cardEffects.Add(activateClass);
+                
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
+                }
+                
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    yield return ContinuousController.instance.StartCoroutine(
+                        CardEffectCommons.SimplifiedRevealDeckTopCardsAndSelect(
+                            revealCount: 3,
+                            simplifiedSelectCardConditions:
+                            new[]
+                            {
+                                new SimplifiedSelectCardConditionClass(
+                                    canTargetCondition: CanSelectDigimonCardSharedCondition,
+                                    message: "Select 1 Digimon card with the [Angel]/[Archangel]/[Fallen Angel] trait.",
+                                    mode: SelectCardEffect.Mode.AddHand,
+                                    maxCount: 1,
+                                    selectCardCoroutine: null),
+                                new SimplifiedSelectCardConditionClass(
+                                    canTargetCondition: CanSelectTamerCardSharedCondition,
+                                    message: "Select 1 Tamer card with [Mirei Mikagura] in its name.",
+                                    mode: SelectCardEffect.Mode.AddHand,
+                                    maxCount: 1,
+                                    selectCardCoroutine: null),
+                            },
+                            remainingCardsPlace: RemainingCardsPlace.DeckBottom,
+                            activateClass: activateClass
+                        ));
+                }
+            }
+            
+            #endregion
+            
+            #region When Digivolving
+            
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Reveal the top 3 cards of deck", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateSharedCondition, ActivateCoroutine, -1, false,
+                    EffectSharedDescription());
+                cardEffects.Add(activateClass);
+                
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                }
+                
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    yield return ContinuousController.instance.StartCoroutine(
+                        CardEffectCommons.SimplifiedRevealDeckTopCardsAndSelect(
+                            revealCount: 3,
+                            simplifiedSelectCardConditions:
+                            new[]
+                            {
+                                new SimplifiedSelectCardConditionClass(
+                                    canTargetCondition: CanSelectDigimonCardSharedCondition,
+                                    message: "Select 1 Digimon card with the [Angel]/[Archangel]/[Fallen Angel] trait.",
+                                    mode: SelectCardEffect.Mode.AddHand,
+                                    maxCount: 1,
+                                    selectCardCoroutine: null),
+                                new SimplifiedSelectCardConditionClass(
+                                    canTargetCondition: CanSelectTamerCardSharedCondition,
+                                    message: "Select 1 Tamer card with [Mirei Mikagura] in its name.",
+                                    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("DP -2000", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false,
+                    EffectDescription());
+                activateClass.SetIsInheritedEffect(true);
+                activateClass.SetHashString("DP-2000_EX6-020");
+                cardEffects.Add(activateClass);
+                
+                string EffectDescription()
+                {
+                    return "[When Attacking][Once Per Turn] 1 of your opponent's Digimon gets -2000 DP for the turn.";
+                }
+                
+                bool CanSelectPermanentCondition(Permanent permanent)
+                {
+                    return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card);
+                }
+                
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnAttack(hashtable, card);
+                }
+                
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        return true;
+                    }
+                    
+                    return false;
+                }
+                
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                    {
+                        int maxCount = Math.Min(1,
+                            CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
+                        
+                        SelectPermanentEffect selectPermanentEffect =
+                            GManager.instance.GetComponent<SelectPermanentEffect>();
+                        
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectPermanentCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: maxCount,
+                            canNoSelect: false,
+                            canEndNotMax: false,
+                            selectPermanentCoroutine: SelectPermanentCoroutine,
+                            afterSelectPermanentCoroutine: null,
+                            mode: SelectPermanentEffect.Mode.Custom,
+                            cardEffect: activateClass);
+                        
+                        selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon that will get DP -2000.",
+                            "The opponent is selecting 1 Digimon that will get DP -2000.");
+                        
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                        
+                        IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ChangeDigimonDP(
+                                targetPermanent: permanent,
+                                changeValue: -2000,
+                                effectDuration: EffectDuration.UntilEachTurnEnd,
+                                activateClass: activateClass));
+                        }
+                    }
+                }
+            }
+            
+            #endregion
+            
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/EX6/Yellow/Gatomon_EX6_020.cs.meta

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

+ 468 - 0
Assets/CardEffect/EX6/Yellow/Gokuumon_EX6_023.cs

@@ -0,0 +1,468 @@
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+using System;
+
+namespace DCGO.CardEffects.EX6
+{
+    public class Gokuumon_EX6_023 : 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 -2", 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 element = new DigiXrosConditionElement(CanSelectCardCondition,
+                            "[Sanzomon] or [Sagomon] or [Cho-Hakkaimon]");
+                        
+                        bool CanSelectCardCondition(CardSource xrosCardSource)
+                        {
+                            if (xrosCardSource != null)
+                            {
+                                if (xrosCardSource.Owner == card.Owner)
+                                {
+                                    if (xrosCardSource.IsDigimon)
+                                    {
+                                        if (xrosCardSource.ContainsCardName("Sanzomon") ||
+                                            xrosCardSource.ContainsCardName("Sagomon") ||
+                                            xrosCardSource.ContainsCardName("Cho-Hakkaimon"))
+                                        {
+                                            return true;
+                                        }
+                                    }
+                                }
+                            }
+                            
+                            return false;
+                        }
+                        
+                        List<DigiXrosConditionElement> elements = new List<DigiXrosConditionElement>() { element };
+                        
+                        DigiXrosCondition digiXrosCondition = new DigiXrosCondition(elements, null, 2);
+                        
+                        return digiXrosCondition;
+                    }
+                    
+                    return null;
+                }
+            }
+            
+            #endregion
+            
+            #region On Play/ When Attacking/ ESS Shared
+            
+            string EffectSharedDescription()
+            {
+                return
+                    "[On Play] [When Attacking] [Once Per Turn] 1 Digimon may gain [Security Attack -1] until the end of your opponent's turn. Then, if DigiXrosing, delete 1 of your opponent's Digimon with 6000 DP or less.";
+            }
+            
+            bool CanSelectSecMinusPermanentSharedCondition(Permanent permanent)
+            {
+                if (CardEffectCommons.IsPermanentExistsOnBattleArea(permanent))
+                {
+                    if (permanent.IsDigimon)
+                    {
+                        return true;
+                    }
+                }
+                
+                return false;
+            }
+            
+            #endregion
+            
+            #region On Play
+            
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect(
+                    "1 Digimon may gain [Security Attack -1] until the end of your opponent's turn. Then, if DigiXrosing, delete 1 of your opponent's Digimon with 6000 DP or less.",
+                    CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false,
+                    EffectSharedDescription());
+                activateClass.SetHashString("SecurityAttack-1Delete_EX6-023");
+                cardEffects.Add(activateClass);
+                
+                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(6000, activateClass))
+                        {
+                            return true;
+                        }
+                    }
+                    
+                    return false;
+                }
+                
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectSecMinusPermanentSharedCondition))
+                        {
+                            return true;
+                        }
+                        
+                        if (CardEffectCommons.IsDijiXros(hashtable, count => count >= 1))
+                        {
+                            if (CardEffectCommons.HasMatchConditionPermanent(CanSelectOpponentPermanentCondition))
+                            {
+                                return true;
+                            }
+                        }
+                    }
+                    
+                    return false;
+                }
+                
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectSecMinusPermanentSharedCondition))
+                    {
+                        int maxCount = Math.Min(1,
+                            CardEffectCommons.MatchConditionPermanentCount(CanSelectSecMinusPermanentSharedCondition));
+                        
+                        SelectPermanentEffect selectPermanentEffect =
+                            GManager.instance.GetComponent<SelectPermanentEffect>();
+                        
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectSecMinusPermanentSharedCondition,
+                            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 get Security Attack -1.",
+                            "The opponent is selecting 1 Digimon that will get Security Attack -1.");
+                        
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                        
+                        IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(
+                                CardEffectCommons.ChangeDigimonSAttack(targetPermanent: permanent, changeValue: -1,
+                                    effectDuration: EffectDuration.UntilOpponentTurnEnd, activateClass: activateClass));
+                        }
+                    }
+                    
+                    if (CardEffectCommons.IsDijiXros(hashtable, count => count >= 1))
+                    {
+                        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());
+                        }
+                    }
+                }
+            }
+            
+            #endregion
+            
+            #region When Attacking
+            
+            if (timing == EffectTiming.OnAllyAttack)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect(
+                    "1 Digimon may gain [Security Attack -1] until the end of your opponent's turn",
+                    CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false,
+                    EffectSharedDescription());
+                activateClass.SetHashString("SecurityAttack-1_EX6-023");
+                cardEffects.Add(activateClass);
+                
+                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(6000, activateClass))
+                        {
+                            return true;
+                        }
+                    }
+                    
+                    return false;
+                }
+                
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectSecMinusPermanentSharedCondition))
+                        {
+                            return true;
+                        }
+                    }
+                    
+                    return false;
+                }
+                
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectSecMinusPermanentSharedCondition))
+                    {
+                        int maxCount = Math.Min(1,
+                            CardEffectCommons.MatchConditionPermanentCount(CanSelectSecMinusPermanentSharedCondition));
+                        
+                        SelectPermanentEffect selectPermanentEffect =
+                            GManager.instance.GetComponent<SelectPermanentEffect>();
+                        
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectSecMinusPermanentSharedCondition,
+                            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 get Security Attack -1.",
+                            "The opponent is selecting 1 Digimon that will get Security Attack -1.");
+                        
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                        
+                        IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(
+                                CardEffectCommons.ChangeDigimonSAttack(targetPermanent: permanent, changeValue: -1,
+                                    effectDuration: EffectDuration.UntilOpponentTurnEnd, activateClass: activateClass));
+                        }
+                    }
+                }
+            }
+            
+            #endregion
+            
+            #region All Turns
+            
+            if (timing == EffectTiming.WhenRemoveField)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect(
+                    "Return 1 yellow Digimon card from this Digimon's digivolution cards to the hand",
+                    CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false,
+                    EffectDescription());
+                activateClass.SetHashString("AllTurns_EX6_023");
+                cardEffects.Add(activateClass);
+                
+                string EffectDescription()
+                {
+                    return
+                        "[All Turns] When this Digimon would leave the battle area, return 1 yellow Digimon card from this Digimon's digivolution cards to the hand.";
+                }
+                
+                bool CanSelectCardCondition(CardSource cardSource)
+                {
+                    if (cardSource.IsDigimon)
+                    {
+                        if (cardSource.CardColors.Contains(CardColor.Yellow))
+                        {
+                            return true;
+                        }
+                    }
+                    
+                    return false;
+                }
+                
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.CanTriggerWhenRemoveField(hashtable, card))
+                        {
+                            return true;
+                        }
+                    }
+                    
+                    return false;
+                }
+                
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (card.PermanentOfThisCard().DigivolutionCards.Count(CanSelectCardCondition) >= 1)
+                        {
+                            return true;
+                        }
+                    }
+                    
+                    return false;
+                }
+                
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        Permanent cardPermanent = card.PermanentOfThisCard();
+                        
+                        if (cardPermanent.DigivolutionCards.Count(CanSelectCardCondition) >= 1)
+                        {
+                            int maxCount = Math.Min(1, cardPermanent.DigivolutionCards.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 return to hand.",
+                                maxCount: maxCount,
+                                canEndNotMax: false,
+                                isShowOpponent: true,
+                                mode: SelectCardEffect.Mode.AddHand,
+                                root: SelectCardEffect.Root.Custom,
+                                customRootCardList: cardPermanent.DigivolutionCards,
+                                canLookReverseCard: true,
+                                selectPlayer: card.Owner,
+                                cardEffect: activateClass);
+                            
+                            yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
+                        }
+                    }
+                }
+            }
+            
+            #endregion
+            
+            #region When Attacking - ESS
+            
+            if (timing == EffectTiming.OnAllyAttack)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Security Attack -1", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false,
+                    EffectDescription());
+                activateClass.SetIsInheritedEffect(true);
+                activateClass.SetHashString("SecurityAttack-1_EX6-023");
+                cardEffects.Add(activateClass);
+                
+                string EffectDescription()
+                {
+                    return
+                        "[When Attacking][Once Per Turn] 1 Digimon may gain [Security Attack -1] until the end of your opponent's turn.";
+                }
+                
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnAttack(hashtable, card);
+                }
+                
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        return true;
+                    }
+                    
+                    return false;
+                }
+                
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectSecMinusPermanentSharedCondition))
+                    {
+                        int maxCount = Math.Min(1,
+                            CardEffectCommons.MatchConditionPermanentCount(CanSelectSecMinusPermanentSharedCondition));
+                        
+                        SelectPermanentEffect selectPermanentEffect =
+                            GManager.instance.GetComponent<SelectPermanentEffect>();
+                        
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectSecMinusPermanentSharedCondition,
+                            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 get Security Attack -1.",
+                            "The opponent is selecting 1 Digimon that will get Security Attack -1.");
+                        
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                        
+                        IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(
+                                CardEffectCommons.ChangeDigimonSAttack(targetPermanent: permanent, changeValue: -1,
+                                    effectDuration: EffectDuration.UntilOpponentTurnEnd, activateClass: activateClass));
+                        }
+                    }
+                }
+            }
+            
+            #endregion
+            
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/EX6/Yellow/Gokuumon_EX6_023.cs.meta

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

+ 390 - 0
Assets/CardEffect/EX6/Yellow/Lucemon_EX6_018.cs

@@ -0,0 +1,390 @@
+using System.Collections;
+using System.Collections.Generic;
+using System;
+using System.Linq;
+
+namespace DCGO.CardEffects.EX6
+{
+    public class Lucemon_EX6_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.ContainsCardName("Cupimon");
+                }
+                
+                cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(
+                    permanentCondition: PermanentCondition,
+                    digivolutionCost: 5,
+                    ignoreDigivolutionRequirement: false,
+                    card: card,
+                    condition: null)
+                );
+            }
+            
+            #endregion
+            
+            #region Play Cost Reduction
+            
+            if (timing == EffectTiming.None)
+            {
+                ChangeCostClass changeCostClass = new ChangeCostClass();
+                changeCostClass.SetUpICardEffect($"Play Cost -5", 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, IsPermanentLevel5OrLower))
+                        {
+                            return true;
+                        }
+                    }
+                    
+                    return false;
+                }
+                
+                bool IsPermanentLevel5OrLower(Permanent permanent)
+                {
+                    return permanent.IsDigimon && permanent.Level <= 5;
+                }
+                
+                int ChangeCost(CardSource cardSource, int cost, SelectCardEffect.Root root,
+                    List<Permanent> targetPermanents)
+                {
+                    if (CardSourceCondition(cardSource))
+                    {
+                        if (RootCondition(root))
+                        {
+                            if (PermanentsCondition(targetPermanents))
+                            {
+                                cost -= 5;
+                            }
+                        }
+                    }
+                    
+                    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/ Start of Your Main Phase Shared
+            
+            string EffectSharedDescription()
+            {
+                return
+                    "[On Play] [Start of Your Main Phase] Reveal the top 3 cards of your deck. Add 1 card with the [Angel]/[Archangel]/[Three Great Angels]/[Seven Great Demon Lords] trait among them to your hand. Trash the rest.";
+            }
+            
+            bool CanSelectCardSharedCondition(CardSource cardSource)
+            {
+                if (cardSource.ContainsTraits("Angel") ||
+                    cardSource.ContainsTraits("Archangel") ||
+                    cardSource.ContainsTraits("Three Great Angels") ||
+                    cardSource.ContainsTraits("ThreeGreatAngels") ||
+                    cardSource.ContainsTraits("Seven Great Demon Lords") ||
+                    cardSource.ContainsTraits("SevenGreatDemonLords"))
+                {
+                    return true;
+                }
+                
+                return false;
+            }
+            
+            bool CanActivateSharedCondition(Hashtable hashtable)
+            {
+                if (CardEffectCommons.IsExistOnBattleArea(card))
+                {
+                    if (card.Owner.LibraryCards.Count >= 1)
+                    {
+                        return true;
+                    }
+                }
+                
+                return false;
+            }
+            
+            #endregion
+            
+            #region On Play
+            
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Reveal the top 3 cards of deck", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateSharedCondition, ActivateCoroutine, -1, false,
+                    EffectSharedDescription());
+                cardEffects.Add(activateClass);
+                
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
+                }
+                
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    yield return ContinuousController.instance.StartCoroutine(
+                        CardEffectCommons.SimplifiedRevealDeckTopCardsAndSelect(
+                            revealCount: 3,
+                            simplifiedSelectCardConditions:
+                            new[]
+                            {
+                                new SimplifiedSelectCardConditionClass(
+                                    canTargetCondition: CanSelectCardSharedCondition,
+                                    message:
+                                    "Select 1 Digimon card with the [Angel]/[Archangel]/[Three Great Angels]/[Seven Great Demon Lords] trait.",
+                                    mode: SelectCardEffect.Mode.AddHand,
+                                    maxCount: 1,
+                                    selectCardCoroutine: null),
+                            },
+                            remainingCardsPlace: RemainingCardsPlace.Trash,
+                            activateClass: activateClass
+                        ));
+                }
+            }
+            
+            #endregion
+            
+            #region Start of Your Main Phase
+            
+            if (timing == EffectTiming.OnStartMainPhase)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Reveal the top 3 cards of deck", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateSharedCondition, ActivateCoroutine, -1, false,
+                    EffectSharedDescription());
+                cardEffects.Add(activateClass);
+                
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.IsOwnerTurn(card))
+                        {
+                            return true;
+                        }
+                    }
+                    
+                    return false;
+                }
+                
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    yield return ContinuousController.instance.StartCoroutine(
+                        CardEffectCommons.SimplifiedRevealDeckTopCardsAndSelect(
+                            revealCount: 3,
+                            simplifiedSelectCardConditions:
+                            new[]
+                            {
+                                new SimplifiedSelectCardConditionClass(
+                                    canTargetCondition: CanSelectCardSharedCondition,
+                                    message:
+                                    "Select 1 Digimon card with the [Angel]/[Archangel]/[Three Great Angels]/[Seven Great Demon Lords] trait.",
+                                    mode: SelectCardEffect.Mode.AddHand,
+                                    maxCount: 1,
+                                    selectCardCoroutine: null),
+                            },
+                            remainingCardsPlace: RemainingCardsPlace.Trash,
+                            activateClass: activateClass
+                        ));
+                }
+            }
+            
+            #endregion
+            
+            #region End of Your Turn
+            
+            if (timing == EffectTiming.OnEndTurn)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect(
+                    "Place one of your level 6 Digimon on top of your security stack to digivolve into [Lucemon: Chaos Mode] in the trash without paying the cost.",
+                    CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, true, EffectDescription());
+                activateClass.SetHashString("EOT_EX6-018");
+                cardEffects.Add(activateClass);
+                
+                string EffectDescription()
+                {
+                    return
+                        "[End of Your Turn] [Once Per Turn] By placing one of your level 6 Digimon on top of your security stack, this Digimon may digivolve into [Lucemon: Chaos Mode] in the trash without paying the cost.";
+                }
+                
+                bool IsPermanentLevel6Condition(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
+                    {
+                        if (permanent.TopCard.IsLevel6)
+                        {
+                            return true;
+                        }
+                    }
+                    
+                    return false;
+                }
+                
+                bool IsCardLucemonChaosModeCondition(CardSource cardSource)
+                {
+                    if (cardSource.IsDigimon)
+                    {
+                        if (cardSource.ContainsCardName("Lucemon: Chaos Mode") ||
+                            cardSource.ContainsCardName("Lucemon:ChaosMode") ||
+                            cardSource.ContainsCardName("Lucemon Chaos Mode") ||
+                            cardSource.ContainsCardName("LucemonChaosMode"))
+                        {
+                            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.HasMatchConditionPermanent(IsPermanentLevel6Condition))
+                        {
+                            return true;
+                        }
+                    }
+                    
+                    return false;
+                }
+                
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.HasMatchConditionPermanent(IsPermanentLevel6Condition))
+                    {
+                        Permanent selectedPermanent = null;
+                        
+                        int maxCount = Math.Min(1,
+                            CardEffectCommons.MatchConditionPermanentCount(IsPermanentLevel6Condition));
+                        
+                        SelectPermanentEffect selectPermanentEffect =
+                            GManager.instance.GetComponent<SelectPermanentEffect>();
+                        
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: IsPermanentLevel6Condition,
+                            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 place on top of your security stack.",
+                            "The opponent is selecting 1 Digimon to place on top of their security stack.");
+                        
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                        
+                        IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                        {
+                            selectedPermanent = permanent;
+                            yield return null;
+                        }
+                        
+                        if (selectedPermanent != null)
+                        {
+                            if (selectedPermanent.TopCard != null)
+                            {
+                                if (!selectedPermanent.TopCard.CanNotBeAffected(activateClass))
+                                {
+                                    CardSource securityCard = selectedPermanent.TopCard;
+                                    
+                                    yield return ContinuousController.instance.StartCoroutine(
+                                        new IPutSecurityPermanent(selectedPermanent,
+                                            CardEffectCommons.CardEffectHashtable(activateClass),
+                                            toTop: true).PutSecurity());
+                                    
+                                    if (selectedPermanent.TopCard == null)
+                                    {
+                                        if (securityCard.Owner.SecurityCards.Contains(securityCard))
+                                        {
+                                            yield return ContinuousController.instance.StartCoroutine(
+                                                CardEffectCommons.DigivolveIntoHandOrTrashCard(
+                                                    targetPermanent: card.PermanentOfThisCard(),
+                                                    cardCondition: IsCardLucemonChaosModeCondition,
+                                                    payCost: false,
+                                                    reduceCostTuple: null,
+                                                    fixedCostTuple: null,
+                                                    ignoreDigivolutionRequirementFixedCost: -1,
+                                                    isHand: false,
+                                                    activateClass: activateClass,
+                                                    successProcess: null));
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+            
+            #endregion
+            
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/EX6/Yellow/Lucemon_EX6_018.cs.meta

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

+ 136 - 0
Assets/CardEffect/EX6/Yellow/Luxmon_EX6_017.cs

@@ -0,0 +1,136 @@
+using System.Collections;
+using System.Collections.Generic;
+
+namespace DCGO.CardEffects.EX6
+{
+    public class Luxmon_EX6_017 : 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, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[On Play] Reveal the top 3 cards of your deck. Add 1 Digimon card with the [Angel]/[Archangel] trait and 1 card with the [Three Great Angels] trait among them to your hand. Return the rest to the bottom of the deck.";
+                }
+
+                bool CanSelectCardCondition(CardSource cardSource)
+                {
+                    if (cardSource.IsDigimon)
+                    {
+                        if (cardSource.ContainsTraits("Angel") || cardSource.ContainsTraits("Archangel"))
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanSelectCardCondition1(CardSource cardSource)
+                {
+                    if (cardSource.ContainsTraits("Three Great Angels") || cardSource.ContainsTraits("ThreeGreatAngels"))
+                    {
+                        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 SimplifiedSelectCardConditionClass(
+                            canTargetCondition:CanSelectCardCondition,
+                            message: "Select 1 Digimon card with the [Angel]/[Archangel] trait.",
+                            mode: SelectCardEffect.Mode.AddHand,
+                            maxCount: 1,
+                            selectCardCoroutine: null),
+                        new SimplifiedSelectCardConditionClass(
+                            canTargetCondition:CanSelectCardCondition1,
+                            message: "Select 1 card with [Three Great Angels] trait.",
+                            mode: SelectCardEffect.Mode.AddHand,
+                            maxCount: 1,
+                            selectCardCoroutine: null),
+                        },
+                        remainingCardsPlace: RemainingCardsPlace.DeckBottom,
+                        activateClass: activateClass
+                    ));
+                }
+            }
+            #endregion
+
+            #region Inherit
+            if (timing == EffectTiming.OnAllyAttack)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Draw 1", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDiscription());
+                activateClass.SetIsInheritedEffect(true);
+                activateClass.SetHashString("Draw1_EX6_017");
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[When Attacking][Once Per Turn] If this Digimon has the [Angel]/[Archangel]/[Three Great Angels] trait, Draw 1";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnAttack(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (card.PermanentOfThisCard().TopCard.CardTraits.Contains("Angel") || card.PermanentOfThisCard().TopCard.CardTraits.Contains("Archangel") || card.PermanentOfThisCard().TopCard.CardTraits.Contains("Three Great Angels") || card.PermanentOfThisCard().TopCard.CardTraits.Contains("ThreeGreatAngels"))
+                        {
+                            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/EX6/Yellow/Luxmon_EX6_017.cs.meta

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

+ 610 - 0
Assets/CardEffect/EX6/Yellow/MastemonAce_EX6_029.cs

@@ -0,0 +1,610 @@
+using System.Collections;
+using System.Collections.Generic;
+using System;
+using System.Linq;
+
+namespace DCGO.CardEffects.EX6
+{
+    public class MastemonAce_EX6_029 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+            
+            #region Ace - Blast DNA Digivolve
+            
+            if (timing == EffectTiming.OnCounterTiming)
+            {
+                List<BlastDNACondition> blastDNAConditions = new List<BlastDNACondition>
+                {
+                    new("Angewomon"),
+                    new("LadyDevimon")
+                };
+                cardEffects.Add(CardEffectFactory.BlastDNADigivolveEffect(card: card,
+                    blastDNAConditions: blastDNAConditions, condition: null));
+            }
+            
+            #endregion
+            
+            #region DNA Digivolution
+            
+            if (timing == EffectTiming.None)
+            {
+                AddJogressConditionClass addJogressConditionClass = new AddJogressConditionClass();
+                addJogressConditionClass.SetUpICardEffect($"DNA Digivolution", CanUseCondition, card);
+                addJogressConditionClass.SetUpAddJogressConditionClass(getJogressCondition: GetJogress);
+                addJogressConditionClass.SetNotShowUI(true);
+                cardEffects.Add(addJogressConditionClass);
+                
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return true;
+                }
+                
+                JogressCondition GetJogress(CardSource cardSource)
+                {
+                    if (cardSource == card)
+                    {
+                        bool PermanentCondition1(Permanent permanent)
+                        {
+                            if (permanent != null)
+                            {
+                                if (permanent.TopCard != null)
+                                {
+                                    if (permanent.TopCard.Owner == card.Owner)
+                                    {
+                                        if (permanent.IsDigimon)
+                                        {
+                                            if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent,
+                                                    card))
+                                            {
+                                                if (permanent.TopCard.CardColors.Contains(CardColor.Yellow))
+                                                {
+                                                    if (permanent.Levels_ForJogress(card).Contains(5))
+                                                    {
+                                                        return true;
+                                                    }
+                                                }
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                            
+                            return false;
+                        }
+                        
+                        bool PermanentCondition2(Permanent permanent)
+                        {
+                            if (permanent != null)
+                            {
+                                if (permanent.TopCard != null)
+                                {
+                                    if (permanent.TopCard.Owner == card.Owner)
+                                    {
+                                        if (permanent.IsDigimon)
+                                        {
+                                            if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent,
+                                                    card))
+                                            {
+                                                if (permanent.TopCard.CardColors.Contains(CardColor.Purple))
+                                                {
+                                                    if (permanent.Levels_ForJogress(card).Contains(5))
+                                                    {
+                                                        return true;
+                                                    }
+                                                }
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                            
+                            return false;
+                        }
+                        
+                        JogressConditionElement[] elements =
+                        {
+                            new(PermanentCondition1, "a level 5 Yellow Digimon"),
+                            new(PermanentCondition2, "a level 5 Purple Digimon")
+                        };
+                        
+                        JogressCondition jogressCondition = new JogressCondition(elements, 0);
+                        
+                        return jogressCondition;
+                    }
+                    
+                    return null;
+                }
+            }
+            
+            #endregion
+            
+            #region On Play/ When Digivolving Shared
+            
+            string EffectSharedDescription()
+            {
+                return
+                    "[On Play] [When Digivolving] You may play 1 level 5 or lower Digimon card with the [Angel]/[Archangel]/[Fallen Angel] trait from your hand or trash without paying the cost. Then, if DNA digivolving, place 1 other Digimon at the bottom of its owner's security stack, and trash cards from the top of your opponent's security stack until it has 4 left.";
+            }
+            
+            bool CanSelectPermanentSharedCondition(Permanent permanent)
+            {
+                if (CardEffectCommons.IsPermanentExistsOnBattleArea(permanent))
+                {
+                    if (permanent != card.PermanentOfThisCard())
+                    {
+                        if (permanent.IsDigimon)
+                        {
+                            if (!permanent.TopCard.Equals(card))
+                                return true;
+                        }
+                    }
+                }
+                
+                return false;
+            }
+            
+            #endregion
+            
+            #region On Play
+            
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect(
+                    "Play 1 level 5 or lower Digimon card with the [Angel]/[Archangel]/[Fallen Angel] trait from your hand or trash, then, if DNA digivolving, place 1 other Digimon at the bottom of its owner's security stack, and trash cards from the top of your opponent's security stack until it has 4 left.",
+                    CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true,
+                    EffectSharedDescription());
+                cardEffects.Add(activateClass);
+                
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
+                }
+                
+                bool IsCardAngelCondition(CardSource cardSource)
+                {
+                    if (CardEffectCommons.CanPlayAsNewPermanent(cardSource: cardSource, payCost: false,
+                            cardEffect: activateClass))
+                    {
+                        if (cardSource.IsDigimon)
+                        {
+                            if (cardSource.ContainsTraits("Angel") ||
+                                cardSource.ContainsTraits("Archangel") ||
+                                cardSource.ContainsTraits("Fallen Angel") ||
+                                cardSource.ContainsTraits("FallenAngel"))
+                            {
+                                return true;
+                            }
+                        }
+                    }
+                    
+                    return false;
+                }
+                
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (card.Owner.HandCards.Count(IsCardAngelCondition) >= 1)
+                        {
+                            return true;
+                        }
+                        
+                        if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, IsCardAngelCondition))
+                        {
+                            return true;
+                        }
+                        
+                        if (CardEffectCommons.HasMatchConditionOpponentsPermanent(card,
+                                CanSelectPermanentSharedCondition))
+                        {
+                            return true;
+                        }
+                    }
+                    
+                    return false;
+                }
+                
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    bool canSelectHand = card.Owner.HandCards.Count(IsCardAngelCondition) >= 1;
+                    bool canSelectTrash =
+                        CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, IsCardAngelCondition);
+                    
+                    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: IsCardAngelCondition,
+                                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: IsCardAngelCondition,
+                                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 =
+                            (fromHand) ? SelectCardEffect.Root.Hand : SelectCardEffect.Root.Trash;
+                        
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(
+                            cardSources: selectedCards,
+                            activateClass: activateClass,
+                            payCost: false,
+                            isTapped: false,
+                            root: root,
+                            activateETB: true));
+                    }
+                    
+                    if (CardEffectCommons.IsJogress(hashtable))
+                    {
+                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentSharedCondition))
+                        {
+                            int maxCount = Math.Min(1,
+                                CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentSharedCondition));
+                            
+                            SelectPermanentEffect selectPermanentEffect =
+                                GManager.instance.GetComponent<SelectPermanentEffect>();
+                            
+                            selectPermanentEffect.SetUp(
+                                selectPlayer: card.Owner,
+                                canTargetCondition: CanSelectPermanentSharedCondition,
+                                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 to place on bottom of security.",
+                                "The opponent is selecting 1 Digimon to place on bottom of security.");
+                            
+                            yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                            
+                            IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                            {
+                                if (permanent.TopCard != null)
+                                {
+                                    if (!permanent.TopCard.CanNotBeAffected(activateClass))
+                                    {
+                                        yield return ContinuousController.instance.StartCoroutine(
+                                            new IPutSecurityPermanent(
+                                                permanent,
+                                                CardEffectCommons.CardEffectHashtable(activateClass),
+                                                toTop: false).PutSecurity());
+                                    }
+                                }
+                            }
+                        }
+                        
+                        if (card.Owner.Enemy.SecurityCards.Count > 4)
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(new IDestroySecurity(
+                                player: card.Owner.Enemy,
+                                destroySecurityCount: card.Owner.Enemy.SecurityCards.Count - 4,
+                                cardEffect: activateClass,
+                                fromTop: true).DestroySecurity());
+                        }
+                    }
+                }
+            }
+            
+            #endregion
+            
+            #region When Digivolving
+            
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect(
+                    "Play 1 level 5 or lower Digimon card with the [Angel]/[Archangel]/[Fallen Angel] trait from your hand or trash, then, if DNA digivolving, place 1 other Digimon at the bottom of its owner's security stack, and trash cards from the top of your opponent's security stack until it has 4 left.",
+                    CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true,
+                    EffectSharedDescription());
+                cardEffects.Add(activateClass);
+                
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                }
+                
+                bool IsCardAngelCondition(CardSource cardSource)
+                {
+                    if (CardEffectCommons.CanPlayAsNewPermanent(cardSource: cardSource, payCost: false,
+                            cardEffect: activateClass))
+                    {
+                        if (cardSource.IsDigimon)
+                        {
+                            if (cardSource.ContainsTraits("Angel") ||
+                                cardSource.ContainsTraits("Archangel") ||
+                                cardSource.ContainsTraits("Fallen Angel") ||
+                                cardSource.ContainsTraits("FallenAngel"))
+                            {
+                                return true;
+                            }
+                        }
+                    }
+                    
+                    return false;
+                }
+                
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (card.Owner.HandCards.Count(IsCardAngelCondition) >= 1)
+                        {
+                            return true;
+                        }
+                        
+                        if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, IsCardAngelCondition))
+                        {
+                            return true;
+                        }
+                        
+                        if (CardEffectCommons.HasMatchConditionOpponentsPermanent(card,
+                                CanSelectPermanentSharedCondition))
+                        {
+                            return true;
+                        }
+                    }
+                    
+                    return false;
+                }
+                
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    bool canSelectHand = card.Owner.HandCards.Count(IsCardAngelCondition) >= 1;
+                    bool canSelectTrash =
+                        CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, IsCardAngelCondition);
+                    
+                    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: IsCardAngelCondition,
+                                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: IsCardAngelCondition,
+                                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 =
+                            (fromHand) ? SelectCardEffect.Root.Hand : SelectCardEffect.Root.Trash;
+                        
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(
+                            cardSources: selectedCards,
+                            activateClass: activateClass,
+                            payCost: false,
+                            isTapped: false,
+                            root: root,
+                            activateETB: true));
+                    }
+                    
+                    if (CardEffectCommons.IsJogress(hashtable))
+                    {
+                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentSharedCondition))
+                        {
+                            int maxCount = Math.Min(1,
+                                CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentSharedCondition));
+                            
+                            SelectPermanentEffect selectPermanentEffect =
+                                GManager.instance.GetComponent<SelectPermanentEffect>();
+                            
+                            selectPermanentEffect.SetUp(
+                                selectPlayer: card.Owner,
+                                canTargetCondition: CanSelectPermanentSharedCondition,
+                                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 to place on bottom of security.",
+                                "The opponent is selecting 1 Digimon to place on bottom of security.");
+                            
+                            yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                            
+                            IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                            {
+                                if (permanent != null)
+                                {
+                                    if (permanent.TopCard != null)
+                                    {
+                                        if (!permanent.TopCard.CanNotBeAffected(activateClass))
+                                        {
+                                            yield return ContinuousController.instance.StartCoroutine(
+                                                new IPutSecurityPermanent(
+                                                    permanent,
+                                                    CardEffectCommons.CardEffectHashtable(activateClass),
+                                                    toTop: false).PutSecurity());
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                        
+                        if (card.Owner.Enemy.SecurityCards.Count > 4)
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(new IDestroySecurity(
+                                player: card.Owner.Enemy,
+                                destroySecurityCount: card.Owner.Enemy.SecurityCards.Count - 4,
+                                cardEffect: activateClass,
+                                fromTop: true).DestroySecurity());
+                        }
+                    }
+                }
+            }
+            
+            #endregion
+            
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/EX6/Yellow/MastemonAce_EX6_029.cs.meta

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

+ 393 - 0
Assets/CardEffect/EX6/Yellow/OphanimonAce_EX6_027.cs

@@ -0,0 +1,393 @@
+using System.Collections;
+using System.Collections.Generic;
+using System;
+using System.Linq;
+
+namespace DCGO.CardEffects.EX6
+{
+    public class OphanimonAce_EX6_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.ContainsCardName("Angewomon");
+                }
+                
+                cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(
+                    permanentCondition: PermanentCondition,
+                    digivolutionCost: 3,
+                    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
+            
+            string EffectSharedDescription()
+            {
+                return
+                    "[On Play] [When Digivolving] By trashing the top or bottom card of your security stack, 1 of your opponent's Digimon gets -8000 DP until the end of your opponents turn.";
+            }
+            
+            bool CanSelectPermanentSharedCondition(Permanent permanent)
+            {
+                return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card);
+            }
+            
+            bool CanActivateSharedCondition(Hashtable hashtable)
+            {
+                if (CardEffectCommons.IsExistOnBattleArea(card))
+                {
+                    if (card.Owner.SecurityCards.Count >= 1)
+                    {
+                        return true;
+                    }
+                }
+                
+                return false;
+            }
+            
+            #endregion
+            
+            #region On Play
+            
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect(
+                    "By trashing the top or bottom card of your security stack, 1 of your opponent's Digimon gets -8000 DP until the end of your opponents turn.",
+                    CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateSharedCondition, ActivateCoroutine, -1, true,
+                    EffectSharedDescription());
+                cardEffects.Add(activateClass);
+                
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
+                }
+                
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (card.Owner.SecurityCards.Count >= 1)
+                    {
+                        List<SelectionElement<int>> selectionElements = new List<SelectionElement<int>>()
+                        {
+                            new(message: "Security Top", value: 0, spriteIndex: 0),
+                            new(message: "Security Bottom", value: 1, spriteIndex: 0),
+                            new(message: "No Selection", value: 2, spriteIndex: 1),
+                        };
+                        
+                        string selectPlayerMessage = "Trash the top or bottom card of the security stack";
+                        string notSelectPlayerMessage =
+                            "The opponent is selecting whether to trash the top or bottom card of the security stack.";
+                        
+                        GManager.instance.userSelectionManager.SetIntSelection(selectionElements: selectionElements,
+                            selectPlayer: card.Owner, selectPlayerMessage: selectPlayerMessage,
+                            notSelectPlayerMessage: notSelectPlayerMessage);
+                        
+                        yield return ContinuousController.instance.StartCoroutine(GManager.instance.userSelectionManager
+                            .WaitForEndSelect());
+                        
+                        int selectionValue = GManager.instance.userSelectionManager.SelectedIntValue;
+                        
+                        if (selectionValue != 2)
+                        {
+                            bool fromTop = selectionValue.Equals(0);
+                            
+                            yield return ContinuousController.instance.StartCoroutine(new IDestroySecurity(
+                                player: card.Owner,
+                                destroySecurityCount: 1,
+                                cardEffect: activateClass,
+                                fromTop: fromTop).DestroySecurity());
+                            
+                            if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentSharedCondition))
+                            {
+                                int maxCount = Math.Min(1,
+                                    CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentSharedCondition));
+                                
+                                SelectPermanentEffect selectPermanentEffect =
+                                    GManager.instance.GetComponent<SelectPermanentEffect>();
+                                
+                                selectPermanentEffect.SetUp(
+                                    selectPlayer: card.Owner,
+                                    canTargetCondition: CanSelectPermanentSharedCondition,
+                                    canTargetCondition_ByPreSelecetedList: null,
+                                    canEndSelectCondition: null,
+                                    maxCount: maxCount,
+                                    canNoSelect: false,
+                                    canEndNotMax: false,
+                                    selectPermanentCoroutine: SelectPermanentCoroutine,
+                                    afterSelectPermanentCoroutine: null,
+                                    mode: SelectPermanentEffect.Mode.Custom,
+                                    cardEffect: activateClass);
+                                
+                                selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon that will get DP -8000.",
+                                    "The opponent is selecting 1 Digimon that will get DP -8000.");
+                                
+                                yield return ContinuousController.instance.StartCoroutine(
+                                    selectPermanentEffect.Activate());
+                                
+                                IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                                {
+                                    yield return ContinuousController.instance.StartCoroutine(
+                                        CardEffectCommons.ChangeDigimonDP(targetPermanent: permanent,
+                                            changeValue: -8000, effectDuration: EffectDuration.UntilOpponentTurnEnd,
+                                            activateClass: activateClass));
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+            
+            #endregion
+            
+            #region When Digivolving
+            
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect(
+                    " By trashing the top or bottom card of your security stack, 1 of your opponent's Digimon gets -8000 DP until the end of your opponents turn.",
+                    CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateSharedCondition, ActivateCoroutine, -1, true,
+                    EffectSharedDescription());
+                cardEffects.Add(activateClass);
+                
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                }
+                
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (card.Owner.SecurityCards.Count >= 1)
+                    {
+                        List<SelectionElement<int>> selectionElements = new List<SelectionElement<int>>()
+                        {
+                            new(message: "Security Top", value: 0, spriteIndex: 0),
+                            new(message: "Security Bottom", value: 1, spriteIndex: 0),
+                            new(message: "No Selection", value: 2, spriteIndex: 1),
+                        };
+                        
+                        string selectPlayerMessage = "Trash the top or bottom card of the security stack";
+                        string notSelectPlayerMessage =
+                            "The opponent is selecting whether to trash the top or bottom card of the security stack.";
+                        
+                        GManager.instance.userSelectionManager.SetIntSelection(selectionElements: selectionElements,
+                            selectPlayer: card.Owner, selectPlayerMessage: selectPlayerMessage,
+                            notSelectPlayerMessage: notSelectPlayerMessage);
+                        
+                        yield return ContinuousController.instance.StartCoroutine(GManager.instance.userSelectionManager
+                            .WaitForEndSelect());
+                        
+                        int selectionValue = GManager.instance.userSelectionManager.SelectedIntValue;
+                        
+                        if (selectionValue != 2)
+                        {
+                            bool fromTop = selectionValue.Equals(0);
+                            
+                            yield return ContinuousController.instance.StartCoroutine(new IDestroySecurity(
+                                player: card.Owner,
+                                destroySecurityCount: 1,
+                                cardEffect: activateClass,
+                                fromTop: fromTop).DestroySecurity());
+                            
+                            if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentSharedCondition))
+                            {
+                                int maxCount = Math.Min(1,
+                                    CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentSharedCondition));
+                                
+                                SelectPermanentEffect selectPermanentEffect =
+                                    GManager.instance.GetComponent<SelectPermanentEffect>();
+                                
+                                selectPermanentEffect.SetUp(
+                                    selectPlayer: card.Owner,
+                                    canTargetCondition: CanSelectPermanentSharedCondition,
+                                    canTargetCondition_ByPreSelecetedList: null,
+                                    canEndSelectCondition: null,
+                                    maxCount: maxCount,
+                                    canNoSelect: false,
+                                    canEndNotMax: false,
+                                    selectPermanentCoroutine: SelectPermanentCoroutine,
+                                    afterSelectPermanentCoroutine: null,
+                                    mode: SelectPermanentEffect.Mode.Custom,
+                                    cardEffect: activateClass);
+                                
+                                selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon that will get DP -8000.",
+                                    "The opponent is selecting 1 Digimon that will get DP -8000.");
+                                
+                                yield return ContinuousController.instance.StartCoroutine(
+                                    selectPermanentEffect.Activate());
+                                
+                                IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                                {
+                                    yield return ContinuousController.instance.StartCoroutine(
+                                        CardEffectCommons.ChangeDigimonDP(targetPermanent: permanent,
+                                            changeValue: -8000, effectDuration: EffectDuration.UntilOpponentTurnEnd,
+                                            activateClass: activateClass));
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+            
+            #endregion
+            
+            #region All Turns - Your Turn
+            
+            if (timing == EffectTiming.OnLoseSecurity)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect(
+                    "If it's your turn, this Digimon may gain [Security Attack +1] for the turn and attack",
+                    CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, true,
+                    EffectDescription());
+                activateClass.SetHashString("AllTurnsYourTurn_EX6_027");
+                cardEffects.Add(activateClass);
+                
+                string EffectDescription()
+                {
+                    return
+                        "[All Turns][Once Per Turn] When a card is removed from your security stack, if it's your turn, this Digimon may gain [Security Attack +1] for the turn and attack. If it's your opponent's turn, [Recovery +1 <Deck>].";
+                }
+                
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.IsOwnerTurn(card))
+                        {
+                            if (CardEffectCommons.CanTriggerWhenLoseSecurity(hashtable, player => player == card.Owner))
+                            {
+                                return true;
+                            }
+                        }
+                    }
+                    
+                    return false;
+                }
+                
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
+                }
+                
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
+                    {
+                        Permanent cardPermanent = card.PermanentOfThisCard();
+                        
+                        yield return ContinuousController.instance.StartCoroutine(
+                            CardEffectCommons.ChangeDigimonSAttack(
+                                targetPermanent: cardPermanent,
+                                changeValue: 1,
+                                effectDuration: EffectDuration.UntilEachTurnEnd,
+                                activateClass: activateClass));
+                        
+                        if (cardPermanent.CanAttack(activateClass))
+                        {
+                            SelectAttackEffect selectAttackEffect =
+                                GManager.instance.GetComponent<SelectAttackEffect>();
+                            
+                            selectAttackEffect.SetUp(
+                                attacker: cardPermanent,
+                                canAttackPlayerCondition: () => true,
+                                defenderCondition: _ => true,
+                                cardEffect: activateClass);
+                            
+                            yield return
+                                ContinuousController.instance.StartCoroutine(selectAttackEffect.Activate());
+                        }
+                    }
+                }
+            }
+            
+            #endregion
+            
+            #region All Turns - Opponent's Turn
+            
+            if (timing == EffectTiming.OnLoseSecurity)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect(
+                    "If it's your opponent's turn, [Recovery +1 <Deck>]",
+                    CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false,
+                    EffectDescription());
+                activateClass.SetHashString("AllTurnsOpponentTurn_EX6_027");
+                cardEffects.Add(activateClass);
+                
+                string EffectDescription()
+                {
+                    return
+                        "[All Turns][Once Per Turn] When a card is removed from your security stack, if it's your turn, this Digimon may gain [Security Attack +1] for the turn and attack. If it's your opponent's turn, [Recovery +1 <Deck>].";
+                }
+                
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.IsOpponentTurn(card))
+                        {
+                            if (CardEffectCommons.CanTriggerWhenLoseSecurity(hashtable, player => player == card.Owner))
+                            {
+                                return true;
+                            }
+                        }
+                    }
+                    
+                    return false;
+                }
+                
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
+                    {
+                        if (card.Owner.LibraryCards.Count >= 1)
+                        {
+                            if (card.Owner.CanAddSecurity(activateClass))
+                            {
+                                return true;
+                            }
+                        }
+                    }
+                    
+                    return false;
+                }
+                
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    yield return ContinuousController.instance.StartCoroutine(
+                        new IRecovery(card.Owner, 1, activateClass).Recovery());
+                }
+            }
+            
+            #endregion
+            
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/EX6/Yellow/OphanimonAce_EX6_027.cs.meta

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

+ 506 - 0
Assets/CardEffect/EX6/Yellow/Sagomon_EX6_024.cs

@@ -0,0 +1,506 @@
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+using System;
+
+namespace DCGO.CardEffects.EX6
+{
+    public class Sagomon_EX6_024 : 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 -2", 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 element = new DigiXrosConditionElement(CanSelectCardCondition,
+                            "[Sanzomon] or [Gokuumon] or [Cho-Hakkaimon]");
+                        
+                        bool CanSelectCardCondition(CardSource xrosCardSource)
+                        {
+                            if (xrosCardSource != null)
+                            {
+                                if (xrosCardSource.Owner == card.Owner)
+                                {
+                                    if (xrosCardSource.IsDigimon)
+                                    {
+                                        if (xrosCardSource.ContainsCardName("Sanzomon") ||
+                                            xrosCardSource.ContainsCardName("Gokuumon") ||
+                                            xrosCardSource.ContainsCardName("Cho-Hakkaimon"))
+                                        {
+                                            return true;
+                                        }
+                                    }
+                                }
+                            }
+                            
+                            return false;
+                        }
+                        
+                        List<DigiXrosConditionElement> elements = new List<DigiXrosConditionElement>() { element };
+                        
+                        DigiXrosCondition digiXrosCondition = new DigiXrosCondition(elements, null, 2);
+                        
+                        return digiXrosCondition;
+                    }
+                    
+                    return null;
+                }
+            }
+            
+            #endregion
+            
+            #region On Play/ When Attacking/ ESS Shared
+            
+            string EffectSharedDescription()
+            {
+                return
+                    "[On Play] [When Attacking] [Once Per Turn] 1 Digimon may gain [Security Attack -1] until the end of your opponent's turn. Then, if DigiXrosing, 1 of your opponent's Digimon or Tamers can't suspend until the end of their turn.";
+            }
+            
+            bool CanSelectSecMinusPermanentSharedCondition(Permanent permanent)
+            {
+                if (CardEffectCommons.IsPermanentExistsOnBattleArea(permanent))
+                {
+                    if (permanent.IsDigimon)
+                    {
+                        return true;
+                    }
+                }
+                
+                return false;
+            }
+            
+            #endregion
+            
+            #region On Play
+            
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect(
+                    "1 Digimon may gain [Security Attack -1] until the end of your opponent's turn. Then, if DigiXrosing, 1 of your opponent's Digimon or Tamers can't suspend until the end of their turn.",
+                    CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false,
+                    EffectSharedDescription());
+                activateClass.SetHashString("SecurityAttack-1CantSuspend_EX6-024");
+                cardEffects.Add(activateClass);
+                
+                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(CanSelectSecMinusPermanentSharedCondition))
+                        {
+                            return true;
+                        }
+                        
+                        if (CardEffectCommons.IsDijiXros(hashtable, count => count >= 1))
+                        {
+                            if (CardEffectCommons.HasMatchConditionPermanent(CanSelectOpponentPermanentCondition))
+                            {
+                                return true;
+                            }
+                        }
+                    }
+                    
+                    return false;
+                }
+                
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectSecMinusPermanentSharedCondition))
+                    {
+                        int maxCount = Math.Min(1,
+                            CardEffectCommons.MatchConditionPermanentCount(CanSelectSecMinusPermanentSharedCondition));
+                        
+                        SelectPermanentEffect selectPermanentEffect =
+                            GManager.instance.GetComponent<SelectPermanentEffect>();
+                        
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectSecMinusPermanentSharedCondition,
+                            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 get Security Attack -1.",
+                            "The opponent is selecting 1 Digimon that will get Security Attack -1.");
+                        
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                        
+                        IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(
+                                CardEffectCommons.ChangeDigimonSAttack(targetPermanent: permanent, changeValue: -1,
+                                    effectDuration: EffectDuration.UntilOpponentTurnEnd, activateClass: activateClass));
+                        }
+                    }
+                    
+                    if (CardEffectCommons.IsDijiXros(hashtable, count => count >= 1))
+                    {
+                        if (CardEffectCommons.HasMatchConditionOpponentsPermanent(card, CanSelectOpponentPermanentCondition))
+                        {
+                            int maxCount = Math.Min(1,
+                                CardEffectCommons.MatchConditionPermanentCount(CanSelectSecMinusPermanentSharedCondition));
+                            
+                            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;
+                                
+                                if (selectedPermanent != null)
+                                {
+                                    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
+            
+            if (timing == EffectTiming.OnAllyAttack)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect(
+                    "1 Digimon may gain [Security Attack -1] until the end of your opponent's turn",
+                    CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false,
+                    EffectSharedDescription());
+                activateClass.SetHashString("SecurityAttack-1_EX6-024");
+                cardEffects.Add(activateClass);
+                
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnAttack(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(CanSelectSecMinusPermanentSharedCondition))
+                        {
+                            return true;
+                        }
+                    }
+                    
+                    return false;
+                }
+                
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectSecMinusPermanentSharedCondition))
+                    {
+                        int maxCount = Math.Min(1,
+                            CardEffectCommons.MatchConditionPermanentCount(CanSelectSecMinusPermanentSharedCondition));
+                        
+                        SelectPermanentEffect selectPermanentEffect =
+                            GManager.instance.GetComponent<SelectPermanentEffect>();
+                        
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectSecMinusPermanentSharedCondition,
+                            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 get Security Attack -1.",
+                            "The opponent is selecting 1 Digimon that will get Security Attack -1.");
+                        
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                        
+                        IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(
+                                CardEffectCommons.ChangeDigimonSAttack(targetPermanent: permanent, changeValue: -1,
+                                    effectDuration: EffectDuration.UntilOpponentTurnEnd, activateClass: activateClass));
+                        }
+                    }
+                }
+            }
+            
+            #endregion
+            
+            #region All Turns
+            
+            if (timing == EffectTiming.WhenRemoveField)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect(
+                    "Return 1 yellow Digimon card from this Digimon's digivolution cards to the hand",
+                    CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false,
+                    EffectDescription());
+                activateClass.SetHashString("AllTurns_EX6_024");
+                cardEffects.Add(activateClass);
+                
+                string EffectDescription()
+                {
+                    return
+                        "[All Turns] When this Digimon would leave the battle area, return 1 yellow Digimon card from this Digimon's digivolution cards to the hand.";
+                }
+                
+                bool CanSelectCardCondition(CardSource cardSource)
+                {
+                    if (cardSource.IsDigimon)
+                    {
+                        if (cardSource.CardColors.Contains(CardColor.Yellow))
+                        {
+                            return true;
+                        }
+                    }
+                    
+                    return false;
+                }
+                
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.CanTriggerWhenRemoveField(hashtable, card))
+                        {
+                            return true;
+                        }
+                    }
+                    
+                    return false;
+                }
+                
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (card.PermanentOfThisCard().DigivolutionCards.Count(CanSelectCardCondition) >= 1)
+                        {
+                            return true;
+                        }
+                    }
+                    
+                    return false;
+                }
+                
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        Permanent cardPermanent = card.PermanentOfThisCard();
+                        
+                        if (cardPermanent.DigivolutionCards.Count(CanSelectCardCondition) >= 1)
+                        {
+                            int maxCount = Math.Min(1, cardPermanent.DigivolutionCards.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 return to hand.",
+                                maxCount: maxCount,
+                                canEndNotMax: false,
+                                isShowOpponent: true,
+                                mode: SelectCardEffect.Mode.AddHand,
+                                root: SelectCardEffect.Root.Custom,
+                                customRootCardList: cardPermanent.DigivolutionCards,
+                                canLookReverseCard: true,
+                                selectPlayer: card.Owner,
+                                cardEffect: activateClass);
+                            
+                            yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
+                        }
+                    }
+                }
+            }
+            
+            #endregion
+            
+            #region When Attacking - ESS
+            
+            if (timing == EffectTiming.OnAllyAttack)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Security Attack -1", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false,
+                    EffectDescription());
+                activateClass.SetIsInheritedEffect(true);
+                activateClass.SetHashString("SecurityAttack-1_EX6-024");
+                cardEffects.Add(activateClass);
+                
+                string EffectDescription()
+                {
+                    return
+                        "[When Attacking][Once Per Turn] 1 Digimon may gain [Security Attack -1] until the end of your opponent's turn.";
+                }
+                
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnAttack(hashtable, card);
+                }
+                
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        return true;
+                    }
+                    
+                    return false;
+                }
+                
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectSecMinusPermanentSharedCondition))
+                    {
+                        int maxCount = Math.Min(1,
+                            CardEffectCommons.MatchConditionPermanentCount(CanSelectSecMinusPermanentSharedCondition));
+                        
+                        SelectPermanentEffect selectPermanentEffect =
+                            GManager.instance.GetComponent<SelectPermanentEffect>();
+                        
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectSecMinusPermanentSharedCondition,
+                            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 get Security Attack -1.",
+                            "The opponent is selecting 1 Digimon that will get Security Attack -1.");
+                        
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                        
+                        IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(
+                                CardEffectCommons.ChangeDigimonSAttack(targetPermanent: permanent, changeValue: -1,
+                                    effectDuration: EffectDuration.UntilOpponentTurnEnd, activateClass: activateClass));
+                        }
+                    }
+                }
+            }
+            
+            #endregion
+            
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/EX6/Yellow/Sagomon_EX6_024.cs.meta

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

+ 154 - 0
Assets/CardEffect/EX6/Yellow/Salamon_EX6_016.cs

@@ -0,0 +1,154 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+namespace DCGO.CardEffects.EX6
+{
+    public class Salamon_EX6_016 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            #region Start of Main Phase
+            if (timing == EffectTiming.OnStartMainPhase)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Memory +1", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[Start of Your Main Phase] If you have a purple Digimon or Tamer, gain 1 memory.";
+                }
+
+                bool PermanentCondition(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(permanent, card))
+                    {
+                        if (permanent.IsTamer && permanent.TopCard.CardColors.Contains(CardColor.Purple) || permanent.IsDigimon && permanent.TopCard.CardColors.Contains(CardColor.Purple))
+                        {
+                            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, PermanentCondition))
+                        {
+                            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 Inherit
+            if (timing == EffectTiming.OnAllyAttack)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("DP -2000", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDiscription());
+                activateClass.SetIsInheritedEffect(true);
+                activateClass.SetHashString("DP-2000_EX6_016");
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[When Attacking] [Once Per Turn] 1 of your opponent's Digimon gets -2000 DP for the turn.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnAttack(hashtable, card);
+                }
+
+                bool CanSelectPermanentCondition(Permanent permanent)
+                {
+                    return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card);
+                }
+
+                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: SelectPermanentCoroutine,
+                            afterSelectPermanentCoroutine: null,
+                            mode: SelectPermanentEffect.Mode.Custom,
+                            cardEffect: activateClass);
+
+                        selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon that will get DP -2000.", "The opponent is selecting 1 Digimon that will get DP -2000.");
+
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                        IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ChangeDigimonDP(
+                                targetPermanent: permanent,
+                                changeValue: -2000,
+                                effectDuration: EffectDuration.UntilEachTurnEnd,
+                                activateClass: activateClass));
+                        }
+                    }
+                }
+            }
+            #endregion
+
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/EX6/Yellow/Salamon_EX6_016.cs.meta

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

+ 486 - 0
Assets/CardEffect/EX6/Yellow/Sanzomon_EX6_025.cs

@@ -0,0 +1,486 @@
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+using System;
+
+namespace DCGO.CardEffects.EX6
+{
+    public class Sanzomon_EX6_025 : 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 -2", 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 element = new DigiXrosConditionElement(CanSelectCardCondition,
+                            "[Gokuumon] or [Sagomon] or [Cho-Hakkaimon]");
+
+                        bool CanSelectCardCondition(CardSource xrosCardSource)
+                        {
+                            if (xrosCardSource != null)
+                            {
+                                if (xrosCardSource.Owner == card.Owner)
+                                {
+                                    if (xrosCardSource.IsDigimon)
+                                    {
+                                        if (xrosCardSource.ContainsCardName("Gokuumon") ||
+                                            xrosCardSource.ContainsCardName("Sagomon") ||
+                                            xrosCardSource.ContainsCardName("Cho-Hakkaimon"))
+                                        {
+                                            return true;
+                                        }
+                                    }
+                                }
+                            }
+
+                            return false;
+                        }
+
+                        List<DigiXrosConditionElement> elements = new List<DigiXrosConditionElement>() { element };
+
+                        DigiXrosCondition digiXrosCondition = new DigiXrosCondition(elements, null, 2);
+
+                        return digiXrosCondition;
+                    }
+
+                    return null;
+                }
+            }
+
+            #endregion
+
+            #region On Play/ When Attacking/ ESS Shared
+
+            string EffectSharedDescription()
+            {
+                return
+                    "[On Play] [When Attacking] [Once Per Turn] 1 Digimon may gain [Security Attack -1] until the end of your opponent's turn. Then, if DigiXrosing, reveal the top 4 cards of your deck. Add 1 of each [Gokuumon], [Sagomon], [Cho-Hakkaimon] and [Shakamon] among them to the hand. Return the rest to the bottom of the deck.";
+            }
+
+            bool CanSelectSecMinusPermanentSharedCondition(Permanent permanent)
+            {
+                if (CardEffectCommons.IsPermanentExistsOnBattleArea(permanent))
+                {
+                    if (permanent.IsDigimon)
+                    {
+                        return true;
+                    }
+                }
+
+                return false;
+            }
+
+            #endregion
+
+            #region On Play
+            
+            bool canSelectGokuumon = true;
+            bool canSelectSagomon = true;
+            bool canSelectChoHakkaimon = true;
+            bool canSelectShakamon = true;
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect(
+                    "1 Digimon may gain [Security Attack -1] until the end of your opponent's turn. Then, if DigiXrosing, reveal the top 4 cards of your deck. Add 1 [Gokuumon], 1 [Sagomon], 1 [Cho-Hakkaimon] and 1 [Shakamon] among them to the hand. Return the rest to the bottom of the deck.",
+                    CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false,
+                    EffectSharedDescription());
+                activateClass.SetHashString("SecurityAttack-1Search_EX6-025");
+                cardEffects.Add(activateClass);
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
+                }
+
+                bool CanSelectJourneyCardCondition(CardSource cardSource)
+                {
+                    if (canSelectGokuumon && cardSource.ContainsCardName("Gokuumon"))
+                    {
+                        return true;
+                    }
+                    
+                    if (canSelectSagomon && cardSource.ContainsCardName("Sagomon"))
+                    {
+                        return true;
+                    }
+                    
+                    if (canSelectChoHakkaimon && cardSource.ContainsCardName("Cho-Hakkaimon"))
+                    {
+                        return true;
+                    }
+                    
+                    if (canSelectShakamon && cardSource.ContainsCardName("Shakamon"))
+                    {
+                        return true;
+                    }
+
+                    return false;
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectSecMinusPermanentSharedCondition))
+                        {
+                            return true;
+                        }
+
+                        if (CardEffectCommons.IsDijiXros(hashtable, count => count >= 1))
+                        {
+                            if (card.Owner.LibraryCards.Count >= 1)
+                            {
+                                return true;
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectSecMinusPermanentSharedCondition))
+                    {
+                        int maxCount = Math.Min(1,
+                            CardEffectCommons.MatchConditionPermanentCount(CanSelectSecMinusPermanentSharedCondition));
+
+                        SelectPermanentEffect selectPermanentEffect =
+                            GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectSecMinusPermanentSharedCondition,
+                            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 get Security Attack -1.",
+                            "The opponent is selecting 1 Digimon that will get Security Attack -1.");
+
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                        IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(
+                                CardEffectCommons.ChangeDigimonSAttack(targetPermanent: permanent, changeValue: -1,
+                                    effectDuration: EffectDuration.UntilOpponentTurnEnd, activateClass: activateClass));
+                        }
+                    }
+
+                    if (CardEffectCommons.IsDijiXros(hashtable, count => count >= 1))
+                    {
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.RevealDeckTopCardsAndProcessForAll(
+                            revealCount: 4,
+                            simplifiedSelectCardCondition:
+                            new SimplifiedSelectCardConditionClass(
+                                canTargetCondition: CanSelectJourneyCardCondition,
+                                message: "",
+                                mode: SelectCardEffect.Mode.AddHand,
+                                maxCount: -1,
+                                selectCardCoroutine: SelectCardCoroutine),
+                            remainingCardsPlace: RemainingCardsPlace.DeckBottom,
+                            activateClass: activateClass
+                        ));
+                        
+                        IEnumerator SelectCardCoroutine(CardSource cardSource)
+                        {
+                            if (cardSource.ContainsCardName("Gokuumon"))
+                            {
+                                canSelectGokuumon = false;
+                            }
+                    
+                            if (cardSource.ContainsCardName("Sagomon"))
+                            {
+                                canSelectSagomon = false;
+                            }
+                    
+                            if (cardSource.ContainsCardName("Cho-Hakkaimon"))
+                            {
+                                canSelectChoHakkaimon = false;
+                            }
+                    
+                            if (cardSource.ContainsCardName("Shakamon"))
+                            {
+                                canSelectShakamon = false;
+                            }
+                            
+                            yield return null;
+                        }
+                    }
+                }
+            }
+
+            #endregion
+
+            #region When Attacking
+
+            if (timing == EffectTiming.OnAllyAttack)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect(
+                    "1 Digimon may gain [Security Attack -1] until the end of your opponent's turn",
+                    CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false,
+                    EffectSharedDescription());
+                activateClass.SetHashString("SecurityAttack-1_EX6-025");
+                cardEffects.Add(activateClass);
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnAttack(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectSecMinusPermanentSharedCondition))
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectSecMinusPermanentSharedCondition))
+                    {
+                        int maxCount = Math.Min(1,
+                            CardEffectCommons.MatchConditionPermanentCount(CanSelectSecMinusPermanentSharedCondition));
+
+                        SelectPermanentEffect selectPermanentEffect =
+                            GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectSecMinusPermanentSharedCondition,
+                            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 get Security Attack -1.",
+                            "The opponent is selecting 1 Digimon that will get Security Attack -1.");
+
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                        IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(
+                                CardEffectCommons.ChangeDigimonSAttack(targetPermanent: permanent, changeValue: -1,
+                                    effectDuration: EffectDuration.UntilOpponentTurnEnd, activateClass: activateClass));
+                        }
+                    }
+                }
+            }
+
+            #endregion
+
+            #region All Turns
+
+            if (timing == EffectTiming.WhenRemoveField)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect(
+                    "Return 1 yellow Digimon card from this Digimon's digivolution cards to the hand",
+                    CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false,
+                    EffectDescription());
+                activateClass.SetHashString("AllTurns_EX6_025");
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[All Turns] When this Digimon would leave the battle area, return 1 yellow Digimon card from this Digimon's digivolution cards to the hand.";
+                }
+
+                bool CanSelectCardCondition(CardSource cardSource)
+                {
+                    if (cardSource.IsDigimon)
+                    {
+                        if (cardSource.CardColors.Contains(CardColor.Yellow))
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.CanTriggerWhenRemoveField(hashtable, card))
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (card.PermanentOfThisCard().DigivolutionCards.Count(CanSelectCardCondition) >= 1)
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        Permanent cardPermanent = card.PermanentOfThisCard();
+
+                        if (cardPermanent.DigivolutionCards.Count(CanSelectCardCondition) >= 1)
+                        {
+                            int maxCount = Math.Min(1, cardPermanent.DigivolutionCards.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 return to hand.",
+                                maxCount: maxCount,
+                                canEndNotMax: false,
+                                isShowOpponent: true,
+                                mode: SelectCardEffect.Mode.AddHand,
+                                root: SelectCardEffect.Root.Custom,
+                                customRootCardList: cardPermanent.DigivolutionCards,
+                                canLookReverseCard: true,
+                                selectPlayer: card.Owner,
+                                cardEffect: activateClass);
+
+                            yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
+                        }
+                    }
+                }
+            }
+
+            #endregion
+
+            #region When Attacking - ESS
+
+            if (timing == EffectTiming.OnAllyAttack)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Security Attack -1", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false,
+                    EffectDescription());
+                activateClass.SetIsInheritedEffect(true);
+                activateClass.SetHashString("SecurityAttack-1_EX6-025");
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[When Attacking][Once Per Turn] 1 Digimon may gain [Security Attack -1] until the end of your opponent's turn.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnAttack(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        return true;
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectSecMinusPermanentSharedCondition))
+                    {
+                        int maxCount = Math.Min(1,
+                            CardEffectCommons.MatchConditionPermanentCount(CanSelectSecMinusPermanentSharedCondition));
+
+                        SelectPermanentEffect selectPermanentEffect =
+                            GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectSecMinusPermanentSharedCondition,
+                            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 get Security Attack -1.",
+                            "The opponent is selecting 1 Digimon that will get Security Attack -1.");
+
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                        IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(
+                                CardEffectCommons.ChangeDigimonSAttack(targetPermanent: permanent, changeValue: -1,
+                                    effectDuration: EffectDuration.UntilOpponentTurnEnd, activateClass: activateClass));
+                        }
+                    }
+                }
+            }
+
+            #endregion
+
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/EX6/Yellow/Sanzomon_EX6_025.cs.meta

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

+ 224 - 0
Assets/CardEffect/EX6/Yellow/SeraphimonAce_EX6_028.cs

@@ -0,0 +1,224 @@
+using System.Collections;
+using System.Collections.Generic;
+using System;
+
+namespace DCGO.CardEffects.EX6
+{
+    public class SeraphimonAce_EX6_028 : 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.ContainsCardName("MagnaAngemon");
+                }
+                
+                cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(
+                    permanentCondition: PermanentCondition,
+                    digivolutionCost: 3,
+                    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
+            
+            string EffectSharedDescription()
+            {
+                return
+                    "[On Play] [When Digivolving] Trigger <Recovery +1 (Deck)>. (Place the top card of your deck on top of your security stack.)";
+            }
+            
+            #endregion
+            
+            #region On Play
+            
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Recovery +1 (Deck)", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false,
+                    EffectSharedDescription());
+                cardEffects.Add(activateClass);
+                
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
+                }
+                
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
+                    {
+                        if (card.Owner.LibraryCards.Count >= 1)
+                        {
+                            if (card.Owner.CanAddSecurity(activateClass))
+                            {
+                                return true;
+                            }
+                        }
+                    }
+                    
+                    return false;
+                }
+                
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    yield return ContinuousController.instance.StartCoroutine(
+                        new IRecovery(card.Owner, 1, activateClass).Recovery());
+                }
+            }
+            
+            #endregion
+            
+            #region When Digivolving
+            
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Recovery +1 (Deck)", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false,
+                    EffectSharedDescription());
+                cardEffects.Add(activateClass);
+                
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                }
+                
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (card.Owner.LibraryCards.Count >= 1)
+                        {
+                            if (card.Owner.CanAddSecurity(activateClass))
+                            {
+                                return true;
+                            }
+                        }
+                    }
+                    
+                    return false;
+                }
+                
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    yield return ContinuousController.instance.StartCoroutine(
+                        new IRecovery(card.Owner, 1, activateClass).Recovery());
+                }
+            }
+            
+            #endregion
+            
+            #region All Turns
+            
+            if (timing == EffectTiming.OnAddSecurity)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Draw 1", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false,
+                    EffectDescription());
+                activateClass.SetHashString("ReturnToHand_EX6_028");
+                cardEffects.Add(activateClass);
+                
+                string EffectDescription()
+                {
+                    return
+                        "[Your Turn][Once Per Turn] When a card is added to your security stack, return 1 of your opponent's Digimon with a level as high or lower than the number of cards in your security stack to the hand.";
+                }
+                
+                bool CanSelectOpponentPermanentCondition(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
+                    {
+                        if (permanent.Level <= card.Owner.SecurityCards.Count)
+                        {
+                            if (permanent.TopCard.HasLevel)
+                            {
+                                return true;
+                            }
+                        }
+                    }
+                    
+                    return false;
+                }
+                
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.IsOwnerTurn(card))
+                        {
+                            if (CardEffectCommons.CanTriggerWhenAddSecurity(hashtable, player => player == card.Owner))
+                            {
+                                return true;
+                            }
+                        }
+                    }
+                    
+                    return false;
+                }
+                
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        return true;
+                    }
+                    
+                    return false;
+                }
+                
+                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/EX6/Yellow/SeraphimonAce_EX6_028.cs.meta

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

+ 617 - 0
Assets/CardEffect/EX6/Yellow/Shakamon_EX6_031.cs

@@ -0,0 +1,617 @@
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+using System;
+
+namespace DCGO.CardEffects.EX6
+{
+    public class Shakamon_EX6_031 : 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.ContainsCardName("Sanzomon") ||
+                           targetPermanent.TopCard.ContainsCardName("Gokuumon") ||
+                           targetPermanent.TopCard.ContainsCardName("Sagomon") ||
+                           targetPermanent.TopCard.ContainsCardName("Cho-Hakkaimon");
+                }
+                
+                cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(
+                    permanentCondition: PermanentCondition,
+                    digivolutionCost: 6,
+                    ignoreDigivolutionRequirement: false,
+                    card: card,
+                    condition: null)
+                );
+            }
+            
+            #endregion
+            
+            #region DigiXros
+            
+            if (timing == EffectTiming.None)
+            {
+                AddDigiXrosConditionClass addDigiXrosConditionClass = new AddDigiXrosConditionClass();
+                addDigiXrosConditionClass.SetUpICardEffect($"DigiXros -2", 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 elementSanzomon =
+                            new DigiXrosConditionElement(CanSelectCardConditionSanzomon, "Sanzomon");
+                        
+                        bool CanSelectCardConditionSanzomon(CardSource conditionCardSource)
+                        {
+                            if (conditionCardSource != null)
+                            {
+                                if (conditionCardSource.Owner == card.Owner)
+                                {
+                                    if (conditionCardSource.IsDigimon)
+                                    {
+                                        if (conditionCardSource.CardNames_DigiXros.Contains("Sanzomon"))
+                                        {
+                                            return true;
+                                        }
+                                    }
+                                }
+                            }
+                            
+                            return false;
+                        }
+                        
+                        DigiXrosConditionElement elementGokuumon =
+                            new DigiXrosConditionElement(CanSelectCardConditionGokuumon, "Gokuumon");
+                        
+                        bool CanSelectCardConditionGokuumon(CardSource conditionCardSource)
+                        {
+                            if (conditionCardSource != null)
+                            {
+                                if (conditionCardSource.Owner == card.Owner)
+                                {
+                                    if (conditionCardSource.IsDigimon)
+                                    {
+                                        if (conditionCardSource.CardNames_DigiXros.Contains("Gokuumon"))
+                                        {
+                                            return true;
+                                        }
+                                    }
+                                }
+                            }
+                            
+                            return false;
+                        }
+                        
+                        DigiXrosConditionElement elementSagomon =
+                            new DigiXrosConditionElement(CanSelectCardConditionSagomon, "Sagomon");
+                        
+                        bool CanSelectCardConditionSagomon(CardSource conditionCardSource)
+                        {
+                            if (conditionCardSource != null)
+                            {
+                                if (conditionCardSource.Owner == card.Owner)
+                                {
+                                    if (conditionCardSource.IsDigimon)
+                                    {
+                                        if (conditionCardSource.CardNames_DigiXros.Contains("Sagomon"))
+                                        {
+                                            return true;
+                                        }
+                                    }
+                                }
+                            }
+                            
+                            return false;
+                        }
+                        
+                        DigiXrosConditionElement elementChoHakkaimon =
+                            new DigiXrosConditionElement(CanSelectCardConditionChoHakkaimon, "Cho-Hakkaimon");
+                        
+                        bool CanSelectCardConditionChoHakkaimon(CardSource conditionCardSource)
+                        {
+                            if (conditionCardSource != null)
+                            {
+                                if (conditionCardSource.Owner == card.Owner)
+                                {
+                                    if (conditionCardSource.IsDigimon)
+                                    {
+                                        if (conditionCardSource.CardNames_DigiXros.Contains("Cho-Hakkaimon"))
+                                        {
+                                            return true;
+                                        }
+                                    }
+                                }
+                            }
+                            
+                            return false;
+                        }
+                        
+                        List<DigiXrosConditionElement> elements = new List<DigiXrosConditionElement>()
+                            { elementSanzomon, elementGokuumon, elementSagomon, elementChoHakkaimon };
+                        
+                        DigiXrosCondition digiXrosCondition = new DigiXrosCondition(elements, null, 2);
+                        
+                        return digiXrosCondition;
+                    }
+                    
+                    return null;
+                }
+            }
+            
+            #endregion
+            
+            #region On Play/ When Digivolving Shared
+            
+            bool CanActivateSharedCondition(Hashtable hashtable)
+            {
+                return CardEffectCommons.IsExistOnBattleArea(card);
+            }
+            
+            #endregion
+            
+            #region On Play
+            
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Security Attack -1", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateSharedCondition, ActivateCoroutine, -1, false,
+                    EffectDescription());
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return "[On Play] All Digimon gain <Security Attack -1> until the end of your opponent's turn.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
+                }
+                
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    bool PermanentCondition(Permanent permanent)
+                    {
+                        if (CardEffectCommons.IsPermanentExistsOnBattleArea(permanent))
+                        {
+                            if (permanent.IsDigimon)
+                            {
+                                return true;
+                            }
+                        }
+                        
+                        return false;
+                    }
+                    
+                    yield return ContinuousController.instance.StartCoroutine(
+                        CardEffectCommons.ChangeDigimonSAttackPlayerEffect(
+                            permanentCondition: PermanentCondition,
+                            changeValue: -1,
+                            effectDuration: EffectDuration.UntilOpponentTurnEnd,
+                            activateClass: activateClass));
+                }
+            }
+            
+            #endregion
+            
+            #region When Digivolving
+            
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Security Attack -1", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateSharedCondition, ActivateCoroutine, -1, false,
+                    EffectDescription());
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return "[When Digivolving] All Digimon gain <Security Attack -1> until the end of your opponent's turn.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                }
+                
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    bool PermanentCondition(Permanent permanent)
+                    {
+                        if (CardEffectCommons.IsPermanentExistsOnBattleArea(permanent))
+                        {
+                            if (permanent.IsDigimon)
+                            {
+                                return true;
+                            }
+                        }
+                        
+                        return false;
+                    }
+                    
+                    yield return ContinuousController.instance.StartCoroutine(
+                        CardEffectCommons.ChangeDigimonSAttackPlayerEffect(
+                            permanentCondition: PermanentCondition,
+                            changeValue: -1,
+                            effectDuration: EffectDuration.UntilOpponentTurnEnd,
+                            activateClass: activateClass));
+                }
+            }
+            
+            #endregion
+            
+            #region All Turns
+            
+            if (timing == EffectTiming.WhenPermanentWouldBeDeleted)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect(
+                    "Play 1 [Sanzomon] and 1 [Gokuumon]/[Sagomon]/[Cho-Hakkaimon] from its digivolution cards without paying the cost.",
+                    CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true,
+                    EffectDescription());
+                activateClass.SetHashString("PlaySourceCard_EX6_031");
+                cardEffects.Add(activateClass);
+                
+                string EffectDescription()
+                {
+                    return
+                        "[All Turns] When this Digimon would be deleted or returned to the hand or deck, you may play 1 [Sanzomon] and 1 [Gokuumon]/[Sagomon]/[Cho-Hakkaimon] from its digivolution cards without paying the cost.";
+                }
+                
+                bool CanSelectDigimonSanzomonCardCondition(CardSource cardSource)
+                {
+                    if (cardSource.IsDigimon)
+                    {
+                        if (cardSource.ContainsCardName("Sanzomon"))
+                        {
+                            if (CardEffectCommons.CanPlayAsNewPermanent(cardSource: cardSource, payCost: false,
+                                    cardEffect: activateClass))
+                            {
+                                return true;
+                            }
+                        }
+                    }
+                    
+                    return false;
+                }
+                
+                bool CanSelectDigimonJourneyCardCondition(CardSource cardSource)
+                {
+                    if (cardSource.IsDigimon)
+                    {
+                        if (cardSource.ContainsCardName("Gokuumon") ||
+                            cardSource.ContainsCardName("Sagomon") ||
+                            cardSource.ContainsCardName("Cho-Hakkaimon"))
+                        {
+                            if (CardEffectCommons.CanPlayAsNewPermanent(cardSource: cardSource, payCost: false,
+                                    cardEffect: activateClass))
+                            {
+                                return true;
+                            }
+                        }
+                    }
+                    
+                    return false;
+                }
+                
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.CanTriggerWhenRemoveField(hashtable, card))
+                        {
+                            return true;
+                        }
+                    }
+                    
+                    return false;
+                }
+                
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (card.PermanentOfThisCard().DigivolutionCards.Count >= 1)
+                        {
+                            if (card.PermanentOfThisCard().DigivolutionCards
+                                    .Count(CanSelectDigimonSanzomonCardCondition) >= 1)
+                            {
+                                return true;
+                            }
+                            
+                            if (card.PermanentOfThisCard().DigivolutionCards
+                                    .Count(CanSelectDigimonJourneyCardCondition) >= 1)
+                            {
+                                return true;
+                            }
+                        }
+                    }
+                    
+                    return false;
+                }
+                
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        Permanent cardPermanent = card.PermanentOfThisCard();
+                        
+                        if (cardPermanent.DigivolutionCards.Count(CanSelectDigimonSanzomonCardCondition) >= 1)
+                        {
+                            int maxCount = Math.Min(1,
+                                cardPermanent.DigivolutionCards.Count(CanSelectDigimonSanzomonCardCondition));
+                            
+                            List<CardSource> selectedCards = new List<CardSource>();
+                            
+                            SelectCardEffect selectCardEffect =
+                                GManager.instance.GetComponent<SelectCardEffect>();
+                            
+                            selectCardEffect.SetUp(
+                                canTargetCondition: CanSelectDigimonSanzomonCardCondition,
+                                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: cardPermanent.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;
+                            }
+                            
+                            // Play the selected Digivolution card
+                            yield return ContinuousController.instance.StartCoroutine(
+                                CardEffectCommons.PlayPermanentCards(
+                                    cardSources: selectedCards,
+                                    activateClass: activateClass,
+                                    payCost: false,
+                                    isTapped: false,
+                                    root: SelectCardEffect.Root.DigivolutionCards,
+                                    activateETB: true));
+                        }
+                        
+                        if (cardPermanent.DigivolutionCards.Count(CanSelectDigimonJourneyCardCondition) >= 1)
+                        {
+                            int maxCount = Math.Min(1,
+                                cardPermanent.DigivolutionCards.Count(CanSelectDigimonJourneyCardCondition));
+                            
+                            List<CardSource> selectedCards = new List<CardSource>();
+                            
+                            SelectCardEffect selectCardEffect =
+                                GManager.instance.GetComponent<SelectCardEffect>();
+                            
+                            selectCardEffect.SetUp(
+                                canTargetCondition: CanSelectDigimonJourneyCardCondition,
+                                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: cardPermanent.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;
+                            }
+                            
+                            // Play the selected Digivolution card
+                            yield return ContinuousController.instance.StartCoroutine(
+                                CardEffectCommons.PlayPermanentCards(
+                                    cardSources: selectedCards,
+                                    activateClass: activateClass,
+                                    payCost: false,
+                                    isTapped: false,
+                                    root: SelectCardEffect.Root.DigivolutionCards,
+                                    activateETB: true));
+                        }
+                    }
+                }
+            }
+
+            #endregion
+
+            #region Your Turn
+
+            if (timing == EffectTiming.None)
+            {
+                bool Condition()
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.IsOwnerTurn(card))
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool PermanentCondition(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
+                    {
+                        if (permanent.HasSecurityAttackChanges)
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+
+
+                cardEffects.Add(CardEffectFactory.InvertSAttackStaticEffect(
+                    permanentCondition: PermanentCondition,
+                    changeValue: -1,
+                    isInheritedEffect: false,
+                    card: card,
+                    condition: Condition));
+            }
+
+            #endregion
+
+            #region End of Opponent's Turn
+
+            if (timing == EffectTiming.OnEndTurn)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect(
+                    "Place 1 Digimon with [Security Attack] on top of its owner's security stack",
+                    CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, true, EffectDescription());
+                activateClass.SetHashString("EOT_EX6-031");
+                cardEffects.Add(activateClass);
+                
+                string EffectDescription()
+                {
+                    return
+                        "[End of Your Turn] [Once Per Turn] You may place 1 Digimon with [Security Attack] on top of its owner's security stack.";
+                }
+                
+                bool IsPermanentWithSecurityAttackCondition(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnBattleArea(permanent))
+                    {
+                        if (permanent.HasSecurityAttackChanges)
+                        {
+                            return true;
+                        }
+                    }
+                    
+                    return false;
+                }
+                
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.IsOpponentTurn(card))
+                        {
+                            return true;
+                        }
+                    }
+                    
+                    return false;
+                }
+                
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.HasMatchConditionPermanent(IsPermanentWithSecurityAttackCondition))
+                        {
+                            return true;
+                        }
+                    }
+                    
+                    return false;
+                }
+                
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.HasMatchConditionPermanent(IsPermanentWithSecurityAttackCondition))
+                    {
+                        int maxCount = Math.Min(1,
+                            CardEffectCommons.MatchConditionPermanentCount(IsPermanentWithSecurityAttackCondition));
+                        
+                        SelectPermanentEffect selectPermanentEffect =
+                            GManager.instance.GetComponent<SelectPermanentEffect>();
+                        
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: IsPermanentWithSecurityAttackCondition,
+                            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 place on top of your security stack.",
+                            "The opponent is selecting 1 Digimon to place on top of their security stack.");
+                        
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                        
+                        IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                        {
+                            if (permanent.TopCard != null)
+                            {
+                                if (!permanent.TopCard.CanNotBeAffected(activateClass))
+                                {
+                                    yield return ContinuousController.instance.StartCoroutine(
+                                        new IPutSecurityPermanent(permanent,
+                                            CardEffectCommons.CardEffectHashtable(activateClass),
+                                            toTop: true).PutSecurity());
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+            
+            #endregion
+            
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/EX6/Yellow/Shakamon_EX6_031.cs.meta

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

+ 228 - 0
Assets/CardEffect/EX6/Yellow/Shu_Chong_Wong_EX6_064.cs

@@ -0,0 +1,228 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+namespace DCGO.CardEffects.EX6
+{
+    public class Shu_Chong_Wong_EX6_064 : 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, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[On Play] Reveal the top 3 cards of your deck. Add 1 card with the [Beast]/[Beastkin]/[Holy Beast]/[Cherub] trait among them to the hand. Return the rest to the bottom of the deck.";
+                }
+
+                bool CanSelectCardCondition(CardSource cardSource)
+                {
+                    if (cardSource.IsDigimon)
+                    {
+                        if (cardSource.ContainsTraits("Beast") || cardSource.ContainsTraits("Beastkin") || cardSource.ContainsTraits("Holy Beast") || cardSource.ContainsTraits("Cherub"))
+                        {
+                            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 SimplifiedSelectCardConditionClass(
+                            canTargetCondition:CanSelectCardCondition,
+                            message: "Select 1 Digimon card with the [Beast]/[Beastkin]/[Holy Beast]/[Cherub] trait.",
+                            mode: SelectCardEffect.Mode.AddHand,
+                            maxCount: 1,
+                            selectCardCoroutine: null),
+                        },
+                        remainingCardsPlace: RemainingCardsPlace.DeckBottom,
+                        activateClass: activateClass
+                    ));
+                }
+            }
+            #endregion
+
+            #region Your Turn
+            if (timing == EffectTiming.OnTappedAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("When an effect suspends your Digimon, one of your Digimon may digivolve from your hand with reduced cost.", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[Your Turn] When an effect suspends one of your Digimon, by suspending this Tamer, 1 of your Digimon may digivolve into a Digimon card with the [Beastkin]/[Holy Beast]/[Cherub] trait in your hand with the digivolution cost reduced by 2.";
+                }
+
+                bool CanSelectPermanentCondition(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsOwnerTurn(card))
+                    {
+                        if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
+                        {
+                            if (permanent != card.PermanentOfThisCard())
+                            {
+                                foreach (CardSource cardSource in card.Owner.HandCards)
+                                {
+                                    if (CanSelectCardCondition(cardSource))
+                                    {
+                                        if (cardSource.CanPlayCardTargetFrame(permanent.PermanentFrame, false, activateClass))
+                                        {
+                                            return true;
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool PermanentCondition(Permanent permanent)
+                {
+                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card);
+                }
+
+                bool CanSelectCardCondition(CardSource cardSource)
+                {
+                    return cardSource.IsDigimon && cardSource.HasLevel && cardSource.CardTraits.Contains("Beastkin") || cardSource.CardTraits.Contains("Holy Beast") || cardSource.CardTraits.Contains("Cherub");
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.IsOwnerTurn(card))
+                        {
+                            if (CardEffectCommons.CanTriggerWhenPermanentSuspends(hashtable, PermanentCondition))
+                            {
+                                if (CardEffectCommons.IsByEffect(hashtable, null))
+                                {
+                                    return true;
+                                }
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if(CardEffectCommons.CanActivateSuspendCostEffect(card))
+                        {
+                            if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                            {
+                                if (card.Owner.HandCards.Count >= 1)
+                                {
+                                    return true;
+                                }
+                            }
+                        }                
+                    }
+
+                    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(CanSelectPermanentCondition))
+                    {
+                        Permanent selectedPermanent = null;
+
+                        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 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: CanSelectCardCondition,
+                                payCost: true,
+                                reduceCostTuple: (reduceCost: 2, reduceCostCardCondition: null),
+                                fixedCostTuple: null,
+                                ignoreDigivolutionRequirementFixedCost: -1,
+                                isHand: true,
+                                activateClass: activateClass,
+                                successProcess: null));
+                        }
+                    }
+                }
+            }
+            #endregion
+
+            #region Security
+            if (timing == EffectTiming.SecuritySkill)
+            {
+                cardEffects.Add(CardEffectFactory.PlaySelfTamerSecurityEffect(card));
+            }
+            #endregion
+
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/EX6/Yellow/Shu_Chong_Wong_EX6_064.cs.meta

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

+ 259 - 0
Assets/CardEffect/EX6/Yellow/TK_Takaishi_And_Kari_Kamiya_EX6_063.cs

@@ -0,0 +1,259 @@
+using System.Collections;
+using System.Collections.Generic;
+using System;
+
+namespace DCGO.CardEffects.EX6
+{
+    public class TK_Takaishi_And_Kari_Kamiya_EX6_063 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+            
+            #region Start of Your Main Phase/ On Play Shared
+            
+            string EffectSharedDescription()
+            {
+                return
+                    "[Start Of Your Main Phase] [On Play] 1 of your yellow Digimon gains [Barrier] until the end of your opponent's turn.";
+            }
+            
+            bool IsOwnerYellowDigimonSharedCondition(Permanent permanent)
+            {
+                if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
+                {
+                    return permanent.TopCard.CardColors.Contains(CardColor.Yellow);
+                }
+                
+                return false;
+            }
+            
+            bool CanActivateSharedCondition(Hashtable hashtable)
+            {
+                if (CardEffectCommons.IsExistOnBattleArea(card))
+                {
+                    if (CardEffectCommons.HasMatchConditionPermanent(IsOwnerYellowDigimonSharedCondition))
+                    {
+                        return true;
+                    }
+                }
+                
+                return false;
+            }
+            
+            #endregion
+            
+            #region On Play
+            
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect(
+                    "1 of your yellow Digimon gains [Barrier] until the end of your opponent's turn.", CanUseCondition,
+                    card);
+                activateClass.SetUpActivateClass(CanActivateSharedCondition, ActivateCoroutine, -1, false,
+                    EffectSharedDescription());
+                cardEffects.Add(activateClass);
+                
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
+                }
+                
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (isExistOnField(card))
+                    {
+                        if (CardEffectCommons.HasMatchConditionPermanent(IsOwnerYellowDigimonSharedCondition))
+                        {
+                            int maxCount = Math.Min(1,
+                                CardEffectCommons.MatchConditionPermanentCount(IsOwnerYellowDigimonSharedCondition));
+                            
+                            SelectPermanentEffect selectPermanentEffect =
+                                GManager.instance.GetComponent<SelectPermanentEffect>();
+                            
+                            selectPermanentEffect.SetUp(
+                                selectPlayer: card.Owner,
+                                canTargetCondition: IsOwnerYellowDigimonSharedCondition,
+                                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 Barrier.",
+                                "The opponent is selecting 1 Digimon that will gain Barrier.");
+                            
+                            yield return ContinuousController.instance.StartCoroutine(
+                                selectPermanentEffect.Activate());
+                            
+                            IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                            {
+                                yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainBarrier(targetPermanent: permanent, effectDuration: EffectDuration.UntilOpponentTurnEnd, activateClass: activateClass));
+                            }
+                        }
+                    }
+                }
+            }
+            
+            #endregion
+            
+            #region Start of Your Main Phase
+            
+            if (timing == EffectTiming.OnStartMainPhase)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect(
+                    "1 of your yellow Digimon gains [Barrier] until the end of your opponent's turn.", CanUseCondition,
+                    card);
+                activateClass.SetUpActivateClass(CanActivateSharedCondition, ActivateCoroutine, -1, false,
+                    EffectSharedDescription());
+                cardEffects.Add(activateClass);
+                
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.IsOwnerTurn(card))
+                        {
+                            return true;
+                        }
+                    }
+                    
+                    return false;
+                }
+                
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (isExistOnField(card))
+                    {
+                        if (CardEffectCommons.HasMatchConditionPermanent(IsOwnerYellowDigimonSharedCondition))
+                        {
+                            int maxCount = Math.Min(1,
+                                CardEffectCommons.MatchConditionPermanentCount(IsOwnerYellowDigimonSharedCondition));
+                            
+                            SelectPermanentEffect selectPermanentEffect =
+                                GManager.instance.GetComponent<SelectPermanentEffect>();
+                            
+                            selectPermanentEffect.SetUp(
+                                selectPlayer: card.Owner,
+                                canTargetCondition: IsOwnerYellowDigimonSharedCondition,
+                                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 Barrier.",
+                                "The opponent is selecting 1 Digimon that will gain Barrier.");
+                            
+                            yield return ContinuousController.instance.StartCoroutine(
+                                selectPermanentEffect.Activate());
+                            
+                            IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                            {
+                                yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainBarrier(targetPermanent: permanent, effectDuration: EffectDuration.UntilOpponentTurnEnd, activateClass: activateClass));
+                            }
+                        }
+                    }
+                }
+            }
+            
+            #endregion
+            
+            #region Your Turn
+            
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Gain 1 Memory", CanUseCondition,
+                    card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true,
+                    EffectDescription());
+                cardEffects.Add(activateClass);
+                
+                string EffectDescription()
+                {
+                    return
+                        "[Your Turn] When one of your Digimon is played or digivolves, if it has the [Angel]/[Archangel]/[Three Great Angels] trait, by suspending this Tamer, gain 1 memory.";
+                }
+                
+                bool PermanentCondition(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
+                    {
+                        if (permanent.TopCard.ContainsTraits("Angel") ||
+                            permanent.TopCard.ContainsTraits("Archangel") ||
+                            permanent.TopCard.ContainsTraits("Three Great Angels") ||
+                            permanent.TopCard.ContainsTraits("ThreeGreatAngels"))
+                        {
+                            return true;
+                        }
+                    }
+                    
+                    return false;
+                }
+                
+                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 true;
+                        }
+                    }
+                    
+                    return false;
+                }
+                
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    yield return ContinuousController.instance.StartCoroutine(
+                        new SuspendPermanentsClass(new List<Permanent>() { card.PermanentOfThisCard() },
+                            CardEffectCommons.CardEffectHashtable(activateClass)).Tap());
+                    
+                    yield return ContinuousController.instance.StartCoroutine(card.Owner.AddMemory(1, activateClass));
+                }
+            }
+            
+            #endregion
+            
+            #region Security Effect
+            
+            if (timing == EffectTiming.SecuritySkill)
+            {
+                cardEffects.Add(CardEffectFactory.PlaySelfTamerSecurityEffect(card));
+            }
+            
+            #endregion
+            
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/EX6/Yellow/TK_Takaishi_And_Kari_Kamiya_EX6_063.cs.meta

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

+ 110 - 0
Assets/Scripts/CardEffectCommons/GiveEffect/GiveEffectToPermanent/ChangeSAttack.cs

@@ -117,4 +117,114 @@ public partial class CardEffectCommons
         }
     }
     #endregion
+
+
+    #region Invert target 1 Digimon's SAttack
+    public static IEnumerator InverteDigimonSAttack(Permanent targetPermanent, int changeValue, EffectDuration effectDuration, ICardEffect activateClass)
+    {
+        if (targetPermanent == null) yield break;
+        if (!IsPermanentExistsOnBattleArea(targetPermanent)) yield break;
+        if (changeValue == 0) yield break;
+        if (activateClass == null) yield break;
+        if (activateClass.EffectSourceCard == null) yield break;
+
+        CardSource card = activateClass.EffectSourceCard;
+        bool isUpValue = changeValue > 0;
+
+        bool CanUseCondition()
+        {
+            if (IsPermanentExistsOnBattleArea(targetPermanent))
+            {
+                if (!targetPermanent.TopCard.CanNotBeAffected(activateClass))
+                {
+                    return true;
+                }
+            }
+
+            return false;
+        }
+
+        InvertSAttackClass invertSAttackClass = CardEffectFactory.InvertTargetSAttackStaticEffect(
+                    targetPermanent: targetPermanent,
+                    changeValue: changeValue,
+                    isInheritedEffect: false,
+                    card: card,
+                    condition: CanUseCondition);
+
+        AddEffectToPermanent(
+            targetPermanent: targetPermanent,
+            effectDuration: effectDuration,
+            card: card,
+            cardEffect: invertSAttackClass,
+            timing: EffectTiming.None);
+
+        if (!targetPermanent.TopCard.CanNotBeAffected(activateClass))
+        {
+            if (!isUpValue)
+            {
+                yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().CreateBuffEffect(targetPermanent));
+            }
+
+            else
+            {
+                yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().CreateDebuffEffect(targetPermanent));
+            }
+        }
+    }
+
+    public static IEnumerator InvertDigimonSAttack(Permanent targetPermanent, int changeValue, EffectDuration effectDuration, ICardEffect activateClass, bool activateAnimation)
+    {
+        if (targetPermanent == null) yield break;
+        if (!IsPermanentExistsOnBattleArea(targetPermanent)) yield break;
+        if (changeValue == 0) yield break;
+        if (activateClass == null) yield break;
+        if (activateClass.EffectSourceCard == null) yield break;
+
+        CardSource card = activateClass.EffectSourceCard;
+        bool isUpValue = changeValue > 0;
+
+        bool CanUseCondition()
+        {
+            if (IsPermanentExistsOnBattleArea(targetPermanent))
+            {
+                if (!targetPermanent.TopCard.CanNotBeAffected(activateClass))
+                {
+                    return true;
+                }
+            }
+
+            return false;
+        }
+
+        InvertSAttackClass invertSAttackClass = CardEffectFactory.InvertTargetSAttackStaticEffect(
+                    targetPermanent: targetPermanent,
+                    changeValue: changeValue,
+                    isInheritedEffect: false,
+                    card: card,
+                    condition: CanUseCondition);
+
+        AddEffectToPermanent(
+            targetPermanent: targetPermanent,
+            effectDuration: effectDuration,
+            card: card,
+            cardEffect: invertSAttackClass,
+            timing: EffectTiming.None);
+
+        if (!targetPermanent.TopCard.CanNotBeAffected(activateClass))
+        {
+            if (activateAnimation)
+            {
+                if (!isUpValue)
+                {
+                    yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().CreateBuffEffect(targetPermanent));
+                }
+
+                else
+                {
+                    yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().CreateDebuffEffect(targetPermanent));
+                }
+            }
+        }
+    }
+    #endregion
 }

+ 63 - 0
Assets/Scripts/CardEffectCommons/GiveEffect/GiveEffectToPlayer/ChangeSAttack.cs

@@ -67,4 +67,67 @@ public partial class CardEffectCommons
         }
     }
     #endregion
+
+
+    #region Player gains effect to invert Digimon's SAttack
+    public static IEnumerator InvertDigimonSAttackPlayerEffect(
+        Func<Permanent, bool> permanentCondition,
+        int changeValue,
+        EffectDuration effectDuration,
+        ICardEffect activateClass)
+    {
+        if (activateClass == null) yield break;
+        if (activateClass.EffectSourceCard == null) yield break;
+        if (changeValue == 0) yield break;
+
+        CardSource card = activateClass.EffectSourceCard;
+        bool isUpValue = changeValue > 0;
+
+        bool PermanentCondition(Permanent permanent)
+        {
+            if (IsPermanentExistsOnBattleArea(permanent))
+            {
+                if (!permanent.TopCard.CanNotBeAffected(activateClass))
+                {
+                    if (permanentCondition == null || permanentCondition(permanent))
+                    {
+                        return true;
+                    }
+                }
+            }
+
+            return false;
+        }
+
+        bool CanUseCondition()
+        {
+            return true;
+        }
+
+        InvertSAttackClass invertSAttackClass = CardEffectFactory.InvertSAttackStaticEffect(
+            permanentCondition: PermanentCondition,
+            changeValue: changeValue,
+            isInheritedEffect: false,
+            card: card,
+            condition: CanUseCondition);
+
+        AddEffectToPlayer(effectDuration: effectDuration, card: card, cardEffect: invertSAttackClass, timing: EffectTiming.None);
+
+        foreach (Permanent permanent in GManager.instance.turnStateMachine.gameContext.PermanentsForTurnPlayer)
+        {
+            if (PermanentCondition(permanent))
+            {
+                if (!isUpValue)
+                {
+                    yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().CreateBuffEffect(permanent));
+                }
+
+                else
+                {
+                    yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().CreateDebuffEffect(permanent));
+                }
+            }
+        }
+    }
+    #endregion
 }

+ 122 - 0
Assets/Scripts/CardEffectFactory/ChangeSAttack.cs

@@ -131,4 +131,126 @@ public partial class CardEffectFactory
         return changeSAttackClass;
     }
     #endregion
+
+
+    #region Static effect that inverts one's own SAttack
+    public static InvertSAttackClass InvertSelfSAttackStaticEffect<T>(
+        T changeValue,
+        bool isInheritedEffect,
+        CardSource card,
+        Func<bool> condition)
+    {
+        bool CanUseCondition()
+        {
+            if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
+            {
+                if (condition == null || condition())
+                {
+                    return true;
+                }
+            }
+
+            return false;
+        }
+
+        return InvertTargetSAttackStaticEffect(
+            targetPermanent: card.PermanentOfThisCard(),
+            changeValue: changeValue,
+            isInheritedEffect: isInheritedEffect,
+            card: card,
+            condition: CanUseCondition);
+    }
+    #endregion
+
+    #region Static effect that inverts SAttack
+    public static InvertSAttackClass InvertTargetSAttackStaticEffect<T>(
+        Permanent targetPermanent,
+        T changeValue,
+        bool isInheritedEffect,
+        CardSource card,
+        Func<bool> condition)
+    {
+        bool PermanentCondition(Permanent permanent)
+        {
+            return permanent == targetPermanent;
+        }
+
+        return InvertSAttackStaticEffect(
+            permanentCondition: PermanentCondition,
+            changeValue: changeValue,
+            isInheritedEffect: isInheritedEffect,
+            card: card,
+            condition: condition
+        );
+    }
+
+    public static InvertSAttackClass InvertSAttackStaticEffect<T>(
+        Func<Permanent, bool> permanentCondition,
+        T changeValue,
+        bool isInheritedEffect,
+        CardSource card,
+        Func<bool> condition)
+    {
+        bool isInt = typeof(T) == typeof(int);
+        bool isIntFunc = typeof(T) == typeof(Func<int>);
+
+        if (!isInt && !isIntFunc) return null;
+
+        if (isInt && (int)(object)changeValue == 0) return null;
+        if (isIntFunc && changeValue as Func<int> == null) return null;
+
+        int _changeValue() => isInt ? (int)(object)changeValue : (changeValue as Func<int>)();
+        bool isUpValue() => _changeValue() > 0;
+        string effectName() => isUpValue() ? $"<Security A. +> are turned into <Security A. ->" : $"<Security A. -> are turned into <Security A. +>";
+
+        InvertSAttackClass invertSAttackClass = new InvertSAttackClass();
+        invertSAttackClass.SetUpICardEffect("", CanUseCondition, card);
+        invertSAttackClass.SetUpChangeSAttackClass(changeInvertFunc: InvertValue, permanentCondition: PermanentCondition);
+
+        if (isInheritedEffect)
+        {
+            invertSAttackClass.SetIsInheritedEffect(true);
+        }
+
+        bool CanUseCondition(Hashtable hashtable)
+        {
+            if (condition == null || condition())
+            {
+                invertSAttackClass.SetEffectName(effectName());
+
+                return true;
+            }
+
+            return false;
+        }
+
+        int InvertValue(Permanent permanent, int invertValue)
+        {
+            if (PermanentCondition(permanent))
+            {
+                invertValue += _changeValue();
+            }
+
+            return invertValue;
+        }
+
+        bool PermanentCondition(Permanent permanent)
+        {
+            if (CardEffectCommons.IsPermanentExistsOnBattleArea(permanent))
+            {
+                if (!permanent.TopCard.CanNotBeAffected(invertSAttackClass))
+                {
+                    if (permanentCondition == null || permanentCondition(permanent))
+                    {
+                        return true;
+                    }
+                }
+            }
+
+            return false;
+        }
+
+        return invertSAttackClass;
+    }
+    #endregion
 }

+ 9 - 1
Assets/Scripts/CardEffectInterfaces.cs

@@ -89,12 +89,20 @@ public interface ICanNotTrashFromDigivolutionCardsEffect
 #region "Change target permanent's Security Attack" effect
 public interface IChangeSAttackEffect
 {
-    int GetSAttack(int SAttack, Permanent permanent);
+    int GetSAttack(int SAttack, Permanent permanent, int invertValue);
     CalculateOrder isUpDown();
     bool PermanentCondition(Permanent permanent);
 }
 #endregion
 
+#region "Invert target permanent's Security Attack" effect
+public interface IInvertSAttackEffect
+{
+    int InversionValue(Permanent permanent, int invertValue);
+    bool PermanentCondition(Permanent permanent);
+}
+#endregion
+
 #region "Change target card's card names" effect
 public interface IChangeCardNamesEffect
 {

+ 18 - 3
Assets/Scripts/CardEffects/ChangeSAttackClass.cs

@@ -2,6 +2,7 @@ using System.Collections;
 using System.Collections.Generic;
 using UnityEngine;
 using System;
+using Unity.Mathematics;
 
 public class ChangeSAttackClass : ICardEffect, IChangeSAttackEffect
 {
@@ -16,14 +17,28 @@ public class ChangeSAttackClass : ICardEffect, IChangeSAttackEffect
     Func<Permanent, bool> _permanentCondition = null;
     Func<CalculateOrder> _isUpDown = null;
 
-    public int GetSAttack(int SAttack, Permanent permanent)
+    public int GetSAttack(int SAttack, Permanent permanent, int invertValue)
     {
+        int changedSAttack = SAttack;
+
         if (PermanentCondition(permanent))
         {
-            SAttack = _changeSAttackFunc(permanent, SAttack);
+            changedSAttack = _changeSAttackFunc(permanent, SAttack);
+
+            switch (invertValue)
+            {
+                case -1:
+                    if(changedSAttack < SAttack)
+                        changedSAttack = SAttack + Mathf.Abs(changedSAttack - SAttack);
+                    break;
+                case 1:
+                    if (changedSAttack > SAttack)
+                        changedSAttack = SAttack - (changedSAttack - SAttack);
+                    break;
+            }
         }
 
-        return SAttack;
+        return changedSAttack;
     }
 
     public CalculateOrder isUpDown()

+ 46 - 0
Assets/Scripts/CardEffects/InvertSAttackClass.cs

@@ -0,0 +1,46 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using System;
+using Unity.Mathematics;
+
+public class InvertSAttackClass : ICardEffect, IInvertSAttackEffect
+{
+    public void SetUpChangeSAttackClass(Func<Permanent, int, int> changeInvertFunc, Func<Permanent, bool> permanentCondition)
+    {
+        _changeInvertFunc = changeInvertFunc;
+        _permanentCondition = permanentCondition;
+    }
+
+    Func<Permanent, int, int> _changeInvertFunc = null;
+    Func<Permanent, bool> _permanentCondition = null;
+
+    public int InversionValue(Permanent permanent, int invertValue)
+    {
+        if (PermanentCondition(permanent))
+        {
+            invertValue = _changeInvertFunc(permanent, invertValue);
+        }
+
+        return invertValue;
+    }
+
+    public bool PermanentCondition(Permanent permanent)
+    {
+        if (permanent != null)
+        {
+            if (permanent.TopCard != null)
+            {
+                if (_permanentCondition != null)
+                {
+                    if (_permanentCondition(permanent))
+                    {
+                        return true;
+                    }
+                }
+            }
+        }
+
+        return false;
+    }
+}

+ 11 - 0
Assets/Scripts/CardEffects/InvertSAttackClass.cs.meta

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

+ 62 - 8
Assets/Scripts/Permanent.cs

@@ -1066,7 +1066,61 @@ public class Permanent
     }
     #endregion
 
-    #region セキュリティチェックを行う枚数
+    #region Number of sheets to undergo security check
+    public int InvertSecutiryValue
+    {
+        get
+        {
+            int Invert = 0;
+
+            List<ICardEffect> cardEffects_InvertStrike = new List<ICardEffect>();
+
+            foreach (Player player in GManager.instance.turnStateMachine.gameContext.Players_ForTurnPlayer)
+            {
+                foreach (Permanent permanent in player.GetFieldPermanents())
+                {
+                    #region Effects of permanents in play
+                    foreach (ICardEffect cardEffect in permanent.EffectList(EffectTiming.None))
+                    {
+                        if (cardEffect is IInvertSAttackEffect)
+                        {
+                            if (cardEffect.CanUse(null))
+                            {
+                                if (!TopCard.CanNotBeAffected(cardEffect))
+                                {
+                                    cardEffects_InvertStrike.Add(cardEffect);
+                                }
+                            }
+                        }
+                    }
+                    #endregion
+                }
+
+                #region player effect
+                foreach (ICardEffect cardEffect in player.EffectList(EffectTiming.None))
+                {
+                    if (cardEffect is IInvertSAttackEffect)
+                    {
+                        if (cardEffect.CanUse(null))
+                        {
+                            if (!TopCard.CanNotBeAffected(cardEffect))
+                            {
+                                cardEffects_InvertStrike.Add(cardEffect);
+                            }
+                        }
+                    }
+                }
+                #endregion
+            }
+
+            foreach (ICardEffect cardEffect in cardEffects_InvertStrike)
+            {
+                Invert = ((IInvertSAttackEffect)cardEffect).InversionValue(this, Invert);
+            }
+
+            return Mathf.Clamp(Invert,-1,1);
+        }
+    }
     public List<int> SecurityAttackChanges
     {
         get
@@ -1127,7 +1181,7 @@ public class Permanent
                 {
                     if (cardEffect.CanUse(null))
                     {
-                        int Strike1 = ((IChangeSAttackEffect)cardEffect).GetSAttack(Strike, this);
+                        int Strike1 = ((IChangeSAttackEffect)cardEffect).GetSAttack(Strike, this, InvertSecutiryValue);
 
                         if (Strike1 != Strike)
                         {
@@ -1160,7 +1214,7 @@ public class Permanent
         {
             int Strike = 1;
 
-            #region セキュリティチェックを行う枚数を変更する効果
+            #region Effect of changing the number of sheets to undergo security check
 
             List<ICardEffect> cardEffects_ChangeDirectStrike = new List<ICardEffect>();
 
@@ -1168,7 +1222,7 @@ public class Permanent
             {
                 foreach (Permanent permanent in player.GetFieldPermanents())
                 {
-                    #region 場のパーマネントの効果
+                    #region Effects of permanents in play
                     foreach (ICardEffect cardEffect in permanent.EffectList(EffectTiming.None))
                     {
                         if (cardEffect is IChangeSAttackEffect)
@@ -1188,7 +1242,7 @@ public class Permanent
                     #endregion
                 }
 
-                #region プレイヤーの効果
+                #region player effect
                 foreach (ICardEffect cardEffect in player.EffectList(EffectTiming.None))
                 {
                     if (cardEffect is IChangeSAttackEffect)
@@ -1242,7 +1296,7 @@ public class Permanent
                 {
                     if (cardEffect.CanUse(null))
                     {
-                        Strike = ((IChangeSAttackEffect)cardEffect).GetSAttack(Strike, this);
+                        Strike = ((IChangeSAttackEffect)cardEffect).GetSAttack(Strike, this, InvertSecutiryValue);
                     }
                 }
             }
@@ -1253,7 +1307,7 @@ public class Permanent
                 {
                     if (cardEffect.CanUse(null))
                     {
-                        Strike = ((IChangeSAttackEffect)cardEffect).GetSAttack(Strike, this);
+                        Strike = ((IChangeSAttackEffect)cardEffect).GetSAttack(Strike, this, InvertSecutiryValue);
                     }
                 }
             }
@@ -1264,7 +1318,7 @@ public class Permanent
                 {
                     if (cardEffect.CanUse(null))
                     {
-                        Strike = ((IChangeSAttackEffect)cardEffect).GetSAttack(Strike, this);
+                        Strike = ((IChangeSAttackEffect)cardEffect).GetSAttack(Strike, this, InvertSecutiryValue);
                     }
                 }
             }