Pārlūkot izejas kodu

Merge pull request #112 from DCGO2/BT21-P

BT21 -  Promos
Michael8818 1 gadu atpakaļ
vecāks
revīzija
4f36ed11ed

+ 272 - 0
Assets/CardEffect/P/Black/P_183.cs

@@ -0,0 +1,272 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+//Gaiomon
+namespace DCGO.CardEffects.P
+{
+    public class P_183 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            #region Static Effects
+
+            #region Card Name
+
+            if (timing == EffectTiming.None)
+            {
+                ChangeCardNamesClass changeCardNamesClass = new ChangeCardNamesClass();
+                changeCardNamesClass.SetUpICardEffect("Also treated as having [Greymon]", hashtable => true, card);
+                changeCardNamesClass.SetUpChangeCardNamesClass(changeCardNames: changeCardNames);
+                cardEffects.Add(changeCardNamesClass);
+
+                List<string> changeCardNames(CardSource cardSource, List<string> CardNames)
+                {
+                    if (cardSource == card)
+                    {
+                        CardNames.Add("Greymon");
+                    }
+
+                    return CardNames;
+                }
+            }
+
+            #endregion
+
+            #region Blocker
+
+            if (timing == EffectTiming.None)
+            {
+                cardEffects.Add(CardEffectFactory.BlockerSelfStaticEffect(
+                    isInheritedEffect: false,
+                    card: card,
+                    condition: null));
+            }
+
+            #endregion
+
+            #region Reboot
+
+            if (timing == EffectTiming.None)
+            {
+                cardEffects.Add(CardEffectFactory.RebootSelfStaticEffect(isInheritedEffect: false, card: card, condition: null));
+            }
+
+            #endregion
+
+            #endregion
+
+            #region When Digivolving
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("1 digimon gains attack on Start of your main phase", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[When Digivolving] Until your opponent's turn ends, 1 of your opponent's Digimon gains '[Start of Your Main Phase] This Digimon attacks.' Then, this Digimon may attack.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
+                    {
+                        if (CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card))
+                        {
+                            return true;
+                        }
+                    }
+                    return false;
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
+                }
+
+                bool CanSelectPermanentCondition(Permanent permanent)
+                {
+                    return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card);
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                    {
+                        Permanent selectedPermanent = null;
+                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
+                        SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectPermanentCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: maxCount,
+                            canNoSelect: false,
+                            canEndNotMax: false,
+                            selectPermanentCoroutine: SelectPermanentCoroutine,
+                            afterSelectPermanentCoroutine: null,
+                            mode: SelectPermanentEffect.Mode.Custom,
+                            cardEffect: activateClass);
+
+                        selectPermanentEffect.SetUpCustomMessage("Selcect 1 Digimon that will get effects.", "The opponent is selecting 1 Digimon that will get effects.");
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                        IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                        {
+                            selectedPermanent = permanent;
+                            yield return null;
+                        }
+
+                        if (selectedPermanent != null)
+                        {
+                            ActivateClass activateClass1 = new ActivateClass();
+                            activateClass1.SetUpICardEffect("[Start of Your Main Phase] This Digimon attacks.", CanUseCondition1, selectedPermanent.TopCard);
+                            activateClass1.SetUpActivateClass(CanActivateCondition1, ActivateCoroutine1, -1, false, EffectDiscription1());
+                            activateClass1.SetEffectSourcePermanent(selectedPermanent);
+                            selectedPermanent.UntilOwnerTurnEndEffects.Add(GetCardEffect);
+
+                            if (!selectedPermanent.TopCard.CanNotBeAffected(activateClass))
+                            {
+                                yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().CreateDebuffEffect(selectedPermanent));
+                            }
+
+                            string EffectDiscription1()
+                            {
+                                return "[Start of Your Main Phase] This Digimon attacks.";
+                            }
+
+                            bool CanUseCondition1(Hashtable hashtable1)
+                            {
+                                if (CardEffectCommons.IsPermanentExistsOnBattleArea(selectedPermanent))
+                                {
+                                    if (selectedPermanent.TopCard.Owner.GetBattleAreaDigimons().Contains(selectedPermanent))
+                                    {
+                                        if (GManager.instance.turnStateMachine.gameContext.TurnPlayer == selectedPermanent.TopCard.Owner)
+                                        {
+                                            return true;
+                                        }
+                                    }
+                                }
+
+                                return false;
+                            }
+
+                            bool CanActivateCondition1(Hashtable hashtable1)
+                            {
+                                if (CardEffectCommons.IsPermanentExistsOnBattleArea(selectedPermanent))
+                                {
+                                    if (!selectedPermanent.TopCard.CanNotBeAffected(activateClass))
+                                    {
+                                        if (selectedPermanent.CanAttack(activateClass1))
+                                        {
+                                            return true;
+                                        }
+                                    }
+                                }
+
+                                return false;
+                            }
+
+                            ICardEffect GetCardEffect(EffectTiming _timing)
+                            {
+                                if (_timing == EffectTiming.OnStartMainPhase)
+                                {
+                                    return activateClass1;
+                                }
+
+                                return null;
+                            }
+                            IEnumerator ActivateCoroutine1(Hashtable _hashtable1)
+                            {
+                                if (CardEffectCommons.IsPermanentExistsOnBattleArea(selectedPermanent))
+                                {
+                                    if (selectedPermanent.CanAttack(activateClass1))
+                                    {
+                                        SelectAttackEffect selectAttackEffect = GManager.instance.GetComponent<SelectAttackEffect>();
+
+                                        selectAttackEffect.SetUp(
+                                            attacker: selectedPermanent,
+                                            canAttackPlayerCondition: () => true,
+                                            defenderCondition: (permanent) => true,
+                                            cardEffect: activateClass1);
+
+                                        selectAttackEffect.SetCanNotSelectNotAttack();
+
+                                        yield return ContinuousController.instance.StartCoroutine(selectAttackEffect.Activate());
+                                    }
+                                }
+                            }
+                        }
+                    }
+
+                    var permanent = card.PermanentOfThisCard();
+                    if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card) && permanent.CanAttack(activateClass))
+                    {
+                        SelectAttackEffect selectAttackEffect = GManager.instance.GetComponent<SelectAttackEffect>();
+                        selectAttackEffect.SetUp(
+                            attacker: permanent,
+                            canAttackPlayerCondition: () => true,
+                            defenderCondition: (permanent) => true,
+                            cardEffect: activateClass);
+                        yield return ContinuousController.instance.StartCoroutine(selectAttackEffect.Activate());
+                    }
+                }
+            }
+
+            #endregion
+
+            #region All Turns OPT
+
+            if (timing == EffectTiming.OnAttackTargetChanged)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Trash top secuity card", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDiscription());
+                activateClass.SetHashString("trashsec_P_183");
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[All Turns] [Once Per Turn] When attack targets change, trash your opponent's top security card.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
+                    {
+                        if (CardEffectCommons.CanTriggerOnPermanentAttackTargetSwitch(hashtable, permanent => true))
+                        {
+                            return true;
+                        }
+                    }
+                    return false;
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    yield return ContinuousController.instance.StartCoroutine(new IDestroySecurity(
+                    player: card.Owner.Enemy,
+                    destroySecurityCount: 1,
+                    cardEffect: activateClass,
+                    fromTop: true).DestroySecurity());
+                }
+            }
+
+            #endregion
+
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/P/Black/P_183.cs.meta

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

+ 129 - 0
Assets/CardEffect/P/Black/P_184.cs

@@ -0,0 +1,129 @@
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+
+//Dorugoramon
+namespace DCGO.CardEffects.P
+{
+    public class P_184 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            #region Static Effects
+
+            #region Alternative Digivolution Condition
+
+            if (timing == EffectTiming.None)
+            {
+                bool PermanentCondition(Permanent targetPermanent)
+                {
+                    if (targetPermanent.TopCard.IsLevel5)
+                    {
+                        if (targetPermanent.TopCard.ContainsCardName("DoruGreymon") || targetPermanent.TopCard.EqualsTraits("SoC"))
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(
+                    permanentCondition: PermanentCondition,
+                    digivolutionCost: 3,
+                    ignoreDigivolutionRequirement: false,
+                    card: card,
+                    condition: null)
+                );
+            }
+
+            #endregion
+
+            #region Sec +1
+
+            if (timing == EffectTiming.None)
+            {
+                cardEffects.Add(CardEffectFactory.ChangeSelfSAttackStaticEffect(
+                changeValue: 1,
+                isInheritedEffect: false,
+                card: card,
+                condition: null));
+            }
+
+            #endregion
+
+            #region Collision
+
+            if (timing == EffectTiming.OnCounterTiming)
+            {
+                cardEffects.Add(CardEffectFactory.CollisionSelfStaticEffect(false, card, null));
+            }
+
+            #endregion
+
+            #endregion
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Gain 3k DP", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[When Digivolving] This Digimon gets +3000 DP until your opponent's turn ends. Then, if [Kosuke Kisakata] is in this Digimon's digivolution cards, all of your Digimon with the [SoC] trait unsuspend.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
+                    {
+                        if (CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card))
+                        {
+                            return true;
+                        }
+                    }
+                    return false;
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
+                }
+
+                bool CanTargetPermanentCondition(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
+                    {
+                        if (permanent.TopCard.EqualsTraits("Soc"))
+                        {
+                            if (CardEffectCommons.CanUnsuspend(permanent))
+                            {
+                                return true;
+                            }
+                        }
+                    }
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ChangeDigimonDP(targetPermanent: card.PermanentOfThisCard(), changeValue: 3000, effectDuration: EffectDuration.UntilOpponentTurnEnd, activateClass: activateClass));
+                    if (card.PermanentOfThisCard().cardSources.Find(x => x.EqualsCardName("Kosuke Kisakata")) != null)
+                    {
+                        var permanents = card.Owner.GetBattleAreaDigimons().Filter(x => CanTargetPermanentCondition(x)).ToList();
+                        if (permanents.Any())
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(new IUnsuspendPermanents(permanents, activateClass).Unsuspend());
+                        }
+                    }
+                }
+            }
+
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/P/Black/P_184.cs.meta

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

+ 229 - 0
Assets/CardEffect/P/Green/P_185.cs

@@ -0,0 +1,229 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+
+//EmperorGreymon
+namespace DCGO.CardEffects.P
+{
+    public class P_185 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            #region Static Effects
+
+            #region Alternative Digivolution Condition
+
+            if (timing == EffectTiming.None)
+            {
+                bool PermanentCondition(Permanent targetPermanent)
+                {
+                    if (targetPermanent.TopCard.IsTamer)
+                    {
+                        if (targetPermanent.TopCard.EqualsCardName("Takuya Kanbara"))
+                        {
+                            if (targetPermanent.cardSources.Filter(x => x.EqualsTraits("Hybrid")).Count >= 5)
+                            {
+                                return true;
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(
+                    permanentCondition: PermanentCondition,
+                    digivolutionCost: 3,
+                    ignoreDigivolutionRequirement: false,
+                    card: card,
+                    condition: null)
+                );
+            }
+
+            #endregion
+
+            #region Blocker
+
+            if (timing == EffectTiming.None)
+            {
+                cardEffects.Add(CardEffectFactory.BlockerSelfStaticEffect(
+                    isInheritedEffect: false,
+                    card: card,
+                    condition: null));
+            }
+
+            #endregion
+
+            #endregion
+
+            #region When Digivolving
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Delete 1 digimon", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[When Digivolving] Delete 1 of your opponent's Digimon with as much or less DP as this Digimon.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
+                    {
+                        if (CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card))
+                        {
+                            return true;
+                        }
+                    }
+                    return false;
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
+                    {
+                        if (CardEffectCommons.HasMatchConditionOpponentsPermanent(card, CanSelectPermanentCondition))
+                        {
+                            return true;
+                        }
+                    }
+                    return false;
+                }
+
+                bool CanSelectPermanentCondition(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
+                    {
+                        if (permanent.DP <= card.PermanentOfThisCard().DP)
+                        {
+                            return true;
+                        }
+                    }
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.HasMatchConditionOpponentsPermanent(card, CanSelectPermanentCondition))
+                    {
+                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
+                        SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectPermanentCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: maxCount,
+                            canNoSelect: false,
+                            canEndNotMax: false,
+                            selectPermanentCoroutine: null,
+                            afterSelectPermanentCoroutine: null,
+                            mode: SelectPermanentEffect.Mode.Destroy,
+                            cardEffect: activateClass);
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                    }
+                }
+            }
+
+            #endregion
+
+            #region All Turns
+
+            if (timing == EffectTiming.None)
+            {
+                List<CardSource> cards = card.PermanentOfThisCard().cardSources;
+                var colourCount = Combinations.GetDifferenetColorCardCount(cards);
+                var newDP = colourCount * 1000;
+
+                bool Condition()
+                {
+                    return CardEffectCommons.IsExistOnBattleArea(card);
+                }
+
+                bool PermanentCondition(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(permanent, card))
+                    {
+                        if (permanent == card.PermanentOfThisCard())
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                cardEffects.Add(CardEffectFactory.ChangeDPStaticEffect(
+                permanentCondition: PermanentCondition,
+                changeValue: newDP,
+                isInheritedEffect: false,
+                card: card,
+                condition: Condition,
+                effectName: EffectDiscription));
+                string EffectDiscription()
+                {
+                    return "[All Turns] This Digimon gets +1000 DP for each color in its digivolution cards.";
+                }
+            }
+
+            #endregion
+
+            #region End of your turn OPT
+
+            if (timing == EffectTiming.OnEndTurn)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDiscription());
+                activateClass.SetHashString("Unsuspend_P_185");
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[End of Your Turn] [Once Per Turn] This Digimon unsuspends.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
+                    {
+                        if (CardEffectCommons.IsOwnerTurn(card))
+                        {
+                            return true;
+                        }
+                    }
+                    return false;
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
+                    {
+                        if (CardEffectCommons.CanUnsuspend(card.PermanentOfThisCard()))
+                        {
+                            return true;
+                        }
+                    }
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    yield return ContinuousController.instance.StartCoroutine(new IUnsuspendPermanents(new List<Permanent> { card.PermanentOfThisCard() }, activateClass).Unsuspend());
+                }
+            }
+
+            #endregion
+
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/P/Green/P_185.cs.meta

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

+ 507 - 0
Assets/CardEffect/P/Purple/P_187.cs

@@ -0,0 +1,507 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+// Mastemon
+namespace DCGO.CardEffects.P
+{
+    public class P_187 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            #region DNA
+
+            if (timing == EffectTiming.None)
+            {
+                AddJogressConditionClass addJogressConditionClass = new AddJogressConditionClass();
+                addJogressConditionClass.SetUpICardEffect($"DNA Digivolution", hashtable => true, card);
+                addJogressConditionClass.SetUpAddJogressConditionClass(getJogressCondition: GetJogress);
+                addJogressConditionClass.SetNotShowUI(true);
+                cardEffects.Add(addJogressConditionClass);
+
+                JogressCondition GetJogress(CardSource cardSource)
+                {
+                    if (cardSource == card)
+                    {
+                        bool PermanentCondition1(Permanent permanent)
+                        {
+                            if (permanent != null)
+                            {
+                                if (permanent.TopCard != null)
+                                {
+                                    if (permanent.TopCard.Owner == card.Owner)
+                                    {
+                                        if (permanent.IsDigimon)
+                                        {
+                                            if (permanent.TopCard.Owner.GetBattleAreaPermanents().Contains(permanent))
+                                            {
+                                                if (permanent.TopCard.CardColors.Contains(CardColor.Yellow))
+                                                {
+                                                    if (permanent.Levels_ForJogress(card).Contains(5))
+                                                    {
+                                                        return true;
+                                                    }
+                                                }
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+
+                            return false;
+                        }
+
+                        bool PermanentCondition2(Permanent permanent)
+                        {
+                            if (permanent != null)
+                            {
+                                if (permanent.TopCard != null)
+                                {
+                                    if (permanent.TopCard.Owner == card.Owner)
+                                    {
+                                        if (permanent.IsDigimon)
+                                        {
+                                            if (permanent.TopCard.Owner.GetBattleAreaPermanents().Contains(permanent))
+                                            {
+                                                if (permanent.TopCard.CardColors.Contains(CardColor.Purple))
+                                                {
+                                                    if (permanent.Levels_ForJogress(card).Contains(5))
+                                                    {
+                                                        return true;
+                                                    }
+                                                }
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+
+                            return false;
+                        }
+
+                        JogressConditionElement[] elements = new JogressConditionElement[]
+                        {
+                            new JogressConditionElement(PermanentCondition2, "a level 5 purple Digimon"),
+                            new JogressConditionElement(PermanentCondition1, "a level 5 yellow Digimon")
+                        };
+
+                        JogressCondition jogressCondition = new JogressCondition(elements, 0);
+                        return jogressCondition;
+                    }
+
+                    return null;
+                }
+            }
+
+            #endregion
+
+            #region When Digivolving
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("<Recovery +1 (Deck)>", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[When Digivolving] <Recovery +1 (Deck)> (Place the top card of your deck on top of your security stack). Then, if DNA digivolving, by placing 1 other Digimon or Tamer as the top or bottom security card, trash your opponent's top security card.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
+                    {
+                        if (CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card))
+                        {
+                            return true;
+                        }
+                    }
+                    return false;
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
+                }
+
+                bool CanSelectPermanentCondition(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnBattleArea(permanent))
+                    {
+                        if (permanent.IsTamer || permanent.IsTamer)
+                        {
+                            return true;
+                        }
+                    }
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (card.Owner.CanAddSecurity(activateClass))
+                    {
+                        yield return ContinuousController.instance.StartCoroutine(new IRecovery(card.Owner, 1, activateClass).Recovery());
+                    }
+
+                    if (CardEffectCommons.IsJogress(hashtable))
+                    {
+                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                        {
+                            Permanent selectedPermanent = null;
+                            int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
+                            SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                            selectPermanentEffect.SetUp(
+                                selectPlayer: card.Owner,
+                                canTargetCondition: CanSelectPermanentCondition,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                maxCount: maxCount,
+                                canNoSelect: true,
+                                canEndNotMax: false,
+                                selectPermanentCoroutine: SelectPermanentCoroutine,
+                                afterSelectPermanentCoroutine: null,
+                                mode: SelectPermanentEffect.Mode.Custom,
+                                cardEffect: activateClass);
+
+                            selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to place in security", "The opponent is selecting 1 Digimon place in security.");
+
+                            IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                            {
+                                Permanent selectedPermanent = permanent;
+                                yield return null;
+                            }
+
+                            if (selectedPermanent != null)
+                            {
+                                List<SelectionElement<bool>> selectionElements = new List<SelectionElement<bool>>()
+                                {
+                                    new SelectionElement<bool>(message: $"Security Top", value : true, spriteIndex: 0),
+                                    new SelectionElement<bool>(message: $"Security Bottom", value : false, spriteIndex: 1),
+                                };
+
+                                string selectPlayerMessage = "Choose security position?";
+                                string notSelectPlayerMessage = "The opponent is choosing security position";
+
+                                GManager.instance.userSelectionManager.SetBoolSelection(selectionElements: selectionElements, selectPlayer: card.Owner, selectPlayerMessage: selectPlayerMessage, notSelectPlayerMessage: notSelectPlayerMessage);
+                                yield return ContinuousController.instance.StartCoroutine(GManager.instance.userSelectionManager.WaitForEndSelect());
+                                bool position = GManager.instance.userSelectionManager.SelectedBoolValue;
+
+                                if (selectedPermanent.TopCard.Owner.CanAddSecurity(activateClass))
+                                {
+                                    yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddSecurityCard(selectedPermanent.TopCard, position));
+                                    yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().CreateRecoveryEffect(selectedPermanent.TopCard.Owner));
+                                    yield return ContinuousController.instance.StartCoroutine(new IAddSecurity(selectedPermanent.TopCard.Owner).AddSecurity());
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+
+            #endregion
+
+            #region When Digivolving OPT
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Trash top security to play a digimon", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, true, EffectDiscription());
+                activateClass.SetHashString("PlayDigimon_P_187");
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                    => "[When Digivolving] [Once Per Turn] By trashing your top security card, you may play 1 purple or yellow Digimon card with 6000 DP or less from your hand or trash without paying the cost.";
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
+                    {
+                        if (CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card))
+                        {
+                            return true;
+                        }
+                    }
+                    return false;
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
+                    {
+                        if (CardEffectCommons.HasMatchConditionOwnersHand(card, CanSelectCardCondition) || CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectCardCondition))
+                        {
+                            return true;
+                        }
+                    }
+                    return false;
+                }
+
+                bool CanSelectCardCondition(CardSource cardSource)
+                {
+                    if (cardSource.IsDigimon)
+                    {
+                        if (cardSource.CardColors.Contains(CardColor.Purple) || cardSource.CardColors.Contains(CardColor.Yellow))
+                        {
+                            if (cardSource.CardDP <= 6000)
+                            {
+                                return true;
+                            }
+                        }
+                    }
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    yield return ContinuousController.instance.StartCoroutine(new IDestroySecurity(
+                    player: card.Owner,
+                    destroySecurityCount: 1,
+                    cardEffect: activateClass,
+                    fromTop: true).DestroySecurity());
+
+                    bool canSelectHand = CardEffectCommons.HasMatchConditionOwnersHand(card, CanSelectCardCondition);
+                    bool canSelectTrash = CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectCardCondition);
+                    SelectCardEffect.Root root = SelectCardEffect.Root.None;
+                    if (canSelectHand && !canSelectTrash) root = SelectCardEffect.Root.Hand;
+                    if (!canSelectHand && canSelectTrash) root = SelectCardEffect.Root.Trash;
+                    if (canSelectHand && canSelectTrash)
+                    {
+                        List<SelectionElement<bool>> selectionElements = new List<SelectionElement<bool>>()
+                        {
+                            new SelectionElement<bool>(message: $"From Hand", value : true, spriteIndex: 0),
+                            new SelectionElement<bool>(message: $"From Trash", value : false, spriteIndex: 1),
+                        };
+
+                        string selectPlayerMessage = "Which location do you choose?";
+                        string notSelectPlayerMessage = "The opponent is choosing the location.";
+
+                        GManager.instance.userSelectionManager.SetBoolSelection(selectionElements: selectionElements, selectPlayer: card.Owner, selectPlayerMessage: selectPlayerMessage, notSelectPlayerMessage: notSelectPlayerMessage);
+                        yield return ContinuousController.instance.StartCoroutine(GManager.instance.userSelectionManager.WaitForEndSelect());
+                        root = GManager.instance.userSelectionManager.SelectedBoolValue ? SelectCardEffect.Root.Hand : SelectCardEffect.Root.Trash;
+                    }
+
+                    if (root == SelectCardEffect.Root.Hand || root == SelectCardEffect.Root.Trash)
+                    {
+                        CardSource selectedCard = null;
+                        IEnumerator SelectCardCoroutine(CardSource cardSource)
+                        {
+                            selectedCard = cardSource;
+                            yield return null;
+                        }
+                        if (root == SelectCardEffect.Root.Hand)
+                        {
+                            SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
+
+                            selectHandEffect.SetUp(
+                                selectPlayer: card.Owner,
+                                canTargetCondition: CanSelectCardCondition,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                maxCount: 1,
+                                canNoSelect: true,
+                                canEndNotMax: false,
+                                isShowOpponent: true,
+                                selectCardCoroutine: SelectCardCoroutine,
+                                afterSelectCardCoroutine: null,
+                                mode: SelectHandEffect.Mode.Custom,
+                                cardEffect: activateClass);
+
+                            selectHandEffect.SetUpCustomMessage("Select 1 card to play", "The opponent is selecting 1 card to play");
+
+                            yield return StartCoroutine(selectHandEffect.Activate());
+                        }
+                        else
+                        {
+                            SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+
+                            selectCardEffect.SetUp(
+                                canTargetCondition: CanSelectCardCondition,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                canNoSelect: () => true,
+                                selectCardCoroutine: SelectCardCoroutine,
+                                afterSelectCardCoroutine: null,
+                                message: "Select 1 card to play",
+                                maxCount: 1,
+                                canEndNotMax: false,
+                                isShowOpponent: true,
+                                mode: SelectCardEffect.Mode.Custom,
+                                root: SelectCardEffect.Root.Trash,
+                                customRootCardList: null,
+                                canLookReverseCard: true,
+                                selectPlayer: card.Owner,
+                                cardEffect: activateClass);
+
+                            selectCardEffect.SetUpCustomMessage("Select 1 card to play", "The opponent is selecting 1 card to play");
+
+                            yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
+                        }
+
+                        if (selectedCard != null)
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(cardSources: new List<CardSource>() { selectedCard }, activateClass: activateClass, payCost: false, isTapped: false, root: root, activateETB: true));
+                        }
+                    }
+                }
+            }
+
+            #endregion
+
+            #region When Attacking OPT
+
+            if (timing == EffectTiming.OnAllyAttack)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Trash top security to play a digimon", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, true, EffectDiscription());
+                activateClass.SetHashString("PlayDigimon_P_187");
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                    => "[When Attacking] [Once Per Turn] By trashing your top security card, you may play 1 purple or yellow Digimon card with 6000 DP or less from your hand or trash without paying the cost.";
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
+                    {
+                        if (CardEffectCommons.CanTriggerOnAttack(hashtable, card))
+                        {
+                            return true;
+                        }
+                    }
+                    return false;
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
+                    {
+                        if (CardEffectCommons.HasMatchConditionOwnersHand(card, CanSelectCardCondition) || CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectCardCondition))
+                        {
+                            return true;
+                        }
+                    }
+                    return false;
+                }
+
+                bool CanSelectCardCondition(CardSource cardSource)
+                {
+                    if (cardSource.IsDigimon)
+                    {
+                        if (cardSource.CardColors.Contains(CardColor.Purple) || cardSource.CardColors.Contains(CardColor.Yellow))
+                        {
+                            if (cardSource.CardDP <= 6000)
+                            {
+                                return true;
+                            }
+                        }
+                    }
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    yield return ContinuousController.instance.StartCoroutine(new IDestroySecurity(
+                    player: card.Owner,
+                    destroySecurityCount: 1,
+                    cardEffect: activateClass,
+                    fromTop: true).DestroySecurity());
+
+                    bool canSelectHand = CardEffectCommons.HasMatchConditionOwnersHand(card, CanSelectCardCondition);
+                    bool canSelectTrash = CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectCardCondition);
+                    SelectCardEffect.Root root = SelectCardEffect.Root.None;
+                    if (canSelectHand && !canSelectTrash) root = SelectCardEffect.Root.Hand;
+                    if (!canSelectHand && canSelectTrash) root = SelectCardEffect.Root.Trash;
+                    if (canSelectHand && canSelectTrash)
+                    {
+                        List<SelectionElement<bool>> selectionElements = new List<SelectionElement<bool>>()
+                        {
+                            new SelectionElement<bool>(message: $"From Hand", value : true, spriteIndex: 0),
+                            new SelectionElement<bool>(message: $"From Trash", value : false, spriteIndex: 1),
+                        };
+
+                        string selectPlayerMessage = "Which location do you choose?";
+                        string notSelectPlayerMessage = "The opponent is choosing the location.";
+
+                        GManager.instance.userSelectionManager.SetBoolSelection(selectionElements: selectionElements, selectPlayer: card.Owner, selectPlayerMessage: selectPlayerMessage, notSelectPlayerMessage: notSelectPlayerMessage);
+                        yield return ContinuousController.instance.StartCoroutine(GManager.instance.userSelectionManager.WaitForEndSelect());
+                        root = GManager.instance.userSelectionManager.SelectedBoolValue ? SelectCardEffect.Root.Hand : SelectCardEffect.Root.Trash;
+                    }
+
+                    if (root == SelectCardEffect.Root.Hand || root == SelectCardEffect.Root.Trash)
+                    {
+                        CardSource selectedCard = null;
+                        IEnumerator SelectCardCoroutine(CardSource cardSource)
+                        {
+                            selectedCard = cardSource;
+                            yield return null;
+                        }
+                        if (root == SelectCardEffect.Root.Hand)
+                        {
+                            SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
+
+                            selectHandEffect.SetUp(
+                                selectPlayer: card.Owner,
+                                canTargetCondition: CanSelectCardCondition,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                maxCount: 1,
+                                canNoSelect: true,
+                                canEndNotMax: false,
+                                isShowOpponent: true,
+                                selectCardCoroutine: SelectCardCoroutine,
+                                afterSelectCardCoroutine: null,
+                                mode: SelectHandEffect.Mode.Custom,
+                                cardEffect: activateClass);
+
+                            selectHandEffect.SetUpCustomMessage("Select 1 card to play", "The opponent is selecting 1 card to play");
+
+                            yield return StartCoroutine(selectHandEffect.Activate());
+                        }
+                        else
+                        {
+                            SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+
+                            selectCardEffect.SetUp(
+                                canTargetCondition: CanSelectCardCondition,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                canNoSelect: () => true,
+                                selectCardCoroutine: SelectCardCoroutine,
+                                afterSelectCardCoroutine: null,
+                                message: "Select 1 card to play",
+                                maxCount: 1,
+                                canEndNotMax: false,
+                                isShowOpponent: true,
+                                mode: SelectCardEffect.Mode.Custom,
+                                root: SelectCardEffect.Root.Trash,
+                                customRootCardList: null,
+                                canLookReverseCard: true,
+                                selectPlayer: card.Owner,
+                                cardEffect: activateClass);
+
+                            selectCardEffect.SetUpCustomMessage("Select 1 card to play", "The opponent is selecting 1 card to play");
+
+                            yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
+                        }
+
+                        if (selectedCard != null)
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(cardSources: new List<CardSource>() { selectedCard }, activateClass: activateClass, payCost: false, isTapped: false, root: root, activateETB: true));
+                        }
+                    }
+                }
+            }
+
+            #endregion
+
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/P/Purple/P_187.cs.meta

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

+ 197 - 0
Assets/CardEffect/P/Red/P_182.cs

@@ -0,0 +1,197 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+
+// WarGreymon
+namespace DCGO.CardEffects.P
+{
+    public class P_182 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            #region Static Effects
+
+            #region Alternative Digivolution Condition
+
+            if (timing == EffectTiming.None)
+            {
+                bool PermanentCondition(Permanent targetPermanent)
+                {
+                    if (targetPermanent.TopCard.IsLevel5)
+                    {
+                        if (targetPermanent.TopCard.ContainsCardName("MetalGreymon") || targetPermanent.TopCard.EqualsTraits("ADVENTURE"))
+                        {
+                            return true;
+                        }
+                    }
+                    return false;
+                }
+
+                cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(
+                    permanentCondition: PermanentCondition,
+                    digivolutionCost: 3,
+                    ignoreDigivolutionRequirement: false,
+                    card: card,
+                    condition: null)
+                );
+            }
+
+            #endregion
+
+            #region Sec +1
+
+            if (timing == EffectTiming.None)
+            {
+                cardEffects.Add(CardEffectFactory.ChangeSelfSAttackStaticEffect(
+                changeValue: 1,
+                isInheritedEffect: false,
+                card: card,
+                condition: null));
+            }
+
+            #endregion
+
+            #region Blocker
+
+            if (timing == EffectTiming.None)
+            {
+                cardEffects.Add(CardEffectFactory.BlockerSelfStaticEffect(
+                    isInheritedEffect: false,
+                    card: card,
+                    condition: null));
+            }
+
+            #endregion
+
+            #endregion
+
+            #region When Digivolving
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Delete 1 digimon", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[When Digivolving] Delete 1 of your opponent's Digimon with as much or less DP as this Digimon.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
+                    {
+                        if (CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card))
+                        {
+                            return true;
+                        }
+                    }
+                    return false;
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
+                    {
+                        if (CardEffectCommons.HasMatchConditionOpponentsPermanent(card, CanSelectPermanentCondition))
+                        {
+                            return true;
+                        }
+                    }
+                    return false;
+                }
+
+                bool CanSelectPermanentCondition(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
+                    {
+                        if (permanent.DP <= card.PermanentOfThisCard().DP)
+                        {
+                            return true;
+                        }
+                    }
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.HasMatchConditionOpponentsPermanent(card, CanSelectPermanentCondition))
+                    {
+                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
+                        SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectPermanentCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: maxCount,
+                            canNoSelect: false,
+                            canEndNotMax: false,
+                            selectPermanentCoroutine: null,
+                            afterSelectPermanentCoroutine: null,
+                            mode: SelectPermanentEffect.Mode.Destroy,
+                            cardEffect: activateClass);
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                    }
+                }
+            }
+
+            #endregion
+
+            #region All Turns
+
+            if (timing == EffectTiming.None)
+            {
+                List<CardSource> cards = card.Owner.FieldPermanents
+                        .Where(x => x.IsDigimon && x.IsTamer)
+                        .Select(x => x.TopCard)
+                        .Concat(card.Owner.Enemy.FieldPermanents
+                            .Where(x => x.IsDigimon && x.IsTamer)
+                            .Select(x => x.TopCard))
+                        .ToList();
+                var colourCount = Combinations.GetDifferenetColorCardCount(cards);
+                var newDP = colourCount * 1000;
+
+                bool Condition()
+                {
+                    return CardEffectCommons.IsExistOnBattleArea(card);
+                }
+
+                bool PermanentCondition(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(permanent, card))
+                    {
+                        if (permanent == card.PermanentOfThisCard())
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                cardEffects.Add(CardEffectFactory.ChangeDPStaticEffect(
+                permanentCondition: PermanentCondition,
+                changeValue: newDP,
+                isInheritedEffect: false,
+                card: card,
+                condition: Condition,
+                effectName: EffectDiscription));
+                string EffectDiscription()
+                {
+                    return "[All Turns] This Digimon gets +1000 DP for each color Digimon and Tamers have.";
+                }
+            }
+
+            #endregion
+
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/P/Red/P_182.cs.meta

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

+ 290 - 0
Assets/CardEffect/P/Red/P_186.cs

@@ -0,0 +1,290 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+
+// Gallantmon
+namespace DCGO.CardEffects.P
+{
+    public class P_186 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            #region Static Effects
+
+            #region Alternative Digivolution Condition
+
+            if (timing == EffectTiming.None)
+            {
+                bool PermanentCondition(Permanent targetPermanent)
+                {
+                    if (targetPermanent.TopCard.IsLevel5)
+                    {
+                        if (targetPermanent.TopCard.ContainsCardName("WarGrowlmon"))
+                        {
+                            return true;
+                        }
+                    }
+                    return false;
+                }
+
+                cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(
+                    permanentCondition: PermanentCondition,
+                    digivolutionCost: 3,
+                    ignoreDigivolutionRequirement: false,
+                    card: card,
+                    condition: null)
+                );
+            }
+
+            #endregion
+
+            #region Blocker
+
+            if (timing == EffectTiming.None)
+            {
+                cardEffects.Add(CardEffectFactory.BlockerSelfStaticEffect(
+                    isInheritedEffect: false,
+                    card: card,
+                    condition: null));
+            }
+
+            #endregion
+
+            #region Rush
+
+            if (timing == EffectTiming.None)
+            {
+                cardEffects.Add(CardEffectFactory.RushSelfStaticEffect(isInheritedEffect: false, card: card, condition: null));
+            }
+
+            #endregion
+
+            #endregion
+
+            #region Play Cost Reduction
+
+            if (timing == EffectTiming.None)
+            {
+                int count()
+                {
+                    return 2 * ((card.Owner.TrashCards.Count + card.Owner.Enemy.TrashCards.Count) / 5);
+                }
+
+                ChangeCostClass changeCostClass = new ChangeCostClass();
+                changeCostClass.SetUpICardEffect($"Play Cost -", CanUseCondition, card);
+                changeCostClass.SetUpChangeCostClass(changeCostFunc: ChangeCost, cardSourceCondition: CardSourceCondition, rootCondition: RootCondition, isUpDown: isUpDown, isCheckAvailability: () => false, isChangePayingCost: () => true);
+                cardEffects.Add(changeCostClass);
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if (card.Owner.HandCards.Contains(card))
+                    {
+                        if (count() >= 1)
+                        {
+                            if (CardEffectCommons.HasMatchConditionPermanent(PermanentsCondition))
+                            {
+                                changeCostClass.SetEffectName($"Play Cost -{count()}");
+
+                                return true;
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                int ChangeCost(CardSource cardSource, int Cost, SelectCardEffect.Root root, List<Permanent> targetPermanents)
+                {
+                    if (CardSourceCondition(cardSource))
+                    {
+                        if (RootCondition(root))
+                        {
+                            if (targetPermanents.Select(x => PermanentsCondition(x)) != null)
+                            {
+                                Cost -= count();
+                            }
+                        }
+                    }
+
+                    return Cost;
+                }
+
+                bool PermanentsCondition(Permanent Permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnBattleAreaDigimon(Permanent))
+                    {
+                        if (Permanent.DP >= 13000)
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CardSourceCondition(CardSource cardSource)
+                {
+                    return cardSource == card;
+                }
+
+                bool RootCondition(SelectCardEffect.Root root)
+                {
+                    if (root == SelectCardEffect.Root.Hand)
+                    {
+                        return true;
+                    }
+
+                    return false;
+                }
+
+                bool isUpDown()
+                {
+                    return true;
+                }
+            }
+
+            #endregion
+
+            #region Shared OP/WD
+
+            IEnumerator SharedActivateCoroutine(Hashtable hashtable, ActivateClass activateClass)
+            {
+                bool PermanentCondition(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnBattleAreaDigimon(permanent))
+                    {
+                        if (permanent.DP >= 13000)
+                        {
+                            return true;
+                        }
+                    }
+                    return false;
+                }
+
+                Permanent permanent = null;
+                bool permanentDeleted = false;
+
+                int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(PermanentCondition));
+
+                SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                selectPermanentEffect.SetUp(
+                    selectPlayer: card.Owner,
+                    canTargetCondition: PermanentCondition,
+                    canTargetCondition_ByPreSelecetedList: null,
+                    canEndSelectCondition: null,
+                    maxCount: maxCount,
+                    canNoSelect: false,
+                    canEndNotMax: false,
+                    selectPermanentCoroutine: SelectPermanentCoroutine,
+                    afterSelectPermanentCoroutine: null,
+                    mode: SelectPermanentEffect.Mode.Custom,
+                    cardEffect: activateClass);
+
+                selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to delete", "The opponent is selecting 1 Digimon to delete.");
+
+                yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                {
+                    Permanent selectedPermanent = permanent;
+                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.TrashDigivolutionCardsFromTopOrBottom(targetPermanent: selectedPermanent, trashCount: 4, isFromTop: false, activateClass: activateClass));
+                }
+
+                if (permanent != null)
+                {
+                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.DeletePeremanentAndProcessAccordingToResult(targetPermanents: new List<Permanent>() { permanent }, activateClass: activateClass, successProcess: permanents => SuccessProcess(), failureProcess: null));
+
+                    IEnumerator SuccessProcess()
+                    {
+                        permanentDeleted = true;
+                        yield return null;
+                    }
+                }
+
+                if (permanent == null || !permanentDeleted)
+                {
+                    if (card.Owner.CanAddSecurity(activateClass))
+                    {
+                        yield return ContinuousController.instance.StartCoroutine(new IRecovery(card.Owner, 1, activateClass).Recovery());
+                    }
+                }
+            }
+
+            #endregion
+
+            #region On Play
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Delete a digimon, if you didnt <Recovery +1 (Deck)>", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, hashtable => SharedActivateCoroutine(hashtable, activateClass), -1, false, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[On Play] Delete 1 Digimon with 13000 DP or more. If this effect didn't delete, <Recovery +1 (Deck)> (Place the top card of your deck on top of your security stack).";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
+                    {
+                        if (CardEffectCommons.CanTriggerOnPlay(hashtable, card))
+                        {
+                            return true;
+                        }
+                    }
+                    return false;
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
+                }
+            }
+
+            #endregion
+
+            #region When Digivolving
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Delete a digimon, if you didnt <Recovery +1 (Deck)>", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, hashtable => SharedActivateCoroutine(hashtable, activateClass), -1, false, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[When Digivolving] Delete 1 Digimon with 13000 DP or more. If this effect didn't delete, <Recovery +1 (Deck)> (Place the top card of your deck on top of your security stack).";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
+                    {
+                        if (CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card))
+                        {
+                            return true;
+                        }
+                    }
+                    return false;
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
+                }
+            }
+
+            #endregion
+
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/P/Red/P_186.cs.meta

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

+ 5 - 5
Assets/Scripts/CardEffectCommons/GiveEffect/GiveEffectToPermanentOrPlayer.cs

@@ -1,5 +1,3 @@
-
-
 using System.Collections;
 using System.Collections.Generic;
 using System;
@@ -9,6 +7,7 @@ using UnityEngine;
 public partial class CardEffectCommons
 {
     #region Add effects to 1 target permanent
+
     public static void AddEffectToPermanent(Permanent targetPermanent, EffectDuration effectDuration, CardSource card, ICardEffect cardEffect, EffectTiming timing)
     {
         Func<EffectTiming, ICardEffect> getCardEffect = GetCardEffectByEffectTiming(timing: timing, cardEffect: cardEffect);
@@ -20,7 +19,6 @@ public partial class CardEffectCommons
                 {
                     targetPermanent.UntilOpponentTurnEndEffects.Add(getCardEffect);
                 }
-
                 else
                 {
                     targetPermanent.UntilOwnerTurnEndEffects.Add(getCardEffect);
@@ -32,7 +30,6 @@ public partial class CardEffectCommons
                 {
                     targetPermanent.UntilOwnerTurnEndEffects.Add(getCardEffect);
                 }
-
                 else
                 {
                     targetPermanent.UntilOpponentTurnEndEffects.Add(getCardEffect);
@@ -52,9 +49,11 @@ public partial class CardEffectCommons
                 break;
         }
     }
+
     #endregion
 
     #region Add effects to 1 target player
+
     public static void AddEffectToPlayer(EffectDuration effectDuration, CardSource card, ICardEffect cardEffect, EffectTiming timing, Func<EffectTiming, ICardEffect> getCardEffect = null)
     {
         Player player = card.Owner;
@@ -88,5 +87,6 @@ public partial class CardEffectCommons
                 break;
         }
     }
+
     #endregion
-}
+}

+ 142 - 14
Assets/Scripts/ICardEffect.cs

@@ -9,6 +9,7 @@ using UnityEngine.Events;
 public abstract class ICardEffect
 {
     #region Set up effect
+
     public void SetUpICardEffect(string effectName, Func<Hashtable, bool> canUseCondition, CardSource card)
     {
         SetEffectSourceCard(card);
@@ -42,10 +43,13 @@ public abstract class ICardEffect
             SetIsTamerEffect(card != null && CardEffectCommons.IsExistOnBattleArea(card) && card.PermanentOfThisCard().IsTamer);
         }
     }
+
     #endregion
 
     #region The source card of this effect
+
     CardSource _effectSourceCard = null;
+
     public CardSource EffectSourceCard
     {
         get
@@ -63,27 +67,35 @@ public abstract class ICardEffect
 
         private set { _effectSourceCard = value; }
     }
+
     public void SetEffectSourceCard(CardSource effectSourceCard)
     {
         EffectSourceCard = effectSourceCard;
     }
+
     #endregion
 
     #region The source permanent of this effect
+
     private Permanent _effectSourcePermanent = null;
+
     public Permanent EffectSourcePermanent
     {
         get { return _effectSourcePermanent; }
         private set { _effectSourcePermanent = value; }
     }
+
     public void SetEffectSourcePermanent(Permanent effectSourcePermanent)
     {
         EffectSourcePermanent = effectSourcePermanent;
     }
+
     #endregion
 
     #region Maximum number of times this effect can be used in a turn
+
     int _maxCountPerTurn = 114514;
+
     public int MaxCountPerTurn
     {
         get { return _maxCountPerTurn; }
@@ -95,14 +107,18 @@ public abstract class ICardEffect
             }
         }
     }
+
     public void SetMaxCountPerTurn(int maxCountPerTurn)
     {
         MaxCountPerTurn = maxCountPerTurn;
     }
+
     #endregion
 
     #region Effect name
+
     string _effectName = "";
+
     public string EffectName
     {
         get { return _effectName; }
@@ -112,21 +128,24 @@ public abstract class ICardEffect
             {
                 _effectName = "";
             }
-
             else
             {
                 _effectName = value;
             }
         }
     }
+
     internal void SetEffectName(string effectName)
     {
         EffectName = effectName;
     }
+
     #endregion
 
     #region Effect discription
+
     string _effectDiscription = "";
+
     public string EffectDiscription
     {
         get { return _effectDiscription; }
@@ -136,22 +155,24 @@ public abstract class ICardEffect
             {
                 _effectDiscription = "";
             }
-
             else
             {
                 _effectDiscription = value;
             }
         }
     }
+
     internal void SetEffectDiscription(string effectDiscription)
     {
         EffectDiscription = effectDiscription;
     }
+
     #endregion
 
     #region Hash value for identification of same effects
 
     string _hashString = "";
+
     public string HashString
     {
         get { return _hashString; }
@@ -161,77 +182,96 @@ public abstract class ICardEffect
             {
                 _hashString = "";
             }
-
             else
             {
                 _hashString = value;
             }
         }
     }
+
     public void SetHashString(string hashString)
     {
         HashString = hashString;
     }
+
     #endregion
 
     #region Callbacks when this effect is executed
+
     UnityAction _onProcessCallbuck = null;
+
     public UnityAction OnProcessCallbuck
     {
         get { return _onProcessCallbuck; }
         private set { _onProcessCallbuck = value; }
     }
+
     public void SetOnProcessCallbuck(UnityAction onProcessCallbuck)
     {
         OnProcessCallbuck = onProcessCallbuck;
     }
+
     #endregion
 
     #region Effect giving this effect
+
     ICardEffect _rootCardEffect = null;
+
     public ICardEffect RootCardEffect
     {
         get { return _rootCardEffect; }
         private set { _rootCardEffect = value; }
     }
+
     public void SetRootCardEffect(ICardEffect rootCardEffect)
     {
         RootCardEffect = rootCardEffect;
     }
+
     #endregion
 
     #region Determine whether this effect can be used
 
     #region Condition for which this triggering effect triggers, this static effect applies or this declarative effect can be declared
+
     Func<Hashtable, bool> _canUseCondition = null;
+
     public Func<Hashtable, bool> CanUseCondition
     {
         get { return _canUseCondition; }
         private set { _canUseCondition = value; }
     }
+
     public void SetCanUseCondition(Func<Hashtable, bool> canUseCondition)
     {
         CanUseCondition = canUseCondition;
     }
+
     #endregion
 
     #region Condition for which this triggering effect activates
+
     Func<Hashtable, bool> _canActivateCondition = null;
+
     public Func<Hashtable, bool> CanActivateCondition
     {
         get { return _canActivateCondition; }
         private set { _canActivateCondition = value; }
     }
+
     public void SetCanActivateCondition(Func<Hashtable, bool> canActivateCondition)
     {
         CanActivateCondition = canActivateCondition;
     }
+
     #endregion
 
     #region Whether this triggering effect triggers
+
     public bool CanTrigger(Hashtable hashtable)
     {
         #region Effects not available before the start of the game
+
         if (GManager.instance != null)
         {
             if (GManager.instance.turnStateMachine != null)
@@ -245,37 +285,47 @@ public abstract class ICardEffect
                 }
             }
         }
+
         #endregion
 
         #region Determination of availability for each effect
+
         if (CanUseCondition == null || !CanUseCondition(hashtable))
         {
             return false;
         }
+
         #endregion
 
         return true;
     }
+
     #endregion
 
     #region Whether this triggering effect activates
+
     public bool CanActivate(Hashtable hashtable)
     {
         #region Effect availability determined by the maximum number of times it can be used in a turn
+
         if (EffectSourceCard.cEntity_EffectController.isOverMaxCountPerTurn(this, MaxCountPerTurn))
         {
             return false;
         }
+
         #endregion
 
         #region Determination of availability for each effect
+
         if (CanActivateCondition != null && !CanActivateCondition(hashtable))
         {
             return false;
         }
+
         #endregion
-       
+
         #region Determination of availability for Inheritated/Linked Effect
+
         if (this is ActivateICardEffect)
         {
             if (EffectSourceCard != null)
@@ -303,16 +353,20 @@ public abstract class ICardEffect
                 }
             }
         }
+
         #endregion
 
         #region Determination of availability due to be disabled
+
         if (IsDisabled)
         {
             return false;
         }
+
         #endregion
 
         #region Determination whether the permanent is same as when triggered
+
         if (IsInheritedEffect || IsLinkedEffect)
         {
             if (this is ActivateICardEffect)
@@ -336,13 +390,16 @@ public abstract class ICardEffect
                 }
             }
         }
+
         #endregion
 
         return true;
     }
+
     #endregion
 
     #region Whether this static effect applies , or this declarative effect can be declared
+
     public bool CanUse(Hashtable hashtable)
     {
         if (!CanTrigger(hashtable) || !CanActivate(hashtable))
@@ -352,6 +409,7 @@ public abstract class ICardEffect
 
         return true;
     }
+
     #endregion
 
     #endregion
@@ -359,160 +417,207 @@ public abstract class ICardEffect
     #region Changable bool properties
 
     #region Whether this effect is an optional effect
+
     bool _isOptional = false;
+
     public bool IsOptional
     {
         get { return _isOptional; }
         private set { _isOptional = value; }
     }
+
     public void SetIsOptional(bool isOptional)
     {
         IsOptional = isOptional;
     }
+
     #endregion
 
     #region Whether to use this optional effect
+
     bool _useOptional = false;
+
     public bool UseOptional
     {
         get { return _useOptional; }
         private set { _useOptional = value; }
     }
+
     public void SetUseOptional(bool useOptional)
     {
         UseOptional = useOptional;
     }
+
     #endregion
 
     #region Whether this effect is a declarative effect
+
     bool _isDeclarative = false;
+
     public bool IsDeclarative
     {
         get { return _isDeclarative; }
         private set { _isDeclarative = value; }
     }
+
     public void SetIsDeclarative(bool isDeclarative)
     {
         IsDeclarative = isDeclarative;
     }
+
     #endregion
 
     #region Whether this effect is an Inherited Effect
+
     bool _isInheritedEffect = false;
+
     public bool IsInheritedEffect
     {
         get { return _isInheritedEffect; }
         private set { _isInheritedEffect = value; }
     }
+
     public void SetIsInheritedEffect(bool isInheritatedEffect)
     {
         IsInheritedEffect = isInheritatedEffect;
     }
+
     #endregion
 
     #region Whether this effect is an Linked Effect
+
     bool _isLinkededEffect = false;
+
     public bool IsLinkedEffect
     {
         get { return _isLinkededEffect; }
         private set { _isLinkededEffect = value; }
     }
+
     public void SetIsLinkedEffect(bool isLinkededEffect)
     {
         IsLinkedEffect = isLinkededEffect;
     }
+
     #endregion
 
     #region Whether this effect is an Security Effect
+
     bool _isSecurityEffect = false;
+
     public bool IsSecurityEffect
     {
         get { return _isSecurityEffect; }
         private set { _isSecurityEffect = value; }
     }
+
     public void SetIsSecurityEffect(bool isSecurityEffect)
     {
         IsSecurityEffect = isSecurityEffect;
     }
+
     #endregion
 
     #region Whether this effect is an Counter Effect
+
     bool _isCounterEffect = false;
+
     public bool IsCounterEffect
     {
         get { return _isCounterEffect; }
         private set { _isCounterEffect = value; }
     }
+
     public void SetIsCounterEffect(bool isCounterEffect)
     {
         IsCounterEffect = isCounterEffect;
     }
+
     #endregion
 
     #region Whether this effect is Digimon's effect
+
     bool _isDigimonEffect = false;
+
     public bool IsDigimonEffect
     {
         get { return _isDigimonEffect; }
         private set { _isDigimonEffect = value; }
     }
+
     public void SetIsDigimonEffect(bool isDigimonEffect)
     {
         IsDigimonEffect = isDigimonEffect;
     }
+
     #endregion
 
     #region Whether this effect is Tamer's effect
+
     bool _isTamerEffect = false;
+
     public bool IsTamerEffect
     {
         get { return _isTamerEffect; }
         private set { _isTamerEffect = value; }
     }
+
     public void SetIsTamerEffect(bool isTamerEffect)
     {
         IsTamerEffect = isTamerEffect;
     }
+
     #endregion
 
     #region How many times this effect can activate per chain
+
     int _chainActivations = -1;
+
     public int ChainActivations
     {
         get { return _chainActivations; }
         private set { _chainActivations = value; }
     }
+
     public void SetChainActivationCount(int chainActivations)
     {
         ChainActivations = chainActivations;
     }
-    #endregion
 
+    #endregion
 
     #region Whether this effect is carried out in the background
+
     bool _isBackgroundProcess = false;
+
     public bool IsBackgroundProcess
     {
         get { return _isBackgroundProcess; }
         private set { _isBackgroundProcess = value; }
     }
+
     public void SetIsBackgroundProcess(bool isBackgroundProcess)
     {
         IsBackgroundProcess = isBackgroundProcess;
     }
+
     #endregion
 
     #region Whether this effect should be displayed in the UI
+
     bool _isNotShowUI = false;
+
     public bool IsNotShowUI
     {
         get { return _isNotShowUI; }
         private set { _isNotShowUI = value; }
     }
+
     public void SetNotShowUI(bool isNotShowUI)
     {
         IsNotShowUI = isNotShowUI;
     }
+
     #endregion
 
     #endregion
@@ -520,6 +625,7 @@ public abstract class ICardEffect
     #region Read only bool properties
 
     #region Whether this effect is disabled
+
     public bool IsDisabled
     {
         get
@@ -527,9 +633,11 @@ public abstract class ICardEffect
             return CheckEffectDisabledClass.isDisabled(this);
         }
     }
+
     #endregion
 
     #region Whether this effect is [On Play] effect
+
     public bool IsOnPlay
     {
         get
@@ -553,9 +661,11 @@ public abstract class ICardEffect
             return false;
         }
     }
+
     #endregion
 
     #region Whether this effect is [When Digivolving] effect
+
     public bool IsWhenDigivolving
     {
         get
@@ -579,9 +689,11 @@ public abstract class ICardEffect
             return false;
         }
     }
+
     #endregion
 
     #region Whether this effect is [On Deletion] effect
+
     public bool IsOnDeletion
     {
         get
@@ -607,9 +719,11 @@ public abstract class ICardEffect
             return false;
         }
     }
+
     #endregion
 
     #region Whether this effect is [On Attack] effect
+
     public bool IsOnAttack
     {
         get
@@ -633,11 +747,13 @@ public abstract class ICardEffect
             return false;
         }
     }
+
     #endregion
 
     #endregion
 
     #region Whether the target effect is the same as this effect
+
     public bool IsSameEffect(ICardEffect cardEffect)
     {
         if (cardEffect != null)
@@ -712,10 +828,12 @@ public abstract class ICardEffect
 
         return false;
     }
+
     #endregion
 }
 
 #region Calculation order
+
 public enum CalculateOrder
 {
     UpValue,
@@ -724,9 +842,11 @@ public enum CalculateOrder
     UpDownValue,
     DownToConstant,
 }
+
 #endregion
 
 #region Effect Duration
+
 public enum EffectDuration
 {
     UntilEachTurnEnd,
@@ -738,9 +858,11 @@ public enum EffectDuration
     UntilCalculateFixedCost,
     UntilNextUntap,
 }
+
 #endregion
 
 #region Timing of effect triggers
+
 public enum EffectTiming
 {
     None,
@@ -799,9 +921,11 @@ public enum EffectTiming
     WhenLinked,
     WhenTopCardTrashed
 }
+
 #endregion
 
 #region card effect that processes
+
 public interface ActivateICardEffect
 {
     IEnumerator Activate(Hashtable hash);
@@ -813,6 +937,7 @@ public interface ActivateICardEffect
 public static class ActivateICardEffectExtensionClass
 {
     #region Optional
+
     public static IEnumerator Activate_Optional(this ActivateICardEffect activateICardEffect)
     {
         if (((ICardEffect)activateICardEffect).IsOptional)
@@ -820,9 +945,11 @@ public static class ActivateICardEffectExtensionClass
             yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<OptionalSkill>().SelectOptional((ICardEffect)activateICardEffect));
         }
     }
+
     #endregion
 
     #region Effect
+
     public static IEnumerator Activate_Effect(this ActivateICardEffect activateICardEffect)
     {
         CardSource card = ((ICardEffect)activateICardEffect).EffectSourceCard;
@@ -840,7 +967,6 @@ public static class ActivateICardEffectExtensionClass
                     yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().ActivateFieldPokemonSkillEffect(permanent, (ICardEffect)activateICardEffect));
                 }
             }
-
             else if (card.Owner.HandCards.Contains(card))
             {
                 if (card.ShowingHandCard != null)
@@ -861,12 +987,10 @@ public static class ActivateICardEffectExtensionClass
                     }
                 }
             }
-
             else if (CardEffectCommons.IsExistOnTrash(card))
             {
                 yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().ActivateTrashCardSkillEffect((ICardEffect)activateICardEffect));
             }
-
             else if (card.Owner.ExecutingCards.Contains(card))
             {
                 yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().ActivateExecutingCardSkillEffect(card, (ICardEffect)activateICardEffect));
@@ -875,9 +999,11 @@ public static class ActivateICardEffectExtensionClass
             yield return new WaitForSeconds(0.4f);
         }
     }
+
     #endregion
 
     #region Processing
+
     public static IEnumerator Activate_Execute(this ActivateICardEffect activateICardEffect, Hashtable hash)
     {
         if (((ICardEffect)activateICardEffect).UseOptional || !((ICardEffect)activateICardEffect).IsOptional)
@@ -889,9 +1015,11 @@ public static class ActivateICardEffectExtensionClass
             yield return ContinuousController.instance.StartCoroutine(activateICardEffect.Activate(hash));
         }
     }
+
     #endregion
 
     #region Optional→ Effect → Processing
+
     public static IEnumerator Activate_Optional_Effect_Execute(this ActivateICardEffect activateICardEffect, Hashtable hash, bool isCheckOptional = true, UnityAction<ICardEffect> useEffectCallback = null)
     {
         CardSource card = ((ICardEffect)activateICardEffect).EffectSourceCard;
@@ -957,7 +1085,6 @@ public static class ActivateICardEffectExtensionClass
                 {
                     yield return ContinuousController.instance.StartCoroutine(Activate_Optional(activateICardEffect));
                 }
-
                 else
                 {
                     ((ICardEffect)activateICardEffect).SetUseOptional(true);
@@ -994,15 +1121,16 @@ public static class ActivateICardEffectExtensionClass
             handCard.Outline_Select.SetActive(false);
         }
 
-
         if (card != null)
         {
             GManager.instance.turnStateMachine.isExecuting = oldIsExecuting;
         }
     }
+
     #endregion
 
     #region Effect → Processing
+
     public static IEnumerator Activate_Effect_Execute(this ActivateICardEffect activateICardEffect, Hashtable hash, UnityAction<ICardEffect> useEffectCallback)
     {
         //cost → effect processing
@@ -1013,12 +1141,14 @@ public static class ActivateICardEffectExtensionClass
             Debug.Log($"{((ICardEffect)activateICardEffect).EffectName} was used");
 
             #region Add log
+
             CardSource card = ((ICardEffect)activateICardEffect).EffectSourceCard;
 
             if (card != null)
             {
                 PlayLog.OnAddLog?.Invoke($"\nEffect:\n{card.BaseENGCardNameFromEntity}({card.CardID})\n\"{((ICardEffect)activateICardEffect).EffectName}\"\n");
             }
+
             #endregion
 
             //effect
@@ -1029,10 +1159,8 @@ public static class ActivateICardEffectExtensionClass
 
         yield return ContinuousController.instance.StartCoroutine(GManager.instance.autoProcessing.RuleProcess());
     }
+
     #endregion
 }
-#endregion
-
-
-
 
+#endregion