mbunch_kascope пре 2 година
родитељ
комит
7ee258aa44

+ 83 - 80
Assets/CardEffect/LM/Black/Espimon_LM_014.cs

@@ -1,60 +1,62 @@
 using System.Collections;
 using System.Collections.Generic;
 
-public class Espimon_LM_014 : CEntity_Effect
+namespace DCGO.CardEffects.LM
 {
-    public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+    public class Espimon_LM_014 : CEntity_Effect
     {
-        List<ICardEffect> cardEffects = new List<ICardEffect>();
-
-        #region OnPlay
-        if (timing == EffectTiming.OnEnterFieldAnyone)
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
         {
-            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);
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
 
-            string EffectDiscription()
+            #region OnPlay
+            if (timing == EffectTiming.OnEnterFieldAnyone)
             {
-                return "[On Play] Reveal the top 3 cards of your deck. Add 1 card with <Blocker> or 1 Tamer card among them to the hand. Return the rest to the bottom of the deck.";
-            }
+                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);
 
-            bool CanSelectBlockerCondition(CardSource cardSource)
-            {
-                return cardSource.HasBlocker;
-            }
+                string EffectDiscription()
+                {
+                    return "[On Play] Reveal the top 3 cards of your deck. Add 1 card with <Blocker> or 1 Tamer card among them to the hand. Return the rest to the bottom of the deck.";
+                }
 
-            bool CanSelectTamerCondition(CardSource cardSource)
-            {
-                return cardSource.IsTamer;
-            }
+                bool CanSelectBlockerCondition(CardSource cardSource)
+                {
+                    return cardSource.HasBlocker;
+                }
 
-            bool CanUseCondition(Hashtable hashtable)
-            {
-                return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
-            }
+                bool CanSelectTamerCondition(CardSource cardSource)
+                {
+                    return cardSource.IsTamer;
+                }
 
-            bool CanActivateCondition(Hashtable hashtable)
-            {
-                if (CardEffectCommons.IsExistOnBattleArea(card))
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
                 {
-                    if (card.Owner.LibraryCards.Count >= 1)
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
                     {
-                        return true;
+                        if (card.Owner.LibraryCards.Count >= 1)
+                        {
+                            return true;
+                        }
                     }
-                }
 
-                return false;
-            }
+                    return false;
+                }
 
-            IEnumerator ActivateCoroutine(Hashtable _hashtable)
-            {
-                yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.SimplifiedRevealDeckTopCardsAndSelect(
-                    revealCount: 3,
-                    simplifiedSelectCardConditions:
-                    new SimplifiedSelectCardConditionClass[]
-                    {
+                IEnumerator ActivateCoroutine(Hashtable _hashtable)
+                {
+                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.SimplifiedRevealDeckTopCardsAndSelect(
+                        revealCount: 3,
+                        simplifiedSelectCardConditions:
+                        new SimplifiedSelectCardConditionClass[]
+                        {
                         new SimplifiedSelectCardConditionClass(
                             canTargetCondition:CanSelectBlockerCondition,
                             message: "Select 1 card with [Blocker].",
@@ -67,62 +69,63 @@ public class Espimon_LM_014 : CEntity_Effect
                             mode: SelectCardEffect.Mode.AddHand,
                             maxCount: 1,
                             selectCardCoroutine: null),
-                    },
-                    remainingCardsPlace: RemainingCardsPlace.DeckBottom,
-                    activateClass: activateClass
-                ));
+                        },
+                        remainingCardsPlace: RemainingCardsPlace.DeckBottom,
+                        activateClass: activateClass
+                    ));
+                }
             }
-        }
-        #endregion
+            #endregion
 
-        #region OnAttackTargetChanged - Inherited Effect
-        if (timing == EffectTiming.OnAttackTargetChanged)
-        {
-            ActivateClass activateClass = new ActivateClass();
-            activateClass.SetUpICardEffect("Draw 1", CanUseCondition, card);
-            activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDiscription());
-            activateClass.SetIsInheritedEffect(true);
-            activateClass.SetHashString("Draw+1_LM_014");
-            cardEffects.Add(activateClass);
-
-            string EffectDiscription()
+            #region OnAttackTargetChanged - Inherited Effect
+            if (timing == EffectTiming.OnAttackTargetChanged)
             {
-                return "[Opponent's Turn] [Once Per Turn] When the attack target is switched, <Draw 1>.";
-            }
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Draw 1", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDiscription());
+                activateClass.SetIsInheritedEffect(true);
+                activateClass.SetHashString("Draw+1_LM_014");
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[Opponent's Turn] [Once Per Turn] When the attack target is switched, <Draw 1>.";
+                }
 
-            bool CanUseCondition(Hashtable hashtable)
-            {
-                if (CardEffectCommons.IsExistOnBattleArea(card))
+                bool CanUseCondition(Hashtable hashtable)
                 {
-                    if (CardEffectCommons.CanTriggerOnPermanentAttackTargetSwitch(hashtable, permanent => true))
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
                     {
-                        return true;
+                        if (CardEffectCommons.CanTriggerOnPermanentAttackTargetSwitch(hashtable, permanent => true))
+                        {
+                            return true;
+                        }
                     }
-                }
 
-                return false;
-            }
+                    return false;
+                }
 
-            bool CanActivateCondition(Hashtable hashtable)
-            {
-                if (CardEffectCommons.IsExistOnBattleArea(card))
+                bool CanActivateCondition(Hashtable hashtable)
                 {
-                    if (card.Owner.LibraryCards.Count >= 1)
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
                     {
-                        return true;
+                        if (card.Owner.LibraryCards.Count >= 1)
+                        {
+                            return true;
+                        }
                     }
+
+                    return false;
                 }
 
-                return false;
+                IEnumerator ActivateCoroutine(Hashtable _hashtable)
+                {
+                    yield return ContinuousController.instance.StartCoroutine(new DrawClass(card.Owner, 1, activateClass).Draw());
+                }
             }
+            #endregion
 
-            IEnumerator ActivateCoroutine(Hashtable _hashtable)
-            {
-                yield return ContinuousController.instance.StartCoroutine(new DrawClass(card.Owner, 1, activateClass).Draw());
-            }
+            return cardEffects;
         }
-        #endregion
-
-        return cardEffects;
     }
 }

+ 69 - 68
Assets/CardEffect/LM/Black/Ryudamon_LM_015.cs

@@ -1,106 +1,107 @@
-using JetBrains.Annotations;
 using System.Collections;
 using System.Collections.Generic;
-using UnityEngine;
 
-public class Ryudamon_LM_015 : CEntity_Effect
+namespace DCGO.CardEffects.LM
 {
-    public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+    public class Ryudamon_LM_015 : CEntity_Effect
     {
-        List<ICardEffect> cardEffects = new List<ICardEffect>();
-
-        #region When Attacking
-        if (timing == EffectTiming.OnAllyAttack)
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
         {
-            ActivateClass activateClass = new ActivateClass();
-            activateClass.SetUpICardEffect("This Digimon digivolves", CanUseCondition, card);
-            activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
-            cardEffects.Add(activateClass);
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
 
-            string EffectDiscription()
+            #region When Attacking
+            if (timing == EffectTiming.OnAllyAttack)
             {
-                return "[When Attacking] If you have a Tamer, this Digimon may digivolve into [Ginryumon] in your hand without paying the cost.";
-            }
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("This Digimon digivolves", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+                cardEffects.Add(activateClass);
 
-            bool HaveTamerCondition(Permanent permanent)
-            {
-                if (CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(permanent, card))
+                string EffectDiscription()
                 {
-                    if (permanent.IsTamer)
+                    return "[When Attacking] If you have a Tamer, this Digimon may digivolve into [Ginryumon] in your hand without paying the cost.";
+                }
+
+                bool HaveTamerCondition(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(permanent, card))
                     {
-                        return true;
+                        if (permanent.IsTamer)
+                        {
+                            return true;
+                        }
                     }
-                }
 
-                return false;
-            }
+                    return false;
+                }
 
-            bool CanSelectDigimonCondition(CardSource cardSource)
-            {
-                return cardSource.CardNames.Contains("Ginryumon");
-            }
+                bool CanSelectDigimonCondition(CardSource cardSource)
+                {
+                    return cardSource.CardNames.Contains("Ginryumon");
+                }
 
-            bool CanUseCondition(Hashtable hashtable)
-            {
-                return CardEffectCommons.CanTriggerOnAttack(hashtable, card);
-            }
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnAttack(hashtable, card);
+                }
 
-            bool CanActivateCondition(Hashtable hashtable)
-            {
-                if (CardEffectCommons.IsExistOnBattleArea(card))
+                bool CanActivateCondition(Hashtable hashtable)
                 {
-                    if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, HaveTamerCondition))
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
                     {
-                        if (card.Owner.HandCards.Count >= 1)
+                        if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, HaveTamerCondition))
                         {
+                            if (card.Owner.HandCards.Count >= 1)
+                            {
 
-                            return true;
+                                return true;
+                            }
                         }
                     }
-                }
 
-                return false;
-            }
+                    return false;
+                }
 
-            IEnumerator ActivateCoroutine(Hashtable _hashtable)
-            {
-                yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.DigivolveIntoHandOrTrashCard(
-                    targetPermanent: card.PermanentOfThisCard(),
-                    cardCondition: CanSelectDigimonCondition,
-                    payCost: false,
-                    reduceCostTuple: null,
-                    fixedCostTuple: null,
-                    ignoreDigivolutionRequirementFixedCost: -1,
-                    isHand: true,
-                    activateClass: activateClass,
-                    successProcess: null));
+                IEnumerator ActivateCoroutine(Hashtable _hashtable)
+                {
+                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.DigivolveIntoHandOrTrashCard(
+                        targetPermanent: card.PermanentOfThisCard(),
+                        cardCondition: CanSelectDigimonCondition,
+                        payCost: false,
+                        reduceCostTuple: null,
+                        fixedCostTuple: null,
+                        ignoreDigivolutionRequirementFixedCost: -1,
+                        isHand: true,
+                        activateClass: activateClass,
+                        successProcess: null));
+                }
             }
-        }
-        #endregion
+            #endregion
 
-        #region Your Turn - Inherited Effect
-        if (timing == EffectTiming.None)
-        {
-            bool Condition()
+            #region Your Turn - Inherited Effect
+            if (timing == EffectTiming.None)
             {
-                if (CardEffectCommons.IsExistOnBattleArea(card))
+                bool Condition()
                 {
-                    if (CardEffectCommons.IsOwnerTurn(card))
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
                     {
-                        if (card.ContainsTraits("X Antibody") || card.ContainsTraits("XAntibody"))
+                        if (CardEffectCommons.IsOwnerTurn(card))
                         {
-                            return true;
+                            if (card.ContainsTraits("X Antibody") || card.ContainsTraits("XAntibody"))
+                            {
+                                return true;
+                            }
                         }
                     }
+
+                    return false;
                 }
 
-                return false;
+                cardEffects.Add(CardEffectFactory.ChangeSelfDPStaticEffect(changeValue: 1000, isInheritedEffect: true, card: card, condition: Condition));
             }
+            #endregion
 
-            cardEffects.Add(CardEffectFactory.ChangeSelfDPStaticEffect(changeValue: 1000, isInheritedEffect: true, card: card, condition: Condition));
+            return cardEffects;
         }
-        #endregion
-
-        return cardEffects;
     }
-}
+}

+ 1 - 1
Assets/CardEffect/LM/Green/Airdramon_LM_009.cs

@@ -3,7 +3,7 @@ using System.Collections;
 using System.Collections.Generic;
 using System.Linq;
 
-namespace DCGO.CardEffects
+namespace DCGO.CardEffects.LM
 {
     public class Airdramon_LM_009 : CEntity_Effect
     {

+ 1 - 1
Assets/CardEffect/LM/Green/Angoramon_LM_008.cs

@@ -1,7 +1,7 @@
 using System.Collections;
 using System.Collections.Generic;
 
-namespace DCGO.CardEffects
+namespace DCGO.CardEffects.LM
 {
     public class Angoramon_LM_008 : CEntity_Effect
     {

+ 0 - 1
Assets/CardEffect/LM/Green/Diarbbitmon_LM_013.cs

@@ -2,7 +2,6 @@ using System;
 using System.Collections;
 using System.Collections.Generic;
 using System.Linq;
-using static SelectCardEffect;
 
 namespace DCGO.CardEffects.LM
 {

+ 125 - 123
Assets/CardEffect/LM/Purple/Gammamon_LM_016.cs

@@ -1,177 +1,179 @@
 using System.Collections;
 using System.Collections.Generic;
-using System.Linq;
 
-public class Gammamon_LM_016 : CEntity_Effect
+namespace DCGO.CardEffects.LM
 {
-    public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+    public class Gammamon_LM_016 : CEntity_Effect
     {
-        List<ICardEffect> cardEffects = new List<ICardEffect>();
-
-        //Alternate Digivolution Requirement
-        if (timing == EffectTiming.None)
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
         {
-            static bool PermanentCondition(Permanent targetPermanent)
-            {
-                return targetPermanent.TopCard.CardNames.Contains("Gurimon");
-            }
-
-            cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(permanentCondition: PermanentCondition, digivolutionCost: 0, ignoreDigivolutionRequirement: true, card: card, condition: null));
-        }
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
 
-        #region All Turns
-        if(timing == EffectTiming.OnDestroyedAnyone)
-        {
-            ActivateClass activateClass = new ActivateClass();
-            activateClass.SetUpICardEffect("Digivolve from trash", CanUseCondition, card);
-            activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, true, EffectDiscription());
-            cardEffects.Add(activateClass);
-
-            string EffectDiscription()
+            //Alternate Digivolution Requirement
+            if (timing == EffectTiming.None)
             {
-                return "[All Turns] [Once Per Turn] When an effect deletes one of your other Digimon, this Digimon may digivolve into a Digimon card with [Gammamon] in its text in your trash without paying the cost.";
-            }
+                static bool PermanentCondition(Permanent targetPermanent)
+                {
+                    return targetPermanent.TopCard.CardNames.Contains("Gurimon");
+                }
 
-            bool CanSelectCardCondition(CardSource cardSource)
-            {
-                return cardSource.HasText("Gammamon");
+                cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(permanentCondition: PermanentCondition, digivolutionCost: 0, ignoreDigivolutionRequirement: true, card: card, condition: null));
             }
 
-            bool PermanentCondition(Permanent permanent)
+            #region All Turns
+            if (timing == EffectTiming.OnDestroyedAnyone)
             {
-                if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Digivolve from trash", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, true, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
                 {
-                    if (permanent != card.PermanentOfThisCard())
-                    {
-                        return true;
-                    }
+                    return "[All Turns] [Once Per Turn] When an effect deletes one of your other Digimon, this Digimon may digivolve into a Digimon card with [Gammamon] in its text in your trash without paying the cost.";
                 }
 
-                return false;
-            }
+                bool CanSelectCardCondition(CardSource cardSource)
+                {
+                    return cardSource.HasText("Gammamon");
+                }
 
-            bool CanUseCondition(Hashtable hashtable)
-            {
-                if (CardEffectCommons.IsExistOnBattleArea(card))
+                bool PermanentCondition(Permanent permanent)
                 {
-                    if (CardEffectCommons.CanTriggerOnPermanentDeleted(hashtable, PermanentCondition))
+                    if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
                     {
-                        if (CardEffectCommons.IsOwnerTurn(card))
+                        if (permanent != card.PermanentOfThisCard())
                         {
                             return true;
                         }
                     }
-                }
 
-                return false;
-            }
+                    return false;
+                }
 
-            bool CanActivateCondition(Hashtable hashtable)
-            {
-                return CardEffectCommons.IsExistOnBattleArea(card);
-            }
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.CanTriggerOnPermanentDeleted(hashtable, PermanentCondition))
+                        {
+                            if (CardEffectCommons.IsOwnerTurn(card))
+                            {
+                                return true;
+                            }
+                        }
+                    }
 
-            IEnumerator ActivateCoroutine(Hashtable _hashtable)
-            {
-                yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.DigivolveIntoHandOrTrashCard(
-                    targetPermanent: card.PermanentOfThisCard(),
-                    cardCondition: CanSelectCardCondition,
-                    payCost: false,
-                    reduceCostTuple: null,
-                    fixedCostTuple: null,
-                    ignoreDigivolutionRequirementFixedCost: -1,
-                    isHand: false,
-                    activateClass: activateClass,
-                    successProcess: null));
-            }
-        }
-        #endregion
+                    return false;
+                }
 
-        #region On Deletion - Inherited Effect
-        if (timing == EffectTiming.OnDestroyedAnyone)
-        {
-            ActivateClass activateClass = new ActivateClass();
-            activateClass.SetUpICardEffect("Play 1 [Hiro Amanokawa] from hand", CanUseCondition, card);
-            activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
-            activateClass.SetIsInheritedEffect(true);
-            cardEffects.Add(activateClass);
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnBattleArea(card);
+                }
 
-            string EffectDiscription()
-            {
-                return "[On Deletion] You may play 1 [Hiro Amanokawa] from your hand without paying the cost.";
+                IEnumerator ActivateCoroutine(Hashtable _hashtable)
+                {
+                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.DigivolveIntoHandOrTrashCard(
+                        targetPermanent: card.PermanentOfThisCard(),
+                        cardCondition: CanSelectCardCondition,
+                        payCost: false,
+                        reduceCostTuple: null,
+                        fixedCostTuple: null,
+                        ignoreDigivolutionRequirementFixedCost: -1,
+                        isHand: false,
+                        activateClass: activateClass,
+                        successProcess: null));
+                }
             }
+            #endregion
 
-            bool CanSelectCardCondition(CardSource cardSource)
+            #region On Deletion - Inherited Effect
+            if (timing == EffectTiming.OnDestroyedAnyone)
             {
-                if (cardSource.CardNames.Contains("Hiro Amanokawa") || cardSource.CardNames.Contains("HiroAmanokawa"))
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Play 1 [Hiro Amanokawa] from hand", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+                activateClass.SetIsInheritedEffect(true);
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[On Deletion] You may play 1 [Hiro Amanokawa] from your hand without paying the cost.";
+                }
+
+                bool CanSelectCardCondition(CardSource cardSource)
                 {
-                    if (CardEffectCommons.CanPlayAsNewPermanent(cardSource: cardSource, payCost: false, cardEffect: activateClass))
+                    if (cardSource.CardNames.Contains("Hiro Amanokawa") || cardSource.CardNames.Contains("HiroAmanokawa"))
                     {
-                        return true;
+                        if (CardEffectCommons.CanPlayAsNewPermanent(cardSource: cardSource, payCost: false, cardEffect: activateClass))
+                        {
+                            return true;
+                        }
                     }
-                }
 
-                return false;
-            }
+                    return false;
+                }
 
-            bool CanUseCondition(Hashtable hashtable)
-            {
-                return CardEffectCommons.CanTriggerOnDeletion(hashtable, card);
-            }
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnDeletion(hashtable, card);
+                }
 
-            bool CanActivateCondition(Hashtable hashtable)
-            {
-                if (CardEffectCommons.CanActivateOnDeletion(card))
+                bool CanActivateCondition(Hashtable hashtable)
                 {
-                    if (card.Owner.HandCards.Count >= 1)
+                    if (CardEffectCommons.CanActivateOnDeletion(card))
                     {
-                        return true;
+                        if (card.Owner.HandCards.Count >= 1)
+                        {
+                            return true;
+                        }
                     }
+
+                    return false;
                 }
 
-                return false;
-            }
+                IEnumerator ActivateCoroutine(Hashtable _hashtable)
+                {
+                    List<CardSource> selectedCards = new List<CardSource>();
 
-            IEnumerator ActivateCoroutine(Hashtable _hashtable)
-            {
-                List<CardSource> selectedCards = new List<CardSource>();
+                    int maxCount = 1;
 
-                int maxCount = 1;
+                    SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
 
-                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.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");
 
-                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());
 
-                yield return StartCoroutine(selectHandEffect.Activate());
+                    IEnumerator SelectCardCoroutine(CardSource cardSource)
+                    {
+                        selectedCards.Add(cardSource);
 
-                IEnumerator SelectCardCoroutine(CardSource cardSource)
-                {
-                    selectedCards.Add(cardSource);
+                        yield return null;
+                    }
 
-                    yield return null;
+                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(cardSources: selectedCards, activateClass: activateClass, payCost: false, isTapped: false, root: SelectCardEffect.Root.Hand, activateETB: true));
                 }
-
-                yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(cardSources: selectedCards, activateClass: activateClass, payCost: false, isTapped: false, root: SelectCardEffect.Root.Hand, activateETB: true));
             }
-        }
-        #endregion
+            #endregion
 
 
-        return cardEffects;
+            return cardEffects;
+        }
     }
-}
+}

+ 66 - 65
Assets/CardEffect/LM/Purple/Gyuukimon_LM_018.cs

@@ -1,94 +1,95 @@
-using System;
 using System.Collections;
 using System.Collections.Generic;
-using System.Linq;
 
-public class Gyuukimon_LM_018 : CEntity_Effect
+namespace DCGO.CardEffects.LM
 {
-    public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+    public class Gyuukimon_LM_018 : CEntity_Effect
     {
-        List<ICardEffect> cardEffects = new List<ICardEffect>();
-
-        if (timing == EffectTiming.OnEnterFieldAnyone)
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
         {
-            ActivateClass activateClass = new ActivateClass();
-            activateClass.SetUpICardEffect("Place 1 levl 4 Digimon", CanUseCondition, card);
-            activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
-            cardEffects.Add(activateClass);
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
 
-            string EffectDiscription()
+            if (timing == EffectTiming.OnEnterFieldAnyone)
             {
-                return "[On Play] Delete 1 level 4 or lower Digimon. If you did, you may play 1 [Gyuukimon] Token without paying the cost. (Digimon/Cost 7/Lv.5/Purple/Ultimate/Virus/Dark Animal/3000 DP)";
-            }
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Place 1 levl 4 Digimon", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+                cardEffects.Add(activateClass);
 
-            bool CanSelectPermanentCondition(Permanent permanent)
-            {
-                if(permanent.IsDigimon)
+                string EffectDiscription()
                 {
-                    if(permanent.Level <= 4)
+                    return "[On Play] Delete 1 level 4 or lower Digimon. If you did, you may play 1 [Gyuukimon] Token without paying the cost. (Digimon/Cost 7/Lv.5/Purple/Ultimate/Virus/Dark Animal/3000 DP)";
+                }
+
+                bool CanSelectPermanentCondition(Permanent permanent)
+                {
+                    if (permanent.IsDigimon)
                     {
-                        return true;
+                        if (permanent.Level <= 4)
+                        {
+                            return true;
+                        }
                     }
+                    return false;
                 }
-                return false;
-            }
-
-            bool CanUseCondition(Hashtable hashtable)
-            {
-                return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
-            }
 
-            bool CanActivateCondition(Hashtable hashtable)
-            {
-                if (CardEffectCommons.IsExistOnBattleArea(card))
+                bool CanUseCondition(Hashtable hashtable)
                 {
-                    return true;
+                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
                 }
 
-                return false;
-            }
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        return true;
+                    }
 
-            IEnumerator ActivateCoroutine(Hashtable _hashtable)
-            {
-                if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable _hashtable)
                 {
-                    SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                    {
+                        SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
 
-                    selectPermanentEffect.SetUp(
-                        selectPlayer: card.Owner,
-                        canTargetCondition: CanSelectPermanentCondition,
-                        canTargetCondition_ByPreSelecetedList: null,
-                        canEndSelectCondition: null,
-                        maxCount: 1,
-                        canNoSelect: false,
-                        canEndNotMax: false,
-                        selectPermanentCoroutine: SelectPermanentCoroutine,
-                        afterSelectPermanentCoroutine: null,
-                        mode: SelectPermanentEffect.Mode.Destroy,
-                        cardEffect: activateClass);
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectPermanentCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: 1,
+                            canNoSelect: false,
+                            canEndNotMax: false,
+                            selectPermanentCoroutine: SelectPermanentCoroutine,
+                            afterSelectPermanentCoroutine: null,
+                            mode: SelectPermanentEffect.Mode.Destroy,
+                            cardEffect: activateClass);
 
-                    selectPermanentEffect.SetUpCustomMessage("Select 1 Level 4 or lower Digimon","Opponent is selecting level 4 or lower Digimon");
+                        selectPermanentEffect.SetUpCustomMessage("Select 1 Level 4 or lower Digimon", "Opponent is selecting level 4 or lower Digimon");
 
-                    yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
 
-                    IEnumerator SelectPermanentCoroutine(Permanent permanent)
-                    {
-                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.DeletePeremanentAndProcessAccordingToResult(targetPermanents: new List<Permanent>() { permanent }, activateClass: activateClass, successProcess: permanents => SuccessProcess(), failureProcess: null));
-                    }
-                    
-                    IEnumerator SuccessProcess()
-                    {
-                        ActivateClass activateClass = new ActivateClass();
-                        activateClass.SetUpICardEffect("Play 1 Gyuukimon Token", CanUseCondition, card);
-                        activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
-                        cardEffects.Add(activateClass);
+                        IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.DeletePeremanentAndProcessAccordingToResult(targetPermanents: new List<Permanent>() { permanent }, activateClass: activateClass, successProcess: permanents => SuccessProcess(), failureProcess: null));
+                        }
 
-                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayGyuukimonToken(activateClass));
+                        IEnumerator SuccessProcess()
+                        {
+                            ActivateClass activateClass = new ActivateClass();
+                            activateClass.SetUpICardEffect("Play 1 Gyuukimon Token", CanUseCondition, card);
+                            activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+                            cardEffects.Add(activateClass);
+
+                            yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayGyuukimonToken(activateClass));
+                        }
                     }
                 }
             }
-        }
 
-        return cardEffects;
+            return cardEffects;
+        }
     }
-}
+}

+ 241 - 240
Assets/CardEffect/LM/Purple/Regulusmon_LM_017.cs

@@ -1,325 +1,326 @@
-using System;
 using System.Collections;
 using System.Collections.Generic;
 using System.Linq;
-using static SelectCardEffect;
 
-public class Regulusmon_LM_017 : CEntity_Effect
+namespace DCGO.CardEffects.LM
 {
-    public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+    public class Regulusmon_LM_017 : CEntity_Effect
     {
-        List<ICardEffect> cardEffects = new List<ICardEffect>();
-
-        //Alternate Digivolution Requirement
-        if (timing == EffectTiming.None)
-        {
-            static bool PermanentCondition(Permanent targetPermanent)
-            {
-                return targetPermanent.TopCard.HasText("Gammamon") && targetPermanent.TopCard.HasLevel && targetPermanent.TopCard.Level == 4;
-            }
-
-            cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(permanentCondition: PermanentCondition, digivolutionCost: 3, ignoreDigivolutionRequirement: false, card: card, condition: null));
-        }
-
-        //Blast Digivolve
-        if (timing == EffectTiming.OnCounterTiming)
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
         {
-            cardEffects.Add(CardEffectFactory.BlastDigivolveEffect(card: card, condition: null));
-        }
-
-        #region OnPlay/WhenDigivolving
-
-        if (timing == EffectTiming.OnEnterFieldAnyone)
-        {
-            ActivateClass activateClass = new ActivateClass();
-            activateClass.SetUpICardEffect("Trash 1 card from your hand", CanUseCondition, card);
-            activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
-            cardEffects.Add(activateClass);
-
-            string EffectDiscription()
-            {
-                return "[On Play] [When Digivolving] Trash 1 card in your hand. Then, you may place 1 card with [Gammamon] in its text from your trash as this Digimon's bottom digivolution card.";
-            }
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
 
-            bool CanSelectCardCondition(CardSource cardSource)
+            //Alternate Digivolution Requirement
+            if (timing == EffectTiming.None)
             {
-                if (CardEffectCommons.IsExistOnTrash(cardSource))
+                static bool PermanentCondition(Permanent targetPermanent)
                 {
-                    return cardSource.HasText("Gammamon");
+                    return targetPermanent.TopCard.HasText("Gammamon") && targetPermanent.TopCard.HasLevel && targetPermanent.TopCard.Level == 4;
                 }
-                return false;
+
+                cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(permanentCondition: PermanentCondition, digivolutionCost: 3, ignoreDigivolutionRequirement: false, card: card, condition: null));
             }
 
-            bool CanUseCondition(Hashtable hashtable)
+            //Blast Digivolve
+            if (timing == EffectTiming.OnCounterTiming)
             {
-                return CardEffectCommons.CanTriggerOnPlay(hashtable, card) || CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                cardEffects.Add(CardEffectFactory.BlastDigivolveEffect(card: card, condition: null));
             }
 
-            bool CanActivateCondition(Hashtable hashtable)
+            #region OnPlay/WhenDigivolving
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
             {
-                if (CardEffectCommons.IsExistOnBattleArea(card))
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Trash 1 card from your hand", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
                 {
-                    if (card.Owner.HandCards.Count >= 1)
+                    return "[On Play] [When Digivolving] Trash 1 card in your hand. Then, you may place 1 card with [Gammamon] in its text from your trash as this Digimon's bottom digivolution card.";
+                }
+
+                bool CanSelectCardCondition(CardSource cardSource)
+                {
+                    if (CardEffectCommons.IsExistOnTrash(cardSource))
                     {
-                        return true;
+                        return cardSource.HasText("Gammamon");
                     }
+                    return false;
                 }
 
-                return false;
-            }
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card) || CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                }
 
-            bool CanActivateThenCondition(Hashtable hashtable)
-            {
-                if (CardEffectCommons.IsExistOnBattleArea(card))
+                bool CanActivateCondition(Hashtable hashtable)
                 {
-                    if (card.Owner.TrashCards.Count >= 1)
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
                     {
-                        if(card.Owner.TrashCards.Any(cardSource => cardSource.HasText("Gammamon")))
+                        if (card.Owner.HandCards.Count >= 1)
                         {
                             return true;
                         }
                     }
-                }
-
-                return false;
-            }
 
-            IEnumerator ActivateCoroutine(Hashtable _hashtable)
-            {
-                List<CardSource> selectedCards = new List<CardSource>();
+                    return false;
+                }
 
-                SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
+                bool CanActivateThenCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (card.Owner.TrashCards.Count >= 1)
+                        {
+                            if (card.Owner.TrashCards.Any(cardSource => cardSource.HasText("Gammamon")))
+                            {
+                                return true;
+                            }
+                        }
+                    }
 
-                selectHandEffect.SetUp(
-                    selectPlayer: card.Owner,
-                    canTargetCondition: (cardSource) => true,
-                    canTargetCondition_ByPreSelecetedList: null,
-                    canEndSelectCondition: null,
-                    maxCount: 1,
-                    canNoSelect: true,
-                    canEndNotMax: false,
-                    isShowOpponent: true,
-                    selectCardCoroutine: null,
-                    afterSelectCardCoroutine: null,
-                    mode: SelectHandEffect.Mode.Discard,
-                    cardEffect: activateClass);
+                    return false;
+                }
 
-                selectHandEffect.SetUpCustomMessage("Select 1 card to trash.", "The opponent is selecting 1 card to trash.");
+                IEnumerator ActivateCoroutine(Hashtable _hashtable)
+                {
+                    List<CardSource> selectedCards = new List<CardSource>();
 
-                yield return StartCoroutine(selectHandEffect.Activate());
+                    SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
 
-                yield return StartCoroutine(ActivatePlacingSource());
-            }
+                    selectHandEffect.SetUp(
+                        selectPlayer: card.Owner,
+                        canTargetCondition: (cardSource) => true,
+                        canTargetCondition_ByPreSelecetedList: null,
+                        canEndSelectCondition: null,
+                        maxCount: 1,
+                        canNoSelect: true,
+                        canEndNotMax: false,
+                        isShowOpponent: true,
+                        selectCardCoroutine: null,
+                        afterSelectCardCoroutine: null,
+                        mode: SelectHandEffect.Mode.Discard,
+                        cardEffect: activateClass);
 
-            IEnumerator ActivatePlacingSource()
-            {
-                ActivateClass activateClass = new ActivateClass();
-                activateClass.SetUpICardEffect("Place a Card from hand to digivolution cards to get effects", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateThenCondition, ActivateCoroutine, -1, true, EffectDiscription());
-                cardEffects.Add(activateClass);
+                    selectHandEffect.SetUpCustomMessage("Select 1 card to trash.", "The opponent is selecting 1 card to trash.");
 
-                SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
-
-                List<CardSource> selectedCards = new List<CardSource>();
-
-                selectCardEffect.SetUp(
-                    canTargetCondition: CanSelectCardCondition,
-                    canTargetCondition_ByPreSelecetedList: null,
-                    canEndSelectCondition: null,
-                    canNoSelect: () => true,
-                    selectCardCoroutine: SelectCardCoroutine,
-                    afterSelectCardCoroutine: null,
-                    message: "Select 1 card to place at the bottom of digivolution cards.",
-                    maxCount: 1,
-                    canEndNotMax: false,
-                    isShowOpponent: true,
-                    mode: SelectCardEffect.Mode.Custom,
-                    root: SelectCardEffect.Root.Trash,
-                    customRootCardList: null,
-                    canLookReverseCard: true,
-                    selectPlayer: card.Owner,
-                    cardEffect: activateClass);
-
-                selectCardEffect.SetUpCustomMessage("Select 1 card to place at the bottom of digivolution cards.", "The opponent is selecting 1 card to place at the bottom of digivolution cards.");
-
-                yield return StartCoroutine(selectCardEffect.Activate());
-
-                IEnumerator SelectCardCoroutine(CardSource cardSource)
-                {
-                    selectedCards.Add(cardSource);
+                    yield return StartCoroutine(selectHandEffect.Activate());
 
-                    yield return null;
+                    yield return StartCoroutine(ActivatePlacingSource());
                 }
 
-                if (selectedCards.Count >= 1)
+                IEnumerator ActivatePlacingSource()
                 {
-                    Permanent selectedPermanent = card.PermanentOfThisCard();
+                    ActivateClass activateClass = new ActivateClass();
+                    activateClass.SetUpICardEffect("Place a Card from hand to digivolution cards to get effects", CanUseCondition, card);
+                    activateClass.SetUpActivateClass(CanActivateThenCondition, ActivateCoroutine, -1, true, EffectDiscription());
+                    cardEffects.Add(activateClass);
+
+                    SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+
+                    List<CardSource> selectedCards = new List<CardSource>();
+
+                    selectCardEffect.SetUp(
+                        canTargetCondition: CanSelectCardCondition,
+                        canTargetCondition_ByPreSelecetedList: null,
+                        canEndSelectCondition: null,
+                        canNoSelect: () => true,
+                        selectCardCoroutine: SelectCardCoroutine,
+                        afterSelectCardCoroutine: null,
+                        message: "Select 1 card to place at the bottom of digivolution cards.",
+                        maxCount: 1,
+                        canEndNotMax: false,
+                        isShowOpponent: true,
+                        mode: SelectCardEffect.Mode.Custom,
+                        root: SelectCardEffect.Root.Trash,
+                        customRootCardList: null,
+                        canLookReverseCard: true,
+                        selectPlayer: card.Owner,
+                        cardEffect: activateClass);
+
+                    selectCardEffect.SetUpCustomMessage("Select 1 card to place at the bottom of digivolution cards.", "The opponent is selecting 1 card to place at the bottom of digivolution cards.");
+
+                    yield return StartCoroutine(selectCardEffect.Activate());
+
+                    IEnumerator SelectCardCoroutine(CardSource cardSource)
+                    {
+                        selectedCards.Add(cardSource);
+
+                        yield return null;
+                    }
 
-                    if (selectedPermanent != null)
+                    if (selectedCards.Count >= 1)
                     {
-                        yield return ContinuousController.instance.StartCoroutine(selectedPermanent.AddDigivolutionCardsBottom(selectedCards, activateClass));
+                        Permanent selectedPermanent = card.PermanentOfThisCard();
+
+                        if (selectedPermanent != null)
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(selectedPermanent.AddDigivolutionCardsBottom(selectedCards, activateClass));
+                        }
                     }
                 }
             }
-        }
 
-        #endregion
-
-        #region All Turns
-        if (timing == EffectTiming.OnAddDigivolutionCards)
-        {
-            ActivateClass activateClass = new ActivateClass();
-            activateClass.SetUpICardEffect("Delete 1 Digimon, Play 1 Digimon", CanUseCondition, card);
-            activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDiscription());
-            cardEffects.Add(activateClass);
+            #endregion
 
-            string EffectDiscription()
+            #region All Turns
+            if (timing == EffectTiming.OnAddDigivolutionCards)
             {
-                return "[All Turns] [Once Per Turn] When an effect adds digivolution card to this Digimon, by deleting 1 level 4 or lower Digimon, you may play 1 level 4 or lower Digimon card from your trash without paying the cost.";
-            }
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Delete 1 Digimon, Play 1 Digimon", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDiscription());
+                cardEffects.Add(activateClass);
 
-            bool CanSelectPermanentCondition(Permanent permanent)
-            {
-                if (CardEffectCommons.IsPermanentExistsOnBattleArea(permanent))
+                string EffectDiscription()
                 {
-                    return permanent.IsDigimon && permanent.Level <= 4;
+                    return "[All Turns] [Once Per Turn] When an effect adds digivolution card to this Digimon, by deleting 1 level 4 or lower Digimon, you may play 1 level 4 or lower Digimon card from your trash without paying the cost.";
                 }
-                return false;
-            }
 
-            bool CanSelectCardCondition(CardSource cardSource)
-            {
-                if (CardEffectCommons.IsExistOnTrash(cardSource))
+                bool CanSelectPermanentCondition(Permanent permanent)
                 {
-                    if(cardSource.Owner == card.Owner)
-                        return cardSource.IsDigimon && cardSource.Level <= 4;
+                    if (CardEffectCommons.IsPermanentExistsOnBattleArea(permanent))
+                    {
+                        return permanent.IsDigimon && permanent.Level <= 4;
+                    }
+                    return false;
                 }
-                return false;
-            }
 
-            bool CanUseCondition(Hashtable hashtable)
-            {
-                if (CardEffectCommons.IsExistOnBattleArea(card))
+                bool CanSelectCardCondition(CardSource cardSource)
                 {
-                    if (CardEffectCommons.CanTriggerOnAddDigivolutionCard(
-                            hashtable: hashtable,
-                            permanentCondition: permanent => permanent == card.PermanentOfThisCard(),
-                            cardEffectCondition: cardEffect => cardEffect.EffectSourceCard != null,
-                            cardCondition: null))
+                    if (CardEffectCommons.IsExistOnTrash(cardSource))
                     {
-                        if(CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
-                        {
-                            return true;
-                        }
+                        if (cardSource.Owner == card.Owner)
+                            return cardSource.IsDigimon && cardSource.Level <= 4;
                     }
+                    return false;
                 }
 
-                return false;
-            }
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.CanTriggerOnAddDigivolutionCard(
+                                hashtable: hashtable,
+                                permanentCondition: permanent => permanent == card.PermanentOfThisCard(),
+                                cardEffectCondition: cardEffect => cardEffect.EffectSourceCard != null,
+                                cardCondition: null))
+                        {
+                            if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                            {
+                                return true;
+                            }
+                        }
+                    }
 
-            bool CanActivateCondition(Hashtable hashtable)
-            {
-                return CardEffectCommons.IsExistOnBattleArea(card);
-            }
+                    return false;
+                }
 
-            IEnumerator ActivateCoroutine(Hashtable _hashtable)
-            {
-                SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnBattleArea(card);
+                }
 
-                List<Permanent> selectedCards = new List<Permanent>();
+                IEnumerator ActivateCoroutine(Hashtable _hashtable)
+                {
+                    SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
 
-                selectPermanentEffect.SetUp(
-                    selectPlayer: card.Owner,
-                    canTargetCondition: CanSelectPermanentCondition,
-                    canTargetCondition_ByPreSelecetedList: null,
-                    canEndSelectCondition: null,
-                    canNoSelect: true,
-                    selectPermanentCoroutine: SelectPermanentCoroutine,
-                    afterSelectPermanentCoroutine: null,
-                    maxCount: 1,
-                    canEndNotMax: false,
-                    mode: SelectPermanentEffect.Mode.Destroy,                    
-                    cardEffect: activateClass);
+                    List<Permanent> selectedCards = new List<Permanent>();
 
-                selectPermanentEffect.SetUpCustomMessage("Select 1 card to place at the bottom of digivolution cards.", "The opponent is selecting 1 card to place at the bottom of digivolution cards.");
+                    selectPermanentEffect.SetUp(
+                        selectPlayer: card.Owner,
+                        canTargetCondition: CanSelectPermanentCondition,
+                        canTargetCondition_ByPreSelecetedList: null,
+                        canEndSelectCondition: null,
+                        canNoSelect: true,
+                        selectPermanentCoroutine: SelectPermanentCoroutine,
+                        afterSelectPermanentCoroutine: null,
+                        maxCount: 1,
+                        canEndNotMax: false,
+                        mode: SelectPermanentEffect.Mode.Destroy,
+                        cardEffect: activateClass);
 
-                yield return StartCoroutine(selectPermanentEffect.Activate());
+                    selectPermanentEffect.SetUpCustomMessage("Select 1 card to place at the bottom of digivolution cards.", "The opponent is selecting 1 card to place at the bottom of digivolution cards.");
 
-                IEnumerator SelectPermanentCoroutine(Permanent permanent)
-                {
-                    selectedCards.Add(permanent);
+                    yield return StartCoroutine(selectPermanentEffect.Activate());
 
-                    yield return null;
-                }
+                    IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                    {
+                        selectedCards.Add(permanent);
 
-                if(selectedCards.Count >= 1)
-                {
-                    ActivateClass activateByClass = new ActivateClass();
-                    activateByClass.SetUpICardEffect("Play 1 Digimon", CanUseByCondition, card);
-                    activateByClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDiscription());
-                    cardEffects.Add(activateByClass);
+                        yield return null;
+                    }
 
-                    bool CanUseByCondition(Hashtable hashtable)
+                    if (selectedCards.Count >= 1)
                     {
-                        if (CardEffectCommons.IsExistOnBattleArea(card))
+                        ActivateClass activateByClass = new ActivateClass();
+                        activateByClass.SetUpICardEffect("Play 1 Digimon", CanUseByCondition, card);
+                        activateByClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDiscription());
+                        cardEffects.Add(activateByClass);
+
+                        bool CanUseByCondition(Hashtable hashtable)
                         {
-                            if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectCardCondition))
+                            if (CardEffectCommons.IsExistOnBattleArea(card))
                             {
-                                return true;
+                                if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectCardCondition))
+                                {
+                                    return true;
+                                }
                             }
-                        }
 
-                        return false;
-                    }
+                            return false;
+                        }
 
-                    IEnumerator ActivateCoroutine(Hashtable _hashtable)
-                    {
-                        SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
-
-                        List<CardSource> selectedCards = new List<CardSource>();
-
-                        selectCardEffect.SetUp(
-                            canTargetCondition: CanSelectCardCondition,
-                            canTargetCondition_ByPreSelecetedList: null,
-                            canEndSelectCondition: null,
-                            canNoSelect: () => true,
-                            selectCardCoroutine: SelectCardCoroutine,
-                            afterSelectCardCoroutine: null,
-                            message: "Select 1 Digimon 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);
-
-                        selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to play.", "The opponent is selecting 1 Digimon card to play.");
-
-                        yield return StartCoroutine(selectPermanentEffect.Activate());
-
-                        IEnumerator SelectCardCoroutine(CardSource cardSource)
+                        IEnumerator ActivateCoroutine(Hashtable _hashtable)
                         {
-                            selectedCards.Add(cardSource);
+                            SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+
+                            List<CardSource> selectedCards = new List<CardSource>();
+
+                            selectCardEffect.SetUp(
+                                canTargetCondition: CanSelectCardCondition,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                canNoSelect: () => true,
+                                selectCardCoroutine: SelectCardCoroutine,
+                                afterSelectCardCoroutine: null,
+                                message: "Select 1 Digimon 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);
+
+                            selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to play.", "The opponent is selecting 1 Digimon card to play.");
+
+                            yield return StartCoroutine(selectPermanentEffect.Activate());
+
+                            IEnumerator SelectCardCoroutine(CardSource cardSource)
+                            {
+                                selectedCards.Add(cardSource);
 
-                            yield return null;
-                        }
+                                yield return null;
+                            }
 
-                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(
-                            cardSources: selectedCards,
-                            activateClass: activateByClass,
-                            payCost: false,
-                            isTapped: false,
-                            root: SelectCardEffect.Root.Trash,
-                            activateETB: true));
+                            yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(
+                                cardSources: selectedCards,
+                                activateClass: activateByClass,
+                                payCost: false,
+                                isTapped: false,
+                                root: SelectCardEffect.Root.Trash,
+                                activateETB: true));
+                        }
                     }
                 }
             }
-        }
-        #endregion
+            #endregion
 
-        return cardEffects;
+            return cardEffects;
+        }
     }
-}
+}

+ 172 - 169
Assets/CardEffect/LM/Red/Siriusmon_LM_001.cs

@@ -2,252 +2,255 @@ using System.Collections;
 using System.Collections.Generic;
 using System.Linq;
 
-public class Siriusmon_LM_001 : CEntity_Effect
+namespace DCGO.CardEffects.LM
 {
-    public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+    public class Siriusmon_LM_001 : CEntity_Effect
     {
-        List<ICardEffect> cardEffects = new List<ICardEffect>();
-
-        //Alternate Digivolution Requirement
-        if (timing == EffectTiming.None)
-        {
-            static bool PermanentCondition(Permanent targetPermanent)
-            {
-                return targetPermanent.TopCard.HasText("Gammamon") && targetPermanent.TopCard.HasLevel && targetPermanent.TopCard.Level == 5;
-            }
-
-            cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(permanentCondition: PermanentCondition, digivolutionCost: 4, ignoreDigivolutionRequirement: false, card: card, condition: null));
-        }
-
-        //Blast Digivolve
-        if (timing == EffectTiming.OnCounterTiming)
-        {
-            cardEffects.Add(CardEffectFactory.BlastDigivolveEffect(card: card, condition: null));
-        }
-
-        #region OnPlay/WhenDigivolving
-
-        if (timing == EffectTiming.OnEnterFieldAnyone)
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
         {
-            ActivateClass activateClass = new ActivateClass();
-            activateClass.SetUpICardEffect("Place a Card from hand to digivolution cards to get effects", CanUseCondition, card);
-            activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
-            cardEffects.Add(activateClass);
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
 
-            string EffectDiscription()
+            //Alternate Digivolution Requirement
+            if (timing == EffectTiming.None)
             {
-                return "[On Play] [When Digivolving] You may place 1 card with [Gammamon] in its text from your hand as this Digimon's bottom digivolution card. Then, delete 1 of your opponent's Digimon with 8000 DP or less. For each color in this Digimon's digivolution cards, add 1000 to this DP deletion effect's maximum.";
-            }
+                static bool PermanentCondition(Permanent targetPermanent)
+                {
+                    return targetPermanent.TopCard.HasText("Gammamon") && targetPermanent.TopCard.HasLevel && targetPermanent.TopCard.Level == 5;
+                }
 
-            bool CanSelectCardCondition(CardSource cardSource)
-            {
-                return cardSource.HasText("Gammamon");
+                cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(permanentCondition: PermanentCondition, digivolutionCost: 4, ignoreDigivolutionRequirement: false, card: card, condition: null));
             }
 
-            bool CanUseCondition(Hashtable hashtable)
+            //Blast Digivolve
+            if (timing == EffectTiming.OnCounterTiming)
             {
-                return CardEffectCommons.CanTriggerOnPlay(hashtable, card) || CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                cardEffects.Add(CardEffectFactory.BlastDigivolveEffect(card: card, condition: null));
             }
 
-            bool CanActivateCondition(Hashtable hashtable)
+            #region OnPlay/WhenDigivolving
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
             {
-                if (CardEffectCommons.IsExistOnBattleArea(card))
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Place a Card from hand to digivolution cards to get effects", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
                 {
-                    if (card.Owner.HandCards.Count >= 1)
-                    {
-                        return true;
-                    }
+                    return "[On Play] [When Digivolving] You may place 1 card with [Gammamon] in its text from your hand as this Digimon's bottom digivolution card. Then, delete 1 of your opponent's Digimon with 8000 DP or less. For each color in this Digimon's digivolution cards, add 1000 to this DP deletion effect's maximum.";
                 }
 
-                return false;
-            }
+                bool CanSelectCardCondition(CardSource cardSource)
+                {
+                    return cardSource.HasText("Gammamon");
+                }
 
-            IEnumerator ActivateCoroutine(Hashtable _hashtable)
-            {
-                if (card.Owner.HandCards.Count(CanSelectCardCondition) >= 1)
+                bool CanUseCondition(Hashtable hashtable)
                 {
-                    List<CardSource> selectedCards = new List<CardSource>();
+                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card) || CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                }
 
-                    int maxCount = 1;
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (card.Owner.HandCards.Count >= 1)
+                        {
+                            return true;
+                        }
+                    }
 
-                    SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
+                    return false;
+                }
 
-                    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);
+                IEnumerator ActivateCoroutine(Hashtable _hashtable)
+                {
+                    if (card.Owner.HandCards.Count(CanSelectCardCondition) >= 1)
+                    {
+                        List<CardSource> selectedCards = new List<CardSource>();
 
-                    selectHandEffect.SetUpCustomMessage("Select 1 card to place on bottom of digivolution cards.", "The opponent is selecting 1 card to place on bottom of digivolution cards.");
+                        int maxCount = 1;
 
-                    yield return StartCoroutine(selectHandEffect.Activate());
+                        SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
 
-                    IEnumerator SelectCardCoroutine(CardSource cardSource)
-                    {
-                        yield return ContinuousController.instance.StartCoroutine(card.PermanentOfThisCard().AddDigivolutionCardsBottom(selectedCards, activateClass));
+                        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);
 
-                        ActivateClass thenActivateClass = new ActivateClass();
-                        thenActivateClass.SetUpICardEffect("Delete 1 Digimon with 8000 DP, +1000 DP for each color in sources", CanUseCondition, card);
-                        thenActivateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
-                        cardEffects.Add(thenActivateClass);
+                        selectHandEffect.SetUpCustomMessage("Select 1 card to place on bottom of digivolution cards.", "The opponent is selecting 1 card to place on bottom of digivolution cards.");
 
-                        int MaxDP()
+                        yield return StartCoroutine(selectHandEffect.Activate());
+
+                        IEnumerator SelectCardCoroutine(CardSource cardSource)
                         {
-                            int DP = 8000;
+                            yield return ContinuousController.instance.StartCoroutine(card.PermanentOfThisCard().AddDigivolutionCardsBottom(selectedCards, activateClass));
 
-                            List<CardColor> cardColors = new List<CardColor>();
+                            ActivateClass thenActivateClass = new ActivateClass();
+                            thenActivateClass.SetUpICardEffect("Delete 1 Digimon with 8000 DP, +1000 DP for each color in sources", CanUseCondition, card);
+                            thenActivateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                            cardEffects.Add(thenActivateClass);
 
-                            foreach (CardSource source in card.PermanentOfThisCard().cardSources)
+                            int MaxDP()
                             {
-                                foreach (CardColor cardColor in source.CardColors)
+                                int DP = 8000;
+
+                                List<CardColor> cardColors = new List<CardColor>();
+
+                                foreach (CardSource source in card.PermanentOfThisCard().cardSources)
                                 {
-                                    if (!cardColors.Contains(cardColor))
-                                        cardColors.Add(cardColor);
+                                    foreach (CardColor cardColor in source.CardColors)
+                                    {
+                                        if (!cardColors.Contains(cardColor))
+                                            cardColors.Add(cardColor);
+                                    }
                                 }
-                            }
 
-                            cardColors = cardColors.Distinct().ToList();
+                                cardColors = cardColors.Distinct().ToList();
 
-                            DP += cardColors.Count * 1000;
+                                DP += cardColors.Count * 1000;
 
-                            return DP;
-                        }
+                                return DP;
+                            }
 
-                        bool CanSelectPermanentCondition(Permanent permanent)
-                        {
-                            if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
+                            bool CanSelectPermanentCondition(Permanent permanent)
                             {
-                                if (permanent.DP <= card.Owner.MaxDP_DeleteEffect(MaxDP(), thenActivateClass))
+                                if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
                                 {
-                                    return true;
+                                    if (permanent.DP <= card.Owner.MaxDP_DeleteEffect(MaxDP(), thenActivateClass))
+                                    {
+                                        return true;
+                                    }
                                 }
-                            }
 
-                            return false;
-                        }
+                                return false;
+                            }
 
-                        bool CanActivateCondition(Hashtable hashtable)
-                        {
-                            if (CardEffectCommons.IsExistOnBattleArea(card))
+                            bool CanActivateCondition(Hashtable hashtable)
                             {
-                                if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                                if (CardEffectCommons.IsExistOnBattleArea(card))
                                 {
-                                    return true;
+                                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                                    {
+                                        return true;
+                                    }
                                 }
-                            }
 
-                            return false;
-                        }
+                                return false;
+                            }
 
-                        IEnumerator ActivateCoroutine(Hashtable _hashtable)
-                        {
-                            if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                            IEnumerator ActivateCoroutine(Hashtable _hashtable)
                             {
-                                int maxCount = System.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.Destroy,
-                                    cardEffect: thenActivateClass);
-
-                                yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                                if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                                {
+                                    int maxCount = System.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.Destroy,
+                                        cardEffect: thenActivateClass);
+
+                                    yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                                }
                             }
                         }
                     }
                 }
             }
-        }
 
-        #endregion
+            #endregion
 
-        #region All Turns
-        if (timing == EffectTiming.OnDestroyedAnyone)
-        {
-            ActivateClass activateClass = new ActivateClass();
-            activateClass.SetUpICardEffect("Gain Memory", CanUseCondition, card);
-            activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
-            cardEffects.Add(activateClass);
-
-            string EffectDiscription()
+            #region All Turns
+            if (timing == EffectTiming.OnDestroyedAnyone)
             {
-                return "[All Turns] [Once Per Turn] When another Digimon is deleted, gain 1 memory.";
-            }
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Gain Memory", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                cardEffects.Add(activateClass);
 
-            bool PermanentCondition(Permanent permanent)
-            {
-                if (CardEffectCommons.IsPermanentExistsOnBattleArea(permanent))
+                string EffectDiscription()
+                {
+                    return "[All Turns] [Once Per Turn] When another Digimon is deleted, gain 1 memory.";
+                }
+
+                bool PermanentCondition(Permanent permanent)
                 {
-                    if (permanent.IsDigimon)
+                    if (CardEffectCommons.IsPermanentExistsOnBattleArea(permanent))
                     {
-                        if (permanent != card.PermanentOfThisCard())
+                        if (permanent.IsDigimon)
                         {
-                            return true;
+                            if (permanent != card.PermanentOfThisCard())
+                            {
+                                return true;
+                            }
                         }
                     }
-                }
 
-                return false;
-            }
+                    return false;
+                }
 
-            bool CanUseCondition(Hashtable hashtable)
-            {
-                if (CardEffectCommons.IsExistOnBattleArea(card))
+                bool CanUseCondition(Hashtable hashtable)
                 {
-                    if (CardEffectCommons.CanTriggerOnPermanentDeleted(hashtable, PermanentCondition))
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
                     {
-                        return true;
+                        if (CardEffectCommons.CanTriggerOnPermanentDeleted(hashtable, PermanentCondition))
+                        {
+                            return true;
+                        }
                     }
-                }
 
-                return false;
-            }
+                    return false;
+                }
 
-            bool CanActivateCondition(Hashtable hashtable)
-            {
-                if (CardEffectCommons.IsExistOnBattleArea(card))
+                bool CanActivateCondition(Hashtable hashtable)
                 {
-                    if (card.Owner.CanAddMemory(activateClass))
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
                     {
-                        List<Hashtable> hashtables = CardEffectCommons.GetHashtablesFromHashtable(hashtable);
-
-                        if (hashtables != null)
+                        if (card.Owner.CanAddMemory(activateClass))
                         {
-                            if (hashtables.Count >= 1)
+                            List<Hashtable> hashtables = CardEffectCommons.GetHashtablesFromHashtable(hashtable);
+
+                            if (hashtables != null)
                             {
-                                return true;
+                                if (hashtables.Count >= 1)
+                                {
+                                    return true;
+                                }
                             }
                         }
                     }
+
+                    return false;
                 }
 
-                return false;
+                IEnumerator ActivateCoroutine(Hashtable _hashtable)
+                {
+                    yield return ContinuousController.instance.StartCoroutine(card.Owner.AddMemory(1, activateClass));
+                }
             }
+            #endregion
 
-            IEnumerator ActivateCoroutine(Hashtable _hashtable)
-            {
-                yield return ContinuousController.instance.StartCoroutine(card.Owner.AddMemory(1, activateClass));
-            }
+            return cardEffects;
         }
-        #endregion
-
-        return cardEffects;
     }
-}
+}

+ 123 - 120
Assets/CardEffect/LM/White/Bokomon_LM_019.cs

@@ -2,177 +2,180 @@ using System.Collections;
 using System.Collections.Generic;
 using System;
 
-public class Bokomon_LM_019 : CEntity_Effect
+namespace DCGO.CardEffects.LM
 {
-    public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+    public class Bokomon_LM_019 : CEntity_Effect
     {
-        List<ICardEffect> cardEffects = new List<ICardEffect>();
-
-        #region OnPlay
-        if (timing == EffectTiming.OnEnterFieldAnyone)
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
         {
-            ActivateClass activateClass = new ActivateClass();
-            activateClass.SetUpICardEffect("Reveal the top 4 cards of deck", CanUseCondition, card);
-            activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
-            cardEffects.Add(activateClass);
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
 
-            string EffectDiscription()
+            #region OnPlay
+            if (timing == EffectTiming.OnEnterFieldAnyone)
             {
-                return "[On Play] Reveal the top 4 cards of your deck. Add 1 card with [Gammamon] in its text among them to the hand. Return the rest to the bottom of the deck.";
-            }
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Reveal the top 4 cards of deck", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                cardEffects.Add(activateClass);
 
-            bool CanSelectCardCondition(CardSource cardSource)
-            {
-                return cardSource.HasText("Gammamon");
-            }
+                string EffectDiscription()
+                {
+                    return "[On Play] Reveal the top 4 cards of your deck. Add 1 card with [Gammamon] in its text among them to the hand. Return the rest to the bottom of the deck.";
+                }
 
-            bool CanUseCondition(Hashtable hashtable)
-            {
-                return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
-            }
+                bool CanSelectCardCondition(CardSource cardSource)
+                {
+                    return cardSource.HasText("Gammamon");
+                }
 
-            bool CanActivateCondition(Hashtable hashtable)
-            {
-                if (CardEffectCommons.IsExistOnBattleArea(card))
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
                 {
-                    if (card.Owner.LibraryCards.Count >= 1)
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
                     {
-                        return true;
+                        if (card.Owner.LibraryCards.Count >= 1)
+                        {
+                            return true;
+                        }
                     }
-                }
 
-                return false;
-            }
+                    return false;
+                }
 
-            IEnumerator ActivateCoroutine(Hashtable _hashtable)
-            {
-                yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.SimplifiedRevealDeckTopCardsAndSelect(
-                    revealCount: 4,
-                    simplifiedSelectCardConditions:
-                    new SimplifiedSelectCardConditionClass[]
-                    {
+                IEnumerator ActivateCoroutine(Hashtable _hashtable)
+                {
+                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.SimplifiedRevealDeckTopCardsAndSelect(
+                        revealCount: 4,
+                        simplifiedSelectCardConditions:
+                        new SimplifiedSelectCardConditionClass[]
+                        {
                         new SimplifiedSelectCardConditionClass(
                             canTargetCondition:CanSelectCardCondition,
                             message: "Select 1 card with [Gammamon] in it's text.",
                             mode: SelectCardEffect.Mode.AddHand,
                             maxCount: 1,
                             selectCardCoroutine: null),
-                    },
-                    remainingCardsPlace: RemainingCardsPlace.DeckBottom,
-                    activateClass: activateClass
-                ));
+                        },
+                        remainingCardsPlace: RemainingCardsPlace.DeckBottom,
+                        activateClass: activateClass
+                    ));
+                }
             }
-        }
-        #endregion
-
-        #region All Turns
-        if (timing == EffectTiming.WhenRemoveField)
-        {
-            ActivateClass activateClass = new ActivateClass();
-            activateClass.SetUpICardEffect("Delete this Digimon to prevent 1 other Digimon from leaving Battle Area", CanUseCondition, card);
-            activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, true, EffectDiscription());
-            activateClass.SetHashString("Substitute_LM01_019");
-            cardEffects.Add(activateClass);
+            #endregion
 
-            string EffectDiscription()
+            #region All Turns
+            if (timing == EffectTiming.WhenRemoveField)
             {
-                return "[All Turns] When one of your Digimon with [Gammamon] in its text, other than [Bokomon], would leave the battle area other than by one of your effects, by deleting this Digimon, prevent it from leaving.";
-            }
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Delete this Digimon to prevent 1 other Digimon from leaving Battle Area", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, true, EffectDiscription());
+                activateClass.SetHashString("Substitute_LM01_019");
+                cardEffects.Add(activateClass);
 
-            bool PermanentCondition(Permanent permanent)
-            {
-                if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
+                string EffectDiscription()
                 {
-                    if (permanent.TopCard.HasText("Gammamon") && !permanent.TopCard.CardNames.Contains("Bokomon"))
-                    {
-                        return true;
-                    }
+                    return "[All Turns] When one of your Digimon with [Gammamon] in its text, other than [Bokomon], would leave the battle area other than by one of your effects, by deleting this Digimon, prevent it from leaving.";
                 }
 
-                return false;
-            }
-
-            bool CanUseCondition(Hashtable hashtable)
-            {
-                if (CardEffectCommons.IsExistOnBattleArea(card))
+                bool PermanentCondition(Permanent permanent)
                 {
-                    if (CardEffectCommons.CanTriggerWhenPermanentRemoveField(hashtable, PermanentCondition))
+                    if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
                     {
-                        if (!CardEffectCommons.IsByEffect(hashtable, cardEffect => CardEffectCommons.IsOwnerEffect(cardEffect, card)))
+                        if (permanent.TopCard.HasText("Gammamon") && !permanent.TopCard.CardNames.Contains("Bokomon"))
                         {
                             return true;
                         }
                     }
-                }
 
-                return false;
-            }
+                    return false;
+                }
 
-            bool CanActivateCondition(Hashtable hashtable)
-            {
-                if (CardEffectCommons.IsExistOnBattleArea(card))
+                bool CanUseCondition(Hashtable hashtable)
                 {
-                    return true;
-                }
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.CanTriggerWhenPermanentRemoveField(hashtable, PermanentCondition))
+                        {
+                            if (!CardEffectCommons.IsByEffect(hashtable, cardEffect => CardEffectCommons.IsOwnerEffect(cardEffect, card)))
+                            {
+                                return true;
+                            }
+                        }
+                    }
 
-                return false;
-            }
+                    return false;
+                }
 
-            IEnumerator ActivateCoroutine(Hashtable _hashtable)
-            {
-                if (CardEffectCommons.IsExistOnBattleArea(card))
+                bool CanActivateCondition(Hashtable hashtable)
                 {
-                    Permanent thisCardPermanent = card.PermanentOfThisCard();
-
-                    if (CardEffectCommons.HasMatchConditionPermanent(PermanentCondition))
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
                     {
-                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(PermanentCondition));
+                        return true;
+                    }
 
-                        SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+                    return false;
+                }
 
-                        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);
+                IEnumerator ActivateCoroutine(Hashtable _hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        Permanent thisCardPermanent = card.PermanentOfThisCard();
 
-                        selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to delete.", "The opponent is selecting 1 Digimon to delete.");
+                        if (CardEffectCommons.HasMatchConditionPermanent(PermanentCondition))
+                        {
+                            int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(PermanentCondition));
 
-                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                            SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
 
-                        IEnumerator SelectPermanentCoroutine(Permanent permanent)
-                        {
-                            yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.DeletePeremanentAndProcessAccordingToResult(
-                                targetPermanents: new List<Permanent>() { thisCardPermanent },
-                                activateClass: activateClass,
-                                successProcess: permanents => SuccessProcess(),
-                                failureProcess: null));
+                            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);
 
-                            IEnumerator SuccessProcess()
-                            {
-                                permanent.willBeRemoveField = false;
+                            selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to delete.", "The opponent is selecting 1 Digimon to delete.");
 
-                                permanent.HideDeleteEffect();
-                                permanent.HideHandBounceEffect();
-                                permanent.HideDeckBounceEffect();
-                                permanent.HideWillRemoveFieldEffect();
+                            yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
 
-                                yield return null;
+                            IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                            {
+                                yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.DeletePeremanentAndProcessAccordingToResult(
+                                    targetPermanents: new List<Permanent>() { thisCardPermanent },
+                                    activateClass: activateClass,
+                                    successProcess: permanents => SuccessProcess(),
+                                    failureProcess: null));
+
+                                IEnumerator SuccessProcess()
+                                {
+                                    permanent.willBeRemoveField = false;
+
+                                    permanent.HideDeleteEffect();
+                                    permanent.HideHandBounceEffect();
+                                    permanent.HideDeckBounceEffect();
+                                    permanent.HideWillRemoveFieldEffect();
+
+                                    yield return null;
+                                }
                             }
                         }
                     }
                 }
             }
-        }
-        #endregion
+            #endregion
 
-        return cardEffects;
+            return cardEffects;
+        }
     }
-}
+}