mbunch_kascope 1 rok temu
rodzic
commit
af820a740d

+ 1 - 1
Assets/CardBaseEntity/EX7/Purple/Tamer/Yuuki-EX7-065.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:27c3858cc6895e5226764c9f980fea497f3fb0e2fccda96dfd0d11b7148b6efa
+oid sha256:3128ed0ed12ed1fae07c11e4602395290ae6cbde774e4b3b5daef6b4023b07d6
 size 1317

+ 1 - 1
Assets/CardBaseEntity/EX7/Purple/Tamer/Yuuki-EX7-065_P1.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:063fc5817b8ccb2d2d97dd3a7f5d5e4dab807154b8483abef74632d81f6fdc47
+oid sha256:2caac62455d49d152c95c475da877ee69dd2c17e7272424ed633c63ae1cfddf9
 size 1323

+ 1 - 9
Assets/CardEffect/BT14/Blue/ZudomonAce_BT14_026.cs

@@ -131,15 +131,7 @@ public class ZudomonAce_BT14_026 : CEntity_Effect
 
             bool CanSelectPermanentCondition(Permanent permanent)
             {
-                if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
-                {
-                    if (permanent.DigivolutionCards.Count(CanSelectCardCondition) >= 1)
-                    {
-                        return true;
-                    }
-                }
-
-                return false;
+                return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card);
             }
 
             bool CanSelectCardCondition(CardSource cardSource)

+ 31 - 86
Assets/CardEffect/EX7/Blue/CrysPaledramon_EX7_021.cs

@@ -29,6 +29,16 @@ namespace DCGO.CardEffects.EX7
                     return "[When Digivolving] Trash any 2 digivolution cards of your opponent's Digimon. Then, if your opponent has no Digimon with digivolution cards, unsuspend this Digimon.";
                 }
 
+                bool CanSelectOpponentsDigimon(Permanent permanent)
+                {
+                    return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card);
+                }
+
+                bool CanSelectCardCondition(CardSource cardSource)
+                {
+                    return !cardSource.CanNotTrashFromDigivolutionCards(activateClass);
+                }
+
                 bool CanUseCondition(Hashtable hashtable)
                 {
                     if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
@@ -41,53 +51,25 @@ namespace DCGO.CardEffects.EX7
 
                 bool CanActivateCondition(Hashtable hashtable)
                 {
-                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
-                    {
-                        return true;
-                    }
-                    return false;
+                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
                 }
 
                 bool CheckOpponentDigivolutionSources()
                 {
-                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
-                    {
-                        int count = CardEffectCommons.MatchConditionOpponentsPermanentCount(card, (permanent) => permanent.IsDigimon && permanent.HasNoDigivolutionCards);
-
-                        if (count >= 1)
-                            return false;
-                    }
-
-                    return true;
+                    return !CardEffectCommons.HasMatchConditionOpponentsPermanent(card, (permanent) => permanent.IsDigimon && !permanent.HasNoDigivolutionCards);
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
                 {
-                    if (card.Owner.HandCards.Count >= 1)
-                    {
-                        int discardCount = 2;
-
-                        if (card.Owner.HandCards.Count < discardCount)
-                            discardCount = card.Owner.HandCards.Count;
-                        
-                        SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
-
-                        selectHandEffect.SetUp(
-                            selectPlayer: card.Owner,
-                            canTargetCondition: (cardSource) => true,
-                            canTargetCondition_ByPreSelecetedList: null,
-                            canEndSelectCondition: null,
-                            maxCount: discardCount,
-                            canNoSelect: false,
-                            canEndNotMax: false,
-                            isShowOpponent: true,
-                            selectCardCoroutine: null,
-                            afterSelectCardCoroutine: null,
-                            mode: SelectHandEffect.Mode.Discard,
-                            cardEffect: activateClass);
-
-                        yield return StartCoroutine(selectHandEffect.Activate());
-                    }
+                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.SelectTrashDigivolutionCards(
+                        permanentCondition: CanSelectOpponentsDigimon,
+                        cardCondition: CanSelectCardCondition,
+                        maxCount: 2,
+                        canNoTrash: false,
+                        isFromOnly1Permanent: false,
+                        activateClass: activateClass
+                    ));
+
                     //unsuspend 
                     if (CheckOpponentDigivolutionSources())
                     {
@@ -97,67 +79,30 @@ namespace DCGO.CardEffects.EX7
                     }
                 }
             }
-            
+
             #endregion
 
             #region Inherited Effect
-
             if (timing == EffectTiming.None)
             {
-                AddSkillClass addSkillClass = new AddSkillClass();
-                addSkillClass.SetUpICardEffect("Gain Piercing and Security Atk+1", CanUseCondition, card);
-                addSkillClass.SetUpAddSkillClass(cardSourceCondition: CardSourceCondition, getEffects: GetEffects);
-                addSkillClass.SetIsInheritedEffect(true);
-                addSkillClass.SetHashString("CrysPaledramon_EX7_021_GainPiercing_SecAtk1");
-                cardEffects.Add(addSkillClass);
-
-                string EffectDiscription()
-                {
-                    return "[Your Turn] While your opponent has no Digimon with digivolution cards, this Digimon with the [Ice-Snow] trait gains <Piercing> and <Security A. +1>";
-                }
-
-                bool CanUseCondition(Hashtable hashtable)
+                bool Condition()
                 {
-                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(card) && CardEffectCommons.IsOwnerTurn(card))
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
                     {
-                        if (card.ContainsTraits("Ice-Snow"))
+                        if (CardEffectCommons.IsOwnerTurn(card))
                         {
-                            return true;
+                            if (!CardEffectCommons.HasMatchConditionOpponentsPermanent(card, (permanent) => permanent.IsDigimon && !permanent.HasNoDigivolutionCards))
+                            {
+                                return true;
+                            }
                         }
                     }
 
                     return false;
                 }
 
-                bool CardSourceCondition(CardSource cardSource)
-                {
-                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
-                    {
-                        int count = CardEffectCommons.MatchConditionOpponentsPermanentCount(card, (permanent) => permanent.IsDigimon && permanent.HasNoDigivolutionCards);
-
-                        if (count >= 1)
-                            return false;
-                    }
-                    return true;
-                }
-
-                List<ICardEffect> GetEffects(CardSource cardSource, List<ICardEffect> cardEffects, EffectTiming timing)
-                {
-                    if (timing == EffectTiming.OnAllyAttack)
-                    {
-                        bool Condition()
-                        {
-                            return CardSourceCondition(cardSource);
-                        }
-
-                        cardEffects.Add(CardEffectFactory.PierceSelfEffect(isInheritedEffect: false, card: card,
-                            condition: Condition));
-                        cardEffects.Add(CardEffectFactory.ChangeSelfSAttackStaticEffect(changeValue: 1,
-                            isInheritedEffect: false, card: card, condition: Condition));
-                    }
-
-                    return cardEffects;
-                }
+                cardEffects.Add(CardEffectFactory.PierceSelfEffect(isInheritedEffect: true, card: card, condition: Condition));
+                cardEffects.Add(CardEffectFactory.ChangeSelfSAttackStaticEffect(changeValue: 1, isInheritedEffect: true, card: card, condition: Condition));
             }
 
             #endregion

+ 23 - 39
Assets/CardEffect/EX7/Blue/Paledramon_EX7_020.cs

@@ -10,8 +10,8 @@ namespace DCGO.CardEffects.EX7
         public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
         {
             List<ICardEffect> cardEffects = new List<ICardEffect>();
-            
-            
+
+            #region When Digivolving
             if (timing == EffectTiming.OnEnterFieldAnyone)
             {
                 ActivateClass activateClass = new ActivateClass();
@@ -26,30 +26,20 @@ namespace DCGO.CardEffects.EX7
 
                 bool CanSelectPermanentCondition(Permanent permanent)
                 {
-                    if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
-                    {
-                        if (permanent.DigivolutionCards.Count((cardSource) => !cardSource.CanNotTrashFromDigivolutionCards(activateClass)) >= 1)
-                        {
-                            return true;
-                        }
-                    }
-
-                    return false;
+                    return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card);
                 }
 
                 bool CanUseCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.CanTriggerOnAttack(hashtable, card);
+                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
+                        return CardEffectCommons.CanTriggerOnAttack(hashtable, card);
+
+                    return false;
                 }
 
                 bool CanActivateCondition(Hashtable hashtable)
                 {
-                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
-                    {
-                        return true;
-                    }
-
-                    return false;
+                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable _hashtable)
@@ -100,47 +90,39 @@ namespace DCGO.CardEffects.EX7
                         }
                     }
 
-                    if (CardEffectCommons.HasMatchConditionOpponentsPermanent(card, (permanent) => permanent.IsDigimon && permanent.HasNoDigivolutionCards))
+                    if (CardEffectCommons.HasMatchConditionOpponentsPermanent(card,
+                        (permanent) => permanent.IsDigimon && permanent.HasNoDigivolutionCards) ||
+                        card.Owner.Enemy.GetBattleAreaDigimons().Count == 0)
                     {
                         Permanent selectedPermanent = card.PermanentOfThisCard();
 
-                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainJamming(targetPermanent: selectedPermanent, effectDuration: EffectDuration.UntilEachTurnEnd, activateClass: activateClass));
-                    }
-                    
-                    if (CardEffectCommons.HasMatchConditionOpponentsPermanent(card, (permanent) => permanent.IsDigimon && permanent.HasNoDigivolutionCards))
-                    {
-                        Permanent selectedPermanent = card.PermanentOfThisCard();
-                        
-                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainBlocker(targetPermanent: selectedPermanent, effectDuration: EffectDuration.UntilEachTurnEnd, activateClass: activateClass));
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainJamming(targetPermanent: selectedPermanent, effectDuration: EffectDuration.UntilOpponentTurnEnd, activateClass: activateClass));
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainBlocker(targetPermanent: selectedPermanent, effectDuration: EffectDuration.UntilOpponentTurnEnd, activateClass: activateClass));
                     }
                 }
             }
+            #endregion
 
-            if (timing == EffectTiming.OnEnterFieldAnyone)
+            #region When Attacking - ESS
+            if (timing == EffectTiming.OnAllyAttack)
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Trash digivolution cards", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDiscription());
                 activateClass.SetIsInheritedEffect(true);
+                activateClass.SetHashString("Attacking_EX7_020");
                 cardEffects.Add(activateClass);
 
                 string EffectDiscription()
                 {
-                    return "[When Digivolving] Trash 2 digivolution cards at the bottom of 1 of your opponent's Digimon.";
+                    return "[When Attacking] [Once Per Turn] Trash the top digivolution card of 1 of your opponent's Digimon.";
                 }
                 
                 bool CanSelectDigimonCondition(Permanent permanent)
                 {
-                    if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
-                    {
-                        if (permanent.IsDigimon)
-                        {
-                            return true;
-                        }
-                    }
-
-                    return false;
+                    return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card);
                 }
+
                 bool CanActivateCondition(Hashtable hashtable)
                 {
                     if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
@@ -198,6 +180,8 @@ namespace DCGO.CardEffects.EX7
                     }
                 }
             }
+            #endregion
+
             return cardEffects;
         }
     }

+ 3 - 3
Assets/CardEffect/EX7/Blue/SummonFrost_EX7_067.cs

@@ -95,17 +95,17 @@ namespace DCGO.CardEffects.EX7
 
                     else
                     {
-                        if (card.Owner.HandCards.Count((cardSource) => CanSelectCardCondition(cardSource)) >= 1)
+                        if (card.Owner.HandCards.Count(CanSelectCardCondition) >= 1)
                         {
                             List<CardSource> selectedCards = new List<CardSource>();
 
-                            int maxCount = Math.Min(1, card.Owner.HandCards.Count((cardSource) => CanSelectCardCondition(cardSource)));
+                            int maxCount = Math.Min(1, card.Owner.HandCards.Count(CanSelectCardCondition);
 
                             SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
 
                             selectHandEffect.SetUp(
                                 selectPlayer: card.Owner,
-                                canTargetCondition: (cardSource) => CanSelectCardCondition(cardSource),
+                                canTargetCondition: CanSelectCardCondition,
                                 canTargetCondition_ByPreSelecetedList: CanTargetCondition_ByPreSelecetedList,
                                 canEndSelectCondition: CanEndSelectCondition,
                                 maxCount: maxCount,

+ 1 - 1
Assets/CardEffect/EX7/Purple/HeavyMetaldramon_EX7_062.cs

@@ -47,7 +47,7 @@ namespace DCGO.CardEffects.EX7
                 {
                     if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
                     {
-                        return true;
+                        return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
                     }
                    
                     return false; 

+ 6 - 80
Assets/CardEffect/EX7/Purple/Nidhoggmon_EX7_060.cs

@@ -26,8 +26,7 @@ namespace DCGO.CardEffects.EX7
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Play this card from trash with reduced cost", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDiscription());
-                activateClass.SetIsInheritedEffect(true);
+                activateClass.SetUpActivateClass(null, ActivateCoroutine, -1, false, EffectDiscription());
                 cardEffects.Add(activateClass);
 
                 string EffectDiscription()
@@ -39,20 +38,7 @@ namespace DCGO.CardEffects.EX7
                 {
                     if (CardEffectCommons.IsOwnerTurn(card))
                     {
-                        if(CardEffectCommons.IsExistOnTrash(card))
-                        {
-                            return true;
-                        }
-                    }
-
-                    return false;
-                }
-
-                bool CanActivateCondition(Hashtable hashtable)
-                {
-                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
-                    {
-                        if (card.Owner.LibraryCards.Count >= 1)
+                        if (CardEffectCommons.IsExistOnTrash(card))
                         {
                             if (card.Owner.HandCards.Count <= 4)
                             {
@@ -64,19 +50,6 @@ namespace DCGO.CardEffects.EX7
                     return false;
                 }
 
-                bool CanSelectCardCondition(CardSource cardSource)
-                {
-                    if (cardSource.IsDigimon)
-                    {
-                        if(cardSource.name.Contains("Nidhoggmon"))
-                        {
-                            return true;
-                        }
-                    }
-
-                    return false;
-                }
-
                 IEnumerator ActivateCoroutine(Hashtable _hashtable)
                 {
                     #region reduce play cost
@@ -103,20 +76,12 @@ namespace DCGO.CardEffects.EX7
 
                     int ChangeCost(CardSource cardSource, int Cost, SelectCardEffect.Root root, List<Permanent> targetPermanents)
                     {
-                        return Cost -3;
+                        return Cost -4;
                     }
 
                     bool CardSourceCondition(CardSource cardSource)
                     {
-                        if (cardSource.IsDigimon)
-                        {
-                            if (cardSource.ContainsCardName("Nidhoggmon"))
-                            {
-                                return true;
-                            }
-                        }
-
-                        return false;
+                        return (cardSource == card);
                     }
 
                     bool RootCondition(SelectCardEffect.Root root)
@@ -130,52 +95,13 @@ namespace DCGO.CardEffects.EX7
                     }
                     #endregion
 
-                    if (card.Owner.HandCards.Count(CanSelectCardCondition) >= 1)
-                    {
-                        List<CardSource> selectedCards = new List<CardSource>();
-
-                        int maxCount = 1;
-
-                        SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
-
-                        selectCardEffect.SetUp(
-                                    canTargetCondition: CanSelectCardCondition,
-                                    canTargetCondition_ByPreSelecetedList: null,
-                                    canEndSelectCondition: null,
-                                    canNoSelect: () => true,
-                                    selectCardCoroutine: SelectCardCoroutine,
-                                    afterSelectCardCoroutine: null,
-                                    message: "Select cards to play.",
-                                    maxCount: maxCount,
-                                    canEndNotMax: true,
-                                    isShowOpponent: true,
-                                    mode: SelectCardEffect.Mode.Custom,
-                                    root: SelectCardEffect.Root.Trash,
-                                    customRootCardList: null,
-                                    canLookReverseCard: true,
-                                    selectPlayer: card.Owner,
-                                    cardEffect: activateClass);
-
-                        selectCardEffect.SetUpCustomMessage("Select cards to play.", "The opponent is selecting cards to play.");
-                        selectCardEffect.SetUpCustomMessage_ShowCard("Played Card");
-
-                        yield return StartCoroutine(selectCardEffect.Activate());
-
-                        IEnumerator SelectCardCoroutine(CardSource cardSource)
-                        {
-                            selectedCards.Add(cardSource);
-
-                            yield return null;
-                        }
-
-                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(
-                          cardSources: selectedCards,
+                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(
+                          cardSources: new List<CardSource> { card },
                           activateClass: activateClass,
                           payCost: true,
                           isTapped: false,
                           root: SelectCardEffect.Root.Trash,
                           activateETB: true));
-                    }
 
                     #region release effect reducing play cost 
                     card.Owner.UntilCalculateFixedCostEffect.Remove(getCardEffect);

+ 5 - 5
Assets/CardEffect/EX7/Purple/SeventhFascination_EX7_072.cs

@@ -15,7 +15,7 @@ namespace DCGO.CardEffects.EX7
             if (timing == EffectTiming.OnEnterFieldAnyone)
             {
                 ActivateClass activateClass = new ActivateClass();
-                activateClass.SetUpICardEffect("Delete 1 level 4 Digimon and 1 level 6 Digimon", CanUseCondition, card);
+                activateClass.SetUpICardEffect("Return this to bottom of deck, Activate Main", CanUseCondition, card);
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
                 cardEffects.Add(activateClass);
 
@@ -175,12 +175,12 @@ namespace DCGO.CardEffects.EX7
 
                             string EffectDiscription1()
                             {
-                                return "[Ennd of Your Turn] Delete 1 of your Digimon.";
+                                return "[End of Your Turn] Delete 1 of your Digimon.";
                             }
 
                             bool CanSelectPermanentCondition(Permanent permanent)
                             {
-                                return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card);
+                                return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, cardSource);
                             }
 
                             bool CanUseCondition2(Hashtable hashtable)
@@ -202,7 +202,7 @@ namespace DCGO.CardEffects.EX7
                                     SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
 
                                     selectPermanentEffect.SetUp(
-                                        selectPlayer: card.Owner,
+                                        selectPlayer: cardSource.Owner,
                                         canTargetCondition: CanSelectPermanentCondition,
                                         canTargetCondition_ByPreSelecetedList: null,
                                         canEndSelectCondition: null,
@@ -229,7 +229,7 @@ namespace DCGO.CardEffects.EX7
             if (timing == EffectTiming.SecuritySkill)
             {
                 ActivateClass activateClass = new ActivateClass();
-                activateClass.SetUpICardEffect(card.BaseENGCardNameFromEntity, CanUseCondition, card);
+                activateClass.SetUpICardEffect("Delete 1 Opponents unsuspended Digimon", CanUseCondition, card);
                 activateClass.SetUpActivateClass(null, ActivateCoroutine, -1, false, EffectDiscription());
                 activateClass.SetIsSecurityEffect(true);
                 cardEffects.Add(activateClass);

+ 2 - 2
Assets/CardEffect/EX7/Purple/Yaamon_EX7_006.cs

@@ -14,7 +14,7 @@ namespace DCGO.CardEffects.EX7
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Digivolve into [Dark Dragon]/[Evil Dragon] trait trash card", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDiscription());
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, true, EffectDiscription());
                 activateClass.SetIsInheritedEffect(true);
                 activateClass.SetHashString("DigivolveTrash_EX7_006");
                 cardEffects.Add(activateClass);
@@ -37,7 +37,7 @@ namespace DCGO.CardEffects.EX7
                         {
                             if (card.Owner.HandCards.Count <= 4)
                             {
-                                if (card.Owner.TrashCards.Count >= 1)
+                                if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectCardCondition)) 
                                 {
                                     return true;
                                 }

+ 28 - 39
Assets/CardEffect/EX7/Purple/Yuuki_EX7_065.cs

@@ -70,8 +70,7 @@ namespace DCGO.CardEffects.EX7
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Digivolve into [Dark Dragon]/[Evil Dragon] trait trash card", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
-                activateClass.SetIsInheritedEffect(true);
+                activateClass.SetUpActivateClass(null, ActivateCoroutine, -1, false, EffectDiscription());
                 cardEffects.Add(activateClass);
 
                 string EffectDiscription()
@@ -79,31 +78,15 @@ namespace DCGO.CardEffects.EX7
                     return "[Main] If you have 4 or fewer cards in your hand, by suspending this Tamer, 1 of your Digimon may digivolve into a Digimon card with the [Dark Dragon]/[Evil Dragon] trait in the trash.";
                 }
 
-                bool CanUseCondition(Hashtable hashtable)
-                {
-                    if (CardEffectCommons.IsExistOnBattleArea(card))
-                    {
-                        return true;
-                    }
-
-                    return false;
-                }
-
-                bool CanActivateCondition(Hashtable hashtable)
+                bool CanSelectCardCondition(CardSource cardSource)
                 {
-                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    if (cardSource.IsDigimon)
                     {
-                        if (card.Owner.LibraryCards.Count >= 1)
+                        if (cardSource.ContainsTraits("Dark Dragon") || cardSource.ContainsTraits("Evil Dragon"))
                         {
-                            if (card.Owner.HandCards.Count <= 4)
+                            if (cardSource.CanPlayCardTargetFrame(card.PermanentOfThisCard().PermanentFrame, true, activateClass))
                             {
-                                if (card.Owner.TrashCards.Count >= 1)
-                                {
-                                    if (CardEffectCommons.CanActivateSuspendCostEffect(card))
-                                    {
-                                        return true;
-                                    }
-                                }
+                                return true;
                             }
                         }
                     }
@@ -111,36 +94,42 @@ namespace DCGO.CardEffects.EX7
                     return false;
                 }
 
-                bool CanSelectCardCondition(CardSource cardSource)
+                bool CanUseCondition(Hashtable hashtable)
                 {
-                    if (cardSource.IsDigimon)
+                    if (isExistOnField(card))
                     {
-                        if (cardSource.ContainsTraits("Dark Dragon") || cardSource.ContainsTraits("Evil Dragon"))
+                        if (card.Owner.HandCards.Count <= 4)
                         {
-                            if (cardSource.CanPlayCardTargetFrame(card.PermanentOfThisCard().PermanentFrame, true, activateClass))
+                            if (card.Owner.TrashCards.Count >= 1)
                             {
-                                return true;
+                                if (CardEffectCommons.CanActivateSuspendCostEffect(card))
+                                {
+                                    return true;
+                                }
                             }
                         }
                     }
 
                     return false;
                 }
-
+                              
                 IEnumerator ActivateCoroutine(Hashtable _hashtable)
                 {
                     yield return ContinuousController.instance.StartCoroutine(new SuspendPermanentsClass(new List<Permanent>() { card.PermanentOfThisCard() }, CardEffectCommons.CardEffectHashtable(activateClass)).Tap());
 
-                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.DigivolveIntoHandOrTrashCard(
-                       targetPermanent: card.PermanentOfThisCard(),
-                       cardCondition: CanSelectCardCondition,
-                       payCost: true,
-                       reduceCostTuple: null,
-                       fixedCostTuple: null,
-                       ignoreDigivolutionRequirementFixedCost: -1,
-                       isHand: false,
-                       activateClass: activateClass,
-                       successProcess: null));
+                    if(CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectCardCondition))
+                    {
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.DigivolveIntoHandOrTrashCard(
+                           targetPermanent: card.PermanentOfThisCard(),
+                           cardCondition: CanSelectCardCondition,
+                           payCost: true,
+                           reduceCostTuple: null,
+                           fixedCostTuple: null,
+                           ignoreDigivolutionRequirementFixedCost: -1,
+                           isHand: false,
+                           activateClass: activateClass,
+                           successProcess: null));
+                    }
                 }
             }
             #endregion

+ 31 - 15
Assets/CardEffect/EX7/Red/ChaosTriangular_EX7_066.cs

@@ -108,30 +108,46 @@ namespace DCGO.CardEffects.EX7
             #region Main
             if (timing == EffectTiming.OptionSkill)
             {
-                int maxDP()
+                int count()
                 {
-                    int maxDP = 9000;
-                    List<string> cardIDs = new List<string>();
+                    List<Permanent> cards = card.Owner.GetBattleAreaPermanents();
+
+                    bool end = false;
 
-                    foreach (Permanent p in card.Owner.GetBattleAreaPermanents())
+                    while (true)
                     {
-                        if(p.TopCard.CardTraits.Contains("Three Musketeers") && p.IsDigimon || p.TopCard.CardTraits.Contains("ThreeMusketeers") && p.IsDigimon)
+                        if (cards.Count == 0)
+                        {
+                            end = true;
+                        }
+
+                        if (end)
                         {
-                            if (!cardIDs.Contains(p.TopCard.CardID))
+                            break;
+                        }
+
+                        for (int i = 0; i < cards.Count; i++)
+                        {
+                            Permanent searchTargetPermanent = cards[i];
+
+                            if (cards.Some(permanent => permanent != searchTargetPermanent && permanent.TopCard.HasSameCardName(searchTargetPermanent.TopCard)))
                             {
-                                cardIDs.Add(p.TopCard.CardID);
+                                cards.Remove(searchTargetPermanent);
+                                break;
                             }
-                        }                  
-                    }
-
-                    int count = cardIDs.Count();
 
-                    if (CardEffectCommons.IsExistOnBattleArea(card))
-                    {
-                        maxDP += 3000 * count;
+                            if (i == cards.Count - 1)
+                            {
+                                end = true;
+                            }
+                        }
                     }
+                    return cards.Count;
+                }
 
-                    return maxDP;
+                int maxDP()
+                {
+                    return 9000 + (3000 * count());
                 }
 
                 ActivateClass activateClass = new ActivateClass();